@linktr.ee/messaging-react 3.6.2-rc-1783311731 → 3.6.2-rc-1783317817
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-4UyBK3XO.cjs → Card-BYdqLBN3.cjs} +2 -2
- package/dist/{Card-4UyBK3XO.cjs.map → Card-BYdqLBN3.cjs.map} +1 -1
- package/dist/{Card-RZ6C_IkE.js → Card-CZDLISxS.js} +3 -3
- package/dist/{Card-RZ6C_IkE.js.map → Card-CZDLISxS.js.map} +1 -1
- package/dist/{Card-0wf8lj5n.js → Card-Ca5OtJh6.js} +2 -2
- package/dist/{Card-0wf8lj5n.js.map → Card-Ca5OtJh6.js.map} +1 -1
- package/dist/{Card-DsQhJjj0.cjs → Card-DuSTf-S8.cjs} +2 -2
- package/dist/{Card-DsQhJjj0.cjs.map → Card-DuSTf-S8.cjs.map} +1 -1
- package/dist/{Card-iGNcxybY.js → Card-gjy-ib_1.js} +2 -2
- package/dist/{Card-iGNcxybY.js.map → Card-gjy-ib_1.js.map} +1 -1
- package/dist/{Card-6b4Ws9rn.cjs → Card-iHrzL32q.cjs} +2 -2
- package/dist/{Card-6b4Ws9rn.cjs.map → Card-iHrzL32q.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Do9udNMm.js → LockedThumbnail-COK5XPQ9.js} +2 -2
- package/dist/{LockedThumbnail-Do9udNMm.js.map → LockedThumbnail-COK5XPQ9.js.map} +1 -1
- package/dist/{LockedThumbnail-N0pNOO3D.cjs → LockedThumbnail-DrWiitE6.cjs} +2 -2
- package/dist/{LockedThumbnail-N0pNOO3D.cjs.map → LockedThumbnail-DrWiitE6.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-wFe1UO9t.js → index-CnR5N9Co.js} +1097 -1104
- package/dist/index-CnR5N9Co.js.map +1 -0
- package/dist/index-pODWIZCi.cjs +2 -0
- package/dist/index-pODWIZCi.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/CustomMessage/CustomMessage.stories.tsx +18 -11
- package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +66 -0
- package/src/components/CustomMessage/MessageDeliveryStatus.tsx +53 -0
- package/src/components/CustomMessage/index.tsx +3 -2
- package/src/styles.css +16 -25
- package/dist/index-B3ZJaqJY.cjs +0 -2
- package/dist/index-B3ZJaqJY.cjs.map +0 -1
- package/dist/index-wFe1UO9t.js.map +0 -1
- package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +0 -107
- package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +0 -86
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as s, jsxs as m, Fragment as
|
|
2
|
-
import U, { createContext as
|
|
1
|
+
import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as H, useEffect as K, useId as Gs, useMemo as ae, Suspense as rt } from "react";
|
|
3
3
|
import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
|
|
5
|
-
import { Chat as qs, useChannelStateContext as
|
|
6
|
-
import { StarIcon as Ee, DotsThreeIcon as
|
|
5
|
+
import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as is, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as qt, MessageErrorIcon as Wt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as En, MessageList as Sn, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as cs, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, ChecksIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
|
|
7
7
|
import k from "classnames";
|
|
8
|
-
import { MessageActions as
|
|
9
|
-
const us =
|
|
8
|
+
import { MessageActions as ea, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
|
|
9
|
+
const us = at({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const us = rt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), it = () => Se(us), cl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -24,10 +24,10 @@ const us = rt({
|
|
|
24
24
|
capabilities: r = {},
|
|
25
25
|
debug: i = !1
|
|
26
26
|
}) => {
|
|
27
|
-
var
|
|
27
|
+
var M, E;
|
|
28
28
|
const l = J(
|
|
29
|
-
(C, ...
|
|
30
|
-
i && console.log(`🔥 [MessagingProvider] ${C}`, ...
|
|
29
|
+
(C, ...T) => {
|
|
30
|
+
i && console.log(`🔥 [MessagingProvider] ${C}`, ...T);
|
|
31
31
|
},
|
|
32
32
|
[i]
|
|
33
33
|
);
|
|
@@ -37,37 +37,37 @@ const us = rt({
|
|
|
37
37
|
serviceConfig: !!n,
|
|
38
38
|
capabilities: Object.keys(r)
|
|
39
39
|
});
|
|
40
|
-
const [o, d] = B(null), [u, p] = B(null), [h,
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
40
|
+
const [o, d] = B(null), [u, p] = B(null), [h, f] = B(!1), [b, c] = B(!1), [w, v] = B(null), g = H(!1), x = H(null), _ = H(n);
|
|
41
|
+
_.current = n;
|
|
42
|
+
const A = H(i);
|
|
43
|
+
A.current = i;
|
|
44
|
+
const S = H({
|
|
45
45
|
userId: t == null ? void 0 : t.id,
|
|
46
46
|
apiKey: a,
|
|
47
47
|
serviceConfig: n,
|
|
48
48
|
capabilities: r
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
renderCount:
|
|
49
|
+
}), I = H(0);
|
|
50
|
+
I.current++, l("📊 RENDER INFO", {
|
|
51
|
+
renderCount: I.current,
|
|
52
52
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
53
53
|
propChanges: {
|
|
54
|
-
userChanged:
|
|
55
|
-
apiKeyChanged:
|
|
56
|
-
serviceConfigChanged:
|
|
57
|
-
capabilitiesChanged:
|
|
54
|
+
userChanged: S.current.userId !== (t == null ? void 0 : t.id),
|
|
55
|
+
apiKeyChanged: S.current.apiKey !== a,
|
|
56
|
+
serviceConfigChanged: S.current.serviceConfig !== n,
|
|
57
|
+
capabilitiesChanged: S.current.capabilities !== r
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), S.current = {
|
|
60
60
|
userId: t == null ? void 0 : t.id,
|
|
61
61
|
apiKey: a,
|
|
62
62
|
serviceConfig: n,
|
|
63
63
|
capabilities: r
|
|
64
64
|
};
|
|
65
|
-
const L =
|
|
66
|
-
a && ((
|
|
65
|
+
const L = H(null);
|
|
66
|
+
a && ((M = L.current) == null ? void 0 : M.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
|
|
67
67
|
const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
|
|
68
68
|
K(() => {
|
|
69
|
-
const C =
|
|
70
|
-
if (!a || !D || !
|
|
69
|
+
const C = I.current, T = _.current;
|
|
70
|
+
if (!a || !D || !T) {
|
|
71
71
|
l("⚠️ SERVICE INIT SKIPPED", {
|
|
72
72
|
renderCount: C,
|
|
73
73
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
@@ -78,36 +78,36 @@ const us = rt({
|
|
|
78
78
|
renderCount: C,
|
|
79
79
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
80
80
|
});
|
|
81
|
-
const
|
|
82
|
-
...
|
|
81
|
+
const F = new Hs({
|
|
82
|
+
...T,
|
|
83
83
|
apiKey: a,
|
|
84
|
-
debug:
|
|
84
|
+
debug: A.current,
|
|
85
85
|
client: D
|
|
86
86
|
});
|
|
87
|
-
x.current =
|
|
87
|
+
x.current = F, d(F), l("✅ SERVICE SET", {
|
|
88
88
|
renderCount: C,
|
|
89
|
-
serviceInstance:
|
|
89
|
+
serviceInstance: !!F
|
|
90
90
|
});
|
|
91
91
|
}, [a, D]);
|
|
92
|
-
const
|
|
92
|
+
const $ = H(null);
|
|
93
93
|
K(() => {
|
|
94
|
-
var
|
|
94
|
+
var T, F;
|
|
95
95
|
if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
96
96
|
hasService: !!o,
|
|
97
97
|
hasUser: !!t,
|
|
98
98
|
userId: t == null ? void 0 : t.id,
|
|
99
|
-
isConnecting:
|
|
99
|
+
isConnecting: g.current,
|
|
100
100
|
isConnected: h,
|
|
101
101
|
dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
|
|
102
102
|
}), !o || !t) {
|
|
103
103
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
106
|
+
if (g.current) {
|
|
107
107
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
if (((
|
|
110
|
+
if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((F = $.current) == null ? void 0 : F.userId) === t.id) {
|
|
111
111
|
l(
|
|
112
112
|
"⚠️ USER CONNECTION SKIPPED",
|
|
113
113
|
"Already connected this user with this service"
|
|
@@ -115,22 +115,22 @@ const us = rt({
|
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
(async () => {
|
|
118
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
118
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), g.current = !0, c(!0), v(null);
|
|
119
119
|
try {
|
|
120
120
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
121
|
-
const
|
|
122
|
-
p(
|
|
121
|
+
const O = await o.connectUser(t);
|
|
122
|
+
p(O), f(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
|
|
123
123
|
userId: t.id,
|
|
124
|
-
clientId:
|
|
124
|
+
clientId: O.userID
|
|
125
125
|
});
|
|
126
|
-
} catch (
|
|
127
|
-
const V =
|
|
128
|
-
|
|
126
|
+
} catch (O) {
|
|
127
|
+
const V = O instanceof Error ? O.message : "Connection failed";
|
|
128
|
+
v(V), l("❌ USER CONNECTION ERROR", {
|
|
129
129
|
userId: t.id,
|
|
130
130
|
error: V
|
|
131
131
|
});
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
c(!1), g.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
134
134
|
userId: t.id,
|
|
135
135
|
isConnected: h
|
|
136
136
|
});
|
|
@@ -139,8 +139,8 @@ const us = rt({
|
|
|
139
139
|
}, [o, t, l, h]), K(() => {
|
|
140
140
|
const C = D;
|
|
141
141
|
return () => {
|
|
142
|
-
var
|
|
143
|
-
C && (
|
|
142
|
+
var T;
|
|
143
|
+
C && ($.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
|
|
144
144
|
};
|
|
145
145
|
}, [D]);
|
|
146
146
|
const z = J(async () => {
|
|
@@ -151,32 +151,32 @@ const us = rt({
|
|
|
151
151
|
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
154
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), c(!0);
|
|
155
155
|
try {
|
|
156
156
|
l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
157
157
|
const C = await o.connectUser(t);
|
|
158
|
-
p(C),
|
|
158
|
+
p(C), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
159
159
|
} catch (C) {
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const T = C instanceof Error ? C.message : "Refresh failed";
|
|
161
|
+
v(T), l("❌ CONNECTION REFRESH ERROR", {
|
|
162
162
|
userId: t.id,
|
|
163
|
-
error:
|
|
163
|
+
error: T
|
|
164
164
|
});
|
|
165
165
|
} finally {
|
|
166
|
-
|
|
166
|
+
c(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
167
167
|
}
|
|
168
168
|
}, [o, t, l]), y = U.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
169
169
|
hasService: !!o,
|
|
170
170
|
hasClient: !!u,
|
|
171
171
|
isConnected: h,
|
|
172
|
-
isLoading:
|
|
172
|
+
isLoading: b,
|
|
173
173
|
hasError: !!w,
|
|
174
174
|
capabilitiesKeys: Object.keys(r)
|
|
175
175
|
}), {
|
|
176
176
|
service: o,
|
|
177
177
|
client: u,
|
|
178
178
|
isConnected: h,
|
|
179
|
-
isLoading:
|
|
179
|
+
isLoading: b,
|
|
180
180
|
error: w,
|
|
181
181
|
capabilities: r,
|
|
182
182
|
refreshConnection: z,
|
|
@@ -185,7 +185,7 @@ const us = rt({
|
|
|
185
185
|
o,
|
|
186
186
|
u,
|
|
187
187
|
h,
|
|
188
|
-
|
|
188
|
+
b,
|
|
189
189
|
w,
|
|
190
190
|
r,
|
|
191
191
|
z,
|
|
@@ -193,7 +193,7 @@ const us = rt({
|
|
|
193
193
|
l
|
|
194
194
|
]);
|
|
195
195
|
return l("🔄 RENDER END", {
|
|
196
|
-
renderCount:
|
|
196
|
+
renderCount: I.current,
|
|
197
197
|
willRenderChat: !!D,
|
|
198
198
|
contextValueReady: !!y
|
|
199
199
|
}), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
|
|
@@ -206,7 +206,7 @@ const us = rt({
|
|
|
206
206
|
children: e
|
|
207
207
|
}
|
|
208
208
|
) : e });
|
|
209
|
-
},
|
|
209
|
+
}, ta = () => it(), lt = (e) => {
|
|
210
210
|
var a, r;
|
|
211
211
|
const [t, n] = B(
|
|
212
212
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -228,14 +228,14 @@ const us = rt({
|
|
|
228
228
|
e.off("member.updated", i);
|
|
229
229
|
};
|
|
230
230
|
}, [e]), t;
|
|
231
|
-
},
|
|
231
|
+
}, sa = "linktree-official", na = "linktree-official-sender";
|
|
232
232
|
function Ue(e, t, n) {
|
|
233
233
|
const a = Object.values(e || {});
|
|
234
|
-
if (n ===
|
|
234
|
+
if (n === sa) {
|
|
235
235
|
const r = a.find(
|
|
236
236
|
(i) => {
|
|
237
237
|
var l;
|
|
238
|
-
return ((l = i.user) == null ? void 0 : l.id) ===
|
|
238
|
+
return ((l = i.user) == null ? void 0 : l.id) === na;
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
if (r) return r;
|
|
@@ -247,15 +247,15 @@ function Ue(e, t, n) {
|
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
|
-
const
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
251
|
+
function ra(e) {
|
|
252
|
+
return aa.test(e.trim());
|
|
253
253
|
}
|
|
254
254
|
function Kt(e, t) {
|
|
255
255
|
const n = e == null ? void 0 : e.trim();
|
|
256
|
-
return !n || t && n === t ? !1 : !
|
|
256
|
+
return !n || t && n === t ? !1 : !ra(n);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function ot(e) {
|
|
259
259
|
return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
260
260
|
}
|
|
261
261
|
const Jt = [
|
|
@@ -286,7 +286,7 @@ const Jt = [
|
|
|
286
286
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
287
287
|
// Melon
|
|
288
288
|
];
|
|
289
|
-
function
|
|
289
|
+
function ia(e) {
|
|
290
290
|
let t = 0;
|
|
291
291
|
for (let n = 0; n < e.length; n++) {
|
|
292
292
|
const a = e.charCodeAt(n);
|
|
@@ -295,12 +295,12 @@ function la(e) {
|
|
|
295
295
|
return Math.abs(t);
|
|
296
296
|
}
|
|
297
297
|
function ms(e) {
|
|
298
|
-
return Jt[
|
|
298
|
+
return Jt[ia(e) % Jt.length];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function la(e) {
|
|
301
301
|
return ms(e).emoji;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function oa(e) {
|
|
304
304
|
return ms(e).bgColor;
|
|
305
305
|
}
|
|
306
306
|
const ne = ({
|
|
@@ -312,7 +312,7 @@ const ne = ({
|
|
|
312
312
|
shape: i = "squircle",
|
|
313
313
|
dmAgentEnabled: l = !1
|
|
314
314
|
}) => {
|
|
315
|
-
const o =
|
|
315
|
+
const o = la(e), d = oa(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, b = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: b, children: t ? /* @__PURE__ */ s(
|
|
316
316
|
"img",
|
|
317
317
|
{
|
|
318
318
|
src: t,
|
|
@@ -342,7 +342,7 @@ const ne = ({
|
|
|
342
342
|
width: `${n}px`,
|
|
343
343
|
height: `${n}px`,
|
|
344
344
|
backgroundColor: t ? void 0 : d,
|
|
345
|
-
...
|
|
345
|
+
...b
|
|
346
346
|
},
|
|
347
347
|
children: [
|
|
348
348
|
r && /* @__PURE__ */ s(
|
|
@@ -362,21 +362,21 @@ const ne = ({
|
|
|
362
362
|
"bg-transparent"
|
|
363
363
|
),
|
|
364
364
|
style: {
|
|
365
|
-
...
|
|
365
|
+
...b,
|
|
366
366
|
...l && {
|
|
367
|
-
borderWidth: `${
|
|
367
|
+
borderWidth: `${f}px`,
|
|
368
368
|
borderStyle: "solid",
|
|
369
369
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
370
370
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
children:
|
|
373
|
+
children: c
|
|
374
374
|
}
|
|
375
375
|
)
|
|
376
376
|
]
|
|
377
377
|
}
|
|
378
378
|
);
|
|
379
|
-
},
|
|
379
|
+
}, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
|
|
380
380
|
channel: e,
|
|
381
381
|
participant: t,
|
|
382
382
|
showBlockParticipant: n = !0,
|
|
@@ -389,11 +389,11 @@ const ne = ({
|
|
|
389
389
|
onActionComplete: u,
|
|
390
390
|
logLabel: p = "useChannelModerationActions"
|
|
391
391
|
}) => {
|
|
392
|
-
var
|
|
393
|
-
const { service: h, debug:
|
|
392
|
+
var M;
|
|
393
|
+
const { service: h, debug: f } = it(), b = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, c = !!(a && n && h && b), [w, v] = B(!1), [g, x] = B(null), [_, A] = B(!1), [S, I] = B(!1), L = c && ((g == null ? void 0 : g.participantId) !== b || (g == null ? void 0 : g.service) !== h);
|
|
394
394
|
return K(() => {
|
|
395
|
-
if (!
|
|
396
|
-
|
|
395
|
+
if (!c || !h || !b) {
|
|
396
|
+
v(!1), x(null);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
let E = !1;
|
|
@@ -401,69 +401,69 @@ const ne = ({
|
|
|
401
401
|
try {
|
|
402
402
|
const C = await h.getBlockedUsers();
|
|
403
403
|
if (E) return;
|
|
404
|
-
|
|
404
|
+
v(
|
|
405
405
|
C.some(
|
|
406
|
-
(
|
|
406
|
+
(T) => T.blocked_user_id === b
|
|
407
407
|
)
|
|
408
408
|
);
|
|
409
409
|
} catch (C) {
|
|
410
410
|
E || console.error(`[${p}] Failed to check blocked status:`, C);
|
|
411
411
|
} finally {
|
|
412
|
-
E || x({ participantId:
|
|
412
|
+
E || x({ participantId: b, service: h });
|
|
413
413
|
}
|
|
414
414
|
})(), () => {
|
|
415
415
|
E = !0;
|
|
416
416
|
};
|
|
417
|
-
}, [
|
|
417
|
+
}, [c, h, b, p]), {
|
|
418
418
|
isParticipantBlocked: w,
|
|
419
419
|
isCheckingBlockedStatus: L,
|
|
420
|
-
isLeaving:
|
|
421
|
-
isUpdatingBlockStatus:
|
|
420
|
+
isLeaving: _,
|
|
421
|
+
isUpdatingBlockStatus: S,
|
|
422
422
|
handleLeaveConversation: async () => {
|
|
423
423
|
var E;
|
|
424
|
-
if (!
|
|
425
|
-
l == null || l(),
|
|
424
|
+
if (!_) {
|
|
425
|
+
l == null || l(), f && console.log(`[${p}] Leave conversation`, e.cid), A(!0);
|
|
426
426
|
try {
|
|
427
427
|
const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
|
|
428
428
|
await e.hide(C, !1), r && await r(e), u == null || u();
|
|
429
429
|
} catch (C) {
|
|
430
430
|
console.error(`[${p}] Failed to leave conversation`, C);
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
A(!1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
handleBlockUser: async () => {
|
|
437
|
-
var E, C,
|
|
438
|
-
if (!(
|
|
439
|
-
o == null || o(),
|
|
437
|
+
var E, C, T;
|
|
438
|
+
if (!(S || !h)) {
|
|
439
|
+
o == null || o(), f && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
|
|
440
440
|
try {
|
|
441
|
-
await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((
|
|
442
|
-
} catch (
|
|
443
|
-
console.error(`[${p}] Failed to block member`,
|
|
441
|
+
await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
|
|
442
|
+
} catch (F) {
|
|
443
|
+
console.error(`[${p}] Failed to block member`, F);
|
|
444
444
|
} finally {
|
|
445
|
-
|
|
445
|
+
I(!1);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
handleUnblockUser: async () => {
|
|
450
|
-
var E, C,
|
|
451
|
-
if (!(
|
|
452
|
-
o == null || o(),
|
|
450
|
+
var E, C, T;
|
|
451
|
+
if (!(S || !h)) {
|
|
452
|
+
o == null || o(), f && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
|
|
453
453
|
try {
|
|
454
|
-
await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((
|
|
455
|
-
} catch (
|
|
456
|
-
console.error(`[${p}] Failed to unblock member`,
|
|
454
|
+
await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
|
|
455
|
+
} catch (F) {
|
|
456
|
+
console.error(`[${p}] Failed to unblock member`, F);
|
|
457
457
|
} finally {
|
|
458
|
-
|
|
458
|
+
I(!1);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
handleReportUser: () => {
|
|
463
|
-
d == null || d(), u == null || u(), window.open(
|
|
463
|
+
d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
|
-
},
|
|
466
|
+
}, _e = ({
|
|
467
467
|
variant: e = "default",
|
|
468
468
|
className: t,
|
|
469
469
|
children: n,
|
|
@@ -480,7 +480,7 @@ const ne = ({
|
|
|
480
480
|
...a,
|
|
481
481
|
children: n
|
|
482
482
|
}
|
|
483
|
-
),
|
|
483
|
+
), tt = ({
|
|
484
484
|
channel: e,
|
|
485
485
|
participant: t,
|
|
486
486
|
showDeleteConversation: n = !0,
|
|
@@ -494,55 +494,55 @@ const ne = ({
|
|
|
494
494
|
customChannelActions: p,
|
|
495
495
|
triggerClassName: h
|
|
496
496
|
}) => {
|
|
497
|
-
const [
|
|
498
|
-
isParticipantBlocked:
|
|
497
|
+
const [f, b] = B(!1), c = H(null), w = Gs(), v = J(() => b(!1), []), {
|
|
498
|
+
isParticipantBlocked: g,
|
|
499
499
|
isCheckingBlockedStatus: x,
|
|
500
|
-
isLeaving:
|
|
501
|
-
isUpdatingBlockStatus:
|
|
502
|
-
handleLeaveConversation:
|
|
503
|
-
handleBlockUser:
|
|
500
|
+
isLeaving: _,
|
|
501
|
+
isUpdatingBlockStatus: A,
|
|
502
|
+
handleLeaveConversation: S,
|
|
503
|
+
handleBlockUser: I,
|
|
504
504
|
handleUnblockUser: L,
|
|
505
505
|
handleReportUser: D
|
|
506
|
-
} =
|
|
506
|
+
} = da({
|
|
507
507
|
channel: e,
|
|
508
508
|
participant: t,
|
|
509
509
|
showBlockParticipant: a,
|
|
510
|
-
enabled:
|
|
510
|
+
enabled: f,
|
|
511
511
|
onLeaveConversation: i,
|
|
512
512
|
onBlockParticipant: l,
|
|
513
513
|
onDeleteConversationClick: o,
|
|
514
514
|
onBlockParticipantClick: d,
|
|
515
515
|
onReportParticipantClick: u,
|
|
516
|
-
onActionComplete:
|
|
516
|
+
onActionComplete: v,
|
|
517
517
|
logLabel: "ChannelActionsMenu"
|
|
518
518
|
});
|
|
519
519
|
return K(() => {
|
|
520
|
-
if (!
|
|
521
|
-
const z = (
|
|
522
|
-
|
|
523
|
-
}, y = (
|
|
524
|
-
|
|
520
|
+
if (!f) return;
|
|
521
|
+
const z = (M) => {
|
|
522
|
+
c.current && !c.current.contains(M.target) && b(!1);
|
|
523
|
+
}, y = (M) => {
|
|
524
|
+
M.key === "Escape" && b(!1);
|
|
525
525
|
};
|
|
526
526
|
return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
|
|
527
527
|
document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
|
|
528
528
|
};
|
|
529
|
-
}, [
|
|
529
|
+
}, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: c, className: "relative", children: [
|
|
530
530
|
/* @__PURE__ */ m(
|
|
531
531
|
"button",
|
|
532
532
|
{
|
|
533
533
|
className: h,
|
|
534
534
|
type: "button",
|
|
535
535
|
"aria-haspopup": "true",
|
|
536
|
-
"aria-expanded":
|
|
537
|
-
"aria-controls":
|
|
538
|
-
onClick: () =>
|
|
536
|
+
"aria-expanded": f,
|
|
537
|
+
"aria-controls": f ? w : void 0,
|
|
538
|
+
onClick: () => b((z) => !z),
|
|
539
539
|
children: [
|
|
540
|
-
/* @__PURE__ */ s(
|
|
540
|
+
/* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
|
|
541
541
|
/* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
|
|
542
542
|
]
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
|
-
|
|
545
|
+
f && /* @__PURE__ */ s(
|
|
546
546
|
"div",
|
|
547
547
|
{
|
|
548
548
|
id: w,
|
|
@@ -553,13 +553,13 @@ const ne = ({
|
|
|
553
553
|
),
|
|
554
554
|
children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
|
|
555
555
|
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
556
|
-
|
|
556
|
+
_e,
|
|
557
557
|
{
|
|
558
|
-
onClick:
|
|
559
|
-
disabled:
|
|
560
|
-
"aria-busy":
|
|
558
|
+
onClick: S,
|
|
559
|
+
disabled: _,
|
|
560
|
+
"aria-busy": _,
|
|
561
561
|
children: [
|
|
562
|
-
|
|
562
|
+
_ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
|
|
563
563
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
@@ -567,34 +567,34 @@ const ne = ({
|
|
|
567
567
|
a && /* @__PURE__ */ s("li", { children: x ? (
|
|
568
568
|
// Block status not yet resolved — show a disabled placeholder
|
|
569
569
|
// so a premature click can't act on a stale block state.
|
|
570
|
-
/* @__PURE__ */ m(
|
|
570
|
+
/* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
|
|
571
571
|
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
572
572
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
573
573
|
] })
|
|
574
|
-
) :
|
|
575
|
-
|
|
574
|
+
) : g ? /* @__PURE__ */ m(
|
|
575
|
+
_e,
|
|
576
576
|
{
|
|
577
577
|
onClick: L,
|
|
578
|
-
disabled:
|
|
579
|
-
"aria-busy":
|
|
578
|
+
disabled: A,
|
|
579
|
+
"aria-busy": A,
|
|
580
580
|
children: [
|
|
581
|
-
|
|
581
|
+
A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
|
|
582
582
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
) : /* @__PURE__ */ m(
|
|
586
|
-
|
|
586
|
+
_e,
|
|
587
587
|
{
|
|
588
|
-
onClick:
|
|
589
|
-
disabled:
|
|
590
|
-
"aria-busy":
|
|
588
|
+
onClick: I,
|
|
589
|
+
disabled: A,
|
|
590
|
+
"aria-busy": A,
|
|
591
591
|
children: [
|
|
592
|
-
|
|
592
|
+
A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
|
|
593
593
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
594
594
|
]
|
|
595
595
|
}
|
|
596
596
|
) }),
|
|
597
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
|
|
597
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: D, children: [
|
|
598
598
|
/* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
600
600
|
] }) }),
|
|
@@ -603,10 +603,10 @@ const ne = ({
|
|
|
603
603
|
}
|
|
604
604
|
)
|
|
605
605
|
] });
|
|
606
|
-
}, We = "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",
|
|
606
|
+
}, We = "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", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
|
|
607
607
|
const t = e;
|
|
608
|
-
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(
|
|
609
|
-
},
|
|
608
|
+
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
|
|
609
|
+
}, ga = ({
|
|
610
610
|
onBack: e,
|
|
611
611
|
showBackButton: t,
|
|
612
612
|
showStarButton: n = !1,
|
|
@@ -619,25 +619,25 @@ const ne = ({
|
|
|
619
619
|
onDeleteConversationClick: u,
|
|
620
620
|
onBlockParticipantClick: p,
|
|
621
621
|
onReportParticipantClick: h,
|
|
622
|
-
customChannelActions:
|
|
623
|
-
renderChannelActions:
|
|
624
|
-
showChannelInfo:
|
|
622
|
+
customChannelActions: f,
|
|
623
|
+
renderChannelActions: b,
|
|
624
|
+
showChannelInfo: c = !0,
|
|
625
625
|
onParticipantNameClick: w
|
|
626
626
|
}) => {
|
|
627
|
-
var D,
|
|
628
|
-
const { channel:
|
|
627
|
+
var D, $, z;
|
|
628
|
+
const { channel: v } = ue(), { client: g } = me(), x = U.useMemo(
|
|
629
629
|
() => {
|
|
630
630
|
var y;
|
|
631
631
|
return Ue(
|
|
632
|
-
(y =
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
(y = v.state) == null ? void 0 : y.members,
|
|
633
|
+
g == null ? void 0 : g.userID,
|
|
634
|
+
v.type
|
|
635
635
|
);
|
|
636
636
|
},
|
|
637
|
-
[(D =
|
|
638
|
-
),
|
|
637
|
+
[(D = v.state) == null ? void 0 : D.members, g == null ? void 0 : g.userID, v.type]
|
|
638
|
+
), _ = ot(x == null ? void 0 : x.user), A = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, S = lt(v), I = fa(x), L = async () => {
|
|
639
639
|
try {
|
|
640
|
-
|
|
640
|
+
S ? await v.unpin() : await v.pin();
|
|
641
641
|
} catch (y) {
|
|
642
642
|
console.error(
|
|
643
643
|
"[ChannelHeaderRedesign] Failed to update pinned status:",
|
|
@@ -657,7 +657,7 @@ const ne = ({
|
|
|
657
657
|
}),
|
|
658
658
|
type: "button",
|
|
659
659
|
"aria-label": "Back to conversations",
|
|
660
|
-
children: /* @__PURE__ */ s(
|
|
660
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
661
661
|
}
|
|
662
662
|
) }),
|
|
663
663
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
|
|
@@ -665,15 +665,15 @@ const ne = ({
|
|
|
665
665
|
{
|
|
666
666
|
type: "button",
|
|
667
667
|
onClick: w,
|
|
668
|
-
"aria-label": `View details for ${
|
|
668
|
+
"aria-label": `View details for ${_}`,
|
|
669
669
|
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
670
670
|
children: [
|
|
671
671
|
/* @__PURE__ */ s(
|
|
672
672
|
ne,
|
|
673
673
|
{
|
|
674
|
-
id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) ||
|
|
675
|
-
name:
|
|
676
|
-
image:
|
|
674
|
+
id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || v.id || "unknown",
|
|
675
|
+
name: _,
|
|
676
|
+
image: A,
|
|
677
677
|
dmAgentEnabled: a,
|
|
678
678
|
shape: "circle",
|
|
679
679
|
size: 48,
|
|
@@ -682,17 +682,17 @@ const ne = ({
|
|
|
682
682
|
),
|
|
683
683
|
/* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
|
|
684
684
|
/* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
685
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children:
|
|
685
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: _ }),
|
|
686
686
|
/* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
|
|
687
|
-
|
|
687
|
+
I && /* @__PURE__ */ s(
|
|
688
688
|
"span",
|
|
689
689
|
{
|
|
690
690
|
"aria-label": "Paid customer",
|
|
691
691
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
692
|
-
children: /* @__PURE__ */ s(
|
|
692
|
+
children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
|
|
693
693
|
}
|
|
694
694
|
),
|
|
695
|
-
n &&
|
|
695
|
+
n && S && /* @__PURE__ */ s(
|
|
696
696
|
"span",
|
|
697
697
|
{
|
|
698
698
|
"aria-label": "Starred conversation",
|
|
@@ -712,7 +712,7 @@ const ne = ({
|
|
|
712
712
|
] }),
|
|
713
713
|
a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
714
714
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
715
|
-
/* @__PURE__ */ s("span", { children:
|
|
715
|
+
/* @__PURE__ */ s("span", { children: ma })
|
|
716
716
|
] })
|
|
717
717
|
] })
|
|
718
718
|
]
|
|
@@ -725,24 +725,24 @@ const ne = ({
|
|
|
725
725
|
className: We,
|
|
726
726
|
onClick: L,
|
|
727
727
|
type: "button",
|
|
728
|
-
"aria-pressed":
|
|
729
|
-
"aria-label":
|
|
728
|
+
"aria-pressed": S,
|
|
729
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
730
730
|
children: /* @__PURE__ */ s(
|
|
731
731
|
Ee,
|
|
732
732
|
{
|
|
733
733
|
className: k("size-5", {
|
|
734
|
-
"text-[#FFD60A]":
|
|
735
|
-
"text-black/90": !
|
|
734
|
+
"text-[#FFD60A]": S,
|
|
735
|
+
"text-black/90": !S
|
|
736
736
|
}),
|
|
737
|
-
weight:
|
|
737
|
+
weight: S ? "fill" : "regular"
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
c && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
743
|
+
tt,
|
|
744
744
|
{
|
|
745
|
-
channel:
|
|
745
|
+
channel: v,
|
|
746
746
|
participant: x,
|
|
747
747
|
showDeleteConversation: l,
|
|
748
748
|
showBlockParticipant: o,
|
|
@@ -752,26 +752,26 @@ const ne = ({
|
|
|
752
752
|
onDeleteConversationClick: u,
|
|
753
753
|
onBlockParticipantClick: p,
|
|
754
754
|
onReportParticipantClick: h,
|
|
755
|
-
customChannelActions:
|
|
755
|
+
customChannelActions: f,
|
|
756
756
|
triggerClassName: We
|
|
757
757
|
}
|
|
758
758
|
))
|
|
759
759
|
] })
|
|
760
760
|
] }) });
|
|
761
|
-
},
|
|
762
|
-
function
|
|
763
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
761
|
+
}, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
|
|
762
|
+
function ba(e) {
|
|
763
|
+
return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
const { channel: t } =
|
|
767
|
-
() =>
|
|
765
|
+
function va(e) {
|
|
766
|
+
const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
|
|
767
|
+
() => ba(e.own_reactions),
|
|
768
768
|
[e.own_reactions]
|
|
769
769
|
), r = J(async () => {
|
|
770
770
|
if (n != null && n.userID)
|
|
771
771
|
try {
|
|
772
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
772
|
+
a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
|
|
773
773
|
e.id,
|
|
774
|
-
{ type:
|
|
774
|
+
{ type: st },
|
|
775
775
|
{ enforce_unique: !0, skip_push: !0 }
|
|
776
776
|
);
|
|
777
777
|
} catch {
|
|
@@ -779,9 +779,9 @@ function xa(e) {
|
|
|
779
779
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
|
|
780
780
|
if (n != null && n.userID)
|
|
781
781
|
try {
|
|
782
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
782
|
+
a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
|
|
783
783
|
e.id,
|
|
784
|
-
{ type:
|
|
784
|
+
{ type: nt },
|
|
785
785
|
{ enforce_unique: !0, skip_push: !0 }
|
|
786
786
|
);
|
|
787
787
|
} catch {
|
|
@@ -789,7 +789,7 @@ function xa(e) {
|
|
|
789
789
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
790
790
|
return { selected: a, voteUp: r, voteDown: i };
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function xa(e) {
|
|
793
793
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
794
794
|
}
|
|
795
795
|
function hs({
|
|
@@ -797,16 +797,16 @@ function hs({
|
|
|
797
797
|
viewerLanguage: t
|
|
798
798
|
}) {
|
|
799
799
|
var r;
|
|
800
|
-
const n = e == null ? void 0 : e.text, a =
|
|
800
|
+
const n = e == null ? void 0 : e.text, a = xa(t);
|
|
801
801
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
802
802
|
}
|
|
803
|
-
const
|
|
803
|
+
const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import("./Card-Ca5OtJh6.js")), Na = U.lazy(() => import("./Card-CZDLISxS.js")), ct = () => /* @__PURE__ */ s(
|
|
804
804
|
"div",
|
|
805
805
|
{
|
|
806
806
|
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)]",
|
|
807
807
|
"aria-hidden": !0
|
|
808
808
|
}
|
|
809
|
-
),
|
|
809
|
+
), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), gs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = fs, Ca = gs, Zt = { Composer: ya, Sent: fs, Received: gs, Creator: ka, Visitor: Ca }, Ea = [
|
|
810
810
|
[/pdf/, "pdf"],
|
|
811
811
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
812
812
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -816,7 +816,7 @@ const _a = U.lazy(() => import("./Card-iGNcxybY.js")), Na = U.lazy(() => import(
|
|
|
816
816
|
[/plain|rtf/, "text"],
|
|
817
817
|
[/markdown/, "markdown"]
|
|
818
818
|
];
|
|
819
|
-
function
|
|
819
|
+
function oe(e) {
|
|
820
820
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
821
821
|
}
|
|
822
822
|
function ps(e) {
|
|
@@ -825,33 +825,33 @@ function ps(e) {
|
|
|
825
825
|
);
|
|
826
826
|
return t ? t[1] : "generic";
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const Sa = {
|
|
829
829
|
video: cs,
|
|
830
|
-
audio:
|
|
830
|
+
audio: Dn,
|
|
831
831
|
image: Ln,
|
|
832
832
|
document: os
|
|
833
|
-
},
|
|
834
|
-
pdf:
|
|
835
|
-
doc:
|
|
836
|
-
xls:
|
|
837
|
-
csv:
|
|
838
|
-
ppt:
|
|
839
|
-
zip:
|
|
840
|
-
text:
|
|
841
|
-
markdown:
|
|
833
|
+
}, Ia = {
|
|
834
|
+
pdf: Un,
|
|
835
|
+
doc: Bn,
|
|
836
|
+
xls: jn,
|
|
837
|
+
csv: $n,
|
|
838
|
+
ppt: On,
|
|
839
|
+
zip: Fn,
|
|
840
|
+
text: Pn,
|
|
841
|
+
markdown: zn,
|
|
842
842
|
generic: os
|
|
843
843
|
};
|
|
844
|
-
function
|
|
845
|
-
const t =
|
|
846
|
-
return t !== "document" ?
|
|
844
|
+
function Ta(e) {
|
|
845
|
+
const t = oe(e);
|
|
846
|
+
return t !== "document" ? Sa[t] : Ia[ps(e)];
|
|
847
847
|
}
|
|
848
848
|
function we(e, t) {
|
|
849
|
-
return U.createElement(
|
|
849
|
+
return U.createElement(Ta(e), t);
|
|
850
850
|
}
|
|
851
|
-
const
|
|
851
|
+
const Aa = (e) => {
|
|
852
852
|
var t, n;
|
|
853
853
|
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;
|
|
854
|
-
},
|
|
854
|
+
}, Ma = ({
|
|
855
855
|
source: e,
|
|
856
856
|
mimeType: t,
|
|
857
857
|
poster: n,
|
|
@@ -863,74 +863,74 @@ const Ma = (e) => {
|
|
|
863
863
|
muted: d = !1,
|
|
864
864
|
onContainerClick: u
|
|
865
865
|
}) => {
|
|
866
|
-
const p =
|
|
867
|
-
D(!1),
|
|
868
|
-
}, []),
|
|
869
|
-
const R =
|
|
866
|
+
const p = oe(t), h = H(null), f = H(null), b = H(null), c = H(r), [w, v] = B(a), [g, x] = B(0), [_, A] = B(!1), [S, I] = B(!1), [L, D] = B(!1), [$, z] = B(!1), [y, M] = B(!0), [E, C] = B(null), T = J(() => {
|
|
867
|
+
D(!1), v(!0);
|
|
868
|
+
}, []), F = J((N) => {
|
|
869
|
+
const R = f.current;
|
|
870
870
|
if (!R) return 0;
|
|
871
|
-
const
|
|
871
|
+
const G = R.getBoundingClientRect();
|
|
872
872
|
return Math.max(
|
|
873
873
|
0,
|
|
874
|
-
Math.min(1, (
|
|
874
|
+
Math.min(1, (Aa(N) - G.left) / G.width)
|
|
875
875
|
);
|
|
876
|
-
}, []),
|
|
876
|
+
}, []), O = J((N) => {
|
|
877
877
|
const R = h.current;
|
|
878
|
-
R && R.duration && (R.currentTime =
|
|
879
|
-
}, []), V = (
|
|
880
|
-
|
|
881
|
-
const R =
|
|
882
|
-
x(R),
|
|
878
|
+
R && R.duration && (R.currentTime = N * R.duration);
|
|
879
|
+
}, []), V = (N) => {
|
|
880
|
+
N.stopPropagation(), A(!0);
|
|
881
|
+
const R = F(N);
|
|
882
|
+
x(R), O(R);
|
|
883
883
|
};
|
|
884
884
|
K(() => {
|
|
885
|
-
r !== void 0 && r !==
|
|
885
|
+
r !== void 0 && r !== c.current && (c.current = r, v(r));
|
|
886
886
|
}, [r]), K(() => {
|
|
887
887
|
if (!w) {
|
|
888
|
-
|
|
888
|
+
b.current !== null && (cancelAnimationFrame(b.current), b.current = null);
|
|
889
889
|
return;
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const N = () => {
|
|
892
892
|
const R = h.current;
|
|
893
|
-
R && R.duration && !
|
|
893
|
+
R && R.duration && !_ && x(R.currentTime / R.duration), b.current = requestAnimationFrame(N);
|
|
894
894
|
};
|
|
895
|
-
return
|
|
896
|
-
|
|
895
|
+
return b.current = requestAnimationFrame(N), () => {
|
|
896
|
+
b.current !== null && cancelAnimationFrame(b.current);
|
|
897
897
|
};
|
|
898
|
-
}, [w,
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}) :
|
|
898
|
+
}, [w, _]), K(() => {
|
|
899
|
+
const N = h.current;
|
|
900
|
+
N && (w ? N.play().catch((R) => {
|
|
901
|
+
v(!1), D(!0);
|
|
902
|
+
}) : N.pause());
|
|
903
903
|
}, [w]), K(() => {
|
|
904
|
-
if (!
|
|
905
|
-
const
|
|
906
|
-
|
|
904
|
+
if (!_) return;
|
|
905
|
+
const N = (G) => x(F(G)), R = (G) => {
|
|
906
|
+
A(!1), O(F(G));
|
|
907
907
|
};
|
|
908
|
-
return window.addEventListener("mousemove",
|
|
909
|
-
window.removeEventListener("mousemove",
|
|
908
|
+
return window.addEventListener("mousemove", N), window.addEventListener("mouseup", R), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", R), () => {
|
|
909
|
+
window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", R);
|
|
910
910
|
};
|
|
911
|
-
}, [
|
|
912
|
-
const
|
|
911
|
+
}, [_, F, O]);
|
|
912
|
+
const Z = E ? { aspectRatio: String(E) } : void 0, ee = E ? "" : " aspect-video", X = Math.round(g * 100);
|
|
913
913
|
return /* @__PURE__ */ m(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
916
916
|
role: "button",
|
|
917
917
|
tabIndex: 0,
|
|
918
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
919
|
-
style:
|
|
920
|
-
onClick: (
|
|
918
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
|
|
919
|
+
style: Z,
|
|
920
|
+
onClick: (N) => {
|
|
921
921
|
if (u) {
|
|
922
|
-
u(
|
|
922
|
+
u(N);
|
|
923
923
|
return;
|
|
924
924
|
}
|
|
925
|
-
L || l &&
|
|
925
|
+
L || l && v((R) => !R);
|
|
926
926
|
},
|
|
927
|
-
onKeyDown: (
|
|
928
|
-
if (!(
|
|
929
|
-
if (
|
|
930
|
-
u(
|
|
927
|
+
onKeyDown: (N) => {
|
|
928
|
+
if (!(N.key !== "Enter" && N.key !== " ")) {
|
|
929
|
+
if (N.preventDefault(), u) {
|
|
930
|
+
u(N);
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
L || l &&
|
|
933
|
+
L || l && v((R) => !R);
|
|
934
934
|
}
|
|
935
935
|
},
|
|
936
936
|
children: [
|
|
@@ -956,12 +956,12 @@ const Ma = (e) => {
|
|
|
956
956
|
style: { width: "100%", height: "100%" },
|
|
957
957
|
onLoadStart: () => z(!0),
|
|
958
958
|
onCanPlay: () => {
|
|
959
|
-
z(!1),
|
|
959
|
+
z(!1), M(!1);
|
|
960
960
|
},
|
|
961
961
|
onWaiting: () => z(!0),
|
|
962
962
|
onPlay: () => D(!1),
|
|
963
963
|
onEnded: () => {
|
|
964
|
-
i || (
|
|
964
|
+
i || (v(!1), x(0));
|
|
965
965
|
},
|
|
966
966
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
967
967
|
}
|
|
@@ -976,22 +976,22 @@ const Ma = (e) => {
|
|
|
976
976
|
style: { width: "100%", height: "100%" },
|
|
977
977
|
onLoadStart: () => z(!0),
|
|
978
978
|
onCanPlay: () => {
|
|
979
|
-
z(!1),
|
|
979
|
+
z(!1), M(!1);
|
|
980
980
|
},
|
|
981
981
|
onWaiting: () => z(!0),
|
|
982
982
|
onPlay: () => D(!1),
|
|
983
983
|
onLoadedMetadata: () => {
|
|
984
|
-
const
|
|
985
|
-
|
|
984
|
+
const N = h.current;
|
|
985
|
+
N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
|
|
986
986
|
},
|
|
987
987
|
onEnded: () => {
|
|
988
|
-
i || (
|
|
988
|
+
i || (v(!1), x(0));
|
|
989
989
|
},
|
|
990
990
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
991
991
|
}
|
|
992
992
|
) }),
|
|
993
|
-
|
|
994
|
-
|
|
993
|
+
$ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
|
|
994
|
+
ke,
|
|
995
995
|
{
|
|
996
996
|
className: "size-8 animate-spin text-white/80",
|
|
997
997
|
weight: "bold"
|
|
@@ -1004,13 +1004,13 @@ const Ma = (e) => {
|
|
|
1004
1004
|
role: "button",
|
|
1005
1005
|
tabIndex: 0,
|
|
1006
1006
|
"aria-label": "Play preview",
|
|
1007
|
-
onClick: (
|
|
1008
|
-
|
|
1007
|
+
onClick: (N) => {
|
|
1008
|
+
N.stopPropagation(), T();
|
|
1009
1009
|
},
|
|
1010
|
-
onKeyDown: (
|
|
1011
|
-
|
|
1010
|
+
onKeyDown: (N) => {
|
|
1011
|
+
N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), T());
|
|
1012
1012
|
},
|
|
1013
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1013
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1014
1014
|
}
|
|
1015
1015
|
),
|
|
1016
1016
|
o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1022,13 +1022,13 @@ const Ma = (e) => {
|
|
|
1022
1022
|
"aria-valuemin": 0,
|
|
1023
1023
|
"aria-valuemax": 100,
|
|
1024
1024
|
tabIndex: 0,
|
|
1025
|
-
ref:
|
|
1025
|
+
ref: f,
|
|
1026
1026
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1027
1027
|
onMouseDown: V,
|
|
1028
1028
|
onTouchStart: V,
|
|
1029
|
-
onClick: (
|
|
1030
|
-
onKeyDown: (
|
|
1031
|
-
|
|
1029
|
+
onClick: (N) => N.stopPropagation(),
|
|
1030
|
+
onKeyDown: (N) => {
|
|
1031
|
+
N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
|
|
1032
1032
|
},
|
|
1033
1033
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1034
1034
|
"div",
|
|
@@ -1044,12 +1044,12 @@ const Ma = (e) => {
|
|
|
1044
1044
|
"button",
|
|
1045
1045
|
{
|
|
1046
1046
|
type: "button",
|
|
1047
|
-
onClick: (
|
|
1048
|
-
|
|
1047
|
+
onClick: (N) => {
|
|
1048
|
+
N.stopPropagation(), v((R) => !R);
|
|
1049
1049
|
},
|
|
1050
1050
|
className: "shrink-0 text-white",
|
|
1051
1051
|
"aria-label": w ? "Pause" : "Play",
|
|
1052
|
-
children: w ? /* @__PURE__ */ s(
|
|
1052
|
+
children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1053
1053
|
}
|
|
1054
1054
|
),
|
|
1055
1055
|
/* @__PURE__ */ m(
|
|
@@ -1061,21 +1061,21 @@ const Ma = (e) => {
|
|
|
1061
1061
|
"aria-valuemin": 0,
|
|
1062
1062
|
"aria-valuemax": 100,
|
|
1063
1063
|
tabIndex: 0,
|
|
1064
|
-
ref:
|
|
1064
|
+
ref: f,
|
|
1065
1065
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1066
1066
|
onMouseDown: V,
|
|
1067
1067
|
onTouchStart: V,
|
|
1068
|
-
onClick: (
|
|
1069
|
-
onMouseEnter: () =>
|
|
1070
|
-
onMouseLeave: () =>
|
|
1071
|
-
onKeyDown: (
|
|
1072
|
-
|
|
1068
|
+
onClick: (N) => N.stopPropagation(),
|
|
1069
|
+
onMouseEnter: () => I(!0),
|
|
1070
|
+
onMouseLeave: () => I(!1),
|
|
1071
|
+
onKeyDown: (N) => {
|
|
1072
|
+
N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
|
|
1073
1073
|
},
|
|
1074
1074
|
children: [
|
|
1075
1075
|
/* @__PURE__ */ s(
|
|
1076
1076
|
"div",
|
|
1077
1077
|
{
|
|
1078
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1078
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || _ ? "h-1.5" : "h-1"}`,
|
|
1079
1079
|
children: /* @__PURE__ */ s(
|
|
1080
1080
|
"div",
|
|
1081
1081
|
{
|
|
@@ -1088,7 +1088,7 @@ const Ma = (e) => {
|
|
|
1088
1088
|
/* @__PURE__ */ s(
|
|
1089
1089
|
"div",
|
|
1090
1090
|
{
|
|
1091
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1091
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1092
1092
|
style: { left: `${X}%` }
|
|
1093
1093
|
}
|
|
1094
1094
|
)
|
|
@@ -1099,7 +1099,7 @@ const Ma = (e) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
|
-
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
1102
|
+
}, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
|
|
1103
1103
|
mimeType: e,
|
|
1104
1104
|
sourceUrl: t,
|
|
1105
1105
|
thumbnailUrl: n,
|
|
@@ -1108,9 +1108,9 @@ const Ma = (e) => {
|
|
|
1108
1108
|
mediaPlayerProps: i,
|
|
1109
1109
|
containedImage: l = !1
|
|
1110
1110
|
}) => {
|
|
1111
|
-
const o =
|
|
1111
|
+
const o = oe(e), [d, u] = B(!1);
|
|
1112
1112
|
return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
|
|
1113
|
-
|
|
1113
|
+
Ma,
|
|
1114
1114
|
{
|
|
1115
1115
|
source: t,
|
|
1116
1116
|
mimeType: e,
|
|
@@ -1161,7 +1161,7 @@ const Ma = (e) => {
|
|
|
1161
1161
|
weight: "regular"
|
|
1162
1162
|
})
|
|
1163
1163
|
}
|
|
1164
|
-
) : n ? /* @__PURE__ */ s("div", { className: `relative ${
|
|
1164
|
+
) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
|
|
1165
1165
|
"img",
|
|
1166
1166
|
{
|
|
1167
1167
|
src: n,
|
|
@@ -1193,7 +1193,7 @@ const Ma = (e) => {
|
|
|
1193
1193
|
rootRef: p,
|
|
1194
1194
|
"data-testid": h
|
|
1195
1195
|
}) => {
|
|
1196
|
-
const
|
|
1196
|
+
const f = e === "dark", b = f ? n ?? a : n ?? "", c = f && !n;
|
|
1197
1197
|
return /* @__PURE__ */ m(
|
|
1198
1198
|
"div",
|
|
1199
1199
|
{
|
|
@@ -1201,29 +1201,29 @@ const Ma = (e) => {
|
|
|
1201
1201
|
"data-testid": h,
|
|
1202
1202
|
className: k(
|
|
1203
1203
|
"relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
1204
|
-
|
|
1204
|
+
f ? "bg-[#121110]" : "bg-white"
|
|
1205
1205
|
),
|
|
1206
1206
|
children: [
|
|
1207
1207
|
d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
1208
1208
|
u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
|
|
1209
1209
|
t,
|
|
1210
1210
|
/* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
|
|
1211
|
-
|
|
1211
|
+
b.trim() !== "" && /* @__PURE__ */ s(
|
|
1212
1212
|
"p",
|
|
1213
1213
|
{
|
|
1214
1214
|
className: k("mb-0.5 truncate text-base font-medium", {
|
|
1215
|
-
"text-black": !
|
|
1216
|
-
"text-white/30":
|
|
1217
|
-
"text-white":
|
|
1215
|
+
"text-black": !f,
|
|
1216
|
+
"text-white/30": f && c,
|
|
1217
|
+
"text-white": f && !c
|
|
1218
1218
|
}),
|
|
1219
|
-
children:
|
|
1219
|
+
children: b
|
|
1220
1220
|
}
|
|
1221
1221
|
),
|
|
1222
1222
|
/* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1223
1223
|
we(r, {
|
|
1224
1224
|
className: k(
|
|
1225
1225
|
"size-5 shrink-0",
|
|
1226
|
-
|
|
1226
|
+
f ? "text-white/55" : "text-black/55"
|
|
1227
1227
|
),
|
|
1228
1228
|
weight: "regular"
|
|
1229
1229
|
}),
|
|
@@ -1232,7 +1232,7 @@ const Ma = (e) => {
|
|
|
1232
1232
|
{
|
|
1233
1233
|
className: k(
|
|
1234
1234
|
"text-xs font-medium",
|
|
1235
|
-
|
|
1235
|
+
f ? "text-white/55" : "text-black/55"
|
|
1236
1236
|
),
|
|
1237
1237
|
children: i
|
|
1238
1238
|
}
|
|
@@ -1248,25 +1248,25 @@ const Ma = (e) => {
|
|
|
1248
1248
|
function xs(e) {
|
|
1249
1249
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function dt(e) {
|
|
1252
1252
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1253
1253
|
}
|
|
1254
1254
|
function La(e) {
|
|
1255
1255
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Da(e) {
|
|
1258
1258
|
return e ? "text-white" : "text-black";
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function za(e) {
|
|
1261
1261
|
return e ? "text-white/55" : "text-black/55";
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Pa(e) {
|
|
1264
1264
|
return e ? "text-white/40" : "text-black/40";
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1266
|
+
function Fa(e) {
|
|
1267
1267
|
return e ? "text-white/20" : "text-black/20";
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const ut = ({ attachment: e, isMyMessage: t }) => {
|
|
1270
1270
|
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1271
1271
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1272
1272
|
"img",
|
|
@@ -1279,13 +1279,13 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1279
1279
|
"div",
|
|
1280
1280
|
{
|
|
1281
1281
|
className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
|
|
1282
|
-
children: /* @__PURE__ */ s(
|
|
1282
|
+
children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
|
|
1283
1283
|
}
|
|
1284
1284
|
) }),
|
|
1285
1285
|
/* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
|
|
1286
|
-
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1287
|
-
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${
|
|
1288
|
-
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1286
|
+
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Da(t)}`, children: n }),
|
|
1287
|
+
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
|
|
1288
|
+
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
|
|
1289
1289
|
] })
|
|
1290
1290
|
] });
|
|
1291
1291
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
|
|
@@ -1293,11 +1293,11 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1293
1293
|
function ws(e) {
|
|
1294
1294
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function mt(e) {
|
|
1297
1297
|
var t;
|
|
1298
1298
|
return (t = e.attachments) == null ? void 0 : t.find(ws);
|
|
1299
1299
|
}
|
|
1300
|
-
async function
|
|
1300
|
+
async function Oa(e, t) {
|
|
1301
1301
|
let n;
|
|
1302
1302
|
try {
|
|
1303
1303
|
n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1309,7 +1309,7 @@ async function $a(e, t) {
|
|
|
1309
1309
|
const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
|
|
1310
1310
|
l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1312
|
+
const $a = ({
|
|
1313
1313
|
url: e,
|
|
1314
1314
|
filename: t
|
|
1315
1315
|
}) => {
|
|
@@ -1321,7 +1321,7 @@ const ja = ({
|
|
|
1321
1321
|
onClick: (i) => {
|
|
1322
1322
|
i.stopPropagation();
|
|
1323
1323
|
const l = window.open("", "_blank", "noopener,noreferrer");
|
|
1324
|
-
a(!0),
|
|
1324
|
+
a(!0), Oa(e, t).then(() => {
|
|
1325
1325
|
l == null || l.close();
|
|
1326
1326
|
}).catch(() => {
|
|
1327
1327
|
l && (l.location.href = e);
|
|
@@ -1329,22 +1329,22 @@ const ja = ({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
disabled: n,
|
|
1331
1331
|
className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
|
|
1332
|
-
children: n ? /* @__PURE__ */ s(
|
|
1333
|
-
/* @__PURE__ */ s(
|
|
1332
|
+
children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
|
|
1333
|
+
/* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
|
|
1334
1334
|
"Download"
|
|
1335
1335
|
] })
|
|
1336
1336
|
}
|
|
1337
1337
|
);
|
|
1338
1338
|
};
|
|
1339
|
-
function
|
|
1340
|
-
var h,
|
|
1339
|
+
function ht(e) {
|
|
1340
|
+
var h, f, b, c;
|
|
1341
1341
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1342
1342
|
(w) => w.type === "video" && w.asset_url
|
|
1343
|
-
), n = (
|
|
1343
|
+
), n = (f = e.attachments) == null ? void 0 : f.find(
|
|
1344
1344
|
(w) => w.type === "image" && w.image_url
|
|
1345
|
-
), a = (
|
|
1345
|
+
), a = (b = e.attachments) == null ? void 0 : b.find(
|
|
1346
1346
|
(w) => w.type === "audio" && w.asset_url
|
|
1347
|
-
), r = (
|
|
1347
|
+
), r = (c = e.attachments) == null ? void 0 : c.find(
|
|
1348
1348
|
(w) => w.type === "file" && w.asset_url
|
|
1349
1349
|
), i = t ?? n ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1350
1350
|
if (!l) return null;
|
|
@@ -1392,7 +1392,7 @@ const _s = ({
|
|
|
1392
1392
|
fileSize: a,
|
|
1393
1393
|
thumbnailUrl: r
|
|
1394
1394
|
}) => {
|
|
1395
|
-
const i =
|
|
1395
|
+
const i = oe(t), l = a !== void 0 ? xs(a) : void 0;
|
|
1396
1396
|
return /* @__PURE__ */ s(
|
|
1397
1397
|
vs,
|
|
1398
1398
|
{
|
|
@@ -1411,14 +1411,14 @@ const _s = ({
|
|
|
1411
1411
|
containedImage: i === "image" || i === "document"
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
1414
|
-
action: /* @__PURE__ */ s(
|
|
1414
|
+
action: /* @__PURE__ */ s($a, { url: e, filename: n })
|
|
1415
1415
|
}
|
|
1416
1416
|
);
|
|
1417
|
-
},
|
|
1417
|
+
}, ja = ({
|
|
1418
1418
|
message: e,
|
|
1419
1419
|
isMyMessage: t = !1
|
|
1420
1420
|
}) => {
|
|
1421
|
-
const n =
|
|
1421
|
+
const n = mt(e), a = ht(e);
|
|
1422
1422
|
return !n && !a ? null : /* @__PURE__ */ m("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: [
|
|
1423
1423
|
!t && e.user && /* @__PURE__ */ s(
|
|
1424
1424
|
ne,
|
|
@@ -1439,41 +1439,41 @@ const _s = ({
|
|
|
1439
1439
|
{
|
|
1440
1440
|
className: "str-chat__message-bubble",
|
|
1441
1441
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1442
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1442
|
+
children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
|
|
1443
1443
|
}
|
|
1444
1444
|
) })
|
|
1445
1445
|
}
|
|
1446
1446
|
)
|
|
1447
1447
|
] });
|
|
1448
|
-
},
|
|
1448
|
+
}, Ba = ({
|
|
1449
1449
|
message: e
|
|
1450
1450
|
}) => {
|
|
1451
|
-
const t =
|
|
1451
|
+
const t = mt(e);
|
|
1452
1452
|
if (t)
|
|
1453
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1454
|
-
const n =
|
|
1453
|
+
return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
|
|
1454
|
+
const n = ht(e);
|
|
1455
1455
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
|
|
1456
|
-
},
|
|
1456
|
+
}, Ua = ({
|
|
1457
1457
|
message: e
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const t =
|
|
1459
|
+
const t = mt(e);
|
|
1460
1460
|
if (t)
|
|
1461
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1462
|
-
const n =
|
|
1461
|
+
return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
|
|
1462
|
+
const n = ht(e);
|
|
1463
1463
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
|
|
1464
|
-
},
|
|
1465
|
-
Creator:
|
|
1466
|
-
Visitor:
|
|
1467
|
-
}),
|
|
1464
|
+
}, dl = Object.assign(ja, {
|
|
1465
|
+
Creator: Ba,
|
|
1466
|
+
Visitor: Ua
|
|
1467
|
+
}), Va = {
|
|
1468
1468
|
dark: "bg-[#121110]",
|
|
1469
1469
|
light: "bg-[#e9eaed]"
|
|
1470
|
-
},
|
|
1470
|
+
}, Ga = {
|
|
1471
1471
|
dark: "text-white",
|
|
1472
1472
|
light: "text-[#080707]"
|
|
1473
|
-
},
|
|
1473
|
+
}, Ha = {
|
|
1474
1474
|
dark: "border-white/[0.08]",
|
|
1475
1475
|
light: "border-black/[0.08]"
|
|
1476
|
-
},
|
|
1476
|
+
}, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
|
|
1477
1477
|
sender: {
|
|
1478
1478
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
1479
1479
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -1495,7 +1495,7 @@ const _s = ({
|
|
|
1495
1495
|
children: i,
|
|
1496
1496
|
"data-testid": l
|
|
1497
1497
|
}) => {
|
|
1498
|
-
const o = t != null && t !== "", d =
|
|
1498
|
+
const o = t != null && t !== "", d = qa[Ya(e)][a];
|
|
1499
1499
|
return /* @__PURE__ */ m(
|
|
1500
1500
|
"div",
|
|
1501
1501
|
{
|
|
@@ -1510,10 +1510,10 @@ const _s = ({
|
|
|
1510
1510
|
// as the surrounding `CustomMessage` text bubbles.
|
|
1511
1511
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
1512
1512
|
d,
|
|
1513
|
+
Va[e],
|
|
1513
1514
|
Ga[e],
|
|
1514
|
-
Ha[e],
|
|
1515
1515
|
n && "border",
|
|
1516
|
-
n &&
|
|
1516
|
+
n && Ha[e],
|
|
1517
1517
|
r
|
|
1518
1518
|
),
|
|
1519
1519
|
children: [
|
|
@@ -1556,16 +1556,16 @@ const _s = ({
|
|
|
1556
1556
|
),
|
|
1557
1557
|
children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
|
|
1558
1558
|
}
|
|
1559
|
-
), Me = (e) => e === "received" ? "light" : "dark",
|
|
1559
|
+
), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
|
|
1560
1560
|
firstOfGroup: e,
|
|
1561
1561
|
endOfGroup: t,
|
|
1562
1562
|
groupedByUser: n
|
|
1563
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1563
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
|
|
1564
1564
|
src: e,
|
|
1565
1565
|
mimeType: t,
|
|
1566
1566
|
filename: n,
|
|
1567
1567
|
items: a
|
|
1568
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [],
|
|
1568
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ka = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
1569
1569
|
/* @__PURE__ */ s(
|
|
1570
1570
|
"audio",
|
|
1571
1571
|
{
|
|
@@ -1577,7 +1577,7 @@ const _s = ({
|
|
|
1577
1577
|
}
|
|
1578
1578
|
),
|
|
1579
1579
|
n ?? null
|
|
1580
|
-
] }),
|
|
1580
|
+
] }), ft = ({
|
|
1581
1581
|
state: e,
|
|
1582
1582
|
src: t,
|
|
1583
1583
|
mimeType: n,
|
|
@@ -1588,10 +1588,10 @@ const _s = ({
|
|
|
1588
1588
|
preload: o,
|
|
1589
1589
|
onDismiss: d
|
|
1590
1590
|
}) => {
|
|
1591
|
-
const u = Me(e), p = e === "composer" && !!d, h =
|
|
1591
|
+
const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
|
|
1592
1592
|
if (h.length === 0)
|
|
1593
1593
|
return null;
|
|
1594
|
-
const
|
|
1594
|
+
const f = o ?? (h.length > 1 ? "none" : "metadata");
|
|
1595
1595
|
return /* @__PURE__ */ s(
|
|
1596
1596
|
Te,
|
|
1597
1597
|
{
|
|
@@ -1599,30 +1599,30 @@ const _s = ({
|
|
|
1599
1599
|
text: i,
|
|
1600
1600
|
groupPosition: l,
|
|
1601
1601
|
"data-testid": "audio-attachment",
|
|
1602
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
1603
|
-
|
|
1602
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((b, c) => /* @__PURE__ */ s(
|
|
1603
|
+
Ka,
|
|
1604
1604
|
{
|
|
1605
|
-
item:
|
|
1606
|
-
preload:
|
|
1605
|
+
item: b,
|
|
1606
|
+
preload: f,
|
|
1607
1607
|
trailingAction: (
|
|
1608
1608
|
// Composer only supports a single attachment, so the
|
|
1609
1609
|
// dismiss control sits on the only player.
|
|
1610
|
-
p &&
|
|
1610
|
+
p && c === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
|
|
1611
1611
|
)
|
|
1612
1612
|
},
|
|
1613
|
-
`${
|
|
1613
|
+
`${b.src}-${c}`
|
|
1614
1614
|
)) })
|
|
1615
1615
|
}
|
|
1616
1616
|
);
|
|
1617
|
-
},
|
|
1618
|
-
Composer:
|
|
1619
|
-
Sent:
|
|
1620
|
-
Received:
|
|
1617
|
+
}, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
|
|
1618
|
+
Composer: Ja,
|
|
1619
|
+
Sent: Za,
|
|
1620
|
+
Received: Qa
|
|
1621
1621
|
};
|
|
1622
|
-
function
|
|
1622
|
+
function tr(e) {
|
|
1623
1623
|
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`;
|
|
1624
1624
|
}
|
|
1625
|
-
const
|
|
1625
|
+
const sr = {
|
|
1626
1626
|
pdf: "PDF",
|
|
1627
1627
|
doc: "DOC",
|
|
1628
1628
|
xls: "XLS",
|
|
@@ -1632,7 +1632,7 @@ const nr = {
|
|
|
1632
1632
|
text: "TXT",
|
|
1633
1633
|
markdown: "MD"
|
|
1634
1634
|
};
|
|
1635
|
-
function
|
|
1635
|
+
function nr(e, t) {
|
|
1636
1636
|
if (t) {
|
|
1637
1637
|
const r = t.lastIndexOf(".");
|
|
1638
1638
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -1641,8 +1641,8 @@ function ar(e, t) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
1643
|
if (!e) return;
|
|
1644
|
-
if (
|
|
1645
|
-
const r = ps(e), i =
|
|
1644
|
+
if (oe(e) === "document") {
|
|
1645
|
+
const r = ps(e), i = sr[r];
|
|
1646
1646
|
if (i) return i;
|
|
1647
1647
|
if (e === "application/octet-stream") return;
|
|
1648
1648
|
}
|
|
@@ -1650,8 +1650,8 @@ function ar(e, t) {
|
|
|
1650
1650
|
if (!(!a || a === "*"))
|
|
1651
1651
|
return a.toUpperCase();
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const a =
|
|
1653
|
+
function ar(e, t, n) {
|
|
1654
|
+
const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
|
|
1655
1655
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
1656
1656
|
}
|
|
1657
1657
|
function re(e) {
|
|
@@ -1662,13 +1662,13 @@ function re(e) {
|
|
|
1662
1662
|
return "download";
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const rr = {
|
|
1666
1666
|
dark: "text-white/55",
|
|
1667
1667
|
light: "text-black/65"
|
|
1668
|
-
},
|
|
1668
|
+
}, ir = {
|
|
1669
1669
|
dark: "bg-white/10",
|
|
1670
1670
|
light: "bg-black/5"
|
|
1671
|
-
},
|
|
1671
|
+
}, lr = {
|
|
1672
1672
|
dark: "text-white/85",
|
|
1673
1673
|
light: "text-black/85"
|
|
1674
1674
|
}, ys = ({
|
|
@@ -1681,16 +1681,16 @@ const ir = {
|
|
|
1681
1681
|
activateLabel: l,
|
|
1682
1682
|
trailingAction: o
|
|
1683
1683
|
}) => {
|
|
1684
|
-
const d = n ?? t ?? "File", u =
|
|
1684
|
+
const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
|
|
1685
1685
|
"div",
|
|
1686
1686
|
{
|
|
1687
1687
|
className: k(
|
|
1688
1688
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
1689
|
-
|
|
1689
|
+
ir[e]
|
|
1690
1690
|
),
|
|
1691
1691
|
"aria-hidden": !0,
|
|
1692
1692
|
children: we(a, {
|
|
1693
|
-
className: k("size-6",
|
|
1693
|
+
className: k("size-6", lr[e]),
|
|
1694
1694
|
weight: "regular"
|
|
1695
1695
|
})
|
|
1696
1696
|
}
|
|
@@ -1701,12 +1701,12 @@ const ir = {
|
|
|
1701
1701
|
{
|
|
1702
1702
|
className: k(
|
|
1703
1703
|
"truncate text-xs leading-4",
|
|
1704
|
-
|
|
1704
|
+
rr[e]
|
|
1705
1705
|
),
|
|
1706
1706
|
children: u
|
|
1707
1707
|
}
|
|
1708
1708
|
) : null
|
|
1709
|
-
] }),
|
|
1709
|
+
] }), f = i ? /* @__PURE__ */ m(
|
|
1710
1710
|
"button",
|
|
1711
1711
|
{
|
|
1712
1712
|
type: "button",
|
|
@@ -1721,12 +1721,12 @@ const ir = {
|
|
|
1721
1721
|
h
|
|
1722
1722
|
]
|
|
1723
1723
|
}
|
|
1724
|
-
) : /* @__PURE__ */ m(
|
|
1724
|
+
) : /* @__PURE__ */ m(te, { children: [
|
|
1725
1725
|
p,
|
|
1726
1726
|
h
|
|
1727
1727
|
] });
|
|
1728
1728
|
return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
1729
|
-
|
|
1729
|
+
f,
|
|
1730
1730
|
o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
|
|
1731
1731
|
] });
|
|
1732
1732
|
};
|
|
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
|
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
const
|
|
1747
|
+
const or = ({
|
|
1748
1748
|
src: e,
|
|
1749
1749
|
filename: t,
|
|
1750
1750
|
fileSize: n,
|
|
1751
1751
|
mimeType: a,
|
|
1752
1752
|
title: r,
|
|
1753
1753
|
items: i
|
|
1754
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [],
|
|
1754
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], cr = ({
|
|
1755
1755
|
variant: e,
|
|
1756
1756
|
item: t,
|
|
1757
1757
|
index: n,
|
|
@@ -1772,7 +1772,7 @@ const cr = ({
|
|
|
1772
1772
|
trailingAction: r
|
|
1773
1773
|
}
|
|
1774
1774
|
);
|
|
1775
|
-
},
|
|
1775
|
+
}, gt = ({
|
|
1776
1776
|
state: e,
|
|
1777
1777
|
src: t,
|
|
1778
1778
|
filename: n,
|
|
@@ -1785,21 +1785,21 @@ const cr = ({
|
|
|
1785
1785
|
onClick: u,
|
|
1786
1786
|
onDismiss: p
|
|
1787
1787
|
}) => {
|
|
1788
|
-
const h = Me(e),
|
|
1788
|
+
const h = Me(e), f = e === "composer" && !!p, b = or({
|
|
1789
1789
|
src: t,
|
|
1790
1790
|
filename: n,
|
|
1791
1791
|
fileSize: a,
|
|
1792
1792
|
mimeType: r,
|
|
1793
1793
|
title: i,
|
|
1794
1794
|
items: l
|
|
1795
|
-
}),
|
|
1796
|
-
if ((u == null ? void 0 : u(
|
|
1797
|
-
const
|
|
1798
|
-
if (!
|
|
1799
|
-
const x =
|
|
1800
|
-
ks(
|
|
1795
|
+
}), c = (v) => {
|
|
1796
|
+
if ((u == null ? void 0 : u(v)) === !1) return;
|
|
1797
|
+
const g = b[v];
|
|
1798
|
+
if (!g) return;
|
|
1799
|
+
const x = g.filename ?? re(g.src);
|
|
1800
|
+
ks(g.src, x);
|
|
1801
1801
|
};
|
|
1802
|
-
if (
|
|
1802
|
+
if (b.length === 0)
|
|
1803
1803
|
return null;
|
|
1804
1804
|
const w = /* @__PURE__ */ s(
|
|
1805
1805
|
"span",
|
|
@@ -1809,7 +1809,7 @@ const cr = ({
|
|
|
1809
1809
|
h === "dark" ? "text-white/70" : "text-black/70"
|
|
1810
1810
|
),
|
|
1811
1811
|
"aria-hidden": !0,
|
|
1812
|
-
children: /* @__PURE__ */ s(
|
|
1812
|
+
children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
|
|
1813
1813
|
}
|
|
1814
1814
|
);
|
|
1815
1815
|
return /* @__PURE__ */ s(
|
|
@@ -1819,29 +1819,29 @@ const cr = ({
|
|
|
1819
1819
|
text: o,
|
|
1820
1820
|
groupPosition: d,
|
|
1821
1821
|
"data-testid": "file-attachment",
|
|
1822
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children:
|
|
1823
|
-
|
|
1822
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: b.map((v, g) => /* @__PURE__ */ s(
|
|
1823
|
+
cr,
|
|
1824
1824
|
{
|
|
1825
1825
|
variant: h,
|
|
1826
|
-
item:
|
|
1827
|
-
index:
|
|
1828
|
-
onActivate:
|
|
1829
|
-
trailingAction:
|
|
1826
|
+
item: v,
|
|
1827
|
+
index: g,
|
|
1828
|
+
onActivate: c,
|
|
1829
|
+
trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
|
|
1830
1830
|
},
|
|
1831
|
-
`${
|
|
1831
|
+
`${v.src}-${g}`
|
|
1832
1832
|
)) })
|
|
1833
1833
|
}
|
|
1834
1834
|
);
|
|
1835
|
-
},
|
|
1836
|
-
Composer:
|
|
1837
|
-
Sent:
|
|
1838
|
-
Received:
|
|
1839
|
-
},
|
|
1835
|
+
}, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
|
|
1836
|
+
Composer: dr,
|
|
1837
|
+
Sent: ur,
|
|
1838
|
+
Received: mr
|
|
1839
|
+
}, pt = ({
|
|
1840
1840
|
onPrev: e,
|
|
1841
1841
|
onNext: t,
|
|
1842
1842
|
prevLabel: n = "Previous",
|
|
1843
1843
|
nextLabel: a = "Next"
|
|
1844
|
-
}) => /* @__PURE__ */ m(
|
|
1844
|
+
}) => /* @__PURE__ */ m(te, { children: [
|
|
1845
1845
|
/* @__PURE__ */ s(
|
|
1846
1846
|
"button",
|
|
1847
1847
|
{
|
|
@@ -1849,7 +1849,7 @@ const cr = ({
|
|
|
1849
1849
|
onClick: e,
|
|
1850
1850
|
"aria-label": n,
|
|
1851
1851
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1852
|
-
children: /* @__PURE__ */ s(
|
|
1852
|
+
children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1853
1853
|
}
|
|
1854
1854
|
),
|
|
1855
1855
|
/* @__PURE__ */ s(
|
|
@@ -1872,14 +1872,14 @@ const cr = ({
|
|
|
1872
1872
|
onTriggered: l
|
|
1873
1873
|
}) => {
|
|
1874
1874
|
const [o, d] = B(!1), u = J(
|
|
1875
|
-
(
|
|
1876
|
-
|
|
1875
|
+
(b) => {
|
|
1876
|
+
b.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
|
|
1877
1877
|
}).finally(() => {
|
|
1878
1878
|
d(!1), l == null || l();
|
|
1879
1879
|
}));
|
|
1880
1880
|
},
|
|
1881
1881
|
[o, e, t, l]
|
|
1882
|
-
), p = r ?? n !== "pill",
|
|
1882
|
+
), p = r ?? n !== "pill", f = { className: k(
|
|
1883
1883
|
n === "pill" ? "size-4" : "size-5",
|
|
1884
1884
|
"shrink-0"
|
|
1885
1885
|
), weight: "bold" };
|
|
@@ -1898,14 +1898,14 @@ const cr = ({
|
|
|
1898
1898
|
}[i]
|
|
1899
1899
|
),
|
|
1900
1900
|
children: o ? /* @__PURE__ */ s(
|
|
1901
|
-
|
|
1901
|
+
ke,
|
|
1902
1902
|
{
|
|
1903
1903
|
className: "size-4 animate-spin",
|
|
1904
1904
|
weight: "bold",
|
|
1905
1905
|
"aria-hidden": !0
|
|
1906
1906
|
}
|
|
1907
1907
|
) : /* @__PURE__ */ s(
|
|
1908
|
-
|
|
1908
|
+
Ce,
|
|
1909
1909
|
{
|
|
1910
1910
|
className: "size-5 shrink-0",
|
|
1911
1911
|
weight: "bold",
|
|
@@ -1921,7 +1921,7 @@ const cr = ({
|
|
|
1921
1921
|
disabled: o,
|
|
1922
1922
|
"aria-label": a,
|
|
1923
1923
|
className: "mes-media-viewer__action",
|
|
1924
|
-
children: o ? /* @__PURE__ */ s(
|
|
1924
|
+
children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1925
1925
|
}
|
|
1926
1926
|
) : /* @__PURE__ */ m(
|
|
1927
1927
|
"button",
|
|
@@ -1936,18 +1936,18 @@ const cr = ({
|
|
|
1936
1936
|
),
|
|
1937
1937
|
children: [
|
|
1938
1938
|
o ? /* @__PURE__ */ s(
|
|
1939
|
-
|
|
1939
|
+
ke,
|
|
1940
1940
|
{
|
|
1941
1941
|
className: "size-4 animate-spin",
|
|
1942
1942
|
weight: "bold",
|
|
1943
1943
|
"aria-hidden": !0
|
|
1944
1944
|
}
|
|
1945
|
-
) : /* @__PURE__ */ s(
|
|
1945
|
+
) : /* @__PURE__ */ s(Ce, { ...f, "aria-hidden": !0 }),
|
|
1946
1946
|
p ? null : a
|
|
1947
1947
|
]
|
|
1948
1948
|
}
|
|
1949
1949
|
);
|
|
1950
|
-
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1950
|
+
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
|
|
1951
1951
|
length: e,
|
|
1952
1952
|
initialIndex: t,
|
|
1953
1953
|
open: n
|
|
@@ -1972,7 +1972,7 @@ const cr = ({
|
|
|
1972
1972
|
};
|
|
1973
1973
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1974
1974
|
}, [n, e, l, o]), { index: r, prev: l, next: o };
|
|
1975
|
-
},
|
|
1975
|
+
}, vt = ({
|
|
1976
1976
|
open: e,
|
|
1977
1977
|
onClose: t,
|
|
1978
1978
|
ariaLabel: n,
|
|
@@ -1981,9 +1981,9 @@ const cr = ({
|
|
|
1981
1981
|
children: i,
|
|
1982
1982
|
"data-testid": l
|
|
1983
1983
|
}) => {
|
|
1984
|
-
const o =
|
|
1984
|
+
const o = H(null), d = H(null);
|
|
1985
1985
|
return K(() => {
|
|
1986
|
-
var
|
|
1986
|
+
var f;
|
|
1987
1987
|
const h = o.current;
|
|
1988
1988
|
if (h) {
|
|
1989
1989
|
if (e) {
|
|
@@ -1996,8 +1996,8 @@ const cr = ({
|
|
|
1996
1996
|
}
|
|
1997
1997
|
else
|
|
1998
1998
|
h.setAttribute("open", "");
|
|
1999
|
-
const
|
|
2000
|
-
return (
|
|
1999
|
+
const b = typeof document < "u" ? document.activeElement : null;
|
|
2000
|
+
return (f = d.current) == null || f.focus(), () => {
|
|
2001
2001
|
if (h.open)
|
|
2002
2002
|
if (typeof h.close == "function")
|
|
2003
2003
|
try {
|
|
@@ -2007,7 +2007,7 @@ const cr = ({
|
|
|
2007
2007
|
}
|
|
2008
2008
|
else
|
|
2009
2009
|
h.removeAttribute("open");
|
|
2010
|
-
|
|
2010
|
+
b && document.body.contains(b) && b.focus();
|
|
2011
2011
|
};
|
|
2012
2012
|
}
|
|
2013
2013
|
if (h.open)
|
|
@@ -2062,22 +2062,22 @@ const cr = ({
|
|
|
2062
2062
|
]
|
|
2063
2063
|
}
|
|
2064
2064
|
);
|
|
2065
|
-
},
|
|
2065
|
+
}, Es = ({
|
|
2066
2066
|
open: e,
|
|
2067
2067
|
items: t,
|
|
2068
2068
|
initialIndex: n = 0,
|
|
2069
2069
|
onClose: a
|
|
2070
2070
|
}) => {
|
|
2071
|
-
const { index: r, prev: i, next: l } =
|
|
2071
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2072
2072
|
length: t.length,
|
|
2073
2073
|
initialIndex: n,
|
|
2074
2074
|
open: e
|
|
2075
|
-
}), o = t[r], d =
|
|
2075
|
+
}), o = t[r], d = ae(
|
|
2076
2076
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
|
|
2077
2077
|
[o]
|
|
2078
2078
|
);
|
|
2079
2079
|
return o ? /* @__PURE__ */ m(
|
|
2080
|
-
|
|
2080
|
+
vt,
|
|
2081
2081
|
{
|
|
2082
2082
|
open: e,
|
|
2083
2083
|
onClose: a,
|
|
@@ -2107,7 +2107,7 @@ const cr = ({
|
|
|
2107
2107
|
`${r}:${o.src}`
|
|
2108
2108
|
),
|
|
2109
2109
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2110
|
-
|
|
2110
|
+
pt,
|
|
2111
2111
|
{
|
|
2112
2112
|
onPrev: i,
|
|
2113
2113
|
onNext: l,
|
|
@@ -2118,7 +2118,7 @@ const cr = ({
|
|
|
2118
2118
|
]
|
|
2119
2119
|
}
|
|
2120
2120
|
) : null;
|
|
2121
|
-
},
|
|
2121
|
+
}, fr = "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", Ss = ({
|
|
2122
2122
|
tiles: e,
|
|
2123
2123
|
onTileActivate: t,
|
|
2124
2124
|
maxVisible: n = 4,
|
|
@@ -2127,7 +2127,7 @@ const cr = ({
|
|
|
2127
2127
|
const r = e.length;
|
|
2128
2128
|
if (r === 0) return null;
|
|
2129
2129
|
const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
|
|
2130
|
-
const h = k(
|
|
2130
|
+
const h = k(fr, "h-full w-full");
|
|
2131
2131
|
return t ? /* @__PURE__ */ m(
|
|
2132
2132
|
"button",
|
|
2133
2133
|
{
|
|
@@ -2196,7 +2196,7 @@ const cr = ({
|
|
|
2196
2196
|
[e]
|
|
2197
2197
|
), l = J(() => n(!1), []);
|
|
2198
2198
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
|
|
2199
|
-
},
|
|
2199
|
+
}, gr = (e, t, n, a) => ({
|
|
2200
2200
|
ariaLabel: `Open image ${t + 1} of ${n}`,
|
|
2201
2201
|
content: /* @__PURE__ */ s(
|
|
2202
2202
|
"img",
|
|
@@ -2211,7 +2211,7 @@ const cr = ({
|
|
|
2211
2211
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
2212
2212
|
}
|
|
2213
2213
|
)
|
|
2214
|
-
}),
|
|
2214
|
+
}), pr = ({
|
|
2215
2215
|
src: e,
|
|
2216
2216
|
alt: t,
|
|
2217
2217
|
items: n
|
|
@@ -2219,7 +2219,7 @@ const cr = ({
|
|
|
2219
2219
|
src: n.src,
|
|
2220
2220
|
alt: n.alt,
|
|
2221
2221
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2222
|
-
})),
|
|
2222
|
+
})), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2223
2223
|
const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
|
|
2224
2224
|
r
|
|
2225
2225
|
);
|
|
@@ -2246,7 +2246,7 @@ const cr = ({
|
|
|
2246
2246
|
),
|
|
2247
2247
|
i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
|
|
2248
2248
|
/* @__PURE__ */ s(
|
|
2249
|
-
|
|
2249
|
+
Es,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: l,
|
|
2252
2252
|
items: Is([{ src: e, alt: t }], n),
|
|
@@ -2266,13 +2266,13 @@ const cr = ({
|
|
|
2266
2266
|
loading: o = "lazy",
|
|
2267
2267
|
onClick: d
|
|
2268
2268
|
}) => {
|
|
2269
|
-
const u =
|
|
2269
|
+
const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: b, closeViewer: c } = Re(
|
|
2270
2270
|
d
|
|
2271
2271
|
);
|
|
2272
2272
|
if (u.length === 0)
|
|
2273
2273
|
return null;
|
|
2274
2274
|
const w = u.map(
|
|
2275
|
-
(
|
|
2275
|
+
(v, g) => gr(v, g, u.length, o)
|
|
2276
2276
|
);
|
|
2277
2277
|
return /* @__PURE__ */ m(
|
|
2278
2278
|
Te,
|
|
@@ -2282,42 +2282,42 @@ const cr = ({
|
|
|
2282
2282
|
groupPosition: l,
|
|
2283
2283
|
"data-testid": "image-attachment",
|
|
2284
2284
|
children: [
|
|
2285
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2285
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: b }) }),
|
|
2286
2286
|
/* @__PURE__ */ s(
|
|
2287
|
-
|
|
2287
|
+
Es,
|
|
2288
2288
|
{
|
|
2289
2289
|
open: h,
|
|
2290
2290
|
items: Is(u, a),
|
|
2291
|
-
initialIndex:
|
|
2292
|
-
onClose:
|
|
2291
|
+
initialIndex: f,
|
|
2292
|
+
onClose: c
|
|
2293
2293
|
}
|
|
2294
2294
|
)
|
|
2295
2295
|
]
|
|
2296
2296
|
}
|
|
2297
2297
|
);
|
|
2298
|
-
},
|
|
2299
|
-
Composer:
|
|
2300
|
-
Sent:
|
|
2301
|
-
Received:
|
|
2302
|
-
},
|
|
2298
|
+
}, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), _r = {
|
|
2299
|
+
Composer: vr,
|
|
2300
|
+
Sent: xr,
|
|
2301
|
+
Received: wr
|
|
2302
|
+
}, Nr = ({
|
|
2303
2303
|
open: e,
|
|
2304
2304
|
items: t,
|
|
2305
2305
|
initialIndex: n = 0,
|
|
2306
2306
|
onClose: a
|
|
2307
2307
|
}) => {
|
|
2308
|
-
const { index: r, prev: i, next: l } =
|
|
2308
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2309
2309
|
length: t.length,
|
|
2310
2310
|
initialIndex: n,
|
|
2311
2311
|
open: e
|
|
2312
|
-
}), o = t[r], d =
|
|
2312
|
+
}), o = t[r], d = ae(
|
|
2313
2313
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
|
|
2314
2314
|
[o]
|
|
2315
|
-
), u =
|
|
2316
|
-
() => o ?
|
|
2315
|
+
), u = ae(
|
|
2316
|
+
() => o ? yr(o.src) : void 0,
|
|
2317
2317
|
[o]
|
|
2318
2318
|
);
|
|
2319
2319
|
return !o || !u ? null : /* @__PURE__ */ m(
|
|
2320
|
-
|
|
2320
|
+
vt,
|
|
2321
2321
|
{
|
|
2322
2322
|
open: e,
|
|
2323
2323
|
onClose: a,
|
|
@@ -2336,7 +2336,7 @@ const cr = ({
|
|
|
2336
2336
|
`${r}:${o.src}`
|
|
2337
2337
|
),
|
|
2338
2338
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2339
|
-
|
|
2339
|
+
pt,
|
|
2340
2340
|
{
|
|
2341
2341
|
onPrev: i,
|
|
2342
2342
|
onNext: l,
|
|
@@ -2347,16 +2347,16 @@ const cr = ({
|
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
},
|
|
2350
|
+
}, yr = (e) => {
|
|
2351
2351
|
const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
2352
2352
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
|
|
2353
|
-
},
|
|
2353
|
+
}, kr = ({
|
|
2354
2354
|
src: e,
|
|
2355
2355
|
filename: t,
|
|
2356
2356
|
fileSize: n,
|
|
2357
2357
|
title: a,
|
|
2358
2358
|
items: r
|
|
2359
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [],
|
|
2359
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Cr = ({
|
|
2360
2360
|
variant: e,
|
|
2361
2361
|
item: t,
|
|
2362
2362
|
index: n,
|
|
@@ -2377,7 +2377,7 @@ const cr = ({
|
|
|
2377
2377
|
trailingAction: r
|
|
2378
2378
|
}
|
|
2379
2379
|
);
|
|
2380
|
-
},
|
|
2380
|
+
}, xt = ({
|
|
2381
2381
|
state: e,
|
|
2382
2382
|
src: t,
|
|
2383
2383
|
filename: n,
|
|
@@ -2389,12 +2389,12 @@ const cr = ({
|
|
|
2389
2389
|
onClick: d,
|
|
2390
2390
|
onDismiss: u
|
|
2391
2391
|
}) => {
|
|
2392
|
-
const p = Me(e), h =
|
|
2392
|
+
const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
|
|
2393
2393
|
d
|
|
2394
|
-
),
|
|
2394
|
+
), v = e === "composer" && !!u;
|
|
2395
2395
|
if (h.length === 0)
|
|
2396
2396
|
return null;
|
|
2397
|
-
const
|
|
2397
|
+
const g = h.map((x) => ({
|
|
2398
2398
|
src: x.src,
|
|
2399
2399
|
filename: x.filename ?? re(x.src)
|
|
2400
2400
|
}));
|
|
@@ -2406,61 +2406,61 @@ const cr = ({
|
|
|
2406
2406
|
groupPosition: o,
|
|
2407
2407
|
"data-testid": "pdf-attachment",
|
|
2408
2408
|
children: [
|
|
2409
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x,
|
|
2410
|
-
const
|
|
2409
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, _) => {
|
|
2410
|
+
const A = x.filename ?? re(x.src), S = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2411
2411
|
Cs,
|
|
2412
2412
|
{
|
|
2413
2413
|
url: x.src,
|
|
2414
|
-
filename:
|
|
2414
|
+
filename: A,
|
|
2415
2415
|
variant: "inline",
|
|
2416
|
-
label: `Download ${
|
|
2416
|
+
label: `Download ${A}`,
|
|
2417
2417
|
tone: p
|
|
2418
2418
|
}
|
|
2419
2419
|
);
|
|
2420
2420
|
return /* @__PURE__ */ s(
|
|
2421
|
-
|
|
2421
|
+
Cr,
|
|
2422
2422
|
{
|
|
2423
2423
|
variant: p,
|
|
2424
2424
|
item: x,
|
|
2425
|
-
index:
|
|
2426
|
-
onActivate:
|
|
2427
|
-
trailingAction:
|
|
2425
|
+
index: _,
|
|
2426
|
+
onActivate: c,
|
|
2427
|
+
trailingAction: S
|
|
2428
2428
|
},
|
|
2429
|
-
`${x.src}-${
|
|
2429
|
+
`${x.src}-${_}`
|
|
2430
2430
|
);
|
|
2431
2431
|
}) }),
|
|
2432
2432
|
/* @__PURE__ */ s(
|
|
2433
|
-
|
|
2433
|
+
Nr,
|
|
2434
2434
|
{
|
|
2435
|
-
open:
|
|
2436
|
-
items:
|
|
2437
|
-
initialIndex:
|
|
2435
|
+
open: f,
|
|
2436
|
+
items: g,
|
|
2437
|
+
initialIndex: b,
|
|
2438
2438
|
onClose: w
|
|
2439
2439
|
}
|
|
2440
2440
|
)
|
|
2441
2441
|
]
|
|
2442
2442
|
}
|
|
2443
2443
|
);
|
|
2444
|
-
}, Er = (e) => /* @__PURE__ */ s(
|
|
2444
|
+
}, Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
|
|
2445
2445
|
Composer: Er,
|
|
2446
|
-
Sent:
|
|
2447
|
-
Received:
|
|
2446
|
+
Sent: Sr,
|
|
2447
|
+
Received: Ir
|
|
2448
2448
|
}, As = ({
|
|
2449
2449
|
open: e,
|
|
2450
2450
|
items: t,
|
|
2451
2451
|
initialIndex: n = 0,
|
|
2452
2452
|
onClose: a
|
|
2453
2453
|
}) => {
|
|
2454
|
-
const { index: r, prev: i, next: l } =
|
|
2454
|
+
const { index: r, prev: i, next: l } = bt({
|
|
2455
2455
|
length: t.length,
|
|
2456
2456
|
initialIndex: n,
|
|
2457
2457
|
open: e
|
|
2458
|
-
}), o = t[r], d =
|
|
2458
|
+
}), o = t[r], d = ae(
|
|
2459
2459
|
() => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
|
|
2460
2460
|
[o]
|
|
2461
2461
|
);
|
|
2462
2462
|
return o ? /* @__PURE__ */ m(
|
|
2463
|
-
|
|
2463
|
+
vt,
|
|
2464
2464
|
{
|
|
2465
2465
|
open: e,
|
|
2466
2466
|
onClose: a,
|
|
@@ -2484,7 +2484,7 @@ const cr = ({
|
|
|
2484
2484
|
`${r}:${o.src}`
|
|
2485
2485
|
),
|
|
2486
2486
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2487
|
-
|
|
2487
|
+
pt,
|
|
2488
2488
|
{
|
|
2489
2489
|
onPrev: i,
|
|
2490
2490
|
onNext: l,
|
|
@@ -2495,7 +2495,7 @@ const cr = ({
|
|
|
2495
2495
|
]
|
|
2496
2496
|
}
|
|
2497
2497
|
) : null;
|
|
2498
|
-
},
|
|
2498
|
+
}, 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(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
|
|
2499
2499
|
item: e,
|
|
2500
2500
|
index: t
|
|
2501
2501
|
}) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -2517,11 +2517,11 @@ const cr = ({
|
|
|
2517
2517
|
"aria-hidden": !0
|
|
2518
2518
|
}
|
|
2519
2519
|
) }),
|
|
2520
|
-
/* @__PURE__ */ s(
|
|
2521
|
-
] }),
|
|
2520
|
+
/* @__PURE__ */ s(Ar, {})
|
|
2521
|
+
] }), Mr = (e, t, n) => ({
|
|
2522
2522
|
ariaLabel: `Play video ${t + 1} of ${n}`,
|
|
2523
2523
|
content: /* @__PURE__ */ s(Ms, { item: e, index: t })
|
|
2524
|
-
}),
|
|
2524
|
+
}), Rr = ({
|
|
2525
2525
|
src: e,
|
|
2526
2526
|
poster: t,
|
|
2527
2527
|
mimeType: n,
|
|
@@ -2562,7 +2562,7 @@ const cr = ({
|
|
|
2562
2562
|
}
|
|
2563
2563
|
)
|
|
2564
2564
|
] });
|
|
2565
|
-
},
|
|
2565
|
+
}, Ls = ({
|
|
2566
2566
|
state: e,
|
|
2567
2567
|
src: t,
|
|
2568
2568
|
poster: n,
|
|
@@ -2574,13 +2574,13 @@ const cr = ({
|
|
|
2574
2574
|
preload: d,
|
|
2575
2575
|
onClick: u
|
|
2576
2576
|
}) => {
|
|
2577
|
-
const p =
|
|
2577
|
+
const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
|
|
2578
2578
|
u
|
|
2579
2579
|
);
|
|
2580
2580
|
if (p.length === 0)
|
|
2581
2581
|
return null;
|
|
2582
|
-
const
|
|
2583
|
-
(
|
|
2582
|
+
const v = p.map(
|
|
2583
|
+
(g, x) => Mr(g, x, p.length)
|
|
2584
2584
|
);
|
|
2585
2585
|
return /* @__PURE__ */ m(
|
|
2586
2586
|
Te,
|
|
@@ -2591,44 +2591,57 @@ const cr = ({
|
|
|
2591
2591
|
"data-testid": "video-attachment",
|
|
2592
2592
|
children: [
|
|
2593
2593
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2594
|
-
|
|
2594
|
+
Ss,
|
|
2595
2595
|
{
|
|
2596
|
-
tiles:
|
|
2597
|
-
onTileActivate:
|
|
2596
|
+
tiles: v,
|
|
2597
|
+
onTileActivate: c,
|
|
2598
2598
|
className: "overflow-hidden rounded-md"
|
|
2599
2599
|
}
|
|
2600
2600
|
) }),
|
|
2601
2601
|
/* @__PURE__ */ s(
|
|
2602
2602
|
As,
|
|
2603
2603
|
{
|
|
2604
|
-
open:
|
|
2604
|
+
open: f,
|
|
2605
2605
|
items: Rs(p, r),
|
|
2606
|
-
initialIndex:
|
|
2606
|
+
initialIndex: b,
|
|
2607
2607
|
onClose: w
|
|
2608
2608
|
}
|
|
2609
2609
|
)
|
|
2610
2610
|
]
|
|
2611
2611
|
}
|
|
2612
2612
|
);
|
|
2613
|
-
},
|
|
2614
|
-
Composer:
|
|
2615
|
-
Sent:
|
|
2616
|
-
Received:
|
|
2617
|
-
},
|
|
2618
|
-
Image:
|
|
2619
|
-
Video:
|
|
2620
|
-
Audio:
|
|
2621
|
-
Pdf:
|
|
2622
|
-
File:
|
|
2623
|
-
},
|
|
2613
|
+
}, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Fr = {
|
|
2614
|
+
Composer: Dr,
|
|
2615
|
+
Sent: zr,
|
|
2616
|
+
Received: Pr
|
|
2617
|
+
}, Ne = {
|
|
2618
|
+
Image: _r,
|
|
2619
|
+
Video: Fr,
|
|
2620
|
+
Audio: er,
|
|
2621
|
+
Pdf: Tr,
|
|
2622
|
+
File: hr
|
|
2623
|
+
}, Or = {
|
|
2624
2624
|
isUnlocking: () => !1
|
|
2625
|
-
},
|
|
2626
|
-
LockedAttachment:
|
|
2627
|
-
},
|
|
2628
|
-
function
|
|
2629
|
-
return
|
|
2625
|
+
}, $r = {
|
|
2626
|
+
LockedAttachment: Or
|
|
2627
|
+
}, Ds = at({}), ul = Ds.Provider;
|
|
2628
|
+
function jr(e) {
|
|
2629
|
+
return Se(Ds)[e] ?? $r[e];
|
|
2630
2630
|
}
|
|
2631
|
-
const
|
|
2631
|
+
const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
|
|
2632
|
+
message: e,
|
|
2633
|
+
groupStyles: t
|
|
2634
|
+
}) => !Br(t) || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
|
|
2635
|
+
"div",
|
|
2636
|
+
{
|
|
2637
|
+
className: "str-chat__message-delivery-status",
|
|
2638
|
+
"data-testid": "message-delivery-status",
|
|
2639
|
+
children: [
|
|
2640
|
+
/* @__PURE__ */ s(Yn, { size: 14, weight: "bold", "aria-hidden": "true" }),
|
|
2641
|
+
/* @__PURE__ */ s("span", { children: "Delivered" })
|
|
2642
|
+
]
|
|
2643
|
+
}
|
|
2644
|
+
), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2632
2645
|
"svg",
|
|
2633
2646
|
{
|
|
2634
2647
|
width: e,
|
|
@@ -2645,19 +2658,19 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2645
2658
|
}
|
|
2646
2659
|
)
|
|
2647
2660
|
}
|
|
2648
|
-
),
|
|
2661
|
+
), Gr = (e) => {
|
|
2649
2662
|
var t;
|
|
2650
2663
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
2651
|
-
},
|
|
2664
|
+
}, Hr = (e) => {
|
|
2652
2665
|
var t;
|
|
2653
2666
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2654
2667
|
}, Fe = (e) => {
|
|
2655
2668
|
var t;
|
|
2656
2669
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2657
|
-
},
|
|
2670
|
+
}, Yr = (e) => {
|
|
2658
2671
|
var t;
|
|
2659
2672
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
2660
|
-
}, zs = (e) =>
|
|
2673
|
+
}, zs = (e) => Gr(e) || Hr(e), qr = (e) => {
|
|
2661
2674
|
var t;
|
|
2662
2675
|
return zs(e) && !((t = e.text) != null && t.trim());
|
|
2663
2676
|
}, Ke = ({
|
|
@@ -2671,27 +2684,27 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2671
2684
|
if (!r && !i)
|
|
2672
2685
|
return null;
|
|
2673
2686
|
if (r) {
|
|
2674
|
-
const
|
|
2675
|
-
if (!
|
|
2676
|
-
const
|
|
2677
|
-
return /* @__PURE__ */ m("div", { className:
|
|
2687
|
+
const f = (h = e.metadata) == null ? void 0 : h.amount_text;
|
|
2688
|
+
if (!f) return null;
|
|
2689
|
+
const b = t ? "message-tip-standalone" : "message-tag message-tag--tip", c = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
2690
|
+
return /* @__PURE__ */ m("div", { className: b, children: [
|
|
2678
2691
|
/* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
|
|
2679
|
-
/* @__PURE__ */ s("span", { children:
|
|
2692
|
+
/* @__PURE__ */ s("span", { children: c })
|
|
2680
2693
|
] });
|
|
2681
2694
|
}
|
|
2682
2695
|
const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
2683
2696
|
"message-chatbot-indicator",
|
|
2684
2697
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2685
2698
|
l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2686
|
-
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(
|
|
2687
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(
|
|
2699
|
+
].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Vr, { size: l ? 12 : 15 }) });
|
|
2700
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
|
|
2688
2701
|
u,
|
|
2689
2702
|
p
|
|
2690
|
-
] }) : /* @__PURE__ */ m(
|
|
2703
|
+
] }) : /* @__PURE__ */ m(te, { children: [
|
|
2691
2704
|
p,
|
|
2692
2705
|
u
|
|
2693
2706
|
] }) });
|
|
2694
|
-
},
|
|
2707
|
+
}, Wr = ({
|
|
2695
2708
|
selected: e,
|
|
2696
2709
|
onVoteUp: t,
|
|
2697
2710
|
onVoteDown: n
|
|
@@ -2724,47 +2737,26 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2724
2737
|
children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
2725
2738
|
}
|
|
2726
2739
|
)
|
|
2727
|
-
] }),
|
|
2728
|
-
|
|
2729
|
-
const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
|
|
2730
|
-
var l;
|
|
2731
|
-
if (!(!a || !t)) {
|
|
2732
|
-
for (let o = t.length - 1; o >= 0; o -= 1)
|
|
2733
|
-
if (((l = t[o].user) == null ? void 0 : l.id) === a) return t[o].id;
|
|
2734
|
-
}
|
|
2735
|
-
}, [t, a]);
|
|
2736
|
-
return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
|
|
2737
|
-
/* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
|
|
2738
|
-
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2739
|
-
] });
|
|
2740
|
-
}, Wr = () => null, Xr = () => /* @__PURE__ */ s(
|
|
2741
|
-
Xs,
|
|
2742
|
-
{
|
|
2743
|
-
MessageSentStatus: Je,
|
|
2744
|
-
MessageDeliveredStatus: Je,
|
|
2745
|
-
MessageReadStatus: Je,
|
|
2746
|
-
MessageSendingStatus: Wr
|
|
2747
|
-
}
|
|
2748
|
-
), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2749
|
-
function _t(e) {
|
|
2740
|
+
] }), Xr = /^([a-z][a-z0-9+.-]*):/i, Kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2741
|
+
function wt(e) {
|
|
2750
2742
|
if (typeof e != "string") return;
|
|
2751
2743
|
const t = e.trim();
|
|
2752
2744
|
if (t === "") return;
|
|
2753
|
-
const n =
|
|
2745
|
+
const n = Xr.exec(t);
|
|
2754
2746
|
if (n) {
|
|
2755
2747
|
const a = n[1].toLowerCase();
|
|
2756
|
-
return
|
|
2748
|
+
return Kr.has(a) ? t : void 0;
|
|
2757
2749
|
}
|
|
2758
2750
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2759
2751
|
}
|
|
2760
|
-
const
|
|
2752
|
+
const Jr = {
|
|
2761
2753
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2762
2754
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2763
|
-
},
|
|
2755
|
+
}, Zr = ({ variant: e, cta: t }) => {
|
|
2764
2756
|
const n = k(
|
|
2765
2757
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2766
|
-
|
|
2767
|
-
), a =
|
|
2758
|
+
Jr[e]
|
|
2759
|
+
), a = wt(t.href);
|
|
2768
2760
|
return a ? /* @__PURE__ */ s(
|
|
2769
2761
|
"a",
|
|
2770
2762
|
{
|
|
@@ -2790,13 +2782,13 @@ const Zr = {
|
|
|
2790
2782
|
children: t.label
|
|
2791
2783
|
}
|
|
2792
2784
|
);
|
|
2793
|
-
},
|
|
2785
|
+
}, Qr = {
|
|
2794
2786
|
dark: "text-white",
|
|
2795
2787
|
light: "text-black/90"
|
|
2796
|
-
},
|
|
2788
|
+
}, ei = "text-white/30", ti = {
|
|
2797
2789
|
dark: "text-white/55",
|
|
2798
2790
|
light: "text-black/55"
|
|
2799
|
-
},
|
|
2791
|
+
}, _t = ({
|
|
2800
2792
|
variant: e,
|
|
2801
2793
|
title: t,
|
|
2802
2794
|
placeholderTitle: n,
|
|
@@ -2806,14 +2798,14 @@ const Zr = {
|
|
|
2806
2798
|
cta: l,
|
|
2807
2799
|
trailingAction: o
|
|
2808
2800
|
}) => {
|
|
2809
|
-
const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "",
|
|
2810
|
-
if (!p && !h && !
|
|
2811
|
-
const
|
|
2801
|
+
const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", b = f !== "", c = l != null;
|
|
2802
|
+
if (!p && !h && !b && !c) return null;
|
|
2803
|
+
const v = k(
|
|
2812
2804
|
"truncate text-base font-medium leading-6",
|
|
2813
|
-
d && !t ?
|
|
2814
|
-
),
|
|
2805
|
+
d && !t ? ei : Qr[e]
|
|
2806
|
+
), g = k(
|
|
2815
2807
|
"truncate text-xs leading-4",
|
|
2816
|
-
|
|
2808
|
+
ti[e]
|
|
2817
2809
|
);
|
|
2818
2810
|
return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
|
|
2819
2811
|
/* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2821,17 +2813,17 @@ const Zr = {
|
|
|
2821
2813
|
/* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2822
2814
|
p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2823
2815
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2824
|
-
/* @__PURE__ */ s("p", { className: k("min-w-0",
|
|
2816
|
+
/* @__PURE__ */ s("p", { className: k("min-w-0", v), children: u })
|
|
2825
2817
|
] }),
|
|
2826
|
-
h && /* @__PURE__ */ s("p", { className:
|
|
2818
|
+
h && /* @__PURE__ */ s("p", { className: g, children: a })
|
|
2827
2819
|
] }),
|
|
2828
|
-
!
|
|
2820
|
+
!c && b && /* @__PURE__ */ s("p", { className: g, children: f })
|
|
2829
2821
|
] }),
|
|
2830
2822
|
o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
|
|
2831
2823
|
] }),
|
|
2832
|
-
l && /* @__PURE__ */ s(
|
|
2824
|
+
l && /* @__PURE__ */ s(Zr, { variant: e, cta: l })
|
|
2833
2825
|
] });
|
|
2834
|
-
},
|
|
2826
|
+
}, si = k(
|
|
2835
2827
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2836
2828
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2837
2829
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2850,7 +2842,7 @@ const Zr = {
|
|
|
2850
2842
|
"data-testid": d
|
|
2851
2843
|
}) => {
|
|
2852
2844
|
const u = n != null || a != null, p = k(
|
|
2853
|
-
|
|
2845
|
+
si,
|
|
2854
2846
|
o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2855
2847
|
// `focus-ring` is a design-system utility from the component-library
|
|
2856
2848
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2898,17 +2890,17 @@ const Zr = {
|
|
|
2898
2890
|
]
|
|
2899
2891
|
}
|
|
2900
2892
|
);
|
|
2901
|
-
},
|
|
2893
|
+
}, ni = {
|
|
2902
2894
|
dark: "bg-white/10",
|
|
2903
2895
|
light: "bg-black/5"
|
|
2904
|
-
},
|
|
2896
|
+
}, ai = {
|
|
2905
2897
|
dark: "size-16 text-white/25",
|
|
2906
2898
|
light: "size-16 text-black/25"
|
|
2907
|
-
}, Ve = (e, t) => !!t && !!e &&
|
|
2899
|
+
}, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Nt = (e, t) => {
|
|
2908
2900
|
if (!t || !e) return !1;
|
|
2909
|
-
const n =
|
|
2901
|
+
const n = oe(e);
|
|
2910
2902
|
return n === "video" || n === "audio";
|
|
2911
|
-
},
|
|
2903
|
+
}, yt = "bg-[#F2F3F4]", $e = ({
|
|
2912
2904
|
variant: e,
|
|
2913
2905
|
thumbnailUrl: t,
|
|
2914
2906
|
sourceUrl: n,
|
|
@@ -2917,7 +2909,7 @@ const Zr = {
|
|
|
2917
2909
|
topLeft: i,
|
|
2918
2910
|
topRight: l
|
|
2919
2911
|
}) => {
|
|
2920
|
-
const o =
|
|
2912
|
+
const o = oe(r), d = !!n && o === "video";
|
|
2921
2913
|
return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
2922
2914
|
"audio",
|
|
2923
2915
|
{
|
|
@@ -2959,10 +2951,10 @@ const Zr = {
|
|
|
2959
2951
|
{
|
|
2960
2952
|
className: k(
|
|
2961
2953
|
"flex h-full w-full items-center justify-center",
|
|
2962
|
-
|
|
2954
|
+
ni[e]
|
|
2963
2955
|
),
|
|
2964
2956
|
children: we(r, {
|
|
2965
|
-
className:
|
|
2957
|
+
className: ai[e],
|
|
2966
2958
|
weight: "regular"
|
|
2967
2959
|
})
|
|
2968
2960
|
}
|
|
@@ -2972,7 +2964,7 @@ const Zr = {
|
|
|
2972
2964
|
]
|
|
2973
2965
|
}
|
|
2974
2966
|
);
|
|
2975
|
-
},
|
|
2967
|
+
}, ri = ({
|
|
2976
2968
|
title: e,
|
|
2977
2969
|
placeholderTitle: t,
|
|
2978
2970
|
description: n,
|
|
@@ -2986,7 +2978,7 @@ const Zr = {
|
|
|
2986
2978
|
onDismiss: p,
|
|
2987
2979
|
onEditClick: h
|
|
2988
2980
|
}) => {
|
|
2989
|
-
const
|
|
2981
|
+
const f = o === "classic", b = Ve(r, l), c = p ? /* @__PURE__ */ s(
|
|
2990
2982
|
"button",
|
|
2991
2983
|
{
|
|
2992
2984
|
type: "button",
|
|
@@ -3002,10 +2994,10 @@ const Zr = {
|
|
|
3002
2994
|
onClick: h,
|
|
3003
2995
|
"aria-label": "Edit attachment",
|
|
3004
2996
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3005
|
-
children: /* @__PURE__ */ s(
|
|
2997
|
+
children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
|
|
3006
2998
|
}
|
|
3007
2999
|
) : void 0;
|
|
3008
|
-
return
|
|
3000
|
+
return b ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3009
3001
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3010
3002
|
$e,
|
|
3011
3003
|
{
|
|
@@ -3015,14 +3007,14 @@ const Zr = {
|
|
|
3015
3007
|
mimeType: r
|
|
3016
3008
|
}
|
|
3017
3009
|
) }),
|
|
3018
|
-
|
|
3010
|
+
c && /* @__PURE__ */ s("div", { className: "shrink-0", children: c })
|
|
3019
3011
|
] }) }) : /* @__PURE__ */ m(
|
|
3020
3012
|
Oe,
|
|
3021
3013
|
{
|
|
3022
3014
|
variant: "dark",
|
|
3023
|
-
topRight:
|
|
3015
|
+
topRight: f ? c : void 0,
|
|
3024
3016
|
children: [
|
|
3025
|
-
!
|
|
3017
|
+
!f && /* @__PURE__ */ s(
|
|
3026
3018
|
$e,
|
|
3027
3019
|
{
|
|
3028
3020
|
variant: "dark",
|
|
@@ -3030,11 +3022,11 @@ const Zr = {
|
|
|
3030
3022
|
sourceUrl: l,
|
|
3031
3023
|
title: e,
|
|
3032
3024
|
mimeType: r,
|
|
3033
|
-
topRight:
|
|
3025
|
+
topRight: c
|
|
3034
3026
|
}
|
|
3035
3027
|
),
|
|
3036
3028
|
/* @__PURE__ */ s(
|
|
3037
|
-
|
|
3029
|
+
_t,
|
|
3038
3030
|
{
|
|
3039
3031
|
variant: "dark",
|
|
3040
3032
|
title: e,
|
|
@@ -3049,7 +3041,7 @@ const Zr = {
|
|
|
3049
3041
|
]
|
|
3050
3042
|
}
|
|
3051
3043
|
);
|
|
3052
|
-
},
|
|
3044
|
+
}, ii = ({
|
|
3053
3045
|
title: e,
|
|
3054
3046
|
description: t,
|
|
3055
3047
|
url: n,
|
|
@@ -3061,21 +3053,21 @@ const Zr = {
|
|
|
3061
3053
|
cta: d,
|
|
3062
3054
|
onClick: u
|
|
3063
3055
|
}) => {
|
|
3064
|
-
const p =
|
|
3056
|
+
const p = Nt(a, i), h = wt(n), f = d == null && h != null && !p ? h : void 0, b = d == null && !p ? u : void 0, c = Ve(a, i) ? yt : void 0, w = d && u ? {
|
|
3065
3057
|
...d,
|
|
3066
3058
|
onClick: () => {
|
|
3067
|
-
var
|
|
3068
|
-
u(), (
|
|
3059
|
+
var v;
|
|
3060
|
+
u(), (v = d.onClick) == null || v.call(d);
|
|
3069
3061
|
}
|
|
3070
3062
|
} : d;
|
|
3071
3063
|
return /* @__PURE__ */ m(
|
|
3072
3064
|
Oe,
|
|
3073
3065
|
{
|
|
3074
3066
|
variant: "light",
|
|
3075
|
-
href:
|
|
3076
|
-
onClick:
|
|
3067
|
+
href: f,
|
|
3068
|
+
onClick: b,
|
|
3077
3069
|
ariaLabel: e ?? "Open attachment preview",
|
|
3078
|
-
bgClassName:
|
|
3070
|
+
bgClassName: c,
|
|
3079
3071
|
"data-testid": "link-attachment",
|
|
3080
3072
|
children: [
|
|
3081
3073
|
l === "featured" && /* @__PURE__ */ s(
|
|
@@ -3089,7 +3081,7 @@ const Zr = {
|
|
|
3089
3081
|
}
|
|
3090
3082
|
),
|
|
3091
3083
|
/* @__PURE__ */ s(
|
|
3092
|
-
|
|
3084
|
+
_t,
|
|
3093
3085
|
{
|
|
3094
3086
|
variant: "light",
|
|
3095
3087
|
title: e,
|
|
@@ -3102,7 +3094,7 @@ const Zr = {
|
|
|
3102
3094
|
]
|
|
3103
3095
|
}
|
|
3104
3096
|
);
|
|
3105
|
-
},
|
|
3097
|
+
}, li = ({
|
|
3106
3098
|
title: e,
|
|
3107
3099
|
placeholderTitle: t,
|
|
3108
3100
|
description: n,
|
|
@@ -3115,14 +3107,14 @@ const Zr = {
|
|
|
3115
3107
|
cta: u,
|
|
3116
3108
|
onClick: p
|
|
3117
3109
|
}) => {
|
|
3118
|
-
const h =
|
|
3110
|
+
const h = Nt(r, l), f = wt(a), b = u == null && f != null && !h ? f : void 0, c = u == null && !h && b != null ? p : void 0;
|
|
3119
3111
|
return /* @__PURE__ */ m(
|
|
3120
3112
|
Oe,
|
|
3121
3113
|
{
|
|
3122
3114
|
variant: "dark",
|
|
3123
|
-
href:
|
|
3124
|
-
onClick:
|
|
3125
|
-
bgClassName: Ve(r, l) ?
|
|
3115
|
+
href: b,
|
|
3116
|
+
onClick: c,
|
|
3117
|
+
bgClassName: Ve(r, l) ? yt : void 0,
|
|
3126
3118
|
children: [
|
|
3127
3119
|
o === "featured" && /* @__PURE__ */ s(
|
|
3128
3120
|
$e,
|
|
@@ -3135,7 +3127,7 @@ const Zr = {
|
|
|
3135
3127
|
}
|
|
3136
3128
|
),
|
|
3137
3129
|
/* @__PURE__ */ s(
|
|
3138
|
-
|
|
3130
|
+
_t,
|
|
3139
3131
|
{
|
|
3140
3132
|
variant: "dark",
|
|
3141
3133
|
title: e,
|
|
@@ -3150,10 +3142,10 @@ const Zr = {
|
|
|
3150
3142
|
}
|
|
3151
3143
|
);
|
|
3152
3144
|
}, es = {
|
|
3153
|
-
Composer:
|
|
3154
|
-
Sent:
|
|
3155
|
-
Received:
|
|
3156
|
-
},
|
|
3145
|
+
Composer: ri,
|
|
3146
|
+
Sent: li,
|
|
3147
|
+
Received: ii
|
|
3148
|
+
}, oi = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
|
|
3157
3149
|
function P(e) {
|
|
3158
3150
|
const t = e == null ? void 0 : e.trim();
|
|
3159
3151
|
return t || void 0;
|
|
@@ -3161,7 +3153,7 @@ function P(e) {
|
|
|
3161
3153
|
function ts(e) {
|
|
3162
3154
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3163
3155
|
}
|
|
3164
|
-
function
|
|
3156
|
+
function di(e, t) {
|
|
3165
3157
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3166
3158
|
return !1;
|
|
3167
3159
|
const n = ts(e), a = ts(t);
|
|
@@ -3182,11 +3174,11 @@ function ss(e) {
|
|
|
3182
3174
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3183
3175
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3184
3176
|
sourceUrl: a,
|
|
3185
|
-
layout: n ||
|
|
3177
|
+
layout: n || Nt(r, a) ? "featured" : "classic",
|
|
3186
3178
|
mimeType: r
|
|
3187
3179
|
};
|
|
3188
3180
|
}
|
|
3189
|
-
function
|
|
3181
|
+
function ui(e) {
|
|
3190
3182
|
var t;
|
|
3191
3183
|
return Ps(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;
|
|
3192
3184
|
}
|
|
@@ -3216,41 +3208,41 @@ function Fs(e) {
|
|
|
3216
3208
|
a(r);
|
|
3217
3209
|
continue;
|
|
3218
3210
|
}
|
|
3219
|
-
const i =
|
|
3211
|
+
const i = ui(r);
|
|
3220
3212
|
i && n(i, r);
|
|
3221
3213
|
}
|
|
3222
3214
|
return t;
|
|
3223
3215
|
}
|
|
3224
|
-
function
|
|
3216
|
+
function mi(e) {
|
|
3225
3217
|
let t = 0;
|
|
3226
3218
|
for (const n of e)
|
|
3227
3219
|
t += n.type === "link" ? n.attachments.length : 1;
|
|
3228
3220
|
return t;
|
|
3229
3221
|
}
|
|
3230
|
-
function
|
|
3222
|
+
function hi(e) {
|
|
3231
3223
|
return e.filter((t) => t.type === "media").length;
|
|
3232
3224
|
}
|
|
3233
|
-
function
|
|
3225
|
+
function fi(e, t, n) {
|
|
3234
3226
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3235
3227
|
}
|
|
3236
3228
|
function ns(e) {
|
|
3237
3229
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3238
3230
|
}
|
|
3239
|
-
function
|
|
3231
|
+
function gi(e) {
|
|
3240
3232
|
switch (e) {
|
|
3241
3233
|
case "image":
|
|
3242
|
-
return
|
|
3234
|
+
return Ne.Image;
|
|
3243
3235
|
case "video":
|
|
3244
|
-
return
|
|
3236
|
+
return Ne.Video;
|
|
3245
3237
|
case "audio":
|
|
3246
|
-
return
|
|
3238
|
+
return Ne.Audio;
|
|
3247
3239
|
case "pdf":
|
|
3248
|
-
return
|
|
3240
|
+
return Ne.Pdf;
|
|
3249
3241
|
default:
|
|
3250
|
-
return
|
|
3242
|
+
return Ne.File;
|
|
3251
3243
|
}
|
|
3252
3244
|
}
|
|
3253
|
-
function
|
|
3245
|
+
function pi(e, t) {
|
|
3254
3246
|
if (t.length > 1)
|
|
3255
3247
|
switch (e) {
|
|
3256
3248
|
case "image":
|
|
@@ -3337,20 +3329,20 @@ function bi(e, t) {
|
|
|
3337
3329
|
};
|
|
3338
3330
|
}
|
|
3339
3331
|
}
|
|
3340
|
-
function
|
|
3332
|
+
function bi({
|
|
3341
3333
|
groupPosition: e,
|
|
3342
3334
|
isMyMessage: t,
|
|
3343
3335
|
segment: n,
|
|
3344
3336
|
text: a
|
|
3345
3337
|
}) {
|
|
3346
|
-
const r =
|
|
3347
|
-
...
|
|
3338
|
+
const r = gi(n.kind), i = {
|
|
3339
|
+
...pi(n.kind, n.attachments),
|
|
3348
3340
|
groupPosition: e,
|
|
3349
3341
|
...a ? { text: a } : {}
|
|
3350
3342
|
};
|
|
3351
3343
|
return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
|
|
3352
3344
|
}
|
|
3353
|
-
const
|
|
3345
|
+
const vi = ({
|
|
3354
3346
|
groupPosition: e,
|
|
3355
3347
|
isMyMessage: t,
|
|
3356
3348
|
message: n
|
|
@@ -3358,48 +3350,48 @@ const xi = ({
|
|
|
3358
3350
|
var w;
|
|
3359
3351
|
const a = Fs(n.attachments);
|
|
3360
3352
|
if (a.length === 0) return null;
|
|
3361
|
-
const r =
|
|
3353
|
+
const r = mi(a), i = hi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((v) => v.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && di(l, d) ? void 0 : l;
|
|
3362
3354
|
let p = 0, h = 0;
|
|
3363
|
-
const
|
|
3355
|
+
const f = [], b = (v, g) => {
|
|
3364
3356
|
const x = p === r - 1;
|
|
3365
3357
|
p += 1;
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3358
|
+
const _ = t ? es.Sent : es.Received;
|
|
3359
|
+
f.push(
|
|
3368
3360
|
/* @__PURE__ */ m(U.Fragment, { children: [
|
|
3369
|
-
/* @__PURE__ */ s(
|
|
3370
|
-
x && u ? /* @__PURE__ */ s("div", { className: t ?
|
|
3371
|
-
] },
|
|
3361
|
+
/* @__PURE__ */ s(_, { ...ss(v) }),
|
|
3362
|
+
x && u ? /* @__PURE__ */ s("div", { className: t ? oi : ci, children: u }) : null
|
|
3363
|
+
] }, g)
|
|
3372
3364
|
);
|
|
3373
|
-
},
|
|
3374
|
-
const x = p === r - 1,
|
|
3365
|
+
}, c = (v, g) => {
|
|
3366
|
+
const x = p === r - 1, _ = fi(
|
|
3375
3367
|
h,
|
|
3376
3368
|
i,
|
|
3377
3369
|
e
|
|
3378
3370
|
);
|
|
3379
|
-
p += 1, h += 1,
|
|
3371
|
+
p += 1, h += 1, f.push(
|
|
3380
3372
|
/* @__PURE__ */ s(
|
|
3381
|
-
|
|
3373
|
+
bi,
|
|
3382
3374
|
{
|
|
3383
|
-
groupPosition:
|
|
3375
|
+
groupPosition: _,
|
|
3384
3376
|
isMyMessage: t,
|
|
3385
|
-
segment:
|
|
3377
|
+
segment: v,
|
|
3386
3378
|
text: x ? u : void 0
|
|
3387
3379
|
},
|
|
3388
|
-
|
|
3380
|
+
g
|
|
3389
3381
|
)
|
|
3390
3382
|
);
|
|
3391
3383
|
};
|
|
3392
|
-
return a.forEach((
|
|
3393
|
-
if (
|
|
3394
|
-
|
|
3395
|
-
|
|
3384
|
+
return a.forEach((v, g) => {
|
|
3385
|
+
if (v.type === "link") {
|
|
3386
|
+
v.attachments.forEach((x, _) => {
|
|
3387
|
+
b(x, `link-${g}-${_}`);
|
|
3396
3388
|
});
|
|
3397
3389
|
return;
|
|
3398
3390
|
}
|
|
3399
|
-
v
|
|
3400
|
-
}), /* @__PURE__ */ s(
|
|
3401
|
-
},
|
|
3402
|
-
var At, Mt, Rt,
|
|
3391
|
+
c(v, `media-${g}`);
|
|
3392
|
+
}), /* @__PURE__ */ s(te, { children: f });
|
|
3393
|
+
}, xi = (e) => {
|
|
3394
|
+
var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
|
|
3403
3395
|
const {
|
|
3404
3396
|
additionalMessageInputProps: t,
|
|
3405
3397
|
chatbotVotingEnabled: n,
|
|
@@ -3407,92 +3399,93 @@ const xi = ({
|
|
|
3407
3399
|
endOfGroup: r,
|
|
3408
3400
|
firstOfGroup: i,
|
|
3409
3401
|
groupedByUser: l,
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3402
|
+
groupStyles: o,
|
|
3403
|
+
handleAction: d,
|
|
3404
|
+
handleOpenThread: u,
|
|
3405
|
+
handleRetry: p,
|
|
3406
|
+
highlighted: h,
|
|
3407
|
+
isMessageAIGenerated: f,
|
|
3408
|
+
isMyMessage: b,
|
|
3416
3409
|
message: c,
|
|
3417
|
-
renderText:
|
|
3418
|
-
threadList:
|
|
3419
|
-
viewerLanguage:
|
|
3420
|
-
} = e, { client:
|
|
3421
|
-
Attachment:
|
|
3422
|
-
EditMessageModal:
|
|
3423
|
-
MessageActions:
|
|
3424
|
-
MessageBlocked:
|
|
3425
|
-
MessageBouncePrompt:
|
|
3426
|
-
MessageDeleted:
|
|
3427
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
3428
|
-
MessageRepliesCountButton:
|
|
3429
|
-
ReminderNotification:
|
|
3430
|
-
StreamedMessageText:
|
|
3431
|
-
PinIndicator:
|
|
3432
|
-
} = is("CustomMessage"),
|
|
3433
|
-
() =>
|
|
3434
|
-
[
|
|
3435
|
-
), j =
|
|
3436
|
-
const
|
|
3410
|
+
renderText: w,
|
|
3411
|
+
threadList: v,
|
|
3412
|
+
viewerLanguage: g
|
|
3413
|
+
} = e, { client: x } = me("CustomMessage"), { channel: _ } = ue("CustomMessage"), { isUnlocking: A, onUnlockClick: S, onFetchSource: I, onDownloadClick: L } = jr("LockedAttachment"), [D, $] = B(!1), z = Ks(c.id), { selected: y, voteUp: M, voteDown: E } = va(c), {
|
|
3414
|
+
Attachment: C = Js,
|
|
3415
|
+
EditMessageModal: T = Zs,
|
|
3416
|
+
MessageActions: F,
|
|
3417
|
+
MessageBlocked: O = Qs,
|
|
3418
|
+
MessageBouncePrompt: V = en,
|
|
3419
|
+
MessageDeleted: Z = tn,
|
|
3420
|
+
MessageIsThreadReplyInChannelButtonIndicator: ee = sn,
|
|
3421
|
+
MessageRepliesCountButton: X = nn,
|
|
3422
|
+
ReminderNotification: N = an,
|
|
3423
|
+
StreamedMessageText: R = rn,
|
|
3424
|
+
PinIndicator: G
|
|
3425
|
+
} = is("CustomMessage"), Y = ln(c), q = on(c), W = ae(
|
|
3426
|
+
() => f == null ? void 0 : f(c),
|
|
3427
|
+
[f, c]
|
|
3428
|
+
), j = ae(() => {
|
|
3429
|
+
const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
|
|
3437
3430
|
if (!Fe(c)) return pe;
|
|
3438
3431
|
const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
|
|
3439
3432
|
return Gt.length === pe.length ? pe : Gt;
|
|
3440
|
-
}, [c]),
|
|
3433
|
+
}, [c]), Q = ae(
|
|
3441
3434
|
() => Fs(j),
|
|
3442
3435
|
[j]
|
|
3443
|
-
),
|
|
3444
|
-
const
|
|
3445
|
-
return
|
|
3446
|
-
}, [c,
|
|
3447
|
-
(
|
|
3436
|
+
), se = ae(() => {
|
|
3437
|
+
const de = hs({ message: c, viewerLanguage: g });
|
|
3438
|
+
return de === c.text ? c : { ...c, text: de };
|
|
3439
|
+
}, [c, g]), Le = Q.length > 0, De = Q.reduce(
|
|
3440
|
+
(de, pe) => de + pe.attachments.length,
|
|
3448
3441
|
0
|
|
3449
|
-
) === ((j == null ? void 0 : j.length) ?? 0),
|
|
3442
|
+
) === ((j == null ? void 0 : j.length) ?? 0), ie = Wa(
|
|
3450
3443
|
{
|
|
3451
3444
|
endOfGroup: r,
|
|
3452
3445
|
firstOfGroup: i,
|
|
3453
3446
|
groupedByUser: l
|
|
3454
3447
|
}
|
|
3455
3448
|
);
|
|
3456
|
-
if (
|
|
3449
|
+
if (cn(c))
|
|
3457
3450
|
return null;
|
|
3458
3451
|
if (c.deleted_at || c.type === "deleted")
|
|
3459
|
-
return /* @__PURE__ */ s(
|
|
3460
|
-
if (
|
|
3461
|
-
return /* @__PURE__ */ s(
|
|
3462
|
-
const
|
|
3452
|
+
return /* @__PURE__ */ s(Z, { message: c });
|
|
3453
|
+
if (dn(c))
|
|
3454
|
+
return /* @__PURE__ */ s(O, {});
|
|
3455
|
+
const ce = !v && !!c.reply_count, le = !v && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, Et = un(c);
|
|
3463
3456
|
let he;
|
|
3464
|
-
|
|
3465
|
-
const fe =
|
|
3457
|
+
Ct ? he = () => p(c) : Et && (he = () => $(!0));
|
|
3458
|
+
const fe = b(), Us = k(
|
|
3466
3459
|
"str-chat__message str-chat__message-simple",
|
|
3467
3460
|
`str-chat__message--${c.type}`,
|
|
3468
3461
|
`str-chat__message--${c.status}`,
|
|
3469
3462
|
fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
3470
3463
|
c.text ? "str-chat__message--has-text" : "has-no-text",
|
|
3471
3464
|
{
|
|
3472
|
-
"str-chat__message--has-attachment":
|
|
3473
|
-
"str-chat__message--highlighted":
|
|
3465
|
+
"str-chat__message--has-attachment": Y,
|
|
3466
|
+
"str-chat__message--highlighted": h,
|
|
3474
3467
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3475
3468
|
"str-chat__message--with-reactions": q,
|
|
3476
3469
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
|
|
3477
|
-
"str-chat__message-with-thread-link":
|
|
3470
|
+
"str-chat__message-with-thread-link": ce || le,
|
|
3478
3471
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3479
3472
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3480
3473
|
"str-chat__virtual-message__wrapper--group": l
|
|
3481
3474
|
}
|
|
3482
|
-
), Ge = c.poll_id &&
|
|
3483
|
-
return /* @__PURE__ */ m(
|
|
3475
|
+
), Ge = c.poll_id && x.polls.fromState(c.poll_id), St = qr(c), ge = Fe(c), It = Yr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = Le && De && !c.quoted_message && !Ge && !W && !ge;
|
|
3476
|
+
return /* @__PURE__ */ m(te, { children: [
|
|
3484
3477
|
a && /* @__PURE__ */ s(
|
|
3485
|
-
|
|
3478
|
+
T,
|
|
3486
3479
|
{
|
|
3487
3480
|
additionalMessageInputProps: t
|
|
3488
3481
|
}
|
|
3489
3482
|
),
|
|
3490
|
-
|
|
3491
|
-
|
|
3483
|
+
D && /* @__PURE__ */ s(
|
|
3484
|
+
mn,
|
|
3492
3485
|
{
|
|
3493
|
-
MessageBouncePrompt:
|
|
3494
|
-
onClose: () =>
|
|
3495
|
-
open:
|
|
3486
|
+
MessageBouncePrompt: V,
|
|
3487
|
+
onClose: () => $(!1),
|
|
3488
|
+
open: D
|
|
3496
3489
|
}
|
|
3497
3490
|
),
|
|
3498
3491
|
/* @__PURE__ */ m(
|
|
@@ -3502,8 +3495,8 @@ const xi = ({
|
|
|
3502
3495
|
"data-message-id": c.id,
|
|
3503
3496
|
"data-dd-privacy": "mask",
|
|
3504
3497
|
children: [
|
|
3505
|
-
|
|
3506
|
-
!!
|
|
3498
|
+
G && /* @__PURE__ */ s(G, {}),
|
|
3499
|
+
!!z && /* @__PURE__ */ s(N, { reminder: z }),
|
|
3507
3500
|
c.user && /* @__PURE__ */ s(
|
|
3508
3501
|
ne,
|
|
3509
3502
|
{
|
|
@@ -3520,7 +3513,7 @@ const xi = ({
|
|
|
3520
3513
|
"div",
|
|
3521
3514
|
{
|
|
3522
3515
|
className: k("str-chat__message-inner", {
|
|
3523
|
-
"str-chat__simple-message--error-failed":
|
|
3516
|
+
"str-chat__simple-message--error-failed": Ct || Et
|
|
3524
3517
|
}),
|
|
3525
3518
|
"data-testid": "message-inner",
|
|
3526
3519
|
onClick: he,
|
|
@@ -3535,18 +3528,18 @@ const xi = ({
|
|
|
3535
3528
|
},
|
|
3536
3529
|
children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3537
3530
|
fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
3538
|
-
|
|
3531
|
+
F && /* @__PURE__ */ s(F, {}),
|
|
3539
3532
|
/* @__PURE__ */ s(
|
|
3540
3533
|
Zt.Sent,
|
|
3541
3534
|
{
|
|
3542
3535
|
title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
|
|
3543
|
-
mimeType: (
|
|
3544
|
-
thumbnailUrl: (
|
|
3536
|
+
mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
|
|
3537
|
+
thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
|
|
3545
3538
|
amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
|
|
3546
3539
|
detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
|
|
3547
3540
|
paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
|
|
3548
|
-
onPreviewClick: () => S == null ? void 0 : S(c,
|
|
3549
|
-
onFetchSource: async () => await (
|
|
3541
|
+
onPreviewClick: () => S == null ? void 0 : S(c, _),
|
|
3542
|
+
onFetchSource: async () => await (I == null ? void 0 : I(c, _))
|
|
3550
3543
|
}
|
|
3551
3544
|
)
|
|
3552
3545
|
] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3559,22 +3552,22 @@ const xi = ({
|
|
|
3559
3552
|
amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
|
|
3560
3553
|
detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
|
|
3561
3554
|
paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
|
|
3562
|
-
isUnlocking:
|
|
3563
|
-
onUnlockClick: () => S == null ? void 0 : S(c,
|
|
3564
|
-
onFetchSource: async () => await (
|
|
3565
|
-
onDownloadClick: () =>
|
|
3555
|
+
isUnlocking: A(c.id),
|
|
3556
|
+
onUnlockClick: () => S == null ? void 0 : S(c, _),
|
|
3557
|
+
onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
|
|
3558
|
+
onDownloadClick: () => L == null ? void 0 : L(c, _)
|
|
3566
3559
|
}
|
|
3567
3560
|
),
|
|
3568
|
-
|
|
3561
|
+
F && /* @__PURE__ */ s(F, {})
|
|
3569
3562
|
] }),
|
|
3570
3563
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3571
3564
|
qt,
|
|
3572
3565
|
{
|
|
3573
|
-
message:
|
|
3574
|
-
renderText:
|
|
3566
|
+
message: se,
|
|
3567
|
+
renderText: w
|
|
3575
3568
|
}
|
|
3576
3569
|
) })
|
|
3577
|
-
] }) :
|
|
3570
|
+
] }) : St ? (
|
|
3578
3571
|
/* Tip-only messages render as a standalone bubble */
|
|
3579
3572
|
/* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
|
|
3580
3573
|
) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
|
|
@@ -3589,13 +3582,13 @@ const xi = ({
|
|
|
3589
3582
|
},
|
|
3590
3583
|
children: [
|
|
3591
3584
|
/* @__PURE__ */ s(
|
|
3592
|
-
|
|
3585
|
+
vi,
|
|
3593
3586
|
{
|
|
3594
|
-
groupPosition:
|
|
3587
|
+
groupPosition: ie,
|
|
3595
3588
|
isMyMessage: fe,
|
|
3596
3589
|
message: {
|
|
3597
3590
|
attachments: j,
|
|
3598
|
-
text:
|
|
3591
|
+
text: se.text
|
|
3599
3592
|
}
|
|
3600
3593
|
}
|
|
3601
3594
|
),
|
|
@@ -3611,32 +3604,32 @@ const xi = ({
|
|
|
3611
3604
|
isMyMessage: fe
|
|
3612
3605
|
}
|
|
3613
3606
|
),
|
|
3614
|
-
Ge && /* @__PURE__ */ s(
|
|
3607
|
+
Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
|
|
3615
3608
|
j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3616
|
-
|
|
3609
|
+
C,
|
|
3617
3610
|
{
|
|
3618
|
-
actionHandler:
|
|
3611
|
+
actionHandler: d,
|
|
3619
3612
|
attachments: j
|
|
3620
3613
|
}
|
|
3621
3614
|
) : null,
|
|
3622
|
-
|
|
3623
|
-
|
|
3615
|
+
W ? /* @__PURE__ */ s(
|
|
3616
|
+
R,
|
|
3624
3617
|
{
|
|
3625
|
-
message:
|
|
3626
|
-
renderText:
|
|
3618
|
+
message: se,
|
|
3619
|
+
renderText: w
|
|
3627
3620
|
}
|
|
3628
3621
|
) : /* @__PURE__ */ s(
|
|
3629
3622
|
qt,
|
|
3630
3623
|
{
|
|
3631
|
-
message:
|
|
3632
|
-
renderText:
|
|
3624
|
+
message: se,
|
|
3625
|
+
renderText: w
|
|
3633
3626
|
}
|
|
3634
3627
|
),
|
|
3635
3628
|
/* @__PURE__ */ s(Wt, {})
|
|
3636
3629
|
] }) })
|
|
3637
3630
|
}
|
|
3638
3631
|
),
|
|
3639
|
-
!It && !
|
|
3632
|
+
!It && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
|
|
3640
3633
|
(!ge || Tt) && /* @__PURE__ */ s(
|
|
3641
3634
|
Ke,
|
|
3642
3635
|
{
|
|
@@ -3646,37 +3639,37 @@ const xi = ({
|
|
|
3646
3639
|
}
|
|
3647
3640
|
),
|
|
3648
3641
|
n && ge && /* @__PURE__ */ s(
|
|
3649
|
-
|
|
3642
|
+
Wr,
|
|
3650
3643
|
{
|
|
3651
|
-
selected:
|
|
3652
|
-
onVoteUp:
|
|
3653
|
-
onVoteDown:
|
|
3644
|
+
selected: y,
|
|
3645
|
+
onVoteUp: M,
|
|
3646
|
+
onVoteDown: E
|
|
3654
3647
|
}
|
|
3655
3648
|
)
|
|
3656
3649
|
] }),
|
|
3657
|
-
/* @__PURE__ */ s(
|
|
3658
|
-
|
|
3659
|
-
|
|
3650
|
+
/* @__PURE__ */ s(Ur, { message: c, groupStyles: o }),
|
|
3651
|
+
ce && /* @__PURE__ */ s(
|
|
3652
|
+
X,
|
|
3660
3653
|
{
|
|
3661
|
-
onClick:
|
|
3654
|
+
onClick: u,
|
|
3662
3655
|
reply_count: c.reply_count
|
|
3663
3656
|
}
|
|
3664
3657
|
),
|
|
3665
|
-
|
|
3658
|
+
le && /* @__PURE__ */ s(ee, {})
|
|
3666
3659
|
]
|
|
3667
3660
|
},
|
|
3668
3661
|
c.id
|
|
3669
3662
|
)
|
|
3670
3663
|
] });
|
|
3671
|
-
},
|
|
3672
|
-
|
|
3673
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
3674
|
-
),
|
|
3675
|
-
const t =
|
|
3676
|
-
return /* @__PURE__ */ s(
|
|
3677
|
-
},
|
|
3664
|
+
}, wi = U.memo(
|
|
3665
|
+
xi,
|
|
3666
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
|
|
3667
|
+
), _i = (e) => {
|
|
3668
|
+
const t = Ie("CustomMessage");
|
|
3669
|
+
return /* @__PURE__ */ s(wi, { ...t, ...e });
|
|
3670
|
+
}, Ni = () => {
|
|
3678
3671
|
var n;
|
|
3679
|
-
const { handleDelete: e, message: t } =
|
|
3672
|
+
const { handleDelete: e, message: t } = Ie("CustomMessageActions");
|
|
3680
3673
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
3681
3674
|
ds,
|
|
3682
3675
|
{
|
|
@@ -3684,11 +3677,11 @@ const xi = ({
|
|
|
3684
3677
|
"aria-label": "Delete",
|
|
3685
3678
|
title: "Delete",
|
|
3686
3679
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
3687
|
-
children: /* @__PURE__ */ s(
|
|
3680
|
+
children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3688
3681
|
}
|
|
3689
3682
|
);
|
|
3690
|
-
},
|
|
3691
|
-
const { handleFlag: e } =
|
|
3683
|
+
}, yi = () => {
|
|
3684
|
+
const { handleFlag: e } = Ie("CustomMessageActions");
|
|
3692
3685
|
return /* @__PURE__ */ s(
|
|
3693
3686
|
ds,
|
|
3694
3687
|
{
|
|
@@ -3699,19 +3692,19 @@ const xi = ({
|
|
|
3699
3692
|
children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3700
3693
|
}
|
|
3701
3694
|
);
|
|
3702
|
-
},
|
|
3695
|
+
}, ki = () => {
|
|
3703
3696
|
var t;
|
|
3704
|
-
const { message: e } =
|
|
3697
|
+
const { message: e } = Ie("CustomMessageActions");
|
|
3705
3698
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3706
|
-
|
|
3699
|
+
ea,
|
|
3707
3700
|
{
|
|
3708
3701
|
messageActionSet: [
|
|
3709
|
-
{ Component:
|
|
3710
|
-
{ Component:
|
|
3702
|
+
{ Component: Ni, placement: "quick", type: "delete" },
|
|
3703
|
+
{ Component: yi, placement: "quick", type: "flag" }
|
|
3711
3704
|
]
|
|
3712
3705
|
}
|
|
3713
3706
|
);
|
|
3714
|
-
},
|
|
3707
|
+
}, Ci = ({
|
|
3715
3708
|
link: e,
|
|
3716
3709
|
onDismiss: t
|
|
3717
3710
|
}) => {
|
|
@@ -3755,8 +3748,8 @@ const xi = ({
|
|
|
3755
3748
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3756
3749
|
(t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
|
|
3757
3750
|
)
|
|
3758
|
-
}),
|
|
3759
|
-
const { linkPreviewsManager: e } =
|
|
3751
|
+
}), Si = () => {
|
|
3752
|
+
const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
|
|
3760
3753
|
e.state,
|
|
3761
3754
|
Ei
|
|
3762
3755
|
), n = (r) => {
|
|
@@ -3771,9 +3764,9 @@ const xi = ({
|
|
|
3771
3764
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3772
3765
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3773
3766
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3774
|
-
/* @__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(
|
|
3767
|
+
/* @__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(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3775
3768
|
) : null;
|
|
3776
|
-
},
|
|
3769
|
+
}, kt = U.createContext(!1), ml = () => Se(kt), Ii = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3777
3770
|
"button",
|
|
3778
3771
|
{
|
|
3779
3772
|
...n,
|
|
@@ -3781,12 +3774,12 @@ const xi = ({
|
|
|
3781
3774
|
"aria-label": "Send",
|
|
3782
3775
|
disabled: t,
|
|
3783
3776
|
onClick: e,
|
|
3784
|
-
children: /* @__PURE__ */ s(
|
|
3777
|
+
children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
|
|
3785
3778
|
}
|
|
3786
|
-
),
|
|
3787
|
-
const e =
|
|
3788
|
-
SendButton: r =
|
|
3789
|
-
AttachmentPreviewList: i =
|
|
3779
|
+
), Ti = () => {
|
|
3780
|
+
const e = Se(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
|
|
3781
|
+
SendButton: r = Ii,
|
|
3782
|
+
AttachmentPreviewList: i = xn
|
|
3790
3783
|
} = is("CustomMessageInput");
|
|
3791
3784
|
return (
|
|
3792
3785
|
// min-h-0 lets the composer shrink under keyboard squeeze (the link
|
|
@@ -3803,12 +3796,12 @@ const xi = ({
|
|
|
3803
3796
|
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)]",
|
|
3804
3797
|
"data-dd-privacy": "mask",
|
|
3805
3798
|
children: [
|
|
3806
|
-
/* @__PURE__ */ s(
|
|
3807
|
-
/* @__PURE__ */ s(
|
|
3799
|
+
/* @__PURE__ */ s(wn, {}),
|
|
3800
|
+
/* @__PURE__ */ s(Si, {}),
|
|
3808
3801
|
/* @__PURE__ */ s(i, {}),
|
|
3809
3802
|
/* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
|
|
3810
3803
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3811
|
-
|
|
3804
|
+
_n,
|
|
3812
3805
|
{
|
|
3813
3806
|
"aria-disabled": e || void 0,
|
|
3814
3807
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -3834,7 +3827,7 @@ const xi = ({
|
|
|
3834
3827
|
}
|
|
3835
3828
|
)
|
|
3836
3829
|
);
|
|
3837
|
-
},
|
|
3830
|
+
}, Ai = ({
|
|
3838
3831
|
renderActions: e,
|
|
3839
3832
|
renderFooter: t,
|
|
3840
3833
|
disabled: n = !1,
|
|
@@ -3842,8 +3835,8 @@ const xi = ({
|
|
|
3842
3835
|
composerInput: r
|
|
3843
3836
|
}) => {
|
|
3844
3837
|
var o;
|
|
3845
|
-
const { channel: i } =
|
|
3846
|
-
return n ? /* @__PURE__ */ m(
|
|
3838
|
+
const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
|
|
3839
|
+
return n ? /* @__PURE__ */ m(te, { children: [
|
|
3847
3840
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
3848
3841
|
t == null ? void 0 : t()
|
|
3849
3842
|
] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
@@ -3855,23 +3848,23 @@ const xi = ({
|
|
|
3855
3848
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3856
3849
|
children: [
|
|
3857
3850
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3858
|
-
/* @__PURE__ */ s(
|
|
3851
|
+
/* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ti }) })
|
|
3859
3852
|
]
|
|
3860
3853
|
}
|
|
3861
3854
|
),
|
|
3862
3855
|
t == null ? void 0 : t()
|
|
3863
3856
|
] });
|
|
3864
|
-
},
|
|
3857
|
+
}, Mi = [
|
|
3865
3858
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3866
3859
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3867
|
-
],
|
|
3860
|
+
], Ri = {
|
|
3868
3861
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3869
3862
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3870
3863
|
}, Li = [
|
|
3871
3864
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3872
|
-
],
|
|
3865
|
+
], Di = {
|
|
3873
3866
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3874
|
-
},
|
|
3867
|
+
}, Je = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", as = (e) => Mi.includes(e), Pi = (e) => Li.includes(e), Fi = (e) => {
|
|
3875
3868
|
var a;
|
|
3876
3869
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3877
3870
|
if (as(t))
|
|
@@ -3879,7 +3872,7 @@ const xi = ({
|
|
|
3879
3872
|
kind: "dm-agent",
|
|
3880
3873
|
type: t
|
|
3881
3874
|
};
|
|
3882
|
-
if (
|
|
3875
|
+
if (Pi(t))
|
|
3883
3876
|
return {
|
|
3884
3877
|
kind: "age-safety",
|
|
3885
3878
|
type: t
|
|
@@ -3890,32 +3883,32 @@ const xi = ({
|
|
|
3890
3883
|
kind: "dm-agent",
|
|
3891
3884
|
type: n
|
|
3892
3885
|
};
|
|
3893
|
-
},
|
|
3894
|
-
const t = e.indexOf(
|
|
3886
|
+
}, Oi = (e) => {
|
|
3887
|
+
const t = e.indexOf(Je);
|
|
3895
3888
|
if (t === -1)
|
|
3896
3889
|
return e;
|
|
3897
|
-
const n = t +
|
|
3898
|
-
return /* @__PURE__ */ m(
|
|
3890
|
+
const n = t + Je.length;
|
|
3891
|
+
return /* @__PURE__ */ m(te, { children: [
|
|
3899
3892
|
e.slice(0, t),
|
|
3900
3893
|
/* @__PURE__ */ s(
|
|
3901
3894
|
"a",
|
|
3902
3895
|
{
|
|
3903
|
-
href:
|
|
3896
|
+
href: zi,
|
|
3904
3897
|
target: "_blank",
|
|
3905
3898
|
rel: "noopener noreferrer",
|
|
3906
3899
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
3907
|
-
children:
|
|
3900
|
+
children: Je
|
|
3908
3901
|
}
|
|
3909
3902
|
),
|
|
3910
3903
|
e.slice(n)
|
|
3911
3904
|
] });
|
|
3912
|
-
},
|
|
3905
|
+
}, $i = (e) => {
|
|
3913
3906
|
var a, r;
|
|
3914
|
-
const t = e.message.hide_date === !0, n =
|
|
3907
|
+
const t = e.message.hide_date === !0, n = Fi(
|
|
3915
3908
|
e.message
|
|
3916
3909
|
);
|
|
3917
3910
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3918
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3911
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
|
|
3919
3912
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3920
3913
|
/* @__PURE__ */ m(
|
|
3921
3914
|
"div",
|
|
@@ -3941,7 +3934,7 @@ const xi = ({
|
|
|
3941
3934
|
] });
|
|
3942
3935
|
}
|
|
3943
3936
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
3944
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
3937
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
|
|
3945
3938
|
return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3946
3939
|
/* @__PURE__ */ m(
|
|
3947
3940
|
"div",
|
|
@@ -3951,7 +3944,7 @@ const xi = ({
|
|
|
3951
3944
|
"data-age-safety-system-type": n.type,
|
|
3952
3945
|
children: [
|
|
3953
3946
|
/* @__PURE__ */ s(
|
|
3954
|
-
|
|
3947
|
+
Qn,
|
|
3955
3948
|
{
|
|
3956
3949
|
size: 24,
|
|
3957
3950
|
weight: "duotone",
|
|
@@ -3960,7 +3953,7 @@ const xi = ({
|
|
|
3960
3953
|
"data-testid": "age-safety-system-message-icon"
|
|
3961
3954
|
}
|
|
3962
3955
|
),
|
|
3963
|
-
/* @__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:
|
|
3956
|
+
/* @__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: Oi(i) }) })
|
|
3964
3957
|
]
|
|
3965
3958
|
}
|
|
3966
3959
|
),
|
|
@@ -3975,7 +3968,7 @@ const xi = ({
|
|
|
3975
3968
|
] }),
|
|
3976
3969
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
3977
3970
|
] });
|
|
3978
|
-
}, Os =
|
|
3971
|
+
}, Os = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
3979
3972
|
"animateTransform",
|
|
3980
3973
|
{
|
|
3981
3974
|
attributeName: "transform",
|
|
@@ -3985,21 +3978,21 @@ const xi = ({
|
|
|
3985
3978
|
begin: `${120 * t}ms`,
|
|
3986
3979
|
repeatCount: "indefinite"
|
|
3987
3980
|
}
|
|
3988
|
-
) }),
|
|
3981
|
+
) }), ji = /* @__PURE__ */ new Set([
|
|
3989
3982
|
qe.Thinking,
|
|
3990
3983
|
qe.Generating,
|
|
3991
3984
|
qe.ExternalSources
|
|
3992
|
-
]),
|
|
3993
|
-
var
|
|
3994
|
-
const { channel: t, channelConfig: n, thread: a } =
|
|
3995
|
-
if (!e && o &&
|
|
3996
|
-
const
|
|
3985
|
+
]), Bi = ({ threadList: e }) => {
|
|
3986
|
+
var c, w;
|
|
3987
|
+
const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Se(Os);
|
|
3988
|
+
if (!e && o && ji.has(l)) {
|
|
3989
|
+
const v = Ui(t, (c = r.user) == null ? void 0 : c.id);
|
|
3997
3990
|
return /* @__PURE__ */ s(
|
|
3998
3991
|
rs,
|
|
3999
3992
|
{
|
|
4000
|
-
avatarId: (
|
|
4001
|
-
avatarName: (
|
|
4002
|
-
avatarImage:
|
|
3993
|
+
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
3994
|
+
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
3995
|
+
avatarImage: v == null ? void 0 : v.image,
|
|
4003
3996
|
testId: "typing-indicator-ai"
|
|
4004
3997
|
}
|
|
4005
3998
|
);
|
|
@@ -4007,25 +4000,25 @@ const xi = ({
|
|
|
4007
4000
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
4008
4001
|
return null;
|
|
4009
4002
|
const u = e ? [] : Object.values(i).filter(
|
|
4010
|
-
({ parent_id:
|
|
4003
|
+
({ parent_id: v, user: g }) => {
|
|
4011
4004
|
var x;
|
|
4012
|
-
return (
|
|
4005
|
+
return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
|
|
4013
4006
|
}
|
|
4014
4007
|
), p = e ? Object.values(i).filter(
|
|
4015
|
-
({ parent_id:
|
|
4008
|
+
({ parent_id: v, user: g }) => {
|
|
4016
4009
|
var x;
|
|
4017
|
-
return (
|
|
4010
|
+
return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
|
|
4018
4011
|
}
|
|
4019
4012
|
) : [], h = e ? p : u;
|
|
4020
4013
|
if (!h.length)
|
|
4021
4014
|
return null;
|
|
4022
|
-
const
|
|
4015
|
+
const f = (w = h[0]) == null ? void 0 : w.user, b = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
|
|
4023
4016
|
return /* @__PURE__ */ s(
|
|
4024
4017
|
rs,
|
|
4025
4018
|
{
|
|
4026
|
-
avatarId: (
|
|
4027
|
-
avatarName: (
|
|
4028
|
-
avatarImage: (
|
|
4019
|
+
avatarId: (f == null ? void 0 : f.id) ?? (b == null ? void 0 : b.id) ?? "typing-user",
|
|
4020
|
+
avatarName: (f == null ? void 0 : f.name) ?? (b == null ? void 0 : b.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
|
|
4021
|
+
avatarImage: (f == null ? void 0 : f.image) ?? (b == null ? void 0 : b.image),
|
|
4029
4022
|
testId: "typing-indicator"
|
|
4030
4023
|
}
|
|
4031
4024
|
);
|
|
@@ -4064,16 +4057,16 @@ const xi = ({
|
|
|
4064
4057
|
height: "13",
|
|
4065
4058
|
overflow: "visible",
|
|
4066
4059
|
children: [
|
|
4067
|
-
/* @__PURE__ */ s(
|
|
4068
|
-
/* @__PURE__ */ s(
|
|
4069
|
-
/* @__PURE__ */ s(
|
|
4060
|
+
/* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
|
|
4061
|
+
/* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
|
|
4062
|
+
/* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
|
|
4070
4063
|
]
|
|
4071
4064
|
}
|
|
4072
4065
|
) }) }) }) }) })
|
|
4073
4066
|
] })
|
|
4074
4067
|
}
|
|
4075
4068
|
);
|
|
4076
|
-
function
|
|
4069
|
+
function Ui(e, t) {
|
|
4077
4070
|
var a;
|
|
4078
4071
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4079
4072
|
for (const r of Object.values(n)) {
|
|
@@ -4082,7 +4075,7 @@ function Vi(e, t) {
|
|
|
4082
4075
|
return i;
|
|
4083
4076
|
}
|
|
4084
4077
|
}
|
|
4085
|
-
const
|
|
4078
|
+
const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
4086
4079
|
"div",
|
|
4087
4080
|
{
|
|
4088
4081
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4126,11 +4119,11 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
|
4126
4119
|
]
|
|
4127
4120
|
}
|
|
4128
4121
|
), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
|
|
4129
|
-
/* @__PURE__ */ s(
|
|
4122
|
+
/* @__PURE__ */ s(Gi, { className: "w-6 h-6" }),
|
|
4130
4123
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4131
4124
|
] }) }));
|
|
4132
4125
|
je.displayName = "LoadingState";
|
|
4133
|
-
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant",
|
|
4126
|
+
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Hi = ({
|
|
4134
4127
|
onBack: e,
|
|
4135
4128
|
showBackButton: t,
|
|
4136
4129
|
showStarButton: n = !1,
|
|
@@ -4143,32 +4136,32 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4143
4136
|
onDeleteConversationClick: u,
|
|
4144
4137
|
onBlockParticipantClick: p,
|
|
4145
4138
|
onReportParticipantClick: h,
|
|
4146
|
-
customChannelActions:
|
|
4147
|
-
renderChannelActions:
|
|
4148
|
-
showChannelInfo:
|
|
4139
|
+
customChannelActions: f,
|
|
4140
|
+
renderChannelActions: b,
|
|
4141
|
+
showChannelInfo: c = !0,
|
|
4149
4142
|
onParticipantNameClick: w,
|
|
4150
|
-
renderHeaderTitleBadges:
|
|
4143
|
+
renderHeaderTitleBadges: v
|
|
4151
4144
|
}) => {
|
|
4152
|
-
var
|
|
4153
|
-
const { channel:
|
|
4145
|
+
var M, E, C, T, F, O;
|
|
4146
|
+
const { channel: g } = ue(), { client: x } = me(), _ = U.useMemo(
|
|
4154
4147
|
() => {
|
|
4155
4148
|
var V;
|
|
4156
4149
|
return Ue(
|
|
4157
|
-
(V =
|
|
4150
|
+
(V = g.state) == null ? void 0 : V.members,
|
|
4158
4151
|
x == null ? void 0 : x.userID,
|
|
4159
|
-
|
|
4152
|
+
g.type
|
|
4160
4153
|
);
|
|
4161
4154
|
},
|
|
4162
|
-
[(
|
|
4163
|
-
),
|
|
4164
|
-
channel:
|
|
4165
|
-
participant:
|
|
4166
|
-
}), D = "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",
|
|
4167
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children:
|
|
4155
|
+
[(M = g.state) == null ? void 0 : M.members, x == null ? void 0 : x.userID, g.type]
|
|
4156
|
+
), A = ot(_ == null ? void 0 : _.user), S = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, I = lt(g), L = v == null ? void 0 : v({
|
|
4157
|
+
channel: g,
|
|
4158
|
+
participant: _
|
|
4159
|
+
}), D = "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", $ = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(te, { children: [
|
|
4160
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: A }),
|
|
4168
4161
|
L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
|
|
4169
4162
|
] }), y = async () => {
|
|
4170
4163
|
try {
|
|
4171
|
-
|
|
4164
|
+
I ? await g.unpin() : await g.pin();
|
|
4172
4165
|
} catch (V) {
|
|
4173
4166
|
console.error(
|
|
4174
4167
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -4189,7 +4182,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4189
4182
|
}),
|
|
4190
4183
|
type: "button",
|
|
4191
4184
|
"aria-label": "Back to conversations",
|
|
4192
|
-
children: /* @__PURE__ */ s(
|
|
4185
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
4193
4186
|
}
|
|
4194
4187
|
) }),
|
|
4195
4188
|
/* @__PURE__ */ s(
|
|
@@ -4202,7 +4195,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4202
4195
|
{
|
|
4203
4196
|
type: "button",
|
|
4204
4197
|
onClick: w,
|
|
4205
|
-
"aria-label": `View details for ${
|
|
4198
|
+
"aria-label": `View details for ${A}`,
|
|
4206
4199
|
className: k(
|
|
4207
4200
|
D,
|
|
4208
4201
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
@@ -4211,10 +4204,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4211
4204
|
/* @__PURE__ */ s(
|
|
4212
4205
|
ne,
|
|
4213
4206
|
{
|
|
4214
|
-
id: ((C =
|
|
4215
|
-
name:
|
|
4216
|
-
image:
|
|
4217
|
-
starred: n &&
|
|
4207
|
+
id: ((C = _ == null ? void 0 : _.user) == null ? void 0 : C.id) || g.id || "unknown",
|
|
4208
|
+
name: A,
|
|
4209
|
+
image: S,
|
|
4210
|
+
starred: n && I,
|
|
4218
4211
|
dmAgentEnabled: a,
|
|
4219
4212
|
size: 48
|
|
4220
4213
|
}
|
|
@@ -4233,10 +4226,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4233
4226
|
/* @__PURE__ */ s(
|
|
4234
4227
|
ne,
|
|
4235
4228
|
{
|
|
4236
|
-
id: ((
|
|
4237
|
-
name:
|
|
4238
|
-
image:
|
|
4239
|
-
starred: n &&
|
|
4229
|
+
id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || g.id || "unknown",
|
|
4230
|
+
name: A,
|
|
4231
|
+
image: S,
|
|
4232
|
+
starred: n && I,
|
|
4240
4233
|
dmAgentEnabled: a,
|
|
4241
4234
|
size: 48
|
|
4242
4235
|
}
|
|
@@ -4265,24 +4258,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4265
4258
|
className: be,
|
|
4266
4259
|
onClick: y,
|
|
4267
4260
|
type: "button",
|
|
4268
|
-
"aria-label":
|
|
4261
|
+
"aria-label": I ? "Unstar conversation" : "Star conversation",
|
|
4269
4262
|
children: /* @__PURE__ */ s(
|
|
4270
4263
|
Ee,
|
|
4271
4264
|
{
|
|
4272
4265
|
className: k("size-5", {
|
|
4273
|
-
"text-yellow-600":
|
|
4274
|
-
"text-black/90": !
|
|
4266
|
+
"text-yellow-600": I,
|
|
4267
|
+
"text-black/90": !I
|
|
4275
4268
|
}),
|
|
4276
|
-
weight:
|
|
4269
|
+
weight: I ? "duotone" : "regular"
|
|
4277
4270
|
}
|
|
4278
4271
|
)
|
|
4279
4272
|
}
|
|
4280
4273
|
),
|
|
4281
|
-
|
|
4282
|
-
|
|
4274
|
+
c && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
4275
|
+
tt,
|
|
4283
4276
|
{
|
|
4284
|
-
channel:
|
|
4285
|
-
participant:
|
|
4277
|
+
channel: g,
|
|
4278
|
+
participant: _,
|
|
4286
4279
|
showDeleteConversation: l,
|
|
4287
4280
|
showBlockParticipant: o,
|
|
4288
4281
|
showReportParticipant: d,
|
|
@@ -4291,7 +4284,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4291
4284
|
onDeleteConversationClick: u,
|
|
4292
4285
|
onBlockParticipantClick: p,
|
|
4293
4286
|
onReportParticipantClick: h,
|
|
4294
|
-
customChannelActions:
|
|
4287
|
+
customChannelActions: f,
|
|
4295
4288
|
triggerClassName: k(be, "bg-[#F1F0EE]")
|
|
4296
4289
|
}
|
|
4297
4290
|
))
|
|
@@ -4309,7 +4302,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4309
4302
|
type: "button",
|
|
4310
4303
|
onClick: e,
|
|
4311
4304
|
"aria-label": "Back to conversations",
|
|
4312
|
-
children: /* @__PURE__ */ s(
|
|
4305
|
+
children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
|
|
4313
4306
|
}
|
|
4314
4307
|
),
|
|
4315
4308
|
w ? /* @__PURE__ */ m(
|
|
@@ -4317,19 +4310,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4317
4310
|
{
|
|
4318
4311
|
type: "button",
|
|
4319
4312
|
onClick: w,
|
|
4320
|
-
"aria-label": `View details for ${
|
|
4313
|
+
"aria-label": `View details for ${A}`,
|
|
4321
4314
|
className: k(
|
|
4322
|
-
|
|
4315
|
+
$,
|
|
4323
4316
|
"appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
|
|
4324
4317
|
),
|
|
4325
4318
|
children: [
|
|
4326
4319
|
/* @__PURE__ */ s(
|
|
4327
4320
|
ne,
|
|
4328
4321
|
{
|
|
4329
|
-
id: ((
|
|
4330
|
-
name:
|
|
4331
|
-
image:
|
|
4332
|
-
starred: n &&
|
|
4322
|
+
id: ((F = _ == null ? void 0 : _.user) == null ? void 0 : F.id) || g.id || "unknown",
|
|
4323
|
+
name: A,
|
|
4324
|
+
image: S,
|
|
4325
|
+
starred: n && I,
|
|
4333
4326
|
dmAgentEnabled: a,
|
|
4334
4327
|
size: 48
|
|
4335
4328
|
}
|
|
@@ -4346,14 +4339,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4346
4339
|
] })
|
|
4347
4340
|
]
|
|
4348
4341
|
}
|
|
4349
|
-
) : /* @__PURE__ */ m("div", { className:
|
|
4342
|
+
) : /* @__PURE__ */ m("div", { className: $, children: [
|
|
4350
4343
|
/* @__PURE__ */ s(
|
|
4351
4344
|
ne,
|
|
4352
4345
|
{
|
|
4353
|
-
id: ((
|
|
4354
|
-
name:
|
|
4355
|
-
image:
|
|
4356
|
-
starred: n &&
|
|
4346
|
+
id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || g.id || "unknown",
|
|
4347
|
+
name: A,
|
|
4348
|
+
image: S,
|
|
4349
|
+
starred: n && I,
|
|
4357
4350
|
dmAgentEnabled: a,
|
|
4358
4351
|
size: 48
|
|
4359
4352
|
}
|
|
@@ -4383,24 +4376,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4383
4376
|
className: be,
|
|
4384
4377
|
onClick: y,
|
|
4385
4378
|
type: "button",
|
|
4386
|
-
"aria-label":
|
|
4379
|
+
"aria-label": I ? "Unstar conversation" : "Star conversation",
|
|
4387
4380
|
children: /* @__PURE__ */ s(
|
|
4388
4381
|
Ee,
|
|
4389
4382
|
{
|
|
4390
4383
|
className: k("size-6", {
|
|
4391
|
-
"text-yellow-600":
|
|
4392
|
-
"text-black/90": !
|
|
4384
|
+
"text-yellow-600": I,
|
|
4385
|
+
"text-black/90": !I
|
|
4393
4386
|
}),
|
|
4394
|
-
weight:
|
|
4387
|
+
weight: I ? "duotone" : "regular"
|
|
4395
4388
|
}
|
|
4396
4389
|
)
|
|
4397
4390
|
}
|
|
4398
4391
|
),
|
|
4399
|
-
|
|
4400
|
-
|
|
4392
|
+
c && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
4393
|
+
tt,
|
|
4401
4394
|
{
|
|
4402
|
-
channel:
|
|
4403
|
-
participant:
|
|
4395
|
+
channel: g,
|
|
4396
|
+
participant: _,
|
|
4404
4397
|
showDeleteConversation: l,
|
|
4405
4398
|
showBlockParticipant: o,
|
|
4406
4399
|
showReportParticipant: d,
|
|
@@ -4409,14 +4402,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4409
4402
|
onDeleteConversationClick: u,
|
|
4410
4403
|
onBlockParticipantClick: p,
|
|
4411
4404
|
onReportParticipantClick: h,
|
|
4412
|
-
customChannelActions:
|
|
4405
|
+
customChannelActions: f,
|
|
4413
4406
|
triggerClassName: be
|
|
4414
4407
|
}
|
|
4415
4408
|
))
|
|
4416
4409
|
] })
|
|
4417
4410
|
] })
|
|
4418
4411
|
] });
|
|
4419
|
-
},
|
|
4412
|
+
}, Yi = ({
|
|
4420
4413
|
onBack: e,
|
|
4421
4414
|
showBackButton: t,
|
|
4422
4415
|
renderMessageInputActions: n,
|
|
@@ -4429,122 +4422,122 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4429
4422
|
onBlockParticipantClick: u,
|
|
4430
4423
|
onReportParticipantClick: p,
|
|
4431
4424
|
showBlockParticipant: h = !0,
|
|
4432
|
-
showReportParticipant:
|
|
4433
|
-
composerDisabled:
|
|
4434
|
-
composerDisabledReason:
|
|
4425
|
+
showReportParticipant: f = !0,
|
|
4426
|
+
composerDisabled: b = !1,
|
|
4427
|
+
composerDisabledReason: c,
|
|
4435
4428
|
showStarButton: w = !1,
|
|
4436
|
-
chatbotVotingEnabled:
|
|
4437
|
-
renderChannelBanner:
|
|
4429
|
+
chatbotVotingEnabled: v = !1,
|
|
4430
|
+
renderChannelBanner: g,
|
|
4438
4431
|
renderHeaderTitleBadges: x,
|
|
4439
|
-
customChannelActions:
|
|
4440
|
-
renderChannelActions:
|
|
4441
|
-
renderMessage:
|
|
4442
|
-
dmAgentEnabled:
|
|
4432
|
+
customChannelActions: _,
|
|
4433
|
+
renderChannelActions: A,
|
|
4434
|
+
renderMessage: S,
|
|
4435
|
+
dmAgentEnabled: I = !1,
|
|
4443
4436
|
viewerLanguage: L,
|
|
4444
4437
|
showChannelInfo: D = !0,
|
|
4445
|
-
onParticipantNameClick:
|
|
4438
|
+
onParticipantNameClick: $,
|
|
4446
4439
|
composerInput: z
|
|
4447
4440
|
}) => {
|
|
4448
|
-
var
|
|
4449
|
-
const { channel: y } =
|
|
4441
|
+
var N, R, G, Y;
|
|
4442
|
+
const { channel: y } = ue(), { client: M } = me(), E = U.useMemo(
|
|
4450
4443
|
() => {
|
|
4451
|
-
var
|
|
4444
|
+
var q;
|
|
4452
4445
|
return Ue(
|
|
4453
|
-
(
|
|
4454
|
-
|
|
4446
|
+
(q = y.state) == null ? void 0 : q.members,
|
|
4447
|
+
M == null ? void 0 : M.userID,
|
|
4455
4448
|
y.type
|
|
4456
4449
|
);
|
|
4457
4450
|
},
|
|
4458
|
-
[(
|
|
4451
|
+
[(N = y.state) == null ? void 0 : N.members, M == null ? void 0 : M.userID, y.type]
|
|
4459
4452
|
), C = U.useMemo(() => {
|
|
4460
|
-
var
|
|
4461
|
-
const
|
|
4462
|
-
return
|
|
4463
|
-
var
|
|
4464
|
-
return ((
|
|
4453
|
+
var j;
|
|
4454
|
+
const q = M == null ? void 0 : M.userID;
|
|
4455
|
+
return q ? Object.values(((j = y.state) == null ? void 0 : j.members) || {}).find((Q) => {
|
|
4456
|
+
var se;
|
|
4457
|
+
return ((se = Q.user) == null ? void 0 : se.id) === q;
|
|
4465
4458
|
}) : void 0;
|
|
4466
|
-
}, [
|
|
4467
|
-
(
|
|
4468
|
-
),
|
|
4469
|
-
|
|
4459
|
+
}, [M == null ? void 0 : M.userID, (R = y.state) == null ? void 0 : R.members]), T = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), F = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), O = I && T === !1 && F === !0, V = y.state.messages.some(
|
|
4460
|
+
(q) => q.type !== "deleted"
|
|
4461
|
+
), Z = g ? /* @__PURE__ */ s(U.Fragment, { children: g() }, "lt-channel-banner") : null, ee = $ ? /* @__PURE__ */ s(
|
|
4462
|
+
ga,
|
|
4470
4463
|
{
|
|
4471
4464
|
onBack: e,
|
|
4472
4465
|
showBackButton: t,
|
|
4473
4466
|
showChannelInfo: D,
|
|
4474
4467
|
showStarButton: w,
|
|
4475
|
-
dmAgentEnabled:
|
|
4468
|
+
dmAgentEnabled: O,
|
|
4476
4469
|
onLeaveConversation: i,
|
|
4477
4470
|
onBlockParticipant: l,
|
|
4478
4471
|
showDeleteConversation: o,
|
|
4479
4472
|
showBlockParticipant: h,
|
|
4480
|
-
showReportParticipant:
|
|
4473
|
+
showReportParticipant: f,
|
|
4481
4474
|
onDeleteConversationClick: d,
|
|
4482
4475
|
onBlockParticipantClick: u,
|
|
4483
4476
|
onReportParticipantClick: p,
|
|
4484
|
-
customChannelActions:
|
|
4485
|
-
renderChannelActions:
|
|
4486
|
-
onParticipantNameClick:
|
|
4477
|
+
customChannelActions: _,
|
|
4478
|
+
renderChannelActions: A,
|
|
4479
|
+
onParticipantNameClick: $
|
|
4487
4480
|
}
|
|
4488
4481
|
) : null, X = J(
|
|
4489
|
-
(
|
|
4490
|
-
const { message:
|
|
4491
|
-
|
|
4482
|
+
(q) => {
|
|
4483
|
+
const { message: W } = Ie("ChannelView"), j = /* @__PURE__ */ s(
|
|
4484
|
+
_i,
|
|
4492
4485
|
{
|
|
4493
|
-
...
|
|
4494
|
-
chatbotVotingEnabled:
|
|
4486
|
+
...q,
|
|
4487
|
+
chatbotVotingEnabled: v,
|
|
4495
4488
|
viewerLanguage: L
|
|
4496
4489
|
}
|
|
4497
4490
|
);
|
|
4498
|
-
return !
|
|
4491
|
+
return !S || !W ? j : S(j, W);
|
|
4499
4492
|
},
|
|
4500
|
-
[
|
|
4493
|
+
[v, S, L]
|
|
4501
4494
|
);
|
|
4502
|
-
return /* @__PURE__ */ s(
|
|
4503
|
-
|
|
4495
|
+
return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
|
|
4496
|
+
Cn,
|
|
4504
4497
|
{
|
|
4505
4498
|
overrides: {
|
|
4506
4499
|
Message: X,
|
|
4507
|
-
MessageActions:
|
|
4500
|
+
MessageActions: ki
|
|
4508
4501
|
},
|
|
4509
4502
|
children: /* @__PURE__ */ m(En, { children: [
|
|
4510
|
-
|
|
4503
|
+
!$ && /* @__PURE__ */ m(te, { children: [
|
|
4511
4504
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4512
|
-
|
|
4505
|
+
Hi,
|
|
4513
4506
|
{
|
|
4514
4507
|
onBack: e,
|
|
4515
4508
|
showBackButton: t,
|
|
4516
4509
|
showChannelInfo: D,
|
|
4517
4510
|
showStarButton: w,
|
|
4518
|
-
dmAgentEnabled:
|
|
4511
|
+
dmAgentEnabled: O,
|
|
4519
4512
|
onLeaveConversation: i,
|
|
4520
4513
|
onBlockParticipant: l,
|
|
4521
4514
|
showDeleteConversation: o,
|
|
4522
4515
|
showBlockParticipant: h,
|
|
4523
|
-
showReportParticipant:
|
|
4516
|
+
showReportParticipant: f,
|
|
4524
4517
|
onDeleteConversationClick: d,
|
|
4525
4518
|
onBlockParticipantClick: u,
|
|
4526
4519
|
onReportParticipantClick: p,
|
|
4527
|
-
customChannelActions:
|
|
4528
|
-
renderChannelActions:
|
|
4520
|
+
customChannelActions: _,
|
|
4521
|
+
renderChannelActions: A,
|
|
4529
4522
|
renderHeaderTitleBadges: x
|
|
4530
4523
|
}
|
|
4531
4524
|
) }, "lt-channel-header"),
|
|
4532
|
-
|
|
4525
|
+
Z
|
|
4533
4526
|
] }),
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4527
|
+
$ && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
|
|
4528
|
+
ee,
|
|
4529
|
+
Z
|
|
4537
4530
|
] }),
|
|
4538
4531
|
/* @__PURE__ */ s(
|
|
4539
4532
|
"div",
|
|
4540
4533
|
{
|
|
4541
4534
|
className: "flex-1 overflow-hidden relative",
|
|
4542
4535
|
children: /* @__PURE__ */ s(
|
|
4543
|
-
|
|
4536
|
+
Sn,
|
|
4544
4537
|
{
|
|
4545
|
-
head:
|
|
4546
|
-
|
|
4547
|
-
|
|
4538
|
+
head: $ && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
|
|
4539
|
+
ee,
|
|
4540
|
+
Z
|
|
4548
4541
|
] }) : void 0,
|
|
4549
4542
|
hideDeletedMessages: !0,
|
|
4550
4543
|
hideNewMessageSeparator: !1
|
|
@@ -4555,14 +4548,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4555
4548
|
),
|
|
4556
4549
|
r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
|
|
4557
4550
|
/* @__PURE__ */ s(
|
|
4558
|
-
|
|
4551
|
+
Ai,
|
|
4559
4552
|
{
|
|
4560
4553
|
...n && {
|
|
4561
4554
|
renderActions: () => n == null ? void 0 : n(y)
|
|
4562
4555
|
},
|
|
4563
4556
|
renderFooter: () => a == null ? void 0 : a(y),
|
|
4564
|
-
disabled:
|
|
4565
|
-
disabledReason:
|
|
4557
|
+
disabled: b,
|
|
4558
|
+
disabledReason: c,
|
|
4566
4559
|
composerInput: z
|
|
4567
4560
|
},
|
|
4568
4561
|
"lt-channel-message-input"
|
|
@@ -4581,86 +4574,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4581
4574
|
onLeaveConversation: l,
|
|
4582
4575
|
onBlockParticipant: o,
|
|
4583
4576
|
className: d,
|
|
4584
|
-
CustomChannelEmptyState: u =
|
|
4577
|
+
CustomChannelEmptyState: u = Vi,
|
|
4585
4578
|
showDeleteConversation: p = !0,
|
|
4586
4579
|
onDeleteConversationClick: h,
|
|
4587
|
-
onBlockParticipantClick:
|
|
4588
|
-
onReportParticipantClick:
|
|
4589
|
-
showBlockParticipant:
|
|
4580
|
+
onBlockParticipantClick: f,
|
|
4581
|
+
onReportParticipantClick: b,
|
|
4582
|
+
showBlockParticipant: c = !0,
|
|
4590
4583
|
showReportParticipant: w = !0,
|
|
4591
|
-
composerDisabled:
|
|
4592
|
-
composerDisabledReason:
|
|
4584
|
+
composerDisabled: v = !1,
|
|
4585
|
+
composerDisabledReason: g,
|
|
4593
4586
|
dmAgentEnabled: x,
|
|
4594
|
-
messageMetadata:
|
|
4595
|
-
onMessageSent:
|
|
4596
|
-
showStarButton:
|
|
4597
|
-
chatbotVotingEnabled:
|
|
4587
|
+
messageMetadata: _,
|
|
4588
|
+
onMessageSent: A,
|
|
4589
|
+
showStarButton: S = !1,
|
|
4590
|
+
chatbotVotingEnabled: I = !1,
|
|
4598
4591
|
renderChannelBanner: L,
|
|
4599
4592
|
renderHeaderTitleBadges: D,
|
|
4600
|
-
customChannelActions:
|
|
4593
|
+
customChannelActions: $,
|
|
4601
4594
|
renderChannelActions: z,
|
|
4602
4595
|
renderMessage: y,
|
|
4603
|
-
onMessageLinkClick:
|
|
4596
|
+
onMessageLinkClick: M,
|
|
4604
4597
|
sendButton: E,
|
|
4605
4598
|
attachmentPreviewList: C,
|
|
4606
|
-
viewerLanguage:
|
|
4607
|
-
showChannelInfo:
|
|
4608
|
-
onParticipantNameClick:
|
|
4599
|
+
viewerLanguage: T,
|
|
4600
|
+
showChannelInfo: F = !0,
|
|
4601
|
+
onParticipantNameClick: O,
|
|
4609
4602
|
composerInput: V
|
|
4610
4603
|
}) => {
|
|
4611
|
-
const
|
|
4612
|
-
async (X,
|
|
4613
|
-
var
|
|
4614
|
-
const
|
|
4615
|
-
...
|
|
4616
|
-
...
|
|
4617
|
-
...
|
|
4604
|
+
const Z = J(
|
|
4605
|
+
async (X, N, R) => {
|
|
4606
|
+
var Q;
|
|
4607
|
+
const G = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, Y = x && !G, q = {
|
|
4608
|
+
...N,
|
|
4609
|
+
...Y && { silent: !0 },
|
|
4610
|
+
..._ && {
|
|
4618
4611
|
metadata: {
|
|
4619
|
-
...
|
|
4620
|
-
...
|
|
4612
|
+
...N.metadata ?? {},
|
|
4613
|
+
..._
|
|
4621
4614
|
}
|
|
4622
4615
|
}
|
|
4623
|
-
},
|
|
4616
|
+
}, W = {
|
|
4624
4617
|
...R,
|
|
4625
|
-
...
|
|
4626
|
-
},
|
|
4627
|
-
return
|
|
4618
|
+
...Y && { skip_push: !0 }
|
|
4619
|
+
}, j = await e.sendMessage(q, W);
|
|
4620
|
+
return A == null || A(j), j;
|
|
4628
4621
|
},
|
|
4629
|
-
[e, x,
|
|
4630
|
-
),
|
|
4622
|
+
[e, x, _, A]
|
|
4623
|
+
), ee = H(null);
|
|
4631
4624
|
return K(() => {
|
|
4632
|
-
if (!
|
|
4633
|
-
const X =
|
|
4625
|
+
if (!M) return;
|
|
4626
|
+
const X = ee.current;
|
|
4634
4627
|
if (!X) return;
|
|
4635
|
-
const
|
|
4636
|
-
const
|
|
4637
|
-
if (!
|
|
4638
|
-
const
|
|
4639
|
-
|
|
4628
|
+
const N = (R) => {
|
|
4629
|
+
const G = R.target, Y = G == null ? void 0 : G.closest("a[href]"), q = Y == null ? void 0 : Y.getAttribute("href");
|
|
4630
|
+
if (!q) return;
|
|
4631
|
+
const W = Y == null ? void 0 : Y.closest("[data-message-id]"), j = W == null ? void 0 : W.getAttribute("data-message-id"), Q = j ? e.state.messages.find((se) => se.id === j) : void 0;
|
|
4632
|
+
M(q, Q);
|
|
4640
4633
|
};
|
|
4641
|
-
return X.addEventListener("click",
|
|
4642
|
-
}, [
|
|
4634
|
+
return X.addEventListener("click", N), () => X.removeEventListener("click", N);
|
|
4635
|
+
}, [M, e]), /* @__PURE__ */ s(
|
|
4643
4636
|
"div",
|
|
4644
4637
|
{
|
|
4645
|
-
ref:
|
|
4638
|
+
ref: ee,
|
|
4646
4639
|
className: k(
|
|
4647
4640
|
"messaging-channel-view h-full flex flex-col",
|
|
4648
4641
|
d
|
|
4649
4642
|
),
|
|
4650
4643
|
children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
|
|
4651
|
-
|
|
4644
|
+
kn,
|
|
4652
4645
|
{
|
|
4653
4646
|
channel: e,
|
|
4654
|
-
MessageSystem:
|
|
4647
|
+
MessageSystem: $i,
|
|
4655
4648
|
EmptyStateIndicator: u,
|
|
4656
4649
|
LoadingIndicator: je,
|
|
4657
|
-
DateSeparator:
|
|
4658
|
-
TypingIndicator:
|
|
4659
|
-
doSendMessageRequest:
|
|
4650
|
+
DateSeparator: pa,
|
|
4651
|
+
TypingIndicator: Bi,
|
|
4652
|
+
doSendMessageRequest: Z,
|
|
4660
4653
|
...E ? { SendButton: E } : {},
|
|
4661
4654
|
...C ? { AttachmentPreviewList: C } : {},
|
|
4662
4655
|
children: /* @__PURE__ */ s(
|
|
4663
|
-
|
|
4656
|
+
Yi,
|
|
4664
4657
|
{
|
|
4665
4658
|
onBack: t,
|
|
4666
4659
|
showBackButton: n,
|
|
@@ -4672,23 +4665,23 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4672
4665
|
CustomChannelEmptyState: u,
|
|
4673
4666
|
showDeleteConversation: p,
|
|
4674
4667
|
onDeleteConversationClick: h,
|
|
4675
|
-
onBlockParticipantClick:
|
|
4676
|
-
onReportParticipantClick:
|
|
4677
|
-
showBlockParticipant:
|
|
4668
|
+
onBlockParticipantClick: f,
|
|
4669
|
+
onReportParticipantClick: b,
|
|
4670
|
+
showBlockParticipant: c,
|
|
4678
4671
|
showReportParticipant: w,
|
|
4679
|
-
composerDisabled:
|
|
4680
|
-
composerDisabledReason:
|
|
4681
|
-
showStarButton:
|
|
4672
|
+
composerDisabled: v,
|
|
4673
|
+
composerDisabledReason: g,
|
|
4674
|
+
showStarButton: S,
|
|
4682
4675
|
dmAgentEnabled: x,
|
|
4683
|
-
chatbotVotingEnabled:
|
|
4676
|
+
chatbotVotingEnabled: I,
|
|
4684
4677
|
renderChannelBanner: L,
|
|
4685
4678
|
renderHeaderTitleBadges: D,
|
|
4686
|
-
customChannelActions:
|
|
4679
|
+
customChannelActions: $,
|
|
4687
4680
|
renderChannelActions: z,
|
|
4688
4681
|
renderMessage: y,
|
|
4689
|
-
viewerLanguage:
|
|
4690
|
-
showChannelInfo:
|
|
4691
|
-
onParticipantNameClick:
|
|
4682
|
+
viewerLanguage: T,
|
|
4683
|
+
showChannelInfo: F,
|
|
4684
|
+
onParticipantNameClick: O,
|
|
4692
4685
|
composerInput: V
|
|
4693
4686
|
}
|
|
4694
4687
|
)
|
|
@@ -4699,7 +4692,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4699
4692
|
}
|
|
4700
4693
|
);
|
|
4701
4694
|
$s.displayName = "ChannelView";
|
|
4702
|
-
const
|
|
4695
|
+
const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
|
|
4703
4696
|
/* @__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: "⚠️" }) }),
|
|
4704
4697
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4705
4698
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4713,8 +4706,8 @@ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4713
4706
|
}
|
|
4714
4707
|
)
|
|
4715
4708
|
] }) }));
|
|
4716
|
-
|
|
4717
|
-
const
|
|
4709
|
+
ye.displayName = "ErrorState";
|
|
4710
|
+
const hl = ({
|
|
4718
4711
|
capabilities: e = {},
|
|
4719
4712
|
renderMessageInputActions: t,
|
|
4720
4713
|
renderConversationFooter: n,
|
|
@@ -4727,139 +4720,139 @@ const fl = ({
|
|
|
4727
4720
|
onReportParticipantClick: u,
|
|
4728
4721
|
dmAgentEnabled: p,
|
|
4729
4722
|
onMessageSent: h,
|
|
4730
|
-
chatbotVotingEnabled:
|
|
4731
|
-
viewerLanguage:
|
|
4732
|
-
renderHeaderTitleBadges:
|
|
4723
|
+
chatbotVotingEnabled: f = !1,
|
|
4724
|
+
viewerLanguage: b,
|
|
4725
|
+
renderHeaderTitleBadges: c,
|
|
4733
4726
|
renderChannelBanner: w,
|
|
4734
|
-
customChannelActions:
|
|
4735
|
-
renderChannelActions:
|
|
4727
|
+
customChannelActions: v,
|
|
4728
|
+
renderChannelActions: g,
|
|
4736
4729
|
onParticipantNameClick: x,
|
|
4737
|
-
renderMessage:
|
|
4738
|
-
onMessageLinkClick:
|
|
4739
|
-
showChannelInfo:
|
|
4740
|
-
composerInput:
|
|
4730
|
+
renderMessage: _,
|
|
4731
|
+
onMessageLinkClick: A,
|
|
4732
|
+
showChannelInfo: S,
|
|
4733
|
+
composerInput: I
|
|
4741
4734
|
}) => {
|
|
4742
4735
|
const {
|
|
4743
4736
|
client: L,
|
|
4744
4737
|
isConnected: D,
|
|
4745
|
-
isLoading:
|
|
4738
|
+
isLoading: $,
|
|
4746
4739
|
error: z,
|
|
4747
4740
|
refreshConnection: y,
|
|
4748
|
-
service:
|
|
4741
|
+
service: M,
|
|
4749
4742
|
debug: E
|
|
4750
|
-
} =
|
|
4743
|
+
} = ta(), [C, T] = B(null), [F, O] = B(null), [V, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = H(l);
|
|
4751
4744
|
X.current = l;
|
|
4752
|
-
const
|
|
4753
|
-
|
|
4754
|
-
const R =
|
|
4745
|
+
const N = H(a);
|
|
4746
|
+
N.current = a;
|
|
4747
|
+
const R = H(null), G = H(null);
|
|
4755
4748
|
K(() => {
|
|
4756
|
-
|
|
4749
|
+
G.current = C;
|
|
4757
4750
|
}, [C]), K(() => {
|
|
4758
4751
|
if (!L || !D) return;
|
|
4759
|
-
const
|
|
4760
|
-
if (!
|
|
4761
|
-
const
|
|
4762
|
-
if (R.current ===
|
|
4763
|
-
R.current =
|
|
4764
|
-
const
|
|
4765
|
-
R.current ===
|
|
4752
|
+
const W = L.userID;
|
|
4753
|
+
if (!W) return;
|
|
4754
|
+
const j = `${W}::${i}`;
|
|
4755
|
+
if (R.current === j) return;
|
|
4756
|
+
R.current = j;
|
|
4757
|
+
const Q = () => {
|
|
4758
|
+
R.current === j && (R.current = null);
|
|
4766
4759
|
};
|
|
4767
4760
|
(async () => {
|
|
4768
|
-
var
|
|
4761
|
+
var Le, De;
|
|
4769
4762
|
try {
|
|
4770
4763
|
E && console.log(
|
|
4771
4764
|
"[MessagingShell] Loading initial conversation with:",
|
|
4772
4765
|
i
|
|
4773
4766
|
);
|
|
4774
|
-
const
|
|
4767
|
+
const ie = await L.queryChannels(
|
|
4775
4768
|
{
|
|
4776
4769
|
type: "messaging",
|
|
4777
|
-
members: { $eq: [
|
|
4770
|
+
members: { $eq: [W, i] }
|
|
4778
4771
|
},
|
|
4779
4772
|
{},
|
|
4780
4773
|
{ limit: 1 }
|
|
4781
4774
|
);
|
|
4782
|
-
if (
|
|
4783
|
-
|
|
4775
|
+
if (ie.length > 0) {
|
|
4776
|
+
T(ie[0]), O(null), (Le = N.current) == null || Le.call(N, ie[0]), E && console.log(
|
|
4784
4777
|
"[MessagingShell] Initial conversation loaded:",
|
|
4785
|
-
|
|
4778
|
+
ie[0].id
|
|
4786
4779
|
);
|
|
4787
4780
|
return;
|
|
4788
4781
|
}
|
|
4789
|
-
const
|
|
4790
|
-
if (!
|
|
4791
|
-
|
|
4782
|
+
const ce = X.current;
|
|
4783
|
+
if (!ce || !M) {
|
|
4784
|
+
Q(), O("No conversation found with this account"), E && console.log(
|
|
4792
4785
|
"[MessagingShell] No conversation found for:",
|
|
4793
4786
|
i
|
|
4794
4787
|
);
|
|
4795
4788
|
return;
|
|
4796
4789
|
}
|
|
4797
4790
|
try {
|
|
4798
|
-
const
|
|
4799
|
-
id:
|
|
4800
|
-
name:
|
|
4801
|
-
phone:
|
|
4791
|
+
const le = await M.startChannelWithParticipant({
|
|
4792
|
+
id: ce.id,
|
|
4793
|
+
name: ce.name,
|
|
4794
|
+
phone: ce.phone
|
|
4802
4795
|
});
|
|
4803
|
-
|
|
4796
|
+
T(le), O(null), (De = N.current) == null || De.call(N, le), E && console.log(
|
|
4804
4797
|
"[MessagingShell] Channel created and loaded:",
|
|
4805
|
-
|
|
4798
|
+
le.id
|
|
4806
4799
|
);
|
|
4807
|
-
} catch (
|
|
4800
|
+
} catch (le) {
|
|
4808
4801
|
console.error(
|
|
4809
4802
|
"[MessagingShell] Failed to create conversation:",
|
|
4810
|
-
|
|
4811
|
-
),
|
|
4803
|
+
le
|
|
4804
|
+
), Q(), O("Failed to create conversation");
|
|
4812
4805
|
}
|
|
4813
|
-
} catch (
|
|
4806
|
+
} catch (ie) {
|
|
4814
4807
|
console.error(
|
|
4815
4808
|
"[MessagingShell] Failed to load initial conversation:",
|
|
4816
|
-
|
|
4817
|
-
),
|
|
4809
|
+
ie
|
|
4810
|
+
), Q(), G.current || O("Failed to load conversation");
|
|
4818
4811
|
}
|
|
4819
4812
|
})();
|
|
4820
|
-
}, [i, L, D,
|
|
4821
|
-
const
|
|
4822
|
-
|
|
4823
|
-
const
|
|
4824
|
-
var
|
|
4825
|
-
|
|
4813
|
+
}, [i, L, D, M, E]);
|
|
4814
|
+
const Y = H(r);
|
|
4815
|
+
Y.current = r;
|
|
4816
|
+
const q = J(() => {
|
|
4817
|
+
var W;
|
|
4818
|
+
T(null), Z(!0), (W = Y.current) == null || W.call(Y);
|
|
4826
4819
|
}, []);
|
|
4827
|
-
return
|
|
4828
|
-
|
|
4820
|
+
return $ ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
|
|
4821
|
+
ye,
|
|
4829
4822
|
{
|
|
4830
4823
|
message: "Not connected to messaging service",
|
|
4831
4824
|
onBack: y
|
|
4832
4825
|
}
|
|
4833
|
-
) :
|
|
4826
|
+
) : F ? /* @__PURE__ */ s(ye, { message: F }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__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(
|
|
4834
4827
|
$s,
|
|
4835
4828
|
{
|
|
4836
4829
|
channel: C,
|
|
4837
4830
|
renderMessageInputActions: t,
|
|
4838
4831
|
renderConversationFooter: n,
|
|
4839
4832
|
renderChannelBanner: w,
|
|
4840
|
-
onLeaveConversation:
|
|
4841
|
-
onBlockParticipant:
|
|
4833
|
+
onLeaveConversation: q,
|
|
4834
|
+
onBlockParticipant: q,
|
|
4842
4835
|
CustomChannelEmptyState: o,
|
|
4843
|
-
showDeleteConversation:
|
|
4836
|
+
showDeleteConversation: ee,
|
|
4844
4837
|
onBlockParticipantClick: d,
|
|
4845
4838
|
onReportParticipantClick: u,
|
|
4846
4839
|
dmAgentEnabled: p,
|
|
4847
4840
|
onMessageSent: h,
|
|
4848
|
-
chatbotVotingEnabled:
|
|
4849
|
-
viewerLanguage:
|
|
4850
|
-
renderHeaderTitleBadges:
|
|
4851
|
-
customChannelActions:
|
|
4852
|
-
renderChannelActions:
|
|
4841
|
+
chatbotVotingEnabled: f,
|
|
4842
|
+
viewerLanguage: b,
|
|
4843
|
+
renderHeaderTitleBadges: c,
|
|
4844
|
+
customChannelActions: v,
|
|
4845
|
+
renderChannelActions: g,
|
|
4853
4846
|
onParticipantNameClick: x,
|
|
4854
|
-
renderMessage:
|
|
4855
|
-
onMessageLinkClick:
|
|
4856
|
-
showChannelInfo:
|
|
4857
|
-
composerInput:
|
|
4847
|
+
renderMessage: _,
|
|
4848
|
+
onMessageLinkClick: A,
|
|
4849
|
+
showChannelInfo: S,
|
|
4850
|
+
composerInput: I
|
|
4858
4851
|
},
|
|
4859
4852
|
C.id
|
|
4860
4853
|
) }) }) : /* @__PURE__ */ s(je, {});
|
|
4861
4854
|
};
|
|
4862
|
-
function
|
|
4855
|
+
function qi(e) {
|
|
4863
4856
|
const t = e.state.pending_messages;
|
|
4864
4857
|
if (t != null && t.length)
|
|
4865
4858
|
for (const n of t)
|
|
@@ -4873,18 +4866,18 @@ const js = U.createContext({
|
|
|
4873
4866
|
renderMessagePreview: void 0,
|
|
4874
4867
|
channelPreview: void 0,
|
|
4875
4868
|
viewerLanguage: void 0
|
|
4876
|
-
}),
|
|
4869
|
+
}), Wi = js.Provider, Xi = () => U.useContext(js), Ki = (e, t) => {
|
|
4877
4870
|
const n = new Date(
|
|
4878
4871
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4879
4872
|
), r = new Date(
|
|
4880
4873
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4881
4874
|
).getTime() - n.getTime();
|
|
4882
4875
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4883
|
-
},
|
|
4876
|
+
}, Ji = (e) => {
|
|
4884
4877
|
const t = /* @__PURE__ */ new Date();
|
|
4885
4878
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4886
4879
|
return "Just now";
|
|
4887
|
-
const a =
|
|
4880
|
+
const a = Ki(e, t);
|
|
4888
4881
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4889
4882
|
hour: "numeric",
|
|
4890
4883
|
minute: "2-digit",
|
|
@@ -4896,7 +4889,7 @@ const js = U.createContext({
|
|
|
4896
4889
|
});
|
|
4897
4890
|
}, Bs = U.memo(
|
|
4898
4891
|
(e) => {
|
|
4899
|
-
var D,
|
|
4892
|
+
var D, $, z;
|
|
4900
4893
|
const { channel: t, unread: n } = e, {
|
|
4901
4894
|
selectedChannel: a,
|
|
4902
4895
|
onChannelSelect: r,
|
|
@@ -4904,7 +4897,7 @@ const js = U.createContext({
|
|
|
4904
4897
|
channelPreview: l,
|
|
4905
4898
|
renderMessagePreview: o,
|
|
4906
4899
|
viewerLanguage: d
|
|
4907
|
-
} =
|
|
4900
|
+
} = Xi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
|
|
4908
4901
|
if (l)
|
|
4909
4902
|
return /* @__PURE__ */ s(
|
|
4910
4903
|
l,
|
|
@@ -4916,49 +4909,49 @@ const js = U.createContext({
|
|
|
4916
4909
|
viewerLanguage: d
|
|
4917
4910
|
}
|
|
4918
4911
|
);
|
|
4919
|
-
const
|
|
4912
|
+
const f = () => {
|
|
4920
4913
|
t && r(t);
|
|
4921
|
-
},
|
|
4922
|
-
const
|
|
4923
|
-
!
|
|
4924
|
-
},
|
|
4914
|
+
}, b = (y) => {
|
|
4915
|
+
const M = y.key === "Enter" || y.key === " ", E = y.repeat;
|
|
4916
|
+
!M || E || (y.preventDefault(), f());
|
|
4917
|
+
}, c = Ue(
|
|
4925
4918
|
(D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
|
|
4926
4919
|
u == null ? void 0 : u.userID,
|
|
4927
4920
|
t == null ? void 0 : t.type
|
|
4928
|
-
), w =
|
|
4929
|
-
var
|
|
4930
|
-
const y = (
|
|
4921
|
+
), w = ot(c == null ? void 0 : c.user), v = ($ = c == null ? void 0 : c.user) == null ? void 0 : $.image, g = (() => {
|
|
4922
|
+
var M;
|
|
4923
|
+
const y = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
|
|
4931
4924
|
if (y != null && y.length) {
|
|
4932
4925
|
for (let E = y.length - 1; E >= 0; E--)
|
|
4933
4926
|
if (y[E].type !== "system") return y[E];
|
|
4934
4927
|
}
|
|
4935
|
-
})(),
|
|
4936
|
-
var
|
|
4928
|
+
})(), _ = (() => {
|
|
4929
|
+
var F, O, V, Z;
|
|
4937
4930
|
const y = hs({
|
|
4938
|
-
message:
|
|
4931
|
+
message: g,
|
|
4939
4932
|
viewerLanguage: d
|
|
4940
4933
|
});
|
|
4941
|
-
if (((
|
|
4942
|
-
if (((
|
|
4943
|
-
if (((V =
|
|
4934
|
+
if (((F = g == null ? void 0 : g.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
|
|
4935
|
+
if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
|
|
4936
|
+
if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
|
|
4944
4937
|
return y ? `📎 ${y}` : "📎 Sent an attachment";
|
|
4945
4938
|
if (y) return y;
|
|
4946
|
-
const
|
|
4947
|
-
return
|
|
4948
|
-
})(),
|
|
4939
|
+
const T = (Z = g == null ? void 0 : g.attachments) == null ? void 0 : Z[0];
|
|
4940
|
+
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";
|
|
4941
|
+
})(), A = g != null && g.created_at ? Ji(new Date(g.created_at)) : "", S = g ? Fe(g) : !1, I = o ? o(g, _) : `${S ? "✨ " : ""}${_}`, L = n ?? 0;
|
|
4949
4942
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4950
4943
|
channelId: t == null ? void 0 : t.id,
|
|
4951
4944
|
isSelected: p,
|
|
4952
4945
|
participantName: w,
|
|
4953
4946
|
unreadCount: L,
|
|
4954
|
-
hasTimestamp: !!
|
|
4947
|
+
hasTimestamp: !!A
|
|
4955
4948
|
}), /* @__PURE__ */ s(
|
|
4956
4949
|
"div",
|
|
4957
4950
|
{
|
|
4958
4951
|
role: "button",
|
|
4959
4952
|
tabIndex: 0,
|
|
4960
|
-
onClick:
|
|
4961
|
-
onKeyDown:
|
|
4953
|
+
onClick: f,
|
|
4954
|
+
onKeyDown: b,
|
|
4962
4955
|
className: k(
|
|
4963
4956
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
4964
4957
|
{
|
|
@@ -4971,9 +4964,9 @@ const js = U.createContext({
|
|
|
4971
4964
|
/* @__PURE__ */ s(
|
|
4972
4965
|
ne,
|
|
4973
4966
|
{
|
|
4974
|
-
id: ((z =
|
|
4967
|
+
id: ((z = c == null ? void 0 : c.user) == null ? void 0 : z.id) || t.id || "unknown",
|
|
4975
4968
|
name: w,
|
|
4976
|
-
image:
|
|
4969
|
+
image: v,
|
|
4977
4970
|
size: 48,
|
|
4978
4971
|
starred: h
|
|
4979
4972
|
}
|
|
@@ -4992,10 +4985,10 @@ const js = U.createContext({
|
|
|
4992
4985
|
]
|
|
4993
4986
|
}
|
|
4994
4987
|
),
|
|
4995
|
-
|
|
4988
|
+
A && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: A })
|
|
4996
4989
|
] }),
|
|
4997
4990
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
4998
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
4991
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
|
|
4999
4992
|
L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
|
|
5000
4993
|
] })
|
|
5001
4994
|
] })
|
|
@@ -5005,33 +4998,33 @@ const js = U.createContext({
|
|
|
5005
4998
|
}
|
|
5006
4999
|
);
|
|
5007
5000
|
Bs.displayName = "CustomChannelPreview";
|
|
5008
|
-
const
|
|
5001
|
+
const Zi = { last_message_at: -1 }, Qi = U.memo(
|
|
5009
5002
|
({
|
|
5010
5003
|
onChannelSelect: e,
|
|
5011
5004
|
selectedChannel: t,
|
|
5012
5005
|
filters: n,
|
|
5013
5006
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5014
5007
|
channelRenderFilterFn: r,
|
|
5015
|
-
sort: i =
|
|
5008
|
+
sort: i = Zi,
|
|
5016
5009
|
className: l,
|
|
5017
5010
|
customEmptyStateIndicator: o,
|
|
5018
|
-
channelListPaginator: d =
|
|
5011
|
+
channelListPaginator: d = Tn,
|
|
5019
5012
|
channelPreview: u,
|
|
5020
5013
|
renderMessagePreview: p,
|
|
5021
5014
|
viewerLanguage: h
|
|
5022
5015
|
}) => {
|
|
5023
|
-
const
|
|
5024
|
-
|
|
5025
|
-
const { debug:
|
|
5026
|
-
(
|
|
5027
|
-
for (const
|
|
5028
|
-
|
|
5029
|
-
return r ? r(
|
|
5016
|
+
const f = U.useRef(0);
|
|
5017
|
+
f.current++;
|
|
5018
|
+
const { debug: b = !1 } = it(), c = U.useCallback(
|
|
5019
|
+
(v) => {
|
|
5020
|
+
for (const g of v)
|
|
5021
|
+
qi(g);
|
|
5022
|
+
return r ? r(v) : v;
|
|
5030
5023
|
},
|
|
5031
5024
|
[r]
|
|
5032
5025
|
);
|
|
5033
|
-
|
|
5034
|
-
renderCount:
|
|
5026
|
+
b && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5027
|
+
renderCount: f.current,
|
|
5035
5028
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5036
5029
|
filters: n
|
|
5037
5030
|
});
|
|
@@ -5039,7 +5032,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5039
5032
|
() => ({
|
|
5040
5033
|
selectedChannel: t,
|
|
5041
5034
|
onChannelSelect: e,
|
|
5042
|
-
debug:
|
|
5035
|
+
debug: b,
|
|
5043
5036
|
channelPreview: u,
|
|
5044
5037
|
renderMessagePreview: p,
|
|
5045
5038
|
viewerLanguage: h
|
|
@@ -5047,7 +5040,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5047
5040
|
[
|
|
5048
5041
|
t,
|
|
5049
5042
|
e,
|
|
5050
|
-
|
|
5043
|
+
b,
|
|
5051
5044
|
u,
|
|
5052
5045
|
p,
|
|
5053
5046
|
h
|
|
@@ -5060,14 +5053,14 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5060
5053
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5061
5054
|
l
|
|
5062
5055
|
),
|
|
5063
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5064
|
-
|
|
5056
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Wi, { value: w, children: /* @__PURE__ */ s(
|
|
5057
|
+
In,
|
|
5065
5058
|
{
|
|
5066
5059
|
filters: n,
|
|
5067
5060
|
sort: i,
|
|
5068
5061
|
options: { limit: 30 },
|
|
5069
5062
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5070
|
-
channelRenderFilterFn:
|
|
5063
|
+
channelRenderFilterFn: c,
|
|
5071
5064
|
Paginator: d,
|
|
5072
5065
|
Preview: Bs,
|
|
5073
5066
|
EmptyStateIndicator: o
|
|
@@ -5078,8 +5071,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
|
|
|
5078
5071
|
);
|
|
5079
5072
|
}
|
|
5080
5073
|
);
|
|
5081
|
-
|
|
5082
|
-
const
|
|
5074
|
+
Qi.displayName = "ChannelList";
|
|
5075
|
+
const el = ({
|
|
5083
5076
|
question: e,
|
|
5084
5077
|
onClick: t,
|
|
5085
5078
|
loading: n = !1,
|
|
@@ -5101,7 +5094,7 @@ const tl = ({
|
|
|
5101
5094
|
),
|
|
5102
5095
|
children: e
|
|
5103
5096
|
}
|
|
5104
|
-
),
|
|
5097
|
+
), fl = ({
|
|
5105
5098
|
faqs: e,
|
|
5106
5099
|
onFaqClick: t,
|
|
5107
5100
|
loadingFaqId: n,
|
|
@@ -5130,7 +5123,7 @@ const tl = ({
|
|
|
5130
5123
|
children: [
|
|
5131
5124
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5132
5125
|
o.map((d) => /* @__PURE__ */ s(
|
|
5133
|
-
|
|
5126
|
+
el,
|
|
5134
5127
|
{
|
|
5135
5128
|
question: d.question,
|
|
5136
5129
|
onClick: () => t(d.id),
|
|
@@ -5145,39 +5138,39 @@ const tl = ({
|
|
|
5145
5138
|
};
|
|
5146
5139
|
export {
|
|
5147
5140
|
bs as A,
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5141
|
+
ml as B,
|
|
5142
|
+
Vi as C,
|
|
5143
|
+
jr as D,
|
|
5144
|
+
va as E,
|
|
5145
|
+
fl as F,
|
|
5146
|
+
ta as G,
|
|
5154
5147
|
es as L,
|
|
5155
|
-
|
|
5156
|
-
|
|
5148
|
+
dl as M,
|
|
5149
|
+
_e as a,
|
|
5157
5150
|
ne as b,
|
|
5158
|
-
|
|
5151
|
+
Qi as c,
|
|
5159
5152
|
$s as d,
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5153
|
+
ul as e,
|
|
5154
|
+
el as f,
|
|
5155
|
+
oe as g,
|
|
5163
5156
|
Zt as h,
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5157
|
+
Ne as i,
|
|
5158
|
+
Wr as j,
|
|
5159
|
+
cl as k,
|
|
5160
|
+
hl as l,
|
|
5161
|
+
ar as m,
|
|
5162
|
+
tr as n,
|
|
5163
|
+
Ji as o,
|
|
5164
|
+
nr as p,
|
|
5172
5165
|
hs as q,
|
|
5173
5166
|
we as r,
|
|
5174
5167
|
ws as s,
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5168
|
+
ra as t,
|
|
5169
|
+
Wa as u,
|
|
5170
|
+
xa as v,
|
|
5178
5171
|
Ue as w,
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5172
|
+
mt as x,
|
|
5173
|
+
ht as y,
|
|
5174
|
+
ot as z
|
|
5182
5175
|
};
|
|
5183
|
-
//# sourceMappingURL=index-
|
|
5176
|
+
//# sourceMappingURL=index-CnR5N9Co.js.map
|