@linktr.ee/messaging-react 3.18.0 → 3.19.0-rc-1785393579
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-DdJcz7Np.cjs → Card-BI3pdi-h.cjs} +2 -2
- package/dist/Card-BI3pdi-h.cjs.map +1 -0
- package/dist/{Card-owYJxu9h.js → Card-CFJBJl09.js} +2 -2
- package/dist/Card-CFJBJl09.js.map +1 -0
- package/dist/index-CcUtwsNq.cjs +2 -0
- package/dist/index-CcUtwsNq.cjs.map +1 -0
- package/dist/{index-CsPg1TYf.js → index-DtD5bLEl.js} +812 -811
- package/dist/index-DtD5bLEl.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -8
- package/dist/index.js +1 -1
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.ts +1 -8
- package/dist/testing.js.map +1 -1
- package/package.json +5 -4
- package/src/components/ChannelList/CustomChannelPreview.tsx +4 -3
- package/src/components/ChannelView.stories.tsx +1 -2
- package/src/components/CustomMessage/CustomMessageActions.tsx +3 -1
- package/src/components/CustomMessage/LockedAttachment/components/_shared/useReceivedSource.ts +3 -0
- package/src/components/CustomMessage/MessageTag.tsx +5 -4
- package/src/components/CustomMessage/index.tsx +0 -1
- package/src/components/FaqList/index.tsx +2 -3
- package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +3 -0
- package/src/components/MessageAttachment/Audio/AudioAttachment.stories.tsx +0 -1
- package/src/components/MessageAttachment/File/FileAttachment.stories.tsx +0 -1
- package/src/components/MessageAttachment/Image/ImageAttachment.stories.tsx +0 -1
- package/src/components/MessageAttachment/Pdf/PdfAttachment.stories.tsx +0 -1
- package/src/components/MessageAttachment/Video/VideoAttachment.stories.tsx +0 -1
- package/src/components/MessageAttachment/_shared/VideoViewer.tsx +0 -1
- package/src/components/MessageAttachment/_shared/useCarousel.ts +3 -0
- package/src/components/MessagingShell/index.tsx +3 -0
- package/src/hooks/useChannelModerationActions.ts +3 -0
- package/src/hooks/useChannelStar.ts +3 -0
- package/src/providers/MessagingProvider.tsx +3 -0
- package/src/stream-custom-data.ts +29 -14
- package/src/testing/createMockMessagingClient.ts +0 -1
- package/src/utils/resolveConversationParticipant.ts +2 -5
- package/dist/Card-DdJcz7Np.cjs.map +0 -1
- package/dist/Card-owYJxu9h.js.map +0 -1
- package/dist/index-BQ4mQDo2.cjs +0 -2
- package/dist/index-BQ4mQDo2.cjs.map +0 -1
- package/dist/index-CsPg1TYf.js.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as s, jsxs as h, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import B, { createContext as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
2
|
+
import B, { createContext as ot, useContext as Ce, useCallback as q, useState as F, useRef as H, useEffect as Y, useId as Qs, useMemo as se, Suspense as en } from "react";
|
|
3
|
+
import { StreamChatService as tn } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as sn, LinkPreviewsManager as Qe } from "stream-chat";
|
|
5
|
+
import { Chat as nn, useChannelStateContext as me, useChatContext as ke, DateSeparator as an, useMessageContext as he, MessageStatus as rn, MessageErrorIcon as et, MessageText as Oe, areMessageUIPropsEqual as on, useMessageReminder as ln, useComponentContext as ls, Attachment as cn, EditMessageModal as dn, MessageBlocked as un, MessageBouncePrompt as mn, MessageDeleted as hn, MessageIsThreadReplyInChannelButtonIndicator as fn, MessageRepliesCountButton as gn, ReminderNotification as pn, StreamedMessageText as bn, messageHasAttachments as vn, messageHasReactions as xn, isDateSeparatorMessage as _n, isMessageBlocked as wn, isMessageBounced as Nn, MessageBounceModal as yn, Poll as Cn, useMessageComposer as kn, useStateStore as Sn, MessageInput as Ht, useMessageInputContext as En, useMessageComposerHasSendableData as In, AttachmentPreviewList as Tn, QuotedMessagePreview as An, TextareaComposer as Mn, MessageTimestamp as He, AIStates as Ge, useTypingContext as Ln, useAIState as Rn, Channel as Dn, WithComponents as Pn, Window as On, MessageList as Gt, ChannelList as zn, InfiniteScroll as Fn } from "stream-chat-react";
|
|
6
6
|
import C from "classnames";
|
|
7
|
-
import { StarIcon as
|
|
8
|
-
import {
|
|
9
|
-
|
|
7
|
+
import { StarIcon as tt, DotsThreeIcon as Bn, SpinnerGapIcon as Re, SignOutIcon as $n, ProhibitInsetIcon as Yt, FlagIcon as cs, CurrencyDollarIcon as Un, CaretRightIcon as ds, ArrowLeftIcon as Vn, FileIcon as us, ImageIcon as jn, SpeakerHighIcon as Hn, VideoCameraIcon as ms, FileMdIcon as Gn, FileTextIcon as Yn, FileZipIcon as Wn, FilePptIcon as qn, FileCsvIcon as Xn, FileXlsIcon as Kn, FileDocIcon as Zn, FilePdfIcon as Jn, CircleNotchIcon as be, PlayIcon as st, PauseIcon as Qn, LinkIcon as ea, DownloadSimpleIcon as ye, XIcon as lt, CaretLeftIcon as ta, GiftIcon as sa, ThumbsUpIcon as na, ThumbsDownIcon as aa, WarningCircleIcon as ra, ChecksIcon as ia, PencilSimpleIcon as oa, TrashSimpleIcon as la, ArrowUpIcon as ca, SparkleIcon as da, ProhibitIcon as ua } from "@phosphor-icons/react";
|
|
8
|
+
import { isOfficialChannel as ma, MESSAGE_CUSTOM_TYPE as oe, selectEnabledFaqs as ha } from "@linktr.ee/messaging-taxonomy";
|
|
9
|
+
import { MessageActions as fa, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
|
|
10
|
+
const fs = ot({
|
|
10
11
|
service: null,
|
|
11
12
|
client: null,
|
|
12
13
|
isConnected: !1,
|
|
@@ -16,7 +17,7 @@ const hs = it({
|
|
|
16
17
|
refreshConnection: async () => {
|
|
17
18
|
},
|
|
18
19
|
debug: !1
|
|
19
|
-
}),
|
|
20
|
+
}), ct = () => Ce(fs), jo = ({
|
|
20
21
|
children: e,
|
|
21
22
|
user: t,
|
|
22
23
|
serviceConfig: n,
|
|
@@ -26,7 +27,7 @@ const hs = it({
|
|
|
26
27
|
client: l
|
|
27
28
|
}) => {
|
|
28
29
|
var E, I;
|
|
29
|
-
const o =
|
|
30
|
+
const o = q(
|
|
30
31
|
(k, ...P) => {
|
|
31
32
|
i && console.log(`🔥 [MessagingProvider] ${k}`, ...P);
|
|
32
33
|
},
|
|
@@ -64,7 +65,7 @@ const hs = it({
|
|
|
64
65
|
capabilities: r
|
|
65
66
|
};
|
|
66
67
|
const $ = H(null);
|
|
67
|
-
!l && a && ((E = $.current) == null ? void 0 : E.apiKey) !== a && ($.current = { apiKey: a, client: new
|
|
68
|
+
!l && a && ((E = $.current) == null ? void 0 : E.apiKey) !== a && ($.current = { apiKey: a, client: new sn(a) });
|
|
68
69
|
const z = l || (a ? ((I = $.current) == null ? void 0 : I.client) ?? null : null);
|
|
69
70
|
Y(() => {
|
|
70
71
|
const k = O.current, P = y.current;
|
|
@@ -83,7 +84,7 @@ const hs = it({
|
|
|
83
84
|
renderCount: k,
|
|
84
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
86
|
});
|
|
86
|
-
const G = new
|
|
87
|
+
const G = new tn({
|
|
87
88
|
...P,
|
|
88
89
|
apiKey: a,
|
|
89
90
|
debug: M.current,
|
|
@@ -150,7 +151,7 @@ const hs = it({
|
|
|
150
151
|
k && (D.current = null, (P = w.current) == null || P.disconnectUser().catch(console.error));
|
|
151
152
|
};
|
|
152
153
|
}, [z]);
|
|
153
|
-
const S =
|
|
154
|
+
const S = q(async () => {
|
|
154
155
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
155
156
|
hasService: !!d,
|
|
156
157
|
hasUser: !!t
|
|
@@ -214,8 +215,8 @@ const hs = it({
|
|
|
214
215
|
renderCount: O.current,
|
|
215
216
|
willRenderChat: !!z,
|
|
216
217
|
contextValueReady: !!T
|
|
217
|
-
}), /* @__PURE__ */ s(
|
|
218
|
-
|
|
218
|
+
}), /* @__PURE__ */ s(fs.Provider, { value: T, children: z ? /* @__PURE__ */ s(
|
|
219
|
+
nn,
|
|
219
220
|
{
|
|
220
221
|
client: z,
|
|
221
222
|
customClasses: {
|
|
@@ -224,7 +225,7 @@ const hs = it({
|
|
|
224
225
|
children: e
|
|
225
226
|
}
|
|
226
227
|
) : e });
|
|
227
|
-
},
|
|
228
|
+
}, ga = () => ct(), gs = (e) => {
|
|
228
229
|
var a, r;
|
|
229
230
|
const [t, n] = F(
|
|
230
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -246,14 +247,14 @@ const hs = it({
|
|
|
246
247
|
e.off("member.updated", i);
|
|
247
248
|
};
|
|
248
249
|
}, [e]), t;
|
|
249
|
-
},
|
|
250
|
-
function
|
|
250
|
+
}, pa = "linktree-official-sender";
|
|
251
|
+
function ps(e, t, n) {
|
|
251
252
|
const a = Object.values(e || {});
|
|
252
|
-
if (n
|
|
253
|
+
if (ma(n)) {
|
|
253
254
|
const r = a.find(
|
|
254
255
|
(i) => {
|
|
255
256
|
var l;
|
|
256
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
257
|
+
return ((l = i.user) == null ? void 0 : l.id) === pa;
|
|
257
258
|
}
|
|
258
259
|
);
|
|
259
260
|
if (r) return r;
|
|
@@ -265,18 +266,18 @@ function gs(e, t, n) {
|
|
|
265
266
|
}
|
|
266
267
|
);
|
|
267
268
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
270
|
-
return
|
|
269
|
+
const ba = /^[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 va(e) {
|
|
271
|
+
return ba.test(e.trim());
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
+
function Wt(e, t) {
|
|
273
274
|
const n = e == null ? void 0 : e.trim();
|
|
274
|
-
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !va(n);
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
277
|
+
function bs(e) {
|
|
278
|
+
return Wt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Wt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
278
279
|
}
|
|
279
|
-
const
|
|
280
|
+
const qt = [
|
|
280
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
281
282
|
// Apple
|
|
282
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -304,7 +305,7 @@ const Wt = [
|
|
|
304
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
305
306
|
// Melon
|
|
306
307
|
];
|
|
307
|
-
function
|
|
308
|
+
function xa(e) {
|
|
308
309
|
let t = 0;
|
|
309
310
|
for (let n = 0; n < e.length; n++) {
|
|
310
311
|
const a = e.charCodeAt(n);
|
|
@@ -312,16 +313,16 @@ function ba(e) {
|
|
|
312
313
|
}
|
|
313
314
|
return Math.abs(t);
|
|
314
315
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
316
|
+
function vs(e) {
|
|
317
|
+
return qt[xa(e) % qt.length];
|
|
317
318
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
319
|
+
function _a(e) {
|
|
320
|
+
return vs(e).emoji;
|
|
320
321
|
}
|
|
321
|
-
function
|
|
322
|
-
return
|
|
322
|
+
function wa(e) {
|
|
323
|
+
return vs(e).bgColor;
|
|
323
324
|
}
|
|
324
|
-
const
|
|
325
|
+
const xe = ({
|
|
325
326
|
id: e,
|
|
326
327
|
image: t,
|
|
327
328
|
size: n = 40,
|
|
@@ -330,7 +331,7 @@ const ve = ({
|
|
|
330
331
|
shape: i = "squircle",
|
|
331
332
|
dmAgentEnabled: l = !1
|
|
332
333
|
}) => {
|
|
333
|
-
const o =
|
|
334
|
+
const o = _a(e), d = wa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
335
|
"img",
|
|
335
336
|
{
|
|
336
337
|
src: t,
|
|
@@ -368,7 +369,7 @@ const ve = ({
|
|
|
368
369
|
{
|
|
369
370
|
"aria-hidden": "true",
|
|
370
371
|
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)]",
|
|
371
|
-
children: /* @__PURE__ */ s(
|
|
372
|
+
children: /* @__PURE__ */ s(tt, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
372
373
|
}
|
|
373
374
|
),
|
|
374
375
|
/* @__PURE__ */ s(
|
|
@@ -394,7 +395,7 @@ const ve = ({
|
|
|
394
395
|
]
|
|
395
396
|
}
|
|
396
397
|
);
|
|
397
|
-
},
|
|
398
|
+
}, Na = "https://linktr.ee/s/about/trust-center/report", ya = ({
|
|
398
399
|
channel: e,
|
|
399
400
|
participant: t,
|
|
400
401
|
showBlockParticipant: n = !0,
|
|
@@ -408,7 +409,7 @@ const ve = ({
|
|
|
408
409
|
logLabel: f = "useChannelModerationActions"
|
|
409
410
|
}) => {
|
|
410
411
|
var T;
|
|
411
|
-
const { service: u, debug: g } =
|
|
412
|
+
const { service: u, debug: g } = ct(), c = (T = t == null ? void 0 : t.user) == null ? void 0 : T.id, x = !!(a && n && u && c), [_, b] = F(!1), [p, v] = F(null), [w, y] = F(!1), [M, L] = F(!1), O = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
|
|
412
413
|
return Y(() => {
|
|
413
414
|
if (!x || !u || !c) {
|
|
414
415
|
b(!1), v(null);
|
|
@@ -478,10 +479,10 @@ const ve = ({
|
|
|
478
479
|
}
|
|
479
480
|
},
|
|
480
481
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(), m == null || m(), window.open(
|
|
482
|
+
d == null || d(), m == null || m(), window.open(Na, "_blank", "noopener,noreferrer");
|
|
482
483
|
}
|
|
483
484
|
};
|
|
484
|
-
},
|
|
485
|
+
}, _e = ({
|
|
485
486
|
variant: e = "default",
|
|
486
487
|
className: t,
|
|
487
488
|
children: n,
|
|
@@ -498,7 +499,7 @@ const ve = ({
|
|
|
498
499
|
...a,
|
|
499
500
|
children: n
|
|
500
501
|
}
|
|
501
|
-
),
|
|
502
|
+
), Ca = ({
|
|
502
503
|
channel: e,
|
|
503
504
|
participant: t,
|
|
504
505
|
showDeleteConversation: n = !0,
|
|
@@ -512,7 +513,7 @@ const ve = ({
|
|
|
512
513
|
customChannelActions: f,
|
|
513
514
|
triggerClassName: u
|
|
514
515
|
}) => {
|
|
515
|
-
const [g, c] = F(!1), x = H(null), _ =
|
|
516
|
+
const [g, c] = F(!1), x = H(null), _ = Qs(), b = q(() => c(!1), []), {
|
|
516
517
|
isParticipantBlocked: p,
|
|
517
518
|
isCheckingBlockedStatus: v,
|
|
518
519
|
isLeaving: w,
|
|
@@ -521,7 +522,7 @@ const ve = ({
|
|
|
521
522
|
handleBlockUser: L,
|
|
522
523
|
handleUnblockUser: O,
|
|
523
524
|
handleReportUser: $
|
|
524
|
-
} =
|
|
525
|
+
} = ya({
|
|
525
526
|
channel: e,
|
|
526
527
|
participant: t,
|
|
527
528
|
showBlockParticipant: a,
|
|
@@ -555,7 +556,7 @@ const ve = ({
|
|
|
555
556
|
"aria-controls": g ? _ : void 0,
|
|
556
557
|
onClick: () => c((D) => !D),
|
|
557
558
|
children: [
|
|
558
|
-
/* @__PURE__ */ s(
|
|
559
|
+
/* @__PURE__ */ s(Bn, { className: "size-5 text-black/90" }),
|
|
559
560
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
560
561
|
]
|
|
561
562
|
}
|
|
@@ -571,13 +572,13 @@ const ve = ({
|
|
|
571
572
|
),
|
|
572
573
|
children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
|
|
573
574
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
|
|
574
|
-
|
|
575
|
+
_e,
|
|
575
576
|
{
|
|
576
577
|
onClick: M,
|
|
577
578
|
disabled: w,
|
|
578
579
|
"aria-busy": w,
|
|
579
580
|
children: [
|
|
580
|
-
w ? /* @__PURE__ */ s(
|
|
581
|
+
w ? /* @__PURE__ */ s(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s($n, { className: "h-5 w-5" }),
|
|
581
582
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
583
|
]
|
|
583
584
|
}
|
|
@@ -585,35 +586,35 @@ const ve = ({
|
|
|
585
586
|
a && /* @__PURE__ */ s("li", { children: v ? (
|
|
586
587
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
588
|
// so a premature click can't act on a stale block state.
|
|
588
|
-
/* @__PURE__ */ h(
|
|
589
|
-
/* @__PURE__ */ s(
|
|
589
|
+
/* @__PURE__ */ h(_e, { disabled: !0, "aria-busy": !0, children: [
|
|
590
|
+
/* @__PURE__ */ s(Re, { className: "h-5 w-5 animate-spin" }),
|
|
590
591
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
591
592
|
] })
|
|
592
593
|
) : p ? /* @__PURE__ */ h(
|
|
593
|
-
|
|
594
|
+
_e,
|
|
594
595
|
{
|
|
595
596
|
onClick: O,
|
|
596
597
|
disabled: y,
|
|
597
598
|
"aria-busy": y,
|
|
598
599
|
children: [
|
|
599
|
-
y ? /* @__PURE__ */ s(
|
|
600
|
+
y ? /* @__PURE__ */ s(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
600
601
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
601
602
|
]
|
|
602
603
|
}
|
|
603
604
|
) : /* @__PURE__ */ h(
|
|
604
|
-
|
|
605
|
+
_e,
|
|
605
606
|
{
|
|
606
607
|
onClick: L,
|
|
607
608
|
disabled: y,
|
|
608
609
|
"aria-busy": y,
|
|
609
610
|
children: [
|
|
610
|
-
y ? /* @__PURE__ */ s(
|
|
611
|
+
y ? /* @__PURE__ */ s(Re, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yt, { className: "h-5 w-5" }),
|
|
611
612
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
612
613
|
]
|
|
613
614
|
}
|
|
614
615
|
) }),
|
|
615
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
|
|
616
|
-
/* @__PURE__ */ s(
|
|
616
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(_e, { variant: "danger", onClick: $, children: [
|
|
617
|
+
/* @__PURE__ */ s(cs, { className: "h-5 w-5" }),
|
|
617
618
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
619
|
] }) }),
|
|
619
620
|
f
|
|
@@ -621,7 +622,7 @@ const ve = ({
|
|
|
621
622
|
}
|
|
622
623
|
)
|
|
623
624
|
] });
|
|
624
|
-
},
|
|
625
|
+
}, Ye = "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", ka = "CUSTOMER_PAID", Sa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ka, Ea = ({
|
|
625
626
|
className: e,
|
|
626
627
|
onBack: t,
|
|
627
628
|
showBackButton: n,
|
|
@@ -640,17 +641,17 @@ const ve = ({
|
|
|
640
641
|
onParticipantNameClick: _
|
|
641
642
|
}) => {
|
|
642
643
|
var S, T, E, I;
|
|
643
|
-
const { channel: b } =
|
|
644
|
+
const { channel: b } = me(), { client: p } = ke(), v = B.useMemo(
|
|
644
645
|
() => {
|
|
645
646
|
var k;
|
|
646
|
-
return
|
|
647
|
+
return ps(
|
|
647
648
|
(k = b.state) == null ? void 0 : k.members,
|
|
648
649
|
p == null ? void 0 : p.userID,
|
|
649
650
|
b.type
|
|
650
651
|
);
|
|
651
652
|
},
|
|
652
653
|
[(S = b.state) == null ? void 0 : S.members, p == null ? void 0 : p.userID, b.type]
|
|
653
|
-
), w =
|
|
654
|
+
), w = bs(v == null ? void 0 : v.user), y = (T = v == null ? void 0 : v.user) == null ? void 0 : T.image, M = gs(b), L = Sa((E = b.data) == null ? void 0 : E.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, O = a && M, $ = L || O || !!_, z = async () => {
|
|
654
655
|
try {
|
|
655
656
|
M ? await b.unpin() : await b.pin();
|
|
656
657
|
} catch (k) {
|
|
@@ -661,7 +662,7 @@ const ve = ({
|
|
|
661
662
|
}
|
|
662
663
|
}, D = /* @__PURE__ */ h(K, { children: [
|
|
663
664
|
/* @__PURE__ */ s(
|
|
664
|
-
|
|
665
|
+
xe,
|
|
665
666
|
{
|
|
666
667
|
id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || b.id || "unknown",
|
|
667
668
|
name: w,
|
|
@@ -686,7 +687,7 @@ const ve = ({
|
|
|
686
687
|
{
|
|
687
688
|
"aria-label": "Paid customer",
|
|
688
689
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
689
|
-
children: /* @__PURE__ */ s(
|
|
690
|
+
children: /* @__PURE__ */ s(Un, { className: "size-2.5", weight: "bold" })
|
|
690
691
|
}
|
|
691
692
|
),
|
|
692
693
|
O && /* @__PURE__ */ s(
|
|
@@ -694,11 +695,11 @@ const ve = ({
|
|
|
694
695
|
{
|
|
695
696
|
"aria-label": "Starred conversation",
|
|
696
697
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
697
|
-
children: /* @__PURE__ */ s(
|
|
698
|
+
children: /* @__PURE__ */ s(tt, { className: "size-2.5", weight: "fill" })
|
|
698
699
|
}
|
|
699
700
|
),
|
|
700
701
|
_ && /* @__PURE__ */ s(
|
|
701
|
-
|
|
702
|
+
ds,
|
|
702
703
|
{
|
|
703
704
|
"aria-hidden": "true",
|
|
704
705
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -722,14 +723,14 @@ const ve = ({
|
|
|
722
723
|
"button",
|
|
723
724
|
{
|
|
724
725
|
className: C(
|
|
725
|
-
|
|
726
|
+
Ye,
|
|
726
727
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
727
728
|
),
|
|
728
729
|
onClick: t || (() => {
|
|
729
730
|
}),
|
|
730
731
|
type: "button",
|
|
731
732
|
"aria-label": "Back to conversations",
|
|
732
|
-
children: /* @__PURE__ */ s(
|
|
733
|
+
children: /* @__PURE__ */ s(Vn, { className: "size-5 text-black/90" })
|
|
733
734
|
}
|
|
734
735
|
) }),
|
|
735
736
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: _ ? /* @__PURE__ */ s(
|
|
@@ -746,13 +747,13 @@ const ve = ({
|
|
|
746
747
|
a && /* @__PURE__ */ s(
|
|
747
748
|
"button",
|
|
748
749
|
{
|
|
749
|
-
className:
|
|
750
|
+
className: Ye,
|
|
750
751
|
onClick: z,
|
|
751
752
|
type: "button",
|
|
752
753
|
"aria-pressed": M,
|
|
753
754
|
"aria-label": M ? "Unstar conversation" : "Star conversation",
|
|
754
755
|
children: /* @__PURE__ */ s(
|
|
755
|
-
|
|
756
|
+
tt,
|
|
756
757
|
{
|
|
757
758
|
className: C("size-5", {
|
|
758
759
|
"text-[#FFD60A]": M,
|
|
@@ -764,7 +765,7 @@ const ve = ({
|
|
|
764
765
|
}
|
|
765
766
|
),
|
|
766
767
|
x && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
767
|
-
|
|
768
|
+
Ca,
|
|
768
769
|
{
|
|
769
770
|
channel: b,
|
|
770
771
|
participant: v,
|
|
@@ -777,37 +778,37 @@ const ve = ({
|
|
|
777
778
|
onBlockParticipantClick: f,
|
|
778
779
|
onReportParticipantClick: u,
|
|
779
780
|
customChannelActions: g,
|
|
780
|
-
triggerClassName:
|
|
781
|
+
triggerClassName: Ye
|
|
781
782
|
}
|
|
782
783
|
))
|
|
783
784
|
] })
|
|
784
785
|
] })
|
|
785
786
|
}
|
|
786
787
|
);
|
|
787
|
-
},
|
|
788
|
-
function
|
|
789
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
788
|
+
}, Ia = (e) => /* @__PURE__ */ s(an, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
|
|
789
|
+
function Ta(e) {
|
|
790
|
+
return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
|
|
790
791
|
}
|
|
791
|
-
function
|
|
792
|
-
const { channel: t } =
|
|
793
|
-
() =>
|
|
792
|
+
function Aa(e) {
|
|
793
|
+
const { channel: t } = me(), { client: n } = ke("useMessageVote"), a = se(
|
|
794
|
+
() => Ta(e.own_reactions),
|
|
794
795
|
[e.own_reactions]
|
|
795
|
-
), r =
|
|
796
|
+
), r = q(async () => {
|
|
796
797
|
if (n != null && n.userID)
|
|
797
798
|
try {
|
|
798
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
799
|
+
a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
|
|
799
800
|
e.id,
|
|
800
|
-
{ type:
|
|
801
|
+
{ type: nt },
|
|
801
802
|
{ enforce_unique: !0, skip_push: !0 }
|
|
802
803
|
);
|
|
803
804
|
} catch {
|
|
804
805
|
}
|
|
805
|
-
}, [t, n == null ? void 0 : n.userID, e.id, a]), i =
|
|
806
|
+
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = q(async () => {
|
|
806
807
|
if (n != null && n.userID)
|
|
807
808
|
try {
|
|
808
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
809
|
+
a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
|
|
809
810
|
e.id,
|
|
810
|
-
{ type:
|
|
811
|
+
{ type: at },
|
|
811
812
|
{ enforce_unique: !0, skip_push: !0 }
|
|
812
813
|
);
|
|
813
814
|
} catch {
|
|
@@ -815,39 +816,39 @@ function Ia(e) {
|
|
|
815
816
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
816
817
|
return { selected: a, voteUp: r, voteDown: i };
|
|
817
818
|
}
|
|
818
|
-
function
|
|
819
|
+
function Ma(e) {
|
|
819
820
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
820
821
|
}
|
|
821
|
-
function
|
|
822
|
+
function xs({
|
|
822
823
|
message: e,
|
|
823
824
|
viewerLanguage: t
|
|
824
825
|
}) {
|
|
825
826
|
var r;
|
|
826
|
-
const n = e == null ? void 0 : e.text, a =
|
|
827
|
+
const n = e == null ? void 0 : e.text, a = Ma(t);
|
|
827
828
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
828
829
|
}
|
|
829
|
-
const
|
|
830
|
-
function
|
|
830
|
+
const La = ["linktr.ee"], Xt = "messaging-attachment-v1_0";
|
|
831
|
+
function Ra(e) {
|
|
831
832
|
try {
|
|
832
833
|
return new URL(e).hostname.toLowerCase();
|
|
833
834
|
} catch {
|
|
834
835
|
return null;
|
|
835
836
|
}
|
|
836
837
|
}
|
|
837
|
-
function
|
|
838
|
-
return
|
|
838
|
+
function Da(e) {
|
|
839
|
+
return La.some(
|
|
839
840
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
840
841
|
);
|
|
841
842
|
}
|
|
842
|
-
function
|
|
843
|
+
function ue(e) {
|
|
843
844
|
const t = e == null ? void 0 : e.trim();
|
|
844
845
|
if (!t) return;
|
|
845
|
-
const n =
|
|
846
|
-
if (!n || !
|
|
846
|
+
const n = Ra(t);
|
|
847
|
+
if (!n || !Da(n)) return t;
|
|
847
848
|
const a = new URL(t);
|
|
848
849
|
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Xt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Xt), a.toString());
|
|
849
850
|
}
|
|
850
|
-
const
|
|
851
|
+
const Pa = [
|
|
851
852
|
[/pdf/, "pdf"],
|
|
852
853
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
853
854
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -857,42 +858,42 @@ const Ra = [
|
|
|
857
858
|
[/plain|rtf/, "text"],
|
|
858
859
|
[/markdown/, "markdown"]
|
|
859
860
|
];
|
|
860
|
-
function
|
|
861
|
+
function le(e) {
|
|
861
862
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
862
863
|
}
|
|
863
|
-
function
|
|
864
|
-
const t =
|
|
864
|
+
function _s(e) {
|
|
865
|
+
const t = Pa.find(
|
|
865
866
|
([n]) => n.test(e)
|
|
866
867
|
);
|
|
867
868
|
return t ? t[1] : "generic";
|
|
868
869
|
}
|
|
869
|
-
const
|
|
870
|
-
video:
|
|
871
|
-
audio:
|
|
872
|
-
image:
|
|
873
|
-
document:
|
|
874
|
-
},
|
|
875
|
-
pdf:
|
|
876
|
-
doc:
|
|
877
|
-
xls:
|
|
870
|
+
const Oa = {
|
|
871
|
+
video: ms,
|
|
872
|
+
audio: Hn,
|
|
873
|
+
image: jn,
|
|
874
|
+
document: us
|
|
875
|
+
}, za = {
|
|
876
|
+
pdf: Jn,
|
|
877
|
+
doc: Zn,
|
|
878
|
+
xls: Kn,
|
|
878
879
|
csv: Xn,
|
|
879
|
-
ppt:
|
|
880
|
-
zip:
|
|
881
|
-
text:
|
|
882
|
-
markdown:
|
|
883
|
-
generic:
|
|
880
|
+
ppt: qn,
|
|
881
|
+
zip: Wn,
|
|
882
|
+
text: Yn,
|
|
883
|
+
markdown: Gn,
|
|
884
|
+
generic: us
|
|
884
885
|
};
|
|
885
|
-
function
|
|
886
|
-
const t =
|
|
887
|
-
return t !== "document" ?
|
|
886
|
+
function Fa(e) {
|
|
887
|
+
const t = le(e);
|
|
888
|
+
return t !== "document" ? Oa[t] : za[_s(e)];
|
|
888
889
|
}
|
|
889
|
-
function
|
|
890
|
-
return B.createElement(
|
|
890
|
+
function ve(e, t) {
|
|
891
|
+
return B.createElement(Fa(e), t);
|
|
891
892
|
}
|
|
892
|
-
const
|
|
893
|
+
const Ba = (e) => {
|
|
893
894
|
var t, n;
|
|
894
895
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
895
|
-
},
|
|
896
|
+
}, $a = ({
|
|
896
897
|
source: e,
|
|
897
898
|
mimeType: t,
|
|
898
899
|
poster: n,
|
|
@@ -904,17 +905,17 @@ const za = (e) => {
|
|
|
904
905
|
muted: d = !1,
|
|
905
906
|
onContainerClick: m
|
|
906
907
|
}) => {
|
|
907
|
-
const f =
|
|
908
|
+
const f = le(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = F(a), [p, v] = F(0), [w, y] = F(!1), [M, L] = F(!1), [O, $] = F(!1), [z, D] = F(!1), [S, T] = F(!0), [E, I] = F(null), k = q(() => {
|
|
908
909
|
$(!1), b(!0);
|
|
909
|
-
}, []), P =
|
|
910
|
+
}, []), P = q((N) => {
|
|
910
911
|
const A = g.current;
|
|
911
912
|
if (!A) return 0;
|
|
912
913
|
const U = A.getBoundingClientRect();
|
|
913
914
|
return Math.max(
|
|
914
915
|
0,
|
|
915
|
-
Math.min(1, (
|
|
916
|
+
Math.min(1, (Ba(N) - U.left) / U.width)
|
|
916
917
|
);
|
|
917
|
-
}, []), G =
|
|
918
|
+
}, []), G = q((N) => {
|
|
918
919
|
const A = u.current;
|
|
919
920
|
A && A.duration && (A.currentTime = N * A.duration);
|
|
920
921
|
}, []), W = (N) => {
|
|
@@ -983,7 +984,7 @@ const za = (e) => {
|
|
|
983
984
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
984
985
|
}
|
|
985
986
|
),
|
|
986
|
-
!n && (f === "audio" || S) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
987
|
+
!n && (f === "audio" || S) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: ve(t, {
|
|
987
988
|
className: "size-12 text-black/20",
|
|
988
989
|
weight: "regular"
|
|
989
990
|
}) }),
|
|
@@ -1032,7 +1033,7 @@ const za = (e) => {
|
|
|
1032
1033
|
}
|
|
1033
1034
|
) }),
|
|
1034
1035
|
z && !O && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1035
|
-
|
|
1036
|
+
be,
|
|
1036
1037
|
{
|
|
1037
1038
|
className: "size-8 animate-spin text-white/80",
|
|
1038
1039
|
weight: "bold"
|
|
@@ -1051,7 +1052,7 @@ const za = (e) => {
|
|
|
1051
1052
|
onKeyDown: (N) => {
|
|
1052
1053
|
N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), k());
|
|
1053
1054
|
},
|
|
1054
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1055
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(st, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1055
1056
|
}
|
|
1056
1057
|
),
|
|
1057
1058
|
o && !l && /* @__PURE__ */ s("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__ */ s(
|
|
@@ -1090,7 +1091,7 @@ const za = (e) => {
|
|
|
1090
1091
|
},
|
|
1091
1092
|
className: "shrink-0 text-white",
|
|
1092
1093
|
"aria-label": _ ? "Pause" : "Play",
|
|
1093
|
-
children: _ ? /* @__PURE__ */ s(
|
|
1094
|
+
children: _ ? /* @__PURE__ */ s(Qn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(st, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1094
1095
|
}
|
|
1095
1096
|
),
|
|
1096
1097
|
/* @__PURE__ */ h(
|
|
@@ -1140,7 +1141,7 @@ const za = (e) => {
|
|
|
1140
1141
|
]
|
|
1141
1142
|
}
|
|
1142
1143
|
);
|
|
1143
|
-
},
|
|
1144
|
+
}, Kt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ua = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ws = ({
|
|
1144
1145
|
mimeType: e,
|
|
1145
1146
|
sourceUrl: t,
|
|
1146
1147
|
thumbnailUrl: n,
|
|
@@ -1149,9 +1150,9 @@ const za = (e) => {
|
|
|
1149
1150
|
mediaPlayerProps: i,
|
|
1150
1151
|
containedImage: l = !1
|
|
1151
1152
|
}) => {
|
|
1152
|
-
const o =
|
|
1153
|
+
const o = le(e), [d, m] = F(!1), f = ue(t), u = ue(n);
|
|
1153
1154
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1154
|
-
|
|
1155
|
+
$a,
|
|
1155
1156
|
{
|
|
1156
1157
|
source: t,
|
|
1157
1158
|
mimeType: e,
|
|
@@ -1197,12 +1198,12 @@ const za = (e) => {
|
|
|
1197
1198
|
"div",
|
|
1198
1199
|
{
|
|
1199
1200
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1200
|
-
children:
|
|
1201
|
-
className:
|
|
1201
|
+
children: ve(e, {
|
|
1202
|
+
className: Kt(r),
|
|
1202
1203
|
weight: "regular"
|
|
1203
1204
|
})
|
|
1204
1205
|
}
|
|
1205
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1206
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ua(r)}`, children: /* @__PURE__ */ s(
|
|
1206
1207
|
"img",
|
|
1207
1208
|
{
|
|
1208
1209
|
src: u ?? n,
|
|
@@ -1214,13 +1215,13 @@ const za = (e) => {
|
|
|
1214
1215
|
"div",
|
|
1215
1216
|
{
|
|
1216
1217
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1217
|
-
children:
|
|
1218
|
-
className:
|
|
1218
|
+
children: ve(e, {
|
|
1219
|
+
className: Kt(r),
|
|
1219
1220
|
weight: "regular"
|
|
1220
1221
|
})
|
|
1221
1222
|
}
|
|
1222
1223
|
);
|
|
1223
|
-
},
|
|
1224
|
+
}, Ns = ({
|
|
1224
1225
|
variant: e,
|
|
1225
1226
|
thumbnail: t,
|
|
1226
1227
|
title: n,
|
|
@@ -1261,7 +1262,7 @@ const za = (e) => {
|
|
|
1261
1262
|
}
|
|
1262
1263
|
),
|
|
1263
1264
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1264
|
-
|
|
1265
|
+
ve(r, {
|
|
1265
1266
|
className: C(
|
|
1266
1267
|
"size-5 shrink-0",
|
|
1267
1268
|
g ? "text-white/55" : "text-black/55"
|
|
@@ -1286,59 +1287,59 @@ const za = (e) => {
|
|
|
1286
1287
|
}
|
|
1287
1288
|
);
|
|
1288
1289
|
};
|
|
1289
|
-
function
|
|
1290
|
+
function ys(e) {
|
|
1290
1291
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1291
1292
|
}
|
|
1292
|
-
function
|
|
1293
|
+
function dt(e) {
|
|
1293
1294
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1294
1295
|
}
|
|
1295
|
-
function
|
|
1296
|
+
function Va(e) {
|
|
1296
1297
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1297
1298
|
}
|
|
1298
|
-
function
|
|
1299
|
+
function ja(e) {
|
|
1299
1300
|
return e ? "text-white" : "text-black";
|
|
1300
1301
|
}
|
|
1301
|
-
function
|
|
1302
|
+
function Ha(e) {
|
|
1302
1303
|
return e ? "text-white/55" : "text-black/55";
|
|
1303
1304
|
}
|
|
1304
|
-
function
|
|
1305
|
+
function Ga(e) {
|
|
1305
1306
|
return e ? "text-white/40" : "text-black/40";
|
|
1306
1307
|
}
|
|
1307
|
-
function
|
|
1308
|
+
function Ya(e) {
|
|
1308
1309
|
return e ? "text-white/20" : "text-black/20";
|
|
1309
1310
|
}
|
|
1310
|
-
const
|
|
1311
|
+
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
1311
1312
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(B.Fragment, { children: [
|
|
1312
1313
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1313
1314
|
"img",
|
|
1314
1315
|
{
|
|
1315
|
-
src:
|
|
1316
|
+
src: ue(r) ?? r,
|
|
1316
1317
|
alt: n ?? "",
|
|
1317
1318
|
className: "aspect-video w-full rounded-[20px] object-cover"
|
|
1318
1319
|
}
|
|
1319
1320
|
) : /* @__PURE__ */ s(
|
|
1320
1321
|
"div",
|
|
1321
1322
|
{
|
|
1322
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1323
|
-
children: /* @__PURE__ */ s(
|
|
1323
|
+
className: `aspect-video w-full rounded-[20px] ${Va(t)} flex items-center justify-center`,
|
|
1324
|
+
children: /* @__PURE__ */ s(ea, { className: `size-12 ${Ya(t)}` })
|
|
1324
1325
|
}
|
|
1325
1326
|
) }),
|
|
1326
1327
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1327
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1328
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1329
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1328
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${ja(t)}`, children: n }),
|
|
1329
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ha(t)}`, children: a }),
|
|
1330
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ga(t)}`, children: d })
|
|
1330
1331
|
] })
|
|
1331
1332
|
] });
|
|
1332
1333
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1333
1334
|
};
|
|
1334
|
-
function
|
|
1335
|
+
function Cs(e) {
|
|
1335
1336
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1336
1337
|
}
|
|
1337
|
-
function
|
|
1338
|
+
function mt(e) {
|
|
1338
1339
|
var t;
|
|
1339
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1340
|
+
return (t = e.attachments) == null ? void 0 : t.find(Cs);
|
|
1340
1341
|
}
|
|
1341
|
-
async function
|
|
1342
|
+
async function Wa(e, t) {
|
|
1342
1343
|
let n;
|
|
1343
1344
|
try {
|
|
1344
1345
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1350,7 +1351,7 @@ async function Ga(e, t) {
|
|
|
1350
1351
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1351
1352
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1352
1353
|
}
|
|
1353
|
-
const
|
|
1354
|
+
const qa = ({
|
|
1354
1355
|
url: e,
|
|
1355
1356
|
filename: t
|
|
1356
1357
|
}) => {
|
|
@@ -1362,7 +1363,7 @@ const Ya = ({
|
|
|
1362
1363
|
onClick: (i) => {
|
|
1363
1364
|
i.stopPropagation();
|
|
1364
1365
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1365
|
-
a(!0),
|
|
1366
|
+
a(!0), Wa(e, t).then(() => {
|
|
1366
1367
|
l == null || l.close();
|
|
1367
1368
|
}).catch(() => {
|
|
1368
1369
|
l && (l.location.href = e);
|
|
@@ -1370,14 +1371,14 @@ const Ya = ({
|
|
|
1370
1371
|
},
|
|
1371
1372
|
disabled: n,
|
|
1372
1373
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1373
|
-
children: n ? /* @__PURE__ */ s(
|
|
1374
|
-
/* @__PURE__ */ s(
|
|
1374
|
+
children: n ? /* @__PURE__ */ s(be, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(B.Fragment, { children: [
|
|
1375
|
+
/* @__PURE__ */ s(ye, { className: "size-4 text-white", weight: "bold" }),
|
|
1375
1376
|
"Download"
|
|
1376
1377
|
] })
|
|
1377
1378
|
}
|
|
1378
1379
|
);
|
|
1379
1380
|
};
|
|
1380
|
-
function
|
|
1381
|
+
function ht(e) {
|
|
1381
1382
|
var u, g, c, x;
|
|
1382
1383
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1383
1384
|
(_) => _.type === "video" && _.asset_url
|
|
@@ -1398,16 +1399,16 @@ function mt(e) {
|
|
|
1398
1399
|
thumbnailUrl: f
|
|
1399
1400
|
};
|
|
1400
1401
|
}
|
|
1401
|
-
const
|
|
1402
|
+
const ks = ({
|
|
1402
1403
|
resolvedUrl: e,
|
|
1403
1404
|
resolvedType: t,
|
|
1404
1405
|
title: n,
|
|
1405
1406
|
fileSize: a,
|
|
1406
1407
|
thumbnailUrl: r
|
|
1407
1408
|
}) => {
|
|
1408
|
-
const i = a !== void 0 ?
|
|
1409
|
+
const i = a !== void 0 ? ys(a) : void 0;
|
|
1409
1410
|
return /* @__PURE__ */ s(
|
|
1410
|
-
|
|
1411
|
+
Ns,
|
|
1411
1412
|
{
|
|
1412
1413
|
variant: "dark",
|
|
1413
1414
|
title: n,
|
|
@@ -1415,7 +1416,7 @@ const Cs = ({
|
|
|
1415
1416
|
mimeType: t,
|
|
1416
1417
|
detail: i,
|
|
1417
1418
|
thumbnail: /* @__PURE__ */ s(
|
|
1418
|
-
|
|
1419
|
+
ws,
|
|
1419
1420
|
{
|
|
1420
1421
|
mimeType: t,
|
|
1421
1422
|
sourceUrl: e,
|
|
@@ -1426,23 +1427,23 @@ const Cs = ({
|
|
|
1426
1427
|
)
|
|
1427
1428
|
}
|
|
1428
1429
|
);
|
|
1429
|
-
},
|
|
1430
|
+
}, Ss = ({
|
|
1430
1431
|
resolvedUrl: e,
|
|
1431
1432
|
resolvedType: t,
|
|
1432
1433
|
title: n,
|
|
1433
1434
|
fileSize: a,
|
|
1434
1435
|
thumbnailUrl: r
|
|
1435
1436
|
}) => {
|
|
1436
|
-
const i =
|
|
1437
|
+
const i = le(t), l = a !== void 0 ? ys(a) : void 0;
|
|
1437
1438
|
return /* @__PURE__ */ s(
|
|
1438
|
-
|
|
1439
|
+
Ns,
|
|
1439
1440
|
{
|
|
1440
1441
|
variant: "light",
|
|
1441
1442
|
title: n,
|
|
1442
1443
|
mimeType: t,
|
|
1443
1444
|
detail: l,
|
|
1444
1445
|
thumbnail: /* @__PURE__ */ s(
|
|
1445
|
-
|
|
1446
|
+
ws,
|
|
1446
1447
|
{
|
|
1447
1448
|
mimeType: t,
|
|
1448
1449
|
sourceUrl: e,
|
|
@@ -1452,17 +1453,17 @@ const Cs = ({
|
|
|
1452
1453
|
containedImage: i === "image" || i === "document"
|
|
1453
1454
|
}
|
|
1454
1455
|
),
|
|
1455
|
-
action: /* @__PURE__ */ s(
|
|
1456
|
+
action: /* @__PURE__ */ s(qa, { url: e, filename: n })
|
|
1456
1457
|
}
|
|
1457
1458
|
);
|
|
1458
|
-
},
|
|
1459
|
+
}, Xa = ({
|
|
1459
1460
|
message: e,
|
|
1460
1461
|
isMyMessage: t = !1
|
|
1461
1462
|
}) => {
|
|
1462
|
-
const n =
|
|
1463
|
+
const n = mt(e), a = ht(e);
|
|
1463
1464
|
return !n && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1464
1465
|
!t && e.user && /* @__PURE__ */ s(
|
|
1465
|
-
|
|
1466
|
+
xe,
|
|
1466
1467
|
{
|
|
1467
1468
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1468
1469
|
id: e.user.id,
|
|
@@ -1481,41 +1482,41 @@ const Cs = ({
|
|
|
1481
1482
|
className: "str-chat__message-bubble",
|
|
1482
1483
|
"data-attachment-bubble": "true",
|
|
1483
1484
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1484
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1485
|
+
children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ks, { ...a }) : /* @__PURE__ */ s(Ss, { ...a })
|
|
1485
1486
|
}
|
|
1486
1487
|
) })
|
|
1487
1488
|
}
|
|
1488
1489
|
)
|
|
1489
1490
|
] });
|
|
1490
|
-
},
|
|
1491
|
+
}, Ka = ({
|
|
1491
1492
|
message: e
|
|
1492
1493
|
}) => {
|
|
1493
|
-
const t =
|
|
1494
|
+
const t = mt(e);
|
|
1494
1495
|
if (t)
|
|
1495
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1496
|
-
const n =
|
|
1497
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1498
|
-
},
|
|
1496
|
+
return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
|
|
1497
|
+
const n = ht(e);
|
|
1498
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ks, { ...n }) }) : null;
|
|
1499
|
+
}, Za = ({
|
|
1499
1500
|
message: e
|
|
1500
1501
|
}) => {
|
|
1501
|
-
const t =
|
|
1502
|
+
const t = mt(e);
|
|
1502
1503
|
if (t)
|
|
1503
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1504
|
-
const n =
|
|
1505
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1506
|
-
},
|
|
1507
|
-
Creator:
|
|
1508
|
-
Visitor:
|
|
1509
|
-
}),
|
|
1504
|
+
return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
|
|
1505
|
+
const n = ht(e);
|
|
1506
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ss, { ...n }) }) : null;
|
|
1507
|
+
}, Ho = Object.assign(Xa, {
|
|
1508
|
+
Creator: Ka,
|
|
1509
|
+
Visitor: Za
|
|
1510
|
+
}), Ja = {
|
|
1510
1511
|
dark: "bg-[#1e2330]",
|
|
1511
1512
|
light: "bg-[#f2f1ef]"
|
|
1512
|
-
},
|
|
1513
|
+
}, Qa = {
|
|
1513
1514
|
dark: "text-white",
|
|
1514
1515
|
light: "text-[#000000]"
|
|
1515
|
-
},
|
|
1516
|
+
}, er = {
|
|
1516
1517
|
dark: "border-white/[0.08]",
|
|
1517
1518
|
light: "border-black/[0.08]"
|
|
1518
|
-
},
|
|
1519
|
+
}, tr = (e) => e === "dark" ? "sender" : "receiver", sr = {
|
|
1519
1520
|
sender: {
|
|
1520
1521
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1521
1522
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1528,7 +1529,7 @@ const Cs = ({
|
|
|
1528
1529
|
middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
|
|
1529
1530
|
end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
|
|
1530
1531
|
}
|
|
1531
|
-
},
|
|
1532
|
+
}, Se = ({
|
|
1532
1533
|
variant: e,
|
|
1533
1534
|
text: t,
|
|
1534
1535
|
bordered: n = !0,
|
|
@@ -1540,7 +1541,7 @@ const Cs = ({
|
|
|
1540
1541
|
children: d,
|
|
1541
1542
|
"data-testid": m
|
|
1542
1543
|
}) => {
|
|
1543
|
-
const f = t != null && t !== "", u = l ??
|
|
1544
|
+
const f = t != null && t !== "", u = l ?? sr[tr(e)][a];
|
|
1544
1545
|
return /* @__PURE__ */ h(
|
|
1545
1546
|
"div",
|
|
1546
1547
|
{
|
|
@@ -1569,10 +1570,10 @@ const Cs = ({
|
|
|
1569
1570
|
// there is no ambiguity to resolve.
|
|
1570
1571
|
f && "pb-0",
|
|
1571
1572
|
u,
|
|
1572
|
-
|
|
1573
|
-
|
|
1573
|
+
Ja[e],
|
|
1574
|
+
Qa[e],
|
|
1574
1575
|
n && "border",
|
|
1575
|
-
n &&
|
|
1576
|
+
n && er[e],
|
|
1576
1577
|
o
|
|
1577
1578
|
),
|
|
1578
1579
|
children: [
|
|
@@ -1600,7 +1601,7 @@ const Cs = ({
|
|
|
1600
1601
|
]
|
|
1601
1602
|
}
|
|
1602
1603
|
);
|
|
1603
|
-
},
|
|
1604
|
+
}, Ee = ({
|
|
1604
1605
|
onClick: e,
|
|
1605
1606
|
variant: t = "overlay",
|
|
1606
1607
|
ariaLabel: n = "Dismiss attachment"
|
|
@@ -1616,18 +1617,18 @@ const Cs = ({
|
|
|
1616
1617
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
1617
1618
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
1618
1619
|
),
|
|
1619
|
-
children: /* @__PURE__ */ s(
|
|
1620
|
+
children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
|
|
1620
1621
|
}
|
|
1621
|
-
),
|
|
1622
|
+
), Ie = (e) => e === "received" ? "light" : "dark", nr = ({
|
|
1622
1623
|
firstOfGroup: e,
|
|
1623
1624
|
endOfGroup: t,
|
|
1624
1625
|
groupedByUser: n
|
|
1625
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1626
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", ar = ({
|
|
1626
1627
|
src: e,
|
|
1627
1628
|
mimeType: t,
|
|
1628
1629
|
filename: n,
|
|
1629
1630
|
items: a
|
|
1630
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1631
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], rr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1631
1632
|
/* @__PURE__ */ s(
|
|
1632
1633
|
"audio",
|
|
1633
1634
|
{
|
|
@@ -1639,7 +1640,7 @@ const Cs = ({
|
|
|
1639
1640
|
}
|
|
1640
1641
|
),
|
|
1641
1642
|
n ?? null
|
|
1642
|
-
] }),
|
|
1643
|
+
] }), ft = ({
|
|
1643
1644
|
state: e,
|
|
1644
1645
|
src: t,
|
|
1645
1646
|
mimeType: n,
|
|
@@ -1650,41 +1651,41 @@ const Cs = ({
|
|
|
1650
1651
|
preload: o,
|
|
1651
1652
|
onDismiss: d
|
|
1652
1653
|
}) => {
|
|
1653
|
-
const m =
|
|
1654
|
+
const m = Ie(e), f = e === "composer" && !!d, u = ar({ src: t, mimeType: n, filename: a, items: r });
|
|
1654
1655
|
if (u.length === 0)
|
|
1655
1656
|
return null;
|
|
1656
1657
|
const g = o ?? (u.length > 1 ? "none" : "metadata");
|
|
1657
1658
|
return /* @__PURE__ */ s(
|
|
1658
|
-
|
|
1659
|
+
Se,
|
|
1659
1660
|
{
|
|
1660
1661
|
variant: m,
|
|
1661
1662
|
text: i,
|
|
1662
1663
|
groupPosition: l,
|
|
1663
1664
|
"data-testid": "audio-attachment",
|
|
1664
1665
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
|
|
1665
|
-
|
|
1666
|
+
rr,
|
|
1666
1667
|
{
|
|
1667
1668
|
item: c,
|
|
1668
1669
|
preload: g,
|
|
1669
1670
|
trailingAction: (
|
|
1670
1671
|
// Composer only supports a single attachment, so the
|
|
1671
1672
|
// dismiss control sits on the only player.
|
|
1672
|
-
f && x === 0 ? /* @__PURE__ */ s(
|
|
1673
|
+
f && x === 0 ? /* @__PURE__ */ s(Ee, { onClick: d, variant: "inline" }) : void 0
|
|
1673
1674
|
)
|
|
1674
1675
|
},
|
|
1675
1676
|
`${c.src}-${x}`
|
|
1676
1677
|
)) })
|
|
1677
1678
|
}
|
|
1678
1679
|
);
|
|
1679
|
-
},
|
|
1680
|
-
Composer:
|
|
1681
|
-
Sent:
|
|
1682
|
-
Received:
|
|
1680
|
+
}, ir = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), or = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), lr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), cr = {
|
|
1681
|
+
Composer: ir,
|
|
1682
|
+
Sent: or,
|
|
1683
|
+
Received: lr
|
|
1683
1684
|
};
|
|
1684
|
-
function
|
|
1685
|
+
function dr(e) {
|
|
1685
1686
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1686
1687
|
}
|
|
1687
|
-
const
|
|
1688
|
+
const ur = {
|
|
1688
1689
|
pdf: "PDF",
|
|
1689
1690
|
doc: "DOC",
|
|
1690
1691
|
xls: "XLS",
|
|
@@ -1694,7 +1695,7 @@ const cr = {
|
|
|
1694
1695
|
text: "TXT",
|
|
1695
1696
|
markdown: "MD"
|
|
1696
1697
|
};
|
|
1697
|
-
function
|
|
1698
|
+
function mr(e, t) {
|
|
1698
1699
|
if (t) {
|
|
1699
1700
|
const r = t.lastIndexOf(".");
|
|
1700
1701
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1703,8 +1704,8 @@ function dr(e, t) {
|
|
|
1703
1704
|
}
|
|
1704
1705
|
}
|
|
1705
1706
|
if (!e) return;
|
|
1706
|
-
if (
|
|
1707
|
-
const r =
|
|
1707
|
+
if (le(e) === "document") {
|
|
1708
|
+
const r = _s(e), i = ur[r];
|
|
1708
1709
|
if (i) return i;
|
|
1709
1710
|
if (e === "application/octet-stream") return;
|
|
1710
1711
|
}
|
|
@@ -1712,8 +1713,8 @@ function dr(e, t) {
|
|
|
1712
1713
|
if (!(!a || a === "*"))
|
|
1713
1714
|
return a.toUpperCase();
|
|
1714
1715
|
}
|
|
1715
|
-
function
|
|
1716
|
-
const a =
|
|
1716
|
+
function hr(e, t, n) {
|
|
1717
|
+
const a = mr(e, t), r = typeof n == "number" && n > 0 ? dr(n) : void 0;
|
|
1717
1718
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1718
1719
|
}
|
|
1719
1720
|
function ne(e) {
|
|
@@ -1724,16 +1725,16 @@ function ne(e) {
|
|
|
1724
1725
|
return "download";
|
|
1725
1726
|
}
|
|
1726
1727
|
}
|
|
1727
|
-
const
|
|
1728
|
+
const fr = {
|
|
1728
1729
|
dark: "text-white/55",
|
|
1729
1730
|
light: "text-black/65"
|
|
1730
|
-
},
|
|
1731
|
+
}, gr = {
|
|
1731
1732
|
dark: "bg-white/10",
|
|
1732
1733
|
light: "bg-black/5"
|
|
1733
|
-
},
|
|
1734
|
+
}, pr = {
|
|
1734
1735
|
dark: "text-white/85",
|
|
1735
1736
|
light: "text-black/85"
|
|
1736
|
-
},
|
|
1737
|
+
}, Es = ({
|
|
1737
1738
|
variant: e,
|
|
1738
1739
|
filename: t,
|
|
1739
1740
|
title: n,
|
|
@@ -1743,16 +1744,16 @@ const mr = {
|
|
|
1743
1744
|
activateLabel: l,
|
|
1744
1745
|
trailingAction: o
|
|
1745
1746
|
}) => {
|
|
1746
|
-
const d = n ?? t ?? "File", m =
|
|
1747
|
+
const d = n ?? t ?? "File", m = hr(a, t, r), f = /* @__PURE__ */ s(
|
|
1747
1748
|
"div",
|
|
1748
1749
|
{
|
|
1749
1750
|
className: C(
|
|
1750
1751
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1751
|
-
|
|
1752
|
+
gr[e]
|
|
1752
1753
|
),
|
|
1753
1754
|
"aria-hidden": !0,
|
|
1754
|
-
children:
|
|
1755
|
-
className: C("size-6",
|
|
1755
|
+
children: ve(a, {
|
|
1756
|
+
className: C("size-6", pr[e]),
|
|
1756
1757
|
weight: "regular"
|
|
1757
1758
|
})
|
|
1758
1759
|
}
|
|
@@ -1763,7 +1764,7 @@ const mr = {
|
|
|
1763
1764
|
{
|
|
1764
1765
|
className: C(
|
|
1765
1766
|
"truncate text-xs leading-4",
|
|
1766
|
-
|
|
1767
|
+
fr[e]
|
|
1767
1768
|
),
|
|
1768
1769
|
children: m
|
|
1769
1770
|
}
|
|
@@ -1792,7 +1793,7 @@ const mr = {
|
|
|
1792
1793
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1793
1794
|
] });
|
|
1794
1795
|
};
|
|
1795
|
-
async function
|
|
1796
|
+
async function Is(e, t) {
|
|
1796
1797
|
const n = t ?? ne(e);
|
|
1797
1798
|
try {
|
|
1798
1799
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1806,14 +1807,14 @@ async function Es(e, t) {
|
|
|
1806
1807
|
}
|
|
1807
1808
|
}
|
|
1808
1809
|
}
|
|
1809
|
-
const
|
|
1810
|
+
const br = ({
|
|
1810
1811
|
src: e,
|
|
1811
1812
|
filename: t,
|
|
1812
1813
|
fileSize: n,
|
|
1813
1814
|
mimeType: a,
|
|
1814
1815
|
title: r,
|
|
1815
1816
|
items: i
|
|
1816
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1817
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], vr = ({
|
|
1817
1818
|
variant: e,
|
|
1818
1819
|
item: t,
|
|
1819
1820
|
index: n,
|
|
@@ -1822,7 +1823,7 @@ const gr = ({
|
|
|
1822
1823
|
}) => {
|
|
1823
1824
|
const i = t.filename ?? ne(t.src);
|
|
1824
1825
|
return /* @__PURE__ */ s(
|
|
1825
|
-
|
|
1826
|
+
Es,
|
|
1826
1827
|
{
|
|
1827
1828
|
variant: e,
|
|
1828
1829
|
filename: i,
|
|
@@ -1834,7 +1835,7 @@ const gr = ({
|
|
|
1834
1835
|
trailingAction: r
|
|
1835
1836
|
}
|
|
1836
1837
|
);
|
|
1837
|
-
},
|
|
1838
|
+
}, gt = ({
|
|
1838
1839
|
state: e,
|
|
1839
1840
|
src: t,
|
|
1840
1841
|
filename: n,
|
|
@@ -1847,7 +1848,7 @@ const gr = ({
|
|
|
1847
1848
|
onClick: m,
|
|
1848
1849
|
onDismiss: f
|
|
1849
1850
|
}) => {
|
|
1850
|
-
const u =
|
|
1851
|
+
const u = Ie(e), g = e === "composer" && !!f, c = br({
|
|
1851
1852
|
src: t,
|
|
1852
1853
|
filename: n,
|
|
1853
1854
|
fileSize: a,
|
|
@@ -1859,7 +1860,7 @@ const gr = ({
|
|
|
1859
1860
|
const p = c[b];
|
|
1860
1861
|
if (!p) return;
|
|
1861
1862
|
const v = p.filename ?? ne(p.src);
|
|
1862
|
-
|
|
1863
|
+
Is(p.src, v);
|
|
1863
1864
|
};
|
|
1864
1865
|
if (c.length === 0)
|
|
1865
1866
|
return null;
|
|
@@ -1871,34 +1872,34 @@ const gr = ({
|
|
|
1871
1872
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
1872
1873
|
),
|
|
1873
1874
|
"aria-hidden": !0,
|
|
1874
|
-
children: /* @__PURE__ */ s(
|
|
1875
|
+
children: /* @__PURE__ */ s(ye, { className: "size-5", weight: "bold" })
|
|
1875
1876
|
}
|
|
1876
1877
|
);
|
|
1877
1878
|
return /* @__PURE__ */ s(
|
|
1878
|
-
|
|
1879
|
+
Se,
|
|
1879
1880
|
{
|
|
1880
1881
|
variant: u,
|
|
1881
1882
|
text: o,
|
|
1882
1883
|
groupPosition: d,
|
|
1883
1884
|
"data-testid": "file-attachment",
|
|
1884
1885
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, p) => /* @__PURE__ */ s(
|
|
1885
|
-
|
|
1886
|
+
vr,
|
|
1886
1887
|
{
|
|
1887
1888
|
variant: u,
|
|
1888
1889
|
item: b,
|
|
1889
1890
|
index: p,
|
|
1890
1891
|
onActivate: x,
|
|
1891
|
-
trailingAction: g && p === 0 ? /* @__PURE__ */ s(
|
|
1892
|
+
trailingAction: g && p === 0 ? /* @__PURE__ */ s(Ee, { onClick: f, variant: "inline" }) : _
|
|
1892
1893
|
},
|
|
1893
1894
|
`${b.src}-${p}`
|
|
1894
1895
|
)) })
|
|
1895
1896
|
}
|
|
1896
1897
|
);
|
|
1897
|
-
},
|
|
1898
|
-
Composer:
|
|
1899
|
-
Sent:
|
|
1900
|
-
Received:
|
|
1901
|
-
},
|
|
1898
|
+
}, xr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), _r = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), Nr = {
|
|
1899
|
+
Composer: xr,
|
|
1900
|
+
Sent: _r,
|
|
1901
|
+
Received: wr
|
|
1902
|
+
}, pt = ({
|
|
1902
1903
|
onPrev: e,
|
|
1903
1904
|
onNext: t,
|
|
1904
1905
|
prevLabel: n = "Previous",
|
|
@@ -1911,7 +1912,7 @@ const gr = ({
|
|
|
1911
1912
|
onClick: e,
|
|
1912
1913
|
"aria-label": n,
|
|
1913
1914
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1914
|
-
children: /* @__PURE__ */ s(
|
|
1915
|
+
children: /* @__PURE__ */ s(ta, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1915
1916
|
}
|
|
1916
1917
|
),
|
|
1917
1918
|
/* @__PURE__ */ s(
|
|
@@ -1921,10 +1922,10 @@ const gr = ({
|
|
|
1921
1922
|
onClick: t,
|
|
1922
1923
|
"aria-label": a,
|
|
1923
1924
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
1924
|
-
children: /* @__PURE__ */ s(
|
|
1925
|
+
children: /* @__PURE__ */ s(ds, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1925
1926
|
}
|
|
1926
1927
|
)
|
|
1927
|
-
] }),
|
|
1928
|
+
] }), Ts = ({
|
|
1928
1929
|
url: e,
|
|
1929
1930
|
filename: t,
|
|
1930
1931
|
variant: n = "pill",
|
|
@@ -1933,9 +1934,9 @@ const gr = ({
|
|
|
1933
1934
|
tone: i = "dark",
|
|
1934
1935
|
onTriggered: l
|
|
1935
1936
|
}) => {
|
|
1936
|
-
const [o, d] = F(!1), m =
|
|
1937
|
+
const [o, d] = F(!1), m = q(
|
|
1937
1938
|
(c) => {
|
|
1938
|
-
c.stopPropagation(), !o && (d(!0),
|
|
1939
|
+
c.stopPropagation(), !o && (d(!0), Is(e, t).catch(() => {
|
|
1939
1940
|
}).finally(() => {
|
|
1940
1941
|
d(!1), l == null || l();
|
|
1941
1942
|
}));
|
|
@@ -1960,14 +1961,14 @@ const gr = ({
|
|
|
1960
1961
|
}[i]
|
|
1961
1962
|
),
|
|
1962
1963
|
children: o ? /* @__PURE__ */ s(
|
|
1963
|
-
|
|
1964
|
+
be,
|
|
1964
1965
|
{
|
|
1965
1966
|
className: "size-4 animate-spin",
|
|
1966
1967
|
weight: "bold",
|
|
1967
1968
|
"aria-hidden": !0
|
|
1968
1969
|
}
|
|
1969
1970
|
) : /* @__PURE__ */ s(
|
|
1970
|
-
|
|
1971
|
+
ye,
|
|
1971
1972
|
{
|
|
1972
1973
|
className: "size-5 shrink-0",
|
|
1973
1974
|
weight: "bold",
|
|
@@ -1983,7 +1984,7 @@ const gr = ({
|
|
|
1983
1984
|
disabled: o,
|
|
1984
1985
|
"aria-label": a,
|
|
1985
1986
|
className: "mes-media-viewer__action",
|
|
1986
|
-
children: o ? /* @__PURE__ */ s(
|
|
1987
|
+
children: o ? /* @__PURE__ */ s(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(ye, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1987
1988
|
}
|
|
1988
1989
|
) : /* @__PURE__ */ h(
|
|
1989
1990
|
"button",
|
|
@@ -1998,31 +1999,31 @@ const gr = ({
|
|
|
1998
1999
|
),
|
|
1999
2000
|
children: [
|
|
2000
2001
|
o ? /* @__PURE__ */ s(
|
|
2001
|
-
|
|
2002
|
+
be,
|
|
2002
2003
|
{
|
|
2003
2004
|
className: "size-4 animate-spin",
|
|
2004
2005
|
weight: "bold",
|
|
2005
2006
|
"aria-hidden": !0
|
|
2006
2007
|
}
|
|
2007
|
-
) : /* @__PURE__ */ s(
|
|
2008
|
+
) : /* @__PURE__ */ s(ye, { ...g, "aria-hidden": !0 }),
|
|
2008
2009
|
f ? null : a
|
|
2009
2010
|
]
|
|
2010
2011
|
}
|
|
2011
2012
|
);
|
|
2012
|
-
},
|
|
2013
|
+
}, We = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
|
|
2013
2014
|
length: e,
|
|
2014
2015
|
initialIndex: t,
|
|
2015
2016
|
open: n
|
|
2016
2017
|
}) => {
|
|
2017
|
-
const a =
|
|
2018
|
+
const a = We(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
|
|
2018
2019
|
Y(() => {
|
|
2019
|
-
n && i(
|
|
2020
|
+
n && i(We(t, 0, Math.max(e - 1, 0)));
|
|
2020
2021
|
}, [n, t, e]), Y(() => {
|
|
2021
|
-
i((d) =>
|
|
2022
|
+
i((d) => We(d, 0, Math.max(e - 1, 0)));
|
|
2022
2023
|
}, [e]);
|
|
2023
|
-
const l =
|
|
2024
|
+
const l = q(() => {
|
|
2024
2025
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
2025
|
-
}, [e]), o =
|
|
2026
|
+
}, [e]), o = q(() => {
|
|
2026
2027
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
2027
2028
|
}, [e]);
|
|
2028
2029
|
return Y(() => {
|
|
@@ -2034,7 +2035,7 @@ const gr = ({
|
|
|
2034
2035
|
};
|
|
2035
2036
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2036
2037
|
}, [n, e, l, o]), { index: r, prev: l, next: o };
|
|
2037
|
-
},
|
|
2038
|
+
}, vt = ({
|
|
2038
2039
|
open: e,
|
|
2039
2040
|
onClose: t,
|
|
2040
2041
|
ariaLabel: n,
|
|
@@ -2115,7 +2116,7 @@ const gr = ({
|
|
|
2115
2116
|
onClick: t,
|
|
2116
2117
|
"aria-label": "Close viewer",
|
|
2117
2118
|
className: "mes-media-viewer__action",
|
|
2118
|
-
children: /* @__PURE__ */ s(
|
|
2119
|
+
children: /* @__PURE__ */ s(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2119
2120
|
}
|
|
2120
2121
|
)
|
|
2121
2122
|
] })
|
|
@@ -2124,13 +2125,13 @@ const gr = ({
|
|
|
2124
2125
|
]
|
|
2125
2126
|
}
|
|
2126
2127
|
);
|
|
2127
|
-
},
|
|
2128
|
+
}, As = ({
|
|
2128
2129
|
open: e,
|
|
2129
2130
|
items: t,
|
|
2130
2131
|
initialIndex: n = 0,
|
|
2131
2132
|
onClose: a
|
|
2132
2133
|
}) => {
|
|
2133
|
-
const { index: r, prev: i, next: l } =
|
|
2134
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2134
2135
|
length: t.length,
|
|
2135
2136
|
initialIndex: n,
|
|
2136
2137
|
open: e
|
|
@@ -2139,14 +2140,14 @@ const gr = ({
|
|
|
2139
2140
|
[o]
|
|
2140
2141
|
);
|
|
2141
2142
|
return o ? /* @__PURE__ */ h(
|
|
2142
|
-
|
|
2143
|
+
vt,
|
|
2143
2144
|
{
|
|
2144
2145
|
open: e,
|
|
2145
2146
|
onClose: a,
|
|
2146
2147
|
ariaLabel: d,
|
|
2147
2148
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2148
2149
|
actions: /* @__PURE__ */ s(
|
|
2149
|
-
|
|
2150
|
+
Ts,
|
|
2150
2151
|
{
|
|
2151
2152
|
url: o.src,
|
|
2152
2153
|
filename: d,
|
|
@@ -2169,7 +2170,7 @@ const gr = ({
|
|
|
2169
2170
|
`${r}:${o.src}`
|
|
2170
2171
|
) : null,
|
|
2171
2172
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2172
|
-
|
|
2173
|
+
pt,
|
|
2173
2174
|
{
|
|
2174
2175
|
onPrev: i,
|
|
2175
2176
|
onNext: l,
|
|
@@ -2180,7 +2181,7 @@ const gr = ({
|
|
|
2180
2181
|
]
|
|
2181
2182
|
}
|
|
2182
2183
|
) : null;
|
|
2183
|
-
},
|
|
2184
|
+
}, yr = "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", Cr = {
|
|
2184
2185
|
1: ["rounded-[18px]"],
|
|
2185
2186
|
2: ["rounded-l-[18px]", "rounded-r-[18px]"],
|
|
2186
2187
|
3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
|
|
@@ -2190,7 +2191,7 @@ const gr = ({
|
|
|
2190
2191
|
"rounded-bl-[18px]",
|
|
2191
2192
|
"rounded-br-[18px]"
|
|
2192
2193
|
]
|
|
2193
|
-
},
|
|
2194
|
+
}, kr = "--mes-single-width-cap", Sr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Er = 436, Ms = ({
|
|
2194
2195
|
tiles: e,
|
|
2195
2196
|
onTileActivate: t,
|
|
2196
2197
|
maxVisible: n = 4,
|
|
@@ -2202,9 +2203,9 @@ const gr = ({
|
|
|
2202
2203
|
const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (f, u, g) => {
|
|
2203
2204
|
var x;
|
|
2204
2205
|
const c = C(
|
|
2205
|
-
|
|
2206
|
+
yr,
|
|
2206
2207
|
"h-full w-full",
|
|
2207
|
-
(x =
|
|
2208
|
+
(x = Cr[l.length]) == null ? void 0 : x[u]
|
|
2208
2209
|
);
|
|
2209
2210
|
return t ? /* @__PURE__ */ h(
|
|
2210
2211
|
"button",
|
|
@@ -2229,14 +2230,14 @@ const gr = ({
|
|
|
2229
2230
|
aspectRatio: a,
|
|
2230
2231
|
// Hundredths keep the emitted declaration readable in devtools;
|
|
2231
2232
|
// the rounding error is well under a device pixel.
|
|
2232
|
-
width: `min(var(${
|
|
2233
|
+
width: `min(var(${kr}), ${Math.round(Er * a * 100) / 100}px)`,
|
|
2233
2234
|
// Only bites in a container narrower than the width cap.
|
|
2234
2235
|
maxWidth: "100%"
|
|
2235
2236
|
}), l.length === 1 ? /* @__PURE__ */ s(
|
|
2236
2237
|
"div",
|
|
2237
2238
|
{
|
|
2238
2239
|
className: C(
|
|
2239
|
-
a ?
|
|
2240
|
+
a ? Sr : "aspect-square w-full",
|
|
2240
2241
|
r
|
|
2241
2242
|
),
|
|
2242
2243
|
style: m,
|
|
@@ -2291,15 +2292,15 @@ const gr = ({
|
|
|
2291
2292
|
})
|
|
2292
2293
|
}
|
|
2293
2294
|
);
|
|
2294
|
-
},
|
|
2295
|
-
const [t, n] = F(!1), [a, r] = F(0), i =
|
|
2295
|
+
}, Te = (e) => {
|
|
2296
|
+
const [t, n] = F(!1), [a, r] = F(0), i = q(
|
|
2296
2297
|
(o) => {
|
|
2297
2298
|
(e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
|
|
2298
2299
|
},
|
|
2299
2300
|
[e]
|
|
2300
|
-
), l =
|
|
2301
|
+
), l = q(() => n(!1), []);
|
|
2301
2302
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2302
|
-
},
|
|
2303
|
+
}, Ir = ({
|
|
2303
2304
|
item: e,
|
|
2304
2305
|
index: t,
|
|
2305
2306
|
totalCount: n,
|
|
@@ -2315,7 +2316,7 @@ const gr = ({
|
|
|
2315
2316
|
"img",
|
|
2316
2317
|
{
|
|
2317
2318
|
ref: r,
|
|
2318
|
-
src:
|
|
2319
|
+
src: ue(e.src) ?? e.src,
|
|
2319
2320
|
alt: e.alt ?? "",
|
|
2320
2321
|
width: e.width,
|
|
2321
2322
|
height: e.height,
|
|
@@ -2327,16 +2328,16 @@ const gr = ({
|
|
|
2327
2328
|
}
|
|
2328
2329
|
)
|
|
2329
2330
|
)
|
|
2330
|
-
}),
|
|
2331
|
+
}), Tr = ({
|
|
2331
2332
|
src: e,
|
|
2332
2333
|
alt: t,
|
|
2333
2334
|
items: n
|
|
2334
|
-
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [],
|
|
2335
|
+
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ls = (e, t) => e.map((n, a) => ({
|
|
2335
2336
|
src: n.src,
|
|
2336
2337
|
alt: n.alt,
|
|
2337
2338
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2338
|
-
})),
|
|
2339
|
-
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } =
|
|
2339
|
+
})), Ar = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2340
|
+
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Te(
|
|
2340
2341
|
r
|
|
2341
2342
|
);
|
|
2342
2343
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -2350,7 +2351,7 @@ const gr = ({
|
|
|
2350
2351
|
children: /* @__PURE__ */ s(
|
|
2351
2352
|
"img",
|
|
2352
2353
|
{
|
|
2353
|
-
src:
|
|
2354
|
+
src: ue(e) ?? e,
|
|
2354
2355
|
alt: t ?? "",
|
|
2355
2356
|
draggable: !1,
|
|
2356
2357
|
loading: a,
|
|
@@ -2360,18 +2361,18 @@ const gr = ({
|
|
|
2360
2361
|
)
|
|
2361
2362
|
}
|
|
2362
2363
|
),
|
|
2363
|
-
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2364
|
+
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ee, { onClick: i }) }) : null,
|
|
2364
2365
|
/* @__PURE__ */ s(
|
|
2365
|
-
|
|
2366
|
+
As,
|
|
2366
2367
|
{
|
|
2367
2368
|
open: l,
|
|
2368
|
-
items:
|
|
2369
|
+
items: Ls([{ src: e, alt: t }], n),
|
|
2369
2370
|
initialIndex: o,
|
|
2370
2371
|
onClose: m
|
|
2371
2372
|
}
|
|
2372
2373
|
)
|
|
2373
2374
|
] });
|
|
2374
|
-
},
|
|
2375
|
+
}, Mr = 326 / 246, Lr = (e) => {
|
|
2375
2376
|
const t = e == null ? void 0 : e.src, [n, a] = B.useState(), r = B.useCallback(
|
|
2376
2377
|
(d) => {
|
|
2377
2378
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
@@ -2386,11 +2387,11 @@ const gr = ({
|
|
|
2386
2387
|
[r]
|
|
2387
2388
|
), l = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, o = n && n.src === t ? n.ratio : void 0;
|
|
2388
2389
|
return {
|
|
2389
|
-
ratio: l ?? o ??
|
|
2390
|
+
ratio: l ?? o ?? Mr,
|
|
2390
2391
|
imgRef: r,
|
|
2391
2392
|
onLoad: i
|
|
2392
2393
|
};
|
|
2393
|
-
},
|
|
2394
|
+
}, Rs = ({
|
|
2394
2395
|
state: e,
|
|
2395
2396
|
src: t,
|
|
2396
2397
|
alt: n,
|
|
@@ -2401,13 +2402,13 @@ const gr = ({
|
|
|
2401
2402
|
loading: o = "lazy",
|
|
2402
2403
|
onClick: d
|
|
2403
2404
|
}) => {
|
|
2404
|
-
const m =
|
|
2405
|
+
const m = Tr({ src: t, alt: n, items: r }), f = Ie(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Te(
|
|
2405
2406
|
d
|
|
2406
|
-
), _ = m.length === 1, b =
|
|
2407
|
+
), _ = m.length === 1, b = Lr(_ ? m[0] : void 0);
|
|
2407
2408
|
if (m.length === 0)
|
|
2408
2409
|
return null;
|
|
2409
2410
|
const p = m.map(
|
|
2410
|
-
(v, w) =>
|
|
2411
|
+
(v, w) => Ir({
|
|
2411
2412
|
item: v,
|
|
2412
2413
|
index: w,
|
|
2413
2414
|
totalCount: m.length,
|
|
@@ -2417,7 +2418,7 @@ const gr = ({
|
|
|
2417
2418
|
})
|
|
2418
2419
|
);
|
|
2419
2420
|
return /* @__PURE__ */ h(
|
|
2420
|
-
|
|
2421
|
+
Se,
|
|
2421
2422
|
{
|
|
2422
2423
|
variant: f,
|
|
2423
2424
|
text: i,
|
|
@@ -2429,7 +2430,7 @@ const gr = ({
|
|
|
2429
2430
|
"data-testid": "image-attachment",
|
|
2430
2431
|
children: [
|
|
2431
2432
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2432
|
-
|
|
2433
|
+
Ms,
|
|
2433
2434
|
{
|
|
2434
2435
|
tiles: p,
|
|
2435
2436
|
onTileActivate: c,
|
|
@@ -2437,10 +2438,10 @@ const gr = ({
|
|
|
2437
2438
|
}
|
|
2438
2439
|
) }),
|
|
2439
2440
|
/* @__PURE__ */ s(
|
|
2440
|
-
|
|
2441
|
+
As,
|
|
2441
2442
|
{
|
|
2442
2443
|
open: u,
|
|
2443
|
-
items:
|
|
2444
|
+
items: Ls(m, a),
|
|
2444
2445
|
initialIndex: g,
|
|
2445
2446
|
onClose: x
|
|
2446
2447
|
}
|
|
@@ -2448,17 +2449,17 @@ const gr = ({
|
|
|
2448
2449
|
]
|
|
2449
2450
|
}
|
|
2450
2451
|
);
|
|
2451
|
-
},
|
|
2452
|
-
Composer:
|
|
2453
|
-
Sent:
|
|
2454
|
-
Received:
|
|
2455
|
-
},
|
|
2452
|
+
}, Rr = (e) => /* @__PURE__ */ s(Ar, { ...e }), Dr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Or = {
|
|
2453
|
+
Composer: Rr,
|
|
2454
|
+
Sent: Dr,
|
|
2455
|
+
Received: Pr
|
|
2456
|
+
}, zr = ({
|
|
2456
2457
|
open: e,
|
|
2457
2458
|
items: t,
|
|
2458
2459
|
initialIndex: n = 0,
|
|
2459
2460
|
onClose: a
|
|
2460
2461
|
}) => {
|
|
2461
|
-
const { index: r, prev: i, next: l } =
|
|
2462
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2462
2463
|
length: t.length,
|
|
2463
2464
|
initialIndex: n,
|
|
2464
2465
|
open: e
|
|
@@ -2466,11 +2467,11 @@ const gr = ({
|
|
|
2466
2467
|
() => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
|
|
2467
2468
|
[o]
|
|
2468
2469
|
), m = se(
|
|
2469
|
-
() => o ?
|
|
2470
|
+
() => o ? Fr(o.src) : void 0,
|
|
2470
2471
|
[o]
|
|
2471
2472
|
);
|
|
2472
2473
|
return !o || !m ? null : /* @__PURE__ */ h(
|
|
2473
|
-
|
|
2474
|
+
vt,
|
|
2474
2475
|
{
|
|
2475
2476
|
open: e,
|
|
2476
2477
|
onClose: a,
|
|
@@ -2489,7 +2490,7 @@ const gr = ({
|
|
|
2489
2490
|
`${r}:${o.src}`
|
|
2490
2491
|
),
|
|
2491
2492
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2492
|
-
|
|
2493
|
+
pt,
|
|
2493
2494
|
{
|
|
2494
2495
|
onPrev: i,
|
|
2495
2496
|
onNext: l,
|
|
@@ -2500,16 +2501,16 @@ const gr = ({
|
|
|
2500
2501
|
]
|
|
2501
2502
|
}
|
|
2502
2503
|
);
|
|
2503
|
-
},
|
|
2504
|
+
}, Fr = (e) => {
|
|
2504
2505
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2505
2506
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2506
|
-
},
|
|
2507
|
+
}, Br = ({
|
|
2507
2508
|
src: e,
|
|
2508
2509
|
filename: t,
|
|
2509
2510
|
fileSize: n,
|
|
2510
2511
|
title: a,
|
|
2511
2512
|
items: r
|
|
2512
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2513
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], $r = ({
|
|
2513
2514
|
variant: e,
|
|
2514
2515
|
item: t,
|
|
2515
2516
|
index: n,
|
|
@@ -2518,7 +2519,7 @@ const gr = ({
|
|
|
2518
2519
|
}) => {
|
|
2519
2520
|
const i = t.filename ?? ne(t.src);
|
|
2520
2521
|
return /* @__PURE__ */ s(
|
|
2521
|
-
|
|
2522
|
+
Es,
|
|
2522
2523
|
{
|
|
2523
2524
|
variant: e,
|
|
2524
2525
|
filename: i,
|
|
@@ -2530,7 +2531,7 @@ const gr = ({
|
|
|
2530
2531
|
trailingAction: r
|
|
2531
2532
|
}
|
|
2532
2533
|
);
|
|
2533
|
-
},
|
|
2534
|
+
}, xt = ({
|
|
2534
2535
|
state: e,
|
|
2535
2536
|
src: t,
|
|
2536
2537
|
filename: n,
|
|
@@ -2542,7 +2543,7 @@ const gr = ({
|
|
|
2542
2543
|
onClick: d,
|
|
2543
2544
|
onDismiss: m
|
|
2544
2545
|
}) => {
|
|
2545
|
-
const f =
|
|
2546
|
+
const f = Ie(e), u = Br({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Te(
|
|
2546
2547
|
d
|
|
2547
2548
|
), b = e === "composer" && !!m;
|
|
2548
2549
|
if (u.length === 0)
|
|
@@ -2552,7 +2553,7 @@ const gr = ({
|
|
|
2552
2553
|
filename: v.filename ?? ne(v.src)
|
|
2553
2554
|
}));
|
|
2554
2555
|
return /* @__PURE__ */ h(
|
|
2555
|
-
|
|
2556
|
+
Se,
|
|
2556
2557
|
{
|
|
2557
2558
|
variant: f,
|
|
2558
2559
|
text: l,
|
|
@@ -2560,8 +2561,8 @@ const gr = ({
|
|
|
2560
2561
|
"data-testid": "pdf-attachment",
|
|
2561
2562
|
children: [
|
|
2562
2563
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, w) => {
|
|
2563
|
-
const y = v.filename ?? ne(v.src), M = b && w === 0 ? /* @__PURE__ */ s(
|
|
2564
|
-
|
|
2564
|
+
const y = v.filename ?? ne(v.src), M = b && w === 0 ? /* @__PURE__ */ s(Ee, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2565
|
+
Ts,
|
|
2565
2566
|
{
|
|
2566
2567
|
url: v.src,
|
|
2567
2568
|
filename: y,
|
|
@@ -2571,7 +2572,7 @@ const gr = ({
|
|
|
2571
2572
|
}
|
|
2572
2573
|
);
|
|
2573
2574
|
return /* @__PURE__ */ s(
|
|
2574
|
-
|
|
2575
|
+
$r,
|
|
2575
2576
|
{
|
|
2576
2577
|
variant: f,
|
|
2577
2578
|
item: v,
|
|
@@ -2583,7 +2584,7 @@ const gr = ({
|
|
|
2583
2584
|
);
|
|
2584
2585
|
}) }),
|
|
2585
2586
|
/* @__PURE__ */ s(
|
|
2586
|
-
|
|
2587
|
+
zr,
|
|
2587
2588
|
{
|
|
2588
2589
|
open: g,
|
|
2589
2590
|
items: p,
|
|
@@ -2594,17 +2595,17 @@ const gr = ({
|
|
|
2594
2595
|
]
|
|
2595
2596
|
}
|
|
2596
2597
|
);
|
|
2597
|
-
},
|
|
2598
|
-
Composer:
|
|
2599
|
-
Sent:
|
|
2600
|
-
Received:
|
|
2601
|
-
},
|
|
2598
|
+
}, Ur = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Vr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Hr = {
|
|
2599
|
+
Composer: Ur,
|
|
2600
|
+
Sent: Vr,
|
|
2601
|
+
Received: jr
|
|
2602
|
+
}, Ds = ({
|
|
2602
2603
|
open: e,
|
|
2603
2604
|
items: t,
|
|
2604
2605
|
initialIndex: n = 0,
|
|
2605
2606
|
onClose: a
|
|
2606
2607
|
}) => {
|
|
2607
|
-
const { index: r, prev: i, next: l } =
|
|
2608
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2608
2609
|
length: t.length,
|
|
2609
2610
|
initialIndex: n,
|
|
2610
2611
|
open: e
|
|
@@ -2613,7 +2614,7 @@ const gr = ({
|
|
|
2613
2614
|
[o]
|
|
2614
2615
|
);
|
|
2615
2616
|
return o ? /* @__PURE__ */ h(
|
|
2616
|
-
|
|
2617
|
+
vt,
|
|
2617
2618
|
{
|
|
2618
2619
|
open: e,
|
|
2619
2620
|
onClose: a,
|
|
@@ -2637,7 +2638,7 @@ const gr = ({
|
|
|
2637
2638
|
`${r}:${o.src}`
|
|
2638
2639
|
),
|
|
2639
2640
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2640
|
-
|
|
2641
|
+
pt,
|
|
2641
2642
|
{
|
|
2642
2643
|
onPrev: i,
|
|
2643
2644
|
onNext: l,
|
|
@@ -2648,7 +2649,7 @@ const gr = ({
|
|
|
2648
2649
|
]
|
|
2649
2650
|
}
|
|
2650
2651
|
) : null;
|
|
2651
|
-
},
|
|
2652
|
+
}, Gr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(st, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ps = ({
|
|
2652
2653
|
item: e,
|
|
2653
2654
|
index: t
|
|
2654
2655
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2663,31 +2664,31 @@ const gr = ({
|
|
|
2663
2664
|
className: "absolute inset-0 size-full object-cover"
|
|
2664
2665
|
}
|
|
2665
2666
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2666
|
-
|
|
2667
|
+
ms,
|
|
2667
2668
|
{
|
|
2668
2669
|
className: "size-16 text-white/30",
|
|
2669
2670
|
weight: "regular",
|
|
2670
2671
|
"aria-hidden": !0
|
|
2671
2672
|
}
|
|
2672
2673
|
) }),
|
|
2673
|
-
/* @__PURE__ */ s(
|
|
2674
|
-
] }),
|
|
2674
|
+
/* @__PURE__ */ s(Gr, {})
|
|
2675
|
+
] }), Yr = (e, t, n) => ({
|
|
2675
2676
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2676
|
-
content: /* @__PURE__ */ s(
|
|
2677
|
-
}),
|
|
2677
|
+
content: /* @__PURE__ */ s(Ps, { item: e, index: t })
|
|
2678
|
+
}), Wr = ({
|
|
2678
2679
|
src: e,
|
|
2679
2680
|
poster: t,
|
|
2680
2681
|
mimeType: n,
|
|
2681
2682
|
preload: a,
|
|
2682
2683
|
items: r
|
|
2683
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [],
|
|
2684
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Os = (e, t) => e.map((n, a) => ({
|
|
2684
2685
|
src: n.src,
|
|
2685
2686
|
poster: n.poster,
|
|
2686
2687
|
mimeType: n.mimeType,
|
|
2687
2688
|
preload: n.preload,
|
|
2688
2689
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2689
|
-
})),
|
|
2690
|
-
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: f } =
|
|
2690
|
+
})), qr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
|
|
2691
|
+
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: f } = Te(
|
|
2691
2692
|
i
|
|
2692
2693
|
);
|
|
2693
2694
|
return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
|
|
@@ -2698,15 +2699,15 @@ const gr = ({
|
|
|
2698
2699
|
onClick: () => m(0),
|
|
2699
2700
|
"aria-label": "Play video",
|
|
2700
2701
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2701
|
-
children: /* @__PURE__ */ s(
|
|
2702
|
+
children: /* @__PURE__ */ s(Ps, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2702
2703
|
}
|
|
2703
2704
|
),
|
|
2704
|
-
l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(
|
|
2705
|
+
l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ee, { onClick: l }) }) : null,
|
|
2705
2706
|
/* @__PURE__ */ s(
|
|
2706
|
-
|
|
2707
|
+
Ds,
|
|
2707
2708
|
{
|
|
2708
2709
|
open: o,
|
|
2709
|
-
items:
|
|
2710
|
+
items: Os(
|
|
2710
2711
|
[{ src: e, poster: t, mimeType: n, preload: r }],
|
|
2711
2712
|
a
|
|
2712
2713
|
),
|
|
@@ -2715,7 +2716,7 @@ const gr = ({
|
|
|
2715
2716
|
}
|
|
2716
2717
|
)
|
|
2717
2718
|
] });
|
|
2718
|
-
},
|
|
2719
|
+
}, zs = ({
|
|
2719
2720
|
state: e,
|
|
2720
2721
|
src: t,
|
|
2721
2722
|
poster: n,
|
|
@@ -2727,28 +2728,28 @@ const gr = ({
|
|
|
2727
2728
|
preload: d,
|
|
2728
2729
|
onClick: m
|
|
2729
2730
|
}) => {
|
|
2730
|
-
const f =
|
|
2731
|
+
const f = Wr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Ie(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Te(
|
|
2731
2732
|
m
|
|
2732
2733
|
);
|
|
2733
2734
|
if (f.length === 0)
|
|
2734
2735
|
return null;
|
|
2735
2736
|
const b = f.map(
|
|
2736
|
-
(p, v) =>
|
|
2737
|
+
(p, v) => Yr(p, v, f.length)
|
|
2737
2738
|
);
|
|
2738
2739
|
return /* @__PURE__ */ h(
|
|
2739
|
-
|
|
2740
|
+
Se,
|
|
2740
2741
|
{
|
|
2741
2742
|
variant: u,
|
|
2742
2743
|
text: l,
|
|
2743
2744
|
groupPosition: o,
|
|
2744
2745
|
"data-testid": "video-attachment",
|
|
2745
2746
|
children: [
|
|
2746
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2747
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ms, { tiles: b, onTileActivate: x }) }),
|
|
2747
2748
|
/* @__PURE__ */ s(
|
|
2748
|
-
|
|
2749
|
+
Ds,
|
|
2749
2750
|
{
|
|
2750
2751
|
open: g,
|
|
2751
|
-
items:
|
|
2752
|
+
items: Os(f, r),
|
|
2752
2753
|
initialIndex: c,
|
|
2753
2754
|
onClose: _
|
|
2754
2755
|
}
|
|
@@ -2756,31 +2757,31 @@ const gr = ({
|
|
|
2756
2757
|
]
|
|
2757
2758
|
}
|
|
2758
2759
|
);
|
|
2759
|
-
},
|
|
2760
|
-
Composer:
|
|
2761
|
-
Sent:
|
|
2762
|
-
Received:
|
|
2763
|
-
},
|
|
2764
|
-
Image:
|
|
2765
|
-
Video:
|
|
2766
|
-
Audio:
|
|
2767
|
-
Pdf:
|
|
2768
|
-
File:
|
|
2769
|
-
},
|
|
2760
|
+
}, Xr = (e) => /* @__PURE__ */ s(qr, { ...e }), Kr = (e) => /* @__PURE__ */ s(zs, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ s(zs, { ...e, state: "received" }), Jr = {
|
|
2761
|
+
Composer: Xr,
|
|
2762
|
+
Sent: Kr,
|
|
2763
|
+
Received: Zr
|
|
2764
|
+
}, we = {
|
|
2765
|
+
Image: Or,
|
|
2766
|
+
Video: Jr,
|
|
2767
|
+
Audio: cr,
|
|
2768
|
+
Pdf: Hr,
|
|
2769
|
+
File: Nr
|
|
2770
|
+
}, Qr = {
|
|
2770
2771
|
isUnlocking: () => !1
|
|
2771
|
-
},
|
|
2772
|
-
LockedAttachment:
|
|
2773
|
-
},
|
|
2774
|
-
function
|
|
2775
|
-
return
|
|
2772
|
+
}, ei = {
|
|
2773
|
+
LockedAttachment: Qr
|
|
2774
|
+
}, Fs = ot({}), Go = Fs.Provider;
|
|
2775
|
+
function ti(e) {
|
|
2776
|
+
return Ce(Fs)[e] ?? ei[e];
|
|
2776
2777
|
}
|
|
2777
|
-
const
|
|
2778
|
+
const si = B.lazy(() => import("./Card-qS17qnN0.js")), ni = B.lazy(() => import("./Card-CFJBJl09.js")), ai = () => /* @__PURE__ */ s(
|
|
2778
2779
|
"div",
|
|
2779
2780
|
{
|
|
2780
2781
|
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)]",
|
|
2781
2782
|
"aria-hidden": !0
|
|
2782
2783
|
}
|
|
2783
|
-
),
|
|
2784
|
+
), De = (e) => /* @__PURE__ */ s(en, { fallback: /* @__PURE__ */ s(ai, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(si, { ...e }) : /* @__PURE__ */ s(ni, { ...e }) }), ri = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2784
2785
|
"svg",
|
|
2785
2786
|
{
|
|
2786
2787
|
width: e,
|
|
@@ -2797,43 +2798,43 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2797
2798
|
}
|
|
2798
2799
|
)
|
|
2799
2800
|
}
|
|
2800
|
-
),
|
|
2801
|
+
), ii = (e) => {
|
|
2801
2802
|
var t;
|
|
2802
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
2803
|
-
},
|
|
2803
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
|
|
2804
|
+
}, Bs = (e) => {
|
|
2804
2805
|
var t;
|
|
2805
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
2806
|
-
},
|
|
2806
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.PAID;
|
|
2807
|
+
}, ze = (e) => {
|
|
2807
2808
|
var t;
|
|
2808
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
2809
|
-
},
|
|
2809
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
|
|
2810
|
+
}, _t = (e) => {
|
|
2810
2811
|
var t;
|
|
2811
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) ===
|
|
2812
|
-
},
|
|
2812
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
|
|
2813
|
+
}, oi = (e) => {
|
|
2813
2814
|
var t;
|
|
2814
|
-
return
|
|
2815
|
-
},
|
|
2815
|
+
return _t(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2816
|
+
}, li = (e) => {
|
|
2816
2817
|
var t;
|
|
2817
|
-
return
|
|
2818
|
-
},
|
|
2818
|
+
return _t(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2819
|
+
}, $s = (e) => ii(e) || Bs(e), ci = (e) => {
|
|
2819
2820
|
var t;
|
|
2820
|
-
return
|
|
2821
|
-
},
|
|
2821
|
+
return $s(e) && !((t = e.text) != null && t.trim());
|
|
2822
|
+
}, qe = ({
|
|
2822
2823
|
message: e,
|
|
2823
2824
|
standalone: t = !1,
|
|
2824
2825
|
isMyMessage: n = !1,
|
|
2825
2826
|
hasAttachment: a = !1
|
|
2826
2827
|
}) => {
|
|
2827
2828
|
var u;
|
|
2828
|
-
const r =
|
|
2829
|
+
const r = $s(e), i = ze(e);
|
|
2829
2830
|
if (!r && !i)
|
|
2830
2831
|
return null;
|
|
2831
2832
|
if (r) {
|
|
2832
2833
|
const g = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
2833
2834
|
if (!g) return null;
|
|
2834
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x =
|
|
2835
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = Bs(e) ? "message" : "tip", _ = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
|
|
2835
2836
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
2836
|
-
/* @__PURE__ */ s(
|
|
2837
|
+
/* @__PURE__ */ s(sa, { size: t ? 14 : 12 }),
|
|
2837
2838
|
/* @__PURE__ */ s("span", { children: _ })
|
|
2838
2839
|
] });
|
|
2839
2840
|
}
|
|
@@ -2841,7 +2842,7 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2841
2842
|
"message-chatbot-indicator",
|
|
2842
2843
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2843
2844
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2844
|
-
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2845
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(ri, { size: l ? 12 : 15 }) });
|
|
2845
2846
|
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(K, { children: [
|
|
2846
2847
|
m,
|
|
2847
2848
|
f
|
|
@@ -2849,7 +2850,7 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2849
2850
|
f,
|
|
2850
2851
|
m
|
|
2851
2852
|
] }) });
|
|
2852
|
-
},
|
|
2853
|
+
}, di = ({
|
|
2853
2854
|
selected: e,
|
|
2854
2855
|
onVoteUp: t,
|
|
2855
2856
|
onVoteDown: n
|
|
@@ -2865,7 +2866,7 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2865
2866
|
"aria-label": "Good response",
|
|
2866
2867
|
"aria-pressed": e === "up",
|
|
2867
2868
|
"data-tooltip": "Good response",
|
|
2868
|
-
children: /* @__PURE__ */ s(
|
|
2869
|
+
children: /* @__PURE__ */ s(na, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2869
2870
|
}
|
|
2870
2871
|
),
|
|
2871
2872
|
/* @__PURE__ */ s(
|
|
@@ -2879,11 +2880,11 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2879
2880
|
"aria-label": "Bad response",
|
|
2880
2881
|
"aria-pressed": e === "down",
|
|
2881
2882
|
"data-tooltip": "Bad response",
|
|
2882
|
-
children: /* @__PURE__ */ s(
|
|
2883
|
+
children: /* @__PURE__ */ s(aa, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2883
2884
|
}
|
|
2884
2885
|
)
|
|
2885
|
-
] }),
|
|
2886
|
-
const { message: e } =
|
|
2886
|
+
] }), Us = () => {
|
|
2887
|
+
const { message: e } = he("SentMessageDeliveryStatus"), { messages: t } = me("SentMessageDeliveryStatus"), n = (() => {
|
|
2887
2888
|
if (t)
|
|
2888
2889
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
2889
2890
|
const r = t[a];
|
|
@@ -2892,12 +2893,12 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2892
2893
|
}
|
|
2893
2894
|
})();
|
|
2894
2895
|
return e.id === n;
|
|
2895
|
-
}, Xe = () =>
|
|
2896
|
-
/* @__PURE__ */ s(
|
|
2896
|
+
}, Xe = () => Us() ? /* @__PURE__ */ h(K, { children: [
|
|
2897
|
+
/* @__PURE__ */ s(ia, { weight: "bold", "aria-hidden": "true" }),
|
|
2897
2898
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2898
|
-
] }) : null,
|
|
2899
|
+
] }) : null, ui = () => Us() ? /* @__PURE__ */ h(K, { children: [
|
|
2899
2900
|
/* @__PURE__ */ s(
|
|
2900
|
-
|
|
2901
|
+
be,
|
|
2901
2902
|
{
|
|
2902
2903
|
className: "sent-message-status__spinner animate-spin",
|
|
2903
2904
|
weight: "bold",
|
|
@@ -2905,42 +2906,42 @@ const ei = B.lazy(() => import("./Card-qS17qnN0.js")), ti = B.lazy(() => import(
|
|
|
2905
2906
|
}
|
|
2906
2907
|
),
|
|
2907
2908
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
2908
|
-
] }) : null,
|
|
2909
|
-
/* @__PURE__ */ s(
|
|
2909
|
+
] }) : null, mi = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
2910
|
+
/* @__PURE__ */ s(ra, { weight: "bold", "aria-hidden": "true" }),
|
|
2910
2911
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
2911
|
-
] }),
|
|
2912
|
-
const { isMyMessage: e, message: t, threadList: n } =
|
|
2912
|
+
] }), hi = () => {
|
|
2913
|
+
const { isMyMessage: e, message: t, threadList: n } = he(
|
|
2913
2914
|
"SentMessageDeliveryStatus"
|
|
2914
2915
|
);
|
|
2915
|
-
return n ? null : t.status === "failed" && e() && t.type !== "error" ? /* @__PURE__ */ s(
|
|
2916
|
-
|
|
2916
|
+
return n ? null : t.status === "failed" && e() && t.type !== "error" ? /* @__PURE__ */ s(mi, {}) : /* @__PURE__ */ s(
|
|
2917
|
+
rn,
|
|
2917
2918
|
{
|
|
2918
2919
|
MessageSentStatus: Xe,
|
|
2919
2920
|
MessageDeliveredStatus: Xe,
|
|
2920
2921
|
MessageReadStatus: Xe,
|
|
2921
|
-
MessageSendingStatus:
|
|
2922
|
+
MessageSendingStatus: ui
|
|
2922
2923
|
}
|
|
2923
2924
|
);
|
|
2924
|
-
},
|
|
2925
|
-
function
|
|
2925
|
+
}, fi = /^([a-z][a-z0-9+.-]*):/i, gi = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2926
|
+
function wt(e) {
|
|
2926
2927
|
if (typeof e != "string") return;
|
|
2927
2928
|
const t = e.trim();
|
|
2928
2929
|
if (t === "") return;
|
|
2929
|
-
const n =
|
|
2930
|
+
const n = fi.exec(t);
|
|
2930
2931
|
if (n) {
|
|
2931
2932
|
const a = n[1].toLowerCase();
|
|
2932
|
-
return
|
|
2933
|
+
return gi.has(a) ? t : void 0;
|
|
2933
2934
|
}
|
|
2934
2935
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2935
2936
|
}
|
|
2936
|
-
const
|
|
2937
|
+
const pi = {
|
|
2937
2938
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2938
2939
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2939
|
-
},
|
|
2940
|
+
}, bi = ({ variant: e, cta: t }) => {
|
|
2940
2941
|
const n = C(
|
|
2941
2942
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2942
|
-
|
|
2943
|
-
), a =
|
|
2943
|
+
pi[e]
|
|
2944
|
+
), a = wt(t.href);
|
|
2944
2945
|
return a ? /* @__PURE__ */ s(
|
|
2945
2946
|
"a",
|
|
2946
2947
|
{
|
|
@@ -2966,16 +2967,16 @@ const fi = {
|
|
|
2966
2967
|
children: t.label
|
|
2967
2968
|
}
|
|
2968
2969
|
);
|
|
2969
|
-
},
|
|
2970
|
+
}, vi = {
|
|
2970
2971
|
dark: "text-white",
|
|
2971
2972
|
light: "text-black/90"
|
|
2972
|
-
},
|
|
2973
|
+
}, xi = "text-white/30", _i = {
|
|
2973
2974
|
dark: "text-white/55",
|
|
2974
2975
|
light: "text-black/55"
|
|
2975
|
-
},
|
|
2976
|
+
}, wi = {
|
|
2976
2977
|
dark: "bg-white/25",
|
|
2977
2978
|
light: "bg-black/15"
|
|
2978
|
-
},
|
|
2979
|
+
}, Nt = ({
|
|
2979
2980
|
variant: e,
|
|
2980
2981
|
title: t,
|
|
2981
2982
|
placeholderTitle: n,
|
|
@@ -2992,15 +2993,15 @@ const fi = {
|
|
|
2992
2993
|
return null;
|
|
2993
2994
|
const p = f && !t, v = C(
|
|
2994
2995
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
2995
|
-
d == null && (p ?
|
|
2996
|
+
d == null && (p ? xi : vi[e])
|
|
2996
2997
|
), w = C(
|
|
2997
2998
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
2998
|
-
d == null &&
|
|
2999
|
+
d == null && _i[e]
|
|
2999
3000
|
), y = d ? { color: d } : void 0;
|
|
3000
3001
|
if (m) {
|
|
3001
3002
|
const M = C(
|
|
3002
3003
|
"animate-pulse rounded",
|
|
3003
|
-
|
|
3004
|
+
wi[e]
|
|
3004
3005
|
);
|
|
3005
3006
|
return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
3006
3007
|
/* @__PURE__ */ s("div", { className: C("h-5 w-3/4", M), "aria-hidden": !0 }),
|
|
@@ -3026,14 +3027,14 @@ const fi = {
|
|
|
3026
3027
|
] }),
|
|
3027
3028
|
o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
|
|
3028
3029
|
] }),
|
|
3029
|
-
l && /* @__PURE__ */ s(
|
|
3030
|
+
l && /* @__PURE__ */ s(bi, { variant: e, cta: l })
|
|
3030
3031
|
] });
|
|
3031
|
-
},
|
|
3032
|
+
}, Ni = "Loading link preview", yi = C(
|
|
3032
3033
|
"relative w-[290px] select-none overflow-hidden",
|
|
3033
3034
|
// 20px corners — no token exists for it in the component-library preset,
|
|
3034
3035
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
3035
3036
|
"rounded-[20px]"
|
|
3036
|
-
),
|
|
3037
|
+
), Ci = "flex h-[250px] flex-col", Fe = ({
|
|
3037
3038
|
variant: e,
|
|
3038
3039
|
children: t,
|
|
3039
3040
|
href: n,
|
|
@@ -3048,8 +3049,8 @@ const fi = {
|
|
|
3048
3049
|
"data-testid": u
|
|
3049
3050
|
}) => {
|
|
3050
3051
|
const g = n != null || a != null, c = C(
|
|
3051
|
-
|
|
3052
|
-
m ?
|
|
3052
|
+
yi,
|
|
3053
|
+
m ? Ci : "block",
|
|
3053
3054
|
// Kept underneath `accentStyle` rather than swapped out: the inline
|
|
3054
3055
|
// background wins on specificity, and leaving the class in place means
|
|
3055
3056
|
// an accent that somehow doesn't paint still lands on a sane surface.
|
|
@@ -3058,7 +3059,7 @@ const fi = {
|
|
|
3058
3059
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
3059
3060
|
// with offset, so keyboard users can see the focused card.
|
|
3060
3061
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
3061
|
-
), x = f ? { role: "status", "aria-busy": !0, "aria-label":
|
|
3062
|
+
), x = f ? { role: "status", "aria-busy": !0, "aria-label": Ni } : void 0, _ = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
3062
3063
|
return n ? /* @__PURE__ */ h(
|
|
3063
3064
|
"a",
|
|
3064
3065
|
{
|
|
@@ -3106,17 +3107,17 @@ const fi = {
|
|
|
3106
3107
|
]
|
|
3107
3108
|
}
|
|
3108
3109
|
);
|
|
3109
|
-
},
|
|
3110
|
+
}, Zt = {
|
|
3110
3111
|
dark: "bg-white/10",
|
|
3111
3112
|
light: "bg-black/5"
|
|
3112
|
-
},
|
|
3113
|
+
}, ki = {
|
|
3113
3114
|
dark: "size-16 text-white/25",
|
|
3114
3115
|
light: "size-16 text-black/25"
|
|
3115
|
-
},
|
|
3116
|
+
}, Ae = (e, t) => !!t && !!e && le(e) === "audio", yt = (e, t) => {
|
|
3116
3117
|
if (!t || !e) return !1;
|
|
3117
|
-
const n =
|
|
3118
|
+
const n = le(e);
|
|
3118
3119
|
return n === "video" || n === "audio";
|
|
3119
|
-
},
|
|
3120
|
+
}, Ct = "bg-[#F2F3F4]", Be = ({
|
|
3120
3121
|
variant: e,
|
|
3121
3122
|
thumbnailUrl: t,
|
|
3122
3123
|
sourceUrl: n,
|
|
@@ -3127,8 +3128,8 @@ const fi = {
|
|
|
3127
3128
|
isLoading: o = !1,
|
|
3128
3129
|
onImageError: d
|
|
3129
3130
|
}) => {
|
|
3130
|
-
const m =
|
|
3131
|
-
return !o &&
|
|
3131
|
+
const m = le(r), f = !!n && m === "video", u = ue(t);
|
|
3132
|
+
return !o && Ae(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
3132
3133
|
"audio",
|
|
3133
3134
|
{
|
|
3134
3135
|
src: n,
|
|
@@ -3159,7 +3160,7 @@ const fi = {
|
|
|
3159
3160
|
{
|
|
3160
3161
|
className: C(
|
|
3161
3162
|
"h-full w-full animate-pulse",
|
|
3162
|
-
|
|
3163
|
+
Zt[e]
|
|
3163
3164
|
),
|
|
3164
3165
|
"aria-hidden": !0
|
|
3165
3166
|
}
|
|
@@ -3203,10 +3204,10 @@ const fi = {
|
|
|
3203
3204
|
{
|
|
3204
3205
|
className: C(
|
|
3205
3206
|
"flex h-full w-full items-center justify-center",
|
|
3206
|
-
|
|
3207
|
+
Zt[e]
|
|
3207
3208
|
),
|
|
3208
|
-
children:
|
|
3209
|
-
className:
|
|
3209
|
+
children: ve(r, {
|
|
3210
|
+
className: ki[e],
|
|
3210
3211
|
weight: "regular"
|
|
3211
3212
|
})
|
|
3212
3213
|
}
|
|
@@ -3216,45 +3217,45 @@ const fi = {
|
|
|
3216
3217
|
]
|
|
3217
3218
|
}
|
|
3218
3219
|
);
|
|
3219
|
-
},
|
|
3220
|
-
function
|
|
3221
|
-
if (typeof e != "string" || !
|
|
3222
|
-
const t = e.trim().replace(/^#/, ""), n = t.length ===
|
|
3220
|
+
}, Pe = "#FFFFFF", Jt = "#040403", Si = "#1e2330", Ei = 3, Ii = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
3221
|
+
function Ti(e) {
|
|
3222
|
+
if (typeof e != "string" || !Ii.test(e.trim())) return;
|
|
3223
|
+
const t = e.trim().replace(/^#/, ""), n = t.length === Ei ? t.replace(/./g, (a) => a + a) : t;
|
|
3223
3224
|
return [
|
|
3224
3225
|
Number.parseInt(n.slice(0, 2), 16),
|
|
3225
3226
|
Number.parseInt(n.slice(2, 4), 16),
|
|
3226
3227
|
Number.parseInt(n.slice(4, 6), 16)
|
|
3227
3228
|
];
|
|
3228
3229
|
}
|
|
3229
|
-
function
|
|
3230
|
+
function Ke(e) {
|
|
3230
3231
|
const t = e / 255;
|
|
3231
3232
|
return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
3232
3233
|
}
|
|
3233
|
-
function
|
|
3234
|
-
const t =
|
|
3235
|
-
return t ? 0.2126 *
|
|
3234
|
+
function rt(e) {
|
|
3235
|
+
const t = Ti(e);
|
|
3236
|
+
return t ? 0.2126 * Ke(t[0]) + 0.7152 * Ke(t[1]) + 0.0722 * Ke(t[2]) : Number.NaN;
|
|
3236
3237
|
}
|
|
3237
|
-
function
|
|
3238
|
-
const n =
|
|
3238
|
+
function Qt(e, t) {
|
|
3239
|
+
const n = rt(e), a = rt(t);
|
|
3239
3240
|
if (Number.isNaN(n) || Number.isNaN(a)) return Number.NaN;
|
|
3240
3241
|
const r = Math.max(n, a), i = Math.min(n, a);
|
|
3241
3242
|
return (r + 0.05) / (i + 0.05);
|
|
3242
3243
|
}
|
|
3243
|
-
function
|
|
3244
|
-
if (e == null) return
|
|
3245
|
-
const t =
|
|
3246
|
-
return Number.isNaN(t) || t >=
|
|
3244
|
+
function Ai(e) {
|
|
3245
|
+
if (e == null) return Pe;
|
|
3246
|
+
const t = Qt(e, Pe);
|
|
3247
|
+
return Number.isNaN(t) || t >= Qt(e, Jt) ? Pe : Jt;
|
|
3247
3248
|
}
|
|
3248
|
-
function
|
|
3249
|
-
if (e == null || Number.isNaN(
|
|
3249
|
+
function Mi(e) {
|
|
3250
|
+
if (e == null || Number.isNaN(rt(e))) return;
|
|
3250
3251
|
const t = e.trim();
|
|
3251
3252
|
return t.startsWith("#") ? t : `#${t}`;
|
|
3252
3253
|
}
|
|
3253
|
-
const
|
|
3254
|
-
dark:
|
|
3254
|
+
const Li = {
|
|
3255
|
+
dark: Si,
|
|
3255
3256
|
light: "#ffffff"
|
|
3256
3257
|
};
|
|
3257
|
-
function
|
|
3258
|
+
function kt({
|
|
3258
3259
|
variant: e,
|
|
3259
3260
|
accentColor: t,
|
|
3260
3261
|
status: n = "ready",
|
|
@@ -3269,17 +3270,17 @@ function Ct({
|
|
|
3269
3270
|
}, [r]);
|
|
3270
3271
|
const m = B.useCallback(() => {
|
|
3271
3272
|
d(!0);
|
|
3272
|
-
}, []), u = a === "featured" && !!r && !
|
|
3273
|
+
}, []), u = a === "featured" && !!r && !Ae(i, l) && !o && n === "ready" ? Mi(t) : void 0;
|
|
3273
3274
|
return {
|
|
3274
3275
|
thumbnailUrl: o ? void 0 : r,
|
|
3275
3276
|
accentStyle: u ? { backgroundColor: u } : void 0,
|
|
3276
|
-
chinTextColor: u ?
|
|
3277
|
-
tailColor: u ??
|
|
3277
|
+
chinTextColor: u ? Ai(u) : void 0,
|
|
3278
|
+
tailColor: u ?? Li[e],
|
|
3278
3279
|
isLoading: n === "loading",
|
|
3279
3280
|
onImageError: m
|
|
3280
3281
|
};
|
|
3281
3282
|
}
|
|
3282
|
-
const
|
|
3283
|
+
const Ri = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Di = "relative before:absolute before:-inset-[10px] before:content-['']", Pi = ({
|
|
3283
3284
|
title: e,
|
|
3284
3285
|
placeholderTitle: t,
|
|
3285
3286
|
description: n,
|
|
@@ -3296,7 +3297,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3296
3297
|
onEditClick: c,
|
|
3297
3298
|
dismissLabel: x = "Dismiss attachment"
|
|
3298
3299
|
}) => {
|
|
3299
|
-
const _ = o === "classic", b =
|
|
3300
|
+
const _ = o === "classic", b = Ae(r, l), p = kt({
|
|
3300
3301
|
variant: "dark",
|
|
3301
3302
|
accentColor: f,
|
|
3302
3303
|
status: u,
|
|
@@ -3311,10 +3312,10 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3311
3312
|
onClick: g,
|
|
3312
3313
|
"aria-label": x,
|
|
3313
3314
|
className: C(
|
|
3314
|
-
|
|
3315
|
-
!b &&
|
|
3315
|
+
Ri,
|
|
3316
|
+
!b && Di
|
|
3316
3317
|
),
|
|
3317
|
-
children: /* @__PURE__ */ s(
|
|
3318
|
+
children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
|
|
3318
3319
|
}
|
|
3319
3320
|
) : void 0, w = c ? /* @__PURE__ */ s(
|
|
3320
3321
|
"button",
|
|
@@ -3323,12 +3324,12 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3323
3324
|
onClick: c,
|
|
3324
3325
|
"aria-label": "Edit attachment",
|
|
3325
3326
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3326
|
-
children: /* @__PURE__ */ s(
|
|
3327
|
+
children: /* @__PURE__ */ s(oa, { className: "size-5", weight: "regular" })
|
|
3327
3328
|
}
|
|
3328
3329
|
) : void 0;
|
|
3329
|
-
return b && !p.isLoading ? /* @__PURE__ */ s(
|
|
3330
|
+
return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3330
3331
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3331
|
-
|
|
3332
|
+
Be,
|
|
3332
3333
|
{
|
|
3333
3334
|
variant: "dark",
|
|
3334
3335
|
sourceUrl: l,
|
|
@@ -3338,7 +3339,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3338
3339
|
) }),
|
|
3339
3340
|
v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
|
|
3340
3341
|
] }) }) : /* @__PURE__ */ h(
|
|
3341
|
-
|
|
3342
|
+
Fe,
|
|
3342
3343
|
{
|
|
3343
3344
|
variant: "dark",
|
|
3344
3345
|
fixedHeight: !_,
|
|
@@ -3347,7 +3348,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3347
3348
|
topRight: _ ? v : void 0,
|
|
3348
3349
|
children: [
|
|
3349
3350
|
!_ && /* @__PURE__ */ s(
|
|
3350
|
-
|
|
3351
|
+
Be,
|
|
3351
3352
|
{
|
|
3352
3353
|
variant: "dark",
|
|
3353
3354
|
thumbnailUrl: p.thumbnailUrl,
|
|
@@ -3360,7 +3361,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3360
3361
|
}
|
|
3361
3362
|
),
|
|
3362
3363
|
/* @__PURE__ */ s(
|
|
3363
|
-
|
|
3364
|
+
Nt,
|
|
3364
3365
|
{
|
|
3365
3366
|
variant: "dark",
|
|
3366
3367
|
title: e,
|
|
@@ -3377,7 +3378,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3377
3378
|
]
|
|
3378
3379
|
}
|
|
3379
3380
|
);
|
|
3380
|
-
},
|
|
3381
|
+
}, Vs = ({
|
|
3381
3382
|
color: e,
|
|
3382
3383
|
side: t,
|
|
3383
3384
|
visible: n,
|
|
@@ -3401,7 +3402,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3401
3402
|
}
|
|
3402
3403
|
)
|
|
3403
3404
|
] })
|
|
3404
|
-
) : /* @__PURE__ */ s(K, { children: a }),
|
|
3405
|
+
) : /* @__PURE__ */ s(K, { children: a }), Oi = ({
|
|
3405
3406
|
title: e,
|
|
3406
3407
|
description: t,
|
|
3407
3408
|
url: n,
|
|
@@ -3416,13 +3417,13 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3416
3417
|
onClick: u,
|
|
3417
3418
|
groupPosition: g = "single"
|
|
3418
3419
|
}) => {
|
|
3419
|
-
const c =
|
|
3420
|
+
const c = yt(a, i), x = wt(n), _ = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Ae(a, i) ? Ct : void 0, v = d && u ? {
|
|
3420
3421
|
...d,
|
|
3421
3422
|
onClick: () => {
|
|
3422
3423
|
var y;
|
|
3423
3424
|
u(), (y = d.onClick) == null || y.call(d);
|
|
3424
3425
|
}
|
|
3425
|
-
} : d, w =
|
|
3426
|
+
} : d, w = kt({
|
|
3426
3427
|
variant: "light",
|
|
3427
3428
|
accentColor: m,
|
|
3428
3429
|
status: f,
|
|
@@ -3432,13 +3433,13 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3432
3433
|
sourceUrl: i
|
|
3433
3434
|
});
|
|
3434
3435
|
return /* @__PURE__ */ s(
|
|
3435
|
-
|
|
3436
|
+
Vs,
|
|
3436
3437
|
{
|
|
3437
3438
|
color: w.tailColor,
|
|
3438
3439
|
side: "receiver",
|
|
3439
3440
|
visible: p == null && (g === "single" || g === "end"),
|
|
3440
3441
|
children: /* @__PURE__ */ h(
|
|
3441
|
-
|
|
3442
|
+
Fe,
|
|
3442
3443
|
{
|
|
3443
3444
|
variant: "light",
|
|
3444
3445
|
href: _,
|
|
@@ -3451,7 +3452,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3451
3452
|
"data-testid": "link-attachment",
|
|
3452
3453
|
children: [
|
|
3453
3454
|
l === "featured" && /* @__PURE__ */ s(
|
|
3454
|
-
|
|
3455
|
+
Be,
|
|
3455
3456
|
{
|
|
3456
3457
|
variant: "light",
|
|
3457
3458
|
thumbnailUrl: w.thumbnailUrl,
|
|
@@ -3463,7 +3464,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3463
3464
|
}
|
|
3464
3465
|
),
|
|
3465
3466
|
/* @__PURE__ */ s(
|
|
3466
|
-
|
|
3467
|
+
Nt,
|
|
3467
3468
|
{
|
|
3468
3469
|
variant: "light",
|
|
3469
3470
|
title: e,
|
|
@@ -3480,7 +3481,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3480
3481
|
)
|
|
3481
3482
|
}
|
|
3482
3483
|
);
|
|
3483
|
-
},
|
|
3484
|
+
}, zi = ({
|
|
3484
3485
|
title: e,
|
|
3485
3486
|
placeholderTitle: t,
|
|
3486
3487
|
description: n,
|
|
@@ -3496,7 +3497,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3496
3497
|
onClick: g,
|
|
3497
3498
|
groupPosition: c = "single"
|
|
3498
3499
|
}) => {
|
|
3499
|
-
const x =
|
|
3500
|
+
const x = yt(r, l), _ = wt(a), b = m == null && _ != null && !x ? _ : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Ae(r, l), w = kt({
|
|
3500
3501
|
variant: "dark",
|
|
3501
3502
|
accentColor: f,
|
|
3502
3503
|
status: u,
|
|
@@ -3506,13 +3507,13 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3506
3507
|
sourceUrl: l
|
|
3507
3508
|
});
|
|
3508
3509
|
return /* @__PURE__ */ s(
|
|
3509
|
-
|
|
3510
|
+
Vs,
|
|
3510
3511
|
{
|
|
3511
3512
|
color: w.tailColor,
|
|
3512
3513
|
side: "sender",
|
|
3513
3514
|
visible: !v && (c === "single" || c === "end"),
|
|
3514
3515
|
children: /* @__PURE__ */ h(
|
|
3515
|
-
|
|
3516
|
+
Fe,
|
|
3516
3517
|
{
|
|
3517
3518
|
variant: "dark",
|
|
3518
3519
|
href: b,
|
|
@@ -3520,10 +3521,10 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3520
3521
|
fixedHeight: o === "featured" && !v,
|
|
3521
3522
|
accentStyle: w.accentStyle,
|
|
3522
3523
|
busy: w.isLoading,
|
|
3523
|
-
bgClassName: v ?
|
|
3524
|
+
bgClassName: v ? Ct : void 0,
|
|
3524
3525
|
children: [
|
|
3525
3526
|
o === "featured" && /* @__PURE__ */ s(
|
|
3526
|
-
|
|
3527
|
+
Be,
|
|
3527
3528
|
{
|
|
3528
3529
|
variant: "dark",
|
|
3529
3530
|
thumbnailUrl: w.thumbnailUrl,
|
|
@@ -3535,7 +3536,7 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3535
3536
|
}
|
|
3536
3537
|
),
|
|
3537
3538
|
/* @__PURE__ */ s(
|
|
3538
|
-
|
|
3539
|
+
Nt,
|
|
3539
3540
|
{
|
|
3540
3541
|
variant: "dark",
|
|
3541
3542
|
title: e,
|
|
@@ -3553,22 +3554,22 @@ const Mi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3553
3554
|
)
|
|
3554
3555
|
}
|
|
3555
3556
|
);
|
|
3556
|
-
},
|
|
3557
|
-
Composer:
|
|
3558
|
-
Sent:
|
|
3559
|
-
Received:
|
|
3557
|
+
}, it = {
|
|
3558
|
+
Composer: Pi,
|
|
3559
|
+
Sent: zi,
|
|
3560
|
+
Received: Oi
|
|
3560
3561
|
};
|
|
3561
3562
|
function R(e) {
|
|
3562
3563
|
const t = e == null ? void 0 : e.trim();
|
|
3563
3564
|
return t || void 0;
|
|
3564
3565
|
}
|
|
3565
|
-
function
|
|
3566
|
+
function es(e) {
|
|
3566
3567
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3567
3568
|
}
|
|
3568
|
-
function
|
|
3569
|
+
function Fi(e, t) {
|
|
3569
3570
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3570
3571
|
return !1;
|
|
3571
|
-
const n =
|
|
3572
|
+
const n = es(e), a = es(t);
|
|
3572
3573
|
if (n === a)
|
|
3573
3574
|
return !0;
|
|
3574
3575
|
if (!n.includes(a))
|
|
@@ -3576,17 +3577,17 @@ function Oi(e, t) {
|
|
|
3576
3577
|
const r = n.split(a).join("");
|
|
3577
3578
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3578
3579
|
}
|
|
3579
|
-
function
|
|
3580
|
+
function ts(e) {
|
|
3580
3581
|
const t = R(e.og_scrape_url) ?? R(e.title_link), n = R(e.image_url) ?? R(e.thumb_url), a = R(e.asset_url), r = R(e.mime_type);
|
|
3581
3582
|
return {
|
|
3582
3583
|
title: R(e.title),
|
|
3583
3584
|
description: R(e.text),
|
|
3584
3585
|
url: t,
|
|
3585
|
-
thumbnailUrl:
|
|
3586
|
+
thumbnailUrl: ue(n),
|
|
3586
3587
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3587
3588
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3588
3589
|
sourceUrl: a,
|
|
3589
|
-
layout: n ||
|
|
3590
|
+
layout: n || yt(r, a) ? "featured" : "classic",
|
|
3590
3591
|
mimeType: r,
|
|
3591
3592
|
// Dominant colour of the image, resolved by the sender at stage time and
|
|
3592
3593
|
// persisted on the attachment (`stream-custom-data.ts`), so every viewer
|
|
@@ -3598,15 +3599,15 @@ function es(e) {
|
|
|
3598
3599
|
status: "ready"
|
|
3599
3600
|
};
|
|
3600
3601
|
}
|
|
3601
|
-
function
|
|
3602
|
+
function Bi(e) {
|
|
3602
3603
|
var t;
|
|
3603
|
-
return
|
|
3604
|
+
return js(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;
|
|
3604
3605
|
}
|
|
3605
|
-
function
|
|
3606
|
+
function js(e) {
|
|
3606
3607
|
const t = R(e.og_scrape_url);
|
|
3607
3608
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3608
3609
|
}
|
|
3609
|
-
function
|
|
3610
|
+
function Hs(e) {
|
|
3610
3611
|
if (!(e != null && e.length)) return [];
|
|
3611
3612
|
const t = [], n = (r, i) => {
|
|
3612
3613
|
const l = t[t.length - 1];
|
|
@@ -3624,45 +3625,45 @@ function js(e) {
|
|
|
3624
3625
|
t.push({ type: "link", attachments: [r] });
|
|
3625
3626
|
};
|
|
3626
3627
|
for (const r of e) {
|
|
3627
|
-
if (
|
|
3628
|
+
if (js(r)) {
|
|
3628
3629
|
a(r);
|
|
3629
3630
|
continue;
|
|
3630
3631
|
}
|
|
3631
|
-
const i =
|
|
3632
|
+
const i = Bi(r);
|
|
3632
3633
|
i && n(i, r);
|
|
3633
3634
|
}
|
|
3634
3635
|
return t;
|
|
3635
3636
|
}
|
|
3636
|
-
function
|
|
3637
|
+
function $i(e) {
|
|
3637
3638
|
return e.filter((t) => t.type === "media").length;
|
|
3638
3639
|
}
|
|
3639
|
-
function
|
|
3640
|
+
function Ui(e, t, n) {
|
|
3640
3641
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3641
3642
|
}
|
|
3642
|
-
function
|
|
3643
|
+
function ss(e) {
|
|
3643
3644
|
return R(e.image_url) ?? R(e.asset_url) ?? "";
|
|
3644
3645
|
}
|
|
3645
|
-
function
|
|
3646
|
+
function Vi(e) {
|
|
3646
3647
|
switch (e) {
|
|
3647
3648
|
case "image":
|
|
3648
|
-
return
|
|
3649
|
+
return we.Image;
|
|
3649
3650
|
case "video":
|
|
3650
|
-
return
|
|
3651
|
+
return we.Video;
|
|
3651
3652
|
case "audio":
|
|
3652
|
-
return
|
|
3653
|
+
return we.Audio;
|
|
3653
3654
|
case "pdf":
|
|
3654
|
-
return
|
|
3655
|
+
return we.Pdf;
|
|
3655
3656
|
default:
|
|
3656
|
-
return
|
|
3657
|
+
return we.File;
|
|
3657
3658
|
}
|
|
3658
3659
|
}
|
|
3659
|
-
function
|
|
3660
|
+
function ji(e, t) {
|
|
3660
3661
|
if (t.length > 1)
|
|
3661
3662
|
switch (e) {
|
|
3662
3663
|
case "image":
|
|
3663
3664
|
return {
|
|
3664
3665
|
items: t.map((a) => ({
|
|
3665
|
-
src:
|
|
3666
|
+
src: ss(a),
|
|
3666
3667
|
alt: R(a.title)
|
|
3667
3668
|
}))
|
|
3668
3669
|
};
|
|
@@ -3707,7 +3708,7 @@ function Ui(e, t) {
|
|
|
3707
3708
|
switch (e) {
|
|
3708
3709
|
case "image":
|
|
3709
3710
|
return {
|
|
3710
|
-
src:
|
|
3711
|
+
src: ss(n),
|
|
3711
3712
|
alt: R(n.title)
|
|
3712
3713
|
};
|
|
3713
3714
|
case "video":
|
|
@@ -3739,49 +3740,49 @@ function Ui(e, t) {
|
|
|
3739
3740
|
};
|
|
3740
3741
|
}
|
|
3741
3742
|
}
|
|
3742
|
-
function
|
|
3743
|
+
function Hi({
|
|
3743
3744
|
groupPosition: e,
|
|
3744
3745
|
isMyMessage: t,
|
|
3745
3746
|
segment: n
|
|
3746
3747
|
}) {
|
|
3747
|
-
const a =
|
|
3748
|
-
...
|
|
3748
|
+
const a = Vi(n.kind), r = {
|
|
3749
|
+
...ji(n.kind, n.attachments),
|
|
3749
3750
|
groupPosition: e
|
|
3750
3751
|
};
|
|
3751
3752
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3752
3753
|
}
|
|
3753
|
-
const
|
|
3754
|
+
const Gi = ({
|
|
3754
3755
|
groupPosition: e,
|
|
3755
3756
|
isMyMessage: t,
|
|
3756
3757
|
message: n,
|
|
3757
3758
|
renderText: a
|
|
3758
3759
|
}) => {
|
|
3759
3760
|
var _;
|
|
3760
|
-
const r =
|
|
3761
|
+
const r = Hs(n.attachments);
|
|
3761
3762
|
if (r.length === 0) return null;
|
|
3762
|
-
const i =
|
|
3763
|
+
const i = $i(r), l = (_ = n.text) == null ? void 0 : _.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ts(o.attachments[0] ?? {}).url : void 0, m = l && Fi(l, d) ? void 0 : l;
|
|
3763
3764
|
let f = 0;
|
|
3764
3765
|
const u = [], g = m ? "middle" : e, c = (b, p, v) => {
|
|
3765
|
-
const w = t ?
|
|
3766
|
+
const w = t ? it.Sent : it.Received;
|
|
3766
3767
|
u.push(
|
|
3767
3768
|
/* @__PURE__ */ s(
|
|
3768
3769
|
w,
|
|
3769
3770
|
{
|
|
3770
|
-
...
|
|
3771
|
+
...ts(b),
|
|
3771
3772
|
groupPosition: v ? g : "middle"
|
|
3772
3773
|
},
|
|
3773
3774
|
p
|
|
3774
3775
|
)
|
|
3775
3776
|
);
|
|
3776
3777
|
}, x = (b, p) => {
|
|
3777
|
-
const v =
|
|
3778
|
+
const v = Ui(
|
|
3778
3779
|
f,
|
|
3779
3780
|
i,
|
|
3780
3781
|
e
|
|
3781
3782
|
);
|
|
3782
3783
|
f += 1, u.push(
|
|
3783
3784
|
/* @__PURE__ */ s(
|
|
3784
|
-
|
|
3785
|
+
Hi,
|
|
3785
3786
|
{
|
|
3786
3787
|
groupPosition: v,
|
|
3787
3788
|
isMyMessage: t,
|
|
@@ -3818,17 +3819,17 @@ const ji = ({
|
|
|
3818
3819
|
},
|
|
3819
3820
|
children: [
|
|
3820
3821
|
u,
|
|
3821
|
-
!m && /* @__PURE__ */ s(
|
|
3822
|
+
!m && /* @__PURE__ */ s(et, {})
|
|
3822
3823
|
]
|
|
3823
3824
|
}
|
|
3824
3825
|
),
|
|
3825
3826
|
m ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
3826
|
-
/* @__PURE__ */ s(
|
|
3827
|
-
/* @__PURE__ */ s(
|
|
3827
|
+
/* @__PURE__ */ s(Oe, { message: n, renderText: a }),
|
|
3828
|
+
/* @__PURE__ */ s(et, {})
|
|
3828
3829
|
] }) : null
|
|
3829
3830
|
] });
|
|
3830
|
-
},
|
|
3831
|
-
var
|
|
3831
|
+
}, Yi = (e) => {
|
|
3832
|
+
var Lt, Rt, Dt, Pt, Ot, zt, Ft, Bt, $t, Ut;
|
|
3832
3833
|
const {
|
|
3833
3834
|
additionalMessageInputProps: t,
|
|
3834
3835
|
chatbotVotingEnabled: n,
|
|
@@ -3846,50 +3847,50 @@ const ji = ({
|
|
|
3846
3847
|
renderText: x,
|
|
3847
3848
|
threadList: _,
|
|
3848
3849
|
viewerLanguage: b
|
|
3849
|
-
} = e, { client: p } =
|
|
3850
|
-
Attachment: E =
|
|
3851
|
-
EditMessageModal: I =
|
|
3850
|
+
} = e, { client: p } = ke("CustomMessage"), { channel: v } = me("CustomMessage"), { isUnlocking: w, onUnlockClick: y, onFetchSource: M, onDownloadClick: L } = ti("LockedAttachment"), [O, $] = F(!1), z = ln(c.id), { selected: D, voteUp: S, voteDown: T } = Aa(c), {
|
|
3851
|
+
Attachment: E = cn,
|
|
3852
|
+
EditMessageModal: I = dn,
|
|
3852
3853
|
MessageActions: k,
|
|
3853
|
-
MessageBlocked: P =
|
|
3854
|
-
MessageBouncePrompt: G =
|
|
3855
|
-
MessageDeleted: W =
|
|
3856
|
-
MessageIsThreadReplyInChannelButtonIndicator: Z =
|
|
3857
|
-
MessageRepliesCountButton: J =
|
|
3858
|
-
ReminderNotification: j =
|
|
3859
|
-
StreamedMessageText: N =
|
|
3854
|
+
MessageBlocked: P = un,
|
|
3855
|
+
MessageBouncePrompt: G = mn,
|
|
3856
|
+
MessageDeleted: W = hn,
|
|
3857
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = fn,
|
|
3858
|
+
MessageRepliesCountButton: J = gn,
|
|
3859
|
+
ReminderNotification: j = pn,
|
|
3860
|
+
StreamedMessageText: N = bn,
|
|
3860
3861
|
PinIndicator: A
|
|
3861
|
-
} =
|
|
3862
|
+
} = ls("CustomMessage"), U = vn(c), te = xn(c), X = se(
|
|
3862
3863
|
() => u == null ? void 0 : u(c),
|
|
3863
3864
|
[u, c]
|
|
3864
3865
|
), V = se(() => {
|
|
3865
|
-
const
|
|
3866
|
-
if (!
|
|
3867
|
-
const
|
|
3868
|
-
return
|
|
3866
|
+
const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
|
|
3867
|
+
if (!ze(c)) return pe;
|
|
3868
|
+
const Vt = pe.filter((jt) => !("type" in jt) || !Cs(jt));
|
|
3869
|
+
return Vt.length === pe.length ? pe : Vt;
|
|
3869
3870
|
}, [c]), Q = se(
|
|
3870
|
-
() =>
|
|
3871
|
+
() => Hs(V),
|
|
3871
3872
|
[V]
|
|
3872
3873
|
), ae = se(() => {
|
|
3873
|
-
const
|
|
3874
|
-
return
|
|
3875
|
-
}, [c, b]),
|
|
3876
|
-
(
|
|
3874
|
+
const de = xs({ message: c, viewerLanguage: b });
|
|
3875
|
+
return de === c.text ? c : { ...c, text: de };
|
|
3876
|
+
}, [c, b]), Me = Q.length > 0, Le = Q.reduce(
|
|
3877
|
+
(de, pe) => de + pe.attachments.length,
|
|
3877
3878
|
0
|
|
3878
|
-
) === ((V == null ? void 0 : V.length) ?? 0), re =
|
|
3879
|
+
) === ((V == null ? void 0 : V.length) ?? 0), re = nr({
|
|
3879
3880
|
endOfGroup: r,
|
|
3880
3881
|
firstOfGroup: i,
|
|
3881
3882
|
groupedByUser: l
|
|
3882
3883
|
});
|
|
3883
|
-
if (
|
|
3884
|
+
if (_n(c))
|
|
3884
3885
|
return null;
|
|
3885
3886
|
if (c.deleted_at || c.type === "deleted")
|
|
3886
3887
|
return /* @__PURE__ */ s(W, { message: c });
|
|
3887
|
-
if (
|
|
3888
|
+
if (wn(c))
|
|
3888
3889
|
return /* @__PURE__ */ s(P, {});
|
|
3889
|
-
const
|
|
3890
|
-
let
|
|
3891
|
-
|
|
3892
|
-
const ee = g(),
|
|
3890
|
+
const ce = !_ && !!c.reply_count, ie = !_ && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Nn(c);
|
|
3891
|
+
let fe;
|
|
3892
|
+
St ? fe = () => m(c) : Et && (fe = () => $(!0));
|
|
3893
|
+
const ee = g(), Ks = C(
|
|
3893
3894
|
"str-chat__message str-chat__message-simple",
|
|
3894
3895
|
`str-chat__message--${c.type}`,
|
|
3895
3896
|
`str-chat__message--${c.status}`,
|
|
@@ -3900,25 +3901,25 @@ const ji = ({
|
|
|
3900
3901
|
"str-chat__message--highlighted": f,
|
|
3901
3902
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3902
3903
|
"str-chat__message--with-reactions": te,
|
|
3903
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3904
|
-
"str-chat__message-with-thread-link":
|
|
3904
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Rt = c == null ? void 0 : c.error) == null ? void 0 : Rt.status) !== 403,
|
|
3905
|
+
"str-chat__message-with-thread-link": ce || ie,
|
|
3905
3906
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3906
3907
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3907
3908
|
"str-chat__virtual-message__wrapper--group": l
|
|
3908
3909
|
}
|
|
3909
|
-
),
|
|
3910
|
+
), Ve = c.poll_id && p.polls.fromState(c.poll_id), It = ci(c), ge = ze(c), Zs = _t(c), je = !!(V != null && V.length && !c.quoted_message), Tt = ge && ee && je, Js = Me && Le && !c.quoted_message && !Ve && !X && !ge, At = {
|
|
3910
3911
|
contentType: "text",
|
|
3911
|
-
amountText: (
|
|
3912
|
-
paymentStatus: (
|
|
3913
|
-
renderedText: c.text && /* @__PURE__ */ s(
|
|
3914
|
-
},
|
|
3912
|
+
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
3913
|
+
paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
|
|
3914
|
+
renderedText: c.text && /* @__PURE__ */ s(Oe, { message: ae, renderText: x })
|
|
3915
|
+
}, Mt = {
|
|
3915
3916
|
contentType: "media",
|
|
3916
|
-
title: (
|
|
3917
|
-
mimeType: (
|
|
3918
|
-
thumbnailUrl: (
|
|
3919
|
-
amountText: (
|
|
3920
|
-
detail: (
|
|
3921
|
-
paymentStatus: (
|
|
3917
|
+
title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
|
|
3918
|
+
mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
|
|
3919
|
+
thumbnailUrl: (Ft = c.metadata) == null ? void 0 : Ft.attachment_thumbnail,
|
|
3920
|
+
amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
|
|
3921
|
+
detail: ($t = c.metadata) == null ? void 0 : $t.attachment_detail,
|
|
3922
|
+
paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
|
|
3922
3923
|
onFetchSource: M ? () => M(c, v) : void 0
|
|
3923
3924
|
};
|
|
3924
3925
|
return /* @__PURE__ */ h(K, { children: [
|
|
@@ -3929,7 +3930,7 @@ const ji = ({
|
|
|
3929
3930
|
}
|
|
3930
3931
|
),
|
|
3931
3932
|
O && /* @__PURE__ */ s(
|
|
3932
|
-
|
|
3933
|
+
yn,
|
|
3933
3934
|
{
|
|
3934
3935
|
MessageBouncePrompt: G,
|
|
3935
3936
|
onClose: () => $(!1),
|
|
@@ -3939,14 +3940,14 @@ const ji = ({
|
|
|
3939
3940
|
/* @__PURE__ */ h(
|
|
3940
3941
|
"div",
|
|
3941
3942
|
{
|
|
3942
|
-
className:
|
|
3943
|
+
className: Ks,
|
|
3943
3944
|
"data-message-id": c.id,
|
|
3944
3945
|
"data-dd-privacy": "mask",
|
|
3945
3946
|
children: [
|
|
3946
3947
|
A && /* @__PURE__ */ s(A, {}),
|
|
3947
3948
|
!!z && /* @__PURE__ */ s(j, { reminder: z }),
|
|
3948
3949
|
c.user && /* @__PURE__ */ s(
|
|
3949
|
-
|
|
3950
|
+
xe,
|
|
3950
3951
|
{
|
|
3951
3952
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
3952
3953
|
id: c.user.id,
|
|
@@ -3954,58 +3955,58 @@ const ji = ({
|
|
|
3954
3955
|
name: c.user.name || c.user.id,
|
|
3955
3956
|
size: 24,
|
|
3956
3957
|
shape: "circle",
|
|
3957
|
-
dmAgentEnabled:
|
|
3958
|
+
dmAgentEnabled: ge
|
|
3958
3959
|
}
|
|
3959
3960
|
),
|
|
3960
3961
|
/* @__PURE__ */ s(
|
|
3961
3962
|
"div",
|
|
3962
3963
|
{
|
|
3963
3964
|
className: C("str-chat__message-inner", {
|
|
3964
|
-
"str-chat__simple-message--error-failed":
|
|
3965
|
+
"str-chat__simple-message--error-failed": St || Et
|
|
3965
3966
|
}),
|
|
3966
3967
|
"data-testid": "message-inner",
|
|
3967
|
-
onClick:
|
|
3968
|
-
onKeyDown:
|
|
3969
|
-
role:
|
|
3970
|
-
tabIndex:
|
|
3968
|
+
onClick: fe,
|
|
3969
|
+
onKeyDown: fe,
|
|
3970
|
+
role: fe ? "button" : void 0,
|
|
3971
|
+
tabIndex: fe ? 0 : void 0,
|
|
3971
3972
|
style: {
|
|
3972
3973
|
// Force margins to 0 to prevent hover layout shift
|
|
3973
3974
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
3974
3975
|
marginInlineEnd: 0,
|
|
3975
3976
|
marginInlineStart: 0
|
|
3976
3977
|
},
|
|
3977
|
-
children:
|
|
3978
|
+
children: It ? /* @__PURE__ */ s(qe, { message: c, standalone: !0 }) : oi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3978
3979
|
ee && k && /* @__PURE__ */ s(k, {}),
|
|
3979
3980
|
ee ? /* @__PURE__ */ s(
|
|
3980
|
-
|
|
3981
|
+
De,
|
|
3981
3982
|
{
|
|
3982
|
-
...
|
|
3983
|
+
...At,
|
|
3983
3984
|
isMine: !0
|
|
3984
3985
|
}
|
|
3985
3986
|
) : /* @__PURE__ */ s(
|
|
3986
|
-
|
|
3987
|
+
De,
|
|
3987
3988
|
{
|
|
3988
|
-
...
|
|
3989
|
+
...At,
|
|
3989
3990
|
isMine: !1,
|
|
3990
3991
|
isUnlocking: w(c.id),
|
|
3991
3992
|
onUnlockClick: () => y == null ? void 0 : y(c, v)
|
|
3992
3993
|
}
|
|
3993
3994
|
),
|
|
3994
3995
|
!ee && k && /* @__PURE__ */ s(k, {})
|
|
3995
|
-
] }) }) :
|
|
3996
|
+
] }) }) : li(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3996
3997
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3997
3998
|
ee && k && /* @__PURE__ */ s(k, {}),
|
|
3998
3999
|
ee ? /* @__PURE__ */ s(
|
|
3999
|
-
|
|
4000
|
+
De,
|
|
4000
4001
|
{
|
|
4001
|
-
...
|
|
4002
|
+
...Mt,
|
|
4002
4003
|
isMine: !0,
|
|
4003
4004
|
onPreviewClick: () => y ? y(c, v) : void 0
|
|
4004
4005
|
}
|
|
4005
4006
|
) : /* @__PURE__ */ s(
|
|
4006
|
-
|
|
4007
|
+
De,
|
|
4007
4008
|
{
|
|
4008
|
-
...
|
|
4009
|
+
...Mt,
|
|
4009
4010
|
isMine: !1,
|
|
4010
4011
|
isUnlocking: w(c.id),
|
|
4011
4012
|
onUnlockClick: () => y ? y(c, v) : void 0,
|
|
@@ -4015,14 +4016,14 @@ const ji = ({
|
|
|
4015
4016
|
!ee && k && /* @__PURE__ */ s(k, {})
|
|
4016
4017
|
] }),
|
|
4017
4018
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
4018
|
-
|
|
4019
|
+
Oe,
|
|
4019
4020
|
{
|
|
4020
4021
|
message: ae,
|
|
4021
4022
|
renderText: x
|
|
4022
4023
|
}
|
|
4023
4024
|
) })
|
|
4024
|
-
] }) :
|
|
4025
|
-
|
|
4025
|
+
] }) : Js ? /* @__PURE__ */ s(
|
|
4026
|
+
Gi,
|
|
4026
4027
|
{
|
|
4027
4028
|
groupPosition: re,
|
|
4028
4029
|
isMyMessage: ee,
|
|
@@ -4037,15 +4038,15 @@ const ji = ({
|
|
|
4037
4038
|
renderText: x
|
|
4038
4039
|
}
|
|
4039
4040
|
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
4040
|
-
|
|
4041
|
-
|
|
4041
|
+
ge && !Tt && /* @__PURE__ */ s(
|
|
4042
|
+
qe,
|
|
4042
4043
|
{
|
|
4043
4044
|
message: c,
|
|
4044
|
-
hasAttachment:
|
|
4045
|
+
hasAttachment: je,
|
|
4045
4046
|
isMyMessage: ee
|
|
4046
4047
|
}
|
|
4047
4048
|
),
|
|
4048
|
-
|
|
4049
|
+
Ve && /* @__PURE__ */ s(Cn, { poll: Ve }),
|
|
4049
4050
|
V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
4050
4051
|
E,
|
|
4051
4052
|
{
|
|
@@ -4053,34 +4054,34 @@ const ji = ({
|
|
|
4053
4054
|
attachments: V
|
|
4054
4055
|
}
|
|
4055
4056
|
) : null,
|
|
4056
|
-
|
|
4057
|
+
X ? /* @__PURE__ */ s(
|
|
4057
4058
|
N,
|
|
4058
4059
|
{
|
|
4059
4060
|
message: ae,
|
|
4060
4061
|
renderText: x
|
|
4061
4062
|
}
|
|
4062
4063
|
) : /* @__PURE__ */ s(
|
|
4063
|
-
|
|
4064
|
+
Oe,
|
|
4064
4065
|
{
|
|
4065
4066
|
message: ae,
|
|
4066
4067
|
renderText: x
|
|
4067
4068
|
}
|
|
4068
4069
|
),
|
|
4069
|
-
/* @__PURE__ */ s(
|
|
4070
|
+
/* @__PURE__ */ s(et, {})
|
|
4070
4071
|
] }) })
|
|
4071
4072
|
}
|
|
4072
4073
|
),
|
|
4073
|
-
!
|
|
4074
|
-
(!
|
|
4075
|
-
|
|
4074
|
+
!Zs && !It && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
4075
|
+
(!ge || Tt) && /* @__PURE__ */ s(
|
|
4076
|
+
qe,
|
|
4076
4077
|
{
|
|
4077
4078
|
message: c,
|
|
4078
|
-
hasAttachment:
|
|
4079
|
+
hasAttachment: je,
|
|
4079
4080
|
isMyMessage: ee
|
|
4080
4081
|
}
|
|
4081
4082
|
),
|
|
4082
|
-
n &&
|
|
4083
|
-
|
|
4083
|
+
n && ge && /* @__PURE__ */ s(
|
|
4084
|
+
di,
|
|
4084
4085
|
{
|
|
4085
4086
|
selected: D,
|
|
4086
4087
|
onVoteUp: S,
|
|
@@ -4088,8 +4089,8 @@ const ji = ({
|
|
|
4088
4089
|
}
|
|
4089
4090
|
)
|
|
4090
4091
|
] }),
|
|
4091
|
-
/* @__PURE__ */ s(
|
|
4092
|
-
|
|
4092
|
+
/* @__PURE__ */ s(hi, {}),
|
|
4093
|
+
ce && /* @__PURE__ */ s(
|
|
4093
4094
|
J,
|
|
4094
4095
|
{
|
|
4095
4096
|
onClick: d,
|
|
@@ -4102,57 +4103,57 @@ const ji = ({
|
|
|
4102
4103
|
c.id
|
|
4103
4104
|
)
|
|
4104
4105
|
] });
|
|
4105
|
-
},
|
|
4106
|
-
|
|
4107
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
4108
|
-
),
|
|
4109
|
-
const t =
|
|
4110
|
-
return /* @__PURE__ */ s(
|
|
4111
|
-
},
|
|
4106
|
+
}, Wi = B.memo(
|
|
4107
|
+
Yi,
|
|
4108
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : on(e, t)
|
|
4109
|
+
), qi = (e) => {
|
|
4110
|
+
const t = he("CustomMessage");
|
|
4111
|
+
return /* @__PURE__ */ s(Wi, { ...t, ...e });
|
|
4112
|
+
}, Xi = () => {
|
|
4112
4113
|
var n;
|
|
4113
|
-
const { handleDelete: e, message: t } =
|
|
4114
|
+
const { handleDelete: e, message: t } = he("CustomMessageActions");
|
|
4114
4115
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
4115
|
-
|
|
4116
|
+
hs,
|
|
4116
4117
|
{
|
|
4117
4118
|
onClick: e,
|
|
4118
4119
|
"aria-label": "Delete",
|
|
4119
4120
|
title: "Delete",
|
|
4120
4121
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4121
|
-
children: /* @__PURE__ */ s(
|
|
4122
|
+
children: /* @__PURE__ */ s(la, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4122
4123
|
}
|
|
4123
4124
|
);
|
|
4124
|
-
},
|
|
4125
|
-
const { handleFlag: e } =
|
|
4125
|
+
}, Ki = () => {
|
|
4126
|
+
const { handleFlag: e } = he("CustomMessageActions");
|
|
4126
4127
|
return /* @__PURE__ */ s(
|
|
4127
|
-
|
|
4128
|
+
hs,
|
|
4128
4129
|
{
|
|
4129
4130
|
onClick: e,
|
|
4130
4131
|
"aria-label": "Report",
|
|
4131
4132
|
title: "Report",
|
|
4132
4133
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4133
|
-
children: /* @__PURE__ */ s(
|
|
4134
|
+
children: /* @__PURE__ */ s(cs, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4134
4135
|
}
|
|
4135
4136
|
);
|
|
4136
|
-
},
|
|
4137
|
+
}, Zi = () => {
|
|
4137
4138
|
var t;
|
|
4138
|
-
const { message: e } =
|
|
4139
|
-
return ((t = e.metadata) == null ? void 0 : t.custom_type) !==
|
|
4140
|
-
|
|
4139
|
+
const { message: e } = he("CustomMessageActions");
|
|
4140
|
+
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ s(
|
|
4141
|
+
fa,
|
|
4141
4142
|
{
|
|
4142
4143
|
messageActionSet: [
|
|
4143
|
-
{ Component:
|
|
4144
|
-
{ Component:
|
|
4144
|
+
{ Component: Xi, placement: "quick", type: "delete" },
|
|
4145
|
+
{ Component: Ki, placement: "quick", type: "flag" }
|
|
4145
4146
|
]
|
|
4146
4147
|
}
|
|
4147
4148
|
);
|
|
4148
|
-
},
|
|
4149
|
+
}, Ji = (e) => ({
|
|
4149
4150
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4150
|
-
(t) =>
|
|
4151
|
+
(t) => Qe.previewIsLoaded(t) || Qe.previewIsLoading(t)
|
|
4151
4152
|
)
|
|
4152
|
-
}),
|
|
4153
|
-
const { linkPreviewsManager: e } =
|
|
4153
|
+
}), Qi = () => {
|
|
4154
|
+
const { linkPreviewsManager: e } = kn(), { linkPreviews: t } = Sn(
|
|
4154
4155
|
e.state,
|
|
4155
|
-
|
|
4156
|
+
Ji
|
|
4156
4157
|
), n = (r) => {
|
|
4157
4158
|
e.dismissPreview(r);
|
|
4158
4159
|
};
|
|
@@ -4200,9 +4201,9 @@ const ji = ({
|
|
|
4200
4201
|
// past the fold, reachable by scrolling. That residue belongs to whoever
|
|
4201
4202
|
// owns the mobile layout contract, not to this component.
|
|
4202
4203
|
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 overflow-y-auto overscroll-contain", children: t.map((r) => {
|
|
4203
|
-
const i =
|
|
4204
|
+
const i = Qe.previewIsLoading(r);
|
|
4204
4205
|
return /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
4205
|
-
|
|
4206
|
+
it.Composer,
|
|
4206
4207
|
{
|
|
4207
4208
|
title: r.title,
|
|
4208
4209
|
url: r.og_scrape_url,
|
|
@@ -4214,7 +4215,7 @@ const ji = ({
|
|
|
4214
4215
|
) }, r.og_scrape_url);
|
|
4215
4216
|
}) })
|
|
4216
4217
|
) : null;
|
|
4217
|
-
},
|
|
4218
|
+
}, $e = B.createContext(!1), eo = 200, Yo = () => Ce($e), to = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
4218
4219
|
"button",
|
|
4219
4220
|
{
|
|
4220
4221
|
...n,
|
|
@@ -4223,13 +4224,13 @@ const ji = ({
|
|
|
4223
4224
|
disabled: t,
|
|
4224
4225
|
onPointerDown: (a) => a.preventDefault(),
|
|
4225
4226
|
onClick: e,
|
|
4226
|
-
children: /* @__PURE__ */ s(
|
|
4227
|
+
children: /* @__PURE__ */ s(ca, { weight: "bold", className: "size-4" })
|
|
4227
4228
|
}
|
|
4228
|
-
),
|
|
4229
|
-
const e =
|
|
4230
|
-
SendButton: r =
|
|
4231
|
-
AttachmentPreviewList: i =
|
|
4232
|
-
} =
|
|
4229
|
+
), ns = () => {
|
|
4230
|
+
const e = Ce($e), { handleSubmit: t } = En(), n = In(), a = e || !n, {
|
|
4231
|
+
SendButton: r = to,
|
|
4232
|
+
AttachmentPreviewList: i = Tn
|
|
4233
|
+
} = ls("CustomMessageInput");
|
|
4233
4234
|
return (
|
|
4234
4235
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
4235
4236
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -4259,13 +4260,13 @@ const ji = ({
|
|
|
4259
4260
|
"data-dd-privacy": "mask",
|
|
4260
4261
|
children: [
|
|
4261
4262
|
/* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
|
|
4262
|
-
/* @__PURE__ */ s(
|
|
4263
|
-
/* @__PURE__ */ s(
|
|
4263
|
+
/* @__PURE__ */ s(An, {}),
|
|
4264
|
+
/* @__PURE__ */ s(Qi, {}),
|
|
4264
4265
|
/* @__PURE__ */ s(i, {})
|
|
4265
4266
|
] }),
|
|
4266
4267
|
/* @__PURE__ */ h("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
|
|
4267
4268
|
/* @__PURE__ */ s(
|
|
4268
|
-
|
|
4269
|
+
Mn,
|
|
4269
4270
|
{
|
|
4270
4271
|
"aria-disabled": e || void 0,
|
|
4271
4272
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4293,7 +4294,7 @@ const ji = ({
|
|
|
4293
4294
|
}
|
|
4294
4295
|
)
|
|
4295
4296
|
);
|
|
4296
|
-
},
|
|
4297
|
+
}, as = ({
|
|
4297
4298
|
renderActions: e,
|
|
4298
4299
|
renderHeader: t,
|
|
4299
4300
|
renderFooter: n,
|
|
@@ -4302,7 +4303,7 @@ const ji = ({
|
|
|
4302
4303
|
composerInput: i
|
|
4303
4304
|
}) => {
|
|
4304
4305
|
var f;
|
|
4305
|
-
const { channel: l } =
|
|
4306
|
+
const { channel: l } = me(), o = ((f = l == null ? void 0 : l.data) == null ? void 0 : f.frozen) === !0, d = !!i, m = B.useRef(null);
|
|
4306
4307
|
return B.useEffect(() => {
|
|
4307
4308
|
if (!d)
|
|
4308
4309
|
return;
|
|
@@ -4315,7 +4316,7 @@ const ji = ({
|
|
|
4315
4316
|
c = b;
|
|
4316
4317
|
const v = Array.from(
|
|
4317
4318
|
g.querySelectorAll(".str-chat__list")
|
|
4318
|
-
).find((y) => y.scrollHeight > y.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight <
|
|
4319
|
+
).find((y) => y.scrollHeight > y.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight < eo : !1;
|
|
4319
4320
|
g.style.setProperty(
|
|
4320
4321
|
"--messaging-composer-height",
|
|
4321
4322
|
`${b}px`
|
|
@@ -4377,7 +4378,7 @@ const ji = ({
|
|
|
4377
4378
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4378
4379
|
children: [
|
|
4379
4380
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4380
|
-
/* @__PURE__ */ s(
|
|
4381
|
+
/* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Ht, { Input: i ?? ns }) })
|
|
4381
4382
|
]
|
|
4382
4383
|
}
|
|
4383
4384
|
),
|
|
@@ -4396,72 +4397,72 @@ const ji = ({
|
|
|
4396
4397
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4397
4398
|
children: [
|
|
4398
4399
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4399
|
-
/* @__PURE__ */ s(
|
|
4400
|
+
/* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Ht, { Input: ns }) })
|
|
4400
4401
|
]
|
|
4401
4402
|
}
|
|
4402
4403
|
),
|
|
4403
4404
|
n == null ? void 0 : n()
|
|
4404
4405
|
] });
|
|
4405
|
-
},
|
|
4406
|
+
}, so = [
|
|
4406
4407
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
4407
4408
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
4408
|
-
],
|
|
4409
|
+
], no = {
|
|
4409
4410
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4410
4411
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4411
|
-
},
|
|
4412
|
+
}, ao = [
|
|
4412
4413
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
4413
|
-
],
|
|
4414
|
+
], ro = ["SYSTEM_AGE_SAFETY_BLOCKED"], io = {
|
|
4414
4415
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4415
|
-
},
|
|
4416
|
+
}, Ze = "age safety guidelines.", oo = "https://linktr.ee/s/about/contact", rs = (e) => so.includes(e), lo = (e) => ao.includes(e), co = (e) => ro.includes(
|
|
4416
4417
|
e
|
|
4417
|
-
),
|
|
4418
|
+
), uo = (e) => {
|
|
4418
4419
|
var t;
|
|
4419
|
-
return
|
|
4420
|
-
},
|
|
4420
|
+
return co((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4421
|
+
}, mo = (e) => {
|
|
4421
4422
|
var a;
|
|
4422
4423
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4423
|
-
if (
|
|
4424
|
+
if (rs(t))
|
|
4424
4425
|
return {
|
|
4425
4426
|
kind: "dm-agent",
|
|
4426
4427
|
type: t
|
|
4427
4428
|
};
|
|
4428
|
-
if (
|
|
4429
|
+
if (lo(t))
|
|
4429
4430
|
return {
|
|
4430
4431
|
kind: "age-safety",
|
|
4431
4432
|
type: t
|
|
4432
4433
|
};
|
|
4433
4434
|
const n = e.dm_agent_system_type;
|
|
4434
|
-
if (
|
|
4435
|
+
if (rs(n))
|
|
4435
4436
|
return {
|
|
4436
4437
|
kind: "dm-agent",
|
|
4437
4438
|
type: n
|
|
4438
4439
|
};
|
|
4439
|
-
},
|
|
4440
|
-
const t = e.indexOf(
|
|
4440
|
+
}, ho = (e) => {
|
|
4441
|
+
const t = e.indexOf(Ze);
|
|
4441
4442
|
if (t === -1)
|
|
4442
4443
|
return e;
|
|
4443
|
-
const n = t +
|
|
4444
|
+
const n = t + Ze.length;
|
|
4444
4445
|
return /* @__PURE__ */ h(K, { children: [
|
|
4445
4446
|
e.slice(0, t),
|
|
4446
4447
|
/* @__PURE__ */ s(
|
|
4447
4448
|
"a",
|
|
4448
4449
|
{
|
|
4449
|
-
href:
|
|
4450
|
+
href: oo,
|
|
4450
4451
|
target: "_blank",
|
|
4451
4452
|
rel: "noopener noreferrer",
|
|
4452
4453
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
4453
|
-
children:
|
|
4454
|
+
children: Ze
|
|
4454
4455
|
}
|
|
4455
4456
|
),
|
|
4456
4457
|
e.slice(n)
|
|
4457
4458
|
] });
|
|
4458
|
-
},
|
|
4459
|
+
}, fo = (e) => {
|
|
4459
4460
|
var a, r;
|
|
4460
|
-
const t = !
|
|
4461
|
+
const t = !uo(e.message), n = mo(
|
|
4461
4462
|
e.message
|
|
4462
4463
|
);
|
|
4463
4464
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4464
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4465
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || no[n.type];
|
|
4465
4466
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4466
4467
|
/* @__PURE__ */ h(
|
|
4467
4468
|
"div",
|
|
@@ -4471,7 +4472,7 @@ const ji = ({
|
|
|
4471
4472
|
"data-dm-agent-system-type": n.type,
|
|
4472
4473
|
children: [
|
|
4473
4474
|
/* @__PURE__ */ s(
|
|
4474
|
-
|
|
4475
|
+
da,
|
|
4475
4476
|
{
|
|
4476
4477
|
size: 16,
|
|
4477
4478
|
weight: "regular",
|
|
@@ -4483,11 +4484,11 @@ const ji = ({
|
|
|
4483
4484
|
]
|
|
4484
4485
|
}
|
|
4485
4486
|
),
|
|
4486
|
-
!t && /* @__PURE__ */ s(
|
|
4487
|
+
!t && /* @__PURE__ */ s(He, { message: e.message })
|
|
4487
4488
|
] });
|
|
4488
4489
|
}
|
|
4489
4490
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4490
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4491
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || io[n.type];
|
|
4491
4492
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4492
4493
|
/* @__PURE__ */ h(
|
|
4493
4494
|
"div",
|
|
@@ -4497,7 +4498,7 @@ const ji = ({
|
|
|
4497
4498
|
"data-age-safety-system-type": n.type,
|
|
4498
4499
|
children: [
|
|
4499
4500
|
/* @__PURE__ */ s(
|
|
4500
|
-
|
|
4501
|
+
ua,
|
|
4501
4502
|
{
|
|
4502
4503
|
size: 24,
|
|
4503
4504
|
weight: "duotone",
|
|
@@ -4506,11 +4507,11 @@ const ji = ({
|
|
|
4506
4507
|
"data-testid": "age-safety-system-message-icon"
|
|
4507
4508
|
}
|
|
4508
4509
|
),
|
|
4509
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4510
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: ho(i) }) })
|
|
4510
4511
|
]
|
|
4511
4512
|
}
|
|
4512
4513
|
),
|
|
4513
|
-
!t && /* @__PURE__ */ s(
|
|
4514
|
+
!t && /* @__PURE__ */ s(He, { message: e.message })
|
|
4514
4515
|
] });
|
|
4515
4516
|
}
|
|
4516
4517
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -4519,9 +4520,9 @@ const ji = ({
|
|
|
4519
4520
|
/* @__PURE__ */ s("p", { children: e.message.text }),
|
|
4520
4521
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
|
|
4521
4522
|
] }),
|
|
4522
|
-
!t && /* @__PURE__ */ s(
|
|
4523
|
+
!t && /* @__PURE__ */ s(He, { message: e.message })
|
|
4523
4524
|
] });
|
|
4524
|
-
},
|
|
4525
|
+
}, Gs = ot(!1), Je = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4525
4526
|
"animateTransform",
|
|
4526
4527
|
{
|
|
4527
4528
|
attributeName: "transform",
|
|
@@ -4531,17 +4532,17 @@ const ji = ({
|
|
|
4531
4532
|
begin: `${120 * t}ms`,
|
|
4532
4533
|
repeatCount: "indefinite"
|
|
4533
4534
|
}
|
|
4534
|
-
) }),
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
]),
|
|
4535
|
+
) }), go = /* @__PURE__ */ new Set([
|
|
4536
|
+
Ge.Thinking,
|
|
4537
|
+
Ge.Generating,
|
|
4538
|
+
Ge.ExternalSources
|
|
4539
|
+
]), po = ({ threadList: e }) => {
|
|
4539
4540
|
var x, _;
|
|
4540
|
-
const { channel: t, channelConfig: n, thread: a } =
|
|
4541
|
-
if (!e && o &&
|
|
4542
|
-
const b =
|
|
4541
|
+
const { channel: t, channelConfig: n, thread: a } = me(), { client: r } = ke(), { typing: i = {} } = Ln(), { aiState: l } = Rn(t), o = Ce(Gs);
|
|
4542
|
+
if (!e && o && go.has(l)) {
|
|
4543
|
+
const b = bo(t, (x = r.user) == null ? void 0 : x.id);
|
|
4543
4544
|
return /* @__PURE__ */ s(
|
|
4544
|
-
|
|
4545
|
+
is,
|
|
4545
4546
|
{
|
|
4546
4547
|
avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
|
|
4547
4548
|
avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
|
|
@@ -4567,7 +4568,7 @@ const ji = ({
|
|
|
4567
4568
|
return null;
|
|
4568
4569
|
const g = (_ = u[0]) == null ? void 0 : _.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4569
4570
|
return /* @__PURE__ */ s(
|
|
4570
|
-
|
|
4571
|
+
is,
|
|
4571
4572
|
{
|
|
4572
4573
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4573
4574
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4575,7 +4576,7 @@ const ji = ({
|
|
|
4575
4576
|
testId: "typing-indicator"
|
|
4576
4577
|
}
|
|
4577
4578
|
);
|
|
4578
|
-
},
|
|
4579
|
+
}, is = ({
|
|
4579
4580
|
avatarId: e,
|
|
4580
4581
|
avatarName: t,
|
|
4581
4582
|
avatarImage: n,
|
|
@@ -4590,7 +4591,7 @@ const ji = ({
|
|
|
4590
4591
|
},
|
|
4591
4592
|
children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
4592
4593
|
/* @__PURE__ */ s(
|
|
4593
|
-
|
|
4594
|
+
xe,
|
|
4594
4595
|
{
|
|
4595
4596
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
4596
4597
|
id: e,
|
|
@@ -4610,16 +4611,16 @@ const ji = ({
|
|
|
4610
4611
|
height: "13",
|
|
4611
4612
|
overflow: "visible",
|
|
4612
4613
|
children: [
|
|
4613
|
-
/* @__PURE__ */ s(
|
|
4614
|
-
/* @__PURE__ */ s(
|
|
4615
|
-
/* @__PURE__ */ s(
|
|
4614
|
+
/* @__PURE__ */ s(Je, { cx: "4", index: 0 }),
|
|
4615
|
+
/* @__PURE__ */ s(Je, { cx: "16", index: 1 }),
|
|
4616
|
+
/* @__PURE__ */ s(Je, { cx: "28", index: 2 })
|
|
4616
4617
|
]
|
|
4617
4618
|
}
|
|
4618
4619
|
) }) }) }) }) })
|
|
4619
4620
|
] })
|
|
4620
4621
|
}
|
|
4621
4622
|
);
|
|
4622
|
-
function
|
|
4623
|
+
function bo(e, t) {
|
|
4623
4624
|
var a;
|
|
4624
4625
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4625
4626
|
for (const r of Object.values(n)) {
|
|
@@ -4628,7 +4629,7 @@ function go(e, t) {
|
|
|
4628
4629
|
return i;
|
|
4629
4630
|
}
|
|
4630
4631
|
}
|
|
4631
|
-
const
|
|
4632
|
+
const vo = () => null, xo = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
4632
4633
|
"div",
|
|
4633
4634
|
{
|
|
4634
4635
|
className: C("flex items-center justify-center h-full", e),
|
|
@@ -4671,12 +4672,12 @@ const po = () => null, bo = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
4671
4672
|
t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
|
|
4672
4673
|
]
|
|
4673
4674
|
}
|
|
4674
|
-
),
|
|
4675
|
-
/* @__PURE__ */ s(
|
|
4675
|
+
), Ue = B.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
4676
|
+
/* @__PURE__ */ s(xo, { className: "w-6 h-6" }),
|
|
4676
4677
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4677
4678
|
] }) }));
|
|
4678
|
-
|
|
4679
|
-
const
|
|
4679
|
+
Ue.displayName = "LoadingState";
|
|
4680
|
+
const _o = ({
|
|
4680
4681
|
onBack: e,
|
|
4681
4682
|
showBackButton: t,
|
|
4682
4683
|
renderMessageInputActions: n,
|
|
@@ -4703,10 +4704,10 @@ const vo = ({
|
|
|
4703
4704
|
onParticipantNameClick: O,
|
|
4704
4705
|
composerInput: $
|
|
4705
4706
|
}) => {
|
|
4706
|
-
const { channel: z } =
|
|
4707
|
+
const { channel: z } = me(), D = z.state.messages.some(
|
|
4707
4708
|
(I) => I.type !== "deleted"
|
|
4708
4709
|
), S = p ? /* @__PURE__ */ s(B.Fragment, { children: p() }, "lt-channel-banner") : null, T = /* @__PURE__ */ s(
|
|
4709
|
-
|
|
4710
|
+
Ea,
|
|
4710
4711
|
{
|
|
4711
4712
|
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%)]",
|
|
4712
4713
|
onBack: e,
|
|
@@ -4725,10 +4726,10 @@ const vo = ({
|
|
|
4725
4726
|
renderChannelActions: w,
|
|
4726
4727
|
onParticipantNameClick: O
|
|
4727
4728
|
}
|
|
4728
|
-
), E =
|
|
4729
|
+
), E = q(
|
|
4729
4730
|
(I) => {
|
|
4730
|
-
const { message: k } =
|
|
4731
|
-
|
|
4731
|
+
const { message: k } = he("ChannelView"), P = /* @__PURE__ */ s(
|
|
4732
|
+
qi,
|
|
4732
4733
|
{
|
|
4733
4734
|
...I,
|
|
4734
4735
|
chatbotVotingEnabled: b,
|
|
@@ -4740,15 +4741,15 @@ const vo = ({
|
|
|
4740
4741
|
[b, y, M]
|
|
4741
4742
|
);
|
|
4742
4743
|
return /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s(
|
|
4743
|
-
|
|
4744
|
+
Pn,
|
|
4744
4745
|
{
|
|
4745
4746
|
overrides: {
|
|
4746
4747
|
Message: E,
|
|
4747
|
-
MessageActions:
|
|
4748
|
+
MessageActions: Zi,
|
|
4748
4749
|
UnreadMessagesNotification: () => null,
|
|
4749
4750
|
UnreadMessagesSeparator: () => null
|
|
4750
4751
|
},
|
|
4751
|
-
children: /* @__PURE__ */ s(
|
|
4752
|
+
children: /* @__PURE__ */ s(On, { children: $ ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4752
4753
|
/* @__PURE__ */ h(
|
|
4753
4754
|
"div",
|
|
4754
4755
|
{
|
|
@@ -4759,7 +4760,7 @@ const vo = ({
|
|
|
4759
4760
|
S
|
|
4760
4761
|
] }) }),
|
|
4761
4762
|
/* @__PURE__ */ s(
|
|
4762
|
-
|
|
4763
|
+
Gt,
|
|
4763
4764
|
{
|
|
4764
4765
|
head: D ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
|
|
4765
4766
|
T,
|
|
@@ -4774,7 +4775,7 @@ const vo = ({
|
|
|
4774
4775
|
"lt-channel-message-list"
|
|
4775
4776
|
),
|
|
4776
4777
|
/* @__PURE__ */ s(
|
|
4777
|
-
|
|
4778
|
+
as,
|
|
4778
4779
|
{
|
|
4779
4780
|
...n && {
|
|
4780
4781
|
renderActions: () => n == null ? void 0 : n(z)
|
|
@@ -4800,7 +4801,7 @@ const vo = ({
|
|
|
4800
4801
|
S
|
|
4801
4802
|
] }) }),
|
|
4802
4803
|
/* @__PURE__ */ s(
|
|
4803
|
-
|
|
4804
|
+
Gt,
|
|
4804
4805
|
{
|
|
4805
4806
|
head: D ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
|
|
4806
4807
|
T,
|
|
@@ -4816,7 +4817,7 @@ const vo = ({
|
|
|
4816
4817
|
),
|
|
4817
4818
|
r ? /* @__PURE__ */ s(B.Fragment, { children: r(z) }, "lt-channel-conversation-footer") : null,
|
|
4818
4819
|
/* @__PURE__ */ s(
|
|
4819
|
-
|
|
4820
|
+
as,
|
|
4820
4821
|
{
|
|
4821
4822
|
...n && {
|
|
4822
4823
|
renderActions: () => n == null ? void 0 : n(z)
|
|
@@ -4831,7 +4832,7 @@ const vo = ({
|
|
|
4831
4832
|
] }) })
|
|
4832
4833
|
}
|
|
4833
4834
|
) });
|
|
4834
|
-
},
|
|
4835
|
+
}, Ys = B.memo(
|
|
4835
4836
|
({
|
|
4836
4837
|
channel: e,
|
|
4837
4838
|
onBack: t,
|
|
@@ -4842,7 +4843,7 @@ const vo = ({
|
|
|
4842
4843
|
onLeaveConversation: l,
|
|
4843
4844
|
onBlockParticipant: o,
|
|
4844
4845
|
className: d,
|
|
4845
|
-
CustomChannelEmptyState: m =
|
|
4846
|
+
CustomChannelEmptyState: m = vo,
|
|
4846
4847
|
showDeleteConversation: f = !0,
|
|
4847
4848
|
onDeleteConversationClick: u,
|
|
4848
4849
|
onBlockParticipantClick: g,
|
|
@@ -4868,7 +4869,7 @@ const vo = ({
|
|
|
4868
4869
|
onParticipantNameClick: P,
|
|
4869
4870
|
composerInput: G
|
|
4870
4871
|
}) => {
|
|
4871
|
-
const W =
|
|
4872
|
+
const W = q(
|
|
4872
4873
|
async (J, j, N) => {
|
|
4873
4874
|
var Q;
|
|
4874
4875
|
const A = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, U = v && !A, te = {
|
|
@@ -4880,10 +4881,10 @@ const vo = ({
|
|
|
4880
4881
|
...w
|
|
4881
4882
|
}
|
|
4882
4883
|
}
|
|
4883
|
-
},
|
|
4884
|
+
}, X = {
|
|
4884
4885
|
...N,
|
|
4885
4886
|
...U && { skip_push: !0 }
|
|
4886
|
-
}, V = await e.sendMessage(te,
|
|
4887
|
+
}, V = await e.sendMessage(te, X);
|
|
4887
4888
|
return y == null || y(V), V;
|
|
4888
4889
|
},
|
|
4889
4890
|
[e, v, w, y]
|
|
@@ -4895,7 +4896,7 @@ const vo = ({
|
|
|
4895
4896
|
const j = (N) => {
|
|
4896
4897
|
const A = N.target, U = A == null ? void 0 : A.closest("a[href]"), te = U == null ? void 0 : U.getAttribute("href");
|
|
4897
4898
|
if (!te) return;
|
|
4898
|
-
const
|
|
4899
|
+
const X = U == null ? void 0 : U.closest("[data-message-id]"), V = X == null ? void 0 : X.getAttribute("data-message-id"), Q = V ? e.state.messages.find((ae) => ae.id === V) : void 0;
|
|
4899
4900
|
S(te, Q);
|
|
4900
4901
|
};
|
|
4901
4902
|
return J.addEventListener("click", j), () => J.removeEventListener("click", j);
|
|
@@ -4907,20 +4908,20 @@ const vo = ({
|
|
|
4907
4908
|
"messaging-channel-view h-full flex flex-col",
|
|
4908
4909
|
d
|
|
4909
4910
|
),
|
|
4910
|
-
children: /* @__PURE__ */ s(
|
|
4911
|
-
|
|
4911
|
+
children: /* @__PURE__ */ s(Gs.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
|
|
4912
|
+
Dn,
|
|
4912
4913
|
{
|
|
4913
4914
|
channel: e,
|
|
4914
|
-
MessageSystem:
|
|
4915
|
+
MessageSystem: fo,
|
|
4915
4916
|
EmptyStateIndicator: m,
|
|
4916
|
-
LoadingIndicator:
|
|
4917
|
-
DateSeparator:
|
|
4918
|
-
TypingIndicator:
|
|
4917
|
+
LoadingIndicator: Ue,
|
|
4918
|
+
DateSeparator: Ia,
|
|
4919
|
+
TypingIndicator: po,
|
|
4919
4920
|
doSendMessageRequest: W,
|
|
4920
4921
|
...T ? { SendButton: T } : {},
|
|
4921
4922
|
...E ? { AttachmentPreviewList: E } : {},
|
|
4922
4923
|
children: /* @__PURE__ */ s(
|
|
4923
|
-
|
|
4924
|
+
_o,
|
|
4924
4925
|
{
|
|
4925
4926
|
onBack: t,
|
|
4926
4927
|
showBackButton: n,
|
|
@@ -4956,8 +4957,8 @@ const vo = ({
|
|
|
4956
4957
|
);
|
|
4957
4958
|
}
|
|
4958
4959
|
);
|
|
4959
|
-
|
|
4960
|
-
const
|
|
4960
|
+
Ys.displayName = "ChannelView";
|
|
4961
|
+
const Ne = B.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
4961
4962
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4962
4963
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4963
4964
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4971,8 +4972,8 @@ const we = B.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4971
4972
|
}
|
|
4972
4973
|
)
|
|
4973
4974
|
] }) }));
|
|
4974
|
-
|
|
4975
|
-
const
|
|
4975
|
+
Ne.displayName = "ErrorState";
|
|
4976
|
+
const Wo = ({
|
|
4976
4977
|
capabilities: e = {},
|
|
4977
4978
|
renderMessageInputActions: t,
|
|
4978
4979
|
renderConversationFooter: n,
|
|
@@ -5004,7 +5005,7 @@ const Ho = ({
|
|
|
5004
5005
|
refreshConnection: D,
|
|
5005
5006
|
service: S,
|
|
5006
5007
|
debug: T
|
|
5007
|
-
} =
|
|
5008
|
+
} = ga(), [E, I] = F(null), [k, P] = F(null), [G, W] = F(!1), { showDeleteConversation: Z = !0 } = e, J = H(l);
|
|
5008
5009
|
J.current = l;
|
|
5009
5010
|
const j = H(a);
|
|
5010
5011
|
j.current = a;
|
|
@@ -5013,16 +5014,16 @@ const Ho = ({
|
|
|
5013
5014
|
A.current = E;
|
|
5014
5015
|
}, [E]), Y(() => {
|
|
5015
5016
|
if (!L || !O) return;
|
|
5016
|
-
const
|
|
5017
|
-
if (!
|
|
5018
|
-
const V = `${
|
|
5017
|
+
const X = L.userID;
|
|
5018
|
+
if (!X) return;
|
|
5019
|
+
const V = `${X}::${i}`;
|
|
5019
5020
|
if (N.current === V) return;
|
|
5020
5021
|
N.current = V;
|
|
5021
5022
|
const Q = () => {
|
|
5022
5023
|
N.current === V && (N.current = null);
|
|
5023
5024
|
};
|
|
5024
5025
|
(async () => {
|
|
5025
|
-
var
|
|
5026
|
+
var Me, Le;
|
|
5026
5027
|
try {
|
|
5027
5028
|
T && console.log(
|
|
5028
5029
|
"[MessagingShell] Loading initial conversation with:",
|
|
@@ -5031,20 +5032,20 @@ const Ho = ({
|
|
|
5031
5032
|
const re = await L.queryChannels(
|
|
5032
5033
|
{
|
|
5033
5034
|
type: "messaging",
|
|
5034
|
-
members: { $eq: [
|
|
5035
|
+
members: { $eq: [X, i] }
|
|
5035
5036
|
},
|
|
5036
5037
|
{},
|
|
5037
5038
|
{ limit: 1 }
|
|
5038
5039
|
);
|
|
5039
5040
|
if (re.length > 0) {
|
|
5040
|
-
I(re[0]), P(null), (
|
|
5041
|
+
I(re[0]), P(null), (Me = j.current) == null || Me.call(j, re[0]), T && console.log(
|
|
5041
5042
|
"[MessagingShell] Initial conversation loaded:",
|
|
5042
5043
|
re[0].id
|
|
5043
5044
|
);
|
|
5044
5045
|
return;
|
|
5045
5046
|
}
|
|
5046
|
-
const
|
|
5047
|
-
if (!
|
|
5047
|
+
const ce = J.current;
|
|
5048
|
+
if (!ce || !S) {
|
|
5048
5049
|
Q(), P("No conversation found with this account"), T && console.log(
|
|
5049
5050
|
"[MessagingShell] No conversation found for:",
|
|
5050
5051
|
i
|
|
@@ -5053,11 +5054,11 @@ const Ho = ({
|
|
|
5053
5054
|
}
|
|
5054
5055
|
try {
|
|
5055
5056
|
const ie = await S.startChannelWithParticipant({
|
|
5056
|
-
id:
|
|
5057
|
-
name:
|
|
5058
|
-
phone:
|
|
5057
|
+
id: ce.id,
|
|
5058
|
+
name: ce.name,
|
|
5059
|
+
phone: ce.phone
|
|
5059
5060
|
});
|
|
5060
|
-
I(ie), P(null), (
|
|
5061
|
+
I(ie), P(null), (Le = j.current) == null || Le.call(j, ie), T && console.log(
|
|
5061
5062
|
"[MessagingShell] Channel created and loaded:",
|
|
5062
5063
|
ie.id
|
|
5063
5064
|
);
|
|
@@ -5077,18 +5078,18 @@ const Ho = ({
|
|
|
5077
5078
|
}, [i, L, O, S, T]);
|
|
5078
5079
|
const U = H(r);
|
|
5079
5080
|
U.current = r;
|
|
5080
|
-
const te =
|
|
5081
|
-
var
|
|
5082
|
-
I(null), W(!0), (
|
|
5081
|
+
const te = q(() => {
|
|
5082
|
+
var X;
|
|
5083
|
+
I(null), W(!0), (X = U.current) == null || X.call(U);
|
|
5083
5084
|
}, []);
|
|
5084
|
-
return $ ? /* @__PURE__ */ s(
|
|
5085
|
-
|
|
5085
|
+
return $ ? /* @__PURE__ */ s(Ue, {}) : z ? /* @__PURE__ */ s(Ne, { message: z, onBack: D }) : !O || !L ? /* @__PURE__ */ s(
|
|
5086
|
+
Ne,
|
|
5086
5087
|
{
|
|
5087
5088
|
message: "Not connected to messaging service",
|
|
5088
5089
|
onBack: D
|
|
5089
5090
|
}
|
|
5090
|
-
) : k ? /* @__PURE__ */ s(
|
|
5091
|
-
|
|
5091
|
+
) : k ? /* @__PURE__ */ s(Ne, { message: k }) : G && !E ? /* @__PURE__ */ s(Ne, { message: "Conversation ended" }) : E ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
5092
|
+
Ys,
|
|
5092
5093
|
{
|
|
5093
5094
|
channel: E,
|
|
5094
5095
|
renderMessageInputActions: t,
|
|
@@ -5113,15 +5114,15 @@ const Ho = ({
|
|
|
5113
5114
|
composerInput: M
|
|
5114
5115
|
},
|
|
5115
5116
|
E.id
|
|
5116
|
-
) }) }) : /* @__PURE__ */ s(
|
|
5117
|
+
) }) }) : /* @__PURE__ */ s(Ue, {});
|
|
5117
5118
|
};
|
|
5118
|
-
function
|
|
5119
|
+
function wo(e) {
|
|
5119
5120
|
const t = e.state.pending_messages;
|
|
5120
5121
|
if (t != null && t.length)
|
|
5121
5122
|
for (const n of t)
|
|
5122
5123
|
e.state.addMessageSorted(n.message);
|
|
5123
5124
|
}
|
|
5124
|
-
const
|
|
5125
|
+
const Ws = B.createContext({
|
|
5125
5126
|
selectedChannel: void 0,
|
|
5126
5127
|
onChannelSelect: () => {
|
|
5127
5128
|
},
|
|
@@ -5129,18 +5130,18 @@ const Ys = B.createContext({
|
|
|
5129
5130
|
renderMessagePreview: void 0,
|
|
5130
5131
|
channelPreview: void 0,
|
|
5131
5132
|
viewerLanguage: void 0
|
|
5132
|
-
}),
|
|
5133
|
+
}), No = Ws.Provider, yo = () => B.useContext(Ws), Co = (e, t) => {
|
|
5133
5134
|
const n = new Date(
|
|
5134
5135
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
5135
5136
|
), r = new Date(
|
|
5136
5137
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
5137
5138
|
).getTime() - n.getTime();
|
|
5138
5139
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
5139
|
-
},
|
|
5140
|
+
}, ko = (e) => {
|
|
5140
5141
|
const t = /* @__PURE__ */ new Date();
|
|
5141
5142
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5142
5143
|
return "Just now";
|
|
5143
|
-
const a =
|
|
5144
|
+
const a = Co(e, t);
|
|
5144
5145
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5145
5146
|
hour: "numeric",
|
|
5146
5147
|
minute: "2-digit",
|
|
@@ -5150,7 +5151,7 @@ const Ys = B.createContext({
|
|
|
5150
5151
|
month: "short",
|
|
5151
5152
|
year: "2-digit"
|
|
5152
5153
|
});
|
|
5153
|
-
},
|
|
5154
|
+
}, qs = B.memo(
|
|
5154
5155
|
(e) => {
|
|
5155
5156
|
var $, z, D;
|
|
5156
5157
|
const { channel: t, unread: n } = e, {
|
|
@@ -5160,7 +5161,7 @@ const Ys = B.createContext({
|
|
|
5160
5161
|
channelPreview: l,
|
|
5161
5162
|
renderMessagePreview: o,
|
|
5162
5163
|
viewerLanguage: d
|
|
5163
|
-
} =
|
|
5164
|
+
} = yo(), { client: m } = ke(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = gs(t);
|
|
5164
5165
|
if (l)
|
|
5165
5166
|
return /* @__PURE__ */ s(
|
|
5166
5167
|
l,
|
|
@@ -5177,11 +5178,11 @@ const Ys = B.createContext({
|
|
|
5177
5178
|
}, c = (S) => {
|
|
5178
5179
|
const T = S.key === "Enter" || S.key === " ", E = S.repeat;
|
|
5179
5180
|
!T || E || (S.preventDefault(), g());
|
|
5180
|
-
}, x =
|
|
5181
|
+
}, x = ps(
|
|
5181
5182
|
($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
|
|
5182
5183
|
m == null ? void 0 : m.userID,
|
|
5183
5184
|
t == null ? void 0 : t.type
|
|
5184
|
-
), _ =
|
|
5185
|
+
), _ = bs(x == null ? void 0 : x.user), b = (z = x == null ? void 0 : x.user) == null ? void 0 : z.image, p = (() => {
|
|
5185
5186
|
var T;
|
|
5186
5187
|
const S = (T = t == null ? void 0 : t.state) == null ? void 0 : T.messages;
|
|
5187
5188
|
if (S != null && S.length) {
|
|
@@ -5190,15 +5191,15 @@ const Ys = B.createContext({
|
|
|
5190
5191
|
}
|
|
5191
5192
|
})(), w = (() => {
|
|
5192
5193
|
var k;
|
|
5193
|
-
const S =
|
|
5194
|
+
const S = xs({
|
|
5194
5195
|
message: p,
|
|
5195
5196
|
viewerLanguage: d
|
|
5196
5197
|
}), { custom_type: T, attachment_content_type: E } = (p == null ? void 0 : p.metadata) || {};
|
|
5197
|
-
if (T ===
|
|
5198
|
+
if (T === oe.TIP)
|
|
5198
5199
|
return S || "Sent a tip";
|
|
5199
|
-
if (T ===
|
|
5200
|
+
if (T === oe.PAID)
|
|
5200
5201
|
return S || "Sent a message";
|
|
5201
|
-
if (T ===
|
|
5202
|
+
if (T === oe.ATTACHMENT) {
|
|
5202
5203
|
if (E === "text")
|
|
5203
5204
|
return "🔒 Sent a locked message";
|
|
5204
5205
|
if (E === "media")
|
|
@@ -5207,7 +5208,7 @@ const Ys = B.createContext({
|
|
|
5207
5208
|
if (S) return S;
|
|
5208
5209
|
const I = (k = p == null ? void 0 : p.attachments) == null ? void 0 : k[0];
|
|
5209
5210
|
return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5210
|
-
})(), y = p != null && p.created_at ?
|
|
5211
|
+
})(), y = p != null && p.created_at ? ko(new Date(p.created_at)) : "", M = p ? ze(p) : !1, L = o ? o(p, w) : `${M ? "✨ " : ""}${w}`, O = n ?? 0;
|
|
5211
5212
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5212
5213
|
channelId: t == null ? void 0 : t.id,
|
|
5213
5214
|
isSelected: f,
|
|
@@ -5231,7 +5232,7 @@ const Ys = B.createContext({
|
|
|
5231
5232
|
"data-dd-privacy": "mask",
|
|
5232
5233
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
|
|
5233
5234
|
/* @__PURE__ */ s(
|
|
5234
|
-
|
|
5235
|
+
xe,
|
|
5235
5236
|
{
|
|
5236
5237
|
id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || t.id || "unknown",
|
|
5237
5238
|
name: _,
|
|
@@ -5266,18 +5267,18 @@ const Ys = B.createContext({
|
|
|
5266
5267
|
);
|
|
5267
5268
|
}
|
|
5268
5269
|
);
|
|
5269
|
-
|
|
5270
|
-
const
|
|
5270
|
+
qs.displayName = "CustomChannelPreview";
|
|
5271
|
+
const So = { last_message_at: -1 }, Eo = B.memo(
|
|
5271
5272
|
({
|
|
5272
5273
|
onChannelSelect: e,
|
|
5273
5274
|
selectedChannel: t,
|
|
5274
5275
|
filters: n,
|
|
5275
5276
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5276
5277
|
channelRenderFilterFn: r,
|
|
5277
|
-
sort: i =
|
|
5278
|
+
sort: i = So,
|
|
5278
5279
|
className: l,
|
|
5279
5280
|
customEmptyStateIndicator: o,
|
|
5280
|
-
channelListPaginator: d =
|
|
5281
|
+
channelListPaginator: d = Fn,
|
|
5281
5282
|
channelPreview: m,
|
|
5282
5283
|
renderMessagePreview: f,
|
|
5283
5284
|
viewerLanguage: u,
|
|
@@ -5290,10 +5291,10 @@ const Co = { last_message_at: -1 }, ko = B.memo(
|
|
|
5290
5291
|
}) => {
|
|
5291
5292
|
const v = B.useRef(0);
|
|
5292
5293
|
v.current++;
|
|
5293
|
-
const { debug: w = !1 } =
|
|
5294
|
+
const { debug: w = !1 } = ct(), y = B.useCallback(
|
|
5294
5295
|
(L) => {
|
|
5295
5296
|
for (const O of L)
|
|
5296
|
-
|
|
5297
|
+
wo(O);
|
|
5297
5298
|
return r ? r(L) : L;
|
|
5298
5299
|
},
|
|
5299
5300
|
[r]
|
|
@@ -5328,8 +5329,8 @@ const Co = { last_message_at: -1 }, ko = B.memo(
|
|
|
5328
5329
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5329
5330
|
l
|
|
5330
5331
|
),
|
|
5331
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5332
|
-
|
|
5332
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(No, { value: M, children: /* @__PURE__ */ s(
|
|
5333
|
+
zn,
|
|
5333
5334
|
{
|
|
5334
5335
|
filters: n,
|
|
5335
5336
|
sort: i,
|
|
@@ -5343,7 +5344,7 @@ const Co = { last_message_at: -1 }, ko = B.memo(
|
|
|
5343
5344
|
onAddedToChannel: b,
|
|
5344
5345
|
onChannelUpdated: p,
|
|
5345
5346
|
Paginator: d,
|
|
5346
|
-
Preview:
|
|
5347
|
+
Preview: qs,
|
|
5347
5348
|
EmptyStateIndicator: o
|
|
5348
5349
|
},
|
|
5349
5350
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5352,11 +5353,11 @@ const Co = { last_message_at: -1 }, ko = B.memo(
|
|
|
5352
5353
|
);
|
|
5353
5354
|
}
|
|
5354
5355
|
);
|
|
5355
|
-
|
|
5356
|
-
const
|
|
5356
|
+
Eo.displayName = "ChannelList";
|
|
5357
|
+
const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Io = {
|
|
5357
5358
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5358
5359
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5359
|
-
},
|
|
5360
|
+
}, To = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5360
5361
|
"span",
|
|
5361
5362
|
{
|
|
5362
5363
|
"aria-hidden": "true",
|
|
@@ -5366,12 +5367,12 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5366
5367
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5367
5368
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5368
5369
|
transformOrigin: "center",
|
|
5369
|
-
backgroundColor:
|
|
5370
|
-
WebkitMask:
|
|
5371
|
-
mask:
|
|
5370
|
+
backgroundColor: Io[e],
|
|
5371
|
+
WebkitMask: os,
|
|
5372
|
+
mask: os
|
|
5372
5373
|
}
|
|
5373
5374
|
}
|
|
5374
|
-
),
|
|
5375
|
+
), Ao = {
|
|
5375
5376
|
sent: {
|
|
5376
5377
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5377
5378
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5396,17 +5397,17 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5396
5397
|
r
|
|
5397
5398
|
),
|
|
5398
5399
|
style: {
|
|
5399
|
-
...
|
|
5400
|
+
...Ao[e],
|
|
5400
5401
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5401
5402
|
isolation: "isolate"
|
|
5402
5403
|
},
|
|
5403
5404
|
children: [
|
|
5404
5405
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5405
5406
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5406
|
-
n && /* @__PURE__ */ s(
|
|
5407
|
+
n && /* @__PURE__ */ s(To, { variant: e })
|
|
5407
5408
|
]
|
|
5408
5409
|
}
|
|
5409
|
-
),
|
|
5410
|
+
), Mo = ({
|
|
5410
5411
|
text: e,
|
|
5411
5412
|
tail: t,
|
|
5412
5413
|
header: n,
|
|
@@ -5420,10 +5421,10 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5420
5421
|
header: n,
|
|
5421
5422
|
className: a
|
|
5422
5423
|
}
|
|
5423
|
-
),
|
|
5424
|
-
Sent:
|
|
5425
|
-
Received:
|
|
5426
|
-
},
|
|
5424
|
+
), Lo = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Xs, { variant: "sent", text: e, tail: t, className: n }), qo = {
|
|
5425
|
+
Sent: Lo,
|
|
5426
|
+
Received: Mo
|
|
5427
|
+
}, Ro = ({
|
|
5427
5428
|
question: e,
|
|
5428
5429
|
onClick: t,
|
|
5429
5430
|
loading: n = !1,
|
|
@@ -5445,7 +5446,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5445
5446
|
),
|
|
5446
5447
|
children: e
|
|
5447
5448
|
}
|
|
5448
|
-
),
|
|
5449
|
+
), Xo = ({
|
|
5449
5450
|
faqs: e,
|
|
5450
5451
|
onFaqClick: t,
|
|
5451
5452
|
loadingFaqId: n,
|
|
@@ -5454,10 +5455,10 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5454
5455
|
avatarImage: i,
|
|
5455
5456
|
avatarName: l
|
|
5456
5457
|
}) => {
|
|
5457
|
-
const o = e
|
|
5458
|
+
const o = ha(e);
|
|
5458
5459
|
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
5459
5460
|
(i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
|
|
5460
|
-
|
|
5461
|
+
xe,
|
|
5461
5462
|
{
|
|
5462
5463
|
id: l || "account",
|
|
5463
5464
|
name: l || "Account",
|
|
@@ -5474,7 +5475,7 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5474
5475
|
children: [
|
|
5475
5476
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5476
5477
|
o.map((d) => /* @__PURE__ */ s(
|
|
5477
|
-
|
|
5478
|
+
Ro,
|
|
5478
5479
|
{
|
|
5479
5480
|
question: d.question,
|
|
5480
5481
|
onClick: () => t(d.id),
|
|
@@ -5488,42 +5489,42 @@ const is = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5488
5489
|
] }) });
|
|
5489
5490
|
};
|
|
5490
5491
|
export {
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5492
|
+
ws as A,
|
|
5493
|
+
ht as B,
|
|
5494
|
+
vo as C,
|
|
5495
|
+
bs as D,
|
|
5496
|
+
Yo as E,
|
|
5497
|
+
Xo as F,
|
|
5498
|
+
ti as G,
|
|
5499
|
+
Aa as H,
|
|
5500
|
+
ga as I,
|
|
5501
|
+
it as L,
|
|
5502
|
+
Ho as M,
|
|
5503
|
+
_e as a,
|
|
5504
|
+
xe as b,
|
|
5505
|
+
Eo as c,
|
|
5506
|
+
Ys as d,
|
|
5507
|
+
Go as e,
|
|
5508
|
+
Ro as f,
|
|
5509
|
+
le as g,
|
|
5510
|
+
De as h,
|
|
5511
|
+
we as i,
|
|
5512
|
+
qo as j,
|
|
5513
|
+
di as k,
|
|
5514
|
+
jo as l,
|
|
5515
|
+
Wo as m,
|
|
5516
|
+
hr as n,
|
|
5517
|
+
ue as o,
|
|
5518
|
+
dr as p,
|
|
5519
|
+
ko as q,
|
|
5520
|
+
ve as r,
|
|
5521
|
+
mr as s,
|
|
5522
|
+
xs as t,
|
|
5523
|
+
Cs as u,
|
|
5524
|
+
va as v,
|
|
5525
|
+
nr as w,
|
|
5526
|
+
Ma as x,
|
|
5527
|
+
ps as y,
|
|
5528
|
+
mt as z
|
|
5528
5529
|
};
|
|
5529
|
-
//# sourceMappingURL=index-
|
|
5530
|
+
//# sourceMappingURL=index-DtD5bLEl.js.map
|