@linktr.ee/messaging-react 4.1.1-rc-1786776913 → 4.1.2
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-Bxat0g1O.cjs → Card-1LeQJY-E.cjs} +2 -2
- package/dist/{Card-Bxat0g1O.cjs.map → Card-1LeQJY-E.cjs.map} +1 -1
- package/dist/{Card-xYcNcZC_.js → Card-BXlNaNGk.js} +2 -2
- package/dist/{Card-xYcNcZC_.js.map → Card-BXlNaNGk.js.map} +1 -1
- package/dist/{index-t0Okjl1p.js → index-C1cbPKI7.js} +847 -853
- package/dist/index-C1cbPKI7.js.map +1 -0
- package/dist/index-yg1xEb2Y.cjs +3 -0
- package/dist/index-yg1xEb2Y.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/AttachmentCard/MediaPlayer.tsx +10 -8
- package/src/components/CustomMessageInput/index.tsx +13 -16
- package/dist/index-CAD8AXBg.cjs +0 -3
- package/dist/index-CAD8AXBg.cjs.map +0 -1
- package/dist/index-t0Okjl1p.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import z, { createContext as je, useContext as xe, useCallback as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { isOfficialChannel as
|
|
7
|
-
import
|
|
8
|
-
import { StarIcon as at, DotsThreeIcon as
|
|
9
|
-
import { MessageActions as
|
|
10
|
-
const
|
|
2
|
+
import z, { createContext as je, useContext as xe, useCallback as X, useState as B, useRef as V, useEffect as W, useId as rs, Suspense as is, useMemo as le } from "react";
|
|
3
|
+
import { StreamChatService as ls } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as os, LinkPreviewsManager as nt } from "stream-chat";
|
|
5
|
+
import { Chat as cs, useChannelStateContext as we, useChatContext as He, DateSeparator as ds, useMessageContext as fe, MessageStatus as us, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as ms, useMessageReminder as hs, useComponentContext as mn, Attachment as fs, EditMessageModal as gs, MessageBlocked as ps, MessageBouncePrompt as bs, MessageDeleted as vs, MessageIsThreadReplyInChannelButtonIndicator as xs, MessageRepliesCountButton as ws, ReminderNotification as _s, StreamedMessageText as ys, messageHasAttachments as Ns, messageHasReactions as ks, isDateSeparatorMessage as Cs, isMessageBlocked as Ss, isMessageBounced as Es, MessageBounceModal as Is, Poll as Ts, useMessageComposer as As, useStateStore as Rs, MessageInput as Vt, useMessageInputContext as Ls, useMessageComposerHasSendableData as Ms, AttachmentPreviewList as Ds, QuotedMessagePreview as Os, TextareaComposer as Ps, MessageTimestamp as Xe, AIStates as qe, useTypingContext as zs, useAIState as Fs, Channel as $s, WithComponents as Bs, Window as Us, MessageList as Gt, ChannelList as js, InfiniteScroll as Hs } from "stream-chat-react";
|
|
6
|
+
import { isOfficialChannel as hn, OFFICIAL_SENDER_USER_ID as Vs, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Yt, isAgeSafetySystemType as Gs, resolveRichCardImagePresentation as Ys, selectEnabledFaqs as Ws } from "@linktr.ee/messaging-taxonomy";
|
|
7
|
+
import N from "classnames";
|
|
8
|
+
import { StarIcon as at, DotsThreeIcon as Xs, SpinnerGapIcon as Oe, SignOutIcon as qs, ProhibitInsetIcon as Wt, FlagIcon as fn, CurrencyDollarIcon as Ks, CaretRightIcon as gn, ArrowLeftIcon as Zs, FileIcon as pn, ImageIcon as Js, SpeakerHighIcon as Qs, VideoCameraIcon as bn, FileMdIcon as ea, FileTextIcon as ta, FileZipIcon as na, FilePptIcon as sa, FileCsvIcon as aa, FileXlsIcon as ra, FileDocIcon as ia, FilePdfIcon as la, CircleNotchIcon as be, PlayIcon as rt, PauseIcon as oa, LinkIcon as ca, DownloadSimpleIcon as Se, GiftIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, XIcon as lt, PencilSimpleIcon as fa, CaretLeftIcon as ga, TrashSimpleIcon as pa, ArrowUpIcon as ba, SparkleIcon as va, ProhibitIcon as xa } from "@phosphor-icons/react";
|
|
9
|
+
import { MessageActions as wa, DefaultDropdownActionButton as vn } from "stream-chat-react/experimental";
|
|
10
|
+
const xn = je({
|
|
11
11
|
service: null,
|
|
12
12
|
client: null,
|
|
13
13
|
isConnected: !1,
|
|
@@ -17,7 +17,7 @@ const vn = je({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}), ot = () => xe(
|
|
20
|
+
}), ot = () => xe(xn), eo = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: s,
|
|
@@ -27,7 +27,7 @@ const vn = je({
|
|
|
27
27
|
client: o
|
|
28
28
|
}) => {
|
|
29
29
|
var S, C;
|
|
30
|
-
const l =
|
|
30
|
+
const l = X(
|
|
31
31
|
(A, ...P) => {
|
|
32
32
|
i && console.log(`🔥 [MessagingProvider] ${A}`, ...P);
|
|
33
33
|
},
|
|
@@ -39,16 +39,16 @@ const vn = je({
|
|
|
39
39
|
serviceConfig: !!s,
|
|
40
40
|
capabilities: Object.keys(r)
|
|
41
41
|
});
|
|
42
|
-
const [d, u] = B(null), [h, m] = B(null), [g, c] = B(!1), [p, w] = B(!1), [v, x] = B(null), b =
|
|
42
|
+
const [d, u] = B(null), [h, m] = B(null), [g, c] = B(!1), [p, w] = B(!1), [v, x] = B(null), b = V(!1), y = V(null), _ = V(s);
|
|
43
43
|
_.current = s;
|
|
44
|
-
const T =
|
|
44
|
+
const T = V(i);
|
|
45
45
|
T.current = i;
|
|
46
|
-
const L =
|
|
46
|
+
const L = V({
|
|
47
47
|
userId: t == null ? void 0 : t.id,
|
|
48
48
|
apiKey: a,
|
|
49
49
|
serviceConfig: s,
|
|
50
50
|
capabilities: r
|
|
51
|
-
}), E =
|
|
51
|
+
}), E = V(0);
|
|
52
52
|
E.current++, l("📊 RENDER INFO", {
|
|
53
53
|
renderCount: E.current,
|
|
54
54
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
@@ -64,13 +64,13 @@ const vn = je({
|
|
|
64
64
|
serviceConfig: s,
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
|
-
const $ =
|
|
68
|
-
!o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new
|
|
67
|
+
const $ = V(null);
|
|
68
|
+
!o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new os(a) });
|
|
69
69
|
const F = o || (a ? ((C = $.current) == null ? void 0 : C.client) ?? null : null);
|
|
70
|
-
|
|
70
|
+
W(() => {
|
|
71
71
|
const A = E.current, P = _.current;
|
|
72
72
|
if (o) {
|
|
73
|
-
|
|
73
|
+
y.current = null, u(null), m(null), c(!1), x(null), w(!1);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
76
|
if (!a || !F || !P) {
|
|
@@ -84,19 +84,19 @@ const vn = je({
|
|
|
84
84
|
renderCount: A,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const U = new
|
|
87
|
+
const U = new ls({
|
|
88
88
|
...P,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: T.current,
|
|
91
91
|
client: F
|
|
92
92
|
});
|
|
93
|
-
|
|
93
|
+
y.current = U, u(U), l("✅ SERVICE SET", {
|
|
94
94
|
renderCount: A,
|
|
95
95
|
serviceInstance: !!U
|
|
96
96
|
});
|
|
97
97
|
}, [a, F, o]);
|
|
98
|
-
const R =
|
|
99
|
-
|
|
98
|
+
const R = V(null);
|
|
99
|
+
W(() => {
|
|
100
100
|
var P, U;
|
|
101
101
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
102
102
|
hasService: !!d,
|
|
@@ -126,16 +126,16 @@ const vn = je({
|
|
|
126
126
|
l("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), x(null);
|
|
127
127
|
try {
|
|
128
128
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
129
|
-
const
|
|
130
|
-
m(
|
|
129
|
+
const G = await d.connectUser(t);
|
|
130
|
+
m(G), c(!0), R.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
131
131
|
userId: t.id,
|
|
132
|
-
clientId:
|
|
132
|
+
clientId: G.userID
|
|
133
133
|
});
|
|
134
|
-
} catch (
|
|
135
|
-
const
|
|
136
|
-
x(
|
|
134
|
+
} catch (G) {
|
|
135
|
+
const ee = G instanceof Error ? G.message : "Connection failed";
|
|
136
|
+
x(ee), l("❌ USER CONNECTION ERROR", {
|
|
137
137
|
userId: t.id,
|
|
138
|
-
error:
|
|
138
|
+
error: ee
|
|
139
139
|
});
|
|
140
140
|
} finally {
|
|
141
141
|
w(!1), b.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
@@ -144,14 +144,14 @@ const vn = je({
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
})();
|
|
147
|
-
}, [d, t, l, g, o]),
|
|
147
|
+
}, [d, t, l, g, o]), W(() => {
|
|
148
148
|
const A = F;
|
|
149
149
|
return () => {
|
|
150
150
|
var P;
|
|
151
|
-
A && (R.current = null, (P =
|
|
151
|
+
A && (R.current = null, (P = y.current) == null || P.disconnectUser().catch(console.error));
|
|
152
152
|
};
|
|
153
153
|
}, [F]);
|
|
154
|
-
const I =
|
|
154
|
+
const I = X(async () => {
|
|
155
155
|
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
156
156
|
hasService: !!d,
|
|
157
157
|
hasUser: !!t
|
|
@@ -175,7 +175,7 @@ const vn = je({
|
|
|
175
175
|
w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
}, [d, t, l, o]),
|
|
178
|
+
}, [d, t, l, o]), M = z.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!d,
|
|
180
180
|
hasClient: !!h,
|
|
181
181
|
isConnected: g,
|
|
@@ -214,9 +214,9 @@ const vn = je({
|
|
|
214
214
|
return l("🔄 RENDER END", {
|
|
215
215
|
renderCount: E.current,
|
|
216
216
|
willRenderChat: !!F,
|
|
217
|
-
contextValueReady: !!
|
|
218
|
-
}), /* @__PURE__ */ n(
|
|
219
|
-
|
|
217
|
+
contextValueReady: !!M
|
|
218
|
+
}), /* @__PURE__ */ n(xn.Provider, { value: M, children: F ? /* @__PURE__ */ n(
|
|
219
|
+
cs,
|
|
220
220
|
{
|
|
221
221
|
client: F,
|
|
222
222
|
customClasses: {
|
|
@@ -225,12 +225,12 @@ const vn = je({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
},
|
|
228
|
+
}, _a = () => ot(), wn = (e) => {
|
|
229
229
|
var a, r;
|
|
230
230
|
const [t, s] = B(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
232
232
|
);
|
|
233
|
-
return
|
|
233
|
+
return W(() => {
|
|
234
234
|
var o;
|
|
235
235
|
if (!e) {
|
|
236
236
|
s(!1);
|
|
@@ -248,13 +248,13 @@ const vn = je({
|
|
|
248
248
|
};
|
|
249
249
|
}, [e]), t;
|
|
250
250
|
};
|
|
251
|
-
function
|
|
251
|
+
function _n(e, t, s) {
|
|
252
252
|
const a = Object.values(e || {});
|
|
253
|
-
if (
|
|
253
|
+
if (hn(s)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
256
|
var o;
|
|
257
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
257
|
+
return ((o = i.user) == null ? void 0 : o.id) === Vs;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -266,15 +266,15 @@ function wn(e, t, s) {
|
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
271
|
-
return
|
|
269
|
+
const ya = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
270
|
+
function Na(e) {
|
|
271
|
+
return ya.test(e.trim());
|
|
272
272
|
}
|
|
273
273
|
function Xt(e, t) {
|
|
274
274
|
const s = e == null ? void 0 : e.trim();
|
|
275
|
-
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Na(s);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function yn(e) {
|
|
278
278
|
return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
280
|
const qt = [
|
|
@@ -305,7 +305,7 @@ const qt = [
|
|
|
305
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
306
306
|
// Melon
|
|
307
307
|
];
|
|
308
|
-
function
|
|
308
|
+
function ka(e) {
|
|
309
309
|
let t = 0;
|
|
310
310
|
for (let s = 0; s < e.length; s++) {
|
|
311
311
|
const a = e.charCodeAt(s);
|
|
@@ -313,14 +313,14 @@ function Na(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return qt[
|
|
318
|
-
}
|
|
319
|
-
function ka(e) {
|
|
320
|
-
return yn(e).emoji;
|
|
316
|
+
function Nn(e) {
|
|
317
|
+
return qt[ka(e) % qt.length];
|
|
321
318
|
}
|
|
322
319
|
function Ca(e) {
|
|
323
|
-
return
|
|
320
|
+
return Nn(e).emoji;
|
|
321
|
+
}
|
|
322
|
+
function Sa(e) {
|
|
323
|
+
return Nn(e).bgColor;
|
|
324
324
|
}
|
|
325
325
|
const _e = ({
|
|
326
326
|
id: e,
|
|
@@ -331,11 +331,11 @@ const _e = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: o = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const l =
|
|
334
|
+
const l = Ca(e), d = Sa(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
338
|
-
className:
|
|
338
|
+
className: N(
|
|
339
339
|
"avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
|
|
340
340
|
),
|
|
341
341
|
style: { fontSize: m, lineHeight: 1 },
|
|
@@ -345,7 +345,7 @@ const _e = ({
|
|
|
345
345
|
return /* @__PURE__ */ f(
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
348
|
-
className:
|
|
348
|
+
className: N("relative flex-shrink-0", a),
|
|
349
349
|
style: {
|
|
350
350
|
"--str-chat__avatar-size": `${s}px`,
|
|
351
351
|
width: `${s}px`,
|
|
@@ -366,7 +366,7 @@ const _e = ({
|
|
|
366
366
|
"div",
|
|
367
367
|
{
|
|
368
368
|
"data-testid": "avatar-ring",
|
|
369
|
-
className:
|
|
369
|
+
className: N("h-full w-full", "bg-transparent"),
|
|
370
370
|
style: {
|
|
371
371
|
...c,
|
|
372
372
|
...o && {
|
|
@@ -382,7 +382,7 @@ const _e = ({
|
|
|
382
382
|
]
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, Ea = "https://linktr.ee/s/about/trust-center/report", Ia = ({
|
|
386
386
|
channel: e,
|
|
387
387
|
participant: t,
|
|
388
388
|
showBlockParticipant: s = !0,
|
|
@@ -395,9 +395,9 @@ const _e = ({
|
|
|
395
395
|
onActionComplete: u,
|
|
396
396
|
logLabel: h = "useChannelModerationActions"
|
|
397
397
|
}) => {
|
|
398
|
-
var
|
|
399
|
-
const { service: m, debug: g } = ot(), c = (
|
|
400
|
-
return
|
|
398
|
+
var M;
|
|
399
|
+
const { service: m, debug: g } = ot(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [y, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
|
|
400
|
+
return W(() => {
|
|
401
401
|
if (!p || !m || !c) {
|
|
402
402
|
v(!1), b(null);
|
|
403
403
|
return;
|
|
@@ -423,11 +423,11 @@ const _e = ({
|
|
|
423
423
|
}, [p, m, c, h]), {
|
|
424
424
|
isParticipantBlocked: w,
|
|
425
425
|
isCheckingBlockedStatus: E,
|
|
426
|
-
isLeaving:
|
|
426
|
+
isLeaving: y,
|
|
427
427
|
isUpdatingBlockStatus: T,
|
|
428
428
|
handleLeaveConversation: async () => {
|
|
429
429
|
var S;
|
|
430
|
-
if (!
|
|
430
|
+
if (!y) {
|
|
431
431
|
o == null || o(), g && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
|
|
432
432
|
try {
|
|
433
433
|
const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
|
|
@@ -466,7 +466,7 @@ const _e = ({
|
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleReportUser: () => {
|
|
469
|
-
d == null || d(), u == null || u(), window.open(
|
|
469
|
+
d == null || d(), u == null || u(), window.open(Ea, "_blank", "noopener,noreferrer");
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
}, Ne = ({
|
|
@@ -478,7 +478,7 @@ const _e = ({
|
|
|
478
478
|
"button",
|
|
479
479
|
{
|
|
480
480
|
type: "button",
|
|
481
|
-
className:
|
|
481
|
+
className: N(
|
|
482
482
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
483
483
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
484
484
|
t
|
|
@@ -486,7 +486,7 @@ const _e = ({
|
|
|
486
486
|
...a,
|
|
487
487
|
children: s
|
|
488
488
|
}
|
|
489
|
-
),
|
|
489
|
+
), Ta = ({
|
|
490
490
|
channel: e,
|
|
491
491
|
participant: t,
|
|
492
492
|
showDeleteConversation: s = !0,
|
|
@@ -500,16 +500,16 @@ const _e = ({
|
|
|
500
500
|
customChannelActions: h,
|
|
501
501
|
triggerClassName: m
|
|
502
502
|
}) => {
|
|
503
|
-
const [g, c] = B(!1), p =
|
|
503
|
+
const [g, c] = B(!1), p = V(null), w = rs(), v = X(() => c(!1), []), {
|
|
504
504
|
isParticipantBlocked: x,
|
|
505
505
|
isCheckingBlockedStatus: b,
|
|
506
|
-
isLeaving:
|
|
506
|
+
isLeaving: y,
|
|
507
507
|
isUpdatingBlockStatus: _,
|
|
508
508
|
handleLeaveConversation: T,
|
|
509
509
|
handleBlockUser: L,
|
|
510
510
|
handleUnblockUser: E,
|
|
511
511
|
handleReportUser: $
|
|
512
|
-
} =
|
|
512
|
+
} = Ia({
|
|
513
513
|
channel: e,
|
|
514
514
|
participant: t,
|
|
515
515
|
showBlockParticipant: a,
|
|
@@ -522,12 +522,12 @@ const _e = ({
|
|
|
522
522
|
onActionComplete: v,
|
|
523
523
|
logLabel: "ChannelActionsMenu"
|
|
524
524
|
});
|
|
525
|
-
return
|
|
525
|
+
return W(() => {
|
|
526
526
|
if (!g) return;
|
|
527
|
-
const R = (
|
|
528
|
-
p.current && !p.current.contains(
|
|
529
|
-
}, I = (
|
|
530
|
-
|
|
527
|
+
const R = (M) => {
|
|
528
|
+
p.current && !p.current.contains(M.target) && c(!1);
|
|
529
|
+
}, I = (M) => {
|
|
530
|
+
M.key === "Escape" && c(!1);
|
|
531
531
|
};
|
|
532
532
|
return document.addEventListener("mousedown", R), document.addEventListener("keydown", I), () => {
|
|
533
533
|
document.removeEventListener("mousedown", R), document.removeEventListener("keydown", I);
|
|
@@ -543,7 +543,7 @@ const _e = ({
|
|
|
543
543
|
"aria-controls": g ? w : void 0,
|
|
544
544
|
onClick: () => c((R) => !R),
|
|
545
545
|
children: [
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(Xs, { className: "size-5 text-black/90" }),
|
|
547
547
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
@@ -553,7 +553,7 @@ const _e = ({
|
|
|
553
553
|
{
|
|
554
554
|
id: w,
|
|
555
555
|
"aria-label": "Conversation options",
|
|
556
|
-
className:
|
|
556
|
+
className: N(
|
|
557
557
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
558
558
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
559
559
|
),
|
|
@@ -562,10 +562,10 @@ const _e = ({
|
|
|
562
562
|
Ne,
|
|
563
563
|
{
|
|
564
564
|
onClick: T,
|
|
565
|
-
disabled:
|
|
566
|
-
"aria-busy":
|
|
565
|
+
disabled: y,
|
|
566
|
+
"aria-busy": y,
|
|
567
567
|
children: [
|
|
568
|
-
|
|
568
|
+
y ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(qs, { className: "h-5 w-5" }),
|
|
569
569
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
@@ -601,7 +601,7 @@ const _e = ({
|
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
603
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: $, children: [
|
|
604
|
-
/* @__PURE__ */ n(
|
|
604
|
+
/* @__PURE__ */ n(fn, { className: "h-5 w-5" }),
|
|
605
605
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
606
606
|
] }) }),
|
|
607
607
|
h
|
|
@@ -609,7 +609,7 @@ const _e = ({
|
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] });
|
|
612
|
-
}, Ke = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring",
|
|
612
|
+
}, Ke = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
|
|
613
613
|
className: e,
|
|
614
614
|
onBack: t,
|
|
615
615
|
showBackButton: s,
|
|
@@ -627,18 +627,18 @@ const _e = ({
|
|
|
627
627
|
showChannelInfo: p = !0,
|
|
628
628
|
onParticipantNameClick: w
|
|
629
629
|
}) => {
|
|
630
|
-
var I,
|
|
630
|
+
var I, M, S, C;
|
|
631
631
|
const { channel: v } = we(), { client: x } = He(), b = z.useMemo(
|
|
632
632
|
() => {
|
|
633
633
|
var A;
|
|
634
|
-
return
|
|
634
|
+
return _n(
|
|
635
635
|
(A = v.state) == null ? void 0 : A.members,
|
|
636
636
|
x == null ? void 0 : x.userID,
|
|
637
637
|
v.type
|
|
638
638
|
);
|
|
639
639
|
},
|
|
640
640
|
[(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
|
|
641
|
-
),
|
|
641
|
+
), y = yn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = wn(v), L = Ra((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
|
|
642
642
|
try {
|
|
643
643
|
T ? await v.unpin() : await v.pin();
|
|
644
644
|
} catch (A) {
|
|
@@ -652,7 +652,7 @@ const _e = ({
|
|
|
652
652
|
_e,
|
|
653
653
|
{
|
|
654
654
|
id: ((C = b == null ? void 0 : b.user) == null ? void 0 : C.id) || v.id || "unknown",
|
|
655
|
-
name:
|
|
655
|
+
name: y,
|
|
656
656
|
image: _,
|
|
657
657
|
shape: "circle",
|
|
658
658
|
size: 48,
|
|
@@ -662,19 +662,19 @@ const _e = ({
|
|
|
662
662
|
/* @__PURE__ */ n(
|
|
663
663
|
"span",
|
|
664
664
|
{
|
|
665
|
-
className:
|
|
665
|
+
className: N(
|
|
666
666
|
"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",
|
|
667
667
|
$ ? "pl-3 pr-2" : "px-3"
|
|
668
668
|
),
|
|
669
669
|
children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
670
|
-
/* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children:
|
|
670
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: y }),
|
|
671
671
|
$ && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
|
|
672
672
|
L && /* @__PURE__ */ n(
|
|
673
673
|
"span",
|
|
674
674
|
{
|
|
675
675
|
"aria-label": "Paid customer",
|
|
676
676
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
677
|
-
children: /* @__PURE__ */ n(
|
|
677
|
+
children: /* @__PURE__ */ n(Ks, { className: "size-2.5", weight: "bold" })
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
|
|
@@ -686,7 +686,7 @@ const _e = ({
|
|
|
686
686
|
}
|
|
687
687
|
) }),
|
|
688
688
|
w && /* @__PURE__ */ n(
|
|
689
|
-
|
|
689
|
+
gn,
|
|
690
690
|
{
|
|
691
691
|
"aria-hidden": "true",
|
|
692
692
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -701,7 +701,7 @@ const _e = ({
|
|
|
701
701
|
return /* @__PURE__ */ n(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
|
-
className:
|
|
704
|
+
className: N(
|
|
705
705
|
"@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
|
|
706
706
|
e
|
|
707
707
|
),
|
|
@@ -709,7 +709,7 @@ const _e = ({
|
|
|
709
709
|
/* @__PURE__ */ n("div", { className: "flex items-start", children: s && /* @__PURE__ */ n(
|
|
710
710
|
"button",
|
|
711
711
|
{
|
|
712
|
-
className:
|
|
712
|
+
className: N(
|
|
713
713
|
Ke,
|
|
714
714
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
715
715
|
),
|
|
@@ -717,7 +717,7 @@ const _e = ({
|
|
|
717
717
|
}),
|
|
718
718
|
type: "button",
|
|
719
719
|
"aria-label": "Back to conversations",
|
|
720
|
-
children: /* @__PURE__ */ n(
|
|
720
|
+
children: /* @__PURE__ */ n(Zs, { className: "size-5 text-black/90" })
|
|
721
721
|
}
|
|
722
722
|
) }),
|
|
723
723
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
|
|
@@ -725,7 +725,7 @@ const _e = ({
|
|
|
725
725
|
{
|
|
726
726
|
type: "button",
|
|
727
727
|
onClick: w,
|
|
728
|
-
"aria-label": `View details for ${
|
|
728
|
+
"aria-label": `View details for ${y}`,
|
|
729
729
|
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
730
730
|
children: R
|
|
731
731
|
}
|
|
@@ -742,7 +742,7 @@ const _e = ({
|
|
|
742
742
|
children: /* @__PURE__ */ n(
|
|
743
743
|
at,
|
|
744
744
|
{
|
|
745
|
-
className:
|
|
745
|
+
className: N("size-5", {
|
|
746
746
|
"text-[#FFD60A]": T,
|
|
747
747
|
"text-black/90": !T
|
|
748
748
|
}),
|
|
@@ -752,7 +752,7 @@ const _e = ({
|
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
754
|
p && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
755
|
-
|
|
755
|
+
Ta,
|
|
756
756
|
{
|
|
757
757
|
channel: v,
|
|
758
758
|
participant: b,
|
|
@@ -772,40 +772,40 @@ const _e = ({
|
|
|
772
772
|
] })
|
|
773
773
|
}
|
|
774
774
|
);
|
|
775
|
-
},
|
|
776
|
-
function
|
|
775
|
+
}, Ma = (e) => /* @__PURE__ */ n(ds, { ...e, position: "center" });
|
|
776
|
+
function Da(e) {
|
|
777
777
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function kn({
|
|
780
780
|
message: e,
|
|
781
781
|
viewerLanguage: t
|
|
782
782
|
}) {
|
|
783
783
|
var r;
|
|
784
|
-
const s = e == null ? void 0 : e.text, a =
|
|
784
|
+
const s = e == null ? void 0 : e.text, a = Da(t);
|
|
785
785
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
function
|
|
787
|
+
const Oa = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
|
|
788
|
+
function Pa(e) {
|
|
789
789
|
try {
|
|
790
790
|
return new URL(e).hostname.toLowerCase();
|
|
791
791
|
} catch {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
795
|
+
function za(e) {
|
|
796
|
+
return Oa.some(
|
|
797
797
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
function ce(e) {
|
|
801
801
|
const t = e == null ? void 0 : e.trim();
|
|
802
802
|
if (!t) return;
|
|
803
|
-
const s =
|
|
804
|
-
if (!s || !
|
|
803
|
+
const s = Pa(t);
|
|
804
|
+
if (!s || !za(s)) return t;
|
|
805
805
|
const a = new URL(t);
|
|
806
806
|
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const Fa = [
|
|
809
809
|
[/pdf/, "pdf"],
|
|
810
810
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
811
811
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -818,39 +818,39 @@ const za = [
|
|
|
818
818
|
function de(e) {
|
|
819
819
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const t =
|
|
821
|
+
function Cn(e) {
|
|
822
|
+
const t = Fa.find(
|
|
823
823
|
([s]) => s.test(e)
|
|
824
824
|
);
|
|
825
825
|
return t ? t[1] : "generic";
|
|
826
826
|
}
|
|
827
|
-
const
|
|
828
|
-
video:
|
|
829
|
-
audio:
|
|
830
|
-
image:
|
|
831
|
-
document:
|
|
832
|
-
},
|
|
833
|
-
pdf:
|
|
834
|
-
doc:
|
|
835
|
-
xls:
|
|
836
|
-
csv:
|
|
837
|
-
ppt:
|
|
838
|
-
zip:
|
|
839
|
-
text:
|
|
840
|
-
markdown:
|
|
841
|
-
generic:
|
|
827
|
+
const $a = {
|
|
828
|
+
video: bn,
|
|
829
|
+
audio: Qs,
|
|
830
|
+
image: Js,
|
|
831
|
+
document: pn
|
|
832
|
+
}, Ba = {
|
|
833
|
+
pdf: la,
|
|
834
|
+
doc: ia,
|
|
835
|
+
xls: ra,
|
|
836
|
+
csv: aa,
|
|
837
|
+
ppt: sa,
|
|
838
|
+
zip: na,
|
|
839
|
+
text: ta,
|
|
840
|
+
markdown: ea,
|
|
841
|
+
generic: pn
|
|
842
842
|
};
|
|
843
|
-
function
|
|
843
|
+
function Ua(e) {
|
|
844
844
|
const t = de(e);
|
|
845
|
-
return t !== "document" ?
|
|
845
|
+
return t !== "document" ? $a[t] : Ba[Cn(e)];
|
|
846
846
|
}
|
|
847
847
|
function ve(e, t) {
|
|
848
|
-
return z.createElement(
|
|
848
|
+
return z.createElement(Ua(e), t);
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const ja = (e) => {
|
|
851
851
|
var t, s;
|
|
852
852
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
853
|
-
},
|
|
853
|
+
}, Ha = ({
|
|
854
854
|
source: e,
|
|
855
855
|
mimeType: t,
|
|
856
856
|
poster: s,
|
|
@@ -862,74 +862,79 @@ const Ua = (e) => {
|
|
|
862
862
|
muted: d = !1,
|
|
863
863
|
onContainerClick: u
|
|
864
864
|
}) => {
|
|
865
|
-
const h = de(t), m =
|
|
865
|
+
const h = de(t), m = V(null), g = V(null), c = V(null), p = V(r), [w, v] = B(a), [x, b] = B(0), [y, _] = B(!1), [T, L] = B(!1), [E, $] = B(!1), [F, R] = B(!1), [I, M] = B(!0), [S, C] = B(null), A = X(() => {
|
|
866
866
|
$(!1), v(!0);
|
|
867
|
-
}, []), P =
|
|
868
|
-
const
|
|
869
|
-
if (!
|
|
870
|
-
const
|
|
867
|
+
}, []), P = X((k) => {
|
|
868
|
+
const D = g.current;
|
|
869
|
+
if (!D) return 0;
|
|
870
|
+
const Y = D.getBoundingClientRect();
|
|
871
871
|
return Math.max(
|
|
872
872
|
0,
|
|
873
|
-
Math.min(1, (
|
|
873
|
+
Math.min(1, (ja(k) - Y.left) / Y.width)
|
|
874
874
|
);
|
|
875
|
-
}, []), U =
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
}, []),
|
|
879
|
-
|
|
880
|
-
const
|
|
881
|
-
b(
|
|
882
|
-
}
|
|
883
|
-
|
|
875
|
+
}, []), U = X((k) => {
|
|
876
|
+
const D = m.current;
|
|
877
|
+
D && D.duration && (D.currentTime = k * D.duration);
|
|
878
|
+
}, []), G = (k) => {
|
|
879
|
+
k.stopPropagation(), _(!0);
|
|
880
|
+
const D = P(k);
|
|
881
|
+
b(D), U(D);
|
|
882
|
+
}, ee = X(
|
|
883
|
+
(k) => {
|
|
884
|
+
k.key === "ArrowRight" && U(Math.min(1, x + 0.05)), k.key === "ArrowLeft" && U(Math.max(0, x - 0.05));
|
|
885
|
+
},
|
|
886
|
+
[U, x]
|
|
887
|
+
);
|
|
888
|
+
W(() => {
|
|
884
889
|
r !== void 0 && r !== p.current && (p.current = r, v(r));
|
|
885
|
-
}, [r]),
|
|
890
|
+
}, [r]), W(() => {
|
|
886
891
|
if (!w) {
|
|
887
892
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
888
893
|
return;
|
|
889
894
|
}
|
|
890
|
-
const
|
|
891
|
-
const
|
|
892
|
-
|
|
895
|
+
const k = () => {
|
|
896
|
+
const D = m.current;
|
|
897
|
+
D && D.duration && !y && b(D.currentTime / D.duration), c.current = requestAnimationFrame(k);
|
|
893
898
|
};
|
|
894
|
-
return c.current = requestAnimationFrame(
|
|
899
|
+
return c.current = requestAnimationFrame(k), () => {
|
|
895
900
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
896
901
|
};
|
|
897
|
-
}, [w,
|
|
898
|
-
const
|
|
899
|
-
|
|
902
|
+
}, [w, y]), W(() => {
|
|
903
|
+
const k = m.current;
|
|
904
|
+
k && (w ? k.play().catch((D) => {
|
|
900
905
|
v(!1), $(!0);
|
|
901
|
-
}) :
|
|
902
|
-
}, [w]),
|
|
903
|
-
if (!
|
|
904
|
-
const
|
|
905
|
-
_(!1), U(P(
|
|
906
|
+
}) : k.pause());
|
|
907
|
+
}, [w]), W(() => {
|
|
908
|
+
if (!y) return;
|
|
909
|
+
const k = (Y) => b(P(Y)), D = (Y) => {
|
|
910
|
+
_(!1), U(P(Y));
|
|
906
911
|
};
|
|
907
|
-
return window.addEventListener("mousemove",
|
|
908
|
-
window.removeEventListener("mousemove",
|
|
912
|
+
return window.addEventListener("mousemove", k), window.addEventListener("mouseup", D), window.addEventListener("touchmove", k, { passive: !0 }), window.addEventListener("touchend", D), () => {
|
|
913
|
+
window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", D), window.removeEventListener("touchmove", k), window.removeEventListener("touchend", D);
|
|
909
914
|
};
|
|
910
|
-
}, [
|
|
911
|
-
const
|
|
915
|
+
}, [y, P, U]);
|
|
916
|
+
const Z = S ? { aspectRatio: String(S) } : void 0, J = S ? "" : " aspect-video", H = Math.round(x * 100);
|
|
912
917
|
return /* @__PURE__ */ f(
|
|
913
918
|
"div",
|
|
914
919
|
{
|
|
915
920
|
role: "button",
|
|
916
921
|
tabIndex: 0,
|
|
917
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
918
|
-
style:
|
|
919
|
-
onClick: (
|
|
922
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
|
|
923
|
+
style: Z,
|
|
924
|
+
onClick: (k) => {
|
|
920
925
|
if (u) {
|
|
921
|
-
u(
|
|
926
|
+
u(k);
|
|
922
927
|
return;
|
|
923
928
|
}
|
|
924
|
-
E || o && v((
|
|
929
|
+
E || o && v((D) => !D);
|
|
925
930
|
},
|
|
926
|
-
onKeyDown: (
|
|
927
|
-
if (!(
|
|
928
|
-
if (
|
|
929
|
-
u(
|
|
931
|
+
onKeyDown: (k) => {
|
|
932
|
+
if (!(k.key !== "Enter" && k.key !== " ")) {
|
|
933
|
+
if (k.preventDefault(), u) {
|
|
934
|
+
u(k);
|
|
930
935
|
return;
|
|
931
936
|
}
|
|
932
|
-
E || o && v((
|
|
937
|
+
E || o && v((D) => !D);
|
|
933
938
|
}
|
|
934
939
|
},
|
|
935
940
|
children: [
|
|
@@ -955,7 +960,7 @@ const Ua = (e) => {
|
|
|
955
960
|
style: { width: "100%", height: "100%" },
|
|
956
961
|
onLoadStart: () => R(!0),
|
|
957
962
|
onCanPlay: () => {
|
|
958
|
-
R(!1),
|
|
963
|
+
R(!1), M(!1);
|
|
959
964
|
},
|
|
960
965
|
onWaiting: () => R(!0),
|
|
961
966
|
onPlay: () => $(!1),
|
|
@@ -975,13 +980,13 @@ const Ua = (e) => {
|
|
|
975
980
|
style: { width: "100%", height: "100%" },
|
|
976
981
|
onLoadStart: () => R(!0),
|
|
977
982
|
onCanPlay: () => {
|
|
978
|
-
R(!1),
|
|
983
|
+
R(!1), M(!1);
|
|
979
984
|
},
|
|
980
985
|
onWaiting: () => R(!0),
|
|
981
986
|
onPlay: () => $(!1),
|
|
982
987
|
onLoadedMetadata: () => {
|
|
983
|
-
const
|
|
984
|
-
|
|
988
|
+
const k = m.current;
|
|
989
|
+
k instanceof HTMLVideoElement && k.videoWidth && k.videoHeight && C(k.videoWidth / k.videoHeight);
|
|
985
990
|
},
|
|
986
991
|
onEnded: () => {
|
|
987
992
|
i || (v(!1), b(0));
|
|
@@ -1003,11 +1008,11 @@ const Ua = (e) => {
|
|
|
1003
1008
|
role: "button",
|
|
1004
1009
|
tabIndex: 0,
|
|
1005
1010
|
"aria-label": "Play preview",
|
|
1006
|
-
onClick: (
|
|
1007
|
-
|
|
1011
|
+
onClick: (k) => {
|
|
1012
|
+
k.stopPropagation(), A();
|
|
1008
1013
|
},
|
|
1009
|
-
onKeyDown: (
|
|
1010
|
-
|
|
1014
|
+
onKeyDown: (k) => {
|
|
1015
|
+
k.key !== "Enter" && k.key !== " " || (k.preventDefault(), k.stopPropagation(), A());
|
|
1011
1016
|
},
|
|
1012
1017
|
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1013
1018
|
}
|
|
@@ -1017,23 +1022,21 @@ const Ua = (e) => {
|
|
|
1017
1022
|
{
|
|
1018
1023
|
role: "slider",
|
|
1019
1024
|
"aria-label": "Playback position",
|
|
1020
|
-
"aria-valuenow":
|
|
1025
|
+
"aria-valuenow": H,
|
|
1021
1026
|
"aria-valuemin": 0,
|
|
1022
1027
|
"aria-valuemax": 100,
|
|
1023
1028
|
tabIndex: 0,
|
|
1024
1029
|
ref: g,
|
|
1025
1030
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1026
|
-
onMouseDown:
|
|
1027
|
-
onTouchStart:
|
|
1028
|
-
onClick: (
|
|
1029
|
-
onKeyDown:
|
|
1030
|
-
y.key === "ArrowRight" && U(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && U(Math.max(0, x - 0.05));
|
|
1031
|
-
},
|
|
1031
|
+
onMouseDown: G,
|
|
1032
|
+
onTouchStart: G,
|
|
1033
|
+
onClick: (k) => k.stopPropagation(),
|
|
1034
|
+
onKeyDown: ee,
|
|
1032
1035
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
1033
1036
|
"div",
|
|
1034
1037
|
{
|
|
1035
1038
|
className: "h-full rounded-full bg-white",
|
|
1036
|
-
style: { width: `${
|
|
1039
|
+
style: { width: `${H}%` }
|
|
1037
1040
|
}
|
|
1038
1041
|
) })
|
|
1039
1042
|
}
|
|
@@ -1043,12 +1046,12 @@ const Ua = (e) => {
|
|
|
1043
1046
|
"button",
|
|
1044
1047
|
{
|
|
1045
1048
|
type: "button",
|
|
1046
|
-
onClick: (
|
|
1047
|
-
|
|
1049
|
+
onClick: (k) => {
|
|
1050
|
+
k.stopPropagation(), v((D) => !D);
|
|
1048
1051
|
},
|
|
1049
1052
|
className: "shrink-0 text-white",
|
|
1050
1053
|
"aria-label": w ? "Pause" : "Play",
|
|
1051
|
-
children: w ? /* @__PURE__ */ n(
|
|
1054
|
+
children: w ? /* @__PURE__ */ n(oa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1052
1055
|
}
|
|
1053
1056
|
),
|
|
1054
1057
|
/* @__PURE__ */ f(
|
|
@@ -1056,30 +1059,28 @@ const Ua = (e) => {
|
|
|
1056
1059
|
{
|
|
1057
1060
|
role: "slider",
|
|
1058
1061
|
"aria-label": "Playback position",
|
|
1059
|
-
"aria-valuenow":
|
|
1062
|
+
"aria-valuenow": H,
|
|
1060
1063
|
"aria-valuemin": 0,
|
|
1061
1064
|
"aria-valuemax": 100,
|
|
1062
1065
|
tabIndex: 0,
|
|
1063
1066
|
ref: g,
|
|
1064
1067
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1065
|
-
onMouseDown:
|
|
1066
|
-
onTouchStart:
|
|
1067
|
-
onClick: (
|
|
1068
|
+
onMouseDown: G,
|
|
1069
|
+
onTouchStart: G,
|
|
1070
|
+
onClick: (k) => k.stopPropagation(),
|
|
1068
1071
|
onMouseEnter: () => L(!0),
|
|
1069
1072
|
onMouseLeave: () => L(!1),
|
|
1070
|
-
onKeyDown:
|
|
1071
|
-
y.key === "ArrowRight" && U(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && U(Math.max(0, x - 0.05));
|
|
1072
|
-
},
|
|
1073
|
+
onKeyDown: ee,
|
|
1073
1074
|
children: [
|
|
1074
1075
|
/* @__PURE__ */ n(
|
|
1075
1076
|
"div",
|
|
1076
1077
|
{
|
|
1077
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T ||
|
|
1078
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || y ? "h-1.5" : "h-1"}`,
|
|
1078
1079
|
children: /* @__PURE__ */ n(
|
|
1079
1080
|
"div",
|
|
1080
1081
|
{
|
|
1081
1082
|
className: "h-full rounded-full bg-white",
|
|
1082
|
-
style: { width: `${
|
|
1083
|
+
style: { width: `${H}%` }
|
|
1083
1084
|
}
|
|
1084
1085
|
)
|
|
1085
1086
|
}
|
|
@@ -1087,8 +1088,8 @@ const Ua = (e) => {
|
|
|
1087
1088
|
/* @__PURE__ */ n(
|
|
1088
1089
|
"div",
|
|
1089
1090
|
{
|
|
1090
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T ||
|
|
1091
|
-
style: { left: `${
|
|
1091
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || y ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1092
|
+
style: { left: `${H}%` }
|
|
1092
1093
|
}
|
|
1093
1094
|
)
|
|
1094
1095
|
]
|
|
@@ -1098,7 +1099,7 @@ const Ua = (e) => {
|
|
|
1098
1099
|
]
|
|
1099
1100
|
}
|
|
1100
1101
|
);
|
|
1101
|
-
}, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
1102
|
+
}, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Va = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Sn = ({
|
|
1102
1103
|
mimeType: e,
|
|
1103
1104
|
sourceUrl: t,
|
|
1104
1105
|
thumbnailUrl: s,
|
|
@@ -1109,7 +1110,7 @@ const Ua = (e) => {
|
|
|
1109
1110
|
}) => {
|
|
1110
1111
|
const l = de(e), [d, u] = B(!1), h = ce(t), m = ce(s);
|
|
1111
1112
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
1112
|
-
|
|
1113
|
+
Ha,
|
|
1113
1114
|
{
|
|
1114
1115
|
source: t,
|
|
1115
1116
|
mimeType: e,
|
|
@@ -1160,7 +1161,7 @@ const Ua = (e) => {
|
|
|
1160
1161
|
weight: "regular"
|
|
1161
1162
|
})
|
|
1162
1163
|
}
|
|
1163
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
1164
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${Va(r)}`, children: /* @__PURE__ */ n(
|
|
1164
1165
|
"img",
|
|
1165
1166
|
{
|
|
1166
1167
|
src: m ?? s,
|
|
@@ -1178,7 +1179,7 @@ const Ua = (e) => {
|
|
|
1178
1179
|
})
|
|
1179
1180
|
}
|
|
1180
1181
|
);
|
|
1181
|
-
},
|
|
1182
|
+
}, En = ({
|
|
1182
1183
|
variant: e,
|
|
1183
1184
|
thumbnail: t,
|
|
1184
1185
|
title: s,
|
|
@@ -1198,7 +1199,7 @@ const Ua = (e) => {
|
|
|
1198
1199
|
{
|
|
1199
1200
|
ref: h,
|
|
1200
1201
|
"data-testid": m,
|
|
1201
|
-
className:
|
|
1202
|
+
className: N(
|
|
1202
1203
|
"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)]",
|
|
1203
1204
|
g ? "bg-[#1e2330]" : "bg-white"
|
|
1204
1205
|
),
|
|
@@ -1210,7 +1211,7 @@ const Ua = (e) => {
|
|
|
1210
1211
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1211
1212
|
"p",
|
|
1212
1213
|
{
|
|
1213
|
-
className:
|
|
1214
|
+
className: N("mb-0.5 truncate text-base font-medium", {
|
|
1214
1215
|
"text-black": !g,
|
|
1215
1216
|
"text-white/30": g && p,
|
|
1216
1217
|
"text-white": g && !p
|
|
@@ -1220,7 +1221,7 @@ const Ua = (e) => {
|
|
|
1220
1221
|
),
|
|
1221
1222
|
/* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1222
1223
|
ve(r, {
|
|
1223
|
-
className:
|
|
1224
|
+
className: N(
|
|
1224
1225
|
"size-5 shrink-0",
|
|
1225
1226
|
g ? "text-white/55" : "text-black/55"
|
|
1226
1227
|
),
|
|
@@ -1229,7 +1230,7 @@ const Ua = (e) => {
|
|
|
1229
1230
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1230
1231
|
"span",
|
|
1231
1232
|
{
|
|
1232
|
-
className:
|
|
1233
|
+
className: N(
|
|
1233
1234
|
"text-xs font-medium",
|
|
1234
1235
|
g ? "text-white/55" : "text-black/55"
|
|
1235
1236
|
),
|
|
@@ -1244,25 +1245,25 @@ const Ua = (e) => {
|
|
|
1244
1245
|
}
|
|
1245
1246
|
);
|
|
1246
1247
|
};
|
|
1247
|
-
function
|
|
1248
|
+
function In(e) {
|
|
1248
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1249
1250
|
}
|
|
1250
1251
|
function ct(e) {
|
|
1251
1252
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1252
1253
|
}
|
|
1253
|
-
function
|
|
1254
|
+
function Ga(e) {
|
|
1254
1255
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1255
1256
|
}
|
|
1256
|
-
function
|
|
1257
|
+
function Ya(e) {
|
|
1257
1258
|
return e ? "text-white" : "text-black";
|
|
1258
1259
|
}
|
|
1259
|
-
function
|
|
1260
|
+
function Wa(e) {
|
|
1260
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
+
function Xa(e) {
|
|
1263
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1264
1265
|
}
|
|
1265
|
-
function
|
|
1266
|
+
function qa(e) {
|
|
1266
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1267
1268
|
}
|
|
1268
1269
|
const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1277,29 +1278,29 @@ const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1277
1278
|
) : /* @__PURE__ */ n(
|
|
1278
1279
|
"div",
|
|
1279
1280
|
{
|
|
1280
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1281
|
-
children: /* @__PURE__ */ n(
|
|
1281
|
+
className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
|
|
1282
|
+
children: /* @__PURE__ */ n(ca, { className: `size-12 ${qa(t)}` })
|
|
1282
1283
|
}
|
|
1283
1284
|
) }),
|
|
1284
1285
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
1285
1286
|
s && /* @__PURE__ */ n(
|
|
1286
1287
|
"p",
|
|
1287
1288
|
{
|
|
1288
|
-
className: `truncate text-[14px] font-medium leading-5 ${
|
|
1289
|
+
className: `truncate text-[14px] font-medium leading-5 ${Ya(t)}`,
|
|
1289
1290
|
children: s
|
|
1290
1291
|
}
|
|
1291
1292
|
),
|
|
1292
1293
|
a && /* @__PURE__ */ n(
|
|
1293
1294
|
"p",
|
|
1294
1295
|
{
|
|
1295
|
-
className: `truncate text-[12px] leading-4 ${
|
|
1296
|
+
className: `truncate text-[12px] leading-4 ${Wa(t)}`,
|
|
1296
1297
|
children: a
|
|
1297
1298
|
}
|
|
1298
1299
|
),
|
|
1299
1300
|
d && /* @__PURE__ */ n(
|
|
1300
1301
|
"p",
|
|
1301
1302
|
{
|
|
1302
|
-
className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1303
|
+
className: `mt-1 truncate text-[12px] leading-4 ${Xa(t)}`,
|
|
1303
1304
|
children: d
|
|
1304
1305
|
}
|
|
1305
1306
|
)
|
|
@@ -1324,7 +1325,7 @@ function ut(e) {
|
|
|
1324
1325
|
var t;
|
|
1325
1326
|
return (t = e.attachments) == null ? void 0 : t.find(Ve);
|
|
1326
1327
|
}
|
|
1327
|
-
async function
|
|
1328
|
+
async function Ka(e, t) {
|
|
1328
1329
|
let s;
|
|
1329
1330
|
try {
|
|
1330
1331
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1336,7 +1337,7 @@ async function qa(e, t) {
|
|
|
1336
1337
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1337
1338
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1338
1339
|
}
|
|
1339
|
-
const
|
|
1340
|
+
const Za = ({
|
|
1340
1341
|
url: e,
|
|
1341
1342
|
filename: t
|
|
1342
1343
|
}) => {
|
|
@@ -1348,7 +1349,7 @@ const Ka = ({
|
|
|
1348
1349
|
onClick: (i) => {
|
|
1349
1350
|
i.stopPropagation();
|
|
1350
1351
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1351
|
-
a(!0),
|
|
1352
|
+
a(!0), Ka(e, t).then(() => {
|
|
1352
1353
|
o == null || o.close();
|
|
1353
1354
|
}).catch(() => {
|
|
1354
1355
|
o && (o.location.href = e);
|
|
@@ -1390,16 +1391,16 @@ function mt(e) {
|
|
|
1390
1391
|
thumbnailUrl: h
|
|
1391
1392
|
};
|
|
1392
1393
|
}
|
|
1393
|
-
const
|
|
1394
|
+
const Tn = ({
|
|
1394
1395
|
resolvedUrl: e,
|
|
1395
1396
|
resolvedType: t,
|
|
1396
1397
|
title: s,
|
|
1397
1398
|
fileSize: a,
|
|
1398
1399
|
thumbnailUrl: r
|
|
1399
1400
|
}) => {
|
|
1400
|
-
const i = a !== void 0 ?
|
|
1401
|
+
const i = a !== void 0 ? In(a) : void 0;
|
|
1401
1402
|
return /* @__PURE__ */ n(
|
|
1402
|
-
|
|
1403
|
+
En,
|
|
1403
1404
|
{
|
|
1404
1405
|
variant: "dark",
|
|
1405
1406
|
title: s,
|
|
@@ -1407,7 +1408,7 @@ const In = ({
|
|
|
1407
1408
|
mimeType: t,
|
|
1408
1409
|
detail: i,
|
|
1409
1410
|
thumbnail: /* @__PURE__ */ n(
|
|
1410
|
-
|
|
1411
|
+
Sn,
|
|
1411
1412
|
{
|
|
1412
1413
|
mimeType: t,
|
|
1413
1414
|
sourceUrl: e,
|
|
@@ -1418,23 +1419,23 @@ const In = ({
|
|
|
1418
1419
|
)
|
|
1419
1420
|
}
|
|
1420
1421
|
);
|
|
1421
|
-
},
|
|
1422
|
+
}, An = ({
|
|
1422
1423
|
resolvedUrl: e,
|
|
1423
1424
|
resolvedType: t,
|
|
1424
1425
|
title: s,
|
|
1425
1426
|
fileSize: a,
|
|
1426
1427
|
thumbnailUrl: r
|
|
1427
1428
|
}) => {
|
|
1428
|
-
const i = de(t), o = a !== void 0 ?
|
|
1429
|
+
const i = de(t), o = a !== void 0 ? In(a) : void 0;
|
|
1429
1430
|
return /* @__PURE__ */ n(
|
|
1430
|
-
|
|
1431
|
+
En,
|
|
1431
1432
|
{
|
|
1432
1433
|
variant: "light",
|
|
1433
1434
|
title: s,
|
|
1434
1435
|
mimeType: t,
|
|
1435
1436
|
detail: o,
|
|
1436
1437
|
thumbnail: /* @__PURE__ */ n(
|
|
1437
|
-
|
|
1438
|
+
Sn,
|
|
1438
1439
|
{
|
|
1439
1440
|
mimeType: t,
|
|
1440
1441
|
sourceUrl: e,
|
|
@@ -1444,10 +1445,10 @@ const In = ({
|
|
|
1444
1445
|
containedImage: i === "image" || i === "document"
|
|
1445
1446
|
}
|
|
1446
1447
|
),
|
|
1447
|
-
action: /* @__PURE__ */ n(
|
|
1448
|
+
action: /* @__PURE__ */ n(Za, { url: e, filename: s })
|
|
1448
1449
|
}
|
|
1449
1450
|
);
|
|
1450
|
-
},
|
|
1451
|
+
}, Ja = ({
|
|
1451
1452
|
message: e,
|
|
1452
1453
|
isMyMessage: t = !1
|
|
1453
1454
|
}) => {
|
|
@@ -1484,46 +1485,46 @@ const In = ({
|
|
|
1484
1485
|
attachment: s,
|
|
1485
1486
|
isMyMessage: t
|
|
1486
1487
|
}
|
|
1487
|
-
) }) : t ? /* @__PURE__ */ n(
|
|
1488
|
+
) }) : t ? /* @__PURE__ */ n(Tn, { ...a }) : /* @__PURE__ */ n(An, { ...a })
|
|
1488
1489
|
}
|
|
1489
1490
|
) })
|
|
1490
1491
|
}
|
|
1491
1492
|
)
|
|
1492
1493
|
] });
|
|
1493
|
-
},
|
|
1494
|
+
}, Qa = ({
|
|
1494
1495
|
message: e
|
|
1495
1496
|
}) => {
|
|
1496
1497
|
const t = ut(e);
|
|
1497
1498
|
if (t)
|
|
1498
1499
|
return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
|
|
1499
1500
|
const s = mt(e);
|
|
1500
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1501
|
-
},
|
|
1501
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Tn, { ...s }) }) : null;
|
|
1502
|
+
}, er = ({
|
|
1502
1503
|
message: e
|
|
1503
1504
|
}) => {
|
|
1504
1505
|
const t = ut(e);
|
|
1505
1506
|
if (t)
|
|
1506
1507
|
return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
|
|
1507
1508
|
const s = mt(e);
|
|
1508
|
-
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(
|
|
1509
|
-
},
|
|
1510
|
-
Creator:
|
|
1511
|
-
Visitor:
|
|
1512
|
-
}),
|
|
1509
|
+
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(An, { ...s }) }) : null;
|
|
1510
|
+
}, to = Object.assign(Ja, {
|
|
1511
|
+
Creator: Qa,
|
|
1512
|
+
Visitor: er
|
|
1513
|
+
}), tr = {
|
|
1513
1514
|
isUnlocking: () => !1
|
|
1514
|
-
},
|
|
1515
|
-
LockedAttachment:
|
|
1516
|
-
},
|
|
1517
|
-
function
|
|
1518
|
-
return xe(
|
|
1515
|
+
}, nr = {
|
|
1516
|
+
LockedAttachment: tr
|
|
1517
|
+
}, Rn = je({}), no = Rn.Provider;
|
|
1518
|
+
function sr(e) {
|
|
1519
|
+
return xe(Rn)[e] ?? nr[e];
|
|
1519
1520
|
}
|
|
1520
|
-
const
|
|
1521
|
+
const ar = z.lazy(() => import("./Card-BzvDr-pU.js")), rr = z.lazy(() => import("./Card-BXlNaNGk.js")), ir = () => /* @__PURE__ */ n(
|
|
1521
1522
|
"div",
|
|
1522
1523
|
{
|
|
1523
1524
|
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)]",
|
|
1524
1525
|
"aria-hidden": !0
|
|
1525
1526
|
}
|
|
1526
|
-
), Pe = (e) => /* @__PURE__ */ n(
|
|
1527
|
+
), Pe = (e) => /* @__PURE__ */ n(is, { fallback: /* @__PURE__ */ n(ir, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(ar, { ...e }) : /* @__PURE__ */ n(rr, { ...e }) }), lr = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1527
1528
|
"svg",
|
|
1528
1529
|
{
|
|
1529
1530
|
width: e,
|
|
@@ -1540,10 +1541,10 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1540
1541
|
}
|
|
1541
1542
|
)
|
|
1542
1543
|
}
|
|
1543
|
-
),
|
|
1544
|
+
), or = (e) => {
|
|
1544
1545
|
var t;
|
|
1545
1546
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
|
|
1546
|
-
},
|
|
1547
|
+
}, Ln = (e) => {
|
|
1547
1548
|
var t;
|
|
1548
1549
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.PAID;
|
|
1549
1550
|
}, Fe = (e) => {
|
|
@@ -1552,15 +1553,15 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1552
1553
|
}, ht = (e) => {
|
|
1553
1554
|
var t;
|
|
1554
1555
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
|
|
1555
|
-
},
|
|
1556
|
+
}, cr = (e) => {
|
|
1556
1557
|
var t;
|
|
1557
1558
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
1558
|
-
},
|
|
1559
|
+
}, dr = (e) => {
|
|
1559
1560
|
var t;
|
|
1560
1561
|
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
1561
|
-
},
|
|
1562
|
+
}, Mn = (e) => or(e) || Ln(e), ur = (e) => {
|
|
1562
1563
|
var t;
|
|
1563
|
-
return
|
|
1564
|
+
return Mn(e) && !((t = e.text) != null && t.trim());
|
|
1564
1565
|
}, Ze = ({
|
|
1565
1566
|
message: e,
|
|
1566
1567
|
standalone: t = !1,
|
|
@@ -1568,19 +1569,19 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1568
1569
|
hasAttachment: a = !1
|
|
1569
1570
|
}) => {
|
|
1570
1571
|
var g;
|
|
1571
|
-
const r =
|
|
1572
|
+
const r = Mn(e), i = Fe(e);
|
|
1572
1573
|
if (!r && !i)
|
|
1573
1574
|
return null;
|
|
1574
1575
|
if (r) {
|
|
1575
1576
|
const c = (g = e.metadata) == null ? void 0 : g.amount_text;
|
|
1576
1577
|
if (!c) return null;
|
|
1577
|
-
const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w =
|
|
1578
|
+
const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w = Ln(e) ? "message" : "tip", v = t ? `${c} ${w}` : `Delivered with ${c} ${w}`;
|
|
1578
1579
|
return /* @__PURE__ */ f("div", { className: p, children: [
|
|
1579
|
-
/* @__PURE__ */ n(
|
|
1580
|
+
/* @__PURE__ */ n(da, { size: t ? 14 : 12 }),
|
|
1580
1581
|
/* @__PURE__ */ n("span", { children: v })
|
|
1581
1582
|
] });
|
|
1582
1583
|
}
|
|
1583
|
-
const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(
|
|
1584
|
+
const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(lr, { size: o ? 12 : 15 }) });
|
|
1584
1585
|
return /* @__PURE__ */ n(
|
|
1585
1586
|
"div",
|
|
1586
1587
|
{
|
|
@@ -1595,7 +1596,7 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1595
1596
|
] })
|
|
1596
1597
|
}
|
|
1597
1598
|
);
|
|
1598
|
-
}, Jt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`,
|
|
1599
|
+
}, Jt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, mr = {
|
|
1599
1600
|
me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
1600
1601
|
other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
1601
1602
|
}, $e = ({ side: e }) => /* @__PURE__ */ n(
|
|
@@ -1608,24 +1609,24 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1608
1609
|
insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
|
|
1609
1610
|
transform: e === "other" ? "scaleX(-1)" : void 0,
|
|
1610
1611
|
transformOrigin: "center",
|
|
1611
|
-
backgroundColor:
|
|
1612
|
+
backgroundColor: mr[e],
|
|
1612
1613
|
WebkitMask: Jt,
|
|
1613
1614
|
mask: Jt
|
|
1614
1615
|
}
|
|
1615
1616
|
}
|
|
1616
|
-
),
|
|
1617
|
+
), Dn = je(
|
|
1617
1618
|
void 0
|
|
1618
|
-
),
|
|
1619
|
+
), hr = (e) => {
|
|
1619
1620
|
var s;
|
|
1620
1621
|
const t = (s = e.metadata) == null ? void 0 : s.outbound_id;
|
|
1621
1622
|
return typeof t == "string" ? t : void 0;
|
|
1622
|
-
},
|
|
1623
|
+
}, fr = (e, t) => {
|
|
1623
1624
|
if (!t || !(e != null && e.length))
|
|
1624
1625
|
return;
|
|
1625
1626
|
const s = /* @__PURE__ */ new Set();
|
|
1626
1627
|
let a;
|
|
1627
1628
|
for (const r of e) {
|
|
1628
|
-
const i =
|
|
1629
|
+
const i = hr(r);
|
|
1629
1630
|
if (!i || s.has(i))
|
|
1630
1631
|
continue;
|
|
1631
1632
|
s.add(i);
|
|
@@ -1636,7 +1637,7 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1636
1637
|
});
|
|
1637
1638
|
}
|
|
1638
1639
|
return a;
|
|
1639
|
-
},
|
|
1640
|
+
}, gr = (e, t) => {
|
|
1640
1641
|
if (e === t)
|
|
1641
1642
|
return !0;
|
|
1642
1643
|
if (!e || !t)
|
|
@@ -1648,9 +1649,9 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1648
1649
|
return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
|
|
1649
1650
|
}
|
|
1650
1651
|
);
|
|
1651
|
-
},
|
|
1652
|
-
const s =
|
|
1653
|
-
return
|
|
1652
|
+
}, pr = (e, t) => {
|
|
1653
|
+
const s = fr(e, t), [a, r] = B(s);
|
|
1654
|
+
return gr(a, s) ? a : (r(s), s);
|
|
1654
1655
|
}, ft = () => {
|
|
1655
1656
|
const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = we("SentMessageDeliveryStatus"), s = (() => {
|
|
1656
1657
|
if (t)
|
|
@@ -1662,9 +1663,9 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1662
1663
|
})();
|
|
1663
1664
|
return e.id === s;
|
|
1664
1665
|
}, Je = () => ft() ? /* @__PURE__ */ f(K, { children: [
|
|
1665
|
-
/* @__PURE__ */ n(
|
|
1666
|
+
/* @__PURE__ */ n(ha, { weight: "bold", "aria-hidden": "true" }),
|
|
1666
1667
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
1667
|
-
] }) : null,
|
|
1668
|
+
] }) : null, br = () => ft() ? /* @__PURE__ */ f(K, { children: [
|
|
1668
1669
|
/* @__PURE__ */ n(
|
|
1669
1670
|
be,
|
|
1670
1671
|
{
|
|
@@ -1674,16 +1675,16 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1674
1675
|
}
|
|
1675
1676
|
),
|
|
1676
1677
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
1677
|
-
] }) : null,
|
|
1678
|
+
] }) : null, vr = ({
|
|
1678
1679
|
outbound: e,
|
|
1679
1680
|
onOutboundClick: t
|
|
1680
1681
|
}) => {
|
|
1681
1682
|
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(K, { children: [
|
|
1682
|
-
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1683
|
+
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ma, { weight: "fill" }) }),
|
|
1683
1684
|
/* @__PURE__ */ n(
|
|
1684
1685
|
"span",
|
|
1685
1686
|
{
|
|
1686
|
-
className:
|
|
1687
|
+
className: N("sent-message-outbound-name", {
|
|
1687
1688
|
"underline [text-decoration-skip-ink:auto]": !!t
|
|
1688
1689
|
}),
|
|
1689
1690
|
"data-testid": "sent-message-outbound-status",
|
|
@@ -1701,10 +1702,10 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1701
1702
|
children: r
|
|
1702
1703
|
}
|
|
1703
1704
|
) : r;
|
|
1704
|
-
},
|
|
1705
|
-
/* @__PURE__ */ n(
|
|
1705
|
+
}, xr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
1706
|
+
/* @__PURE__ */ n(ua, { weight: "bold", "aria-hidden": "true" }),
|
|
1706
1707
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
1707
|
-
] }),
|
|
1708
|
+
] }), wr = ({
|
|
1708
1709
|
onOutboundClick: e,
|
|
1709
1710
|
resolvedOutbound: t
|
|
1710
1711
|
}) => {
|
|
@@ -1715,22 +1716,22 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1715
1716
|
if (r)
|
|
1716
1717
|
return null;
|
|
1717
1718
|
if (a.status === "failed" && i && a.type !== "error")
|
|
1718
|
-
return /* @__PURE__ */ n(
|
|
1719
|
+
return /* @__PURE__ */ n(xr, {});
|
|
1719
1720
|
if (!i)
|
|
1720
1721
|
return null;
|
|
1721
1722
|
const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ n(
|
|
1722
|
-
|
|
1723
|
+
vr,
|
|
1723
1724
|
{
|
|
1724
1725
|
outbound: t,
|
|
1725
1726
|
onOutboundClick: e
|
|
1726
1727
|
}
|
|
1727
1728
|
) : null, u = /* @__PURE__ */ n(
|
|
1728
|
-
|
|
1729
|
+
us,
|
|
1729
1730
|
{
|
|
1730
1731
|
MessageSentStatus: Je,
|
|
1731
1732
|
MessageDeliveredStatus: Je,
|
|
1732
1733
|
MessageReadStatus: Je,
|
|
1733
|
-
MessageSendingStatus:
|
|
1734
|
+
MessageSendingStatus: br
|
|
1734
1735
|
}
|
|
1735
1736
|
);
|
|
1736
1737
|
return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
@@ -1738,19 +1739,19 @@ const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import(
|
|
|
1738
1739
|
o && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
|
|
1739
1740
|
d
|
|
1740
1741
|
] }) : u;
|
|
1741
|
-
},
|
|
1742
|
+
}, _r = /^([a-z][a-z0-9+.-]*):/i, yr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
1742
1743
|
function gt(e) {
|
|
1743
1744
|
if (typeof e != "string") return;
|
|
1744
1745
|
const t = e.trim();
|
|
1745
1746
|
if (t === "") return;
|
|
1746
|
-
const s =
|
|
1747
|
+
const s = _r.exec(t);
|
|
1747
1748
|
if (s) {
|
|
1748
1749
|
const a = s[1].toLowerCase();
|
|
1749
|
-
return
|
|
1750
|
+
return yr.has(a) ? t : void 0;
|
|
1750
1751
|
}
|
|
1751
1752
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
1752
1753
|
}
|
|
1753
|
-
const
|
|
1754
|
+
const Nr = {
|
|
1754
1755
|
dark: {
|
|
1755
1756
|
primary: "bg-white text-[#121110] hover:bg-white/90",
|
|
1756
1757
|
secondary: "bg-white/15 text-white hover:bg-white/25"
|
|
@@ -1759,17 +1760,17 @@ const yr = {
|
|
|
1759
1760
|
primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
|
|
1760
1761
|
secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
|
|
1761
1762
|
}
|
|
1762
|
-
},
|
|
1763
|
+
}, On = ({
|
|
1763
1764
|
variant: e,
|
|
1764
1765
|
cta: t,
|
|
1765
1766
|
fullWidth: s = !0,
|
|
1766
1767
|
standalone: a = !1
|
|
1767
1768
|
}) => {
|
|
1768
|
-
const r = t.variant ?? "primary", i =
|
|
1769
|
+
const r = t.variant ?? "primary", i = N(
|
|
1769
1770
|
"inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
1770
1771
|
s ? "w-full" : "min-w-0",
|
|
1771
1772
|
!a && "mt-2",
|
|
1772
|
-
|
|
1773
|
+
Nr[e][r]
|
|
1773
1774
|
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
|
|
1774
1775
|
return l ? /* @__PURE__ */ n(
|
|
1775
1776
|
"a",
|
|
@@ -1796,13 +1797,13 @@ const yr = {
|
|
|
1796
1797
|
children: o
|
|
1797
1798
|
}
|
|
1798
1799
|
);
|
|
1799
|
-
},
|
|
1800
|
+
}, kr = {
|
|
1800
1801
|
dark: "text-white",
|
|
1801
1802
|
light: "text-black/90"
|
|
1802
|
-
},
|
|
1803
|
+
}, Cr = "text-white/30", Qt = {
|
|
1803
1804
|
dark: "text-white/55",
|
|
1804
1805
|
light: "text-black/55"
|
|
1805
|
-
},
|
|
1806
|
+
}, Sr = {
|
|
1806
1807
|
dark: "bg-white/25",
|
|
1807
1808
|
light: "bg-black/15"
|
|
1808
1809
|
}, pt = ({
|
|
@@ -1822,25 +1823,25 @@ const yr = {
|
|
|
1822
1823
|
const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", p = c.trim() !== "", w = i != null && i.trim() !== "", v = typeof l == "string" ? l.trim() : "", x = v !== "", b = u != null;
|
|
1823
1824
|
if (!m && !p && !w && !x && !b)
|
|
1824
1825
|
return null;
|
|
1825
|
-
const
|
|
1826
|
+
const y = g && !a, _ = N(
|
|
1826
1827
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
1827
|
-
s == null && (
|
|
1828
|
-
), T =
|
|
1828
|
+
s == null && (y ? Cr : kr[e])
|
|
1829
|
+
), T = N(
|
|
1829
1830
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
1830
1831
|
s == null && Qt[e]
|
|
1831
|
-
), L =
|
|
1832
|
+
), L = N(
|
|
1832
1833
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
1833
1834
|
o <= 1 && "truncate",
|
|
1834
1835
|
s == null && Qt[e]
|
|
1835
1836
|
);
|
|
1836
1837
|
if (m) {
|
|
1837
|
-
const F =
|
|
1838
|
+
const F = N(
|
|
1838
1839
|
"animate-pulse rounded",
|
|
1839
|
-
|
|
1840
|
+
Sr[e]
|
|
1840
1841
|
);
|
|
1841
1842
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
1842
|
-
/* @__PURE__ */ n("div", { className:
|
|
1843
|
-
/* @__PURE__ */ n("div", { className:
|
|
1843
|
+
/* @__PURE__ */ n("div", { className: N("h-5 w-3/4", F), "aria-hidden": !0 }),
|
|
1844
|
+
/* @__PURE__ */ n("div", { className: N("h-4 w-1/2", F), "aria-hidden": !0 })
|
|
1844
1845
|
] }) });
|
|
1845
1846
|
}
|
|
1846
1847
|
const E = s ? { color: s } : void 0, $ = o > 1 ? {
|
|
@@ -1858,7 +1859,7 @@ const yr = {
|
|
|
1858
1859
|
/* @__PURE__ */ n(
|
|
1859
1860
|
"p",
|
|
1860
1861
|
{
|
|
1861
|
-
className:
|
|
1862
|
+
className: N("min-w-0", _),
|
|
1862
1863
|
style: E,
|
|
1863
1864
|
children: c
|
|
1864
1865
|
}
|
|
@@ -1869,9 +1870,9 @@ const yr = {
|
|
|
1869
1870
|
] }),
|
|
1870
1871
|
h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
|
|
1871
1872
|
] }),
|
|
1872
|
-
u && /* @__PURE__ */ n(
|
|
1873
|
+
u && /* @__PURE__ */ n(On, { variant: t ?? e, cta: u })
|
|
1873
1874
|
] });
|
|
1874
|
-
},
|
|
1875
|
+
}, Er = "Loading link preview", Ir = N(
|
|
1875
1876
|
// Width is a channel-scoped token: default 290px, but a read-only surface with no
|
|
1876
1877
|
// composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
|
|
1877
1878
|
// content column (see ChannelView). Consumers that don't set the var keep 290px.
|
|
@@ -1881,7 +1882,7 @@ const yr = {
|
|
|
1881
1882
|
// 20px corners — no token exists for it in the component-library preset,
|
|
1882
1883
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
1883
1884
|
"rounded-[20px]"
|
|
1884
|
-
),
|
|
1885
|
+
), Tr = "flex h-[250px] flex-col", Ee = ({
|
|
1885
1886
|
variant: e,
|
|
1886
1887
|
children: t,
|
|
1887
1888
|
href: s,
|
|
@@ -1895,10 +1896,10 @@ const yr = {
|
|
|
1895
1896
|
busy: h = !1,
|
|
1896
1897
|
"data-testid": m
|
|
1897
1898
|
}) => {
|
|
1898
|
-
const g = s != null || a != null, c =
|
|
1899
|
+
const g = s != null || a != null, c = N(
|
|
1899
1900
|
"messaging-link-card",
|
|
1900
|
-
|
|
1901
|
-
u ?
|
|
1901
|
+
Ir,
|
|
1902
|
+
u ? Tr : "block",
|
|
1902
1903
|
// The plain fallback fill, kept underneath the `--accent` derivation: the
|
|
1903
1904
|
// `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
|
|
1904
1905
|
// this single class, so a published accent paints over it and an unset one
|
|
@@ -1920,7 +1921,7 @@ const yr = {
|
|
|
1920
1921
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
1921
1922
|
// with offset, so keyboard users can see the focused card.
|
|
1922
1923
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
1923
|
-
), p = h ? { role: "status", "aria-busy": !0, "aria-label":
|
|
1924
|
+
), p = h ? { role: "status", "aria-busy": !0, "aria-label": Er } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
|
|
1924
1925
|
return s ? /* @__PURE__ */ f(
|
|
1925
1926
|
"a",
|
|
1926
1927
|
{
|
|
@@ -1948,7 +1949,7 @@ const yr = {
|
|
|
1948
1949
|
"aria-label": r,
|
|
1949
1950
|
"data-testid": m,
|
|
1950
1951
|
"data-variant": e,
|
|
1951
|
-
className:
|
|
1952
|
+
className: N(c, "text-left"),
|
|
1952
1953
|
style: w,
|
|
1953
1954
|
...p,
|
|
1954
1955
|
children: [
|
|
@@ -1974,7 +1975,7 @@ const yr = {
|
|
|
1974
1975
|
}, en = {
|
|
1975
1976
|
dark: "bg-white/10",
|
|
1976
1977
|
light: "bg-black/5"
|
|
1977
|
-
},
|
|
1978
|
+
}, Ar = {
|
|
1978
1979
|
dark: "size-16 text-white/25",
|
|
1979
1980
|
light: "size-16 text-black/25"
|
|
1980
1981
|
}, Te = (e, t) => !!t && !!e && de(e) === "audio", bt = (e, t) => {
|
|
@@ -2005,7 +2006,7 @@ const yr = {
|
|
|
2005
2006
|
) }) : /* @__PURE__ */ f(
|
|
2006
2007
|
"div",
|
|
2007
2008
|
{
|
|
2008
|
-
className:
|
|
2009
|
+
className: N(
|
|
2009
2010
|
// `flex-1 min-h-0` inside the shell's 250px column: the hero takes
|
|
2010
2011
|
// every pixel the chin doesn't, which is 168px at a two-line title
|
|
2011
2012
|
// and 188px at one.
|
|
@@ -2022,7 +2023,7 @@ const yr = {
|
|
|
2022
2023
|
/* @__PURE__ */ n(
|
|
2023
2024
|
"div",
|
|
2024
2025
|
{
|
|
2025
|
-
className:
|
|
2026
|
+
className: N(
|
|
2026
2027
|
"h-full w-full animate-pulse",
|
|
2027
2028
|
en[e]
|
|
2028
2029
|
),
|
|
@@ -2066,12 +2067,12 @@ const yr = {
|
|
|
2066
2067
|
) : /* @__PURE__ */ n(
|
|
2067
2068
|
"div",
|
|
2068
2069
|
{
|
|
2069
|
-
className:
|
|
2070
|
+
className: N(
|
|
2070
2071
|
"flex h-full w-full items-center justify-center",
|
|
2071
2072
|
en[e]
|
|
2072
2073
|
),
|
|
2073
2074
|
children: ve(r, {
|
|
2074
|
-
className:
|
|
2075
|
+
className: Ar[e],
|
|
2075
2076
|
weight: "regular"
|
|
2076
2077
|
})
|
|
2077
2078
|
}
|
|
@@ -2081,14 +2082,14 @@ const yr = {
|
|
|
2081
2082
|
]
|
|
2082
2083
|
}
|
|
2083
2084
|
);
|
|
2084
|
-
},
|
|
2085
|
-
function
|
|
2085
|
+
}, Rr = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2086
|
+
function Lr(e) {
|
|
2086
2087
|
const t = e.trim();
|
|
2087
2088
|
return t.startsWith("#") ? t : `#${t}`;
|
|
2088
2089
|
}
|
|
2089
|
-
const
|
|
2090
|
-
dark:
|
|
2091
|
-
light:
|
|
2090
|
+
const Mr = "#FFFFFF", Pn = "#040403", Dr = {
|
|
2091
|
+
dark: Mr,
|
|
2092
|
+
light: Pn
|
|
2092
2093
|
};
|
|
2093
2094
|
function Ge({
|
|
2094
2095
|
variant: e,
|
|
@@ -2105,7 +2106,7 @@ function Ge({
|
|
|
2105
2106
|
}, [r]);
|
|
2106
2107
|
const u = z.useCallback(() => {
|
|
2107
2108
|
d(!0);
|
|
2108
|
-
}, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null &&
|
|
2109
|
+
}, []), h = Te(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Rr.test(t.trim()) ? Lr(t) : void 0, p = h ? Pn : Dr[e];
|
|
2109
2110
|
return {
|
|
2110
2111
|
thumbnailUrl: l ? void 0 : r,
|
|
2111
2112
|
accentHex: c,
|
|
@@ -2115,7 +2116,7 @@ function Ge({
|
|
|
2115
2116
|
onImageError: u
|
|
2116
2117
|
};
|
|
2117
2118
|
}
|
|
2118
|
-
const
|
|
2119
|
+
const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Pr = "relative before:absolute before:-inset-[10px] before:content-['']", zr = ({
|
|
2119
2120
|
title: e,
|
|
2120
2121
|
placeholderTitle: t,
|
|
2121
2122
|
description: s,
|
|
@@ -2141,15 +2142,15 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2141
2142
|
thumbnailUrl: o,
|
|
2142
2143
|
mimeType: i,
|
|
2143
2144
|
sourceUrl: l
|
|
2144
|
-
}),
|
|
2145
|
+
}), y = c ? /* @__PURE__ */ n(
|
|
2145
2146
|
"button",
|
|
2146
2147
|
{
|
|
2147
2148
|
type: "button",
|
|
2148
2149
|
onClick: c,
|
|
2149
2150
|
"aria-label": w,
|
|
2150
|
-
className:
|
|
2151
|
-
|
|
2152
|
-
!x &&
|
|
2151
|
+
className: N(
|
|
2152
|
+
Or,
|
|
2153
|
+
!x && Pr
|
|
2153
2154
|
),
|
|
2154
2155
|
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2155
2156
|
}
|
|
@@ -2160,7 +2161,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2160
2161
|
onClick: p,
|
|
2161
2162
|
"aria-label": "Edit attachment",
|
|
2162
2163
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
2163
|
-
children: /* @__PURE__ */ n(
|
|
2164
|
+
children: /* @__PURE__ */ n(fa, { className: "size-5", weight: "regular" })
|
|
2164
2165
|
}
|
|
2165
2166
|
) : void 0;
|
|
2166
2167
|
return x && !b.isLoading ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -2173,7 +2174,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2173
2174
|
mimeType: i
|
|
2174
2175
|
}
|
|
2175
2176
|
) }),
|
|
2176
|
-
|
|
2177
|
+
y && /* @__PURE__ */ n("div", { className: "shrink-0", children: y })
|
|
2177
2178
|
] }) }) : /* @__PURE__ */ f(
|
|
2178
2179
|
Ee,
|
|
2179
2180
|
{
|
|
@@ -2181,7 +2182,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2181
2182
|
fixedHeight: !v,
|
|
2182
2183
|
accentHex: b.accentHex,
|
|
2183
2184
|
busy: b.isLoading,
|
|
2184
|
-
topRight: v ?
|
|
2185
|
+
topRight: v ? y : void 0,
|
|
2185
2186
|
children: [
|
|
2186
2187
|
!v && /* @__PURE__ */ n(
|
|
2187
2188
|
Ie,
|
|
@@ -2191,7 +2192,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2191
2192
|
sourceUrl: l,
|
|
2192
2193
|
title: e,
|
|
2193
2194
|
mimeType: i,
|
|
2194
|
-
topRight:
|
|
2195
|
+
topRight: y,
|
|
2195
2196
|
isLoading: b.isLoading,
|
|
2196
2197
|
onImageError: b.onImageError
|
|
2197
2198
|
}
|
|
@@ -2234,14 +2235,14 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2234
2235
|
"data-testid": "link-card-tail",
|
|
2235
2236
|
"data-variant": t === "sender" ? "dark" : "light",
|
|
2236
2237
|
style: e ? { "--accent": e } : void 0,
|
|
2237
|
-
className:
|
|
2238
|
+
className: N(
|
|
2238
2239
|
"messaging-link-card-tail",
|
|
2239
2240
|
t === "receiver" && "messaging-link-card-tail--received"
|
|
2240
2241
|
)
|
|
2241
2242
|
}
|
|
2242
2243
|
)
|
|
2243
2244
|
] })
|
|
2244
|
-
) : /* @__PURE__ */ n(K, { children: a }),
|
|
2245
|
+
) : /* @__PURE__ */ n(K, { children: a }), Fr = ({
|
|
2245
2246
|
title: e,
|
|
2246
2247
|
description: t,
|
|
2247
2248
|
descriptionLines: s,
|
|
@@ -2257,7 +2258,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2257
2258
|
onClick: g,
|
|
2258
2259
|
groupPosition: c = "single"
|
|
2259
2260
|
}) => {
|
|
2260
|
-
const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? vt : void 0,
|
|
2261
|
+
const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Te(r, o) ? vt : void 0, y = u && g ? {
|
|
2261
2262
|
...u,
|
|
2262
2263
|
onClick: () => {
|
|
2263
2264
|
var T;
|
|
@@ -2314,7 +2315,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2314
2315
|
descriptionLines: s,
|
|
2315
2316
|
url: a,
|
|
2316
2317
|
appIcon: d,
|
|
2317
|
-
cta:
|
|
2318
|
+
cta: y,
|
|
2318
2319
|
isLoading: _.isLoading
|
|
2319
2320
|
}
|
|
2320
2321
|
)
|
|
@@ -2323,7 +2324,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2323
2324
|
)
|
|
2324
2325
|
}
|
|
2325
2326
|
);
|
|
2326
|
-
},
|
|
2327
|
+
}, $r = ({
|
|
2327
2328
|
title: e,
|
|
2328
2329
|
placeholderTitle: t,
|
|
2329
2330
|
description: s,
|
|
@@ -2340,7 +2341,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2340
2341
|
onClick: c,
|
|
2341
2342
|
groupPosition: p = "single"
|
|
2342
2343
|
}) => {
|
|
2343
|
-
const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0,
|
|
2344
|
+
const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, y = g !== "loading" && Te(i, l), _ = Ge({
|
|
2344
2345
|
variant: "dark",
|
|
2345
2346
|
accentColor: m,
|
|
2346
2347
|
status: g,
|
|
@@ -2354,17 +2355,17 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2354
2355
|
{
|
|
2355
2356
|
accentHex: _.accentHex,
|
|
2356
2357
|
side: "sender",
|
|
2357
|
-
visible: !
|
|
2358
|
+
visible: !y && (p === "single" || p === "end"),
|
|
2358
2359
|
children: /* @__PURE__ */ f(
|
|
2359
2360
|
Ee,
|
|
2360
2361
|
{
|
|
2361
2362
|
variant: "dark",
|
|
2362
2363
|
href: x,
|
|
2363
2364
|
onClick: b,
|
|
2364
|
-
fixedHeight: d === "featured" && !
|
|
2365
|
+
fixedHeight: d === "featured" && !y,
|
|
2365
2366
|
accentHex: _.accentHex,
|
|
2366
2367
|
busy: _.isLoading,
|
|
2367
|
-
bgClassName:
|
|
2368
|
+
bgClassName: y ? vt : void 0,
|
|
2368
2369
|
children: [
|
|
2369
2370
|
d === "featured" && /* @__PURE__ */ n(
|
|
2370
2371
|
Ie,
|
|
@@ -2400,19 +2401,19 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2400
2401
|
}
|
|
2401
2402
|
);
|
|
2402
2403
|
}, it = {
|
|
2403
|
-
Composer:
|
|
2404
|
-
Sent:
|
|
2405
|
-
Received:
|
|
2406
|
-
},
|
|
2404
|
+
Composer: zr,
|
|
2405
|
+
Sent: $r,
|
|
2406
|
+
Received: Fr
|
|
2407
|
+
}, Br = {
|
|
2407
2408
|
dark: "bg-[#1e2330]",
|
|
2408
2409
|
light: "bg-[#f2f1ef]"
|
|
2409
|
-
},
|
|
2410
|
+
}, Ur = {
|
|
2410
2411
|
dark: "text-white",
|
|
2411
2412
|
light: "text-[#000000]"
|
|
2412
|
-
},
|
|
2413
|
+
}, jr = {
|
|
2413
2414
|
dark: "border-white/[0.08]",
|
|
2414
2415
|
light: "border-black/[0.08]"
|
|
2415
|
-
},
|
|
2416
|
+
}, Hr = (e) => e === "dark" ? "sender" : "receiver", Vr = {
|
|
2416
2417
|
sender: {
|
|
2417
2418
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
2418
2419
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -2437,13 +2438,13 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2437
2438
|
children: d,
|
|
2438
2439
|
"data-testid": u
|
|
2439
2440
|
}) => {
|
|
2440
|
-
const h = t != null && t !== "", m = o ?? Hr
|
|
2441
|
+
const h = t != null && t !== "", m = o ?? Vr[Hr(e)][a];
|
|
2441
2442
|
return /* @__PURE__ */ f(
|
|
2442
2443
|
"div",
|
|
2443
2444
|
{
|
|
2444
2445
|
"data-testid": u,
|
|
2445
2446
|
"data-group-position": a,
|
|
2446
|
-
className:
|
|
2447
|
+
className: N(
|
|
2447
2448
|
// Defaults describe a 280px-wide document / audio / link
|
|
2448
2449
|
// bubble: that width matches the mobile chat attachment and
|
|
2449
2450
|
// the 8px / 16px inset matches `--str-chat__spacing-2
|
|
@@ -2466,10 +2467,10 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2466
2467
|
// there is no ambiguity to resolve.
|
|
2467
2468
|
h && "pb-0",
|
|
2468
2469
|
m,
|
|
2469
|
-
$r[e],
|
|
2470
2470
|
Br[e],
|
|
2471
|
+
Ur[e],
|
|
2471
2472
|
s && "border",
|
|
2472
|
-
s &&
|
|
2473
|
+
s && jr[e],
|
|
2473
2474
|
l
|
|
2474
2475
|
),
|
|
2475
2476
|
children: [
|
|
@@ -2477,7 +2478,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2477
2478
|
h ? /* @__PURE__ */ n(
|
|
2478
2479
|
"p",
|
|
2479
2480
|
{
|
|
2480
|
-
className:
|
|
2481
|
+
className: N(
|
|
2481
2482
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
2482
2483
|
// the same font family + size as `.str-chat__message-text`
|
|
2483
2484
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -2509,22 +2510,22 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2509
2510
|
a.stopPropagation(), e();
|
|
2510
2511
|
},
|
|
2511
2512
|
"aria-label": s,
|
|
2512
|
-
className:
|
|
2513
|
+
className: N(
|
|
2513
2514
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
2514
2515
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
2515
2516
|
),
|
|
2516
2517
|
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2517
2518
|
}
|
|
2518
|
-
), Le = (e) => e === "received" ? "light" : "dark",
|
|
2519
|
+
), Le = (e) => e === "received" ? "light" : "dark", so = ({
|
|
2519
2520
|
firstOfGroup: e,
|
|
2520
2521
|
endOfGroup: t,
|
|
2521
2522
|
groupedByUser: s
|
|
2522
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
2523
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Gr = ({
|
|
2523
2524
|
src: e,
|
|
2524
2525
|
mimeType: t,
|
|
2525
2526
|
filename: s,
|
|
2526
2527
|
items: a
|
|
2527
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
2528
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
2528
2529
|
/* @__PURE__ */ n(
|
|
2529
2530
|
"audio",
|
|
2530
2531
|
{
|
|
@@ -2547,7 +2548,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2547
2548
|
preload: l,
|
|
2548
2549
|
onDismiss: d
|
|
2549
2550
|
}) => {
|
|
2550
|
-
const u = Le(e), h = e === "composer" && !!d, m =
|
|
2551
|
+
const u = Le(e), h = e === "composer" && !!d, m = Gr({ src: t, mimeType: s, filename: a, items: r });
|
|
2551
2552
|
if (m.length === 0)
|
|
2552
2553
|
return null;
|
|
2553
2554
|
const g = l ?? (m.length > 1 ? "none" : "metadata");
|
|
@@ -2559,7 +2560,7 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2559
2560
|
groupPosition: o,
|
|
2560
2561
|
"data-testid": "audio-attachment",
|
|
2561
2562
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ n(
|
|
2562
|
-
|
|
2563
|
+
Yr,
|
|
2563
2564
|
{
|
|
2564
2565
|
item: c,
|
|
2565
2566
|
preload: g,
|
|
@@ -2573,15 +2574,15 @@ const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2573
2574
|
)) })
|
|
2574
2575
|
}
|
|
2575
2576
|
);
|
|
2576
|
-
},
|
|
2577
|
-
Composer:
|
|
2578
|
-
Sent:
|
|
2579
|
-
Received:
|
|
2577
|
+
}, Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), Kr = {
|
|
2578
|
+
Composer: Wr,
|
|
2579
|
+
Sent: Xr,
|
|
2580
|
+
Received: qr
|
|
2580
2581
|
};
|
|
2581
|
-
function
|
|
2582
|
+
function Zr(e) {
|
|
2582
2583
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
2583
2584
|
}
|
|
2584
|
-
const
|
|
2585
|
+
const Jr = {
|
|
2585
2586
|
pdf: "PDF",
|
|
2586
2587
|
doc: "DOC",
|
|
2587
2588
|
xls: "XLS",
|
|
@@ -2591,7 +2592,7 @@ const Zr = {
|
|
|
2591
2592
|
text: "TXT",
|
|
2592
2593
|
markdown: "MD"
|
|
2593
2594
|
};
|
|
2594
|
-
function
|
|
2595
|
+
function Qr(e, t) {
|
|
2595
2596
|
if (t) {
|
|
2596
2597
|
const r = t.lastIndexOf(".");
|
|
2597
2598
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -2601,7 +2602,7 @@ function Jr(e, t) {
|
|
|
2601
2602
|
}
|
|
2602
2603
|
if (!e) return;
|
|
2603
2604
|
if (de(e) === "document") {
|
|
2604
|
-
const r =
|
|
2605
|
+
const r = Cn(e), i = Jr[r];
|
|
2605
2606
|
if (i) return i;
|
|
2606
2607
|
if (e === "application/octet-stream") return;
|
|
2607
2608
|
}
|
|
@@ -2609,8 +2610,8 @@ function Jr(e, t) {
|
|
|
2609
2610
|
if (!(!a || a === "*"))
|
|
2610
2611
|
return a.toUpperCase();
|
|
2611
2612
|
}
|
|
2612
|
-
function
|
|
2613
|
-
const a =
|
|
2613
|
+
function ei(e, t, s) {
|
|
2614
|
+
const a = Qr(e, t), r = typeof s == "number" && s > 0 ? Zr(s) : void 0;
|
|
2614
2615
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
2615
2616
|
}
|
|
2616
2617
|
function re(e) {
|
|
@@ -2621,16 +2622,16 @@ function re(e) {
|
|
|
2621
2622
|
return "download";
|
|
2622
2623
|
}
|
|
2623
2624
|
}
|
|
2624
|
-
const
|
|
2625
|
+
const ti = {
|
|
2625
2626
|
dark: "text-white/55",
|
|
2626
2627
|
light: "text-black/65"
|
|
2627
|
-
},
|
|
2628
|
+
}, ni = {
|
|
2628
2629
|
dark: "bg-white/10",
|
|
2629
2630
|
light: "bg-black/5"
|
|
2630
|
-
},
|
|
2631
|
+
}, si = {
|
|
2631
2632
|
dark: "text-white/85",
|
|
2632
2633
|
light: "text-black/85"
|
|
2633
|
-
},
|
|
2634
|
+
}, zn = ({
|
|
2634
2635
|
variant: e,
|
|
2635
2636
|
filename: t,
|
|
2636
2637
|
title: s,
|
|
@@ -2640,16 +2641,16 @@ const ei = {
|
|
|
2640
2641
|
activateLabel: o,
|
|
2641
2642
|
trailingAction: l
|
|
2642
2643
|
}) => {
|
|
2643
|
-
const d = s ?? t ?? "File", u =
|
|
2644
|
+
const d = s ?? t ?? "File", u = ei(a, t, r), h = /* @__PURE__ */ n(
|
|
2644
2645
|
"div",
|
|
2645
2646
|
{
|
|
2646
|
-
className:
|
|
2647
|
+
className: N(
|
|
2647
2648
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
2648
|
-
|
|
2649
|
+
ni[e]
|
|
2649
2650
|
),
|
|
2650
2651
|
"aria-hidden": !0,
|
|
2651
2652
|
children: ve(a, {
|
|
2652
|
-
className:
|
|
2653
|
+
className: N("size-6", si[e]),
|
|
2653
2654
|
weight: "regular"
|
|
2654
2655
|
})
|
|
2655
2656
|
}
|
|
@@ -2658,9 +2659,9 @@ const ei = {
|
|
|
2658
2659
|
u ? /* @__PURE__ */ n(
|
|
2659
2660
|
"p",
|
|
2660
2661
|
{
|
|
2661
|
-
className:
|
|
2662
|
+
className: N(
|
|
2662
2663
|
"truncate text-xs leading-4",
|
|
2663
|
-
|
|
2664
|
+
ti[e]
|
|
2664
2665
|
),
|
|
2665
2666
|
children: u
|
|
2666
2667
|
}
|
|
@@ -2671,7 +2672,7 @@ const ei = {
|
|
|
2671
2672
|
type: "button",
|
|
2672
2673
|
onClick: i,
|
|
2673
2674
|
"aria-label": o,
|
|
2674
|
-
className:
|
|
2675
|
+
className: N(
|
|
2675
2676
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
2676
2677
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
2677
2678
|
),
|
|
@@ -2689,7 +2690,7 @@ const ei = {
|
|
|
2689
2690
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
2690
2691
|
] });
|
|
2691
2692
|
};
|
|
2692
|
-
async function
|
|
2693
|
+
async function Fn(e, t) {
|
|
2693
2694
|
const s = t ?? re(e);
|
|
2694
2695
|
try {
|
|
2695
2696
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -2703,14 +2704,14 @@ async function zn(e, t) {
|
|
|
2703
2704
|
}
|
|
2704
2705
|
}
|
|
2705
2706
|
}
|
|
2706
|
-
const
|
|
2707
|
+
const ai = ({
|
|
2707
2708
|
src: e,
|
|
2708
2709
|
filename: t,
|
|
2709
2710
|
fileSize: s,
|
|
2710
2711
|
mimeType: a,
|
|
2711
2712
|
title: r,
|
|
2712
2713
|
items: i
|
|
2713
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
2714
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ri = ({
|
|
2714
2715
|
variant: e,
|
|
2715
2716
|
item: t,
|
|
2716
2717
|
index: s,
|
|
@@ -2719,7 +2720,7 @@ const si = ({
|
|
|
2719
2720
|
}) => {
|
|
2720
2721
|
const i = t.filename ?? re(t.src);
|
|
2721
2722
|
return /* @__PURE__ */ n(
|
|
2722
|
-
|
|
2723
|
+
zn,
|
|
2723
2724
|
{
|
|
2724
2725
|
variant: e,
|
|
2725
2726
|
filename: i,
|
|
@@ -2744,7 +2745,7 @@ const si = ({
|
|
|
2744
2745
|
onClick: u,
|
|
2745
2746
|
onDismiss: h
|
|
2746
2747
|
}) => {
|
|
2747
|
-
const m = Le(e), g = e === "composer" && !!h, c =
|
|
2748
|
+
const m = Le(e), g = e === "composer" && !!h, c = ai({
|
|
2748
2749
|
src: t,
|
|
2749
2750
|
filename: s,
|
|
2750
2751
|
fileSize: a,
|
|
@@ -2756,14 +2757,14 @@ const si = ({
|
|
|
2756
2757
|
const x = c[v];
|
|
2757
2758
|
if (!x) return;
|
|
2758
2759
|
const b = x.filename ?? re(x.src);
|
|
2759
|
-
|
|
2760
|
+
Fn(x.src, b);
|
|
2760
2761
|
};
|
|
2761
2762
|
if (c.length === 0)
|
|
2762
2763
|
return null;
|
|
2763
2764
|
const w = /* @__PURE__ */ n(
|
|
2764
2765
|
"span",
|
|
2765
2766
|
{
|
|
2766
|
-
className:
|
|
2767
|
+
className: N(
|
|
2767
2768
|
"flex size-8 items-center justify-center rounded-full",
|
|
2768
2769
|
m === "dark" ? "text-white/70" : "text-black/70"
|
|
2769
2770
|
),
|
|
@@ -2779,7 +2780,7 @@ const si = ({
|
|
|
2779
2780
|
groupPosition: d,
|
|
2780
2781
|
"data-testid": "file-attachment",
|
|
2781
2782
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
2782
|
-
|
|
2783
|
+
ri,
|
|
2783
2784
|
{
|
|
2784
2785
|
variant: m,
|
|
2785
2786
|
item: v,
|
|
@@ -2791,11 +2792,11 @@ const si = ({
|
|
|
2791
2792
|
)) })
|
|
2792
2793
|
}
|
|
2793
2794
|
);
|
|
2794
|
-
},
|
|
2795
|
-
Composer:
|
|
2796
|
-
Sent:
|
|
2797
|
-
Received:
|
|
2798
|
-
},
|
|
2795
|
+
}, ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), oi = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), ci = {
|
|
2796
|
+
Composer: ii,
|
|
2797
|
+
Sent: li,
|
|
2798
|
+
Received: oi
|
|
2799
|
+
}, $n = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
|
|
2799
2800
|
onPrev: e,
|
|
2800
2801
|
onNext: t,
|
|
2801
2802
|
prevLabel: s = "Previous",
|
|
@@ -2808,7 +2809,7 @@ const si = ({
|
|
|
2808
2809
|
onClick: e,
|
|
2809
2810
|
"aria-label": s,
|
|
2810
2811
|
className: `${tn} left-4`,
|
|
2811
|
-
children: /* @__PURE__ */ n(
|
|
2812
|
+
children: /* @__PURE__ */ n(ga, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2812
2813
|
}
|
|
2813
2814
|
),
|
|
2814
2815
|
/* @__PURE__ */ n(
|
|
@@ -2818,10 +2819,10 @@ const si = ({
|
|
|
2818
2819
|
onClick: t,
|
|
2819
2820
|
"aria-label": a,
|
|
2820
2821
|
className: `${tn} right-4`,
|
|
2821
|
-
children: /* @__PURE__ */ n(
|
|
2822
|
+
children: /* @__PURE__ */ n(gn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2822
2823
|
}
|
|
2823
2824
|
)
|
|
2824
|
-
] }),
|
|
2825
|
+
] }), Bn = ({
|
|
2825
2826
|
url: e,
|
|
2826
2827
|
filename: t,
|
|
2827
2828
|
variant: s = "pill",
|
|
@@ -2830,15 +2831,15 @@ const si = ({
|
|
|
2830
2831
|
tone: i = "dark",
|
|
2831
2832
|
onTriggered: o
|
|
2832
2833
|
}) => {
|
|
2833
|
-
const [l, d] = B(!1), u =
|
|
2834
|
+
const [l, d] = B(!1), u = X(
|
|
2834
2835
|
(c) => {
|
|
2835
|
-
c.stopPropagation(), !l && (d(!0),
|
|
2836
|
+
c.stopPropagation(), !l && (d(!0), Fn(e, t).catch(() => {
|
|
2836
2837
|
}).finally(() => {
|
|
2837
2838
|
d(!1), o == null || o();
|
|
2838
2839
|
}));
|
|
2839
2840
|
},
|
|
2840
2841
|
[l, e, t, o]
|
|
2841
|
-
), h = r ?? s !== "pill", g = { className:
|
|
2842
|
+
), h = r ?? s !== "pill", g = { className: N(
|
|
2842
2843
|
s === "pill" ? "size-4" : "size-5",
|
|
2843
2844
|
"shrink-0"
|
|
2844
2845
|
), weight: "bold" };
|
|
@@ -2849,7 +2850,7 @@ const si = ({
|
|
|
2849
2850
|
onClick: u,
|
|
2850
2851
|
disabled: l,
|
|
2851
2852
|
"aria-label": a,
|
|
2852
|
-
className:
|
|
2853
|
+
className: N(
|
|
2853
2854
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
2854
2855
|
{
|
|
2855
2856
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -2879,7 +2880,7 @@ const si = ({
|
|
|
2879
2880
|
onClick: u,
|
|
2880
2881
|
disabled: l,
|
|
2881
2882
|
"aria-label": a,
|
|
2882
|
-
className:
|
|
2883
|
+
className: $n,
|
|
2883
2884
|
children: l ? /* @__PURE__ */ n(be, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2884
2885
|
}
|
|
2885
2886
|
) : /* @__PURE__ */ f(
|
|
@@ -2889,7 +2890,7 @@ const si = ({
|
|
|
2889
2890
|
onClick: u,
|
|
2890
2891
|
disabled: l,
|
|
2891
2892
|
"aria-label": h ? a : void 0,
|
|
2892
|
-
className:
|
|
2893
|
+
className: N(
|
|
2893
2894
|
"mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
|
|
2894
2895
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
2895
2896
|
),
|
|
@@ -2912,17 +2913,17 @@ const si = ({
|
|
|
2912
2913
|
open: s
|
|
2913
2914
|
}) => {
|
|
2914
2915
|
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
|
|
2915
|
-
|
|
2916
|
+
W(() => {
|
|
2916
2917
|
s && i(Qe(t, 0, Math.max(e - 1, 0)));
|
|
2917
|
-
}, [s, t, e]),
|
|
2918
|
+
}, [s, t, e]), W(() => {
|
|
2918
2919
|
i((d) => Qe(d, 0, Math.max(e - 1, 0)));
|
|
2919
2920
|
}, [e]);
|
|
2920
|
-
const o =
|
|
2921
|
+
const o = X(() => {
|
|
2921
2922
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
2922
|
-
}, [e]), l =
|
|
2923
|
+
}, [e]), l = X(() => {
|
|
2923
2924
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
2924
2925
|
}, [e]);
|
|
2925
|
-
return
|
|
2926
|
+
return W(() => {
|
|
2926
2927
|
if (!s || e <= 1) return;
|
|
2927
2928
|
const d = (u) => {
|
|
2928
2929
|
if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
|
|
@@ -2940,8 +2941,8 @@ const si = ({
|
|
|
2940
2941
|
children: i,
|
|
2941
2942
|
"data-testid": o
|
|
2942
2943
|
}) => {
|
|
2943
|
-
const l =
|
|
2944
|
-
return
|
|
2944
|
+
const l = V(null), d = V(null);
|
|
2945
|
+
return W(() => {
|
|
2945
2946
|
var g;
|
|
2946
2947
|
const m = l.current;
|
|
2947
2948
|
if (m) {
|
|
@@ -3011,7 +3012,7 @@ const si = ({
|
|
|
3011
3012
|
type: "button",
|
|
3012
3013
|
onClick: t,
|
|
3013
3014
|
"aria-label": "Close viewer",
|
|
3014
|
-
className:
|
|
3015
|
+
className: $n,
|
|
3015
3016
|
children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3016
3017
|
}
|
|
3017
3018
|
)
|
|
@@ -3021,7 +3022,7 @@ const si = ({
|
|
|
3021
3022
|
]
|
|
3022
3023
|
}
|
|
3023
3024
|
);
|
|
3024
|
-
},
|
|
3025
|
+
}, Un = ({
|
|
3025
3026
|
open: e,
|
|
3026
3027
|
items: t,
|
|
3027
3028
|
initialIndex: s = 0,
|
|
@@ -3043,7 +3044,7 @@ const si = ({
|
|
|
3043
3044
|
ariaLabel: d,
|
|
3044
3045
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3045
3046
|
actions: /* @__PURE__ */ n(
|
|
3046
|
-
|
|
3047
|
+
Bn,
|
|
3047
3048
|
{
|
|
3048
3049
|
url: l.src,
|
|
3049
3050
|
filename: d,
|
|
@@ -3076,7 +3077,7 @@ const si = ({
|
|
|
3076
3077
|
]
|
|
3077
3078
|
}
|
|
3078
3079
|
) : null;
|
|
3079
|
-
},
|
|
3080
|
+
}, di = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", ui = {
|
|
3080
3081
|
1: ["rounded-[18px]"],
|
|
3081
3082
|
2: ["rounded-l-[18px]", "rounded-r-[18px]"],
|
|
3082
3083
|
3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
|
|
@@ -3086,7 +3087,7 @@ const si = ({
|
|
|
3086
3087
|
"rounded-bl-[18px]",
|
|
3087
3088
|
"rounded-br-[18px]"
|
|
3088
3089
|
]
|
|
3089
|
-
},
|
|
3090
|
+
}, mi = "--mes-single-width-cap", hi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", fi = 436, jn = ({
|
|
3090
3091
|
tiles: e,
|
|
3091
3092
|
onTileActivate: t,
|
|
3092
3093
|
maxVisible: s = 4,
|
|
@@ -3097,10 +3098,10 @@ const si = ({
|
|
|
3097
3098
|
if (i === 0) return null;
|
|
3098
3099
|
const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
|
|
3099
3100
|
var p;
|
|
3100
|
-
const c =
|
|
3101
|
-
|
|
3101
|
+
const c = N(
|
|
3102
|
+
di,
|
|
3102
3103
|
"h-full w-full",
|
|
3103
|
-
(p =
|
|
3104
|
+
(p = ui[o.length]) == null ? void 0 : p[m]
|
|
3104
3105
|
);
|
|
3105
3106
|
return t ? /* @__PURE__ */ f(
|
|
3106
3107
|
"button",
|
|
@@ -3108,7 +3109,7 @@ const si = ({
|
|
|
3108
3109
|
type: "button",
|
|
3109
3110
|
onClick: () => t(m),
|
|
3110
3111
|
"aria-label": h.ariaLabel ?? `Open media ${m + 1}`,
|
|
3111
|
-
className:
|
|
3112
|
+
className: N(c, "cursor-zoom-in"),
|
|
3112
3113
|
children: [
|
|
3113
3114
|
h.content,
|
|
3114
3115
|
g
|
|
@@ -3125,14 +3126,14 @@ const si = ({
|
|
|
3125
3126
|
aspectRatio: a,
|
|
3126
3127
|
// Hundredths keep the emitted declaration readable in devtools;
|
|
3127
3128
|
// the rounding error is well under a device pixel.
|
|
3128
|
-
width: `min(var(${
|
|
3129
|
+
width: `min(var(${mi}), ${Math.round(fi * a * 100) / 100}px)`,
|
|
3129
3130
|
// Only bites in a container narrower than the width cap.
|
|
3130
3131
|
maxWidth: "100%"
|
|
3131
3132
|
}), o.length === 1 ? /* @__PURE__ */ n(
|
|
3132
3133
|
"div",
|
|
3133
3134
|
{
|
|
3134
|
-
className:
|
|
3135
|
-
a ?
|
|
3135
|
+
className: N(
|
|
3136
|
+
a ? hi : "aspect-square w-full",
|
|
3136
3137
|
r
|
|
3137
3138
|
),
|
|
3138
3139
|
style: u,
|
|
@@ -3141,7 +3142,7 @@ const si = ({
|
|
|
3141
3142
|
) : o.length === 2 ? /* @__PURE__ */ n(
|
|
3142
3143
|
"div",
|
|
3143
3144
|
{
|
|
3144
|
-
className:
|
|
3145
|
+
className: N(
|
|
3145
3146
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3146
3147
|
r
|
|
3147
3148
|
),
|
|
@@ -3150,7 +3151,7 @@ const si = ({
|
|
|
3150
3151
|
) : o.length === 3 ? /* @__PURE__ */ f(
|
|
3151
3152
|
"div",
|
|
3152
3153
|
{
|
|
3153
|
-
className:
|
|
3154
|
+
className: N(
|
|
3154
3155
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3155
3156
|
r
|
|
3156
3157
|
),
|
|
@@ -3163,7 +3164,7 @@ const si = ({
|
|
|
3163
3164
|
) : /* @__PURE__ */ n(
|
|
3164
3165
|
"div",
|
|
3165
3166
|
{
|
|
3166
|
-
className:
|
|
3167
|
+
className: N(
|
|
3167
3168
|
// 379x286 is the content box of Figma's 383x290 stacked-media
|
|
3168
3169
|
// card (`attachment-single-image` 1973:13863) once its 2px
|
|
3169
3170
|
// frame is removed. Pinning the aspect on the container — as
|
|
@@ -3188,14 +3189,14 @@ const si = ({
|
|
|
3188
3189
|
}
|
|
3189
3190
|
);
|
|
3190
3191
|
}, Me = (e) => {
|
|
3191
|
-
const [t, s] = B(!1), [a, r] = B(0), i =
|
|
3192
|
+
const [t, s] = B(!1), [a, r] = B(0), i = X(
|
|
3192
3193
|
(l) => {
|
|
3193
3194
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
3194
3195
|
},
|
|
3195
3196
|
[e]
|
|
3196
|
-
), o =
|
|
3197
|
+
), o = X(() => s(!1), []);
|
|
3197
3198
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3198
|
-
},
|
|
3199
|
+
}, gi = ({
|
|
3199
3200
|
item: e,
|
|
3200
3201
|
index: t,
|
|
3201
3202
|
totalCount: s,
|
|
@@ -3223,15 +3224,15 @@ const si = ({
|
|
|
3223
3224
|
}
|
|
3224
3225
|
)
|
|
3225
3226
|
)
|
|
3226
|
-
}),
|
|
3227
|
+
}), pi = ({
|
|
3227
3228
|
src: e,
|
|
3228
3229
|
alt: t,
|
|
3229
3230
|
items: s
|
|
3230
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
3231
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Hn = (e, t) => e.map((s, a) => ({
|
|
3231
3232
|
src: s.src,
|
|
3232
3233
|
alt: s.alt,
|
|
3233
3234
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3234
|
-
})),
|
|
3235
|
+
})), bi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3235
3236
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Me(r);
|
|
3236
3237
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3237
3238
|
/* @__PURE__ */ n(
|
|
@@ -3256,16 +3257,16 @@ const si = ({
|
|
|
3256
3257
|
),
|
|
3257
3258
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: i }) }) : null,
|
|
3258
3259
|
/* @__PURE__ */ n(
|
|
3259
|
-
|
|
3260
|
+
Un,
|
|
3260
3261
|
{
|
|
3261
3262
|
open: o,
|
|
3262
|
-
items:
|
|
3263
|
+
items: Hn([{ src: e, alt: t }], s),
|
|
3263
3264
|
initialIndex: l,
|
|
3264
3265
|
onClose: u
|
|
3265
3266
|
}
|
|
3266
3267
|
)
|
|
3267
3268
|
] });
|
|
3268
|
-
},
|
|
3269
|
+
}, vi = 326 / 246, xi = (e) => {
|
|
3269
3270
|
const t = e == null ? void 0 : e.src, [s, a] = z.useState(), r = z.useCallback(
|
|
3270
3271
|
(d) => {
|
|
3271
3272
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
@@ -3280,11 +3281,11 @@ const si = ({
|
|
|
3280
3281
|
[r]
|
|
3281
3282
|
), o = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, l = s && s.src === t ? s.ratio : void 0;
|
|
3282
3283
|
return {
|
|
3283
|
-
ratio: o ?? l ??
|
|
3284
|
+
ratio: o ?? l ?? vi,
|
|
3284
3285
|
imgRef: r,
|
|
3285
3286
|
onLoad: i
|
|
3286
3287
|
};
|
|
3287
|
-
},
|
|
3288
|
+
}, Vn = ({
|
|
3288
3289
|
state: e,
|
|
3289
3290
|
src: t,
|
|
3290
3291
|
alt: s,
|
|
@@ -3295,13 +3296,13 @@ const si = ({
|
|
|
3295
3296
|
loading: l = "lazy",
|
|
3296
3297
|
onClick: d
|
|
3297
3298
|
}) => {
|
|
3298
|
-
const u =
|
|
3299
|
+
const u = pi({ src: t, alt: s, items: r }), h = Le(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Me(d), w = u.length === 1, v = xi(w ? u[0] : void 0);
|
|
3299
3300
|
if (u.length === 0)
|
|
3300
3301
|
return null;
|
|
3301
3302
|
const x = u.map(
|
|
3302
|
-
(b,
|
|
3303
|
+
(b, y) => gi({
|
|
3303
3304
|
item: b,
|
|
3304
|
-
index:
|
|
3305
|
+
index: y,
|
|
3305
3306
|
totalCount: u.length,
|
|
3306
3307
|
fallbackLoading: l,
|
|
3307
3308
|
imgRef: w ? v.imgRef : void 0,
|
|
@@ -3321,7 +3322,7 @@ const si = ({
|
|
|
3321
3322
|
"data-testid": "image-attachment",
|
|
3322
3323
|
children: [
|
|
3323
3324
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3324
|
-
|
|
3325
|
+
jn,
|
|
3325
3326
|
{
|
|
3326
3327
|
tiles: x,
|
|
3327
3328
|
onTileActivate: c,
|
|
@@ -3329,10 +3330,10 @@ const si = ({
|
|
|
3329
3330
|
}
|
|
3330
3331
|
) }),
|
|
3331
3332
|
/* @__PURE__ */ n(
|
|
3332
|
-
|
|
3333
|
+
Un,
|
|
3333
3334
|
{
|
|
3334
3335
|
open: m,
|
|
3335
|
-
items:
|
|
3336
|
+
items: Hn(u, a),
|
|
3336
3337
|
initialIndex: g,
|
|
3337
3338
|
onClose: p
|
|
3338
3339
|
}
|
|
@@ -3340,11 +3341,11 @@ const si = ({
|
|
|
3340
3341
|
]
|
|
3341
3342
|
}
|
|
3342
3343
|
);
|
|
3343
|
-
},
|
|
3344
|
-
Composer:
|
|
3345
|
-
Sent:
|
|
3346
|
-
Received:
|
|
3347
|
-
},
|
|
3344
|
+
}, wi = (e) => /* @__PURE__ */ n(bi, { ...e }), _i = (e) => /* @__PURE__ */ n(Vn, { ...e, state: "sent" }), yi = (e) => /* @__PURE__ */ n(Vn, { ...e, state: "received" }), Ni = {
|
|
3345
|
+
Composer: wi,
|
|
3346
|
+
Sent: _i,
|
|
3347
|
+
Received: yi
|
|
3348
|
+
}, ki = ({
|
|
3348
3349
|
open: e,
|
|
3349
3350
|
items: t,
|
|
3350
3351
|
initialIndex: s = 0,
|
|
@@ -3358,7 +3359,7 @@ const si = ({
|
|
|
3358
3359
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
|
|
3359
3360
|
[l]
|
|
3360
3361
|
), u = le(
|
|
3361
|
-
() => l ?
|
|
3362
|
+
() => l ? Ci(l.src) : void 0,
|
|
3362
3363
|
[l]
|
|
3363
3364
|
);
|
|
3364
3365
|
return !l || !u ? null : /* @__PURE__ */ f(
|
|
@@ -3392,16 +3393,16 @@ const si = ({
|
|
|
3392
3393
|
]
|
|
3393
3394
|
}
|
|
3394
3395
|
);
|
|
3395
|
-
},
|
|
3396
|
+
}, Ci = (e) => {
|
|
3396
3397
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
3397
3398
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
3398
|
-
},
|
|
3399
|
+
}, Si = ({
|
|
3399
3400
|
src: e,
|
|
3400
3401
|
filename: t,
|
|
3401
3402
|
fileSize: s,
|
|
3402
3403
|
title: a,
|
|
3403
3404
|
items: r
|
|
3404
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
3405
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Ei = ({
|
|
3405
3406
|
variant: e,
|
|
3406
3407
|
item: t,
|
|
3407
3408
|
index: s,
|
|
@@ -3410,7 +3411,7 @@ const si = ({
|
|
|
3410
3411
|
}) => {
|
|
3411
3412
|
const i = t.filename ?? re(t.src);
|
|
3412
3413
|
return /* @__PURE__ */ n(
|
|
3413
|
-
|
|
3414
|
+
zn,
|
|
3414
3415
|
{
|
|
3415
3416
|
variant: e,
|
|
3416
3417
|
filename: i,
|
|
@@ -3434,7 +3435,7 @@ const si = ({
|
|
|
3434
3435
|
onClick: d,
|
|
3435
3436
|
onDismiss: u
|
|
3436
3437
|
}) => {
|
|
3437
|
-
const h = Le(e), m =
|
|
3438
|
+
const h = Le(e), m = Si({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(d), v = e === "composer" && !!u;
|
|
3438
3439
|
if (m.length === 0)
|
|
3439
3440
|
return null;
|
|
3440
3441
|
const x = m.map((b) => ({
|
|
@@ -3449,9 +3450,9 @@ const si = ({
|
|
|
3449
3450
|
groupPosition: l,
|
|
3450
3451
|
"data-testid": "pdf-attachment",
|
|
3451
3452
|
children: [
|
|
3452
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((b,
|
|
3453
|
-
const _ = b.filename ?? re(b.src), T = v &&
|
|
3454
|
-
|
|
3453
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((b, y) => {
|
|
3454
|
+
const _ = b.filename ?? re(b.src), T = v && y === 0 ? /* @__PURE__ */ n(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
3455
|
+
Bn,
|
|
3455
3456
|
{
|
|
3456
3457
|
url: b.src,
|
|
3457
3458
|
filename: _,
|
|
@@ -3461,19 +3462,19 @@ const si = ({
|
|
|
3461
3462
|
}
|
|
3462
3463
|
);
|
|
3463
3464
|
return /* @__PURE__ */ n(
|
|
3464
|
-
|
|
3465
|
+
Ei,
|
|
3465
3466
|
{
|
|
3466
3467
|
variant: h,
|
|
3467
3468
|
item: b,
|
|
3468
|
-
index:
|
|
3469
|
+
index: y,
|
|
3469
3470
|
onActivate: p,
|
|
3470
3471
|
trailingAction: T
|
|
3471
3472
|
},
|
|
3472
|
-
`${b.src}-${
|
|
3473
|
+
`${b.src}-${y}`
|
|
3473
3474
|
);
|
|
3474
3475
|
}) }),
|
|
3475
3476
|
/* @__PURE__ */ n(
|
|
3476
|
-
|
|
3477
|
+
ki,
|
|
3477
3478
|
{
|
|
3478
3479
|
open: g,
|
|
3479
3480
|
items: x,
|
|
@@ -3484,11 +3485,11 @@ const si = ({
|
|
|
3484
3485
|
]
|
|
3485
3486
|
}
|
|
3486
3487
|
);
|
|
3487
|
-
},
|
|
3488
|
-
Composer:
|
|
3489
|
-
Sent:
|
|
3490
|
-
Received:
|
|
3491
|
-
},
|
|
3488
|
+
}, Ii = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ti = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Ai = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Ri = {
|
|
3489
|
+
Composer: Ii,
|
|
3490
|
+
Sent: Ti,
|
|
3491
|
+
Received: Ai
|
|
3492
|
+
}, Gn = ({
|
|
3492
3493
|
open: e,
|
|
3493
3494
|
items: t,
|
|
3494
3495
|
initialIndex: s = 0,
|
|
@@ -3538,7 +3539,7 @@ const si = ({
|
|
|
3538
3539
|
]
|
|
3539
3540
|
}
|
|
3540
3541
|
) : null;
|
|
3541
|
-
},
|
|
3542
|
+
}, Li = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Yn = ({
|
|
3542
3543
|
item: e,
|
|
3543
3544
|
index: t
|
|
3544
3545
|
}) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -3553,30 +3554,30 @@ const si = ({
|
|
|
3553
3554
|
className: "absolute inset-0 size-full object-cover"
|
|
3554
3555
|
}
|
|
3555
3556
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
3556
|
-
|
|
3557
|
+
bn,
|
|
3557
3558
|
{
|
|
3558
3559
|
className: "size-16 text-white/30",
|
|
3559
3560
|
weight: "regular",
|
|
3560
3561
|
"aria-hidden": !0
|
|
3561
3562
|
}
|
|
3562
3563
|
) }),
|
|
3563
|
-
/* @__PURE__ */ n(
|
|
3564
|
-
] }),
|
|
3564
|
+
/* @__PURE__ */ n(Li, {})
|
|
3565
|
+
] }), Mi = (e, t, s) => ({
|
|
3565
3566
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
3566
|
-
content: /* @__PURE__ */ n(
|
|
3567
|
-
}),
|
|
3567
|
+
content: /* @__PURE__ */ n(Yn, { item: e, index: t })
|
|
3568
|
+
}), Di = ({
|
|
3568
3569
|
src: e,
|
|
3569
3570
|
poster: t,
|
|
3570
3571
|
mimeType: s,
|
|
3571
3572
|
preload: a,
|
|
3572
3573
|
items: r
|
|
3573
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
3574
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Wn = (e, t) => e.map((s, a) => ({
|
|
3574
3575
|
src: s.src,
|
|
3575
3576
|
poster: s.poster,
|
|
3576
3577
|
mimeType: s.mimeType,
|
|
3577
3578
|
preload: s.preload,
|
|
3578
3579
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3579
|
-
})),
|
|
3580
|
+
})), Oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
3580
3581
|
const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Me(i);
|
|
3581
3582
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3582
3583
|
/* @__PURE__ */ n(
|
|
@@ -3586,21 +3587,21 @@ const si = ({
|
|
|
3586
3587
|
onClick: () => u(0),
|
|
3587
3588
|
"aria-label": "Play video",
|
|
3588
3589
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
3589
|
-
children: /* @__PURE__ */ n(
|
|
3590
|
+
children: /* @__PURE__ */ n(Yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
3590
3591
|
}
|
|
3591
3592
|
),
|
|
3592
3593
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Re, { onClick: o }) }) : null,
|
|
3593
3594
|
/* @__PURE__ */ n(
|
|
3594
|
-
|
|
3595
|
+
Gn,
|
|
3595
3596
|
{
|
|
3596
3597
|
open: l,
|
|
3597
|
-
items:
|
|
3598
|
+
items: Wn([{ src: e, poster: t, mimeType: s, preload: r }], a),
|
|
3598
3599
|
initialIndex: d,
|
|
3599
3600
|
onClose: h
|
|
3600
3601
|
}
|
|
3601
3602
|
)
|
|
3602
3603
|
] });
|
|
3603
|
-
},
|
|
3604
|
+
}, Xn = ({
|
|
3604
3605
|
state: e,
|
|
3605
3606
|
src: t,
|
|
3606
3607
|
poster: s,
|
|
@@ -3612,11 +3613,11 @@ const si = ({
|
|
|
3612
3613
|
preload: d,
|
|
3613
3614
|
onClick: u
|
|
3614
3615
|
}) => {
|
|
3615
|
-
const h =
|
|
3616
|
+
const h = Di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Me(u);
|
|
3616
3617
|
if (h.length === 0)
|
|
3617
3618
|
return null;
|
|
3618
3619
|
const v = h.map(
|
|
3619
|
-
(x, b) =>
|
|
3620
|
+
(x, b) => Mi(x, b, h.length)
|
|
3620
3621
|
);
|
|
3621
3622
|
return /* @__PURE__ */ f(
|
|
3622
3623
|
Ae,
|
|
@@ -3626,12 +3627,12 @@ const si = ({
|
|
|
3626
3627
|
groupPosition: l,
|
|
3627
3628
|
"data-testid": "video-attachment",
|
|
3628
3629
|
children: [
|
|
3629
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
3630
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(jn, { tiles: v, onTileActivate: p }) }),
|
|
3630
3631
|
/* @__PURE__ */ n(
|
|
3631
|
-
|
|
3632
|
+
Gn,
|
|
3632
3633
|
{
|
|
3633
3634
|
open: g,
|
|
3634
|
-
items:
|
|
3635
|
+
items: Wn(h, r),
|
|
3635
3636
|
initialIndex: c,
|
|
3636
3637
|
onClose: w
|
|
3637
3638
|
}
|
|
@@ -3639,16 +3640,16 @@ const si = ({
|
|
|
3639
3640
|
]
|
|
3640
3641
|
}
|
|
3641
3642
|
);
|
|
3642
|
-
},
|
|
3643
|
-
Composer:
|
|
3644
|
-
Sent:
|
|
3645
|
-
Received:
|
|
3643
|
+
}, Pi = (e) => /* @__PURE__ */ n(Oi, { ...e }), zi = (e) => /* @__PURE__ */ n(Xn, { ...e, state: "sent" }), Fi = (e) => /* @__PURE__ */ n(Xn, { ...e, state: "received" }), $i = {
|
|
3644
|
+
Composer: Pi,
|
|
3645
|
+
Sent: zi,
|
|
3646
|
+
Received: Fi
|
|
3646
3647
|
}, ke = {
|
|
3647
|
-
Image:
|
|
3648
|
-
Video:
|
|
3649
|
-
Audio:
|
|
3650
|
-
Pdf:
|
|
3651
|
-
File:
|
|
3648
|
+
Image: Ni,
|
|
3649
|
+
Video: $i,
|
|
3650
|
+
Audio: Kr,
|
|
3651
|
+
Pdf: Ri,
|
|
3652
|
+
File: ci
|
|
3652
3653
|
};
|
|
3653
3654
|
function O(e) {
|
|
3654
3655
|
const t = e == null ? void 0 : e.trim();
|
|
@@ -3657,7 +3658,7 @@ function O(e) {
|
|
|
3657
3658
|
function nn(e) {
|
|
3658
3659
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3659
3660
|
}
|
|
3660
|
-
function
|
|
3661
|
+
function Bi(e, t) {
|
|
3661
3662
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3662
3663
|
return !1;
|
|
3663
3664
|
const s = nn(e), a = nn(t);
|
|
@@ -3690,11 +3691,11 @@ function sn(e) {
|
|
|
3690
3691
|
status: "ready"
|
|
3691
3692
|
};
|
|
3692
3693
|
}
|
|
3693
|
-
function
|
|
3694
|
+
function Ui(e) {
|
|
3694
3695
|
var t;
|
|
3695
3696
|
return Ve(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3696
3697
|
}
|
|
3697
|
-
function
|
|
3698
|
+
function qn(e) {
|
|
3698
3699
|
if (!(e != null && e.length)) return [];
|
|
3699
3700
|
const t = [], s = (r, i) => {
|
|
3700
3701
|
const o = t[t.length - 1];
|
|
@@ -3716,21 +3717,21 @@ function Xn(e) {
|
|
|
3716
3717
|
a(r);
|
|
3717
3718
|
continue;
|
|
3718
3719
|
}
|
|
3719
|
-
const i =
|
|
3720
|
+
const i = Ui(r);
|
|
3720
3721
|
i && s(i, r);
|
|
3721
3722
|
}
|
|
3722
3723
|
return t;
|
|
3723
3724
|
}
|
|
3724
|
-
function
|
|
3725
|
+
function ji(e) {
|
|
3725
3726
|
return e.filter((t) => t.type === "media").length;
|
|
3726
3727
|
}
|
|
3727
|
-
function
|
|
3728
|
+
function Hi(e, t, s) {
|
|
3728
3729
|
return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3729
3730
|
}
|
|
3730
3731
|
function an(e) {
|
|
3731
3732
|
return O(e.image_url) ?? O(e.asset_url) ?? "";
|
|
3732
3733
|
}
|
|
3733
|
-
function
|
|
3734
|
+
function Vi(e) {
|
|
3734
3735
|
switch (e) {
|
|
3735
3736
|
case "image":
|
|
3736
3737
|
return ke.Image;
|
|
@@ -3744,7 +3745,7 @@ function Hi(e) {
|
|
|
3744
3745
|
return ke.File;
|
|
3745
3746
|
}
|
|
3746
3747
|
}
|
|
3747
|
-
function
|
|
3748
|
+
function Gi(e, t) {
|
|
3748
3749
|
if (t.length > 1)
|
|
3749
3750
|
switch (e) {
|
|
3750
3751
|
case "image":
|
|
@@ -3827,51 +3828,51 @@ function Vi(e, t) {
|
|
|
3827
3828
|
};
|
|
3828
3829
|
}
|
|
3829
3830
|
}
|
|
3830
|
-
function
|
|
3831
|
+
function Yi({
|
|
3831
3832
|
groupPosition: e,
|
|
3832
3833
|
isMyMessage: t,
|
|
3833
3834
|
segment: s
|
|
3834
3835
|
}) {
|
|
3835
|
-
const a =
|
|
3836
|
-
...
|
|
3836
|
+
const a = Vi(s.kind), r = {
|
|
3837
|
+
...Gi(s.kind, s.attachments),
|
|
3837
3838
|
groupPosition: e
|
|
3838
3839
|
};
|
|
3839
3840
|
return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
|
|
3840
3841
|
}
|
|
3841
|
-
const
|
|
3842
|
+
const Wi = ({
|
|
3842
3843
|
groupPosition: e,
|
|
3843
3844
|
isMyMessage: t,
|
|
3844
3845
|
message: s,
|
|
3845
3846
|
renderText: a
|
|
3846
3847
|
}) => {
|
|
3847
3848
|
var v;
|
|
3848
|
-
const r =
|
|
3849
|
+
const r = qn(s.attachments);
|
|
3849
3850
|
if (r.length === 0) return null;
|
|
3850
|
-
const i =
|
|
3851
|
+
const i = ji(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? sn(l.attachments[0] ?? {}).url : void 0, u = o && Bi(o, d) ? void 0 : o;
|
|
3851
3852
|
let h = 0;
|
|
3852
|
-
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b,
|
|
3853
|
+
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, y) => {
|
|
3853
3854
|
const _ = t ? it.Sent : it.Received;
|
|
3854
3855
|
m.push(
|
|
3855
3856
|
/* @__PURE__ */ n(
|
|
3856
3857
|
_,
|
|
3857
3858
|
{
|
|
3858
3859
|
...sn(x),
|
|
3859
|
-
groupPosition:
|
|
3860
|
+
groupPosition: y ? g : "middle"
|
|
3860
3861
|
},
|
|
3861
3862
|
b
|
|
3862
3863
|
)
|
|
3863
3864
|
);
|
|
3864
3865
|
}, w = (x, b) => {
|
|
3865
|
-
const
|
|
3866
|
+
const y = Hi(
|
|
3866
3867
|
h,
|
|
3867
3868
|
i,
|
|
3868
3869
|
e
|
|
3869
3870
|
);
|
|
3870
3871
|
h += 1, m.push(
|
|
3871
3872
|
/* @__PURE__ */ n(
|
|
3872
|
-
|
|
3873
|
+
Yi,
|
|
3873
3874
|
{
|
|
3874
|
-
groupPosition:
|
|
3875
|
+
groupPosition: y,
|
|
3875
3876
|
isMyMessage: t,
|
|
3876
3877
|
segment: x
|
|
3877
3878
|
},
|
|
@@ -3880,13 +3881,13 @@ const Yi = ({
|
|
|
3880
3881
|
);
|
|
3881
3882
|
};
|
|
3882
3883
|
return r.forEach((x, b) => {
|
|
3883
|
-
const
|
|
3884
|
+
const y = b === r.length - 1;
|
|
3884
3885
|
if (x.type === "link") {
|
|
3885
3886
|
x.attachments.forEach((_, T) => {
|
|
3886
3887
|
p(
|
|
3887
3888
|
_,
|
|
3888
3889
|
`link-${b}-${T}`,
|
|
3889
|
-
|
|
3890
|
+
y && T === x.attachments.length - 1
|
|
3890
3891
|
);
|
|
3891
3892
|
});
|
|
3892
3893
|
return;
|
|
@@ -3913,7 +3914,7 @@ const Yi = ({
|
|
|
3913
3914
|
u ? /* @__PURE__ */ f(
|
|
3914
3915
|
"div",
|
|
3915
3916
|
{
|
|
3916
|
-
className:
|
|
3917
|
+
className: N("str-chat__message-bubble", {
|
|
3917
3918
|
"relative isolate": c
|
|
3918
3919
|
}),
|
|
3919
3920
|
children: [
|
|
@@ -3924,7 +3925,7 @@ const Yi = ({
|
|
|
3924
3925
|
}
|
|
3925
3926
|
) : null
|
|
3926
3927
|
] });
|
|
3927
|
-
},
|
|
3928
|
+
}, Xi = (e) => {
|
|
3928
3929
|
var Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt, Ut;
|
|
3929
3930
|
const {
|
|
3930
3931
|
additionalMessageInputProps: t,
|
|
@@ -3945,19 +3946,19 @@ const Yi = ({
|
|
|
3945
3946
|
viewerLanguage: v,
|
|
3946
3947
|
onOutboundClick: x,
|
|
3947
3948
|
resolvedOutbound: b
|
|
3948
|
-
} = e, { client:
|
|
3949
|
-
Attachment:
|
|
3950
|
-
EditMessageModal: S =
|
|
3949
|
+
} = e, { client: y } = He("CustomMessage"), { channel: _ } = we("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = sr("LockedAttachment"), [F, R] = B(!1), I = hs(c.id), {
|
|
3950
|
+
Attachment: M = fs,
|
|
3951
|
+
EditMessageModal: S = gs,
|
|
3951
3952
|
MessageActions: C,
|
|
3952
|
-
MessageBlocked: A =
|
|
3953
|
-
MessageBouncePrompt: P =
|
|
3954
|
-
MessageDeleted: U =
|
|
3955
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
3956
|
-
MessageRepliesCountButton:
|
|
3957
|
-
ReminderNotification: Z =
|
|
3958
|
-
StreamedMessageText:
|
|
3959
|
-
PinIndicator:
|
|
3960
|
-
} =
|
|
3953
|
+
MessageBlocked: A = ps,
|
|
3954
|
+
MessageBouncePrompt: P = bs,
|
|
3955
|
+
MessageDeleted: U = vs,
|
|
3956
|
+
MessageIsThreadReplyInChannelButtonIndicator: G = xs,
|
|
3957
|
+
MessageRepliesCountButton: ee = ws,
|
|
3958
|
+
ReminderNotification: Z = _s,
|
|
3959
|
+
StreamedMessageText: J = ys,
|
|
3960
|
+
PinIndicator: H
|
|
3961
|
+
} = mn("CustomMessage"), k = Ns(c), D = ks(c), Y = le(
|
|
3961
3962
|
() => m == null ? void 0 : m(c),
|
|
3962
3963
|
[m, c]
|
|
3963
3964
|
), j = le(() => {
|
|
@@ -3965,47 +3966,47 @@ const Yi = ({
|
|
|
3965
3966
|
if (!Fe(c)) return pe;
|
|
3966
3967
|
const jt = pe.filter((Ht) => !("type" in Ht) || !Ve(Ht));
|
|
3967
3968
|
return jt.length === pe.length ? pe : jt;
|
|
3968
|
-
}, [c]),
|
|
3969
|
-
() =>
|
|
3969
|
+
}, [c]), Q = le(
|
|
3970
|
+
() => qn(j),
|
|
3970
3971
|
[j]
|
|
3971
|
-
),
|
|
3972
|
-
const he =
|
|
3972
|
+
), q = le(() => {
|
|
3973
|
+
const he = kn({ message: c, viewerLanguage: v });
|
|
3973
3974
|
return he === c.text ? c : { ...c, text: he };
|
|
3974
|
-
}, [c, v]), ne =
|
|
3975
|
+
}, [c, v]), ne = Q.length > 0, ue = Q.reduce(
|
|
3975
3976
|
(he, pe) => he + pe.attachments.length,
|
|
3976
3977
|
0
|
|
3977
3978
|
) === ((j == null ? void 0 : j.length) ?? 0), ae = (i == null ? void 0 : i[0]) ?? "", De = ae === "top" ? "first" : ae === "middle" ? "middle" : ae === "bottom" ? "end" : "single", se = ae === "single" || ae === "bottom";
|
|
3978
|
-
if (
|
|
3979
|
+
if (Cs(c))
|
|
3979
3980
|
return null;
|
|
3980
3981
|
if (c.deleted_at || c.type === "deleted")
|
|
3981
3982
|
return /* @__PURE__ */ n(U, { message: c });
|
|
3982
|
-
if (
|
|
3983
|
+
if (Ss(c))
|
|
3983
3984
|
return /* @__PURE__ */ n(A, {});
|
|
3984
|
-
const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et =
|
|
3985
|
+
const me = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Es(c);
|
|
3985
3986
|
let ge;
|
|
3986
3987
|
St ? ge = () => u(c) : Et && (ge = () => R(!0));
|
|
3987
|
-
const
|
|
3988
|
+
const te = g(), ns = N(
|
|
3988
3989
|
"str-chat__message str-chat__message-simple",
|
|
3989
3990
|
`str-chat__message--${c.type}`,
|
|
3990
3991
|
`str-chat__message--${c.status}`,
|
|
3991
|
-
|
|
3992
|
+
te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
3992
3993
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
3993
3994
|
{
|
|
3994
|
-
"str-chat__message--has-attachment":
|
|
3995
|
+
"str-chat__message--has-attachment": k,
|
|
3995
3996
|
"str-chat__message--highlighted": h,
|
|
3996
3997
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3997
|
-
"str-chat__message--with-reactions":
|
|
3998
|
+
"str-chat__message--with-reactions": D,
|
|
3998
3999
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
|
|
3999
4000
|
"str-chat__message-with-thread-link": me || ie,
|
|
4000
4001
|
"str-chat__virtual-message__wrapper--end": a,
|
|
4001
4002
|
"str-chat__virtual-message__wrapper--first": r,
|
|
4002
4003
|
"str-chat__virtual-message__wrapper--group": o
|
|
4003
4004
|
}
|
|
4004
|
-
), Ye = c.poll_id &&
|
|
4005
|
+
), Ye = c.poll_id && y.polls.fromState(c.poll_id), It = ur(c), ye = Fe(c), ss = ht(c), We = !!(j != null && j.length && !c.quoted_message), Tt = ye && te && We, as = ne && ue && !c.quoted_message && !Ye && !Y && !ye, At = {
|
|
4005
4006
|
contentType: "text",
|
|
4006
4007
|
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
4007
4008
|
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
4008
|
-
renderedText: c.text && /* @__PURE__ */ n(ze, { message:
|
|
4009
|
+
renderedText: c.text && /* @__PURE__ */ n(ze, { message: q, renderText: p })
|
|
4009
4010
|
}, Rt = {
|
|
4010
4011
|
contentType: "media",
|
|
4011
4012
|
title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
|
|
@@ -4024,7 +4025,7 @@ const Yi = ({
|
|
|
4024
4025
|
}
|
|
4025
4026
|
),
|
|
4026
4027
|
F && /* @__PURE__ */ n(
|
|
4027
|
-
|
|
4028
|
+
Is,
|
|
4028
4029
|
{
|
|
4029
4030
|
MessageBouncePrompt: P,
|
|
4030
4031
|
onClose: () => R(!1),
|
|
@@ -4034,11 +4035,11 @@ const Yi = ({
|
|
|
4034
4035
|
/* @__PURE__ */ f(
|
|
4035
4036
|
"div",
|
|
4036
4037
|
{
|
|
4037
|
-
className:
|
|
4038
|
+
className: ns,
|
|
4038
4039
|
"data-message-id": c.id,
|
|
4039
4040
|
"data-dd-privacy": "mask",
|
|
4040
4041
|
children: [
|
|
4041
|
-
|
|
4042
|
+
H && /* @__PURE__ */ n(H, {}),
|
|
4042
4043
|
!!I && /* @__PURE__ */ n(Z, { reminder: I }),
|
|
4043
4044
|
c.user && /* @__PURE__ */ n(
|
|
4044
4045
|
_e,
|
|
@@ -4055,7 +4056,7 @@ const Yi = ({
|
|
|
4055
4056
|
/* @__PURE__ */ n(
|
|
4056
4057
|
"div",
|
|
4057
4058
|
{
|
|
4058
|
-
className:
|
|
4059
|
+
className: N("str-chat__message-inner", {
|
|
4059
4060
|
"str-chat__simple-message--error-failed": St || Et
|
|
4060
4061
|
}),
|
|
4061
4062
|
"data-testid": "message-inner",
|
|
@@ -4069,9 +4070,9 @@ const Yi = ({
|
|
|
4069
4070
|
marginInlineEnd: 0,
|
|
4070
4071
|
marginInlineStart: 0
|
|
4071
4072
|
},
|
|
4072
|
-
children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) :
|
|
4073
|
-
|
|
4074
|
-
|
|
4073
|
+
children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) : cr(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4074
|
+
te && C && /* @__PURE__ */ n(C, {}),
|
|
4075
|
+
te ? /* @__PURE__ */ n(Pe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
|
|
4075
4076
|
Pe,
|
|
4076
4077
|
{
|
|
4077
4078
|
...At,
|
|
@@ -4080,11 +4081,11 @@ const Yi = ({
|
|
|
4080
4081
|
onUnlockClick: () => L == null ? void 0 : L(c, _)
|
|
4081
4082
|
}
|
|
4082
4083
|
),
|
|
4083
|
-
!
|
|
4084
|
-
] }) }) :
|
|
4084
|
+
!te && C && /* @__PURE__ */ n(C, {})
|
|
4085
|
+
] }) }) : dr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
4085
4086
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4086
|
-
|
|
4087
|
-
|
|
4087
|
+
te && C && /* @__PURE__ */ n(C, {}),
|
|
4088
|
+
te ? /* @__PURE__ */ n(
|
|
4088
4089
|
Pe,
|
|
4089
4090
|
{
|
|
4090
4091
|
...Rt,
|
|
@@ -4101,33 +4102,33 @@ const Yi = ({
|
|
|
4101
4102
|
onDownloadClick: () => $ ? $(c, _) : void 0
|
|
4102
4103
|
}
|
|
4103
4104
|
),
|
|
4104
|
-
!
|
|
4105
|
+
!te && C && /* @__PURE__ */ n(C, {})
|
|
4105
4106
|
] }),
|
|
4106
4107
|
c.text && /* @__PURE__ */ f(
|
|
4107
4108
|
"div",
|
|
4108
4109
|
{
|
|
4109
|
-
className:
|
|
4110
|
+
className: N("str-chat__message-bubble", {
|
|
4110
4111
|
"relative isolate": se
|
|
4111
4112
|
}),
|
|
4112
4113
|
children: [
|
|
4113
4114
|
/* @__PURE__ */ n(
|
|
4114
4115
|
ze,
|
|
4115
4116
|
{
|
|
4116
|
-
message:
|
|
4117
|
+
message: q,
|
|
4117
4118
|
renderText: p
|
|
4118
4119
|
}
|
|
4119
4120
|
),
|
|
4120
|
-
se && /* @__PURE__ */ n($e, { side:
|
|
4121
|
+
se && /* @__PURE__ */ n($e, { side: te ? "me" : "other" })
|
|
4121
4122
|
]
|
|
4122
4123
|
}
|
|
4123
4124
|
)
|
|
4124
|
-
] }) :
|
|
4125
|
-
|
|
4125
|
+
] }) : as ? /* @__PURE__ */ n(
|
|
4126
|
+
Wi,
|
|
4126
4127
|
{
|
|
4127
4128
|
groupPosition: De,
|
|
4128
|
-
isMyMessage:
|
|
4129
|
+
isMyMessage: te,
|
|
4129
4130
|
message: {
|
|
4130
|
-
...
|
|
4131
|
+
...q,
|
|
4131
4132
|
attachments: j,
|
|
4132
4133
|
// MessageText prefers message.i18n[userLanguage_text] from
|
|
4133
4134
|
// Stream's TranslationContext over message.text. Drop i18n so
|
|
@@ -4139,7 +4140,7 @@ const Yi = ({
|
|
|
4139
4140
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f(
|
|
4140
4141
|
"div",
|
|
4141
4142
|
{
|
|
4142
|
-
className:
|
|
4143
|
+
className: N("str-chat__message-bubble", {
|
|
4143
4144
|
"relative isolate": se
|
|
4144
4145
|
}),
|
|
4145
4146
|
children: [
|
|
@@ -4148,127 +4149,127 @@ const Yi = ({
|
|
|
4148
4149
|
{
|
|
4149
4150
|
message: c,
|
|
4150
4151
|
hasAttachment: We,
|
|
4151
|
-
isMyMessage:
|
|
4152
|
+
isMyMessage: te
|
|
4152
4153
|
}
|
|
4153
4154
|
),
|
|
4154
|
-
Ye && /* @__PURE__ */ n(
|
|
4155
|
+
Ye && /* @__PURE__ */ n(Ts, { poll: Ye }),
|
|
4155
4156
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
4156
|
-
|
|
4157
|
+
M,
|
|
4157
4158
|
{
|
|
4158
4159
|
actionHandler: l,
|
|
4159
4160
|
attachments: j
|
|
4160
4161
|
}
|
|
4161
4162
|
) : null,
|
|
4162
|
-
|
|
4163
|
-
|
|
4163
|
+
Y ? /* @__PURE__ */ n(
|
|
4164
|
+
J,
|
|
4164
4165
|
{
|
|
4165
|
-
message:
|
|
4166
|
+
message: q,
|
|
4166
4167
|
renderText: p
|
|
4167
4168
|
}
|
|
4168
4169
|
) : /* @__PURE__ */ n(
|
|
4169
4170
|
ze,
|
|
4170
4171
|
{
|
|
4171
|
-
message:
|
|
4172
|
+
message: q,
|
|
4172
4173
|
renderText: p
|
|
4173
4174
|
}
|
|
4174
4175
|
),
|
|
4175
4176
|
/* @__PURE__ */ n(st, {}),
|
|
4176
|
-
se && /* @__PURE__ */ n($e, { side:
|
|
4177
|
+
se && /* @__PURE__ */ n($e, { side: te ? "me" : "other" })
|
|
4177
4178
|
]
|
|
4178
4179
|
}
|
|
4179
4180
|
) })
|
|
4180
4181
|
}
|
|
4181
4182
|
),
|
|
4182
|
-
!
|
|
4183
|
+
!ss && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!ye || Tt) && /* @__PURE__ */ n(
|
|
4183
4184
|
Ze,
|
|
4184
4185
|
{
|
|
4185
4186
|
message: c,
|
|
4186
4187
|
hasAttachment: We,
|
|
4187
|
-
isMyMessage:
|
|
4188
|
+
isMyMessage: te
|
|
4188
4189
|
}
|
|
4189
4190
|
) }),
|
|
4190
4191
|
/* @__PURE__ */ n(
|
|
4191
|
-
|
|
4192
|
+
wr,
|
|
4192
4193
|
{
|
|
4193
4194
|
onOutboundClick: x,
|
|
4194
4195
|
resolvedOutbound: b
|
|
4195
4196
|
}
|
|
4196
4197
|
),
|
|
4197
4198
|
me && /* @__PURE__ */ n(
|
|
4198
|
-
|
|
4199
|
+
ee,
|
|
4199
4200
|
{
|
|
4200
4201
|
onClick: d,
|
|
4201
4202
|
reply_count: c.reply_count
|
|
4202
4203
|
}
|
|
4203
4204
|
),
|
|
4204
|
-
ie && /* @__PURE__ */ n(
|
|
4205
|
+
ie && /* @__PURE__ */ n(G, {})
|
|
4205
4206
|
]
|
|
4206
4207
|
},
|
|
4207
4208
|
c.id
|
|
4208
4209
|
)
|
|
4209
4210
|
] });
|
|
4210
|
-
},
|
|
4211
|
-
|
|
4211
|
+
}, qi = z.memo(
|
|
4212
|
+
Xi,
|
|
4212
4213
|
(e, t) => {
|
|
4213
4214
|
var s, a, r, i;
|
|
4214
|
-
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 :
|
|
4215
|
+
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ms(e, t);
|
|
4215
4216
|
}
|
|
4216
|
-
),
|
|
4217
|
+
), Ki = (e) => {
|
|
4217
4218
|
var i;
|
|
4218
|
-
const t = fe("CustomMessage"), s = xe(
|
|
4219
|
+
const t = fe("CustomMessage"), s = xe(Dn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
|
|
4219
4220
|
return /* @__PURE__ */ n(
|
|
4220
|
-
|
|
4221
|
+
qi,
|
|
4221
4222
|
{
|
|
4222
4223
|
...t,
|
|
4223
4224
|
...e,
|
|
4224
4225
|
resolvedOutbound: r
|
|
4225
4226
|
}
|
|
4226
4227
|
);
|
|
4227
|
-
},
|
|
4228
|
+
}, Zi = () => {
|
|
4228
4229
|
var s;
|
|
4229
4230
|
const { handleDelete: e, message: t } = fe("CustomMessageActions");
|
|
4230
4231
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
4231
|
-
|
|
4232
|
+
vn,
|
|
4232
4233
|
{
|
|
4233
4234
|
onClick: e,
|
|
4234
4235
|
"aria-label": "Delete",
|
|
4235
4236
|
title: "Delete",
|
|
4236
4237
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4237
|
-
children: /* @__PURE__ */ n(
|
|
4238
|
+
children: /* @__PURE__ */ n(pa, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4238
4239
|
}
|
|
4239
4240
|
);
|
|
4240
|
-
},
|
|
4241
|
+
}, Ji = () => {
|
|
4241
4242
|
const { handleFlag: e } = fe("CustomMessageActions");
|
|
4242
4243
|
return /* @__PURE__ */ n(
|
|
4243
|
-
|
|
4244
|
+
vn,
|
|
4244
4245
|
{
|
|
4245
4246
|
onClick: e,
|
|
4246
4247
|
"aria-label": "Report",
|
|
4247
4248
|
title: "Report",
|
|
4248
4249
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4249
|
-
children: /* @__PURE__ */ n(
|
|
4250
|
+
children: /* @__PURE__ */ n(fn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4250
4251
|
}
|
|
4251
4252
|
);
|
|
4252
|
-
},
|
|
4253
|
+
}, Qi = () => {
|
|
4253
4254
|
var t;
|
|
4254
4255
|
const { message: e } = fe("CustomMessageActions");
|
|
4255
4256
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ n(
|
|
4256
|
-
|
|
4257
|
+
wa,
|
|
4257
4258
|
{
|
|
4258
4259
|
messageActionSet: [
|
|
4259
|
-
{ Component:
|
|
4260
|
-
{ Component:
|
|
4260
|
+
{ Component: Zi, placement: "quick", type: "delete" },
|
|
4261
|
+
{ Component: Ji, placement: "quick", type: "flag" }
|
|
4261
4262
|
]
|
|
4262
4263
|
}
|
|
4263
4264
|
);
|
|
4264
|
-
},
|
|
4265
|
+
}, el = (e) => ({
|
|
4265
4266
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4266
4267
|
(t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
|
|
4267
4268
|
)
|
|
4268
|
-
}),
|
|
4269
|
-
const { linkPreviewsManager: e } =
|
|
4269
|
+
}), tl = () => {
|
|
4270
|
+
const { linkPreviewsManager: e } = As(), { linkPreviews: t } = Rs(
|
|
4270
4271
|
e.state,
|
|
4271
|
-
|
|
4272
|
+
el
|
|
4272
4273
|
), s = (r) => {
|
|
4273
4274
|
e.dismissPreview(r);
|
|
4274
4275
|
};
|
|
@@ -4332,7 +4333,7 @@ const Yi = ({
|
|
|
4332
4333
|
);
|
|
4333
4334
|
}) })
|
|
4334
4335
|
) : null;
|
|
4335
|
-
}, Be = z.createContext(!1),
|
|
4336
|
+
}, Be = z.createContext(!1), nl = 200, ao = () => xe(Be), sl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
4336
4337
|
"button",
|
|
4337
4338
|
{
|
|
4338
4339
|
...s,
|
|
@@ -4341,13 +4342,13 @@ const Yi = ({
|
|
|
4341
4342
|
disabled: t,
|
|
4342
4343
|
onPointerDown: (a) => a.preventDefault(),
|
|
4343
4344
|
onClick: e,
|
|
4344
|
-
children: /* @__PURE__ */ n(
|
|
4345
|
+
children: /* @__PURE__ */ n(ba, { weight: "bold", className: "size-4" })
|
|
4345
4346
|
}
|
|
4346
4347
|
), rn = () => {
|
|
4347
|
-
const e = xe(Be), { handleSubmit: t } =
|
|
4348
|
-
SendButton: r =
|
|
4349
|
-
AttachmentPreviewList: i =
|
|
4350
|
-
} =
|
|
4348
|
+
const e = xe(Be), { handleSubmit: t } = Ls(), s = Ms(), a = e || !s, {
|
|
4349
|
+
SendButton: r = sl,
|
|
4350
|
+
AttachmentPreviewList: i = Ds
|
|
4351
|
+
} = mn("CustomMessageInput"), o = z.useRef(null);
|
|
4351
4352
|
return z.useEffect(() => {
|
|
4352
4353
|
const l = o.current;
|
|
4353
4354
|
if (!l || typeof ResizeObserver > "u")
|
|
@@ -4410,13 +4411,13 @@ const Yi = ({
|
|
|
4410
4411
|
"data-dd-privacy": "mask",
|
|
4411
4412
|
children: [
|
|
4412
4413
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4413
|
-
/* @__PURE__ */ n(
|
|
4414
|
-
/* @__PURE__ */ n(
|
|
4414
|
+
/* @__PURE__ */ n(Os, {}),
|
|
4415
|
+
/* @__PURE__ */ n(tl, {}),
|
|
4415
4416
|
/* @__PURE__ */ n(i, {})
|
|
4416
4417
|
] }),
|
|
4417
4418
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4418
4419
|
/* @__PURE__ */ n(
|
|
4419
|
-
|
|
4420
|
+
Ps,
|
|
4420
4421
|
{
|
|
4421
4422
|
"aria-disabled": e || void 0,
|
|
4422
4423
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4443,7 +4444,14 @@ const Yi = ({
|
|
|
4443
4444
|
]
|
|
4444
4445
|
}
|
|
4445
4446
|
);
|
|
4446
|
-
}, ln = ({
|
|
4447
|
+
}, ln = () => /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
|
|
4448
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4449
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4450
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4451
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4452
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4453
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4454
|
+
] }), on = ({
|
|
4447
4455
|
renderActions: e,
|
|
4448
4456
|
renderHeader: t,
|
|
4449
4457
|
renderFooter: s,
|
|
@@ -4465,11 +4473,11 @@ const Yi = ({
|
|
|
4465
4473
|
c = v;
|
|
4466
4474
|
const b = Array.from(
|
|
4467
4475
|
g.querySelectorAll(".str-chat__list")
|
|
4468
|
-
).find((_) => _.scrollHeight > _.clientHeight) ?? null,
|
|
4476
|
+
).find((_) => _.scrollHeight > _.clientHeight) ?? null, y = b ? b.scrollHeight - b.scrollTop - b.clientHeight < nl : !1;
|
|
4469
4477
|
g.style.setProperty(
|
|
4470
4478
|
"--messaging-composer-height",
|
|
4471
4479
|
`${v}px`
|
|
4472
|
-
), x &&
|
|
4480
|
+
), x && y && b && (b.scrollTop = b.scrollHeight);
|
|
4473
4481
|
};
|
|
4474
4482
|
if (p(), typeof ResizeObserver > "u")
|
|
4475
4483
|
return;
|
|
@@ -4483,14 +4491,7 @@ const Yi = ({
|
|
|
4483
4491
|
ref: u,
|
|
4484
4492
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4485
4493
|
children: [
|
|
4486
|
-
/* @__PURE__ */
|
|
4487
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4488
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4489
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4490
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4491
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4492
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4493
|
-
] }),
|
|
4494
|
+
/* @__PURE__ */ n(ln, {}),
|
|
4494
4495
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex flex-col", children: [
|
|
4495
4496
|
t == null ? void 0 : t(),
|
|
4496
4497
|
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
|
|
@@ -4508,14 +4509,7 @@ const Yi = ({
|
|
|
4508
4509
|
ref: u,
|
|
4509
4510
|
className: "messaging-composer-chrome messaging-composer-chrome--floating",
|
|
4510
4511
|
children: [
|
|
4511
|
-
/* @__PURE__ */
|
|
4512
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4513
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4514
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4515
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4516
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-blur" }),
|
|
4517
|
-
/* @__PURE__ */ n("div", { className: "messaging-composer-backdrop-gradient" })
|
|
4518
|
-
] }),
|
|
4512
|
+
/* @__PURE__ */ n(ln, {}),
|
|
4519
4513
|
/* @__PURE__ */ f("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
|
|
4520
4514
|
t == null ? void 0 : t(),
|
|
4521
4515
|
/* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
@@ -4552,17 +4546,17 @@ const Yi = ({
|
|
|
4552
4546
|
),
|
|
4553
4547
|
s == null ? void 0 : s()
|
|
4554
4548
|
] });
|
|
4555
|
-
},
|
|
4549
|
+
}, al = {
|
|
4556
4550
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4557
4551
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4558
|
-
},
|
|
4552
|
+
}, rl = ["SYSTEM_AGE_SAFETY_BLOCKED"], il = {
|
|
4559
4553
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4560
|
-
}, et = "age safety guidelines.",
|
|
4554
|
+
}, et = "age safety guidelines.", ll = "https://linktr.ee/s/about/contact", ol = (e) => rl.includes(
|
|
4561
4555
|
e
|
|
4562
|
-
),
|
|
4556
|
+
), cl = (e) => {
|
|
4563
4557
|
var t;
|
|
4564
|
-
return
|
|
4565
|
-
},
|
|
4558
|
+
return ol((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4559
|
+
}, dl = (e) => {
|
|
4566
4560
|
var a;
|
|
4567
4561
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4568
4562
|
if (Yt(t))
|
|
@@ -4570,7 +4564,7 @@ const Yi = ({
|
|
|
4570
4564
|
kind: "dm-agent",
|
|
4571
4565
|
type: t
|
|
4572
4566
|
};
|
|
4573
|
-
if (
|
|
4567
|
+
if (Gs(t))
|
|
4574
4568
|
return {
|
|
4575
4569
|
kind: "age-safety",
|
|
4576
4570
|
type: t
|
|
@@ -4581,7 +4575,7 @@ const Yi = ({
|
|
|
4581
4575
|
kind: "dm-agent",
|
|
4582
4576
|
type: s
|
|
4583
4577
|
};
|
|
4584
|
-
},
|
|
4578
|
+
}, ul = (e) => {
|
|
4585
4579
|
const t = e.indexOf(et);
|
|
4586
4580
|
if (t === -1)
|
|
4587
4581
|
return e;
|
|
@@ -4591,7 +4585,7 @@ const Yi = ({
|
|
|
4591
4585
|
/* @__PURE__ */ n(
|
|
4592
4586
|
"a",
|
|
4593
4587
|
{
|
|
4594
|
-
href:
|
|
4588
|
+
href: ll,
|
|
4595
4589
|
target: "_blank",
|
|
4596
4590
|
rel: "noopener noreferrer",
|
|
4597
4591
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4600,13 +4594,13 @@ const Yi = ({
|
|
|
4600
4594
|
),
|
|
4601
4595
|
e.slice(s)
|
|
4602
4596
|
] });
|
|
4603
|
-
},
|
|
4597
|
+
}, ml = (e) => {
|
|
4604
4598
|
var a, r;
|
|
4605
|
-
const t = !
|
|
4599
|
+
const t = !cl(e.message), s = dl(
|
|
4606
4600
|
e.message
|
|
4607
4601
|
);
|
|
4608
4602
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
4609
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4603
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || al[s.type];
|
|
4610
4604
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4611
4605
|
/* @__PURE__ */ f(
|
|
4612
4606
|
"div",
|
|
@@ -4616,7 +4610,7 @@ const Yi = ({
|
|
|
4616
4610
|
"data-dm-agent-system-type": s.type,
|
|
4617
4611
|
children: [
|
|
4618
4612
|
/* @__PURE__ */ n(
|
|
4619
|
-
|
|
4613
|
+
va,
|
|
4620
4614
|
{
|
|
4621
4615
|
size: 16,
|
|
4622
4616
|
weight: "regular",
|
|
@@ -4632,7 +4626,7 @@ const Yi = ({
|
|
|
4632
4626
|
] });
|
|
4633
4627
|
}
|
|
4634
4628
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
4635
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4629
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || il[s.type];
|
|
4636
4630
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4637
4631
|
/* @__PURE__ */ f(
|
|
4638
4632
|
"div",
|
|
@@ -4642,7 +4636,7 @@ const Yi = ({
|
|
|
4642
4636
|
"data-age-safety-system-type": s.type,
|
|
4643
4637
|
children: [
|
|
4644
4638
|
/* @__PURE__ */ n(
|
|
4645
|
-
|
|
4639
|
+
xa,
|
|
4646
4640
|
{
|
|
4647
4641
|
size: 24,
|
|
4648
4642
|
weight: "duotone",
|
|
@@ -4651,7 +4645,7 @@ const Yi = ({
|
|
|
4651
4645
|
"data-testid": "age-safety-system-message-icon"
|
|
4652
4646
|
}
|
|
4653
4647
|
),
|
|
4654
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4648
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: ul(i) }) })
|
|
4655
4649
|
]
|
|
4656
4650
|
}
|
|
4657
4651
|
),
|
|
@@ -4666,7 +4660,7 @@ const Yi = ({
|
|
|
4666
4660
|
] }),
|
|
4667
4661
|
!t && /* @__PURE__ */ n(Xe, { message: e.message })
|
|
4668
4662
|
] });
|
|
4669
|
-
},
|
|
4663
|
+
}, Kn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
4670
4664
|
"animateTransform",
|
|
4671
4665
|
{
|
|
4672
4666
|
attributeName: "transform",
|
|
@@ -4676,17 +4670,17 @@ const Yi = ({
|
|
|
4676
4670
|
begin: `${120 * t}ms`,
|
|
4677
4671
|
repeatCount: "indefinite"
|
|
4678
4672
|
}
|
|
4679
|
-
) }),
|
|
4673
|
+
) }), hl = /* @__PURE__ */ new Set([
|
|
4680
4674
|
qe.Thinking,
|
|
4681
4675
|
qe.Generating,
|
|
4682
4676
|
qe.ExternalSources
|
|
4683
|
-
]),
|
|
4677
|
+
]), fl = ({ threadList: e }) => {
|
|
4684
4678
|
var p, w;
|
|
4685
|
-
const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } =
|
|
4686
|
-
if (!e && l &&
|
|
4687
|
-
const v =
|
|
4679
|
+
const { channel: t, channelConfig: s, thread: a } = we(), { client: r } = He(), { typing: i = {} } = zs(), { aiState: o } = Fs(t), l = xe(Kn);
|
|
4680
|
+
if (!e && l && hl.has(o)) {
|
|
4681
|
+
const v = gl(t, (p = r.user) == null ? void 0 : p.id);
|
|
4688
4682
|
return /* @__PURE__ */ n(
|
|
4689
|
-
|
|
4683
|
+
cn,
|
|
4690
4684
|
{
|
|
4691
4685
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
4692
4686
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -4712,7 +4706,7 @@ const Yi = ({
|
|
|
4712
4706
|
return null;
|
|
4713
4707
|
const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4714
4708
|
return /* @__PURE__ */ n(
|
|
4715
|
-
|
|
4709
|
+
cn,
|
|
4716
4710
|
{
|
|
4717
4711
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4718
4712
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4720,7 +4714,7 @@ const Yi = ({
|
|
|
4720
4714
|
testId: "typing-indicator"
|
|
4721
4715
|
}
|
|
4722
4716
|
);
|
|
4723
|
-
},
|
|
4717
|
+
}, cn = ({
|
|
4724
4718
|
avatarId: e,
|
|
4725
4719
|
avatarName: t,
|
|
4726
4720
|
avatarImage: s,
|
|
@@ -4767,7 +4761,7 @@ const Yi = ({
|
|
|
4767
4761
|
] })
|
|
4768
4762
|
}
|
|
4769
4763
|
);
|
|
4770
|
-
function
|
|
4764
|
+
function gl(e, t) {
|
|
4771
4765
|
var a;
|
|
4772
4766
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4773
4767
|
for (const r of Object.values(s)) {
|
|
@@ -4776,10 +4770,10 @@ function fl(e, t) {
|
|
|
4776
4770
|
return i;
|
|
4777
4771
|
}
|
|
4778
4772
|
}
|
|
4779
|
-
const
|
|
4773
|
+
const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
4780
4774
|
"div",
|
|
4781
4775
|
{
|
|
4782
|
-
className:
|
|
4776
|
+
className: N("flex items-center justify-center h-full", e),
|
|
4783
4777
|
children: [
|
|
4784
4778
|
/* @__PURE__ */ f("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
4785
4779
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -4820,11 +4814,11 @@ const gl = () => null, pl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4820
4814
|
]
|
|
4821
4815
|
}
|
|
4822
4816
|
), Ue = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
|
|
4823
|
-
/* @__PURE__ */ n(
|
|
4817
|
+
/* @__PURE__ */ n(bl, { className: "w-6 h-6" }),
|
|
4824
4818
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4825
4819
|
] }) }));
|
|
4826
4820
|
Ue.displayName = "LoadingState";
|
|
4827
|
-
const
|
|
4821
|
+
const vl = ({
|
|
4828
4822
|
onBack: e,
|
|
4829
4823
|
showBackButton: t,
|
|
4830
4824
|
renderMessageInputActions: s,
|
|
@@ -4844,7 +4838,7 @@ const bl = ({
|
|
|
4844
4838
|
renderChannelBanner: v,
|
|
4845
4839
|
customChannelActions: x,
|
|
4846
4840
|
renderChannelActions: b,
|
|
4847
|
-
renderMessage:
|
|
4841
|
+
renderMessage: y,
|
|
4848
4842
|
viewerLanguage: _,
|
|
4849
4843
|
showChannelInfo: T = !0,
|
|
4850
4844
|
onParticipantNameClick: L,
|
|
@@ -4852,17 +4846,17 @@ const bl = ({
|
|
|
4852
4846
|
resolveOutbound: $,
|
|
4853
4847
|
composerInput: F
|
|
4854
4848
|
}) => {
|
|
4855
|
-
const { channel: R, messages: I } = we(),
|
|
4856
|
-
|
|
4857
|
-
|
|
4849
|
+
const { channel: R, messages: I } = we(), M = V(E);
|
|
4850
|
+
W(() => {
|
|
4851
|
+
M.current = E;
|
|
4858
4852
|
}, [E]);
|
|
4859
|
-
const S =
|
|
4860
|
-
var
|
|
4861
|
-
(
|
|
4862
|
-
}, []), C = E ? S : void 0, A =
|
|
4853
|
+
const S = X((Z) => {
|
|
4854
|
+
var J;
|
|
4855
|
+
(J = M.current) == null || J.call(M, Z);
|
|
4856
|
+
}, []), C = E ? S : void 0, A = pr(I, $), P = R.state.messages.some(
|
|
4863
4857
|
(Z) => Z.type !== "deleted"
|
|
4864
|
-
), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null,
|
|
4865
|
-
|
|
4858
|
+
), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null, G = /* @__PURE__ */ n(
|
|
4859
|
+
La,
|
|
4866
4860
|
{
|
|
4867
4861
|
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%)]",
|
|
4868
4862
|
onBack: e,
|
|
@@ -4881,44 +4875,44 @@ const bl = ({
|
|
|
4881
4875
|
renderChannelActions: b,
|
|
4882
4876
|
onParticipantNameClick: L
|
|
4883
4877
|
}
|
|
4884
|
-
),
|
|
4878
|
+
), ee = X(
|
|
4885
4879
|
(Z) => {
|
|
4886
|
-
const { message:
|
|
4887
|
-
|
|
4880
|
+
const { message: J } = fe("ChannelView"), H = /* @__PURE__ */ n(
|
|
4881
|
+
Ki,
|
|
4888
4882
|
{
|
|
4889
4883
|
...Z,
|
|
4890
4884
|
viewerLanguage: _,
|
|
4891
4885
|
onOutboundClick: C
|
|
4892
4886
|
}
|
|
4893
4887
|
);
|
|
4894
|
-
return !
|
|
4888
|
+
return !y || !J ? H : y(H, J);
|
|
4895
4889
|
},
|
|
4896
|
-
[C,
|
|
4890
|
+
[C, y, _]
|
|
4897
4891
|
);
|
|
4898
|
-
return /* @__PURE__ */ n(
|
|
4899
|
-
|
|
4892
|
+
return /* @__PURE__ */ n(Dn.Provider, { value: A, children: /* @__PURE__ */ n(
|
|
4893
|
+
Bs,
|
|
4900
4894
|
{
|
|
4901
4895
|
overrides: {
|
|
4902
|
-
Message:
|
|
4903
|
-
MessageActions:
|
|
4896
|
+
Message: ee,
|
|
4897
|
+
MessageActions: Qi,
|
|
4904
4898
|
UnreadMessagesNotification: () => null,
|
|
4905
4899
|
UnreadMessagesSeparator: () => null
|
|
4906
4900
|
},
|
|
4907
|
-
children: /* @__PURE__ */ n(
|
|
4901
|
+
children: /* @__PURE__ */ n(Us, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4908
4902
|
/* @__PURE__ */ f(
|
|
4909
4903
|
"div",
|
|
4910
4904
|
{
|
|
4911
4905
|
className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
|
|
4912
4906
|
children: [
|
|
4913
4907
|
!P && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
|
|
4914
|
-
|
|
4908
|
+
G,
|
|
4915
4909
|
U
|
|
4916
4910
|
] }) }),
|
|
4917
4911
|
/* @__PURE__ */ n(
|
|
4918
4912
|
Gt,
|
|
4919
4913
|
{
|
|
4920
4914
|
head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4921
|
-
|
|
4915
|
+
G,
|
|
4922
4916
|
U
|
|
4923
4917
|
] }) : void 0,
|
|
4924
4918
|
hideDeletedMessages: !0,
|
|
@@ -4930,7 +4924,7 @@ const bl = ({
|
|
|
4930
4924
|
"lt-channel-message-list"
|
|
4931
4925
|
),
|
|
4932
4926
|
/* @__PURE__ */ n(
|
|
4933
|
-
|
|
4927
|
+
on,
|
|
4934
4928
|
{
|
|
4935
4929
|
...s && {
|
|
4936
4930
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4952,14 +4946,14 @@ const bl = ({
|
|
|
4952
4946
|
className: "flex-1 overflow-hidden relative",
|
|
4953
4947
|
children: [
|
|
4954
4948
|
!P && /* @__PURE__ */ n("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
|
|
4955
|
-
|
|
4949
|
+
G,
|
|
4956
4950
|
U
|
|
4957
4951
|
] }) }),
|
|
4958
4952
|
/* @__PURE__ */ n(
|
|
4959
4953
|
Gt,
|
|
4960
4954
|
{
|
|
4961
4955
|
head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4962
|
-
|
|
4956
|
+
G,
|
|
4963
4957
|
U
|
|
4964
4958
|
] }) : void 0,
|
|
4965
4959
|
hideDeletedMessages: !0,
|
|
@@ -4972,7 +4966,7 @@ const bl = ({
|
|
|
4972
4966
|
),
|
|
4973
4967
|
r ? /* @__PURE__ */ n(z.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
|
|
4974
4968
|
/* @__PURE__ */ n(
|
|
4975
|
-
|
|
4969
|
+
on,
|
|
4976
4970
|
{
|
|
4977
4971
|
...s && {
|
|
4978
4972
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4987,7 +4981,7 @@ const bl = ({
|
|
|
4987
4981
|
] }) })
|
|
4988
4982
|
}
|
|
4989
4983
|
) });
|
|
4990
|
-
},
|
|
4984
|
+
}, Zn = z.memo(
|
|
4991
4985
|
({
|
|
4992
4986
|
channel: e,
|
|
4993
4987
|
onBack: t,
|
|
@@ -4998,7 +4992,7 @@ const bl = ({
|
|
|
4998
4992
|
onLeaveConversation: o,
|
|
4999
4993
|
onBlockParticipant: l,
|
|
5000
4994
|
className: d,
|
|
5001
|
-
CustomChannelEmptyState: u =
|
|
4995
|
+
CustomChannelEmptyState: u = pl,
|
|
5002
4996
|
showDeleteConversation: h = !0,
|
|
5003
4997
|
onDeleteConversationClick: m,
|
|
5004
4998
|
onBlockParticipantClick: g,
|
|
@@ -5008,7 +5002,7 @@ const bl = ({
|
|
|
5008
5002
|
composerDisabled: v = !1,
|
|
5009
5003
|
composerDisabledReason: x,
|
|
5010
5004
|
dmAgentEnabled: b,
|
|
5011
|
-
messageMetadata:
|
|
5005
|
+
messageMetadata: y,
|
|
5012
5006
|
onMessageSent: _,
|
|
5013
5007
|
showStarButton: T = !1,
|
|
5014
5008
|
renderChannelBanner: L,
|
|
@@ -5017,70 +5011,70 @@ const bl = ({
|
|
|
5017
5011
|
renderMessage: F,
|
|
5018
5012
|
onMessageLinkClick: R,
|
|
5019
5013
|
sendButton: I,
|
|
5020
|
-
attachmentPreviewList:
|
|
5014
|
+
attachmentPreviewList: M,
|
|
5021
5015
|
viewerLanguage: S,
|
|
5022
5016
|
showChannelInfo: C = !0,
|
|
5023
5017
|
onParticipantNameClick: A,
|
|
5024
5018
|
onOutboundClick: P,
|
|
5025
5019
|
resolveOutbound: U,
|
|
5026
|
-
composerInput:
|
|
5020
|
+
composerInput: G
|
|
5027
5021
|
}) => {
|
|
5028
|
-
const
|
|
5029
|
-
async (
|
|
5022
|
+
const ee = X(
|
|
5023
|
+
async (H, k, D) => {
|
|
5030
5024
|
var ue;
|
|
5031
|
-
const
|
|
5032
|
-
...
|
|
5025
|
+
const Y = ((ue = e.data) == null ? void 0 : ue.chatbot_paused) === !0, j = b && !Y, Q = {
|
|
5026
|
+
...k,
|
|
5033
5027
|
...j && { silent: !0 },
|
|
5034
|
-
...
|
|
5028
|
+
...y && {
|
|
5035
5029
|
metadata: {
|
|
5036
|
-
...
|
|
5037
|
-
...
|
|
5030
|
+
...k.metadata ?? {},
|
|
5031
|
+
...y
|
|
5038
5032
|
}
|
|
5039
5033
|
}
|
|
5040
|
-
},
|
|
5041
|
-
...
|
|
5034
|
+
}, q = {
|
|
5035
|
+
...D,
|
|
5042
5036
|
...j && { skip_push: !0 }
|
|
5043
|
-
}, ne = await e.sendMessage(
|
|
5037
|
+
}, ne = await e.sendMessage(Q, q);
|
|
5044
5038
|
return _ == null || _(ne), ne;
|
|
5045
5039
|
},
|
|
5046
|
-
[e, b,
|
|
5047
|
-
), Z =
|
|
5048
|
-
|
|
5040
|
+
[e, b, y, _]
|
|
5041
|
+
), Z = V(null);
|
|
5042
|
+
W(() => {
|
|
5049
5043
|
if (!R) return;
|
|
5050
|
-
const
|
|
5051
|
-
if (!
|
|
5052
|
-
const
|
|
5053
|
-
const
|
|
5054
|
-
if (!
|
|
5055
|
-
const
|
|
5056
|
-
R(
|
|
5044
|
+
const H = Z.current;
|
|
5045
|
+
if (!H) return;
|
|
5046
|
+
const k = (D) => {
|
|
5047
|
+
const Y = D.target, j = Y == null ? void 0 : Y.closest("a[href]"), Q = j == null ? void 0 : j.getAttribute("href");
|
|
5048
|
+
if (!Q) return;
|
|
5049
|
+
const q = j == null ? void 0 : j.closest("[data-message-id]"), ne = q == null ? void 0 : q.getAttribute("data-message-id"), ue = ne ? e.state.messages.find((ae) => ae.id === ne) : void 0;
|
|
5050
|
+
R(Q, ue);
|
|
5057
5051
|
};
|
|
5058
|
-
return
|
|
5052
|
+
return H.addEventListener("click", k), () => H.removeEventListener("click", k);
|
|
5059
5053
|
}, [R, e]);
|
|
5060
|
-
const
|
|
5054
|
+
const J = hn(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
|
|
5061
5055
|
return /* @__PURE__ */ n(
|
|
5062
5056
|
"div",
|
|
5063
5057
|
{
|
|
5064
5058
|
ref: Z,
|
|
5065
|
-
className:
|
|
5059
|
+
className: N(
|
|
5066
5060
|
"messaging-channel-view h-full flex flex-col",
|
|
5067
5061
|
d
|
|
5068
5062
|
),
|
|
5069
|
-
style:
|
|
5070
|
-
children: /* @__PURE__ */ n(
|
|
5071
|
-
|
|
5063
|
+
style: J,
|
|
5064
|
+
children: /* @__PURE__ */ n(Kn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
|
|
5065
|
+
$s,
|
|
5072
5066
|
{
|
|
5073
5067
|
channel: e,
|
|
5074
|
-
MessageSystem:
|
|
5068
|
+
MessageSystem: ml,
|
|
5075
5069
|
EmptyStateIndicator: u,
|
|
5076
5070
|
LoadingIndicator: Ue,
|
|
5077
|
-
DateSeparator:
|
|
5078
|
-
TypingIndicator:
|
|
5079
|
-
doSendMessageRequest:
|
|
5071
|
+
DateSeparator: Ma,
|
|
5072
|
+
TypingIndicator: fl,
|
|
5073
|
+
doSendMessageRequest: ee,
|
|
5080
5074
|
...I ? { SendButton: I } : {},
|
|
5081
|
-
...
|
|
5075
|
+
...M ? { AttachmentPreviewList: M } : {},
|
|
5082
5076
|
children: /* @__PURE__ */ n(
|
|
5083
|
-
|
|
5077
|
+
vl,
|
|
5084
5078
|
{
|
|
5085
5079
|
onBack: t,
|
|
5086
5080
|
showBackButton: s,
|
|
@@ -5108,7 +5102,7 @@ const bl = ({
|
|
|
5108
5102
|
onParticipantNameClick: A,
|
|
5109
5103
|
onOutboundClick: P,
|
|
5110
5104
|
resolveOutbound: U,
|
|
5111
|
-
composerInput:
|
|
5105
|
+
composerInput: G
|
|
5112
5106
|
}
|
|
5113
5107
|
)
|
|
5114
5108
|
}
|
|
@@ -5117,7 +5111,7 @@ const bl = ({
|
|
|
5117
5111
|
);
|
|
5118
5112
|
}
|
|
5119
5113
|
);
|
|
5120
|
-
|
|
5114
|
+
Zn.displayName = "ChannelView";
|
|
5121
5115
|
const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
|
|
5122
5116
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
5123
5117
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -5133,7 +5127,7 @@ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
5133
5127
|
)
|
|
5134
5128
|
] }) }));
|
|
5135
5129
|
Ce.displayName = "ErrorState";
|
|
5136
|
-
const
|
|
5130
|
+
const ro = ({
|
|
5137
5131
|
capabilities: e = {},
|
|
5138
5132
|
renderMessageInputActions: t,
|
|
5139
5133
|
renderConversationFooter: s,
|
|
@@ -5153,7 +5147,7 @@ const ao = ({
|
|
|
5153
5147
|
onParticipantNameClick: v,
|
|
5154
5148
|
onOutboundClick: x,
|
|
5155
5149
|
resolveOutbound: b,
|
|
5156
|
-
renderMessage:
|
|
5150
|
+
renderMessage: y,
|
|
5157
5151
|
onMessageLinkClick: _,
|
|
5158
5152
|
showChannelInfo: T,
|
|
5159
5153
|
composerInput: L
|
|
@@ -5164,24 +5158,24 @@ const ao = ({
|
|
|
5164
5158
|
isLoading: F,
|
|
5165
5159
|
error: R,
|
|
5166
5160
|
refreshConnection: I,
|
|
5167
|
-
service:
|
|
5161
|
+
service: M,
|
|
5168
5162
|
debug: S
|
|
5169
|
-
} =
|
|
5170
|
-
|
|
5171
|
-
const
|
|
5172
|
-
|
|
5173
|
-
const
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
}, [C]),
|
|
5163
|
+
} = _a(), [C, A] = B(null), [P, U] = B(null), [G, ee] = B(!1), { showDeleteConversation: Z = !0 } = e, J = V(o);
|
|
5164
|
+
J.current = o;
|
|
5165
|
+
const H = V(a);
|
|
5166
|
+
H.current = a;
|
|
5167
|
+
const k = V(null), D = V(null);
|
|
5168
|
+
W(() => {
|
|
5169
|
+
D.current = C;
|
|
5170
|
+
}, [C]), W(() => {
|
|
5177
5171
|
if (!E || !$) return;
|
|
5178
|
-
const
|
|
5179
|
-
if (!
|
|
5180
|
-
const
|
|
5181
|
-
if (
|
|
5182
|
-
|
|
5172
|
+
const Q = E.userID;
|
|
5173
|
+
if (!Q) return;
|
|
5174
|
+
const q = `${Q}::${i}`;
|
|
5175
|
+
if (k.current === q) return;
|
|
5176
|
+
k.current = q;
|
|
5183
5177
|
const ne = () => {
|
|
5184
|
-
|
|
5178
|
+
k.current === q && (k.current = null);
|
|
5185
5179
|
};
|
|
5186
5180
|
(async () => {
|
|
5187
5181
|
var ae, De;
|
|
@@ -5193,20 +5187,20 @@ const ao = ({
|
|
|
5193
5187
|
const se = await E.queryChannels(
|
|
5194
5188
|
{
|
|
5195
5189
|
type: "messaging",
|
|
5196
|
-
members: { $eq: [
|
|
5190
|
+
members: { $eq: [Q, i] }
|
|
5197
5191
|
},
|
|
5198
5192
|
{},
|
|
5199
5193
|
{ limit: 1 }
|
|
5200
5194
|
);
|
|
5201
5195
|
if (se.length > 0) {
|
|
5202
|
-
A(se[0]), U(null), (ae =
|
|
5196
|
+
A(se[0]), U(null), (ae = H.current) == null || ae.call(H, se[0]), S && console.log(
|
|
5203
5197
|
"[MessagingShell] Initial conversation loaded:",
|
|
5204
5198
|
se[0].id
|
|
5205
5199
|
);
|
|
5206
5200
|
return;
|
|
5207
5201
|
}
|
|
5208
|
-
const me =
|
|
5209
|
-
if (!me || !
|
|
5202
|
+
const me = J.current;
|
|
5203
|
+
if (!me || !M) {
|
|
5210
5204
|
ne(), U("No conversation found with this account"), S && console.log(
|
|
5211
5205
|
"[MessagingShell] No conversation found for:",
|
|
5212
5206
|
i
|
|
@@ -5214,12 +5208,12 @@ const ao = ({
|
|
|
5214
5208
|
return;
|
|
5215
5209
|
}
|
|
5216
5210
|
try {
|
|
5217
|
-
const ie = await
|
|
5211
|
+
const ie = await M.startChannelWithParticipant({
|
|
5218
5212
|
id: me.id,
|
|
5219
5213
|
name: me.name,
|
|
5220
5214
|
phone: me.phone
|
|
5221
5215
|
});
|
|
5222
|
-
A(ie), U(null), (De =
|
|
5216
|
+
A(ie), U(null), (De = H.current) == null || De.call(H, ie), S && console.log(
|
|
5223
5217
|
"[MessagingShell] Channel created and loaded:",
|
|
5224
5218
|
ie.id
|
|
5225
5219
|
);
|
|
@@ -5233,15 +5227,15 @@ const ao = ({
|
|
|
5233
5227
|
console.error(
|
|
5234
5228
|
"[MessagingShell] Failed to load initial conversation:",
|
|
5235
5229
|
se
|
|
5236
|
-
), ne(),
|
|
5230
|
+
), ne(), D.current || U("Failed to load conversation");
|
|
5237
5231
|
}
|
|
5238
5232
|
})();
|
|
5239
|
-
}, [i, E, $,
|
|
5240
|
-
const
|
|
5241
|
-
|
|
5242
|
-
const j =
|
|
5243
|
-
var
|
|
5244
|
-
A(null),
|
|
5233
|
+
}, [i, E, $, M, S]);
|
|
5234
|
+
const Y = V(r);
|
|
5235
|
+
Y.current = r;
|
|
5236
|
+
const j = X(() => {
|
|
5237
|
+
var Q;
|
|
5238
|
+
A(null), ee(!0), (Q = Y.current) == null || Q.call(Y);
|
|
5245
5239
|
}, []);
|
|
5246
5240
|
return F ? /* @__PURE__ */ n(Ue, {}) : R ? /* @__PURE__ */ n(Ce, { message: R, onBack: I }) : !$ || !E ? /* @__PURE__ */ n(
|
|
5247
5241
|
Ce,
|
|
@@ -5249,8 +5243,8 @@ const ao = ({
|
|
|
5249
5243
|
message: "Not connected to messaging service",
|
|
5250
5244
|
onBack: I
|
|
5251
5245
|
}
|
|
5252
|
-
) : P ? /* @__PURE__ */ n(Ce, { message: P }) :
|
|
5253
|
-
|
|
5246
|
+
) : P ? /* @__PURE__ */ n(Ce, { message: P }) : G && !C ? /* @__PURE__ */ n(Ce, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
5247
|
+
Zn,
|
|
5254
5248
|
{
|
|
5255
5249
|
channel: C,
|
|
5256
5250
|
renderMessageInputActions: t,
|
|
@@ -5270,7 +5264,7 @@ const ao = ({
|
|
|
5270
5264
|
onParticipantNameClick: v,
|
|
5271
5265
|
onOutboundClick: x,
|
|
5272
5266
|
resolveOutbound: b,
|
|
5273
|
-
renderMessage:
|
|
5267
|
+
renderMessage: y,
|
|
5274
5268
|
onMessageLinkClick: _,
|
|
5275
5269
|
showChannelInfo: T,
|
|
5276
5270
|
composerInput: L
|
|
@@ -5278,13 +5272,13 @@ const ao = ({
|
|
|
5278
5272
|
C.id
|
|
5279
5273
|
) }) }) : /* @__PURE__ */ n(Ue, {});
|
|
5280
5274
|
};
|
|
5281
|
-
function
|
|
5275
|
+
function xl(e) {
|
|
5282
5276
|
const t = e.state.pending_messages;
|
|
5283
5277
|
if (t != null && t.length)
|
|
5284
5278
|
for (const s of t)
|
|
5285
5279
|
e.state.addMessageSorted(s.message);
|
|
5286
5280
|
}
|
|
5287
|
-
const
|
|
5281
|
+
const Jn = z.createContext({
|
|
5288
5282
|
selectedChannel: void 0,
|
|
5289
5283
|
onChannelSelect: () => {
|
|
5290
5284
|
},
|
|
@@ -5292,14 +5286,14 @@ const Zn = z.createContext({
|
|
|
5292
5286
|
renderMessagePreview: void 0,
|
|
5293
5287
|
channelPreview: void 0,
|
|
5294
5288
|
viewerLanguage: void 0
|
|
5295
|
-
}),
|
|
5289
|
+
}), wl = Jn.Provider, _l = () => z.useContext(Jn), yl = (e, t) => {
|
|
5296
5290
|
const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5297
5291
|
return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
|
|
5298
|
-
},
|
|
5292
|
+
}, Nl = (e) => {
|
|
5299
5293
|
const t = /* @__PURE__ */ new Date();
|
|
5300
5294
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5301
5295
|
return "Just now";
|
|
5302
|
-
const a =
|
|
5296
|
+
const a = yl(e, t);
|
|
5303
5297
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5304
5298
|
hour: "numeric",
|
|
5305
5299
|
minute: "2-digit",
|
|
@@ -5312,7 +5306,7 @@ const Zn = z.createContext({
|
|
|
5312
5306
|
day: "numeric",
|
|
5313
5307
|
year: "numeric"
|
|
5314
5308
|
});
|
|
5315
|
-
},
|
|
5309
|
+
}, Qn = z.memo(
|
|
5316
5310
|
(e) => {
|
|
5317
5311
|
var $, F, R;
|
|
5318
5312
|
const { channel: t, unread: s } = e, {
|
|
@@ -5322,7 +5316,7 @@ const Zn = z.createContext({
|
|
|
5322
5316
|
channelPreview: o,
|
|
5323
5317
|
renderMessagePreview: l,
|
|
5324
5318
|
viewerLanguage: d
|
|
5325
|
-
} =
|
|
5319
|
+
} = _l(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = wn(t);
|
|
5326
5320
|
if (o)
|
|
5327
5321
|
return /* @__PURE__ */ n(
|
|
5328
5322
|
o,
|
|
@@ -5337,30 +5331,30 @@ const Zn = z.createContext({
|
|
|
5337
5331
|
const g = () => {
|
|
5338
5332
|
t && r(t);
|
|
5339
5333
|
}, c = (I) => {
|
|
5340
|
-
const
|
|
5341
|
-
!
|
|
5342
|
-
}, p =
|
|
5334
|
+
const M = I.key === "Enter" || I.key === " ", S = I.repeat;
|
|
5335
|
+
!M || S || (I.preventDefault(), g());
|
|
5336
|
+
}, p = _n(
|
|
5343
5337
|
($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
|
|
5344
5338
|
u == null ? void 0 : u.userID,
|
|
5345
5339
|
t == null ? void 0 : t.type
|
|
5346
|
-
), w =
|
|
5347
|
-
var
|
|
5348
|
-
const I = (
|
|
5340
|
+
), w = yn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
|
|
5341
|
+
var M;
|
|
5342
|
+
const I = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
|
|
5349
5343
|
if (I != null && I.length) {
|
|
5350
5344
|
for (let S = I.length - 1; S >= 0; S--)
|
|
5351
5345
|
if (I[S].type !== "system") return I[S];
|
|
5352
5346
|
}
|
|
5353
|
-
})(),
|
|
5347
|
+
})(), y = (() => {
|
|
5354
5348
|
var A;
|
|
5355
|
-
const I =
|
|
5349
|
+
const I = kn({
|
|
5356
5350
|
message: x,
|
|
5357
5351
|
viewerLanguage: d
|
|
5358
|
-
}), { custom_type:
|
|
5359
|
-
if (
|
|
5352
|
+
}), { custom_type: M, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
|
|
5353
|
+
if (M === oe.TIP)
|
|
5360
5354
|
return I || "Sent a tip";
|
|
5361
|
-
if (
|
|
5355
|
+
if (M === oe.PAID)
|
|
5362
5356
|
return I || "Sent a message";
|
|
5363
|
-
if (
|
|
5357
|
+
if (M === oe.ATTACHMENT) {
|
|
5364
5358
|
if (S === "text")
|
|
5365
5359
|
return "🔒 Sent a locked message";
|
|
5366
5360
|
if (S === "media")
|
|
@@ -5369,7 +5363,7 @@ const Zn = z.createContext({
|
|
|
5369
5363
|
if (I) return I;
|
|
5370
5364
|
const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
|
|
5371
5365
|
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5372
|
-
})(), _ = x != null && x.created_at ?
|
|
5366
|
+
})(), _ = x != null && x.created_at ? Nl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, y) : `${T ? "✨ " : ""}${y}`, E = s ?? 0;
|
|
5373
5367
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5374
5368
|
channelId: t == null ? void 0 : t.id,
|
|
5375
5369
|
isSelected: h,
|
|
@@ -5383,7 +5377,7 @@ const Zn = z.createContext({
|
|
|
5383
5377
|
tabIndex: 0,
|
|
5384
5378
|
onClick: g,
|
|
5385
5379
|
onKeyDown: c,
|
|
5386
|
-
className:
|
|
5380
|
+
className: N(
|
|
5387
5381
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
5388
5382
|
{
|
|
5389
5383
|
"bg-black/[0.04]": h,
|
|
@@ -5407,7 +5401,7 @@ const Zn = z.createContext({
|
|
|
5407
5401
|
/* @__PURE__ */ f(
|
|
5408
5402
|
"h3",
|
|
5409
5403
|
{
|
|
5410
|
-
className:
|
|
5404
|
+
className: N(
|
|
5411
5405
|
"text-sm font-medium truncate text-[#191918]"
|
|
5412
5406
|
),
|
|
5413
5407
|
children: [
|
|
@@ -5428,18 +5422,18 @@ const Zn = z.createContext({
|
|
|
5428
5422
|
);
|
|
5429
5423
|
}
|
|
5430
5424
|
);
|
|
5431
|
-
|
|
5432
|
-
const
|
|
5425
|
+
Qn.displayName = "CustomChannelPreview";
|
|
5426
|
+
const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
5433
5427
|
({
|
|
5434
5428
|
onChannelSelect: e,
|
|
5435
5429
|
selectedChannel: t,
|
|
5436
5430
|
filters: s,
|
|
5437
5431
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5438
5432
|
channelRenderFilterFn: r,
|
|
5439
|
-
sort: i =
|
|
5433
|
+
sort: i = kl,
|
|
5440
5434
|
className: o,
|
|
5441
5435
|
customEmptyStateIndicator: l,
|
|
5442
|
-
channelListPaginator: d =
|
|
5436
|
+
channelListPaginator: d = Hs,
|
|
5443
5437
|
channelPreview: u,
|
|
5444
5438
|
renderMessagePreview: h,
|
|
5445
5439
|
viewerLanguage: m,
|
|
@@ -5452,15 +5446,15 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5452
5446
|
}) => {
|
|
5453
5447
|
const b = z.useRef(0);
|
|
5454
5448
|
b.current++;
|
|
5455
|
-
const { debug:
|
|
5449
|
+
const { debug: y = !1 } = ot(), _ = z.useCallback(
|
|
5456
5450
|
(L) => {
|
|
5457
5451
|
for (const E of L)
|
|
5458
|
-
|
|
5452
|
+
xl(E);
|
|
5459
5453
|
return r ? r(L) : L;
|
|
5460
5454
|
},
|
|
5461
5455
|
[r]
|
|
5462
5456
|
);
|
|
5463
|
-
|
|
5457
|
+
y && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5464
5458
|
renderCount: b.current,
|
|
5465
5459
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5466
5460
|
filters: s
|
|
@@ -5469,7 +5463,7 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5469
5463
|
() => ({
|
|
5470
5464
|
selectedChannel: t,
|
|
5471
5465
|
onChannelSelect: e,
|
|
5472
|
-
debug:
|
|
5466
|
+
debug: y,
|
|
5473
5467
|
channelPreview: u,
|
|
5474
5468
|
renderMessagePreview: h,
|
|
5475
5469
|
viewerLanguage: m
|
|
@@ -5477,7 +5471,7 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5477
5471
|
[
|
|
5478
5472
|
t,
|
|
5479
5473
|
e,
|
|
5480
|
-
|
|
5474
|
+
y,
|
|
5481
5475
|
u,
|
|
5482
5476
|
h,
|
|
5483
5477
|
m
|
|
@@ -5486,12 +5480,12 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5486
5480
|
return /* @__PURE__ */ n(
|
|
5487
5481
|
"div",
|
|
5488
5482
|
{
|
|
5489
|
-
className:
|
|
5483
|
+
className: N(
|
|
5490
5484
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5491
5485
|
o
|
|
5492
5486
|
),
|
|
5493
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
5494
|
-
|
|
5487
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(wl, { value: T, children: /* @__PURE__ */ n(
|
|
5488
|
+
js,
|
|
5495
5489
|
{
|
|
5496
5490
|
filters: s,
|
|
5497
5491
|
sort: i,
|
|
@@ -5505,7 +5499,7 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5505
5499
|
onAddedToChannel: v,
|
|
5506
5500
|
onChannelUpdated: x,
|
|
5507
5501
|
Paginator: d,
|
|
5508
|
-
Preview:
|
|
5502
|
+
Preview: Qn,
|
|
5509
5503
|
EmptyStateIndicator: l
|
|
5510
5504
|
},
|
|
5511
5505
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -5514,14 +5508,14 @@ const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
|
5514
5508
|
);
|
|
5515
5509
|
}
|
|
5516
5510
|
);
|
|
5517
|
-
|
|
5518
|
-
const
|
|
5511
|
+
Cl.displayName = "ChannelList";
|
|
5512
|
+
const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", El = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", dn = ({ surface: e, actions: t, layout: s }) => {
|
|
5519
5513
|
if (t == null || t.length === 0) return null;
|
|
5520
5514
|
const a = s === "stacked";
|
|
5521
5515
|
return /* @__PURE__ */ n(
|
|
5522
5516
|
"div",
|
|
5523
5517
|
{
|
|
5524
|
-
className:
|
|
5518
|
+
className: N(
|
|
5525
5519
|
"flex gap-2",
|
|
5526
5520
|
// `row` is capped (`max-w-[60%]`) and shrinkable (`min-w-0`) so a long
|
|
5527
5521
|
// or localized secondary label can never grow the footer past the
|
|
@@ -5530,7 +5524,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5530
5524
|
a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
|
|
5531
5525
|
),
|
|
5532
5526
|
children: t.map((r, i) => /* @__PURE__ */ n(
|
|
5533
|
-
|
|
5527
|
+
On,
|
|
5534
5528
|
{
|
|
5535
5529
|
variant: e,
|
|
5536
5530
|
cta: r,
|
|
@@ -5541,7 +5535,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5541
5535
|
))
|
|
5542
5536
|
}
|
|
5543
5537
|
);
|
|
5544
|
-
},
|
|
5538
|
+
}, Il = ({
|
|
5545
5539
|
ctaSurface: e,
|
|
5546
5540
|
chinTextColor: t,
|
|
5547
5541
|
title: s,
|
|
@@ -5565,7 +5559,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5565
5559
|
/* @__PURE__ */ n(
|
|
5566
5560
|
"p",
|
|
5567
5561
|
{
|
|
5568
|
-
className:
|
|
5562
|
+
className: N("min-w-0", Sl),
|
|
5569
5563
|
style: h,
|
|
5570
5564
|
children: s
|
|
5571
5565
|
}
|
|
@@ -5574,8 +5568,8 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5574
5568
|
d && /* @__PURE__ */ n(
|
|
5575
5569
|
"p",
|
|
5576
5570
|
{
|
|
5577
|
-
className:
|
|
5578
|
-
|
|
5571
|
+
className: N(
|
|
5572
|
+
El,
|
|
5579
5573
|
r > 1 && "whitespace-pre-line",
|
|
5580
5574
|
r <= 1 && "truncate"
|
|
5581
5575
|
),
|
|
@@ -5586,11 +5580,11 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5586
5580
|
] });
|
|
5587
5581
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5588
5582
|
c,
|
|
5589
|
-
/* @__PURE__ */ n(
|
|
5583
|
+
/* @__PURE__ */ n(dn, { surface: e, actions: o, layout: "row" })
|
|
5590
5584
|
] }) : /* @__PURE__ */ f(K, { children: [
|
|
5591
5585
|
c,
|
|
5592
5586
|
/* @__PURE__ */ n(
|
|
5593
|
-
|
|
5587
|
+
dn,
|
|
5594
5588
|
{
|
|
5595
5589
|
surface: e,
|
|
5596
5590
|
actions: o,
|
|
@@ -5598,36 +5592,36 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5598
5592
|
}
|
|
5599
5593
|
)
|
|
5600
5594
|
] }) });
|
|
5601
|
-
},
|
|
5595
|
+
}, Tl = {
|
|
5602
5596
|
dark: "bg-white/[0.06]",
|
|
5603
5597
|
light: "bg-black/[0.04]"
|
|
5604
|
-
},
|
|
5598
|
+
}, Al = {
|
|
5605
5599
|
1: [0],
|
|
5606
5600
|
2: [-10, 10],
|
|
5607
5601
|
3: [-13, 0, 13]
|
|
5608
|
-
},
|
|
5602
|
+
}, Rl = {
|
|
5609
5603
|
1: [0],
|
|
5610
5604
|
2: [-26, 26],
|
|
5611
5605
|
3: [-40, 0, 40]
|
|
5612
|
-
},
|
|
5606
|
+
}, Ll = {
|
|
5613
5607
|
1: [0],
|
|
5614
5608
|
2: [0, 1],
|
|
5615
5609
|
3: [1, 3, 2]
|
|
5616
|
-
},
|
|
5610
|
+
}, Ml = {
|
|
5617
5611
|
1: [1],
|
|
5618
5612
|
2: [1, 1],
|
|
5619
5613
|
3: [1, 1.08, 1]
|
|
5620
|
-
},
|
|
5614
|
+
}, Dl = ({ variant: e, images: t }) => {
|
|
5621
5615
|
const [s, a] = z.useState({}), r = t.join(`
|
|
5622
5616
|
`), [i, o] = z.useState(r);
|
|
5623
5617
|
r !== i && (o(r), a({}));
|
|
5624
|
-
const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u =
|
|
5618
|
+
const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Al[d], h = Rl[d], m = Ll[d], g = Ml[d];
|
|
5625
5619
|
return /* @__PURE__ */ n(
|
|
5626
5620
|
"div",
|
|
5627
5621
|
{
|
|
5628
|
-
className:
|
|
5622
|
+
className: N(
|
|
5629
5623
|
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5630
|
-
|
|
5624
|
+
Tl[e]
|
|
5631
5625
|
),
|
|
5632
5626
|
children: l.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
|
|
5633
5627
|
"img",
|
|
@@ -5648,14 +5642,14 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5648
5642
|
))
|
|
5649
5643
|
}
|
|
5650
5644
|
);
|
|
5651
|
-
},
|
|
5645
|
+
}, Ol = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Pl = ({
|
|
5652
5646
|
variant: e,
|
|
5653
5647
|
presentation: t,
|
|
5654
5648
|
images: s,
|
|
5655
5649
|
title: a,
|
|
5656
5650
|
heroUrl: r,
|
|
5657
5651
|
onHeroError: i
|
|
5658
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
5652
|
+
}) => /* @__PURE__ */ n("div", { className: Ol, children: t === "fan" ? /* @__PURE__ */ n(Dl, { variant: e, images: s }) : (
|
|
5659
5653
|
// `heroUrl` is the palette-tracked source: it becomes `undefined` when the
|
|
5660
5654
|
// hero image errors, so `CardThumbnail` falls through to its placeholder.
|
|
5661
5655
|
// Do NOT `?? images[0]` here — that would re-instate the failed URL.
|
|
@@ -5669,7 +5663,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5669
5663
|
onImageError: i
|
|
5670
5664
|
}
|
|
5671
5665
|
)
|
|
5672
|
-
) }),
|
|
5666
|
+
) }), es = ({
|
|
5673
5667
|
variant: e,
|
|
5674
5668
|
title: t,
|
|
5675
5669
|
subtitle: s,
|
|
@@ -5681,7 +5675,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5681
5675
|
accentColor: d,
|
|
5682
5676
|
groupPosition: u = "single"
|
|
5683
5677
|
}) => {
|
|
5684
|
-
const h =
|
|
5678
|
+
const h = Ys({
|
|
5685
5679
|
imagePresentation: i,
|
|
5686
5680
|
images: r
|
|
5687
5681
|
}), m = r.length > 0, g = m && h === "hero", c = Ge({
|
|
@@ -5704,7 +5698,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5704
5698
|
"data-testid": "rich-card",
|
|
5705
5699
|
children: [
|
|
5706
5700
|
m && /* @__PURE__ */ n(
|
|
5707
|
-
|
|
5701
|
+
Pl,
|
|
5708
5702
|
{
|
|
5709
5703
|
variant: e,
|
|
5710
5704
|
presentation: h,
|
|
@@ -5715,7 +5709,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5715
5709
|
}
|
|
5716
5710
|
),
|
|
5717
5711
|
/* @__PURE__ */ n(
|
|
5718
|
-
|
|
5712
|
+
Il,
|
|
5719
5713
|
{
|
|
5720
5714
|
ctaSurface: c.surface,
|
|
5721
5715
|
chinTextColor: c.chinTextColor,
|
|
@@ -5731,13 +5725,13 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5731
5725
|
)
|
|
5732
5726
|
}
|
|
5733
5727
|
);
|
|
5734
|
-
},
|
|
5735
|
-
Sent:
|
|
5736
|
-
Received:
|
|
5737
|
-
},
|
|
5728
|
+
}, zl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "dark" }), Fl = (e) => /* @__PURE__ */ n(es, { ...e, variant: "light" }), io = {
|
|
5729
|
+
Sent: zl,
|
|
5730
|
+
Received: Fl
|
|
5731
|
+
}, un = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, $l = {
|
|
5738
5732
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5739
5733
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5740
|
-
},
|
|
5734
|
+
}, Bl = ({ variant: e }) => /* @__PURE__ */ n(
|
|
5741
5735
|
"span",
|
|
5742
5736
|
{
|
|
5743
5737
|
"aria-hidden": "true",
|
|
@@ -5747,12 +5741,12 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5747
5741
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5748
5742
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5749
5743
|
transformOrigin: "center",
|
|
5750
|
-
backgroundColor:
|
|
5751
|
-
WebkitMask:
|
|
5752
|
-
mask:
|
|
5744
|
+
backgroundColor: $l[e],
|
|
5745
|
+
WebkitMask: un,
|
|
5746
|
+
mask: un
|
|
5753
5747
|
}
|
|
5754
5748
|
}
|
|
5755
|
-
),
|
|
5749
|
+
), Ul = {
|
|
5756
5750
|
sent: {
|
|
5757
5751
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5758
5752
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5761,7 +5755,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5761
5755
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5762
5756
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5763
5757
|
}
|
|
5764
|
-
},
|
|
5758
|
+
}, ts = ({
|
|
5765
5759
|
variant: e,
|
|
5766
5760
|
text: t,
|
|
5767
5761
|
tail: s = !0,
|
|
@@ -5771,29 +5765,29 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5771
5765
|
"div",
|
|
5772
5766
|
{
|
|
5773
5767
|
"data-dd-privacy": "mask",
|
|
5774
|
-
className:
|
|
5768
|
+
className: N(
|
|
5775
5769
|
"relative px-4 py-3",
|
|
5776
5770
|
"text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
|
|
5777
5771
|
r
|
|
5778
5772
|
),
|
|
5779
5773
|
style: {
|
|
5780
|
-
...
|
|
5774
|
+
...Ul[e],
|
|
5781
5775
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5782
5776
|
isolation: "isolate"
|
|
5783
5777
|
},
|
|
5784
5778
|
children: [
|
|
5785
5779
|
a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5786
5780
|
/* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
|
|
5787
|
-
s && /* @__PURE__ */ n(
|
|
5781
|
+
s && /* @__PURE__ */ n(Bl, { variant: e })
|
|
5788
5782
|
]
|
|
5789
5783
|
}
|
|
5790
|
-
),
|
|
5784
|
+
), jl = ({
|
|
5791
5785
|
text: e,
|
|
5792
5786
|
tail: t,
|
|
5793
5787
|
header: s,
|
|
5794
5788
|
className: a
|
|
5795
5789
|
}) => /* @__PURE__ */ n(
|
|
5796
|
-
|
|
5790
|
+
ts,
|
|
5797
5791
|
{
|
|
5798
5792
|
variant: "received",
|
|
5799
5793
|
text: e,
|
|
@@ -5801,10 +5795,10 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5801
5795
|
header: s,
|
|
5802
5796
|
className: a
|
|
5803
5797
|
}
|
|
5804
|
-
),
|
|
5805
|
-
Sent:
|
|
5806
|
-
Received:
|
|
5807
|
-
},
|
|
5798
|
+
), Hl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(ts, { variant: "sent", text: e, tail: t, className: s }), lo = {
|
|
5799
|
+
Sent: Hl,
|
|
5800
|
+
Received: jl
|
|
5801
|
+
}, Vl = ({
|
|
5808
5802
|
question: e,
|
|
5809
5803
|
onClick: t,
|
|
5810
5804
|
loading: s = !1,
|
|
@@ -5816,7 +5810,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5816
5810
|
onClick: t,
|
|
5817
5811
|
disabled: s,
|
|
5818
5812
|
style: { backgroundColor: "#E6E5E3" },
|
|
5819
|
-
className:
|
|
5813
|
+
className: N(
|
|
5820
5814
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
5821
5815
|
{
|
|
5822
5816
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -5826,7 +5820,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5826
5820
|
),
|
|
5827
5821
|
children: e
|
|
5828
5822
|
}
|
|
5829
|
-
),
|
|
5823
|
+
), oo = ({
|
|
5830
5824
|
faqs: e,
|
|
5831
5825
|
onFaqClick: t,
|
|
5832
5826
|
loadingFaqId: s,
|
|
@@ -5835,7 +5829,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5835
5829
|
avatarImage: i,
|
|
5836
5830
|
avatarName: o
|
|
5837
5831
|
}) => {
|
|
5838
|
-
const l =
|
|
5832
|
+
const l = Ws(e);
|
|
5839
5833
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5840
5834
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
5841
5835
|
_e,
|
|
@@ -5855,7 +5849,7 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5855
5849
|
children: [
|
|
5856
5850
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5857
5851
|
l.map((d) => /* @__PURE__ */ n(
|
|
5858
|
-
|
|
5852
|
+
Vl,
|
|
5859
5853
|
{
|
|
5860
5854
|
question: d.question,
|
|
5861
5855
|
onClick: () => t(d.id),
|
|
@@ -5869,41 +5863,41 @@ const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5869
5863
|
] }) });
|
|
5870
5864
|
};
|
|
5871
5865
|
export {
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5866
|
+
Sn as A,
|
|
5867
|
+
yn as B,
|
|
5868
|
+
pl as C,
|
|
5869
|
+
ao as D,
|
|
5870
|
+
sr as E,
|
|
5871
|
+
oo as F,
|
|
5872
|
+
_a as G,
|
|
5879
5873
|
it as L,
|
|
5880
|
-
|
|
5881
|
-
|
|
5874
|
+
to as M,
|
|
5875
|
+
io as R,
|
|
5882
5876
|
Ne as a,
|
|
5883
5877
|
_e as b,
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5878
|
+
Cl as c,
|
|
5879
|
+
Zn as d,
|
|
5880
|
+
no as e,
|
|
5881
|
+
Vl as f,
|
|
5888
5882
|
de as g,
|
|
5889
5883
|
Pe as h,
|
|
5890
5884
|
ke as i,
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5885
|
+
lo as j,
|
|
5886
|
+
eo as k,
|
|
5887
|
+
ro as l,
|
|
5888
|
+
ei as m,
|
|
5889
|
+
Zr as n,
|
|
5896
5890
|
ce as o,
|
|
5897
|
-
|
|
5898
|
-
|
|
5891
|
+
Nl as p,
|
|
5892
|
+
Qr as q,
|
|
5899
5893
|
ve as r,
|
|
5900
|
-
|
|
5894
|
+
kn as s,
|
|
5901
5895
|
Ve as t,
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5896
|
+
Na as u,
|
|
5897
|
+
so as v,
|
|
5898
|
+
Da as w,
|
|
5899
|
+
_n as x,
|
|
5906
5900
|
ut as y,
|
|
5907
5901
|
mt as z
|
|
5908
5902
|
};
|
|
5909
|
-
//# sourceMappingURL=index-
|
|
5903
|
+
//# sourceMappingURL=index-C1cbPKI7.js.map
|