@linktr.ee/messaging-react 3.35.0-rc-1786106245 → 3.35.0-rc-1786109913
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-B2nozSiR.js → Card-B4qcC_0B.js} +2 -2
- package/dist/{Card-B2nozSiR.js.map → Card-B4qcC_0B.js.map} +1 -1
- package/dist/{Card-BuQjxYVW.cjs → Card-CjM2b_y5.cjs} +2 -2
- package/dist/{Card-BuQjxYVW.cjs.map → Card-CjM2b_y5.cjs.map} +1 -1
- package/dist/{index-B-fh4Zxu.cjs → index-AQNn2p5e.cjs} +3 -2
- package/dist/{index-B-fh4Zxu.cjs.map → index-AQNn2p5e.cjs.map} +1 -1
- package/dist/{index-DAY8iAgG.js → index-CrdAtOBl.js} +290 -288
- package/dist/{index-DAY8iAgG.js.map → index-CrdAtOBl.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/RichCard/RichCard.test.tsx +39 -3
- package/src/components/RichCard/RichCardImages.tsx +19 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as s, jsxs as g, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import z, { createContext as Ve, useContext as _e, useCallback as q, useState as U, useRef as H, useEffect as Y, useId as tn, useMemo as ae, Suspense as sn } from "react";
|
|
3
3
|
import { StreamChatService as nn } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as an, LinkPreviewsManager as tt } from "stream-chat";
|
|
5
5
|
import { Chat as rn, useChannelStateContext as fe, useChatContext as Te, DateSeparator as on, useMessageContext as ge, MessageStatus as ln, MessageErrorIcon as st, MessageText as Be, areMessageUIPropsEqual as cn, useMessageReminder as dn, useComponentContext as ls, Attachment as un, EditMessageModal as mn, MessageBlocked as hn, MessageBouncePrompt as fn, MessageDeleted as gn, MessageIsThreadReplyInChannelButtonIndicator as pn, MessageRepliesCountButton as bn, ReminderNotification as vn, StreamedMessageText as xn, messageHasAttachments as wn, messageHasReactions as _n, isDateSeparatorMessage as yn, isMessageBlocked as Nn, isMessageBounced as kn, MessageBounceModal as Cn, Poll as Sn, useMessageComposer as En, useStateStore as In, MessageInput as Gt, useMessageInputContext as Tn, useMessageComposerHasSendableData as An, AttachmentPreviewList as Rn, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as We, AIStates as qe, useTypingContext as Dn, useAIState as On, Channel as Pn, WithComponents as zn, Window as Fn, MessageList as Yt, ChannelList as Bn, InfiniteScroll as $n } from "stream-chat-react";
|
|
@@ -39,7 +39,7 @@ const fs = Ve({
|
|
|
39
39
|
serviceConfig: !!n,
|
|
40
40
|
capabilities: Object.keys(r)
|
|
41
41
|
});
|
|
42
|
-
const [d, m] = U(null), [h, u] = U(null), [
|
|
42
|
+
const [d, m] = U(null), [h, u] = U(null), [f, c] = U(!1), [x, w] = U(!1), [p, v] = U(null), b = H(!1), N = H(null), _ = H(n);
|
|
43
43
|
_.current = n;
|
|
44
44
|
const A = H(i);
|
|
45
45
|
A.current = i;
|
|
@@ -84,26 +84,26 @@ const fs = Ve({
|
|
|
84
84
|
renderCount: E,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const
|
|
87
|
+
const F = new nn({
|
|
88
88
|
...B,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: A.current,
|
|
91
91
|
client: $
|
|
92
92
|
});
|
|
93
|
-
N.current =
|
|
93
|
+
N.current = F, m(F), o("✅ SERVICE SET", {
|
|
94
94
|
renderCount: E,
|
|
95
|
-
serviceInstance: !!
|
|
95
|
+
serviceInstance: !!F
|
|
96
96
|
});
|
|
97
97
|
}, [a, $, l]);
|
|
98
98
|
const O = H(null);
|
|
99
99
|
Y(() => {
|
|
100
|
-
var B,
|
|
100
|
+
var B, F;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
102
102
|
hasService: !!d,
|
|
103
103
|
hasUser: !!t,
|
|
104
104
|
userId: t == null ? void 0 : t.id,
|
|
105
105
|
isConnecting: b.current,
|
|
106
|
-
isConnected:
|
|
106
|
+
isConnected: f,
|
|
107
107
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
108
108
|
}), l)
|
|
109
109
|
return;
|
|
@@ -115,7 +115,7 @@ const fs = Ve({
|
|
|
115
115
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
if (((B = O.current) == null ? void 0 : B.serviceId) === d && ((
|
|
118
|
+
if (((B = O.current) == null ? void 0 : B.serviceId) === d && ((F = O.current) == null ? void 0 : F.userId) === t.id) {
|
|
119
119
|
o(
|
|
120
120
|
"⚠️ USER CONNECTION SKIPPED",
|
|
121
121
|
"Already connected this user with this service"
|
|
@@ -140,11 +140,11 @@ const fs = Ve({
|
|
|
140
140
|
} finally {
|
|
141
141
|
w(!1), b.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
142
142
|
userId: t.id,
|
|
143
|
-
isConnected:
|
|
143
|
+
isConnected: f
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
})();
|
|
147
|
-
}, [d, t, o,
|
|
147
|
+
}, [d, t, o, f, l]), Y(() => {
|
|
148
148
|
const E = $;
|
|
149
149
|
return () => {
|
|
150
150
|
var B;
|
|
@@ -175,10 +175,10 @@ const fs = Ve({
|
|
|
175
175
|
w(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
}, [d, t, o, l]), P =
|
|
178
|
+
}, [d, t, o, l]), P = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!d,
|
|
180
180
|
hasClient: !!h,
|
|
181
|
-
isConnected:
|
|
181
|
+
isConnected: f,
|
|
182
182
|
isLoading: x,
|
|
183
183
|
hasError: !!p,
|
|
184
184
|
capabilitiesKeys: Object.keys(r)
|
|
@@ -193,7 +193,7 @@ const fs = Ve({
|
|
|
193
193
|
// path's `client`/`isLoading`/`error` (from connectUser) must not leak
|
|
194
194
|
// through if the same provider previously attempted an apiKey connect.
|
|
195
195
|
client: l ?? h,
|
|
196
|
-
isConnected: l ? !0 :
|
|
196
|
+
isConnected: l ? !0 : f,
|
|
197
197
|
isLoading: l ? !1 : x,
|
|
198
198
|
error: l ? null : p,
|
|
199
199
|
capabilities: r,
|
|
@@ -203,7 +203,7 @@ const fs = Ve({
|
|
|
203
203
|
d,
|
|
204
204
|
h,
|
|
205
205
|
l,
|
|
206
|
-
|
|
206
|
+
f,
|
|
207
207
|
x,
|
|
208
208
|
p,
|
|
209
209
|
r,
|
|
@@ -331,7 +331,7 @@ const ye = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: l = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36,
|
|
334
|
+
const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, f = 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(
|
|
335
335
|
"img",
|
|
336
336
|
{
|
|
337
337
|
src: t,
|
|
@@ -349,7 +349,7 @@ const ye = ({
|
|
|
349
349
|
children: o
|
|
350
350
|
}
|
|
351
351
|
) });
|
|
352
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ g(
|
|
353
353
|
"div",
|
|
354
354
|
{
|
|
355
355
|
className: k(
|
|
@@ -383,7 +383,7 @@ const ye = ({
|
|
|
383
383
|
style: {
|
|
384
384
|
...c,
|
|
385
385
|
...l && {
|
|
386
|
-
borderWidth: `${
|
|
386
|
+
borderWidth: `${f}px`,
|
|
387
387
|
borderStyle: "solid",
|
|
388
388
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
389
389
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
@@ -409,7 +409,7 @@ const ye = ({
|
|
|
409
409
|
logLabel: h = "useChannelModerationActions"
|
|
410
410
|
}) => {
|
|
411
411
|
var P;
|
|
412
|
-
const { service: u, debug:
|
|
412
|
+
const { service: u, debug: f } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [w, p] = U(!1), [v, b] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = x && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
|
|
413
413
|
return Y(() => {
|
|
414
414
|
if (!x || !u || !c) {
|
|
415
415
|
p(!1), b(null);
|
|
@@ -441,7 +441,7 @@ const ye = ({
|
|
|
441
441
|
handleLeaveConversation: async () => {
|
|
442
442
|
var S;
|
|
443
443
|
if (!N) {
|
|
444
|
-
l == null || l(),
|
|
444
|
+
l == null || l(), f && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
|
|
445
445
|
try {
|
|
446
446
|
const T = ((S = e._client) == null ? void 0 : S.userID) ?? null;
|
|
447
447
|
await e.hide(T, !1), r && await r(e), m == null || m();
|
|
@@ -455,7 +455,7 @@ const ye = ({
|
|
|
455
455
|
handleBlockUser: async () => {
|
|
456
456
|
var S, T, E;
|
|
457
457
|
if (!(A || !u)) {
|
|
458
|
-
o == null || o(),
|
|
458
|
+
o == null || o(), f && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
|
|
459
459
|
try {
|
|
460
460
|
await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
461
461
|
} catch (B) {
|
|
@@ -468,7 +468,7 @@ const ye = ({
|
|
|
468
468
|
handleUnblockUser: async () => {
|
|
469
469
|
var S, T, E;
|
|
470
470
|
if (!(A || !u)) {
|
|
471
|
-
o == null || o(),
|
|
471
|
+
o == null || o(), f && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
|
|
472
472
|
try {
|
|
473
473
|
await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
|
|
474
474
|
} catch (B) {
|
|
@@ -513,7 +513,7 @@ const ye = ({
|
|
|
513
513
|
customChannelActions: h,
|
|
514
514
|
triggerClassName: u
|
|
515
515
|
}) => {
|
|
516
|
-
const [
|
|
516
|
+
const [f, c] = U(!1), x = H(null), w = tn(), p = q(() => c(!1), []), {
|
|
517
517
|
isParticipantBlocked: v,
|
|
518
518
|
isCheckingBlockedStatus: b,
|
|
519
519
|
isLeaving: N,
|
|
@@ -526,7 +526,7 @@ const ye = ({
|
|
|
526
526
|
channel: e,
|
|
527
527
|
participant: t,
|
|
528
528
|
showBlockParticipant: a,
|
|
529
|
-
enabled:
|
|
529
|
+
enabled: f,
|
|
530
530
|
onLeaveConversation: i,
|
|
531
531
|
onBlockParticipant: l,
|
|
532
532
|
onDeleteConversationClick: o,
|
|
@@ -536,7 +536,7 @@ const ye = ({
|
|
|
536
536
|
logLabel: "ChannelActionsMenu"
|
|
537
537
|
});
|
|
538
538
|
return Y(() => {
|
|
539
|
-
if (!
|
|
539
|
+
if (!f) return;
|
|
540
540
|
const O = (P) => {
|
|
541
541
|
x.current && !x.current.contains(P.target) && c(!1);
|
|
542
542
|
}, C = (P) => {
|
|
@@ -545,15 +545,15 @@ const ye = ({
|
|
|
545
545
|
return document.addEventListener("mousedown", O), document.addEventListener("keydown", C), () => {
|
|
546
546
|
document.removeEventListener("mousedown", O), document.removeEventListener("keydown", C);
|
|
547
547
|
};
|
|
548
|
-
}, [
|
|
549
|
-
/* @__PURE__ */
|
|
548
|
+
}, [f]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ g("div", { ref: x, className: "relative", children: [
|
|
549
|
+
/* @__PURE__ */ g(
|
|
550
550
|
"button",
|
|
551
551
|
{
|
|
552
552
|
className: u,
|
|
553
553
|
type: "button",
|
|
554
554
|
"aria-haspopup": "true",
|
|
555
|
-
"aria-expanded":
|
|
556
|
-
"aria-controls":
|
|
555
|
+
"aria-expanded": f,
|
|
556
|
+
"aria-controls": f ? w : void 0,
|
|
557
557
|
onClick: () => c((O) => !O),
|
|
558
558
|
children: [
|
|
559
559
|
/* @__PURE__ */ s(Un, { className: "size-5 text-black/90" }),
|
|
@@ -561,7 +561,7 @@ const ye = ({
|
|
|
561
561
|
]
|
|
562
562
|
}
|
|
563
563
|
),
|
|
564
|
-
|
|
564
|
+
f && /* @__PURE__ */ s(
|
|
565
565
|
"div",
|
|
566
566
|
{
|
|
567
567
|
id: w,
|
|
@@ -570,8 +570,8 @@ const ye = ({
|
|
|
570
570
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
571
571
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
572
572
|
),
|
|
573
|
-
children: /* @__PURE__ */
|
|
574
|
-
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ g("ul", { className: "flex flex-col gap-1", children: [
|
|
574
|
+
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ g(
|
|
575
575
|
Ne,
|
|
576
576
|
{
|
|
577
577
|
onClick: A,
|
|
@@ -586,11 +586,11 @@ const ye = ({
|
|
|
586
586
|
a && /* @__PURE__ */ s("li", { children: b ? (
|
|
587
587
|
// Block status not yet resolved — show a disabled placeholder
|
|
588
588
|
// so a premature click can't act on a stale block state.
|
|
589
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ g(Ne, { disabled: !0, "aria-busy": !0, children: [
|
|
590
590
|
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
591
591
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
592
592
|
] })
|
|
593
|
-
) : v ? /* @__PURE__ */
|
|
593
|
+
) : v ? /* @__PURE__ */ g(
|
|
594
594
|
Ne,
|
|
595
595
|
{
|
|
596
596
|
onClick: L,
|
|
@@ -601,7 +601,7 @@ const ye = ({
|
|
|
601
601
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
602
602
|
]
|
|
603
603
|
}
|
|
604
|
-
) : /* @__PURE__ */
|
|
604
|
+
) : /* @__PURE__ */ g(
|
|
605
605
|
Ne,
|
|
606
606
|
{
|
|
607
607
|
onClick: R,
|
|
@@ -613,7 +613,7 @@ const ye = ({
|
|
|
613
613
|
]
|
|
614
614
|
}
|
|
615
615
|
) }),
|
|
616
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */
|
|
616
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ g(Ne, { variant: "danger", onClick: D, children: [
|
|
617
617
|
/* @__PURE__ */ s(cs, { className: "h-5 w-5" }),
|
|
618
618
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
619
619
|
] }) }),
|
|
@@ -635,13 +635,13 @@ const ye = ({
|
|
|
635
635
|
onDeleteConversationClick: m,
|
|
636
636
|
onBlockParticipantClick: h,
|
|
637
637
|
onReportParticipantClick: u,
|
|
638
|
-
customChannelActions:
|
|
638
|
+
customChannelActions: f,
|
|
639
639
|
renderChannelActions: c,
|
|
640
640
|
showChannelInfo: x = !0,
|
|
641
641
|
onParticipantNameClick: w
|
|
642
642
|
}) => {
|
|
643
643
|
var C, P, S, T;
|
|
644
|
-
const { channel: p } = fe(), { client: v } = Te(), b =
|
|
644
|
+
const { channel: p } = fe(), { client: v } = Te(), b = z.useMemo(
|
|
645
645
|
() => {
|
|
646
646
|
var E;
|
|
647
647
|
return ps(
|
|
@@ -660,7 +660,7 @@ const ye = ({
|
|
|
660
660
|
E
|
|
661
661
|
);
|
|
662
662
|
}
|
|
663
|
-
}, O = /* @__PURE__ */
|
|
663
|
+
}, O = /* @__PURE__ */ g(J, { children: [
|
|
664
664
|
/* @__PURE__ */ s(
|
|
665
665
|
ye,
|
|
666
666
|
{
|
|
@@ -679,9 +679,9 @@ const ye = ({
|
|
|
679
679
|
"relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
|
|
680
680
|
D ? "pl-3 pr-2" : "px-3"
|
|
681
681
|
),
|
|
682
|
-
children: /* @__PURE__ */
|
|
682
|
+
children: /* @__PURE__ */ g("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
683
683
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
|
|
684
|
-
D && /* @__PURE__ */
|
|
684
|
+
D && /* @__PURE__ */ g("span", { className: "ml-2 flex gap-1", children: [
|
|
685
685
|
R && /* @__PURE__ */ s(
|
|
686
686
|
"span",
|
|
687
687
|
{
|
|
@@ -718,7 +718,7 @@ const ye = ({
|
|
|
718
718
|
"@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
|
|
719
719
|
e
|
|
720
720
|
),
|
|
721
|
-
children: /* @__PURE__ */
|
|
721
|
+
children: /* @__PURE__ */ g("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
|
|
722
722
|
/* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
|
|
723
723
|
"button",
|
|
724
724
|
{
|
|
@@ -743,7 +743,7 @@ const ye = ({
|
|
|
743
743
|
children: O
|
|
744
744
|
}
|
|
745
745
|
) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: O }) }),
|
|
746
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ g("div", { className: "flex items-start justify-end gap-2", children: [
|
|
747
747
|
a && /* @__PURE__ */ s(
|
|
748
748
|
"button",
|
|
749
749
|
{
|
|
@@ -777,7 +777,7 @@ const ye = ({
|
|
|
777
777
|
onDeleteConversationClick: m,
|
|
778
778
|
onBlockParticipantClick: h,
|
|
779
779
|
onReportParticipantClick: u,
|
|
780
|
-
customChannelActions:
|
|
780
|
+
customChannelActions: f,
|
|
781
781
|
triggerClassName: Xe
|
|
782
782
|
}
|
|
783
783
|
))
|
|
@@ -888,7 +888,7 @@ function Va(e) {
|
|
|
888
888
|
return t !== "document" ? Ua[t] : ja[ws(e)];
|
|
889
889
|
}
|
|
890
890
|
function we(e, t) {
|
|
891
|
-
return
|
|
891
|
+
return z.createElement(Va(e), t);
|
|
892
892
|
}
|
|
893
893
|
const Ha = (e) => {
|
|
894
894
|
var t, n;
|
|
@@ -905,23 +905,23 @@ const Ha = (e) => {
|
|
|
905
905
|
muted: d = !1,
|
|
906
906
|
onContainerClick: m
|
|
907
907
|
}) => {
|
|
908
|
-
const h = ue(t), u = H(null),
|
|
908
|
+
const h = ue(t), u = H(null), f = H(null), c = H(null), x = H(r), [w, p] = U(a), [v, b] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
|
|
909
909
|
D(!1), p(!0);
|
|
910
910
|
}, []), B = q((y) => {
|
|
911
|
-
const I =
|
|
911
|
+
const I = f.current;
|
|
912
912
|
if (!I) return 0;
|
|
913
913
|
const W = I.getBoundingClientRect();
|
|
914
914
|
return Math.max(
|
|
915
915
|
0,
|
|
916
916
|
Math.min(1, (Ha(y) - W.left) / W.width)
|
|
917
917
|
);
|
|
918
|
-
}, []),
|
|
918
|
+
}, []), F = q((y) => {
|
|
919
919
|
const I = u.current;
|
|
920
920
|
I && I.duration && (I.currentTime = y * I.duration);
|
|
921
921
|
}, []), j = (y) => {
|
|
922
922
|
y.stopPropagation(), _(!0);
|
|
923
923
|
const I = B(y);
|
|
924
|
-
b(I),
|
|
924
|
+
b(I), F(I);
|
|
925
925
|
};
|
|
926
926
|
Y(() => {
|
|
927
927
|
r !== void 0 && r !== x.current && (x.current = r, p(r));
|
|
@@ -945,14 +945,14 @@ const Ha = (e) => {
|
|
|
945
945
|
}, [w]), Y(() => {
|
|
946
946
|
if (!N) return;
|
|
947
947
|
const y = (W) => b(B(W)), I = (W) => {
|
|
948
|
-
_(!1),
|
|
948
|
+
_(!1), F(B(W));
|
|
949
949
|
};
|
|
950
950
|
return window.addEventListener("mousemove", y), window.addEventListener("mouseup", I), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("touchend", I), () => {
|
|
951
951
|
window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", I);
|
|
952
952
|
};
|
|
953
|
-
}, [N, B,
|
|
953
|
+
}, [N, B, F]);
|
|
954
954
|
const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(v * 100);
|
|
955
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ g(
|
|
956
956
|
"div",
|
|
957
957
|
{
|
|
958
958
|
role: "button",
|
|
@@ -1064,13 +1064,13 @@ const Ha = (e) => {
|
|
|
1064
1064
|
"aria-valuemin": 0,
|
|
1065
1065
|
"aria-valuemax": 100,
|
|
1066
1066
|
tabIndex: 0,
|
|
1067
|
-
ref:
|
|
1067
|
+
ref: f,
|
|
1068
1068
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1069
1069
|
onMouseDown: j,
|
|
1070
1070
|
onTouchStart: j,
|
|
1071
1071
|
onClick: (y) => y.stopPropagation(),
|
|
1072
1072
|
onKeyDown: (y) => {
|
|
1073
|
-
y.key === "ArrowRight" &&
|
|
1073
|
+
y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
|
|
1074
1074
|
},
|
|
1075
1075
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1076
1076
|
"div",
|
|
@@ -1081,7 +1081,7 @@ const Ha = (e) => {
|
|
|
1081
1081
|
) })
|
|
1082
1082
|
}
|
|
1083
1083
|
) }),
|
|
1084
|
-
l && /* @__PURE__ */
|
|
1084
|
+
l && /* @__PURE__ */ g("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
|
|
1085
1085
|
/* @__PURE__ */ s(
|
|
1086
1086
|
"button",
|
|
1087
1087
|
{
|
|
@@ -1094,7 +1094,7 @@ const Ha = (e) => {
|
|
|
1094
1094
|
children: w ? /* @__PURE__ */ s(ta, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(at, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1095
1095
|
}
|
|
1096
1096
|
),
|
|
1097
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ g(
|
|
1098
1098
|
"div",
|
|
1099
1099
|
{
|
|
1100
1100
|
role: "slider",
|
|
@@ -1103,7 +1103,7 @@ const Ha = (e) => {
|
|
|
1103
1103
|
"aria-valuemin": 0,
|
|
1104
1104
|
"aria-valuemax": 100,
|
|
1105
1105
|
tabIndex: 0,
|
|
1106
|
-
ref:
|
|
1106
|
+
ref: f,
|
|
1107
1107
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1108
1108
|
onMouseDown: j,
|
|
1109
1109
|
onTouchStart: j,
|
|
@@ -1111,7 +1111,7 @@ const Ha = (e) => {
|
|
|
1111
1111
|
onMouseEnter: () => R(!0),
|
|
1112
1112
|
onMouseLeave: () => R(!1),
|
|
1113
1113
|
onKeyDown: (y) => {
|
|
1114
|
-
y.key === "ArrowRight" &&
|
|
1114
|
+
y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
|
|
1115
1115
|
},
|
|
1116
1116
|
children: [
|
|
1117
1117
|
/* @__PURE__ */ s(
|
|
@@ -1235,37 +1235,37 @@ const Ha = (e) => {
|
|
|
1235
1235
|
rootRef: h,
|
|
1236
1236
|
"data-testid": u
|
|
1237
1237
|
}) => {
|
|
1238
|
-
const
|
|
1239
|
-
return /* @__PURE__ */
|
|
1238
|
+
const f = e === "dark", c = f ? n ?? a : n ?? "", x = f && !n;
|
|
1239
|
+
return /* @__PURE__ */ g(
|
|
1240
1240
|
"div",
|
|
1241
1241
|
{
|
|
1242
1242
|
ref: h,
|
|
1243
1243
|
"data-testid": u,
|
|
1244
1244
|
className: k(
|
|
1245
1245
|
"relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
1246
|
-
|
|
1246
|
+
f ? "bg-[#1e2330]" : "bg-white"
|
|
1247
1247
|
),
|
|
1248
1248
|
children: [
|
|
1249
1249
|
d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
1250
1250
|
m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
|
|
1251
1251
|
t,
|
|
1252
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ g("div", { className: "px-4 pb-3 pt-3", children: [
|
|
1253
1253
|
c.trim() !== "" && /* @__PURE__ */ s(
|
|
1254
1254
|
"p",
|
|
1255
1255
|
{
|
|
1256
1256
|
className: k("mb-0.5 truncate text-base font-medium", {
|
|
1257
|
-
"text-black": !
|
|
1258
|
-
"text-white/30":
|
|
1259
|
-
"text-white":
|
|
1257
|
+
"text-black": !f,
|
|
1258
|
+
"text-white/30": f && x,
|
|
1259
|
+
"text-white": f && !x
|
|
1260
1260
|
}),
|
|
1261
1261
|
children: c
|
|
1262
1262
|
}
|
|
1263
1263
|
),
|
|
1264
|
-
/* @__PURE__ */
|
|
1264
|
+
/* @__PURE__ */ g("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1265
1265
|
we(r, {
|
|
1266
1266
|
className: k(
|
|
1267
1267
|
"size-5 shrink-0",
|
|
1268
|
-
|
|
1268
|
+
f ? "text-white/55" : "text-black/55"
|
|
1269
1269
|
),
|
|
1270
1270
|
weight: "regular"
|
|
1271
1271
|
}),
|
|
@@ -1274,7 +1274,7 @@ const Ha = (e) => {
|
|
|
1274
1274
|
{
|
|
1275
1275
|
className: k(
|
|
1276
1276
|
"text-xs font-medium",
|
|
1277
|
-
|
|
1277
|
+
f ? "text-white/55" : "text-black/55"
|
|
1278
1278
|
),
|
|
1279
1279
|
children: i
|
|
1280
1280
|
}
|
|
@@ -1309,7 +1309,7 @@ function Za(e) {
|
|
|
1309
1309
|
return e ? "text-white/20" : "text-black/20";
|
|
1310
1310
|
}
|
|
1311
1311
|
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
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__ */
|
|
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__ */ g(z.Fragment, { children: [
|
|
1313
1313
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1314
1314
|
"img",
|
|
1315
1315
|
{
|
|
@@ -1324,7 +1324,7 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1324
1324
|
children: /* @__PURE__ */ s(sa, { className: `size-12 ${Za(t)}` })
|
|
1325
1325
|
}
|
|
1326
1326
|
) }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1327
|
+
/* @__PURE__ */ g("div", { className: "px-3 pb-3", children: [
|
|
1328
1328
|
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${qa(t)}`, children: n }),
|
|
1329
1329
|
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Xa(t)}`, children: a }),
|
|
1330
1330
|
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ka(t)}`, children: d })
|
|
@@ -1371,7 +1371,7 @@ const Qa = ({
|
|
|
1371
1371
|
},
|
|
1372
1372
|
disabled: n,
|
|
1373
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",
|
|
1374
|
-
children: n ? /* @__PURE__ */ s(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */
|
|
1374
|
+
children: n ? /* @__PURE__ */ s(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ g(z.Fragment, { children: [
|
|
1375
1375
|
/* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
|
|
1376
1376
|
"Download"
|
|
1377
1377
|
] })
|
|
@@ -1379,10 +1379,10 @@ const Qa = ({
|
|
|
1379
1379
|
);
|
|
1380
1380
|
};
|
|
1381
1381
|
function ht(e) {
|
|
1382
|
-
var u,
|
|
1382
|
+
var u, f, c, x;
|
|
1383
1383
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1384
1384
|
(w) => w.type === "video" && w.asset_url
|
|
1385
|
-
), n = (
|
|
1385
|
+
), n = (f = e.attachments) == null ? void 0 : f.find(
|
|
1386
1386
|
(w) => w.type === "image" && w.image_url
|
|
1387
1387
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1388
1388
|
(w) => w.type === "audio" && w.asset_url
|
|
@@ -1461,7 +1461,7 @@ const Cs = ({
|
|
|
1461
1461
|
isMyMessage: t = !1
|
|
1462
1462
|
}) => {
|
|
1463
1463
|
const n = mt(e), a = ht(e);
|
|
1464
|
-
return !n && !a ? null : /* @__PURE__ */
|
|
1464
|
+
return !n && !a ? null : /* @__PURE__ */ g("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: [
|
|
1465
1465
|
!t && e.user && /* @__PURE__ */ s(
|
|
1466
1466
|
ye,
|
|
1467
1467
|
{
|
|
@@ -1542,7 +1542,7 @@ const Cs = ({
|
|
|
1542
1542
|
"data-testid": m
|
|
1543
1543
|
}) => {
|
|
1544
1544
|
const h = t != null && t !== "", u = l ?? or[ir(e)][a];
|
|
1545
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ g(
|
|
1546
1546
|
"div",
|
|
1547
1547
|
{
|
|
1548
1548
|
"data-testid": m,
|
|
@@ -1628,7 +1628,7 @@ const Cs = ({
|
|
|
1628
1628
|
mimeType: t,
|
|
1629
1629
|
filename: n,
|
|
1630
1630
|
items: a
|
|
1631
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], dr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */
|
|
1631
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], dr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
1632
1632
|
/* @__PURE__ */ s(
|
|
1633
1633
|
"audio",
|
|
1634
1634
|
{
|
|
@@ -1654,7 +1654,7 @@ const Cs = ({
|
|
|
1654
1654
|
const m = Le(e), h = e === "composer" && !!d, u = cr({ src: t, mimeType: n, filename: a, items: r });
|
|
1655
1655
|
if (u.length === 0)
|
|
1656
1656
|
return null;
|
|
1657
|
-
const
|
|
1657
|
+
const f = o ?? (u.length > 1 ? "none" : "metadata");
|
|
1658
1658
|
return /* @__PURE__ */ s(
|
|
1659
1659
|
Ae,
|
|
1660
1660
|
{
|
|
@@ -1666,7 +1666,7 @@ const Cs = ({
|
|
|
1666
1666
|
dr,
|
|
1667
1667
|
{
|
|
1668
1668
|
item: c,
|
|
1669
|
-
preload:
|
|
1669
|
+
preload: f,
|
|
1670
1670
|
trailingAction: (
|
|
1671
1671
|
// Composer only supports a single attachment, so the
|
|
1672
1672
|
// dismiss control sits on the only player.
|
|
@@ -1757,7 +1757,7 @@ const xr = {
|
|
|
1757
1757
|
weight: "regular"
|
|
1758
1758
|
})
|
|
1759
1759
|
}
|
|
1760
|
-
), u = /* @__PURE__ */
|
|
1760
|
+
), u = /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
|
|
1761
1761
|
/* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
|
|
1762
1762
|
m ? /* @__PURE__ */ s(
|
|
1763
1763
|
"p",
|
|
@@ -1769,7 +1769,7 @@ const xr = {
|
|
|
1769
1769
|
children: m
|
|
1770
1770
|
}
|
|
1771
1771
|
) : null
|
|
1772
|
-
] }),
|
|
1772
|
+
] }), f = i ? /* @__PURE__ */ g(
|
|
1773
1773
|
"button",
|
|
1774
1774
|
{
|
|
1775
1775
|
type: "button",
|
|
@@ -1784,12 +1784,12 @@ const xr = {
|
|
|
1784
1784
|
u
|
|
1785
1785
|
]
|
|
1786
1786
|
}
|
|
1787
|
-
) : /* @__PURE__ */
|
|
1787
|
+
) : /* @__PURE__ */ g(J, { children: [
|
|
1788
1788
|
h,
|
|
1789
1789
|
u
|
|
1790
1790
|
] });
|
|
1791
|
-
return /* @__PURE__ */
|
|
1792
|
-
|
|
1791
|
+
return /* @__PURE__ */ g("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
1792
|
+
f,
|
|
1793
1793
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1794
1794
|
] });
|
|
1795
1795
|
};
|
|
@@ -1848,7 +1848,7 @@ const yr = ({
|
|
|
1848
1848
|
onClick: m,
|
|
1849
1849
|
onDismiss: h
|
|
1850
1850
|
}) => {
|
|
1851
|
-
const u = Le(e),
|
|
1851
|
+
const u = Le(e), f = e === "composer" && !!h, c = yr({
|
|
1852
1852
|
src: t,
|
|
1853
1853
|
filename: n,
|
|
1854
1854
|
fileSize: a,
|
|
@@ -1889,7 +1889,7 @@ const yr = ({
|
|
|
1889
1889
|
item: p,
|
|
1890
1890
|
index: v,
|
|
1891
1891
|
onActivate: x,
|
|
1892
|
-
trailingAction:
|
|
1892
|
+
trailingAction: f && v === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
|
|
1893
1893
|
},
|
|
1894
1894
|
`${p.src}-${v}`
|
|
1895
1895
|
)) })
|
|
@@ -1904,7 +1904,7 @@ const yr = ({
|
|
|
1904
1904
|
onNext: t,
|
|
1905
1905
|
prevLabel: n = "Previous",
|
|
1906
1906
|
nextLabel: a = "Next"
|
|
1907
|
-
}) => /* @__PURE__ */
|
|
1907
|
+
}) => /* @__PURE__ */ g(J, { children: [
|
|
1908
1908
|
/* @__PURE__ */ s(
|
|
1909
1909
|
"button",
|
|
1910
1910
|
{
|
|
@@ -1942,7 +1942,7 @@ const yr = ({
|
|
|
1942
1942
|
}));
|
|
1943
1943
|
},
|
|
1944
1944
|
[o, e, t, l]
|
|
1945
|
-
), h = r ?? n !== "pill",
|
|
1945
|
+
), h = r ?? n !== "pill", f = { className: k(
|
|
1946
1946
|
n === "pill" ? "size-4" : "size-5",
|
|
1947
1947
|
"shrink-0"
|
|
1948
1948
|
), weight: "bold" };
|
|
@@ -1986,7 +1986,7 @@ const yr = ({
|
|
|
1986
1986
|
className: "mes-media-viewer__action",
|
|
1987
1987
|
children: o ? /* @__PURE__ */ s(xe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1988
1988
|
}
|
|
1989
|
-
) : /* @__PURE__ */
|
|
1989
|
+
) : /* @__PURE__ */ g(
|
|
1990
1990
|
"button",
|
|
1991
1991
|
{
|
|
1992
1992
|
type: "button",
|
|
@@ -2005,7 +2005,7 @@ const yr = ({
|
|
|
2005
2005
|
weight: "bold",
|
|
2006
2006
|
"aria-hidden": !0
|
|
2007
2007
|
}
|
|
2008
|
-
) : /* @__PURE__ */ s(Se, { ...
|
|
2008
|
+
) : /* @__PURE__ */ s(Se, { ...f, "aria-hidden": !0 }),
|
|
2009
2009
|
h ? null : a
|
|
2010
2010
|
]
|
|
2011
2011
|
}
|
|
@@ -2046,7 +2046,7 @@ const yr = ({
|
|
|
2046
2046
|
}) => {
|
|
2047
2047
|
const o = H(null), d = H(null);
|
|
2048
2048
|
return Y(() => {
|
|
2049
|
-
var
|
|
2049
|
+
var f;
|
|
2050
2050
|
const u = o.current;
|
|
2051
2051
|
if (u) {
|
|
2052
2052
|
if (e) {
|
|
@@ -2060,7 +2060,7 @@ const yr = ({
|
|
|
2060
2060
|
else
|
|
2061
2061
|
u.setAttribute("open", "");
|
|
2062
2062
|
const c = typeof document < "u" ? document.activeElement : null;
|
|
2063
|
-
return (
|
|
2063
|
+
return (f = d.current) == null || f.focus(), () => {
|
|
2064
2064
|
if (u.open)
|
|
2065
2065
|
if (typeof u.close == "function")
|
|
2066
2066
|
try {
|
|
@@ -2090,7 +2090,7 @@ const yr = ({
|
|
|
2090
2090
|
// `jsx-a11y` rules below don't model `<dialog>` as interactive, so
|
|
2091
2091
|
// we silence them locally with the rationale captured here.
|
|
2092
2092
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2093
|
-
/* @__PURE__ */
|
|
2093
|
+
/* @__PURE__ */ g(
|
|
2094
2094
|
"dialog",
|
|
2095
2095
|
{
|
|
2096
2096
|
ref: o,
|
|
@@ -2104,9 +2104,9 @@ const yr = ({
|
|
|
2104
2104
|
u.target === o.current && t();
|
|
2105
2105
|
},
|
|
2106
2106
|
children: [
|
|
2107
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ g("div", { className: "mes-media-viewer__chrome", children: [
|
|
2108
2108
|
a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
|
|
2109
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ g("div", { className: "mes-media-viewer__actions", children: [
|
|
2110
2110
|
r,
|
|
2111
2111
|
/* @__PURE__ */ s(
|
|
2112
2112
|
"button",
|
|
@@ -2139,7 +2139,7 @@ const yr = ({
|
|
|
2139
2139
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
|
|
2140
2140
|
[o]
|
|
2141
2141
|
);
|
|
2142
|
-
return o ? /* @__PURE__ */
|
|
2142
|
+
return o ? /* @__PURE__ */ g(
|
|
2143
2143
|
vt,
|
|
2144
2144
|
{
|
|
2145
2145
|
open: e,
|
|
@@ -2200,14 +2200,14 @@ const yr = ({
|
|
|
2200
2200
|
}) => {
|
|
2201
2201
|
const i = e.length;
|
|
2202
2202
|
if (i === 0) return null;
|
|
2203
|
-
const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u,
|
|
2203
|
+
const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u, f) => {
|
|
2204
2204
|
var x;
|
|
2205
2205
|
const c = k(
|
|
2206
2206
|
Ir,
|
|
2207
2207
|
"h-full w-full",
|
|
2208
2208
|
(x = Tr[l.length]) == null ? void 0 : x[u]
|
|
2209
2209
|
);
|
|
2210
|
-
return t ? /* @__PURE__ */
|
|
2210
|
+
return t ? /* @__PURE__ */ g(
|
|
2211
2211
|
"button",
|
|
2212
2212
|
{
|
|
2213
2213
|
type: "button",
|
|
@@ -2216,13 +2216,13 @@ const yr = ({
|
|
|
2216
2216
|
className: k(c, "cursor-zoom-in"),
|
|
2217
2217
|
children: [
|
|
2218
2218
|
h.content,
|
|
2219
|
-
|
|
2219
|
+
f
|
|
2220
2220
|
]
|
|
2221
2221
|
},
|
|
2222
2222
|
u
|
|
2223
|
-
) : /* @__PURE__ */
|
|
2223
|
+
) : /* @__PURE__ */ g("div", { className: c, children: [
|
|
2224
2224
|
h.content,
|
|
2225
|
-
|
|
2225
|
+
f
|
|
2226
2226
|
] }, u);
|
|
2227
2227
|
};
|
|
2228
2228
|
let m;
|
|
@@ -2252,7 +2252,7 @@ const yr = ({
|
|
|
2252
2252
|
),
|
|
2253
2253
|
children: l.map((h, u) => d(h, u))
|
|
2254
2254
|
}
|
|
2255
|
-
) : l.length === 3 ? /* @__PURE__ */
|
|
2255
|
+
) : l.length === 3 ? /* @__PURE__ */ g(
|
|
2256
2256
|
"div",
|
|
2257
2257
|
{
|
|
2258
2258
|
className: k(
|
|
@@ -2280,11 +2280,11 @@ const yr = ({
|
|
|
2280
2280
|
r
|
|
2281
2281
|
),
|
|
2282
2282
|
children: l.map((h, u) => {
|
|
2283
|
-
const
|
|
2283
|
+
const f = o > 0 && u === l.length - 1;
|
|
2284
2284
|
return d(
|
|
2285
2285
|
h,
|
|
2286
2286
|
u,
|
|
2287
|
-
|
|
2287
|
+
f ? /* @__PURE__ */ g("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
2288
2288
|
"+",
|
|
2289
2289
|
o
|
|
2290
2290
|
] }) : null
|
|
@@ -2340,7 +2340,7 @@ const yr = ({
|
|
|
2340
2340
|
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Me(
|
|
2341
2341
|
r
|
|
2342
2342
|
);
|
|
2343
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ g("div", { className: "relative w-fit", children: [
|
|
2344
2344
|
/* @__PURE__ */ s(
|
|
2345
2345
|
"button",
|
|
2346
2346
|
{
|
|
@@ -2373,7 +2373,7 @@ const yr = ({
|
|
|
2373
2373
|
)
|
|
2374
2374
|
] });
|
|
2375
2375
|
}, Pr = 326 / 246, zr = (e) => {
|
|
2376
|
-
const t = e == null ? void 0 : e.src, [n, a] =
|
|
2376
|
+
const t = e == null ? void 0 : e.src, [n, a] = z.useState(), r = z.useCallback(
|
|
2377
2377
|
(d) => {
|
|
2378
2378
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
2379
2379
|
const m = d.naturalWidth / d.naturalHeight;
|
|
@@ -2382,7 +2382,7 @@ const yr = ({
|
|
|
2382
2382
|
);
|
|
2383
2383
|
},
|
|
2384
2384
|
[t]
|
|
2385
|
-
), i =
|
|
2385
|
+
), i = z.useCallback(
|
|
2386
2386
|
(d) => r(d.currentTarget),
|
|
2387
2387
|
[r]
|
|
2388
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;
|
|
@@ -2402,7 +2402,7 @@ const yr = ({
|
|
|
2402
2402
|
loading: o = "lazy",
|
|
2403
2403
|
onClick: d
|
|
2404
2404
|
}) => {
|
|
2405
|
-
const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex:
|
|
2405
|
+
const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: x } = Me(
|
|
2406
2406
|
d
|
|
2407
2407
|
), w = m.length === 1, p = zr(w ? m[0] : void 0);
|
|
2408
2408
|
if (m.length === 0)
|
|
@@ -2417,7 +2417,7 @@ const yr = ({
|
|
|
2417
2417
|
onLoad: w ? p.onLoad : void 0
|
|
2418
2418
|
})
|
|
2419
2419
|
);
|
|
2420
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ g(
|
|
2421
2421
|
Ae,
|
|
2422
2422
|
{
|
|
2423
2423
|
variant: h,
|
|
@@ -2442,7 +2442,7 @@ const yr = ({
|
|
|
2442
2442
|
{
|
|
2443
2443
|
open: u,
|
|
2444
2444
|
items: Ls(m, a),
|
|
2445
|
-
initialIndex:
|
|
2445
|
+
initialIndex: f,
|
|
2446
2446
|
onClose: x
|
|
2447
2447
|
}
|
|
2448
2448
|
)
|
|
@@ -2470,7 +2470,7 @@ const yr = ({
|
|
|
2470
2470
|
() => o ? Vr(o.src) : void 0,
|
|
2471
2471
|
[o]
|
|
2472
2472
|
);
|
|
2473
|
-
return !o || !m ? null : /* @__PURE__ */
|
|
2473
|
+
return !o || !m ? null : /* @__PURE__ */ g(
|
|
2474
2474
|
vt,
|
|
2475
2475
|
{
|
|
2476
2476
|
open: e,
|
|
@@ -2543,7 +2543,7 @@ const yr = ({
|
|
|
2543
2543
|
onClick: d,
|
|
2544
2544
|
onDismiss: m
|
|
2545
2545
|
}) => {
|
|
2546
|
-
const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen:
|
|
2546
|
+
const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
|
|
2547
2547
|
d
|
|
2548
2548
|
), p = e === "composer" && !!m;
|
|
2549
2549
|
if (u.length === 0)
|
|
@@ -2552,7 +2552,7 @@ const yr = ({
|
|
|
2552
2552
|
src: b.src,
|
|
2553
2553
|
filename: b.filename ?? re(b.src)
|
|
2554
2554
|
}));
|
|
2555
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ g(
|
|
2556
2556
|
Ae,
|
|
2557
2557
|
{
|
|
2558
2558
|
variant: h,
|
|
@@ -2586,7 +2586,7 @@ const yr = ({
|
|
|
2586
2586
|
/* @__PURE__ */ s(
|
|
2587
2587
|
jr,
|
|
2588
2588
|
{
|
|
2589
|
-
open:
|
|
2589
|
+
open: f,
|
|
2590
2590
|
items: v,
|
|
2591
2591
|
initialIndex: c,
|
|
2592
2592
|
onClose: w
|
|
@@ -2613,7 +2613,7 @@ const yr = ({
|
|
|
2613
2613
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
|
|
2614
2614
|
[o]
|
|
2615
2615
|
);
|
|
2616
|
-
return o ? /* @__PURE__ */
|
|
2616
|
+
return o ? /* @__PURE__ */ g(
|
|
2617
2617
|
vt,
|
|
2618
2618
|
{
|
|
2619
2619
|
open: e,
|
|
@@ -2652,7 +2652,7 @@ const yr = ({
|
|
|
2652
2652
|
}, Kr = () => /* @__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(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Os = ({
|
|
2653
2653
|
item: e,
|
|
2654
2654
|
index: t
|
|
2655
|
-
}) => /* @__PURE__ */
|
|
2655
|
+
}) => /* @__PURE__ */ g("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
2656
2656
|
e.poster ? /* @__PURE__ */ s(
|
|
2657
2657
|
"img",
|
|
2658
2658
|
{
|
|
@@ -2691,7 +2691,7 @@ const yr = ({
|
|
|
2691
2691
|
const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: h } = Me(
|
|
2692
2692
|
i
|
|
2693
2693
|
);
|
|
2694
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ g("div", { className: "relative w-fit", children: [
|
|
2695
2695
|
/* @__PURE__ */ s(
|
|
2696
2696
|
"button",
|
|
2697
2697
|
{
|
|
@@ -2728,7 +2728,7 @@ const yr = ({
|
|
|
2728
2728
|
preload: d,
|
|
2729
2729
|
onClick: m
|
|
2730
2730
|
}) => {
|
|
2731
|
-
const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen:
|
|
2731
|
+
const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
|
|
2732
2732
|
m
|
|
2733
2733
|
);
|
|
2734
2734
|
if (h.length === 0)
|
|
@@ -2736,7 +2736,7 @@ const yr = ({
|
|
|
2736
2736
|
const p = h.map(
|
|
2737
2737
|
(v, b) => Zr(v, b, h.length)
|
|
2738
2738
|
);
|
|
2739
|
-
return /* @__PURE__ */
|
|
2739
|
+
return /* @__PURE__ */ g(
|
|
2740
2740
|
Ae,
|
|
2741
2741
|
{
|
|
2742
2742
|
variant: u,
|
|
@@ -2748,7 +2748,7 @@ const yr = ({
|
|
|
2748
2748
|
/* @__PURE__ */ s(
|
|
2749
2749
|
Ds,
|
|
2750
2750
|
{
|
|
2751
|
-
open:
|
|
2751
|
+
open: f,
|
|
2752
2752
|
items: Ps(h, r),
|
|
2753
2753
|
initialIndex: c,
|
|
2754
2754
|
onClose: w
|
|
@@ -2803,7 +2803,7 @@ const yr = ({
|
|
|
2803
2803
|
function di(e) {
|
|
2804
2804
|
return _e(Bs)[e] ?? ci[e];
|
|
2805
2805
|
}
|
|
2806
|
-
const ui =
|
|
2806
|
+
const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import("./Card-B4qcC_0B.js")), hi = () => /* @__PURE__ */ s(
|
|
2807
2807
|
"div",
|
|
2808
2808
|
{
|
|
2809
2809
|
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)]",
|
|
@@ -2858,10 +2858,10 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2858
2858
|
if (!r && !i)
|
|
2859
2859
|
return null;
|
|
2860
2860
|
if (r) {
|
|
2861
|
-
const
|
|
2862
|
-
if (!
|
|
2863
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = $s(e) ? "message" : "tip", w = t ? `${
|
|
2864
|
-
return /* @__PURE__ */
|
|
2861
|
+
const f = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
2862
|
+
if (!f) return null;
|
|
2863
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = $s(e) ? "message" : "tip", w = t ? `${f} ${x}` : `Delivered with ${f} ${x}`;
|
|
2864
|
+
return /* @__PURE__ */ g("div", { className: c, children: [
|
|
2865
2865
|
/* @__PURE__ */ s(aa, { size: t ? 14 : 12 }),
|
|
2866
2866
|
/* @__PURE__ */ s("span", { children: w })
|
|
2867
2867
|
] });
|
|
@@ -2871,10 +2871,10 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2871
2871
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2872
2872
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2873
2873
|
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), h = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(fi, { size: l ? 12 : 15 }) });
|
|
2874
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ g(J, { children: [
|
|
2875
2875
|
m,
|
|
2876
2876
|
h
|
|
2877
|
-
] }) : /* @__PURE__ */
|
|
2877
|
+
] }) : /* @__PURE__ */ g(J, { children: [
|
|
2878
2878
|
h,
|
|
2879
2879
|
m
|
|
2880
2880
|
] }) });
|
|
@@ -2882,7 +2882,7 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2882
2882
|
selected: e,
|
|
2883
2883
|
onVoteUp: t,
|
|
2884
2884
|
onVoteDown: n
|
|
2885
|
-
}) => /* @__PURE__ */
|
|
2885
|
+
}) => /* @__PURE__ */ g("div", { className: "message-vote-buttons", children: [
|
|
2886
2886
|
/* @__PURE__ */ s(
|
|
2887
2887
|
"button",
|
|
2888
2888
|
{
|
|
@@ -2921,10 +2921,10 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2921
2921
|
}
|
|
2922
2922
|
})();
|
|
2923
2923
|
return e.id === n;
|
|
2924
|
-
}, Je = () => _t() ? /* @__PURE__ */
|
|
2924
|
+
}, Je = () => _t() ? /* @__PURE__ */ g(J, { children: [
|
|
2925
2925
|
/* @__PURE__ */ s(ca, { weight: "bold", "aria-hidden": "true" }),
|
|
2926
2926
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2927
|
-
] }) : null, wi = () => _t() ? /* @__PURE__ */
|
|
2927
|
+
] }) : null, wi = () => _t() ? /* @__PURE__ */ g(J, { children: [
|
|
2928
2928
|
/* @__PURE__ */ s(
|
|
2929
2929
|
xe,
|
|
2930
2930
|
{
|
|
@@ -2940,7 +2940,7 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2940
2940
|
resolvedBroadcastName: n,
|
|
2941
2941
|
onBroadcastClick: a
|
|
2942
2942
|
}) => {
|
|
2943
|
-
const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */
|
|
2943
|
+
const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */ g(J, { children: [
|
|
2944
2944
|
/* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(la, { weight: "fill" }) }),
|
|
2945
2945
|
/* @__PURE__ */ s(
|
|
2946
2946
|
"span",
|
|
@@ -2964,14 +2964,14 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2964
2964
|
children: l
|
|
2965
2965
|
}
|
|
2966
2966
|
) : l;
|
|
2967
|
-
}, yi = () => /* @__PURE__ */
|
|
2967
|
+
}, yi = () => /* @__PURE__ */ g("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
2968
2968
|
/* @__PURE__ */ s(oa, { weight: "bold", "aria-hidden": "true" }),
|
|
2969
2969
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
2970
2970
|
] }), Ni = ({
|
|
2971
2971
|
onBroadcastClick: e,
|
|
2972
2972
|
resolvedBroadcastName: t
|
|
2973
2973
|
}) => {
|
|
2974
|
-
var u,
|
|
2974
|
+
var u, f;
|
|
2975
2975
|
const { isMyMessage: n, message: a, threadList: r } = ge(
|
|
2976
2976
|
"SentMessageDeliveryStatus"
|
|
2977
2977
|
), i = n(), l = _t();
|
|
@@ -2981,7 +2981,7 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2981
2981
|
return /* @__PURE__ */ s(yi, {});
|
|
2982
2982
|
if (!i)
|
|
2983
2983
|
return null;
|
|
2984
|
-
const o = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (
|
|
2984
|
+
const o = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (f = a.metadata) == null ? void 0 : f.broadcast_name, m = a.status !== "sending" && a.status !== "failed" && o ? /* @__PURE__ */ s(
|
|
2985
2985
|
_i,
|
|
2986
2986
|
{
|
|
2987
2987
|
broadcastId: o,
|
|
@@ -2998,7 +2998,7 @@ const ui = F.lazy(() => import("./Card-qS17qnN0.js")), mi = F.lazy(() => import(
|
|
|
2998
2998
|
MessageSendingStatus: wi
|
|
2999
2999
|
}
|
|
3000
3000
|
);
|
|
3001
|
-
return m ? /* @__PURE__ */
|
|
3001
|
+
return m ? /* @__PURE__ */ g("span", { className: "sent-message-status-row", children: [
|
|
3002
3002
|
h,
|
|
3003
3003
|
l && /* @__PURE__ */ s(
|
|
3004
3004
|
"span",
|
|
@@ -3091,10 +3091,10 @@ const Si = {
|
|
|
3091
3091
|
trailingAction: h,
|
|
3092
3092
|
isLoading: u = !1
|
|
3093
3093
|
}) => {
|
|
3094
|
-
const
|
|
3094
|
+
const f = e === "dark", c = a ?? (f ? r : void 0) ?? "", x = c.trim() !== "", w = i != null && i.trim() !== "", p = typeof o == "string" ? o.trim() : "", v = p !== "", b = m != null;
|
|
3095
3095
|
if (!u && !x && !w && !v && !b)
|
|
3096
3096
|
return null;
|
|
3097
|
-
const N =
|
|
3097
|
+
const N = f && !a, _ = k(
|
|
3098
3098
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
3099
3099
|
n == null && (N ? Ii : Ei[e])
|
|
3100
3100
|
), A = k(
|
|
@@ -3110,7 +3110,7 @@ const Si = {
|
|
|
3110
3110
|
"animate-pulse rounded",
|
|
3111
3111
|
Ti[e]
|
|
3112
3112
|
);
|
|
3113
|
-
return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */
|
|
3113
|
+
return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
3114
3114
|
/* @__PURE__ */ s("div", { className: k("h-5 w-3/4", $), "aria-hidden": !0 }),
|
|
3115
3115
|
/* @__PURE__ */ s("div", { className: k("h-4 w-1/2", $), "aria-hidden": !0 })
|
|
3116
3116
|
] }) });
|
|
@@ -3122,10 +3122,10 @@ const Si = {
|
|
|
3122
3122
|
WebkitLineClamp: l,
|
|
3123
3123
|
overflow: "hidden"
|
|
3124
3124
|
} : L;
|
|
3125
|
-
return /* @__PURE__ */
|
|
3126
|
-
/* @__PURE__ */
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
x && /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ g("div", { className: "shrink-0 px-4 py-3", children: [
|
|
3126
|
+
/* @__PURE__ */ g("div", { className: "flex items-end gap-3", children: [
|
|
3127
|
+
/* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
|
|
3128
|
+
x && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3129
3129
|
d ? /* @__PURE__ */ s("span", { className: "shrink-0", children: d }) : null,
|
|
3130
3130
|
/* @__PURE__ */ s(
|
|
3131
3131
|
"p",
|
|
@@ -3162,7 +3162,7 @@ const Si = {
|
|
|
3162
3162
|
busy: h = !1,
|
|
3163
3163
|
"data-testid": u
|
|
3164
3164
|
}) => {
|
|
3165
|
-
const
|
|
3165
|
+
const f = n != null || a != null, c = k(
|
|
3166
3166
|
"messaging-link-card",
|
|
3167
3167
|
Ri,
|
|
3168
3168
|
m ? Li : "block",
|
|
@@ -3186,9 +3186,9 @@ const Si = {
|
|
|
3186
3186
|
// `focus-ring` is a design-system utility from the component-library
|
|
3187
3187
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
3188
3188
|
// with offset, so keyboard users can see the focused card.
|
|
3189
|
-
|
|
3189
|
+
f ? "cursor-pointer no-underline focus-ring" : null
|
|
3190
3190
|
), x = h ? { role: "status", "aria-busy": !0, "aria-label": Ai } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
|
|
3191
|
-
return n ? /* @__PURE__ */
|
|
3191
|
+
return n ? /* @__PURE__ */ g(
|
|
3192
3192
|
"a",
|
|
3193
3193
|
{
|
|
3194
3194
|
ref: i,
|
|
@@ -3206,7 +3206,7 @@ const Si = {
|
|
|
3206
3206
|
p
|
|
3207
3207
|
]
|
|
3208
3208
|
}
|
|
3209
|
-
) : a ? /* @__PURE__ */
|
|
3209
|
+
) : a ? /* @__PURE__ */ g(
|
|
3210
3210
|
"button",
|
|
3211
3211
|
{
|
|
3212
3212
|
ref: i,
|
|
@@ -3223,7 +3223,7 @@ const Si = {
|
|
|
3223
3223
|
p
|
|
3224
3224
|
]
|
|
3225
3225
|
}
|
|
3226
|
-
) : /* @__PURE__ */
|
|
3226
|
+
) : /* @__PURE__ */ g(
|
|
3227
3227
|
"div",
|
|
3228
3228
|
{
|
|
3229
3229
|
ref: i,
|
|
@@ -3269,7 +3269,7 @@ const Si = {
|
|
|
3269
3269
|
className: "block w-full",
|
|
3270
3270
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
3271
3271
|
}
|
|
3272
|
-
) }) : /* @__PURE__ */
|
|
3272
|
+
) }) : /* @__PURE__ */ g(
|
|
3273
3273
|
"div",
|
|
3274
3274
|
{
|
|
3275
3275
|
className: k(
|
|
@@ -3296,7 +3296,7 @@ const Si = {
|
|
|
3296
3296
|
"aria-hidden": !0
|
|
3297
3297
|
}
|
|
3298
3298
|
)
|
|
3299
|
-
) : h ? /* @__PURE__ */
|
|
3299
|
+
) : h ? /* @__PURE__ */ g(J, { children: [
|
|
3300
3300
|
/* @__PURE__ */ s(
|
|
3301
3301
|
"video",
|
|
3302
3302
|
{
|
|
@@ -3366,11 +3366,11 @@ function He({
|
|
|
3366
3366
|
mimeType: i,
|
|
3367
3367
|
sourceUrl: l
|
|
3368
3368
|
}) {
|
|
3369
|
-
const [o, d] =
|
|
3370
|
-
|
|
3369
|
+
const [o, d] = z.useState(!1);
|
|
3370
|
+
z.useEffect(() => {
|
|
3371
3371
|
d(!1);
|
|
3372
3372
|
}, [r]);
|
|
3373
|
-
const m =
|
|
3373
|
+
const m = z.useCallback(() => {
|
|
3374
3374
|
d(!0);
|
|
3375
3375
|
}, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Di.test(t.trim()) ? Oi(t) : void 0, x = h ? Vs : zi[e];
|
|
3376
3376
|
return {
|
|
@@ -3395,7 +3395,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3395
3395
|
appIcon: m,
|
|
3396
3396
|
cta: h,
|
|
3397
3397
|
accentColor: u,
|
|
3398
|
-
status:
|
|
3398
|
+
status: f = "ready",
|
|
3399
3399
|
onDismiss: c,
|
|
3400
3400
|
onEditClick: x,
|
|
3401
3401
|
dismissLabel: w = "Dismiss attachment"
|
|
@@ -3403,7 +3403,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3403
3403
|
const p = d === "classic", v = De(i, o), b = He({
|
|
3404
3404
|
variant: "dark",
|
|
3405
3405
|
accentColor: u,
|
|
3406
|
-
status:
|
|
3406
|
+
status: f,
|
|
3407
3407
|
layout: d,
|
|
3408
3408
|
thumbnailUrl: l,
|
|
3409
3409
|
mimeType: i,
|
|
@@ -3430,7 +3430,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3430
3430
|
children: /* @__PURE__ */ s(da, { className: "size-5", weight: "regular" })
|
|
3431
3431
|
}
|
|
3432
3432
|
) : void 0;
|
|
3433
|
-
return v && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */
|
|
3433
|
+
return v && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3434
3434
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3435
3435
|
Ie,
|
|
3436
3436
|
{
|
|
@@ -3441,7 +3441,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3441
3441
|
}
|
|
3442
3442
|
) }),
|
|
3443
3443
|
N && /* @__PURE__ */ s("div", { className: "shrink-0", children: N })
|
|
3444
|
-
] }) }) : /* @__PURE__ */
|
|
3444
|
+
] }) }) : /* @__PURE__ */ g(
|
|
3445
3445
|
Ee,
|
|
3446
3446
|
{
|
|
3447
3447
|
variant: "dark",
|
|
@@ -3492,7 +3492,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3492
3492
|
// `isolate` keeps the tail's negative z-index from escaping behind the
|
|
3493
3493
|
// thread background; `w-fit` stops the wrapper from stretching in the
|
|
3494
3494
|
// composer's flex list.
|
|
3495
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ g("div", { className: "relative isolate w-fit", children: [
|
|
3496
3496
|
a,
|
|
3497
3497
|
/* @__PURE__ */ s(
|
|
3498
3498
|
"span",
|
|
@@ -3521,14 +3521,14 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3521
3521
|
cta: m,
|
|
3522
3522
|
accentColor: h,
|
|
3523
3523
|
status: u = "ready",
|
|
3524
|
-
onClick:
|
|
3524
|
+
onClick: f,
|
|
3525
3525
|
groupPosition: c = "single"
|
|
3526
3526
|
}) => {
|
|
3527
|
-
const x = kt(r, l), w = yt(a), p = m == null && w != null && !x ? w : void 0, v = m == null && !x ?
|
|
3527
|
+
const x = kt(r, l), w = yt(a), p = m == null && w != null && !x ? w : void 0, v = m == null && !x ? f : void 0, b = u !== "loading" && De(r, l) ? Ct : void 0, N = m && f ? {
|
|
3528
3528
|
...m,
|
|
3529
3529
|
onClick: () => {
|
|
3530
3530
|
var A;
|
|
3531
|
-
|
|
3531
|
+
f(), (A = m.onClick) == null || A.call(m);
|
|
3532
3532
|
}
|
|
3533
3533
|
} : m, _ = He({
|
|
3534
3534
|
variant: "light",
|
|
@@ -3545,7 +3545,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3545
3545
|
accentHex: _.accentHex,
|
|
3546
3546
|
side: "receiver",
|
|
3547
3547
|
visible: b == null && (c === "single" || c === "end"),
|
|
3548
|
-
children: /* @__PURE__ */
|
|
3548
|
+
children: /* @__PURE__ */ g(
|
|
3549
3549
|
Ee,
|
|
3550
3550
|
{
|
|
3551
3551
|
variant: "light",
|
|
@@ -3603,14 +3603,14 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3603
3603
|
appIcon: m,
|
|
3604
3604
|
cta: h,
|
|
3605
3605
|
accentColor: u,
|
|
3606
|
-
status:
|
|
3606
|
+
status: f = "ready",
|
|
3607
3607
|
onClick: c,
|
|
3608
3608
|
groupPosition: x = "single"
|
|
3609
3609
|
}) => {
|
|
3610
|
-
const w = kt(i, o), p = yt(r), v = h == null && p != null && !w ? p : void 0, b = h == null && !w && v != null ? c : void 0, N =
|
|
3610
|
+
const w = kt(i, o), p = yt(r), v = h == null && p != null && !w ? p : void 0, b = h == null && !w && v != null ? c : void 0, N = f !== "loading" && De(i, o), _ = He({
|
|
3611
3611
|
variant: "dark",
|
|
3612
3612
|
accentColor: u,
|
|
3613
|
-
status:
|
|
3613
|
+
status: f,
|
|
3614
3614
|
layout: d,
|
|
3615
3615
|
thumbnailUrl: l,
|
|
3616
3616
|
mimeType: i,
|
|
@@ -3622,7 +3622,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
3622
3622
|
accentHex: _.accentHex,
|
|
3623
3623
|
side: "sender",
|
|
3624
3624
|
visible: !N && (x === "single" || x === "end"),
|
|
3625
|
-
children: /* @__PURE__ */
|
|
3625
|
+
children: /* @__PURE__ */ g(
|
|
3626
3626
|
Ee,
|
|
3627
3627
|
{
|
|
3628
3628
|
variant: "dark",
|
|
@@ -3874,14 +3874,14 @@ const Ki = ({
|
|
|
3874
3874
|
if (r.length === 0) return null;
|
|
3875
3875
|
const i = Gi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((p) => p.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
|
|
3876
3876
|
let h = 0;
|
|
3877
|
-
const u = [],
|
|
3877
|
+
const u = [], f = m ? "middle" : e, c = (p, v, b) => {
|
|
3878
3878
|
const N = t ? ot.Sent : ot.Received;
|
|
3879
3879
|
u.push(
|
|
3880
3880
|
/* @__PURE__ */ s(
|
|
3881
3881
|
N,
|
|
3882
3882
|
{
|
|
3883
3883
|
...ss(p),
|
|
3884
|
-
groupPosition: b ?
|
|
3884
|
+
groupPosition: b ? f : "middle"
|
|
3885
3885
|
},
|
|
3886
3886
|
v
|
|
3887
3887
|
)
|
|
@@ -3917,8 +3917,8 @@ const Ki = ({
|
|
|
3917
3917
|
return;
|
|
3918
3918
|
}
|
|
3919
3919
|
x(p, `media-${v}`);
|
|
3920
|
-
}), /* @__PURE__ */
|
|
3921
|
-
/* @__PURE__ */
|
|
3920
|
+
}), /* @__PURE__ */ g("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3921
|
+
/* @__PURE__ */ g(
|
|
3922
3922
|
"div",
|
|
3923
3923
|
{
|
|
3924
3924
|
className: "str-chat__message-bubble",
|
|
@@ -3935,7 +3935,7 @@ const Ki = ({
|
|
|
3935
3935
|
]
|
|
3936
3936
|
}
|
|
3937
3937
|
),
|
|
3938
|
-
m ? /* @__PURE__ */
|
|
3938
|
+
m ? /* @__PURE__ */ g("div", { className: "str-chat__message-bubble", children: [
|
|
3939
3939
|
/* @__PURE__ */ s(Be, { message: n, renderText: a }),
|
|
3940
3940
|
/* @__PURE__ */ s(st, {})
|
|
3941
3941
|
] }) : null
|
|
@@ -3954,7 +3954,7 @@ const Ki = ({
|
|
|
3954
3954
|
handleRetry: m,
|
|
3955
3955
|
highlighted: h,
|
|
3956
3956
|
isMessageAIGenerated: u,
|
|
3957
|
-
isMyMessage:
|
|
3957
|
+
isMyMessage: f,
|
|
3958
3958
|
message: c,
|
|
3959
3959
|
renderText: x,
|
|
3960
3960
|
threadList: w,
|
|
@@ -3964,7 +3964,7 @@ const Ki = ({
|
|
|
3964
3964
|
} = e, { client: N } = Te("CustomMessage"), { channel: _ } = fe("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: D } = di("LockedAttachment"), [$, O] = U(!1), C = dn(c.id), { selected: P, voteUp: S, voteDown: T } = Oa(c), {
|
|
3965
3965
|
Attachment: E = un,
|
|
3966
3966
|
EditMessageModal: B = mn,
|
|
3967
|
-
MessageActions:
|
|
3967
|
+
MessageActions: F,
|
|
3968
3968
|
MessageBlocked: j = hn,
|
|
3969
3969
|
MessageBouncePrompt: K = fn,
|
|
3970
3970
|
MessageDeleted: se = gn,
|
|
@@ -4004,7 +4004,7 @@ const Ki = ({
|
|
|
4004
4004
|
const me = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, Et = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, It = kn(c);
|
|
4005
4005
|
let pe;
|
|
4006
4006
|
Et ? pe = () => m(c) : It && (pe = () => O(!0));
|
|
4007
|
-
const te =
|
|
4007
|
+
const te = f(), Js = k(
|
|
4008
4008
|
"str-chat__message str-chat__message-simple",
|
|
4009
4009
|
`str-chat__message--${c.type}`,
|
|
4010
4010
|
`str-chat__message--${c.status}`,
|
|
@@ -4036,7 +4036,7 @@ const Ki = ({
|
|
|
4036
4036
|
paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
|
|
4037
4037
|
onFetchSource: L ? () => L(c, _) : void 0
|
|
4038
4038
|
};
|
|
4039
|
-
return /* @__PURE__ */
|
|
4039
|
+
return /* @__PURE__ */ g(J, { children: [
|
|
4040
4040
|
a && /* @__PURE__ */ s(
|
|
4041
4041
|
B,
|
|
4042
4042
|
{
|
|
@@ -4051,7 +4051,7 @@ const Ki = ({
|
|
|
4051
4051
|
open: $
|
|
4052
4052
|
}
|
|
4053
4053
|
),
|
|
4054
|
-
/* @__PURE__ */
|
|
4054
|
+
/* @__PURE__ */ g(
|
|
4055
4055
|
"div",
|
|
4056
4056
|
{
|
|
4057
4057
|
className: Js,
|
|
@@ -4089,8 +4089,8 @@ const Ki = ({
|
|
|
4089
4089
|
marginInlineEnd: 0,
|
|
4090
4090
|
marginInlineStart: 0
|
|
4091
4091
|
},
|
|
4092
|
-
children: Tt ? /* @__PURE__ */ s(Ze, { message: c, standalone: !0 }) : pi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */
|
|
4093
|
-
te &&
|
|
4092
|
+
children: Tt ? /* @__PURE__ */ s(Ze, { message: c, standalone: !0 }) : pi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
4093
|
+
te && F && /* @__PURE__ */ s(F, {}),
|
|
4094
4094
|
te ? /* @__PURE__ */ s(
|
|
4095
4095
|
Fe,
|
|
4096
4096
|
{
|
|
@@ -4106,10 +4106,10 @@ const Ki = ({
|
|
|
4106
4106
|
onUnlockClick: () => R == null ? void 0 : R(c, _)
|
|
4107
4107
|
}
|
|
4108
4108
|
),
|
|
4109
|
-
!te &&
|
|
4110
|
-
] }) }) : bi(c) ? /* @__PURE__ */
|
|
4111
|
-
/* @__PURE__ */
|
|
4112
|
-
te &&
|
|
4109
|
+
!te && F && /* @__PURE__ */ s(F, {})
|
|
4110
|
+
] }) }) : bi(c) ? /* @__PURE__ */ g("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
4111
|
+
/* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
4112
|
+
te && F && /* @__PURE__ */ s(F, {}),
|
|
4113
4113
|
te ? /* @__PURE__ */ s(
|
|
4114
4114
|
Fe,
|
|
4115
4115
|
{
|
|
@@ -4127,7 +4127,7 @@ const Ki = ({
|
|
|
4127
4127
|
onDownloadClick: () => D ? D(c, _) : void 0
|
|
4128
4128
|
}
|
|
4129
4129
|
),
|
|
4130
|
-
!te &&
|
|
4130
|
+
!te && F && /* @__PURE__ */ s(F, {})
|
|
4131
4131
|
] }),
|
|
4132
4132
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
4133
4133
|
Be,
|
|
@@ -4151,7 +4151,7 @@ const Ki = ({
|
|
|
4151
4151
|
},
|
|
4152
4152
|
renderText: x
|
|
4153
4153
|
}
|
|
4154
|
-
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */
|
|
4154
|
+
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ g("div", { className: "str-chat__message-bubble", children: [
|
|
4155
4155
|
be && !At && /* @__PURE__ */ s(
|
|
4156
4156
|
Ze,
|
|
4157
4157
|
{
|
|
@@ -4185,7 +4185,7 @@ const Ki = ({
|
|
|
4185
4185
|
] }) })
|
|
4186
4186
|
}
|
|
4187
4187
|
),
|
|
4188
|
-
!Qs && !Tt && /* @__PURE__ */
|
|
4188
|
+
!Qs && !Tt && /* @__PURE__ */ g("div", { className: "str-chat__message-footer", children: [
|
|
4189
4189
|
(!be || At) && /* @__PURE__ */ s(
|
|
4190
4190
|
Ze,
|
|
4191
4191
|
{
|
|
@@ -4223,7 +4223,7 @@ const Ki = ({
|
|
|
4223
4223
|
c.id
|
|
4224
4224
|
)
|
|
4225
4225
|
] });
|
|
4226
|
-
}, Ji =
|
|
4226
|
+
}, Ji = z.memo(
|
|
4227
4227
|
Zi,
|
|
4228
4228
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 : cn(e, t)
|
|
4229
4229
|
), Qi = (e) => {
|
|
@@ -4345,7 +4345,7 @@ const Ki = ({
|
|
|
4345
4345
|
);
|
|
4346
4346
|
}) })
|
|
4347
4347
|
) : null;
|
|
4348
|
-
}, Ue =
|
|
4348
|
+
}, Ue = z.createContext(!1), ro = 200, il = () => _e(Ue), io = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
4349
4349
|
"button",
|
|
4350
4350
|
{
|
|
4351
4351
|
...n,
|
|
@@ -4360,8 +4360,8 @@ const Ki = ({
|
|
|
4360
4360
|
const e = _e(Ue), { handleSubmit: t } = Tn(), n = An(), a = e || !n, {
|
|
4361
4361
|
SendButton: r = io,
|
|
4362
4362
|
AttachmentPreviewList: i = Rn
|
|
4363
|
-
} = ls("CustomMessageInput"), l =
|
|
4364
|
-
return
|
|
4363
|
+
} = ls("CustomMessageInput"), l = z.useRef(null);
|
|
4364
|
+
return z.useEffect(() => {
|
|
4365
4365
|
const o = l.current;
|
|
4366
4366
|
if (!o || typeof ResizeObserver > "u")
|
|
4367
4367
|
return;
|
|
@@ -4369,14 +4369,14 @@ const Ki = ({
|
|
|
4369
4369
|
o.contains(document.activeElement) && (o.scrollTop = o.scrollHeight);
|
|
4370
4370
|
});
|
|
4371
4371
|
return d.observe(o), () => d.disconnect();
|
|
4372
|
-
}, []),
|
|
4372
|
+
}, []), z.useEffect(() => {
|
|
4373
4373
|
const o = l.current;
|
|
4374
4374
|
if (!o)
|
|
4375
4375
|
return;
|
|
4376
4376
|
const d = (m) => {
|
|
4377
4377
|
var u;
|
|
4378
4378
|
Array.from(((u = m.clipboardData) == null ? void 0 : u.items) ?? []).some(
|
|
4379
|
-
(
|
|
4379
|
+
(f) => f.kind === "file"
|
|
4380
4380
|
) || m.stopPropagation();
|
|
4381
4381
|
};
|
|
4382
4382
|
return o.addEventListener("paste", d), () => o.removeEventListener("paste", d);
|
|
@@ -4415,19 +4415,19 @@ const Ki = ({
|
|
|
4415
4415
|
// than through this React tree, bypassing the two wrappers below. The
|
|
4416
4416
|
// `[&>:not(...)]:p-2` variant restores the container's old inset for any
|
|
4417
4417
|
// such foreign direct child, without re-adding it to our own wrappers.
|
|
4418
|
-
/* @__PURE__ */
|
|
4418
|
+
/* @__PURE__ */ g(
|
|
4419
4419
|
"div",
|
|
4420
4420
|
{
|
|
4421
4421
|
ref: l,
|
|
4422
4422
|
className: "central-container flex flex-col min-w-0 w-full max-h-[calc(var(--messaging-surface-height,100dvh)*0.5)] overflow-y-auto overscroll-contain bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
|
|
4423
4423
|
"data-dd-privacy": "mask",
|
|
4424
4424
|
children: [
|
|
4425
|
-
/* @__PURE__ */
|
|
4425
|
+
/* @__PURE__ */ g("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4426
4426
|
/* @__PURE__ */ s(Ln, {}),
|
|
4427
4427
|
/* @__PURE__ */ s(ao, {}),
|
|
4428
4428
|
/* @__PURE__ */ s(i, {})
|
|
4429
4429
|
] }),
|
|
4430
|
-
/* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ g("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4431
4431
|
/* @__PURE__ */ s(
|
|
4432
4432
|
Mn,
|
|
4433
4433
|
{
|
|
@@ -4465,21 +4465,21 @@ const Ki = ({
|
|
|
4465
4465
|
composerInput: i
|
|
4466
4466
|
}) => {
|
|
4467
4467
|
var h;
|
|
4468
|
-
const { channel: l } = fe(), o = ((h = l == null ? void 0 : l.data) == null ? void 0 : h.frozen) === !0, d = !!i, m =
|
|
4469
|
-
return
|
|
4468
|
+
const { channel: l } = fe(), o = ((h = l == null ? void 0 : l.data) == null ? void 0 : h.frozen) === !0, d = !!i, m = z.useRef(null);
|
|
4469
|
+
return z.useEffect(() => {
|
|
4470
4470
|
if (!d)
|
|
4471
4471
|
return;
|
|
4472
|
-
const u = m.current,
|
|
4473
|
-
if (!u || !
|
|
4472
|
+
const u = m.current, f = u == null ? void 0 : u.parentElement;
|
|
4473
|
+
if (!u || !f)
|
|
4474
4474
|
return;
|
|
4475
4475
|
let c = u.offsetHeight;
|
|
4476
4476
|
const x = () => {
|
|
4477
4477
|
const p = u.offsetHeight, v = p > c;
|
|
4478
4478
|
c = p;
|
|
4479
4479
|
const b = Array.from(
|
|
4480
|
-
|
|
4480
|
+
f.querySelectorAll(".str-chat__list")
|
|
4481
4481
|
).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < ro : !1;
|
|
4482
|
-
|
|
4482
|
+
f.style.setProperty(
|
|
4483
4483
|
"--messaging-composer-height",
|
|
4484
4484
|
`${p}px`
|
|
4485
4485
|
), v && N && b && (b.scrollTop = b.scrollHeight);
|
|
@@ -4488,15 +4488,15 @@ const Ki = ({
|
|
|
4488
4488
|
return;
|
|
4489
4489
|
const w = new ResizeObserver(x);
|
|
4490
4490
|
return w.observe(u), () => {
|
|
4491
|
-
w.disconnect(),
|
|
4491
|
+
w.disconnect(), f.style.removeProperty("--messaging-composer-height");
|
|
4492
4492
|
};
|
|
4493
|
-
}, [d]), a ? d ? /* @__PURE__ */
|
|
4493
|
+
}, [d]), a ? d ? /* @__PURE__ */ g(
|
|
4494
4494
|
"div",
|
|
4495
4495
|
{
|
|
4496
4496
|
ref: m,
|
|
4497
4497
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4498
4498
|
children: [
|
|
4499
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ g("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4500
4500
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4501
4501
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4502
4502
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
@@ -4504,24 +4504,24 @@ const Ki = ({
|
|
|
4504
4504
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4505
4505
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4506
4506
|
] }),
|
|
4507
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ g("div", { className: "relative z-10 flex flex-col", children: [
|
|
4508
4508
|
t == null ? void 0 : t(),
|
|
4509
4509
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
4510
4510
|
n == null ? void 0 : n()
|
|
4511
4511
|
] })
|
|
4512
4512
|
]
|
|
4513
4513
|
}
|
|
4514
|
-
) : /* @__PURE__ */
|
|
4514
|
+
) : /* @__PURE__ */ g(J, { children: [
|
|
4515
4515
|
t == null ? void 0 : t(),
|
|
4516
4516
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
4517
4517
|
n == null ? void 0 : n()
|
|
4518
|
-
] }) : d ? /* @__PURE__ */
|
|
4518
|
+
] }) : d ? /* @__PURE__ */ g(
|
|
4519
4519
|
"div",
|
|
4520
4520
|
{
|
|
4521
4521
|
ref: m,
|
|
4522
4522
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4523
4523
|
children: [
|
|
4524
|
-
/* @__PURE__ */
|
|
4524
|
+
/* @__PURE__ */ g("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4525
4525
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4526
4526
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4527
4527
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
@@ -4529,10 +4529,10 @@ const Ki = ({
|
|
|
4529
4529
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4530
4530
|
/* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4531
4531
|
] }),
|
|
4532
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ g("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
|
|
4533
4533
|
t == null ? void 0 : t(),
|
|
4534
|
-
/* @__PURE__ */
|
|
4535
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ g("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
4535
|
+
/* @__PURE__ */ g(
|
|
4536
4536
|
"div",
|
|
4537
4537
|
{
|
|
4538
4538
|
inert: o ? "" : void 0,
|
|
@@ -4549,9 +4549,9 @@ const Ki = ({
|
|
|
4549
4549
|
] })
|
|
4550
4550
|
]
|
|
4551
4551
|
}
|
|
4552
|
-
) : /* @__PURE__ */
|
|
4552
|
+
) : /* @__PURE__ */ g("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
4553
4553
|
t == null ? void 0 : t(),
|
|
4554
|
-
/* @__PURE__ */
|
|
4554
|
+
/* @__PURE__ */ g(
|
|
4555
4555
|
"div",
|
|
4556
4556
|
{
|
|
4557
4557
|
inert: o ? "" : void 0,
|
|
@@ -4599,7 +4599,7 @@ const Ki = ({
|
|
|
4599
4599
|
if (t === -1)
|
|
4600
4600
|
return e;
|
|
4601
4601
|
const n = t + Qe.length;
|
|
4602
|
-
return /* @__PURE__ */
|
|
4602
|
+
return /* @__PURE__ */ g(J, { children: [
|
|
4603
4603
|
e.slice(0, t),
|
|
4604
4604
|
/* @__PURE__ */ s(
|
|
4605
4605
|
"a",
|
|
@@ -4620,8 +4620,8 @@ const Ki = ({
|
|
|
4620
4620
|
);
|
|
4621
4621
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4622
4622
|
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || oo[n.type];
|
|
4623
|
-
return /* @__PURE__ */
|
|
4624
|
-
/* @__PURE__ */
|
|
4623
|
+
return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4624
|
+
/* @__PURE__ */ g(
|
|
4625
4625
|
"div",
|
|
4626
4626
|
{
|
|
4627
4627
|
className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
|
|
@@ -4646,8 +4646,8 @@ const Ki = ({
|
|
|
4646
4646
|
}
|
|
4647
4647
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4648
4648
|
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || co[n.type];
|
|
4649
|
-
return /* @__PURE__ */
|
|
4650
|
-
/* @__PURE__ */
|
|
4649
|
+
return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4650
|
+
/* @__PURE__ */ g(
|
|
4651
4651
|
"div",
|
|
4652
4652
|
{
|
|
4653
4653
|
className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
|
|
@@ -4671,8 +4671,8 @@ const Ki = ({
|
|
|
4671
4671
|
!t && /* @__PURE__ */ s(We, { message: e.message })
|
|
4672
4672
|
] });
|
|
4673
4673
|
}
|
|
4674
|
-
return /* @__PURE__ */
|
|
4675
|
-
/* @__PURE__ */
|
|
4674
|
+
return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4675
|
+
/* @__PURE__ */ g("div", { className: "str-chat__message--system__text", children: [
|
|
4676
4676
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
|
|
4677
4677
|
/* @__PURE__ */ s("p", { children: e.message.text }),
|
|
4678
4678
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
|
|
@@ -4723,13 +4723,13 @@ const Ki = ({
|
|
|
4723
4723
|
) : [], u = e ? h : m;
|
|
4724
4724
|
if (!u.length)
|
|
4725
4725
|
return null;
|
|
4726
|
-
const
|
|
4726
|
+
const f = (w = u[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
4727
4727
|
return /* @__PURE__ */ s(
|
|
4728
4728
|
is,
|
|
4729
4729
|
{
|
|
4730
|
-
avatarId: (
|
|
4731
|
-
avatarName: (
|
|
4732
|
-
avatarImage: (
|
|
4730
|
+
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4731
|
+
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
4732
|
+
avatarImage: (f == null ? void 0 : f.image) ?? (c == null ? void 0 : c.image),
|
|
4733
4733
|
testId: "typing-indicator"
|
|
4734
4734
|
}
|
|
4735
4735
|
);
|
|
@@ -4746,7 +4746,7 @@ const Ki = ({
|
|
|
4746
4746
|
style: {
|
|
4747
4747
|
marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
|
|
4748
4748
|
},
|
|
4749
|
-
children: /* @__PURE__ */
|
|
4749
|
+
children: /* @__PURE__ */ g("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: [
|
|
4750
4750
|
/* @__PURE__ */ s(
|
|
4751
4751
|
ye,
|
|
4752
4752
|
{
|
|
@@ -4758,7 +4758,7 @@ const Ki = ({
|
|
|
4758
4758
|
shape: "circle"
|
|
4759
4759
|
}
|
|
4760
4760
|
),
|
|
4761
|
-
/* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ g(
|
|
4762
4762
|
"svg",
|
|
4763
4763
|
{
|
|
4764
4764
|
"aria-hidden": "true",
|
|
@@ -4786,12 +4786,12 @@ function xo(e, t) {
|
|
|
4786
4786
|
return i;
|
|
4787
4787
|
}
|
|
4788
4788
|
}
|
|
4789
|
-
const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */
|
|
4789
|
+
const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ g(
|
|
4790
4790
|
"div",
|
|
4791
4791
|
{
|
|
4792
4792
|
className: k("flex items-center justify-center h-full", e),
|
|
4793
4793
|
children: [
|
|
4794
|
-
/* @__PURE__ */
|
|
4794
|
+
/* @__PURE__ */ g("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
4795
4795
|
/* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
|
|
4796
4796
|
"animateTransform",
|
|
4797
4797
|
{
|
|
@@ -4829,7 +4829,7 @@ const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4829
4829
|
t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
|
|
4830
4830
|
]
|
|
4831
4831
|
}
|
|
4832
|
-
), je =
|
|
4832
|
+
), je = z.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ g("div", { className: "flex items-center", children: [
|
|
4833
4833
|
/* @__PURE__ */ s(_o, { className: "w-6 h-6" }),
|
|
4834
4834
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4835
4835
|
] }) }));
|
|
@@ -4847,7 +4847,7 @@ const yo = ({
|
|
|
4847
4847
|
onBlockParticipantClick: m,
|
|
4848
4848
|
onReportParticipantClick: h,
|
|
4849
4849
|
showBlockParticipant: u = !0,
|
|
4850
|
-
showReportParticipant:
|
|
4850
|
+
showReportParticipant: f = !0,
|
|
4851
4851
|
composerDisabled: c = !1,
|
|
4852
4852
|
composerDisabledReason: x,
|
|
4853
4853
|
showStarButton: w = !1,
|
|
@@ -4873,9 +4873,9 @@ const yo = ({
|
|
|
4873
4873
|
}, []), E = D ? T : void 0, B = oi(
|
|
4874
4874
|
P,
|
|
4875
4875
|
$
|
|
4876
|
-
),
|
|
4876
|
+
), F = C.state.messages.some(
|
|
4877
4877
|
(G) => G.type !== "deleted"
|
|
4878
|
-
), j = v ? /* @__PURE__ */ s(
|
|
4878
|
+
), j = v ? /* @__PURE__ */ s(z.Fragment, { children: v() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
|
|
4879
4879
|
La,
|
|
4880
4880
|
{
|
|
4881
4881
|
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%)]",
|
|
@@ -4887,7 +4887,7 @@ const yo = ({
|
|
|
4887
4887
|
onBlockParticipant: l,
|
|
4888
4888
|
showDeleteConversation: o,
|
|
4889
4889
|
showBlockParticipant: u,
|
|
4890
|
-
showReportParticipant:
|
|
4890
|
+
showReportParticipant: f,
|
|
4891
4891
|
onDeleteConversationClick: d,
|
|
4892
4892
|
onBlockParticipantClick: m,
|
|
4893
4893
|
onReportParticipantClick: h,
|
|
@@ -4919,20 +4919,20 @@ const yo = ({
|
|
|
4919
4919
|
UnreadMessagesNotification: () => null,
|
|
4920
4920
|
UnreadMessagesSeparator: () => null
|
|
4921
4921
|
},
|
|
4922
|
-
children: /* @__PURE__ */ s(Fn, { children: O ? /* @__PURE__ */
|
|
4923
|
-
/* @__PURE__ */
|
|
4922
|
+
children: /* @__PURE__ */ s(Fn, { children: O ? /* @__PURE__ */ g("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4923
|
+
/* @__PURE__ */ g(
|
|
4924
4924
|
"div",
|
|
4925
4925
|
{
|
|
4926
4926
|
className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
|
|
4927
4927
|
children: [
|
|
4928
|
-
!
|
|
4928
|
+
!F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ g("div", { className: "str-chat__message-list-scroll", children: [
|
|
4929
4929
|
K,
|
|
4930
4930
|
j
|
|
4931
4931
|
] }) }),
|
|
4932
4932
|
/* @__PURE__ */ s(
|
|
4933
4933
|
Yt,
|
|
4934
4934
|
{
|
|
4935
|
-
head:
|
|
4935
|
+
head: F ? /* @__PURE__ */ g("div", { className: "sticky top-0 z-10", children: [
|
|
4936
4936
|
K,
|
|
4937
4937
|
j
|
|
4938
4938
|
] }) : void 0,
|
|
@@ -4960,20 +4960,20 @@ const yo = ({
|
|
|
4960
4960
|
},
|
|
4961
4961
|
"lt-channel-message-input"
|
|
4962
4962
|
)
|
|
4963
|
-
] }) : /* @__PURE__ */
|
|
4964
|
-
/* @__PURE__ */
|
|
4963
|
+
] }) : /* @__PURE__ */ g(J, { children: [
|
|
4964
|
+
/* @__PURE__ */ g(
|
|
4965
4965
|
"div",
|
|
4966
4966
|
{
|
|
4967
4967
|
className: "flex-1 overflow-hidden relative",
|
|
4968
4968
|
children: [
|
|
4969
|
-
!
|
|
4969
|
+
!F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ g("div", { className: "str-chat__message-list-scroll", children: [
|
|
4970
4970
|
K,
|
|
4971
4971
|
j
|
|
4972
4972
|
] }) }),
|
|
4973
4973
|
/* @__PURE__ */ s(
|
|
4974
4974
|
Yt,
|
|
4975
4975
|
{
|
|
4976
|
-
head:
|
|
4976
|
+
head: F ? /* @__PURE__ */ g("div", { className: "sticky top-0 z-10", children: [
|
|
4977
4977
|
K,
|
|
4978
4978
|
j
|
|
4979
4979
|
] }) : void 0,
|
|
@@ -4985,7 +4985,7 @@ const yo = ({
|
|
|
4985
4985
|
},
|
|
4986
4986
|
"lt-channel-message-list"
|
|
4987
4987
|
),
|
|
4988
|
-
r ? /* @__PURE__ */ s(
|
|
4988
|
+
r ? /* @__PURE__ */ s(z.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
|
|
4989
4989
|
/* @__PURE__ */ s(
|
|
4990
4990
|
rs,
|
|
4991
4991
|
{
|
|
@@ -5002,7 +5002,7 @@ const yo = ({
|
|
|
5002
5002
|
] }) })
|
|
5003
5003
|
}
|
|
5004
5004
|
) });
|
|
5005
|
-
}, Ws =
|
|
5005
|
+
}, Ws = z.memo(
|
|
5006
5006
|
({
|
|
5007
5007
|
channel: e,
|
|
5008
5008
|
onBack: t,
|
|
@@ -5016,7 +5016,7 @@ const yo = ({
|
|
|
5016
5016
|
CustomChannelEmptyState: m = wo,
|
|
5017
5017
|
showDeleteConversation: h = !0,
|
|
5018
5018
|
onDeleteConversationClick: u,
|
|
5019
|
-
onBlockParticipantClick:
|
|
5019
|
+
onBlockParticipantClick: f,
|
|
5020
5020
|
onReportParticipantClick: c,
|
|
5021
5021
|
showBlockParticipant: x = !0,
|
|
5022
5022
|
showReportParticipant: w = !0,
|
|
@@ -5037,7 +5037,7 @@ const yo = ({
|
|
|
5037
5037
|
viewerLanguage: T,
|
|
5038
5038
|
showChannelInfo: E = !0,
|
|
5039
5039
|
onParticipantNameClick: B,
|
|
5040
|
-
onBroadcastClick:
|
|
5040
|
+
onBroadcastClick: F,
|
|
5041
5041
|
resolveBroadcastName: j,
|
|
5042
5042
|
composerInput: K
|
|
5043
5043
|
}) => {
|
|
@@ -5105,7 +5105,7 @@ const yo = ({
|
|
|
5105
5105
|
CustomChannelEmptyState: m,
|
|
5106
5106
|
showDeleteConversation: h,
|
|
5107
5107
|
onDeleteConversationClick: u,
|
|
5108
|
-
onBlockParticipantClick:
|
|
5108
|
+
onBlockParticipantClick: f,
|
|
5109
5109
|
onReportParticipantClick: c,
|
|
5110
5110
|
showBlockParticipant: x,
|
|
5111
5111
|
showReportParticipant: w,
|
|
@@ -5120,7 +5120,7 @@ const yo = ({
|
|
|
5120
5120
|
viewerLanguage: T,
|
|
5121
5121
|
showChannelInfo: E,
|
|
5122
5122
|
onParticipantNameClick: B,
|
|
5123
|
-
onBroadcastClick:
|
|
5123
|
+
onBroadcastClick: F,
|
|
5124
5124
|
resolveBroadcastName: j,
|
|
5125
5125
|
composerInput: K
|
|
5126
5126
|
}
|
|
@@ -5132,7 +5132,7 @@ const yo = ({
|
|
|
5132
5132
|
}
|
|
5133
5133
|
);
|
|
5134
5134
|
Ws.displayName = "ChannelView";
|
|
5135
|
-
const Ce =
|
|
5135
|
+
const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ g("div", { className: "text-center max-w-sm", children: [
|
|
5136
5136
|
/* @__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: "⚠️" }) }),
|
|
5137
5137
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
5138
5138
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -5160,7 +5160,7 @@ const ol = ({
|
|
|
5160
5160
|
onReportParticipantClick: m,
|
|
5161
5161
|
dmAgentEnabled: h,
|
|
5162
5162
|
onMessageSent: u,
|
|
5163
|
-
chatbotVotingEnabled:
|
|
5163
|
+
chatbotVotingEnabled: f = !1,
|
|
5164
5164
|
viewerLanguage: c,
|
|
5165
5165
|
renderChannelBanner: x,
|
|
5166
5166
|
customChannelActions: w,
|
|
@@ -5181,7 +5181,7 @@ const ol = ({
|
|
|
5181
5181
|
refreshConnection: P,
|
|
5182
5182
|
service: S,
|
|
5183
5183
|
debug: T
|
|
5184
|
-
} = _a(), [E, B] = U(null), [
|
|
5184
|
+
} = _a(), [E, B] = U(null), [F, j] = U(null), [K, se] = U(!1), { showDeleteConversation: G = !0 } = e, y = H(l);
|
|
5185
5185
|
y.current = l;
|
|
5186
5186
|
const I = H(a);
|
|
5187
5187
|
I.current = a;
|
|
@@ -5264,7 +5264,7 @@ const ol = ({
|
|
|
5264
5264
|
message: "Not connected to messaging service",
|
|
5265
5265
|
onBack: P
|
|
5266
5266
|
}
|
|
5267
|
-
) :
|
|
5267
|
+
) : F ? /* @__PURE__ */ s(Ce, { message: F }) : K && !E ? /* @__PURE__ */ s(Ce, { 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(
|
|
5268
5268
|
Ws,
|
|
5269
5269
|
{
|
|
5270
5270
|
channel: E,
|
|
@@ -5279,7 +5279,7 @@ const ol = ({
|
|
|
5279
5279
|
onReportParticipantClick: m,
|
|
5280
5280
|
dmAgentEnabled: h,
|
|
5281
5281
|
onMessageSent: u,
|
|
5282
|
-
chatbotVotingEnabled:
|
|
5282
|
+
chatbotVotingEnabled: f,
|
|
5283
5283
|
viewerLanguage: c,
|
|
5284
5284
|
customChannelActions: w,
|
|
5285
5285
|
renderChannelActions: p,
|
|
@@ -5300,7 +5300,7 @@ function No(e) {
|
|
|
5300
5300
|
for (const n of t)
|
|
5301
5301
|
e.state.addMessageSorted(n.message);
|
|
5302
5302
|
}
|
|
5303
|
-
const qs =
|
|
5303
|
+
const qs = z.createContext({
|
|
5304
5304
|
selectedChannel: void 0,
|
|
5305
5305
|
onChannelSelect: () => {
|
|
5306
5306
|
},
|
|
@@ -5308,7 +5308,7 @@ const qs = F.createContext({
|
|
|
5308
5308
|
renderMessagePreview: void 0,
|
|
5309
5309
|
channelPreview: void 0,
|
|
5310
5310
|
viewerLanguage: void 0
|
|
5311
|
-
}), ko = qs.Provider, Co = () =>
|
|
5311
|
+
}), ko = qs.Provider, Co = () => z.useContext(qs), So = (e, t) => {
|
|
5312
5312
|
const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5313
5313
|
return Math.floor((a - n) / (1e3 * 60 * 60 * 24));
|
|
5314
5314
|
}, Eo = (e) => {
|
|
@@ -5328,7 +5328,7 @@ const qs = F.createContext({
|
|
|
5328
5328
|
day: "numeric",
|
|
5329
5329
|
year: "numeric"
|
|
5330
5330
|
});
|
|
5331
|
-
}, Xs =
|
|
5331
|
+
}, Xs = z.memo(
|
|
5332
5332
|
(e) => {
|
|
5333
5333
|
var D, $, O;
|
|
5334
5334
|
const { channel: t, unread: n } = e, {
|
|
@@ -5350,11 +5350,11 @@ const qs = F.createContext({
|
|
|
5350
5350
|
viewerLanguage: d
|
|
5351
5351
|
}
|
|
5352
5352
|
);
|
|
5353
|
-
const
|
|
5353
|
+
const f = () => {
|
|
5354
5354
|
t && r(t);
|
|
5355
5355
|
}, c = (C) => {
|
|
5356
5356
|
const P = C.key === "Enter" || C.key === " ", S = C.repeat;
|
|
5357
|
-
!P || S || (C.preventDefault(),
|
|
5357
|
+
!P || S || (C.preventDefault(), f());
|
|
5358
5358
|
}, x = ps(
|
|
5359
5359
|
(D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
|
|
5360
5360
|
m == null ? void 0 : m.userID,
|
|
@@ -5397,7 +5397,7 @@ const qs = F.createContext({
|
|
|
5397
5397
|
{
|
|
5398
5398
|
role: "button",
|
|
5399
5399
|
tabIndex: 0,
|
|
5400
|
-
onClick:
|
|
5400
|
+
onClick: f,
|
|
5401
5401
|
onKeyDown: c,
|
|
5402
5402
|
className: k(
|
|
5403
5403
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
@@ -5407,7 +5407,7 @@ const qs = F.createContext({
|
|
|
5407
5407
|
}
|
|
5408
5408
|
),
|
|
5409
5409
|
"data-dd-privacy": "mask",
|
|
5410
|
-
children: /* @__PURE__ */
|
|
5410
|
+
children: /* @__PURE__ */ g("div", { className: "flex items-start gap-4", children: [
|
|
5411
5411
|
/* @__PURE__ */ s(
|
|
5412
5412
|
ye,
|
|
5413
5413
|
{
|
|
@@ -5418,9 +5418,9 @@ const qs = F.createContext({
|
|
|
5418
5418
|
starred: u
|
|
5419
5419
|
}
|
|
5420
5420
|
),
|
|
5421
|
-
/* @__PURE__ */
|
|
5422
|
-
/* @__PURE__ */
|
|
5423
|
-
/* @__PURE__ */
|
|
5421
|
+
/* @__PURE__ */ g("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
5422
|
+
/* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-2", children: [
|
|
5423
|
+
/* @__PURE__ */ g(
|
|
5424
5424
|
"h3",
|
|
5425
5425
|
{
|
|
5426
5426
|
className: k(
|
|
@@ -5434,7 +5434,7 @@ const qs = F.createContext({
|
|
|
5434
5434
|
),
|
|
5435
5435
|
_ && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
|
|
5436
5436
|
] }),
|
|
5437
|
-
/* @__PURE__ */
|
|
5437
|
+
/* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
5438
5438
|
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
|
|
5439
5439
|
L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
|
|
5440
5440
|
] })
|
|
@@ -5445,7 +5445,7 @@ const qs = F.createContext({
|
|
|
5445
5445
|
}
|
|
5446
5446
|
);
|
|
5447
5447
|
Xs.displayName = "CustomChannelPreview";
|
|
5448
|
-
const Io = { last_message_at: -1 }, To =
|
|
5448
|
+
const Io = { last_message_at: -1 }, To = z.memo(
|
|
5449
5449
|
({
|
|
5450
5450
|
onChannelSelect: e,
|
|
5451
5451
|
selectedChannel: t,
|
|
@@ -5459,16 +5459,16 @@ const Io = { last_message_at: -1 }, To = F.memo(
|
|
|
5459
5459
|
channelPreview: m,
|
|
5460
5460
|
renderMessagePreview: h,
|
|
5461
5461
|
viewerLanguage: u,
|
|
5462
|
-
lockChannelOrder:
|
|
5462
|
+
lockChannelOrder: f,
|
|
5463
5463
|
onMessageNewHandler: c,
|
|
5464
5464
|
onMessageNew: x,
|
|
5465
5465
|
onChannelVisible: w,
|
|
5466
5466
|
onAddedToChannel: p,
|
|
5467
5467
|
onChannelUpdated: v
|
|
5468
5468
|
}) => {
|
|
5469
|
-
const b =
|
|
5469
|
+
const b = z.useRef(0);
|
|
5470
5470
|
b.current++;
|
|
5471
|
-
const { debug: N = !1 } = ct(), _ =
|
|
5471
|
+
const { debug: N = !1 } = ct(), _ = z.useCallback(
|
|
5472
5472
|
(R) => {
|
|
5473
5473
|
for (const L of R)
|
|
5474
5474
|
No(L);
|
|
@@ -5481,7 +5481,7 @@ const Io = { last_message_at: -1 }, To = F.memo(
|
|
|
5481
5481
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5482
5482
|
filters: n
|
|
5483
5483
|
});
|
|
5484
|
-
const A =
|
|
5484
|
+
const A = z.useMemo(
|
|
5485
5485
|
() => ({
|
|
5486
5486
|
selectedChannel: t,
|
|
5487
5487
|
onChannelSelect: e,
|
|
@@ -5514,7 +5514,7 @@ const Io = { last_message_at: -1 }, To = F.memo(
|
|
|
5514
5514
|
options: { limit: 30 },
|
|
5515
5515
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5516
5516
|
channelRenderFilterFn: _,
|
|
5517
|
-
lockChannelOrder:
|
|
5517
|
+
lockChannelOrder: f,
|
|
5518
5518
|
onMessageNewHandler: c,
|
|
5519
5519
|
onMessageNew: x,
|
|
5520
5520
|
onChannelVisible: w,
|
|
@@ -5571,9 +5571,9 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5571
5571
|
WebkitLineClamp: r,
|
|
5572
5572
|
overflow: "hidden"
|
|
5573
5573
|
} : h;
|
|
5574
|
-
return /* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
o && /* @__PURE__ */
|
|
5574
|
+
return /* @__PURE__ */ g("div", { className: "shrink-0 px-4 py-3", children: [
|
|
5575
|
+
/* @__PURE__ */ g("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
5576
|
+
o && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
5577
5577
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
5578
5578
|
/* @__PURE__ */ s("p", { className: k("min-w-0", Ao), style: h, children: n })
|
|
5579
5579
|
] }),
|
|
@@ -5602,8 +5602,11 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5602
5602
|
1: [0],
|
|
5603
5603
|
2: [-34, 34],
|
|
5604
5604
|
3: [-58, 0, 58]
|
|
5605
|
-
}, zo = ({ variant: e, images: t
|
|
5606
|
-
const [
|
|
5605
|
+
}, zo = ({ variant: e, images: t }) => {
|
|
5606
|
+
const [n, a] = z.useState({}), r = t.join(`
|
|
5607
|
+
`), [i, l] = z.useState(r);
|
|
5608
|
+
r !== i && (l(r), a({}));
|
|
5609
|
+
const o = t.slice(0, 3).map((u, f) => ({ src: u, index: f })).filter(({ index: u }) => !n[u]), d = o.length >= 3 ? 3 : o.length === 2 ? 2 : 1, m = Oo[d], h = Po[d];
|
|
5607
5610
|
return /* @__PURE__ */ s(
|
|
5608
5611
|
"div",
|
|
5609
5612
|
{
|
|
@@ -5611,23 +5614,22 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5611
5614
|
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5612
5615
|
Do[e]
|
|
5613
5616
|
),
|
|
5614
|
-
children:
|
|
5617
|
+
children: o.map(({ src: u, index: f }, c) => /* @__PURE__ */ s(
|
|
5615
5618
|
"img",
|
|
5616
5619
|
{
|
|
5617
|
-
src: de(
|
|
5618
|
-
alt:
|
|
5619
|
-
"aria-hidden": h !== 0,
|
|
5620
|
+
src: de(u) ?? u,
|
|
5621
|
+
alt: "",
|
|
5620
5622
|
draggable: !1,
|
|
5621
5623
|
loading: "lazy",
|
|
5622
5624
|
decoding: "async",
|
|
5623
|
-
onError: () =>
|
|
5625
|
+
onError: () => a((x) => ({ ...x, [f]: !0 })),
|
|
5624
5626
|
className: "absolute left-1/2 top-1/2 h-[82%] w-[46%] rounded-[12px] object-cover shadow-lg",
|
|
5625
5627
|
style: {
|
|
5626
|
-
transform: `translate(-50%, -50%) translateX(${
|
|
5627
|
-
zIndex:
|
|
5628
|
+
transform: `translate(-50%, -50%) translateX(${h[c]}px) rotate(${m[c]}deg)`,
|
|
5629
|
+
zIndex: c
|
|
5628
5630
|
}
|
|
5629
5631
|
},
|
|
5630
|
-
`${
|
|
5632
|
+
`${u}-${f}`
|
|
5631
5633
|
))
|
|
5632
5634
|
}
|
|
5633
5635
|
);
|
|
@@ -5638,7 +5640,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5638
5640
|
title: a,
|
|
5639
5641
|
heroUrl: r,
|
|
5640
5642
|
onHeroError: i
|
|
5641
|
-
}) => /* @__PURE__ */ s("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n
|
|
5643
|
+
}) => /* @__PURE__ */ s("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n }) : (
|
|
5642
5644
|
// `heroUrl` is the palette-tracked source: it becomes `undefined` when the
|
|
5643
5645
|
// hero image errors, so `CardThumbnail` falls through to its placeholder.
|
|
5644
5646
|
// Do NOT `?? images[0]` here — that would re-instate the failed URL.
|
|
@@ -5667,11 +5669,11 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5667
5669
|
const h = va({
|
|
5668
5670
|
imagePresentation: i,
|
|
5669
5671
|
images: r
|
|
5670
|
-
}), u = r.length > 0,
|
|
5672
|
+
}), u = r.length > 0, f = u && h === "hero", c = He({
|
|
5671
5673
|
variant: e,
|
|
5672
5674
|
accentColor: d,
|
|
5673
5675
|
layout: "featured",
|
|
5674
|
-
thumbnailUrl:
|
|
5676
|
+
thumbnailUrl: f ? r[0] : void 0
|
|
5675
5677
|
}), x = m === "single" || m === "end";
|
|
5676
5678
|
return /* @__PURE__ */ s(
|
|
5677
5679
|
St,
|
|
@@ -5679,7 +5681,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5679
5681
|
accentHex: c.accentHex,
|
|
5680
5682
|
side: e === "dark" ? "sender" : "receiver",
|
|
5681
5683
|
visible: x,
|
|
5682
|
-
children: /* @__PURE__ */
|
|
5684
|
+
children: /* @__PURE__ */ g(
|
|
5683
5685
|
Ee,
|
|
5684
5686
|
{
|
|
5685
5687
|
variant: e,
|
|
@@ -5693,7 +5695,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5693
5695
|
presentation: h,
|
|
5694
5696
|
images: r,
|
|
5695
5697
|
title: t,
|
|
5696
|
-
heroUrl:
|
|
5698
|
+
heroUrl: f ? c.thumbnailUrl : void 0,
|
|
5697
5699
|
onHeroError: c.onImageError
|
|
5698
5700
|
}
|
|
5699
5701
|
),
|
|
@@ -5750,7 +5752,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5750
5752
|
tail: n = !0,
|
|
5751
5753
|
header: a,
|
|
5752
5754
|
className: r
|
|
5753
|
-
}) => /* @__PURE__ */
|
|
5755
|
+
}) => /* @__PURE__ */ g(
|
|
5754
5756
|
"div",
|
|
5755
5757
|
{
|
|
5756
5758
|
"data-dd-privacy": "mask",
|
|
@@ -5819,7 +5821,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5819
5821
|
avatarName: l
|
|
5820
5822
|
}) => {
|
|
5821
5823
|
const o = xa(e);
|
|
5822
|
-
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */
|
|
5824
|
+
return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ g("div", { className: "flex gap-3 items-end", children: [
|
|
5823
5825
|
(i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
|
|
5824
5826
|
ye,
|
|
5825
5827
|
{
|
|
@@ -5830,7 +5832,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
|
|
|
5830
5832
|
shape: "circle"
|
|
5831
5833
|
}
|
|
5832
5834
|
) }),
|
|
5833
|
-
/* @__PURE__ */
|
|
5835
|
+
/* @__PURE__ */ g(
|
|
5834
5836
|
"div",
|
|
5835
5837
|
{
|
|
5836
5838
|
className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
|
|
@@ -5891,4 +5893,4 @@ export {
|
|
|
5891
5893
|
ps as y,
|
|
5892
5894
|
mt as z
|
|
5893
5895
|
};
|
|
5894
|
-
//# sourceMappingURL=index-
|
|
5896
|
+
//# sourceMappingURL=index-CrdAtOBl.js.map
|