@linktr.ee/messaging-react 3.1.0-rc-1780514752 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Card-DbdWDBMe.cjs → Card-Bh-xdrvU.cjs} +2 -2
- package/dist/{Card-DbdWDBMe.cjs.map → Card-Bh-xdrvU.cjs.map} +1 -1
- package/dist/{Card-0TLA8XHU.js → Card-Bm_eCczn.js} +3 -3
- package/dist/{Card-0TLA8XHU.js.map → Card-Bm_eCczn.js.map} +1 -1
- package/dist/{Card-B-D_LbnV.cjs → Card-C33YVsqY.cjs} +2 -2
- package/dist/{Card-B-D_LbnV.cjs.map → Card-C33YVsqY.cjs.map} +1 -1
- package/dist/{Card-BaaerKBC.js → Card-C8Q8MH6Y.js} +2 -2
- package/dist/{Card-BaaerKBC.js.map → Card-C8Q8MH6Y.js.map} +1 -1
- package/dist/{Card-DZVa2CeI.js → Card-D8QPP3I9.js} +2 -2
- package/dist/{Card-DZVa2CeI.js.map → Card-D8QPP3I9.js.map} +1 -1
- package/dist/{Card-Bfxdewx_.cjs → Card-DO7ipVZF.cjs} +2 -2
- package/dist/{Card-Bfxdewx_.cjs.map → Card-DO7ipVZF.cjs.map} +1 -1
- package/dist/{LockedThumbnail-B4gDHeh7.js → LockedThumbnail-6Ykc8JiU.js} +2 -2
- package/dist/{LockedThumbnail-B4gDHeh7.js.map → LockedThumbnail-6Ykc8JiU.js.map} +1 -1
- package/dist/{LockedThumbnail-DkwFwgpU.cjs → LockedThumbnail-yEutwXEz.cjs} +2 -2
- package/dist/{LockedThumbnail-DkwFwgpU.cjs.map → LockedThumbnail-yEutwXEz.cjs.map} +1 -1
- package/dist/{index-BmCc1-F3.js → index-Cj6b1oEe.js} +797 -790
- package/dist/index-Cj6b1oEe.js.map +1 -0
- package/dist/index-DluSX5DB.cjs +2 -0
- package/dist/index-DluSX5DB.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.stories.tsx +5 -6
- package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +21 -23
- package/src/components/CustomMessageInput/index.tsx +42 -24
- package/src/components/MessagingShell/MessagingShell.test.tsx +93 -0
- package/src/components/MessagingShell/index.tsx +46 -4
- package/src/types.ts +9 -6
- package/dist/index-BmCc1-F3.js.map +0 -1
- package/dist/index-Cg-bxSZn.cjs +0 -2
- package/dist/index-Cg-bxSZn.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as n, jsxs as h, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as
|
|
1
|
+
import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import z, { createContext as He, useContext as Se, useCallback as q, useState as O, 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 de, 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 De, AIStates as Re, 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 $e, XIcon as pe, SpinnerGapIcon as Le, 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 Be, 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 je, ProhibitIcon as Ss, ArrowLeftIcon as Rt, CaretRightIcon as Ve, DotsThreeIcon as Lt, PencilSimpleIcon as Ts, CaretLeftIcon as As } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
|
-
import { MessageActions as
|
|
7
|
+
import { MessageActions as Ms, DefaultDropdownActionButton as qt } from "stream-chat-react/experimental";
|
|
8
8
|
import { LinkPreviewsManager as Pt } from "stream-chat";
|
|
9
|
-
const Wt =
|
|
9
|
+
const Wt = He({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const Wt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), We = () =>
|
|
19
|
+
}), We = () => Se(Wt), xi = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -24,7 +24,7 @@ const Wt = Ge({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
const o =
|
|
27
|
+
const o = q(
|
|
28
28
|
(I, ...C) => {
|
|
29
29
|
i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
|
|
30
30
|
},
|
|
@@ -36,14 +36,14 @@ const Wt = Ge({
|
|
|
36
36
|
serviceConfig: !!s,
|
|
37
37
|
capabilities: Object.keys(r)
|
|
38
38
|
});
|
|
39
|
-
const [l, d] =
|
|
39
|
+
const [l, d] = O(null), [m, g] = O(null), [u, f] = O(!1), [c, p] = O(!1), [N, v] = O(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
|
+
}), A = X(0);
|
|
45
|
+
A.current++, o("📊 RENDER INFO", {
|
|
46
|
+
renderCount: A.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,7 +57,7 @@ const Wt = Ge({
|
|
|
57
57
|
serviceConfig: s,
|
|
58
58
|
capabilities: r
|
|
59
59
|
}, J(() => {
|
|
60
|
-
const I =
|
|
60
|
+
const I = A.current;
|
|
61
61
|
if (o("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
62
62
|
renderCount: I,
|
|
63
63
|
apiKey: !!a,
|
|
@@ -80,7 +80,7 @@ const Wt = Ge({
|
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: w.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const C = new
|
|
83
|
+
const C = new In({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
@@ -95,7 +95,7 @@ const Wt = Ge({
|
|
|
95
95
|
}), C.disconnectUser().catch(console.error);
|
|
96
96
|
};
|
|
97
97
|
}, [a, s, i, o]);
|
|
98
|
-
const
|
|
98
|
+
const T = X(null);
|
|
99
99
|
J(() => {
|
|
100
100
|
var C, k;
|
|
101
101
|
if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
@@ -113,7 +113,7 @@ const Wt = Ge({
|
|
|
113
113
|
o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
if (((C =
|
|
116
|
+
if (((C = T.current) == null ? void 0 : C.serviceId) === l && ((k = T.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"
|
|
@@ -121,11 +121,11 @@ const Wt = Ge({
|
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
123
|
(async () => {
|
|
124
|
-
o("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0,
|
|
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
127
|
const E = await l.connectUser(t);
|
|
128
|
-
g(E), f(!0),
|
|
128
|
+
g(E), f(!0), T.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
|
|
129
129
|
userId: t.id,
|
|
130
130
|
clientId: E.userID
|
|
131
131
|
});
|
|
@@ -136,7 +136,7 @@ const Wt = Ge({
|
|
|
136
136
|
error: D
|
|
137
137
|
});
|
|
138
138
|
} finally {
|
|
139
|
-
|
|
139
|
+
p(!1), x.current = !1, o("🔄 USER CONNECTION FINISHED", {
|
|
140
140
|
userId: t.id,
|
|
141
141
|
isConnected: u
|
|
142
142
|
});
|
|
@@ -149,12 +149,12 @@ const Wt = Ge({
|
|
|
149
149
|
l && u ? (o(
|
|
150
150
|
"🧹 CLEANUP EFFECT TRIGGERED",
|
|
151
151
|
"Cleaning up connection on unmount"
|
|
152
|
-
),
|
|
152
|
+
), T.current = null, l.disconnectUser().catch(console.error)) : o("🔇 CLEANUP EFFECT SKIPPED", {
|
|
153
153
|
hasService: !!l,
|
|
154
154
|
isConnected: u
|
|
155
155
|
});
|
|
156
156
|
}), [l, u, o]);
|
|
157
|
-
const S =
|
|
157
|
+
const S = q(async () => {
|
|
158
158
|
if (o("🔄 REFRESH CONNECTION CALLED", {
|
|
159
159
|
hasService: !!l,
|
|
160
160
|
hasUser: !!t
|
|
@@ -162,7 +162,7 @@ const Wt = Ge({
|
|
|
162
162
|
o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
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
168
|
const I = await l.connectUser(t);
|
|
@@ -174,9 +174,9 @@ const Wt = Ge({
|
|
|
174
174
|
error: C
|
|
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]), R = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
|
|
180
180
|
hasService: !!l,
|
|
181
181
|
hasClient: !!m,
|
|
182
182
|
isConnected: u,
|
|
@@ -204,11 +204,11 @@ const Wt = Ge({
|
|
|
204
204
|
o
|
|
205
205
|
]);
|
|
206
206
|
return o("🔄 RENDER END", {
|
|
207
|
-
renderCount:
|
|
207
|
+
renderCount: A.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
|
-
contextValueReady: !!
|
|
210
|
-
}), /* @__PURE__ */ n(Wt.Provider, { value:
|
|
211
|
-
|
|
209
|
+
contextValueReady: !!R
|
|
210
|
+
}), /* @__PURE__ */ n(Wt.Provider, { value: R, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
Sn,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
@@ -217,9 +217,9 @@ const Wt = Ge({
|
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
},
|
|
220
|
+
}, Ds = () => We(), Xt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
|
-
const [t, s] =
|
|
222
|
+
const [t, s] = O(
|
|
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 Wt = Ge({
|
|
|
239
239
|
e.off("member.updated", i);
|
|
240
240
|
};
|
|
241
241
|
}, [e]), t;
|
|
242
|
-
},
|
|
243
|
-
function
|
|
244
|
-
return
|
|
242
|
+
}, Rs = /^[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 Ls(e) {
|
|
244
|
+
return Rs.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 : !Ls(s);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function Te(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 Ps(e) {
|
|
282
282
|
let t = 0;
|
|
283
283
|
for (let s = 0; s < e.length; s++) {
|
|
284
284
|
const a = e.charCodeAt(s);
|
|
@@ -286,11 +286,11 @@ function Ls(e) {
|
|
|
286
286
|
}
|
|
287
287
|
return Math.abs(t);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const s =
|
|
291
|
-
return
|
|
289
|
+
function Os(e) {
|
|
290
|
+
const s = Ps(e) % zt.length;
|
|
291
|
+
return zt[s];
|
|
292
292
|
}
|
|
293
|
-
const
|
|
293
|
+
const ae = ({
|
|
294
294
|
id: e,
|
|
295
295
|
image: t,
|
|
296
296
|
size: s = 40,
|
|
@@ -299,7 +299,7 @@ const ne = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l =
|
|
302
|
+
const l = Os(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%" } : {
|
|
303
303
|
borderRadius: "33%",
|
|
304
304
|
cornerShape: "superellipse(1.3)"
|
|
305
305
|
}, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
@@ -338,7 +338,7 @@ const ne = ({
|
|
|
338
338
|
{
|
|
339
339
|
"aria-hidden": "true",
|
|
340
340
|
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)]",
|
|
341
|
-
children: /* @__PURE__ */ n(
|
|
341
|
+
children: /* @__PURE__ */ n($e, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
344
|
/* @__PURE__ */ n(
|
|
@@ -403,10 +403,10 @@ function zs({ label: e, className: t, children: s, ...a }) {
|
|
|
403
403
|
}
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function Fs({ onClick: e }) {
|
|
407
407
|
return /* @__PURE__ */ n(zs, { label: "Close", onClick: e, className: "p-1", children: /* @__PURE__ */ n(pe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
408
408
|
}
|
|
409
|
-
const
|
|
409
|
+
const $s = ({
|
|
410
410
|
dialogRef: e,
|
|
411
411
|
onClose: t,
|
|
412
412
|
participant: s,
|
|
@@ -421,21 +421,21 @@ const Fs = ({
|
|
|
421
421
|
onDeleteConversationClick: u,
|
|
422
422
|
onBlockParticipantClick: f,
|
|
423
423
|
onReportParticipantClick: c,
|
|
424
|
-
customProfileContent:
|
|
424
|
+
customProfileContent: p,
|
|
425
425
|
customChannelActions: N
|
|
426
426
|
}) => {
|
|
427
|
-
var B,
|
|
428
|
-
const { service: v, debug: x } = We(), [w,
|
|
429
|
-
var
|
|
430
|
-
if (!(!m || !v || !((
|
|
427
|
+
var B, H, Y, $;
|
|
428
|
+
const { service: v, debug: x } = We(), [w, A] = O(!1), [T, S] = O(!1), [R, I] = O(!1), C = q(async () => {
|
|
429
|
+
var b;
|
|
430
|
+
if (!(!m || !v || !((b = s == null ? void 0 : s.user) != null && b.id)))
|
|
431
431
|
try {
|
|
432
|
-
const
|
|
433
|
-
(
|
|
434
|
-
var
|
|
435
|
-
return
|
|
432
|
+
const L = (await v.getBlockedUsers()).some(
|
|
433
|
+
(M) => {
|
|
434
|
+
var W;
|
|
435
|
+
return M.blocked_user_id === ((W = s == null ? void 0 : s.user) == null ? void 0 : W.id);
|
|
436
436
|
}
|
|
437
437
|
);
|
|
438
|
-
|
|
438
|
+
A(L);
|
|
439
439
|
} catch (_) {
|
|
440
440
|
console.error(
|
|
441
441
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
@@ -447,11 +447,11 @@ const Fs = ({
|
|
|
447
447
|
C();
|
|
448
448
|
}, [C]);
|
|
449
449
|
const k = async () => {
|
|
450
|
-
var
|
|
451
|
-
if (!
|
|
450
|
+
var b;
|
|
451
|
+
if (!T) {
|
|
452
452
|
u == null || u(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), S(!0);
|
|
453
453
|
try {
|
|
454
|
-
const _ = ((
|
|
454
|
+
const _ = ((b = r._client) == null ? void 0 : b.userID) ?? null;
|
|
455
455
|
await r.hide(_, !1), o && await o(r), t();
|
|
456
456
|
} catch (_) {
|
|
457
457
|
console.error("[ChannelInfoDialog] Failed to leave conversation", _);
|
|
@@ -460,25 +460,25 @@ const Fs = ({
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
}, E = async () => {
|
|
463
|
-
var
|
|
464
|
-
if (!(
|
|
465
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (
|
|
463
|
+
var b, _, L;
|
|
464
|
+
if (!(R || !v)) {
|
|
465
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Block member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
|
|
466
466
|
try {
|
|
467
|
-
await v.blockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((
|
|
468
|
-
} catch (
|
|
469
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
467
|
+
await v.blockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
|
|
468
|
+
} catch (M) {
|
|
469
|
+
console.error("[ChannelInfoDialog] Failed to block member", M);
|
|
470
470
|
} finally {
|
|
471
471
|
I(!1);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
}, D = async () => {
|
|
475
|
-
var
|
|
476
|
-
if (!(
|
|
477
|
-
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (
|
|
475
|
+
var b, _, L;
|
|
476
|
+
if (!(R || !v)) {
|
|
477
|
+
f == null || f(), x && console.log("[ChannelInfoDialog] Unblock member", (b = s == null ? void 0 : s.user) == null ? void 0 : b.id), I(!0);
|
|
478
478
|
try {
|
|
479
|
-
await v.unBlockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((
|
|
480
|
-
} catch (
|
|
481
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
479
|
+
await v.unBlockUser((_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), l && await l((L = s == null ? void 0 : s.user) == null ? void 0 : L.id), t();
|
|
480
|
+
} catch (M) {
|
|
481
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", M);
|
|
482
482
|
} finally {
|
|
483
483
|
I(!1);
|
|
484
484
|
}
|
|
@@ -491,7 +491,7 @@ const Fs = ({
|
|
|
491
491
|
);
|
|
492
492
|
};
|
|
493
493
|
if (!s) return null;
|
|
494
|
-
const F = a ??
|
|
494
|
+
const F = a ?? Te(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, P = (($ = s.user) == null ? void 0 : $.id) || "unknown";
|
|
495
495
|
return (
|
|
496
496
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
497
497
|
/* @__PURE__ */ n(
|
|
@@ -500,13 +500,13 @@ const Fs = ({
|
|
|
500
500
|
ref: e,
|
|
501
501
|
className: "mes-dialog group",
|
|
502
502
|
onClose: t,
|
|
503
|
-
onClick: (
|
|
504
|
-
|
|
503
|
+
onClick: (b) => {
|
|
504
|
+
b.target === e.current && t();
|
|
505
505
|
},
|
|
506
506
|
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: [
|
|
507
507
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
508
508
|
/* @__PURE__ */ n("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
509
|
-
/* @__PURE__ */ n(
|
|
509
|
+
/* @__PURE__ */ n(Fs, { onClick: t })
|
|
510
510
|
] }),
|
|
511
511
|
/* @__PURE__ */ h("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
|
|
512
512
|
/* @__PURE__ */ h(
|
|
@@ -517,11 +517,11 @@ const Fs = ({
|
|
|
517
517
|
children: [
|
|
518
518
|
/* @__PURE__ */ h("div", { className: "flex items-center gap-3 w-full", children: [
|
|
519
519
|
/* @__PURE__ */ n(
|
|
520
|
-
|
|
520
|
+
ae,
|
|
521
521
|
{
|
|
522
522
|
id: P,
|
|
523
523
|
name: F,
|
|
524
|
-
image:
|
|
524
|
+
image: Z,
|
|
525
525
|
size: 88,
|
|
526
526
|
shape: "circle"
|
|
527
527
|
}
|
|
@@ -529,7 +529,7 @@ const Fs = ({
|
|
|
529
529
|
/* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 flex-1", children: [
|
|
530
530
|
/* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: F }),
|
|
531
531
|
G && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: G }),
|
|
532
|
-
i && !
|
|
532
|
+
i && !p && /* @__PURE__ */ n(
|
|
533
533
|
"span",
|
|
534
534
|
{
|
|
535
535
|
className: "mt-1 rounded-full text-xs font-normal w-fit",
|
|
@@ -545,7 +545,7 @@ const Fs = ({
|
|
|
545
545
|
)
|
|
546
546
|
] })
|
|
547
547
|
] }),
|
|
548
|
-
|
|
548
|
+
p && /* @__PURE__ */ n("div", { className: "w-full", children: p })
|
|
549
549
|
]
|
|
550
550
|
}
|
|
551
551
|
),
|
|
@@ -554,10 +554,10 @@ const Fs = ({
|
|
|
554
554
|
ye,
|
|
555
555
|
{
|
|
556
556
|
onClick: k,
|
|
557
|
-
disabled:
|
|
558
|
-
"aria-busy":
|
|
557
|
+
disabled: T,
|
|
558
|
+
"aria-busy": T,
|
|
559
559
|
children: [
|
|
560
|
-
|
|
560
|
+
T ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ds, { className: "h-5 w-5" }),
|
|
561
561
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
562
562
|
]
|
|
563
563
|
}
|
|
@@ -566,10 +566,10 @@ const Fs = ({
|
|
|
566
566
|
ye,
|
|
567
567
|
{
|
|
568
568
|
onClick: D,
|
|
569
|
-
disabled:
|
|
570
|
-
"aria-busy":
|
|
569
|
+
disabled: R,
|
|
570
|
+
"aria-busy": R,
|
|
571
571
|
children: [
|
|
572
|
-
|
|
572
|
+
R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
|
|
573
573
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
574
574
|
]
|
|
575
575
|
}
|
|
@@ -577,10 +577,10 @@ const Fs = ({
|
|
|
577
577
|
ye,
|
|
578
578
|
{
|
|
579
579
|
onClick: E,
|
|
580
|
-
disabled:
|
|
581
|
-
"aria-busy":
|
|
580
|
+
disabled: R,
|
|
581
|
+
"aria-busy": R,
|
|
582
582
|
children: [
|
|
583
|
-
|
|
583
|
+
R ? /* @__PURE__ */ n(Le, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
|
|
584
584
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
585
585
|
]
|
|
586
586
|
}
|
|
@@ -596,30 +596,30 @@ const Fs = ({
|
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
);
|
|
599
|
-
},
|
|
600
|
-
function Bs(e) {
|
|
601
|
-
return e != null && e.length ? e.some((t) => t.type === Ue) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
|
|
602
|
-
}
|
|
599
|
+
}, Bs = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), Ue = "vote_up", Ge = "vote_down";
|
|
603
600
|
function js(e) {
|
|
604
|
-
|
|
605
|
-
|
|
601
|
+
return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ue) ? "up" : null : null;
|
|
602
|
+
}
|
|
603
|
+
function Vs(e) {
|
|
604
|
+
const { channel: t } = de(), { client: s } = qe("useMessageVote"), a = ne(
|
|
605
|
+
() => js(e.own_reactions),
|
|
606
606
|
[e.own_reactions]
|
|
607
|
-
), r =
|
|
607
|
+
), r = q(async () => {
|
|
608
608
|
if (s != null && s.userID)
|
|
609
609
|
try {
|
|
610
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
610
|
+
a === "up" ? await t.deleteReaction(e.id, Ue) : await t.sendReaction(
|
|
611
611
|
e.id,
|
|
612
|
-
{ type:
|
|
612
|
+
{ type: Ue },
|
|
613
613
|
{ enforce_unique: !0, skip_push: !0 }
|
|
614
614
|
);
|
|
615
615
|
} catch {
|
|
616
616
|
}
|
|
617
|
-
}, [t, s == null ? void 0 : s.userID, e.id, a]), i =
|
|
617
|
+
}, [t, s == null ? void 0 : s.userID, e.id, a]), i = q(async () => {
|
|
618
618
|
if (s != null && s.userID)
|
|
619
619
|
try {
|
|
620
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
620
|
+
a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
|
|
621
621
|
e.id,
|
|
622
|
-
{ type:
|
|
622
|
+
{ type: Ge },
|
|
623
623
|
{ enforce_unique: !0, skip_push: !0 }
|
|
624
624
|
);
|
|
625
625
|
} catch {
|
|
@@ -627,7 +627,7 @@ function js(e) {
|
|
|
627
627
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
628
628
|
return { selected: a, voteUp: r, voteDown: i };
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function Us(e) {
|
|
631
631
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
632
632
|
}
|
|
633
633
|
function Kt({
|
|
@@ -635,16 +635,16 @@ function Kt({
|
|
|
635
635
|
viewerLanguage: t
|
|
636
636
|
}) {
|
|
637
637
|
var r;
|
|
638
|
-
const s = e == null ? void 0 : e.text, a =
|
|
638
|
+
const s = e == null ? void 0 : e.text, a = Us(t);
|
|
639
639
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
640
640
|
}
|
|
641
|
-
const
|
|
641
|
+
const Gs = z.lazy(() => import("./Card-D8QPP3I9.js")), Hs = z.lazy(() => import("./Card-C8Q8MH6Y.js")), Ys = z.lazy(() => import("./Card-Bm_eCczn.js")), Xe = () => /* @__PURE__ */ n(
|
|
642
642
|
"div",
|
|
643
643
|
{
|
|
644
644
|
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)]",
|
|
645
645
|
"aria-hidden": !0
|
|
646
646
|
}
|
|
647
|
-
),
|
|
647
|
+
), qs = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Gs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Hs, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(Ye, { fallback: /* @__PURE__ */ n(Xe, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Ws = Jt, Xs = Zt, Ft = { Composer: qs, Sent: Jt, Received: Zt, Creator: Ws, Visitor: Xs }, Ks = [
|
|
648
648
|
[/pdf/, "pdf"],
|
|
649
649
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
650
650
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -654,42 +654,42 @@ const Us = O.lazy(() => import("./Card-DZVa2CeI.js")), Gs = O.lazy(() => import(
|
|
|
654
654
|
[/plain|rtf/, "text"],
|
|
655
655
|
[/markdown/, "markdown"]
|
|
656
656
|
];
|
|
657
|
-
function
|
|
657
|
+
function re(e) {
|
|
658
658
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
659
659
|
}
|
|
660
660
|
function Qt(e) {
|
|
661
|
-
const t =
|
|
661
|
+
const t = Ks.find(
|
|
662
662
|
([s]) => s.test(e)
|
|
663
663
|
);
|
|
664
664
|
return t ? t[1] : "generic";
|
|
665
665
|
}
|
|
666
|
-
const
|
|
666
|
+
const Js = {
|
|
667
667
|
video: Yt,
|
|
668
|
-
audio:
|
|
669
|
-
image:
|
|
668
|
+
audio: ms,
|
|
669
|
+
image: us,
|
|
670
670
|
document: Ht
|
|
671
|
-
},
|
|
672
|
-
pdf:
|
|
673
|
-
doc:
|
|
674
|
-
xls:
|
|
675
|
-
csv:
|
|
676
|
-
ppt:
|
|
677
|
-
zip:
|
|
678
|
-
text:
|
|
679
|
-
markdown:
|
|
671
|
+
}, Zs = {
|
|
672
|
+
pdf: ws,
|
|
673
|
+
doc: xs,
|
|
674
|
+
xls: vs,
|
|
675
|
+
csv: ps,
|
|
676
|
+
ppt: bs,
|
|
677
|
+
zip: gs,
|
|
678
|
+
text: fs,
|
|
679
|
+
markdown: hs,
|
|
680
680
|
generic: Ht
|
|
681
681
|
};
|
|
682
|
-
function
|
|
683
|
-
const t =
|
|
684
|
-
return t !== "document" ?
|
|
682
|
+
function Qs(e) {
|
|
683
|
+
const t = re(e);
|
|
684
|
+
return t !== "document" ? Js[t] : Zs[Qt(e)];
|
|
685
685
|
}
|
|
686
686
|
function ce(e, t) {
|
|
687
|
-
return
|
|
687
|
+
return z.createElement(Qs(e), t);
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const ea = (e) => {
|
|
690
690
|
var t, s;
|
|
691
691
|
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;
|
|
692
|
-
},
|
|
692
|
+
}, ta = ({
|
|
693
693
|
source: e,
|
|
694
694
|
mimeType: t,
|
|
695
695
|
poster: s,
|
|
@@ -701,71 +701,71 @@ const Qs = (e) => {
|
|
|
701
701
|
muted: d = !1,
|
|
702
702
|
onContainerClick: m
|
|
703
703
|
}) => {
|
|
704
|
-
const g =
|
|
704
|
+
const g = re(t), u = X(null), f = X(null), c = X(null), p = X(r), [N, v] = O(a), [x, w] = O(0), [A, T] = O(!1), [S, R] = O(!1), [I, C] = O(!1), [k, E] = O(!1), [D, V] = O(!0), [F, Z] = O(null), U = q(() => {
|
|
705
705
|
C(!1), v(!0);
|
|
706
|
-
}, []), G =
|
|
706
|
+
}, []), G = q((b) => {
|
|
707
707
|
const _ = f.current;
|
|
708
708
|
if (!_) return 0;
|
|
709
|
-
const
|
|
709
|
+
const L = _.getBoundingClientRect();
|
|
710
710
|
return Math.max(
|
|
711
711
|
0,
|
|
712
|
-
Math.min(1, (
|
|
712
|
+
Math.min(1, (ea(b) - L.left) / L.width)
|
|
713
713
|
);
|
|
714
|
-
}, []), P =
|
|
714
|
+
}, []), P = q((b) => {
|
|
715
715
|
const _ = u.current;
|
|
716
|
-
_ && _.duration && (_.currentTime =
|
|
717
|
-
}, []), B = (
|
|
718
|
-
|
|
719
|
-
const _ = G(
|
|
716
|
+
_ && _.duration && (_.currentTime = b * _.duration);
|
|
717
|
+
}, []), B = (b) => {
|
|
718
|
+
b.stopPropagation(), T(!0);
|
|
719
|
+
const _ = G(b);
|
|
720
720
|
w(_), P(_);
|
|
721
721
|
};
|
|
722
722
|
J(() => {
|
|
723
|
-
r !== void 0 && r !==
|
|
723
|
+
r !== void 0 && r !== p.current && (p.current = r, v(r));
|
|
724
724
|
}, [r]), J(() => {
|
|
725
725
|
if (!N) {
|
|
726
726
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const b = () => {
|
|
730
730
|
const _ = u.current;
|
|
731
|
-
_ && _.duration && !
|
|
731
|
+
_ && _.duration && !A && w(_.currentTime / _.duration), c.current = requestAnimationFrame(b);
|
|
732
732
|
};
|
|
733
|
-
return c.current = requestAnimationFrame(
|
|
733
|
+
return c.current = requestAnimationFrame(b), () => {
|
|
734
734
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
735
735
|
};
|
|
736
|
-
}, [N,
|
|
737
|
-
const
|
|
738
|
-
|
|
736
|
+
}, [N, A]), J(() => {
|
|
737
|
+
const b = u.current;
|
|
738
|
+
b && (N ? b.play().catch((_) => {
|
|
739
739
|
v(!1), C(!0);
|
|
740
|
-
}) :
|
|
740
|
+
}) : b.pause());
|
|
741
741
|
}, [N]), J(() => {
|
|
742
|
-
if (!
|
|
743
|
-
const
|
|
744
|
-
|
|
742
|
+
if (!A) return;
|
|
743
|
+
const b = (L) => w(G(L)), _ = (L) => {
|
|
744
|
+
T(!1), P(G(L));
|
|
745
745
|
};
|
|
746
|
-
return window.addEventListener("mousemove",
|
|
747
|
-
window.removeEventListener("mousemove",
|
|
746
|
+
return window.addEventListener("mousemove", b), window.addEventListener("mouseup", _), window.addEventListener("touchmove", b, { passive: !0 }), window.addEventListener("touchend", _), () => {
|
|
747
|
+
window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", _), window.removeEventListener("touchmove", b), window.removeEventListener("touchend", _);
|
|
748
748
|
};
|
|
749
|
-
}, [
|
|
750
|
-
const
|
|
749
|
+
}, [A, G, P]);
|
|
750
|
+
const H = F ? { aspectRatio: String(F) } : void 0, Y = F ? "" : " aspect-video", $ = Math.round(x * 100);
|
|
751
751
|
return /* @__PURE__ */ h(
|
|
752
752
|
"div",
|
|
753
753
|
{
|
|
754
754
|
role: "button",
|
|
755
755
|
tabIndex: 0,
|
|
756
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
757
|
-
style:
|
|
758
|
-
onClick: (
|
|
756
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${Y}`,
|
|
757
|
+
style: H,
|
|
758
|
+
onClick: (b) => {
|
|
759
759
|
if (m) {
|
|
760
|
-
m(
|
|
760
|
+
m(b);
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
763
|
I || o && v((_) => !_);
|
|
764
764
|
},
|
|
765
|
-
onKeyDown: (
|
|
766
|
-
if (!(
|
|
767
|
-
if (
|
|
768
|
-
m(
|
|
765
|
+
onKeyDown: (b) => {
|
|
766
|
+
if (!(b.key !== "Enter" && b.key !== " ")) {
|
|
767
|
+
if (b.preventDefault(), m) {
|
|
768
|
+
m(b);
|
|
769
769
|
return;
|
|
770
770
|
}
|
|
771
771
|
I || o && v((_) => !_);
|
|
@@ -819,8 +819,8 @@ const Qs = (e) => {
|
|
|
819
819
|
onWaiting: () => E(!0),
|
|
820
820
|
onPlay: () => C(!1),
|
|
821
821
|
onLoadedMetadata: () => {
|
|
822
|
-
const
|
|
823
|
-
|
|
822
|
+
const b = u.current;
|
|
823
|
+
b instanceof HTMLVideoElement && b.videoWidth && b.videoHeight && Z(b.videoWidth / b.videoHeight);
|
|
824
824
|
},
|
|
825
825
|
onEnded: () => {
|
|
826
826
|
i || (v(!1), w(0));
|
|
@@ -842,13 +842,13 @@ const Qs = (e) => {
|
|
|
842
842
|
role: "button",
|
|
843
843
|
tabIndex: 0,
|
|
844
844
|
"aria-label": "Play preview",
|
|
845
|
-
onClick: (
|
|
846
|
-
|
|
845
|
+
onClick: (b) => {
|
|
846
|
+
b.stopPropagation(), U();
|
|
847
847
|
},
|
|
848
|
-
onKeyDown: (
|
|
849
|
-
|
|
848
|
+
onKeyDown: (b) => {
|
|
849
|
+
b.key !== "Enter" && b.key !== " " || (b.preventDefault(), b.stopPropagation(), U());
|
|
850
850
|
},
|
|
851
|
-
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(
|
|
851
|
+
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(Be, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
852
852
|
}
|
|
853
853
|
),
|
|
854
854
|
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(
|
|
@@ -864,9 +864,9 @@ const Qs = (e) => {
|
|
|
864
864
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
865
865
|
onMouseDown: B,
|
|
866
866
|
onTouchStart: B,
|
|
867
|
-
onClick: (
|
|
868
|
-
onKeyDown: (
|
|
869
|
-
|
|
867
|
+
onClick: (b) => b.stopPropagation(),
|
|
868
|
+
onKeyDown: (b) => {
|
|
869
|
+
b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
|
|
870
870
|
},
|
|
871
871
|
children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
|
|
872
872
|
"div",
|
|
@@ -882,12 +882,12 @@ const Qs = (e) => {
|
|
|
882
882
|
"button",
|
|
883
883
|
{
|
|
884
884
|
type: "button",
|
|
885
|
-
onClick: (
|
|
886
|
-
|
|
885
|
+
onClick: (b) => {
|
|
886
|
+
b.stopPropagation(), v((_) => !_);
|
|
887
887
|
},
|
|
888
888
|
className: "shrink-0 text-white",
|
|
889
889
|
"aria-label": N ? "Pause" : "Play",
|
|
890
|
-
children: N ? /* @__PURE__ */ n(
|
|
890
|
+
children: N ? /* @__PURE__ */ n(Ns, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
891
891
|
}
|
|
892
892
|
),
|
|
893
893
|
/* @__PURE__ */ h(
|
|
@@ -903,17 +903,17 @@ const Qs = (e) => {
|
|
|
903
903
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
904
904
|
onMouseDown: B,
|
|
905
905
|
onTouchStart: B,
|
|
906
|
-
onClick: (
|
|
907
|
-
onMouseEnter: () =>
|
|
908
|
-
onMouseLeave: () =>
|
|
909
|
-
onKeyDown: (
|
|
910
|
-
|
|
906
|
+
onClick: (b) => b.stopPropagation(),
|
|
907
|
+
onMouseEnter: () => R(!0),
|
|
908
|
+
onMouseLeave: () => R(!1),
|
|
909
|
+
onKeyDown: (b) => {
|
|
910
|
+
b.key === "ArrowRight" && P(Math.min(1, x + 0.05)), b.key === "ArrowLeft" && P(Math.max(0, x - 0.05));
|
|
911
911
|
},
|
|
912
912
|
children: [
|
|
913
913
|
/* @__PURE__ */ n(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
916
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S ||
|
|
916
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || A ? "h-1.5" : "h-1"}`,
|
|
917
917
|
children: /* @__PURE__ */ n(
|
|
918
918
|
"div",
|
|
919
919
|
{
|
|
@@ -926,7 +926,7 @@ const Qs = (e) => {
|
|
|
926
926
|
/* @__PURE__ */ n(
|
|
927
927
|
"div",
|
|
928
928
|
{
|
|
929
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S ||
|
|
929
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
930
930
|
style: { left: `${$}%` }
|
|
931
931
|
}
|
|
932
932
|
)
|
|
@@ -937,7 +937,7 @@ const Qs = (e) => {
|
|
|
937
937
|
]
|
|
938
938
|
}
|
|
939
939
|
);
|
|
940
|
-
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
940
|
+
}, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", na = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
|
|
941
941
|
mimeType: e,
|
|
942
942
|
sourceUrl: t,
|
|
943
943
|
thumbnailUrl: s,
|
|
@@ -946,9 +946,9 @@ const Qs = (e) => {
|
|
|
946
946
|
mediaPlayerProps: i,
|
|
947
947
|
containedImage: o = !1
|
|
948
948
|
}) => {
|
|
949
|
-
const l =
|
|
949
|
+
const l = re(e), [d, m] = O(!1);
|
|
950
950
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
951
|
-
|
|
951
|
+
ta,
|
|
952
952
|
{
|
|
953
953
|
source: t,
|
|
954
954
|
mimeType: e,
|
|
@@ -999,7 +999,7 @@ const Qs = (e) => {
|
|
|
999
999
|
weight: "regular"
|
|
1000
1000
|
})
|
|
1001
1001
|
}
|
|
1002
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
1002
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${na(r)}`, children: /* @__PURE__ */ n(
|
|
1003
1003
|
"img",
|
|
1004
1004
|
{
|
|
1005
1005
|
src: s,
|
|
@@ -1031,7 +1031,7 @@ const Qs = (e) => {
|
|
|
1031
1031
|
rootRef: g,
|
|
1032
1032
|
"data-testid": u
|
|
1033
1033
|
}) => {
|
|
1034
|
-
const f = e === "dark", c = f ? s ?? a : s ?? "",
|
|
1034
|
+
const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
|
|
1035
1035
|
return /* @__PURE__ */ h(
|
|
1036
1036
|
"div",
|
|
1037
1037
|
{
|
|
@@ -1051,8 +1051,8 @@ const Qs = (e) => {
|
|
|
1051
1051
|
{
|
|
1052
1052
|
className: y("mb-0.5 truncate text-base font-medium", {
|
|
1053
1053
|
"text-black": !f,
|
|
1054
|
-
"text-white/30": f &&
|
|
1055
|
-
"text-white": f && !
|
|
1054
|
+
"text-white/30": f && p,
|
|
1055
|
+
"text-white": f && !p
|
|
1056
1056
|
}),
|
|
1057
1057
|
children: c
|
|
1058
1058
|
}
|
|
@@ -1089,23 +1089,23 @@ function nn(e) {
|
|
|
1089
1089
|
function Ke(e) {
|
|
1090
1090
|
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)]`;
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function sa(e) {
|
|
1093
1093
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function aa(e) {
|
|
1096
1096
|
return e ? "text-white" : "text-black";
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function ra(e) {
|
|
1099
1099
|
return e ? "text-white/55" : "text-black/55";
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function ia(e) {
|
|
1102
1102
|
return e ? "text-white/40" : "text-black/40";
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function oa(e) {
|
|
1105
1105
|
return e ? "text-white/20" : "text-black/20";
|
|
1106
1106
|
}
|
|
1107
1107
|
const Je = ({ attachment: e, isMyMessage: t }) => {
|
|
1108
|
-
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(
|
|
1108
|
+
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(z.Fragment, { children: [
|
|
1109
1109
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1110
1110
|
"img",
|
|
1111
1111
|
{
|
|
@@ -1116,14 +1116,14 @@ const Je = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1116
1116
|
) : /* @__PURE__ */ n(
|
|
1117
1117
|
"div",
|
|
1118
1118
|
{
|
|
1119
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1120
|
-
children: /* @__PURE__ */ n(
|
|
1119
|
+
className: `aspect-video w-full rounded-[20px] ${sa(t)} flex items-center justify-center`,
|
|
1120
|
+
children: /* @__PURE__ */ n(_s, { className: `size-12 ${oa(t)}` })
|
|
1121
1121
|
}
|
|
1122
1122
|
) }),
|
|
1123
1123
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1124
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1125
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1126
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1124
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${aa(t)}`, children: s }),
|
|
1125
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ra(t)}`, children: a }),
|
|
1126
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ia(t)}`, children: d })
|
|
1127
1127
|
] })
|
|
1128
1128
|
] });
|
|
1129
1129
|
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 });
|
|
@@ -1135,7 +1135,7 @@ function Ze(e) {
|
|
|
1135
1135
|
var t;
|
|
1136
1136
|
return (t = e.attachments) == null ? void 0 : t.find(sn);
|
|
1137
1137
|
}
|
|
1138
|
-
async function
|
|
1138
|
+
async function la(e, t) {
|
|
1139
1139
|
let s;
|
|
1140
1140
|
try {
|
|
1141
1141
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1147,11 +1147,11 @@ async function oa(e, t) {
|
|
|
1147
1147
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1148
1148
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1149
1149
|
}
|
|
1150
|
-
const
|
|
1150
|
+
const ca = ({
|
|
1151
1151
|
url: e,
|
|
1152
1152
|
filename: t
|
|
1153
1153
|
}) => {
|
|
1154
|
-
const [s, a] =
|
|
1154
|
+
const [s, a] = O(!1);
|
|
1155
1155
|
return /* @__PURE__ */ n(
|
|
1156
1156
|
"button",
|
|
1157
1157
|
{
|
|
@@ -1159,7 +1159,7 @@ const la = ({
|
|
|
1159
1159
|
onClick: (i) => {
|
|
1160
1160
|
i.stopPropagation();
|
|
1161
1161
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1162
|
-
a(!0),
|
|
1162
|
+
a(!0), la(e, t).then(() => {
|
|
1163
1163
|
o == null || o.close();
|
|
1164
1164
|
}).catch(() => {
|
|
1165
1165
|
o && (o.location.href = e);
|
|
@@ -1167,7 +1167,7 @@ const la = ({
|
|
|
1167
1167
|
},
|
|
1168
1168
|
disabled: s,
|
|
1169
1169
|
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",
|
|
1170
|
-
children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(
|
|
1170
|
+
children: s ? /* @__PURE__ */ n(fe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(z.Fragment, { children: [
|
|
1171
1171
|
/* @__PURE__ */ n(ge, { className: "size-4 text-white", weight: "bold" }),
|
|
1172
1172
|
"Download"
|
|
1173
1173
|
] })
|
|
@@ -1175,14 +1175,14 @@ const la = ({
|
|
|
1175
1175
|
);
|
|
1176
1176
|
};
|
|
1177
1177
|
function Qe(e) {
|
|
1178
|
-
var u, f, c,
|
|
1178
|
+
var u, f, c, p;
|
|
1179
1179
|
const t = (u = e.attachments) == null ? void 0 : u.find(
|
|
1180
1180
|
(N) => N.type === "video" && N.asset_url
|
|
1181
1181
|
), s = (f = e.attachments) == null ? void 0 : f.find(
|
|
1182
1182
|
(N) => N.type === "image" && N.image_url
|
|
1183
1183
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1184
1184
|
(N) => N.type === "audio" && N.asset_url
|
|
1185
|
-
), r = (
|
|
1185
|
+
), r = (p = e.attachments) == null ? void 0 : p.find(
|
|
1186
1186
|
(N) => N.type === "file" && N.asset_url
|
|
1187
1187
|
), i = t ?? s ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1188
1188
|
if (!o) return null;
|
|
@@ -1230,7 +1230,7 @@ const an = ({
|
|
|
1230
1230
|
fileSize: a,
|
|
1231
1231
|
thumbnailUrl: r
|
|
1232
1232
|
}) => {
|
|
1233
|
-
const i =
|
|
1233
|
+
const i = re(t), o = a !== void 0 ? nn(a) : void 0;
|
|
1234
1234
|
return /* @__PURE__ */ n(
|
|
1235
1235
|
tn,
|
|
1236
1236
|
{
|
|
@@ -1249,17 +1249,17 @@ const an = ({
|
|
|
1249
1249
|
containedImage: i === "image" || i === "document"
|
|
1250
1250
|
}
|
|
1251
1251
|
),
|
|
1252
|
-
action: /* @__PURE__ */ n(
|
|
1252
|
+
action: /* @__PURE__ */ n(ca, { url: e, filename: s })
|
|
1253
1253
|
}
|
|
1254
1254
|
);
|
|
1255
|
-
},
|
|
1255
|
+
}, da = ({
|
|
1256
1256
|
message: e,
|
|
1257
1257
|
isMyMessage: t = !1
|
|
1258
1258
|
}) => {
|
|
1259
1259
|
const s = Ze(e), a = Qe(e);
|
|
1260
1260
|
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: [
|
|
1261
1261
|
!t && e.user && /* @__PURE__ */ n(
|
|
1262
|
-
|
|
1262
|
+
ae,
|
|
1263
1263
|
{
|
|
1264
1264
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1265
1265
|
id: e.user.id,
|
|
@@ -1283,7 +1283,7 @@ const an = ({
|
|
|
1283
1283
|
}
|
|
1284
1284
|
)
|
|
1285
1285
|
] });
|
|
1286
|
-
},
|
|
1286
|
+
}, ua = ({
|
|
1287
1287
|
message: e
|
|
1288
1288
|
}) => {
|
|
1289
1289
|
const t = Ze(e);
|
|
@@ -1291,7 +1291,7 @@ const an = ({
|
|
|
1291
1291
|
return /* @__PURE__ */ n("div", { className: Ke(!0), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !0 }) });
|
|
1292
1292
|
const s = Qe(e);
|
|
1293
1293
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1294
|
-
},
|
|
1294
|
+
}, ma = ({
|
|
1295
1295
|
message: e
|
|
1296
1296
|
}) => {
|
|
1297
1297
|
const t = Ze(e);
|
|
@@ -1299,18 +1299,18 @@ const an = ({
|
|
|
1299
1299
|
return /* @__PURE__ */ n("div", { className: Ke(!1), children: /* @__PURE__ */ n(Je, { attachment: t, isMyMessage: !1 }) });
|
|
1300
1300
|
const s = Qe(e);
|
|
1301
1301
|
return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
|
|
1302
|
-
},
|
|
1303
|
-
Creator:
|
|
1304
|
-
Visitor:
|
|
1305
|
-
}),
|
|
1302
|
+
}, wi = Object.assign(da, {
|
|
1303
|
+
Creator: ua,
|
|
1304
|
+
Visitor: ma
|
|
1305
|
+
}), ha = {
|
|
1306
1306
|
isUnlocking: () => !1
|
|
1307
|
-
},
|
|
1308
|
-
LockedAttachment:
|
|
1309
|
-
}, on =
|
|
1310
|
-
function
|
|
1311
|
-
return
|
|
1307
|
+
}, fa = {
|
|
1308
|
+
LockedAttachment: ha
|
|
1309
|
+
}, on = He({}), Ni = on.Provider;
|
|
1310
|
+
function ga(e) {
|
|
1311
|
+
return Se(on)[e] ?? fa[e];
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1313
|
+
const ba = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1314
1314
|
"svg",
|
|
1315
1315
|
{
|
|
1316
1316
|
width: e,
|
|
@@ -1327,22 +1327,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1327
1327
|
}
|
|
1328
1328
|
)
|
|
1329
1329
|
}
|
|
1330
|
-
),
|
|
1330
|
+
), pa = (e) => {
|
|
1331
1331
|
var t;
|
|
1332
1332
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1333
|
-
},
|
|
1333
|
+
}, va = (e) => {
|
|
1334
1334
|
var t;
|
|
1335
1335
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1336
1336
|
}, Ce = (e) => {
|
|
1337
1337
|
var t;
|
|
1338
1338
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1339
|
-
},
|
|
1339
|
+
}, xa = (e) => {
|
|
1340
1340
|
var t;
|
|
1341
1341
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1342
|
-
}, ln = (e) =>
|
|
1342
|
+
}, ln = (e) => pa(e) || va(e), wa = (e) => {
|
|
1343
1343
|
var t;
|
|
1344
1344
|
return ln(e) && !((t = e.text) != null && t.trim());
|
|
1345
|
-
},
|
|
1345
|
+
}, Pe = ({
|
|
1346
1346
|
message: e,
|
|
1347
1347
|
standalone: t = !1,
|
|
1348
1348
|
isMyMessage: s = !1,
|
|
@@ -1355,25 +1355,25 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1355
1355
|
if (r) {
|
|
1356
1356
|
const f = (u = e.metadata) == null ? void 0 : u.amount_text;
|
|
1357
1357
|
if (!f) return null;
|
|
1358
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
1358
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1359
1359
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1360
|
-
/* @__PURE__ */ n(
|
|
1361
|
-
/* @__PURE__ */ n("span", { children:
|
|
1360
|
+
/* @__PURE__ */ n(ys, { size: t ? 14 : 12 }),
|
|
1361
|
+
/* @__PURE__ */ n("span", { children: p })
|
|
1362
1362
|
] });
|
|
1363
1363
|
}
|
|
1364
1364
|
const o = s && a, l = o ? "Sent with AI" : "Sent with DM Agent", d = [
|
|
1365
1365
|
"message-chatbot-indicator",
|
|
1366
1366
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1367
1367
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1368
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(
|
|
1369
|
-
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(
|
|
1368
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(ba, { size: o ? 12 : 15 }) });
|
|
1369
|
+
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
|
|
1370
1370
|
m,
|
|
1371
1371
|
g
|
|
1372
|
-
] }) : /* @__PURE__ */ h(
|
|
1372
|
+
] }) : /* @__PURE__ */ h(se, { children: [
|
|
1373
1373
|
g,
|
|
1374
1374
|
m
|
|
1375
1375
|
] }) });
|
|
1376
|
-
},
|
|
1376
|
+
}, Na = ({
|
|
1377
1377
|
selected: e,
|
|
1378
1378
|
onVoteUp: t,
|
|
1379
1379
|
onVoteDown: s
|
|
@@ -1389,7 +1389,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1389
1389
|
"aria-label": "Good response",
|
|
1390
1390
|
"aria-pressed": e === "up",
|
|
1391
1391
|
"data-tooltip": "Good response",
|
|
1392
|
-
children: /* @__PURE__ */ n(
|
|
1392
|
+
children: /* @__PURE__ */ n(Cs, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1393
1393
|
}
|
|
1394
1394
|
),
|
|
1395
1395
|
/* @__PURE__ */ n(
|
|
@@ -1403,10 +1403,10 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1403
1403
|
"aria-label": "Bad response",
|
|
1404
1404
|
"aria-pressed": e === "down",
|
|
1405
1405
|
"data-tooltip": "Bad response",
|
|
1406
|
-
children: /* @__PURE__ */ n(
|
|
1406
|
+
children: /* @__PURE__ */ n(ks, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1407
1407
|
}
|
|
1408
1408
|
)
|
|
1409
|
-
] }),
|
|
1409
|
+
] }), _a = (e) => {
|
|
1410
1410
|
var gt, bt, pt, vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It, St;
|
|
1411
1411
|
const {
|
|
1412
1412
|
additionalMessageInputProps: t,
|
|
@@ -1422,69 +1422,69 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1422
1422
|
isMessageAIGenerated: u,
|
|
1423
1423
|
isMyMessage: f,
|
|
1424
1424
|
message: c,
|
|
1425
|
-
renderText:
|
|
1425
|
+
renderText: p,
|
|
1426
1426
|
threadList: N,
|
|
1427
1427
|
viewerLanguage: v
|
|
1428
|
-
} = e, { client: x } = qe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking:
|
|
1429
|
-
Attachment: F =
|
|
1430
|
-
EditMessageModal:
|
|
1428
|
+
} = e, { client: x } = qe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: S, onDownloadClick: R } = ga("LockedAttachment"), [I, C] = O(!1), k = Mn(c.id), { selected: E, voteUp: D, voteDown: V } = Vs(c), {
|
|
1429
|
+
Attachment: F = Dn,
|
|
1430
|
+
EditMessageModal: Z = Rn,
|
|
1431
1431
|
MessageActions: U,
|
|
1432
|
-
MessageBlocked: G =
|
|
1433
|
-
MessageBouncePrompt: P =
|
|
1434
|
-
MessageDeleted: B =
|
|
1435
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
1436
|
-
MessageRepliesCountButton:
|
|
1437
|
-
ReminderNotification: $ =
|
|
1438
|
-
StreamedMessageText:
|
|
1432
|
+
MessageBlocked: G = Ln,
|
|
1433
|
+
MessageBouncePrompt: P = Pn,
|
|
1434
|
+
MessageDeleted: B = On,
|
|
1435
|
+
MessageIsThreadReplyInChannelButtonIndicator: H = zn,
|
|
1436
|
+
MessageRepliesCountButton: Y = Fn,
|
|
1437
|
+
ReminderNotification: $ = $n,
|
|
1438
|
+
StreamedMessageText: b = Bn,
|
|
1439
1439
|
PinIndicator: _
|
|
1440
|
-
} = Ut("CustomMessage"),
|
|
1440
|
+
} = Ut("CustomMessage"), L = jn(c), M = Vn(c), W = ne(
|
|
1441
1441
|
() => u == null ? void 0 : u(c),
|
|
1442
1442
|
[u, c]
|
|
1443
|
-
),
|
|
1443
|
+
), j = ne(() => {
|
|
1444
1444
|
const me = c.attachments ?? [], _e = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1445
1445
|
if (!Ce(c)) return _e;
|
|
1446
1446
|
const Tt = _e.filter((At) => !("type" in At) || !sn(At));
|
|
1447
1447
|
return Tt.length === _e.length ? _e : Tt;
|
|
1448
|
-
}, [c]),
|
|
1448
|
+
}, [c]), K = ne(() => {
|
|
1449
1449
|
const me = Kt({ message: c, viewerLanguage: v });
|
|
1450
1450
|
return me === c.text ? c : { ...c, text: me };
|
|
1451
1451
|
}, [c, v]);
|
|
1452
|
-
if (
|
|
1452
|
+
if (Un(c))
|
|
1453
1453
|
return null;
|
|
1454
1454
|
if (c.deleted_at || c.type === "deleted")
|
|
1455
1455
|
return /* @__PURE__ */ n(B, { message: c });
|
|
1456
|
-
if (
|
|
1456
|
+
if (Gn(c))
|
|
1457
1457
|
return /* @__PURE__ */ n(G, {});
|
|
1458
|
-
const
|
|
1458
|
+
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);
|
|
1459
1459
|
let ie;
|
|
1460
1460
|
ct ? ie = () => m(c) : dt && (ie = () => C(!0));
|
|
1461
|
-
const ue = f(),
|
|
1461
|
+
const ue = f(), En = y(
|
|
1462
1462
|
"str-chat__message str-chat__message-simple",
|
|
1463
1463
|
`str-chat__message--${c.type}`,
|
|
1464
1464
|
`str-chat__message--${c.status}`,
|
|
1465
1465
|
ue ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
1466
1466
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
1467
1467
|
{
|
|
1468
|
-
"str-chat__message--has-attachment":
|
|
1468
|
+
"str-chat__message--has-attachment": L,
|
|
1469
1469
|
"str-chat__message--highlighted": g,
|
|
1470
1470
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
1471
|
-
"str-chat__message--with-reactions":
|
|
1471
|
+
"str-chat__message--with-reactions": M,
|
|
1472
1472
|
"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,
|
|
1473
|
-
"str-chat__message-with-thread-link":
|
|
1473
|
+
"str-chat__message-with-thread-link": ee || Q,
|
|
1474
1474
|
"str-chat__virtual-message__wrapper--end": r,
|
|
1475
1475
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1476
1476
|
"str-chat__virtual-message__wrapper--group": o
|
|
1477
1477
|
}
|
|
1478
|
-
), ut = c.poll_id && x.polls.fromState(c.poll_id), mt =
|
|
1479
|
-
return /* @__PURE__ */ h(
|
|
1478
|
+
), ut = c.poll_id && x.polls.fromState(c.poll_id), mt = wa(c), oe = Ce(c), ht = xa(c), Me = !!(j != null && j.length && !c.quoted_message), ft = oe && ue && Me;
|
|
1479
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1480
1480
|
a && /* @__PURE__ */ n(
|
|
1481
|
-
|
|
1481
|
+
Z,
|
|
1482
1482
|
{
|
|
1483
1483
|
additionalMessageInputProps: t
|
|
1484
1484
|
}
|
|
1485
1485
|
),
|
|
1486
1486
|
I && /* @__PURE__ */ n(
|
|
1487
|
-
|
|
1487
|
+
Yn,
|
|
1488
1488
|
{
|
|
1489
1489
|
MessageBouncePrompt: P,
|
|
1490
1490
|
onClose: () => C(!1),
|
|
@@ -1494,13 +1494,13 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1494
1494
|
/* @__PURE__ */ h(
|
|
1495
1495
|
"div",
|
|
1496
1496
|
{
|
|
1497
|
-
className:
|
|
1497
|
+
className: En,
|
|
1498
1498
|
"data-message-id": c.id,
|
|
1499
1499
|
children: [
|
|
1500
1500
|
_ && /* @__PURE__ */ n(_, {}),
|
|
1501
1501
|
!!k && /* @__PURE__ */ n($, { reminder: k }),
|
|
1502
1502
|
c.user && /* @__PURE__ */ n(
|
|
1503
|
-
|
|
1503
|
+
ae,
|
|
1504
1504
|
{
|
|
1505
1505
|
className: "str-chat__avatar str-chat__message-sender-avatar",
|
|
1506
1506
|
id: c.user.id,
|
|
@@ -1540,7 +1540,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1540
1540
|
amountText: (wt = c.metadata) == null ? void 0 : wt.amount_text,
|
|
1541
1541
|
detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
|
|
1542
1542
|
paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
|
|
1543
|
-
onPreviewClick: () =>
|
|
1543
|
+
onPreviewClick: () => T == null ? void 0 : T(c, w),
|
|
1544
1544
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w))
|
|
1545
1545
|
}
|
|
1546
1546
|
)
|
|
@@ -1554,10 +1554,10 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1554
1554
|
amountText: (Et = c.metadata) == null ? void 0 : Et.amount_text,
|
|
1555
1555
|
detail: (It = c.metadata) == null ? void 0 : It.attachment_detail,
|
|
1556
1556
|
paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
|
|
1557
|
-
isUnlocking:
|
|
1558
|
-
onUnlockClick: () =>
|
|
1557
|
+
isUnlocking: A(c.id),
|
|
1558
|
+
onUnlockClick: () => T == null ? void 0 : T(c, w),
|
|
1559
1559
|
onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
|
|
1560
|
-
onDownloadClick: () =>
|
|
1560
|
+
onDownloadClick: () => R == null ? void 0 : R(c, w)
|
|
1561
1561
|
}
|
|
1562
1562
|
),
|
|
1563
1563
|
U && /* @__PURE__ */ n(U, {})
|
|
@@ -1565,58 +1565,58 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1565
1565
|
c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
|
|
1566
1566
|
Mt,
|
|
1567
1567
|
{
|
|
1568
|
-
message:
|
|
1569
|
-
renderText:
|
|
1568
|
+
message: K,
|
|
1569
|
+
renderText: p
|
|
1570
1570
|
}
|
|
1571
1571
|
) })
|
|
1572
1572
|
] }) : mt ? (
|
|
1573
1573
|
/* Tip-only messages render as a standalone bubble */
|
|
1574
|
-
/* @__PURE__ */ n(
|
|
1574
|
+
/* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
|
|
1575
1575
|
) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
|
|
1576
1576
|
oe && !ft && /* @__PURE__ */ n(
|
|
1577
|
-
|
|
1577
|
+
Pe,
|
|
1578
1578
|
{
|
|
1579
1579
|
message: c,
|
|
1580
|
-
hasAttachment:
|
|
1580
|
+
hasAttachment: Me,
|
|
1581
1581
|
isMyMessage: ue
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
|
-
ut && /* @__PURE__ */ n(
|
|
1585
|
-
|
|
1584
|
+
ut && /* @__PURE__ */ n(qn, { poll: ut }),
|
|
1585
|
+
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1586
1586
|
F,
|
|
1587
1587
|
{
|
|
1588
1588
|
actionHandler: l,
|
|
1589
|
-
attachments:
|
|
1589
|
+
attachments: j
|
|
1590
1590
|
}
|
|
1591
1591
|
) : null,
|
|
1592
|
-
|
|
1593
|
-
|
|
1592
|
+
W ? /* @__PURE__ */ n(
|
|
1593
|
+
b,
|
|
1594
1594
|
{
|
|
1595
|
-
message:
|
|
1596
|
-
renderText:
|
|
1595
|
+
message: K,
|
|
1596
|
+
renderText: p
|
|
1597
1597
|
}
|
|
1598
1598
|
) : /* @__PURE__ */ n(
|
|
1599
1599
|
Mt,
|
|
1600
1600
|
{
|
|
1601
|
-
message:
|
|
1602
|
-
renderText:
|
|
1601
|
+
message: K,
|
|
1602
|
+
renderText: p
|
|
1603
1603
|
}
|
|
1604
1604
|
),
|
|
1605
|
-
/* @__PURE__ */ n(
|
|
1605
|
+
/* @__PURE__ */ n(Wn, {})
|
|
1606
1606
|
] }) })
|
|
1607
1607
|
}
|
|
1608
1608
|
),
|
|
1609
1609
|
!ht && !mt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
|
|
1610
1610
|
(!oe || ft) && /* @__PURE__ */ n(
|
|
1611
|
-
|
|
1611
|
+
Pe,
|
|
1612
1612
|
{
|
|
1613
1613
|
message: c,
|
|
1614
|
-
hasAttachment:
|
|
1614
|
+
hasAttachment: Me,
|
|
1615
1615
|
isMyMessage: ue
|
|
1616
1616
|
}
|
|
1617
1617
|
),
|
|
1618
1618
|
s && oe && /* @__PURE__ */ n(
|
|
1619
|
-
|
|
1619
|
+
Na,
|
|
1620
1620
|
{
|
|
1621
1621
|
selected: E,
|
|
1622
1622
|
onVoteUp: D,
|
|
@@ -1624,26 +1624,26 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1624
1624
|
}
|
|
1625
1625
|
)
|
|
1626
1626
|
] }),
|
|
1627
|
-
|
|
1628
|
-
|
|
1627
|
+
ee && /* @__PURE__ */ n(
|
|
1628
|
+
Y,
|
|
1629
1629
|
{
|
|
1630
1630
|
onClick: d,
|
|
1631
1631
|
reply_count: c.reply_count
|
|
1632
1632
|
}
|
|
1633
1633
|
),
|
|
1634
|
-
|
|
1634
|
+
Q && /* @__PURE__ */ n(H, {})
|
|
1635
1635
|
]
|
|
1636
1636
|
},
|
|
1637
1637
|
c.id
|
|
1638
1638
|
)
|
|
1639
1639
|
] });
|
|
1640
|
-
},
|
|
1641
|
-
|
|
1642
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
1643
|
-
),
|
|
1640
|
+
}, ya = z.memo(
|
|
1641
|
+
_a,
|
|
1642
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
1643
|
+
), Ca = (e) => {
|
|
1644
1644
|
const t = be("CustomMessage");
|
|
1645
|
-
return /* @__PURE__ */ n(
|
|
1646
|
-
},
|
|
1645
|
+
return /* @__PURE__ */ n(ya, { ...t, ...e });
|
|
1646
|
+
}, ka = () => {
|
|
1647
1647
|
var s;
|
|
1648
1648
|
const { handleDelete: e, message: t } = be("CustomMessageActions");
|
|
1649
1649
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -1653,10 +1653,10 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1653
1653
|
"aria-label": "Delete",
|
|
1654
1654
|
title: "Delete",
|
|
1655
1655
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1656
|
-
children: /* @__PURE__ */ n(
|
|
1656
|
+
children: /* @__PURE__ */ n(Es, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1657
1657
|
}
|
|
1658
1658
|
);
|
|
1659
|
-
},
|
|
1659
|
+
}, Ea = () => {
|
|
1660
1660
|
const { handleFlag: e } = be("CustomMessageActions");
|
|
1661
1661
|
return /* @__PURE__ */ n(
|
|
1662
1662
|
qt,
|
|
@@ -1668,23 +1668,23 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1668
1668
|
children: /* @__PURE__ */ n(Gt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1669
1669
|
}
|
|
1670
1670
|
);
|
|
1671
|
-
},
|
|
1671
|
+
}, Ia = () => {
|
|
1672
1672
|
var t;
|
|
1673
1673
|
const { message: e } = be("CustomMessageActions");
|
|
1674
1674
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1675
|
-
|
|
1675
|
+
Ms,
|
|
1676
1676
|
{
|
|
1677
1677
|
messageActionSet: [
|
|
1678
|
-
{ Component:
|
|
1679
|
-
{ Component:
|
|
1678
|
+
{ Component: ka, placement: "quick", type: "delete" },
|
|
1679
|
+
{ Component: Ea, placement: "quick", type: "flag" }
|
|
1680
1680
|
]
|
|
1681
1681
|
}
|
|
1682
1682
|
);
|
|
1683
|
-
},
|
|
1683
|
+
}, Sa = (e) => ({
|
|
1684
1684
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1685
1685
|
(t) => Pt.previewIsLoaded(t) || Pt.previewIsLoading(t)
|
|
1686
1686
|
)
|
|
1687
|
-
}),
|
|
1687
|
+
}), Ta = ({
|
|
1688
1688
|
link: e,
|
|
1689
1689
|
onDismiss: t
|
|
1690
1690
|
}) => {
|
|
@@ -1724,22 +1724,22 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1724
1724
|
]
|
|
1725
1725
|
}
|
|
1726
1726
|
);
|
|
1727
|
-
},
|
|
1728
|
-
const { linkPreviewsManager: e } =
|
|
1727
|
+
}, Aa = () => {
|
|
1728
|
+
const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
|
|
1729
1729
|
e.state,
|
|
1730
|
-
|
|
1730
|
+
Sa
|
|
1731
1731
|
), s = (r) => {
|
|
1732
1732
|
e.dismissPreview(r);
|
|
1733
1733
|
};
|
|
1734
1734
|
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(
|
|
1735
|
-
|
|
1735
|
+
Ta,
|
|
1736
1736
|
{
|
|
1737
1737
|
link: r,
|
|
1738
1738
|
onDismiss: s
|
|
1739
1739
|
},
|
|
1740
1740
|
r.og_scrape_url
|
|
1741
1741
|
)) }) : null;
|
|
1742
|
-
},
|
|
1742
|
+
}, cn = z.createContext(!1), Ma = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1743
1743
|
"button",
|
|
1744
1744
|
{
|
|
1745
1745
|
...s,
|
|
@@ -1747,22 +1747,20 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1747
1747
|
"aria-label": "Send",
|
|
1748
1748
|
disabled: t,
|
|
1749
1749
|
onClick: e,
|
|
1750
|
-
children: /* @__PURE__ */ n(
|
|
1750
|
+
children: /* @__PURE__ */ n(Is, { weight: "bold", className: "size-4" })
|
|
1751
1751
|
}
|
|
1752
|
-
),
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
SendButton: r = Aa,
|
|
1757
|
-
AttachmentPreviewList: i = Qn
|
|
1752
|
+
), Da = () => {
|
|
1753
|
+
const e = Se(cn), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1754
|
+
SendButton: r = Ma,
|
|
1755
|
+
AttachmentPreviewList: i = es
|
|
1758
1756
|
} = Ut("CustomMessageInput");
|
|
1759
1757
|
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: [
|
|
1760
|
-
/* @__PURE__ */ n(
|
|
1761
|
-
/* @__PURE__ */ n(
|
|
1758
|
+
/* @__PURE__ */ n(ts, {}),
|
|
1759
|
+
/* @__PURE__ */ n(Aa, {}),
|
|
1762
1760
|
/* @__PURE__ */ n(i, {}),
|
|
1763
1761
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1764
1762
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
1765
|
-
|
|
1763
|
+
ns,
|
|
1766
1764
|
{
|
|
1767
1765
|
"aria-disabled": e || void 0,
|
|
1768
1766
|
className: "w-full resize-none outline-none leading-6",
|
|
@@ -1785,44 +1783,43 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1785
1783
|
)
|
|
1786
1784
|
] })
|
|
1787
1785
|
] });
|
|
1788
|
-
},
|
|
1786
|
+
}, Ra = ({
|
|
1789
1787
|
renderActions: e,
|
|
1790
1788
|
renderFooter: t,
|
|
1791
1789
|
disabled: s = !1,
|
|
1792
1790
|
disabledReason: a
|
|
1793
1791
|
}) => {
|
|
1794
|
-
var
|
|
1795
|
-
const { channel: r } = de(),
|
|
1796
|
-
|
|
1797
|
-
[
|
|
1798
|
-
|
|
1799
|
-
|
|
1792
|
+
var o;
|
|
1793
|
+
const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
|
|
1794
|
+
return s ? /* @__PURE__ */ h(se, { children: [
|
|
1795
|
+
/* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
1796
|
+
t == null ? void 0 : t()
|
|
1797
|
+
] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
|
|
1800
1798
|
/* @__PURE__ */ h(
|
|
1801
1799
|
"div",
|
|
1802
1800
|
{
|
|
1803
|
-
inert:
|
|
1804
|
-
"aria-disabled":
|
|
1801
|
+
inert: i ? "" : void 0,
|
|
1802
|
+
"aria-disabled": i || void 0,
|
|
1805
1803
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1806
1804
|
children: [
|
|
1807
1805
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1808
|
-
/* @__PURE__ */ n(
|
|
1806
|
+
/* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
|
|
1809
1807
|
]
|
|
1810
1808
|
}
|
|
1811
1809
|
),
|
|
1812
|
-
o && a ? /* @__PURE__ */ n("p", { className: "message-input-disabled-reason px-2 text-center text-sm text-black/55", children: a }) : null,
|
|
1813
1810
|
t == null ? void 0 : t()
|
|
1814
1811
|
] });
|
|
1815
|
-
},
|
|
1812
|
+
}, La = [
|
|
1816
1813
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1817
1814
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1818
|
-
],
|
|
1815
|
+
], Pa = {
|
|
1819
1816
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1820
1817
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1821
|
-
},
|
|
1818
|
+
}, Oa = [
|
|
1822
1819
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1823
1820
|
], za = {
|
|
1824
1821
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1825
|
-
},
|
|
1822
|
+
}, Oe = "age safety guidelines.", Fa = "https://linktr.ee/s/about/contact", Bt = (e) => La.includes(e), $a = (e) => Oa.includes(e), Ba = (e) => {
|
|
1826
1823
|
var a;
|
|
1827
1824
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1828
1825
|
if (Bt(t))
|
|
@@ -1830,7 +1827,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1830
1827
|
kind: "dm-agent",
|
|
1831
1828
|
type: t
|
|
1832
1829
|
};
|
|
1833
|
-
if (
|
|
1830
|
+
if ($a(t))
|
|
1834
1831
|
return {
|
|
1835
1832
|
kind: "age-safety",
|
|
1836
1833
|
type: t
|
|
@@ -1841,32 +1838,32 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1841
1838
|
kind: "dm-agent",
|
|
1842
1839
|
type: s
|
|
1843
1840
|
};
|
|
1844
|
-
},
|
|
1845
|
-
const t = e.indexOf(
|
|
1841
|
+
}, ja = (e) => {
|
|
1842
|
+
const t = e.indexOf(Oe);
|
|
1846
1843
|
if (t === -1)
|
|
1847
1844
|
return e;
|
|
1848
|
-
const s = t +
|
|
1849
|
-
return /* @__PURE__ */ h(
|
|
1845
|
+
const s = t + Oe.length;
|
|
1846
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1850
1847
|
e.slice(0, t),
|
|
1851
1848
|
/* @__PURE__ */ n(
|
|
1852
1849
|
"a",
|
|
1853
1850
|
{
|
|
1854
|
-
href:
|
|
1851
|
+
href: Fa,
|
|
1855
1852
|
target: "_blank",
|
|
1856
1853
|
rel: "noopener noreferrer",
|
|
1857
1854
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
1858
|
-
children:
|
|
1855
|
+
children: Oe
|
|
1859
1856
|
}
|
|
1860
1857
|
),
|
|
1861
1858
|
e.slice(s)
|
|
1862
1859
|
] });
|
|
1863
|
-
},
|
|
1860
|
+
}, Va = (e) => {
|
|
1864
1861
|
var a, r;
|
|
1865
|
-
const t = e.message.hide_date === !0, s =
|
|
1862
|
+
const t = e.message.hide_date === !0, s = Ba(
|
|
1866
1863
|
e.message
|
|
1867
1864
|
);
|
|
1868
1865
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1869
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1866
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Pa[s.type];
|
|
1870
1867
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1871
1868
|
/* @__PURE__ */ h(
|
|
1872
1869
|
"div",
|
|
@@ -1876,7 +1873,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1876
1873
|
"data-dm-agent-system-type": s.type,
|
|
1877
1874
|
children: [
|
|
1878
1875
|
/* @__PURE__ */ n(
|
|
1879
|
-
|
|
1876
|
+
je,
|
|
1880
1877
|
{
|
|
1881
1878
|
size: 16,
|
|
1882
1879
|
weight: "regular",
|
|
@@ -1888,7 +1885,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1888
1885
|
]
|
|
1889
1886
|
}
|
|
1890
1887
|
),
|
|
1891
|
-
!t && /* @__PURE__ */ n(
|
|
1888
|
+
!t && /* @__PURE__ */ n(De, { message: e.message })
|
|
1892
1889
|
] });
|
|
1893
1890
|
}
|
|
1894
1891
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
@@ -1902,7 +1899,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1902
1899
|
"data-age-safety-system-type": s.type,
|
|
1903
1900
|
children: [
|
|
1904
1901
|
/* @__PURE__ */ n(
|
|
1905
|
-
|
|
1902
|
+
Ss,
|
|
1906
1903
|
{
|
|
1907
1904
|
size: 24,
|
|
1908
1905
|
weight: "duotone",
|
|
@@ -1911,11 +1908,11 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1911
1908
|
"data-testid": "age-safety-system-message-icon"
|
|
1912
1909
|
}
|
|
1913
1910
|
),
|
|
1914
|
-
/* @__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:
|
|
1911
|
+
/* @__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: ja(i) }) })
|
|
1915
1912
|
]
|
|
1916
1913
|
}
|
|
1917
1914
|
),
|
|
1918
|
-
!t && /* @__PURE__ */ n(
|
|
1915
|
+
!t && /* @__PURE__ */ n(De, { message: e.message })
|
|
1919
1916
|
] });
|
|
1920
1917
|
}
|
|
1921
1918
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -1924,9 +1921,9 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1924
1921
|
/* @__PURE__ */ n("p", { children: e.message.text }),
|
|
1925
1922
|
/* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
|
|
1926
1923
|
] }),
|
|
1927
|
-
!t && /* @__PURE__ */ n(
|
|
1924
|
+
!t && /* @__PURE__ */ n(De, { message: e.message })
|
|
1928
1925
|
] });
|
|
1929
|
-
},
|
|
1926
|
+
}, dn = He(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1930
1927
|
"animateTransform",
|
|
1931
1928
|
{
|
|
1932
1929
|
attributeName: "transform",
|
|
@@ -1936,15 +1933,15 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1936
1933
|
begin: `${120 * t}ms`,
|
|
1937
1934
|
repeatCount: "indefinite"
|
|
1938
1935
|
}
|
|
1939
|
-
) }),
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
]),
|
|
1944
|
-
var
|
|
1945
|
-
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } =
|
|
1946
|
-
if (!e && l &&
|
|
1947
|
-
const v =
|
|
1936
|
+
) }), Ua = /* @__PURE__ */ new Set([
|
|
1937
|
+
Re.Thinking,
|
|
1938
|
+
Re.Generating,
|
|
1939
|
+
Re.ExternalSources
|
|
1940
|
+
]), Ga = ({ threadList: e }) => {
|
|
1941
|
+
var p, N;
|
|
1942
|
+
const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = qe(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Se(dn);
|
|
1943
|
+
if (!e && l && Ua.has(o)) {
|
|
1944
|
+
const v = Ha(t, (p = r.user) == null ? void 0 : p.id);
|
|
1948
1945
|
return /* @__PURE__ */ n(
|
|
1949
1946
|
jt,
|
|
1950
1947
|
{
|
|
@@ -1993,7 +1990,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1993
1990
|
style: { insetInlineStart: 0, insetInlineEnd: "auto" },
|
|
1994
1991
|
children: [
|
|
1995
1992
|
/* @__PURE__ */ n("div", { className: "shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1996
|
-
|
|
1993
|
+
ae,
|
|
1997
1994
|
{
|
|
1998
1995
|
id: e,
|
|
1999
1996
|
name: t,
|
|
@@ -2021,7 +2018,7 @@ const ga = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2021
2018
|
]
|
|
2022
2019
|
}
|
|
2023
2020
|
);
|
|
2024
|
-
function
|
|
2021
|
+
function Ha(e, t) {
|
|
2025
2022
|
var a;
|
|
2026
2023
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2027
2024
|
for (const r of Object.values(s)) {
|
|
@@ -2030,7 +2027,7 @@ function Ga(e, t) {
|
|
|
2030
2027
|
return i;
|
|
2031
2028
|
}
|
|
2032
2029
|
}
|
|
2033
|
-
const
|
|
2030
|
+
const Ya = () => null, qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2034
2031
|
"div",
|
|
2035
2032
|
{
|
|
2036
2033
|
className: y("flex items-center justify-center h-full", e),
|
|
@@ -2073,12 +2070,12 @@ const Ha = () => null, Ya = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2073
2070
|
t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
|
|
2074
2071
|
]
|
|
2075
2072
|
}
|
|
2076
|
-
), ke =
|
|
2077
|
-
/* @__PURE__ */ n(
|
|
2073
|
+
), ke = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2074
|
+
/* @__PURE__ */ n(qa, { className: "w-6 h-6" }),
|
|
2078
2075
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2079
2076
|
] }) }));
|
|
2080
2077
|
ke.displayName = "LoadingState";
|
|
2081
|
-
const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant",
|
|
2078
|
+
const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", Wa = ({
|
|
2082
2079
|
onBack: e,
|
|
2083
2080
|
showBackButton: t,
|
|
2084
2081
|
onShowInfo: s,
|
|
@@ -2086,17 +2083,17 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2086
2083
|
showStarButton: r = !1,
|
|
2087
2084
|
dmAgentEnabled: i = !1
|
|
2088
2085
|
}) => {
|
|
2089
|
-
var f, c,
|
|
2090
|
-
const { channel: o } = de(), l =
|
|
2091
|
-
var
|
|
2092
|
-
const x = (
|
|
2093
|
-
return x ? Object.values(((
|
|
2086
|
+
var f, c, p, N, v;
|
|
2087
|
+
const { channel: o } = de(), l = z.useMemo(() => {
|
|
2088
|
+
var A, T;
|
|
2089
|
+
const x = (A = o._client) == null ? void 0 : A.userID;
|
|
2090
|
+
return x ? Object.values(((T = o.state) == null ? void 0 : T.members) || {}).find(
|
|
2094
2091
|
(S) => {
|
|
2095
|
-
var
|
|
2096
|
-
return ((
|
|
2092
|
+
var R;
|
|
2093
|
+
return ((R = S.user) == null ? void 0 : R.id) && S.user.id !== x;
|
|
2097
2094
|
}
|
|
2098
2095
|
) : void 0;
|
|
2099
|
-
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d =
|
|
2096
|
+
}, [(f = o._client) == null ? void 0 : f.userID, (c = o.state) == null ? void 0 : c.members]), d = Te(l == null ? void 0 : l.user), m = (p = l == null ? void 0 : l.user) == null ? void 0 : p.image, g = Xt(o), u = async () => {
|
|
2100
2097
|
try {
|
|
2101
2098
|
g ? await o.unpin() : await o.pin();
|
|
2102
2099
|
} catch (x) {
|
|
@@ -2124,7 +2121,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2124
2121
|
) }),
|
|
2125
2122
|
/* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
2126
2123
|
/* @__PURE__ */ n(
|
|
2127
|
-
|
|
2124
|
+
ae,
|
|
2128
2125
|
{
|
|
2129
2126
|
id: ((N = l == null ? void 0 : l.user) == null ? void 0 : N.id) || o.id || "unknown",
|
|
2130
2127
|
name: d,
|
|
@@ -2143,12 +2140,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2143
2140
|
"aria-label": `View info for ${d}`,
|
|
2144
2141
|
children: [
|
|
2145
2142
|
d,
|
|
2146
|
-
/* @__PURE__ */ n(
|
|
2143
|
+
/* @__PURE__ */ n(Ve, { className: "size-3 shrink-0" })
|
|
2147
2144
|
]
|
|
2148
2145
|
}
|
|
2149
2146
|
),
|
|
2150
2147
|
i && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2151
|
-
/* @__PURE__ */ n(
|
|
2148
|
+
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
2152
2149
|
/* @__PURE__ */ n("span", { children: Vt })
|
|
2153
2150
|
] })
|
|
2154
2151
|
] }),
|
|
@@ -2161,7 +2158,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2161
2158
|
type: "button",
|
|
2162
2159
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2163
2160
|
children: /* @__PURE__ */ n(
|
|
2164
|
-
|
|
2161
|
+
$e,
|
|
2165
2162
|
{
|
|
2166
2163
|
className: y("size-5", {
|
|
2167
2164
|
"text-yellow-600": g,
|
|
@@ -2200,7 +2197,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2200
2197
|
}
|
|
2201
2198
|
),
|
|
2202
2199
|
/* @__PURE__ */ n(
|
|
2203
|
-
|
|
2200
|
+
ae,
|
|
2204
2201
|
{
|
|
2205
2202
|
id: ((v = l == null ? void 0 : l.user) == null ? void 0 : v.id) || o.id || "unknown",
|
|
2206
2203
|
name: d,
|
|
@@ -2220,12 +2217,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2220
2217
|
"aria-label": `View info for ${d}`,
|
|
2221
2218
|
children: [
|
|
2222
2219
|
/* @__PURE__ */ n("span", { className: "truncate", children: d }),
|
|
2223
|
-
/* @__PURE__ */ n(
|
|
2220
|
+
/* @__PURE__ */ n(Ve, { className: "size-4 shrink-0" })
|
|
2224
2221
|
]
|
|
2225
2222
|
}
|
|
2226
2223
|
) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: d }),
|
|
2227
2224
|
i && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
2228
|
-
/* @__PURE__ */ n(
|
|
2225
|
+
/* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
|
|
2229
2226
|
/* @__PURE__ */ n("span", { className: "truncate", children: Vt })
|
|
2230
2227
|
] })
|
|
2231
2228
|
] })
|
|
@@ -2239,7 +2236,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2239
2236
|
type: "button",
|
|
2240
2237
|
"aria-label": g ? "Unstar conversation" : "Star conversation",
|
|
2241
2238
|
children: /* @__PURE__ */ n(
|
|
2242
|
-
|
|
2239
|
+
$e,
|
|
2243
2240
|
{
|
|
2244
2241
|
className: y("size-5", {
|
|
2245
2242
|
"text-yellow-600": g,
|
|
@@ -2263,7 +2260,7 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2263
2260
|
] })
|
|
2264
2261
|
] })
|
|
2265
2262
|
] });
|
|
2266
|
-
},
|
|
2263
|
+
}, Xa = ({
|
|
2267
2264
|
onBack: e,
|
|
2268
2265
|
showBackButton: t,
|
|
2269
2266
|
renderMessageInputActions: s,
|
|
@@ -2278,88 +2275,88 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2278
2275
|
showBlockParticipant: u = !0,
|
|
2279
2276
|
showReportParticipant: f = !0,
|
|
2280
2277
|
showFollowerStatus: c = !0,
|
|
2281
|
-
composerDisabled:
|
|
2278
|
+
composerDisabled: p = !1,
|
|
2282
2279
|
composerDisabledReason: N,
|
|
2283
2280
|
showStarButton: v = !1,
|
|
2284
2281
|
chatbotVotingEnabled: x = !1,
|
|
2285
2282
|
renderChannelBanner: w,
|
|
2286
|
-
customProfileContent:
|
|
2287
|
-
customChannelActions:
|
|
2283
|
+
customProfileContent: A,
|
|
2284
|
+
customChannelActions: T,
|
|
2288
2285
|
renderMessage: S,
|
|
2289
|
-
dmAgentEnabled:
|
|
2286
|
+
dmAgentEnabled: R = !1,
|
|
2290
2287
|
viewerLanguage: I
|
|
2291
2288
|
}) => {
|
|
2292
|
-
var
|
|
2293
|
-
const { channel: C } = de(), k =
|
|
2294
|
-
var
|
|
2295
|
-
const
|
|
2296
|
-
return
|
|
2297
|
-
(
|
|
2298
|
-
var
|
|
2299
|
-
return ((
|
|
2289
|
+
var H, Y, $, b, _, L;
|
|
2290
|
+
const { channel: C } = de(), k = X(null), E = z.useMemo(() => {
|
|
2291
|
+
var j, K;
|
|
2292
|
+
const M = (j = C._client) == null ? void 0 : j.userID;
|
|
2293
|
+
return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find(
|
|
2294
|
+
(ee) => {
|
|
2295
|
+
var Q;
|
|
2296
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) && ee.user.id !== M;
|
|
2300
2297
|
}
|
|
2301
2298
|
) : void 0;
|
|
2302
|
-
}, [(
|
|
2303
|
-
var
|
|
2304
|
-
const
|
|
2305
|
-
return
|
|
2306
|
-
var
|
|
2307
|
-
return ((
|
|
2299
|
+
}, [(H = C._client) == null ? void 0 : H.userID, (Y = C.state) == null ? void 0 : Y.members]), D = z.useMemo(() => {
|
|
2300
|
+
var j, K;
|
|
2301
|
+
const M = (j = C._client) == null ? void 0 : j.userID;
|
|
2302
|
+
return M ? Object.values(((K = C.state) == null ? void 0 : K.members) || {}).find((ee) => {
|
|
2303
|
+
var Q;
|
|
2304
|
+
return ((Q = ee.user) == null ? void 0 : Q.id) === M;
|
|
2308
2305
|
}) : void 0;
|
|
2309
|
-
}, [($ = C._client) == null ? void 0 : $.userID, (
|
|
2306
|
+
}, [($ = C._client) == null ? void 0 : $.userID, (b = C.state) == null ? void 0 : b.members]), V = ((_ = D == null ? void 0 : D.user) == null ? void 0 : _.is_account) ?? (D == null ? void 0 : D.is_account), F = ((L = E == null ? void 0 : E.user) == null ? void 0 : L.is_account) ?? (E == null ? void 0 : E.is_account), Z = R && V === !1 && F === !0, U = z.useMemo(() => {
|
|
2310
2307
|
if (!c) return;
|
|
2311
|
-
const
|
|
2312
|
-
if (
|
|
2313
|
-
return String(
|
|
2314
|
-
if (
|
|
2315
|
-
return
|
|
2316
|
-
}, [C.data, c]), G =
|
|
2317
|
-
var
|
|
2318
|
-
(
|
|
2319
|
-
}, []), P =
|
|
2320
|
-
var
|
|
2321
|
-
(
|
|
2322
|
-
}, []), B =
|
|
2323
|
-
(
|
|
2324
|
-
const { message:
|
|
2325
|
-
|
|
2308
|
+
const M = C.data ?? {};
|
|
2309
|
+
if (M.followerStatus)
|
|
2310
|
+
return String(M.followerStatus);
|
|
2311
|
+
if (M.isFollower !== void 0)
|
|
2312
|
+
return M.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
2313
|
+
}, [C.data, c]), G = q(() => {
|
|
2314
|
+
var M;
|
|
2315
|
+
(M = k.current) == null || M.showModal();
|
|
2316
|
+
}, []), P = q(() => {
|
|
2317
|
+
var M;
|
|
2318
|
+
(M = k.current) == null || M.close();
|
|
2319
|
+
}, []), B = q(
|
|
2320
|
+
(M) => {
|
|
2321
|
+
const { message: W } = be("ChannelView"), j = /* @__PURE__ */ n(
|
|
2322
|
+
Ca,
|
|
2326
2323
|
{
|
|
2327
|
-
...
|
|
2324
|
+
...M,
|
|
2328
2325
|
chatbotVotingEnabled: x,
|
|
2329
2326
|
viewerLanguage: I
|
|
2330
2327
|
}
|
|
2331
2328
|
);
|
|
2332
|
-
return !S || !
|
|
2329
|
+
return !S || !W ? j : S(j, W);
|
|
2333
2330
|
},
|
|
2334
2331
|
[x, S, I]
|
|
2335
2332
|
);
|
|
2336
|
-
return /* @__PURE__ */ h(
|
|
2333
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
2337
2334
|
/* @__PURE__ */ n(
|
|
2338
|
-
|
|
2335
|
+
is,
|
|
2339
2336
|
{
|
|
2340
2337
|
overrides: {
|
|
2341
2338
|
Message: B,
|
|
2342
|
-
MessageActions:
|
|
2339
|
+
MessageActions: Ia
|
|
2343
2340
|
},
|
|
2344
|
-
children: /* @__PURE__ */ h(
|
|
2341
|
+
children: /* @__PURE__ */ h(os, { children: [
|
|
2345
2342
|
/* @__PURE__ */ n("div", { className: "p-4", children: /* @__PURE__ */ n(
|
|
2346
|
-
|
|
2343
|
+
Wa,
|
|
2347
2344
|
{
|
|
2348
2345
|
onBack: e,
|
|
2349
2346
|
showBackButton: t,
|
|
2350
2347
|
onShowInfo: G,
|
|
2351
2348
|
canShowInfo: !!E,
|
|
2352
2349
|
showStarButton: v,
|
|
2353
|
-
dmAgentEnabled:
|
|
2350
|
+
dmAgentEnabled: Z
|
|
2354
2351
|
}
|
|
2355
2352
|
) }, "lt-channel-header"),
|
|
2356
|
-
w ? /* @__PURE__ */ n(
|
|
2353
|
+
w ? /* @__PURE__ */ n(z.Fragment, { children: w() }, "lt-channel-banner") : null,
|
|
2357
2354
|
/* @__PURE__ */ n(
|
|
2358
2355
|
"div",
|
|
2359
2356
|
{
|
|
2360
2357
|
className: "flex-1 overflow-hidden relative",
|
|
2361
2358
|
children: /* @__PURE__ */ n(
|
|
2362
|
-
|
|
2359
|
+
ls,
|
|
2363
2360
|
{
|
|
2364
2361
|
hideDeletedMessages: !0,
|
|
2365
2362
|
hideNewMessageSeparator: !1
|
|
@@ -2368,13 +2365,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2368
2365
|
},
|
|
2369
2366
|
"lt-channel-message-list"
|
|
2370
2367
|
),
|
|
2371
|
-
r ? /* @__PURE__ */ n(
|
|
2368
|
+
r ? /* @__PURE__ */ n(z.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
|
|
2372
2369
|
/* @__PURE__ */ n(
|
|
2373
|
-
|
|
2370
|
+
Ra,
|
|
2374
2371
|
{
|
|
2375
2372
|
renderActions: () => s == null ? void 0 : s(C),
|
|
2376
2373
|
renderFooter: () => a == null ? void 0 : a(C),
|
|
2377
|
-
disabled:
|
|
2374
|
+
disabled: p,
|
|
2378
2375
|
disabledReason: N
|
|
2379
2376
|
},
|
|
2380
2377
|
"lt-channel-message-input"
|
|
@@ -2383,12 +2380,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2383
2380
|
}
|
|
2384
2381
|
),
|
|
2385
2382
|
/* @__PURE__ */ n(
|
|
2386
|
-
|
|
2383
|
+
$s,
|
|
2387
2384
|
{
|
|
2388
2385
|
dialogRef: k,
|
|
2389
2386
|
onClose: P,
|
|
2390
2387
|
participant: E,
|
|
2391
|
-
participantDisplayName:
|
|
2388
|
+
participantDisplayName: Te(E == null ? void 0 : E.user),
|
|
2392
2389
|
channel: C,
|
|
2393
2390
|
followerStatusLabel: U,
|
|
2394
2391
|
onLeaveConversation: i,
|
|
@@ -2399,12 +2396,12 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2399
2396
|
onDeleteConversationClick: d,
|
|
2400
2397
|
onBlockParticipantClick: m,
|
|
2401
2398
|
onReportParticipantClick: g,
|
|
2402
|
-
customProfileContent:
|
|
2403
|
-
customChannelActions:
|
|
2399
|
+
customProfileContent: A,
|
|
2400
|
+
customChannelActions: T
|
|
2404
2401
|
}
|
|
2405
2402
|
)
|
|
2406
2403
|
] });
|
|
2407
|
-
},
|
|
2404
|
+
}, un = z.memo(
|
|
2408
2405
|
({
|
|
2409
2406
|
channel: e,
|
|
2410
2407
|
onBack: t,
|
|
@@ -2415,20 +2412,20 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2415
2412
|
onLeaveConversation: o,
|
|
2416
2413
|
onBlockParticipant: l,
|
|
2417
2414
|
className: d,
|
|
2418
|
-
CustomChannelEmptyState: m =
|
|
2415
|
+
CustomChannelEmptyState: m = Ya,
|
|
2419
2416
|
showDeleteConversation: g = !0,
|
|
2420
2417
|
onDeleteConversationClick: u,
|
|
2421
2418
|
onBlockParticipantClick: f,
|
|
2422
2419
|
onReportParticipantClick: c,
|
|
2423
|
-
showBlockParticipant:
|
|
2420
|
+
showBlockParticipant: p = !0,
|
|
2424
2421
|
showReportParticipant: N = !0,
|
|
2425
2422
|
showFollowerStatus: v = !0,
|
|
2426
2423
|
composerDisabled: x = !1,
|
|
2427
2424
|
composerDisabledReason: w,
|
|
2428
|
-
dmAgentEnabled:
|
|
2429
|
-
messageMetadata:
|
|
2425
|
+
dmAgentEnabled: A,
|
|
2426
|
+
messageMetadata: T,
|
|
2430
2427
|
onMessageSent: S,
|
|
2431
|
-
showStarButton:
|
|
2428
|
+
showStarButton: R = !1,
|
|
2432
2429
|
chatbotVotingEnabled: I = !1,
|
|
2433
2430
|
renderChannelBanner: C,
|
|
2434
2431
|
customProfileContent: k,
|
|
@@ -2436,40 +2433,40 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2436
2433
|
renderMessage: D,
|
|
2437
2434
|
onMessageLinkClick: V,
|
|
2438
2435
|
sendButton: F,
|
|
2439
|
-
attachmentPreviewList:
|
|
2436
|
+
attachmentPreviewList: Z,
|
|
2440
2437
|
viewerLanguage: U
|
|
2441
2438
|
}) => {
|
|
2442
|
-
const G =
|
|
2443
|
-
async (B,
|
|
2444
|
-
var
|
|
2445
|
-
const $ = ((
|
|
2446
|
-
...
|
|
2447
|
-
...
|
|
2448
|
-
...
|
|
2439
|
+
const G = q(
|
|
2440
|
+
async (B, H, Y) => {
|
|
2441
|
+
var W;
|
|
2442
|
+
const $ = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, b = A && !$, _ = {
|
|
2443
|
+
...H,
|
|
2444
|
+
...b && { silent: !0 },
|
|
2445
|
+
...T && {
|
|
2449
2446
|
metadata: {
|
|
2450
|
-
...
|
|
2451
|
-
...
|
|
2447
|
+
...H.metadata ?? {},
|
|
2448
|
+
...T
|
|
2452
2449
|
}
|
|
2453
2450
|
}
|
|
2454
|
-
},
|
|
2455
|
-
...
|
|
2456
|
-
...
|
|
2457
|
-
},
|
|
2458
|
-
return S == null || S(
|
|
2451
|
+
}, L = {
|
|
2452
|
+
...Y,
|
|
2453
|
+
...b && { skip_push: !0 }
|
|
2454
|
+
}, M = await e.sendMessage(_, L);
|
|
2455
|
+
return S == null || S(M), M;
|
|
2459
2456
|
},
|
|
2460
|
-
[e,
|
|
2461
|
-
), P =
|
|
2457
|
+
[e, A, T, S]
|
|
2458
|
+
), P = X(null);
|
|
2462
2459
|
return J(() => {
|
|
2463
2460
|
if (!V) return;
|
|
2464
2461
|
const B = P.current;
|
|
2465
2462
|
if (!B) return;
|
|
2466
|
-
const
|
|
2467
|
-
const $ =
|
|
2463
|
+
const H = (Y) => {
|
|
2464
|
+
const $ = Y.target, b = $ == null ? void 0 : $.closest("a[href]"), _ = b == null ? void 0 : b.getAttribute("href");
|
|
2468
2465
|
if (!_) return;
|
|
2469
|
-
const
|
|
2470
|
-
V(_,
|
|
2466
|
+
const L = b == null ? void 0 : b.closest("[data-message-id]"), M = L == null ? void 0 : L.getAttribute("data-message-id"), W = M ? e.state.messages.find((j) => j.id === M) : void 0;
|
|
2467
|
+
V(_, W);
|
|
2471
2468
|
};
|
|
2472
|
-
return B.addEventListener("click",
|
|
2469
|
+
return B.addEventListener("click", H), () => B.removeEventListener("click", H);
|
|
2473
2470
|
}, [V, e]), /* @__PURE__ */ n(
|
|
2474
2471
|
"div",
|
|
2475
2472
|
{
|
|
@@ -2478,20 +2475,20 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2478
2475
|
"messaging-channel-view h-full flex flex-col",
|
|
2479
2476
|
d
|
|
2480
2477
|
),
|
|
2481
|
-
children: /* @__PURE__ */ n(
|
|
2482
|
-
|
|
2478
|
+
children: /* @__PURE__ */ n(dn.Provider, { value: A ?? !1, children: /* @__PURE__ */ n(
|
|
2479
|
+
rs,
|
|
2483
2480
|
{
|
|
2484
2481
|
channel: e,
|
|
2485
|
-
MessageSystem:
|
|
2482
|
+
MessageSystem: Va,
|
|
2486
2483
|
EmptyStateIndicator: m,
|
|
2487
2484
|
LoadingIndicator: ke,
|
|
2488
|
-
DateSeparator:
|
|
2489
|
-
TypingIndicator:
|
|
2485
|
+
DateSeparator: Bs,
|
|
2486
|
+
TypingIndicator: Ga,
|
|
2490
2487
|
doSendMessageRequest: G,
|
|
2491
2488
|
...F ? { SendButton: F } : {},
|
|
2492
|
-
...
|
|
2489
|
+
...Z ? { AttachmentPreviewList: Z } : {},
|
|
2493
2490
|
children: /* @__PURE__ */ n(
|
|
2494
|
-
|
|
2491
|
+
Xa,
|
|
2495
2492
|
{
|
|
2496
2493
|
onBack: t,
|
|
2497
2494
|
showBackButton: s,
|
|
@@ -2505,13 +2502,13 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2505
2502
|
onDeleteConversationClick: u,
|
|
2506
2503
|
onBlockParticipantClick: f,
|
|
2507
2504
|
onReportParticipantClick: c,
|
|
2508
|
-
showBlockParticipant:
|
|
2505
|
+
showBlockParticipant: p,
|
|
2509
2506
|
showReportParticipant: N,
|
|
2510
2507
|
showFollowerStatus: v,
|
|
2511
2508
|
composerDisabled: x,
|
|
2512
2509
|
composerDisabledReason: w,
|
|
2513
|
-
showStarButton:
|
|
2514
|
-
dmAgentEnabled:
|
|
2510
|
+
showStarButton: R,
|
|
2511
|
+
dmAgentEnabled: A,
|
|
2515
2512
|
chatbotVotingEnabled: I,
|
|
2516
2513
|
renderChannelBanner: C,
|
|
2517
2514
|
customProfileContent: k,
|
|
@@ -2526,8 +2523,8 @@ const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
2526
2523
|
);
|
|
2527
2524
|
}
|
|
2528
2525
|
);
|
|
2529
|
-
|
|
2530
|
-
const he =
|
|
2526
|
+
un.displayName = "ChannelView";
|
|
2527
|
+
const he = z.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: [
|
|
2531
2528
|
/* @__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: "⚠️" }) }),
|
|
2532
2529
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2533
2530
|
/* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -2542,7 +2539,7 @@ const he = O.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2542
2539
|
)
|
|
2543
2540
|
] }) }));
|
|
2544
2541
|
he.displayName = "ErrorState";
|
|
2545
|
-
const
|
|
2542
|
+
const _i = ({
|
|
2546
2543
|
capabilities: e = {},
|
|
2547
2544
|
renderMessageInputActions: t,
|
|
2548
2545
|
renderConversationFooter: s,
|
|
@@ -2557,101 +2554,111 @@ const Ni = ({
|
|
|
2557
2554
|
onMessageSent: u,
|
|
2558
2555
|
chatbotVotingEnabled: f = !1,
|
|
2559
2556
|
viewerLanguage: c,
|
|
2560
|
-
renderChannelBanner:
|
|
2557
|
+
renderChannelBanner: p,
|
|
2561
2558
|
customChannelActions: N,
|
|
2562
2559
|
renderMessage: v,
|
|
2563
2560
|
onMessageLinkClick: x
|
|
2564
2561
|
}) => {
|
|
2565
2562
|
const {
|
|
2566
2563
|
client: w,
|
|
2567
|
-
isConnected:
|
|
2568
|
-
isLoading:
|
|
2564
|
+
isConnected: A,
|
|
2565
|
+
isLoading: T,
|
|
2569
2566
|
error: S,
|
|
2570
|
-
refreshConnection:
|
|
2567
|
+
refreshConnection: R,
|
|
2571
2568
|
service: I,
|
|
2572
2569
|
debug: C
|
|
2573
|
-
} =
|
|
2570
|
+
} = Ds(), [k, E] = O(null), [D, V] = O(null), [F, Z] = O(!1), { showDeleteConversation: U = !0 } = e, G = X(o);
|
|
2574
2571
|
G.current = o;
|
|
2575
|
-
const P =
|
|
2576
|
-
P.current = a
|
|
2577
|
-
|
|
2572
|
+
const P = X(a);
|
|
2573
|
+
P.current = a;
|
|
2574
|
+
const B = X(null), H = X(null);
|
|
2575
|
+
J(() => {
|
|
2576
|
+
H.current = k;
|
|
2577
|
+
}, [k]), J(() => {
|
|
2578
|
+
if (!w || !A) return;
|
|
2579
|
+
const b = w.userID;
|
|
2580
|
+
if (!b) return;
|
|
2581
|
+
const _ = `${b}::${i}`;
|
|
2582
|
+
if (B.current === _) return;
|
|
2583
|
+
B.current = _;
|
|
2584
|
+
const L = () => {
|
|
2585
|
+
B.current === _ && (B.current = null);
|
|
2586
|
+
};
|
|
2578
2587
|
(async () => {
|
|
2579
|
-
var
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2588
|
+
var W, j;
|
|
2589
|
+
try {
|
|
2590
|
+
C && console.log(
|
|
2591
|
+
"[MessagingShell] Loading initial conversation with:",
|
|
2592
|
+
i
|
|
2593
|
+
);
|
|
2594
|
+
const K = await w.queryChannels(
|
|
2595
|
+
{
|
|
2596
|
+
type: "messaging",
|
|
2597
|
+
members: { $eq: [b, i] }
|
|
2598
|
+
},
|
|
2599
|
+
{},
|
|
2600
|
+
{ limit: 1 }
|
|
2601
|
+
);
|
|
2602
|
+
if (K.length > 0) {
|
|
2603
|
+
E(K[0]), V(null), (W = P.current) == null || W.call(P, K[0]), C && console.log(
|
|
2604
|
+
"[MessagingShell] Initial conversation loaded:",
|
|
2605
|
+
K[0].id
|
|
2606
|
+
);
|
|
2607
|
+
return;
|
|
2608
|
+
}
|
|
2609
|
+
const ee = G.current;
|
|
2610
|
+
if (!ee || !I) {
|
|
2611
|
+
L(), V("No conversation found with this account"), C && console.log(
|
|
2612
|
+
"[MessagingShell] No conversation found for:",
|
|
2585
2613
|
i
|
|
2586
2614
|
);
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2615
|
+
return;
|
|
2616
|
+
}
|
|
2617
|
+
try {
|
|
2618
|
+
const Q = await I.startChannelWithParticipant({
|
|
2619
|
+
id: ee.id,
|
|
2620
|
+
name: ee.name,
|
|
2621
|
+
phone: ee.phone
|
|
2622
|
+
});
|
|
2623
|
+
E(Q), V(null), (j = P.current) == null || j.call(P, Q), C && console.log(
|
|
2624
|
+
"[MessagingShell] Channel created and loaded:",
|
|
2625
|
+
Q.id
|
|
2594
2626
|
);
|
|
2595
|
-
|
|
2596
|
-
E(R[0]), V(null), (p = P.current) == null || p.call(P, R[0]), C && console.log(
|
|
2597
|
-
"[MessagingShell] Initial conversation loaded:",
|
|
2598
|
-
R[0].id
|
|
2599
|
-
);
|
|
2600
|
-
return;
|
|
2601
|
-
}
|
|
2602
|
-
const T = G.current;
|
|
2603
|
-
if (!T || !I) {
|
|
2604
|
-
V("No conversation found with this account"), C && console.log(
|
|
2605
|
-
"[MessagingShell] No conversation found for:",
|
|
2606
|
-
i
|
|
2607
|
-
);
|
|
2608
|
-
return;
|
|
2609
|
-
}
|
|
2610
|
-
try {
|
|
2611
|
-
const j = await I.startChannelWithParticipant({
|
|
2612
|
-
id: T.id,
|
|
2613
|
-
name: T.name,
|
|
2614
|
-
phone: T.phone
|
|
2615
|
-
});
|
|
2616
|
-
E(j), V(null), (_ = P.current) == null || _.call(P, j), C && console.log(
|
|
2617
|
-
"[MessagingShell] Channel created and loaded:",
|
|
2618
|
-
j.id
|
|
2619
|
-
);
|
|
2620
|
-
} catch (j) {
|
|
2621
|
-
console.error(
|
|
2622
|
-
"[MessagingShell] Failed to create conversation:",
|
|
2623
|
-
j
|
|
2624
|
-
), V("Failed to create conversation");
|
|
2625
|
-
}
|
|
2626
|
-
} catch (R) {
|
|
2627
|
+
} catch (Q) {
|
|
2627
2628
|
console.error(
|
|
2628
|
-
"[MessagingShell] Failed to
|
|
2629
|
-
|
|
2630
|
-
), V("Failed to
|
|
2629
|
+
"[MessagingShell] Failed to create conversation:",
|
|
2630
|
+
Q
|
|
2631
|
+
), L(), V("Failed to create conversation");
|
|
2631
2632
|
}
|
|
2633
|
+
} catch (K) {
|
|
2634
|
+
console.error(
|
|
2635
|
+
"[MessagingShell] Failed to load initial conversation:",
|
|
2636
|
+
K
|
|
2637
|
+
), L(), H.current || V("Failed to load conversation");
|
|
2638
|
+
}
|
|
2632
2639
|
})();
|
|
2633
|
-
}, [i, w,
|
|
2634
|
-
const
|
|
2635
|
-
|
|
2636
|
-
const
|
|
2637
|
-
var
|
|
2638
|
-
E(null),
|
|
2640
|
+
}, [i, w, A, I, C]);
|
|
2641
|
+
const Y = X(r);
|
|
2642
|
+
Y.current = r;
|
|
2643
|
+
const $ = q(() => {
|
|
2644
|
+
var b;
|
|
2645
|
+
E(null), Z(!0), (b = Y.current) == null || b.call(Y);
|
|
2639
2646
|
}, []);
|
|
2640
|
-
return
|
|
2647
|
+
return T ? /* @__PURE__ */ n(ke, {}) : S ? /* @__PURE__ */ n(he, { message: S, onBack: R }) : !A || !w ? /* @__PURE__ */ n(
|
|
2641
2648
|
he,
|
|
2642
2649
|
{
|
|
2643
2650
|
message: "Not connected to messaging service",
|
|
2644
|
-
onBack:
|
|
2651
|
+
onBack: R
|
|
2645
2652
|
}
|
|
2646
2653
|
) : D ? /* @__PURE__ */ n(he, { message: D }) : 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(
|
|
2647
|
-
|
|
2654
|
+
un,
|
|
2648
2655
|
{
|
|
2649
2656
|
channel: k,
|
|
2650
2657
|
renderMessageInputActions: t,
|
|
2651
2658
|
renderConversationFooter: s,
|
|
2652
|
-
renderChannelBanner:
|
|
2653
|
-
onLeaveConversation:
|
|
2654
|
-
onBlockParticipant:
|
|
2659
|
+
renderChannelBanner: p,
|
|
2660
|
+
onLeaveConversation: $,
|
|
2661
|
+
onBlockParticipant: $,
|
|
2655
2662
|
CustomChannelEmptyState: l,
|
|
2656
2663
|
showDeleteConversation: U,
|
|
2657
2664
|
onBlockParticipantClick: d,
|
|
@@ -2667,31 +2674,31 @@ const Ni = ({
|
|
|
2667
2674
|
k.id
|
|
2668
2675
|
) }) }) : /* @__PURE__ */ n(ke, {});
|
|
2669
2676
|
};
|
|
2670
|
-
function
|
|
2677
|
+
function Ka(e) {
|
|
2671
2678
|
const t = e.state.pending_messages;
|
|
2672
2679
|
if (t != null && t.length)
|
|
2673
2680
|
for (const s of t)
|
|
2674
2681
|
e.state.addMessageSorted(s.message);
|
|
2675
2682
|
}
|
|
2676
|
-
const
|
|
2683
|
+
const mn = z.createContext({
|
|
2677
2684
|
selectedChannel: void 0,
|
|
2678
2685
|
onChannelSelect: () => {
|
|
2679
2686
|
},
|
|
2680
2687
|
debug: !1,
|
|
2681
2688
|
renderMessagePreview: void 0,
|
|
2682
2689
|
viewerLanguage: void 0
|
|
2683
|
-
}),
|
|
2690
|
+
}), Ja = mn.Provider, Za = () => z.useContext(mn), Qa = (e, t) => {
|
|
2684
2691
|
const s = new Date(
|
|
2685
2692
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2686
2693
|
), r = new Date(
|
|
2687
2694
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2688
2695
|
).getTime() - s.getTime();
|
|
2689
2696
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2690
|
-
},
|
|
2697
|
+
}, er = (e) => {
|
|
2691
2698
|
const t = /* @__PURE__ */ new Date();
|
|
2692
2699
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2693
2700
|
return "Just now";
|
|
2694
|
-
const a =
|
|
2701
|
+
const a = Qa(e, t);
|
|
2695
2702
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2696
2703
|
hour: "numeric",
|
|
2697
2704
|
minute: "2-digit",
|
|
@@ -2701,26 +2708,26 @@ const un = O.createContext({
|
|
|
2701
2708
|
day: "numeric",
|
|
2702
2709
|
year: "2-digit"
|
|
2703
2710
|
});
|
|
2704
|
-
},
|
|
2711
|
+
}, hn = z.memo(
|
|
2705
2712
|
({ channel: e, unread: t }) => {
|
|
2706
|
-
var
|
|
2713
|
+
var R, I, C;
|
|
2707
2714
|
const {
|
|
2708
2715
|
selectedChannel: s,
|
|
2709
2716
|
onChannelSelect: a,
|
|
2710
2717
|
debug: r,
|
|
2711
2718
|
renderMessagePreview: i,
|
|
2712
2719
|
viewerLanguage: o
|
|
2713
|
-
} =
|
|
2720
|
+
} = Za(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2714
2721
|
e && a(e);
|
|
2715
2722
|
}, m = (k) => {
|
|
2716
2723
|
const E = k.key === "Enter" || k.key === " ", D = k.repeat;
|
|
2717
2724
|
!E || D || (k.preventDefault(), d());
|
|
2718
|
-
}, u = Object.values(((
|
|
2725
|
+
}, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
|
|
2719
2726
|
(k) => {
|
|
2720
2727
|
var E, D;
|
|
2721
2728
|
return ((E = k.user) == null ? void 0 : E.id) && k.user.id !== ((D = e == null ? void 0 : e._client) == null ? void 0 : D.userID);
|
|
2722
2729
|
}
|
|
2723
|
-
), f =
|
|
2730
|
+
), f = Te(u == null ? void 0 : u.user), c = (I = u == null ? void 0 : u.user) == null ? void 0 : I.image, p = (() => {
|
|
2724
2731
|
var E;
|
|
2725
2732
|
const k = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
|
|
2726
2733
|
if (k != null && k.length) {
|
|
@@ -2728,18 +2735,18 @@ const un = O.createContext({
|
|
|
2728
2735
|
if (k[D].type !== "system") return k[D];
|
|
2729
2736
|
}
|
|
2730
2737
|
})(), v = (() => {
|
|
2731
|
-
var
|
|
2738
|
+
var Z, U, G, P;
|
|
2732
2739
|
const k = Kt({
|
|
2733
|
-
message:
|
|
2740
|
+
message: p,
|
|
2734
2741
|
viewerLanguage: o
|
|
2735
2742
|
});
|
|
2736
|
-
if (((
|
|
2737
|
-
if (((U =
|
|
2738
|
-
if (((G =
|
|
2743
|
+
if (((Z = p == null ? void 0 : p.metadata) == null ? void 0 : Z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
|
|
2744
|
+
if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
|
|
2745
|
+
if (((G = p == null ? void 0 : p.metadata) == null ? void 0 : G.custom_type) === "MESSAGE_ATTACHMENT") return k ? `📎 ${k}` : "📎 Sent an attachment";
|
|
2739
2746
|
if (k) return k;
|
|
2740
|
-
const F = (P =
|
|
2747
|
+
const F = (P = p == null ? void 0 : p.attachments) == null ? void 0 : P[0];
|
|
2741
2748
|
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";
|
|
2742
|
-
})(), x =
|
|
2749
|
+
})(), x = p != null && p.created_at ? er(new Date(p.created_at)) : "", w = p ? Ce(p) : !1, A = i ? i(p, v) : `${w ? "✨ " : ""}${v}`, T = Xt(e), S = t ?? 0;
|
|
2743
2750
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2744
2751
|
channelId: e == null ? void 0 : e.id,
|
|
2745
2752
|
isSelected: l,
|
|
@@ -2762,13 +2769,13 @@ const un = O.createContext({
|
|
|
2762
2769
|
),
|
|
2763
2770
|
children: /* @__PURE__ */ h("div", { className: "flex items-start gap-3", children: [
|
|
2764
2771
|
/* @__PURE__ */ n(
|
|
2765
|
-
|
|
2772
|
+
ae,
|
|
2766
2773
|
{
|
|
2767
2774
|
id: ((C = u == null ? void 0 : u.user) == null ? void 0 : C.id) || e.id || "unknown",
|
|
2768
2775
|
name: f,
|
|
2769
2776
|
image: c,
|
|
2770
2777
|
size: 44,
|
|
2771
|
-
starred:
|
|
2778
|
+
starred: T,
|
|
2772
2779
|
className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
|
|
2773
2780
|
}
|
|
2774
2781
|
),
|
|
@@ -2782,7 +2789,7 @@ const un = O.createContext({
|
|
|
2782
2789
|
l ? "text-primary" : "text-charcoal"
|
|
2783
2790
|
),
|
|
2784
2791
|
children: [
|
|
2785
|
-
|
|
2792
|
+
T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
2786
2793
|
f
|
|
2787
2794
|
]
|
|
2788
2795
|
}
|
|
@@ -2790,7 +2797,7 @@ const un = O.createContext({
|
|
|
2790
2797
|
x && /* @__PURE__ */ n("span", { className: "text-xs text-stone flex-shrink-0", children: x })
|
|
2791
2798
|
] }),
|
|
2792
2799
|
/* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
2793
|
-
/* @__PURE__ */ n("p", { className: "text-xs text-stone flex-1 line-clamp-1", children:
|
|
2800
|
+
/* @__PURE__ */ n("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: A }),
|
|
2794
2801
|
S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: S > 99 ? "99+" : S })
|
|
2795
2802
|
] })
|
|
2796
2803
|
] })
|
|
@@ -2799,27 +2806,27 @@ const un = O.createContext({
|
|
|
2799
2806
|
);
|
|
2800
2807
|
}
|
|
2801
2808
|
);
|
|
2802
|
-
|
|
2803
|
-
const
|
|
2809
|
+
hn.displayName = "CustomChannelPreview";
|
|
2810
|
+
const tr = { last_message_at: -1 }, nr = z.memo(
|
|
2804
2811
|
({
|
|
2805
2812
|
onChannelSelect: e,
|
|
2806
2813
|
selectedChannel: t,
|
|
2807
2814
|
filters: s,
|
|
2808
2815
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2809
2816
|
channelRenderFilterFn: r,
|
|
2810
|
-
sort: i =
|
|
2817
|
+
sort: i = tr,
|
|
2811
2818
|
className: o,
|
|
2812
2819
|
customEmptyStateIndicator: l,
|
|
2813
2820
|
renderMessagePreview: d,
|
|
2814
2821
|
viewerLanguage: m
|
|
2815
2822
|
}) => {
|
|
2816
|
-
const g =
|
|
2823
|
+
const g = z.useRef(0);
|
|
2817
2824
|
g.current++;
|
|
2818
|
-
const { debug: u = !1 } = We(), f =
|
|
2819
|
-
(
|
|
2820
|
-
for (const N of
|
|
2821
|
-
|
|
2822
|
-
return r ? r(
|
|
2825
|
+
const { debug: u = !1 } = We(), f = z.useCallback(
|
|
2826
|
+
(p) => {
|
|
2827
|
+
for (const N of p)
|
|
2828
|
+
Ka(N);
|
|
2829
|
+
return r ? r(p) : p;
|
|
2823
2830
|
},
|
|
2824
2831
|
[r]
|
|
2825
2832
|
);
|
|
@@ -2828,7 +2835,7 @@ const er = { last_message_at: -1 }, tr = O.memo(
|
|
|
2828
2835
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
2829
2836
|
filters: s
|
|
2830
2837
|
});
|
|
2831
|
-
const c =
|
|
2838
|
+
const c = z.useMemo(
|
|
2832
2839
|
() => ({
|
|
2833
2840
|
selectedChannel: t,
|
|
2834
2841
|
onChannelSelect: e,
|
|
@@ -2851,15 +2858,15 @@ const er = { last_message_at: -1 }, tr = O.memo(
|
|
|
2851
2858
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2852
2859
|
o
|
|
2853
2860
|
),
|
|
2854
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2855
|
-
|
|
2861
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Ja, { value: c, children: /* @__PURE__ */ n(
|
|
2862
|
+
cs,
|
|
2856
2863
|
{
|
|
2857
2864
|
filters: s,
|
|
2858
2865
|
sort: i,
|
|
2859
2866
|
options: { limit: 30 },
|
|
2860
2867
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2861
2868
|
channelRenderFilterFn: f,
|
|
2862
|
-
Preview:
|
|
2869
|
+
Preview: hn,
|
|
2863
2870
|
EmptyStateIndicator: l
|
|
2864
2871
|
},
|
|
2865
2872
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -2868,26 +2875,26 @@ const er = { last_message_at: -1 }, tr = O.memo(
|
|
|
2868
2875
|
);
|
|
2869
2876
|
}
|
|
2870
2877
|
);
|
|
2871
|
-
|
|
2872
|
-
const
|
|
2878
|
+
nr.displayName = "ChannelList";
|
|
2879
|
+
const sr = /^([a-z][a-z0-9+.-]*):/i, ar = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2873
2880
|
function et(e) {
|
|
2874
2881
|
if (typeof e != "string") return;
|
|
2875
2882
|
const t = e.trim();
|
|
2876
2883
|
if (t === "") return;
|
|
2877
|
-
const s =
|
|
2884
|
+
const s = sr.exec(t);
|
|
2878
2885
|
if (s) {
|
|
2879
2886
|
const a = s[1].toLowerCase();
|
|
2880
|
-
return
|
|
2887
|
+
return ar.has(a) ? t : void 0;
|
|
2881
2888
|
}
|
|
2882
2889
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2883
2890
|
}
|
|
2884
|
-
const
|
|
2891
|
+
const rr = {
|
|
2885
2892
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2886
2893
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2887
|
-
},
|
|
2894
|
+
}, ir = ({ variant: e, cta: t }) => {
|
|
2888
2895
|
const s = y(
|
|
2889
2896
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2890
|
-
|
|
2897
|
+
rr[e]
|
|
2891
2898
|
), a = et(t.href);
|
|
2892
2899
|
return a ? /* @__PURE__ */ n(
|
|
2893
2900
|
"a",
|
|
@@ -2914,10 +2921,10 @@ const ar = {
|
|
|
2914
2921
|
children: t.label
|
|
2915
2922
|
}
|
|
2916
2923
|
);
|
|
2917
|
-
},
|
|
2924
|
+
}, or = {
|
|
2918
2925
|
dark: "text-white",
|
|
2919
2926
|
light: "text-black/90"
|
|
2920
|
-
},
|
|
2927
|
+
}, lr = "text-white/30", cr = {
|
|
2921
2928
|
dark: "text-white/55",
|
|
2922
2929
|
light: "text-black/55"
|
|
2923
2930
|
}, tt = ({
|
|
@@ -2930,14 +2937,14 @@ const ar = {
|
|
|
2930
2937
|
cta: o,
|
|
2931
2938
|
trailingAction: l
|
|
2932
2939
|
}) => {
|
|
2933
|
-
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 !== "",
|
|
2934
|
-
if (!g && !u && !c && !
|
|
2940
|
+
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;
|
|
2941
|
+
if (!g && !u && !c && !p) return null;
|
|
2935
2942
|
const v = y(
|
|
2936
2943
|
"truncate text-base font-medium leading-6",
|
|
2937
|
-
d && !t ?
|
|
2944
|
+
d && !t ? lr : or[e]
|
|
2938
2945
|
), x = y(
|
|
2939
2946
|
"truncate text-xs leading-4",
|
|
2940
|
-
|
|
2947
|
+
cr[e]
|
|
2941
2948
|
);
|
|
2942
2949
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2943
2950
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2949,13 +2956,13 @@ const ar = {
|
|
|
2949
2956
|
] }),
|
|
2950
2957
|
u && /* @__PURE__ */ n("p", { className: x, children: a })
|
|
2951
2958
|
] }),
|
|
2952
|
-
!
|
|
2959
|
+
!p && c && /* @__PURE__ */ n("p", { className: x, children: f })
|
|
2953
2960
|
] }),
|
|
2954
2961
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2955
2962
|
] }),
|
|
2956
|
-
o && /* @__PURE__ */ n(
|
|
2963
|
+
o && /* @__PURE__ */ n(ir, { variant: e, cta: o })
|
|
2957
2964
|
] });
|
|
2958
|
-
},
|
|
2965
|
+
}, dr = y(
|
|
2959
2966
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2960
2967
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2961
2968
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2974,7 +2981,7 @@ const ar = {
|
|
|
2974
2981
|
"data-testid": d
|
|
2975
2982
|
}) => {
|
|
2976
2983
|
const m = s != null || a != null, g = y(
|
|
2977
|
-
|
|
2984
|
+
dr,
|
|
2978
2985
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2979
2986
|
// `focus-ring` is a design-system utility from the component-library
|
|
2980
2987
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -3022,15 +3029,15 @@ const ar = {
|
|
|
3022
3029
|
]
|
|
3023
3030
|
}
|
|
3024
3031
|
);
|
|
3025
|
-
},
|
|
3032
|
+
}, ur = {
|
|
3026
3033
|
dark: "bg-white/10",
|
|
3027
3034
|
light: "bg-black/5"
|
|
3028
|
-
},
|
|
3035
|
+
}, mr = {
|
|
3029
3036
|
dark: "size-16 text-white/25",
|
|
3030
3037
|
light: "size-16 text-black/25"
|
|
3031
|
-
},
|
|
3038
|
+
}, Ae = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
|
|
3032
3039
|
if (!t || !e) return !1;
|
|
3033
|
-
const s =
|
|
3040
|
+
const s = re(e);
|
|
3034
3041
|
return s === "video" || s === "audio";
|
|
3035
3042
|
}, nt = "bg-[#F2F3F4]", Ie = ({
|
|
3036
3043
|
variant: e,
|
|
@@ -3041,8 +3048,8 @@ const ar = {
|
|
|
3041
3048
|
topLeft: i,
|
|
3042
3049
|
topRight: o
|
|
3043
3050
|
}) => {
|
|
3044
|
-
const l =
|
|
3045
|
-
return
|
|
3051
|
+
const l = re(r), d = !!s && l === "video";
|
|
3052
|
+
return Ae(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
|
|
3046
3053
|
"audio",
|
|
3047
3054
|
{
|
|
3048
3055
|
src: s,
|
|
@@ -3083,10 +3090,10 @@ const ar = {
|
|
|
3083
3090
|
{
|
|
3084
3091
|
className: y(
|
|
3085
3092
|
"flex h-full w-full items-center justify-center",
|
|
3086
|
-
|
|
3093
|
+
ur[e]
|
|
3087
3094
|
),
|
|
3088
3095
|
children: ce(r, {
|
|
3089
|
-
className:
|
|
3096
|
+
className: mr[e],
|
|
3090
3097
|
weight: "regular"
|
|
3091
3098
|
})
|
|
3092
3099
|
}
|
|
@@ -3096,7 +3103,7 @@ const ar = {
|
|
|
3096
3103
|
]
|
|
3097
3104
|
}
|
|
3098
3105
|
);
|
|
3099
|
-
},
|
|
3106
|
+
}, hr = ({
|
|
3100
3107
|
title: e,
|
|
3101
3108
|
placeholderTitle: t,
|
|
3102
3109
|
description: s,
|
|
@@ -3110,7 +3117,7 @@ const ar = {
|
|
|
3110
3117
|
onDismiss: g,
|
|
3111
3118
|
onEditClick: u
|
|
3112
3119
|
}) => {
|
|
3113
|
-
const f = l === "classic", c =
|
|
3120
|
+
const f = l === "classic", c = Ae(r, o), p = g ? /* @__PURE__ */ n(
|
|
3114
3121
|
"button",
|
|
3115
3122
|
{
|
|
3116
3123
|
type: "button",
|
|
@@ -3126,7 +3133,7 @@ const ar = {
|
|
|
3126
3133
|
onClick: u,
|
|
3127
3134
|
"aria-label": "Edit attachment",
|
|
3128
3135
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3129
|
-
children: /* @__PURE__ */ n(
|
|
3136
|
+
children: /* @__PURE__ */ n(Ts, { className: "size-5", weight: "regular" })
|
|
3130
3137
|
}
|
|
3131
3138
|
) : void 0;
|
|
3132
3139
|
return c ? /* @__PURE__ */ n(Ee, { variant: "dark", bgClassName: nt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3139,12 +3146,12 @@ const ar = {
|
|
|
3139
3146
|
mimeType: r
|
|
3140
3147
|
}
|
|
3141
3148
|
) }),
|
|
3142
|
-
|
|
3149
|
+
p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
|
|
3143
3150
|
] }) }) : /* @__PURE__ */ h(
|
|
3144
3151
|
Ee,
|
|
3145
3152
|
{
|
|
3146
3153
|
variant: "dark",
|
|
3147
|
-
topRight: f ?
|
|
3154
|
+
topRight: f ? p : void 0,
|
|
3148
3155
|
children: [
|
|
3149
3156
|
!f && /* @__PURE__ */ n(
|
|
3150
3157
|
Ie,
|
|
@@ -3154,7 +3161,7 @@ const ar = {
|
|
|
3154
3161
|
sourceUrl: o,
|
|
3155
3162
|
title: e,
|
|
3156
3163
|
mimeType: r,
|
|
3157
|
-
topRight:
|
|
3164
|
+
topRight: p
|
|
3158
3165
|
}
|
|
3159
3166
|
),
|
|
3160
3167
|
/* @__PURE__ */ n(
|
|
@@ -3173,7 +3180,7 @@ const ar = {
|
|
|
3173
3180
|
]
|
|
3174
3181
|
}
|
|
3175
3182
|
);
|
|
3176
|
-
},
|
|
3183
|
+
}, fr = ({
|
|
3177
3184
|
title: e,
|
|
3178
3185
|
description: t,
|
|
3179
3186
|
url: s,
|
|
@@ -3185,7 +3192,7 @@ const ar = {
|
|
|
3185
3192
|
cta: d,
|
|
3186
3193
|
onClick: m
|
|
3187
3194
|
}) => {
|
|
3188
|
-
const g =
|
|
3195
|
+
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 = Ae(a, i) ? nt : void 0, N = d && m ? {
|
|
3189
3196
|
...d,
|
|
3190
3197
|
onClick: () => {
|
|
3191
3198
|
var v;
|
|
@@ -3199,7 +3206,7 @@ const ar = {
|
|
|
3199
3206
|
href: f,
|
|
3200
3207
|
onClick: c,
|
|
3201
3208
|
ariaLabel: e ?? "Open attachment preview",
|
|
3202
|
-
bgClassName:
|
|
3209
|
+
bgClassName: p,
|
|
3203
3210
|
"data-testid": "link-attachment",
|
|
3204
3211
|
children: [
|
|
3205
3212
|
o === "featured" && /* @__PURE__ */ n(
|
|
@@ -3226,7 +3233,7 @@ const ar = {
|
|
|
3226
3233
|
]
|
|
3227
3234
|
}
|
|
3228
3235
|
);
|
|
3229
|
-
},
|
|
3236
|
+
}, gr = ({
|
|
3230
3237
|
title: e,
|
|
3231
3238
|
placeholderTitle: t,
|
|
3232
3239
|
description: s,
|
|
@@ -3239,14 +3246,14 @@ const ar = {
|
|
|
3239
3246
|
cta: m,
|
|
3240
3247
|
onClick: g
|
|
3241
3248
|
}) => {
|
|
3242
|
-
const u =
|
|
3249
|
+
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;
|
|
3243
3250
|
return /* @__PURE__ */ h(
|
|
3244
3251
|
Ee,
|
|
3245
3252
|
{
|
|
3246
3253
|
variant: "dark",
|
|
3247
3254
|
href: c,
|
|
3248
|
-
onClick:
|
|
3249
|
-
bgClassName:
|
|
3255
|
+
onClick: p,
|
|
3256
|
+
bgClassName: Ae(r, o) ? nt : void 0,
|
|
3250
3257
|
children: [
|
|
3251
3258
|
l === "featured" && /* @__PURE__ */ n(
|
|
3252
3259
|
Ie,
|
|
@@ -3273,20 +3280,20 @@ const ar = {
|
|
|
3273
3280
|
]
|
|
3274
3281
|
}
|
|
3275
3282
|
);
|
|
3276
|
-
},
|
|
3277
|
-
Composer:
|
|
3278
|
-
Sent:
|
|
3279
|
-
Received:
|
|
3280
|
-
},
|
|
3283
|
+
}, yi = {
|
|
3284
|
+
Composer: hr,
|
|
3285
|
+
Sent: gr,
|
|
3286
|
+
Received: fr
|
|
3287
|
+
}, br = {
|
|
3281
3288
|
dark: "bg-[#121110]",
|
|
3282
3289
|
light: "bg-[#e9eaed]"
|
|
3283
|
-
},
|
|
3290
|
+
}, pr = {
|
|
3284
3291
|
dark: "text-white",
|
|
3285
3292
|
light: "text-[#080707]"
|
|
3286
|
-
},
|
|
3293
|
+
}, vr = {
|
|
3287
3294
|
dark: "border-white/[0.08]",
|
|
3288
3295
|
light: "border-black/[0.08]"
|
|
3289
|
-
},
|
|
3296
|
+
}, xr = (e) => e === "dark" ? "sender" : "receiver", wr = {
|
|
3290
3297
|
sender: {
|
|
3291
3298
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3292
3299
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3308,7 +3315,7 @@ const ar = {
|
|
|
3308
3315
|
children: i,
|
|
3309
3316
|
"data-testid": o
|
|
3310
3317
|
}) => {
|
|
3311
|
-
const l = t != null && t !== "", d = xr
|
|
3318
|
+
const l = t != null && t !== "", d = wr[xr(e)][a];
|
|
3312
3319
|
return /* @__PURE__ */ h(
|
|
3313
3320
|
"div",
|
|
3314
3321
|
{
|
|
@@ -3323,10 +3330,10 @@ const ar = {
|
|
|
3323
3330
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3324
3331
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3325
3332
|
d,
|
|
3326
|
-
gr[e],
|
|
3327
3333
|
br[e],
|
|
3334
|
+
pr[e],
|
|
3328
3335
|
s && "border",
|
|
3329
|
-
s &&
|
|
3336
|
+
s && vr[e],
|
|
3330
3337
|
r
|
|
3331
3338
|
),
|
|
3332
3339
|
children: [
|
|
@@ -3369,16 +3376,16 @@ const ar = {
|
|
|
3369
3376
|
),
|
|
3370
3377
|
children: /* @__PURE__ */ n(pe, { className: "size-3", weight: "bold" })
|
|
3371
3378
|
}
|
|
3372
|
-
), we = (e) => e === "received" ? "light" : "dark",
|
|
3379
|
+
), we = (e) => e === "received" ? "light" : "dark", Ci = ({
|
|
3373
3380
|
firstOfGroup: e,
|
|
3374
3381
|
endOfGroup: t,
|
|
3375
3382
|
groupedByUser: s
|
|
3376
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3383
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Nr = ({
|
|
3377
3384
|
src: e,
|
|
3378
3385
|
mimeType: t,
|
|
3379
3386
|
filename: s,
|
|
3380
3387
|
items: a
|
|
3381
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3388
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], _r = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3382
3389
|
/* @__PURE__ */ n(
|
|
3383
3390
|
"audio",
|
|
3384
3391
|
{
|
|
@@ -3401,7 +3408,7 @@ const ar = {
|
|
|
3401
3408
|
preload: l,
|
|
3402
3409
|
onDismiss: d
|
|
3403
3410
|
}) => {
|
|
3404
|
-
const m = we(e), g = e === "composer" && !!d, u =
|
|
3411
|
+
const m = we(e), g = e === "composer" && !!d, u = Nr({ src: t, mimeType: s, filename: a, items: r });
|
|
3405
3412
|
if (u.length === 0)
|
|
3406
3413
|
return null;
|
|
3407
3414
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3412,30 +3419,30 @@ const ar = {
|
|
|
3412
3419
|
text: i,
|
|
3413
3420
|
groupPosition: o,
|
|
3414
3421
|
"data-testid": "audio-attachment",
|
|
3415
|
-
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c,
|
|
3416
|
-
|
|
3422
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
|
|
3423
|
+
_r,
|
|
3417
3424
|
{
|
|
3418
3425
|
item: c,
|
|
3419
3426
|
preload: f,
|
|
3420
3427
|
trailingAction: (
|
|
3421
3428
|
// Composer only supports a single attachment, so the
|
|
3422
3429
|
// dismiss control sits on the only player.
|
|
3423
|
-
g &&
|
|
3430
|
+
g && p === 0 ? /* @__PURE__ */ n(xe, { onClick: d, variant: "inline" }) : void 0
|
|
3424
3431
|
)
|
|
3425
3432
|
},
|
|
3426
|
-
`${c.src}-${
|
|
3433
|
+
`${c.src}-${p}`
|
|
3427
3434
|
)) })
|
|
3428
3435
|
}
|
|
3429
3436
|
);
|
|
3430
|
-
},
|
|
3431
|
-
Composer:
|
|
3432
|
-
Sent:
|
|
3433
|
-
Received:
|
|
3437
|
+
}, yr = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), kr = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Er = {
|
|
3438
|
+
Composer: yr,
|
|
3439
|
+
Sent: Cr,
|
|
3440
|
+
Received: kr
|
|
3434
3441
|
};
|
|
3435
|
-
function
|
|
3442
|
+
function Ir(e) {
|
|
3436
3443
|
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`;
|
|
3437
3444
|
}
|
|
3438
|
-
const
|
|
3445
|
+
const Sr = {
|
|
3439
3446
|
pdf: "PDF",
|
|
3440
3447
|
doc: "DOC",
|
|
3441
3448
|
xls: "XLS",
|
|
@@ -3445,7 +3452,7 @@ const Ir = {
|
|
|
3445
3452
|
text: "TXT",
|
|
3446
3453
|
markdown: "MD"
|
|
3447
3454
|
};
|
|
3448
|
-
function
|
|
3455
|
+
function Tr(e, t) {
|
|
3449
3456
|
if (t) {
|
|
3450
3457
|
const r = t.lastIndexOf(".");
|
|
3451
3458
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3454,8 +3461,8 @@ function Sr(e, t) {
|
|
|
3454
3461
|
}
|
|
3455
3462
|
}
|
|
3456
3463
|
if (!e) return;
|
|
3457
|
-
if (
|
|
3458
|
-
const r = Qt(e), i =
|
|
3464
|
+
if (re(e) === "document") {
|
|
3465
|
+
const r = Qt(e), i = Sr[r];
|
|
3459
3466
|
if (i) return i;
|
|
3460
3467
|
if (e === "application/octet-stream") return;
|
|
3461
3468
|
}
|
|
@@ -3463,11 +3470,11 @@ function Sr(e, t) {
|
|
|
3463
3470
|
if (!(!a || a === "*"))
|
|
3464
3471
|
return a.toUpperCase();
|
|
3465
3472
|
}
|
|
3466
|
-
function
|
|
3467
|
-
const a =
|
|
3473
|
+
function Ar(e, t, s) {
|
|
3474
|
+
const a = Tr(e, t), r = typeof s == "number" && s > 0 ? Ir(s) : void 0;
|
|
3468
3475
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3469
3476
|
}
|
|
3470
|
-
function
|
|
3477
|
+
function te(e) {
|
|
3471
3478
|
try {
|
|
3472
3479
|
const s = new URL(e).pathname.split("/").pop();
|
|
3473
3480
|
return s && s.length > 0 ? decodeURIComponent(s) : "download";
|
|
@@ -3475,16 +3482,16 @@ function Q(e) {
|
|
|
3475
3482
|
return "download";
|
|
3476
3483
|
}
|
|
3477
3484
|
}
|
|
3478
|
-
const
|
|
3485
|
+
const Mr = {
|
|
3479
3486
|
dark: "text-white/55",
|
|
3480
3487
|
light: "text-black/65"
|
|
3481
|
-
},
|
|
3488
|
+
}, Dr = {
|
|
3482
3489
|
dark: "bg-white/10",
|
|
3483
3490
|
light: "bg-black/5"
|
|
3484
|
-
},
|
|
3491
|
+
}, Rr = {
|
|
3485
3492
|
dark: "text-white/85",
|
|
3486
3493
|
light: "text-black/85"
|
|
3487
|
-
},
|
|
3494
|
+
}, gn = ({
|
|
3488
3495
|
variant: e,
|
|
3489
3496
|
filename: t,
|
|
3490
3497
|
title: s,
|
|
@@ -3494,16 +3501,16 @@ const Ar = {
|
|
|
3494
3501
|
activateLabel: o,
|
|
3495
3502
|
trailingAction: l
|
|
3496
3503
|
}) => {
|
|
3497
|
-
const d = s ?? t ?? "File", m =
|
|
3504
|
+
const d = s ?? t ?? "File", m = Ar(a, t, r), g = /* @__PURE__ */ n(
|
|
3498
3505
|
"div",
|
|
3499
3506
|
{
|
|
3500
3507
|
className: y(
|
|
3501
3508
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3502
|
-
|
|
3509
|
+
Dr[e]
|
|
3503
3510
|
),
|
|
3504
3511
|
"aria-hidden": !0,
|
|
3505
3512
|
children: ce(a, {
|
|
3506
|
-
className: y("size-6",
|
|
3513
|
+
className: y("size-6", Rr[e]),
|
|
3507
3514
|
weight: "regular"
|
|
3508
3515
|
})
|
|
3509
3516
|
}
|
|
@@ -3514,7 +3521,7 @@ const Ar = {
|
|
|
3514
3521
|
{
|
|
3515
3522
|
className: y(
|
|
3516
3523
|
"truncate text-xs leading-4",
|
|
3517
|
-
|
|
3524
|
+
Mr[e]
|
|
3518
3525
|
),
|
|
3519
3526
|
children: m
|
|
3520
3527
|
}
|
|
@@ -3534,7 +3541,7 @@ const Ar = {
|
|
|
3534
3541
|
u
|
|
3535
3542
|
]
|
|
3536
3543
|
}
|
|
3537
|
-
) : /* @__PURE__ */ h(
|
|
3544
|
+
) : /* @__PURE__ */ h(se, { children: [
|
|
3538
3545
|
g,
|
|
3539
3546
|
u
|
|
3540
3547
|
] });
|
|
@@ -3543,8 +3550,8 @@ const Ar = {
|
|
|
3543
3550
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
3544
3551
|
] });
|
|
3545
3552
|
};
|
|
3546
|
-
async function
|
|
3547
|
-
const s = t ??
|
|
3553
|
+
async function bn(e, t) {
|
|
3554
|
+
const s = t ?? te(e);
|
|
3548
3555
|
try {
|
|
3549
3556
|
const a = await fetch(e, { mode: "cors" });
|
|
3550
3557
|
if (!a.ok) throw new Error(`HTTP ${a.status}`);
|
|
@@ -3557,23 +3564,23 @@ async function gn(e, t) {
|
|
|
3557
3564
|
}
|
|
3558
3565
|
}
|
|
3559
3566
|
}
|
|
3560
|
-
const
|
|
3567
|
+
const Lr = ({
|
|
3561
3568
|
src: e,
|
|
3562
3569
|
filename: t,
|
|
3563
3570
|
fileSize: s,
|
|
3564
3571
|
mimeType: a,
|
|
3565
3572
|
title: r,
|
|
3566
3573
|
items: i
|
|
3567
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3574
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Pr = ({
|
|
3568
3575
|
variant: e,
|
|
3569
3576
|
item: t,
|
|
3570
3577
|
index: s,
|
|
3571
3578
|
onActivate: a,
|
|
3572
3579
|
trailingAction: r
|
|
3573
3580
|
}) => {
|
|
3574
|
-
const i = t.filename ??
|
|
3581
|
+
const i = t.filename ?? te(t.src);
|
|
3575
3582
|
return /* @__PURE__ */ n(
|
|
3576
|
-
|
|
3583
|
+
gn,
|
|
3577
3584
|
{
|
|
3578
3585
|
variant: e,
|
|
3579
3586
|
filename: i,
|
|
@@ -3598,19 +3605,19 @@ const Rr = ({
|
|
|
3598
3605
|
onClick: m,
|
|
3599
3606
|
onDismiss: g
|
|
3600
3607
|
}) => {
|
|
3601
|
-
const u = we(e), f = e === "composer" && !!g, c =
|
|
3608
|
+
const u = we(e), f = e === "composer" && !!g, c = Lr({
|
|
3602
3609
|
src: t,
|
|
3603
3610
|
filename: s,
|
|
3604
3611
|
fileSize: a,
|
|
3605
3612
|
mimeType: r,
|
|
3606
3613
|
title: i,
|
|
3607
3614
|
items: o
|
|
3608
|
-
}),
|
|
3615
|
+
}), p = (v) => {
|
|
3609
3616
|
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
3610
3617
|
const x = c[v];
|
|
3611
3618
|
if (!x) return;
|
|
3612
|
-
const w = x.filename ??
|
|
3613
|
-
|
|
3619
|
+
const w = x.filename ?? te(x.src);
|
|
3620
|
+
bn(x.src, w);
|
|
3614
3621
|
};
|
|
3615
3622
|
if (c.length === 0)
|
|
3616
3623
|
return null;
|
|
@@ -3633,28 +3640,28 @@ const Rr = ({
|
|
|
3633
3640
|
groupPosition: d,
|
|
3634
3641
|
"data-testid": "file-attachment",
|
|
3635
3642
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
3636
|
-
|
|
3643
|
+
Pr,
|
|
3637
3644
|
{
|
|
3638
3645
|
variant: u,
|
|
3639
3646
|
item: v,
|
|
3640
3647
|
index: x,
|
|
3641
|
-
onActivate:
|
|
3648
|
+
onActivate: p,
|
|
3642
3649
|
trailingAction: f && x === 0 ? /* @__PURE__ */ n(xe, { onClick: g, variant: "inline" }) : N
|
|
3643
3650
|
},
|
|
3644
3651
|
`${v.src}-${x}`
|
|
3645
3652
|
)) })
|
|
3646
3653
|
}
|
|
3647
3654
|
);
|
|
3648
|
-
},
|
|
3649
|
-
Composer:
|
|
3655
|
+
}, Or = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), zr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), $r = {
|
|
3656
|
+
Composer: Or,
|
|
3650
3657
|
Sent: zr,
|
|
3651
|
-
Received:
|
|
3658
|
+
Received: Fr
|
|
3652
3659
|
}, rt = ({
|
|
3653
3660
|
onPrev: e,
|
|
3654
3661
|
onNext: t,
|
|
3655
3662
|
prevLabel: s = "Previous",
|
|
3656
3663
|
nextLabel: a = "Next"
|
|
3657
|
-
}) => /* @__PURE__ */ h(
|
|
3664
|
+
}) => /* @__PURE__ */ h(se, { children: [
|
|
3658
3665
|
/* @__PURE__ */ n(
|
|
3659
3666
|
"button",
|
|
3660
3667
|
{
|
|
@@ -3662,7 +3669,7 @@ const Rr = ({
|
|
|
3662
3669
|
onClick: e,
|
|
3663
3670
|
"aria-label": s,
|
|
3664
3671
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3665
|
-
children: /* @__PURE__ */ n(
|
|
3672
|
+
children: /* @__PURE__ */ n(As, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3666
3673
|
}
|
|
3667
3674
|
),
|
|
3668
3675
|
/* @__PURE__ */ n(
|
|
@@ -3672,10 +3679,10 @@ const Rr = ({
|
|
|
3672
3679
|
onClick: t,
|
|
3673
3680
|
"aria-label": a,
|
|
3674
3681
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3675
|
-
children: /* @__PURE__ */ n(
|
|
3682
|
+
children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3676
3683
|
}
|
|
3677
3684
|
)
|
|
3678
|
-
] }),
|
|
3685
|
+
] }), pn = ({
|
|
3679
3686
|
url: e,
|
|
3680
3687
|
filename: t,
|
|
3681
3688
|
variant: s = "pill",
|
|
@@ -3684,9 +3691,9 @@ const Rr = ({
|
|
|
3684
3691
|
tone: i = "dark",
|
|
3685
3692
|
onTriggered: o
|
|
3686
3693
|
}) => {
|
|
3687
|
-
const [l, d] =
|
|
3694
|
+
const [l, d] = O(!1), m = q(
|
|
3688
3695
|
(c) => {
|
|
3689
|
-
c.stopPropagation(), !l && (d(!0),
|
|
3696
|
+
c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
|
|
3690
3697
|
}).finally(() => {
|
|
3691
3698
|
d(!1), o == null || o();
|
|
3692
3699
|
}));
|
|
@@ -3760,20 +3767,20 @@ const Rr = ({
|
|
|
3760
3767
|
]
|
|
3761
3768
|
}
|
|
3762
3769
|
);
|
|
3763
|
-
},
|
|
3770
|
+
}, Fe = (e, t, s) => Math.min(Math.max(e, t), s), it = ({
|
|
3764
3771
|
length: e,
|
|
3765
3772
|
initialIndex: t,
|
|
3766
3773
|
open: s
|
|
3767
3774
|
}) => {
|
|
3768
|
-
const a =
|
|
3775
|
+
const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = O(a);
|
|
3769
3776
|
J(() => {
|
|
3770
|
-
s && i(
|
|
3777
|
+
s && i(Fe(t, 0, Math.max(e - 1, 0)));
|
|
3771
3778
|
}, [s, t, e]), J(() => {
|
|
3772
|
-
i((d) =>
|
|
3779
|
+
i((d) => Fe(d, 0, Math.max(e - 1, 0)));
|
|
3773
3780
|
}, [e]);
|
|
3774
|
-
const o =
|
|
3781
|
+
const o = q(() => {
|
|
3775
3782
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
3776
|
-
}, [e]), l =
|
|
3783
|
+
}, [e]), l = q(() => {
|
|
3777
3784
|
e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
|
|
3778
3785
|
}, [e]);
|
|
3779
3786
|
return J(() => {
|
|
@@ -3794,7 +3801,7 @@ const Rr = ({
|
|
|
3794
3801
|
children: i,
|
|
3795
3802
|
"data-testid": o
|
|
3796
3803
|
}) => {
|
|
3797
|
-
const l =
|
|
3804
|
+
const l = X(null), d = X(null);
|
|
3798
3805
|
return J(() => {
|
|
3799
3806
|
var f;
|
|
3800
3807
|
const u = l.current;
|
|
@@ -3875,7 +3882,7 @@ const Rr = ({
|
|
|
3875
3882
|
]
|
|
3876
3883
|
}
|
|
3877
3884
|
);
|
|
3878
|
-
},
|
|
3885
|
+
}, vn = ({
|
|
3879
3886
|
open: e,
|
|
3880
3887
|
items: t,
|
|
3881
3888
|
initialIndex: s = 0,
|
|
@@ -3885,8 +3892,8 @@ const Rr = ({
|
|
|
3885
3892
|
length: t.length,
|
|
3886
3893
|
initialIndex: s,
|
|
3887
3894
|
open: e
|
|
3888
|
-
}), l = t[r], d =
|
|
3889
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
3895
|
+
}), l = t[r], d = ne(
|
|
3896
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
|
|
3890
3897
|
[l]
|
|
3891
3898
|
);
|
|
3892
3899
|
return l ? /* @__PURE__ */ h(
|
|
@@ -3897,7 +3904,7 @@ const Rr = ({
|
|
|
3897
3904
|
ariaLabel: d,
|
|
3898
3905
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3899
3906
|
actions: /* @__PURE__ */ n(
|
|
3900
|
-
|
|
3907
|
+
pn,
|
|
3901
3908
|
{
|
|
3902
3909
|
url: l.src,
|
|
3903
3910
|
filename: d,
|
|
@@ -3931,7 +3938,7 @@ const Rr = ({
|
|
|
3931
3938
|
]
|
|
3932
3939
|
}
|
|
3933
3940
|
) : null;
|
|
3934
|
-
},
|
|
3941
|
+
}, Br = "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 = ({
|
|
3935
3942
|
tiles: e,
|
|
3936
3943
|
onTileActivate: t,
|
|
3937
3944
|
maxVisible: s = 4,
|
|
@@ -3940,7 +3947,7 @@ const Rr = ({
|
|
|
3940
3947
|
const r = e.length;
|
|
3941
3948
|
if (r === 0) return null;
|
|
3942
3949
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
|
|
3943
|
-
const u = y(
|
|
3950
|
+
const u = y(Br, "h-full w-full");
|
|
3944
3951
|
return t ? /* @__PURE__ */ h(
|
|
3945
3952
|
"button",
|
|
3946
3953
|
{
|
|
@@ -4002,14 +4009,14 @@ const Rr = ({
|
|
|
4002
4009
|
}
|
|
4003
4010
|
);
|
|
4004
4011
|
}, Ne = (e) => {
|
|
4005
|
-
const [t, s] =
|
|
4012
|
+
const [t, s] = O(!1), [a, r] = O(0), i = q(
|
|
4006
4013
|
(l) => {
|
|
4007
4014
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
|
|
4008
4015
|
},
|
|
4009
4016
|
[e]
|
|
4010
|
-
), o =
|
|
4017
|
+
), o = q(() => s(!1), []);
|
|
4011
4018
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
4012
|
-
},
|
|
4019
|
+
}, jr = (e, t, s, a) => ({
|
|
4013
4020
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
4014
4021
|
content: /* @__PURE__ */ n(
|
|
4015
4022
|
"img",
|
|
@@ -4024,15 +4031,15 @@ const Rr = ({
|
|
|
4024
4031
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4025
4032
|
}
|
|
4026
4033
|
)
|
|
4027
|
-
}),
|
|
4034
|
+
}), Vr = ({
|
|
4028
4035
|
src: e,
|
|
4029
4036
|
alt: t,
|
|
4030
4037
|
items: s
|
|
4031
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
4038
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], wn = (e, t) => e.map((s, a) => ({
|
|
4032
4039
|
src: s.src,
|
|
4033
4040
|
alt: s.alt,
|
|
4034
4041
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4035
|
-
})),
|
|
4042
|
+
})), Ur = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4036
4043
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ne(
|
|
4037
4044
|
r
|
|
4038
4045
|
);
|
|
@@ -4059,16 +4066,16 @@ const Rr = ({
|
|
|
4059
4066
|
),
|
|
4060
4067
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
|
|
4061
4068
|
/* @__PURE__ */ n(
|
|
4062
|
-
|
|
4069
|
+
vn,
|
|
4063
4070
|
{
|
|
4064
4071
|
open: o,
|
|
4065
|
-
items:
|
|
4072
|
+
items: wn([{ src: e, alt: t }], s),
|
|
4066
4073
|
initialIndex: l,
|
|
4067
4074
|
onClose: m
|
|
4068
4075
|
}
|
|
4069
4076
|
)
|
|
4070
4077
|
] });
|
|
4071
|
-
},
|
|
4078
|
+
}, Nn = ({
|
|
4072
4079
|
state: e,
|
|
4073
4080
|
src: t,
|
|
4074
4081
|
alt: s,
|
|
@@ -4079,13 +4086,13 @@ const Rr = ({
|
|
|
4079
4086
|
loading: l = "lazy",
|
|
4080
4087
|
onClick: d
|
|
4081
4088
|
}) => {
|
|
4082
|
-
const m =
|
|
4089
|
+
const m = Vr({ src: t, alt: s, items: r }), g = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ne(
|
|
4083
4090
|
d
|
|
4084
4091
|
);
|
|
4085
4092
|
if (m.length === 0)
|
|
4086
4093
|
return null;
|
|
4087
4094
|
const N = m.map(
|
|
4088
|
-
(v, x) =>
|
|
4095
|
+
(v, x) => jr(v, x, m.length, l)
|
|
4089
4096
|
);
|
|
4090
4097
|
return /* @__PURE__ */ h(
|
|
4091
4098
|
ve,
|
|
@@ -4095,24 +4102,24 @@ const Rr = ({
|
|
|
4095
4102
|
groupPosition: o,
|
|
4096
4103
|
"data-testid": "image-attachment",
|
|
4097
4104
|
children: [
|
|
4098
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4105
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: N, onTileActivate: c }) }),
|
|
4099
4106
|
/* @__PURE__ */ n(
|
|
4100
|
-
|
|
4107
|
+
vn,
|
|
4101
4108
|
{
|
|
4102
4109
|
open: u,
|
|
4103
|
-
items:
|
|
4110
|
+
items: wn(m, a),
|
|
4104
4111
|
initialIndex: f,
|
|
4105
|
-
onClose:
|
|
4112
|
+
onClose: p
|
|
4106
4113
|
}
|
|
4107
4114
|
)
|
|
4108
4115
|
]
|
|
4109
4116
|
}
|
|
4110
4117
|
);
|
|
4111
|
-
},
|
|
4112
|
-
Composer:
|
|
4113
|
-
Sent:
|
|
4114
|
-
Received:
|
|
4115
|
-
},
|
|
4118
|
+
}, Gr = (e) => /* @__PURE__ */ n(Ur, { ...e }), Hr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ n(Nn, { ...e, state: "received" }), qr = {
|
|
4119
|
+
Composer: Gr,
|
|
4120
|
+
Sent: Hr,
|
|
4121
|
+
Received: Yr
|
|
4122
|
+
}, Wr = ({
|
|
4116
4123
|
open: e,
|
|
4117
4124
|
items: t,
|
|
4118
4125
|
initialIndex: s = 0,
|
|
@@ -4122,11 +4129,11 @@ const Rr = ({
|
|
|
4122
4129
|
length: t.length,
|
|
4123
4130
|
initialIndex: s,
|
|
4124
4131
|
open: e
|
|
4125
|
-
}), l = t[r], d =
|
|
4126
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4132
|
+
}), l = t[r], d = ne(
|
|
4133
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
|
|
4127
4134
|
[l]
|
|
4128
|
-
), m =
|
|
4129
|
-
() => l ?
|
|
4135
|
+
), m = ne(
|
|
4136
|
+
() => l ? Xr(l.src) : void 0,
|
|
4130
4137
|
[l]
|
|
4131
4138
|
);
|
|
4132
4139
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4160,25 +4167,25 @@ const Rr = ({
|
|
|
4160
4167
|
]
|
|
4161
4168
|
}
|
|
4162
4169
|
);
|
|
4163
|
-
},
|
|
4170
|
+
}, Xr = (e) => {
|
|
4164
4171
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4165
4172
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4166
|
-
},
|
|
4173
|
+
}, Kr = ({
|
|
4167
4174
|
src: e,
|
|
4168
4175
|
filename: t,
|
|
4169
4176
|
fileSize: s,
|
|
4170
4177
|
title: a,
|
|
4171
4178
|
items: r
|
|
4172
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4179
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Jr = ({
|
|
4173
4180
|
variant: e,
|
|
4174
4181
|
item: t,
|
|
4175
4182
|
index: s,
|
|
4176
4183
|
onActivate: a,
|
|
4177
4184
|
trailingAction: r
|
|
4178
4185
|
}) => {
|
|
4179
|
-
const i = t.filename ??
|
|
4186
|
+
const i = t.filename ?? te(t.src);
|
|
4180
4187
|
return /* @__PURE__ */ n(
|
|
4181
|
-
|
|
4188
|
+
gn,
|
|
4182
4189
|
{
|
|
4183
4190
|
variant: e,
|
|
4184
4191
|
filename: i,
|
|
@@ -4202,14 +4209,14 @@ const Rr = ({
|
|
|
4202
4209
|
onClick: d,
|
|
4203
4210
|
onDismiss: m
|
|
4204
4211
|
}) => {
|
|
4205
|
-
const g = we(e), u =
|
|
4212
|
+
const g = we(e), u = Kr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4206
4213
|
d
|
|
4207
4214
|
), v = e === "composer" && !!m;
|
|
4208
4215
|
if (u.length === 0)
|
|
4209
4216
|
return null;
|
|
4210
4217
|
const x = u.map((w) => ({
|
|
4211
4218
|
src: w.src,
|
|
4212
|
-
filename: w.filename ??
|
|
4219
|
+
filename: w.filename ?? te(w.src)
|
|
4213
4220
|
}));
|
|
4214
4221
|
return /* @__PURE__ */ h(
|
|
4215
4222
|
ve,
|
|
@@ -4219,31 +4226,31 @@ const Rr = ({
|
|
|
4219
4226
|
groupPosition: l,
|
|
4220
4227
|
"data-testid": "pdf-attachment",
|
|
4221
4228
|
children: [
|
|
4222
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w,
|
|
4223
|
-
const
|
|
4224
|
-
|
|
4229
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
|
|
4230
|
+
const T = w.filename ?? te(w.src), S = v && A === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4231
|
+
pn,
|
|
4225
4232
|
{
|
|
4226
4233
|
url: w.src,
|
|
4227
|
-
filename:
|
|
4234
|
+
filename: T,
|
|
4228
4235
|
variant: "inline",
|
|
4229
|
-
label: `Download ${
|
|
4236
|
+
label: `Download ${T}`,
|
|
4230
4237
|
tone: g
|
|
4231
4238
|
}
|
|
4232
4239
|
);
|
|
4233
4240
|
return /* @__PURE__ */ n(
|
|
4234
|
-
|
|
4241
|
+
Jr,
|
|
4235
4242
|
{
|
|
4236
4243
|
variant: g,
|
|
4237
4244
|
item: w,
|
|
4238
|
-
index:
|
|
4239
|
-
onActivate:
|
|
4245
|
+
index: A,
|
|
4246
|
+
onActivate: p,
|
|
4240
4247
|
trailingAction: S
|
|
4241
4248
|
},
|
|
4242
|
-
`${w.src}-${
|
|
4249
|
+
`${w.src}-${A}`
|
|
4243
4250
|
);
|
|
4244
4251
|
}) }),
|
|
4245
4252
|
/* @__PURE__ */ n(
|
|
4246
|
-
|
|
4253
|
+
Wr,
|
|
4247
4254
|
{
|
|
4248
4255
|
open: f,
|
|
4249
4256
|
items: x,
|
|
@@ -4254,11 +4261,11 @@ const Rr = ({
|
|
|
4254
4261
|
]
|
|
4255
4262
|
}
|
|
4256
4263
|
);
|
|
4257
|
-
},
|
|
4258
|
-
Composer:
|
|
4259
|
-
Sent:
|
|
4260
|
-
Received:
|
|
4261
|
-
},
|
|
4264
|
+
}, Zr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Qr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), ti = {
|
|
4265
|
+
Composer: Zr,
|
|
4266
|
+
Sent: Qr,
|
|
4267
|
+
Received: ei
|
|
4268
|
+
}, _n = ({
|
|
4262
4269
|
open: e,
|
|
4263
4270
|
items: t,
|
|
4264
4271
|
initialIndex: s = 0,
|
|
@@ -4268,8 +4275,8 @@ const Rr = ({
|
|
|
4268
4275
|
length: t.length,
|
|
4269
4276
|
initialIndex: s,
|
|
4270
4277
|
open: e
|
|
4271
|
-
}), l = t[r], d =
|
|
4272
|
-
() => (l == null ? void 0 : l.filename) ?? (l ?
|
|
4278
|
+
}), l = t[r], d = ne(
|
|
4279
|
+
() => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
|
|
4273
4280
|
[l]
|
|
4274
4281
|
);
|
|
4275
4282
|
return l ? /* @__PURE__ */ h(
|
|
@@ -4308,7 +4315,7 @@ const Rr = ({
|
|
|
4308
4315
|
]
|
|
4309
4316
|
}
|
|
4310
4317
|
) : null;
|
|
4311
|
-
},
|
|
4318
|
+
}, ni = () => /* @__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(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
|
|
4312
4319
|
item: e,
|
|
4313
4320
|
index: t
|
|
4314
4321
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4330,23 +4337,23 @@ const Rr = ({
|
|
|
4330
4337
|
"aria-hidden": !0
|
|
4331
4338
|
}
|
|
4332
4339
|
) }),
|
|
4333
|
-
/* @__PURE__ */ n(
|
|
4334
|
-
] }),
|
|
4340
|
+
/* @__PURE__ */ n(ni, {})
|
|
4341
|
+
] }), si = (e, t, s) => ({
|
|
4335
4342
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4336
|
-
content: /* @__PURE__ */ n(
|
|
4337
|
-
}),
|
|
4343
|
+
content: /* @__PURE__ */ n(yn, { item: e, index: t })
|
|
4344
|
+
}), ai = ({
|
|
4338
4345
|
src: e,
|
|
4339
4346
|
poster: t,
|
|
4340
4347
|
mimeType: s,
|
|
4341
4348
|
preload: a,
|
|
4342
4349
|
items: r
|
|
4343
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4350
|
+
}) => 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) => ({
|
|
4344
4351
|
src: s.src,
|
|
4345
4352
|
poster: s.poster,
|
|
4346
4353
|
mimeType: s.mimeType,
|
|
4347
4354
|
preload: s.preload,
|
|
4348
4355
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4349
|
-
})),
|
|
4356
|
+
})), ri = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4350
4357
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ne(
|
|
4351
4358
|
i
|
|
4352
4359
|
);
|
|
@@ -4358,15 +4365,15 @@ const Rr = ({
|
|
|
4358
4365
|
onClick: () => m(0),
|
|
4359
4366
|
"aria-label": "Play video",
|
|
4360
4367
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4361
|
-
children: /* @__PURE__ */ n(
|
|
4368
|
+
children: /* @__PURE__ */ n(yn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4362
4369
|
}
|
|
4363
4370
|
),
|
|
4364
4371
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4365
4372
|
/* @__PURE__ */ n(
|
|
4366
|
-
|
|
4373
|
+
_n,
|
|
4367
4374
|
{
|
|
4368
4375
|
open: l,
|
|
4369
|
-
items:
|
|
4376
|
+
items: Cn(
|
|
4370
4377
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4371
4378
|
a
|
|
4372
4379
|
),
|
|
@@ -4375,7 +4382,7 @@ const Rr = ({
|
|
|
4375
4382
|
}
|
|
4376
4383
|
)
|
|
4377
4384
|
] });
|
|
4378
|
-
},
|
|
4385
|
+
}, kn = ({
|
|
4379
4386
|
state: e,
|
|
4380
4387
|
src: t,
|
|
4381
4388
|
poster: s,
|
|
@@ -4387,13 +4394,13 @@ const Rr = ({
|
|
|
4387
4394
|
preload: d,
|
|
4388
4395
|
onClick: m
|
|
4389
4396
|
}) => {
|
|
4390
|
-
const g =
|
|
4397
|
+
const g = ai({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ne(
|
|
4391
4398
|
m
|
|
4392
4399
|
);
|
|
4393
4400
|
if (g.length === 0)
|
|
4394
4401
|
return null;
|
|
4395
4402
|
const v = g.map(
|
|
4396
|
-
(x, w) =>
|
|
4403
|
+
(x, w) => si(x, w, g.length)
|
|
4397
4404
|
);
|
|
4398
4405
|
return /* @__PURE__ */ h(
|
|
4399
4406
|
ve,
|
|
@@ -4404,18 +4411,18 @@ const Rr = ({
|
|
|
4404
4411
|
"data-testid": "video-attachment",
|
|
4405
4412
|
children: [
|
|
4406
4413
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4407
|
-
|
|
4414
|
+
xn,
|
|
4408
4415
|
{
|
|
4409
4416
|
tiles: v,
|
|
4410
|
-
onTileActivate:
|
|
4417
|
+
onTileActivate: p,
|
|
4411
4418
|
className: "overflow-hidden rounded-md"
|
|
4412
4419
|
}
|
|
4413
4420
|
) }),
|
|
4414
4421
|
/* @__PURE__ */ n(
|
|
4415
|
-
|
|
4422
|
+
_n,
|
|
4416
4423
|
{
|
|
4417
4424
|
open: f,
|
|
4418
|
-
items:
|
|
4425
|
+
items: Cn(g, r),
|
|
4419
4426
|
initialIndex: c,
|
|
4420
4427
|
onClose: N
|
|
4421
4428
|
}
|
|
@@ -4423,17 +4430,17 @@ const Rr = ({
|
|
|
4423
4430
|
]
|
|
4424
4431
|
}
|
|
4425
4432
|
);
|
|
4426
|
-
},
|
|
4427
|
-
Composer:
|
|
4428
|
-
Sent:
|
|
4429
|
-
Received:
|
|
4430
|
-
},
|
|
4431
|
-
Image:
|
|
4432
|
-
Video:
|
|
4433
|
-
Audio:
|
|
4434
|
-
Pdf:
|
|
4435
|
-
File:
|
|
4436
|
-
},
|
|
4433
|
+
}, ii = (e) => /* @__PURE__ */ n(ri, { ...e }), oi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), ci = {
|
|
4434
|
+
Composer: ii,
|
|
4435
|
+
Sent: oi,
|
|
4436
|
+
Received: li
|
|
4437
|
+
}, ki = {
|
|
4438
|
+
Image: qr,
|
|
4439
|
+
Video: ci,
|
|
4440
|
+
Audio: Er,
|
|
4441
|
+
Pdf: ti,
|
|
4442
|
+
File: $r
|
|
4443
|
+
}, di = ({
|
|
4437
4444
|
question: e,
|
|
4438
4445
|
onClick: t,
|
|
4439
4446
|
loading: s = !1,
|
|
@@ -4455,7 +4462,7 @@ const Rr = ({
|
|
|
4455
4462
|
),
|
|
4456
4463
|
children: e
|
|
4457
4464
|
}
|
|
4458
|
-
),
|
|
4465
|
+
), Ei = ({
|
|
4459
4466
|
faqs: e,
|
|
4460
4467
|
onFaqClick: t,
|
|
4461
4468
|
loadingFaqId: s,
|
|
@@ -4467,7 +4474,7 @@ const Rr = ({
|
|
|
4467
4474
|
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
4468
4475
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
|
|
4469
4476
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
4470
|
-
|
|
4477
|
+
ae,
|
|
4471
4478
|
{
|
|
4472
4479
|
id: o || "account",
|
|
4473
4480
|
name: o || "Account",
|
|
@@ -4484,7 +4491,7 @@ const Rr = ({
|
|
|
4484
4491
|
children: [
|
|
4485
4492
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4486
4493
|
l.map((d) => /* @__PURE__ */ n(
|
|
4487
|
-
|
|
4494
|
+
di,
|
|
4488
4495
|
{
|
|
4489
4496
|
question: d.question,
|
|
4490
4497
|
onClick: () => t(d.id),
|
|
@@ -4499,37 +4506,37 @@ const Rr = ({
|
|
|
4499
4506
|
};
|
|
4500
4507
|
export {
|
|
4501
4508
|
en as A,
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4509
|
+
Vs as B,
|
|
4510
|
+
Ya as C,
|
|
4511
|
+
Ds as D,
|
|
4512
|
+
Ei as F,
|
|
4513
|
+
yi as L,
|
|
4514
|
+
wi as M,
|
|
4508
4515
|
ye as a,
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4516
|
+
ae as b,
|
|
4517
|
+
nr as c,
|
|
4518
|
+
un as d,
|
|
4519
|
+
Ni as e,
|
|
4520
|
+
di as f,
|
|
4521
|
+
re as g,
|
|
4515
4522
|
Ft as h,
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4523
|
+
ki as i,
|
|
4524
|
+
Na as j,
|
|
4525
|
+
xi as k,
|
|
4526
|
+
_i as l,
|
|
4527
|
+
Ar as m,
|
|
4528
|
+
Ir as n,
|
|
4529
|
+
er as o,
|
|
4530
|
+
Tr as p,
|
|
4524
4531
|
Kt as q,
|
|
4525
4532
|
ce as r,
|
|
4526
4533
|
sn as s,
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4534
|
+
Ls as t,
|
|
4535
|
+
Ci as u,
|
|
4536
|
+
Us as v,
|
|
4530
4537
|
Ze as w,
|
|
4531
4538
|
Qe as x,
|
|
4532
|
-
|
|
4533
|
-
|
|
4539
|
+
Te as y,
|
|
4540
|
+
ga as z
|
|
4534
4541
|
};
|
|
4535
|
-
//# sourceMappingURL=index-
|
|
4542
|
+
//# sourceMappingURL=index-Cj6b1oEe.js.map
|