@linktr.ee/messaging-react 1.38.0 → 1.40.0
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-RgHsp9x1.js → Card-CuiPAb_A.js} +2 -2
- package/dist/{Card-RgHsp9x1.js.map → Card-CuiPAb_A.js.map} +1 -1
- package/dist/{Card-DwgUtqsA.js → Card-RBVM8Gy3.js} +2 -2
- package/dist/{Card-DwgUtqsA.js.map → Card-RBVM8Gy3.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-B_4pciGp.js → index-DY-3-rt4.js} +984 -1287
- package/dist/index-DY-3-rt4.js.map +1 -0
- package/dist/index.d.ts +0 -60
- package/dist/index.js +9 -11
- package/package.json +1 -1
- package/src/components/ChannelList/ChannelList.stories.tsx +2 -7
- package/src/components/CustomMessage/MessageVoteButtons.stories.tsx +86 -0
- package/src/components/CustomMessage/MessageVoteButtons.tsx +14 -32
- package/src/components/MessagingShell/index.tsx +2 -110
- package/src/index.ts +0 -4
- package/src/styles.css +83 -7
- package/src/types.ts +0 -37
- package/dist/index-B_4pciGp.js.map +0 -1
- package/src/components/ParticipantPicker/ParticipantItem.stories.tsx +0 -190
- package/src/components/ParticipantPicker/ParticipantItem.tsx +0 -63
- package/src/components/ParticipantPicker/ParticipantPicker.stories.tsx +0 -56
- package/src/components/ParticipantPicker/ParticipantPicker.tsx +0 -229
- package/src/components/ParticipantPicker/index.tsx +0 -262
- package/src/hooks/useParticipants.ts +0 -94
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { StreamChatService as
|
|
5
|
-
import { Chat as
|
|
6
|
-
import { StarIcon as
|
|
7
|
-
import { LinkPreviewsManager as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import O, { createContext as ot, useContext as lt, useCallback as G, useState as A, useRef as J, useEffect as Z, useMemo as Ce, Suspense as ct } from "react";
|
|
4
|
+
import { StreamChatService as Tt } from "@linktr.ee/messaging-core";
|
|
5
|
+
import { Chat as Dt, ChannelList as Rt, DateSeparator as Lt, useChannelStateContext as oe, useChatContext as Me, areMessageUIPropsEqual as At, useMessageReminder as Ft, useComponentContext as dt, Attachment as Ot, EditMessageModal as Pt, MessageBlocked as Ut, MessageBouncePrompt as zt, MessageDeleted as Bt, MessageIsThreadReplyInChannelButtonIndicator as $t, MessageRepliesCountButton as jt, ReminderNotification as Gt, StreamedMessageText as Vt, messageHasAttachments as Ht, messageHasReactions as Yt, isDateSeparatorMessage as qt, isMessageBlocked as Wt, isMessageBounced as Xt, MessageBounceModal as Zt, MessageText as Xe, Poll as Jt, MessageErrorIcon as Kt, useMessageContext as ut, useMessageComposer as Qt, useStateStore as es, MessageInput as ts, useMessageInputContext as ss, useMessageComposerHasSendableData as ns, SimpleAttachmentSelector as as, QuotedMessagePreview as rs, AttachmentPreviewList as is, TextareaComposer as os, MessageTimestamp as ve, useTypingContext as ls, Channel as cs, WithComponents as ds, Window as us, MessageList as ms } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, GiftIcon as hs, XIcon as mt, SpinnerGapIcon as we, SignOutIcon as fs, ProhibitInsetIcon as Ze, FlagIcon as gs, ThumbsUpIcon as bs, ThumbsDownIcon as ps, ArrowUpIcon as xs, SparkleIcon as Se, ProhibitIcon as vs, ArrowLeftIcon as Je, CaretRightIcon as Ke, DotsThreeIcon as Qe, FileIcon as ht, ImageIcon as ws, SpeakerHighIcon as _s, VideoCameraIcon as ys, FileMdIcon as Ns, FileTextIcon as Cs, FileZipIcon as Es, FilePptIcon as Ss, FileCsvIcon as Is, FileXlsIcon as ks, FileDocIcon as Ms, FilePdfIcon as Ts, CircleNotchIcon as ft, PlayIcon as et, PauseIcon as Ds, LinkIcon as Rs, DownloadSimpleIcon as Ls } from "@phosphor-icons/react";
|
|
7
|
+
import { LinkPreviewsManager as tt } from "stream-chat";
|
|
8
|
+
const gt = ot({
|
|
9
9
|
service: null,
|
|
10
10
|
client: null,
|
|
11
11
|
isConnected: !1,
|
|
@@ -15,7 +15,7 @@ const vt = mt({
|
|
|
15
15
|
refreshConnection: async () => {
|
|
16
16
|
},
|
|
17
17
|
debug: !1
|
|
18
|
-
}),
|
|
18
|
+
}), Te = () => lt(gt), ra = ({
|
|
19
19
|
children: t,
|
|
20
20
|
user: s,
|
|
21
21
|
serviceConfig: n,
|
|
@@ -23,9 +23,9 @@ const vt = mt({
|
|
|
23
23
|
capabilities: o = {},
|
|
24
24
|
debug: l = !1
|
|
25
25
|
}) => {
|
|
26
|
-
const i =
|
|
27
|
-
(
|
|
28
|
-
l && console.log(`🔥 [MessagingProvider] ${
|
|
26
|
+
const i = G(
|
|
27
|
+
(k, ...T) => {
|
|
28
|
+
l && console.log(`🔥 [MessagingProvider] ${k}`, ...T);
|
|
29
29
|
},
|
|
30
30
|
[l]
|
|
31
31
|
);
|
|
@@ -35,84 +35,84 @@ const vt = mt({
|
|
|
35
35
|
serviceConfig: !!n,
|
|
36
36
|
capabilities: Object.keys(o)
|
|
37
37
|
});
|
|
38
|
-
const [c,
|
|
38
|
+
const [c, m] = A(null), [u, h] = A(null), [f, v] = A(!1), [a, N] = A(!1), [b, C] = A(null), x = J(!1), I = J({
|
|
39
39
|
userId: s == null ? void 0 : s.id,
|
|
40
40
|
apiKey: r,
|
|
41
41
|
serviceConfig: n,
|
|
42
42
|
capabilities: o
|
|
43
|
-
}), w =
|
|
43
|
+
}), w = J(0);
|
|
44
44
|
w.current++, i("📊 RENDER INFO", {
|
|
45
45
|
renderCount: w.current,
|
|
46
46
|
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (r == null ? void 0 : r.substring(0, 8)) + "..." },
|
|
47
47
|
propChanges: {
|
|
48
|
-
userChanged:
|
|
49
|
-
apiKeyChanged:
|
|
50
|
-
serviceConfigChanged:
|
|
51
|
-
capabilitiesChanged:
|
|
48
|
+
userChanged: I.current.userId !== (s == null ? void 0 : s.id),
|
|
49
|
+
apiKeyChanged: I.current.apiKey !== r,
|
|
50
|
+
serviceConfigChanged: I.current.serviceConfig !== n,
|
|
51
|
+
capabilitiesChanged: I.current.capabilities !== o
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), I.current = {
|
|
54
54
|
userId: s == null ? void 0 : s.id,
|
|
55
55
|
apiKey: r,
|
|
56
56
|
serviceConfig: n,
|
|
57
57
|
capabilities: o
|
|
58
|
-
},
|
|
59
|
-
const
|
|
58
|
+
}, Z(() => {
|
|
59
|
+
const k = w.current;
|
|
60
60
|
if (i("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
61
|
-
renderCount:
|
|
61
|
+
renderCount: k,
|
|
62
62
|
apiKey: !!r,
|
|
63
63
|
serviceConfig: !!n,
|
|
64
64
|
dependencies: {
|
|
65
65
|
apiKey: (r == null ? void 0 : r.substring(0, 8)) + "...",
|
|
66
66
|
serviceConfigRef: n,
|
|
67
|
-
serviceConfigStable:
|
|
68
|
-
apiKeyStable:
|
|
67
|
+
serviceConfigStable: I.current.serviceConfig === n,
|
|
68
|
+
apiKeyStable: I.current.apiKey === r
|
|
69
69
|
}
|
|
70
70
|
}), !r || !n) {
|
|
71
71
|
i("⚠️ SERVICE INIT SKIPPED", {
|
|
72
|
-
renderCount:
|
|
72
|
+
renderCount: k,
|
|
73
73
|
reason: "Missing apiKey or serviceConfig"
|
|
74
74
|
});
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
i("🚀 CREATING NEW SERVICE", {
|
|
78
|
-
renderCount:
|
|
78
|
+
renderCount: k,
|
|
79
79
|
apiKey: (r == null ? void 0 : r.substring(0, 8)) + "...",
|
|
80
|
-
serviceConfigChanged:
|
|
80
|
+
serviceConfigChanged: I.current.serviceConfig !== n
|
|
81
81
|
});
|
|
82
|
-
const
|
|
82
|
+
const T = new Tt({
|
|
83
83
|
...n,
|
|
84
84
|
apiKey: r,
|
|
85
85
|
debug: l
|
|
86
86
|
});
|
|
87
|
-
return
|
|
88
|
-
renderCount:
|
|
89
|
-
serviceInstance: !!
|
|
87
|
+
return m(T), i("✅ SERVICE SET", {
|
|
88
|
+
renderCount: k,
|
|
89
|
+
serviceInstance: !!T
|
|
90
90
|
}), () => {
|
|
91
91
|
i("🧹 SERVICE CLEANUP", {
|
|
92
|
-
renderCount:
|
|
92
|
+
renderCount: k,
|
|
93
93
|
reason: "Effect cleanup"
|
|
94
|
-
}),
|
|
94
|
+
}), T.disconnectUser().catch(console.error);
|
|
95
95
|
};
|
|
96
96
|
}, [r, n, l, i]);
|
|
97
|
-
const E =
|
|
98
|
-
|
|
99
|
-
var
|
|
97
|
+
const E = J(null);
|
|
98
|
+
Z(() => {
|
|
99
|
+
var T, M;
|
|
100
100
|
if (i("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
101
101
|
hasService: !!c,
|
|
102
102
|
hasUser: !!s,
|
|
103
103
|
userId: s == null ? void 0 : s.id,
|
|
104
|
-
isConnecting:
|
|
104
|
+
isConnecting: x.current,
|
|
105
105
|
isConnected: f,
|
|
106
106
|
dependencies: { service: !!c, userId: s == null ? void 0 : s.id }
|
|
107
107
|
}), !c || !s) {
|
|
108
108
|
i("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
111
|
+
if (x.current) {
|
|
112
112
|
i("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
if (((
|
|
115
|
+
if (((T = E.current) == null ? void 0 : T.serviceId) === c && ((M = E.current) == null ? void 0 : M.userId) === s.id) {
|
|
116
116
|
i(
|
|
117
117
|
"⚠️ USER CONNECTION SKIPPED",
|
|
118
118
|
"Already connected this user with this service"
|
|
@@ -120,28 +120,28 @@ const vt = mt({
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
(async () => {
|
|
123
|
-
i("🚀 STARTING USER CONNECTION", { userId: s.id }),
|
|
123
|
+
i("🚀 STARTING USER CONNECTION", { userId: s.id }), x.current = !0, N(!0), C(null);
|
|
124
124
|
try {
|
|
125
125
|
i("📞 CALLING SERVICE.CONNECTUSER", { userId: s.id });
|
|
126
|
-
const
|
|
127
|
-
|
|
126
|
+
const y = await c.connectUser(s);
|
|
127
|
+
h(y), v(!0), E.current = { serviceId: c, userId: s.id }, i("✅ USER CONNECTION SUCCESS", {
|
|
128
128
|
userId: s.id,
|
|
129
|
-
clientId:
|
|
129
|
+
clientId: y.userID
|
|
130
130
|
});
|
|
131
|
-
} catch (
|
|
132
|
-
const
|
|
133
|
-
|
|
131
|
+
} catch (y) {
|
|
132
|
+
const _ = y instanceof Error ? y.message : "Connection failed";
|
|
133
|
+
C(_), i("❌ USER CONNECTION ERROR", {
|
|
134
134
|
userId: s.id,
|
|
135
|
-
error:
|
|
135
|
+
error: _
|
|
136
136
|
});
|
|
137
137
|
} finally {
|
|
138
|
-
|
|
138
|
+
N(!1), x.current = !1, i("🔄 USER CONNECTION FINISHED", {
|
|
139
139
|
userId: s.id,
|
|
140
140
|
isConnected: f
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
})();
|
|
144
|
-
}, [c, s, i, f]),
|
|
144
|
+
}, [c, s, i, f]), Z(() => (i("🔌 CLEANUP EFFECT REGISTERED", {
|
|
145
145
|
hasService: !!c,
|
|
146
146
|
isConnected: f
|
|
147
147
|
}), () => {
|
|
@@ -153,7 +153,7 @@ const vt = mt({
|
|
|
153
153
|
isConnected: f
|
|
154
154
|
});
|
|
155
155
|
}), [c, f, i]);
|
|
156
|
-
const
|
|
156
|
+
const P = G(async () => {
|
|
157
157
|
if (i("🔄 REFRESH CONNECTION CALLED", {
|
|
158
158
|
hasService: !!c,
|
|
159
159
|
hasUser: !!s
|
|
@@ -161,53 +161,53 @@ const vt = mt({
|
|
|
161
161
|
i("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
i("🚀 STARTING CONNECTION REFRESH", { userId: s.id }),
|
|
164
|
+
i("🚀 STARTING CONNECTION REFRESH", { userId: s.id }), N(!0);
|
|
165
165
|
try {
|
|
166
166
|
i("🔌 DISCONNECTING FOR REFRESH"), await c.disconnectUser(), i("📞 RECONNECTING FOR REFRESH");
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
} catch (
|
|
170
|
-
const
|
|
171
|
-
|
|
167
|
+
const k = await c.connectUser(s);
|
|
168
|
+
h(k), v(!0), C(null), i("✅ CONNECTION REFRESH SUCCESS", { userId: s.id });
|
|
169
|
+
} catch (k) {
|
|
170
|
+
const T = k instanceof Error ? k.message : "Refresh failed";
|
|
171
|
+
C(T), i("❌ CONNECTION REFRESH ERROR", {
|
|
172
172
|
userId: s.id,
|
|
173
|
-
error:
|
|
173
|
+
error: T
|
|
174
174
|
});
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
N(!1), i("🔄 CONNECTION REFRESH FINISHED", { userId: s.id });
|
|
177
177
|
}
|
|
178
|
-
}, [c, s, i]),
|
|
178
|
+
}, [c, s, i]), U = O.useMemo(() => (i("💫 CONTEXT VALUE MEMOIZATION", {
|
|
179
179
|
hasService: !!c,
|
|
180
180
|
hasClient: !!u,
|
|
181
181
|
isConnected: f,
|
|
182
182
|
isLoading: a,
|
|
183
|
-
hasError: !!
|
|
183
|
+
hasError: !!b,
|
|
184
184
|
capabilitiesKeys: Object.keys(o)
|
|
185
185
|
}), {
|
|
186
186
|
service: c,
|
|
187
187
|
client: u,
|
|
188
188
|
isConnected: f,
|
|
189
189
|
isLoading: a,
|
|
190
|
-
error:
|
|
190
|
+
error: b,
|
|
191
191
|
capabilities: o,
|
|
192
|
-
refreshConnection:
|
|
192
|
+
refreshConnection: P,
|
|
193
193
|
debug: l
|
|
194
194
|
}), [
|
|
195
195
|
c,
|
|
196
196
|
u,
|
|
197
197
|
f,
|
|
198
198
|
a,
|
|
199
|
-
|
|
199
|
+
b,
|
|
200
200
|
o,
|
|
201
|
-
|
|
201
|
+
P,
|
|
202
202
|
l,
|
|
203
203
|
i
|
|
204
204
|
]);
|
|
205
205
|
return i("🔄 RENDER END", {
|
|
206
206
|
renderCount: w.current,
|
|
207
207
|
willRenderChat: !!(u && f),
|
|
208
|
-
contextValueReady: !!
|
|
209
|
-
}), /* @__PURE__ */ e(
|
|
210
|
-
|
|
208
|
+
contextValueReady: !!U
|
|
209
|
+
}), /* @__PURE__ */ e(gt.Provider, { value: U, children: u && f ? /* @__PURE__ */ e(
|
|
210
|
+
Dt,
|
|
211
211
|
{
|
|
212
212
|
client: u,
|
|
213
213
|
customClasses: {
|
|
@@ -216,25 +216,25 @@ const vt = mt({
|
|
|
216
216
|
children: t
|
|
217
217
|
}
|
|
218
218
|
) : t });
|
|
219
|
-
},
|
|
220
|
-
function
|
|
219
|
+
}, As = () => Te();
|
|
220
|
+
function Fs(t) {
|
|
221
221
|
const s = t.state.pending_messages;
|
|
222
222
|
if (s != null && s.length)
|
|
223
223
|
for (const n of s)
|
|
224
224
|
t.state.addMessageSorted(n.message);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
226
|
+
const bt = O.createContext({
|
|
227
227
|
selectedChannel: void 0,
|
|
228
228
|
onChannelSelect: () => {
|
|
229
229
|
},
|
|
230
230
|
debug: !1,
|
|
231
231
|
renderMessagePreview: void 0
|
|
232
|
-
}),
|
|
232
|
+
}), Os = bt.Provider, Ps = () => O.useContext(bt), pt = (t) => {
|
|
233
233
|
var r, o;
|
|
234
|
-
const [s, n] =
|
|
234
|
+
const [s, n] = A(
|
|
235
235
|
!!((o = (r = t == null ? void 0 : t.state) == null ? void 0 : r.membership) != null && o.pinned_at)
|
|
236
236
|
);
|
|
237
|
-
return
|
|
237
|
+
return Z(() => {
|
|
238
238
|
var i;
|
|
239
239
|
if (!t) {
|
|
240
240
|
n(!1);
|
|
@@ -242,27 +242,27 @@ const wt = z.createContext({
|
|
|
242
242
|
}
|
|
243
243
|
n(!!((i = t.state.membership) != null && i.pinned_at));
|
|
244
244
|
const l = (c) => {
|
|
245
|
-
var
|
|
245
|
+
var m;
|
|
246
246
|
n(
|
|
247
|
-
c != null && c.member ? !!c.member.pinned_at : !!((
|
|
247
|
+
c != null && c.member ? !!c.member.pinned_at : !!((m = t.state.membership) != null && m.pinned_at)
|
|
248
248
|
);
|
|
249
249
|
};
|
|
250
250
|
return t.on("member.updated", l), () => {
|
|
251
251
|
t.off("member.updated", l);
|
|
252
252
|
};
|
|
253
253
|
}, [t]), s;
|
|
254
|
-
},
|
|
254
|
+
}, Us = (t, s) => {
|
|
255
255
|
const n = new Date(
|
|
256
256
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
257
257
|
), o = new Date(
|
|
258
258
|
Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate())
|
|
259
259
|
).getTime() - n.getTime();
|
|
260
260
|
return Math.floor(o / (1e3 * 60 * 60 * 24));
|
|
261
|
-
},
|
|
261
|
+
}, zs = (t) => {
|
|
262
262
|
const s = /* @__PURE__ */ new Date();
|
|
263
263
|
if (Math.floor((s.getTime() - t.getTime()) / 1e3) < 60)
|
|
264
264
|
return "Just now";
|
|
265
|
-
const r =
|
|
265
|
+
const r = Us(t, s);
|
|
266
266
|
return r === 0 ? t.toLocaleTimeString([], {
|
|
267
267
|
hour: "numeric",
|
|
268
268
|
minute: "2-digit",
|
|
@@ -272,7 +272,7 @@ const wt = z.createContext({
|
|
|
272
272
|
day: "numeric",
|
|
273
273
|
year: "2-digit"
|
|
274
274
|
});
|
|
275
|
-
},
|
|
275
|
+
}, st = [
|
|
276
276
|
"🍎",
|
|
277
277
|
// Apple
|
|
278
278
|
"🍌",
|
|
@@ -300,7 +300,7 @@ const wt = z.createContext({
|
|
|
300
300
|
"🍈"
|
|
301
301
|
// Melon
|
|
302
302
|
];
|
|
303
|
-
function
|
|
303
|
+
function Bs(t) {
|
|
304
304
|
let s = 0;
|
|
305
305
|
for (let n = 0; n < t.length; n++) {
|
|
306
306
|
const r = t.charCodeAt(n);
|
|
@@ -308,9 +308,9 @@ function Ys(t) {
|
|
|
308
308
|
}
|
|
309
309
|
return Math.abs(s);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
const n =
|
|
313
|
-
return
|
|
311
|
+
function $s(t) {
|
|
312
|
+
const n = Bs(t) % st.length;
|
|
313
|
+
return st[n];
|
|
314
314
|
}
|
|
315
315
|
const ne = ({
|
|
316
316
|
id: t,
|
|
@@ -321,7 +321,7 @@ const ne = ({
|
|
|
321
321
|
shape: l = "squircle",
|
|
322
322
|
dmAgentEnabled: i = !1
|
|
323
323
|
}) => {
|
|
324
|
-
const c =
|
|
324
|
+
const c = $s(t), u = n < 32 ? "text-xs" : n < 56 ? "text-sm" : n < 120 ? "text-lg" : "text-4xl", h = n >= 40 ? 2 : 1, f = l === "circle" ? { borderRadius: "50%" } : {
|
|
325
325
|
borderRadius: "33%",
|
|
326
326
|
cornerShape: "superellipse(1.3)"
|
|
327
327
|
}, v = /* @__PURE__ */ e("div", { className: "h-full w-full overflow-hidden", style: f, children: s ? /* @__PURE__ */ e(
|
|
@@ -335,7 +335,7 @@ const ne = ({
|
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
338
|
-
className:
|
|
338
|
+
className: D(
|
|
339
339
|
"avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
|
|
340
340
|
u
|
|
341
341
|
),
|
|
@@ -345,7 +345,7 @@ const ne = ({
|
|
|
345
345
|
return /* @__PURE__ */ d(
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
348
|
-
className:
|
|
348
|
+
className: D(
|
|
349
349
|
"relative flex-shrink-0 !bg-transparent",
|
|
350
350
|
r
|
|
351
351
|
),
|
|
@@ -359,21 +359,21 @@ const ne = ({
|
|
|
359
359
|
{
|
|
360
360
|
"aria-hidden": "true",
|
|
361
361
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
362
|
-
children: /* @__PURE__ */ e(
|
|
362
|
+
children: /* @__PURE__ */ e(Ee, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
/* @__PURE__ */ e(
|
|
366
366
|
"div",
|
|
367
367
|
{
|
|
368
368
|
"data-testid": "avatar-ring",
|
|
369
|
-
className:
|
|
369
|
+
className: D(
|
|
370
370
|
"h-full w-full",
|
|
371
371
|
"bg-transparent"
|
|
372
372
|
),
|
|
373
373
|
style: {
|
|
374
374
|
...f,
|
|
375
375
|
...i && {
|
|
376
|
-
borderWidth: `${
|
|
376
|
+
borderWidth: `${h}px`,
|
|
377
377
|
borderStyle: "solid",
|
|
378
378
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
379
379
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
@@ -385,7 +385,7 @@ const ne = ({
|
|
|
385
385
|
]
|
|
386
386
|
}
|
|
387
387
|
);
|
|
388
|
-
},
|
|
388
|
+
}, js = ({ size: t = 15 }) => /* @__PURE__ */ e(
|
|
389
389
|
"svg",
|
|
390
390
|
{
|
|
391
391
|
width: t,
|
|
@@ -402,93 +402,93 @@ const ne = ({
|
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
}
|
|
405
|
-
),
|
|
405
|
+
), Gs = (t) => {
|
|
406
406
|
var s;
|
|
407
407
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_TIP";
|
|
408
|
-
},
|
|
408
|
+
}, Vs = (t) => {
|
|
409
409
|
var s;
|
|
410
410
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_PAID";
|
|
411
|
-
},
|
|
411
|
+
}, De = (t) => {
|
|
412
412
|
var s;
|
|
413
413
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_CHATBOT";
|
|
414
|
-
},
|
|
414
|
+
}, Hs = (t) => {
|
|
415
415
|
var s;
|
|
416
416
|
return ((s = t.metadata) == null ? void 0 : s.custom_type) === "MESSAGE_ATTACHMENT";
|
|
417
|
-
},
|
|
417
|
+
}, xt = (t) => Gs(t) || Vs(t), Ys = (t) => {
|
|
418
418
|
var s;
|
|
419
|
-
return
|
|
420
|
-
},
|
|
419
|
+
return xt(t) && !((s = t.text) != null && s.trim());
|
|
420
|
+
}, _e = ({
|
|
421
421
|
message: t,
|
|
422
422
|
standalone: s = !1,
|
|
423
423
|
isMyMessage: n = !1,
|
|
424
424
|
hasAttachment: r = !1
|
|
425
425
|
}) => {
|
|
426
426
|
var f;
|
|
427
|
-
const o =
|
|
427
|
+
const o = xt(t), l = De(t);
|
|
428
428
|
if (!o && !l)
|
|
429
429
|
return null;
|
|
430
430
|
if (o) {
|
|
431
431
|
const v = (f = t.metadata) == null ? void 0 : f.amount_text;
|
|
432
432
|
if (!v) return null;
|
|
433
|
-
const a = s ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
433
|
+
const a = s ? "message-tip-standalone" : "message-tag message-tag--tip", N = s ? `${v} tip` : `Delivered with ${v} tip`;
|
|
434
434
|
return /* @__PURE__ */ d("div", { className: a, children: [
|
|
435
|
-
/* @__PURE__ */ e(
|
|
436
|
-
/* @__PURE__ */ e("span", { children:
|
|
435
|
+
/* @__PURE__ */ e(hs, { size: s ? 14 : 12 }),
|
|
436
|
+
/* @__PURE__ */ e("span", { children: N })
|
|
437
437
|
] });
|
|
438
438
|
}
|
|
439
|
-
const i = n && r, c = i ? "Sent with AI" : "Sent with DM Agent",
|
|
439
|
+
const i = n && r, c = i ? "Sent with AI" : "Sent with DM Agent", m = [
|
|
440
440
|
"message-chatbot-indicator",
|
|
441
441
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
442
442
|
i ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
443
|
-
].join(" "), u = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }),
|
|
444
|
-
return /* @__PURE__ */ e("div", { className:
|
|
443
|
+
].join(" "), u = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__label", children: c }), h = /* @__PURE__ */ e("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ e(js, { size: i ? 12 : 15 }) });
|
|
444
|
+
return /* @__PURE__ */ e("div", { className: m, "data-testid": "message-chatbot-indicator", children: n && !i ? /* @__PURE__ */ d(ce, { children: [
|
|
445
445
|
u,
|
|
446
|
-
|
|
447
|
-
] }) : /* @__PURE__ */ d(
|
|
448
|
-
|
|
446
|
+
h
|
|
447
|
+
] }) : /* @__PURE__ */ d(ce, { children: [
|
|
448
|
+
h,
|
|
449
449
|
u
|
|
450
450
|
] }) });
|
|
451
|
-
},
|
|
451
|
+
}, vt = O.memo(
|
|
452
452
|
({ channel: t, unread: s }) => {
|
|
453
|
-
var
|
|
454
|
-
const { selectedChannel: n, onChannelSelect: r, debug: o, renderMessagePreview: l } =
|
|
453
|
+
var P, U, k, T;
|
|
454
|
+
const { selectedChannel: n, onChannelSelect: r, debug: o, renderMessagePreview: l } = Ps(), i = (n == null ? void 0 : n.id) === (t == null ? void 0 : t.id), c = () => {
|
|
455
455
|
t && r(t);
|
|
456
|
-
},
|
|
457
|
-
const
|
|
458
|
-
!
|
|
459
|
-
},
|
|
460
|
-
(
|
|
461
|
-
var
|
|
462
|
-
return ((
|
|
456
|
+
}, m = (M) => {
|
|
457
|
+
const y = M.key === "Enter" || M.key === " ", _ = M.repeat;
|
|
458
|
+
!y || _ || (M.preventDefault(), c());
|
|
459
|
+
}, h = Object.values(((P = t == null ? void 0 : t.state) == null ? void 0 : P.members) || {}).find(
|
|
460
|
+
(M) => {
|
|
461
|
+
var y, _;
|
|
462
|
+
return ((y = M.user) == null ? void 0 : y.id) && M.user.id !== ((_ = t == null ? void 0 : t._client) == null ? void 0 : _.userID);
|
|
463
463
|
}
|
|
464
|
-
), f = ((
|
|
465
|
-
var
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
468
|
-
for (let
|
|
469
|
-
if (
|
|
464
|
+
), f = ((U = h == null ? void 0 : h.user) == null ? void 0 : U.name) || "Conversation", v = (k = h == null ? void 0 : h.user) == null ? void 0 : k.image, a = (() => {
|
|
465
|
+
var y;
|
|
466
|
+
const M = (y = t == null ? void 0 : t.state) == null ? void 0 : y.messages;
|
|
467
|
+
if (M != null && M.length) {
|
|
468
|
+
for (let _ = M.length - 1; _ >= 0; _--)
|
|
469
|
+
if (M[_].type !== "system") return M[_];
|
|
470
470
|
}
|
|
471
|
-
})(),
|
|
472
|
-
var
|
|
471
|
+
})(), b = (() => {
|
|
472
|
+
var _, F;
|
|
473
473
|
if (a != null && a.text) return a.text;
|
|
474
|
-
if (((
|
|
475
|
-
const
|
|
476
|
-
return
|
|
477
|
-
})(),
|
|
474
|
+
if (((_ = a == null ? void 0 : a.metadata) == null ? void 0 : _.custom_type) === "MESSAGE_TIP") return "💵 Sent a tip";
|
|
475
|
+
const y = (F = a == null ? void 0 : a.attachments) == null ? void 0 : F[0];
|
|
476
|
+
return y ? y.og_scrape_url ? y.og_scrape_url : y.type === "image" ? "📷 Sent an image" : y.type === "video" ? "🎥 Sent a video" : y.type === "audio" ? "🎵 Sent audio" : y.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
477
|
+
})(), C = a != null && a.created_at ? zs(new Date(a.created_at)) : "", x = a ? De(a) : !1, I = l ? l(a, b) : `${x ? "✨ " : ""}${b}`, w = pt(t), E = s ?? 0;
|
|
478
478
|
return o && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
479
479
|
channelId: t == null ? void 0 : t.id,
|
|
480
480
|
isSelected: i,
|
|
481
481
|
participantName: f,
|
|
482
482
|
unreadCount: E,
|
|
483
|
-
hasTimestamp: !!
|
|
483
|
+
hasTimestamp: !!C
|
|
484
484
|
}), /* @__PURE__ */ e(
|
|
485
485
|
"div",
|
|
486
486
|
{
|
|
487
487
|
role: "button",
|
|
488
488
|
tabIndex: 0,
|
|
489
489
|
onClick: c,
|
|
490
|
-
onKeyDown:
|
|
491
|
-
className:
|
|
490
|
+
onKeyDown: m,
|
|
491
|
+
className: D(
|
|
492
492
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring",
|
|
493
493
|
{
|
|
494
494
|
"bg-primary-alt/10 border-l-4 border-l-primary": i,
|
|
@@ -499,7 +499,7 @@ const ne = ({
|
|
|
499
499
|
/* @__PURE__ */ e(
|
|
500
500
|
ne,
|
|
501
501
|
{
|
|
502
|
-
id: ((
|
|
502
|
+
id: ((T = h == null ? void 0 : h.user) == null ? void 0 : T.id) || t.id || "unknown",
|
|
503
503
|
name: f,
|
|
504
504
|
image: v,
|
|
505
505
|
size: 44,
|
|
@@ -512,7 +512,7 @@ const ne = ({
|
|
|
512
512
|
/* @__PURE__ */ d(
|
|
513
513
|
"h3",
|
|
514
514
|
{
|
|
515
|
-
className:
|
|
515
|
+
className: D(
|
|
516
516
|
"text-sm font-medium truncate",
|
|
517
517
|
i ? "text-primary" : "text-charcoal"
|
|
518
518
|
),
|
|
@@ -522,10 +522,10 @@ const ne = ({
|
|
|
522
522
|
]
|
|
523
523
|
}
|
|
524
524
|
),
|
|
525
|
-
|
|
525
|
+
C && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: C })
|
|
526
526
|
] }),
|
|
527
527
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
528
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children:
|
|
528
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: I }),
|
|
529
529
|
E > 0 && /* @__PURE__ */ e("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: E > 99 ? "99+" : E })
|
|
530
530
|
] })
|
|
531
531
|
] })
|
|
@@ -534,8 +534,8 @@ const ne = ({
|
|
|
534
534
|
);
|
|
535
535
|
}
|
|
536
536
|
);
|
|
537
|
-
|
|
538
|
-
const
|
|
537
|
+
vt.displayName = "CustomChannelPreview";
|
|
538
|
+
const qs = { last_message_at: -1 }, wt = O.memo(
|
|
539
539
|
({
|
|
540
540
|
onChannelSelect: t,
|
|
541
541
|
selectedChannel: s,
|
|
@@ -544,18 +544,18 @@ const Qs = { last_message_at: -1 }, _t = z.memo(
|
|
|
544
544
|
onMessageNew: o,
|
|
545
545
|
onAddedToChannel: l,
|
|
546
546
|
channelRenderFilterFn: i,
|
|
547
|
-
sort: c =
|
|
548
|
-
className:
|
|
547
|
+
sort: c = qs,
|
|
548
|
+
className: m,
|
|
549
549
|
customEmptyStateIndicator: u,
|
|
550
|
-
renderMessagePreview:
|
|
550
|
+
renderMessagePreview: h
|
|
551
551
|
}) => {
|
|
552
|
-
const f =
|
|
552
|
+
const f = O.useRef(0);
|
|
553
553
|
f.current++;
|
|
554
|
-
const { debug: v = !1 } =
|
|
555
|
-
(
|
|
556
|
-
for (const
|
|
557
|
-
|
|
558
|
-
return i ? i(
|
|
554
|
+
const { debug: v = !1 } = Te(), a = O.useCallback(
|
|
555
|
+
(b) => {
|
|
556
|
+
for (const C of b)
|
|
557
|
+
Fs(C);
|
|
558
|
+
return i ? i(b) : b;
|
|
559
559
|
},
|
|
560
560
|
[i]
|
|
561
561
|
);
|
|
@@ -564,24 +564,24 @@ const Qs = { last_message_at: -1 }, _t = z.memo(
|
|
|
564
564
|
selectedChannelId: s == null ? void 0 : s.id,
|
|
565
565
|
filters: n
|
|
566
566
|
});
|
|
567
|
-
const
|
|
567
|
+
const N = O.useMemo(
|
|
568
568
|
() => ({
|
|
569
569
|
selectedChannel: s,
|
|
570
570
|
onChannelSelect: t,
|
|
571
571
|
debug: v,
|
|
572
|
-
renderMessagePreview:
|
|
572
|
+
renderMessagePreview: h
|
|
573
573
|
}),
|
|
574
|
-
[s, t, v,
|
|
574
|
+
[s, t, v, h]
|
|
575
575
|
);
|
|
576
576
|
return /* @__PURE__ */ e(
|
|
577
577
|
"div",
|
|
578
578
|
{
|
|
579
|
-
className:
|
|
579
|
+
className: D(
|
|
580
580
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
581
|
-
|
|
581
|
+
m
|
|
582
582
|
),
|
|
583
|
-
children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(
|
|
584
|
-
|
|
583
|
+
children: /* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ e(Os, { value: N, children: /* @__PURE__ */ e(
|
|
584
|
+
Rt,
|
|
585
585
|
{
|
|
586
586
|
filters: n,
|
|
587
587
|
sort: c,
|
|
@@ -590,7 +590,7 @@ const Qs = { last_message_at: -1 }, _t = z.memo(
|
|
|
590
590
|
onMessageNew: o,
|
|
591
591
|
onAddedToChannel: l,
|
|
592
592
|
channelRenderFilterFn: a,
|
|
593
|
-
Preview:
|
|
593
|
+
Preview: vt,
|
|
594
594
|
EmptyStateIndicator: u
|
|
595
595
|
},
|
|
596
596
|
`${JSON.stringify(n)}:${JSON.stringify(c)}`
|
|
@@ -599,8 +599,8 @@ const Qs = { last_message_at: -1 }, _t = z.memo(
|
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
601
|
);
|
|
602
|
-
|
|
603
|
-
const
|
|
602
|
+
wt.displayName = "ChannelList";
|
|
603
|
+
const me = ({
|
|
604
604
|
variant: t = "default",
|
|
605
605
|
className: s,
|
|
606
606
|
children: n,
|
|
@@ -609,7 +609,7 @@ const ke = ({
|
|
|
609
609
|
"button",
|
|
610
610
|
{
|
|
611
611
|
type: "button",
|
|
612
|
-
className:
|
|
612
|
+
className: D(
|
|
613
613
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
614
614
|
t === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
615
615
|
s
|
|
@@ -618,12 +618,12 @@ const ke = ({
|
|
|
618
618
|
children: n
|
|
619
619
|
}
|
|
620
620
|
);
|
|
621
|
-
function
|
|
621
|
+
function Ws({ label: t, className: s, children: n, ...r }) {
|
|
622
622
|
return /* @__PURE__ */ d(
|
|
623
623
|
"button",
|
|
624
624
|
{
|
|
625
625
|
type: "button",
|
|
626
|
-
className:
|
|
626
|
+
className: D(
|
|
627
627
|
"inline-flex items-center justify-center rounded-full transition-colors focus-ring p-2",
|
|
628
628
|
{
|
|
629
629
|
"cursor-not-allowed opacity-50": r.disabled,
|
|
@@ -639,10 +639,10 @@ function Et({ label: t, className: s, children: n, ...r }) {
|
|
|
639
639
|
}
|
|
640
640
|
);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
return /* @__PURE__ */ e(
|
|
642
|
+
function Xs({ onClick: t }) {
|
|
643
|
+
return /* @__PURE__ */ e(Ws, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(mt, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
644
644
|
}
|
|
645
|
-
const
|
|
645
|
+
const Zs = ({
|
|
646
646
|
dialogRef: t,
|
|
647
647
|
onClose: s,
|
|
648
648
|
participant: n,
|
|
@@ -651,80 +651,80 @@ const en = ({
|
|
|
651
651
|
onLeaveConversation: l,
|
|
652
652
|
onBlockParticipant: i,
|
|
653
653
|
showDeleteConversation: c = !0,
|
|
654
|
-
onDeleteConversationClick:
|
|
654
|
+
onDeleteConversationClick: m,
|
|
655
655
|
onBlockParticipantClick: u,
|
|
656
|
-
onReportParticipantClick:
|
|
656
|
+
onReportParticipantClick: h,
|
|
657
657
|
customProfileContent: f,
|
|
658
658
|
customChannelActions: v
|
|
659
659
|
}) => {
|
|
660
|
-
var $,
|
|
661
|
-
const { service: a, debug:
|
|
662
|
-
var
|
|
663
|
-
if (!(!a || !((
|
|
660
|
+
var S, $, V, ee, te, q, g;
|
|
661
|
+
const { service: a, debug: N } = Te(), [b, C] = A(!1), [x, I] = A(!1), [w, E] = A(!1), P = G(async () => {
|
|
662
|
+
var p;
|
|
663
|
+
if (!(!a || !((p = n == null ? void 0 : n.user) != null && p.id)))
|
|
664
664
|
try {
|
|
665
|
-
const
|
|
666
|
-
(
|
|
667
|
-
var
|
|
668
|
-
return
|
|
665
|
+
const j = (await a.getBlockedUsers()).some(
|
|
666
|
+
(Y) => {
|
|
667
|
+
var ae;
|
|
668
|
+
return Y.blocked_user_id === ((ae = n == null ? void 0 : n.user) == null ? void 0 : ae.id);
|
|
669
669
|
}
|
|
670
670
|
);
|
|
671
|
-
|
|
672
|
-
} catch (
|
|
671
|
+
C(j);
|
|
672
|
+
} catch (L) {
|
|
673
673
|
console.error(
|
|
674
674
|
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
675
|
-
|
|
675
|
+
L
|
|
676
676
|
);
|
|
677
677
|
}
|
|
678
|
-
}, [a, (
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}, [
|
|
682
|
-
const
|
|
683
|
-
var
|
|
684
|
-
if (!
|
|
685
|
-
|
|
678
|
+
}, [a, (S = n == null ? void 0 : n.user) == null ? void 0 : S.id]);
|
|
679
|
+
Z(() => {
|
|
680
|
+
P();
|
|
681
|
+
}, [P]);
|
|
682
|
+
const U = async () => {
|
|
683
|
+
var p;
|
|
684
|
+
if (!x) {
|
|
685
|
+
m == null || m(), N && console.log("[ChannelInfoDialog] Leave conversation", r.cid), I(!0);
|
|
686
686
|
try {
|
|
687
|
-
const
|
|
688
|
-
await r.hide(
|
|
689
|
-
} catch (
|
|
690
|
-
console.error("[ChannelInfoDialog] Failed to leave conversation",
|
|
687
|
+
const L = ((p = r._client) == null ? void 0 : p.userID) ?? null;
|
|
688
|
+
await r.hide(L, !1), l && await l(r), s();
|
|
689
|
+
} catch (L) {
|
|
690
|
+
console.error("[ChannelInfoDialog] Failed to leave conversation", L);
|
|
691
691
|
} finally {
|
|
692
|
-
|
|
692
|
+
I(!1);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
},
|
|
696
|
-
var
|
|
695
|
+
}, k = async () => {
|
|
696
|
+
var p, L, j;
|
|
697
697
|
if (!(w || !a)) {
|
|
698
|
-
u == null || u(),
|
|
698
|
+
u == null || u(), N && console.log("[ChannelInfoDialog] Block member", (p = n == null ? void 0 : n.user) == null ? void 0 : p.id), E(!0);
|
|
699
699
|
try {
|
|
700
|
-
await a.blockUser((
|
|
701
|
-
} catch (
|
|
702
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
700
|
+
await a.blockUser((L = n == null ? void 0 : n.user) == null ? void 0 : L.id), i && await i((j = n == null ? void 0 : n.user) == null ? void 0 : j.id), s();
|
|
701
|
+
} catch (Y) {
|
|
702
|
+
console.error("[ChannelInfoDialog] Failed to block member", Y);
|
|
703
703
|
} finally {
|
|
704
704
|
E(!1);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
},
|
|
708
|
-
var
|
|
707
|
+
}, T = async () => {
|
|
708
|
+
var p, L, j;
|
|
709
709
|
if (!(w || !a)) {
|
|
710
|
-
u == null || u(),
|
|
710
|
+
u == null || u(), N && console.log("[ChannelInfoDialog] Unblock member", (p = n == null ? void 0 : n.user) == null ? void 0 : p.id), E(!0);
|
|
711
711
|
try {
|
|
712
|
-
await a.unBlockUser((
|
|
713
|
-
} catch (
|
|
714
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
712
|
+
await a.unBlockUser((L = n == null ? void 0 : n.user) == null ? void 0 : L.id), i && await i((j = n == null ? void 0 : n.user) == null ? void 0 : j.id), s();
|
|
713
|
+
} catch (Y) {
|
|
714
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", Y);
|
|
715
715
|
} finally {
|
|
716
716
|
E(!1);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
},
|
|
720
|
-
|
|
719
|
+
}, M = () => {
|
|
720
|
+
h == null || h(), s(), window.open(
|
|
721
721
|
"https://linktr.ee/s/about/trust-center/report",
|
|
722
722
|
"_blank",
|
|
723
723
|
"noopener,noreferrer"
|
|
724
724
|
);
|
|
725
725
|
};
|
|
726
726
|
if (!n) return null;
|
|
727
|
-
const
|
|
727
|
+
const y = (($ = n.user) == null ? void 0 : $.name) || ((V = n.user) == null ? void 0 : V.id) || "Unknown member", _ = (ee = n.user) == null ? void 0 : ee.image, F = (te = n.user) == null ? void 0 : te.email, H = (q = n.user) == null ? void 0 : q.username, R = F || (H ? `linktr.ee/${H}` : void 0), z = ((g = n.user) == null ? void 0 : g.id) || "unknown";
|
|
728
728
|
return (
|
|
729
729
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
730
730
|
/* @__PURE__ */ e(
|
|
@@ -733,13 +733,13 @@ const en = ({
|
|
|
733
733
|
ref: t,
|
|
734
734
|
className: "mes-dialog group",
|
|
735
735
|
onClose: s,
|
|
736
|
-
onClick: (
|
|
737
|
-
|
|
736
|
+
onClick: (p) => {
|
|
737
|
+
p.target === t.current && s();
|
|
738
738
|
},
|
|
739
739
|
children: /* @__PURE__ */ d("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-none transition-shadow duration-200 group-open:shadow-max-elevation-light", children: [
|
|
740
740
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
741
741
|
/* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
742
|
-
/* @__PURE__ */ e(
|
|
742
|
+
/* @__PURE__ */ e(Xs, { onClick: s })
|
|
743
743
|
] }),
|
|
744
744
|
/* @__PURE__ */ d("div", { className: "flex-1 px-2 overflow-y-auto w-full", children: [
|
|
745
745
|
/* @__PURE__ */ d(
|
|
@@ -752,16 +752,16 @@ const en = ({
|
|
|
752
752
|
/* @__PURE__ */ e(
|
|
753
753
|
ne,
|
|
754
754
|
{
|
|
755
|
-
id:
|
|
756
|
-
name:
|
|
757
|
-
image:
|
|
755
|
+
id: z,
|
|
756
|
+
name: y,
|
|
757
|
+
image: _,
|
|
758
758
|
size: 88,
|
|
759
759
|
shape: "circle"
|
|
760
760
|
}
|
|
761
761
|
),
|
|
762
762
|
/* @__PURE__ */ d("div", { className: "flex flex-col min-w-0 flex-1", children: [
|
|
763
|
-
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children:
|
|
764
|
-
|
|
763
|
+
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: y }),
|
|
764
|
+
R && /* @__PURE__ */ e("p", { className: "truncate text-sm text-[#00000055]", children: R }),
|
|
765
765
|
o && !f && /* @__PURE__ */ e(
|
|
766
766
|
"span",
|
|
767
767
|
{
|
|
@@ -784,42 +784,42 @@ const en = ({
|
|
|
784
784
|
),
|
|
785
785
|
/* @__PURE__ */ d("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
786
786
|
c && /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
787
|
-
|
|
787
|
+
me,
|
|
788
788
|
{
|
|
789
|
-
onClick:
|
|
790
|
-
disabled:
|
|
791
|
-
"aria-busy":
|
|
789
|
+
onClick: U,
|
|
790
|
+
disabled: x,
|
|
791
|
+
"aria-busy": x,
|
|
792
792
|
children: [
|
|
793
|
-
|
|
793
|
+
x ? /* @__PURE__ */ e(we, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(fs, { className: "h-5 w-5" }),
|
|
794
794
|
/* @__PURE__ */ e("span", { children: "Delete Conversation" })
|
|
795
795
|
]
|
|
796
796
|
}
|
|
797
797
|
) }),
|
|
798
|
-
/* @__PURE__ */ e("li", { children:
|
|
799
|
-
|
|
798
|
+
/* @__PURE__ */ e("li", { children: b ? /* @__PURE__ */ d(
|
|
799
|
+
me,
|
|
800
800
|
{
|
|
801
|
-
onClick:
|
|
801
|
+
onClick: T,
|
|
802
802
|
disabled: w,
|
|
803
803
|
"aria-busy": w,
|
|
804
804
|
children: [
|
|
805
|
-
w ? /* @__PURE__ */ e(
|
|
805
|
+
w ? /* @__PURE__ */ e(we, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Ze, { className: "h-5 w-5" }),
|
|
806
806
|
/* @__PURE__ */ e("span", { children: "Unblock" })
|
|
807
807
|
]
|
|
808
808
|
}
|
|
809
809
|
) : /* @__PURE__ */ d(
|
|
810
|
-
|
|
810
|
+
me,
|
|
811
811
|
{
|
|
812
|
-
onClick:
|
|
812
|
+
onClick: k,
|
|
813
813
|
disabled: w,
|
|
814
814
|
"aria-busy": w,
|
|
815
815
|
children: [
|
|
816
|
-
w ? /* @__PURE__ */ e(
|
|
816
|
+
w ? /* @__PURE__ */ e(we, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Ze, { className: "h-5 w-5" }),
|
|
817
817
|
/* @__PURE__ */ e("span", { children: "Block" })
|
|
818
818
|
]
|
|
819
819
|
}
|
|
820
820
|
) }),
|
|
821
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
822
|
-
/* @__PURE__ */ e(
|
|
821
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(me, { variant: "danger", onClick: M, children: [
|
|
822
|
+
/* @__PURE__ */ e(gs, { className: "h-5 w-5" }),
|
|
823
823
|
/* @__PURE__ */ e("span", { children: "Report" })
|
|
824
824
|
] }) }),
|
|
825
825
|
v
|
|
@@ -829,30 +829,30 @@ const en = ({
|
|
|
829
829
|
}
|
|
830
830
|
)
|
|
831
831
|
);
|
|
832
|
-
},
|
|
833
|
-
function
|
|
834
|
-
return t != null && t.length ? t.some((s) => s.type ===
|
|
832
|
+
}, Js = (t) => /* @__PURE__ */ e(Lt, { ...t, position: "center" }), Ie = "vote_up", ke = "vote_down";
|
|
833
|
+
function Ks(t) {
|
|
834
|
+
return t != null && t.length ? t.some((s) => s.type === ke) ? "down" : t.some((s) => s.type === Ie) ? "up" : null : null;
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
const { channel: s } =
|
|
838
|
-
() =>
|
|
836
|
+
function Qs(t) {
|
|
837
|
+
const { channel: s } = oe(), { client: n } = Me("useMessageVote"), r = Ce(
|
|
838
|
+
() => Ks(t.own_reactions),
|
|
839
839
|
[t.own_reactions]
|
|
840
|
-
), o =
|
|
840
|
+
), o = G(async () => {
|
|
841
841
|
if (n != null && n.userID)
|
|
842
842
|
try {
|
|
843
|
-
r === "up" ? await s.deleteReaction(t.id,
|
|
843
|
+
r === "up" ? await s.deleteReaction(t.id, Ie) : await s.sendReaction(
|
|
844
844
|
t.id,
|
|
845
|
-
{ type:
|
|
845
|
+
{ type: Ie },
|
|
846
846
|
{ enforce_unique: !0, skip_push: !0 }
|
|
847
847
|
);
|
|
848
848
|
} catch {
|
|
849
849
|
}
|
|
850
|
-
}, [s, n == null ? void 0 : n.userID, t.id, r]), l =
|
|
850
|
+
}, [s, n == null ? void 0 : n.userID, t.id, r]), l = G(async () => {
|
|
851
851
|
if (n != null && n.userID)
|
|
852
852
|
try {
|
|
853
|
-
r === "down" ? await s.deleteReaction(t.id,
|
|
853
|
+
r === "down" ? await s.deleteReaction(t.id, ke) : await s.sendReaction(
|
|
854
854
|
t.id,
|
|
855
|
-
{ type:
|
|
855
|
+
{ type: ke },
|
|
856
856
|
{ enforce_unique: !0, skip_push: !0 }
|
|
857
857
|
);
|
|
858
858
|
} catch {
|
|
@@ -860,41 +860,21 @@ function nn(t) {
|
|
|
860
860
|
}, [s, n == null ? void 0 : n.userID, t.id, r]);
|
|
861
861
|
return { selected: r, voteUp: o, voteDown: l };
|
|
862
862
|
}
|
|
863
|
-
const
|
|
863
|
+
const en = O.lazy(() => import("./Card-CuiPAb_A.js")), tn = O.lazy(() => import("./Card-RBVM8Gy3.js")), _t = () => /* @__PURE__ */ e(
|
|
864
864
|
"div",
|
|
865
865
|
{
|
|
866
866
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-[24px] bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
867
867
|
"aria-hidden": !0
|
|
868
868
|
}
|
|
869
|
-
),
|
|
869
|
+
), sn = (t) => /* @__PURE__ */ e(ct, { fallback: /* @__PURE__ */ e(_t, {}), children: /* @__PURE__ */ e(en, { ...t }) }), nn = (t) => /* @__PURE__ */ e(ct, { fallback: /* @__PURE__ */ e(_t, {}), children: /* @__PURE__ */ e(tn, { ...t }) }), nt = { Creator: sn, Visitor: nn }, an = {
|
|
870
870
|
isUnlocking: () => !1
|
|
871
|
-
},
|
|
872
|
-
LockedAttachment:
|
|
873
|
-
},
|
|
874
|
-
function
|
|
875
|
-
return
|
|
871
|
+
}, rn = {
|
|
872
|
+
LockedAttachment: an
|
|
873
|
+
}, yt = ot({}), ia = yt.Provider;
|
|
874
|
+
function on(t) {
|
|
875
|
+
return lt(yt)[t] ?? rn[t];
|
|
876
876
|
}
|
|
877
|
-
const
|
|
878
|
-
"path",
|
|
879
|
-
{
|
|
880
|
-
d: "M4.667 7.333l2.666-6A1.333 1.333 0 018.667 2v2.667a.667.667 0 00.666.666h3.764a1.334 1.334 0 011.192 1.93l-2.333 4.666a1.333 1.333 0 01-1.193.738H4.667m0-5.334v5.334m0-5.334H2.667a1.333 1.333 0 00-1.334 1.334v2.666a1.333 1.333 0 001.334 1.334h2",
|
|
881
|
-
stroke: "currentColor",
|
|
882
|
-
strokeWidth: "1.33",
|
|
883
|
-
strokeLinecap: "round",
|
|
884
|
-
strokeLinejoin: "round",
|
|
885
|
-
fill: t ? "currentColor" : "none"
|
|
886
|
-
}
|
|
887
|
-
) }), hn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
888
|
-
"path",
|
|
889
|
-
{
|
|
890
|
-
d: "M11.333 8.667l-2.666 6A1.333 1.333 0 017.333 14v-2.667a.667.667 0 00-.666-.666H2.903a1.334 1.334 0 01-1.192-1.93l2.333-4.666a1.333 1.333 0 011.193-.738h6.096m0 5.334V3.333m0 5.334h2a1.333 1.333 0 001.334-1.334V4.667a1.333 1.333 0 00-1.334-1.334h-2",
|
|
891
|
-
stroke: "currentColor",
|
|
892
|
-
strokeWidth: "1.33",
|
|
893
|
-
strokeLinecap: "round",
|
|
894
|
-
strokeLinejoin: "round",
|
|
895
|
-
fill: t ? "currentColor" : "none"
|
|
896
|
-
}
|
|
897
|
-
) }), fn = ({
|
|
877
|
+
const ln = ({
|
|
898
878
|
selected: t,
|
|
899
879
|
onVoteUp: s,
|
|
900
880
|
onVoteDown: n
|
|
@@ -903,26 +883,32 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
903
883
|
"button",
|
|
904
884
|
{
|
|
905
885
|
type: "button",
|
|
906
|
-
className:
|
|
886
|
+
className: D("message-vote-button focus-ring", {
|
|
887
|
+
"message-vote-button--selected": t === "up"
|
|
888
|
+
}),
|
|
907
889
|
onClick: s,
|
|
908
|
-
"aria-label": "
|
|
890
|
+
"aria-label": "Good response",
|
|
909
891
|
"aria-pressed": t === "up",
|
|
910
|
-
|
|
892
|
+
"data-tooltip": "Good response",
|
|
893
|
+
children: /* @__PURE__ */ e(bs, { size: 16, weight: t === "up" ? "fill" : "regular" })
|
|
911
894
|
}
|
|
912
895
|
),
|
|
913
896
|
/* @__PURE__ */ e(
|
|
914
897
|
"button",
|
|
915
898
|
{
|
|
916
899
|
type: "button",
|
|
917
|
-
className:
|
|
900
|
+
className: D("message-vote-button focus-ring", {
|
|
901
|
+
"message-vote-button--selected": t === "down"
|
|
902
|
+
}),
|
|
918
903
|
onClick: n,
|
|
919
|
-
"aria-label": "
|
|
904
|
+
"aria-label": "Bad response",
|
|
920
905
|
"aria-pressed": t === "down",
|
|
921
|
-
|
|
906
|
+
"data-tooltip": "Bad response",
|
|
907
|
+
children: /* @__PURE__ */ e(ps, { size: 16, weight: t === "down" ? "fill" : "regular" })
|
|
922
908
|
}
|
|
923
909
|
)
|
|
924
|
-
] }),
|
|
925
|
-
var
|
|
910
|
+
] }), cn = (t) => {
|
|
911
|
+
var se, Oe, Pe, Ue, ze, Be, $e, je, Ge, Ve, He, Ye, qe, We;
|
|
926
912
|
const {
|
|
927
913
|
additionalMessageInputProps: s,
|
|
928
914
|
chatbotVotingEnabled: n,
|
|
@@ -931,77 +917,77 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
931
917
|
firstOfGroup: l,
|
|
932
918
|
groupedByUser: i,
|
|
933
919
|
handleAction: c,
|
|
934
|
-
handleOpenThread:
|
|
920
|
+
handleOpenThread: m,
|
|
935
921
|
handleRetry: u,
|
|
936
|
-
highlighted:
|
|
922
|
+
highlighted: h,
|
|
937
923
|
isMessageAIGenerated: f,
|
|
938
924
|
isMyMessage: v,
|
|
939
925
|
message: a,
|
|
940
|
-
renderText:
|
|
941
|
-
threadList:
|
|
942
|
-
} = t, { client:
|
|
943
|
-
Attachment:
|
|
944
|
-
EditMessageModal:
|
|
945
|
-
MessageBlocked:
|
|
946
|
-
MessageBouncePrompt:
|
|
947
|
-
MessageDeleted:
|
|
948
|
-
MessageIsThreadReplyInChannelButtonIndicator:
|
|
949
|
-
MessageRepliesCountButton:
|
|
950
|
-
ReminderNotification:
|
|
951
|
-
StreamedMessageText:
|
|
952
|
-
PinIndicator:
|
|
953
|
-
} =
|
|
926
|
+
renderText: N,
|
|
927
|
+
threadList: b
|
|
928
|
+
} = t, { client: C } = Me("CustomMessage"), { channel: x } = oe("CustomMessage"), { isUnlocking: I, onUnlockClick: w, onFetchSource: E, onDownloadClick: P } = on("LockedAttachment"), [U, k] = A(!1), T = Ft(a.id), { selected: M, voteUp: y, voteDown: _ } = Qs(a), {
|
|
929
|
+
Attachment: F = Ot,
|
|
930
|
+
EditMessageModal: H = Pt,
|
|
931
|
+
MessageBlocked: R = Ut,
|
|
932
|
+
MessageBouncePrompt: z = zt,
|
|
933
|
+
MessageDeleted: S = Bt,
|
|
934
|
+
MessageIsThreadReplyInChannelButtonIndicator: $ = $t,
|
|
935
|
+
MessageRepliesCountButton: V = jt,
|
|
936
|
+
ReminderNotification: ee = Gt,
|
|
937
|
+
StreamedMessageText: te = Vt,
|
|
938
|
+
PinIndicator: q
|
|
939
|
+
} = dt("CustomMessage"), g = Ht(a), p = Yt(a), L = Ce(
|
|
954
940
|
() => f == null ? void 0 : f(a),
|
|
955
941
|
[f, a]
|
|
956
|
-
),
|
|
942
|
+
), j = Ce(
|
|
957
943
|
() => !a.shared_location && !a.attachments ? [] : a.shared_location ? [a.shared_location, ...a.attachments ?? []] : a.attachments,
|
|
958
944
|
[a]
|
|
959
945
|
);
|
|
960
|
-
if (
|
|
946
|
+
if (qt(a))
|
|
961
947
|
return null;
|
|
962
948
|
if (a.deleted_at || a.type === "deleted")
|
|
963
|
-
return /* @__PURE__ */ e(
|
|
964
|
-
if (
|
|
965
|
-
return /* @__PURE__ */ e(
|
|
966
|
-
const
|
|
967
|
-
let
|
|
968
|
-
|
|
969
|
-
const
|
|
949
|
+
return /* @__PURE__ */ e(S, { message: a });
|
|
950
|
+
if (Wt(a))
|
|
951
|
+
return /* @__PURE__ */ e(R, {});
|
|
952
|
+
const Y = !b && !!a.reply_count, ae = !b && a.show_in_channel && a.parent_id, de = a.status === "failed" && ((se = a.error) == null ? void 0 : se.status) !== 403, re = Xt(a);
|
|
953
|
+
let W;
|
|
954
|
+
de ? W = () => u(a) : re && (W = () => k(!0));
|
|
955
|
+
const ie = v(), pe = D(
|
|
970
956
|
"str-chat__message str-chat__message-simple",
|
|
971
957
|
`str-chat__message--${a.type}`,
|
|
972
958
|
`str-chat__message--${a.status}`,
|
|
973
|
-
|
|
959
|
+
ie ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
|
|
974
960
|
a.text ? "str-chat__message--has-text" : "has-no-text",
|
|
975
961
|
{
|
|
976
|
-
"str-chat__message--has-attachment":
|
|
977
|
-
"str-chat__message--highlighted":
|
|
962
|
+
"str-chat__message--has-attachment": g,
|
|
963
|
+
"str-chat__message--highlighted": h,
|
|
978
964
|
"str-chat__message--pinned pinned-message": a.pinned,
|
|
979
|
-
"str-chat__message--with-reactions":
|
|
980
|
-
"str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((
|
|
981
|
-
"str-chat__message-with-thread-link":
|
|
965
|
+
"str-chat__message--with-reactions": p,
|
|
966
|
+
"str-chat__message-send-can-be-retried": (a == null ? void 0 : a.status) === "failed" && ((Oe = a == null ? void 0 : a.error) == null ? void 0 : Oe.status) !== 403,
|
|
967
|
+
"str-chat__message-with-thread-link": Y || ae,
|
|
982
968
|
"str-chat__virtual-message__wrapper--end": o,
|
|
983
969
|
"str-chat__virtual-message__wrapper--first": l,
|
|
984
970
|
"str-chat__virtual-message__wrapper--group": i
|
|
985
971
|
}
|
|
986
|
-
),
|
|
987
|
-
return /* @__PURE__ */ d(
|
|
972
|
+
), ue = a.poll_id && C.polls.fromState(a.poll_id), xe = Ys(a), K = De(a), B = Hs(a), X = !!(j != null && j.length && !a.quoted_message), Q = K && ie && X;
|
|
973
|
+
return /* @__PURE__ */ d(ce, { children: [
|
|
988
974
|
r && /* @__PURE__ */ e(
|
|
989
|
-
|
|
975
|
+
H,
|
|
990
976
|
{
|
|
991
977
|
additionalMessageInputProps: s
|
|
992
978
|
}
|
|
993
979
|
),
|
|
994
|
-
|
|
995
|
-
|
|
980
|
+
U && /* @__PURE__ */ e(
|
|
981
|
+
Zt,
|
|
996
982
|
{
|
|
997
|
-
MessageBouncePrompt:
|
|
998
|
-
onClose: () =>
|
|
999
|
-
open:
|
|
983
|
+
MessageBouncePrompt: z,
|
|
984
|
+
onClose: () => k(!1),
|
|
985
|
+
open: U
|
|
1000
986
|
}
|
|
1001
987
|
),
|
|
1002
|
-
/* @__PURE__ */ d("div", { className:
|
|
1003
|
-
|
|
1004
|
-
!!
|
|
988
|
+
/* @__PURE__ */ d("div", { className: pe, children: [
|
|
989
|
+
q && /* @__PURE__ */ e(q, {}),
|
|
990
|
+
!!T && /* @__PURE__ */ e(ee, { reminder: T }),
|
|
1005
991
|
a.user && /* @__PURE__ */ e(
|
|
1006
992
|
ne,
|
|
1007
993
|
{
|
|
@@ -1014,120 +1000,120 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1014
1000
|
/* @__PURE__ */ e(
|
|
1015
1001
|
"div",
|
|
1016
1002
|
{
|
|
1017
|
-
className:
|
|
1018
|
-
"str-chat__simple-message--error-failed":
|
|
1003
|
+
className: D("str-chat__message-inner", {
|
|
1004
|
+
"str-chat__simple-message--error-failed": de || re
|
|
1019
1005
|
}),
|
|
1020
1006
|
"data-testid": "message-inner",
|
|
1021
|
-
onClick:
|
|
1022
|
-
onKeyDown:
|
|
1023
|
-
role:
|
|
1024
|
-
tabIndex:
|
|
1007
|
+
onClick: W,
|
|
1008
|
+
onKeyDown: W,
|
|
1009
|
+
role: W ? "button" : void 0,
|
|
1010
|
+
tabIndex: W ? 0 : void 0,
|
|
1025
1011
|
style: {
|
|
1026
1012
|
// Force margins to 0 to prevent hover layout shift
|
|
1027
1013
|
// Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
|
|
1028
1014
|
marginInlineEnd: 0,
|
|
1029
1015
|
marginInlineStart: 0
|
|
1030
1016
|
},
|
|
1031
|
-
children:
|
|
1032
|
-
|
|
1033
|
-
|
|
1017
|
+
children: B ? /* @__PURE__ */ d("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1018
|
+
ie ? /* @__PURE__ */ e(
|
|
1019
|
+
nt.Creator,
|
|
1034
1020
|
{
|
|
1035
|
-
title: (
|
|
1036
|
-
mimeType: (
|
|
1037
|
-
thumbnailUrl: (
|
|
1038
|
-
amountText: (
|
|
1039
|
-
detail: (
|
|
1040
|
-
paymentStatus: (
|
|
1041
|
-
isUnlocking:
|
|
1042
|
-
onPreviewClick: () => w == null ? void 0 : w(a,
|
|
1043
|
-
onFetchSource: async () => await (E == null ? void 0 : E(a,
|
|
1021
|
+
title: (Pe = a.metadata) == null ? void 0 : Pe.attachment_title,
|
|
1022
|
+
mimeType: (Ue = a.metadata) == null ? void 0 : Ue.attachment_mime_type,
|
|
1023
|
+
thumbnailUrl: (ze = a.metadata) == null ? void 0 : ze.attachment_thumbnail,
|
|
1024
|
+
amountText: (Be = a.metadata) == null ? void 0 : Be.amount_text,
|
|
1025
|
+
detail: ($e = a.metadata) == null ? void 0 : $e.attachment_detail,
|
|
1026
|
+
paymentStatus: (je = a.metadata) == null ? void 0 : je.payment_status,
|
|
1027
|
+
isUnlocking: I(a.id),
|
|
1028
|
+
onPreviewClick: () => w == null ? void 0 : w(a, x),
|
|
1029
|
+
onFetchSource: async () => await (E == null ? void 0 : E(a, x))
|
|
1044
1030
|
}
|
|
1045
1031
|
) : /* @__PURE__ */ e(
|
|
1046
|
-
|
|
1032
|
+
nt.Visitor,
|
|
1047
1033
|
{
|
|
1048
|
-
title: (
|
|
1049
|
-
mimeType: (
|
|
1050
|
-
thumbnailUrl: (
|
|
1051
|
-
amountText: (
|
|
1052
|
-
detail: (
|
|
1053
|
-
paymentStatus: (
|
|
1054
|
-
isUnlocking:
|
|
1055
|
-
onUnlockClick: () => w == null ? void 0 : w(a,
|
|
1056
|
-
onFetchSource: async () => await (E == null ? void 0 : E(a,
|
|
1057
|
-
onDownloadClick: () =>
|
|
1034
|
+
title: (Ge = a.metadata) == null ? void 0 : Ge.attachment_title,
|
|
1035
|
+
mimeType: (Ve = a.metadata) == null ? void 0 : Ve.attachment_mime_type,
|
|
1036
|
+
thumbnailUrl: (He = a.metadata) == null ? void 0 : He.attachment_thumbnail,
|
|
1037
|
+
amountText: (Ye = a.metadata) == null ? void 0 : Ye.amount_text,
|
|
1038
|
+
detail: (qe = a.metadata) == null ? void 0 : qe.attachment_detail,
|
|
1039
|
+
paymentStatus: (We = a.metadata) == null ? void 0 : We.payment_status,
|
|
1040
|
+
isUnlocking: I(a.id),
|
|
1041
|
+
onUnlockClick: () => w == null ? void 0 : w(a, x),
|
|
1042
|
+
onFetchSource: async () => await (E == null ? void 0 : E(a, x)),
|
|
1043
|
+
onDownloadClick: () => P == null ? void 0 : P(a, x)
|
|
1058
1044
|
}
|
|
1059
1045
|
),
|
|
1060
|
-
a.text && /* @__PURE__ */ e("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ e(
|
|
1061
|
-
] }) :
|
|
1046
|
+
a.text && /* @__PURE__ */ e("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ e(Xe, { message: a, renderText: N }) })
|
|
1047
|
+
] }) : xe ? (
|
|
1062
1048
|
/* Tip-only messages render as a standalone bubble */
|
|
1063
|
-
/* @__PURE__ */ e(
|
|
1049
|
+
/* @__PURE__ */ e(_e, { message: a, standalone: !0 })
|
|
1064
1050
|
) : /* @__PURE__ */ d("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
1065
1051
|
/* @__PURE__ */ d("div", { className: "str-chat__message-bubble", children: [
|
|
1066
|
-
|
|
1067
|
-
|
|
1052
|
+
K && !Q && /* @__PURE__ */ e(
|
|
1053
|
+
_e,
|
|
1068
1054
|
{
|
|
1069
1055
|
message: a,
|
|
1070
|
-
hasAttachment:
|
|
1071
|
-
isMyMessage:
|
|
1056
|
+
hasAttachment: X,
|
|
1057
|
+
isMyMessage: ie
|
|
1072
1058
|
}
|
|
1073
1059
|
),
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1060
|
+
ue && /* @__PURE__ */ e(Jt, { poll: ue }),
|
|
1061
|
+
j != null && j.length && !a.quoted_message ? /* @__PURE__ */ e(
|
|
1062
|
+
F,
|
|
1077
1063
|
{
|
|
1078
1064
|
actionHandler: c,
|
|
1079
|
-
attachments:
|
|
1065
|
+
attachments: j
|
|
1080
1066
|
}
|
|
1081
1067
|
) : null,
|
|
1082
|
-
|
|
1083
|
-
|
|
1068
|
+
L ? /* @__PURE__ */ e(
|
|
1069
|
+
te,
|
|
1084
1070
|
{
|
|
1085
1071
|
message: a,
|
|
1086
|
-
renderText:
|
|
1072
|
+
renderText: N
|
|
1087
1073
|
}
|
|
1088
|
-
) : /* @__PURE__ */ e(
|
|
1089
|
-
/* @__PURE__ */ e(
|
|
1074
|
+
) : /* @__PURE__ */ e(Xe, { message: a, renderText: N }),
|
|
1075
|
+
/* @__PURE__ */ e(Kt, {})
|
|
1090
1076
|
] }),
|
|
1091
|
-
(!
|
|
1092
|
-
|
|
1077
|
+
(!K || Q) && /* @__PURE__ */ e(
|
|
1078
|
+
_e,
|
|
1093
1079
|
{
|
|
1094
1080
|
message: a,
|
|
1095
|
-
hasAttachment:
|
|
1096
|
-
isMyMessage:
|
|
1081
|
+
hasAttachment: X,
|
|
1082
|
+
isMyMessage: ie
|
|
1097
1083
|
}
|
|
1098
1084
|
),
|
|
1099
|
-
n &&
|
|
1100
|
-
|
|
1085
|
+
n && K && /* @__PURE__ */ e(
|
|
1086
|
+
ln,
|
|
1101
1087
|
{
|
|
1102
|
-
selected:
|
|
1103
|
-
onVoteUp:
|
|
1104
|
-
onVoteDown:
|
|
1088
|
+
selected: M,
|
|
1089
|
+
onVoteUp: y,
|
|
1090
|
+
onVoteDown: _
|
|
1105
1091
|
}
|
|
1106
1092
|
)
|
|
1107
1093
|
] })
|
|
1108
1094
|
}
|
|
1109
1095
|
),
|
|
1110
|
-
|
|
1111
|
-
|
|
1096
|
+
Y && /* @__PURE__ */ e(
|
|
1097
|
+
V,
|
|
1112
1098
|
{
|
|
1113
|
-
onClick:
|
|
1099
|
+
onClick: m,
|
|
1114
1100
|
reply_count: a.reply_count
|
|
1115
1101
|
}
|
|
1116
1102
|
),
|
|
1117
|
-
|
|
1103
|
+
ae && /* @__PURE__ */ e($, {})
|
|
1118
1104
|
] }, a.id)
|
|
1119
1105
|
] });
|
|
1120
|
-
},
|
|
1121
|
-
|
|
1122
|
-
(t, s) => t.chatbotVotingEnabled !== s.chatbotVotingEnabled ? !1 :
|
|
1123
|
-
),
|
|
1124
|
-
const s =
|
|
1125
|
-
return /* @__PURE__ */ e(
|
|
1126
|
-
},
|
|
1106
|
+
}, dn = O.memo(
|
|
1107
|
+
cn,
|
|
1108
|
+
(t, s) => t.chatbotVotingEnabled !== s.chatbotVotingEnabled ? !1 : At(t, s)
|
|
1109
|
+
), un = (t) => {
|
|
1110
|
+
const s = ut("CustomMessage");
|
|
1111
|
+
return /* @__PURE__ */ e(dn, { ...s, ...t });
|
|
1112
|
+
}, mn = (t) => ({
|
|
1127
1113
|
linkPreviews: Array.from(t.previews.values()).filter(
|
|
1128
|
-
(s) =>
|
|
1114
|
+
(s) => tt.previewIsLoaded(s) || tt.previewIsLoading(s)
|
|
1129
1115
|
)
|
|
1130
|
-
}),
|
|
1116
|
+
}), hn = ({
|
|
1131
1117
|
link: t,
|
|
1132
1118
|
onDismiss: s
|
|
1133
1119
|
}) => {
|
|
@@ -1157,7 +1143,7 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1157
1143
|
},
|
|
1158
1144
|
className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
|
|
1159
1145
|
"aria-label": "Close link preview",
|
|
1160
|
-
children: /* @__PURE__ */ e(
|
|
1146
|
+
children: /* @__PURE__ */ e(mt, { className: "size-4 text-black/90" })
|
|
1161
1147
|
}
|
|
1162
1148
|
),
|
|
1163
1149
|
/* @__PURE__ */ d("div", { className: "p-2", children: [
|
|
@@ -1167,22 +1153,22 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1167
1153
|
]
|
|
1168
1154
|
}
|
|
1169
1155
|
);
|
|
1170
|
-
},
|
|
1171
|
-
const { linkPreviewsManager: t } =
|
|
1156
|
+
}, fn = () => {
|
|
1157
|
+
const { linkPreviewsManager: t } = Qt(), { linkPreviews: s } = es(
|
|
1172
1158
|
t.state,
|
|
1173
|
-
|
|
1159
|
+
mn
|
|
1174
1160
|
), n = (o) => {
|
|
1175
1161
|
t.dismissPreview(o);
|
|
1176
1162
|
};
|
|
1177
1163
|
return s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: s.map((o) => /* @__PURE__ */ e(
|
|
1178
|
-
|
|
1164
|
+
hn,
|
|
1179
1165
|
{
|
|
1180
1166
|
link: o,
|
|
1181
1167
|
onDismiss: n
|
|
1182
1168
|
},
|
|
1183
1169
|
o.og_scrape_url
|
|
1184
1170
|
)) }) : null;
|
|
1185
|
-
},
|
|
1171
|
+
}, gn = ({ sendMessage: t, disabled: s, ...n }) => /* @__PURE__ */ e(
|
|
1186
1172
|
"button",
|
|
1187
1173
|
{
|
|
1188
1174
|
...n,
|
|
@@ -1190,22 +1176,22 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1190
1176
|
"aria-label": "Send",
|
|
1191
1177
|
disabled: s,
|
|
1192
1178
|
onClick: t,
|
|
1193
|
-
children: /* @__PURE__ */ e(
|
|
1179
|
+
children: /* @__PURE__ */ e(xs, { weight: "bold", className: "size-4" })
|
|
1194
1180
|
}
|
|
1195
|
-
),
|
|
1181
|
+
), bn = () => {
|
|
1196
1182
|
var c;
|
|
1197
|
-
const { channel: t } =
|
|
1183
|
+
const { channel: t } = oe(), s = ((c = t == null ? void 0 : t.data) == null ? void 0 : c.frozen) === !0, { handleSubmit: n } = ss(), { SendButton: r } = dt(
|
|
1198
1184
|
"CustomMessageInput"
|
|
1199
|
-
), o = r ??
|
|
1200
|
-
return /* @__PURE__ */ d(
|
|
1201
|
-
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(
|
|
1185
|
+
), o = r ?? gn, l = ns();
|
|
1186
|
+
return /* @__PURE__ */ d(ce, { children: [
|
|
1187
|
+
/* @__PURE__ */ e("div", { className: "left-container", children: /* @__PURE__ */ e(as, {}) }),
|
|
1202
1188
|
/* @__PURE__ */ d("div", { className: "central-container min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
|
|
1203
|
-
/* @__PURE__ */ e(
|
|
1204
|
-
/* @__PURE__ */ e(
|
|
1205
|
-
/* @__PURE__ */ e(
|
|
1189
|
+
/* @__PURE__ */ e(rs, {}),
|
|
1190
|
+
/* @__PURE__ */ e(fn, {}),
|
|
1191
|
+
/* @__PURE__ */ e(is, {}),
|
|
1206
1192
|
/* @__PURE__ */ d("div", { className: "flex", children: [
|
|
1207
1193
|
/* @__PURE__ */ e("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ e(
|
|
1208
|
-
|
|
1194
|
+
os,
|
|
1209
1195
|
{
|
|
1210
1196
|
"aria-disabled": s || void 0,
|
|
1211
1197
|
className: "w-full resize-none outline-none leading-6",
|
|
@@ -1229,11 +1215,11 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1229
1215
|
] })
|
|
1230
1216
|
] })
|
|
1231
1217
|
] });
|
|
1232
|
-
},
|
|
1218
|
+
}, pn = ({
|
|
1233
1219
|
renderActions: t
|
|
1234
1220
|
}) => {
|
|
1235
1221
|
var r;
|
|
1236
|
-
const { channel: s } =
|
|
1222
|
+
const { channel: s } = oe(), n = ((r = s == null ? void 0 : s.data) == null ? void 0 : r.frozen) === !0;
|
|
1237
1223
|
return /* @__PURE__ */ d(
|
|
1238
1224
|
"div",
|
|
1239
1225
|
{
|
|
@@ -1242,65 +1228,65 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1242
1228
|
className: "message-input flex items-center gap-2 p-4 aria-disabled:opacity-40",
|
|
1243
1229
|
children: [
|
|
1244
1230
|
t == null ? void 0 : t(),
|
|
1245
|
-
/* @__PURE__ */ e(
|
|
1231
|
+
/* @__PURE__ */ e(ts, { Input: bn })
|
|
1246
1232
|
]
|
|
1247
1233
|
}
|
|
1248
1234
|
);
|
|
1249
|
-
},
|
|
1235
|
+
}, xn = [
|
|
1250
1236
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1251
1237
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1252
|
-
],
|
|
1238
|
+
], vn = {
|
|
1253
1239
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1254
1240
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1255
|
-
},
|
|
1241
|
+
}, wn = [
|
|
1256
1242
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1257
|
-
],
|
|
1243
|
+
], _n = {
|
|
1258
1244
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1259
|
-
},
|
|
1245
|
+
}, ye = "age safety guidelines.", yn = "https://linktr.ee/s/about/contact", at = (t) => xn.includes(t), Nn = (t) => wn.includes(t), Cn = (t) => {
|
|
1260
1246
|
var r;
|
|
1261
1247
|
const s = (r = t.metadata) == null ? void 0 : r.custom_type;
|
|
1262
|
-
if (
|
|
1248
|
+
if (at(s))
|
|
1263
1249
|
return {
|
|
1264
1250
|
kind: "dm-agent",
|
|
1265
1251
|
type: s
|
|
1266
1252
|
};
|
|
1267
|
-
if (
|
|
1253
|
+
if (Nn(s))
|
|
1268
1254
|
return {
|
|
1269
1255
|
kind: "age-safety",
|
|
1270
1256
|
type: s
|
|
1271
1257
|
};
|
|
1272
1258
|
const n = t.dm_agent_system_type;
|
|
1273
|
-
if (
|
|
1259
|
+
if (at(n))
|
|
1274
1260
|
return {
|
|
1275
1261
|
kind: "dm-agent",
|
|
1276
1262
|
type: n
|
|
1277
1263
|
};
|
|
1278
|
-
},
|
|
1279
|
-
const s = t.indexOf(
|
|
1264
|
+
}, En = (t) => {
|
|
1265
|
+
const s = t.indexOf(ye);
|
|
1280
1266
|
if (s === -1)
|
|
1281
1267
|
return t;
|
|
1282
|
-
const n = s +
|
|
1283
|
-
return /* @__PURE__ */ d(
|
|
1268
|
+
const n = s + ye.length;
|
|
1269
|
+
return /* @__PURE__ */ d(ce, { children: [
|
|
1284
1270
|
t.slice(0, s),
|
|
1285
1271
|
/* @__PURE__ */ e(
|
|
1286
1272
|
"a",
|
|
1287
1273
|
{
|
|
1288
|
-
href:
|
|
1274
|
+
href: yn,
|
|
1289
1275
|
target: "_blank",
|
|
1290
1276
|
rel: "noopener noreferrer",
|
|
1291
1277
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
1292
|
-
children:
|
|
1278
|
+
children: ye
|
|
1293
1279
|
}
|
|
1294
1280
|
),
|
|
1295
1281
|
t.slice(n)
|
|
1296
1282
|
] });
|
|
1297
|
-
},
|
|
1283
|
+
}, Sn = (t) => {
|
|
1298
1284
|
var r, o;
|
|
1299
|
-
const s = t.message.hide_date === !0, n =
|
|
1285
|
+
const s = t.message.hide_date === !0, n = Cn(
|
|
1300
1286
|
t.message
|
|
1301
1287
|
);
|
|
1302
1288
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
1303
|
-
const l = ((r = t.message.text) == null ? void 0 : r.trim()) ||
|
|
1289
|
+
const l = ((r = t.message.text) == null ? void 0 : r.trim()) || vn[n.type];
|
|
1304
1290
|
return /* @__PURE__ */ d("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1305
1291
|
/* @__PURE__ */ d(
|
|
1306
1292
|
"div",
|
|
@@ -1310,7 +1296,7 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1310
1296
|
"data-dm-agent-system-type": n.type,
|
|
1311
1297
|
children: [
|
|
1312
1298
|
/* @__PURE__ */ e(
|
|
1313
|
-
|
|
1299
|
+
Se,
|
|
1314
1300
|
{
|
|
1315
1301
|
size: 16,
|
|
1316
1302
|
weight: "regular",
|
|
@@ -1322,11 +1308,11 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1322
1308
|
]
|
|
1323
1309
|
}
|
|
1324
1310
|
),
|
|
1325
|
-
!s && /* @__PURE__ */ e(
|
|
1311
|
+
!s && /* @__PURE__ */ e(ve, { message: t.message })
|
|
1326
1312
|
] });
|
|
1327
1313
|
}
|
|
1328
1314
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
1329
|
-
const l = ((o = t.message.text) == null ? void 0 : o.trim()) ||
|
|
1315
|
+
const l = ((o = t.message.text) == null ? void 0 : o.trim()) || _n[n.type];
|
|
1330
1316
|
return /* @__PURE__ */ d("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1331
1317
|
/* @__PURE__ */ d(
|
|
1332
1318
|
"div",
|
|
@@ -1336,7 +1322,7 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1336
1322
|
"data-age-safety-system-type": n.type,
|
|
1337
1323
|
children: [
|
|
1338
1324
|
/* @__PURE__ */ e(
|
|
1339
|
-
|
|
1325
|
+
vs,
|
|
1340
1326
|
{
|
|
1341
1327
|
size: 24,
|
|
1342
1328
|
weight: "duotone",
|
|
@@ -1345,11 +1331,11 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1345
1331
|
"data-testid": "age-safety-system-message-icon"
|
|
1346
1332
|
}
|
|
1347
1333
|
),
|
|
1348
|
-
/* @__PURE__ */ e("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ e("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:
|
|
1334
|
+
/* @__PURE__ */ e("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ e("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: En(l) }) })
|
|
1349
1335
|
]
|
|
1350
1336
|
}
|
|
1351
1337
|
),
|
|
1352
|
-
!s && /* @__PURE__ */ e(
|
|
1338
|
+
!s && /* @__PURE__ */ e(ve, { message: t.message })
|
|
1353
1339
|
] });
|
|
1354
1340
|
}
|
|
1355
1341
|
return /* @__PURE__ */ d("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -1358,9 +1344,9 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1358
1344
|
/* @__PURE__ */ e("p", { children: t.message.text }),
|
|
1359
1345
|
/* @__PURE__ */ e("div", { className: "str-chat__message--system__line" })
|
|
1360
1346
|
] }),
|
|
1361
|
-
!s && /* @__PURE__ */ e(
|
|
1347
|
+
!s && /* @__PURE__ */ e(ve, { message: t.message })
|
|
1362
1348
|
] });
|
|
1363
|
-
},
|
|
1349
|
+
}, Ne = ({ cx: t, index: s }) => /* @__PURE__ */ e("circle", { cx: t, cy: "4", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ e(
|
|
1364
1350
|
"animateTransform",
|
|
1365
1351
|
{
|
|
1366
1352
|
attributeName: "transform",
|
|
@@ -1370,25 +1356,25 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1370
1356
|
begin: `${120 * s}ms`,
|
|
1371
1357
|
repeatCount: "indefinite"
|
|
1372
1358
|
}
|
|
1373
|
-
) }),
|
|
1374
|
-
var
|
|
1375
|
-
const { channel: s, channelConfig: n, thread: r } =
|
|
1359
|
+
) }), In = ({ threadList: t }) => {
|
|
1360
|
+
var N;
|
|
1361
|
+
const { channel: s, channelConfig: n, thread: r } = oe(), { client: o } = Me(), { typing: l = {} } = ls();
|
|
1376
1362
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
1377
1363
|
return null;
|
|
1378
1364
|
const i = t ? [] : Object.values(l).filter(
|
|
1379
|
-
({ parent_id:
|
|
1380
|
-
var
|
|
1381
|
-
return (
|
|
1365
|
+
({ parent_id: b, user: C }) => {
|
|
1366
|
+
var x;
|
|
1367
|
+
return (C == null ? void 0 : C.id) !== ((x = o.user) == null ? void 0 : x.id) && !b;
|
|
1382
1368
|
}
|
|
1383
1369
|
), c = t ? Object.values(l).filter(
|
|
1384
|
-
({ parent_id:
|
|
1385
|
-
var
|
|
1386
|
-
return (
|
|
1370
|
+
({ parent_id: b, user: C }) => {
|
|
1371
|
+
var x;
|
|
1372
|
+
return (C == null ? void 0 : C.id) !== ((x = o.user) == null ? void 0 : x.id) && b === (r == null ? void 0 : r.id);
|
|
1387
1373
|
}
|
|
1388
|
-
) : [],
|
|
1389
|
-
if (!
|
|
1374
|
+
) : [], m = t ? c : i;
|
|
1375
|
+
if (!m.length)
|
|
1390
1376
|
return null;
|
|
1391
|
-
const u = (
|
|
1377
|
+
const u = (N = m[0]) == null ? void 0 : N.user, h = u != null && u.id && s.state.members[u.id] ? s.state.members[u.id].user : void 0, f = (u == null ? void 0 : u.id) ?? (h == null ? void 0 : h.id) ?? "typing-user", v = (u == null ? void 0 : u.name) ?? (h == null ? void 0 : h.name) ?? (u == null ? void 0 : u.id) ?? "Typing user", a = (u == null ? void 0 : u.image) ?? (h == null ? void 0 : h.image);
|
|
1392
1378
|
return /* @__PURE__ */ d(
|
|
1393
1379
|
"div",
|
|
1394
1380
|
{
|
|
@@ -1416,19 +1402,19 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1416
1402
|
height: "8",
|
|
1417
1403
|
overflow: "visible",
|
|
1418
1404
|
children: [
|
|
1419
|
-
/* @__PURE__ */ e(
|
|
1420
|
-
/* @__PURE__ */ e(
|
|
1421
|
-
/* @__PURE__ */ e(
|
|
1405
|
+
/* @__PURE__ */ e(Ne, { cx: "4", index: 0 }),
|
|
1406
|
+
/* @__PURE__ */ e(Ne, { cx: "16", index: 1 }),
|
|
1407
|
+
/* @__PURE__ */ e(Ne, { cx: "28", index: 2 })
|
|
1422
1408
|
]
|
|
1423
1409
|
}
|
|
1424
1410
|
) })
|
|
1425
1411
|
]
|
|
1426
1412
|
}
|
|
1427
1413
|
);
|
|
1428
|
-
},
|
|
1414
|
+
}, kn = () => null, Mn = ({ className: t, message: s }) => /* @__PURE__ */ d(
|
|
1429
1415
|
"div",
|
|
1430
1416
|
{
|
|
1431
|
-
className:
|
|
1417
|
+
className: D("flex items-center justify-center h-full", t),
|
|
1432
1418
|
children: [
|
|
1433
1419
|
/* @__PURE__ */ d("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
1434
1420
|
/* @__PURE__ */ e("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ e(
|
|
@@ -1468,12 +1454,12 @@ const mn = ({ filled: t }) => /* @__PURE__ */ e("svg", { width: "16", height: "1
|
|
|
1468
1454
|
s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
|
|
1469
1455
|
]
|
|
1470
1456
|
}
|
|
1471
|
-
),
|
|
1472
|
-
/* @__PURE__ */ e(
|
|
1457
|
+
), fe = O.memo(() => /* @__PURE__ */ e("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ d("div", { className: "flex items-center", children: [
|
|
1458
|
+
/* @__PURE__ */ e(Mn, { className: "w-6 h-6" }),
|
|
1473
1459
|
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
1474
1460
|
] }) }));
|
|
1475
|
-
|
|
1476
|
-
const
|
|
1461
|
+
fe.displayName = "LoadingState";
|
|
1462
|
+
const le = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", rt = "Replies instantly with AI assistant", Tn = ({
|
|
1477
1463
|
onBack: t,
|
|
1478
1464
|
showBackButton: s,
|
|
1479
1465
|
onShowInfo: n,
|
|
@@ -1481,19 +1467,19 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1481
1467
|
showStarButton: o = !1,
|
|
1482
1468
|
dmAgentEnabled: l = !1
|
|
1483
1469
|
}) => {
|
|
1484
|
-
var v, a,
|
|
1485
|
-
const { channel: i } =
|
|
1486
|
-
(
|
|
1470
|
+
var v, a, N, b, C;
|
|
1471
|
+
const { channel: i } = oe(), c = O.useMemo(() => Object.values(i.state.members || {}).find(
|
|
1472
|
+
(I) => {
|
|
1487
1473
|
var w;
|
|
1488
|
-
return ((w =
|
|
1474
|
+
return ((w = I.user) == null ? void 0 : w.id) && I.user.id !== i._client.userID;
|
|
1489
1475
|
}
|
|
1490
|
-
), [i._client.userID, i.state.members]),
|
|
1476
|
+
), [i._client.userID, i.state.members]), m = ((v = c == null ? void 0 : c.user) == null ? void 0 : v.name) || ((a = c == null ? void 0 : c.user) == null ? void 0 : a.id) || "Unknown member", u = (N = c == null ? void 0 : c.user) == null ? void 0 : N.image, h = pt(i), f = async () => {
|
|
1491
1477
|
try {
|
|
1492
|
-
|
|
1493
|
-
} catch (
|
|
1478
|
+
h ? await i.unpin() : await i.pin();
|
|
1479
|
+
} catch (x) {
|
|
1494
1480
|
console.error(
|
|
1495
1481
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
1496
|
-
|
|
1482
|
+
x
|
|
1497
1483
|
);
|
|
1498
1484
|
}
|
|
1499
1485
|
};
|
|
@@ -1502,22 +1488,22 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1502
1488
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: s && /* @__PURE__ */ e(
|
|
1503
1489
|
"button",
|
|
1504
1490
|
{
|
|
1505
|
-
className:
|
|
1491
|
+
className: le,
|
|
1506
1492
|
onClick: t || (() => {
|
|
1507
1493
|
}),
|
|
1508
1494
|
type: "button",
|
|
1509
1495
|
"aria-label": "Back to conversations",
|
|
1510
|
-
children: /* @__PURE__ */ e(
|
|
1496
|
+
children: /* @__PURE__ */ e(Je, { className: "size-5 text-black/90" })
|
|
1511
1497
|
}
|
|
1512
1498
|
) }),
|
|
1513
1499
|
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1 items-center", children: [
|
|
1514
1500
|
/* @__PURE__ */ e(
|
|
1515
1501
|
ne,
|
|
1516
1502
|
{
|
|
1517
|
-
id: ((
|
|
1518
|
-
name:
|
|
1503
|
+
id: ((b = c == null ? void 0 : c.user) == null ? void 0 : b.id) || i.id || "unknown",
|
|
1504
|
+
name: m,
|
|
1519
1505
|
image: u,
|
|
1520
|
-
starred: o &&
|
|
1506
|
+
starred: o && h,
|
|
1521
1507
|
dmAgentEnabled: l,
|
|
1522
1508
|
size: 40
|
|
1523
1509
|
}
|
|
@@ -1528,34 +1514,34 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1528
1514
|
type: "button",
|
|
1529
1515
|
onClick: n,
|
|
1530
1516
|
className: "flex items-center gap-0.5 rounded-full bg-black/[0.05] px-3 py-1 text-xs font-medium text-black/90 hover:bg-black/[0.08] transition-colors",
|
|
1531
|
-
"aria-label": `View info for ${
|
|
1517
|
+
"aria-label": `View info for ${m}`,
|
|
1532
1518
|
children: [
|
|
1533
|
-
|
|
1534
|
-
/* @__PURE__ */ e(
|
|
1519
|
+
m,
|
|
1520
|
+
/* @__PURE__ */ e(Ke, { className: "size-3 shrink-0" })
|
|
1535
1521
|
]
|
|
1536
1522
|
}
|
|
1537
1523
|
),
|
|
1538
1524
|
l && /* @__PURE__ */ d("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
1539
|
-
/* @__PURE__ */ e(
|
|
1540
|
-
/* @__PURE__ */ e("span", { children:
|
|
1525
|
+
/* @__PURE__ */ e(Se, { className: "size-3 shrink-0 text-black/55" }),
|
|
1526
|
+
/* @__PURE__ */ e("span", { children: rt })
|
|
1541
1527
|
] })
|
|
1542
1528
|
] }),
|
|
1543
1529
|
/* @__PURE__ */ d("div", { className: "flex justify-end items-center gap-2", children: [
|
|
1544
1530
|
o && /* @__PURE__ */ e(
|
|
1545
1531
|
"button",
|
|
1546
1532
|
{
|
|
1547
|
-
className:
|
|
1533
|
+
className: le,
|
|
1548
1534
|
onClick: f,
|
|
1549
1535
|
type: "button",
|
|
1550
|
-
"aria-label":
|
|
1536
|
+
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1551
1537
|
children: /* @__PURE__ */ e(
|
|
1552
|
-
|
|
1538
|
+
Ee,
|
|
1553
1539
|
{
|
|
1554
|
-
className:
|
|
1555
|
-
"text-yellow-600":
|
|
1556
|
-
"text-black/90": !
|
|
1540
|
+
className: D("size-5", {
|
|
1541
|
+
"text-yellow-600": h,
|
|
1542
|
+
"text-black/90": !h
|
|
1557
1543
|
}),
|
|
1558
|
-
weight:
|
|
1544
|
+
weight: h ? "duotone" : "regular"
|
|
1559
1545
|
}
|
|
1560
1546
|
)
|
|
1561
1547
|
}
|
|
@@ -1563,11 +1549,11 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1563
1549
|
/* @__PURE__ */ e(
|
|
1564
1550
|
"button",
|
|
1565
1551
|
{
|
|
1566
|
-
className:
|
|
1552
|
+
className: le,
|
|
1567
1553
|
onClick: n,
|
|
1568
1554
|
type: "button",
|
|
1569
1555
|
"aria-label": "Show info",
|
|
1570
|
-
children: /* @__PURE__ */ e(
|
|
1556
|
+
children: /* @__PURE__ */ e(Qe, { className: "size-5 text-black/90" })
|
|
1571
1557
|
}
|
|
1572
1558
|
)
|
|
1573
1559
|
] })
|
|
@@ -1579,18 +1565,18 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1579
1565
|
{
|
|
1580
1566
|
type: "button",
|
|
1581
1567
|
onClick: t,
|
|
1582
|
-
className:
|
|
1568
|
+
className: le,
|
|
1583
1569
|
"aria-label": "Back to conversations",
|
|
1584
|
-
children: /* @__PURE__ */ e(
|
|
1570
|
+
children: /* @__PURE__ */ e(Je, { className: "size-5 text-black/90" })
|
|
1585
1571
|
}
|
|
1586
1572
|
),
|
|
1587
1573
|
/* @__PURE__ */ e(
|
|
1588
1574
|
ne,
|
|
1589
1575
|
{
|
|
1590
|
-
id: ((
|
|
1591
|
-
name:
|
|
1576
|
+
id: ((C = c == null ? void 0 : c.user) == null ? void 0 : C.id) || i.id || "unknown",
|
|
1577
|
+
name: m,
|
|
1592
1578
|
image: u,
|
|
1593
|
-
starred: o &&
|
|
1579
|
+
starred: o && h,
|
|
1594
1580
|
dmAgentEnabled: l,
|
|
1595
1581
|
size: 40
|
|
1596
1582
|
}
|
|
@@ -1602,16 +1588,16 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1602
1588
|
type: "button",
|
|
1603
1589
|
onClick: n,
|
|
1604
1590
|
className: "flex items-center gap-1 font-medium text-black/90 truncate hover:text-black/70 transition-colors",
|
|
1605
|
-
"aria-label": `View info for ${
|
|
1591
|
+
"aria-label": `View info for ${m}`,
|
|
1606
1592
|
children: [
|
|
1607
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1608
|
-
/* @__PURE__ */ e(
|
|
1593
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: m }),
|
|
1594
|
+
/* @__PURE__ */ e(Ke, { className: "size-4 shrink-0" })
|
|
1609
1595
|
]
|
|
1610
1596
|
}
|
|
1611
|
-
) : /* @__PURE__ */ e("h1", { className: "font-medium text-black/90 truncate", children:
|
|
1597
|
+
) : /* @__PURE__ */ e("h1", { className: "font-medium text-black/90 truncate", children: m }),
|
|
1612
1598
|
l && /* @__PURE__ */ d("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
1613
|
-
/* @__PURE__ */ e(
|
|
1614
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
1599
|
+
/* @__PURE__ */ e(Se, { className: "size-3 shrink-0 text-black/55" }),
|
|
1600
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: rt })
|
|
1615
1601
|
] })
|
|
1616
1602
|
] })
|
|
1617
1603
|
] }),
|
|
@@ -1619,18 +1605,18 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1619
1605
|
o && /* @__PURE__ */ e(
|
|
1620
1606
|
"button",
|
|
1621
1607
|
{
|
|
1622
|
-
className:
|
|
1608
|
+
className: le,
|
|
1623
1609
|
onClick: f,
|
|
1624
1610
|
type: "button",
|
|
1625
|
-
"aria-label":
|
|
1611
|
+
"aria-label": h ? "Unstar conversation" : "Star conversation",
|
|
1626
1612
|
children: /* @__PURE__ */ e(
|
|
1627
|
-
|
|
1613
|
+
Ee,
|
|
1628
1614
|
{
|
|
1629
|
-
className:
|
|
1630
|
-
"text-yellow-600":
|
|
1631
|
-
"text-black/90": !
|
|
1615
|
+
className: D("size-5", {
|
|
1616
|
+
"text-yellow-600": h,
|
|
1617
|
+
"text-black/90": !h
|
|
1632
1618
|
}),
|
|
1633
|
-
weight:
|
|
1619
|
+
weight: h ? "duotone" : "regular"
|
|
1634
1620
|
}
|
|
1635
1621
|
)
|
|
1636
1622
|
}
|
|
@@ -1638,17 +1624,17 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1638
1624
|
r && n && /* @__PURE__ */ e(
|
|
1639
1625
|
"button",
|
|
1640
1626
|
{
|
|
1641
|
-
className:
|
|
1627
|
+
className: le,
|
|
1642
1628
|
onClick: n,
|
|
1643
1629
|
type: "button",
|
|
1644
1630
|
"aria-label": "Show info",
|
|
1645
|
-
children: /* @__PURE__ */ e(
|
|
1631
|
+
children: /* @__PURE__ */ e(Qe, { className: "size-5 text-black/90" })
|
|
1646
1632
|
}
|
|
1647
1633
|
)
|
|
1648
1634
|
] })
|
|
1649
1635
|
] })
|
|
1650
1636
|
] });
|
|
1651
|
-
},
|
|
1637
|
+
}, Dn = ({
|
|
1652
1638
|
onBack: t,
|
|
1653
1639
|
showBackButton: s,
|
|
1654
1640
|
renderMessageInputActions: n,
|
|
@@ -1657,94 +1643,94 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1657
1643
|
onBlockParticipant: l,
|
|
1658
1644
|
showDeleteConversation: i = !0,
|
|
1659
1645
|
onDeleteConversationClick: c,
|
|
1660
|
-
onBlockParticipantClick:
|
|
1646
|
+
onBlockParticipantClick: m,
|
|
1661
1647
|
onReportParticipantClick: u,
|
|
1662
|
-
showStarButton:
|
|
1648
|
+
showStarButton: h = !1,
|
|
1663
1649
|
chatbotVotingEnabled: f = !1,
|
|
1664
1650
|
renderChannelBanner: v,
|
|
1665
1651
|
customProfileContent: a,
|
|
1666
|
-
customChannelActions:
|
|
1667
|
-
renderMessage:
|
|
1668
|
-
dmAgentEnabled:
|
|
1652
|
+
customChannelActions: N,
|
|
1653
|
+
renderMessage: b,
|
|
1654
|
+
dmAgentEnabled: C = !1
|
|
1669
1655
|
}) => {
|
|
1670
|
-
var
|
|
1671
|
-
const { channel:
|
|
1672
|
-
(
|
|
1673
|
-
var
|
|
1674
|
-
return ((
|
|
1656
|
+
var F, H;
|
|
1657
|
+
const { channel: x } = oe(), I = J(null), w = O.useMemo(() => Object.values(x.state.members || {}).find(
|
|
1658
|
+
(z) => {
|
|
1659
|
+
var S;
|
|
1660
|
+
return ((S = z.user) == null ? void 0 : S.id) && z.user.id !== x._client.userID;
|
|
1675
1661
|
}
|
|
1676
|
-
), [
|
|
1677
|
-
var
|
|
1678
|
-
return ((
|
|
1679
|
-
}), [
|
|
1680
|
-
const
|
|
1681
|
-
if (
|
|
1682
|
-
return String(
|
|
1683
|
-
if (
|
|
1684
|
-
return
|
|
1685
|
-
}, [
|
|
1686
|
-
var
|
|
1687
|
-
(
|
|
1688
|
-
}, []),
|
|
1689
|
-
var
|
|
1690
|
-
(
|
|
1691
|
-
}, []),
|
|
1692
|
-
(
|
|
1693
|
-
const { message:
|
|
1694
|
-
return !
|
|
1662
|
+
), [x._client.userID, x.state.members]), E = O.useMemo(() => Object.values(x.state.members || {}).find((z) => {
|
|
1663
|
+
var S;
|
|
1664
|
+
return ((S = z.user) == null ? void 0 : S.id) === x._client.userID;
|
|
1665
|
+
}), [x._client.userID, x.state.members]), P = ((F = E == null ? void 0 : E.user) == null ? void 0 : F.is_account) ?? (E == null ? void 0 : E.is_account), U = ((H = w == null ? void 0 : w.user) == null ? void 0 : H.is_account) ?? (w == null ? void 0 : w.is_account), k = C && P === !1 && U === !0, T = O.useMemo(() => {
|
|
1666
|
+
const R = x.data ?? {};
|
|
1667
|
+
if (R.followerStatus)
|
|
1668
|
+
return String(R.followerStatus);
|
|
1669
|
+
if (R.isFollower !== void 0)
|
|
1670
|
+
return R.isFollower ? "Subscribed to you" : "Not subscribed";
|
|
1671
|
+
}, [x.data]), M = G(() => {
|
|
1672
|
+
var R;
|
|
1673
|
+
(R = I.current) == null || R.showModal();
|
|
1674
|
+
}, []), y = G(() => {
|
|
1675
|
+
var R;
|
|
1676
|
+
(R = I.current) == null || R.close();
|
|
1677
|
+
}, []), _ = G(
|
|
1678
|
+
(R) => {
|
|
1679
|
+
const { message: z } = ut("ChannelView"), S = /* @__PURE__ */ e(un, { ...R, chatbotVotingEnabled: f });
|
|
1680
|
+
return !b || !z ? S : b(S, z);
|
|
1695
1681
|
},
|
|
1696
|
-
[f,
|
|
1682
|
+
[f, b]
|
|
1697
1683
|
);
|
|
1698
|
-
return /* @__PURE__ */ d(
|
|
1699
|
-
/* @__PURE__ */ e(
|
|
1684
|
+
return /* @__PURE__ */ d(ce, { children: [
|
|
1685
|
+
/* @__PURE__ */ e(ds, { overrides: { Message: _ }, children: /* @__PURE__ */ d(us, { children: [
|
|
1700
1686
|
/* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ e(
|
|
1701
|
-
|
|
1687
|
+
Tn,
|
|
1702
1688
|
{
|
|
1703
1689
|
onBack: t,
|
|
1704
1690
|
showBackButton: s,
|
|
1705
|
-
onShowInfo:
|
|
1691
|
+
onShowInfo: M,
|
|
1706
1692
|
canShowInfo: !!w,
|
|
1707
|
-
showStarButton:
|
|
1708
|
-
dmAgentEnabled:
|
|
1693
|
+
showStarButton: h,
|
|
1694
|
+
dmAgentEnabled: k
|
|
1709
1695
|
}
|
|
1710
1696
|
) }),
|
|
1711
1697
|
v == null ? void 0 : v(),
|
|
1712
1698
|
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden relative", children: /* @__PURE__ */ e(
|
|
1713
|
-
|
|
1699
|
+
ms,
|
|
1714
1700
|
{
|
|
1715
1701
|
hideDeletedMessages: !0,
|
|
1716
1702
|
hideNewMessageSeparator: !1,
|
|
1717
1703
|
messageActions: void 0
|
|
1718
1704
|
}
|
|
1719
1705
|
) }),
|
|
1720
|
-
r == null ? void 0 : r(
|
|
1706
|
+
r == null ? void 0 : r(x),
|
|
1721
1707
|
/* @__PURE__ */ e(
|
|
1722
|
-
|
|
1708
|
+
pn,
|
|
1723
1709
|
{
|
|
1724
|
-
renderActions: () => n == null ? void 0 : n(
|
|
1710
|
+
renderActions: () => n == null ? void 0 : n(x)
|
|
1725
1711
|
}
|
|
1726
1712
|
)
|
|
1727
1713
|
] }) }),
|
|
1728
1714
|
/* @__PURE__ */ e(
|
|
1729
|
-
|
|
1715
|
+
Zs,
|
|
1730
1716
|
{
|
|
1731
|
-
dialogRef:
|
|
1732
|
-
onClose:
|
|
1717
|
+
dialogRef: I,
|
|
1718
|
+
onClose: y,
|
|
1733
1719
|
participant: w,
|
|
1734
|
-
channel:
|
|
1735
|
-
followerStatusLabel:
|
|
1720
|
+
channel: x,
|
|
1721
|
+
followerStatusLabel: T,
|
|
1736
1722
|
onLeaveConversation: o,
|
|
1737
1723
|
onBlockParticipant: l,
|
|
1738
1724
|
showDeleteConversation: i,
|
|
1739
1725
|
onDeleteConversationClick: c,
|
|
1740
|
-
onBlockParticipantClick:
|
|
1726
|
+
onBlockParticipantClick: m,
|
|
1741
1727
|
onReportParticipantClick: u,
|
|
1742
1728
|
customProfileContent: a,
|
|
1743
|
-
customChannelActions:
|
|
1729
|
+
customChannelActions: N
|
|
1744
1730
|
}
|
|
1745
1731
|
)
|
|
1746
1732
|
] });
|
|
1747
|
-
},
|
|
1733
|
+
}, Nt = O.memo(
|
|
1748
1734
|
({
|
|
1749
1735
|
channel: t,
|
|
1750
1736
|
onBack: s,
|
|
@@ -1754,62 +1740,62 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1754
1740
|
onLeaveConversation: l,
|
|
1755
1741
|
onBlockParticipant: i,
|
|
1756
1742
|
className: c,
|
|
1757
|
-
CustomChannelEmptyState:
|
|
1743
|
+
CustomChannelEmptyState: m = kn,
|
|
1758
1744
|
showDeleteConversation: u = !0,
|
|
1759
|
-
onDeleteConversationClick:
|
|
1745
|
+
onDeleteConversationClick: h,
|
|
1760
1746
|
onBlockParticipantClick: f,
|
|
1761
1747
|
onReportParticipantClick: v,
|
|
1762
1748
|
dmAgentEnabled: a,
|
|
1763
|
-
messageMetadata:
|
|
1764
|
-
onMessageSent:
|
|
1765
|
-
showStarButton:
|
|
1766
|
-
chatbotVotingEnabled:
|
|
1767
|
-
renderChannelBanner:
|
|
1749
|
+
messageMetadata: N,
|
|
1750
|
+
onMessageSent: b,
|
|
1751
|
+
showStarButton: C = !1,
|
|
1752
|
+
chatbotVotingEnabled: x = !1,
|
|
1753
|
+
renderChannelBanner: I,
|
|
1768
1754
|
customProfileContent: w,
|
|
1769
1755
|
customChannelActions: E,
|
|
1770
|
-
renderMessage:
|
|
1771
|
-
sendButton:
|
|
1756
|
+
renderMessage: P,
|
|
1757
|
+
sendButton: U
|
|
1772
1758
|
}) => {
|
|
1773
|
-
const
|
|
1774
|
-
async (
|
|
1775
|
-
var
|
|
1776
|
-
const
|
|
1777
|
-
...
|
|
1778
|
-
...
|
|
1779
|
-
...
|
|
1759
|
+
const k = G(
|
|
1760
|
+
async (T, M, y) => {
|
|
1761
|
+
var S;
|
|
1762
|
+
const _ = ((S = t.data) == null ? void 0 : S.chatbot_paused) === !0, F = a && !_, H = {
|
|
1763
|
+
...M,
|
|
1764
|
+
...F && { silent: !0 },
|
|
1765
|
+
...N && {
|
|
1780
1766
|
metadata: {
|
|
1781
|
-
...
|
|
1782
|
-
...
|
|
1767
|
+
...M.metadata ?? {},
|
|
1768
|
+
...N
|
|
1783
1769
|
}
|
|
1784
1770
|
}
|
|
1785
|
-
},
|
|
1786
|
-
...
|
|
1787
|
-
...
|
|
1788
|
-
},
|
|
1789
|
-
return
|
|
1771
|
+
}, R = {
|
|
1772
|
+
...y,
|
|
1773
|
+
...F && { skip_push: !0 }
|
|
1774
|
+
}, z = await t.sendMessage(H, R);
|
|
1775
|
+
return b == null || b(z), z;
|
|
1790
1776
|
},
|
|
1791
|
-
[t, a,
|
|
1777
|
+
[t, a, N, b]
|
|
1792
1778
|
);
|
|
1793
1779
|
return /* @__PURE__ */ e(
|
|
1794
1780
|
"div",
|
|
1795
1781
|
{
|
|
1796
|
-
className:
|
|
1782
|
+
className: D(
|
|
1797
1783
|
"messaging-channel-view h-full flex flex-col",
|
|
1798
1784
|
c
|
|
1799
1785
|
),
|
|
1800
1786
|
children: /* @__PURE__ */ e(
|
|
1801
|
-
|
|
1787
|
+
cs,
|
|
1802
1788
|
{
|
|
1803
1789
|
channel: t,
|
|
1804
|
-
MessageSystem:
|
|
1805
|
-
EmptyStateIndicator:
|
|
1806
|
-
LoadingIndicator:
|
|
1807
|
-
DateSeparator:
|
|
1808
|
-
TypingIndicator:
|
|
1809
|
-
doSendMessageRequest:
|
|
1810
|
-
...
|
|
1790
|
+
MessageSystem: Sn,
|
|
1791
|
+
EmptyStateIndicator: m,
|
|
1792
|
+
LoadingIndicator: fe,
|
|
1793
|
+
DateSeparator: Js,
|
|
1794
|
+
TypingIndicator: In,
|
|
1795
|
+
doSendMessageRequest: k,
|
|
1796
|
+
...U ? { SendButton: U } : {},
|
|
1811
1797
|
children: /* @__PURE__ */ e(
|
|
1812
|
-
|
|
1798
|
+
Dn,
|
|
1813
1799
|
{
|
|
1814
1800
|
onBack: s,
|
|
1815
1801
|
showBackButton: n,
|
|
@@ -1817,18 +1803,18 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1817
1803
|
renderConversationFooter: o,
|
|
1818
1804
|
onLeaveConversation: l,
|
|
1819
1805
|
onBlockParticipant: i,
|
|
1820
|
-
CustomChannelEmptyState:
|
|
1806
|
+
CustomChannelEmptyState: m,
|
|
1821
1807
|
showDeleteConversation: u,
|
|
1822
|
-
onDeleteConversationClick:
|
|
1808
|
+
onDeleteConversationClick: h,
|
|
1823
1809
|
onBlockParticipantClick: f,
|
|
1824
1810
|
onReportParticipantClick: v,
|
|
1825
|
-
showStarButton:
|
|
1811
|
+
showStarButton: C,
|
|
1826
1812
|
dmAgentEnabled: a,
|
|
1827
|
-
chatbotVotingEnabled:
|
|
1828
|
-
renderChannelBanner:
|
|
1813
|
+
chatbotVotingEnabled: x,
|
|
1814
|
+
renderChannelBanner: I,
|
|
1829
1815
|
customProfileContent: w,
|
|
1830
1816
|
customChannelActions: E,
|
|
1831
|
-
renderMessage:
|
|
1817
|
+
renderMessage: P
|
|
1832
1818
|
}
|
|
1833
1819
|
)
|
|
1834
1820
|
}
|
|
@@ -1837,186 +1823,8 @@ const he = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
|
|
|
1837
1823
|
);
|
|
1838
1824
|
}
|
|
1839
1825
|
);
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
searchQuery: t,
|
|
1843
|
-
setSearchQuery: s,
|
|
1844
|
-
placeholder: n
|
|
1845
|
-
}) {
|
|
1846
|
-
const r = Q(null);
|
|
1847
|
-
return /* @__PURE__ */ d("div", { className: "relative", children: [
|
|
1848
|
-
/* @__PURE__ */ e(
|
|
1849
|
-
Es,
|
|
1850
|
-
{
|
|
1851
|
-
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
|
|
1852
|
-
weight: "bold"
|
|
1853
|
-
}
|
|
1854
|
-
),
|
|
1855
|
-
/* @__PURE__ */ e(
|
|
1856
|
-
"input",
|
|
1857
|
-
{
|
|
1858
|
-
ref: r,
|
|
1859
|
-
type: "text",
|
|
1860
|
-
placeholder: n,
|
|
1861
|
-
value: t,
|
|
1862
|
-
onChange: (o) => s(o.target.value),
|
|
1863
|
-
className: "w-full pl-10 pr-10 py-3 text-sm border border-sand rounded-xl focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent"
|
|
1864
|
-
}
|
|
1865
|
-
),
|
|
1866
|
-
t && /* @__PURE__ */ e(
|
|
1867
|
-
Et,
|
|
1868
|
-
{
|
|
1869
|
-
label: "Clear search",
|
|
1870
|
-
onClick: () => {
|
|
1871
|
-
var o;
|
|
1872
|
-
s(""), (o = r.current) == null || o.focus();
|
|
1873
|
-
},
|
|
1874
|
-
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
|
|
1875
|
-
children: /* @__PURE__ */ e(Ye, { className: "h-4 w-4", weight: "bold" })
|
|
1876
|
-
}
|
|
1877
|
-
)
|
|
1878
|
-
] });
|
|
1879
|
-
}
|
|
1880
|
-
const $n = ({
|
|
1881
|
-
participantSource: t,
|
|
1882
|
-
onSelectParticipant: s,
|
|
1883
|
-
onClose: n,
|
|
1884
|
-
existingParticipantIds: r = /* @__PURE__ */ new Set(),
|
|
1885
|
-
participantLabel: o = "participants",
|
|
1886
|
-
searchPlaceholder: l = "Search participants...",
|
|
1887
|
-
className: i
|
|
1888
|
-
}) => {
|
|
1889
|
-
const { debug: c } = De(), [h, u] = M(""), [m, f] = M([]), [v, a] = M(!1), [C, g] = M(null), [y, p] = M(
|
|
1890
|
-
null
|
|
1891
|
-
), S = Q(!1);
|
|
1892
|
-
K(() => {
|
|
1893
|
-
S.current = !1;
|
|
1894
|
-
}, [t]), K(() => {
|
|
1895
|
-
if (t.loading) {
|
|
1896
|
-
c && console.log(
|
|
1897
|
-
"[ParticipantPicker] Waiting for participant source to finish loading..."
|
|
1898
|
-
);
|
|
1899
|
-
return;
|
|
1900
|
-
}
|
|
1901
|
-
if (S.current) return;
|
|
1902
|
-
(async () => {
|
|
1903
|
-
c && console.log("[ParticipantPicker] Loading initial participants..."), a(!0), g(null);
|
|
1904
|
-
try {
|
|
1905
|
-
const b = await t.loadParticipants({
|
|
1906
|
-
search: "",
|
|
1907
|
-
// Load all participants initially
|
|
1908
|
-
limit: 100
|
|
1909
|
-
});
|
|
1910
|
-
f(b.participants), S.current = !0, c && console.log(
|
|
1911
|
-
"[ParticipantPicker] Participants loaded successfully:",
|
|
1912
|
-
b.participants.length
|
|
1913
|
-
);
|
|
1914
|
-
} catch (b) {
|
|
1915
|
-
const k = b instanceof Error ? b.message : "Failed to load participants";
|
|
1916
|
-
g(k), console.error("[ParticipantPicker] Failed to load participants:", b);
|
|
1917
|
-
} finally {
|
|
1918
|
-
a(!1);
|
|
1919
|
-
}
|
|
1920
|
-
})();
|
|
1921
|
-
}, [t, c]);
|
|
1922
|
-
const w = m.filter((N) => !r.has(N.id)).filter((N) => {
|
|
1923
|
-
var k;
|
|
1924
|
-
if (!h) return !0;
|
|
1925
|
-
const b = h.toLowerCase();
|
|
1926
|
-
return N.name.toLowerCase().includes(b) || ((k = N.email) == null ? void 0 : k.toLowerCase().includes(b)) || !1;
|
|
1927
|
-
}), E = U(
|
|
1928
|
-
async (N) => {
|
|
1929
|
-
if (!y) {
|
|
1930
|
-
p(N.id);
|
|
1931
|
-
try {
|
|
1932
|
-
await s(N);
|
|
1933
|
-
} catch (b) {
|
|
1934
|
-
console.error("[ParticipantPicker] Failed to start chat:", b), p(null);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
},
|
|
1938
|
-
[s, y]
|
|
1939
|
-
), F = (N, b) => {
|
|
1940
|
-
(N.key === "Enter" || N.key === " ") && (N.preventDefault(), E(b));
|
|
1941
|
-
};
|
|
1942
|
-
return /* @__PURE__ */ d("div", { className: A("flex flex-col h-full", i), children: [
|
|
1943
|
-
/* @__PURE__ */ d("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
|
|
1944
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1945
|
-
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
|
|
1946
|
-
/* @__PURE__ */ e(kt, { onClick: n })
|
|
1947
|
-
] }),
|
|
1948
|
-
/* @__PURE__ */ d("p", { className: "text-xs text-stone mb-3", children: [
|
|
1949
|
-
"Select a ",
|
|
1950
|
-
o.slice(0, -1),
|
|
1951
|
-
" to start messaging (",
|
|
1952
|
-
w.length,
|
|
1953
|
-
" available)",
|
|
1954
|
-
t.totalCount !== void 0 && ` • ${t.totalCount} ${o} total`
|
|
1955
|
-
] }),
|
|
1956
|
-
/* @__PURE__ */ e(
|
|
1957
|
-
Un,
|
|
1958
|
-
{
|
|
1959
|
-
searchQuery: h,
|
|
1960
|
-
setSearchQuery: u,
|
|
1961
|
-
placeholder: l
|
|
1962
|
-
}
|
|
1963
|
-
)
|
|
1964
|
-
] }),
|
|
1965
|
-
C && /* @__PURE__ */ d("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
|
|
1966
|
-
"Error loading ",
|
|
1967
|
-
o,
|
|
1968
|
-
": ",
|
|
1969
|
-
C
|
|
1970
|
-
] }),
|
|
1971
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: v && w.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
1972
|
-
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
1973
|
-
/* @__PURE__ */ d("span", { className: "text-sm text-stone", children: [
|
|
1974
|
-
"Loading ",
|
|
1975
|
-
o,
|
|
1976
|
-
"..."
|
|
1977
|
-
] })
|
|
1978
|
-
] }) }) : w.length === 0 ? /* @__PURE__ */ d("div", { className: "p-6 text-center", children: [
|
|
1979
|
-
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(at, { className: "h-8 w-8 text-charcoal" }) }),
|
|
1980
|
-
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: h ? `No ${o} found` : m.length > 0 ? `Already chatting with all ${o}` : `No ${o} yet` }),
|
|
1981
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children: h ? "Try a different search term" : m.length > 0 ? `You have existing conversations with all your ${o}` : `${o.charAt(0).toUpperCase() + o.slice(1)} will appear here` })
|
|
1982
|
-
] }) : /* @__PURE__ */ d("ul", { className: "space-y-0", children: [
|
|
1983
|
-
w.map((N) => {
|
|
1984
|
-
const b = N.name || N.email || N.id, k = N.email && N.name ? N.email : N.phone;
|
|
1985
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1986
|
-
"button",
|
|
1987
|
-
{
|
|
1988
|
-
type: "button",
|
|
1989
|
-
onClick: () => E(N),
|
|
1990
|
-
onKeyDown: (R) => F(R, N),
|
|
1991
|
-
className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus-ring",
|
|
1992
|
-
children: /* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
1993
|
-
/* @__PURE__ */ d("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
|
|
1994
|
-
/* @__PURE__ */ e(
|
|
1995
|
-
ne,
|
|
1996
|
-
{
|
|
1997
|
-
id: N.id,
|
|
1998
|
-
name: b,
|
|
1999
|
-
image: N.image,
|
|
2000
|
-
size: 40
|
|
2001
|
-
}
|
|
2002
|
-
),
|
|
2003
|
-
/* @__PURE__ */ d("div", { className: "flex-1 min-w-0", children: [
|
|
2004
|
-
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: b }),
|
|
2005
|
-
k && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: k })
|
|
2006
|
-
] })
|
|
2007
|
-
] }),
|
|
2008
|
-
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: y === N.id ? /* @__PURE__ */ e(Se, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(at, { className: "h-5 w-5 text-stone" }) })
|
|
2009
|
-
] })
|
|
2010
|
-
}
|
|
2011
|
-
) }, N.id);
|
|
2012
|
-
}),
|
|
2013
|
-
v && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ d("div", { className: "flex items-center space-x-2", children: [
|
|
2014
|
-
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
2015
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
|
|
2016
|
-
] }) })
|
|
2017
|
-
] }) })
|
|
2018
|
-
] });
|
|
2019
|
-
}, zn = ({ className: t }) => /* @__PURE__ */ d(
|
|
1826
|
+
Nt.displayName = "ChannelView";
|
|
1827
|
+
const Rn = ({ className: t }) => /* @__PURE__ */ d(
|
|
2020
1828
|
"svg",
|
|
2021
1829
|
{
|
|
2022
1830
|
width: "140",
|
|
@@ -2150,17 +1958,17 @@ const $n = ({
|
|
|
2150
1958
|
] })
|
|
2151
1959
|
]
|
|
2152
1960
|
}
|
|
2153
|
-
),
|
|
1961
|
+
), Ct = O.memo(
|
|
2154
1962
|
({ hasChannels: t, channelsLoaded: s }) => /* @__PURE__ */ e("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
|
|
2155
|
-
/* @__PURE__ */ e(
|
|
1963
|
+
/* @__PURE__ */ e(Rn, {}),
|
|
2156
1964
|
s && !t && /* @__PURE__ */ d("div", { className: "mt-8", children: [
|
|
2157
1965
|
/* @__PURE__ */ e("h2", { className: "font-medium text-black text-[18px] mb-2", children: "Your inbox is empty" }),
|
|
2158
1966
|
/* @__PURE__ */ e("p", { className: "text-[#676B5F] text-sm mb-6", children: "Share with your followers to start receiving messages" })
|
|
2159
1967
|
] })
|
|
2160
1968
|
] }) })
|
|
2161
1969
|
);
|
|
2162
|
-
|
|
2163
|
-
const
|
|
1970
|
+
Ct.displayName = "EmptyState";
|
|
1971
|
+
const he = O.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ d("div", { className: "text-center max-w-sm", children: [
|
|
2164
1972
|
/* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2165
1973
|
/* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
2166
1974
|
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
|
|
@@ -2174,333 +1982,264 @@ const Ie = z.memo(({ message: t, onBack: s }) => /* @__PURE__ */ e("div", { clas
|
|
|
2174
1982
|
}
|
|
2175
1983
|
)
|
|
2176
1984
|
] }) }));
|
|
2177
|
-
|
|
2178
|
-
const
|
|
1985
|
+
he.displayName = "ErrorState";
|
|
1986
|
+
const oa = ({
|
|
2179
1987
|
capabilities: t = {},
|
|
2180
1988
|
className: s,
|
|
2181
1989
|
renderMessageInputActions: n,
|
|
2182
1990
|
renderConversationFooter: r,
|
|
2183
1991
|
onChannelSelect: o,
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
customProfileContent: b,
|
|
1992
|
+
initialParticipantFilter: l,
|
|
1993
|
+
initialParticipantData: i,
|
|
1994
|
+
CustomChannelEmptyState: c,
|
|
1995
|
+
showChannelList: m = !0,
|
|
1996
|
+
filters: u,
|
|
1997
|
+
channelRenderFilterFn: h,
|
|
1998
|
+
channelListCustomEmptyStateIndicator: f,
|
|
1999
|
+
onDeleteConversationClick: v,
|
|
2000
|
+
onBlockParticipantClick: a,
|
|
2001
|
+
onReportParticipantClick: N,
|
|
2002
|
+
dmAgentEnabled: b,
|
|
2003
|
+
messageMetadata: C,
|
|
2004
|
+
onMessageSent: x,
|
|
2005
|
+
showStarButton: I = !1,
|
|
2006
|
+
chatbotVotingEnabled: w = !1,
|
|
2007
|
+
renderMessagePreview: E,
|
|
2008
|
+
renderChannelBanner: P,
|
|
2009
|
+
customProfileContent: U,
|
|
2203
2010
|
customChannelActions: k,
|
|
2204
|
-
renderMessage:
|
|
2205
|
-
sendButton:
|
|
2011
|
+
renderMessage: T,
|
|
2012
|
+
sendButton: M
|
|
2206
2013
|
}) => {
|
|
2207
2014
|
const {
|
|
2208
|
-
service:
|
|
2209
|
-
client:
|
|
2210
|
-
isConnected:
|
|
2211
|
-
isLoading:
|
|
2212
|
-
error:
|
|
2213
|
-
refreshConnection:
|
|
2214
|
-
debug:
|
|
2215
|
-
} =
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
} = t, ve = z.useMemo(() => {
|
|
2220
|
-
const D = T == null ? void 0 : T.userID;
|
|
2015
|
+
service: y,
|
|
2016
|
+
client: _,
|
|
2017
|
+
isConnected: F,
|
|
2018
|
+
isLoading: H,
|
|
2019
|
+
error: R,
|
|
2020
|
+
refreshConnection: z,
|
|
2021
|
+
debug: S
|
|
2022
|
+
} = As(), [$, V] = A(null), [ee, te] = A(!1), [q, g] = A(!1), [p, L] = A(!1), [j, Y] = A(null), {
|
|
2023
|
+
showDeleteConversation: ae = !0
|
|
2024
|
+
} = t, de = O.useMemo(() => {
|
|
2025
|
+
const B = _ == null ? void 0 : _.userID;
|
|
2221
2026
|
return {
|
|
2222
2027
|
...{
|
|
2223
2028
|
type: "messaging",
|
|
2224
2029
|
last_message_at: { $exists: !0 },
|
|
2225
|
-
...
|
|
2226
|
-
members: { $in: [
|
|
2030
|
+
...B && {
|
|
2031
|
+
members: { $in: [B] },
|
|
2227
2032
|
hidden: !1
|
|
2228
2033
|
}
|
|
2229
2034
|
},
|
|
2230
|
-
...
|
|
2035
|
+
...u
|
|
2231
2036
|
};
|
|
2232
|
-
}, [
|
|
2233
|
-
if (!
|
|
2234
|
-
const
|
|
2235
|
-
if (
|
|
2037
|
+
}, [u, _ == null ? void 0 : _.userID]), re = J(null), W = G(async () => {
|
|
2038
|
+
if (!_ || !F) return;
|
|
2039
|
+
const B = _.userID;
|
|
2040
|
+
if (B)
|
|
2236
2041
|
try {
|
|
2237
|
-
|
|
2238
|
-
const X = await
|
|
2042
|
+
S && console.log("[MessagingShell] Syncing channels for user:", B);
|
|
2043
|
+
const X = await _.queryChannels(
|
|
2239
2044
|
{
|
|
2240
2045
|
type: "messaging",
|
|
2241
|
-
members: { $in: [
|
|
2046
|
+
members: { $in: [B] }
|
|
2242
2047
|
},
|
|
2243
2048
|
{},
|
|
2244
2049
|
{ limit: 100 }
|
|
2245
|
-
)
|
|
2246
|
-
X.
|
|
2247
|
-
|
|
2248
|
-
Object.values(Pe).forEach((Ft) => {
|
|
2249
|
-
var Je;
|
|
2250
|
-
const Ae = (Je = Ft.user) == null ? void 0 : Je.id;
|
|
2251
|
-
Ae && Ae !== D && V.add(Ae);
|
|
2252
|
-
});
|
|
2253
|
-
}), ie((Y) => Y.size === V.size && [...Y].every((Pe) => V.has(Pe)) ? Y : V), J(X.length > 0), _(!0), le.current = D, P && console.log("[MessagingShell] Channels synced successfully:", {
|
|
2254
|
-
channelCount: X.length,
|
|
2255
|
-
memberCount: V.size
|
|
2050
|
+
);
|
|
2051
|
+
te(X.length > 0), g(!0), re.current = B, S && console.log("[MessagingShell] Channels synced successfully:", {
|
|
2052
|
+
channelCount: X.length
|
|
2256
2053
|
});
|
|
2257
2054
|
} catch (X) {
|
|
2258
2055
|
console.error("[MessagingShell] Failed to sync channels:", X);
|
|
2259
2056
|
}
|
|
2260
|
-
}, [
|
|
2261
|
-
|
|
2262
|
-
if (!
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
}, [
|
|
2266
|
-
if (!
|
|
2057
|
+
}, [_, F, S]);
|
|
2058
|
+
Z(() => {
|
|
2059
|
+
if (!_ || !F) return;
|
|
2060
|
+
const B = _.userID;
|
|
2061
|
+
B && re.current !== B && W();
|
|
2062
|
+
}, [_, F, W]), Z(() => {
|
|
2063
|
+
if (!l || !_ || !F) return;
|
|
2267
2064
|
(async () => {
|
|
2268
|
-
const X =
|
|
2065
|
+
const X = _.userID;
|
|
2269
2066
|
if (X)
|
|
2270
2067
|
try {
|
|
2271
|
-
|
|
2068
|
+
S && console.log(
|
|
2272
2069
|
"[MessagingShell] Loading initial conversation with:",
|
|
2273
|
-
|
|
2070
|
+
l
|
|
2274
2071
|
);
|
|
2275
|
-
const
|
|
2072
|
+
const Q = await _.queryChannels(
|
|
2276
2073
|
{
|
|
2277
2074
|
type: "messaging",
|
|
2278
|
-
members: { $eq: [X,
|
|
2075
|
+
members: { $eq: [X, l] }
|
|
2279
2076
|
},
|
|
2280
2077
|
{},
|
|
2281
2078
|
{ limit: 1 }
|
|
2282
2079
|
);
|
|
2283
|
-
if (
|
|
2284
|
-
|
|
2080
|
+
if (Q.length > 0)
|
|
2081
|
+
V(Q[0]), L(!0), Y(null), o && o(Q[0]), S && console.log(
|
|
2285
2082
|
"[MessagingShell] Initial conversation loaded:",
|
|
2286
|
-
|
|
2083
|
+
Q[0].id
|
|
2287
2084
|
);
|
|
2288
|
-
else if (
|
|
2289
|
-
|
|
2085
|
+
else if (i && y) {
|
|
2086
|
+
S && console.log(
|
|
2290
2087
|
"[MessagingShell] No conversation found, creating one for:",
|
|
2291
|
-
|
|
2088
|
+
i
|
|
2292
2089
|
);
|
|
2293
2090
|
try {
|
|
2294
|
-
const
|
|
2295
|
-
id:
|
|
2296
|
-
name:
|
|
2297
|
-
email:
|
|
2298
|
-
phone:
|
|
2091
|
+
const se = await y.startChannelWithParticipant({
|
|
2092
|
+
id: i.id,
|
|
2093
|
+
name: i.name,
|
|
2094
|
+
email: i.email,
|
|
2095
|
+
phone: i.phone
|
|
2299
2096
|
});
|
|
2300
|
-
|
|
2097
|
+
V(se), L(!0), Y(null), o && o(se), S && console.log(
|
|
2301
2098
|
"[MessagingShell] Channel created and loaded:",
|
|
2302
|
-
|
|
2099
|
+
se.id
|
|
2303
2100
|
);
|
|
2304
|
-
} catch (
|
|
2101
|
+
} catch (se) {
|
|
2305
2102
|
console.error(
|
|
2306
2103
|
"[MessagingShell] Failed to create conversation:",
|
|
2307
|
-
|
|
2308
|
-
),
|
|
2104
|
+
se
|
|
2105
|
+
), Y("Failed to create conversation");
|
|
2309
2106
|
}
|
|
2310
2107
|
} else
|
|
2311
|
-
|
|
2108
|
+
Y(
|
|
2312
2109
|
"No conversation found with this account"
|
|
2313
|
-
),
|
|
2110
|
+
), S && console.log(
|
|
2314
2111
|
"[MessagingShell] No conversation found for:",
|
|
2315
|
-
|
|
2112
|
+
l
|
|
2316
2113
|
);
|
|
2317
|
-
} catch (
|
|
2114
|
+
} catch (Q) {
|
|
2318
2115
|
console.error(
|
|
2319
2116
|
"[MessagingShell] Failed to load initial conversation:",
|
|
2320
|
-
|
|
2321
|
-
),
|
|
2117
|
+
Q
|
|
2118
|
+
), Y("Failed to load conversation");
|
|
2322
2119
|
}
|
|
2323
2120
|
})();
|
|
2324
2121
|
}, [
|
|
2122
|
+
l,
|
|
2325
2123
|
i,
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
P,
|
|
2124
|
+
_,
|
|
2125
|
+
F,
|
|
2126
|
+
y,
|
|
2127
|
+
S,
|
|
2331
2128
|
o
|
|
2332
2129
|
]);
|
|
2333
|
-
const
|
|
2334
|
-
(
|
|
2335
|
-
|
|
2130
|
+
const ie = G(
|
|
2131
|
+
(B) => {
|
|
2132
|
+
V(B), o == null || o(B);
|
|
2336
2133
|
},
|
|
2337
2134
|
[o]
|
|
2338
|
-
),
|
|
2339
|
-
|
|
2340
|
-
}, [
|
|
2341
|
-
async (
|
|
2342
|
-
|
|
2343
|
-
if (L)
|
|
2344
|
-
try {
|
|
2345
|
-
P && console.log(
|
|
2346
|
-
"[MessagingShell] Starting conversation with:",
|
|
2347
|
-
D.id
|
|
2348
|
-
);
|
|
2349
|
-
const V = await L.startChannelWithParticipant({
|
|
2350
|
-
id: D.id,
|
|
2351
|
-
name: D.name,
|
|
2352
|
-
email: D.email,
|
|
2353
|
-
phone: D.phone
|
|
2354
|
-
});
|
|
2355
|
-
try {
|
|
2356
|
-
await V.show();
|
|
2357
|
-
} catch (Y) {
|
|
2358
|
-
console.warn("[MessagingShell] Failed to unhide channel:", Y);
|
|
2359
|
-
}
|
|
2360
|
-
Z(V), H(!1), (X = me.current) == null || X.close(), l == null || l(D);
|
|
2361
|
-
} catch (V) {
|
|
2362
|
-
console.error("[MessagingShell] Failed to start conversation:", V);
|
|
2363
|
-
}
|
|
2364
|
-
},
|
|
2365
|
-
[L, l, P]
|
|
2366
|
-
), ce = U(() => {
|
|
2367
|
-
var D;
|
|
2368
|
-
H(!1), (D = me.current) == null || D.close();
|
|
2369
|
-
}, []), Ce = U(
|
|
2370
|
-
(D) => {
|
|
2371
|
-
D.target === me.current && ce();
|
|
2372
|
-
},
|
|
2373
|
-
[ce]
|
|
2374
|
-
), _e = U(
|
|
2375
|
-
async (D) => {
|
|
2376
|
-
P && console.log("[MessagingShell] Leaving conversation:", D.id), Z(null), te(!1), le.current = null, await se();
|
|
2135
|
+
), pe = G(() => {
|
|
2136
|
+
p || V(null);
|
|
2137
|
+
}, [p]), ue = G(
|
|
2138
|
+
async (B) => {
|
|
2139
|
+
S && console.log("[MessagingShell] Leaving conversation:", B.id), V(null), L(!1), re.current = null, await W();
|
|
2377
2140
|
},
|
|
2378
|
-
[
|
|
2379
|
-
),
|
|
2380
|
-
async (
|
|
2381
|
-
|
|
2141
|
+
[W, S]
|
|
2142
|
+
), xe = G(
|
|
2143
|
+
async (B) => {
|
|
2144
|
+
S && console.log("[MessagingShell] Blocking participant:", B), V(null), L(!1), re.current = null, await W();
|
|
2382
2145
|
},
|
|
2383
|
-
[
|
|
2384
|
-
),
|
|
2385
|
-
return
|
|
2386
|
-
|
|
2146
|
+
[W, S]
|
|
2147
|
+
), K = !!$;
|
|
2148
|
+
return H ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(fe, {}) }) : R ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(he, { message: R, onBack: z }) }) : !F || !_ ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(
|
|
2149
|
+
he,
|
|
2387
2150
|
{
|
|
2388
2151
|
message: "Not connected to messaging service",
|
|
2389
|
-
onBack:
|
|
2152
|
+
onBack: z
|
|
2390
2153
|
}
|
|
2391
|
-
) }) :
|
|
2154
|
+
) }) : j ? /* @__PURE__ */ e("div", { className: D("h-full", s), children: /* @__PURE__ */ e(he, { message: j }) }) : /* @__PURE__ */ e(
|
|
2392
2155
|
"div",
|
|
2393
2156
|
{
|
|
2394
|
-
className:
|
|
2157
|
+
className: D(
|
|
2395
2158
|
"messaging-shell h-full bg-background-primary overflow-hidden",
|
|
2396
2159
|
s
|
|
2397
2160
|
),
|
|
2398
|
-
children: [
|
|
2399
|
-
/* @__PURE__ */ d("div", { className: "flex h-full min-h-0", children: [
|
|
2400
|
-
/* @__PURE__ */ e(
|
|
2401
|
-
"div",
|
|
2402
|
-
{
|
|
2403
|
-
className: A(
|
|
2404
|
-
"messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
|
|
2405
|
-
{
|
|
2406
|
-
"!hidden": u === !1 || q,
|
|
2407
|
-
// Hide on mobile when channel selected, show on desktop with consistent wide width
|
|
2408
|
-
"hidden lg:flex lg:flex-1 lg:max-w-2xl": u !== !1 && !q && de,
|
|
2409
|
-
// Show on mobile when no channel selected, use same wide width on desktop
|
|
2410
|
-
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": u !== !1 && !q && !de
|
|
2411
|
-
}
|
|
2412
|
-
),
|
|
2413
|
-
children: /* @__PURE__ */ e(
|
|
2414
|
-
_t,
|
|
2415
|
-
{
|
|
2416
|
-
onChannelSelect: we,
|
|
2417
|
-
selectedChannel: W || void 0,
|
|
2418
|
-
filters: ve,
|
|
2419
|
-
channelRenderFilterFn: f,
|
|
2420
|
-
customEmptyStateIndicator: v,
|
|
2421
|
-
renderMessagePreview: F
|
|
2422
|
-
}
|
|
2423
|
-
)
|
|
2424
|
-
}
|
|
2425
|
-
),
|
|
2426
|
-
/* @__PURE__ */ e(
|
|
2427
|
-
"div",
|
|
2428
|
-
{
|
|
2429
|
-
className: A(
|
|
2430
|
-
"messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
|
|
2431
|
-
{
|
|
2432
|
-
// In direct conversation mode (or waiting for it), always show (full width)
|
|
2433
|
-
flex: q || de || i,
|
|
2434
|
-
// Normal mode: hide on mobile when no channel selected
|
|
2435
|
-
"hidden lg:flex": !q && !de && !i
|
|
2436
|
-
}
|
|
2437
|
-
),
|
|
2438
|
-
children: W ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
2439
|
-
Mt,
|
|
2440
|
-
{
|
|
2441
|
-
channel: W,
|
|
2442
|
-
onBack: ye,
|
|
2443
|
-
showBackButton: !q,
|
|
2444
|
-
renderMessageInputActions: n,
|
|
2445
|
-
renderConversationFooter: r,
|
|
2446
|
-
renderChannelBanner: N,
|
|
2447
|
-
onLeaveConversation: _e,
|
|
2448
|
-
onBlockParticipant: Ee,
|
|
2449
|
-
CustomChannelEmptyState: h,
|
|
2450
|
-
showDeleteConversation: ge,
|
|
2451
|
-
onDeleteConversationClick: a,
|
|
2452
|
-
onBlockParticipantClick: C,
|
|
2453
|
-
onReportParticipantClick: g,
|
|
2454
|
-
dmAgentEnabled: y,
|
|
2455
|
-
messageMetadata: p,
|
|
2456
|
-
onMessageSent: S,
|
|
2457
|
-
showStarButton: w,
|
|
2458
|
-
chatbotVotingEnabled: E,
|
|
2459
|
-
customProfileContent: b,
|
|
2460
|
-
customChannelActions: k,
|
|
2461
|
-
renderMessage: R,
|
|
2462
|
-
sendButton: I
|
|
2463
|
-
},
|
|
2464
|
-
W.id
|
|
2465
|
-
) }) : i ? (
|
|
2466
|
-
// Show loading while creating/loading direct conversation channel
|
|
2467
|
-
/* @__PURE__ */ e(Me, {})
|
|
2468
|
-
) : /* @__PURE__ */ e(
|
|
2469
|
-
Tt,
|
|
2470
|
-
{
|
|
2471
|
-
hasChannels: ae,
|
|
2472
|
-
channelsLoaded: x
|
|
2473
|
-
}
|
|
2474
|
-
)
|
|
2475
|
-
}
|
|
2476
|
-
)
|
|
2477
|
-
] }),
|
|
2478
|
-
oe && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2161
|
+
children: /* @__PURE__ */ d("div", { className: "flex h-full min-h-0", children: [
|
|
2479
2162
|
/* @__PURE__ */ e(
|
|
2480
|
-
"
|
|
2163
|
+
"div",
|
|
2481
2164
|
{
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
onClick: Ce,
|
|
2485
|
-
onClose: ce,
|
|
2486
|
-
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
2487
|
-
$n,
|
|
2165
|
+
className: D(
|
|
2166
|
+
"messaging-channel-list-sidebar min-h-0 min-w-0 lg:flex lg:flex-col",
|
|
2488
2167
|
{
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2168
|
+
"!hidden": m === !1 || p,
|
|
2169
|
+
// Hide on mobile when channel selected, show on desktop with consistent wide width
|
|
2170
|
+
"hidden lg:flex lg:flex-1 lg:max-w-2xl": m !== !1 && !p && K,
|
|
2171
|
+
// Show on mobile when no channel selected, use same wide width on desktop
|
|
2172
|
+
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": m !== !1 && !p && !K
|
|
2173
|
+
}
|
|
2174
|
+
),
|
|
2175
|
+
children: /* @__PURE__ */ e(
|
|
2176
|
+
wt,
|
|
2177
|
+
{
|
|
2178
|
+
onChannelSelect: ie,
|
|
2179
|
+
selectedChannel: $ || void 0,
|
|
2180
|
+
filters: de,
|
|
2181
|
+
channelRenderFilterFn: h,
|
|
2182
|
+
customEmptyStateIndicator: f,
|
|
2183
|
+
renderMessagePreview: E
|
|
2184
|
+
}
|
|
2185
|
+
)
|
|
2186
|
+
}
|
|
2187
|
+
),
|
|
2188
|
+
/* @__PURE__ */ e(
|
|
2189
|
+
"div",
|
|
2190
|
+
{
|
|
2191
|
+
className: D(
|
|
2192
|
+
"messaging-conversation-view flex-1 flex-col min-w-0 min-h-0",
|
|
2193
|
+
{
|
|
2194
|
+
// In direct conversation mode (or waiting for it), always show (full width)
|
|
2195
|
+
flex: p || K || l,
|
|
2196
|
+
// Normal mode: hide on mobile when no channel selected
|
|
2197
|
+
"hidden lg:flex": !p && !K && !l
|
|
2198
|
+
}
|
|
2199
|
+
),
|
|
2200
|
+
children: $ ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
2201
|
+
Nt,
|
|
2202
|
+
{
|
|
2203
|
+
channel: $,
|
|
2204
|
+
onBack: pe,
|
|
2205
|
+
showBackButton: !p,
|
|
2206
|
+
renderMessageInputActions: n,
|
|
2207
|
+
renderConversationFooter: r,
|
|
2208
|
+
renderChannelBanner: P,
|
|
2209
|
+
onLeaveConversation: ue,
|
|
2210
|
+
onBlockParticipant: xe,
|
|
2211
|
+
CustomChannelEmptyState: c,
|
|
2212
|
+
showDeleteConversation: ae,
|
|
2213
|
+
onDeleteConversationClick: v,
|
|
2214
|
+
onBlockParticipantClick: a,
|
|
2215
|
+
onReportParticipantClick: N,
|
|
2216
|
+
dmAgentEnabled: b,
|
|
2217
|
+
messageMetadata: C,
|
|
2218
|
+
onMessageSent: x,
|
|
2219
|
+
showStarButton: I,
|
|
2220
|
+
chatbotVotingEnabled: w,
|
|
2221
|
+
customProfileContent: U,
|
|
2222
|
+
customChannelActions: k,
|
|
2223
|
+
renderMessage: T,
|
|
2224
|
+
sendButton: M
|
|
2495
2225
|
},
|
|
2496
|
-
|
|
2497
|
-
) })
|
|
2226
|
+
$.id
|
|
2227
|
+
) }) : l ? (
|
|
2228
|
+
// Show loading while creating/loading direct conversation channel
|
|
2229
|
+
/* @__PURE__ */ e(fe, {})
|
|
2230
|
+
) : /* @__PURE__ */ e(
|
|
2231
|
+
Ct,
|
|
2232
|
+
{
|
|
2233
|
+
hasChannels: ee,
|
|
2234
|
+
channelsLoaded: q
|
|
2235
|
+
}
|
|
2236
|
+
)
|
|
2498
2237
|
}
|
|
2499
2238
|
)
|
|
2500
|
-
]
|
|
2239
|
+
] })
|
|
2501
2240
|
}
|
|
2502
2241
|
);
|
|
2503
|
-
},
|
|
2242
|
+
}, Ln = ({
|
|
2504
2243
|
question: t,
|
|
2505
2244
|
onClick: s,
|
|
2506
2245
|
loading: n = !1,
|
|
@@ -2512,7 +2251,7 @@ const ga = ({
|
|
|
2512
2251
|
onClick: s,
|
|
2513
2252
|
disabled: n,
|
|
2514
2253
|
style: { backgroundColor: "#E6E5E3" },
|
|
2515
|
-
className:
|
|
2254
|
+
className: D(
|
|
2516
2255
|
"w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
|
|
2517
2256
|
{
|
|
2518
2257
|
"hover:brightness-95 active:brightness-90": !n,
|
|
@@ -2522,7 +2261,7 @@ const ga = ({
|
|
|
2522
2261
|
),
|
|
2523
2262
|
children: t
|
|
2524
2263
|
}
|
|
2525
|
-
),
|
|
2264
|
+
), la = ({
|
|
2526
2265
|
faqs: t,
|
|
2527
2266
|
onFaqClick: s,
|
|
2528
2267
|
loadingFaqId: n,
|
|
@@ -2531,7 +2270,7 @@ const ga = ({
|
|
|
2531
2270
|
avatarImage: l,
|
|
2532
2271
|
avatarName: i
|
|
2533
2272
|
}) => {
|
|
2534
|
-
const c = t.filter((
|
|
2273
|
+
const c = t.filter((m) => m.enabled).sort((m, u) => (m.order ?? 0) - (u.order ?? 0));
|
|
2535
2274
|
return c.length === 0 ? null : /* @__PURE__ */ e("div", { className: o, children: /* @__PURE__ */ d("div", { className: "flex gap-3 items-end", children: [
|
|
2536
2275
|
(l || i) && /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
|
|
2537
2276
|
ne,
|
|
@@ -2550,20 +2289,20 @@ const ga = ({
|
|
|
2550
2289
|
style: { backgroundColor: "#F1F0EE" },
|
|
2551
2290
|
children: [
|
|
2552
2291
|
r && /* @__PURE__ */ e("p", { className: "text-md text-charcoal mb-4", children: r }),
|
|
2553
|
-
c.map((
|
|
2554
|
-
|
|
2292
|
+
c.map((m) => /* @__PURE__ */ e(
|
|
2293
|
+
Ln,
|
|
2555
2294
|
{
|
|
2556
|
-
question:
|
|
2557
|
-
onClick: () => s(
|
|
2558
|
-
loading: n ===
|
|
2295
|
+
question: m.question,
|
|
2296
|
+
onClick: () => s(m.id),
|
|
2297
|
+
loading: n === m.id
|
|
2559
2298
|
},
|
|
2560
|
-
|
|
2299
|
+
m.id
|
|
2561
2300
|
))
|
|
2562
2301
|
]
|
|
2563
2302
|
}
|
|
2564
2303
|
)
|
|
2565
2304
|
] }) });
|
|
2566
|
-
},
|
|
2305
|
+
}, An = [
|
|
2567
2306
|
[/pdf/, "pdf"],
|
|
2568
2307
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
2569
2308
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -2573,42 +2312,42 @@ const ga = ({
|
|
|
2573
2312
|
[/plain|rtf/, "text"],
|
|
2574
2313
|
[/markdown/, "markdown"]
|
|
2575
2314
|
];
|
|
2576
|
-
function
|
|
2315
|
+
function be(t) {
|
|
2577
2316
|
return t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : t.startsWith("image/") ? "image" : "document";
|
|
2578
2317
|
}
|
|
2579
|
-
function
|
|
2580
|
-
const s =
|
|
2318
|
+
function Fn(t) {
|
|
2319
|
+
const s = An.find(
|
|
2581
2320
|
([n]) => n.test(t)
|
|
2582
2321
|
);
|
|
2583
2322
|
return s ? s[1] : "generic";
|
|
2584
2323
|
}
|
|
2585
|
-
const
|
|
2586
|
-
video:
|
|
2587
|
-
audio:
|
|
2588
|
-
image:
|
|
2589
|
-
document:
|
|
2590
|
-
},
|
|
2591
|
-
pdf:
|
|
2592
|
-
doc:
|
|
2593
|
-
xls:
|
|
2594
|
-
csv:
|
|
2595
|
-
ppt:
|
|
2596
|
-
zip:
|
|
2597
|
-
text:
|
|
2598
|
-
markdown:
|
|
2599
|
-
generic:
|
|
2324
|
+
const On = {
|
|
2325
|
+
video: ys,
|
|
2326
|
+
audio: _s,
|
|
2327
|
+
image: ws,
|
|
2328
|
+
document: ht
|
|
2329
|
+
}, Pn = {
|
|
2330
|
+
pdf: Ts,
|
|
2331
|
+
doc: Ms,
|
|
2332
|
+
xls: ks,
|
|
2333
|
+
csv: Is,
|
|
2334
|
+
ppt: Ss,
|
|
2335
|
+
zip: Es,
|
|
2336
|
+
text: Cs,
|
|
2337
|
+
markdown: Ns,
|
|
2338
|
+
generic: ht
|
|
2600
2339
|
};
|
|
2601
|
-
function
|
|
2602
|
-
const s =
|
|
2603
|
-
return s !== "document" ?
|
|
2340
|
+
function Un(t) {
|
|
2341
|
+
const s = be(t);
|
|
2342
|
+
return s !== "document" ? On[s] : Pn[Fn(t)];
|
|
2604
2343
|
}
|
|
2605
|
-
function
|
|
2606
|
-
return
|
|
2344
|
+
function ge(t, s) {
|
|
2345
|
+
return O.createElement(Un(t), s);
|
|
2607
2346
|
}
|
|
2608
|
-
const
|
|
2347
|
+
const zn = (t) => {
|
|
2609
2348
|
var s, n;
|
|
2610
2349
|
return "touches" in t ? ((s = t.touches[0]) == null ? void 0 : s.clientX) ?? ((n = t.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : t.clientX;
|
|
2611
|
-
},
|
|
2350
|
+
}, Bn = ({
|
|
2612
2351
|
source: t,
|
|
2613
2352
|
mimeType: s,
|
|
2614
2353
|
poster: n,
|
|
@@ -2617,81 +2356,81 @@ const Wn = (t) => {
|
|
|
2617
2356
|
loop: l = !1,
|
|
2618
2357
|
controls: i = !0,
|
|
2619
2358
|
showProgress: c = !1,
|
|
2620
|
-
muted:
|
|
2359
|
+
muted: m = !1,
|
|
2621
2360
|
onContainerClick: u
|
|
2622
2361
|
}) => {
|
|
2623
|
-
const
|
|
2624
|
-
|
|
2625
|
-
}, []),
|
|
2626
|
-
const
|
|
2627
|
-
if (!
|
|
2628
|
-
const
|
|
2362
|
+
const h = be(s), f = J(null), v = J(null), a = J(null), N = J(o), [b, C] = A(r), [x, I] = A(0), [w, E] = A(!1), [P, U] = A(!1), [k, T] = A(!1), [M, y] = A(!1), [_, F] = A(!0), [H, R] = A(null), z = G(() => {
|
|
2363
|
+
T(!1), C(!0);
|
|
2364
|
+
}, []), S = G((g) => {
|
|
2365
|
+
const p = v.current;
|
|
2366
|
+
if (!p) return 0;
|
|
2367
|
+
const L = p.getBoundingClientRect();
|
|
2629
2368
|
return Math.max(
|
|
2630
2369
|
0,
|
|
2631
|
-
Math.min(1, (
|
|
2370
|
+
Math.min(1, (zn(g) - L.left) / L.width)
|
|
2632
2371
|
);
|
|
2633
|
-
}, []),
|
|
2634
|
-
const
|
|
2635
|
-
|
|
2636
|
-
}, []),
|
|
2637
|
-
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2372
|
+
}, []), $ = G((g) => {
|
|
2373
|
+
const p = f.current;
|
|
2374
|
+
p && p.duration && (p.currentTime = g * p.duration);
|
|
2375
|
+
}, []), V = (g) => {
|
|
2376
|
+
g.stopPropagation(), E(!0);
|
|
2377
|
+
const p = S(g);
|
|
2378
|
+
I(p), $(p);
|
|
2640
2379
|
};
|
|
2641
|
-
|
|
2642
|
-
o !== void 0 && o !==
|
|
2643
|
-
}, [o]),
|
|
2644
|
-
if (!
|
|
2380
|
+
Z(() => {
|
|
2381
|
+
o !== void 0 && o !== N.current && (N.current = o, C(o));
|
|
2382
|
+
}, [o]), Z(() => {
|
|
2383
|
+
if (!b) {
|
|
2645
2384
|
a.current !== null && (cancelAnimationFrame(a.current), a.current = null);
|
|
2646
2385
|
return;
|
|
2647
2386
|
}
|
|
2648
|
-
const
|
|
2649
|
-
const
|
|
2650
|
-
|
|
2387
|
+
const g = () => {
|
|
2388
|
+
const p = f.current;
|
|
2389
|
+
p && p.duration && !w && I(p.currentTime / p.duration), a.current = requestAnimationFrame(g);
|
|
2651
2390
|
};
|
|
2652
|
-
return a.current = requestAnimationFrame(
|
|
2391
|
+
return a.current = requestAnimationFrame(g), () => {
|
|
2653
2392
|
a.current !== null && cancelAnimationFrame(a.current);
|
|
2654
2393
|
};
|
|
2655
|
-
}, [
|
|
2656
|
-
const
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
}) :
|
|
2660
|
-
}, [
|
|
2394
|
+
}, [b, w]), Z(() => {
|
|
2395
|
+
const g = f.current;
|
|
2396
|
+
g && (b ? g.play().catch((p) => {
|
|
2397
|
+
C(!1), T(!0);
|
|
2398
|
+
}) : g.pause());
|
|
2399
|
+
}, [b]), Z(() => {
|
|
2661
2400
|
if (!w) return;
|
|
2662
|
-
const
|
|
2663
|
-
E(!1),
|
|
2401
|
+
const g = (L) => I(S(L)), p = (L) => {
|
|
2402
|
+
E(!1), $(S(L));
|
|
2664
2403
|
};
|
|
2665
|
-
return window.addEventListener("mousemove",
|
|
2666
|
-
window.removeEventListener("mousemove",
|
|
2404
|
+
return window.addEventListener("mousemove", g), window.addEventListener("mouseup", p), window.addEventListener("touchmove", g, { passive: !0 }), window.addEventListener("touchend", p), () => {
|
|
2405
|
+
window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", p), window.removeEventListener("touchmove", g), window.removeEventListener("touchend", p);
|
|
2667
2406
|
};
|
|
2668
|
-
}, [w,
|
|
2669
|
-
const
|
|
2407
|
+
}, [w, S, $]);
|
|
2408
|
+
const ee = H ? { aspectRatio: String(H) } : void 0, te = H ? "" : " aspect-video", q = Math.round(x * 100);
|
|
2670
2409
|
return /* @__PURE__ */ d(
|
|
2671
2410
|
"div",
|
|
2672
2411
|
{
|
|
2673
2412
|
role: "button",
|
|
2674
2413
|
tabIndex: 0,
|
|
2675
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
2676
|
-
style:
|
|
2677
|
-
onClick: (
|
|
2414
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
|
|
2415
|
+
style: ee,
|
|
2416
|
+
onClick: (g) => {
|
|
2678
2417
|
if (u) {
|
|
2679
|
-
u(
|
|
2418
|
+
u(g);
|
|
2680
2419
|
return;
|
|
2681
2420
|
}
|
|
2682
|
-
|
|
2421
|
+
k || i && C((p) => !p);
|
|
2683
2422
|
},
|
|
2684
|
-
onKeyDown: (
|
|
2685
|
-
if (!(
|
|
2686
|
-
if (
|
|
2687
|
-
u(
|
|
2423
|
+
onKeyDown: (g) => {
|
|
2424
|
+
if (!(g.key !== "Enter" && g.key !== " ")) {
|
|
2425
|
+
if (g.preventDefault(), u) {
|
|
2426
|
+
u(g);
|
|
2688
2427
|
return;
|
|
2689
2428
|
}
|
|
2690
|
-
|
|
2429
|
+
k || i && C((p) => !p);
|
|
2691
2430
|
}
|
|
2692
2431
|
},
|
|
2693
2432
|
children: [
|
|
2694
|
-
n && (
|
|
2433
|
+
n && (h === "audio" || _) && /* @__PURE__ */ e(
|
|
2695
2434
|
"img",
|
|
2696
2435
|
{
|
|
2697
2436
|
src: n,
|
|
@@ -2699,26 +2438,26 @@ const Wn = (t) => {
|
|
|
2699
2438
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
2700
2439
|
}
|
|
2701
2440
|
),
|
|
2702
|
-
!n && (
|
|
2441
|
+
!n && (h === "audio" || _) && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: ge(s, {
|
|
2703
2442
|
className: "size-12 text-black/20",
|
|
2704
2443
|
weight: "regular"
|
|
2705
2444
|
}) }),
|
|
2706
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-0", children:
|
|
2445
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0", children: h === "audio" ? /* @__PURE__ */ e(
|
|
2707
2446
|
"audio",
|
|
2708
2447
|
{
|
|
2709
2448
|
ref: f,
|
|
2710
2449
|
src: t,
|
|
2711
2450
|
loop: l,
|
|
2712
|
-
muted:
|
|
2451
|
+
muted: m,
|
|
2713
2452
|
style: { width: "100%", height: "100%" },
|
|
2714
|
-
onLoadStart: () =>
|
|
2453
|
+
onLoadStart: () => y(!0),
|
|
2715
2454
|
onCanPlay: () => {
|
|
2716
|
-
|
|
2455
|
+
y(!1), F(!1);
|
|
2717
2456
|
},
|
|
2718
|
-
onWaiting: () =>
|
|
2719
|
-
onPlay: () =>
|
|
2457
|
+
onWaiting: () => y(!0),
|
|
2458
|
+
onPlay: () => T(!1),
|
|
2720
2459
|
onEnded: () => {
|
|
2721
|
-
l || (
|
|
2460
|
+
l || (C(!1), I(0));
|
|
2722
2461
|
},
|
|
2723
2462
|
children: /* @__PURE__ */ e("track", { kind: "captions" })
|
|
2724
2463
|
}
|
|
@@ -2728,46 +2467,46 @@ const Wn = (t) => {
|
|
|
2728
2467
|
ref: f,
|
|
2729
2468
|
src: t,
|
|
2730
2469
|
loop: l,
|
|
2731
|
-
muted:
|
|
2470
|
+
muted: m,
|
|
2732
2471
|
playsInline: !0,
|
|
2733
2472
|
style: { width: "100%", height: "100%" },
|
|
2734
|
-
onLoadStart: () =>
|
|
2473
|
+
onLoadStart: () => y(!0),
|
|
2735
2474
|
onCanPlay: () => {
|
|
2736
|
-
|
|
2475
|
+
y(!1), F(!1);
|
|
2737
2476
|
},
|
|
2738
|
-
onWaiting: () =>
|
|
2739
|
-
onPlay: () =>
|
|
2477
|
+
onWaiting: () => y(!0),
|
|
2478
|
+
onPlay: () => T(!1),
|
|
2740
2479
|
onLoadedMetadata: () => {
|
|
2741
|
-
const
|
|
2742
|
-
|
|
2480
|
+
const g = f.current;
|
|
2481
|
+
g instanceof HTMLVideoElement && g.videoWidth && g.videoHeight && R(g.videoWidth / g.videoHeight);
|
|
2743
2482
|
},
|
|
2744
2483
|
onEnded: () => {
|
|
2745
|
-
l || (
|
|
2484
|
+
l || (C(!1), I(0));
|
|
2746
2485
|
},
|
|
2747
2486
|
children: /* @__PURE__ */ e("track", { kind: "captions" })
|
|
2748
2487
|
}
|
|
2749
2488
|
) }),
|
|
2750
|
-
|
|
2751
|
-
|
|
2489
|
+
M && !k && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
2490
|
+
ft,
|
|
2752
2491
|
{
|
|
2753
2492
|
className: "size-8 animate-spin text-white/80",
|
|
2754
2493
|
weight: "bold"
|
|
2755
2494
|
}
|
|
2756
2495
|
) }),
|
|
2757
|
-
|
|
2496
|
+
k && !i && /* @__PURE__ */ e(
|
|
2758
2497
|
"div",
|
|
2759
2498
|
{
|
|
2760
2499
|
className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
|
|
2761
2500
|
role: "button",
|
|
2762
2501
|
tabIndex: 0,
|
|
2763
2502
|
"aria-label": "Play preview",
|
|
2764
|
-
onClick: (
|
|
2765
|
-
|
|
2503
|
+
onClick: (g) => {
|
|
2504
|
+
g.stopPropagation(), z();
|
|
2766
2505
|
},
|
|
2767
|
-
onKeyDown: (
|
|
2768
|
-
|
|
2506
|
+
onKeyDown: (g) => {
|
|
2507
|
+
g.key !== "Enter" && g.key !== " " || (g.preventDefault(), g.stopPropagation(), z());
|
|
2769
2508
|
},
|
|
2770
|
-
children: /* @__PURE__ */ e("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ e(
|
|
2509
|
+
children: /* @__PURE__ */ e("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ e(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
2771
2510
|
}
|
|
2772
2511
|
),
|
|
2773
2512
|
c && !i && /* @__PURE__ */ e("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__ */ e(
|
|
@@ -2775,23 +2514,23 @@ const Wn = (t) => {
|
|
|
2775
2514
|
{
|
|
2776
2515
|
role: "slider",
|
|
2777
2516
|
"aria-label": "Playback position",
|
|
2778
|
-
"aria-valuenow":
|
|
2517
|
+
"aria-valuenow": q,
|
|
2779
2518
|
"aria-valuemin": 0,
|
|
2780
2519
|
"aria-valuemax": 100,
|
|
2781
2520
|
tabIndex: 0,
|
|
2782
2521
|
ref: v,
|
|
2783
2522
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
2784
|
-
onMouseDown:
|
|
2785
|
-
onTouchStart:
|
|
2786
|
-
onClick: (
|
|
2787
|
-
onKeyDown: (
|
|
2788
|
-
|
|
2523
|
+
onMouseDown: V,
|
|
2524
|
+
onTouchStart: V,
|
|
2525
|
+
onClick: (g) => g.stopPropagation(),
|
|
2526
|
+
onKeyDown: (g) => {
|
|
2527
|
+
g.key === "ArrowRight" && $(Math.min(1, x + 0.05)), g.key === "ArrowLeft" && $(Math.max(0, x - 0.05));
|
|
2789
2528
|
},
|
|
2790
2529
|
children: /* @__PURE__ */ e("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ e(
|
|
2791
2530
|
"div",
|
|
2792
2531
|
{
|
|
2793
2532
|
className: "h-full rounded-full bg-white",
|
|
2794
|
-
style: { width: `${
|
|
2533
|
+
style: { width: `${q}%` }
|
|
2795
2534
|
}
|
|
2796
2535
|
) })
|
|
2797
2536
|
}
|
|
@@ -2801,12 +2540,12 @@ const Wn = (t) => {
|
|
|
2801
2540
|
"button",
|
|
2802
2541
|
{
|
|
2803
2542
|
type: "button",
|
|
2804
|
-
onClick: (
|
|
2805
|
-
|
|
2543
|
+
onClick: (g) => {
|
|
2544
|
+
g.stopPropagation(), C((p) => !p);
|
|
2806
2545
|
},
|
|
2807
2546
|
className: "shrink-0 text-white",
|
|
2808
|
-
"aria-label":
|
|
2809
|
-
children:
|
|
2547
|
+
"aria-label": b ? "Pause" : "Play",
|
|
2548
|
+
children: b ? /* @__PURE__ */ e(Ds, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ e(et, { className: "size-5 translate-x-px", weight: "fill" })
|
|
2810
2549
|
}
|
|
2811
2550
|
),
|
|
2812
2551
|
/* @__PURE__ */ d(
|
|
@@ -2814,30 +2553,30 @@ const Wn = (t) => {
|
|
|
2814
2553
|
{
|
|
2815
2554
|
role: "slider",
|
|
2816
2555
|
"aria-label": "Playback position",
|
|
2817
|
-
"aria-valuenow":
|
|
2556
|
+
"aria-valuenow": q,
|
|
2818
2557
|
"aria-valuemin": 0,
|
|
2819
2558
|
"aria-valuemax": 100,
|
|
2820
2559
|
tabIndex: 0,
|
|
2821
2560
|
ref: v,
|
|
2822
2561
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
2823
|
-
onMouseDown:
|
|
2824
|
-
onTouchStart:
|
|
2825
|
-
onClick: (
|
|
2826
|
-
onMouseEnter: () =>
|
|
2827
|
-
onMouseLeave: () =>
|
|
2828
|
-
onKeyDown: (
|
|
2829
|
-
|
|
2562
|
+
onMouseDown: V,
|
|
2563
|
+
onTouchStart: V,
|
|
2564
|
+
onClick: (g) => g.stopPropagation(),
|
|
2565
|
+
onMouseEnter: () => U(!0),
|
|
2566
|
+
onMouseLeave: () => U(!1),
|
|
2567
|
+
onKeyDown: (g) => {
|
|
2568
|
+
g.key === "ArrowRight" && $(Math.min(1, x + 0.05)), g.key === "ArrowLeft" && $(Math.max(0, x - 0.05));
|
|
2830
2569
|
},
|
|
2831
2570
|
children: [
|
|
2832
2571
|
/* @__PURE__ */ e(
|
|
2833
2572
|
"div",
|
|
2834
2573
|
{
|
|
2835
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
2574
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${P || w ? "h-1.5" : "h-1"}`,
|
|
2836
2575
|
children: /* @__PURE__ */ e(
|
|
2837
2576
|
"div",
|
|
2838
2577
|
{
|
|
2839
2578
|
className: "h-full rounded-full bg-white",
|
|
2840
|
-
style: { width: `${
|
|
2579
|
+
style: { width: `${q}%` }
|
|
2841
2580
|
}
|
|
2842
2581
|
)
|
|
2843
2582
|
}
|
|
@@ -2845,8 +2584,8 @@ const Wn = (t) => {
|
|
|
2845
2584
|
/* @__PURE__ */ e(
|
|
2846
2585
|
"div",
|
|
2847
2586
|
{
|
|
2848
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
2849
|
-
style: { left: `${
|
|
2587
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${P || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
2588
|
+
style: { left: `${q}%` }
|
|
2850
2589
|
}
|
|
2851
2590
|
)
|
|
2852
2591
|
]
|
|
@@ -2856,7 +2595,7 @@ const Wn = (t) => {
|
|
|
2856
2595
|
]
|
|
2857
2596
|
}
|
|
2858
2597
|
);
|
|
2859
|
-
},
|
|
2598
|
+
}, it = (t) => t === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", $n = (t) => t === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Et = ({
|
|
2860
2599
|
mimeType: t,
|
|
2861
2600
|
sourceUrl: s,
|
|
2862
2601
|
thumbnailUrl: n,
|
|
@@ -2865,9 +2604,9 @@ const Wn = (t) => {
|
|
|
2865
2604
|
mediaPlayerProps: l,
|
|
2866
2605
|
containedImage: i = !1
|
|
2867
2606
|
}) => {
|
|
2868
|
-
const c =
|
|
2607
|
+
const c = be(t), [m, u] = A(!1);
|
|
2869
2608
|
return s && (c === "video" || c === "audio") ? /* @__PURE__ */ e(
|
|
2870
|
-
|
|
2609
|
+
Bn,
|
|
2871
2610
|
{
|
|
2872
2611
|
source: s,
|
|
2873
2612
|
mimeType: t,
|
|
@@ -2880,7 +2619,7 @@ const Wn = (t) => {
|
|
|
2880
2619
|
{
|
|
2881
2620
|
src: s,
|
|
2882
2621
|
alt: r ?? "",
|
|
2883
|
-
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${
|
|
2622
|
+
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${m ? "opacity-100" : "opacity-0"}`,
|
|
2884
2623
|
draggable: !1,
|
|
2885
2624
|
onLoad: () => u(!0)
|
|
2886
2625
|
}
|
|
@@ -2897,7 +2636,7 @@ const Wn = (t) => {
|
|
|
2897
2636
|
{
|
|
2898
2637
|
src: n,
|
|
2899
2638
|
alt: r ?? "",
|
|
2900
|
-
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${
|
|
2639
|
+
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${m ? "opacity-100" : "opacity-0"}`,
|
|
2901
2640
|
draggable: !1,
|
|
2902
2641
|
onLoad: () => u(!0)
|
|
2903
2642
|
}
|
|
@@ -2913,12 +2652,12 @@ const Wn = (t) => {
|
|
|
2913
2652
|
"div",
|
|
2914
2653
|
{
|
|
2915
2654
|
className: `flex aspect-video w-full items-center justify-center ${o === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
2916
|
-
children:
|
|
2917
|
-
className:
|
|
2655
|
+
children: ge(t, {
|
|
2656
|
+
className: it(o),
|
|
2918
2657
|
weight: "regular"
|
|
2919
2658
|
})
|
|
2920
2659
|
}
|
|
2921
|
-
) : n ? /* @__PURE__ */ e("div", { className: `relative ${
|
|
2660
|
+
) : n ? /* @__PURE__ */ e("div", { className: `relative ${$n(o)}`, children: /* @__PURE__ */ e(
|
|
2922
2661
|
"img",
|
|
2923
2662
|
{
|
|
2924
2663
|
src: n,
|
|
@@ -2930,13 +2669,13 @@ const Wn = (t) => {
|
|
|
2930
2669
|
"div",
|
|
2931
2670
|
{
|
|
2932
2671
|
className: `flex aspect-video w-full items-center justify-center ${o === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
2933
|
-
children:
|
|
2934
|
-
className:
|
|
2672
|
+
children: ge(t, {
|
|
2673
|
+
className: it(o),
|
|
2935
2674
|
weight: "regular"
|
|
2936
2675
|
})
|
|
2937
2676
|
}
|
|
2938
2677
|
);
|
|
2939
|
-
},
|
|
2678
|
+
}, St = ({
|
|
2940
2679
|
variant: t,
|
|
2941
2680
|
thumbnail: s,
|
|
2942
2681
|
title: n,
|
|
@@ -2945,40 +2684,40 @@ const Wn = (t) => {
|
|
|
2945
2684
|
detail: l,
|
|
2946
2685
|
statusBadge: i,
|
|
2947
2686
|
action: c,
|
|
2948
|
-
topLeft:
|
|
2687
|
+
topLeft: m,
|
|
2949
2688
|
topRight: u,
|
|
2950
|
-
rootRef:
|
|
2689
|
+
rootRef: h,
|
|
2951
2690
|
"data-testid": f
|
|
2952
2691
|
}) => {
|
|
2953
|
-
const v = t === "dark", a = v ? n ?? r : n ?? "",
|
|
2692
|
+
const v = t === "dark", a = v ? n ?? r : n ?? "", N = v && !n;
|
|
2954
2693
|
return /* @__PURE__ */ d(
|
|
2955
2694
|
"div",
|
|
2956
2695
|
{
|
|
2957
|
-
ref:
|
|
2696
|
+
ref: h,
|
|
2958
2697
|
"data-testid": f,
|
|
2959
|
-
className:
|
|
2698
|
+
className: D(
|
|
2960
2699
|
"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)]",
|
|
2961
2700
|
v ? "bg-[#121110]" : "bg-white"
|
|
2962
2701
|
),
|
|
2963
2702
|
children: [
|
|
2964
|
-
|
|
2703
|
+
m ? /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: m }) : null,
|
|
2965
2704
|
u ? /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
|
|
2966
2705
|
s,
|
|
2967
2706
|
/* @__PURE__ */ d("div", { className: "px-4 pb-3 pt-3", children: [
|
|
2968
2707
|
a.trim() !== "" && /* @__PURE__ */ e(
|
|
2969
2708
|
"p",
|
|
2970
2709
|
{
|
|
2971
|
-
className:
|
|
2710
|
+
className: D("mb-0.5 truncate text-base font-medium", {
|
|
2972
2711
|
"text-black": !v,
|
|
2973
|
-
"text-white/30": v &&
|
|
2974
|
-
"text-white": v && !
|
|
2712
|
+
"text-white/30": v && N,
|
|
2713
|
+
"text-white": v && !N
|
|
2975
2714
|
}),
|
|
2976
2715
|
children: a
|
|
2977
2716
|
}
|
|
2978
2717
|
),
|
|
2979
2718
|
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
2980
|
-
|
|
2981
|
-
className:
|
|
2719
|
+
ge(o, {
|
|
2720
|
+
className: D(
|
|
2982
2721
|
"size-5 shrink-0",
|
|
2983
2722
|
v ? "text-white/55" : "text-black/55"
|
|
2984
2723
|
),
|
|
@@ -2987,7 +2726,7 @@ const Wn = (t) => {
|
|
|
2987
2726
|
l != null && l !== "" && /* @__PURE__ */ e(
|
|
2988
2727
|
"span",
|
|
2989
2728
|
{
|
|
2990
|
-
className:
|
|
2729
|
+
className: D(
|
|
2991
2730
|
"text-xs font-medium",
|
|
2992
2731
|
v ? "text-white/55" : "text-black/55"
|
|
2993
2732
|
),
|
|
@@ -3002,29 +2741,29 @@ const Wn = (t) => {
|
|
|
3002
2741
|
}
|
|
3003
2742
|
);
|
|
3004
2743
|
};
|
|
3005
|
-
function
|
|
2744
|
+
function It(t) {
|
|
3006
2745
|
return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
|
|
3007
2746
|
}
|
|
3008
|
-
function
|
|
2747
|
+
function Re(t) {
|
|
3009
2748
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${t ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
3010
2749
|
}
|
|
3011
|
-
function
|
|
2750
|
+
function jn(t) {
|
|
3012
2751
|
return t ? "bg-white/10" : "bg-black/5";
|
|
3013
2752
|
}
|
|
3014
|
-
function
|
|
2753
|
+
function Gn(t) {
|
|
3015
2754
|
return t ? "text-white" : "text-black";
|
|
3016
2755
|
}
|
|
3017
|
-
function
|
|
2756
|
+
function Vn(t) {
|
|
3018
2757
|
return t ? "text-white/55" : "text-black/55";
|
|
3019
2758
|
}
|
|
3020
|
-
function
|
|
2759
|
+
function Hn(t) {
|
|
3021
2760
|
return t ? "text-white/40" : "text-black/40";
|
|
3022
2761
|
}
|
|
3023
|
-
function
|
|
2762
|
+
function Yn(t) {
|
|
3024
2763
|
return t ? "text-white/20" : "text-black/20";
|
|
3025
2764
|
}
|
|
3026
|
-
const
|
|
3027
|
-
const { title: n, text: r, image_url: o, og_scrape_url: l, title_link: i } = t, c = l ?? i,
|
|
2765
|
+
const Le = ({ attachment: t, isMyMessage: s }) => {
|
|
2766
|
+
const { title: n, text: r, image_url: o, og_scrape_url: l, title_link: i } = t, c = l ?? i, m = typeof c == "string" && c.trim() !== "" ? c : void 0, u = /* @__PURE__ */ d(O.Fragment, { children: [
|
|
3028
2767
|
/* @__PURE__ */ e("div", { className: "p-2", children: o ? /* @__PURE__ */ e(
|
|
3029
2768
|
"img",
|
|
3030
2769
|
{
|
|
@@ -3035,25 +2774,25 @@ const Xe = ({ attachment: t, isMyMessage: s }) => {
|
|
|
3035
2774
|
) : /* @__PURE__ */ e(
|
|
3036
2775
|
"div",
|
|
3037
2776
|
{
|
|
3038
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
3039
|
-
children: /* @__PURE__ */ e(
|
|
2777
|
+
className: `aspect-video w-full rounded-[20px] ${jn(s)} flex items-center justify-center`,
|
|
2778
|
+
children: /* @__PURE__ */ e(Rs, { className: `size-12 ${Yn(s)}` })
|
|
3040
2779
|
}
|
|
3041
2780
|
) }),
|
|
3042
2781
|
/* @__PURE__ */ d("div", { className: "px-3 pb-3", children: [
|
|
3043
|
-
n && /* @__PURE__ */ e("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
3044
|
-
r && /* @__PURE__ */ e("p", { className: `truncate text-[12px] leading-4 ${
|
|
3045
|
-
|
|
2782
|
+
n && /* @__PURE__ */ e("p", { className: `truncate text-[14px] font-medium leading-5 ${Gn(s)}`, children: n }),
|
|
2783
|
+
r && /* @__PURE__ */ e("p", { className: `truncate text-[12px] leading-4 ${Vn(s)}`, children: r }),
|
|
2784
|
+
m && /* @__PURE__ */ e("p", { className: `mt-1 truncate text-[12px] leading-4 ${Hn(s)}`, children: m })
|
|
3046
2785
|
] })
|
|
3047
2786
|
] });
|
|
3048
|
-
return
|
|
2787
|
+
return m ? /* @__PURE__ */ e("a", { href: m, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ e("div", { className: "block", children: u });
|
|
3049
2788
|
};
|
|
3050
|
-
function
|
|
2789
|
+
function Ae(t) {
|
|
3051
2790
|
var s;
|
|
3052
2791
|
return (s = t.attachments) == null ? void 0 : s.find(
|
|
3053
2792
|
(n) => n.type === "link" || !!n.og_scrape_url && !n.asset_url
|
|
3054
2793
|
);
|
|
3055
2794
|
}
|
|
3056
|
-
async function
|
|
2795
|
+
async function qn(t, s) {
|
|
3057
2796
|
let n;
|
|
3058
2797
|
try {
|
|
3059
2798
|
n = s ?? new URL(t).pathname.split("/").pop() ?? "download";
|
|
@@ -3065,11 +2804,11 @@ async function ta(t, s) {
|
|
|
3065
2804
|
const o = await r.blob(), l = URL.createObjectURL(o), i = document.createElement("a");
|
|
3066
2805
|
i.href = l, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(l);
|
|
3067
2806
|
}
|
|
3068
|
-
const
|
|
2807
|
+
const Wn = ({
|
|
3069
2808
|
url: t,
|
|
3070
2809
|
filename: s
|
|
3071
2810
|
}) => {
|
|
3072
|
-
const [n, r] =
|
|
2811
|
+
const [n, r] = A(!1);
|
|
3073
2812
|
return /* @__PURE__ */ e(
|
|
3074
2813
|
"button",
|
|
3075
2814
|
{
|
|
@@ -3077,7 +2816,7 @@ const sa = ({
|
|
|
3077
2816
|
onClick: (l) => {
|
|
3078
2817
|
l.stopPropagation();
|
|
3079
2818
|
const i = window.open("", "_blank", "noopener,noreferrer");
|
|
3080
|
-
r(!0),
|
|
2819
|
+
r(!0), qn(t, s).then(() => {
|
|
3081
2820
|
i == null || i.close();
|
|
3082
2821
|
}).catch(() => {
|
|
3083
2822
|
i && (i.location.href = t);
|
|
@@ -3085,44 +2824,44 @@ const sa = ({
|
|
|
3085
2824
|
},
|
|
3086
2825
|
disabled: n,
|
|
3087
2826
|
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",
|
|
3088
|
-
children: n ? /* @__PURE__ */ e(
|
|
3089
|
-
/* @__PURE__ */ e(
|
|
2827
|
+
children: n ? /* @__PURE__ */ e(ft, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ d(O.Fragment, { children: [
|
|
2828
|
+
/* @__PURE__ */ e(Ls, { className: "size-4 text-white", weight: "bold" }),
|
|
3090
2829
|
"Download"
|
|
3091
2830
|
] })
|
|
3092
2831
|
}
|
|
3093
2832
|
);
|
|
3094
2833
|
};
|
|
3095
|
-
function
|
|
3096
|
-
var f, v, a,
|
|
2834
|
+
function Fe(t) {
|
|
2835
|
+
var f, v, a, N;
|
|
3097
2836
|
const s = (f = t.attachments) == null ? void 0 : f.find(
|
|
3098
|
-
(
|
|
2837
|
+
(b) => b.type === "video" && b.asset_url
|
|
3099
2838
|
), n = (v = t.attachments) == null ? void 0 : v.find(
|
|
3100
|
-
(
|
|
2839
|
+
(b) => b.type === "image" && b.image_url
|
|
3101
2840
|
), r = (a = t.attachments) == null ? void 0 : a.find(
|
|
3102
|
-
(
|
|
3103
|
-
), o = (
|
|
3104
|
-
(
|
|
2841
|
+
(b) => b.type === "audio" && b.asset_url
|
|
2842
|
+
), o = (N = t.attachments) == null ? void 0 : N.find(
|
|
2843
|
+
(b) => b.type === "file" && b.asset_url
|
|
3105
2844
|
), l = s ?? n ?? r ?? o, i = (s == null ? void 0 : s.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (r == null ? void 0 : r.asset_url) ?? (o == null ? void 0 : o.asset_url);
|
|
3106
2845
|
if (!i) return null;
|
|
3107
|
-
const c = (l == null ? void 0 : l.mime_type) ?? ((l == null ? void 0 : l.type) === "image" ? "image/jpeg" : (l == null ? void 0 : l.type) === "video" ? "video/mp4" : (l == null ? void 0 : l.type) === "audio" ? "audio/mpeg" : "application/octet-stream"),
|
|
2846
|
+
const c = (l == null ? void 0 : l.mime_type) ?? ((l == null ? void 0 : l.type) === "image" ? "image/jpeg" : (l == null ? void 0 : l.type) === "video" ? "video/mp4" : (l == null ? void 0 : l.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), m = l == null ? void 0 : l.title, u = l == null ? void 0 : l.file_size, h = s == null ? void 0 : s.thumb_url;
|
|
3108
2847
|
return {
|
|
3109
2848
|
resolvedUrl: i,
|
|
3110
2849
|
resolvedType: c,
|
|
3111
|
-
title:
|
|
2850
|
+
title: m,
|
|
3112
2851
|
fileSize: u,
|
|
3113
|
-
thumbnailUrl:
|
|
2852
|
+
thumbnailUrl: h
|
|
3114
2853
|
};
|
|
3115
2854
|
}
|
|
3116
|
-
const
|
|
2855
|
+
const kt = ({
|
|
3117
2856
|
resolvedUrl: t,
|
|
3118
2857
|
resolvedType: s,
|
|
3119
2858
|
title: n,
|
|
3120
2859
|
fileSize: r,
|
|
3121
2860
|
thumbnailUrl: o
|
|
3122
2861
|
}) => {
|
|
3123
|
-
const l = r !== void 0 ?
|
|
2862
|
+
const l = r !== void 0 ? It(r) : void 0;
|
|
3124
2863
|
return /* @__PURE__ */ e(
|
|
3125
|
-
|
|
2864
|
+
St,
|
|
3126
2865
|
{
|
|
3127
2866
|
variant: "dark",
|
|
3128
2867
|
title: n,
|
|
@@ -3130,7 +2869,7 @@ const Pt = ({
|
|
|
3130
2869
|
mimeType: s,
|
|
3131
2870
|
detail: l,
|
|
3132
2871
|
thumbnail: /* @__PURE__ */ e(
|
|
3133
|
-
|
|
2872
|
+
Et,
|
|
3134
2873
|
{
|
|
3135
2874
|
mimeType: s,
|
|
3136
2875
|
sourceUrl: t,
|
|
@@ -3141,23 +2880,23 @@ const Pt = ({
|
|
|
3141
2880
|
)
|
|
3142
2881
|
}
|
|
3143
2882
|
);
|
|
3144
|
-
},
|
|
2883
|
+
}, Mt = ({
|
|
3145
2884
|
resolvedUrl: t,
|
|
3146
2885
|
resolvedType: s,
|
|
3147
2886
|
title: n,
|
|
3148
2887
|
fileSize: r,
|
|
3149
2888
|
thumbnailUrl: o
|
|
3150
2889
|
}) => {
|
|
3151
|
-
const l =
|
|
2890
|
+
const l = be(s), i = r !== void 0 ? It(r) : void 0;
|
|
3152
2891
|
return /* @__PURE__ */ e(
|
|
3153
|
-
|
|
2892
|
+
St,
|
|
3154
2893
|
{
|
|
3155
2894
|
variant: "light",
|
|
3156
2895
|
title: n,
|
|
3157
2896
|
mimeType: s,
|
|
3158
2897
|
detail: i,
|
|
3159
2898
|
thumbnail: /* @__PURE__ */ e(
|
|
3160
|
-
|
|
2899
|
+
Et,
|
|
3161
2900
|
{
|
|
3162
2901
|
mimeType: s,
|
|
3163
2902
|
sourceUrl: t,
|
|
@@ -3167,14 +2906,14 @@ const Pt = ({
|
|
|
3167
2906
|
containedImage: l === "image" || l === "document"
|
|
3168
2907
|
}
|
|
3169
2908
|
),
|
|
3170
|
-
action: /* @__PURE__ */ e(
|
|
2909
|
+
action: /* @__PURE__ */ e(Wn, { url: t, filename: n })
|
|
3171
2910
|
}
|
|
3172
2911
|
);
|
|
3173
|
-
},
|
|
2912
|
+
}, Xn = ({
|
|
3174
2913
|
message: t,
|
|
3175
2914
|
isMyMessage: s = !1
|
|
3176
2915
|
}) => {
|
|
3177
|
-
const n =
|
|
2916
|
+
const n = Ae(t), r = Fe(t);
|
|
3178
2917
|
return !n && !r ? null : /* @__PURE__ */ d("div", { className: s ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
|
|
3179
2918
|
!s && t.user && /* @__PURE__ */ e(
|
|
3180
2919
|
ne,
|
|
@@ -3195,95 +2934,53 @@ const Pt = ({
|
|
|
3195
2934
|
{
|
|
3196
2935
|
className: "str-chat__message-bubble",
|
|
3197
2936
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
3198
|
-
children: n ? /* @__PURE__ */ e("div", { className:
|
|
2937
|
+
children: n ? /* @__PURE__ */ e("div", { className: Re(s), children: /* @__PURE__ */ e(Le, { attachment: n, isMyMessage: s }) }) : s ? /* @__PURE__ */ e(kt, { ...r }) : /* @__PURE__ */ e(Mt, { ...r })
|
|
3199
2938
|
}
|
|
3200
2939
|
) })
|
|
3201
2940
|
}
|
|
3202
2941
|
)
|
|
3203
2942
|
] });
|
|
3204
|
-
},
|
|
2943
|
+
}, Zn = ({
|
|
3205
2944
|
message: t
|
|
3206
2945
|
}) => {
|
|
3207
|
-
const s =
|
|
2946
|
+
const s = Ae(t);
|
|
3208
2947
|
if (s)
|
|
3209
|
-
return /* @__PURE__ */ e("div", { className:
|
|
3210
|
-
const n =
|
|
3211
|
-
return n ? /* @__PURE__ */ e(
|
|
3212
|
-
},
|
|
2948
|
+
return /* @__PURE__ */ e("div", { className: Re(!0), children: /* @__PURE__ */ e(Le, { attachment: s, isMyMessage: !0 }) });
|
|
2949
|
+
const n = Fe(t);
|
|
2950
|
+
return n ? /* @__PURE__ */ e(kt, { ...n }) : null;
|
|
2951
|
+
}, Jn = ({
|
|
3213
2952
|
message: t
|
|
3214
2953
|
}) => {
|
|
3215
|
-
const s =
|
|
2954
|
+
const s = Ae(t);
|
|
3216
2955
|
if (s)
|
|
3217
|
-
return /* @__PURE__ */ e("div", { className:
|
|
3218
|
-
const n =
|
|
3219
|
-
return n ? /* @__PURE__ */ e(
|
|
3220
|
-
},
|
|
3221
|
-
Creator:
|
|
3222
|
-
Visitor:
|
|
3223
|
-
})
|
|
3224
|
-
const { initialSearch: n = "", pageSize: r = 20 } = s, [o, l] = M([]), [i, c] = M(!1), [h, u] = M(null), [m, f] = M(n), [v, a] = M(!0), [C, g] = M(), y = U(async (E = !1, F) => {
|
|
3225
|
-
if (i) return;
|
|
3226
|
-
const N = F !== void 0 ? F : m;
|
|
3227
|
-
c(!0), u(null);
|
|
3228
|
-
try {
|
|
3229
|
-
const b = await t.loadParticipants({
|
|
3230
|
-
search: N || void 0,
|
|
3231
|
-
limit: r,
|
|
3232
|
-
cursor: E ? void 0 : C
|
|
3233
|
-
});
|
|
3234
|
-
l(
|
|
3235
|
-
(k) => E ? b.participants : [...k, ...b.participants]
|
|
3236
|
-
), a(b.hasMore), g(b.nextCursor);
|
|
3237
|
-
} catch (b) {
|
|
3238
|
-
const k = b instanceof Error ? b.message : "Failed to load participants";
|
|
3239
|
-
u(k), console.error("[useParticipants] Load error:", b);
|
|
3240
|
-
} finally {
|
|
3241
|
-
c(!1);
|
|
3242
|
-
}
|
|
3243
|
-
}, [t, m, C, r, i]), p = U(() => {
|
|
3244
|
-
v && !i && y(!1);
|
|
3245
|
-
}, [v, i, y]), S = U((E) => {
|
|
3246
|
-
f(E), g(void 0), y(!0, E);
|
|
3247
|
-
}, [y]), w = U(() => {
|
|
3248
|
-
g(void 0), y(!0);
|
|
3249
|
-
}, [y]);
|
|
3250
|
-
return K(() => {
|
|
3251
|
-
y(!0);
|
|
3252
|
-
}, [t.loadParticipants]), {
|
|
3253
|
-
participants: o,
|
|
3254
|
-
loading: i,
|
|
3255
|
-
error: h,
|
|
3256
|
-
searchQuery: m,
|
|
3257
|
-
hasMore: v,
|
|
3258
|
-
totalCount: t.totalCount,
|
|
3259
|
-
loadMore: p,
|
|
3260
|
-
search: S,
|
|
3261
|
-
refresh: w
|
|
3262
|
-
};
|
|
3263
|
-
};
|
|
2956
|
+
return /* @__PURE__ */ e("div", { className: Re(!1), children: /* @__PURE__ */ e(Le, { attachment: s, isMyMessage: !1 }) });
|
|
2957
|
+
const n = Fe(t);
|
|
2958
|
+
return n ? /* @__PURE__ */ e(Mt, { ...n }) : null;
|
|
2959
|
+
}, ca = Object.assign(Xn, {
|
|
2960
|
+
Creator: Zn,
|
|
2961
|
+
Visitor: Jn
|
|
2962
|
+
});
|
|
3264
2963
|
export {
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
ke as b,
|
|
2964
|
+
St as A,
|
|
2965
|
+
kn as C,
|
|
2966
|
+
la as F,
|
|
2967
|
+
nt as L,
|
|
2968
|
+
ca as M,
|
|
2969
|
+
Et as a,
|
|
2970
|
+
me as b,
|
|
3273
2971
|
ne as c,
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
un as u
|
|
2972
|
+
wt as d,
|
|
2973
|
+
Nt as e,
|
|
2974
|
+
ia as f,
|
|
2975
|
+
Ln as g,
|
|
2976
|
+
ln as h,
|
|
2977
|
+
ra as i,
|
|
2978
|
+
oa as j,
|
|
2979
|
+
zs as k,
|
|
2980
|
+
Fe as l,
|
|
2981
|
+
Qs as m,
|
|
2982
|
+
As as n,
|
|
2983
|
+
Ae as r,
|
|
2984
|
+
on as u
|
|
3288
2985
|
};
|
|
3289
|
-
//# sourceMappingURL=index-
|
|
2986
|
+
//# sourceMappingURL=index-DY-3-rt4.js.map
|