@linktr.ee/messaging-react 3.13.3 → 3.13.4-rc-1784357388
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-_uyVx_jm.cjs → Card-BRke54I1.cjs} +2 -2
- package/dist/{Card-_uyVx_jm.cjs.map → Card-BRke54I1.cjs.map} +1 -1
- package/dist/{Card-DKc9To0f.js → Card-CjXVVZY0.js} +2 -2
- package/dist/{Card-DKc9To0f.js.map → Card-CjXVVZY0.js.map} +1 -1
- package/dist/index-3A2zNjp1.cjs +2 -0
- package/dist/{index-m-rBUNeU.cjs.map → index-3A2zNjp1.cjs.map} +1 -1
- package/dist/{index-DlkI5kym.js → index-DOIcFOhH.js} +719 -704
- package/dist/{index-DlkI5kym.js.map → index-DOIcFOhH.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -6
- package/dist/index.js +1 -1
- package/dist/testing.d.ts +3 -6
- package/package.json +2 -2
- package/src/components/CustomSystemMessage/CustomSystemMessage.stories.tsx +1 -1
- package/src/components/CustomSystemMessage/CustomSystemMessage.test.tsx +41 -1
- package/src/components/CustomSystemMessage/index.tsx +35 -1
- package/src/stream-custom-data.ts +3 -5
- package/dist/index-m-rBUNeU.cjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import V, { createContext as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as Ie, DotsThreeIcon as
|
|
2
|
+
import V, { createContext as ut, useContext as Te, useCallback as Q, useState as B, useRef as G, useEffect as K, useId as Xs, useMemo as re, Suspense as Ks } from "react";
|
|
3
|
+
import { StreamChatService as Zs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as Js, LinkPreviewsManager as qt } from "stream-chat";
|
|
5
|
+
import { Chat as Qs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as en, MessageStatus as tn, useMessageContext as Ne, MessageErrorIcon as at, MessageText as $e, areMessageUIPropsEqual as sn, useMessageReminder as nn, useComponentContext as ds, Attachment as an, EditMessageModal as rn, MessageBlocked as ln, MessageBouncePrompt as on, MessageDeleted as cn, MessageIsThreadReplyInChannelButtonIndicator as dn, MessageRepliesCountButton as un, ReminderNotification as mn, StreamedMessageText as hn, messageHasAttachments as fn, messageHasReactions as gn, isDateSeparatorMessage as pn, isMessageBlocked as bn, isMessageBounced as vn, MessageBounceModal as xn, Poll as _n, useMessageComposer as wn, useStateStore as Nn, MessageInput as Wt, useMessageInputContext as yn, useMessageComposerHasSendableData as kn, AttachmentPreviewList as Cn, QuotedMessagePreview as Sn, TextareaComposer as En, MessageTimestamp as Ke, AIStates as Ze, useTypingContext as In, useAIState as Tn, Channel as Mn, WithComponents as An, Window as Rn, MessageList as Xt, ChannelList as Dn, InfiniteScroll as Ln } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ie, DotsThreeIcon as zn, SpinnerGapIcon as Pe, SignOutIcon as Pn, ProhibitInsetIcon as Kt, FlagIcon as us, ArrowLeftIcon as rt, CurrencyDollarIcon as On, CaretRightIcon as xe, SparkleIcon as _e, FileIcon as ms, ImageIcon as Fn, SpeakerHighIcon as $n, VideoCameraIcon as hs, FileMdIcon as Un, FileTextIcon as Bn, FileZipIcon as jn, FilePptIcon as Vn, FileCsvIcon as Gn, FileXlsIcon as Yn, FileDocIcon as Hn, FilePdfIcon as qn, CircleNotchIcon as Se, PlayIcon as it, PauseIcon as Wn, LinkIcon as Xn, DownloadSimpleIcon as Ee, XIcon as Ye, CaretLeftIcon as Kn, GiftIcon as Zn, ThumbsUpIcon as Jn, ThumbsDownIcon as Qn, ChecksIcon as ea, PencilSimpleIcon as ta, TrashSimpleIcon as sa, ArrowUpIcon as na, ProhibitIcon as aa } from "@phosphor-icons/react";
|
|
7
7
|
import C from "classnames";
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const
|
|
8
|
+
import { MessageActions as ra, DefaultDropdownActionButton as fs } from "stream-chat-react/experimental";
|
|
9
|
+
const gs = ut({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const fs = dt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), mt = () => Te(gs), gl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -38,7 +38,7 @@ const fs = dt({
|
|
|
38
38
|
serviceConfig: !!n,
|
|
39
39
|
capabilities: Object.keys(r)
|
|
40
40
|
});
|
|
41
|
-
const [d, m] = B(null), [g, h] = B(null), [f, c] = B(!1), [b, v] = B(!1), [x, p] = B(null),
|
|
41
|
+
const [d, m] = B(null), [g, h] = B(null), [f, c] = B(!1), [b, v] = B(!1), [x, p] = B(null), w = G(!1), _ = G(null), S = G(n);
|
|
42
42
|
S.current = n;
|
|
43
43
|
const z = G(i);
|
|
44
44
|
z.current = i;
|
|
@@ -64,15 +64,15 @@ const fs = dt({
|
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const F = G(null);
|
|
67
|
-
!o && a && ((k = F.current) == null ? void 0 : k.apiKey) !== a && (F.current = { apiKey: a, client: new
|
|
68
|
-
const
|
|
67
|
+
!o && a && ((k = F.current) == null ? void 0 : k.apiKey) !== a && (F.current = { apiKey: a, client: new Js(a) });
|
|
68
|
+
const L = o || (a ? ((T = F.current) == null ? void 0 : T.client) ?? null : null);
|
|
69
69
|
K(() => {
|
|
70
70
|
const M = R.current, O = S.current;
|
|
71
71
|
if (o) {
|
|
72
|
-
|
|
72
|
+
_.current = null, m(null), h(null), c(!1), p(null), v(!1);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
if (!a || !
|
|
75
|
+
if (!a || !L || !O) {
|
|
76
76
|
l("⚠️ SERVICE INIT SKIPPED", {
|
|
77
77
|
renderCount: M,
|
|
78
78
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
@@ -83,25 +83,25 @@ const fs = dt({
|
|
|
83
83
|
renderCount: M,
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
|
-
const $ = new
|
|
86
|
+
const $ = new Zs({
|
|
87
87
|
...O,
|
|
88
88
|
apiKey: a,
|
|
89
89
|
debug: z.current,
|
|
90
|
-
client:
|
|
90
|
+
client: L
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
_.current = $, m($), l("✅ SERVICE SET", {
|
|
93
93
|
renderCount: M,
|
|
94
94
|
serviceInstance: !!$
|
|
95
95
|
});
|
|
96
|
-
}, [a,
|
|
97
|
-
const
|
|
96
|
+
}, [a, L, o]);
|
|
97
|
+
const D = G(null);
|
|
98
98
|
K(() => {
|
|
99
99
|
var O, $;
|
|
100
100
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!d,
|
|
102
102
|
hasUser: !!t,
|
|
103
103
|
userId: t == null ? void 0 : t.id,
|
|
104
|
-
isConnecting:
|
|
104
|
+
isConnecting: w.current,
|
|
105
105
|
isConnected: f,
|
|
106
106
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
107
107
|
}), o)
|
|
@@ -110,11 +110,11 @@ const fs = dt({
|
|
|
110
110
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
if (
|
|
113
|
+
if (w.current) {
|
|
114
114
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
|
-
if (((O =
|
|
117
|
+
if (((O = D.current) == null ? void 0 : O.serviceId) === d && (($ = D.current) == null ? void 0 : $.userId) === t.id) {
|
|
118
118
|
l(
|
|
119
119
|
"⚠️ USER CONNECTION SKIPPED",
|
|
120
120
|
"Already connected this user with this service"
|
|
@@ -122,11 +122,11 @@ const fs = dt({
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
(async () => {
|
|
125
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
125
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, v(!0), p(null);
|
|
126
126
|
try {
|
|
127
127
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
128
|
const j = await d.connectUser(t);
|
|
129
|
-
h(j), c(!0),
|
|
129
|
+
h(j), c(!0), D.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
130
130
|
userId: t.id,
|
|
131
131
|
clientId: j.userID
|
|
132
132
|
});
|
|
@@ -137,19 +137,19 @@ const fs = dt({
|
|
|
137
137
|
error: Z
|
|
138
138
|
});
|
|
139
139
|
} finally {
|
|
140
|
-
v(!1),
|
|
140
|
+
v(!1), w.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
141
141
|
userId: t.id,
|
|
142
142
|
isConnected: f
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
})();
|
|
146
146
|
}, [d, t, l, f, o]), K(() => {
|
|
147
|
-
const M =
|
|
147
|
+
const M = L;
|
|
148
148
|
return () => {
|
|
149
149
|
var O;
|
|
150
|
-
M && (
|
|
150
|
+
M && (D.current = null, (O = _.current) == null || O.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
|
-
}, [
|
|
152
|
+
}, [L]);
|
|
153
153
|
const y = Q(async () => {
|
|
154
154
|
if (l("🔄 REFRESH CONNECTION CALLED", {
|
|
155
155
|
hasService: !!d,
|
|
@@ -212,19 +212,19 @@ const fs = dt({
|
|
|
212
212
|
]);
|
|
213
213
|
return l("🔄 RENDER END", {
|
|
214
214
|
renderCount: R.current,
|
|
215
|
-
willRenderChat: !!
|
|
215
|
+
willRenderChat: !!L,
|
|
216
216
|
contextValueReady: !!I
|
|
217
|
-
}), /* @__PURE__ */ s(
|
|
218
|
-
|
|
217
|
+
}), /* @__PURE__ */ s(gs.Provider, { value: I, children: L ? /* @__PURE__ */ s(
|
|
218
|
+
Qs,
|
|
219
219
|
{
|
|
220
|
-
client:
|
|
220
|
+
client: L,
|
|
221
221
|
customClasses: {
|
|
222
222
|
channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
|
|
223
223
|
},
|
|
224
224
|
children: e
|
|
225
225
|
}
|
|
226
226
|
) : e });
|
|
227
|
-
},
|
|
227
|
+
}, ia = () => mt(), ht = (e) => {
|
|
228
228
|
var a, r;
|
|
229
229
|
const [t, n] = B(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -246,14 +246,14 @@ const fs = dt({
|
|
|
246
246
|
e.off("member.updated", i);
|
|
247
247
|
};
|
|
248
248
|
}, [e]), t;
|
|
249
|
-
},
|
|
249
|
+
}, la = "linktree-official", oa = "linktree-official-sender";
|
|
250
250
|
function He(e, t, n) {
|
|
251
251
|
const a = Object.values(e || {});
|
|
252
|
-
if (n ===
|
|
252
|
+
if (n === la) {
|
|
253
253
|
const r = a.find(
|
|
254
254
|
(i) => {
|
|
255
255
|
var o;
|
|
256
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
256
|
+
return ((o = i.user) == null ? void 0 : o.id) === oa;
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
if (r) return r;
|
|
@@ -265,18 +265,18 @@ function He(e, t, n) {
|
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
270
|
-
return
|
|
268
|
+
const ca = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
269
|
+
function da(e) {
|
|
270
|
+
return ca.test(e.trim());
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Zt(e, t) {
|
|
273
273
|
const n = e == null ? void 0 : e.trim();
|
|
274
|
-
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !
|
|
274
|
+
return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !da(n);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
276
|
+
function ft(e) {
|
|
277
|
+
return Zt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Zt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const Jt = [
|
|
280
280
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
281
281
|
// Apple
|
|
282
282
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -304,7 +304,7 @@ const Zt = [
|
|
|
304
304
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
305
305
|
// Melon
|
|
306
306
|
];
|
|
307
|
-
function
|
|
307
|
+
function ua(e) {
|
|
308
308
|
let t = 0;
|
|
309
309
|
for (let n = 0; n < e.length; n++) {
|
|
310
310
|
const a = e.charCodeAt(n);
|
|
@@ -312,14 +312,14 @@ function ca(e) {
|
|
|
312
312
|
}
|
|
313
313
|
return Math.abs(t);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
315
|
+
function ps(e) {
|
|
316
|
+
return Jt[ua(e) % Jt.length];
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
318
|
+
function ma(e) {
|
|
319
|
+
return ps(e).emoji;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
322
|
-
return
|
|
321
|
+
function ha(e) {
|
|
322
|
+
return ps(e).bgColor;
|
|
323
323
|
}
|
|
324
324
|
const ne = ({
|
|
325
325
|
id: e,
|
|
@@ -330,7 +330,7 @@ const ne = ({
|
|
|
330
330
|
shape: i = "squircle",
|
|
331
331
|
dmAgentEnabled: o = !1
|
|
332
332
|
}) => {
|
|
333
|
-
const l =
|
|
333
|
+
const l = ma(e), d = ha(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
336
|
src: t,
|
|
@@ -394,7 +394,7 @@ const ne = ({
|
|
|
394
394
|
]
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
|
-
},
|
|
397
|
+
}, fa = "https://linktr.ee/s/about/trust-center/report", ga = ({
|
|
398
398
|
channel: e,
|
|
399
399
|
participant: t,
|
|
400
400
|
showBlockParticipant: n = !0,
|
|
@@ -408,10 +408,10 @@ const ne = ({
|
|
|
408
408
|
logLabel: g = "useChannelModerationActions"
|
|
409
409
|
}) => {
|
|
410
410
|
var I;
|
|
411
|
-
const { service: h, debug: f } =
|
|
411
|
+
const { service: h, debug: f } = mt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [v, x] = B(!1), [p, w] = B(null), [_, S] = B(!1), [z, E] = B(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
|
|
412
412
|
return K(() => {
|
|
413
413
|
if (!b || !h || !c) {
|
|
414
|
-
x(!1),
|
|
414
|
+
x(!1), w(null);
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
let k = !1;
|
|
@@ -427,7 +427,7 @@ const ne = ({
|
|
|
427
427
|
} catch (T) {
|
|
428
428
|
k || console.error(`[${g}] Failed to check blocked status:`, T);
|
|
429
429
|
} finally {
|
|
430
|
-
k ||
|
|
430
|
+
k || w({ participantId: c, service: h });
|
|
431
431
|
}
|
|
432
432
|
})(), () => {
|
|
433
433
|
k = !0;
|
|
@@ -435,11 +435,11 @@ const ne = ({
|
|
|
435
435
|
}, [b, h, c, g]), {
|
|
436
436
|
isParticipantBlocked: v,
|
|
437
437
|
isCheckingBlockedStatus: R,
|
|
438
|
-
isLeaving:
|
|
438
|
+
isLeaving: _,
|
|
439
439
|
isUpdatingBlockStatus: z,
|
|
440
440
|
handleLeaveConversation: async () => {
|
|
441
441
|
var k;
|
|
442
|
-
if (!
|
|
442
|
+
if (!_) {
|
|
443
443
|
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), S(!0);
|
|
444
444
|
try {
|
|
445
445
|
const T = ((k = e._client) == null ? void 0 : k.userID) ?? null;
|
|
@@ -478,7 +478,7 @@ const ne = ({
|
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(), m == null || m(), window.open(
|
|
481
|
+
d == null || d(), m == null || m(), window.open(fa, "_blank", "noopener,noreferrer");
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
}, ye = ({
|
|
@@ -512,16 +512,16 @@ const ne = ({
|
|
|
512
512
|
customChannelActions: g,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [f, c] = B(!1), b = G(null), v =
|
|
515
|
+
const [f, c] = B(!1), b = G(null), v = Xs(), x = Q(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: p,
|
|
517
|
-
isCheckingBlockedStatus:
|
|
518
|
-
isLeaving:
|
|
517
|
+
isCheckingBlockedStatus: w,
|
|
518
|
+
isLeaving: _,
|
|
519
519
|
isUpdatingBlockStatus: S,
|
|
520
520
|
handleLeaveConversation: z,
|
|
521
521
|
handleBlockUser: E,
|
|
522
522
|
handleUnblockUser: R,
|
|
523
523
|
handleReportUser: F
|
|
524
|
-
} =
|
|
524
|
+
} = ga({
|
|
525
525
|
channel: e,
|
|
526
526
|
participant: t,
|
|
527
527
|
showBlockParticipant: a,
|
|
@@ -536,13 +536,13 @@ const ne = ({
|
|
|
536
536
|
});
|
|
537
537
|
return K(() => {
|
|
538
538
|
if (!f) return;
|
|
539
|
-
const
|
|
539
|
+
const D = (I) => {
|
|
540
540
|
b.current && !b.current.contains(I.target) && c(!1);
|
|
541
541
|
}, y = (I) => {
|
|
542
542
|
I.key === "Escape" && c(!1);
|
|
543
543
|
};
|
|
544
|
-
return document.addEventListener("mousedown",
|
|
545
|
-
document.removeEventListener("mousedown",
|
|
544
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", y), () => {
|
|
545
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", y);
|
|
546
546
|
};
|
|
547
547
|
}, [f]), !t || !(n || a || r || !!g) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
|
|
548
548
|
/* @__PURE__ */ u(
|
|
@@ -553,9 +553,9 @@ const ne = ({
|
|
|
553
553
|
"aria-haspopup": "true",
|
|
554
554
|
"aria-expanded": f,
|
|
555
555
|
"aria-controls": f ? v : void 0,
|
|
556
|
-
onClick: () => c((
|
|
556
|
+
onClick: () => c((D) => !D),
|
|
557
557
|
children: [
|
|
558
|
-
/* @__PURE__ */ s(
|
|
558
|
+
/* @__PURE__ */ s(zn, { className: "size-5 text-black/90" }),
|
|
559
559
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
560
560
|
]
|
|
561
561
|
}
|
|
@@ -574,15 +574,15 @@ const ne = ({
|
|
|
574
574
|
ye,
|
|
575
575
|
{
|
|
576
576
|
onClick: z,
|
|
577
|
-
disabled:
|
|
578
|
-
"aria-busy":
|
|
577
|
+
disabled: _,
|
|
578
|
+
"aria-busy": _,
|
|
579
579
|
children: [
|
|
580
|
-
|
|
580
|
+
_ ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Pn, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
a && /* @__PURE__ */ s("li", { children:
|
|
585
|
+
a && /* @__PURE__ */ s("li", { children: w ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
588
|
/* @__PURE__ */ u(ye, { disabled: !0, "aria-busy": !0, children: [
|
|
@@ -596,7 +596,7 @@ const ne = ({
|
|
|
596
596
|
disabled: S,
|
|
597
597
|
"aria-busy": S,
|
|
598
598
|
children: [
|
|
599
|
-
S ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(
|
|
599
|
+
S ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Kt, { className: "h-5 w-5" }),
|
|
600
600
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
601
601
|
]
|
|
602
602
|
}
|
|
@@ -607,13 +607,13 @@ const ne = ({
|
|
|
607
607
|
disabled: S,
|
|
608
608
|
"aria-busy": S,
|
|
609
609
|
children: [
|
|
610
|
-
S ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(
|
|
610
|
+
S ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Kt, { className: "h-5 w-5" }),
|
|
611
611
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
612
612
|
]
|
|
613
613
|
}
|
|
614
614
|
) }),
|
|
615
615
|
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(ye, { variant: "danger", onClick: F, children: [
|
|
616
|
-
/* @__PURE__ */ s(
|
|
616
|
+
/* @__PURE__ */ s(us, { className: "h-5 w-5" }),
|
|
617
617
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
618
|
] }) }),
|
|
619
619
|
g
|
|
@@ -621,7 +621,7 @@ const ne = ({
|
|
|
621
621
|
}
|
|
622
622
|
)
|
|
623
623
|
] });
|
|
624
|
-
}, Je = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring",
|
|
624
|
+
}, Je = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", pa = "CUSTOMER_PAID", ba = "Replies instantly with AI assistant", va = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === pa, xa = ({
|
|
625
625
|
className: e,
|
|
626
626
|
onBack: t,
|
|
627
627
|
showBackButton: n,
|
|
@@ -640,18 +640,18 @@ const ne = ({
|
|
|
640
640
|
showChannelInfo: v = !0,
|
|
641
641
|
onParticipantNameClick: x
|
|
642
642
|
}) => {
|
|
643
|
-
var
|
|
644
|
-
const { channel: p } = oe(), { client:
|
|
643
|
+
var L, D, y, I;
|
|
644
|
+
const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
|
|
645
645
|
() => {
|
|
646
646
|
var k;
|
|
647
647
|
return He(
|
|
648
648
|
(k = p.state) == null ? void 0 : k.members,
|
|
649
|
-
|
|
649
|
+
w == null ? void 0 : w.userID,
|
|
650
650
|
p.type
|
|
651
651
|
);
|
|
652
652
|
},
|
|
653
|
-
[(
|
|
654
|
-
), S =
|
|
653
|
+
[(L = p.state) == null ? void 0 : L.members, w == null ? void 0 : w.userID, p.type]
|
|
654
|
+
), S = ft(_ == null ? void 0 : _.user), z = (D = _ == null ? void 0 : _.user) == null ? void 0 : D.image, E = ht(p), R = va((y = p.data) == null ? void 0 : y.customer_tag) && (_ == null ? void 0 : _.is_follower) === !0, F = async () => {
|
|
655
655
|
try {
|
|
656
656
|
E ? await p.unpin() : await p.pin();
|
|
657
657
|
} catch (k) {
|
|
@@ -694,7 +694,7 @@ const ne = ({
|
|
|
694
694
|
/* @__PURE__ */ s(
|
|
695
695
|
ne,
|
|
696
696
|
{
|
|
697
|
-
id: ((I =
|
|
697
|
+
id: ((I = _ == null ? void 0 : _.user) == null ? void 0 : I.id) || p.id || "unknown",
|
|
698
698
|
name: S,
|
|
699
699
|
image: z,
|
|
700
700
|
dmAgentEnabled: r,
|
|
@@ -712,7 +712,7 @@ const ne = ({
|
|
|
712
712
|
{
|
|
713
713
|
"aria-label": "Paid customer",
|
|
714
714
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
715
|
-
children: /* @__PURE__ */ s(
|
|
715
|
+
children: /* @__PURE__ */ s(On, { className: "size-2.5", weight: "bold" })
|
|
716
716
|
}
|
|
717
717
|
),
|
|
718
718
|
a && E && /* @__PURE__ */ s(
|
|
@@ -734,8 +734,8 @@ const ne = ({
|
|
|
734
734
|
] })
|
|
735
735
|
] }),
|
|
736
736
|
r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
737
|
-
/* @__PURE__ */ s(
|
|
738
|
-
/* @__PURE__ */ s("span", { children:
|
|
737
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
738
|
+
/* @__PURE__ */ s("span", { children: ba })
|
|
739
739
|
] })
|
|
740
740
|
] })
|
|
741
741
|
]
|
|
@@ -766,7 +766,7 @@ const ne = ({
|
|
|
766
766
|
lt,
|
|
767
767
|
{
|
|
768
768
|
channel: p,
|
|
769
|
-
participant:
|
|
769
|
+
participant: _,
|
|
770
770
|
showDeleteConversation: l,
|
|
771
771
|
showBlockParticipant: d,
|
|
772
772
|
showReportParticipant: m,
|
|
@@ -783,13 +783,13 @@ const ne = ({
|
|
|
783
783
|
] })
|
|
784
784
|
}
|
|
785
785
|
);
|
|
786
|
-
},
|
|
787
|
-
function
|
|
786
|
+
}, _a = (e) => /* @__PURE__ */ s(en, { ...e, position: "center" }), ot = "vote_up", ct = "vote_down";
|
|
787
|
+
function wa(e) {
|
|
788
788
|
return e != null && e.length ? e.some((t) => t.type === ct) ? "down" : e.some((t) => t.type === ot) ? "up" : null : null;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Na(e) {
|
|
791
791
|
const { channel: t } = oe(), { client: n } = fe("useMessageVote"), a = re(
|
|
792
|
-
() =>
|
|
792
|
+
() => wa(e.own_reactions),
|
|
793
793
|
[e.own_reactions]
|
|
794
794
|
), r = Q(async () => {
|
|
795
795
|
if (n != null && n.userID)
|
|
@@ -814,39 +814,39 @@ function wa(e) {
|
|
|
814
814
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
815
815
|
return { selected: a, voteUp: r, voteDown: i };
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ya(e) {
|
|
818
818
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function bs({
|
|
821
821
|
message: e,
|
|
822
822
|
viewerLanguage: t
|
|
823
823
|
}) {
|
|
824
824
|
var r;
|
|
825
|
-
const n = e == null ? void 0 : e.text, a =
|
|
825
|
+
const n = e == null ? void 0 : e.text, a = ya(t);
|
|
826
826
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
827
827
|
}
|
|
828
|
-
const
|
|
829
|
-
function
|
|
828
|
+
const ka = ["linktr.ee"], Qt = "messaging-attachment-v1_0";
|
|
829
|
+
function Ca(e) {
|
|
830
830
|
try {
|
|
831
831
|
return new URL(e).hostname.toLowerCase();
|
|
832
832
|
} catch {
|
|
833
833
|
return null;
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
836
|
+
function Sa(e) {
|
|
837
|
+
return ka.some(
|
|
838
838
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
841
|
function he(e) {
|
|
842
842
|
const t = e == null ? void 0 : e.trim();
|
|
843
843
|
if (!t) return;
|
|
844
|
-
const n =
|
|
845
|
-
if (!n || !
|
|
844
|
+
const n = Ca(t);
|
|
845
|
+
if (!n || !Sa(n)) return t;
|
|
846
846
|
const a = new URL(t);
|
|
847
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
847
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Qt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Qt), a.toString());
|
|
848
848
|
}
|
|
849
|
-
const
|
|
849
|
+
const Ea = [
|
|
850
850
|
[/pdf/, "pdf"],
|
|
851
851
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
852
852
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -859,39 +859,39 @@ const Ca = [
|
|
|
859
859
|
function ce(e) {
|
|
860
860
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
861
861
|
}
|
|
862
|
-
function
|
|
863
|
-
const t =
|
|
862
|
+
function vs(e) {
|
|
863
|
+
const t = Ea.find(
|
|
864
864
|
([n]) => n.test(e)
|
|
865
865
|
);
|
|
866
866
|
return t ? t[1] : "generic";
|
|
867
867
|
}
|
|
868
|
-
const
|
|
869
|
-
video:
|
|
870
|
-
audio:
|
|
871
|
-
image:
|
|
872
|
-
document:
|
|
873
|
-
},
|
|
874
|
-
pdf:
|
|
875
|
-
doc:
|
|
876
|
-
xls:
|
|
877
|
-
csv:
|
|
878
|
-
ppt:
|
|
879
|
-
zip:
|
|
880
|
-
text:
|
|
881
|
-
markdown:
|
|
882
|
-
generic:
|
|
868
|
+
const Ia = {
|
|
869
|
+
video: hs,
|
|
870
|
+
audio: $n,
|
|
871
|
+
image: Fn,
|
|
872
|
+
document: ms
|
|
873
|
+
}, Ta = {
|
|
874
|
+
pdf: qn,
|
|
875
|
+
doc: Hn,
|
|
876
|
+
xls: Yn,
|
|
877
|
+
csv: Gn,
|
|
878
|
+
ppt: Vn,
|
|
879
|
+
zip: jn,
|
|
880
|
+
text: Bn,
|
|
881
|
+
markdown: Un,
|
|
882
|
+
generic: ms
|
|
883
883
|
};
|
|
884
|
-
function
|
|
884
|
+
function Ma(e) {
|
|
885
885
|
const t = ce(e);
|
|
886
|
-
return t !== "document" ?
|
|
886
|
+
return t !== "document" ? Ia[t] : Ta[vs(e)];
|
|
887
887
|
}
|
|
888
|
-
function
|
|
889
|
-
return V.createElement(
|
|
888
|
+
function we(e, t) {
|
|
889
|
+
return V.createElement(Ma(e), t);
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const Aa = (e) => {
|
|
892
892
|
var t, n;
|
|
893
893
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
|
|
894
|
-
},
|
|
894
|
+
}, Ra = ({
|
|
895
895
|
source: e,
|
|
896
896
|
mimeType: t,
|
|
897
897
|
poster: n,
|
|
@@ -903,7 +903,7 @@ const Ta = (e) => {
|
|
|
903
903
|
muted: d = !1,
|
|
904
904
|
onContainerClick: m
|
|
905
905
|
}) => {
|
|
906
|
-
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = B(a), [p,
|
|
906
|
+
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, w] = B(0), [_, S] = B(!1), [z, E] = B(!1), [R, F] = B(!1), [L, D] = B(!1), [y, I] = B(!0), [k, T] = B(null), M = Q(() => {
|
|
907
907
|
F(!1), x(!0);
|
|
908
908
|
}, []), O = Q((N) => {
|
|
909
909
|
const A = f.current;
|
|
@@ -911,7 +911,7 @@ const Ta = (e) => {
|
|
|
911
911
|
const Y = A.getBoundingClientRect();
|
|
912
912
|
return Math.max(
|
|
913
913
|
0,
|
|
914
|
-
Math.min(1, (
|
|
914
|
+
Math.min(1, (Aa(N) - Y.left) / Y.width)
|
|
915
915
|
);
|
|
916
916
|
}, []), $ = Q((N) => {
|
|
917
917
|
const A = h.current;
|
|
@@ -919,7 +919,7 @@ const Ta = (e) => {
|
|
|
919
919
|
}, []), j = (N) => {
|
|
920
920
|
N.stopPropagation(), S(!0);
|
|
921
921
|
const A = O(N);
|
|
922
|
-
|
|
922
|
+
w(A), $(A);
|
|
923
923
|
};
|
|
924
924
|
K(() => {
|
|
925
925
|
r !== void 0 && r !== b.current && (b.current = r, x(r));
|
|
@@ -930,25 +930,25 @@ const Ta = (e) => {
|
|
|
930
930
|
}
|
|
931
931
|
const N = () => {
|
|
932
932
|
const A = h.current;
|
|
933
|
-
A && A.duration && !
|
|
933
|
+
A && A.duration && !_ && w(A.currentTime / A.duration), c.current = requestAnimationFrame(N);
|
|
934
934
|
};
|
|
935
935
|
return c.current = requestAnimationFrame(N), () => {
|
|
936
936
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
937
937
|
};
|
|
938
|
-
}, [v,
|
|
938
|
+
}, [v, _]), K(() => {
|
|
939
939
|
const N = h.current;
|
|
940
940
|
N && (v ? N.play().catch((A) => {
|
|
941
941
|
x(!1), F(!0);
|
|
942
942
|
}) : N.pause());
|
|
943
943
|
}, [v]), K(() => {
|
|
944
|
-
if (!
|
|
945
|
-
const N = (Y) =>
|
|
944
|
+
if (!_) return;
|
|
945
|
+
const N = (Y) => w(O(Y)), A = (Y) => {
|
|
946
946
|
S(!1), $(O(Y));
|
|
947
947
|
};
|
|
948
948
|
return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
|
|
949
949
|
window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
|
|
950
950
|
};
|
|
951
|
-
}, [
|
|
951
|
+
}, [_, O, $]);
|
|
952
952
|
const Z = k ? { aspectRatio: String(k) } : void 0, ee = k ? "" : " aspect-video", X = Math.round(p * 100);
|
|
953
953
|
return /* @__PURE__ */ u(
|
|
954
954
|
"div",
|
|
@@ -982,7 +982,7 @@ const Ta = (e) => {
|
|
|
982
982
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
983
983
|
}
|
|
984
984
|
),
|
|
985
|
-
!n && (g === "audio" || y) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
985
|
+
!n && (g === "audio" || y) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
|
|
986
986
|
className: "size-12 text-black/20",
|
|
987
987
|
weight: "regular"
|
|
988
988
|
}) }),
|
|
@@ -994,14 +994,14 @@ const Ta = (e) => {
|
|
|
994
994
|
loop: i,
|
|
995
995
|
muted: d,
|
|
996
996
|
style: { width: "100%", height: "100%" },
|
|
997
|
-
onLoadStart: () =>
|
|
997
|
+
onLoadStart: () => D(!0),
|
|
998
998
|
onCanPlay: () => {
|
|
999
|
-
|
|
999
|
+
D(!1), I(!1);
|
|
1000
1000
|
},
|
|
1001
|
-
onWaiting: () =>
|
|
1001
|
+
onWaiting: () => D(!0),
|
|
1002
1002
|
onPlay: () => F(!1),
|
|
1003
1003
|
onEnded: () => {
|
|
1004
|
-
i || (x(!1),
|
|
1004
|
+
i || (x(!1), w(0));
|
|
1005
1005
|
},
|
|
1006
1006
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1007
1007
|
}
|
|
@@ -1014,23 +1014,23 @@ const Ta = (e) => {
|
|
|
1014
1014
|
muted: d,
|
|
1015
1015
|
playsInline: !0,
|
|
1016
1016
|
style: { width: "100%", height: "100%" },
|
|
1017
|
-
onLoadStart: () =>
|
|
1017
|
+
onLoadStart: () => D(!0),
|
|
1018
1018
|
onCanPlay: () => {
|
|
1019
|
-
|
|
1019
|
+
D(!1), I(!1);
|
|
1020
1020
|
},
|
|
1021
|
-
onWaiting: () =>
|
|
1021
|
+
onWaiting: () => D(!0),
|
|
1022
1022
|
onPlay: () => F(!1),
|
|
1023
1023
|
onLoadedMetadata: () => {
|
|
1024
1024
|
const N = h.current;
|
|
1025
1025
|
N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && T(N.videoWidth / N.videoHeight);
|
|
1026
1026
|
},
|
|
1027
1027
|
onEnded: () => {
|
|
1028
|
-
i || (x(!1),
|
|
1028
|
+
i || (x(!1), w(0));
|
|
1029
1029
|
},
|
|
1030
1030
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1031
1031
|
}
|
|
1032
1032
|
) }),
|
|
1033
|
-
|
|
1033
|
+
L && !R && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
1034
1034
|
Se,
|
|
1035
1035
|
{
|
|
1036
1036
|
className: "size-8 animate-spin text-white/80",
|
|
@@ -1089,7 +1089,7 @@ const Ta = (e) => {
|
|
|
1089
1089
|
},
|
|
1090
1090
|
className: "shrink-0 text-white",
|
|
1091
1091
|
"aria-label": v ? "Pause" : "Play",
|
|
1092
|
-
children: v ? /* @__PURE__ */ s(
|
|
1092
|
+
children: v ? /* @__PURE__ */ s(Wn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(it, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1093
1093
|
}
|
|
1094
1094
|
),
|
|
1095
1095
|
/* @__PURE__ */ u(
|
|
@@ -1115,7 +1115,7 @@ const Ta = (e) => {
|
|
|
1115
1115
|
/* @__PURE__ */ s(
|
|
1116
1116
|
"div",
|
|
1117
1117
|
{
|
|
1118
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z ||
|
|
1118
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z || _ ? "h-1.5" : "h-1"}`,
|
|
1119
1119
|
children: /* @__PURE__ */ s(
|
|
1120
1120
|
"div",
|
|
1121
1121
|
{
|
|
@@ -1128,7 +1128,7 @@ const Ta = (e) => {
|
|
|
1128
1128
|
/* @__PURE__ */ s(
|
|
1129
1129
|
"div",
|
|
1130
1130
|
{
|
|
1131
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z ||
|
|
1131
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1132
1132
|
style: { left: `${X}%` }
|
|
1133
1133
|
}
|
|
1134
1134
|
)
|
|
@@ -1139,7 +1139,7 @@ const Ta = (e) => {
|
|
|
1139
1139
|
]
|
|
1140
1140
|
}
|
|
1141
1141
|
);
|
|
1142
|
-
},
|
|
1142
|
+
}, es = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", xs = ({
|
|
1143
1143
|
mimeType: e,
|
|
1144
1144
|
sourceUrl: t,
|
|
1145
1145
|
thumbnailUrl: n,
|
|
@@ -1150,7 +1150,7 @@ const Ta = (e) => {
|
|
|
1150
1150
|
}) => {
|
|
1151
1151
|
const l = ce(e), [d, m] = B(!1), g = he(t), h = he(n);
|
|
1152
1152
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
|
|
1153
|
-
|
|
1153
|
+
Ra,
|
|
1154
1154
|
{
|
|
1155
1155
|
source: t,
|
|
1156
1156
|
mimeType: e,
|
|
@@ -1196,12 +1196,12 @@ const Ta = (e) => {
|
|
|
1196
1196
|
"div",
|
|
1197
1197
|
{
|
|
1198
1198
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1199
|
-
children:
|
|
1200
|
-
className:
|
|
1199
|
+
children: we(e, {
|
|
1200
|
+
className: es(r),
|
|
1201
1201
|
weight: "regular"
|
|
1202
1202
|
})
|
|
1203
1203
|
}
|
|
1204
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1204
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
|
|
1205
1205
|
"img",
|
|
1206
1206
|
{
|
|
1207
1207
|
src: h ?? n,
|
|
@@ -1213,13 +1213,13 @@ const Ta = (e) => {
|
|
|
1213
1213
|
"div",
|
|
1214
1214
|
{
|
|
1215
1215
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1216
|
-
children:
|
|
1217
|
-
className:
|
|
1216
|
+
children: we(e, {
|
|
1217
|
+
className: es(r),
|
|
1218
1218
|
weight: "regular"
|
|
1219
1219
|
})
|
|
1220
1220
|
}
|
|
1221
1221
|
);
|
|
1222
|
-
},
|
|
1222
|
+
}, _s = ({
|
|
1223
1223
|
variant: e,
|
|
1224
1224
|
thumbnail: t,
|
|
1225
1225
|
title: n,
|
|
@@ -1260,7 +1260,7 @@ const Ta = (e) => {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
),
|
|
1262
1262
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1263
|
-
|
|
1263
|
+
we(r, {
|
|
1264
1264
|
className: C(
|
|
1265
1265
|
"size-5 shrink-0",
|
|
1266
1266
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1288,25 +1288,25 @@ const Ta = (e) => {
|
|
|
1288
1288
|
function ws(e) {
|
|
1289
1289
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function gt(e) {
|
|
1292
1292
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function La(e) {
|
|
1295
1295
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function za(e) {
|
|
1298
1298
|
return e ? "text-white" : "text-black";
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function Pa(e) {
|
|
1301
1301
|
return e ? "text-white/55" : "text-black/55";
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Oa(e) {
|
|
1304
1304
|
return e ? "text-white/40" : "text-black/40";
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Fa(e) {
|
|
1307
1307
|
return e ? "text-white/20" : "text-black/20";
|
|
1308
1308
|
}
|
|
1309
|
-
const
|
|
1309
|
+
const pt = ({ attachment: e, isMyMessage: t }) => {
|
|
1310
1310
|
const { title: n, 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__ */ u(V.Fragment, { children: [
|
|
1311
1311
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1312
1312
|
"img",
|
|
@@ -1318,26 +1318,26 @@ const gt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1318
1318
|
) : /* @__PURE__ */ s(
|
|
1319
1319
|
"div",
|
|
1320
1320
|
{
|
|
1321
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1322
|
-
children: /* @__PURE__ */ s(
|
|
1321
|
+
className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
|
|
1322
|
+
children: /* @__PURE__ */ s(Xn, { className: `size-12 ${Fa(t)}` })
|
|
1323
1323
|
}
|
|
1324
1324
|
) }),
|
|
1325
1325
|
/* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
|
|
1326
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1327
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1328
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1326
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
|
|
1327
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
|
|
1328
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Oa(t)}`, children: d })
|
|
1329
1329
|
] })
|
|
1330
1330
|
] });
|
|
1331
1331
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function Ns(e) {
|
|
1334
1334
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function bt(e) {
|
|
1337
1337
|
var t;
|
|
1338
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1338
|
+
return (t = e.attachments) == null ? void 0 : t.find(Ns);
|
|
1339
1339
|
}
|
|
1340
|
-
async function
|
|
1340
|
+
async function $a(e, t) {
|
|
1341
1341
|
let n;
|
|
1342
1342
|
try {
|
|
1343
1343
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1349,7 +1349,7 @@ async function Oa(e, t) {
|
|
|
1349
1349
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1350
1350
|
o.href = i, o.download = n, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1352
|
+
const Ua = ({
|
|
1353
1353
|
url: e,
|
|
1354
1354
|
filename: t
|
|
1355
1355
|
}) => {
|
|
@@ -1361,7 +1361,7 @@ const Fa = ({
|
|
|
1361
1361
|
onClick: (i) => {
|
|
1362
1362
|
i.stopPropagation();
|
|
1363
1363
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1364
|
-
a(!0),
|
|
1364
|
+
a(!0), $a(e, t).then(() => {
|
|
1365
1365
|
o == null || o.close();
|
|
1366
1366
|
}).catch(() => {
|
|
1367
1367
|
o && (o.location.href = e);
|
|
@@ -1376,7 +1376,7 @@ const Fa = ({
|
|
|
1376
1376
|
}
|
|
1377
1377
|
);
|
|
1378
1378
|
};
|
|
1379
|
-
function
|
|
1379
|
+
function vt(e) {
|
|
1380
1380
|
var h, f, c, b;
|
|
1381
1381
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1382
1382
|
(v) => v.type === "video" && v.asset_url
|
|
@@ -1397,7 +1397,7 @@ function bt(e) {
|
|
|
1397
1397
|
thumbnailUrl: g
|
|
1398
1398
|
};
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const ys = ({
|
|
1401
1401
|
resolvedUrl: e,
|
|
1402
1402
|
resolvedType: t,
|
|
1403
1403
|
title: n,
|
|
@@ -1406,7 +1406,7 @@ const Ns = ({
|
|
|
1406
1406
|
}) => {
|
|
1407
1407
|
const i = a !== void 0 ? ws(a) : void 0;
|
|
1408
1408
|
return /* @__PURE__ */ s(
|
|
1409
|
-
|
|
1409
|
+
_s,
|
|
1410
1410
|
{
|
|
1411
1411
|
variant: "dark",
|
|
1412
1412
|
title: n,
|
|
@@ -1414,7 +1414,7 @@ const Ns = ({
|
|
|
1414
1414
|
mimeType: t,
|
|
1415
1415
|
detail: i,
|
|
1416
1416
|
thumbnail: /* @__PURE__ */ s(
|
|
1417
|
-
|
|
1417
|
+
xs,
|
|
1418
1418
|
{
|
|
1419
1419
|
mimeType: t,
|
|
1420
1420
|
sourceUrl: e,
|
|
@@ -1425,7 +1425,7 @@ const Ns = ({
|
|
|
1425
1425
|
)
|
|
1426
1426
|
}
|
|
1427
1427
|
);
|
|
1428
|
-
},
|
|
1428
|
+
}, ks = ({
|
|
1429
1429
|
resolvedUrl: e,
|
|
1430
1430
|
resolvedType: t,
|
|
1431
1431
|
title: n,
|
|
@@ -1434,14 +1434,14 @@ const Ns = ({
|
|
|
1434
1434
|
}) => {
|
|
1435
1435
|
const i = ce(t), o = a !== void 0 ? ws(a) : void 0;
|
|
1436
1436
|
return /* @__PURE__ */ s(
|
|
1437
|
-
|
|
1437
|
+
_s,
|
|
1438
1438
|
{
|
|
1439
1439
|
variant: "light",
|
|
1440
1440
|
title: n,
|
|
1441
1441
|
mimeType: t,
|
|
1442
1442
|
detail: o,
|
|
1443
1443
|
thumbnail: /* @__PURE__ */ s(
|
|
1444
|
-
|
|
1444
|
+
xs,
|
|
1445
1445
|
{
|
|
1446
1446
|
mimeType: t,
|
|
1447
1447
|
sourceUrl: e,
|
|
@@ -1451,14 +1451,14 @@ const Ns = ({
|
|
|
1451
1451
|
containedImage: i === "image" || i === "document"
|
|
1452
1452
|
}
|
|
1453
1453
|
),
|
|
1454
|
-
action: /* @__PURE__ */ s(
|
|
1454
|
+
action: /* @__PURE__ */ s(Ua, { url: e, filename: n })
|
|
1455
1455
|
}
|
|
1456
1456
|
);
|
|
1457
|
-
},
|
|
1457
|
+
}, Ba = ({
|
|
1458
1458
|
message: e,
|
|
1459
1459
|
isMyMessage: t = !1
|
|
1460
1460
|
}) => {
|
|
1461
|
-
const n =
|
|
1461
|
+
const n = bt(e), a = vt(e);
|
|
1462
1462
|
return !n && !a ? null : /* @__PURE__ */ u("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1463
1463
|
!t && e.user && /* @__PURE__ */ s(
|
|
1464
1464
|
ne,
|
|
@@ -1480,41 +1480,41 @@ const Ns = ({
|
|
|
1480
1480
|
className: "str-chat__message-bubble",
|
|
1481
1481
|
"data-attachment-bubble": "true",
|
|
1482
1482
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1483
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1483
|
+
children: n ? /* @__PURE__ */ s("div", { className: gt(t), children: /* @__PURE__ */ s(pt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ys, { ...a }) : /* @__PURE__ */ s(ks, { ...a })
|
|
1484
1484
|
}
|
|
1485
1485
|
) })
|
|
1486
1486
|
}
|
|
1487
1487
|
)
|
|
1488
1488
|
] });
|
|
1489
|
-
},
|
|
1489
|
+
}, ja = ({
|
|
1490
1490
|
message: e
|
|
1491
1491
|
}) => {
|
|
1492
|
-
const t =
|
|
1492
|
+
const t = bt(e);
|
|
1493
1493
|
if (t)
|
|
1494
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1495
|
-
const n =
|
|
1496
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1497
|
-
},
|
|
1494
|
+
return /* @__PURE__ */ s("div", { className: gt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !0 }) });
|
|
1495
|
+
const n = vt(e);
|
|
1496
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ys, { ...n }) }) : null;
|
|
1497
|
+
}, Va = ({
|
|
1498
1498
|
message: e
|
|
1499
1499
|
}) => {
|
|
1500
|
-
const t =
|
|
1500
|
+
const t = bt(e);
|
|
1501
1501
|
if (t)
|
|
1502
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1503
|
-
const n =
|
|
1504
|
-
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(
|
|
1505
|
-
},
|
|
1506
|
-
Creator:
|
|
1507
|
-
Visitor:
|
|
1508
|
-
}),
|
|
1502
|
+
return /* @__PURE__ */ s("div", { className: gt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !1 }) });
|
|
1503
|
+
const n = vt(e);
|
|
1504
|
+
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ks, { ...n }) }) : null;
|
|
1505
|
+
}, pl = Object.assign(Ba, {
|
|
1506
|
+
Creator: ja,
|
|
1507
|
+
Visitor: Va
|
|
1508
|
+
}), Ga = {
|
|
1509
1509
|
dark: "bg-[#1e2330]",
|
|
1510
1510
|
light: "bg-[#f2f1ef]"
|
|
1511
|
-
},
|
|
1511
|
+
}, Ya = {
|
|
1512
1512
|
dark: "text-white",
|
|
1513
1513
|
light: "text-[#000000]"
|
|
1514
|
-
},
|
|
1514
|
+
}, Ha = {
|
|
1515
1515
|
dark: "border-white/[0.08]",
|
|
1516
1516
|
light: "border-black/[0.08]"
|
|
1517
|
-
},
|
|
1517
|
+
}, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
|
|
1518
1518
|
sender: {
|
|
1519
1519
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1520
1520
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1536,7 +1536,7 @@ const Ns = ({
|
|
|
1536
1536
|
children: i,
|
|
1537
1537
|
"data-testid": o
|
|
1538
1538
|
}) => {
|
|
1539
|
-
const l = t != null && t !== "", d =
|
|
1539
|
+
const l = t != null && t !== "", d = Wa[qa(e)][a];
|
|
1540
1540
|
return /* @__PURE__ */ u(
|
|
1541
1541
|
"div",
|
|
1542
1542
|
{
|
|
@@ -1551,10 +1551,10 @@ const Ns = ({
|
|
|
1551
1551
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1552
1552
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1553
1553
|
d,
|
|
1554
|
-
|
|
1555
|
-
|
|
1554
|
+
Ga[e],
|
|
1555
|
+
Ya[e],
|
|
1556
1556
|
n && "border",
|
|
1557
|
-
n &&
|
|
1557
|
+
n && Ha[e],
|
|
1558
1558
|
r
|
|
1559
1559
|
),
|
|
1560
1560
|
children: [
|
|
@@ -1597,16 +1597,16 @@ const Ns = ({
|
|
|
1597
1597
|
),
|
|
1598
1598
|
children: /* @__PURE__ */ s(Ye, { className: "size-3", weight: "bold" })
|
|
1599
1599
|
}
|
|
1600
|
-
), Re = (e) => e === "received" ? "light" : "dark",
|
|
1600
|
+
), Re = (e) => e === "received" ? "light" : "dark", Xa = ({
|
|
1601
1601
|
firstOfGroup: e,
|
|
1602
1602
|
endOfGroup: t,
|
|
1603
1603
|
groupedByUser: n
|
|
1604
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1604
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
|
|
1605
1605
|
src: e,
|
|
1606
1606
|
mimeType: t,
|
|
1607
1607
|
filename: n,
|
|
1608
1608
|
items: a
|
|
1609
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1609
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Za = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
1610
1610
|
/* @__PURE__ */ s(
|
|
1611
1611
|
"audio",
|
|
1612
1612
|
{
|
|
@@ -1618,7 +1618,7 @@ const Ns = ({
|
|
|
1618
1618
|
}
|
|
1619
1619
|
),
|
|
1620
1620
|
n ?? null
|
|
1621
|
-
] }),
|
|
1621
|
+
] }), xt = ({
|
|
1622
1622
|
state: e,
|
|
1623
1623
|
src: t,
|
|
1624
1624
|
mimeType: n,
|
|
@@ -1629,7 +1629,7 @@ const Ns = ({
|
|
|
1629
1629
|
preload: l,
|
|
1630
1630
|
onDismiss: d
|
|
1631
1631
|
}) => {
|
|
1632
|
-
const m = Re(e), g = e === "composer" && !!d, h =
|
|
1632
|
+
const m = Re(e), g = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
|
|
1633
1633
|
if (h.length === 0)
|
|
1634
1634
|
return null;
|
|
1635
1635
|
const f = l ?? (h.length > 1 ? "none" : "metadata");
|
|
@@ -1641,7 +1641,7 @@ const Ns = ({
|
|
|
1641
1641
|
groupPosition: o,
|
|
1642
1642
|
"data-testid": "audio-attachment",
|
|
1643
1643
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
|
|
1644
|
-
|
|
1644
|
+
Za,
|
|
1645
1645
|
{
|
|
1646
1646
|
item: c,
|
|
1647
1647
|
preload: f,
|
|
@@ -1655,15 +1655,15 @@ const Ns = ({
|
|
|
1655
1655
|
)) })
|
|
1656
1656
|
}
|
|
1657
1657
|
);
|
|
1658
|
-
},
|
|
1659
|
-
Composer:
|
|
1660
|
-
Sent:
|
|
1661
|
-
Received:
|
|
1658
|
+
}, Ja = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), tr = {
|
|
1659
|
+
Composer: Ja,
|
|
1660
|
+
Sent: Qa,
|
|
1661
|
+
Received: er
|
|
1662
1662
|
};
|
|
1663
|
-
function
|
|
1663
|
+
function sr(e) {
|
|
1664
1664
|
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`;
|
|
1665
1665
|
}
|
|
1666
|
-
const
|
|
1666
|
+
const nr = {
|
|
1667
1667
|
pdf: "PDF",
|
|
1668
1668
|
doc: "DOC",
|
|
1669
1669
|
xls: "XLS",
|
|
@@ -1673,7 +1673,7 @@ const tr = {
|
|
|
1673
1673
|
text: "TXT",
|
|
1674
1674
|
markdown: "MD"
|
|
1675
1675
|
};
|
|
1676
|
-
function
|
|
1676
|
+
function ar(e, t) {
|
|
1677
1677
|
if (t) {
|
|
1678
1678
|
const r = t.lastIndexOf(".");
|
|
1679
1679
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1683,7 +1683,7 @@ function sr(e, t) {
|
|
|
1683
1683
|
}
|
|
1684
1684
|
if (!e) return;
|
|
1685
1685
|
if (ce(e) === "document") {
|
|
1686
|
-
const r =
|
|
1686
|
+
const r = vs(e), i = nr[r];
|
|
1687
1687
|
if (i) return i;
|
|
1688
1688
|
if (e === "application/octet-stream") return;
|
|
1689
1689
|
}
|
|
@@ -1691,8 +1691,8 @@ function sr(e, t) {
|
|
|
1691
1691
|
if (!(!a || a === "*"))
|
|
1692
1692
|
return a.toUpperCase();
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
const a =
|
|
1694
|
+
function rr(e, t, n) {
|
|
1695
|
+
const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
|
|
1696
1696
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1697
1697
|
}
|
|
1698
1698
|
function ie(e) {
|
|
@@ -1703,16 +1703,16 @@ function ie(e) {
|
|
|
1703
1703
|
return "download";
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
const
|
|
1706
|
+
const ir = {
|
|
1707
1707
|
dark: "text-white/55",
|
|
1708
1708
|
light: "text-black/65"
|
|
1709
|
-
},
|
|
1709
|
+
}, lr = {
|
|
1710
1710
|
dark: "bg-white/10",
|
|
1711
1711
|
light: "bg-black/5"
|
|
1712
|
-
},
|
|
1712
|
+
}, or = {
|
|
1713
1713
|
dark: "text-white/85",
|
|
1714
1714
|
light: "text-black/85"
|
|
1715
|
-
},
|
|
1715
|
+
}, Cs = ({
|
|
1716
1716
|
variant: e,
|
|
1717
1717
|
filename: t,
|
|
1718
1718
|
title: n,
|
|
@@ -1722,16 +1722,16 @@ const ar = {
|
|
|
1722
1722
|
activateLabel: o,
|
|
1723
1723
|
trailingAction: l
|
|
1724
1724
|
}) => {
|
|
1725
|
-
const d = n ?? t ?? "File", m =
|
|
1725
|
+
const d = n ?? t ?? "File", m = rr(a, t, r), g = /* @__PURE__ */ s(
|
|
1726
1726
|
"div",
|
|
1727
1727
|
{
|
|
1728
1728
|
className: C(
|
|
1729
1729
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1730
|
-
|
|
1730
|
+
lr[e]
|
|
1731
1731
|
),
|
|
1732
1732
|
"aria-hidden": !0,
|
|
1733
|
-
children:
|
|
1734
|
-
className: C("size-6",
|
|
1733
|
+
children: we(a, {
|
|
1734
|
+
className: C("size-6", or[e]),
|
|
1735
1735
|
weight: "regular"
|
|
1736
1736
|
})
|
|
1737
1737
|
}
|
|
@@ -1742,7 +1742,7 @@ const ar = {
|
|
|
1742
1742
|
{
|
|
1743
1743
|
className: C(
|
|
1744
1744
|
"truncate text-xs leading-4",
|
|
1745
|
-
|
|
1745
|
+
ir[e]
|
|
1746
1746
|
),
|
|
1747
1747
|
children: m
|
|
1748
1748
|
}
|
|
@@ -1771,7 +1771,7 @@ const ar = {
|
|
|
1771
1771
|
l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
|
|
1772
1772
|
] });
|
|
1773
1773
|
};
|
|
1774
|
-
async function
|
|
1774
|
+
async function Ss(e, t) {
|
|
1775
1775
|
const n = t ?? ie(e);
|
|
1776
1776
|
try {
|
|
1777
1777
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -1785,14 +1785,14 @@ async function Cs(e, t) {
|
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
|
-
const
|
|
1788
|
+
const cr = ({
|
|
1789
1789
|
src: e,
|
|
1790
1790
|
filename: t,
|
|
1791
1791
|
fileSize: n,
|
|
1792
1792
|
mimeType: a,
|
|
1793
1793
|
title: r,
|
|
1794
1794
|
items: i
|
|
1795
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1795
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
|
|
1796
1796
|
variant: e,
|
|
1797
1797
|
item: t,
|
|
1798
1798
|
index: n,
|
|
@@ -1801,7 +1801,7 @@ const lr = ({
|
|
|
1801
1801
|
}) => {
|
|
1802
1802
|
const i = t.filename ?? ie(t.src);
|
|
1803
1803
|
return /* @__PURE__ */ s(
|
|
1804
|
-
|
|
1804
|
+
Cs,
|
|
1805
1805
|
{
|
|
1806
1806
|
variant: e,
|
|
1807
1807
|
filename: i,
|
|
@@ -1813,7 +1813,7 @@ const lr = ({
|
|
|
1813
1813
|
trailingAction: r
|
|
1814
1814
|
}
|
|
1815
1815
|
);
|
|
1816
|
-
},
|
|
1816
|
+
}, _t = ({
|
|
1817
1817
|
state: e,
|
|
1818
1818
|
src: t,
|
|
1819
1819
|
filename: n,
|
|
@@ -1826,7 +1826,7 @@ const lr = ({
|
|
|
1826
1826
|
onClick: m,
|
|
1827
1827
|
onDismiss: g
|
|
1828
1828
|
}) => {
|
|
1829
|
-
const h = Re(e), f = e === "composer" && !!g, c =
|
|
1829
|
+
const h = Re(e), f = e === "composer" && !!g, c = cr({
|
|
1830
1830
|
src: t,
|
|
1831
1831
|
filename: n,
|
|
1832
1832
|
fileSize: a,
|
|
@@ -1837,8 +1837,8 @@ const lr = ({
|
|
|
1837
1837
|
if ((m == null ? void 0 : m(x)) === !1) return;
|
|
1838
1838
|
const p = c[x];
|
|
1839
1839
|
if (!p) return;
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1840
|
+
const w = p.filename ?? ie(p.src);
|
|
1841
|
+
Ss(p.src, w);
|
|
1842
1842
|
};
|
|
1843
1843
|
if (c.length === 0)
|
|
1844
1844
|
return null;
|
|
@@ -1861,7 +1861,7 @@ const lr = ({
|
|
|
1861
1861
|
groupPosition: d,
|
|
1862
1862
|
"data-testid": "file-attachment",
|
|
1863
1863
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ s(
|
|
1864
|
-
|
|
1864
|
+
dr,
|
|
1865
1865
|
{
|
|
1866
1866
|
variant: h,
|
|
1867
1867
|
item: x,
|
|
@@ -1873,10 +1873,10 @@ const lr = ({
|
|
|
1873
1873
|
)) })
|
|
1874
1874
|
}
|
|
1875
1875
|
);
|
|
1876
|
-
},
|
|
1877
|
-
Composer:
|
|
1878
|
-
Sent:
|
|
1879
|
-
Received:
|
|
1876
|
+
}, ur = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), fr = {
|
|
1877
|
+
Composer: ur,
|
|
1878
|
+
Sent: mr,
|
|
1879
|
+
Received: hr
|
|
1880
1880
|
}, wt = ({
|
|
1881
1881
|
onPrev: e,
|
|
1882
1882
|
onNext: t,
|
|
@@ -1890,7 +1890,7 @@ const lr = ({
|
|
|
1890
1890
|
onClick: e,
|
|
1891
1891
|
"aria-label": n,
|
|
1892
1892
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1893
|
-
children: /* @__PURE__ */ s(
|
|
1893
|
+
children: /* @__PURE__ */ s(Kn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1894
1894
|
}
|
|
1895
1895
|
),
|
|
1896
1896
|
/* @__PURE__ */ s(
|
|
@@ -1903,7 +1903,7 @@ const lr = ({
|
|
|
1903
1903
|
children: /* @__PURE__ */ s(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1904
1904
|
}
|
|
1905
1905
|
)
|
|
1906
|
-
] }),
|
|
1906
|
+
] }), Es = ({
|
|
1907
1907
|
url: e,
|
|
1908
1908
|
filename: t,
|
|
1909
1909
|
variant: n = "pill",
|
|
@@ -1914,7 +1914,7 @@ const lr = ({
|
|
|
1914
1914
|
}) => {
|
|
1915
1915
|
const [l, d] = B(!1), m = Q(
|
|
1916
1916
|
(c) => {
|
|
1917
|
-
c.stopPropagation(), !l && (d(!0),
|
|
1917
|
+
c.stopPropagation(), !l && (d(!0), Ss(e, t).catch(() => {
|
|
1918
1918
|
}).finally(() => {
|
|
1919
1919
|
d(!1), o == null || o();
|
|
1920
1920
|
}));
|
|
@@ -1988,7 +1988,7 @@ const lr = ({
|
|
|
1988
1988
|
]
|
|
1989
1989
|
}
|
|
1990
1990
|
);
|
|
1991
|
-
}, Qe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1991
|
+
}, Qe = (e, t, n) => Math.min(Math.max(e, t), n), Nt = ({
|
|
1992
1992
|
length: e,
|
|
1993
1993
|
initialIndex: t,
|
|
1994
1994
|
open: n
|
|
@@ -2013,7 +2013,7 @@ const lr = ({
|
|
|
2013
2013
|
};
|
|
2014
2014
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2015
2015
|
}, [n, e, o, l]), { index: r, prev: o, next: l };
|
|
2016
|
-
},
|
|
2016
|
+
}, yt = ({
|
|
2017
2017
|
open: e,
|
|
2018
2018
|
onClose: t,
|
|
2019
2019
|
ariaLabel: n,
|
|
@@ -2103,13 +2103,13 @@ const lr = ({
|
|
|
2103
2103
|
]
|
|
2104
2104
|
}
|
|
2105
2105
|
);
|
|
2106
|
-
},
|
|
2106
|
+
}, Is = ({
|
|
2107
2107
|
open: e,
|
|
2108
2108
|
items: t,
|
|
2109
2109
|
initialIndex: n = 0,
|
|
2110
2110
|
onClose: a
|
|
2111
2111
|
}) => {
|
|
2112
|
-
const { index: r, prev: i, next: o } =
|
|
2112
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
2113
2113
|
length: t.length,
|
|
2114
2114
|
initialIndex: n,
|
|
2115
2115
|
open: e
|
|
@@ -2118,14 +2118,14 @@ const lr = ({
|
|
|
2118
2118
|
[l]
|
|
2119
2119
|
);
|
|
2120
2120
|
return l ? /* @__PURE__ */ u(
|
|
2121
|
-
|
|
2121
|
+
yt,
|
|
2122
2122
|
{
|
|
2123
2123
|
open: e,
|
|
2124
2124
|
onClose: a,
|
|
2125
2125
|
ariaLabel: d,
|
|
2126
2126
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
2127
2127
|
actions: /* @__PURE__ */ s(
|
|
2128
|
-
|
|
2128
|
+
Es,
|
|
2129
2129
|
{
|
|
2130
2130
|
url: l.src,
|
|
2131
2131
|
filename: d,
|
|
@@ -2159,7 +2159,7 @@ const lr = ({
|
|
|
2159
2159
|
]
|
|
2160
2160
|
}
|
|
2161
2161
|
) : null;
|
|
2162
|
-
},
|
|
2162
|
+
}, gr = "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", Ts = ({
|
|
2163
2163
|
tiles: e,
|
|
2164
2164
|
onTileActivate: t,
|
|
2165
2165
|
maxVisible: n = 4,
|
|
@@ -2168,7 +2168,7 @@ const lr = ({
|
|
|
2168
2168
|
const r = e.length;
|
|
2169
2169
|
if (r === 0) return null;
|
|
2170
2170
|
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, g) => {
|
|
2171
|
-
const h = C(
|
|
2171
|
+
const h = C(gr, "h-full w-full");
|
|
2172
2172
|
return t ? /* @__PURE__ */ u(
|
|
2173
2173
|
"button",
|
|
2174
2174
|
{
|
|
@@ -2229,7 +2229,7 @@ const lr = ({
|
|
|
2229
2229
|
})
|
|
2230
2230
|
}
|
|
2231
2231
|
);
|
|
2232
|
-
},
|
|
2232
|
+
}, De = (e) => {
|
|
2233
2233
|
const [t, n] = B(!1), [a, r] = B(0), i = Q(
|
|
2234
2234
|
(l) => {
|
|
2235
2235
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), n(!0));
|
|
@@ -2237,7 +2237,7 @@ const lr = ({
|
|
|
2237
2237
|
[e]
|
|
2238
2238
|
), o = Q(() => n(!1), []);
|
|
2239
2239
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
2240
|
-
},
|
|
2240
|
+
}, pr = (e, t, n, a) => ({
|
|
2241
2241
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2242
2242
|
content: /* @__PURE__ */ s(
|
|
2243
2243
|
"img",
|
|
@@ -2252,16 +2252,16 @@ const lr = ({
|
|
|
2252
2252
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2253
2253
|
}
|
|
2254
2254
|
)
|
|
2255
|
-
}),
|
|
2255
|
+
}), br = ({
|
|
2256
2256
|
src: e,
|
|
2257
2257
|
alt: t,
|
|
2258
2258
|
items: n
|
|
2259
|
-
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [],
|
|
2259
|
+
}) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ms = (e, t) => e.map((n, a) => ({
|
|
2260
2260
|
src: n.src,
|
|
2261
2261
|
alt: n.alt,
|
|
2262
2262
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2263
|
-
})),
|
|
2264
|
-
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } =
|
|
2263
|
+
})), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2264
|
+
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = De(
|
|
2265
2265
|
r
|
|
2266
2266
|
);
|
|
2267
2267
|
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
@@ -2287,16 +2287,16 @@ const lr = ({
|
|
|
2287
2287
|
),
|
|
2288
2288
|
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2289
2289
|
/* @__PURE__ */ s(
|
|
2290
|
-
|
|
2290
|
+
Is,
|
|
2291
2291
|
{
|
|
2292
2292
|
open: o,
|
|
2293
|
-
items:
|
|
2293
|
+
items: Ms([{ src: e, alt: t }], n),
|
|
2294
2294
|
initialIndex: l,
|
|
2295
2295
|
onClose: m
|
|
2296
2296
|
}
|
|
2297
2297
|
)
|
|
2298
2298
|
] });
|
|
2299
|
-
},
|
|
2299
|
+
}, As = ({
|
|
2300
2300
|
state: e,
|
|
2301
2301
|
src: t,
|
|
2302
2302
|
alt: n,
|
|
@@ -2307,13 +2307,13 @@ const lr = ({
|
|
|
2307
2307
|
loading: l = "lazy",
|
|
2308
2308
|
onClick: d
|
|
2309
2309
|
}) => {
|
|
2310
|
-
const m =
|
|
2310
|
+
const m = br({ src: t, alt: n, items: r }), g = Re(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: b } = De(
|
|
2311
2311
|
d
|
|
2312
2312
|
);
|
|
2313
2313
|
if (m.length === 0)
|
|
2314
2314
|
return null;
|
|
2315
2315
|
const v = m.map(
|
|
2316
|
-
(x, p) =>
|
|
2316
|
+
(x, p) => pr(x, p, m.length, l)
|
|
2317
2317
|
);
|
|
2318
2318
|
return /* @__PURE__ */ u(
|
|
2319
2319
|
Me,
|
|
@@ -2323,12 +2323,12 @@ const lr = ({
|
|
|
2323
2323
|
groupPosition: o,
|
|
2324
2324
|
"data-testid": "image-attachment",
|
|
2325
2325
|
children: [
|
|
2326
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2326
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ts, { tiles: v, onTileActivate: c }) }),
|
|
2327
2327
|
/* @__PURE__ */ s(
|
|
2328
|
-
|
|
2328
|
+
Is,
|
|
2329
2329
|
{
|
|
2330
2330
|
open: h,
|
|
2331
|
-
items:
|
|
2331
|
+
items: Ms(m, a),
|
|
2332
2332
|
initialIndex: f,
|
|
2333
2333
|
onClose: b
|
|
2334
2334
|
}
|
|
@@ -2336,17 +2336,17 @@ const lr = ({
|
|
|
2336
2336
|
]
|
|
2337
2337
|
}
|
|
2338
2338
|
);
|
|
2339
|
-
},
|
|
2340
|
-
Composer:
|
|
2341
|
-
Sent:
|
|
2342
|
-
Received:
|
|
2343
|
-
},
|
|
2339
|
+
}, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), _r = (e) => /* @__PURE__ */ s(As, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(As, { ...e, state: "received" }), Nr = {
|
|
2340
|
+
Composer: xr,
|
|
2341
|
+
Sent: _r,
|
|
2342
|
+
Received: wr
|
|
2343
|
+
}, yr = ({
|
|
2344
2344
|
open: e,
|
|
2345
2345
|
items: t,
|
|
2346
2346
|
initialIndex: n = 0,
|
|
2347
2347
|
onClose: a
|
|
2348
2348
|
}) => {
|
|
2349
|
-
const { index: r, prev: i, next: o } =
|
|
2349
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
2350
2350
|
length: t.length,
|
|
2351
2351
|
initialIndex: n,
|
|
2352
2352
|
open: e
|
|
@@ -2354,11 +2354,11 @@ const lr = ({
|
|
|
2354
2354
|
() => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "document"),
|
|
2355
2355
|
[l]
|
|
2356
2356
|
), m = re(
|
|
2357
|
-
() => l ?
|
|
2357
|
+
() => l ? kr(l.src) : void 0,
|
|
2358
2358
|
[l]
|
|
2359
2359
|
);
|
|
2360
2360
|
return !l || !m ? null : /* @__PURE__ */ u(
|
|
2361
|
-
|
|
2361
|
+
yt,
|
|
2362
2362
|
{
|
|
2363
2363
|
open: e,
|
|
2364
2364
|
onClose: a,
|
|
@@ -2388,16 +2388,16 @@ const lr = ({
|
|
|
2388
2388
|
]
|
|
2389
2389
|
}
|
|
2390
2390
|
);
|
|
2391
|
-
},
|
|
2391
|
+
}, kr = (e) => {
|
|
2392
2392
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2393
2393
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2394
|
-
},
|
|
2394
|
+
}, Cr = ({
|
|
2395
2395
|
src: e,
|
|
2396
2396
|
filename: t,
|
|
2397
2397
|
fileSize: n,
|
|
2398
2398
|
title: a,
|
|
2399
2399
|
items: r
|
|
2400
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2400
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
|
|
2401
2401
|
variant: e,
|
|
2402
2402
|
item: t,
|
|
2403
2403
|
index: n,
|
|
@@ -2406,7 +2406,7 @@ const lr = ({
|
|
|
2406
2406
|
}) => {
|
|
2407
2407
|
const i = t.filename ?? ie(t.src);
|
|
2408
2408
|
return /* @__PURE__ */ s(
|
|
2409
|
-
|
|
2409
|
+
Cs,
|
|
2410
2410
|
{
|
|
2411
2411
|
variant: e,
|
|
2412
2412
|
filename: i,
|
|
@@ -2418,7 +2418,7 @@ const lr = ({
|
|
|
2418
2418
|
trailingAction: r
|
|
2419
2419
|
}
|
|
2420
2420
|
);
|
|
2421
|
-
},
|
|
2421
|
+
}, kt = ({
|
|
2422
2422
|
state: e,
|
|
2423
2423
|
src: t,
|
|
2424
2424
|
filename: n,
|
|
@@ -2430,14 +2430,14 @@ const lr = ({
|
|
|
2430
2430
|
onClick: d,
|
|
2431
2431
|
onDismiss: m
|
|
2432
2432
|
}) => {
|
|
2433
|
-
const g = Re(e), h =
|
|
2433
|
+
const g = Re(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = De(
|
|
2434
2434
|
d
|
|
2435
2435
|
), x = e === "composer" && !!m;
|
|
2436
2436
|
if (h.length === 0)
|
|
2437
2437
|
return null;
|
|
2438
|
-
const p = h.map((
|
|
2439
|
-
src:
|
|
2440
|
-
filename:
|
|
2438
|
+
const p = h.map((w) => ({
|
|
2439
|
+
src: w.src,
|
|
2440
|
+
filename: w.filename ?? ie(w.src)
|
|
2441
2441
|
}));
|
|
2442
2442
|
return /* @__PURE__ */ u(
|
|
2443
2443
|
Me,
|
|
@@ -2447,11 +2447,11 @@ const lr = ({
|
|
|
2447
2447
|
groupPosition: l,
|
|
2448
2448
|
"data-testid": "pdf-attachment",
|
|
2449
2449
|
children: [
|
|
2450
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
2451
|
-
const S =
|
|
2452
|
-
|
|
2450
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((w, _) => {
|
|
2451
|
+
const S = w.filename ?? ie(w.src), z = x && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2452
|
+
Es,
|
|
2453
2453
|
{
|
|
2454
|
-
url:
|
|
2454
|
+
url: w.src,
|
|
2455
2455
|
filename: S,
|
|
2456
2456
|
variant: "inline",
|
|
2457
2457
|
label: `Download ${S}`,
|
|
@@ -2459,19 +2459,19 @@ const lr = ({
|
|
|
2459
2459
|
}
|
|
2460
2460
|
);
|
|
2461
2461
|
return /* @__PURE__ */ s(
|
|
2462
|
-
|
|
2462
|
+
Sr,
|
|
2463
2463
|
{
|
|
2464
2464
|
variant: g,
|
|
2465
|
-
item:
|
|
2466
|
-
index:
|
|
2465
|
+
item: w,
|
|
2466
|
+
index: _,
|
|
2467
2467
|
onActivate: b,
|
|
2468
2468
|
trailingAction: z
|
|
2469
2469
|
},
|
|
2470
|
-
`${
|
|
2470
|
+
`${w.src}-${_}`
|
|
2471
2471
|
);
|
|
2472
2472
|
}) }),
|
|
2473
2473
|
/* @__PURE__ */ s(
|
|
2474
|
-
|
|
2474
|
+
yr,
|
|
2475
2475
|
{
|
|
2476
2476
|
open: f,
|
|
2477
2477
|
items: p,
|
|
@@ -2482,17 +2482,17 @@ const lr = ({
|
|
|
2482
2482
|
]
|
|
2483
2483
|
}
|
|
2484
2484
|
);
|
|
2485
|
-
},
|
|
2486
|
-
Composer:
|
|
2487
|
-
Sent:
|
|
2488
|
-
Received:
|
|
2489
|
-
},
|
|
2485
|
+
}, Er = (e) => /* @__PURE__ */ s(kt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(kt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(kt, { ...e, state: "received" }), Mr = {
|
|
2486
|
+
Composer: Er,
|
|
2487
|
+
Sent: Ir,
|
|
2488
|
+
Received: Tr
|
|
2489
|
+
}, Rs = ({
|
|
2490
2490
|
open: e,
|
|
2491
2491
|
items: t,
|
|
2492
2492
|
initialIndex: n = 0,
|
|
2493
2493
|
onClose: a
|
|
2494
2494
|
}) => {
|
|
2495
|
-
const { index: r, prev: i, next: o } =
|
|
2495
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
2496
2496
|
length: t.length,
|
|
2497
2497
|
initialIndex: n,
|
|
2498
2498
|
open: e
|
|
@@ -2501,7 +2501,7 @@ const lr = ({
|
|
|
2501
2501
|
[l]
|
|
2502
2502
|
);
|
|
2503
2503
|
return l ? /* @__PURE__ */ u(
|
|
2504
|
-
|
|
2504
|
+
yt,
|
|
2505
2505
|
{
|
|
2506
2506
|
open: e,
|
|
2507
2507
|
onClose: a,
|
|
@@ -2536,7 +2536,7 @@ const lr = ({
|
|
|
2536
2536
|
]
|
|
2537
2537
|
}
|
|
2538
2538
|
) : null;
|
|
2539
|
-
},
|
|
2539
|
+
}, Ar = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(it, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ds = ({
|
|
2540
2540
|
item: e,
|
|
2541
2541
|
index: t
|
|
2542
2542
|
}) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2551,18 +2551,18 @@ const lr = ({
|
|
|
2551
2551
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2552
2552
|
}
|
|
2553
2553
|
) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
2554
|
-
|
|
2554
|
+
hs,
|
|
2555
2555
|
{
|
|
2556
2556
|
className: "size-16 rounded-md text-white/30",
|
|
2557
2557
|
weight: "regular",
|
|
2558
2558
|
"aria-hidden": !0
|
|
2559
2559
|
}
|
|
2560
2560
|
) }),
|
|
2561
|
-
/* @__PURE__ */ s(
|
|
2562
|
-
] }),
|
|
2561
|
+
/* @__PURE__ */ s(Ar, {})
|
|
2562
|
+
] }), Rr = (e, t, n) => ({
|
|
2563
2563
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2564
|
-
content: /* @__PURE__ */ s(
|
|
2565
|
-
}),
|
|
2564
|
+
content: /* @__PURE__ */ s(Ds, { item: e, index: t })
|
|
2565
|
+
}), Dr = ({
|
|
2566
2566
|
src: e,
|
|
2567
2567
|
poster: t,
|
|
2568
2568
|
mimeType: n,
|
|
@@ -2574,8 +2574,8 @@ const lr = ({
|
|
|
2574
2574
|
mimeType: n.mimeType,
|
|
2575
2575
|
preload: n.preload,
|
|
2576
2576
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2577
|
-
})),
|
|
2578
|
-
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } =
|
|
2577
|
+
})), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
2578
|
+
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = De(
|
|
2579
2579
|
i
|
|
2580
2580
|
);
|
|
2581
2581
|
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
@@ -2586,12 +2586,12 @@ const lr = ({
|
|
|
2586
2586
|
onClick: () => m(0),
|
|
2587
2587
|
"aria-label": "Play video",
|
|
2588
2588
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2589
|
-
children: /* @__PURE__ */ s(
|
|
2589
|
+
children: /* @__PURE__ */ s(Ds, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
2590
2590
|
}
|
|
2591
2591
|
),
|
|
2592
2592
|
o ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: o }) }) : null,
|
|
2593
2593
|
/* @__PURE__ */ s(
|
|
2594
|
-
|
|
2594
|
+
Rs,
|
|
2595
2595
|
{
|
|
2596
2596
|
open: l,
|
|
2597
2597
|
items: Ls(
|
|
@@ -2603,7 +2603,7 @@ const lr = ({
|
|
|
2603
2603
|
}
|
|
2604
2604
|
)
|
|
2605
2605
|
] });
|
|
2606
|
-
},
|
|
2606
|
+
}, zs = ({
|
|
2607
2607
|
state: e,
|
|
2608
2608
|
src: t,
|
|
2609
2609
|
poster: n,
|
|
@@ -2615,13 +2615,13 @@ const lr = ({
|
|
|
2615
2615
|
preload: d,
|
|
2616
2616
|
onClick: m
|
|
2617
2617
|
}) => {
|
|
2618
|
-
const g =
|
|
2618
|
+
const g = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Re(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: v } = De(
|
|
2619
2619
|
m
|
|
2620
2620
|
);
|
|
2621
2621
|
if (g.length === 0)
|
|
2622
2622
|
return null;
|
|
2623
2623
|
const x = g.map(
|
|
2624
|
-
(p,
|
|
2624
|
+
(p, w) => Rr(p, w, g.length)
|
|
2625
2625
|
);
|
|
2626
2626
|
return /* @__PURE__ */ u(
|
|
2627
2627
|
Me,
|
|
@@ -2632,7 +2632,7 @@ const lr = ({
|
|
|
2632
2632
|
"data-testid": "video-attachment",
|
|
2633
2633
|
children: [
|
|
2634
2634
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2635
|
-
|
|
2635
|
+
Ts,
|
|
2636
2636
|
{
|
|
2637
2637
|
tiles: x,
|
|
2638
2638
|
onTileActivate: b,
|
|
@@ -2640,7 +2640,7 @@ const lr = ({
|
|
|
2640
2640
|
}
|
|
2641
2641
|
) }),
|
|
2642
2642
|
/* @__PURE__ */ s(
|
|
2643
|
-
|
|
2643
|
+
Rs,
|
|
2644
2644
|
{
|
|
2645
2645
|
open: f,
|
|
2646
2646
|
items: Ls(g, r),
|
|
@@ -2651,31 +2651,31 @@ const lr = ({
|
|
|
2651
2651
|
]
|
|
2652
2652
|
}
|
|
2653
2653
|
);
|
|
2654
|
-
},
|
|
2655
|
-
Composer:
|
|
2656
|
-
Sent:
|
|
2657
|
-
Received:
|
|
2654
|
+
}, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(zs, { ...e, state: "sent" }), Or = (e) => /* @__PURE__ */ s(zs, { ...e, state: "received" }), Fr = {
|
|
2655
|
+
Composer: zr,
|
|
2656
|
+
Sent: Pr,
|
|
2657
|
+
Received: Or
|
|
2658
2658
|
}, ke = {
|
|
2659
|
-
Image:
|
|
2660
|
-
Video:
|
|
2661
|
-
Audio:
|
|
2662
|
-
Pdf:
|
|
2663
|
-
File:
|
|
2664
|
-
},
|
|
2659
|
+
Image: Nr,
|
|
2660
|
+
Video: Fr,
|
|
2661
|
+
Audio: tr,
|
|
2662
|
+
Pdf: Mr,
|
|
2663
|
+
File: fr
|
|
2664
|
+
}, $r = {
|
|
2665
2665
|
isUnlocking: () => !1
|
|
2666
|
-
},
|
|
2667
|
-
LockedAttachment:
|
|
2668
|
-
},
|
|
2669
|
-
function
|
|
2670
|
-
return Te(
|
|
2666
|
+
}, Ur = {
|
|
2667
|
+
LockedAttachment: $r
|
|
2668
|
+
}, Ps = ut({}), bl = Ps.Provider;
|
|
2669
|
+
function Br(e) {
|
|
2670
|
+
return Te(Ps)[e] ?? Ur[e];
|
|
2671
2671
|
}
|
|
2672
|
-
const
|
|
2672
|
+
const jr = V.lazy(() => import("./Card-qS17qnN0.js")), Vr = V.lazy(() => import("./Card-CjXVVZY0.js")), Gr = () => /* @__PURE__ */ s(
|
|
2673
2673
|
"div",
|
|
2674
2674
|
{
|
|
2675
2675
|
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)]",
|
|
2676
2676
|
"aria-hidden": !0
|
|
2677
2677
|
}
|
|
2678
|
-
), Oe = (e) => /* @__PURE__ */ s(
|
|
2678
|
+
), Oe = (e) => /* @__PURE__ */ s(Ks, { fallback: /* @__PURE__ */ s(Gr, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(jr, { ...e }) : /* @__PURE__ */ s(Vr, { ...e }) }), Yr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2679
2679
|
"svg",
|
|
2680
2680
|
{
|
|
2681
2681
|
width: e,
|
|
@@ -2692,27 +2692,27 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2692
2692
|
}
|
|
2693
2693
|
)
|
|
2694
2694
|
}
|
|
2695
|
-
),
|
|
2695
|
+
), Hr = (e) => {
|
|
2696
2696
|
var t;
|
|
2697
2697
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2698
|
-
},
|
|
2698
|
+
}, qr = (e) => {
|
|
2699
2699
|
var t;
|
|
2700
2700
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2701
2701
|
}, Ue = (e) => {
|
|
2702
2702
|
var t;
|
|
2703
2703
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2704
|
-
},
|
|
2704
|
+
}, Ct = (e) => {
|
|
2705
2705
|
var t;
|
|
2706
2706
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2707
|
-
},
|
|
2707
|
+
}, Wr = (e) => {
|
|
2708
2708
|
var t;
|
|
2709
|
-
return
|
|
2710
|
-
},
|
|
2709
|
+
return Ct(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2710
|
+
}, Xr = (e) => {
|
|
2711
2711
|
var t;
|
|
2712
|
-
return
|
|
2713
|
-
},
|
|
2712
|
+
return Ct(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2713
|
+
}, Os = (e) => Hr(e) || qr(e), Kr = (e) => {
|
|
2714
2714
|
var t;
|
|
2715
|
-
return
|
|
2715
|
+
return Os(e) && !((t = e.text) != null && t.trim());
|
|
2716
2716
|
}, et = ({
|
|
2717
2717
|
message: e,
|
|
2718
2718
|
standalone: t = !1,
|
|
@@ -2720,7 +2720,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2720
2720
|
hasAttachment: a = !1
|
|
2721
2721
|
}) => {
|
|
2722
2722
|
var h;
|
|
2723
|
-
const r =
|
|
2723
|
+
const r = Os(e), i = Ue(e);
|
|
2724
2724
|
if (!r && !i)
|
|
2725
2725
|
return null;
|
|
2726
2726
|
if (r) {
|
|
@@ -2728,7 +2728,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2728
2728
|
if (!f) return null;
|
|
2729
2729
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
2730
2730
|
return /* @__PURE__ */ u("div", { className: c, children: [
|
|
2731
|
-
/* @__PURE__ */ s(
|
|
2731
|
+
/* @__PURE__ */ s(Zn, { size: t ? 14 : 12 }),
|
|
2732
2732
|
/* @__PURE__ */ s("span", { children: b })
|
|
2733
2733
|
] });
|
|
2734
2734
|
}
|
|
@@ -2736,7 +2736,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2736
2736
|
"message-chatbot-indicator",
|
|
2737
2737
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2738
2738
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2739
|
-
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2739
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Yr, { size: o ? 12 : 15 }) });
|
|
2740
2740
|
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(te, { children: [
|
|
2741
2741
|
m,
|
|
2742
2742
|
g
|
|
@@ -2744,7 +2744,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2744
2744
|
g,
|
|
2745
2745
|
m
|
|
2746
2746
|
] }) });
|
|
2747
|
-
},
|
|
2747
|
+
}, Zr = ({
|
|
2748
2748
|
selected: e,
|
|
2749
2749
|
onVoteUp: t,
|
|
2750
2750
|
onVoteDown: n
|
|
@@ -2760,7 +2760,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2760
2760
|
"aria-label": "Good response",
|
|
2761
2761
|
"aria-pressed": e === "up",
|
|
2762
2762
|
"data-tooltip": "Good response",
|
|
2763
|
-
children: /* @__PURE__ */ s(
|
|
2763
|
+
children: /* @__PURE__ */ s(Jn, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
2764
2764
|
}
|
|
2765
2765
|
),
|
|
2766
2766
|
/* @__PURE__ */ s(
|
|
@@ -2774,7 +2774,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2774
2774
|
"aria-label": "Bad response",
|
|
2775
2775
|
"aria-pressed": e === "down",
|
|
2776
2776
|
"data-tooltip": "Bad response",
|
|
2777
|
-
children: /* @__PURE__ */ s(
|
|
2777
|
+
children: /* @__PURE__ */ s(Qn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2778
2778
|
}
|
|
2779
2779
|
)
|
|
2780
2780
|
] }), tt = () => {
|
|
@@ -2787,37 +2787,37 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2787
2787
|
}
|
|
2788
2788
|
})();
|
|
2789
2789
|
return e.id !== n ? null : /* @__PURE__ */ u(te, { children: [
|
|
2790
|
-
/* @__PURE__ */ s(
|
|
2790
|
+
/* @__PURE__ */ s(ea, { weight: "bold", "aria-hidden": "true" }),
|
|
2791
2791
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2792
2792
|
] });
|
|
2793
|
-
},
|
|
2794
|
-
|
|
2793
|
+
}, Jr = () => null, Qr = () => /* @__PURE__ */ s(
|
|
2794
|
+
tn,
|
|
2795
2795
|
{
|
|
2796
2796
|
MessageSentStatus: tt,
|
|
2797
2797
|
MessageDeliveredStatus: tt,
|
|
2798
2798
|
MessageReadStatus: tt,
|
|
2799
|
-
MessageSendingStatus:
|
|
2799
|
+
MessageSendingStatus: Jr
|
|
2800
2800
|
}
|
|
2801
|
-
),
|
|
2802
|
-
function
|
|
2801
|
+
), ei = /^([a-z][a-z0-9+.-]*):/i, ti = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2802
|
+
function St(e) {
|
|
2803
2803
|
if (typeof e != "string") return;
|
|
2804
2804
|
const t = e.trim();
|
|
2805
2805
|
if (t === "") return;
|
|
2806
|
-
const n =
|
|
2806
|
+
const n = ei.exec(t);
|
|
2807
2807
|
if (n) {
|
|
2808
2808
|
const a = n[1].toLowerCase();
|
|
2809
|
-
return
|
|
2809
|
+
return ti.has(a) ? t : void 0;
|
|
2810
2810
|
}
|
|
2811
2811
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2812
2812
|
}
|
|
2813
|
-
const
|
|
2813
|
+
const si = {
|
|
2814
2814
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2815
2815
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2816
|
-
},
|
|
2816
|
+
}, ni = ({ variant: e, cta: t }) => {
|
|
2817
2817
|
const n = C(
|
|
2818
2818
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2819
|
-
|
|
2820
|
-
), a =
|
|
2819
|
+
si[e]
|
|
2820
|
+
), a = St(t.href);
|
|
2821
2821
|
return a ? /* @__PURE__ */ s(
|
|
2822
2822
|
"a",
|
|
2823
2823
|
{
|
|
@@ -2843,13 +2843,13 @@ const ei = {
|
|
|
2843
2843
|
children: t.label
|
|
2844
2844
|
}
|
|
2845
2845
|
);
|
|
2846
|
-
},
|
|
2846
|
+
}, ai = {
|
|
2847
2847
|
dark: "text-white",
|
|
2848
2848
|
light: "text-black/90"
|
|
2849
|
-
},
|
|
2849
|
+
}, ri = "text-white/30", ii = {
|
|
2850
2850
|
dark: "text-white/55",
|
|
2851
2851
|
light: "text-black/55"
|
|
2852
|
-
},
|
|
2852
|
+
}, Et = ({
|
|
2853
2853
|
variant: e,
|
|
2854
2854
|
title: t,
|
|
2855
2855
|
placeholderTitle: n,
|
|
@@ -2863,10 +2863,10 @@ const ei = {
|
|
|
2863
2863
|
if (!g && !h && !c && !b) return null;
|
|
2864
2864
|
const x = C(
|
|
2865
2865
|
"truncate text-base font-medium leading-6",
|
|
2866
|
-
d && !t ?
|
|
2866
|
+
d && !t ? ri : ai[e]
|
|
2867
2867
|
), p = C(
|
|
2868
2868
|
"truncate text-xs leading-4",
|
|
2869
|
-
|
|
2869
|
+
ii[e]
|
|
2870
2870
|
);
|
|
2871
2871
|
return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
|
|
2872
2872
|
/* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2882,9 +2882,9 @@ const ei = {
|
|
|
2882
2882
|
] }),
|
|
2883
2883
|
l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
|
|
2884
2884
|
] }),
|
|
2885
|
-
o && /* @__PURE__ */ s(
|
|
2885
|
+
o && /* @__PURE__ */ s(ni, { variant: e, cta: o })
|
|
2886
2886
|
] });
|
|
2887
|
-
},
|
|
2887
|
+
}, li = C(
|
|
2888
2888
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2889
2889
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2890
2890
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2903,7 +2903,7 @@ const ei = {
|
|
|
2903
2903
|
"data-testid": d
|
|
2904
2904
|
}) => {
|
|
2905
2905
|
const m = n != null || a != null, g = C(
|
|
2906
|
-
|
|
2906
|
+
li,
|
|
2907
2907
|
l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
|
|
2908
2908
|
// `focus-ring` is a design-system utility from the component-library
|
|
2909
2909
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2951,17 +2951,17 @@ const ei = {
|
|
|
2951
2951
|
]
|
|
2952
2952
|
}
|
|
2953
2953
|
);
|
|
2954
|
-
},
|
|
2954
|
+
}, oi = {
|
|
2955
2955
|
dark: "bg-white/10",
|
|
2956
2956
|
light: "bg-black/5"
|
|
2957
|
-
},
|
|
2957
|
+
}, ci = {
|
|
2958
2958
|
dark: "size-16 text-white/25",
|
|
2959
2959
|
light: "size-16 text-black/25"
|
|
2960
|
-
}, qe = (e, t) => !!t && !!e && ce(e) === "audio",
|
|
2960
|
+
}, qe = (e, t) => !!t && !!e && ce(e) === "audio", It = (e, t) => {
|
|
2961
2961
|
if (!t || !e) return !1;
|
|
2962
2962
|
const n = ce(e);
|
|
2963
2963
|
return n === "video" || n === "audio";
|
|
2964
|
-
},
|
|
2964
|
+
}, Tt = "bg-[#F2F3F4]", je = ({
|
|
2965
2965
|
variant: e,
|
|
2966
2966
|
thumbnailUrl: t,
|
|
2967
2967
|
sourceUrl: n,
|
|
@@ -3012,10 +3012,10 @@ const ei = {
|
|
|
3012
3012
|
{
|
|
3013
3013
|
className: C(
|
|
3014
3014
|
"flex h-full w-full items-center justify-center",
|
|
3015
|
-
|
|
3015
|
+
oi[e]
|
|
3016
3016
|
),
|
|
3017
|
-
children:
|
|
3018
|
-
className:
|
|
3017
|
+
children: we(r, {
|
|
3018
|
+
className: ci[e],
|
|
3019
3019
|
weight: "regular"
|
|
3020
3020
|
})
|
|
3021
3021
|
}
|
|
@@ -3025,7 +3025,7 @@ const ei = {
|
|
|
3025
3025
|
]
|
|
3026
3026
|
}
|
|
3027
3027
|
);
|
|
3028
|
-
},
|
|
3028
|
+
}, di = ({
|
|
3029
3029
|
title: e,
|
|
3030
3030
|
placeholderTitle: t,
|
|
3031
3031
|
description: n,
|
|
@@ -3055,10 +3055,10 @@ const ei = {
|
|
|
3055
3055
|
onClick: h,
|
|
3056
3056
|
"aria-label": "Edit attachment",
|
|
3057
3057
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3058
|
-
children: /* @__PURE__ */ s(
|
|
3058
|
+
children: /* @__PURE__ */ s(ta, { className: "size-5", weight: "regular" })
|
|
3059
3059
|
}
|
|
3060
3060
|
) : void 0;
|
|
3061
|
-
return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName:
|
|
3061
|
+
return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName: Tt, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3062
3062
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3063
3063
|
je,
|
|
3064
3064
|
{
|
|
@@ -3087,7 +3087,7 @@ const ei = {
|
|
|
3087
3087
|
}
|
|
3088
3088
|
),
|
|
3089
3089
|
/* @__PURE__ */ s(
|
|
3090
|
-
|
|
3090
|
+
Et,
|
|
3091
3091
|
{
|
|
3092
3092
|
variant: "dark",
|
|
3093
3093
|
title: e,
|
|
@@ -3102,7 +3102,7 @@ const ei = {
|
|
|
3102
3102
|
]
|
|
3103
3103
|
}
|
|
3104
3104
|
);
|
|
3105
|
-
},
|
|
3105
|
+
}, ui = ({
|
|
3106
3106
|
title: e,
|
|
3107
3107
|
description: t,
|
|
3108
3108
|
url: n,
|
|
@@ -3114,7 +3114,7 @@ const ei = {
|
|
|
3114
3114
|
cta: d,
|
|
3115
3115
|
onClick: m
|
|
3116
3116
|
}) => {
|
|
3117
|
-
const g =
|
|
3117
|
+
const g = It(a, i), h = St(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b = qe(a, i) ? Tt : void 0, v = d && m ? {
|
|
3118
3118
|
...d,
|
|
3119
3119
|
onClick: () => {
|
|
3120
3120
|
var x;
|
|
@@ -3142,7 +3142,7 @@ const ei = {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
),
|
|
3144
3144
|
/* @__PURE__ */ s(
|
|
3145
|
-
|
|
3145
|
+
Et,
|
|
3146
3146
|
{
|
|
3147
3147
|
variant: "light",
|
|
3148
3148
|
title: e,
|
|
@@ -3155,7 +3155,7 @@ const ei = {
|
|
|
3155
3155
|
]
|
|
3156
3156
|
}
|
|
3157
3157
|
);
|
|
3158
|
-
},
|
|
3158
|
+
}, mi = ({
|
|
3159
3159
|
title: e,
|
|
3160
3160
|
placeholderTitle: t,
|
|
3161
3161
|
description: n,
|
|
@@ -3168,14 +3168,14 @@ const ei = {
|
|
|
3168
3168
|
cta: m,
|
|
3169
3169
|
onClick: g
|
|
3170
3170
|
}) => {
|
|
3171
|
-
const h =
|
|
3171
|
+
const h = It(r, o), f = St(a), c = m == null && f != null && !h ? f : void 0, b = m == null && !h && c != null ? g : void 0;
|
|
3172
3172
|
return /* @__PURE__ */ u(
|
|
3173
3173
|
Be,
|
|
3174
3174
|
{
|
|
3175
3175
|
variant: "dark",
|
|
3176
3176
|
href: c,
|
|
3177
3177
|
onClick: b,
|
|
3178
|
-
bgClassName: qe(r, o) ?
|
|
3178
|
+
bgClassName: qe(r, o) ? Tt : void 0,
|
|
3179
3179
|
children: [
|
|
3180
3180
|
l === "featured" && /* @__PURE__ */ s(
|
|
3181
3181
|
je,
|
|
@@ -3188,7 +3188,7 @@ const ei = {
|
|
|
3188
3188
|
}
|
|
3189
3189
|
),
|
|
3190
3190
|
/* @__PURE__ */ s(
|
|
3191
|
-
|
|
3191
|
+
Et,
|
|
3192
3192
|
{
|
|
3193
3193
|
variant: "dark",
|
|
3194
3194
|
title: e,
|
|
@@ -3202,22 +3202,22 @@ const ei = {
|
|
|
3202
3202
|
]
|
|
3203
3203
|
}
|
|
3204
3204
|
);
|
|
3205
|
-
},
|
|
3206
|
-
Composer:
|
|
3207
|
-
Sent:
|
|
3208
|
-
Received:
|
|
3205
|
+
}, ts = {
|
|
3206
|
+
Composer: di,
|
|
3207
|
+
Sent: mi,
|
|
3208
|
+
Received: ui
|
|
3209
3209
|
};
|
|
3210
3210
|
function P(e) {
|
|
3211
3211
|
const t = e == null ? void 0 : e.trim();
|
|
3212
3212
|
return t || void 0;
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3214
|
+
function ss(e) {
|
|
3215
3215
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3216
3216
|
}
|
|
3217
|
-
function
|
|
3217
|
+
function hi(e, t) {
|
|
3218
3218
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3219
3219
|
return !1;
|
|
3220
|
-
const n =
|
|
3220
|
+
const n = ss(e), a = ss(t);
|
|
3221
3221
|
if (n === a)
|
|
3222
3222
|
return !0;
|
|
3223
3223
|
if (!n.includes(a))
|
|
@@ -3225,7 +3225,7 @@ function ui(e, t) {
|
|
|
3225
3225
|
const r = n.split(a).join("");
|
|
3226
3226
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3227
3227
|
}
|
|
3228
|
-
function
|
|
3228
|
+
function ns(e) {
|
|
3229
3229
|
const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
|
|
3230
3230
|
return {
|
|
3231
3231
|
title: P(e.title),
|
|
@@ -3235,19 +3235,19 @@ function ss(e) {
|
|
|
3235
3235
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3236
3236
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3237
3237
|
sourceUrl: a,
|
|
3238
|
-
layout: n ||
|
|
3238
|
+
layout: n || It(r, a) ? "featured" : "classic",
|
|
3239
3239
|
mimeType: r
|
|
3240
3240
|
};
|
|
3241
3241
|
}
|
|
3242
|
-
function
|
|
3242
|
+
function fi(e) {
|
|
3243
3243
|
var t;
|
|
3244
|
-
return
|
|
3244
|
+
return Fs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3245
3245
|
}
|
|
3246
|
-
function
|
|
3246
|
+
function Fs(e) {
|
|
3247
3247
|
const t = P(e.og_scrape_url);
|
|
3248
3248
|
return e.type === "link" || !!t && !e.asset_url;
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function $s(e) {
|
|
3251
3251
|
if (!(e != null && e.length)) return [];
|
|
3252
3252
|
const t = [], n = (r, i) => {
|
|
3253
3253
|
const o = t[t.length - 1];
|
|
@@ -3265,25 +3265,25 @@ function Fs(e) {
|
|
|
3265
3265
|
t.push({ type: "link", attachments: [r] });
|
|
3266
3266
|
};
|
|
3267
3267
|
for (const r of e) {
|
|
3268
|
-
if (
|
|
3268
|
+
if (Fs(r)) {
|
|
3269
3269
|
a(r);
|
|
3270
3270
|
continue;
|
|
3271
3271
|
}
|
|
3272
|
-
const i =
|
|
3272
|
+
const i = fi(r);
|
|
3273
3273
|
i && n(i, r);
|
|
3274
3274
|
}
|
|
3275
3275
|
return t;
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3277
|
+
function gi(e) {
|
|
3278
3278
|
return e.filter((t) => t.type === "media").length;
|
|
3279
3279
|
}
|
|
3280
|
-
function
|
|
3280
|
+
function pi(e, t, n) {
|
|
3281
3281
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3282
3282
|
}
|
|
3283
|
-
function
|
|
3283
|
+
function as(e) {
|
|
3284
3284
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3285
3285
|
}
|
|
3286
|
-
function
|
|
3286
|
+
function bi(e) {
|
|
3287
3287
|
switch (e) {
|
|
3288
3288
|
case "image":
|
|
3289
3289
|
return ke.Image;
|
|
@@ -3297,13 +3297,13 @@ function gi(e) {
|
|
|
3297
3297
|
return ke.File;
|
|
3298
3298
|
}
|
|
3299
3299
|
}
|
|
3300
|
-
function
|
|
3300
|
+
function vi(e, t) {
|
|
3301
3301
|
if (t.length > 1)
|
|
3302
3302
|
switch (e) {
|
|
3303
3303
|
case "image":
|
|
3304
3304
|
return {
|
|
3305
3305
|
items: t.map((a) => ({
|
|
3306
|
-
src:
|
|
3306
|
+
src: as(a),
|
|
3307
3307
|
alt: P(a.title)
|
|
3308
3308
|
}))
|
|
3309
3309
|
};
|
|
@@ -3354,7 +3354,7 @@ function pi(e, t) {
|
|
|
3354
3354
|
switch (e) {
|
|
3355
3355
|
case "image":
|
|
3356
3356
|
return {
|
|
3357
|
-
src:
|
|
3357
|
+
src: as(n),
|
|
3358
3358
|
alt: P(n.title)
|
|
3359
3359
|
};
|
|
3360
3360
|
case "video":
|
|
@@ -3384,42 +3384,42 @@ function pi(e, t) {
|
|
|
3384
3384
|
};
|
|
3385
3385
|
}
|
|
3386
3386
|
}
|
|
3387
|
-
function
|
|
3387
|
+
function xi({
|
|
3388
3388
|
groupPosition: e,
|
|
3389
3389
|
isMyMessage: t,
|
|
3390
3390
|
segment: n
|
|
3391
3391
|
}) {
|
|
3392
|
-
const a =
|
|
3393
|
-
...
|
|
3392
|
+
const a = bi(n.kind), r = {
|
|
3393
|
+
...vi(n.kind, n.attachments),
|
|
3394
3394
|
groupPosition: e
|
|
3395
3395
|
};
|
|
3396
3396
|
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3397
3397
|
}
|
|
3398
|
-
const
|
|
3398
|
+
const _i = ({
|
|
3399
3399
|
groupPosition: e,
|
|
3400
3400
|
isMyMessage: t,
|
|
3401
3401
|
message: n,
|
|
3402
3402
|
renderText: a
|
|
3403
3403
|
}) => {
|
|
3404
3404
|
var b;
|
|
3405
|
-
const r =
|
|
3405
|
+
const r = $s(n.attachments);
|
|
3406
3406
|
if (r.length === 0) return null;
|
|
3407
|
-
const i =
|
|
3407
|
+
const i = gi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ns(l.attachments[0] ?? {}).url : void 0, m = o && hi(o, d) ? void 0 : o;
|
|
3408
3408
|
let g = 0;
|
|
3409
3409
|
const h = [], f = (v, x) => {
|
|
3410
|
-
const p = t ?
|
|
3410
|
+
const p = t ? ts.Sent : ts.Received;
|
|
3411
3411
|
h.push(
|
|
3412
|
-
/* @__PURE__ */ s(p, { ...
|
|
3412
|
+
/* @__PURE__ */ s(p, { ...ns(v) }, x)
|
|
3413
3413
|
);
|
|
3414
3414
|
}, c = (v, x) => {
|
|
3415
|
-
const p =
|
|
3415
|
+
const p = pi(
|
|
3416
3416
|
g,
|
|
3417
3417
|
i,
|
|
3418
3418
|
e
|
|
3419
3419
|
);
|
|
3420
3420
|
g += 1, h.push(
|
|
3421
3421
|
/* @__PURE__ */ s(
|
|
3422
|
-
|
|
3422
|
+
xi,
|
|
3423
3423
|
{
|
|
3424
3424
|
groupPosition: p,
|
|
3425
3425
|
isMyMessage: t,
|
|
@@ -3431,8 +3431,8 @@ const vi = ({
|
|
|
3431
3431
|
};
|
|
3432
3432
|
return r.forEach((v, x) => {
|
|
3433
3433
|
if (v.type === "link") {
|
|
3434
|
-
v.attachments.forEach((p,
|
|
3435
|
-
f(p, `link-${x}-${
|
|
3434
|
+
v.attachments.forEach((p, w) => {
|
|
3435
|
+
f(p, `link-${x}-${w}`);
|
|
3436
3436
|
});
|
|
3437
3437
|
return;
|
|
3438
3438
|
}
|
|
@@ -3466,8 +3466,8 @@ const vi = ({
|
|
|
3466
3466
|
/* @__PURE__ */ s(at, {})
|
|
3467
3467
|
] }) : null
|
|
3468
3468
|
] });
|
|
3469
|
-
},
|
|
3470
|
-
var
|
|
3469
|
+
}, wi = (e) => {
|
|
3470
|
+
var zt, Pt, Ot, Ft, $t, Ut, Bt, jt, Vt, Gt;
|
|
3471
3471
|
const {
|
|
3472
3472
|
additionalMessageInputProps: t,
|
|
3473
3473
|
chatbotVotingEnabled: n,
|
|
@@ -3485,50 +3485,50 @@ const vi = ({
|
|
|
3485
3485
|
renderText: b,
|
|
3486
3486
|
threadList: v,
|
|
3487
3487
|
viewerLanguage: x
|
|
3488
|
-
} = e, { client: p } = fe("CustomMessage"), { channel:
|
|
3489
|
-
Attachment: k =
|
|
3490
|
-
EditMessageModal: T =
|
|
3488
|
+
} = e, { client: p } = fe("CustomMessage"), { channel: w } = oe("CustomMessage"), { isUnlocking: _, onUnlockClick: S, onFetchSource: z, onDownloadClick: E } = Br("LockedAttachment"), [R, F] = B(!1), L = nn(c.id), { selected: D, voteUp: y, voteDown: I } = Na(c), {
|
|
3489
|
+
Attachment: k = an,
|
|
3490
|
+
EditMessageModal: T = rn,
|
|
3491
3491
|
MessageActions: M,
|
|
3492
|
-
MessageBlocked: O =
|
|
3493
|
-
MessageBouncePrompt: $ =
|
|
3494
|
-
MessageDeleted: j =
|
|
3495
|
-
MessageIsThreadReplyInChannelButtonIndicator: Z =
|
|
3496
|
-
MessageRepliesCountButton: ee =
|
|
3497
|
-
ReminderNotification: X =
|
|
3498
|
-
StreamedMessageText: N =
|
|
3492
|
+
MessageBlocked: O = ln,
|
|
3493
|
+
MessageBouncePrompt: $ = on,
|
|
3494
|
+
MessageDeleted: j = cn,
|
|
3495
|
+
MessageIsThreadReplyInChannelButtonIndicator: Z = dn,
|
|
3496
|
+
MessageRepliesCountButton: ee = un,
|
|
3497
|
+
ReminderNotification: X = mn,
|
|
3498
|
+
StreamedMessageText: N = hn,
|
|
3499
3499
|
PinIndicator: A
|
|
3500
|
-
} =
|
|
3500
|
+
} = ds("CustomMessage"), Y = fn(c), q = gn(c), H = re(
|
|
3501
3501
|
() => h == null ? void 0 : h(c),
|
|
3502
3502
|
[h, c]
|
|
3503
3503
|
), U = re(() => {
|
|
3504
3504
|
const me = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...me] : me;
|
|
3505
3505
|
if (!Ue(c)) return be;
|
|
3506
|
-
const
|
|
3507
|
-
return
|
|
3506
|
+
const Yt = be.filter((Ht) => !("type" in Ht) || !Ns(Ht));
|
|
3507
|
+
return Yt.length === be.length ? be : Yt;
|
|
3508
3508
|
}, [c]), W = re(
|
|
3509
|
-
() =>
|
|
3509
|
+
() => $s(U),
|
|
3510
3510
|
[U]
|
|
3511
3511
|
), J = re(() => {
|
|
3512
|
-
const me =
|
|
3512
|
+
const me = bs({ message: c, viewerLanguage: x });
|
|
3513
3513
|
return me === c.text ? c : { ...c, text: me };
|
|
3514
|
-
}, [c, x]), de = W.length > 0,
|
|
3514
|
+
}, [c, x]), de = W.length > 0, Le = W.reduce(
|
|
3515
3515
|
(me, be) => me + be.attachments.length,
|
|
3516
3516
|
0
|
|
3517
|
-
) === ((U == null ? void 0 : U.length) ?? 0), ze =
|
|
3517
|
+
) === ((U == null ? void 0 : U.length) ?? 0), ze = Xa({
|
|
3518
3518
|
endOfGroup: r,
|
|
3519
3519
|
firstOfGroup: i,
|
|
3520
3520
|
groupedByUser: o
|
|
3521
3521
|
});
|
|
3522
|
-
if (
|
|
3522
|
+
if (pn(c))
|
|
3523
3523
|
return null;
|
|
3524
3524
|
if (c.deleted_at || c.type === "deleted")
|
|
3525
3525
|
return /* @__PURE__ */ s(j, { message: c });
|
|
3526
|
-
if (
|
|
3526
|
+
if (bn(c))
|
|
3527
3527
|
return /* @__PURE__ */ s(O, {});
|
|
3528
|
-
const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((
|
|
3528
|
+
const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((zt = c.error) == null ? void 0 : zt.status) !== 403, Mt = vn(c);
|
|
3529
3529
|
let ge;
|
|
3530
|
-
le ? ge = () => m(c) :
|
|
3531
|
-
const se = f(),
|
|
3530
|
+
le ? ge = () => m(c) : Mt && (ge = () => F(!0));
|
|
3531
|
+
const se = f(), Hs = C(
|
|
3532
3532
|
"str-chat__message str-chat__message-simple",
|
|
3533
3533
|
`str-chat__message--${c.type}`,
|
|
3534
3534
|
`str-chat__message--${c.status}`,
|
|
@@ -3539,26 +3539,26 @@ const vi = ({
|
|
|
3539
3539
|
"str-chat__message--highlighted": g,
|
|
3540
3540
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3541
3541
|
"str-chat__message--with-reactions": q,
|
|
3542
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3542
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Pt = c == null ? void 0 : c.error) == null ? void 0 : Pt.status) !== 403,
|
|
3543
3543
|
"str-chat__message-with-thread-link": ae || ue,
|
|
3544
3544
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3545
3545
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3546
3546
|
"str-chat__virtual-message__wrapper--group": o
|
|
3547
3547
|
}
|
|
3548
|
-
), We = c.poll_id && p.polls.fromState(c.poll_id),
|
|
3548
|
+
), We = c.poll_id && p.polls.fromState(c.poll_id), At = Kr(c), pe = Ue(c), qs = Ct(c), Xe = !!(U != null && U.length && !c.quoted_message), Rt = pe && se && Xe, Ws = de && Le && !c.quoted_message && !We && !H && !pe, Dt = {
|
|
3549
3549
|
contentType: "text",
|
|
3550
|
-
amountText: (
|
|
3551
|
-
paymentStatus: (
|
|
3550
|
+
amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
|
|
3551
|
+
paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
|
|
3552
3552
|
renderedText: c.text && /* @__PURE__ */ s($e, { message: J, renderText: b })
|
|
3553
3553
|
}, Lt = {
|
|
3554
3554
|
contentType: "media",
|
|
3555
|
-
title: (
|
|
3556
|
-
mimeType: (
|
|
3557
|
-
thumbnailUrl: (
|
|
3558
|
-
amountText: (
|
|
3559
|
-
detail: (
|
|
3560
|
-
paymentStatus: (
|
|
3561
|
-
onFetchSource: z ? () => z(c,
|
|
3555
|
+
title: ($t = c.metadata) == null ? void 0 : $t.attachment_title,
|
|
3556
|
+
mimeType: (Ut = c.metadata) == null ? void 0 : Ut.attachment_mime_type,
|
|
3557
|
+
thumbnailUrl: (Bt = c.metadata) == null ? void 0 : Bt.attachment_thumbnail,
|
|
3558
|
+
amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
|
|
3559
|
+
detail: (Vt = c.metadata) == null ? void 0 : Vt.attachment_detail,
|
|
3560
|
+
paymentStatus: (Gt = c.metadata) == null ? void 0 : Gt.payment_status,
|
|
3561
|
+
onFetchSource: z ? () => z(c, w) : void 0
|
|
3562
3562
|
};
|
|
3563
3563
|
return /* @__PURE__ */ u(te, { children: [
|
|
3564
3564
|
a && /* @__PURE__ */ s(
|
|
@@ -3568,7 +3568,7 @@ const vi = ({
|
|
|
3568
3568
|
}
|
|
3569
3569
|
),
|
|
3570
3570
|
R && /* @__PURE__ */ s(
|
|
3571
|
-
|
|
3571
|
+
xn,
|
|
3572
3572
|
{
|
|
3573
3573
|
MessageBouncePrompt: $,
|
|
3574
3574
|
onClose: () => F(!1),
|
|
@@ -3578,12 +3578,12 @@ const vi = ({
|
|
|
3578
3578
|
/* @__PURE__ */ u(
|
|
3579
3579
|
"div",
|
|
3580
3580
|
{
|
|
3581
|
-
className:
|
|
3581
|
+
className: Hs,
|
|
3582
3582
|
"data-message-id": c.id,
|
|
3583
3583
|
"data-dd-privacy": "mask",
|
|
3584
3584
|
children: [
|
|
3585
3585
|
A && /* @__PURE__ */ s(A, {}),
|
|
3586
|
-
!!
|
|
3586
|
+
!!L && /* @__PURE__ */ s(X, { reminder: L }),
|
|
3587
3587
|
c.user && /* @__PURE__ */ s(
|
|
3588
3588
|
ne,
|
|
3589
3589
|
{
|
|
@@ -3600,7 +3600,7 @@ const vi = ({
|
|
|
3600
3600
|
"div",
|
|
3601
3601
|
{
|
|
3602
3602
|
className: C("str-chat__message-inner", {
|
|
3603
|
-
"str-chat__simple-message--error-failed": le ||
|
|
3603
|
+
"str-chat__simple-message--error-failed": le || Mt
|
|
3604
3604
|
}),
|
|
3605
3605
|
"data-testid": "message-inner",
|
|
3606
3606
|
onClick: ge,
|
|
@@ -3613,25 +3613,25 @@ const vi = ({
|
|
|
3613
3613
|
marginInlineEnd: 0,
|
|
3614
3614
|
marginInlineStart: 0
|
|
3615
3615
|
},
|
|
3616
|
-
children:
|
|
3616
|
+
children: At ? /* @__PURE__ */ s(et, { message: c, standalone: !0 }) : Wr(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3617
3617
|
se && M && /* @__PURE__ */ s(M, {}),
|
|
3618
3618
|
se ? /* @__PURE__ */ s(
|
|
3619
3619
|
Oe,
|
|
3620
3620
|
{
|
|
3621
|
-
...
|
|
3621
|
+
...Dt,
|
|
3622
3622
|
isMine: !0
|
|
3623
3623
|
}
|
|
3624
3624
|
) : /* @__PURE__ */ s(
|
|
3625
3625
|
Oe,
|
|
3626
3626
|
{
|
|
3627
|
-
...
|
|
3627
|
+
...Dt,
|
|
3628
3628
|
isMine: !1,
|
|
3629
|
-
isUnlocking:
|
|
3630
|
-
onUnlockClick: () => S == null ? void 0 : S(c,
|
|
3629
|
+
isUnlocking: _(c.id),
|
|
3630
|
+
onUnlockClick: () => S == null ? void 0 : S(c, w)
|
|
3631
3631
|
}
|
|
3632
3632
|
),
|
|
3633
3633
|
!se && M && /* @__PURE__ */ s(M, {})
|
|
3634
|
-
] }) }) :
|
|
3634
|
+
] }) }) : Xr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3635
3635
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3636
3636
|
se && M && /* @__PURE__ */ s(M, {}),
|
|
3637
3637
|
se ? /* @__PURE__ */ s(
|
|
@@ -3639,16 +3639,16 @@ const vi = ({
|
|
|
3639
3639
|
{
|
|
3640
3640
|
...Lt,
|
|
3641
3641
|
isMine: !0,
|
|
3642
|
-
onPreviewClick: () => S ? S(c,
|
|
3642
|
+
onPreviewClick: () => S ? S(c, w) : void 0
|
|
3643
3643
|
}
|
|
3644
3644
|
) : /* @__PURE__ */ s(
|
|
3645
3645
|
Oe,
|
|
3646
3646
|
{
|
|
3647
3647
|
...Lt,
|
|
3648
3648
|
isMine: !1,
|
|
3649
|
-
isUnlocking:
|
|
3650
|
-
onUnlockClick: () => S ? S(c,
|
|
3651
|
-
onDownloadClick: () => E ? E(c,
|
|
3649
|
+
isUnlocking: _(c.id),
|
|
3650
|
+
onUnlockClick: () => S ? S(c, w) : void 0,
|
|
3651
|
+
onDownloadClick: () => E ? E(c, w) : void 0
|
|
3652
3652
|
}
|
|
3653
3653
|
),
|
|
3654
3654
|
!se && M && /* @__PURE__ */ s(M, {})
|
|
@@ -3660,8 +3660,8 @@ const vi = ({
|
|
|
3660
3660
|
renderText: b
|
|
3661
3661
|
}
|
|
3662
3662
|
) })
|
|
3663
|
-
] }) :
|
|
3664
|
-
|
|
3663
|
+
] }) : Ws ? /* @__PURE__ */ s(
|
|
3664
|
+
_i,
|
|
3665
3665
|
{
|
|
3666
3666
|
groupPosition: ze,
|
|
3667
3667
|
isMyMessage: se,
|
|
@@ -3676,7 +3676,7 @@ const vi = ({
|
|
|
3676
3676
|
renderText: b
|
|
3677
3677
|
}
|
|
3678
3678
|
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
|
|
3679
|
-
pe && !
|
|
3679
|
+
pe && !Rt && /* @__PURE__ */ s(
|
|
3680
3680
|
et,
|
|
3681
3681
|
{
|
|
3682
3682
|
message: c,
|
|
@@ -3684,7 +3684,7 @@ const vi = ({
|
|
|
3684
3684
|
isMyMessage: se
|
|
3685
3685
|
}
|
|
3686
3686
|
),
|
|
3687
|
-
We && /* @__PURE__ */ s(
|
|
3687
|
+
We && /* @__PURE__ */ s(_n, { poll: We }),
|
|
3688
3688
|
U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3689
3689
|
k,
|
|
3690
3690
|
{
|
|
@@ -3709,8 +3709,8 @@ const vi = ({
|
|
|
3709
3709
|
] }) })
|
|
3710
3710
|
}
|
|
3711
3711
|
),
|
|
3712
|
-
!
|
|
3713
|
-
(!pe ||
|
|
3712
|
+
!qs && !At && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
|
|
3713
|
+
(!pe || Rt) && /* @__PURE__ */ s(
|
|
3714
3714
|
et,
|
|
3715
3715
|
{
|
|
3716
3716
|
message: c,
|
|
@@ -3719,15 +3719,15 @@ const vi = ({
|
|
|
3719
3719
|
}
|
|
3720
3720
|
),
|
|
3721
3721
|
n && pe && /* @__PURE__ */ s(
|
|
3722
|
-
|
|
3722
|
+
Zr,
|
|
3723
3723
|
{
|
|
3724
|
-
selected:
|
|
3724
|
+
selected: D,
|
|
3725
3725
|
onVoteUp: y,
|
|
3726
3726
|
onVoteDown: I
|
|
3727
3727
|
}
|
|
3728
3728
|
)
|
|
3729
3729
|
] }),
|
|
3730
|
-
/* @__PURE__ */ s(
|
|
3730
|
+
/* @__PURE__ */ s(Qr, {}),
|
|
3731
3731
|
ae && /* @__PURE__ */ s(
|
|
3732
3732
|
ee,
|
|
3733
3733
|
{
|
|
@@ -3741,50 +3741,50 @@ const vi = ({
|
|
|
3741
3741
|
c.id
|
|
3742
3742
|
)
|
|
3743
3743
|
] });
|
|
3744
|
-
},
|
|
3745
|
-
|
|
3746
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3747
|
-
),
|
|
3744
|
+
}, Ni = V.memo(
|
|
3745
|
+
wi,
|
|
3746
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : sn(e, t)
|
|
3747
|
+
), yi = (e) => {
|
|
3748
3748
|
const t = Ne("CustomMessage");
|
|
3749
|
-
return /* @__PURE__ */ s(
|
|
3750
|
-
},
|
|
3749
|
+
return /* @__PURE__ */ s(Ni, { ...t, ...e });
|
|
3750
|
+
}, ki = () => {
|
|
3751
3751
|
var n;
|
|
3752
3752
|
const { handleDelete: e, message: t } = Ne("CustomMessageActions");
|
|
3753
3753
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3754
|
-
|
|
3754
|
+
fs,
|
|
3755
3755
|
{
|
|
3756
3756
|
onClick: e,
|
|
3757
3757
|
"aria-label": "Delete",
|
|
3758
3758
|
title: "Delete",
|
|
3759
3759
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3760
|
-
children: /* @__PURE__ */ s(
|
|
3760
|
+
children: /* @__PURE__ */ s(sa, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3761
3761
|
}
|
|
3762
3762
|
);
|
|
3763
|
-
},
|
|
3763
|
+
}, Ci = () => {
|
|
3764
3764
|
const { handleFlag: e } = Ne("CustomMessageActions");
|
|
3765
3765
|
return /* @__PURE__ */ s(
|
|
3766
|
-
|
|
3766
|
+
fs,
|
|
3767
3767
|
{
|
|
3768
3768
|
onClick: e,
|
|
3769
3769
|
"aria-label": "Report",
|
|
3770
3770
|
title: "Report",
|
|
3771
3771
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3772
|
-
children: /* @__PURE__ */ s(
|
|
3772
|
+
children: /* @__PURE__ */ s(us, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3773
3773
|
}
|
|
3774
3774
|
);
|
|
3775
|
-
},
|
|
3775
|
+
}, Si = () => {
|
|
3776
3776
|
var t;
|
|
3777
3777
|
const { message: e } = Ne("CustomMessageActions");
|
|
3778
3778
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3779
|
-
|
|
3779
|
+
ra,
|
|
3780
3780
|
{
|
|
3781
3781
|
messageActionSet: [
|
|
3782
|
-
{ Component:
|
|
3783
|
-
{ Component:
|
|
3782
|
+
{ Component: ki, placement: "quick", type: "delete" },
|
|
3783
|
+
{ Component: Ci, placement: "quick", type: "flag" }
|
|
3784
3784
|
]
|
|
3785
3785
|
}
|
|
3786
3786
|
);
|
|
3787
|
-
},
|
|
3787
|
+
}, Ei = ({
|
|
3788
3788
|
link: e,
|
|
3789
3789
|
onDismiss: t
|
|
3790
3790
|
}) => {
|
|
@@ -3824,14 +3824,14 @@ const vi = ({
|
|
|
3824
3824
|
]
|
|
3825
3825
|
}
|
|
3826
3826
|
);
|
|
3827
|
-
},
|
|
3827
|
+
}, Ii = (e) => ({
|
|
3828
3828
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3829
|
-
(t) =>
|
|
3829
|
+
(t) => qt.previewIsLoaded(t) || qt.previewIsLoading(t)
|
|
3830
3830
|
)
|
|
3831
|
-
}),
|
|
3832
|
-
const { linkPreviewsManager: e } =
|
|
3831
|
+
}), Ti = () => {
|
|
3832
|
+
const { linkPreviewsManager: e } = wn(), { linkPreviews: t } = Nn(
|
|
3833
3833
|
e.state,
|
|
3834
|
-
|
|
3834
|
+
Ii
|
|
3835
3835
|
), n = (r) => {
|
|
3836
3836
|
e.dismissPreview(r);
|
|
3837
3837
|
};
|
|
@@ -3844,9 +3844,9 @@ const vi = ({
|
|
|
3844
3844
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3845
3845
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3846
3846
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3847
|
-
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
3847
|
+
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ei, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3848
3848
|
) : null;
|
|
3849
|
-
}, Ve = V.createContext(!1),
|
|
3849
|
+
}, Ve = V.createContext(!1), vl = () => Te(Ve), Mi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3850
3850
|
"button",
|
|
3851
3851
|
{
|
|
3852
3852
|
...n,
|
|
@@ -3854,13 +3854,13 @@ const vi = ({
|
|
|
3854
3854
|
"aria-label": "Send",
|
|
3855
3855
|
disabled: t,
|
|
3856
3856
|
onClick: e,
|
|
3857
|
-
children: /* @__PURE__ */ s(
|
|
3857
|
+
children: /* @__PURE__ */ s(na, { weight: "bold", className: "size-4" })
|
|
3858
3858
|
}
|
|
3859
|
-
),
|
|
3860
|
-
const e = Te(Ve), { handleSubmit: t } =
|
|
3861
|
-
SendButton: r =
|
|
3862
|
-
AttachmentPreviewList: i =
|
|
3863
|
-
} =
|
|
3859
|
+
), rs = () => {
|
|
3860
|
+
const e = Te(Ve), { handleSubmit: t } = yn(), n = kn(), a = e || !n, {
|
|
3861
|
+
SendButton: r = Mi,
|
|
3862
|
+
AttachmentPreviewList: i = Cn
|
|
3863
|
+
} = ds("CustomMessageInput");
|
|
3864
3864
|
return (
|
|
3865
3865
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
3866
3866
|
// preview list inside is the scrollable region); the textarea + send row
|
|
@@ -3876,12 +3876,12 @@ const vi = ({
|
|
|
3876
3876
|
className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch 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)]",
|
|
3877
3877
|
"data-dd-privacy": "mask",
|
|
3878
3878
|
children: [
|
|
3879
|
-
/* @__PURE__ */ s(
|
|
3880
|
-
/* @__PURE__ */ s(
|
|
3879
|
+
/* @__PURE__ */ s(Sn, {}),
|
|
3880
|
+
/* @__PURE__ */ s(Ti, {}),
|
|
3881
3881
|
/* @__PURE__ */ s(i, {}),
|
|
3882
3882
|
/* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
|
|
3883
3883
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3884
|
-
|
|
3884
|
+
En,
|
|
3885
3885
|
{
|
|
3886
3886
|
"aria-disabled": e || void 0,
|
|
3887
3887
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3908,7 +3908,7 @@ const vi = ({
|
|
|
3908
3908
|
}
|
|
3909
3909
|
)
|
|
3910
3910
|
);
|
|
3911
|
-
},
|
|
3911
|
+
}, is = ({
|
|
3912
3912
|
renderActions: e,
|
|
3913
3913
|
renderHeader: t,
|
|
3914
3914
|
renderFooter: n,
|
|
@@ -3986,7 +3986,7 @@ const vi = ({
|
|
|
3986
3986
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3987
3987
|
children: [
|
|
3988
3988
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3989
|
-
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(
|
|
3989
|
+
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(Wt, { Input: i ?? rs }) })
|
|
3990
3990
|
]
|
|
3991
3991
|
}
|
|
3992
3992
|
),
|
|
@@ -4005,42 +4005,57 @@ const vi = ({
|
|
|
4005
4005
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4006
4006
|
children: [
|
|
4007
4007
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4008
|
-
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(
|
|
4008
|
+
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(Wt, { Input: rs }) })
|
|
4009
4009
|
]
|
|
4010
4010
|
}
|
|
4011
4011
|
),
|
|
4012
4012
|
n == null ? void 0 : n()
|
|
4013
4013
|
] });
|
|
4014
|
-
},
|
|
4014
|
+
}, Ai = [
|
|
4015
4015
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
4016
4016
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
4017
|
-
],
|
|
4017
|
+
], Ri = {
|
|
4018
4018
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4019
4019
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4020
|
-
},
|
|
4020
|
+
}, Di = [
|
|
4021
4021
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
4022
|
-
],
|
|
4022
|
+
], Li = [
|
|
4023
|
+
"SYSTEM_ESCALATION",
|
|
4024
|
+
"SYSTEM_DM_AGENT_PAUSED",
|
|
4025
|
+
"SYSTEM_DM_AGENT_RESUMED"
|
|
4026
|
+
], zi = {
|
|
4023
4027
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4024
|
-
}, st = "age safety guidelines.",
|
|
4028
|
+
}, st = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", dt = (e) => Ai.includes(e), Us = (e) => Di.includes(e), ls = (e) => Li.includes(
|
|
4029
|
+
e
|
|
4030
|
+
), Oi = (e) => {
|
|
4031
|
+
var a;
|
|
4032
|
+
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4033
|
+
if (ls(t))
|
|
4034
|
+
return !0;
|
|
4035
|
+
if (Us(t))
|
|
4036
|
+
return !1;
|
|
4037
|
+
const n = e.dm_agent_system_type;
|
|
4038
|
+
return dt(n) && ls(n);
|
|
4039
|
+
}, Fi = (e) => {
|
|
4025
4040
|
var a;
|
|
4026
4041
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4027
|
-
if (
|
|
4042
|
+
if (dt(t))
|
|
4028
4043
|
return {
|
|
4029
4044
|
kind: "dm-agent",
|
|
4030
4045
|
type: t
|
|
4031
4046
|
};
|
|
4032
|
-
if (
|
|
4047
|
+
if (Us(t))
|
|
4033
4048
|
return {
|
|
4034
4049
|
kind: "age-safety",
|
|
4035
4050
|
type: t
|
|
4036
4051
|
};
|
|
4037
4052
|
const n = e.dm_agent_system_type;
|
|
4038
|
-
if (
|
|
4053
|
+
if (dt(n))
|
|
4039
4054
|
return {
|
|
4040
4055
|
kind: "dm-agent",
|
|
4041
4056
|
type: n
|
|
4042
4057
|
};
|
|
4043
|
-
},
|
|
4058
|
+
}, $i = (e) => {
|
|
4044
4059
|
const t = e.indexOf(st);
|
|
4045
4060
|
if (t === -1)
|
|
4046
4061
|
return e;
|
|
@@ -4050,7 +4065,7 @@ const vi = ({
|
|
|
4050
4065
|
/* @__PURE__ */ s(
|
|
4051
4066
|
"a",
|
|
4052
4067
|
{
|
|
4053
|
-
href:
|
|
4068
|
+
href: Pi,
|
|
4054
4069
|
target: "_blank",
|
|
4055
4070
|
rel: "noopener noreferrer",
|
|
4056
4071
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4059,13 +4074,13 @@ const vi = ({
|
|
|
4059
4074
|
),
|
|
4060
4075
|
e.slice(n)
|
|
4061
4076
|
] });
|
|
4062
|
-
},
|
|
4077
|
+
}, Ui = (e) => {
|
|
4063
4078
|
var a, r;
|
|
4064
|
-
const t = e.message
|
|
4079
|
+
const t = Oi(e.message), n = Fi(
|
|
4065
4080
|
e.message
|
|
4066
4081
|
);
|
|
4067
4082
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4068
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4083
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
|
|
4069
4084
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4070
4085
|
/* @__PURE__ */ u(
|
|
4071
4086
|
"div",
|
|
@@ -4075,7 +4090,7 @@ const vi = ({
|
|
|
4075
4090
|
"data-dm-agent-system-type": n.type,
|
|
4076
4091
|
children: [
|
|
4077
4092
|
/* @__PURE__ */ s(
|
|
4078
|
-
|
|
4093
|
+
_e,
|
|
4079
4094
|
{
|
|
4080
4095
|
size: 16,
|
|
4081
4096
|
weight: "regular",
|
|
@@ -4091,7 +4106,7 @@ const vi = ({
|
|
|
4091
4106
|
] });
|
|
4092
4107
|
}
|
|
4093
4108
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4094
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4109
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
|
|
4095
4110
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4096
4111
|
/* @__PURE__ */ u(
|
|
4097
4112
|
"div",
|
|
@@ -4101,7 +4116,7 @@ const vi = ({
|
|
|
4101
4116
|
"data-age-safety-system-type": n.type,
|
|
4102
4117
|
children: [
|
|
4103
4118
|
/* @__PURE__ */ s(
|
|
4104
|
-
|
|
4119
|
+
aa,
|
|
4105
4120
|
{
|
|
4106
4121
|
size: 24,
|
|
4107
4122
|
weight: "duotone",
|
|
@@ -4110,7 +4125,7 @@ const vi = ({
|
|
|
4110
4125
|
"data-testid": "age-safety-system-message-icon"
|
|
4111
4126
|
}
|
|
4112
4127
|
),
|
|
4113
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
4128
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: $i(i) }) })
|
|
4114
4129
|
]
|
|
4115
4130
|
}
|
|
4116
4131
|
),
|
|
@@ -4125,7 +4140,7 @@ const vi = ({
|
|
|
4125
4140
|
] }),
|
|
4126
4141
|
!t && /* @__PURE__ */ s(Ke, { message: e.message })
|
|
4127
4142
|
] });
|
|
4128
|
-
},
|
|
4143
|
+
}, Bs = ut(!1), nt = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
4129
4144
|
"animateTransform",
|
|
4130
4145
|
{
|
|
4131
4146
|
attributeName: "transform",
|
|
@@ -4135,17 +4150,17 @@ const vi = ({
|
|
|
4135
4150
|
begin: `${120 * t}ms`,
|
|
4136
4151
|
repeatCount: "indefinite"
|
|
4137
4152
|
}
|
|
4138
|
-
) }),
|
|
4153
|
+
) }), Bi = /* @__PURE__ */ new Set([
|
|
4139
4154
|
Ze.Thinking,
|
|
4140
4155
|
Ze.Generating,
|
|
4141
4156
|
Ze.ExternalSources
|
|
4142
|
-
]),
|
|
4157
|
+
]), ji = ({ threadList: e }) => {
|
|
4143
4158
|
var b, v;
|
|
4144
|
-
const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = fe(), { typing: i = {} } =
|
|
4145
|
-
if (!e && l &&
|
|
4146
|
-
const x =
|
|
4159
|
+
const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = fe(), { typing: i = {} } = In(), { aiState: o } = Tn(t), l = Te(Bs);
|
|
4160
|
+
if (!e && l && Bi.has(o)) {
|
|
4161
|
+
const x = Vi(t, (b = r.user) == null ? void 0 : b.id);
|
|
4147
4162
|
return /* @__PURE__ */ s(
|
|
4148
|
-
|
|
4163
|
+
os,
|
|
4149
4164
|
{
|
|
4150
4165
|
avatarId: (x == null ? void 0 : x.id) ?? "ai-agent",
|
|
4151
4166
|
avatarName: (x == null ? void 0 : x.name) ?? (x == null ? void 0 : x.id) ?? "Agent",
|
|
@@ -4158,20 +4173,20 @@ const vi = ({
|
|
|
4158
4173
|
return null;
|
|
4159
4174
|
const m = e ? [] : Object.values(i).filter(
|
|
4160
4175
|
({ parent_id: x, user: p }) => {
|
|
4161
|
-
var
|
|
4162
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4176
|
+
var w;
|
|
4177
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && !x;
|
|
4163
4178
|
}
|
|
4164
4179
|
), g = e ? Object.values(i).filter(
|
|
4165
4180
|
({ parent_id: x, user: p }) => {
|
|
4166
|
-
var
|
|
4167
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4181
|
+
var w;
|
|
4182
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && x === (a == null ? void 0 : a.id);
|
|
4168
4183
|
}
|
|
4169
4184
|
) : [], h = e ? g : m;
|
|
4170
4185
|
if (!h.length)
|
|
4171
4186
|
return null;
|
|
4172
4187
|
const f = (v = h[0]) == null ? void 0 : v.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
4173
4188
|
return /* @__PURE__ */ s(
|
|
4174
|
-
|
|
4189
|
+
os,
|
|
4175
4190
|
{
|
|
4176
4191
|
avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4177
4192
|
avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
@@ -4179,7 +4194,7 @@ const vi = ({
|
|
|
4179
4194
|
testId: "typing-indicator"
|
|
4180
4195
|
}
|
|
4181
4196
|
);
|
|
4182
|
-
},
|
|
4197
|
+
}, os = ({
|
|
4183
4198
|
avatarId: e,
|
|
4184
4199
|
avatarName: t,
|
|
4185
4200
|
avatarImage: n,
|
|
@@ -4223,7 +4238,7 @@ const vi = ({
|
|
|
4223
4238
|
] })
|
|
4224
4239
|
}
|
|
4225
4240
|
);
|
|
4226
|
-
function
|
|
4241
|
+
function Vi(e, t) {
|
|
4227
4242
|
var a;
|
|
4228
4243
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4229
4244
|
for (const r of Object.values(n)) {
|
|
@@ -4232,7 +4247,7 @@ function Ui(e, t) {
|
|
|
4232
4247
|
return i;
|
|
4233
4248
|
}
|
|
4234
4249
|
}
|
|
4235
|
-
const
|
|
4250
|
+
const Gi = () => null, Yi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
4236
4251
|
"div",
|
|
4237
4252
|
{
|
|
4238
4253
|
className: C("flex items-center justify-center h-full", e),
|
|
@@ -4276,11 +4291,11 @@ const Bi = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
|
4276
4291
|
]
|
|
4277
4292
|
}
|
|
4278
4293
|
), Ge = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
4279
|
-
/* @__PURE__ */ s(
|
|
4294
|
+
/* @__PURE__ */ s(Yi, { className: "w-6 h-6" }),
|
|
4280
4295
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4281
4296
|
] }) }));
|
|
4282
4297
|
Ge.displayName = "LoadingState";
|
|
4283
|
-
const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Fe = "Replies instantly with AI assistant",
|
|
4298
|
+
const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Fe = "Replies instantly with AI assistant", Hi = ({
|
|
4284
4299
|
onBack: e,
|
|
4285
4300
|
showBackButton: t,
|
|
4286
4301
|
showStarButton: n = !1,
|
|
@@ -4300,20 +4315,20 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4300
4315
|
renderHeaderTitleBadges: x
|
|
4301
4316
|
}) => {
|
|
4302
4317
|
var I, k, T, M, O, $;
|
|
4303
|
-
const { channel: p } = oe(), { client:
|
|
4318
|
+
const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
|
|
4304
4319
|
() => {
|
|
4305
4320
|
var j;
|
|
4306
4321
|
return He(
|
|
4307
4322
|
(j = p.state) == null ? void 0 : j.members,
|
|
4308
|
-
|
|
4323
|
+
w == null ? void 0 : w.userID,
|
|
4309
4324
|
p.type
|
|
4310
4325
|
);
|
|
4311
4326
|
},
|
|
4312
|
-
[(I = p.state) == null ? void 0 : I.members,
|
|
4313
|
-
), S =
|
|
4327
|
+
[(I = p.state) == null ? void 0 : I.members, w == null ? void 0 : w.userID, p.type]
|
|
4328
|
+
), S = ft(_ == null ? void 0 : _.user), z = (k = _ == null ? void 0 : _.user) == null ? void 0 : k.image, E = ht(p), R = x == null ? void 0 : x({
|
|
4314
4329
|
channel: p,
|
|
4315
|
-
participant:
|
|
4316
|
-
}), F = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90",
|
|
4330
|
+
participant: _
|
|
4331
|
+
}), F = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ u(te, { children: [
|
|
4317
4332
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
|
|
4318
4333
|
R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
|
|
4319
4334
|
] }), y = async () => {
|
|
@@ -4361,7 +4376,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4361
4376
|
/* @__PURE__ */ s(
|
|
4362
4377
|
ne,
|
|
4363
4378
|
{
|
|
4364
|
-
id: ((T =
|
|
4379
|
+
id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || p.id || "unknown",
|
|
4365
4380
|
name: S,
|
|
4366
4381
|
image: z,
|
|
4367
4382
|
starred: n && E,
|
|
@@ -4370,11 +4385,11 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4370
4385
|
}
|
|
4371
4386
|
),
|
|
4372
4387
|
/* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
|
|
4373
|
-
|
|
4388
|
+
D,
|
|
4374
4389
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0", weight: "bold" })
|
|
4375
4390
|
] }),
|
|
4376
4391
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4377
|
-
/* @__PURE__ */ s(
|
|
4392
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4378
4393
|
/* @__PURE__ */ s("span", { children: Fe })
|
|
4379
4394
|
] })
|
|
4380
4395
|
]
|
|
@@ -4383,7 +4398,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4383
4398
|
/* @__PURE__ */ s(
|
|
4384
4399
|
ne,
|
|
4385
4400
|
{
|
|
4386
|
-
id: ((M =
|
|
4401
|
+
id: ((M = _ == null ? void 0 : _.user) == null ? void 0 : M.id) || p.id || "unknown",
|
|
4387
4402
|
name: S,
|
|
4388
4403
|
image: z,
|
|
4389
4404
|
starred: n && E,
|
|
@@ -4392,7 +4407,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4392
4407
|
}
|
|
4393
4408
|
),
|
|
4394
4409
|
/* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
|
|
4395
|
-
|
|
4410
|
+
D,
|
|
4396
4411
|
/* @__PURE__ */ s(
|
|
4397
4412
|
xe,
|
|
4398
4413
|
{
|
|
@@ -4402,7 +4417,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4402
4417
|
)
|
|
4403
4418
|
] }),
|
|
4404
4419
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4405
|
-
/* @__PURE__ */ s(
|
|
4420
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4406
4421
|
/* @__PURE__ */ s("span", { children: Fe })
|
|
4407
4422
|
] })
|
|
4408
4423
|
] })
|
|
@@ -4432,7 +4447,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4432
4447
|
lt,
|
|
4433
4448
|
{
|
|
4434
4449
|
channel: p,
|
|
4435
|
-
participant:
|
|
4450
|
+
participant: _,
|
|
4436
4451
|
showDeleteConversation: o,
|
|
4437
4452
|
showBlockParticipant: l,
|
|
4438
4453
|
showReportParticipant: d,
|
|
@@ -4469,14 +4484,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4469
4484
|
onClick: v,
|
|
4470
4485
|
"aria-label": `View details for ${S}`,
|
|
4471
4486
|
className: C(
|
|
4472
|
-
|
|
4487
|
+
L,
|
|
4473
4488
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4474
4489
|
),
|
|
4475
4490
|
children: [
|
|
4476
4491
|
/* @__PURE__ */ s(
|
|
4477
4492
|
ne,
|
|
4478
4493
|
{
|
|
4479
|
-
id: ((O =
|
|
4494
|
+
id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || p.id || "unknown",
|
|
4480
4495
|
name: S,
|
|
4481
4496
|
image: z,
|
|
4482
4497
|
starred: n && E,
|
|
@@ -4486,21 +4501,21 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4486
4501
|
),
|
|
4487
4502
|
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4488
4503
|
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4489
|
-
|
|
4504
|
+
D,
|
|
4490
4505
|
/* @__PURE__ */ s(xe, { className: "size-4 shrink-0", weight: "bold" })
|
|
4491
4506
|
] }),
|
|
4492
4507
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4493
|
-
/* @__PURE__ */ s(
|
|
4508
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4494
4509
|
/* @__PURE__ */ s("span", { className: "truncate", children: Fe })
|
|
4495
4510
|
] })
|
|
4496
4511
|
] })
|
|
4497
4512
|
]
|
|
4498
4513
|
}
|
|
4499
|
-
) : /* @__PURE__ */ u("div", { className:
|
|
4514
|
+
) : /* @__PURE__ */ u("div", { className: L, children: [
|
|
4500
4515
|
/* @__PURE__ */ s(
|
|
4501
4516
|
ne,
|
|
4502
4517
|
{
|
|
4503
|
-
id: (($ =
|
|
4518
|
+
id: (($ = _ == null ? void 0 : _.user) == null ? void 0 : $.id) || p.id || "unknown",
|
|
4504
4519
|
name: S,
|
|
4505
4520
|
image: z,
|
|
4506
4521
|
starred: n && E,
|
|
@@ -4510,7 +4525,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4510
4525
|
),
|
|
4511
4526
|
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4512
4527
|
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4513
|
-
|
|
4528
|
+
D,
|
|
4514
4529
|
/* @__PURE__ */ s(
|
|
4515
4530
|
xe,
|
|
4516
4531
|
{
|
|
@@ -4520,7 +4535,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4520
4535
|
)
|
|
4521
4536
|
] }),
|
|
4522
4537
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4523
|
-
/* @__PURE__ */ s(
|
|
4538
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4524
4539
|
/* @__PURE__ */ s("span", { className: "truncate", children: Fe })
|
|
4525
4540
|
] })
|
|
4526
4541
|
] })
|
|
@@ -4550,7 +4565,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4550
4565
|
lt,
|
|
4551
4566
|
{
|
|
4552
4567
|
channel: p,
|
|
4553
|
-
participant:
|
|
4568
|
+
participant: _,
|
|
4554
4569
|
showDeleteConversation: o,
|
|
4555
4570
|
showBlockParticipant: l,
|
|
4556
4571
|
showReportParticipant: d,
|
|
@@ -4566,7 +4581,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4566
4581
|
] })
|
|
4567
4582
|
] })
|
|
4568
4583
|
] });
|
|
4569
|
-
},
|
|
4584
|
+
}, qi = ({
|
|
4570
4585
|
onBack: e,
|
|
4571
4586
|
showBackButton: t,
|
|
4572
4587
|
renderMessageInputActions: n,
|
|
@@ -4585,15 +4600,15 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4585
4600
|
showStarButton: v = !1,
|
|
4586
4601
|
chatbotVotingEnabled: x = !1,
|
|
4587
4602
|
renderChannelBanner: p,
|
|
4588
|
-
renderHeaderTitleBadges:
|
|
4589
|
-
customChannelActions:
|
|
4603
|
+
renderHeaderTitleBadges: w,
|
|
4604
|
+
customChannelActions: _,
|
|
4590
4605
|
renderChannelActions: S,
|
|
4591
4606
|
renderMessage: z,
|
|
4592
4607
|
dmAgentEnabled: E = !1,
|
|
4593
4608
|
viewerLanguage: R,
|
|
4594
4609
|
showChannelInfo: F = !0,
|
|
4595
|
-
onParticipantNameClick:
|
|
4596
|
-
composerInput:
|
|
4610
|
+
onParticipantNameClick: L,
|
|
4611
|
+
composerInput: D
|
|
4597
4612
|
}) => {
|
|
4598
4613
|
var N, A, Y, q;
|
|
4599
4614
|
const { channel: y } = oe(), { client: I } = fe(), k = V.useMemo(
|
|
@@ -4615,8 +4630,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4615
4630
|
}) : void 0;
|
|
4616
4631
|
}, [I == null ? void 0 : I.userID, (A = y.state) == null ? void 0 : A.members]), M = ((Y = T == null ? void 0 : T.user) == null ? void 0 : Y.is_account) ?? (T == null ? void 0 : T.is_account), O = ((q = k == null ? void 0 : k.user) == null ? void 0 : q.is_account) ?? (k == null ? void 0 : k.is_account), $ = E && M === !1 && O === !0, j = y.state.messages.some(
|
|
4617
4632
|
(H) => H.type !== "deleted"
|
|
4618
|
-
), Z = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee =
|
|
4619
|
-
|
|
4633
|
+
), Z = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = L ? /* @__PURE__ */ s(
|
|
4634
|
+
xa,
|
|
4620
4635
|
{
|
|
4621
4636
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4622
4637
|
onBack: e,
|
|
@@ -4632,14 +4647,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4632
4647
|
onDeleteConversationClick: d,
|
|
4633
4648
|
onBlockParticipantClick: m,
|
|
4634
4649
|
onReportParticipantClick: g,
|
|
4635
|
-
customChannelActions:
|
|
4650
|
+
customChannelActions: _,
|
|
4636
4651
|
renderChannelActions: S,
|
|
4637
|
-
onParticipantNameClick:
|
|
4652
|
+
onParticipantNameClick: L
|
|
4638
4653
|
}
|
|
4639
4654
|
) : null, X = Q(
|
|
4640
4655
|
(H) => {
|
|
4641
4656
|
const { message: U } = Ne("ChannelView"), W = /* @__PURE__ */ s(
|
|
4642
|
-
|
|
4657
|
+
yi,
|
|
4643
4658
|
{
|
|
4644
4659
|
...H,
|
|
4645
4660
|
chatbotVotingEnabled: x,
|
|
@@ -4651,18 +4666,18 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4651
4666
|
[x, z, R]
|
|
4652
4667
|
);
|
|
4653
4668
|
return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
|
|
4654
|
-
|
|
4669
|
+
An,
|
|
4655
4670
|
{
|
|
4656
4671
|
overrides: {
|
|
4657
4672
|
Message: X,
|
|
4658
|
-
MessageActions:
|
|
4673
|
+
MessageActions: Si,
|
|
4659
4674
|
UnreadMessagesNotification: () => null,
|
|
4660
4675
|
UnreadMessagesSeparator: () => null
|
|
4661
4676
|
},
|
|
4662
|
-
children: /* @__PURE__ */ u(
|
|
4663
|
-
!
|
|
4677
|
+
children: /* @__PURE__ */ u(Rn, { children: [
|
|
4678
|
+
!L && /* @__PURE__ */ u(te, { children: [
|
|
4664
4679
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4665
|
-
|
|
4680
|
+
Hi,
|
|
4666
4681
|
{
|
|
4667
4682
|
onBack: e,
|
|
4668
4683
|
showBackButton: t,
|
|
@@ -4677,27 +4692,27 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4677
4692
|
onDeleteConversationClick: d,
|
|
4678
4693
|
onBlockParticipantClick: m,
|
|
4679
4694
|
onReportParticipantClick: g,
|
|
4680
|
-
customChannelActions:
|
|
4695
|
+
customChannelActions: _,
|
|
4681
4696
|
renderChannelActions: S,
|
|
4682
|
-
renderHeaderTitleBadges:
|
|
4697
|
+
renderHeaderTitleBadges: w
|
|
4683
4698
|
}
|
|
4684
4699
|
) }, "lt-channel-header"),
|
|
4685
4700
|
Z
|
|
4686
4701
|
] }),
|
|
4687
|
-
|
|
4702
|
+
D ? /* @__PURE__ */ u("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4688
4703
|
/* @__PURE__ */ u(
|
|
4689
4704
|
"div",
|
|
4690
4705
|
{
|
|
4691
4706
|
className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
|
|
4692
4707
|
children: [
|
|
4693
|
-
|
|
4708
|
+
L && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
|
|
4694
4709
|
ee,
|
|
4695
4710
|
Z
|
|
4696
4711
|
] }) }),
|
|
4697
4712
|
/* @__PURE__ */ s(
|
|
4698
|
-
|
|
4713
|
+
Xt,
|
|
4699
4714
|
{
|
|
4700
|
-
head:
|
|
4715
|
+
head: L && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4701
4716
|
ee,
|
|
4702
4717
|
Z
|
|
4703
4718
|
] }) : void 0,
|
|
@@ -4710,7 +4725,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4710
4725
|
"lt-channel-message-list"
|
|
4711
4726
|
),
|
|
4712
4727
|
/* @__PURE__ */ s(
|
|
4713
|
-
|
|
4728
|
+
is,
|
|
4714
4729
|
{
|
|
4715
4730
|
...n && {
|
|
4716
4731
|
renderActions: () => n == null ? void 0 : n(y)
|
|
@@ -4721,7 +4736,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4721
4736
|
renderFooter: () => a == null ? void 0 : a(y),
|
|
4722
4737
|
disabled: c,
|
|
4723
4738
|
disabledReason: b,
|
|
4724
|
-
composerInput:
|
|
4739
|
+
composerInput: D
|
|
4725
4740
|
},
|
|
4726
4741
|
"lt-channel-message-input"
|
|
4727
4742
|
)
|
|
@@ -4731,14 +4746,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4731
4746
|
{
|
|
4732
4747
|
className: "flex-1 overflow-hidden relative",
|
|
4733
4748
|
children: [
|
|
4734
|
-
|
|
4749
|
+
L && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
|
|
4735
4750
|
ee,
|
|
4736
4751
|
Z
|
|
4737
4752
|
] }) }),
|
|
4738
4753
|
/* @__PURE__ */ s(
|
|
4739
|
-
|
|
4754
|
+
Xt,
|
|
4740
4755
|
{
|
|
4741
|
-
head:
|
|
4756
|
+
head: L && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4742
4757
|
ee,
|
|
4743
4758
|
Z
|
|
4744
4759
|
] }) : void 0,
|
|
@@ -4752,7 +4767,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4752
4767
|
),
|
|
4753
4768
|
r ? /* @__PURE__ */ s(V.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
|
|
4754
4769
|
/* @__PURE__ */ s(
|
|
4755
|
-
|
|
4770
|
+
is,
|
|
4756
4771
|
{
|
|
4757
4772
|
...n && {
|
|
4758
4773
|
renderActions: () => n == null ? void 0 : n(y)
|
|
@@ -4760,7 +4775,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4760
4775
|
renderFooter: () => a == null ? void 0 : a(y),
|
|
4761
4776
|
disabled: c,
|
|
4762
4777
|
disabledReason: b,
|
|
4763
|
-
composerInput:
|
|
4778
|
+
composerInput: D
|
|
4764
4779
|
},
|
|
4765
4780
|
"lt-channel-message-input"
|
|
4766
4781
|
)
|
|
@@ -4768,7 +4783,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4768
4783
|
] })
|
|
4769
4784
|
}
|
|
4770
4785
|
) });
|
|
4771
|
-
},
|
|
4786
|
+
}, js = V.memo(
|
|
4772
4787
|
({
|
|
4773
4788
|
channel: e,
|
|
4774
4789
|
onBack: t,
|
|
@@ -4779,7 +4794,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4779
4794
|
onLeaveConversation: o,
|
|
4780
4795
|
onBlockParticipant: l,
|
|
4781
4796
|
className: d,
|
|
4782
|
-
CustomChannelEmptyState: m =
|
|
4797
|
+
CustomChannelEmptyState: m = Gi,
|
|
4783
4798
|
showDeleteConversation: g = !0,
|
|
4784
4799
|
onDeleteConversationClick: h,
|
|
4785
4800
|
onBlockParticipantClick: f,
|
|
@@ -4788,15 +4803,15 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4788
4803
|
showReportParticipant: v = !0,
|
|
4789
4804
|
composerDisabled: x = !1,
|
|
4790
4805
|
composerDisabledReason: p,
|
|
4791
|
-
dmAgentEnabled:
|
|
4792
|
-
messageMetadata:
|
|
4806
|
+
dmAgentEnabled: w,
|
|
4807
|
+
messageMetadata: _,
|
|
4793
4808
|
onMessageSent: S,
|
|
4794
4809
|
showStarButton: z = !1,
|
|
4795
4810
|
chatbotVotingEnabled: E = !1,
|
|
4796
4811
|
renderChannelBanner: R,
|
|
4797
4812
|
renderHeaderTitleBadges: F,
|
|
4798
|
-
customChannelActions:
|
|
4799
|
-
renderChannelActions:
|
|
4813
|
+
customChannelActions: L,
|
|
4814
|
+
renderChannelActions: D,
|
|
4800
4815
|
renderMessage: y,
|
|
4801
4816
|
onMessageLinkClick: I,
|
|
4802
4817
|
sendButton: k,
|
|
@@ -4809,13 +4824,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4809
4824
|
const Z = Q(
|
|
4810
4825
|
async (X, N, A) => {
|
|
4811
4826
|
var J;
|
|
4812
|
-
const Y = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, q =
|
|
4827
|
+
const Y = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, q = w && !Y, H = {
|
|
4813
4828
|
...N,
|
|
4814
4829
|
...q && { silent: !0 },
|
|
4815
|
-
...
|
|
4830
|
+
..._ && {
|
|
4816
4831
|
metadata: {
|
|
4817
4832
|
...N.metadata ?? {},
|
|
4818
|
-
...
|
|
4833
|
+
..._
|
|
4819
4834
|
}
|
|
4820
4835
|
}
|
|
4821
4836
|
}, U = {
|
|
@@ -4824,7 +4839,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4824
4839
|
}, W = await e.sendMessage(H, U);
|
|
4825
4840
|
return S == null || S(W), W;
|
|
4826
4841
|
},
|
|
4827
|
-
[e,
|
|
4842
|
+
[e, w, _, S]
|
|
4828
4843
|
), ee = G(null);
|
|
4829
4844
|
return K(() => {
|
|
4830
4845
|
if (!I) return;
|
|
@@ -4845,20 +4860,20 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4845
4860
|
"messaging-channel-view h-full flex flex-col",
|
|
4846
4861
|
d
|
|
4847
4862
|
),
|
|
4848
|
-
children: /* @__PURE__ */ s(
|
|
4849
|
-
|
|
4863
|
+
children: /* @__PURE__ */ s(Bs.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
|
|
4864
|
+
Mn,
|
|
4850
4865
|
{
|
|
4851
4866
|
channel: e,
|
|
4852
|
-
MessageSystem:
|
|
4867
|
+
MessageSystem: Ui,
|
|
4853
4868
|
EmptyStateIndicator: m,
|
|
4854
4869
|
LoadingIndicator: Ge,
|
|
4855
|
-
DateSeparator:
|
|
4856
|
-
TypingIndicator:
|
|
4870
|
+
DateSeparator: _a,
|
|
4871
|
+
TypingIndicator: ji,
|
|
4857
4872
|
doSendMessageRequest: Z,
|
|
4858
4873
|
...k ? { SendButton: k } : {},
|
|
4859
4874
|
...T ? { AttachmentPreviewList: T } : {},
|
|
4860
4875
|
children: /* @__PURE__ */ s(
|
|
4861
|
-
|
|
4876
|
+
qi,
|
|
4862
4877
|
{
|
|
4863
4878
|
onBack: t,
|
|
4864
4879
|
showBackButton: n,
|
|
@@ -4877,12 +4892,12 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4877
4892
|
composerDisabled: x,
|
|
4878
4893
|
composerDisabledReason: p,
|
|
4879
4894
|
showStarButton: z,
|
|
4880
|
-
dmAgentEnabled:
|
|
4895
|
+
dmAgentEnabled: w,
|
|
4881
4896
|
chatbotVotingEnabled: E,
|
|
4882
4897
|
renderChannelBanner: R,
|
|
4883
4898
|
renderHeaderTitleBadges: F,
|
|
4884
|
-
customChannelActions:
|
|
4885
|
-
renderChannelActions:
|
|
4899
|
+
customChannelActions: L,
|
|
4900
|
+
renderChannelActions: D,
|
|
4886
4901
|
renderMessage: y,
|
|
4887
4902
|
viewerLanguage: M,
|
|
4888
4903
|
showChannelInfo: O,
|
|
@@ -4896,7 +4911,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4896
4911
|
);
|
|
4897
4912
|
}
|
|
4898
4913
|
);
|
|
4899
|
-
|
|
4914
|
+
js.displayName = "ChannelView";
|
|
4900
4915
|
const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
|
|
4901
4916
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4902
4917
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -4912,7 +4927,7 @@ const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4912
4927
|
)
|
|
4913
4928
|
] }) }));
|
|
4914
4929
|
Ce.displayName = "ErrorState";
|
|
4915
|
-
const
|
|
4930
|
+
const xl = ({
|
|
4916
4931
|
capabilities: e = {},
|
|
4917
4932
|
renderMessageInputActions: t,
|
|
4918
4933
|
renderConversationFooter: n,
|
|
@@ -4931,8 +4946,8 @@ const pl = ({
|
|
|
4931
4946
|
renderChannelBanner: v,
|
|
4932
4947
|
customChannelActions: x,
|
|
4933
4948
|
renderChannelActions: p,
|
|
4934
|
-
onParticipantNameClick:
|
|
4935
|
-
renderMessage:
|
|
4949
|
+
onParticipantNameClick: w,
|
|
4950
|
+
renderMessage: _,
|
|
4936
4951
|
onMessageLinkClick: S,
|
|
4937
4952
|
showChannelInfo: z,
|
|
4938
4953
|
composerInput: E
|
|
@@ -4940,12 +4955,12 @@ const pl = ({
|
|
|
4940
4955
|
const {
|
|
4941
4956
|
client: R,
|
|
4942
4957
|
isConnected: F,
|
|
4943
|
-
isLoading:
|
|
4944
|
-
error:
|
|
4958
|
+
isLoading: L,
|
|
4959
|
+
error: D,
|
|
4945
4960
|
refreshConnection: y,
|
|
4946
4961
|
service: I,
|
|
4947
4962
|
debug: k
|
|
4948
|
-
} =
|
|
4963
|
+
} = ia(), [T, M] = B(null), [O, $] = B(null), [j, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
|
|
4949
4964
|
X.current = o;
|
|
4950
4965
|
const N = G(a);
|
|
4951
4966
|
N.current = a;
|
|
@@ -4963,7 +4978,7 @@ const pl = ({
|
|
|
4963
4978
|
A.current === W && (A.current = null);
|
|
4964
4979
|
};
|
|
4965
4980
|
(async () => {
|
|
4966
|
-
var
|
|
4981
|
+
var Le, ze;
|
|
4967
4982
|
try {
|
|
4968
4983
|
k && console.log(
|
|
4969
4984
|
"[MessagingShell] Loading initial conversation with:",
|
|
@@ -4978,7 +4993,7 @@ const pl = ({
|
|
|
4978
4993
|
{ limit: 1 }
|
|
4979
4994
|
);
|
|
4980
4995
|
if (ae.length > 0) {
|
|
4981
|
-
M(ae[0]), $(null), (
|
|
4996
|
+
M(ae[0]), $(null), (Le = N.current) == null || Le.call(N, ae[0]), k && console.log(
|
|
4982
4997
|
"[MessagingShell] Initial conversation loaded:",
|
|
4983
4998
|
ae[0].id
|
|
4984
4999
|
);
|
|
@@ -5022,14 +5037,14 @@ const pl = ({
|
|
|
5022
5037
|
var U;
|
|
5023
5038
|
M(null), Z(!0), (U = q.current) == null || U.call(q);
|
|
5024
5039
|
}, []);
|
|
5025
|
-
return
|
|
5040
|
+
return L ? /* @__PURE__ */ s(Ge, {}) : D ? /* @__PURE__ */ s(Ce, { message: D, onBack: y }) : !F || !R ? /* @__PURE__ */ s(
|
|
5026
5041
|
Ce,
|
|
5027
5042
|
{
|
|
5028
5043
|
message: "Not connected to messaging service",
|
|
5029
5044
|
onBack: y
|
|
5030
5045
|
}
|
|
5031
5046
|
) : O ? /* @__PURE__ */ s(Ce, { message: O }) : j && !T ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
5032
|
-
|
|
5047
|
+
js,
|
|
5033
5048
|
{
|
|
5034
5049
|
channel: T,
|
|
5035
5050
|
renderMessageInputActions: t,
|
|
@@ -5048,8 +5063,8 @@ const pl = ({
|
|
|
5048
5063
|
renderHeaderTitleBadges: b,
|
|
5049
5064
|
customChannelActions: x,
|
|
5050
5065
|
renderChannelActions: p,
|
|
5051
|
-
onParticipantNameClick:
|
|
5052
|
-
renderMessage:
|
|
5066
|
+
onParticipantNameClick: w,
|
|
5067
|
+
renderMessage: _,
|
|
5053
5068
|
onMessageLinkClick: S,
|
|
5054
5069
|
showChannelInfo: z,
|
|
5055
5070
|
composerInput: E
|
|
@@ -5057,13 +5072,13 @@ const pl = ({
|
|
|
5057
5072
|
T.id
|
|
5058
5073
|
) }) }) : /* @__PURE__ */ s(Ge, {});
|
|
5059
5074
|
};
|
|
5060
|
-
function
|
|
5075
|
+
function Wi(e) {
|
|
5061
5076
|
const t = e.state.pending_messages;
|
|
5062
5077
|
if (t != null && t.length)
|
|
5063
5078
|
for (const n of t)
|
|
5064
5079
|
e.state.addMessageSorted(n.message);
|
|
5065
5080
|
}
|
|
5066
|
-
const
|
|
5081
|
+
const Vs = V.createContext({
|
|
5067
5082
|
selectedChannel: void 0,
|
|
5068
5083
|
onChannelSelect: () => {
|
|
5069
5084
|
},
|
|
@@ -5071,18 +5086,18 @@ const Bs = V.createContext({
|
|
|
5071
5086
|
renderMessagePreview: void 0,
|
|
5072
5087
|
channelPreview: void 0,
|
|
5073
5088
|
viewerLanguage: void 0
|
|
5074
|
-
}),
|
|
5089
|
+
}), Xi = Vs.Provider, Ki = () => V.useContext(Vs), Zi = (e, t) => {
|
|
5075
5090
|
const n = new Date(
|
|
5076
5091
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
5077
5092
|
), r = new Date(
|
|
5078
5093
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
5079
5094
|
).getTime() - n.getTime();
|
|
5080
5095
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
5081
|
-
},
|
|
5096
|
+
}, Ji = (e) => {
|
|
5082
5097
|
const t = /* @__PURE__ */ new Date();
|
|
5083
5098
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5084
5099
|
return "Just now";
|
|
5085
|
-
const a =
|
|
5100
|
+
const a = Zi(e, t);
|
|
5086
5101
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5087
5102
|
hour: "numeric",
|
|
5088
5103
|
minute: "2-digit",
|
|
@@ -5092,9 +5107,9 @@ const Bs = V.createContext({
|
|
|
5092
5107
|
day: "numeric",
|
|
5093
5108
|
year: "2-digit"
|
|
5094
5109
|
});
|
|
5095
|
-
},
|
|
5110
|
+
}, Gs = V.memo(
|
|
5096
5111
|
(e) => {
|
|
5097
|
-
var F,
|
|
5112
|
+
var F, L, D;
|
|
5098
5113
|
const { channel: t, unread: n } = e, {
|
|
5099
5114
|
selectedChannel: a,
|
|
5100
5115
|
onChannelSelect: r,
|
|
@@ -5102,7 +5117,7 @@ const Bs = V.createContext({
|
|
|
5102
5117
|
channelPreview: o,
|
|
5103
5118
|
renderMessagePreview: l,
|
|
5104
5119
|
viewerLanguage: d
|
|
5105
|
-
} =
|
|
5120
|
+
} = Ki(), { client: m } = fe(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ht(t);
|
|
5106
5121
|
if (o)
|
|
5107
5122
|
return /* @__PURE__ */ s(
|
|
5108
5123
|
o,
|
|
@@ -5123,16 +5138,16 @@ const Bs = V.createContext({
|
|
|
5123
5138
|
(F = t == null ? void 0 : t.state) == null ? void 0 : F.members,
|
|
5124
5139
|
m == null ? void 0 : m.userID,
|
|
5125
5140
|
t == null ? void 0 : t.type
|
|
5126
|
-
), v =
|
|
5141
|
+
), v = ft(b == null ? void 0 : b.user), x = (L = b == null ? void 0 : b.user) == null ? void 0 : L.image, p = (() => {
|
|
5127
5142
|
var I;
|
|
5128
5143
|
const y = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
|
|
5129
5144
|
if (y != null && y.length) {
|
|
5130
5145
|
for (let k = y.length - 1; k >= 0; k--)
|
|
5131
5146
|
if (y[k].type !== "system") return y[k];
|
|
5132
5147
|
}
|
|
5133
|
-
})(),
|
|
5148
|
+
})(), _ = (() => {
|
|
5134
5149
|
var M;
|
|
5135
|
-
const y =
|
|
5150
|
+
const y = bs({
|
|
5136
5151
|
message: p,
|
|
5137
5152
|
viewerLanguage: d
|
|
5138
5153
|
}), { custom_type: I, attachment_content_type: k } = (p == null ? void 0 : p.metadata) || {};
|
|
@@ -5149,7 +5164,7 @@ const Bs = V.createContext({
|
|
|
5149
5164
|
if (y) return y;
|
|
5150
5165
|
const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
|
|
5151
5166
|
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5152
|
-
})(), S = p != null && p.created_at ?
|
|
5167
|
+
})(), S = p != null && p.created_at ? Ji(new Date(p.created_at)) : "", z = p ? Ue(p) : !1, E = l ? l(p, _) : `${z ? "✨ " : ""}${_}`, R = n ?? 0;
|
|
5153
5168
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5154
5169
|
channelId: t == null ? void 0 : t.id,
|
|
5155
5170
|
isSelected: g,
|
|
@@ -5175,7 +5190,7 @@ const Bs = V.createContext({
|
|
|
5175
5190
|
/* @__PURE__ */ s(
|
|
5176
5191
|
ne,
|
|
5177
5192
|
{
|
|
5178
|
-
id: ((
|
|
5193
|
+
id: ((D = b == null ? void 0 : b.user) == null ? void 0 : D.id) || t.id || "unknown",
|
|
5179
5194
|
name: v,
|
|
5180
5195
|
image: x,
|
|
5181
5196
|
size: 48,
|
|
@@ -5208,18 +5223,18 @@ const Bs = V.createContext({
|
|
|
5208
5223
|
);
|
|
5209
5224
|
}
|
|
5210
5225
|
);
|
|
5211
|
-
|
|
5212
|
-
const
|
|
5226
|
+
Gs.displayName = "CustomChannelPreview";
|
|
5227
|
+
const Qi = { last_message_at: -1 }, el = V.memo(
|
|
5213
5228
|
({
|
|
5214
5229
|
onChannelSelect: e,
|
|
5215
5230
|
selectedChannel: t,
|
|
5216
5231
|
filters: n,
|
|
5217
5232
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5218
5233
|
channelRenderFilterFn: r,
|
|
5219
|
-
sort: i =
|
|
5234
|
+
sort: i = Qi,
|
|
5220
5235
|
className: o,
|
|
5221
5236
|
customEmptyStateIndicator: l,
|
|
5222
|
-
channelListPaginator: d =
|
|
5237
|
+
channelListPaginator: d = Ln,
|
|
5223
5238
|
channelPreview: m,
|
|
5224
5239
|
renderMessagePreview: g,
|
|
5225
5240
|
viewerLanguage: h,
|
|
@@ -5230,18 +5245,18 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5230
5245
|
onAddedToChannel: x,
|
|
5231
5246
|
onChannelUpdated: p
|
|
5232
5247
|
}) => {
|
|
5233
|
-
const
|
|
5234
|
-
|
|
5235
|
-
const { debug:
|
|
5248
|
+
const w = V.useRef(0);
|
|
5249
|
+
w.current++;
|
|
5250
|
+
const { debug: _ = !1 } = mt(), S = V.useCallback(
|
|
5236
5251
|
(E) => {
|
|
5237
5252
|
for (const R of E)
|
|
5238
|
-
|
|
5253
|
+
Wi(R);
|
|
5239
5254
|
return r ? r(E) : E;
|
|
5240
5255
|
},
|
|
5241
5256
|
[r]
|
|
5242
5257
|
);
|
|
5243
|
-
|
|
5244
|
-
renderCount:
|
|
5258
|
+
_ && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5259
|
+
renderCount: w.current,
|
|
5245
5260
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5246
5261
|
filters: n
|
|
5247
5262
|
});
|
|
@@ -5249,7 +5264,7 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5249
5264
|
() => ({
|
|
5250
5265
|
selectedChannel: t,
|
|
5251
5266
|
onChannelSelect: e,
|
|
5252
|
-
debug:
|
|
5267
|
+
debug: _,
|
|
5253
5268
|
channelPreview: m,
|
|
5254
5269
|
renderMessagePreview: g,
|
|
5255
5270
|
viewerLanguage: h
|
|
@@ -5257,7 +5272,7 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5257
5272
|
[
|
|
5258
5273
|
t,
|
|
5259
5274
|
e,
|
|
5260
|
-
|
|
5275
|
+
_,
|
|
5261
5276
|
m,
|
|
5262
5277
|
g,
|
|
5263
5278
|
h
|
|
@@ -5270,8 +5285,8 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5270
5285
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5271
5286
|
o
|
|
5272
5287
|
),
|
|
5273
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5274
|
-
|
|
5288
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: z, children: /* @__PURE__ */ s(
|
|
5289
|
+
Dn,
|
|
5275
5290
|
{
|
|
5276
5291
|
filters: n,
|
|
5277
5292
|
sort: i,
|
|
@@ -5285,7 +5300,7 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5285
5300
|
onAddedToChannel: x,
|
|
5286
5301
|
onChannelUpdated: p,
|
|
5287
5302
|
Paginator: d,
|
|
5288
|
-
Preview:
|
|
5303
|
+
Preview: Gs,
|
|
5289
5304
|
EmptyStateIndicator: l
|
|
5290
5305
|
},
|
|
5291
5306
|
`${JSON.stringify(n)}:${JSON.stringify(i)}`
|
|
@@ -5294,11 +5309,11 @@ const Ki = { last_message_at: -1 }, Zi = V.memo(
|
|
|
5294
5309
|
);
|
|
5295
5310
|
}
|
|
5296
5311
|
);
|
|
5297
|
-
|
|
5298
|
-
const
|
|
5312
|
+
el.displayName = "ChannelList";
|
|
5313
|
+
const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, tl = {
|
|
5299
5314
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5300
5315
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5301
|
-
},
|
|
5316
|
+
}, sl = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5302
5317
|
"span",
|
|
5303
5318
|
{
|
|
5304
5319
|
"aria-hidden": "true",
|
|
@@ -5308,12 +5323,12 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5308
5323
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5309
5324
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5310
5325
|
transformOrigin: "center",
|
|
5311
|
-
backgroundColor:
|
|
5312
|
-
WebkitMask:
|
|
5313
|
-
mask:
|
|
5326
|
+
backgroundColor: tl[e],
|
|
5327
|
+
WebkitMask: cs,
|
|
5328
|
+
mask: cs
|
|
5314
5329
|
}
|
|
5315
5330
|
}
|
|
5316
|
-
),
|
|
5331
|
+
), nl = {
|
|
5317
5332
|
sent: {
|
|
5318
5333
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5319
5334
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5322,7 +5337,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5322
5337
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5323
5338
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5324
5339
|
}
|
|
5325
|
-
},
|
|
5340
|
+
}, Ys = ({
|
|
5326
5341
|
variant: e,
|
|
5327
5342
|
text: t,
|
|
5328
5343
|
tail: n = !0,
|
|
@@ -5338,23 +5353,23 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5338
5353
|
r
|
|
5339
5354
|
),
|
|
5340
5355
|
style: {
|
|
5341
|
-
...
|
|
5356
|
+
...nl[e],
|
|
5342
5357
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5343
5358
|
isolation: "isolate"
|
|
5344
5359
|
},
|
|
5345
5360
|
children: [
|
|
5346
5361
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5347
5362
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5348
|
-
n && /* @__PURE__ */ s(
|
|
5363
|
+
n && /* @__PURE__ */ s(sl, { variant: e })
|
|
5349
5364
|
]
|
|
5350
5365
|
}
|
|
5351
|
-
),
|
|
5366
|
+
), al = ({
|
|
5352
5367
|
text: e,
|
|
5353
5368
|
tail: t,
|
|
5354
5369
|
header: n,
|
|
5355
5370
|
className: a
|
|
5356
5371
|
}) => /* @__PURE__ */ s(
|
|
5357
|
-
|
|
5372
|
+
Ys,
|
|
5358
5373
|
{
|
|
5359
5374
|
variant: "received",
|
|
5360
5375
|
text: e,
|
|
@@ -5362,10 +5377,10 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5362
5377
|
header: n,
|
|
5363
5378
|
className: a
|
|
5364
5379
|
}
|
|
5365
|
-
),
|
|
5366
|
-
Sent:
|
|
5367
|
-
Received:
|
|
5368
|
-
},
|
|
5380
|
+
), rl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Ys, { variant: "sent", text: e, tail: t, className: n }), _l = {
|
|
5381
|
+
Sent: rl,
|
|
5382
|
+
Received: al
|
|
5383
|
+
}, il = ({
|
|
5369
5384
|
question: e,
|
|
5370
5385
|
onClick: t,
|
|
5371
5386
|
loading: n = !1,
|
|
@@ -5387,7 +5402,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5387
5402
|
),
|
|
5388
5403
|
children: e
|
|
5389
5404
|
}
|
|
5390
|
-
),
|
|
5405
|
+
), wl = ({
|
|
5391
5406
|
faqs: e,
|
|
5392
5407
|
onFaqClick: t,
|
|
5393
5408
|
loadingFaqId: n,
|
|
@@ -5416,7 +5431,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5416
5431
|
children: [
|
|
5417
5432
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5418
5433
|
l.map((d) => /* @__PURE__ */ s(
|
|
5419
|
-
|
|
5434
|
+
il,
|
|
5420
5435
|
{
|
|
5421
5436
|
question: d.question,
|
|
5422
5437
|
onClick: () => t(d.id),
|
|
@@ -5430,42 +5445,42 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5430
5445
|
] }) });
|
|
5431
5446
|
};
|
|
5432
5447
|
export {
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5448
|
+
xs as A,
|
|
5449
|
+
vt as B,
|
|
5450
|
+
Gi as C,
|
|
5451
|
+
ft as D,
|
|
5452
|
+
vl as E,
|
|
5453
|
+
wl as F,
|
|
5454
|
+
Br as G,
|
|
5455
|
+
Na as H,
|
|
5456
|
+
ia as I,
|
|
5457
|
+
ts as L,
|
|
5458
|
+
pl as M,
|
|
5444
5459
|
ye as a,
|
|
5445
5460
|
ne as b,
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5461
|
+
el as c,
|
|
5462
|
+
js as d,
|
|
5463
|
+
bl as e,
|
|
5464
|
+
il as f,
|
|
5450
5465
|
ce as g,
|
|
5451
5466
|
Oe as h,
|
|
5452
5467
|
ke as i,
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5468
|
+
_l as j,
|
|
5469
|
+
Zr as k,
|
|
5470
|
+
gl as l,
|
|
5471
|
+
xl as m,
|
|
5472
|
+
rr as n,
|
|
5458
5473
|
he as o,
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5474
|
+
sr as p,
|
|
5475
|
+
Ji as q,
|
|
5476
|
+
we as r,
|
|
5477
|
+
ar as s,
|
|
5478
|
+
bs as t,
|
|
5479
|
+
Ns as u,
|
|
5480
|
+
da as v,
|
|
5481
|
+
Xa as w,
|
|
5482
|
+
ya as x,
|
|
5468
5483
|
He as y,
|
|
5469
|
-
|
|
5484
|
+
bt as z
|
|
5470
5485
|
};
|
|
5471
|
-
//# sourceMappingURL=index-
|
|
5486
|
+
//# sourceMappingURL=index-DOIcFOhH.js.map
|