@linktr.ee/messaging-react 3.1.3 → 3.1.4-rc-1780636753
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/README.md +18 -1
- package/dist/{Card-DvoK42pX.cjs → Card-1U2tLPcp.cjs} +2 -2
- package/dist/{Card-DvoK42pX.cjs.map → Card-1U2tLPcp.cjs.map} +1 -1
- package/dist/{Card-RHd97_iq.js → Card-B9atg4sP.js} +2 -2
- package/dist/{Card-RHd97_iq.js.map → Card-B9atg4sP.js.map} +1 -1
- package/dist/{Card-CqeFyk7l.cjs → Card-BkgsPkp4.cjs} +2 -2
- package/dist/{Card-CqeFyk7l.cjs.map → Card-BkgsPkp4.cjs.map} +1 -1
- package/dist/{Card-Ctub3AU9.js → Card-BwFdJXYm.js} +2 -2
- package/dist/{Card-Ctub3AU9.js.map → Card-BwFdJXYm.js.map} +1 -1
- package/dist/{Card-BHF-XfHG.cjs → Card-D_XOj1eE.cjs} +2 -2
- package/dist/{Card-BHF-XfHG.cjs.map → Card-D_XOj1eE.cjs.map} +1 -1
- package/dist/{Card-VEde2Hfe.js → Card-jyXjZZ0u.js} +3 -3
- package/dist/{Card-VEde2Hfe.js.map → Card-jyXjZZ0u.js.map} +1 -1
- package/dist/{LockedThumbnail-BADzjHNM.js → LockedThumbnail-Dwt_goCX.js} +2 -2
- package/dist/{LockedThumbnail-BADzjHNM.js.map → LockedThumbnail-Dwt_goCX.js.map} +1 -1
- package/dist/{LockedThumbnail-BPMP5yZP.cjs → LockedThumbnail-oxtdpgut.cjs} +2 -2
- package/dist/{LockedThumbnail-BPMP5yZP.cjs.map → LockedThumbnail-oxtdpgut.cjs.map} +1 -1
- package/dist/{index-CnOvDQIp.js → index-CO975B6P.js} +908 -868
- package/dist/{index-CnOvDQIp.js.map → index-CO975B6P.js.map} +1 -1
- package/dist/index-D4Dse1Lu.cjs +2 -0
- package/dist/{index-BQf4WkPC.cjs.map → index-D4Dse1Lu.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +38 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.test.tsx +151 -3
- package/src/components/ChannelList/index.tsx +72 -4
- package/src/index.ts +1 -0
- package/src/types.ts +38 -0
- package/dist/index-BQf4WkPC.cjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as
|
|
6
|
-
import
|
|
7
|
-
import { MessageActions as
|
|
8
|
-
import { LinkPreviewsManager as
|
|
9
|
-
const
|
|
2
|
+
import R, { createContext as He, useContext as Te, useCallback as q, useState as z, useRef as X, useEffect as J, useMemo as ne, Suspense as Ye } from "react";
|
|
3
|
+
import { StreamChatService as In } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { Chat as Sn, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as qe, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Dn, EditMessageModal as Rn, MessageBlocked as Ln, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as Fn, ReminderNotification as $n, StreamedMessageText as Bn, messageHasAttachments as jn, messageHasReactions as Vn, isDateSeparatorMessage as Un, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Mt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as be, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Re, AIStates as Le, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
|
|
5
|
+
import { StarIcon as Be, XIcon as pe, SpinnerGapIcon as Pe, SignOutIcon as ds, ProhibitInsetIcon as Dt, FlagIcon as Gt, FileIcon as Ht, ImageIcon as us, SpeakerHighIcon as ms, VideoCameraIcon as Yt, FileMdIcon as hs, FileTextIcon as fs, FileZipIcon as gs, FilePptIcon as bs, FileCsvIcon as ps, FileXlsIcon as vs, FileDocIcon as xs, FilePdfIcon as ws, CircleNotchIcon as fe, PlayIcon as je, PauseIcon as Ns, LinkIcon as _s, DownloadSimpleIcon as ge, GiftIcon as ys, ThumbsUpIcon as Cs, ThumbsDownIcon as ks, TrashSimpleIcon as Es, ArrowUpIcon as Is, SparkleIcon as Ve, ProhibitIcon as Ss, ArrowLeftIcon as Rt, DotsThreeIcon as Lt, PencilSimpleIcon as Ts, CaretLeftIcon as As, CaretRightIcon as Ms } from "@phosphor-icons/react";
|
|
6
|
+
import C from "classnames";
|
|
7
|
+
import { MessageActions as Ds, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
|
|
8
|
+
import { LinkPreviewsManager as Pt } from "stream-chat";
|
|
9
|
+
const Wt = He({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const qt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), We = () => Te(Wt), wi = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -25,8 +25,8 @@ const qt = Ge({
|
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
27
|
const o = q(
|
|
28
|
-
(
|
|
29
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
28
|
+
(E, ..._) => {
|
|
29
|
+
i && console.log(`🔥 [MessagingProvider] ${E}`, ..._);
|
|
30
30
|
},
|
|
31
31
|
[i]
|
|
32
32
|
);
|
|
@@ -36,14 +36,14 @@ const qt = Ge({
|
|
|
36
36
|
serviceConfig: !!s,
|
|
37
37
|
capabilities: Object.keys(r)
|
|
38
38
|
});
|
|
39
|
-
const [l, d] =
|
|
39
|
+
const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, p] = z(!1), [N, v] = z(null), x = X(!1), w = X({
|
|
40
40
|
userId: t == null ? void 0 : t.id,
|
|
41
41
|
apiKey: a,
|
|
42
42
|
serviceConfig: s,
|
|
43
43
|
capabilities: r
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
renderCount:
|
|
44
|
+
}), T = X(0);
|
|
45
|
+
T.current++, o("📊 RENDER INFO", {
|
|
46
|
+
renderCount: T.current,
|
|
47
47
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
48
48
|
propChanges: {
|
|
49
49
|
userChanged: w.current.userId !== (t == null ? void 0 : t.id),
|
|
@@ -57,9 +57,9 @@ const qt = Ge({
|
|
|
57
57
|
serviceConfig: s,
|
|
58
58
|
capabilities: r
|
|
59
59
|
}, J(() => {
|
|
60
|
-
const
|
|
60
|
+
const E = T.current;
|
|
61
61
|
if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
62
|
-
renderCount:
|
|
62
|
+
renderCount: E,
|
|
63
63
|
apiKey: !!a,
|
|
64
64
|
serviceConfig: !!s,
|
|
65
65
|
dependencies: {
|
|
@@ -70,34 +70,34 @@ const qt = Ge({
|
|
|
70
70
|
}
|
|
71
71
|
}), !a || !s) {
|
|
72
72
|
o("⚠️ SERVICE INIT SKIPPED", {
|
|
73
|
-
renderCount:
|
|
73
|
+
renderCount: E,
|
|
74
74
|
reason: "Missing apiKey or serviceConfig"
|
|
75
75
|
});
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
o("🚀 CREATING NEW SERVICE", {
|
|
79
|
-
renderCount:
|
|
79
|
+
renderCount: E,
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: w.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const
|
|
83
|
+
const _ = new In({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
87
87
|
});
|
|
88
|
-
return d(
|
|
89
|
-
renderCount:
|
|
90
|
-
serviceInstance: !!
|
|
88
|
+
return d(_), o("✅ SERVICE SET", {
|
|
89
|
+
renderCount: E,
|
|
90
|
+
serviceInstance: !!_
|
|
91
91
|
}), () => {
|
|
92
92
|
o("🧹 SERVICE CLEANUP", {
|
|
93
|
-
renderCount:
|
|
93
|
+
renderCount: E,
|
|
94
94
|
reason: "Effect cleanup"
|
|
95
|
-
}),
|
|
95
|
+
}), _.disconnectUser().catch(console.error);
|
|
96
96
|
};
|
|
97
97
|
}, [a, s, i, o]);
|
|
98
|
-
const
|
|
98
|
+
const A = X(null);
|
|
99
99
|
J(() => {
|
|
100
|
-
var
|
|
100
|
+
var _, k;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
102
102
|
hasService: !!l,
|
|
103
103
|
hasUser: !!t,
|
|
@@ -113,7 +113,7 @@ const qt = Ge({
|
|
|
113
113
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
if (((
|
|
116
|
+
if (((_ = A.current) == null ? void 0 : _.serviceId) === l && ((k = A.current) == null ? void 0 : k.userId) === t.id) {
|
|
117
117
|
o(
|
|
118
118
|
"⚠️ USER CONNECTION SKIPPED",
|
|
119
119
|
"Already connected this user with this service"
|
|
@@ -124,16 +124,16 @@ const qt = Ge({
|
|
|
124
124
|
o("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0, p(!0), v(null);
|
|
125
125
|
try {
|
|
126
126
|
o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
127
|
-
const
|
|
128
|
-
g(
|
|
127
|
+
const I = await l.connectUser(t);
|
|
128
|
+
g(I), f(!0), A.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
129
129
|
userId: t.id,
|
|
130
|
-
clientId:
|
|
130
|
+
clientId: I.userID
|
|
131
131
|
});
|
|
132
|
-
} catch (
|
|
133
|
-
const
|
|
134
|
-
v(
|
|
132
|
+
} catch (I) {
|
|
133
|
+
const L = I instanceof Error ? I.message : "Connection failed";
|
|
134
|
+
v(L), o("❌ USER CONNECTION ERROR", {
|
|
135
135
|
userId: t.id,
|
|
136
|
-
error:
|
|
136
|
+
error: L
|
|
137
137
|
});
|
|
138
138
|
} finally {
|
|
139
139
|
p(!1), x.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
@@ -149,7 +149,7 @@ const qt = Ge({
|
|
|
149
149
|
l && u ? (o(
|
|
150
150
|
"🧹 CLEANUP EFFECT TRIGGERED",
|
|
151
151
|
"Cleaning up connection on unmount"
|
|
152
|
-
),
|
|
152
|
+
), A.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
|
|
153
153
|
hasService: !!l,
|
|
154
154
|
isConnected: u
|
|
155
155
|
});
|
|
@@ -165,18 +165,18 @@ const qt = Ge({
|
|
|
165
165
|
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
|
|
166
166
|
try {
|
|
167
167
|
o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
|
|
168
|
-
const
|
|
169
|
-
g(
|
|
170
|
-
} catch (
|
|
171
|
-
const
|
|
172
|
-
v(
|
|
168
|
+
const E = await l.connectUser(t);
|
|
169
|
+
g(E), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
170
|
+
} catch (E) {
|
|
171
|
+
const _ = E instanceof Error ? E.message : "Refresh failed";
|
|
172
|
+
v(_), o("❌ CONNECTION REFRESH ERROR", {
|
|
173
173
|
userId: t.id,
|
|
174
|
-
error:
|
|
174
|
+
error: _
|
|
175
175
|
});
|
|
176
176
|
} finally {
|
|
177
177
|
p(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
178
178
|
}
|
|
179
|
-
}, [l, t, o]),
|
|
179
|
+
}, [l, t, o]), M = R.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
180
180
|
hasService: !!l,
|
|
181
181
|
hasClient: !!m,
|
|
182
182
|
isConnected: u,
|
|
@@ -204,11 +204,11 @@ const qt = Ge({
|
|
|
204
204
|
o
|
|
205
205
|
]);
|
|
206
206
|
return o("🔄 RENDER END", {
|
|
207
|
-
renderCount:
|
|
207
|
+
renderCount: T.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
|
-
contextValueReady: !!
|
|
210
|
-
}), /* @__PURE__ */ n(
|
|
211
|
-
|
|
209
|
+
contextValueReady: !!M
|
|
210
|
+
}), /* @__PURE__ */ n(Wt.Provider, { value: M, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
Sn,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
@@ -217,9 +217,9 @@ const qt = Ge({
|
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
},
|
|
220
|
+
}, Rs = () => We(), Xt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
|
-
const [t, s] =
|
|
222
|
+
const [t, s] = z(
|
|
223
223
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
224
224
|
);
|
|
225
225
|
return J(() => {
|
|
@@ -239,18 +239,18 @@ const qt = Ge({
|
|
|
239
239
|
e.off("member.updated", i);
|
|
240
240
|
};
|
|
241
241
|
}, [e]), t;
|
|
242
|
-
},
|
|
243
|
-
function
|
|
244
|
-
return
|
|
242
|
+
}, Ls = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
243
|
+
function Ps(e) {
|
|
244
|
+
return Ls.test(e.trim());
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Ot(e, t) {
|
|
247
247
|
const s = e == null ? void 0 : e.trim();
|
|
248
|
-
return !s || t && s === t ? !1 : !
|
|
248
|
+
return !s || t && s === t ? !1 : !Ps(s);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function Ae(e) {
|
|
251
|
+
return Ot(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ot(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
252
252
|
}
|
|
253
|
-
const
|
|
253
|
+
const zt = [
|
|
254
254
|
"🍎",
|
|
255
255
|
// Apple
|
|
256
256
|
"🍌",
|
|
@@ -278,7 +278,7 @@ const Ot = [
|
|
|
278
278
|
"🍈"
|
|
279
279
|
// Melon
|
|
280
280
|
];
|
|
281
|
-
function
|
|
281
|
+
function Os(e) {
|
|
282
282
|
let t = 0;
|
|
283
283
|
for (let s = 0; s < e.length; s++) {
|
|
284
284
|
const a = e.charCodeAt(s);
|
|
@@ -286,9 +286,9 @@ function Ps(e) {
|
|
|
286
286
|
}
|
|
287
287
|
return Math.abs(t);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const s =
|
|
291
|
-
return
|
|
289
|
+
function zs(e) {
|
|
290
|
+
const s = Os(e) % zt.length;
|
|
291
|
+
return zt[s];
|
|
292
292
|
}
|
|
293
293
|
const ae = ({
|
|
294
294
|
id: e,
|
|
@@ -299,7 +299,7 @@ const ae = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l =
|
|
302
|
+
const l = zs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
303
303
|
"img",
|
|
304
304
|
{
|
|
305
305
|
src: t,
|
|
@@ -310,7 +310,7 @@ const ae = ({
|
|
|
310
310
|
"div",
|
|
311
311
|
{
|
|
312
312
|
"aria-hidden": "true",
|
|
313
|
-
className:
|
|
313
|
+
className: C(
|
|
314
314
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
315
315
|
m
|
|
316
316
|
),
|
|
@@ -320,7 +320,7 @@ const ae = ({
|
|
|
320
320
|
return /* @__PURE__ */ h(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
|
-
className:
|
|
323
|
+
className: C(
|
|
324
324
|
"relative flex-shrink-0 !bg-transparent",
|
|
325
325
|
a
|
|
326
326
|
),
|
|
@@ -335,14 +335,14 @@ const ae = ({
|
|
|
335
335
|
{
|
|
336
336
|
"aria-hidden": "true",
|
|
337
337
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
338
|
-
children: /* @__PURE__ */ n(
|
|
338
|
+
children: /* @__PURE__ */ n(Be, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
339
339
|
}
|
|
340
340
|
),
|
|
341
341
|
/* @__PURE__ */ n(
|
|
342
342
|
"div",
|
|
343
343
|
{
|
|
344
344
|
"data-testid": "avatar-ring",
|
|
345
|
-
className:
|
|
345
|
+
className: C(
|
|
346
346
|
"h-full w-full",
|
|
347
347
|
"bg-transparent"
|
|
348
348
|
),
|
|
@@ -370,7 +370,7 @@ const ae = ({
|
|
|
370
370
|
"button",
|
|
371
371
|
{
|
|
372
372
|
type: "button",
|
|
373
|
-
className:
|
|
373
|
+
className: C(
|
|
374
374
|
"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",
|
|
375
375
|
e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
376
376
|
t
|
|
@@ -379,12 +379,12 @@ const ae = ({
|
|
|
379
379
|
children: s
|
|
380
380
|
}
|
|
381
381
|
);
|
|
382
|
-
function
|
|
382
|
+
function Fs({ label: e, className: t, children: s, ...a }) {
|
|
383
383
|
return /* @__PURE__ */ h(
|
|
384
384
|
"button",
|
|
385
385
|
{
|
|
386
386
|
type: "button",
|
|
387
|
-
className:
|
|
387
|
+
className: C(
|
|
388
388
|
"inline-flex items-center justify-center rounded-full transition-colors focus-ring p-2",
|
|
389
389
|
{
|
|
390
390
|
"cursor-not-allowed opacity-50": a.disabled,
|
|
@@ -400,10 +400,10 @@ function zs({ label: e, className: t, children: s, ...a }) {
|
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
return /* @__PURE__ */ n(
|
|
403
|
+
function $s({ onClick: e }) {
|
|
404
|
+
return /* @__PURE__ */ n(Fs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(pe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
405
405
|
}
|
|
406
|
-
const
|
|
406
|
+
const Bs = ({
|
|
407
407
|
dialogRef: e,
|
|
408
408
|
onClose: t,
|
|
409
409
|
participant: s,
|
|
@@ -422,65 +422,65 @@ const $s = ({
|
|
|
422
422
|
customChannelActions: N
|
|
423
423
|
}) => {
|
|
424
424
|
var B, H, Y, $;
|
|
425
|
-
const { service: v, debug: x } =
|
|
425
|
+
const { service: v, debug: x } = We(), [w, T] = z(!1), [A, S] = z(!1), [M, E] = z(!1), _ = q(async () => {
|
|
426
426
|
var b;
|
|
427
427
|
if (!(!m || !v || !((b = s == null ? void 0 : s.user) != null && b.id)))
|
|
428
428
|
try {
|
|
429
|
-
const
|
|
430
|
-
(
|
|
429
|
+
const P = (await v.getBlockedUsers()).some(
|
|
430
|
+
(D) => {
|
|
431
431
|
var W;
|
|
432
|
-
return
|
|
432
|
+
return D.blocked_user_id === ((W = s == null ? void 0 : s.user) == null ? void 0 : W.id);
|
|
433
433
|
}
|
|
434
434
|
);
|
|
435
|
-
|
|
436
|
-
} catch (
|
|
435
|
+
T(P);
|
|
436
|
+
} catch (y) {
|
|
437
437
|
console.error(
|
|
438
438
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
439
|
-
|
|
439
|
+
y
|
|
440
440
|
);
|
|
441
441
|
}
|
|
442
442
|
}, [v, (B = s == null ? void 0 : s.user) == null ? void 0 : B.id, m]);
|
|
443
443
|
J(() => {
|
|
444
|
-
|
|
445
|
-
}, [
|
|
444
|
+
_();
|
|
445
|
+
}, [_]);
|
|
446
446
|
const k = async () => {
|
|
447
447
|
var b;
|
|
448
|
-
if (!
|
|
448
|
+
if (!A) {
|
|
449
449
|
u == null || u(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), S(!0);
|
|
450
450
|
try {
|
|
451
|
-
const
|
|
452
|
-
await r.hide(
|
|
453
|
-
} catch (
|
|
454
|
-
console.error("[ChannelInfoDialog] Failed to leave conversation",
|
|
451
|
+
const y = ((b = r._client) == null ? void 0 : b.userID) ?? null;
|
|
452
|
+
await r.hide(y, !1), o && await o(r), t();
|
|
453
|
+
} catch (y) {
|
|
454
|
+
console.error("[ChannelInfoDialog] Failed to leave conversation", y);
|
|
455
455
|
} finally {
|
|
456
456
|
S(!1);
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
},
|
|
460
|
-
var b,
|
|
461
|
-
if (!(
|
|
462
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id),
|
|
459
|
+
}, I = async () => {
|
|
460
|
+
var b, y, P;
|
|
461
|
+
if (!(M || !v)) {
|
|
462
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), E(!0);
|
|
463
463
|
try {
|
|
464
|
-
await v.blockUser((
|
|
465
|
-
} catch (
|
|
466
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
464
|
+
await v.blockUser((y = s == null ? void 0 : s.user) == null ? void 0 : y.id), l && await l((P = s == null ? void 0 : s.user) == null ? void 0 : P.id), t();
|
|
465
|
+
} catch (D) {
|
|
466
|
+
console.error("[ChannelInfoDialog] Failed to block member", D);
|
|
467
467
|
} finally {
|
|
468
|
-
|
|
468
|
+
E(!1);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
},
|
|
472
|
-
var b,
|
|
473
|
-
if (!(
|
|
474
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id),
|
|
471
|
+
}, L = async () => {
|
|
472
|
+
var b, y, P;
|
|
473
|
+
if (!(M || !v)) {
|
|
474
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), E(!0);
|
|
475
475
|
try {
|
|
476
|
-
await v.unBlockUser((
|
|
477
|
-
} catch (
|
|
478
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
476
|
+
await v.unBlockUser((y = s == null ? void 0 : s.user) == null ? void 0 : y.id), l && await l((P = s == null ? void 0 : s.user) == null ? void 0 : P.id), t();
|
|
477
|
+
} catch (D) {
|
|
478
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", D);
|
|
479
479
|
} finally {
|
|
480
|
-
|
|
480
|
+
E(!1);
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
},
|
|
483
|
+
}, V = () => {
|
|
484
484
|
c == null || c(), t(), window.open(
|
|
485
485
|
"https://linktr.ee/s/about/trust-center/report",
|
|
486
486
|
"_blank",
|
|
@@ -488,7 +488,7 @@ const $s = ({
|
|
|
488
488
|
);
|
|
489
489
|
};
|
|
490
490
|
if (!s) return null;
|
|
491
|
-
const F = a ??
|
|
491
|
+
const F = a ?? Ae(s.user), Z = (H = s.user) == null ? void 0 : H.image, U = (Y = s.user) == null ? void 0 : Y.username, G = U ? `linktr.ee/${U}` : void 0, O = (($ = s.user) == null ? void 0 : $.id) || "unknown";
|
|
492
492
|
return (
|
|
493
493
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
494
494
|
/* @__PURE__ */ n(
|
|
@@ -503,7 +503,7 @@ const $s = ({
|
|
|
503
503
|
children: /* @__PURE__ */ h("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
|
|
504
504
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
505
505
|
/* @__PURE__ */ n("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
506
|
-
/* @__PURE__ */ n(
|
|
506
|
+
/* @__PURE__ */ n($s, { onClick: t })
|
|
507
507
|
] }),
|
|
508
508
|
/* @__PURE__ */ h("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
|
|
509
509
|
/* @__PURE__ */ h(
|
|
@@ -516,7 +516,7 @@ const $s = ({
|
|
|
516
516
|
/* @__PURE__ */ n(
|
|
517
517
|
ae,
|
|
518
518
|
{
|
|
519
|
-
id:
|
|
519
|
+
id: O,
|
|
520
520
|
name: F,
|
|
521
521
|
image: Z,
|
|
522
522
|
size: 88,
|
|
@@ -551,10 +551,10 @@ const $s = ({
|
|
|
551
551
|
ye,
|
|
552
552
|
{
|
|
553
553
|
onClick: k,
|
|
554
|
-
disabled:
|
|
555
|
-
"aria-busy":
|
|
554
|
+
disabled: A,
|
|
555
|
+
"aria-busy": A,
|
|
556
556
|
children: [
|
|
557
|
-
|
|
557
|
+
A ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ds, { className: "h-5 w-5" }),
|
|
558
558
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
559
559
|
]
|
|
560
560
|
}
|
|
@@ -562,28 +562,28 @@ const $s = ({
|
|
|
562
562
|
m && /* @__PURE__ */ n("li", { children: w ? /* @__PURE__ */ h(
|
|
563
563
|
ye,
|
|
564
564
|
{
|
|
565
|
-
onClick:
|
|
566
|
-
disabled:
|
|
567
|
-
"aria-busy":
|
|
565
|
+
onClick: L,
|
|
566
|
+
disabled: M,
|
|
567
|
+
"aria-busy": M,
|
|
568
568
|
children: [
|
|
569
|
-
|
|
569
|
+
M ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
|
|
570
570
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
571
571
|
]
|
|
572
572
|
}
|
|
573
573
|
) : /* @__PURE__ */ h(
|
|
574
574
|
ye,
|
|
575
575
|
{
|
|
576
|
-
onClick:
|
|
577
|
-
disabled:
|
|
578
|
-
"aria-busy":
|
|
576
|
+
onClick: I,
|
|
577
|
+
disabled: M,
|
|
578
|
+
"aria-busy": M,
|
|
579
579
|
children: [
|
|
580
|
-
|
|
580
|
+
M ? /* @__PURE__ */ n(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick:
|
|
586
|
-
/* @__PURE__ */ n(
|
|
585
|
+
g && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ye, { variant: "danger", onClick: V, children: [
|
|
586
|
+
/* @__PURE__ */ n(Gt, { className: "h-5 w-5" }),
|
|
587
587
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
588
588
|
] }) }),
|
|
589
589
|
N
|
|
@@ -593,13 +593,13 @@ const $s = ({
|
|
|
593
593
|
}
|
|
594
594
|
)
|
|
595
595
|
);
|
|
596
|
-
},
|
|
597
|
-
function
|
|
598
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
596
|
+
}, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), Ue = "vote_up", Ge = "vote_down";
|
|
597
|
+
function Vs(e) {
|
|
598
|
+
return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ue) ? "up" : null : null;
|
|
599
599
|
}
|
|
600
600
|
function Us(e) {
|
|
601
|
-
const { channel: t } = ce(), { client: s } =
|
|
602
|
-
() =>
|
|
601
|
+
const { channel: t } = ce(), { client: s } = qe("useMessageVote"), a = ne(
|
|
602
|
+
() => Vs(e.own_reactions),
|
|
603
603
|
[e.own_reactions]
|
|
604
604
|
), r = q(async () => {
|
|
605
605
|
if (s != null && s.userID)
|
|
@@ -614,9 +614,9 @@ function Us(e) {
|
|
|
614
614
|
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
|
|
615
615
|
if (s != null && s.userID)
|
|
616
616
|
try {
|
|
617
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
617
|
+
a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
|
|
618
618
|
e.id,
|
|
619
|
-
{ type:
|
|
619
|
+
{ type: Ge },
|
|
620
620
|
{ enforce_unique: !0, skip_push: !0 }
|
|
621
621
|
);
|
|
622
622
|
} catch {
|
|
@@ -624,24 +624,24 @@ function Us(e) {
|
|
|
624
624
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
625
625
|
return { selected: a, voteUp: r, voteDown: i };
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Gs(e) {
|
|
628
628
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Kt({
|
|
631
631
|
message: e,
|
|
632
632
|
viewerLanguage: t
|
|
633
633
|
}) {
|
|
634
634
|
var r;
|
|
635
|
-
const s = e == null ? void 0 : e.text, a =
|
|
635
|
+
const s = e == null ? void 0 : e.text, a = Gs(t);
|
|
636
636
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
637
637
|
}
|
|
638
|
-
const
|
|
638
|
+
const Hs = R.lazy(() => import("./Card-BwFdJXYm.js")), Ys = R.lazy(() => import("./Card-B9atg4sP.js")), qs = R.lazy(() => import("./Card-jyXjZZ0u.js")), Xe = () => /* @__PURE__ */ n(
|
|
639
639
|
"div",
|
|
640
640
|
{
|
|
641
641
|
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)]",
|
|
642
642
|
"aria-hidden": !0
|
|
643
643
|
}
|
|
644
|
-
),
|
|
644
|
+
), Ws = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Xs = Jt, Ks = Zt, Ft = { Composer: Ws, Sent: Jt, Received: Zt, Creator: Xs, Visitor: Ks }, Js = [
|
|
645
645
|
[/pdf/, "pdf"],
|
|
646
646
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
647
647
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -654,39 +654,39 @@ const Gs = z.lazy(() => import("./Card-Ctub3AU9.js")), Hs = z.lazy(() => import(
|
|
|
654
654
|
function re(e) {
|
|
655
655
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
const t =
|
|
657
|
+
function Qt(e) {
|
|
658
|
+
const t = Js.find(
|
|
659
659
|
([s]) => s.test(e)
|
|
660
660
|
);
|
|
661
661
|
return t ? t[1] : "generic";
|
|
662
662
|
}
|
|
663
|
-
const
|
|
664
|
-
video:
|
|
665
|
-
audio:
|
|
666
|
-
image:
|
|
667
|
-
document:
|
|
668
|
-
},
|
|
669
|
-
pdf:
|
|
670
|
-
doc:
|
|
671
|
-
xls:
|
|
672
|
-
csv:
|
|
673
|
-
ppt:
|
|
674
|
-
zip:
|
|
675
|
-
text:
|
|
676
|
-
markdown:
|
|
677
|
-
generic:
|
|
663
|
+
const Zs = {
|
|
664
|
+
video: Yt,
|
|
665
|
+
audio: ms,
|
|
666
|
+
image: us,
|
|
667
|
+
document: Ht
|
|
668
|
+
}, Qs = {
|
|
669
|
+
pdf: ws,
|
|
670
|
+
doc: xs,
|
|
671
|
+
xls: vs,
|
|
672
|
+
csv: ps,
|
|
673
|
+
ppt: bs,
|
|
674
|
+
zip: gs,
|
|
675
|
+
text: fs,
|
|
676
|
+
markdown: hs,
|
|
677
|
+
generic: Ht
|
|
678
678
|
};
|
|
679
|
-
function
|
|
679
|
+
function ea(e) {
|
|
680
680
|
const t = re(e);
|
|
681
|
-
return t !== "document" ?
|
|
681
|
+
return t !== "document" ? Zs[t] : Qs[Qt(e)];
|
|
682
682
|
}
|
|
683
683
|
function le(e, t) {
|
|
684
|
-
return
|
|
684
|
+
return R.createElement(ea(e), t);
|
|
685
685
|
}
|
|
686
|
-
const
|
|
686
|
+
const ta = (e) => {
|
|
687
687
|
var t, s;
|
|
688
688
|
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;
|
|
689
|
-
},
|
|
689
|
+
}, na = ({
|
|
690
690
|
source: e,
|
|
691
691
|
mimeType: t,
|
|
692
692
|
poster: s,
|
|
@@ -698,23 +698,23 @@ const ea = (e) => {
|
|
|
698
698
|
muted: d = !1,
|
|
699
699
|
onContainerClick: m
|
|
700
700
|
}) => {
|
|
701
|
-
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] =
|
|
702
|
-
|
|
701
|
+
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = z(a), [x, w] = z(0), [T, A] = z(!1), [S, M] = z(!1), [E, _] = z(!1), [k, I] = z(!1), [L, V] = z(!0), [F, Z] = z(null), U = q(() => {
|
|
702
|
+
_(!1), v(!0);
|
|
703
703
|
}, []), G = q((b) => {
|
|
704
|
-
const
|
|
705
|
-
if (!
|
|
706
|
-
const
|
|
704
|
+
const y = f.current;
|
|
705
|
+
if (!y) return 0;
|
|
706
|
+
const P = y.getBoundingClientRect();
|
|
707
707
|
return Math.max(
|
|
708
708
|
0,
|
|
709
|
-
Math.min(1, (
|
|
709
|
+
Math.min(1, (ta(b) - P.left) / P.width)
|
|
710
710
|
);
|
|
711
|
-
}, []),
|
|
712
|
-
const
|
|
713
|
-
|
|
711
|
+
}, []), O = q((b) => {
|
|
712
|
+
const y = u.current;
|
|
713
|
+
y && y.duration && (y.currentTime = b * y.duration);
|
|
714
714
|
}, []), B = (b) => {
|
|
715
|
-
b.stopPropagation(),
|
|
716
|
-
const
|
|
717
|
-
w(
|
|
715
|
+
b.stopPropagation(), A(!0);
|
|
716
|
+
const y = G(b);
|
|
717
|
+
w(y), O(y);
|
|
718
718
|
};
|
|
719
719
|
J(() => {
|
|
720
720
|
r !== void 0 && r !== p.current && (p.current = r, v(r));
|
|
@@ -724,26 +724,26 @@ const ea = (e) => {
|
|
|
724
724
|
return;
|
|
725
725
|
}
|
|
726
726
|
const b = () => {
|
|
727
|
-
const
|
|
728
|
-
|
|
727
|
+
const y = u.current;
|
|
728
|
+
y && y.duration && !T && w(y.currentTime / y.duration), c.current = requestAnimationFrame(b);
|
|
729
729
|
};
|
|
730
730
|
return c.current = requestAnimationFrame(b), () => {
|
|
731
731
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
732
732
|
};
|
|
733
|
-
}, [N,
|
|
733
|
+
}, [N, T]), J(() => {
|
|
734
734
|
const b = u.current;
|
|
735
|
-
b && (N ? b.play().catch((
|
|
736
|
-
v(!1),
|
|
735
|
+
b && (N ? b.play().catch((y) => {
|
|
736
|
+
v(!1), _(!0);
|
|
737
737
|
}) : b.pause());
|
|
738
738
|
}, [N]), J(() => {
|
|
739
|
-
if (!
|
|
740
|
-
const b = (
|
|
741
|
-
|
|
739
|
+
if (!T) return;
|
|
740
|
+
const b = (P) => w(G(P)), y = (P) => {
|
|
741
|
+
A(!1), O(G(P));
|
|
742
742
|
};
|
|
743
|
-
return window.addEventListener("mousemove", b), window.addEventListener("mouseup",
|
|
744
|
-
window.removeEventListener("mousemove", b), window.removeEventListener("mouseup",
|
|
743
|
+
return window.addEventListener("mousemove", b), window.addEventListener("mouseup", y), window.addEventListener("touchmove", b, { passive: !0 }), window.addEventListener("touchend", y), () => {
|
|
744
|
+
window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", y), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", y);
|
|
745
745
|
};
|
|
746
|
-
}, [
|
|
746
|
+
}, [T, G, O]);
|
|
747
747
|
const H = F ? { aspectRatio: String(F) } : void 0, Y = F ? "" : " aspect-video", $ = Math.round(x * 100);
|
|
748
748
|
return /* @__PURE__ */ h(
|
|
749
749
|
"div",
|
|
@@ -757,7 +757,7 @@ const ea = (e) => {
|
|
|
757
757
|
m(b);
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
E || o && v((y) => !y);
|
|
761
761
|
},
|
|
762
762
|
onKeyDown: (b) => {
|
|
763
763
|
if (!(b.key !== "Enter" && b.key !== " ")) {
|
|
@@ -765,11 +765,11 @@ const ea = (e) => {
|
|
|
765
765
|
m(b);
|
|
766
766
|
return;
|
|
767
767
|
}
|
|
768
|
-
|
|
768
|
+
E || o && v((y) => !y);
|
|
769
769
|
}
|
|
770
770
|
},
|
|
771
771
|
children: [
|
|
772
|
-
s && (g === "audio" ||
|
|
772
|
+
s && (g === "audio" || L) && /* @__PURE__ */ n(
|
|
773
773
|
"img",
|
|
774
774
|
{
|
|
775
775
|
src: s,
|
|
@@ -777,7 +777,7 @@ const ea = (e) => {
|
|
|
777
777
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
778
778
|
}
|
|
779
779
|
),
|
|
780
|
-
!s && (g === "audio" ||
|
|
780
|
+
!s && (g === "audio" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
|
|
781
781
|
className: "size-12 text-black/20",
|
|
782
782
|
weight: "regular"
|
|
783
783
|
}) }),
|
|
@@ -789,12 +789,12 @@ const ea = (e) => {
|
|
|
789
789
|
loop: i,
|
|
790
790
|
muted: d,
|
|
791
791
|
style: { width: "100%", height: "100%" },
|
|
792
|
-
onLoadStart: () =>
|
|
792
|
+
onLoadStart: () => I(!0),
|
|
793
793
|
onCanPlay: () => {
|
|
794
|
-
|
|
794
|
+
I(!1), V(!1);
|
|
795
795
|
},
|
|
796
|
-
onWaiting: () =>
|
|
797
|
-
onPlay: () =>
|
|
796
|
+
onWaiting: () => I(!0),
|
|
797
|
+
onPlay: () => _(!1),
|
|
798
798
|
onEnded: () => {
|
|
799
799
|
i || (v(!1), w(0));
|
|
800
800
|
},
|
|
@@ -809,12 +809,12 @@ const ea = (e) => {
|
|
|
809
809
|
muted: d,
|
|
810
810
|
playsInline: !0,
|
|
811
811
|
style: { width: "100%", height: "100%" },
|
|
812
|
-
onLoadStart: () =>
|
|
812
|
+
onLoadStart: () => I(!0),
|
|
813
813
|
onCanPlay: () => {
|
|
814
|
-
|
|
814
|
+
I(!1), V(!1);
|
|
815
815
|
},
|
|
816
|
-
onWaiting: () =>
|
|
817
|
-
onPlay: () =>
|
|
816
|
+
onWaiting: () => I(!0),
|
|
817
|
+
onPlay: () => _(!1),
|
|
818
818
|
onLoadedMetadata: () => {
|
|
819
819
|
const b = u.current;
|
|
820
820
|
b instanceof HTMLVideoElement && b.videoWidth && b.videoHeight && Z(b.videoWidth / b.videoHeight);
|
|
@@ -825,14 +825,14 @@ const ea = (e) => {
|
|
|
825
825
|
children: /* @__PURE__ */ n("track", { kind: "captions" })
|
|
826
826
|
}
|
|
827
827
|
) }),
|
|
828
|
-
k && !
|
|
828
|
+
k && !E && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
829
829
|
fe,
|
|
830
830
|
{
|
|
831
831
|
className: "size-8 animate-spin text-white/80",
|
|
832
832
|
weight: "bold"
|
|
833
833
|
}
|
|
834
834
|
) }),
|
|
835
|
-
|
|
835
|
+
E && !o && /* @__PURE__ */ n(
|
|
836
836
|
"div",
|
|
837
837
|
{
|
|
838
838
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
@@ -840,12 +840,12 @@ const ea = (e) => {
|
|
|
840
840
|
tabIndex: 0,
|
|
841
841
|
"aria-label": "Play preview",
|
|
842
842
|
onClick: (b) => {
|
|
843
|
-
b.stopPropagation(),
|
|
843
|
+
b.stopPropagation(), U();
|
|
844
844
|
},
|
|
845
845
|
onKeyDown: (b) => {
|
|
846
|
-
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(),
|
|
846
|
+
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(), U());
|
|
847
847
|
},
|
|
848
|
-
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(
|
|
848
|
+
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(je, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
849
849
|
}
|
|
850
850
|
),
|
|
851
851
|
l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
|
|
@@ -863,7 +863,7 @@ const ea = (e) => {
|
|
|
863
863
|
onTouchStart: B,
|
|
864
864
|
onClick: (b) => b.stopPropagation(),
|
|
865
865
|
onKeyDown: (b) => {
|
|
866
|
-
b.key === "ArrowRight" &&
|
|
866
|
+
b.key === "ArrowRight" && O(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && O(Math.max(0, x - 0.05));
|
|
867
867
|
},
|
|
868
868
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
869
869
|
"div",
|
|
@@ -880,11 +880,11 @@ const ea = (e) => {
|
|
|
880
880
|
{
|
|
881
881
|
type: "button",
|
|
882
882
|
onClick: (b) => {
|
|
883
|
-
b.stopPropagation(), v((
|
|
883
|
+
b.stopPropagation(), v((y) => !y);
|
|
884
884
|
},
|
|
885
885
|
className: "shrink-0 text-white",
|
|
886
886
|
"aria-label": N ? "Pause" : "Play",
|
|
887
|
-
children: N ? /* @__PURE__ */ n(
|
|
887
|
+
children: N ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(je, { className: "size-5 translate-x-px", weight: "fill" })
|
|
888
888
|
}
|
|
889
889
|
),
|
|
890
890
|
/* @__PURE__ */ h(
|
|
@@ -901,16 +901,16 @@ const ea = (e) => {
|
|
|
901
901
|
onMouseDown: B,
|
|
902
902
|
onTouchStart: B,
|
|
903
903
|
onClick: (b) => b.stopPropagation(),
|
|
904
|
-
onMouseEnter: () =>
|
|
905
|
-
onMouseLeave: () =>
|
|
904
|
+
onMouseEnter: () => M(!0),
|
|
905
|
+
onMouseLeave: () => M(!1),
|
|
906
906
|
onKeyDown: (b) => {
|
|
907
|
-
b.key === "ArrowRight" &&
|
|
907
|
+
b.key === "ArrowRight" && O(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && O(Math.max(0, x - 0.05));
|
|
908
908
|
},
|
|
909
909
|
children: [
|
|
910
910
|
/* @__PURE__ */ n(
|
|
911
911
|
"div",
|
|
912
912
|
{
|
|
913
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S ||
|
|
913
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || T ? "h-1.5" : "h-1"}`,
|
|
914
914
|
children: /* @__PURE__ */ n(
|
|
915
915
|
"div",
|
|
916
916
|
{
|
|
@@ -923,7 +923,7 @@ const ea = (e) => {
|
|
|
923
923
|
/* @__PURE__ */ n(
|
|
924
924
|
"div",
|
|
925
925
|
{
|
|
926
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S ||
|
|
926
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || T ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
927
927
|
style: { left: `${$}%` }
|
|
928
928
|
}
|
|
929
929
|
)
|
|
@@ -934,7 +934,7 @@ const ea = (e) => {
|
|
|
934
934
|
]
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
|
-
},
|
|
937
|
+
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", sa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
|
|
938
938
|
mimeType: e,
|
|
939
939
|
sourceUrl: t,
|
|
940
940
|
thumbnailUrl: s,
|
|
@@ -943,9 +943,9 @@ const ea = (e) => {
|
|
|
943
943
|
mediaPlayerProps: i,
|
|
944
944
|
containedImage: o = !1
|
|
945
945
|
}) => {
|
|
946
|
-
const l = re(e), [d, m] =
|
|
946
|
+
const l = re(e), [d, m] = z(!1);
|
|
947
947
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
948
|
-
|
|
948
|
+
na,
|
|
949
949
|
{
|
|
950
950
|
source: t,
|
|
951
951
|
mimeType: e,
|
|
@@ -992,11 +992,11 @@ const ea = (e) => {
|
|
|
992
992
|
{
|
|
993
993
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
994
994
|
children: le(e, {
|
|
995
|
-
className:
|
|
995
|
+
className: $t(r),
|
|
996
996
|
weight: "regular"
|
|
997
997
|
})
|
|
998
998
|
}
|
|
999
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
999
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${sa(r)}`, children: /* @__PURE__ */ n(
|
|
1000
1000
|
"img",
|
|
1001
1001
|
{
|
|
1002
1002
|
src: s,
|
|
@@ -1009,12 +1009,12 @@ const ea = (e) => {
|
|
|
1009
1009
|
{
|
|
1010
1010
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1011
1011
|
children: le(e, {
|
|
1012
|
-
className:
|
|
1012
|
+
className: $t(r),
|
|
1013
1013
|
weight: "regular"
|
|
1014
1014
|
})
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
|
-
},
|
|
1017
|
+
}, tn = ({
|
|
1018
1018
|
variant: e,
|
|
1019
1019
|
thumbnail: t,
|
|
1020
1020
|
title: s,
|
|
@@ -1034,7 +1034,7 @@ const ea = (e) => {
|
|
|
1034
1034
|
{
|
|
1035
1035
|
ref: g,
|
|
1036
1036
|
"data-testid": u,
|
|
1037
|
-
className:
|
|
1037
|
+
className: C(
|
|
1038
1038
|
"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)]",
|
|
1039
1039
|
f ? "bg-[#121110]" : "bg-white"
|
|
1040
1040
|
),
|
|
@@ -1046,7 +1046,7 @@ const ea = (e) => {
|
|
|
1046
1046
|
c.trim() !== "" && /* @__PURE__ */ n(
|
|
1047
1047
|
"p",
|
|
1048
1048
|
{
|
|
1049
|
-
className:
|
|
1049
|
+
className: C("mb-0.5 truncate text-base font-medium", {
|
|
1050
1050
|
"text-black": !f,
|
|
1051
1051
|
"text-white/30": f && p,
|
|
1052
1052
|
"text-white": f && !p
|
|
@@ -1056,7 +1056,7 @@ const ea = (e) => {
|
|
|
1056
1056
|
),
|
|
1057
1057
|
/* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1058
1058
|
le(r, {
|
|
1059
|
-
className:
|
|
1059
|
+
className: C(
|
|
1060
1060
|
"size-5 shrink-0",
|
|
1061
1061
|
f ? "text-white/55" : "text-black/55"
|
|
1062
1062
|
),
|
|
@@ -1065,7 +1065,7 @@ const ea = (e) => {
|
|
|
1065
1065
|
i != null && i !== "" && /* @__PURE__ */ n(
|
|
1066
1066
|
"span",
|
|
1067
1067
|
{
|
|
1068
|
-
className:
|
|
1068
|
+
className: C(
|
|
1069
1069
|
"text-xs font-medium",
|
|
1070
1070
|
f ? "text-white/55" : "text-black/55"
|
|
1071
1071
|
),
|
|
@@ -1080,29 +1080,29 @@ const ea = (e) => {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
);
|
|
1082
1082
|
};
|
|
1083
|
-
function
|
|
1083
|
+
function nn(e) {
|
|
1084
1084
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Ke(e) {
|
|
1087
1087
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function aa(e) {
|
|
1090
1090
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function ra(e) {
|
|
1093
1093
|
return e ? "text-white" : "text-black";
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function ia(e) {
|
|
1096
1096
|
return e ? "text-white/55" : "text-black/55";
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function oa(e) {
|
|
1099
1099
|
return e ? "text-white/40" : "text-black/40";
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function la(e) {
|
|
1102
1102
|
return e ? "text-white/20" : "text-black/20";
|
|
1103
1103
|
}
|
|
1104
|
-
const
|
|
1105
|
-
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(
|
|
1104
|
+
const Je = ({ attachment: e, isMyMessage: t }) => {
|
|
1105
|
+
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(R.Fragment, { children: [
|
|
1106
1106
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1107
1107
|
"img",
|
|
1108
1108
|
{
|
|
@@ -1113,26 +1113,26 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1113
1113
|
) : /* @__PURE__ */ n(
|
|
1114
1114
|
"div",
|
|
1115
1115
|
{
|
|
1116
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1117
|
-
children: /* @__PURE__ */ n(
|
|
1116
|
+
className: `aspect-video w-full rounded-[20px] ${aa(t)} flex items-center justify-center`,
|
|
1117
|
+
children: /* @__PURE__ */ n(_s, { className: `size-12 ${la(t)}` })
|
|
1118
1118
|
}
|
|
1119
1119
|
) }),
|
|
1120
1120
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1121
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1122
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1123
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1121
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ra(t)}`, children: s }),
|
|
1122
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ia(t)}`, children: a }),
|
|
1123
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${oa(t)}`, children: d })
|
|
1124
1124
|
] })
|
|
1125
1125
|
] });
|
|
1126
1126
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
1127
1127
|
};
|
|
1128
|
-
function
|
|
1128
|
+
function sn(e) {
|
|
1129
1129
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Ze(e) {
|
|
1132
1132
|
var t;
|
|
1133
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1133
|
+
return (t = e.attachments) == null ? void 0 : t.find(sn);
|
|
1134
1134
|
}
|
|
1135
|
-
async function
|
|
1135
|
+
async function ca(e, t) {
|
|
1136
1136
|
let s;
|
|
1137
1137
|
try {
|
|
1138
1138
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1144,11 +1144,11 @@ async function la(e, t) {
|
|
|
1144
1144
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1145
1145
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1146
1146
|
}
|
|
1147
|
-
const
|
|
1147
|
+
const da = ({
|
|
1148
1148
|
url: e,
|
|
1149
1149
|
filename: t
|
|
1150
1150
|
}) => {
|
|
1151
|
-
const [s, a] =
|
|
1151
|
+
const [s, a] = z(!1);
|
|
1152
1152
|
return /* @__PURE__ */ n(
|
|
1153
1153
|
"button",
|
|
1154
1154
|
{
|
|
@@ -1156,7 +1156,7 @@ const ca = ({
|
|
|
1156
1156
|
onClick: (i) => {
|
|
1157
1157
|
i.stopPropagation();
|
|
1158
1158
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1159
|
-
a(!0),
|
|
1159
|
+
a(!0), ca(e, t).then(() => {
|
|
1160
1160
|
o == null || o.close();
|
|
1161
1161
|
}).catch(() => {
|
|
1162
1162
|
o && (o.location.href = e);
|
|
@@ -1164,14 +1164,14 @@ const ca = ({
|
|
|
1164
1164
|
},
|
|
1165
1165
|
disabled: s,
|
|
1166
1166
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1167
|
-
children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(
|
|
1167
|
+
children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(R.Fragment, { children: [
|
|
1168
1168
|
/* @__PURE__ */ n(ge, { className: "size-4 text-white", weight: "bold" }),
|
|
1169
1169
|
"Download"
|
|
1170
1170
|
] })
|
|
1171
1171
|
}
|
|
1172
1172
|
);
|
|
1173
1173
|
};
|
|
1174
|
-
function
|
|
1174
|
+
function Qe(e) {
|
|
1175
1175
|
var u, f, c, p;
|
|
1176
1176
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1177
1177
|
(N) => N.type === "video" && N.asset_url
|
|
@@ -1192,16 +1192,16 @@ function Ze(e) {
|
|
|
1192
1192
|
thumbnailUrl: g
|
|
1193
1193
|
};
|
|
1194
1194
|
}
|
|
1195
|
-
const
|
|
1195
|
+
const an = ({
|
|
1196
1196
|
resolvedUrl: e,
|
|
1197
1197
|
resolvedType: t,
|
|
1198
1198
|
title: s,
|
|
1199
1199
|
fileSize: a,
|
|
1200
1200
|
thumbnailUrl: r
|
|
1201
1201
|
}) => {
|
|
1202
|
-
const i = a !== void 0 ?
|
|
1202
|
+
const i = a !== void 0 ? nn(a) : void 0;
|
|
1203
1203
|
return /* @__PURE__ */ n(
|
|
1204
|
-
|
|
1204
|
+
tn,
|
|
1205
1205
|
{
|
|
1206
1206
|
variant: "dark",
|
|
1207
1207
|
title: s,
|
|
@@ -1209,7 +1209,7 @@ const sn = ({
|
|
|
1209
1209
|
mimeType: t,
|
|
1210
1210
|
detail: i,
|
|
1211
1211
|
thumbnail: /* @__PURE__ */ n(
|
|
1212
|
-
|
|
1212
|
+
en,
|
|
1213
1213
|
{
|
|
1214
1214
|
mimeType: t,
|
|
1215
1215
|
sourceUrl: e,
|
|
@@ -1220,23 +1220,23 @@ const sn = ({
|
|
|
1220
1220
|
)
|
|
1221
1221
|
}
|
|
1222
1222
|
);
|
|
1223
|
-
},
|
|
1223
|
+
}, rn = ({
|
|
1224
1224
|
resolvedUrl: e,
|
|
1225
1225
|
resolvedType: t,
|
|
1226
1226
|
title: s,
|
|
1227
1227
|
fileSize: a,
|
|
1228
1228
|
thumbnailUrl: r
|
|
1229
1229
|
}) => {
|
|
1230
|
-
const i = re(t), o = a !== void 0 ?
|
|
1230
|
+
const i = re(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1231
1231
|
return /* @__PURE__ */ n(
|
|
1232
|
-
|
|
1232
|
+
tn,
|
|
1233
1233
|
{
|
|
1234
1234
|
variant: "light",
|
|
1235
1235
|
title: s,
|
|
1236
1236
|
mimeType: t,
|
|
1237
1237
|
detail: o,
|
|
1238
1238
|
thumbnail: /* @__PURE__ */ n(
|
|
1239
|
-
|
|
1239
|
+
en,
|
|
1240
1240
|
{
|
|
1241
1241
|
mimeType: t,
|
|
1242
1242
|
sourceUrl: e,
|
|
@@ -1246,14 +1246,14 @@ const sn = ({
|
|
|
1246
1246
|
containedImage: i === "image" || i === "document"
|
|
1247
1247
|
}
|
|
1248
1248
|
),
|
|
1249
|
-
action: /* @__PURE__ */ n(
|
|
1249
|
+
action: /* @__PURE__ */ n(da, { url: e, filename: s })
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
|
-
},
|
|
1252
|
+
}, ua = ({
|
|
1253
1253
|
message: e,
|
|
1254
1254
|
isMyMessage: t = !1
|
|
1255
1255
|
}) => {
|
|
1256
|
-
const s =
|
|
1256
|
+
const s = Ze(e), a = Qe(e);
|
|
1257
1257
|
return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
1258
1258
|
!t && e.user && /* @__PURE__ */ n(
|
|
1259
1259
|
ae,
|
|
@@ -1274,40 +1274,40 @@ const sn = ({
|
|
|
1274
1274
|
{
|
|
1275
1275
|
className: "str-chat__message-bubble",
|
|
1276
1276
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1277
|
-
children: s ? /* @__PURE__ */ n("div", { className:
|
|
1277
|
+
children: s ? /* @__PURE__ */ n("div", { className: Ke(t), children: /* @__PURE__ */ n(Je, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(an, { ...a }) : /* @__PURE__ */ n(rn, { ...a })
|
|
1278
1278
|
}
|
|
1279
1279
|
) })
|
|
1280
1280
|
}
|
|
1281
1281
|
)
|
|
1282
1282
|
] });
|
|
1283
|
-
},
|
|
1283
|
+
}, ma = ({
|
|
1284
1284
|
message: e
|
|
1285
1285
|
}) => {
|
|
1286
|
-
const t =
|
|
1286
|
+
const t = Ze(e);
|
|
1287
1287
|
if (t)
|
|
1288
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1289
|
-
const s =
|
|
1290
|
-
return s ? /* @__PURE__ */ n(
|
|
1291
|
-
},
|
|
1288
|
+
return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
|
|
1289
|
+
const s = Qe(e);
|
|
1290
|
+
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1291
|
+
}, ha = ({
|
|
1292
1292
|
message: e
|
|
1293
1293
|
}) => {
|
|
1294
|
-
const t =
|
|
1294
|
+
const t = Ze(e);
|
|
1295
1295
|
if (t)
|
|
1296
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1297
|
-
const s =
|
|
1298
|
-
return s ? /* @__PURE__ */ n(
|
|
1299
|
-
},
|
|
1300
|
-
Creator:
|
|
1301
|
-
Visitor:
|
|
1302
|
-
}),
|
|
1296
|
+
return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
|
|
1297
|
+
const s = Qe(e);
|
|
1298
|
+
return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
|
|
1299
|
+
}, Ni = Object.assign(ua, {
|
|
1300
|
+
Creator: ma,
|
|
1301
|
+
Visitor: ha
|
|
1302
|
+
}), fa = {
|
|
1303
1303
|
isUnlocking: () => !1
|
|
1304
|
-
},
|
|
1305
|
-
LockedAttachment:
|
|
1306
|
-
},
|
|
1307
|
-
function
|
|
1308
|
-
return
|
|
1304
|
+
}, ga = {
|
|
1305
|
+
LockedAttachment: fa
|
|
1306
|
+
}, on = He({}), _i = on.Provider;
|
|
1307
|
+
function ba(e) {
|
|
1308
|
+
return Te(on)[e] ?? ga[e];
|
|
1309
1309
|
}
|
|
1310
|
-
const
|
|
1310
|
+
const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1311
1311
|
"svg",
|
|
1312
1312
|
{
|
|
1313
1313
|
width: e,
|
|
@@ -1324,29 +1324,29 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1324
1324
|
}
|
|
1325
1325
|
)
|
|
1326
1326
|
}
|
|
1327
|
-
),
|
|
1327
|
+
), va = (e) => {
|
|
1328
1328
|
var t;
|
|
1329
1329
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1330
|
-
},
|
|
1330
|
+
}, xa = (e) => {
|
|
1331
1331
|
var t;
|
|
1332
1332
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1333
|
-
},
|
|
1333
|
+
}, ke = (e) => {
|
|
1334
1334
|
var t;
|
|
1335
1335
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1336
|
-
},
|
|
1336
|
+
}, wa = (e) => {
|
|
1337
1337
|
var t;
|
|
1338
1338
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1339
|
-
},
|
|
1339
|
+
}, ln = (e) => va(e) || xa(e), Na = (e) => {
|
|
1340
1340
|
var t;
|
|
1341
|
-
return
|
|
1342
|
-
},
|
|
1341
|
+
return ln(e) && !((t = e.text) != null && t.trim());
|
|
1342
|
+
}, Oe = ({
|
|
1343
1343
|
message: e,
|
|
1344
1344
|
standalone: t = !1,
|
|
1345
1345
|
isMyMessage: s = !1,
|
|
1346
1346
|
hasAttachment: a = !1
|
|
1347
1347
|
}) => {
|
|
1348
1348
|
var u;
|
|
1349
|
-
const r =
|
|
1349
|
+
const r = ln(e), i = ke(e);
|
|
1350
1350
|
if (!r && !i)
|
|
1351
1351
|
return null;
|
|
1352
1352
|
if (r) {
|
|
@@ -1354,7 +1354,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1354
1354
|
if (!f) return null;
|
|
1355
1355
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1356
1356
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1357
|
-
/* @__PURE__ */ n(
|
|
1357
|
+
/* @__PURE__ */ n(ys, { size: t ? 14 : 12 }),
|
|
1358
1358
|
/* @__PURE__ */ n("span", { children: p })
|
|
1359
1359
|
] });
|
|
1360
1360
|
}
|
|
@@ -1362,7 +1362,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1362
1362
|
"message-chatbot-indicator",
|
|
1363
1363
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1364
1364
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1365
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(
|
|
1365
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(pa, { size: o ? 12 : 15 }) });
|
|
1366
1366
|
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
|
|
1367
1367
|
m,
|
|
1368
1368
|
g
|
|
@@ -1370,7 +1370,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1370
1370
|
g,
|
|
1371
1371
|
m
|
|
1372
1372
|
] }) });
|
|
1373
|
-
},
|
|
1373
|
+
}, _a = ({
|
|
1374
1374
|
selected: e,
|
|
1375
1375
|
onVoteUp: t,
|
|
1376
1376
|
onVoteDown: s
|
|
@@ -1379,32 +1379,32 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1379
1379
|
"button",
|
|
1380
1380
|
{
|
|
1381
1381
|
type: "button",
|
|
1382
|
-
className:
|
|
1382
|
+
className: C("message-vote-button focus-ring", {
|
|
1383
1383
|
"message-vote-button--selected": e === "up"
|
|
1384
1384
|
}),
|
|
1385
1385
|
onClick: t,
|
|
1386
1386
|
"aria-label": "Good response",
|
|
1387
1387
|
"aria-pressed": e === "up",
|
|
1388
1388
|
"data-tooltip": "Good response",
|
|
1389
|
-
children: /* @__PURE__ */ n(
|
|
1389
|
+
children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1390
1390
|
}
|
|
1391
1391
|
),
|
|
1392
1392
|
/* @__PURE__ */ n(
|
|
1393
1393
|
"button",
|
|
1394
1394
|
{
|
|
1395
1395
|
type: "button",
|
|
1396
|
-
className:
|
|
1396
|
+
className: C("message-vote-button focus-ring", {
|
|
1397
1397
|
"message-vote-button--selected": e === "down"
|
|
1398
1398
|
}),
|
|
1399
1399
|
onClick: s,
|
|
1400
1400
|
"aria-label": "Bad response",
|
|
1401
1401
|
"aria-pressed": e === "down",
|
|
1402
1402
|
"data-tooltip": "Bad response",
|
|
1403
|
-
children: /* @__PURE__ */ n(
|
|
1403
|
+
children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1404
1404
|
}
|
|
1405
1405
|
)
|
|
1406
|
-
] }),
|
|
1407
|
-
var
|
|
1406
|
+
] }), ya = (e) => {
|
|
1407
|
+
var gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It, St;
|
|
1408
1408
|
const {
|
|
1409
1409
|
additionalMessageInputProps: t,
|
|
1410
1410
|
chatbotVotingEnabled: s,
|
|
@@ -1422,57 +1422,57 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1422
1422
|
renderText: p,
|
|
1423
1423
|
threadList: N,
|
|
1424
1424
|
viewerLanguage: v
|
|
1425
|
-
} = e, { client: x } =
|
|
1426
|
-
Attachment: F =
|
|
1427
|
-
EditMessageModal: Z =
|
|
1428
|
-
MessageActions:
|
|
1429
|
-
MessageBlocked: G =
|
|
1430
|
-
MessageBouncePrompt:
|
|
1431
|
-
MessageDeleted: B =
|
|
1432
|
-
MessageIsThreadReplyInChannelButtonIndicator: H =
|
|
1433
|
-
MessageRepliesCountButton: Y =
|
|
1434
|
-
ReminderNotification: $ =
|
|
1435
|
-
StreamedMessageText: b =
|
|
1436
|
-
PinIndicator:
|
|
1437
|
-
} = Ut("CustomMessage"),
|
|
1425
|
+
} = e, { client: x } = qe("CustomMessage"), { channel: w } = ce("CustomMessage"), { isUnlocking: T, onUnlockClick: A, onFetchSource: S, onDownloadClick: M } = ba("LockedAttachment"), [E, _] = z(!1), k = Mn(c.id), { selected: I, voteUp: L, voteDown: V } = Us(c), {
|
|
1426
|
+
Attachment: F = Dn,
|
|
1427
|
+
EditMessageModal: Z = Rn,
|
|
1428
|
+
MessageActions: U,
|
|
1429
|
+
MessageBlocked: G = Ln,
|
|
1430
|
+
MessageBouncePrompt: O = Pn,
|
|
1431
|
+
MessageDeleted: B = On,
|
|
1432
|
+
MessageIsThreadReplyInChannelButtonIndicator: H = zn,
|
|
1433
|
+
MessageRepliesCountButton: Y = Fn,
|
|
1434
|
+
ReminderNotification: $ = $n,
|
|
1435
|
+
StreamedMessageText: b = Bn,
|
|
1436
|
+
PinIndicator: y
|
|
1437
|
+
} = Ut("CustomMessage"), P = jn(c), D = Vn(c), W = ne(
|
|
1438
1438
|
() => u == null ? void 0 : u(c),
|
|
1439
1439
|
[u, c]
|
|
1440
1440
|
), j = ne(() => {
|
|
1441
1441
|
const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1442
|
-
if (!
|
|
1443
|
-
const
|
|
1444
|
-
return
|
|
1442
|
+
if (!ke(c)) return _e;
|
|
1443
|
+
const Tt = _e.filter((At) => !("type" in At) || !sn(At));
|
|
1444
|
+
return Tt.length === _e.length ? _e : Tt;
|
|
1445
1445
|
}, [c]), K = ne(() => {
|
|
1446
|
-
const me =
|
|
1446
|
+
const me = Kt({ message: c, viewerLanguage: v });
|
|
1447
1447
|
return me === c.text ? c : { ...c, text: me };
|
|
1448
1448
|
}, [c, v]);
|
|
1449
1449
|
if (Un(c))
|
|
1450
1450
|
return null;
|
|
1451
1451
|
if (c.deleted_at || c.type === "deleted")
|
|
1452
1452
|
return /* @__PURE__ */ n(B, { message: c });
|
|
1453
|
-
if (
|
|
1453
|
+
if (Gn(c))
|
|
1454
1454
|
return /* @__PURE__ */ n(G, {});
|
|
1455
|
-
const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id,
|
|
1455
|
+
const ee = !N && !!c.reply_count, Q = !N && c.show_in_channel && c.parent_id, ct = c.status === "failed" && ((gt = c.error) == null ? void 0 : gt.status) !== 403, dt = Hn(c);
|
|
1456
1456
|
let ie;
|
|
1457
|
-
|
|
1458
|
-
const de = f(),
|
|
1457
|
+
ct ? ie = () => m(c) : dt && (ie = () => _(!0));
|
|
1458
|
+
const de = f(), En = C(
|
|
1459
1459
|
"str-chat__message str-chat__message-simple",
|
|
1460
1460
|
`str-chat__message--${c.type}`,
|
|
1461
1461
|
`str-chat__message--${c.status}`,
|
|
1462
1462
|
de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1463
1463
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1464
1464
|
{
|
|
1465
|
-
"str-chat__message--has-attachment":
|
|
1465
|
+
"str-chat__message--has-attachment": P,
|
|
1466
1466
|
"str-chat__message--highlighted": g,
|
|
1467
1467
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1468
|
-
"str-chat__message--with-reactions":
|
|
1469
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
1468
|
+
"str-chat__message--with-reactions": D,
|
|
1469
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((bt = c == null ? void 0 : c.error) == null ? void 0 : bt.status) !== 403,
|
|
1470
1470
|
"str-chat__message-with-thread-link": ee || Q,
|
|
1471
1471
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1472
1472
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1473
1473
|
"str-chat__virtual-message__wrapper--group": o
|
|
1474
1474
|
}
|
|
1475
|
-
),
|
|
1475
|
+
), ut = c.poll_id && x.polls.fromState(c.poll_id), mt = Na(c), ue = ke(c), ht = wa(c), De = !!(j != null && j.length && !c.quoted_message), ft = ue && de && De;
|
|
1476
1476
|
return /* @__PURE__ */ h(se, { children: [
|
|
1477
1477
|
a && /* @__PURE__ */ n(
|
|
1478
1478
|
Z,
|
|
@@ -1480,21 +1480,21 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1480
1480
|
additionalMessageInputProps: t
|
|
1481
1481
|
}
|
|
1482
1482
|
),
|
|
1483
|
-
|
|
1484
|
-
|
|
1483
|
+
E && /* @__PURE__ */ n(
|
|
1484
|
+
Yn,
|
|
1485
1485
|
{
|
|
1486
|
-
MessageBouncePrompt:
|
|
1487
|
-
onClose: () =>
|
|
1488
|
-
open:
|
|
1486
|
+
MessageBouncePrompt: O,
|
|
1487
|
+
onClose: () => _(!1),
|
|
1488
|
+
open: E
|
|
1489
1489
|
}
|
|
1490
1490
|
),
|
|
1491
1491
|
/* @__PURE__ */ h(
|
|
1492
1492
|
"div",
|
|
1493
1493
|
{
|
|
1494
|
-
className:
|
|
1494
|
+
className: En,
|
|
1495
1495
|
"data-message-id": c.id,
|
|
1496
1496
|
children: [
|
|
1497
|
-
|
|
1497
|
+
y && /* @__PURE__ */ n(y, {}),
|
|
1498
1498
|
!!k && /* @__PURE__ */ n($, { reminder: k }),
|
|
1499
1499
|
c.user && /* @__PURE__ */ n(
|
|
1500
1500
|
ae,
|
|
@@ -1511,8 +1511,8 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1511
1511
|
/* @__PURE__ */ n(
|
|
1512
1512
|
"div",
|
|
1513
1513
|
{
|
|
1514
|
-
className:
|
|
1515
|
-
"str-chat__simple-message--error-failed":
|
|
1514
|
+
className: C("str-chat__message-inner", {
|
|
1515
|
+
"str-chat__simple-message--error-failed": ct || dt
|
|
1516
1516
|
}),
|
|
1517
1517
|
"data-testid": "message-inner",
|
|
1518
1518
|
onClick: ie,
|
|
@@ -1525,60 +1525,60 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1525
1525
|
marginInlineEnd: 0,
|
|
1526
1526
|
marginInlineStart: 0
|
|
1527
1527
|
},
|
|
1528
|
-
children:
|
|
1528
|
+
children: ht ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1529
1529
|
de ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1530
|
-
|
|
1530
|
+
U && /* @__PURE__ */ n(U, {}),
|
|
1531
1531
|
/* @__PURE__ */ n(
|
|
1532
|
-
|
|
1532
|
+
Ft.Sent,
|
|
1533
1533
|
{
|
|
1534
|
-
title: (
|
|
1535
|
-
mimeType: (
|
|
1536
|
-
thumbnailUrl: (
|
|
1537
|
-
amountText: (
|
|
1538
|
-
detail: (
|
|
1539
|
-
paymentStatus: (
|
|
1540
|
-
onPreviewClick: () =>
|
|
1534
|
+
title: (pt = c.metadata) == null ? void 0 : pt.attachment_title,
|
|
1535
|
+
mimeType: (vt = c.metadata) == null ? void 0 : vt.attachment_mime_type,
|
|
1536
|
+
thumbnailUrl: (xt = c.metadata) == null ? void 0 : xt.attachment_thumbnail,
|
|
1537
|
+
amountText: (wt = c.metadata) == null ? void 0 : wt.amount_text,
|
|
1538
|
+
detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
|
|
1539
|
+
paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
|
|
1540
|
+
onPreviewClick: () => A == null ? void 0 : A(c, w),
|
|
1541
1541
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w))
|
|
1542
1542
|
}
|
|
1543
1543
|
)
|
|
1544
1544
|
] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
1545
1545
|
/* @__PURE__ */ n(
|
|
1546
|
-
|
|
1546
|
+
Ft.Received,
|
|
1547
1547
|
{
|
|
1548
|
-
title: (
|
|
1549
|
-
mimeType: (
|
|
1550
|
-
thumbnailUrl: (
|
|
1551
|
-
amountText: (
|
|
1552
|
-
detail: (
|
|
1553
|
-
paymentStatus: (
|
|
1554
|
-
isUnlocking:
|
|
1555
|
-
onUnlockClick: () =>
|
|
1548
|
+
title: (yt = c.metadata) == null ? void 0 : yt.attachment_title,
|
|
1549
|
+
mimeType: (Ct = c.metadata) == null ? void 0 : Ct.attachment_mime_type,
|
|
1550
|
+
thumbnailUrl: (kt = c.metadata) == null ? void 0 : kt.attachment_thumbnail,
|
|
1551
|
+
amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
|
|
1552
|
+
detail: (It = c.metadata) == null ? void 0 : It.attachment_detail,
|
|
1553
|
+
paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
|
|
1554
|
+
isUnlocking: T(c.id),
|
|
1555
|
+
onUnlockClick: () => A == null ? void 0 : A(c, w),
|
|
1556
1556
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
|
|
1557
|
-
onDownloadClick: () =>
|
|
1557
|
+
onDownloadClick: () => M == null ? void 0 : M(c, w)
|
|
1558
1558
|
}
|
|
1559
1559
|
),
|
|
1560
|
-
|
|
1560
|
+
U && /* @__PURE__ */ n(U, {})
|
|
1561
1561
|
] }),
|
|
1562
1562
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1563
|
-
|
|
1563
|
+
Mt,
|
|
1564
1564
|
{
|
|
1565
1565
|
message: K,
|
|
1566
1566
|
renderText: p
|
|
1567
1567
|
}
|
|
1568
1568
|
) })
|
|
1569
|
-
] }) :
|
|
1569
|
+
] }) : mt ? (
|
|
1570
1570
|
/* Tip-only messages render as a standalone bubble */
|
|
1571
|
-
/* @__PURE__ */ n(
|
|
1571
|
+
/* @__PURE__ */ n(Oe, { message: c, standalone: !0 })
|
|
1572
1572
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1573
|
-
ue && !
|
|
1574
|
-
|
|
1573
|
+
ue && !ft && /* @__PURE__ */ n(
|
|
1574
|
+
Oe,
|
|
1575
1575
|
{
|
|
1576
1576
|
message: c,
|
|
1577
|
-
hasAttachment:
|
|
1577
|
+
hasAttachment: De,
|
|
1578
1578
|
isMyMessage: de
|
|
1579
1579
|
}
|
|
1580
1580
|
),
|
|
1581
|
-
|
|
1581
|
+
ut && /* @__PURE__ */ n(qn, { poll: ut }),
|
|
1582
1582
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1583
1583
|
F,
|
|
1584
1584
|
{
|
|
@@ -1593,31 +1593,31 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1593
1593
|
renderText: p
|
|
1594
1594
|
}
|
|
1595
1595
|
) : /* @__PURE__ */ n(
|
|
1596
|
-
|
|
1596
|
+
Mt,
|
|
1597
1597
|
{
|
|
1598
1598
|
message: K,
|
|
1599
1599
|
renderText: p
|
|
1600
1600
|
}
|
|
1601
1601
|
),
|
|
1602
|
-
/* @__PURE__ */ n(
|
|
1602
|
+
/* @__PURE__ */ n(Wn, {})
|
|
1603
1603
|
] }) })
|
|
1604
1604
|
}
|
|
1605
1605
|
),
|
|
1606
|
-
!
|
|
1607
|
-
(!ue ||
|
|
1608
|
-
|
|
1606
|
+
!ht && !mt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1607
|
+
(!ue || ft) && /* @__PURE__ */ n(
|
|
1608
|
+
Oe,
|
|
1609
1609
|
{
|
|
1610
1610
|
message: c,
|
|
1611
|
-
hasAttachment:
|
|
1611
|
+
hasAttachment: De,
|
|
1612
1612
|
isMyMessage: de
|
|
1613
1613
|
}
|
|
1614
1614
|
),
|
|
1615
1615
|
s && ue && /* @__PURE__ */ n(
|
|
1616
|
-
|
|
1616
|
+
_a,
|
|
1617
1617
|
{
|
|
1618
|
-
selected:
|
|
1619
|
-
onVoteUp:
|
|
1620
|
-
onVoteDown:
|
|
1618
|
+
selected: I,
|
|
1619
|
+
onVoteUp: L,
|
|
1620
|
+
onVoteDown: V
|
|
1621
1621
|
}
|
|
1622
1622
|
)
|
|
1623
1623
|
] }),
|
|
@@ -1634,54 +1634,54 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1634
1634
|
c.id
|
|
1635
1635
|
)
|
|
1636
1636
|
] });
|
|
1637
|
-
},
|
|
1638
|
-
|
|
1639
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
1640
|
-
),
|
|
1637
|
+
}, Ca = R.memo(
|
|
1638
|
+
ya,
|
|
1639
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
1640
|
+
), ka = (e) => {
|
|
1641
1641
|
const t = be("CustomMessage");
|
|
1642
|
-
return /* @__PURE__ */ n(
|
|
1643
|
-
},
|
|
1642
|
+
return /* @__PURE__ */ n(Ca, { ...t, ...e });
|
|
1643
|
+
}, Ea = () => {
|
|
1644
1644
|
var s;
|
|
1645
1645
|
const { handleDelete: e, message: t } = be("CustomMessageActions");
|
|
1646
1646
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
1647
|
-
|
|
1647
|
+
qt,
|
|
1648
1648
|
{
|
|
1649
1649
|
onClick: e,
|
|
1650
1650
|
"aria-label": "Delete",
|
|
1651
1651
|
title: "Delete",
|
|
1652
1652
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1653
|
-
children: /* @__PURE__ */ n(
|
|
1653
|
+
children: /* @__PURE__ */ n(Es, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1654
1654
|
}
|
|
1655
1655
|
);
|
|
1656
|
-
},
|
|
1656
|
+
}, Ia = () => {
|
|
1657
1657
|
const { handleFlag: e } = be("CustomMessageActions");
|
|
1658
1658
|
return /* @__PURE__ */ n(
|
|
1659
|
-
|
|
1659
|
+
qt,
|
|
1660
1660
|
{
|
|
1661
1661
|
onClick: e,
|
|
1662
1662
|
"aria-label": "Report",
|
|
1663
1663
|
title: "Report",
|
|
1664
1664
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1665
|
-
children: /* @__PURE__ */ n(
|
|
1665
|
+
children: /* @__PURE__ */ n(Gt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1666
1666
|
}
|
|
1667
1667
|
);
|
|
1668
|
-
},
|
|
1668
|
+
}, Sa = () => {
|
|
1669
1669
|
var t;
|
|
1670
1670
|
const { message: e } = be("CustomMessageActions");
|
|
1671
1671
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1672
|
-
|
|
1672
|
+
Ds,
|
|
1673
1673
|
{
|
|
1674
1674
|
messageActionSet: [
|
|
1675
|
-
{ Component:
|
|
1676
|
-
{ Component:
|
|
1675
|
+
{ Component: Ea, placement: "quick", type: "delete" },
|
|
1676
|
+
{ Component: Ia, placement: "quick", type: "flag" }
|
|
1677
1677
|
]
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
|
-
},
|
|
1680
|
+
}, Ta = (e) => ({
|
|
1681
1681
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1682
|
-
(t) =>
|
|
1682
|
+
(t) => Pt.previewIsLoaded(t) || Pt.previewIsLoading(t)
|
|
1683
1683
|
)
|
|
1684
|
-
}),
|
|
1684
|
+
}), Aa = ({
|
|
1685
1685
|
link: e,
|
|
1686
1686
|
onDismiss: t
|
|
1687
1687
|
}) => {
|
|
@@ -1721,22 +1721,22 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1721
1721
|
]
|
|
1722
1722
|
}
|
|
1723
1723
|
);
|
|
1724
|
-
},
|
|
1725
|
-
const { linkPreviewsManager: e } =
|
|
1724
|
+
}, Ma = () => {
|
|
1725
|
+
const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
|
|
1726
1726
|
e.state,
|
|
1727
|
-
|
|
1727
|
+
Ta
|
|
1728
1728
|
), s = (r) => {
|
|
1729
1729
|
e.dismissPreview(r);
|
|
1730
1730
|
};
|
|
1731
1731
|
return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
|
|
1732
|
-
|
|
1732
|
+
Aa,
|
|
1733
1733
|
{
|
|
1734
1734
|
link: r,
|
|
1735
1735
|
onDismiss: s
|
|
1736
1736
|
},
|
|
1737
1737
|
r.og_scrape_url
|
|
1738
1738
|
)) }) : null;
|
|
1739
|
-
},
|
|
1739
|
+
}, cn = R.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1740
1740
|
"button",
|
|
1741
1741
|
{
|
|
1742
1742
|
...s,
|
|
@@ -1744,20 +1744,20 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1744
1744
|
"aria-label": "Send",
|
|
1745
1745
|
disabled: t,
|
|
1746
1746
|
onClick: e,
|
|
1747
|
-
children: /* @__PURE__ */ n(
|
|
1747
|
+
children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
|
|
1748
1748
|
}
|
|
1749
|
-
),
|
|
1750
|
-
const e =
|
|
1751
|
-
SendButton: r =
|
|
1752
|
-
AttachmentPreviewList: i =
|
|
1749
|
+
), Ra = () => {
|
|
1750
|
+
const e = Te(cn), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1751
|
+
SendButton: r = Da,
|
|
1752
|
+
AttachmentPreviewList: i = es
|
|
1753
1753
|
} = Ut("CustomMessageInput");
|
|
1754
1754
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1755
|
-
/* @__PURE__ */ n(
|
|
1756
|
-
/* @__PURE__ */ n(
|
|
1755
|
+
/* @__PURE__ */ n(ts, {}),
|
|
1756
|
+
/* @__PURE__ */ n(Ma, {}),
|
|
1757
1757
|
/* @__PURE__ */ n(i, {}),
|
|
1758
1758
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1759
1759
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
1760
|
-
|
|
1760
|
+
ns,
|
|
1761
1761
|
{
|
|
1762
1762
|
"aria-disabled": e || void 0,
|
|
1763
1763
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -1780,7 +1780,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1780
1780
|
)
|
|
1781
1781
|
] })
|
|
1782
1782
|
] });
|
|
1783
|
-
},
|
|
1783
|
+
}, La = ({
|
|
1784
1784
|
renderActions: e,
|
|
1785
1785
|
renderFooter: t,
|
|
1786
1786
|
disabled: s = !1,
|
|
@@ -1800,67 +1800,67 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1800
1800
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1801
1801
|
children: [
|
|
1802
1802
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1803
|
-
/* @__PURE__ */ n(
|
|
1803
|
+
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Ra }) })
|
|
1804
1804
|
]
|
|
1805
1805
|
}
|
|
1806
1806
|
),
|
|
1807
1807
|
t == null ? void 0 : t()
|
|
1808
1808
|
] });
|
|
1809
|
-
},
|
|
1809
|
+
}, Pa = [
|
|
1810
1810
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1811
1811
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1812
|
-
],
|
|
1812
|
+
], Oa = {
|
|
1813
1813
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1814
1814
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1815
|
-
},
|
|
1815
|
+
}, za = [
|
|
1816
1816
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1817
|
-
],
|
|
1817
|
+
], Fa = {
|
|
1818
1818
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1819
|
-
},
|
|
1819
|
+
}, ze = "age safety guidelines.", $a = "https://linktr.ee/s/about/contact", Bt = (e) => Pa.includes(e), Ba = (e) => za.includes(e), ja = (e) => {
|
|
1820
1820
|
var a;
|
|
1821
1821
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1822
|
-
if (
|
|
1822
|
+
if (Bt(t))
|
|
1823
1823
|
return {
|
|
1824
1824
|
kind: "dm-agent",
|
|
1825
1825
|
type: t
|
|
1826
1826
|
};
|
|
1827
|
-
if (
|
|
1827
|
+
if (Ba(t))
|
|
1828
1828
|
return {
|
|
1829
1829
|
kind: "age-safety",
|
|
1830
1830
|
type: t
|
|
1831
1831
|
};
|
|
1832
1832
|
const s = e.dm_agent_system_type;
|
|
1833
|
-
if (
|
|
1833
|
+
if (Bt(s))
|
|
1834
1834
|
return {
|
|
1835
1835
|
kind: "dm-agent",
|
|
1836
1836
|
type: s
|
|
1837
1837
|
};
|
|
1838
|
-
},
|
|
1839
|
-
const t = e.indexOf(
|
|
1838
|
+
}, Va = (e) => {
|
|
1839
|
+
const t = e.indexOf(ze);
|
|
1840
1840
|
if (t === -1)
|
|
1841
1841
|
return e;
|
|
1842
|
-
const s = t +
|
|
1842
|
+
const s = t + ze.length;
|
|
1843
1843
|
return /* @__PURE__ */ h(se, { children: [
|
|
1844
1844
|
e.slice(0, t),
|
|
1845
1845
|
/* @__PURE__ */ n(
|
|
1846
1846
|
"a",
|
|
1847
1847
|
{
|
|
1848
|
-
href:
|
|
1848
|
+
href: $a,
|
|
1849
1849
|
target: "_blank",
|
|
1850
1850
|
rel: "noopener noreferrer",
|
|
1851
1851
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
1852
|
-
children:
|
|
1852
|
+
children: ze
|
|
1853
1853
|
}
|
|
1854
1854
|
),
|
|
1855
1855
|
e.slice(s)
|
|
1856
1856
|
] });
|
|
1857
1857
|
}, Ua = (e) => {
|
|
1858
1858
|
var a, r;
|
|
1859
|
-
const t = e.message.hide_date === !0, s =
|
|
1859
|
+
const t = e.message.hide_date === !0, s = ja(
|
|
1860
1860
|
e.message
|
|
1861
1861
|
);
|
|
1862
1862
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1863
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1863
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Oa[s.type];
|
|
1864
1864
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1865
1865
|
/* @__PURE__ */ h(
|
|
1866
1866
|
"div",
|
|
@@ -1870,7 +1870,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1870
1870
|
"data-dm-agent-system-type": s.type,
|
|
1871
1871
|
children: [
|
|
1872
1872
|
/* @__PURE__ */ n(
|
|
1873
|
-
|
|
1873
|
+
Ve,
|
|
1874
1874
|
{
|
|
1875
1875
|
size: 16,
|
|
1876
1876
|
weight: "regular",
|
|
@@ -1882,11 +1882,11 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1882
1882
|
]
|
|
1883
1883
|
}
|
|
1884
1884
|
),
|
|
1885
|
-
!t && /* @__PURE__ */ n(
|
|
1885
|
+
!t && /* @__PURE__ */ n(Re, { message: e.message })
|
|
1886
1886
|
] });
|
|
1887
1887
|
}
|
|
1888
1888
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
1889
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
1889
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
|
|
1890
1890
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1891
1891
|
/* @__PURE__ */ h(
|
|
1892
1892
|
"div",
|
|
@@ -1896,7 +1896,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1896
1896
|
"data-age-safety-system-type": s.type,
|
|
1897
1897
|
children: [
|
|
1898
1898
|
/* @__PURE__ */ n(
|
|
1899
|
-
|
|
1899
|
+
Ss,
|
|
1900
1900
|
{
|
|
1901
1901
|
size: 24,
|
|
1902
1902
|
weight: "duotone",
|
|
@@ -1905,11 +1905,11 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1905
1905
|
"data-testid": "age-safety-system-message-icon"
|
|
1906
1906
|
}
|
|
1907
1907
|
),
|
|
1908
|
-
/* @__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:
|
|
1908
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Va(i) }) })
|
|
1909
1909
|
]
|
|
1910
1910
|
}
|
|
1911
1911
|
),
|
|
1912
|
-
!t && /* @__PURE__ */ n(
|
|
1912
|
+
!t && /* @__PURE__ */ n(Re, { message: e.message })
|
|
1913
1913
|
] });
|
|
1914
1914
|
}
|
|
1915
1915
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -1918,9 +1918,9 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1918
1918
|
/* @__PURE__ */ n("p", { children: e.message.text }),
|
|
1919
1919
|
/* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
|
|
1920
1920
|
] }),
|
|
1921
|
-
!t && /* @__PURE__ */ n(
|
|
1921
|
+
!t && /* @__PURE__ */ n(Re, { message: e.message })
|
|
1922
1922
|
] });
|
|
1923
|
-
},
|
|
1923
|
+
}, dn = He(!1), Fe = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1924
1924
|
"animateTransform",
|
|
1925
1925
|
{
|
|
1926
1926
|
attributeName: "transform",
|
|
@@ -1930,17 +1930,17 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1930
1930
|
begin: `${120 * t}ms`,
|
|
1931
1931
|
repeatCount: "indefinite"
|
|
1932
1932
|
}
|
|
1933
|
-
) }),
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
]),
|
|
1933
|
+
) }), Ga = /* @__PURE__ */ new Set([
|
|
1934
|
+
Le.Thinking,
|
|
1935
|
+
Le.Generating,
|
|
1936
|
+
Le.ExternalSources
|
|
1937
|
+
]), Ha = ({ threadList: e }) => {
|
|
1938
1938
|
var p, N;
|
|
1939
|
-
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } =
|
|
1940
|
-
if (!e && l &&
|
|
1941
|
-
const v =
|
|
1939
|
+
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = qe(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(dn);
|
|
1940
|
+
if (!e && l && Ga.has(o)) {
|
|
1941
|
+
const v = Ya(t, (p = r.user) == null ? void 0 : p.id);
|
|
1942
1942
|
return /* @__PURE__ */ n(
|
|
1943
|
-
|
|
1943
|
+
jt,
|
|
1944
1944
|
{
|
|
1945
1945
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
1946
1946
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -1966,7 +1966,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1966
1966
|
return null;
|
|
1967
1967
|
const f = (N = u[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
1968
1968
|
return /* @__PURE__ */ n(
|
|
1969
|
-
|
|
1969
|
+
jt,
|
|
1970
1970
|
{
|
|
1971
1971
|
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
1972
1972
|
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
@@ -1974,7 +1974,7 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1974
1974
|
testId: "typing-indicator"
|
|
1975
1975
|
}
|
|
1976
1976
|
);
|
|
1977
|
-
},
|
|
1977
|
+
}, jt = ({
|
|
1978
1978
|
avatarId: e,
|
|
1979
1979
|
avatarName: t,
|
|
1980
1980
|
avatarImage: s,
|
|
@@ -2006,16 +2006,16 @@ const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2006
2006
|
height: "8",
|
|
2007
2007
|
overflow: "visible",
|
|
2008
2008
|
children: [
|
|
2009
|
-
/* @__PURE__ */ n(
|
|
2010
|
-
/* @__PURE__ */ n(
|
|
2011
|
-
/* @__PURE__ */ n(
|
|
2009
|
+
/* @__PURE__ */ n(Fe, { cx: "4", index: 0 }),
|
|
2010
|
+
/* @__PURE__ */ n(Fe, { cx: "16", index: 1 }),
|
|
2011
|
+
/* @__PURE__ */ n(Fe, { cx: "28", index: 2 })
|
|
2012
2012
|
]
|
|
2013
2013
|
}
|
|
2014
2014
|
) })
|
|
2015
2015
|
]
|
|
2016
2016
|
}
|
|
2017
2017
|
);
|
|
2018
|
-
function
|
|
2018
|
+
function Ya(e, t) {
|
|
2019
2019
|
var a;
|
|
2020
2020
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2021
2021
|
for (const r of Object.values(s)) {
|
|
@@ -2024,10 +2024,10 @@ function Ha(e, t) {
|
|
|
2024
2024
|
return i;
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
const
|
|
2027
|
+
const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2028
2028
|
"div",
|
|
2029
2029
|
{
|
|
2030
|
-
className:
|
|
2030
|
+
className: C("flex items-center justify-center h-full", e),
|
|
2031
2031
|
children: [
|
|
2032
2032
|
/* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
2033
2033
|
/* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
|
|
@@ -2067,12 +2067,12 @@ const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2067
2067
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2068
2068
|
]
|
|
2069
2069
|
}
|
|
2070
|
-
),
|
|
2071
|
-
/* @__PURE__ */ n(
|
|
2070
|
+
), Ee = R.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2071
|
+
/* @__PURE__ */ n(Wa, { className: "w-6 h-6" }),
|
|
2072
2072
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2073
2073
|
] }) }));
|
|
2074
|
-
|
|
2075
|
-
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring",
|
|
2074
|
+
Ee.displayName = "LoadingState";
|
|
2075
|
+
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", Xa = ({
|
|
2076
2076
|
onBack: e,
|
|
2077
2077
|
showBackButton: t,
|
|
2078
2078
|
onShowInfo: s,
|
|
@@ -2081,16 +2081,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2081
2081
|
dmAgentEnabled: i = !1
|
|
2082
2082
|
}) => {
|
|
2083
2083
|
var f, c, p, N, v;
|
|
2084
|
-
const { channel: o } = ce(), l =
|
|
2085
|
-
var
|
|
2086
|
-
const x = (
|
|
2087
|
-
return x ? Object.values(((
|
|
2084
|
+
const { channel: o } = ce(), l = R.useMemo(() => {
|
|
2085
|
+
var T, A;
|
|
2086
|
+
const x = (T = o._client) == null ? void 0 : T.userID;
|
|
2087
|
+
return x ? Object.values(((A = o.state) == null ? void 0 : A.members) || {}).find(
|
|
2088
2088
|
(S) => {
|
|
2089
|
-
var
|
|
2090
|
-
return ((
|
|
2089
|
+
var M;
|
|
2090
|
+
return ((M = S.user) == null ? void 0 : M.id) && S.user.id !== x;
|
|
2091
2091
|
}
|
|
2092
2092
|
) : void 0;
|
|
2093
|
-
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d =
|
|
2093
|
+
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Ae(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g = Xt(o), u = async () => {
|
|
2094
2094
|
try {
|
|
2095
2095
|
g ? await o.unpin() : await o.pin();
|
|
2096
2096
|
} catch (x) {
|
|
@@ -2105,7 +2105,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2105
2105
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
|
|
2106
2106
|
"button",
|
|
2107
2107
|
{
|
|
2108
|
-
className:
|
|
2108
|
+
className: C(
|
|
2109
2109
|
oe,
|
|
2110
2110
|
"messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
|
|
2111
2111
|
),
|
|
@@ -2113,7 +2113,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2113
2113
|
}),
|
|
2114
2114
|
type: "button",
|
|
2115
2115
|
"aria-label": "Back to conversations",
|
|
2116
|
-
children: /* @__PURE__ */ n(
|
|
2116
|
+
children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
|
|
2117
2117
|
}
|
|
2118
2118
|
) }),
|
|
2119
2119
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
@@ -2130,8 +2130,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2130
2130
|
),
|
|
2131
2131
|
/* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: d }),
|
|
2132
2132
|
i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2133
|
-
/* @__PURE__ */ n(
|
|
2134
|
-
/* @__PURE__ */ n("span", { children:
|
|
2133
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
|
|
2134
|
+
/* @__PURE__ */ n("span", { children: Vt })
|
|
2135
2135
|
] })
|
|
2136
2136
|
] }),
|
|
2137
2137
|
/* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
|
|
@@ -2143,9 +2143,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2143
2143
|
type: "button",
|
|
2144
2144
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2145
2145
|
children: /* @__PURE__ */ n(
|
|
2146
|
-
|
|
2146
|
+
Be,
|
|
2147
2147
|
{
|
|
2148
|
-
className:
|
|
2148
|
+
className: C("size-5", {
|
|
2149
2149
|
"text-yellow-600": g,
|
|
2150
2150
|
"text-black/90": !g
|
|
2151
2151
|
}),
|
|
@@ -2157,11 +2157,11 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2157
2157
|
/* @__PURE__ */ n(
|
|
2158
2158
|
"button",
|
|
2159
2159
|
{
|
|
2160
|
-
className:
|
|
2160
|
+
className: C(oe, "bg-[#F1F0EE]"),
|
|
2161
2161
|
onClick: s,
|
|
2162
2162
|
type: "button",
|
|
2163
2163
|
"aria-label": "Show info",
|
|
2164
|
-
children: /* @__PURE__ */ n(
|
|
2164
|
+
children: /* @__PURE__ */ n(Lt, { className: "size-5 text-black/90" })
|
|
2165
2165
|
}
|
|
2166
2166
|
)
|
|
2167
2167
|
] })
|
|
@@ -2171,14 +2171,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2171
2171
|
t && e && /* @__PURE__ */ n(
|
|
2172
2172
|
"button",
|
|
2173
2173
|
{
|
|
2174
|
-
className:
|
|
2174
|
+
className: C(
|
|
2175
2175
|
oe,
|
|
2176
2176
|
"messaging-channel-view-back-button-desktop"
|
|
2177
2177
|
),
|
|
2178
2178
|
type: "button",
|
|
2179
2179
|
onClick: e,
|
|
2180
2180
|
"aria-label": "Back to conversations",
|
|
2181
|
-
children: /* @__PURE__ */ n(
|
|
2181
|
+
children: /* @__PURE__ */ n(Rt, { className: "size-5 text-black/90" })
|
|
2182
2182
|
}
|
|
2183
2183
|
),
|
|
2184
2184
|
/* @__PURE__ */ n(
|
|
@@ -2204,8 +2204,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2204
2204
|
}
|
|
2205
2205
|
) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
|
|
2206
2206
|
i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2207
|
-
/* @__PURE__ */ n(
|
|
2208
|
-
/* @__PURE__ */ n("span", { className: "truncate", children:
|
|
2207
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
|
|
2208
|
+
/* @__PURE__ */ n("span", { className: "truncate", children: Vt })
|
|
2209
2209
|
] })
|
|
2210
2210
|
] })
|
|
2211
2211
|
] }),
|
|
@@ -2218,9 +2218,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2218
2218
|
type: "button",
|
|
2219
2219
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2220
2220
|
children: /* @__PURE__ */ n(
|
|
2221
|
-
|
|
2221
|
+
Be,
|
|
2222
2222
|
{
|
|
2223
|
-
className:
|
|
2223
|
+
className: C("size-6", {
|
|
2224
2224
|
"text-yellow-600": g,
|
|
2225
2225
|
"text-black/90": !g
|
|
2226
2226
|
}),
|
|
@@ -2236,13 +2236,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2236
2236
|
onClick: s,
|
|
2237
2237
|
type: "button",
|
|
2238
2238
|
"aria-label": "Show info",
|
|
2239
|
-
children: /* @__PURE__ */ n(
|
|
2239
|
+
children: /* @__PURE__ */ n(Lt, { className: "size-6 text-black/90" })
|
|
2240
2240
|
}
|
|
2241
2241
|
)
|
|
2242
2242
|
] })
|
|
2243
2243
|
] })
|
|
2244
2244
|
] });
|
|
2245
|
-
},
|
|
2245
|
+
}, Ka = ({
|
|
2246
2246
|
onBack: e,
|
|
2247
2247
|
showBackButton: t,
|
|
2248
2248
|
renderMessageInputActions: s,
|
|
@@ -2262,93 +2262,93 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2262
2262
|
showStarButton: v = !1,
|
|
2263
2263
|
chatbotVotingEnabled: x = !1,
|
|
2264
2264
|
renderChannelBanner: w,
|
|
2265
|
-
customProfileContent:
|
|
2266
|
-
customChannelActions:
|
|
2265
|
+
customProfileContent: T,
|
|
2266
|
+
customChannelActions: A,
|
|
2267
2267
|
renderMessage: S,
|
|
2268
|
-
dmAgentEnabled:
|
|
2269
|
-
viewerLanguage:
|
|
2268
|
+
dmAgentEnabled: M = !1,
|
|
2269
|
+
viewerLanguage: E
|
|
2270
2270
|
}) => {
|
|
2271
|
-
var H, Y, $, b,
|
|
2272
|
-
const { channel:
|
|
2271
|
+
var H, Y, $, b, y, P;
|
|
2272
|
+
const { channel: _ } = ce(), k = X(null), I = R.useMemo(() => {
|
|
2273
2273
|
var j, K;
|
|
2274
|
-
const
|
|
2275
|
-
return
|
|
2274
|
+
const D = (j = _._client) == null ? void 0 : j.userID;
|
|
2275
|
+
return D ? Object.values(((K = _.state) == null ? void 0 : K.members) || {}).find(
|
|
2276
2276
|
(ee) => {
|
|
2277
2277
|
var Q;
|
|
2278
|
-
return ((Q = ee.user) == null ? void 0 : Q.id) && ee.user.id !==
|
|
2278
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) && ee.user.id !== D;
|
|
2279
2279
|
}
|
|
2280
2280
|
) : void 0;
|
|
2281
|
-
}, [(H =
|
|
2281
|
+
}, [(H = _._client) == null ? void 0 : H.userID, (Y = _.state) == null ? void 0 : Y.members]), L = R.useMemo(() => {
|
|
2282
2282
|
var j, K;
|
|
2283
|
-
const
|
|
2284
|
-
return
|
|
2283
|
+
const D = (j = _._client) == null ? void 0 : j.userID;
|
|
2284
|
+
return D ? Object.values(((K = _.state) == null ? void 0 : K.members) || {}).find((ee) => {
|
|
2285
2285
|
var Q;
|
|
2286
|
-
return ((Q = ee.user) == null ? void 0 : Q.id) ===
|
|
2286
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) === D;
|
|
2287
2287
|
}) : void 0;
|
|
2288
|
-
}, [($ =
|
|
2288
|
+
}, [($ = _._client) == null ? void 0 : $.userID, (b = _.state) == null ? void 0 : b.members]), V = ((y = L == null ? void 0 : L.user) == null ? void 0 : y.is_account) ?? (L == null ? void 0 : L.is_account), F = ((P = I == null ? void 0 : I.user) == null ? void 0 : P.is_account) ?? (I == null ? void 0 : I.is_account), Z = M && V === !1 && F === !0, U = R.useMemo(() => {
|
|
2289
2289
|
if (!c) return;
|
|
2290
|
-
const
|
|
2291
|
-
if (
|
|
2292
|
-
return String(
|
|
2293
|
-
if (
|
|
2294
|
-
return
|
|
2295
|
-
}, [
|
|
2296
|
-
var
|
|
2297
|
-
(
|
|
2298
|
-
}, []),
|
|
2299
|
-
var
|
|
2300
|
-
(
|
|
2290
|
+
const D = _.data ?? {};
|
|
2291
|
+
if (D.followerStatus)
|
|
2292
|
+
return String(D.followerStatus);
|
|
2293
|
+
if (D.isFollower !== void 0)
|
|
2294
|
+
return D.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
2295
|
+
}, [_.data, c]), G = q(() => {
|
|
2296
|
+
var D;
|
|
2297
|
+
(D = k.current) == null || D.showModal();
|
|
2298
|
+
}, []), O = q(() => {
|
|
2299
|
+
var D;
|
|
2300
|
+
(D = k.current) == null || D.close();
|
|
2301
2301
|
}, []), B = q(
|
|
2302
|
-
(
|
|
2302
|
+
(D) => {
|
|
2303
2303
|
const { message: W } = be("ChannelView"), j = /* @__PURE__ */ n(
|
|
2304
|
-
|
|
2304
|
+
ka,
|
|
2305
2305
|
{
|
|
2306
|
-
...
|
|
2306
|
+
...D,
|
|
2307
2307
|
chatbotVotingEnabled: x,
|
|
2308
|
-
viewerLanguage:
|
|
2308
|
+
viewerLanguage: E
|
|
2309
2309
|
}
|
|
2310
2310
|
);
|
|
2311
2311
|
return !S || !W ? j : S(j, W);
|
|
2312
2312
|
},
|
|
2313
|
-
[x, S,
|
|
2313
|
+
[x, S, E]
|
|
2314
2314
|
);
|
|
2315
2315
|
return /* @__PURE__ */ h(se, { children: [
|
|
2316
2316
|
/* @__PURE__ */ n(
|
|
2317
|
-
|
|
2317
|
+
is,
|
|
2318
2318
|
{
|
|
2319
2319
|
overrides: {
|
|
2320
2320
|
Message: B,
|
|
2321
|
-
MessageActions:
|
|
2321
|
+
MessageActions: Sa
|
|
2322
2322
|
},
|
|
2323
|
-
children: /* @__PURE__ */ h(
|
|
2323
|
+
children: /* @__PURE__ */ h(os, { children: [
|
|
2324
2324
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2325
|
-
|
|
2325
|
+
Xa,
|
|
2326
2326
|
{
|
|
2327
2327
|
onBack: e,
|
|
2328
2328
|
showBackButton: t,
|
|
2329
2329
|
onShowInfo: G,
|
|
2330
|
-
canShowInfo: !!
|
|
2330
|
+
canShowInfo: !!I,
|
|
2331
2331
|
showStarButton: v,
|
|
2332
2332
|
dmAgentEnabled: Z
|
|
2333
2333
|
}
|
|
2334
2334
|
) }, "lt-channel-header"),
|
|
2335
|
-
w ? /* @__PURE__ */ n(
|
|
2335
|
+
w ? /* @__PURE__ */ n(R.Fragment, { children: w() }, "lt-channel-banner") : null,
|
|
2336
2336
|
/* @__PURE__ */ n(
|
|
2337
2337
|
"div",
|
|
2338
2338
|
{
|
|
2339
2339
|
className: "flex-1 overflow-hidden relative",
|
|
2340
|
-
children: /* @__PURE__ */ n(
|
|
2340
|
+
children: /* @__PURE__ */ n(ls, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
|
|
2341
2341
|
},
|
|
2342
2342
|
"lt-channel-message-list"
|
|
2343
2343
|
),
|
|
2344
|
-
r ? /* @__PURE__ */ n(
|
|
2344
|
+
r ? /* @__PURE__ */ n(R.Fragment, { children: r(_) }, "lt-channel-conversation-footer") : null,
|
|
2345
2345
|
/* @__PURE__ */ n(
|
|
2346
|
-
|
|
2346
|
+
La,
|
|
2347
2347
|
{
|
|
2348
2348
|
...s && {
|
|
2349
|
-
renderActions: () => s == null ? void 0 : s(
|
|
2349
|
+
renderActions: () => s == null ? void 0 : s(_)
|
|
2350
2350
|
},
|
|
2351
|
-
renderFooter: () => a == null ? void 0 : a(
|
|
2351
|
+
renderFooter: () => a == null ? void 0 : a(_),
|
|
2352
2352
|
disabled: p,
|
|
2353
2353
|
disabledReason: N
|
|
2354
2354
|
},
|
|
@@ -2358,16 +2358,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2358
2358
|
}
|
|
2359
2359
|
),
|
|
2360
2360
|
/* @__PURE__ */ n(
|
|
2361
|
-
|
|
2361
|
+
Bs,
|
|
2362
2362
|
{
|
|
2363
2363
|
dialogRef: k,
|
|
2364
|
-
onClose:
|
|
2365
|
-
participant:
|
|
2366
|
-
participantDisplayName:
|
|
2367
|
-
|
|
2364
|
+
onClose: O,
|
|
2365
|
+
participant: I,
|
|
2366
|
+
participantDisplayName: Ae(
|
|
2367
|
+
I == null ? void 0 : I.user
|
|
2368
2368
|
),
|
|
2369
|
-
channel:
|
|
2370
|
-
followerStatusLabel:
|
|
2369
|
+
channel: _,
|
|
2370
|
+
followerStatusLabel: U,
|
|
2371
2371
|
onLeaveConversation: i,
|
|
2372
2372
|
onBlockParticipant: o,
|
|
2373
2373
|
showDeleteConversation: l,
|
|
@@ -2376,12 +2376,12 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2376
2376
|
onDeleteConversationClick: d,
|
|
2377
2377
|
onBlockParticipantClick: m,
|
|
2378
2378
|
onReportParticipantClick: g,
|
|
2379
|
-
customProfileContent:
|
|
2380
|
-
customChannelActions:
|
|
2379
|
+
customProfileContent: T,
|
|
2380
|
+
customChannelActions: A
|
|
2381
2381
|
}
|
|
2382
2382
|
)
|
|
2383
2383
|
] });
|
|
2384
|
-
},
|
|
2384
|
+
}, un = R.memo(
|
|
2385
2385
|
({
|
|
2386
2386
|
channel: e,
|
|
2387
2387
|
onBack: t,
|
|
@@ -2392,7 +2392,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2392
2392
|
onLeaveConversation: o,
|
|
2393
2393
|
onBlockParticipant: l,
|
|
2394
2394
|
className: d,
|
|
2395
|
-
CustomChannelEmptyState: m =
|
|
2395
|
+
CustomChannelEmptyState: m = qa,
|
|
2396
2396
|
showDeleteConversation: g = !0,
|
|
2397
2397
|
onDeleteConversationClick: u,
|
|
2398
2398
|
onBlockParticipantClick: f,
|
|
@@ -2402,73 +2402,73 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2402
2402
|
showFollowerStatus: v = !0,
|
|
2403
2403
|
composerDisabled: x = !1,
|
|
2404
2404
|
composerDisabledReason: w,
|
|
2405
|
-
dmAgentEnabled:
|
|
2406
|
-
messageMetadata:
|
|
2405
|
+
dmAgentEnabled: T,
|
|
2406
|
+
messageMetadata: A,
|
|
2407
2407
|
onMessageSent: S,
|
|
2408
|
-
showStarButton:
|
|
2409
|
-
chatbotVotingEnabled:
|
|
2410
|
-
renderChannelBanner:
|
|
2408
|
+
showStarButton: M = !1,
|
|
2409
|
+
chatbotVotingEnabled: E = !1,
|
|
2410
|
+
renderChannelBanner: _,
|
|
2411
2411
|
customProfileContent: k,
|
|
2412
|
-
customChannelActions:
|
|
2413
|
-
renderMessage:
|
|
2414
|
-
onMessageLinkClick:
|
|
2412
|
+
customChannelActions: I,
|
|
2413
|
+
renderMessage: L,
|
|
2414
|
+
onMessageLinkClick: V,
|
|
2415
2415
|
sendButton: F,
|
|
2416
2416
|
attachmentPreviewList: Z,
|
|
2417
|
-
viewerLanguage:
|
|
2417
|
+
viewerLanguage: U
|
|
2418
2418
|
}) => {
|
|
2419
2419
|
const G = q(
|
|
2420
2420
|
async (B, H, Y) => {
|
|
2421
2421
|
var W;
|
|
2422
|
-
const $ = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, b =
|
|
2422
|
+
const $ = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, b = T && !$, y = {
|
|
2423
2423
|
...H,
|
|
2424
2424
|
...b && { silent: !0 },
|
|
2425
|
-
...
|
|
2425
|
+
...A && {
|
|
2426
2426
|
metadata: {
|
|
2427
2427
|
...H.metadata ?? {},
|
|
2428
|
-
...
|
|
2428
|
+
...A
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
|
-
},
|
|
2431
|
+
}, P = {
|
|
2432
2432
|
...Y,
|
|
2433
2433
|
...b && { skip_push: !0 }
|
|
2434
|
-
},
|
|
2435
|
-
return S == null || S(
|
|
2434
|
+
}, D = await e.sendMessage(y, P);
|
|
2435
|
+
return S == null || S(D), D;
|
|
2436
2436
|
},
|
|
2437
|
-
[e,
|
|
2438
|
-
),
|
|
2437
|
+
[e, T, A, S]
|
|
2438
|
+
), O = X(null);
|
|
2439
2439
|
return J(() => {
|
|
2440
|
-
if (!
|
|
2441
|
-
const B =
|
|
2440
|
+
if (!V) return;
|
|
2441
|
+
const B = O.current;
|
|
2442
2442
|
if (!B) return;
|
|
2443
2443
|
const H = (Y) => {
|
|
2444
|
-
const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"),
|
|
2445
|
-
if (!
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2444
|
+
const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"), y = b == null ? void 0 : b.getAttribute("href");
|
|
2445
|
+
if (!y) return;
|
|
2446
|
+
const P = b == null ? void 0 : b.closest("[data-message-id]"), D = P == null ? void 0 : P.getAttribute("data-message-id"), W = D ? e.state.messages.find((j) => j.id === D) : void 0;
|
|
2447
|
+
V(y, W);
|
|
2448
2448
|
};
|
|
2449
2449
|
return B.addEventListener("click", H), () => B.removeEventListener("click", H);
|
|
2450
|
-
}, [
|
|
2450
|
+
}, [V, e]), /* @__PURE__ */ n(
|
|
2451
2451
|
"div",
|
|
2452
2452
|
{
|
|
2453
|
-
ref:
|
|
2454
|
-
className:
|
|
2453
|
+
ref: O,
|
|
2454
|
+
className: C(
|
|
2455
2455
|
"messaging-channel-view h-full flex flex-col",
|
|
2456
2456
|
d
|
|
2457
2457
|
),
|
|
2458
|
-
children: /* @__PURE__ */ n(
|
|
2459
|
-
|
|
2458
|
+
children: /* @__PURE__ */ n(dn.Provider, { value: T ?? !1, children: /* @__PURE__ */ n(
|
|
2459
|
+
rs,
|
|
2460
2460
|
{
|
|
2461
2461
|
channel: e,
|
|
2462
2462
|
MessageSystem: Ua,
|
|
2463
2463
|
EmptyStateIndicator: m,
|
|
2464
|
-
LoadingIndicator:
|
|
2465
|
-
DateSeparator:
|
|
2466
|
-
TypingIndicator:
|
|
2464
|
+
LoadingIndicator: Ee,
|
|
2465
|
+
DateSeparator: js,
|
|
2466
|
+
TypingIndicator: Ha,
|
|
2467
2467
|
doSendMessageRequest: G,
|
|
2468
2468
|
...F ? { SendButton: F } : {},
|
|
2469
2469
|
...Z ? { AttachmentPreviewList: Z } : {},
|
|
2470
2470
|
children: /* @__PURE__ */ n(
|
|
2471
|
-
|
|
2471
|
+
Ka,
|
|
2472
2472
|
{
|
|
2473
2473
|
onBack: t,
|
|
2474
2474
|
showBackButton: s,
|
|
@@ -2487,14 +2487,14 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2487
2487
|
showFollowerStatus: v,
|
|
2488
2488
|
composerDisabled: x,
|
|
2489
2489
|
composerDisabledReason: w,
|
|
2490
|
-
showStarButton:
|
|
2491
|
-
dmAgentEnabled:
|
|
2492
|
-
chatbotVotingEnabled:
|
|
2493
|
-
renderChannelBanner:
|
|
2490
|
+
showStarButton: M,
|
|
2491
|
+
dmAgentEnabled: T,
|
|
2492
|
+
chatbotVotingEnabled: E,
|
|
2493
|
+
renderChannelBanner: _,
|
|
2494
2494
|
customProfileContent: k,
|
|
2495
|
-
customChannelActions:
|
|
2496
|
-
renderMessage:
|
|
2497
|
-
viewerLanguage:
|
|
2495
|
+
customChannelActions: I,
|
|
2496
|
+
renderMessage: L,
|
|
2497
|
+
viewerLanguage: U
|
|
2498
2498
|
}
|
|
2499
2499
|
)
|
|
2500
2500
|
}
|
|
@@ -2503,8 +2503,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2503
2503
|
);
|
|
2504
2504
|
}
|
|
2505
2505
|
);
|
|
2506
|
-
|
|
2507
|
-
const he =
|
|
2506
|
+
un.displayName = "ChannelView";
|
|
2507
|
+
const he = R.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2508
2508
|
/* @__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: "⚠️" }) }),
|
|
2509
2509
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2510
2510
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2519,7 +2519,7 @@ const he = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2519
2519
|
)
|
|
2520
2520
|
] }) }));
|
|
2521
2521
|
he.displayName = "ErrorState";
|
|
2522
|
-
const
|
|
2522
|
+
const yi = ({
|
|
2523
2523
|
capabilities: e = {},
|
|
2524
2524
|
renderMessageInputActions: t,
|
|
2525
2525
|
renderConversationFooter: s,
|
|
@@ -2541,33 +2541,33 @@ const _i = ({
|
|
|
2541
2541
|
}) => {
|
|
2542
2542
|
const {
|
|
2543
2543
|
client: w,
|
|
2544
|
-
isConnected:
|
|
2545
|
-
isLoading:
|
|
2544
|
+
isConnected: T,
|
|
2545
|
+
isLoading: A,
|
|
2546
2546
|
error: S,
|
|
2547
|
-
refreshConnection:
|
|
2548
|
-
service:
|
|
2549
|
-
debug:
|
|
2550
|
-
} =
|
|
2547
|
+
refreshConnection: M,
|
|
2548
|
+
service: E,
|
|
2549
|
+
debug: _
|
|
2550
|
+
} = Rs(), [k, I] = z(null), [L, V] = z(null), [F, Z] = z(!1), { showDeleteConversation: U = !0 } = e, G = X(o);
|
|
2551
2551
|
G.current = o;
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2552
|
+
const O = X(a);
|
|
2553
|
+
O.current = a;
|
|
2554
2554
|
const B = X(null), H = X(null);
|
|
2555
2555
|
J(() => {
|
|
2556
2556
|
H.current = k;
|
|
2557
2557
|
}, [k]), J(() => {
|
|
2558
|
-
if (!w || !
|
|
2558
|
+
if (!w || !T) return;
|
|
2559
2559
|
const b = w.userID;
|
|
2560
2560
|
if (!b) return;
|
|
2561
|
-
const
|
|
2562
|
-
if (B.current ===
|
|
2563
|
-
B.current =
|
|
2564
|
-
const
|
|
2565
|
-
B.current ===
|
|
2561
|
+
const y = `${b}::${i}`;
|
|
2562
|
+
if (B.current === y) return;
|
|
2563
|
+
B.current = y;
|
|
2564
|
+
const P = () => {
|
|
2565
|
+
B.current === y && (B.current = null);
|
|
2566
2566
|
};
|
|
2567
2567
|
(async () => {
|
|
2568
2568
|
var W, j;
|
|
2569
2569
|
try {
|
|
2570
|
-
|
|
2570
|
+
_ && console.log(
|
|
2571
2571
|
"[MessagingShell] Loading initial conversation with:",
|
|
2572
2572
|
i
|
|
2573
2573
|
);
|
|
@@ -2580,27 +2580,27 @@ const _i = ({
|
|
|
2580
2580
|
{ limit: 1 }
|
|
2581
2581
|
);
|
|
2582
2582
|
if (K.length > 0) {
|
|
2583
|
-
|
|
2583
|
+
I(K[0]), V(null), (W = O.current) == null || W.call(O, K[0]), _ && console.log(
|
|
2584
2584
|
"[MessagingShell] Initial conversation loaded:",
|
|
2585
2585
|
K[0].id
|
|
2586
2586
|
);
|
|
2587
2587
|
return;
|
|
2588
2588
|
}
|
|
2589
2589
|
const ee = G.current;
|
|
2590
|
-
if (!ee || !
|
|
2591
|
-
|
|
2590
|
+
if (!ee || !E) {
|
|
2591
|
+
P(), V("No conversation found with this account"), _ && console.log(
|
|
2592
2592
|
"[MessagingShell] No conversation found for:",
|
|
2593
2593
|
i
|
|
2594
2594
|
);
|
|
2595
2595
|
return;
|
|
2596
2596
|
}
|
|
2597
2597
|
try {
|
|
2598
|
-
const Q = await
|
|
2598
|
+
const Q = await E.startChannelWithParticipant({
|
|
2599
2599
|
id: ee.id,
|
|
2600
2600
|
name: ee.name,
|
|
2601
2601
|
phone: ee.phone
|
|
2602
2602
|
});
|
|
2603
|
-
|
|
2603
|
+
I(Q), V(null), (j = O.current) == null || j.call(O, Q), _ && console.log(
|
|
2604
2604
|
"[MessagingShell] Channel created and loaded:",
|
|
2605
2605
|
Q.id
|
|
2606
2606
|
);
|
|
@@ -2608,30 +2608,30 @@ const _i = ({
|
|
|
2608
2608
|
console.error(
|
|
2609
2609
|
"[MessagingShell] Failed to create conversation:",
|
|
2610
2610
|
Q
|
|
2611
|
-
),
|
|
2611
|
+
), P(), V("Failed to create conversation");
|
|
2612
2612
|
}
|
|
2613
2613
|
} catch (K) {
|
|
2614
2614
|
console.error(
|
|
2615
2615
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2616
2616
|
K
|
|
2617
|
-
),
|
|
2617
|
+
), P(), H.current || V("Failed to load conversation");
|
|
2618
2618
|
}
|
|
2619
2619
|
})();
|
|
2620
|
-
}, [i, w,
|
|
2620
|
+
}, [i, w, T, E, _]);
|
|
2621
2621
|
const Y = X(r);
|
|
2622
2622
|
Y.current = r;
|
|
2623
2623
|
const $ = q(() => {
|
|
2624
2624
|
var b;
|
|
2625
|
-
|
|
2625
|
+
I(null), Z(!0), (b = Y.current) == null || b.call(Y);
|
|
2626
2626
|
}, []);
|
|
2627
|
-
return
|
|
2627
|
+
return A ? /* @__PURE__ */ n(Ee, {}) : S ? /* @__PURE__ */ n(he, { message: S, onBack: M }) : !T || !w ? /* @__PURE__ */ n(
|
|
2628
2628
|
he,
|
|
2629
2629
|
{
|
|
2630
2630
|
message: "Not connected to messaging service",
|
|
2631
|
-
onBack:
|
|
2631
|
+
onBack: M
|
|
2632
2632
|
}
|
|
2633
|
-
) :
|
|
2634
|
-
|
|
2633
|
+
) : L ? /* @__PURE__ */ n(he, { message: L }) : F && !k ? /* @__PURE__ */ n(he, { message: "Conversation ended" }) : k ? /* @__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(
|
|
2634
|
+
un,
|
|
2635
2635
|
{
|
|
2636
2636
|
channel: k,
|
|
2637
2637
|
renderMessageInputActions: t,
|
|
@@ -2640,7 +2640,7 @@ const _i = ({
|
|
|
2640
2640
|
onLeaveConversation: $,
|
|
2641
2641
|
onBlockParticipant: $,
|
|
2642
2642
|
CustomChannelEmptyState: l,
|
|
2643
|
-
showDeleteConversation:
|
|
2643
|
+
showDeleteConversation: U,
|
|
2644
2644
|
onBlockParticipantClick: d,
|
|
2645
2645
|
onReportParticipantClick: m,
|
|
2646
2646
|
dmAgentEnabled: g,
|
|
@@ -2652,33 +2652,33 @@ const _i = ({
|
|
|
2652
2652
|
onMessageLinkClick: x
|
|
2653
2653
|
},
|
|
2654
2654
|
k.id
|
|
2655
|
-
) }) }) : /* @__PURE__ */ n(
|
|
2655
|
+
) }) }) : /* @__PURE__ */ n(Ee, {});
|
|
2656
2656
|
};
|
|
2657
|
-
function
|
|
2657
|
+
function Ja(e) {
|
|
2658
2658
|
const t = e.state.pending_messages;
|
|
2659
2659
|
if (t != null && t.length)
|
|
2660
2660
|
for (const s of t)
|
|
2661
2661
|
e.state.addMessageSorted(s.message);
|
|
2662
2662
|
}
|
|
2663
|
-
const
|
|
2663
|
+
const mn = R.createContext({
|
|
2664
2664
|
selectedChannel: void 0,
|
|
2665
2665
|
onChannelSelect: () => {
|
|
2666
2666
|
},
|
|
2667
2667
|
debug: !1,
|
|
2668
2668
|
renderMessagePreview: void 0,
|
|
2669
2669
|
viewerLanguage: void 0
|
|
2670
|
-
}),
|
|
2670
|
+
}), Za = mn.Provider, Qa = () => R.useContext(mn), er = (e, t) => {
|
|
2671
2671
|
const s = new Date(
|
|
2672
2672
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2673
2673
|
), r = new Date(
|
|
2674
2674
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2675
2675
|
).getTime() - s.getTime();
|
|
2676
2676
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2677
|
-
},
|
|
2677
|
+
}, tr = (e) => {
|
|
2678
2678
|
const t = /* @__PURE__ */ new Date();
|
|
2679
2679
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2680
2680
|
return "Just now";
|
|
2681
|
-
const a =
|
|
2681
|
+
const a = er(e, t);
|
|
2682
2682
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2683
2683
|
hour: "numeric",
|
|
2684
2684
|
minute: "2-digit",
|
|
@@ -2688,45 +2688,45 @@ const un = z.createContext({
|
|
|
2688
2688
|
day: "numeric",
|
|
2689
2689
|
year: "2-digit"
|
|
2690
2690
|
});
|
|
2691
|
-
},
|
|
2691
|
+
}, hn = R.memo(
|
|
2692
2692
|
({ channel: e, unread: t }) => {
|
|
2693
|
-
var
|
|
2693
|
+
var M, E, _;
|
|
2694
2694
|
const {
|
|
2695
2695
|
selectedChannel: s,
|
|
2696
2696
|
onChannelSelect: a,
|
|
2697
2697
|
debug: r,
|
|
2698
2698
|
renderMessagePreview: i,
|
|
2699
2699
|
viewerLanguage: o
|
|
2700
|
-
} =
|
|
2700
|
+
} = Qa(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2701
2701
|
e && a(e);
|
|
2702
2702
|
}, m = (k) => {
|
|
2703
|
-
const
|
|
2704
|
-
!
|
|
2705
|
-
}, u = Object.values(((
|
|
2703
|
+
const I = k.key === "Enter" || k.key === " ", L = k.repeat;
|
|
2704
|
+
!I || L || (k.preventDefault(), d());
|
|
2705
|
+
}, u = Object.values(((M = e == null ? void 0 : e.state) == null ? void 0 : M.members) || {}).find(
|
|
2706
2706
|
(k) => {
|
|
2707
|
-
var
|
|
2708
|
-
return ((
|
|
2707
|
+
var I, L;
|
|
2708
|
+
return ((I = k.user) == null ? void 0 : I.id) && k.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
|
|
2709
2709
|
}
|
|
2710
|
-
), f =
|
|
2711
|
-
var
|
|
2712
|
-
const k = (
|
|
2710
|
+
), f = Ae(u == null ? void 0 : u.user), c = (E = u == null ? void 0 : u.user) == null ? void 0 : E.image, p = (() => {
|
|
2711
|
+
var I;
|
|
2712
|
+
const k = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
|
|
2713
2713
|
if (k != null && k.length) {
|
|
2714
|
-
for (let
|
|
2715
|
-
if (k[
|
|
2714
|
+
for (let L = k.length - 1; L >= 0; L--)
|
|
2715
|
+
if (k[L].type !== "system") return k[L];
|
|
2716
2716
|
}
|
|
2717
2717
|
})(), v = (() => {
|
|
2718
|
-
var Z,
|
|
2719
|
-
const k =
|
|
2718
|
+
var Z, U, G, O;
|
|
2719
|
+
const k = Kt({
|
|
2720
2720
|
message: p,
|
|
2721
2721
|
viewerLanguage: o
|
|
2722
2722
|
});
|
|
2723
2723
|
if (((Z = p == null ? void 0 : p.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
|
|
2724
|
-
if (((
|
|
2724
|
+
if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
|
|
2725
2725
|
if (((G = p == null ? void 0 : p.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return k ? `📎 ${k}` : "📎 Sent an attachment";
|
|
2726
2726
|
if (k) return k;
|
|
2727
|
-
const F = (
|
|
2727
|
+
const F = (O = p == null ? void 0 : p.attachments) == null ? void 0 : O[0];
|
|
2728
2728
|
return F ? F.og_scrape_url ? F.og_scrape_url : F.type === "image" ? "📷 Sent an image" : F.type === "video" ? "🎥 Sent a video" : F.type === "audio" ? "🎵 Sent audio" : F.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2729
|
-
})(), x = p != null && p.created_at ?
|
|
2729
|
+
})(), x = p != null && p.created_at ? tr(new Date(p.created_at)) : "", w = p ? ke(p) : !1, T = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, A = Xt(e), S = t ?? 0;
|
|
2730
2730
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2731
2731
|
channelId: e == null ? void 0 : e.id,
|
|
2732
2732
|
isSelected: l,
|
|
@@ -2740,7 +2740,7 @@ const un = z.createContext({
|
|
|
2740
2740
|
tabIndex: 0,
|
|
2741
2741
|
onClick: d,
|
|
2742
2742
|
onKeyDown: m,
|
|
2743
|
-
className:
|
|
2743
|
+
className: C(
|
|
2744
2744
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
2745
2745
|
{
|
|
2746
2746
|
"bg-black/[0.04]": l,
|
|
@@ -2751,11 +2751,11 @@ const un = z.createContext({
|
|
|
2751
2751
|
/* @__PURE__ */ n(
|
|
2752
2752
|
ae,
|
|
2753
2753
|
{
|
|
2754
|
-
id: ((
|
|
2754
|
+
id: ((_ = u == null ? void 0 : u.user) == null ? void 0 : _.id) || e.id || "unknown",
|
|
2755
2755
|
name: f,
|
|
2756
2756
|
image: c,
|
|
2757
2757
|
size: 48,
|
|
2758
|
-
starred:
|
|
2758
|
+
starred: A
|
|
2759
2759
|
}
|
|
2760
2760
|
),
|
|
2761
2761
|
/* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
@@ -2763,11 +2763,11 @@ const un = z.createContext({
|
|
|
2763
2763
|
/* @__PURE__ */ h(
|
|
2764
2764
|
"h3",
|
|
2765
2765
|
{
|
|
2766
|
-
className:
|
|
2766
|
+
className: C(
|
|
2767
2767
|
"text-sm font-medium truncate text-[#191918]"
|
|
2768
2768
|
),
|
|
2769
2769
|
children: [
|
|
2770
|
-
|
|
2770
|
+
A && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2771
2771
|
f
|
|
2772
2772
|
]
|
|
2773
2773
|
}
|
|
@@ -2775,7 +2775,7 @@ const un = z.createContext({
|
|
|
2775
2775
|
x && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: x })
|
|
2776
2776
|
] }),
|
|
2777
2777
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2778
|
-
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
2778
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
|
|
2779
2779
|
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: S > 99 ? "99+" : S })
|
|
2780
2780
|
] })
|
|
2781
2781
|
] })
|
|
@@ -2784,96 +2784,136 @@ const un = z.createContext({
|
|
|
2784
2784
|
);
|
|
2785
2785
|
}
|
|
2786
2786
|
);
|
|
2787
|
-
|
|
2788
|
-
const
|
|
2787
|
+
hn.displayName = "CustomChannelPreview";
|
|
2788
|
+
const nr = { last_message_at: -1 }, Ce = {
|
|
2789
|
+
isInitialLoadSettled: !1,
|
|
2790
|
+
channels: [],
|
|
2791
|
+
rawChannels: [],
|
|
2792
|
+
hasChannels: !1,
|
|
2793
|
+
unreadCount: 0
|
|
2794
|
+
}, sr = R.memo(
|
|
2789
2795
|
({
|
|
2790
2796
|
onChannelSelect: e,
|
|
2791
2797
|
selectedChannel: t,
|
|
2792
2798
|
filters: s,
|
|
2793
2799
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2794
2800
|
channelRenderFilterFn: r,
|
|
2795
|
-
sort: i =
|
|
2801
|
+
sort: i = nr,
|
|
2796
2802
|
className: o,
|
|
2797
2803
|
customEmptyStateIndicator: l,
|
|
2798
2804
|
renderMessagePreview: d,
|
|
2799
|
-
viewerLanguage: m
|
|
2805
|
+
viewerLanguage: m,
|
|
2806
|
+
onStateChange: g
|
|
2800
2807
|
}) => {
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2803
|
-
const { debug:
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
+
const u = R.useRef(0);
|
|
2809
|
+
u.current++;
|
|
2810
|
+
const { debug: f = !1 } = We(), [c, p] = R.useState(
|
|
2811
|
+
Ce
|
|
2812
|
+
), N = R.useMemo(
|
|
2813
|
+
() => `${JSON.stringify(s)}:${JSON.stringify(i)}`,
|
|
2814
|
+
[s, i]
|
|
2815
|
+
), v = R.useRef(
|
|
2816
|
+
Ce
|
|
2817
|
+
), x = R.useRef(!1), w = R.useRef(0), T = R.useCallback(
|
|
2818
|
+
(M) => {
|
|
2819
|
+
const E = w.current;
|
|
2820
|
+
v.current = M, !x.current && (x.current = !0, queueMicrotask(() => {
|
|
2821
|
+
if (E !== w.current) {
|
|
2822
|
+
x.current = !1;
|
|
2823
|
+
return;
|
|
2824
|
+
}
|
|
2825
|
+
x.current = !1, p((_) => {
|
|
2826
|
+
const k = v.current;
|
|
2827
|
+
return _ === k ? _ : k;
|
|
2828
|
+
});
|
|
2829
|
+
}));
|
|
2808
2830
|
},
|
|
2809
|
-
[
|
|
2831
|
+
[]
|
|
2832
|
+
), A = R.useCallback(
|
|
2833
|
+
(M) => {
|
|
2834
|
+
for (const _ of M)
|
|
2835
|
+
Ja(_);
|
|
2836
|
+
const E = r ? r(M) : M;
|
|
2837
|
+
return T({
|
|
2838
|
+
isInitialLoadSettled: !0,
|
|
2839
|
+
channels: E,
|
|
2840
|
+
rawChannels: M,
|
|
2841
|
+
hasChannels: E.length > 0,
|
|
2842
|
+
unreadCount: E.filter((_) => _.countUnread() > 0).length
|
|
2843
|
+
}), E;
|
|
2844
|
+
},
|
|
2845
|
+
[r, T]
|
|
2810
2846
|
);
|
|
2811
|
-
|
|
2812
|
-
renderCount:
|
|
2847
|
+
f && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
2848
|
+
renderCount: u.current,
|
|
2813
2849
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2814
2850
|
filters: s
|
|
2815
2851
|
});
|
|
2816
|
-
const
|
|
2852
|
+
const S = R.useMemo(
|
|
2817
2853
|
() => ({
|
|
2818
2854
|
selectedChannel: t,
|
|
2819
2855
|
onChannelSelect: e,
|
|
2820
|
-
debug:
|
|
2856
|
+
debug: f,
|
|
2821
2857
|
renderMessagePreview: d,
|
|
2822
2858
|
viewerLanguage: m
|
|
2823
2859
|
}),
|
|
2824
2860
|
[
|
|
2825
2861
|
t,
|
|
2826
2862
|
e,
|
|
2827
|
-
|
|
2863
|
+
f,
|
|
2828
2864
|
d,
|
|
2829
2865
|
m
|
|
2830
2866
|
]
|
|
2831
2867
|
);
|
|
2832
|
-
return
|
|
2868
|
+
return R.useEffect(() => {
|
|
2869
|
+
w.current += 1, v.current = Ce, x.current = !1, p(Ce);
|
|
2870
|
+
}, [N]), R.useEffect(() => {
|
|
2871
|
+
g == null || g(c);
|
|
2872
|
+
}, [c, g]), /* @__PURE__ */ n(
|
|
2833
2873
|
"div",
|
|
2834
2874
|
{
|
|
2835
|
-
className:
|
|
2875
|
+
className: C(
|
|
2836
2876
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2837
2877
|
o
|
|
2838
2878
|
),
|
|
2839
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2840
|
-
|
|
2879
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Za, { value: S, children: /* @__PURE__ */ n(
|
|
2880
|
+
cs,
|
|
2841
2881
|
{
|
|
2842
2882
|
filters: s,
|
|
2843
2883
|
sort: i,
|
|
2844
2884
|
options: { limit: 30 },
|
|
2845
2885
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2846
|
-
channelRenderFilterFn:
|
|
2847
|
-
Preview:
|
|
2886
|
+
channelRenderFilterFn: A,
|
|
2887
|
+
Preview: hn,
|
|
2848
2888
|
EmptyStateIndicator: l
|
|
2849
2889
|
},
|
|
2850
|
-
|
|
2890
|
+
N
|
|
2851
2891
|
) }) })
|
|
2852
2892
|
}
|
|
2853
2893
|
);
|
|
2854
2894
|
}
|
|
2855
2895
|
);
|
|
2856
|
-
|
|
2857
|
-
const
|
|
2858
|
-
function
|
|
2896
|
+
sr.displayName = "ChannelList";
|
|
2897
|
+
const ar = /^([a-z][a-z0-9+.-]*):/i, rr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2898
|
+
function et(e) {
|
|
2859
2899
|
if (typeof e != "string") return;
|
|
2860
2900
|
const t = e.trim();
|
|
2861
2901
|
if (t === "") return;
|
|
2862
|
-
const s =
|
|
2902
|
+
const s = ar.exec(t);
|
|
2863
2903
|
if (s) {
|
|
2864
2904
|
const a = s[1].toLowerCase();
|
|
2865
|
-
return
|
|
2905
|
+
return rr.has(a) ? t : void 0;
|
|
2866
2906
|
}
|
|
2867
2907
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2868
2908
|
}
|
|
2869
|
-
const
|
|
2909
|
+
const ir = {
|
|
2870
2910
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2871
2911
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2872
|
-
},
|
|
2873
|
-
const s =
|
|
2912
|
+
}, or = ({ variant: e, cta: t }) => {
|
|
2913
|
+
const s = C(
|
|
2874
2914
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2875
|
-
|
|
2876
|
-
), a =
|
|
2915
|
+
ir[e]
|
|
2916
|
+
), a = et(t.href);
|
|
2877
2917
|
return a ? /* @__PURE__ */ n(
|
|
2878
2918
|
"a",
|
|
2879
2919
|
{
|
|
@@ -2899,13 +2939,13 @@ const rr = {
|
|
|
2899
2939
|
children: t.label
|
|
2900
2940
|
}
|
|
2901
2941
|
);
|
|
2902
|
-
},
|
|
2942
|
+
}, lr = {
|
|
2903
2943
|
dark: "text-white",
|
|
2904
2944
|
light: "text-black/90"
|
|
2905
|
-
},
|
|
2945
|
+
}, cr = "text-white/30", dr = {
|
|
2906
2946
|
dark: "text-white/55",
|
|
2907
2947
|
light: "text-black/55"
|
|
2908
|
-
},
|
|
2948
|
+
}, tt = ({
|
|
2909
2949
|
variant: e,
|
|
2910
2950
|
title: t,
|
|
2911
2951
|
placeholderTitle: s,
|
|
@@ -2917,12 +2957,12 @@ const rr = {
|
|
|
2917
2957
|
}) => {
|
|
2918
2958
|
const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", p = o != null;
|
|
2919
2959
|
if (!g && !u && !c && !p) return null;
|
|
2920
|
-
const v =
|
|
2960
|
+
const v = C(
|
|
2921
2961
|
"truncate text-base font-medium leading-6",
|
|
2922
|
-
d && !t ?
|
|
2923
|
-
), x =
|
|
2962
|
+
d && !t ? cr : lr[e]
|
|
2963
|
+
), x = C(
|
|
2924
2964
|
"truncate text-xs leading-4",
|
|
2925
|
-
|
|
2965
|
+
dr[e]
|
|
2926
2966
|
);
|
|
2927
2967
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2928
2968
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2930,7 +2970,7 @@ const rr = {
|
|
|
2930
2970
|
/* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2931
2971
|
g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2932
2972
|
i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
|
|
2933
|
-
/* @__PURE__ */ n("p", { className:
|
|
2973
|
+
/* @__PURE__ */ n("p", { className: C("min-w-0", v), children: m })
|
|
2934
2974
|
] }),
|
|
2935
2975
|
u && /* @__PURE__ */ n("p", { className: x, children: a })
|
|
2936
2976
|
] }),
|
|
@@ -2938,16 +2978,16 @@ const rr = {
|
|
|
2938
2978
|
] }),
|
|
2939
2979
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2940
2980
|
] }),
|
|
2941
|
-
o && /* @__PURE__ */ n(
|
|
2981
|
+
o && /* @__PURE__ */ n(or, { variant: e, cta: o })
|
|
2942
2982
|
] });
|
|
2943
|
-
},
|
|
2983
|
+
}, ur = C(
|
|
2944
2984
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2945
2985
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2946
2986
|
// the messaging design system's "small border around link attachments"
|
|
2947
2987
|
// treatment from the mobile spec. The drop shadow remains for depth.
|
|
2948
2988
|
"border border-black/[0.08]",
|
|
2949
2989
|
"shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
|
|
2950
|
-
),
|
|
2990
|
+
), Ie = ({
|
|
2951
2991
|
variant: e,
|
|
2952
2992
|
children: t,
|
|
2953
2993
|
href: s,
|
|
@@ -2958,8 +2998,8 @@ const rr = {
|
|
|
2958
2998
|
bgClassName: l,
|
|
2959
2999
|
"data-testid": d
|
|
2960
3000
|
}) => {
|
|
2961
|
-
const m = s != null || a != null, g =
|
|
2962
|
-
|
|
3001
|
+
const m = s != null || a != null, g = C(
|
|
3002
|
+
ur,
|
|
2963
3003
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2964
3004
|
// `focus-ring` is a design-system utility from the component-library
|
|
2965
3005
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2989,7 +3029,7 @@ const rr = {
|
|
|
2989
3029
|
onClick: a,
|
|
2990
3030
|
"aria-label": r,
|
|
2991
3031
|
"data-testid": d,
|
|
2992
|
-
className:
|
|
3032
|
+
className: C(g, "text-left"),
|
|
2993
3033
|
children: [
|
|
2994
3034
|
t,
|
|
2995
3035
|
u
|
|
@@ -3007,17 +3047,17 @@ const rr = {
|
|
|
3007
3047
|
]
|
|
3008
3048
|
}
|
|
3009
3049
|
);
|
|
3010
|
-
},
|
|
3050
|
+
}, mr = {
|
|
3011
3051
|
dark: "bg-white/10",
|
|
3012
3052
|
light: "bg-black/5"
|
|
3013
|
-
},
|
|
3053
|
+
}, hr = {
|
|
3014
3054
|
dark: "size-16 text-white/25",
|
|
3015
3055
|
light: "size-16 text-black/25"
|
|
3016
|
-
},
|
|
3056
|
+
}, Me = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
|
|
3017
3057
|
if (!t || !e) return !1;
|
|
3018
3058
|
const s = re(e);
|
|
3019
3059
|
return s === "video" || s === "audio";
|
|
3020
|
-
},
|
|
3060
|
+
}, nt = "bg-[#F2F3F4]", Se = ({
|
|
3021
3061
|
variant: e,
|
|
3022
3062
|
thumbnailUrl: t,
|
|
3023
3063
|
sourceUrl: s,
|
|
@@ -3027,7 +3067,7 @@ const rr = {
|
|
|
3027
3067
|
topRight: o
|
|
3028
3068
|
}) => {
|
|
3029
3069
|
const l = re(r), d = !!s && l === "video";
|
|
3030
|
-
return
|
|
3070
|
+
return Me(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3031
3071
|
"audio",
|
|
3032
3072
|
{
|
|
3033
3073
|
src: s,
|
|
@@ -3039,7 +3079,7 @@ const rr = {
|
|
|
3039
3079
|
) }) : /* @__PURE__ */ h(
|
|
3040
3080
|
"div",
|
|
3041
3081
|
{
|
|
3042
|
-
className:
|
|
3082
|
+
className: C(
|
|
3043
3083
|
"relative h-[180px] w-full overflow-hidden",
|
|
3044
3084
|
d && "bg-black"
|
|
3045
3085
|
),
|
|
@@ -3066,12 +3106,12 @@ const rr = {
|
|
|
3066
3106
|
) : /* @__PURE__ */ n(
|
|
3067
3107
|
"div",
|
|
3068
3108
|
{
|
|
3069
|
-
className:
|
|
3109
|
+
className: C(
|
|
3070
3110
|
"flex h-full w-full items-center justify-center",
|
|
3071
|
-
|
|
3111
|
+
mr[e]
|
|
3072
3112
|
),
|
|
3073
3113
|
children: le(r, {
|
|
3074
|
-
className:
|
|
3114
|
+
className: hr[e],
|
|
3075
3115
|
weight: "regular"
|
|
3076
3116
|
})
|
|
3077
3117
|
}
|
|
@@ -3081,7 +3121,7 @@ const rr = {
|
|
|
3081
3121
|
]
|
|
3082
3122
|
}
|
|
3083
3123
|
);
|
|
3084
|
-
},
|
|
3124
|
+
}, fr = ({
|
|
3085
3125
|
title: e,
|
|
3086
3126
|
placeholderTitle: t,
|
|
3087
3127
|
description: s,
|
|
@@ -3095,7 +3135,7 @@ const rr = {
|
|
|
3095
3135
|
onDismiss: g,
|
|
3096
3136
|
onEditClick: u
|
|
3097
3137
|
}) => {
|
|
3098
|
-
const f = l === "classic", c =
|
|
3138
|
+
const f = l === "classic", c = Me(r, o), p = g ? /* @__PURE__ */ n(
|
|
3099
3139
|
"button",
|
|
3100
3140
|
{
|
|
3101
3141
|
type: "button",
|
|
@@ -3111,12 +3151,12 @@ const rr = {
|
|
|
3111
3151
|
onClick: u,
|
|
3112
3152
|
"aria-label": "Edit attachment",
|
|
3113
3153
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3114
|
-
children: /* @__PURE__ */ n(
|
|
3154
|
+
children: /* @__PURE__ */ n(Ts, { className: "size-5", weight: "regular" })
|
|
3115
3155
|
}
|
|
3116
3156
|
) : void 0;
|
|
3117
|
-
return c ? /* @__PURE__ */ n(
|
|
3157
|
+
return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3118
3158
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
3119
|
-
|
|
3159
|
+
Se,
|
|
3120
3160
|
{
|
|
3121
3161
|
variant: "dark",
|
|
3122
3162
|
sourceUrl: o,
|
|
@@ -3126,13 +3166,13 @@ const rr = {
|
|
|
3126
3166
|
) }),
|
|
3127
3167
|
p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
|
|
3128
3168
|
] }) }) : /* @__PURE__ */ h(
|
|
3129
|
-
|
|
3169
|
+
Ie,
|
|
3130
3170
|
{
|
|
3131
3171
|
variant: "dark",
|
|
3132
3172
|
topRight: f ? p : void 0,
|
|
3133
3173
|
children: [
|
|
3134
3174
|
!f && /* @__PURE__ */ n(
|
|
3135
|
-
|
|
3175
|
+
Se,
|
|
3136
3176
|
{
|
|
3137
3177
|
variant: "dark",
|
|
3138
3178
|
thumbnailUrl: i,
|
|
@@ -3143,7 +3183,7 @@ const rr = {
|
|
|
3143
3183
|
}
|
|
3144
3184
|
),
|
|
3145
3185
|
/* @__PURE__ */ n(
|
|
3146
|
-
|
|
3186
|
+
tt,
|
|
3147
3187
|
{
|
|
3148
3188
|
variant: "dark",
|
|
3149
3189
|
title: e,
|
|
@@ -3158,7 +3198,7 @@ const rr = {
|
|
|
3158
3198
|
]
|
|
3159
3199
|
}
|
|
3160
3200
|
);
|
|
3161
|
-
},
|
|
3201
|
+
}, gr = ({
|
|
3162
3202
|
title: e,
|
|
3163
3203
|
description: t,
|
|
3164
3204
|
url: s,
|
|
@@ -3170,7 +3210,7 @@ const rr = {
|
|
|
3170
3210
|
cta: d,
|
|
3171
3211
|
onClick: m
|
|
3172
3212
|
}) => {
|
|
3173
|
-
const g =
|
|
3213
|
+
const g = fn(a, i), u = et(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = Me(a, i) ? nt : void 0, N = d && m ? {
|
|
3174
3214
|
...d,
|
|
3175
3215
|
onClick: () => {
|
|
3176
3216
|
var v;
|
|
@@ -3178,7 +3218,7 @@ const rr = {
|
|
|
3178
3218
|
}
|
|
3179
3219
|
} : d;
|
|
3180
3220
|
return /* @__PURE__ */ h(
|
|
3181
|
-
|
|
3221
|
+
Ie,
|
|
3182
3222
|
{
|
|
3183
3223
|
variant: "light",
|
|
3184
3224
|
href: f,
|
|
@@ -3188,7 +3228,7 @@ const rr = {
|
|
|
3188
3228
|
"data-testid": "link-attachment",
|
|
3189
3229
|
children: [
|
|
3190
3230
|
o === "featured" && /* @__PURE__ */ n(
|
|
3191
|
-
|
|
3231
|
+
Se,
|
|
3192
3232
|
{
|
|
3193
3233
|
variant: "light",
|
|
3194
3234
|
thumbnailUrl: r,
|
|
@@ -3198,7 +3238,7 @@ const rr = {
|
|
|
3198
3238
|
}
|
|
3199
3239
|
),
|
|
3200
3240
|
/* @__PURE__ */ n(
|
|
3201
|
-
|
|
3241
|
+
tt,
|
|
3202
3242
|
{
|
|
3203
3243
|
variant: "light",
|
|
3204
3244
|
title: e,
|
|
@@ -3211,7 +3251,7 @@ const rr = {
|
|
|
3211
3251
|
]
|
|
3212
3252
|
}
|
|
3213
3253
|
);
|
|
3214
|
-
},
|
|
3254
|
+
}, br = ({
|
|
3215
3255
|
title: e,
|
|
3216
3256
|
placeholderTitle: t,
|
|
3217
3257
|
description: s,
|
|
@@ -3224,17 +3264,17 @@ const rr = {
|
|
|
3224
3264
|
cta: m,
|
|
3225
3265
|
onClick: g
|
|
3226
3266
|
}) => {
|
|
3227
|
-
const u =
|
|
3267
|
+
const u = fn(r, o), f = et(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
|
|
3228
3268
|
return /* @__PURE__ */ h(
|
|
3229
|
-
|
|
3269
|
+
Ie,
|
|
3230
3270
|
{
|
|
3231
3271
|
variant: "dark",
|
|
3232
3272
|
href: c,
|
|
3233
3273
|
onClick: p,
|
|
3234
|
-
bgClassName:
|
|
3274
|
+
bgClassName: Me(r, o) ? nt : void 0,
|
|
3235
3275
|
children: [
|
|
3236
3276
|
l === "featured" && /* @__PURE__ */ n(
|
|
3237
|
-
|
|
3277
|
+
Se,
|
|
3238
3278
|
{
|
|
3239
3279
|
variant: "dark",
|
|
3240
3280
|
thumbnailUrl: i,
|
|
@@ -3244,7 +3284,7 @@ const rr = {
|
|
|
3244
3284
|
}
|
|
3245
3285
|
),
|
|
3246
3286
|
/* @__PURE__ */ n(
|
|
3247
|
-
|
|
3287
|
+
tt,
|
|
3248
3288
|
{
|
|
3249
3289
|
variant: "dark",
|
|
3250
3290
|
title: e,
|
|
@@ -3258,20 +3298,20 @@ const rr = {
|
|
|
3258
3298
|
]
|
|
3259
3299
|
}
|
|
3260
3300
|
);
|
|
3261
|
-
},
|
|
3262
|
-
Composer:
|
|
3263
|
-
Sent:
|
|
3264
|
-
Received:
|
|
3265
|
-
},
|
|
3301
|
+
}, Ci = {
|
|
3302
|
+
Composer: fr,
|
|
3303
|
+
Sent: br,
|
|
3304
|
+
Received: gr
|
|
3305
|
+
}, pr = {
|
|
3266
3306
|
dark: "bg-[#121110]",
|
|
3267
3307
|
light: "bg-[#e9eaed]"
|
|
3268
|
-
},
|
|
3308
|
+
}, vr = {
|
|
3269
3309
|
dark: "text-white",
|
|
3270
3310
|
light: "text-[#080707]"
|
|
3271
|
-
},
|
|
3311
|
+
}, xr = {
|
|
3272
3312
|
dark: "border-white/[0.08]",
|
|
3273
3313
|
light: "border-black/[0.08]"
|
|
3274
|
-
},
|
|
3314
|
+
}, wr = (e) => e === "dark" ? "sender" : "receiver", Nr = {
|
|
3275
3315
|
sender: {
|
|
3276
3316
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3277
3317
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3293,13 +3333,13 @@ const rr = {
|
|
|
3293
3333
|
children: i,
|
|
3294
3334
|
"data-testid": o
|
|
3295
3335
|
}) => {
|
|
3296
|
-
const l = t != null && t !== "", d = wr
|
|
3336
|
+
const l = t != null && t !== "", d = Nr[wr(e)][a];
|
|
3297
3337
|
return /* @__PURE__ */ h(
|
|
3298
3338
|
"div",
|
|
3299
3339
|
{
|
|
3300
3340
|
"data-testid": o,
|
|
3301
3341
|
"data-group-position": a,
|
|
3302
|
-
className:
|
|
3342
|
+
className: C(
|
|
3303
3343
|
// 280px-wide bubble — matches the mobile chat attachment width
|
|
3304
3344
|
// and keeps the document / image / audio bubbles visually
|
|
3305
3345
|
// consistent inside the conversation timeline. The 8px / 16px
|
|
@@ -3308,10 +3348,10 @@ const rr = {
|
|
|
3308
3348
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3309
3349
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3310
3350
|
d,
|
|
3311
|
-
br[e],
|
|
3312
3351
|
pr[e],
|
|
3352
|
+
vr[e],
|
|
3313
3353
|
s && "border",
|
|
3314
|
-
s &&
|
|
3354
|
+
s && xr[e],
|
|
3315
3355
|
r
|
|
3316
3356
|
),
|
|
3317
3357
|
children: [
|
|
@@ -3319,7 +3359,7 @@ const rr = {
|
|
|
3319
3359
|
l ? /* @__PURE__ */ n(
|
|
3320
3360
|
"p",
|
|
3321
3361
|
{
|
|
3322
|
-
className:
|
|
3362
|
+
className: C(
|
|
3323
3363
|
// No `text-*` / `font-*` overrides here — caption inherits
|
|
3324
3364
|
// the same font family + size as `.str-chat__message-text`
|
|
3325
3365
|
// so it matches the surrounding `CustomMessage` bubbles.
|
|
@@ -3348,22 +3388,22 @@ const rr = {
|
|
|
3348
3388
|
a.stopPropagation(), e();
|
|
3349
3389
|
},
|
|
3350
3390
|
"aria-label": s,
|
|
3351
|
-
className:
|
|
3391
|
+
className: C(
|
|
3352
3392
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
3353
3393
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
3354
3394
|
),
|
|
3355
3395
|
children: /* @__PURE__ */ n(pe, { className: "size-3", weight: "bold" })
|
|
3356
3396
|
}
|
|
3357
|
-
), we = (e) => e === "received" ? "light" : "dark",
|
|
3397
|
+
), we = (e) => e === "received" ? "light" : "dark", ki = ({
|
|
3358
3398
|
firstOfGroup: e,
|
|
3359
3399
|
endOfGroup: t,
|
|
3360
3400
|
groupedByUser: s
|
|
3361
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3401
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", _r = ({
|
|
3362
3402
|
src: e,
|
|
3363
3403
|
mimeType: t,
|
|
3364
3404
|
filename: s,
|
|
3365
3405
|
items: a
|
|
3366
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3406
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], yr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3367
3407
|
/* @__PURE__ */ n(
|
|
3368
3408
|
"audio",
|
|
3369
3409
|
{
|
|
@@ -3375,7 +3415,7 @@ const rr = {
|
|
|
3375
3415
|
}
|
|
3376
3416
|
),
|
|
3377
3417
|
s ?? null
|
|
3378
|
-
] }),
|
|
3418
|
+
] }), st = ({
|
|
3379
3419
|
state: e,
|
|
3380
3420
|
src: t,
|
|
3381
3421
|
mimeType: s,
|
|
@@ -3386,7 +3426,7 @@ const rr = {
|
|
|
3386
3426
|
preload: l,
|
|
3387
3427
|
onDismiss: d
|
|
3388
3428
|
}) => {
|
|
3389
|
-
const m = we(e), g = e === "composer" && !!d, u =
|
|
3429
|
+
const m = we(e), g = e === "composer" && !!d, u = _r({ src: t, mimeType: s, filename: a, items: r });
|
|
3390
3430
|
if (u.length === 0)
|
|
3391
3431
|
return null;
|
|
3392
3432
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3398,7 +3438,7 @@ const rr = {
|
|
|
3398
3438
|
groupPosition: o,
|
|
3399
3439
|
"data-testid": "audio-attachment",
|
|
3400
3440
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
|
|
3401
|
-
|
|
3441
|
+
yr,
|
|
3402
3442
|
{
|
|
3403
3443
|
item: c,
|
|
3404
3444
|
preload: f,
|
|
@@ -3412,15 +3452,15 @@ const rr = {
|
|
|
3412
3452
|
)) })
|
|
3413
3453
|
}
|
|
3414
3454
|
);
|
|
3415
|
-
},
|
|
3416
|
-
Composer:
|
|
3417
|
-
Sent:
|
|
3418
|
-
Received:
|
|
3455
|
+
}, Cr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), kr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Er = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ir = {
|
|
3456
|
+
Composer: Cr,
|
|
3457
|
+
Sent: kr,
|
|
3458
|
+
Received: Er
|
|
3419
3459
|
};
|
|
3420
|
-
function
|
|
3460
|
+
function Sr(e) {
|
|
3421
3461
|
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`;
|
|
3422
3462
|
}
|
|
3423
|
-
const
|
|
3463
|
+
const Tr = {
|
|
3424
3464
|
pdf: "PDF",
|
|
3425
3465
|
doc: "DOC",
|
|
3426
3466
|
xls: "XLS",
|
|
@@ -3430,7 +3470,7 @@ const Sr = {
|
|
|
3430
3470
|
text: "TXT",
|
|
3431
3471
|
markdown: "MD"
|
|
3432
3472
|
};
|
|
3433
|
-
function
|
|
3473
|
+
function Ar(e, t) {
|
|
3434
3474
|
if (t) {
|
|
3435
3475
|
const r = t.lastIndexOf(".");
|
|
3436
3476
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3440,7 +3480,7 @@ function Tr(e, t) {
|
|
|
3440
3480
|
}
|
|
3441
3481
|
if (!e) return;
|
|
3442
3482
|
if (re(e) === "document") {
|
|
3443
|
-
const r =
|
|
3483
|
+
const r = Qt(e), i = Tr[r];
|
|
3444
3484
|
if (i) return i;
|
|
3445
3485
|
if (e === "application/octet-stream") return;
|
|
3446
3486
|
}
|
|
@@ -3448,8 +3488,8 @@ function Tr(e, t) {
|
|
|
3448
3488
|
if (!(!a || a === "*"))
|
|
3449
3489
|
return a.toUpperCase();
|
|
3450
3490
|
}
|
|
3451
|
-
function
|
|
3452
|
-
const a =
|
|
3491
|
+
function Mr(e, t, s) {
|
|
3492
|
+
const a = Ar(e, t), r = typeof s == "number" && s > 0 ? Sr(s) : void 0;
|
|
3453
3493
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3454
3494
|
}
|
|
3455
3495
|
function te(e) {
|
|
@@ -3460,16 +3500,16 @@ function te(e) {
|
|
|
3460
3500
|
return "download";
|
|
3461
3501
|
}
|
|
3462
3502
|
}
|
|
3463
|
-
const
|
|
3503
|
+
const Dr = {
|
|
3464
3504
|
dark: "text-white/55",
|
|
3465
3505
|
light: "text-black/65"
|
|
3466
|
-
},
|
|
3506
|
+
}, Rr = {
|
|
3467
3507
|
dark: "bg-white/10",
|
|
3468
3508
|
light: "bg-black/5"
|
|
3469
|
-
},
|
|
3509
|
+
}, Lr = {
|
|
3470
3510
|
dark: "text-white/85",
|
|
3471
3511
|
light: "text-black/85"
|
|
3472
|
-
},
|
|
3512
|
+
}, gn = ({
|
|
3473
3513
|
variant: e,
|
|
3474
3514
|
filename: t,
|
|
3475
3515
|
title: s,
|
|
@@ -3479,16 +3519,16 @@ const Mr = {
|
|
|
3479
3519
|
activateLabel: o,
|
|
3480
3520
|
trailingAction: l
|
|
3481
3521
|
}) => {
|
|
3482
|
-
const d = s ?? t ?? "File", m =
|
|
3522
|
+
const d = s ?? t ?? "File", m = Mr(a, t, r), g = /* @__PURE__ */ n(
|
|
3483
3523
|
"div",
|
|
3484
3524
|
{
|
|
3485
|
-
className:
|
|
3525
|
+
className: C(
|
|
3486
3526
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3487
|
-
|
|
3527
|
+
Rr[e]
|
|
3488
3528
|
),
|
|
3489
3529
|
"aria-hidden": !0,
|
|
3490
3530
|
children: le(a, {
|
|
3491
|
-
className:
|
|
3531
|
+
className: C("size-6", Lr[e]),
|
|
3492
3532
|
weight: "regular"
|
|
3493
3533
|
})
|
|
3494
3534
|
}
|
|
@@ -3497,9 +3537,9 @@ const Mr = {
|
|
|
3497
3537
|
m ? /* @__PURE__ */ n(
|
|
3498
3538
|
"p",
|
|
3499
3539
|
{
|
|
3500
|
-
className:
|
|
3540
|
+
className: C(
|
|
3501
3541
|
"truncate text-xs leading-4",
|
|
3502
|
-
|
|
3542
|
+
Dr[e]
|
|
3503
3543
|
),
|
|
3504
3544
|
children: m
|
|
3505
3545
|
}
|
|
@@ -3510,7 +3550,7 @@ const Mr = {
|
|
|
3510
3550
|
type: "button",
|
|
3511
3551
|
onClick: i,
|
|
3512
3552
|
"aria-label": o,
|
|
3513
|
-
className:
|
|
3553
|
+
className: C(
|
|
3514
3554
|
"flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
|
|
3515
3555
|
e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
|
|
3516
3556
|
),
|
|
@@ -3528,7 +3568,7 @@ const Mr = {
|
|
|
3528
3568
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
3529
3569
|
] });
|
|
3530
3570
|
};
|
|
3531
|
-
async function
|
|
3571
|
+
async function bn(e, t) {
|
|
3532
3572
|
const s = t ?? te(e);
|
|
3533
3573
|
try {
|
|
3534
3574
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -3542,14 +3582,14 @@ async function gn(e, t) {
|
|
|
3542
3582
|
}
|
|
3543
3583
|
}
|
|
3544
3584
|
}
|
|
3545
|
-
const
|
|
3585
|
+
const Pr = ({
|
|
3546
3586
|
src: e,
|
|
3547
3587
|
filename: t,
|
|
3548
3588
|
fileSize: s,
|
|
3549
3589
|
mimeType: a,
|
|
3550
3590
|
title: r,
|
|
3551
3591
|
items: i
|
|
3552
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3592
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Or = ({
|
|
3553
3593
|
variant: e,
|
|
3554
3594
|
item: t,
|
|
3555
3595
|
index: s,
|
|
@@ -3558,7 +3598,7 @@ const Lr = ({
|
|
|
3558
3598
|
}) => {
|
|
3559
3599
|
const i = t.filename ?? te(t.src);
|
|
3560
3600
|
return /* @__PURE__ */ n(
|
|
3561
|
-
|
|
3601
|
+
gn,
|
|
3562
3602
|
{
|
|
3563
3603
|
variant: e,
|
|
3564
3604
|
filename: i,
|
|
@@ -3570,7 +3610,7 @@ const Lr = ({
|
|
|
3570
3610
|
trailingAction: r
|
|
3571
3611
|
}
|
|
3572
3612
|
);
|
|
3573
|
-
},
|
|
3613
|
+
}, at = ({
|
|
3574
3614
|
state: e,
|
|
3575
3615
|
src: t,
|
|
3576
3616
|
filename: s,
|
|
@@ -3583,7 +3623,7 @@ const Lr = ({
|
|
|
3583
3623
|
onClick: m,
|
|
3584
3624
|
onDismiss: g
|
|
3585
3625
|
}) => {
|
|
3586
|
-
const u = we(e), f = e === "composer" && !!g, c =
|
|
3626
|
+
const u = we(e), f = e === "composer" && !!g, c = Pr({
|
|
3587
3627
|
src: t,
|
|
3588
3628
|
filename: s,
|
|
3589
3629
|
fileSize: a,
|
|
@@ -3595,14 +3635,14 @@ const Lr = ({
|
|
|
3595
3635
|
const x = c[v];
|
|
3596
3636
|
if (!x) return;
|
|
3597
3637
|
const w = x.filename ?? te(x.src);
|
|
3598
|
-
|
|
3638
|
+
bn(x.src, w);
|
|
3599
3639
|
};
|
|
3600
3640
|
if (c.length === 0)
|
|
3601
3641
|
return null;
|
|
3602
3642
|
const N = /* @__PURE__ */ n(
|
|
3603
3643
|
"span",
|
|
3604
3644
|
{
|
|
3605
|
-
className:
|
|
3645
|
+
className: C(
|
|
3606
3646
|
"flex size-8 items-center justify-center rounded-full",
|
|
3607
3647
|
u === "dark" ? "text-white/70" : "text-black/70"
|
|
3608
3648
|
),
|
|
@@ -3618,7 +3658,7 @@ const Lr = ({
|
|
|
3618
3658
|
groupPosition: d,
|
|
3619
3659
|
"data-testid": "file-attachment",
|
|
3620
3660
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
3621
|
-
|
|
3661
|
+
Or,
|
|
3622
3662
|
{
|
|
3623
3663
|
variant: u,
|
|
3624
3664
|
item: v,
|
|
@@ -3630,11 +3670,11 @@ const Lr = ({
|
|
|
3630
3670
|
)) })
|
|
3631
3671
|
}
|
|
3632
3672
|
);
|
|
3633
|
-
},
|
|
3634
|
-
Composer:
|
|
3635
|
-
Sent:
|
|
3636
|
-
Received:
|
|
3637
|
-
},
|
|
3673
|
+
}, zr = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), $r = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Br = {
|
|
3674
|
+
Composer: zr,
|
|
3675
|
+
Sent: Fr,
|
|
3676
|
+
Received: $r
|
|
3677
|
+
}, rt = ({
|
|
3638
3678
|
onPrev: e,
|
|
3639
3679
|
onNext: t,
|
|
3640
3680
|
prevLabel: s = "Previous",
|
|
@@ -3647,7 +3687,7 @@ const Lr = ({
|
|
|
3647
3687
|
onClick: e,
|
|
3648
3688
|
"aria-label": s,
|
|
3649
3689
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3650
|
-
children: /* @__PURE__ */ n(
|
|
3690
|
+
children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3651
3691
|
}
|
|
3652
3692
|
),
|
|
3653
3693
|
/* @__PURE__ */ n(
|
|
@@ -3657,10 +3697,10 @@ const Lr = ({
|
|
|
3657
3697
|
onClick: t,
|
|
3658
3698
|
"aria-label": a,
|
|
3659
3699
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3660
|
-
children: /* @__PURE__ */ n(
|
|
3700
|
+
children: /* @__PURE__ */ n(Ms, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3661
3701
|
}
|
|
3662
3702
|
)
|
|
3663
|
-
] }),
|
|
3703
|
+
] }), pn = ({
|
|
3664
3704
|
url: e,
|
|
3665
3705
|
filename: t,
|
|
3666
3706
|
variant: s = "pill",
|
|
@@ -3669,15 +3709,15 @@ const Lr = ({
|
|
|
3669
3709
|
tone: i = "dark",
|
|
3670
3710
|
onTriggered: o
|
|
3671
3711
|
}) => {
|
|
3672
|
-
const [l, d] =
|
|
3712
|
+
const [l, d] = z(!1), m = q(
|
|
3673
3713
|
(c) => {
|
|
3674
|
-
c.stopPropagation(), !l && (d(!0),
|
|
3714
|
+
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3675
3715
|
}).finally(() => {
|
|
3676
3716
|
d(!1), o == null || o();
|
|
3677
3717
|
}));
|
|
3678
3718
|
},
|
|
3679
3719
|
[l, e, t, o]
|
|
3680
|
-
), g = r ?? s !== "pill", f = { className:
|
|
3720
|
+
), g = r ?? s !== "pill", f = { className: C(
|
|
3681
3721
|
s === "pill" ? "size-4" : "size-5",
|
|
3682
3722
|
"shrink-0"
|
|
3683
3723
|
), weight: "bold" };
|
|
@@ -3688,7 +3728,7 @@ const Lr = ({
|
|
|
3688
3728
|
onClick: m,
|
|
3689
3729
|
disabled: l,
|
|
3690
3730
|
"aria-label": a,
|
|
3691
|
-
className:
|
|
3731
|
+
className: C(
|
|
3692
3732
|
"flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
|
|
3693
3733
|
{
|
|
3694
3734
|
dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
|
|
@@ -3728,7 +3768,7 @@ const Lr = ({
|
|
|
3728
3768
|
onClick: m,
|
|
3729
3769
|
disabled: l,
|
|
3730
3770
|
"aria-label": g ? a : void 0,
|
|
3731
|
-
className:
|
|
3771
|
+
className: C(
|
|
3732
3772
|
"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",
|
|
3733
3773
|
i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
|
|
3734
3774
|
),
|
|
@@ -3745,16 +3785,16 @@ const Lr = ({
|
|
|
3745
3785
|
]
|
|
3746
3786
|
}
|
|
3747
3787
|
);
|
|
3748
|
-
},
|
|
3788
|
+
}, $e = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
|
|
3749
3789
|
length: e,
|
|
3750
3790
|
initialIndex: t,
|
|
3751
3791
|
open: s
|
|
3752
3792
|
}) => {
|
|
3753
|
-
const a =
|
|
3793
|
+
const a = $e(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
|
|
3754
3794
|
J(() => {
|
|
3755
|
-
s && i(
|
|
3795
|
+
s && i($e(t, 0, Math.max(e - 1, 0)));
|
|
3756
3796
|
}, [s, t, e]), J(() => {
|
|
3757
|
-
i((d) =>
|
|
3797
|
+
i((d) => $e(d, 0, Math.max(e - 1, 0)));
|
|
3758
3798
|
}, [e]);
|
|
3759
3799
|
const o = q(() => {
|
|
3760
3800
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
@@ -3770,7 +3810,7 @@ const Lr = ({
|
|
|
3770
3810
|
};
|
|
3771
3811
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
3772
3812
|
}, [s, e, o, l]), { index: r, prev: o, next: l };
|
|
3773
|
-
},
|
|
3813
|
+
}, ot = ({
|
|
3774
3814
|
open: e,
|
|
3775
3815
|
onClose: t,
|
|
3776
3816
|
ariaLabel: s,
|
|
@@ -3860,13 +3900,13 @@ const Lr = ({
|
|
|
3860
3900
|
]
|
|
3861
3901
|
}
|
|
3862
3902
|
);
|
|
3863
|
-
},
|
|
3903
|
+
}, vn = ({
|
|
3864
3904
|
open: e,
|
|
3865
3905
|
items: t,
|
|
3866
3906
|
initialIndex: s = 0,
|
|
3867
3907
|
onClose: a
|
|
3868
3908
|
}) => {
|
|
3869
|
-
const { index: r, prev: i, next: o } =
|
|
3909
|
+
const { index: r, prev: i, next: o } = it({
|
|
3870
3910
|
length: t.length,
|
|
3871
3911
|
initialIndex: s,
|
|
3872
3912
|
open: e
|
|
@@ -3875,14 +3915,14 @@ const Lr = ({
|
|
|
3875
3915
|
[l]
|
|
3876
3916
|
);
|
|
3877
3917
|
return l ? /* @__PURE__ */ h(
|
|
3878
|
-
|
|
3918
|
+
ot,
|
|
3879
3919
|
{
|
|
3880
3920
|
open: e,
|
|
3881
3921
|
onClose: a,
|
|
3882
3922
|
ariaLabel: d,
|
|
3883
3923
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3884
3924
|
actions: /* @__PURE__ */ n(
|
|
3885
|
-
|
|
3925
|
+
pn,
|
|
3886
3926
|
{
|
|
3887
3927
|
url: l.src,
|
|
3888
3928
|
filename: d,
|
|
@@ -3905,7 +3945,7 @@ const Lr = ({
|
|
|
3905
3945
|
`${r}:${l.src}`
|
|
3906
3946
|
),
|
|
3907
3947
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3908
|
-
|
|
3948
|
+
rt,
|
|
3909
3949
|
{
|
|
3910
3950
|
onPrev: i,
|
|
3911
3951
|
onNext: o,
|
|
@@ -3916,7 +3956,7 @@ const Lr = ({
|
|
|
3916
3956
|
]
|
|
3917
3957
|
}
|
|
3918
3958
|
) : null;
|
|
3919
|
-
},
|
|
3959
|
+
}, jr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
|
|
3920
3960
|
tiles: e,
|
|
3921
3961
|
onTileActivate: t,
|
|
3922
3962
|
maxVisible: s = 4,
|
|
@@ -3925,14 +3965,14 @@ const Lr = ({
|
|
|
3925
3965
|
const r = e.length;
|
|
3926
3966
|
if (r === 0) return null;
|
|
3927
3967
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
|
|
3928
|
-
const u =
|
|
3968
|
+
const u = C(jr, "h-full w-full");
|
|
3929
3969
|
return t ? /* @__PURE__ */ h(
|
|
3930
3970
|
"button",
|
|
3931
3971
|
{
|
|
3932
3972
|
type: "button",
|
|
3933
3973
|
onClick: () => t(m),
|
|
3934
3974
|
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
3935
|
-
className:
|
|
3975
|
+
className: C(u, "cursor-zoom-in"),
|
|
3936
3976
|
children: [
|
|
3937
3977
|
d.content,
|
|
3938
3978
|
g
|
|
@@ -3944,10 +3984,10 @@ const Lr = ({
|
|
|
3944
3984
|
g
|
|
3945
3985
|
] }, m);
|
|
3946
3986
|
};
|
|
3947
|
-
return i.length === 1 ? /* @__PURE__ */ n("div", { className:
|
|
3987
|
+
return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
|
|
3948
3988
|
"div",
|
|
3949
3989
|
{
|
|
3950
|
-
className:
|
|
3990
|
+
className: C(
|
|
3951
3991
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
3952
3992
|
a
|
|
3953
3993
|
),
|
|
@@ -3956,7 +3996,7 @@ const Lr = ({
|
|
|
3956
3996
|
) : i.length === 3 ? /* @__PURE__ */ h(
|
|
3957
3997
|
"div",
|
|
3958
3998
|
{
|
|
3959
|
-
className:
|
|
3999
|
+
className: C(
|
|
3960
4000
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3961
4001
|
a
|
|
3962
4002
|
),
|
|
@@ -3969,7 +4009,7 @@ const Lr = ({
|
|
|
3969
4009
|
) : /* @__PURE__ */ n(
|
|
3970
4010
|
"div",
|
|
3971
4011
|
{
|
|
3972
|
-
className:
|
|
4012
|
+
className: C(
|
|
3973
4013
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
3974
4014
|
a
|
|
3975
4015
|
),
|
|
@@ -3987,14 +4027,14 @@ const Lr = ({
|
|
|
3987
4027
|
}
|
|
3988
4028
|
);
|
|
3989
4029
|
}, Ne = (e) => {
|
|
3990
|
-
const [t, s] =
|
|
4030
|
+
const [t, s] = z(!1), [a, r] = z(0), i = q(
|
|
3991
4031
|
(l) => {
|
|
3992
4032
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
3993
4033
|
},
|
|
3994
4034
|
[e]
|
|
3995
4035
|
), o = q(() => s(!1), []);
|
|
3996
4036
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3997
|
-
},
|
|
4037
|
+
}, Vr = (e, t, s, a) => ({
|
|
3998
4038
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3999
4039
|
content: /* @__PURE__ */ n(
|
|
4000
4040
|
"img",
|
|
@@ -4013,11 +4053,11 @@ const Lr = ({
|
|
|
4013
4053
|
src: e,
|
|
4014
4054
|
alt: t,
|
|
4015
4055
|
items: s
|
|
4016
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
4056
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
|
|
4017
4057
|
src: s.src,
|
|
4018
4058
|
alt: s.alt,
|
|
4019
4059
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4020
|
-
})),
|
|
4060
|
+
})), Gr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4021
4061
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
|
|
4022
4062
|
r
|
|
4023
4063
|
);
|
|
@@ -4044,16 +4084,16 @@ const Lr = ({
|
|
|
4044
4084
|
),
|
|
4045
4085
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
|
|
4046
4086
|
/* @__PURE__ */ n(
|
|
4047
|
-
|
|
4087
|
+
vn,
|
|
4048
4088
|
{
|
|
4049
4089
|
open: o,
|
|
4050
|
-
items:
|
|
4090
|
+
items: wn([{ src: e, alt: t }], s),
|
|
4051
4091
|
initialIndex: l,
|
|
4052
4092
|
onClose: m
|
|
4053
4093
|
}
|
|
4054
4094
|
)
|
|
4055
4095
|
] });
|
|
4056
|
-
},
|
|
4096
|
+
}, Nn = ({
|
|
4057
4097
|
state: e,
|
|
4058
4098
|
src: t,
|
|
4059
4099
|
alt: s,
|
|
@@ -4070,7 +4110,7 @@ const Lr = ({
|
|
|
4070
4110
|
if (m.length === 0)
|
|
4071
4111
|
return null;
|
|
4072
4112
|
const N = m.map(
|
|
4073
|
-
(v, x) =>
|
|
4113
|
+
(v, x) => Vr(v, x, m.length, l)
|
|
4074
4114
|
);
|
|
4075
4115
|
return /* @__PURE__ */ h(
|
|
4076
4116
|
ve,
|
|
@@ -4080,12 +4120,12 @@ const Lr = ({
|
|
|
4080
4120
|
groupPosition: o,
|
|
4081
4121
|
"data-testid": "image-attachment",
|
|
4082
4122
|
children: [
|
|
4083
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4123
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: N, onTileActivate: c }) }),
|
|
4084
4124
|
/* @__PURE__ */ n(
|
|
4085
|
-
|
|
4125
|
+
vn,
|
|
4086
4126
|
{
|
|
4087
4127
|
open: u,
|
|
4088
|
-
items:
|
|
4128
|
+
items: wn(m, a),
|
|
4089
4129
|
initialIndex: f,
|
|
4090
4130
|
onClose: p
|
|
4091
4131
|
}
|
|
@@ -4093,17 +4133,17 @@ const Lr = ({
|
|
|
4093
4133
|
]
|
|
4094
4134
|
}
|
|
4095
4135
|
);
|
|
4096
|
-
},
|
|
4097
|
-
Composer:
|
|
4098
|
-
Sent:
|
|
4099
|
-
Received:
|
|
4100
|
-
},
|
|
4136
|
+
}, Hr = (e) => /* @__PURE__ */ n(Gr, { ...e }), Yr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), Wr = {
|
|
4137
|
+
Composer: Hr,
|
|
4138
|
+
Sent: Yr,
|
|
4139
|
+
Received: qr
|
|
4140
|
+
}, Xr = ({
|
|
4101
4141
|
open: e,
|
|
4102
4142
|
items: t,
|
|
4103
4143
|
initialIndex: s = 0,
|
|
4104
4144
|
onClose: a
|
|
4105
4145
|
}) => {
|
|
4106
|
-
const { index: r, prev: i, next: o } =
|
|
4146
|
+
const { index: r, prev: i, next: o } = it({
|
|
4107
4147
|
length: t.length,
|
|
4108
4148
|
initialIndex: s,
|
|
4109
4149
|
open: e
|
|
@@ -4111,11 +4151,11 @@ const Lr = ({
|
|
|
4111
4151
|
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
|
|
4112
4152
|
[l]
|
|
4113
4153
|
), m = ne(
|
|
4114
|
-
() => l ?
|
|
4154
|
+
() => l ? Kr(l.src) : void 0,
|
|
4115
4155
|
[l]
|
|
4116
4156
|
);
|
|
4117
4157
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
4118
|
-
|
|
4158
|
+
ot,
|
|
4119
4159
|
{
|
|
4120
4160
|
open: e,
|
|
4121
4161
|
onClose: a,
|
|
@@ -4134,7 +4174,7 @@ const Lr = ({
|
|
|
4134
4174
|
`${r}:${l.src}`
|
|
4135
4175
|
),
|
|
4136
4176
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4137
|
-
|
|
4177
|
+
rt,
|
|
4138
4178
|
{
|
|
4139
4179
|
onPrev: i,
|
|
4140
4180
|
onNext: o,
|
|
@@ -4145,16 +4185,16 @@ const Lr = ({
|
|
|
4145
4185
|
]
|
|
4146
4186
|
}
|
|
4147
4187
|
);
|
|
4148
|
-
},
|
|
4188
|
+
}, Kr = (e) => {
|
|
4149
4189
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4150
4190
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4151
|
-
},
|
|
4191
|
+
}, Jr = ({
|
|
4152
4192
|
src: e,
|
|
4153
4193
|
filename: t,
|
|
4154
4194
|
fileSize: s,
|
|
4155
4195
|
title: a,
|
|
4156
4196
|
items: r
|
|
4157
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4197
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Zr = ({
|
|
4158
4198
|
variant: e,
|
|
4159
4199
|
item: t,
|
|
4160
4200
|
index: s,
|
|
@@ -4163,7 +4203,7 @@ const Lr = ({
|
|
|
4163
4203
|
}) => {
|
|
4164
4204
|
const i = t.filename ?? te(t.src);
|
|
4165
4205
|
return /* @__PURE__ */ n(
|
|
4166
|
-
|
|
4206
|
+
gn,
|
|
4167
4207
|
{
|
|
4168
4208
|
variant: e,
|
|
4169
4209
|
filename: i,
|
|
@@ -4175,7 +4215,7 @@ const Lr = ({
|
|
|
4175
4215
|
trailingAction: r
|
|
4176
4216
|
}
|
|
4177
4217
|
);
|
|
4178
|
-
},
|
|
4218
|
+
}, lt = ({
|
|
4179
4219
|
state: e,
|
|
4180
4220
|
src: t,
|
|
4181
4221
|
filename: s,
|
|
@@ -4187,7 +4227,7 @@ const Lr = ({
|
|
|
4187
4227
|
onClick: d,
|
|
4188
4228
|
onDismiss: m
|
|
4189
4229
|
}) => {
|
|
4190
|
-
const g = we(e), u =
|
|
4230
|
+
const g = we(e), u = Jr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4191
4231
|
d
|
|
4192
4232
|
), v = e === "composer" && !!m;
|
|
4193
4233
|
if (u.length === 0)
|
|
@@ -4204,31 +4244,31 @@ const Lr = ({
|
|
|
4204
4244
|
groupPosition: l,
|
|
4205
4245
|
"data-testid": "pdf-attachment",
|
|
4206
4246
|
children: [
|
|
4207
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w,
|
|
4208
|
-
const
|
|
4209
|
-
|
|
4247
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, T) => {
|
|
4248
|
+
const A = w.filename ?? te(w.src), S = v && T === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4249
|
+
pn,
|
|
4210
4250
|
{
|
|
4211
4251
|
url: w.src,
|
|
4212
|
-
filename:
|
|
4252
|
+
filename: A,
|
|
4213
4253
|
variant: "inline",
|
|
4214
|
-
label: `Download ${
|
|
4254
|
+
label: `Download ${A}`,
|
|
4215
4255
|
tone: g
|
|
4216
4256
|
}
|
|
4217
4257
|
);
|
|
4218
4258
|
return /* @__PURE__ */ n(
|
|
4219
|
-
|
|
4259
|
+
Zr,
|
|
4220
4260
|
{
|
|
4221
4261
|
variant: g,
|
|
4222
4262
|
item: w,
|
|
4223
|
-
index:
|
|
4263
|
+
index: T,
|
|
4224
4264
|
onActivate: p,
|
|
4225
4265
|
trailingAction: S
|
|
4226
4266
|
},
|
|
4227
|
-
`${w.src}-${
|
|
4267
|
+
`${w.src}-${T}`
|
|
4228
4268
|
);
|
|
4229
4269
|
}) }),
|
|
4230
4270
|
/* @__PURE__ */ n(
|
|
4231
|
-
|
|
4271
|
+
Xr,
|
|
4232
4272
|
{
|
|
4233
4273
|
open: f,
|
|
4234
4274
|
items: x,
|
|
@@ -4239,17 +4279,17 @@ const Lr = ({
|
|
|
4239
4279
|
]
|
|
4240
4280
|
}
|
|
4241
4281
|
);
|
|
4242
|
-
},
|
|
4243
|
-
Composer:
|
|
4244
|
-
Sent:
|
|
4245
|
-
Received:
|
|
4246
|
-
},
|
|
4282
|
+
}, Qr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), ei = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), ti = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ni = {
|
|
4283
|
+
Composer: Qr,
|
|
4284
|
+
Sent: ei,
|
|
4285
|
+
Received: ti
|
|
4286
|
+
}, _n = ({
|
|
4247
4287
|
open: e,
|
|
4248
4288
|
items: t,
|
|
4249
4289
|
initialIndex: s = 0,
|
|
4250
4290
|
onClose: a
|
|
4251
4291
|
}) => {
|
|
4252
|
-
const { index: r, prev: i, next: o } =
|
|
4292
|
+
const { index: r, prev: i, next: o } = it({
|
|
4253
4293
|
length: t.length,
|
|
4254
4294
|
initialIndex: s,
|
|
4255
4295
|
open: e
|
|
@@ -4258,7 +4298,7 @@ const Lr = ({
|
|
|
4258
4298
|
[l]
|
|
4259
4299
|
);
|
|
4260
4300
|
return l ? /* @__PURE__ */ h(
|
|
4261
|
-
|
|
4301
|
+
ot,
|
|
4262
4302
|
{
|
|
4263
4303
|
open: e,
|
|
4264
4304
|
onClose: a,
|
|
@@ -4282,7 +4322,7 @@ const Lr = ({
|
|
|
4282
4322
|
`${r}:${l.src}`
|
|
4283
4323
|
),
|
|
4284
4324
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
4285
|
-
|
|
4325
|
+
rt,
|
|
4286
4326
|
{
|
|
4287
4327
|
onPrev: i,
|
|
4288
4328
|
onNext: o,
|
|
@@ -4293,7 +4333,7 @@ const Lr = ({
|
|
|
4293
4333
|
]
|
|
4294
4334
|
}
|
|
4295
4335
|
) : null;
|
|
4296
|
-
},
|
|
4336
|
+
}, si = () => /* @__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(je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
|
|
4297
4337
|
item: e,
|
|
4298
4338
|
index: t
|
|
4299
4339
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4308,30 +4348,30 @@ const Lr = ({
|
|
|
4308
4348
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4309
4349
|
}
|
|
4310
4350
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
4311
|
-
|
|
4351
|
+
Yt,
|
|
4312
4352
|
{
|
|
4313
4353
|
className: "size-16 rounded-md text-white/30",
|
|
4314
4354
|
weight: "regular",
|
|
4315
4355
|
"aria-hidden": !0
|
|
4316
4356
|
}
|
|
4317
4357
|
) }),
|
|
4318
|
-
/* @__PURE__ */ n(
|
|
4319
|
-
] }),
|
|
4358
|
+
/* @__PURE__ */ n(si, {})
|
|
4359
|
+
] }), ai = (e, t, s) => ({
|
|
4320
4360
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4321
|
-
content: /* @__PURE__ */ n(
|
|
4322
|
-
}),
|
|
4361
|
+
content: /* @__PURE__ */ n(yn, { item: e, index: t })
|
|
4362
|
+
}), ri = ({
|
|
4323
4363
|
src: e,
|
|
4324
4364
|
poster: t,
|
|
4325
4365
|
mimeType: s,
|
|
4326
4366
|
preload: a,
|
|
4327
4367
|
items: r
|
|
4328
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4368
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
|
|
4329
4369
|
src: s.src,
|
|
4330
4370
|
poster: s.poster,
|
|
4331
4371
|
mimeType: s.mimeType,
|
|
4332
4372
|
preload: s.preload,
|
|
4333
4373
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4334
|
-
})),
|
|
4374
|
+
})), ii = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4335
4375
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ne(
|
|
4336
4376
|
i
|
|
4337
4377
|
);
|
|
@@ -4343,15 +4383,15 @@ const Lr = ({
|
|
|
4343
4383
|
onClick: () => m(0),
|
|
4344
4384
|
"aria-label": "Play video",
|
|
4345
4385
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4346
|
-
children: /* @__PURE__ */ n(
|
|
4386
|
+
children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4347
4387
|
}
|
|
4348
4388
|
),
|
|
4349
4389
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4350
4390
|
/* @__PURE__ */ n(
|
|
4351
|
-
|
|
4391
|
+
_n,
|
|
4352
4392
|
{
|
|
4353
4393
|
open: l,
|
|
4354
|
-
items:
|
|
4394
|
+
items: Cn(
|
|
4355
4395
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4356
4396
|
a
|
|
4357
4397
|
),
|
|
@@ -4360,7 +4400,7 @@ const Lr = ({
|
|
|
4360
4400
|
}
|
|
4361
4401
|
)
|
|
4362
4402
|
] });
|
|
4363
|
-
},
|
|
4403
|
+
}, kn = ({
|
|
4364
4404
|
state: e,
|
|
4365
4405
|
src: t,
|
|
4366
4406
|
poster: s,
|
|
@@ -4372,13 +4412,13 @@ const Lr = ({
|
|
|
4372
4412
|
preload: d,
|
|
4373
4413
|
onClick: m
|
|
4374
4414
|
}) => {
|
|
4375
|
-
const g =
|
|
4415
|
+
const g = ri({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4376
4416
|
m
|
|
4377
4417
|
);
|
|
4378
4418
|
if (g.length === 0)
|
|
4379
4419
|
return null;
|
|
4380
4420
|
const v = g.map(
|
|
4381
|
-
(x, w) =>
|
|
4421
|
+
(x, w) => ai(x, w, g.length)
|
|
4382
4422
|
);
|
|
4383
4423
|
return /* @__PURE__ */ h(
|
|
4384
4424
|
ve,
|
|
@@ -4389,7 +4429,7 @@ const Lr = ({
|
|
|
4389
4429
|
"data-testid": "video-attachment",
|
|
4390
4430
|
children: [
|
|
4391
4431
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4392
|
-
|
|
4432
|
+
xn,
|
|
4393
4433
|
{
|
|
4394
4434
|
tiles: v,
|
|
4395
4435
|
onTileActivate: p,
|
|
@@ -4397,10 +4437,10 @@ const Lr = ({
|
|
|
4397
4437
|
}
|
|
4398
4438
|
) }),
|
|
4399
4439
|
/* @__PURE__ */ n(
|
|
4400
|
-
|
|
4440
|
+
_n,
|
|
4401
4441
|
{
|
|
4402
4442
|
open: f,
|
|
4403
|
-
items:
|
|
4443
|
+
items: Cn(g, r),
|
|
4404
4444
|
initialIndex: c,
|
|
4405
4445
|
onClose: N
|
|
4406
4446
|
}
|
|
@@ -4408,17 +4448,17 @@ const Lr = ({
|
|
|
4408
4448
|
]
|
|
4409
4449
|
}
|
|
4410
4450
|
);
|
|
4411
|
-
},
|
|
4412
|
-
Composer:
|
|
4413
|
-
Sent:
|
|
4414
|
-
Received:
|
|
4415
|
-
},
|
|
4416
|
-
Image:
|
|
4417
|
-
Video:
|
|
4418
|
-
Audio:
|
|
4419
|
-
Pdf:
|
|
4420
|
-
File:
|
|
4421
|
-
},
|
|
4451
|
+
}, oi = (e) => /* @__PURE__ */ n(ii, { ...e }), li = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ci = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), di = {
|
|
4452
|
+
Composer: oi,
|
|
4453
|
+
Sent: li,
|
|
4454
|
+
Received: ci
|
|
4455
|
+
}, Ei = {
|
|
4456
|
+
Image: Wr,
|
|
4457
|
+
Video: di,
|
|
4458
|
+
Audio: Ir,
|
|
4459
|
+
Pdf: ni,
|
|
4460
|
+
File: Br
|
|
4461
|
+
}, ui = ({
|
|
4422
4462
|
question: e,
|
|
4423
4463
|
onClick: t,
|
|
4424
4464
|
loading: s = !1,
|
|
@@ -4430,7 +4470,7 @@ const Lr = ({
|
|
|
4430
4470
|
onClick: t,
|
|
4431
4471
|
disabled: s,
|
|
4432
4472
|
style: { backgroundColor: "#E6E5E3" },
|
|
4433
|
-
className:
|
|
4473
|
+
className: C(
|
|
4434
4474
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
4435
4475
|
{
|
|
4436
4476
|
"hover:brightness-95 active:brightness-90": !s,
|
|
@@ -4440,7 +4480,7 @@ const Lr = ({
|
|
|
4440
4480
|
),
|
|
4441
4481
|
children: e
|
|
4442
4482
|
}
|
|
4443
|
-
),
|
|
4483
|
+
), Ii = ({
|
|
4444
4484
|
faqs: e,
|
|
4445
4485
|
onFaqClick: t,
|
|
4446
4486
|
loadingFaqId: s,
|
|
@@ -4469,7 +4509,7 @@ const Lr = ({
|
|
|
4469
4509
|
children: [
|
|
4470
4510
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4471
4511
|
l.map((d) => /* @__PURE__ */ n(
|
|
4472
|
-
|
|
4512
|
+
ui,
|
|
4473
4513
|
{
|
|
4474
4514
|
question: d.question,
|
|
4475
4515
|
onClick: () => t(d.id),
|
|
@@ -4483,38 +4523,38 @@ const Lr = ({
|
|
|
4483
4523
|
] }) });
|
|
4484
4524
|
};
|
|
4485
4525
|
export {
|
|
4486
|
-
|
|
4526
|
+
en as A,
|
|
4487
4527
|
Us as B,
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4528
|
+
qa as C,
|
|
4529
|
+
Rs as D,
|
|
4530
|
+
Ii as F,
|
|
4531
|
+
Ci as L,
|
|
4532
|
+
Ni as M,
|
|
4493
4533
|
ye as a,
|
|
4494
4534
|
ae as b,
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4535
|
+
sr as c,
|
|
4536
|
+
un as d,
|
|
4537
|
+
_i as e,
|
|
4538
|
+
ui as f,
|
|
4499
4539
|
re as g,
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4540
|
+
Ft as h,
|
|
4541
|
+
Ei as i,
|
|
4542
|
+
_a as j,
|
|
4543
|
+
wi as k,
|
|
4544
|
+
yi as l,
|
|
4545
|
+
Mr as m,
|
|
4546
|
+
Sr as n,
|
|
4547
|
+
tr as o,
|
|
4548
|
+
Ar as p,
|
|
4549
|
+
Kt as q,
|
|
4510
4550
|
le as r,
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4551
|
+
sn as s,
|
|
4552
|
+
Ps as t,
|
|
4553
|
+
ki as u,
|
|
4554
|
+
Gs as v,
|
|
4555
|
+
Ze as w,
|
|
4556
|
+
Qe as x,
|
|
4557
|
+
Ae as y,
|
|
4558
|
+
ba as z
|
|
4519
4559
|
};
|
|
4520
|
-
//# sourceMappingURL=index-
|
|
4560
|
+
//# sourceMappingURL=index-CO975B6P.js.map
|