@linktr.ee/messaging-react 3.9.0 → 3.9.1-rc-1783580113
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-BmYSOINp.cjs → Card-BAWe1nw6.cjs} +2 -2
- package/dist/{Card-BmYSOINp.cjs.map → Card-BAWe1nw6.cjs.map} +1 -1
- package/dist/{Card-WoQGTJ5n.cjs → Card-BacmKRPX.cjs} +2 -2
- package/dist/{Card-WoQGTJ5n.cjs.map → Card-BacmKRPX.cjs.map} +1 -1
- package/dist/{Card-DWT-IkeK.cjs → Card-Bm6-f8ki.cjs} +2 -2
- package/dist/{Card-DWT-IkeK.cjs.map → Card-Bm6-f8ki.cjs.map} +1 -1
- package/dist/{Card-Gapf9yEL.js → Card-CT51GZA-.js} +2 -2
- package/dist/{Card-Gapf9yEL.js.map → Card-CT51GZA-.js.map} +1 -1
- package/dist/{Card-B8Zz3GRL.js → Card-CbRJaszK.js} +2 -2
- package/dist/{Card-B8Zz3GRL.js.map → Card-CbRJaszK.js.map} +1 -1
- package/dist/{Card-BnJLBTl6.js → Card-t7hyYqE2.js} +3 -3
- package/dist/{Card-BnJLBTl6.js.map → Card-t7hyYqE2.js.map} +1 -1
- package/dist/{LockedThumbnail-DFByBLYS.cjs → LockedThumbnail-D2AyOLj7.cjs} +2 -2
- package/dist/{LockedThumbnail-DFByBLYS.cjs.map → LockedThumbnail-D2AyOLj7.cjs.map} +1 -1
- package/dist/{LockedThumbnail-Cu3qwKAd.js → LockedThumbnail-DA2ypEZM.js} +2 -2
- package/dist/{LockedThumbnail-Cu3qwKAd.js.map → LockedThumbnail-DA2ypEZM.js.map} +1 -1
- package/dist/{index-Bv79lb0u.js → index-C2r41RoF.js} +1083 -1069
- package/dist/index-C2r41RoF.js.map +1 -0
- package/dist/index-DgqwF0XA.cjs +2 -0
- package/dist/index-DgqwF0XA.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/ChannelHeaderRedesign.tsx +8 -1
- package/src/components/ChannelView.tsx +12 -9
- package/src/components/CustomMessage/StreamAttachmentMessage.stories.tsx +19 -12
- package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +44 -26
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +37 -43
- package/src/components/CustomMessage/index.tsx +9 -21
- package/dist/index-Bv79lb0u.js.map +0 -1
- package/dist/index-C1Zaiccm.cjs +0 -2
- package/dist/index-C1Zaiccm.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import V, { createContext as
|
|
1
|
+
import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import V, { createContext as lt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as se, Suspense as ot } from "react";
|
|
3
3
|
import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
|
|
4
|
-
import { StreamChat as Ys, LinkPreviewsManager as
|
|
5
|
-
import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn,
|
|
6
|
-
import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as
|
|
4
|
+
import { StreamChat as Ys, LinkPreviewsManager as Wt } from "stream-chat";
|
|
5
|
+
import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, MessageErrorIcon as et, MessageText as tt, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as st, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as nt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
|
|
7
7
|
import k from "classnames";
|
|
8
8
|
import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
|
|
9
|
-
const us =
|
|
9
|
+
const us = lt({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const us = rt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}),
|
|
19
|
+
}), ct = () => Ie(us), ll = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -25,10 +25,10 @@ const us = rt({
|
|
|
25
25
|
debug: i = !1,
|
|
26
26
|
client: o
|
|
27
27
|
}) => {
|
|
28
|
-
var
|
|
28
|
+
var I, M;
|
|
29
29
|
const l = Z(
|
|
30
|
-
(
|
|
31
|
-
i && console.log(`🔥 [MessagingProvider] ${
|
|
30
|
+
(T, ...z) => {
|
|
31
|
+
i && console.log(`🔥 [MessagingProvider] ${T}`, ...z);
|
|
32
32
|
},
|
|
33
33
|
[i]
|
|
34
34
|
);
|
|
@@ -38,11 +38,11 @@ const us = rt({
|
|
|
38
38
|
serviceConfig: !!n,
|
|
39
39
|
capabilities: Object.keys(r)
|
|
40
40
|
});
|
|
41
|
-
const [d,
|
|
41
|
+
const [d, m] = U(null), [p, h] = U(null), [g, c] = U(!1), [b, x] = U(!1), [v, f] = U(null), N = G(!1), w = G(null), C = G(n);
|
|
42
42
|
C.current = n;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const
|
|
43
|
+
const R = G(i);
|
|
44
|
+
R.current = i;
|
|
45
|
+
const S = G({
|
|
46
46
|
userId: t == null ? void 0 : t.id,
|
|
47
47
|
apiKey: a,
|
|
48
48
|
serviceConfig: n,
|
|
@@ -52,45 +52,45 @@ const us = rt({
|
|
|
52
52
|
renderCount: D.current,
|
|
53
53
|
currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
|
|
54
54
|
propChanges: {
|
|
55
|
-
userChanged:
|
|
56
|
-
apiKeyChanged:
|
|
57
|
-
serviceConfigChanged:
|
|
58
|
-
capabilitiesChanged:
|
|
55
|
+
userChanged: S.current.userId !== (t == null ? void 0 : t.id),
|
|
56
|
+
apiKeyChanged: S.current.apiKey !== a,
|
|
57
|
+
serviceConfigChanged: S.current.serviceConfig !== n,
|
|
58
|
+
capabilitiesChanged: S.current.capabilities !== r
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), S.current = {
|
|
61
61
|
userId: t == null ? void 0 : t.id,
|
|
62
62
|
apiKey: a,
|
|
63
63
|
serviceConfig: n,
|
|
64
64
|
capabilities: r
|
|
65
65
|
};
|
|
66
66
|
const $ = G(null);
|
|
67
|
-
!o && a && ((
|
|
68
|
-
const F = o || (a ? ((
|
|
67
|
+
!o && a && ((I = $.current) == null ? void 0 : I.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
|
|
68
|
+
const F = o || (a ? ((M = $.current) == null ? void 0 : M.client) ?? null : null);
|
|
69
69
|
J(() => {
|
|
70
|
-
const
|
|
70
|
+
const T = D.current, z = C.current;
|
|
71
71
|
if (o) {
|
|
72
|
-
|
|
72
|
+
w.current = null, m(null), h(null), c(!1), f(null), x(!1);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
if (!a || !F || !z) {
|
|
76
76
|
l("⚠️ SERVICE INIT SKIPPED", {
|
|
77
|
-
renderCount:
|
|
77
|
+
renderCount: T,
|
|
78
78
|
reason: "Missing apiKey, client, or serviceConfig"
|
|
79
79
|
});
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
l("🚀 CREATING SERVICE", {
|
|
83
|
-
renderCount:
|
|
83
|
+
renderCount: T,
|
|
84
84
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
85
85
|
});
|
|
86
86
|
const O = new Hs({
|
|
87
87
|
...z,
|
|
88
88
|
apiKey: a,
|
|
89
|
-
debug:
|
|
89
|
+
debug: R.current,
|
|
90
90
|
client: F
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
renderCount:
|
|
92
|
+
w.current = O, m(O), l("✅ SERVICE SET", {
|
|
93
|
+
renderCount: T,
|
|
94
94
|
serviceInstance: !!O
|
|
95
95
|
});
|
|
96
96
|
}, [a, F, o]);
|
|
@@ -101,8 +101,8 @@ const us = rt({
|
|
|
101
101
|
hasService: !!d,
|
|
102
102
|
hasUser: !!t,
|
|
103
103
|
userId: t == null ? void 0 : t.id,
|
|
104
|
-
isConnecting:
|
|
105
|
-
isConnected:
|
|
104
|
+
isConnecting: N.current,
|
|
105
|
+
isConnected: g,
|
|
106
106
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
107
107
|
}), o)
|
|
108
108
|
return;
|
|
@@ -110,7 +110,7 @@ const us = rt({
|
|
|
110
110
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
if (
|
|
113
|
+
if (N.current) {
|
|
114
114
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
@@ -122,7 +122,7 @@ const us = rt({
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
(async () => {
|
|
125
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
125
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, x(!0), f(null);
|
|
126
126
|
try {
|
|
127
127
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
128
|
const j = await d.connectUser(t);
|
|
@@ -132,22 +132,22 @@ const us = rt({
|
|
|
132
132
|
});
|
|
133
133
|
} catch (j) {
|
|
134
134
|
const X = j instanceof Error ? j.message : "Connection failed";
|
|
135
|
-
|
|
135
|
+
f(X), l("❌ USER CONNECTION ERROR", {
|
|
136
136
|
userId: t.id,
|
|
137
137
|
error: X
|
|
138
138
|
});
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
x(!1), N.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
141
141
|
userId: t.id,
|
|
142
|
-
isConnected:
|
|
142
|
+
isConnected: g
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
})();
|
|
146
|
-
}, [d, t, l,
|
|
147
|
-
const
|
|
146
|
+
}, [d, t, l, g, o]), J(() => {
|
|
147
|
+
const T = F;
|
|
148
148
|
return () => {
|
|
149
149
|
var z;
|
|
150
|
-
|
|
150
|
+
T && (L.current = null, (z = w.current) == null || z.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
152
|
}, [F]);
|
|
153
153
|
const y = Z(async () => {
|
|
@@ -159,27 +159,27 @@ const us = rt({
|
|
|
159
159
|
l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }),
|
|
162
|
+
l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), x(!0);
|
|
163
163
|
try {
|
|
164
164
|
l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
|
|
165
|
-
const
|
|
166
|
-
h(
|
|
167
|
-
} catch (
|
|
168
|
-
const z =
|
|
169
|
-
|
|
165
|
+
const T = await d.connectUser(t);
|
|
166
|
+
h(T), c(!0), f(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
|
|
167
|
+
} catch (T) {
|
|
168
|
+
const z = T instanceof Error ? T.message : "Refresh failed";
|
|
169
|
+
f(z), l("❌ CONNECTION REFRESH ERROR", {
|
|
170
170
|
userId: t.id,
|
|
171
171
|
error: z
|
|
172
172
|
});
|
|
173
173
|
} finally {
|
|
174
|
-
|
|
174
|
+
x(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
}, [d, t, l, o]),
|
|
177
|
+
}, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
|
|
178
178
|
hasService: !!d,
|
|
179
179
|
hasClient: !!p,
|
|
180
|
-
isConnected:
|
|
181
|
-
isLoading:
|
|
182
|
-
hasError: !!
|
|
180
|
+
isConnected: g,
|
|
181
|
+
isLoading: b,
|
|
182
|
+
hasError: !!v,
|
|
183
183
|
capabilitiesKeys: Object.keys(r)
|
|
184
184
|
}), {
|
|
185
185
|
// With an injected client, expose no service — the injected client owns
|
|
@@ -192,9 +192,9 @@ const us = rt({
|
|
|
192
192
|
// path's `client`/`isLoading`/`error` (from connectUser) must not leak
|
|
193
193
|
// through if the same provider previously attempted an apiKey connect.
|
|
194
194
|
client: o ?? p,
|
|
195
|
-
isConnected: o ? !0 :
|
|
196
|
-
isLoading: o ? !1 :
|
|
197
|
-
error: o ? null :
|
|
195
|
+
isConnected: o ? !0 : g,
|
|
196
|
+
isLoading: o ? !1 : b,
|
|
197
|
+
error: o ? null : v,
|
|
198
198
|
capabilities: r,
|
|
199
199
|
refreshConnection: y,
|
|
200
200
|
debug: i
|
|
@@ -202,9 +202,9 @@ const us = rt({
|
|
|
202
202
|
d,
|
|
203
203
|
p,
|
|
204
204
|
o,
|
|
205
|
-
|
|
206
|
-
v,
|
|
205
|
+
g,
|
|
207
206
|
b,
|
|
207
|
+
v,
|
|
208
208
|
r,
|
|
209
209
|
y,
|
|
210
210
|
i,
|
|
@@ -213,8 +213,8 @@ const us = rt({
|
|
|
213
213
|
return l("🔄 RENDER END", {
|
|
214
214
|
renderCount: D.current,
|
|
215
215
|
willRenderChat: !!F,
|
|
216
|
-
contextValueReady: !!
|
|
217
|
-
}), /* @__PURE__ */ s(us.Provider, { value:
|
|
216
|
+
contextValueReady: !!E
|
|
217
|
+
}), /* @__PURE__ */ s(us.Provider, { value: E, children: F ? /* @__PURE__ */ s(
|
|
218
218
|
qs,
|
|
219
219
|
{
|
|
220
220
|
client: F,
|
|
@@ -224,7 +224,7 @@ const us = rt({
|
|
|
224
224
|
children: e
|
|
225
225
|
}
|
|
226
226
|
) : e });
|
|
227
|
-
}, sa = () =>
|
|
227
|
+
}, sa = () => ct(), dt = (e) => {
|
|
228
228
|
var a, r;
|
|
229
229
|
const [t, n] = U(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -273,7 +273,7 @@ function Kt(e, t) {
|
|
|
273
273
|
const n = e == null ? void 0 : e.trim();
|
|
274
274
|
return !n || t && n === t ? !1 : !ia(n);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function ut(e) {
|
|
277
277
|
return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
278
278
|
}
|
|
279
279
|
const Jt = [
|
|
@@ -330,7 +330,7 @@ const ne = ({
|
|
|
330
330
|
shape: i = "squircle",
|
|
331
331
|
dmAgentEnabled: o = !1
|
|
332
332
|
}) => {
|
|
333
|
-
const l = oa(e), d = ca(e),
|
|
333
|
+
const l = oa(e), d = ca(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
|
|
334
334
|
"img",
|
|
335
335
|
{
|
|
336
336
|
src: t,
|
|
@@ -348,7 +348,7 @@ const ne = ({
|
|
|
348
348
|
children: l
|
|
349
349
|
}
|
|
350
350
|
) });
|
|
351
|
-
return /* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ u(
|
|
352
352
|
"div",
|
|
353
353
|
{
|
|
354
354
|
className: k(
|
|
@@ -382,13 +382,13 @@ const ne = ({
|
|
|
382
382
|
style: {
|
|
383
383
|
...c,
|
|
384
384
|
...o && {
|
|
385
|
-
borderWidth: `${
|
|
385
|
+
borderWidth: `${g}px`,
|
|
386
386
|
borderStyle: "solid",
|
|
387
387
|
borderColor: "var(--AI-Gradient, #7F22FE)",
|
|
388
388
|
boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
|
|
389
389
|
}
|
|
390
390
|
},
|
|
391
|
-
children:
|
|
391
|
+
children: b
|
|
392
392
|
}
|
|
393
393
|
)
|
|
394
394
|
]
|
|
@@ -404,81 +404,81 @@ const ne = ({
|
|
|
404
404
|
onDeleteConversationClick: o,
|
|
405
405
|
onBlockParticipantClick: l,
|
|
406
406
|
onReportParticipantClick: d,
|
|
407
|
-
onActionComplete:
|
|
407
|
+
onActionComplete: m,
|
|
408
408
|
logLabel: p = "useChannelModerationActions"
|
|
409
409
|
}) => {
|
|
410
|
-
var
|
|
411
|
-
const { service: h, debug:
|
|
410
|
+
var E;
|
|
411
|
+
const { service: h, debug: g } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [x, v] = U(!1), [f, N] = U(null), [w, C] = U(!1), [R, S] = U(!1), D = b && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
|
|
412
412
|
return J(() => {
|
|
413
|
-
if (!
|
|
414
|
-
|
|
413
|
+
if (!b || !h || !c) {
|
|
414
|
+
v(!1), N(null);
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
|
-
let
|
|
417
|
+
let I = !1;
|
|
418
418
|
return (async () => {
|
|
419
419
|
try {
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
(
|
|
420
|
+
const M = await h.getBlockedUsers();
|
|
421
|
+
if (I) return;
|
|
422
|
+
v(
|
|
423
|
+
M.some(
|
|
424
|
+
(T) => T.blocked_user_id === c
|
|
425
425
|
)
|
|
426
426
|
);
|
|
427
|
-
} catch (
|
|
428
|
-
|
|
427
|
+
} catch (M) {
|
|
428
|
+
I || console.error(`[${p}] Failed to check blocked status:`, M);
|
|
429
429
|
} finally {
|
|
430
|
-
|
|
430
|
+
I || N({ participantId: c, service: h });
|
|
431
431
|
}
|
|
432
432
|
})(), () => {
|
|
433
|
-
|
|
433
|
+
I = !0;
|
|
434
434
|
};
|
|
435
|
-
}, [
|
|
436
|
-
isParticipantBlocked:
|
|
435
|
+
}, [b, h, c, p]), {
|
|
436
|
+
isParticipantBlocked: x,
|
|
437
437
|
isCheckingBlockedStatus: D,
|
|
438
|
-
isLeaving:
|
|
439
|
-
isUpdatingBlockStatus:
|
|
438
|
+
isLeaving: w,
|
|
439
|
+
isUpdatingBlockStatus: R,
|
|
440
440
|
handleLeaveConversation: async () => {
|
|
441
|
-
var
|
|
442
|
-
if (!
|
|
443
|
-
o == null || o(),
|
|
441
|
+
var I;
|
|
442
|
+
if (!w) {
|
|
443
|
+
o == null || o(), g && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
|
|
444
444
|
try {
|
|
445
|
-
const
|
|
446
|
-
await e.hide(
|
|
447
|
-
} catch (
|
|
448
|
-
console.error(`[${p}] Failed to leave conversation`,
|
|
445
|
+
const M = ((I = e._client) == null ? void 0 : I.userID) ?? null;
|
|
446
|
+
await e.hide(M, !1), r && await r(e), m == null || m();
|
|
447
|
+
} catch (M) {
|
|
448
|
+
console.error(`[${p}] Failed to leave conversation`, M);
|
|
449
449
|
} finally {
|
|
450
450
|
C(!1);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
},
|
|
454
454
|
handleBlockUser: async () => {
|
|
455
|
-
var
|
|
456
|
-
if (!(
|
|
457
|
-
l == null || l(),
|
|
455
|
+
var I, M, T;
|
|
456
|
+
if (!(R || !h)) {
|
|
457
|
+
l == null || l(), g && console.log(`[${p}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
458
458
|
try {
|
|
459
|
-
await h.blockUser((
|
|
459
|
+
await h.blockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
|
|
460
460
|
} catch (z) {
|
|
461
461
|
console.error(`[${p}] Failed to block member`, z);
|
|
462
462
|
} finally {
|
|
463
|
-
|
|
463
|
+
S(!1);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
467
|
handleUnblockUser: async () => {
|
|
468
|
-
var
|
|
469
|
-
if (!(
|
|
470
|
-
l == null || l(),
|
|
468
|
+
var I, M, T;
|
|
469
|
+
if (!(R || !h)) {
|
|
470
|
+
l == null || l(), g && console.log(`[${p}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
|
|
471
471
|
try {
|
|
472
|
-
await h.unBlockUser((
|
|
472
|
+
await h.unBlockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
|
|
473
473
|
} catch (z) {
|
|
474
474
|
console.error(`[${p}] Failed to unblock member`, z);
|
|
475
475
|
} finally {
|
|
476
|
-
|
|
476
|
+
S(!1);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
handleReportUser: () => {
|
|
481
|
-
d == null || d(),
|
|
481
|
+
d == null || d(), m == null || m(), window.open(da, "_blank", "noopener,noreferrer");
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
}, Ne = ({
|
|
@@ -498,7 +498,7 @@ const ne = ({
|
|
|
498
498
|
...a,
|
|
499
499
|
children: n
|
|
500
500
|
}
|
|
501
|
-
),
|
|
501
|
+
), at = ({
|
|
502
502
|
channel: e,
|
|
503
503
|
participant: t,
|
|
504
504
|
showDeleteConversation: n = !0,
|
|
@@ -508,51 +508,51 @@ const ne = ({
|
|
|
508
508
|
onBlockParticipant: o,
|
|
509
509
|
onDeleteConversationClick: l,
|
|
510
510
|
onBlockParticipantClick: d,
|
|
511
|
-
onReportParticipantClick:
|
|
511
|
+
onReportParticipantClick: m,
|
|
512
512
|
customChannelActions: p,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [
|
|
516
|
-
isParticipantBlocked:
|
|
517
|
-
isCheckingBlockedStatus:
|
|
518
|
-
isLeaving:
|
|
515
|
+
const [g, c] = U(!1), b = G(null), x = Gs(), v = Z(() => c(!1), []), {
|
|
516
|
+
isParticipantBlocked: f,
|
|
517
|
+
isCheckingBlockedStatus: N,
|
|
518
|
+
isLeaving: w,
|
|
519
519
|
isUpdatingBlockStatus: C,
|
|
520
|
-
handleLeaveConversation:
|
|
521
|
-
handleBlockUser:
|
|
520
|
+
handleLeaveConversation: R,
|
|
521
|
+
handleBlockUser: S,
|
|
522
522
|
handleUnblockUser: D,
|
|
523
523
|
handleReportUser: $
|
|
524
524
|
} = ua({
|
|
525
525
|
channel: e,
|
|
526
526
|
participant: t,
|
|
527
527
|
showBlockParticipant: a,
|
|
528
|
-
enabled:
|
|
528
|
+
enabled: g,
|
|
529
529
|
onLeaveConversation: i,
|
|
530
530
|
onBlockParticipant: o,
|
|
531
531
|
onDeleteConversationClick: l,
|
|
532
532
|
onBlockParticipantClick: d,
|
|
533
|
-
onReportParticipantClick:
|
|
534
|
-
onActionComplete:
|
|
533
|
+
onReportParticipantClick: m,
|
|
534
|
+
onActionComplete: v,
|
|
535
535
|
logLabel: "ChannelActionsMenu"
|
|
536
536
|
});
|
|
537
537
|
return J(() => {
|
|
538
|
-
if (!
|
|
539
|
-
const L = (
|
|
540
|
-
|
|
541
|
-
}, y = (
|
|
542
|
-
|
|
538
|
+
if (!g) return;
|
|
539
|
+
const L = (E) => {
|
|
540
|
+
b.current && !b.current.contains(E.target) && c(!1);
|
|
541
|
+
}, y = (E) => {
|
|
542
|
+
E.key === "Escape" && c(!1);
|
|
543
543
|
};
|
|
544
544
|
return document.addEventListener("mousedown", L), document.addEventListener("keydown", y), () => {
|
|
545
545
|
document.removeEventListener("mousedown", L), document.removeEventListener("keydown", y);
|
|
546
546
|
};
|
|
547
|
-
}, [
|
|
548
|
-
/* @__PURE__ */
|
|
547
|
+
}, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
|
|
548
|
+
/* @__PURE__ */ u(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
551
551
|
className: h,
|
|
552
552
|
type: "button",
|
|
553
553
|
"aria-haspopup": "true",
|
|
554
|
-
"aria-expanded":
|
|
555
|
-
"aria-controls":
|
|
554
|
+
"aria-expanded": g,
|
|
555
|
+
"aria-controls": g ? x : void 0,
|
|
556
556
|
onClick: () => c((L) => !L),
|
|
557
557
|
children: [
|
|
558
558
|
/* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
|
|
@@ -560,36 +560,36 @@ const ne = ({
|
|
|
560
560
|
]
|
|
561
561
|
}
|
|
562
562
|
),
|
|
563
|
-
|
|
563
|
+
g && /* @__PURE__ */ s(
|
|
564
564
|
"div",
|
|
565
565
|
{
|
|
566
|
-
id:
|
|
566
|
+
id: x,
|
|
567
567
|
"aria-label": "Conversation options",
|
|
568
568
|
className: k(
|
|
569
569
|
"absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
|
|
570
570
|
"rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
|
|
571
571
|
),
|
|
572
|
-
children: /* @__PURE__ */
|
|
573
|
-
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ u("ul", { className: "flex flex-col gap-1", children: [
|
|
573
|
+
n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
|
|
574
574
|
Ne,
|
|
575
575
|
{
|
|
576
|
-
onClick:
|
|
577
|
-
disabled:
|
|
578
|
-
"aria-busy":
|
|
576
|
+
onClick: R,
|
|
577
|
+
disabled: w,
|
|
578
|
+
"aria-busy": w,
|
|
579
579
|
children: [
|
|
580
|
-
|
|
580
|
+
w ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
a && /* @__PURE__ */ s("li", { children:
|
|
585
|
+
a && /* @__PURE__ */ s("li", { children: N ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ u(Ne, { disabled: !0, "aria-busy": !0, children: [
|
|
589
589
|
/* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
|
|
590
590
|
/* @__PURE__ */ s("span", { children: "Block" })
|
|
591
591
|
] })
|
|
592
|
-
) :
|
|
592
|
+
) : f ? /* @__PURE__ */ u(
|
|
593
593
|
Ne,
|
|
594
594
|
{
|
|
595
595
|
onClick: D,
|
|
@@ -600,10 +600,10 @@ const ne = ({
|
|
|
600
600
|
/* @__PURE__ */ s("span", { children: "Unblock" })
|
|
601
601
|
]
|
|
602
602
|
}
|
|
603
|
-
) : /* @__PURE__ */
|
|
603
|
+
) : /* @__PURE__ */ u(
|
|
604
604
|
Ne,
|
|
605
605
|
{
|
|
606
|
-
onClick:
|
|
606
|
+
onClick: S,
|
|
607
607
|
disabled: C,
|
|
608
608
|
"aria-busy": C,
|
|
609
609
|
children: [
|
|
@@ -612,7 +612,7 @@ const ne = ({
|
|
|
612
612
|
]
|
|
613
613
|
}
|
|
614
614
|
) }),
|
|
615
|
-
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */
|
|
615
|
+
r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(Ne, { variant: "danger", onClick: $, children: [
|
|
616
616
|
/* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
|
|
617
617
|
/* @__PURE__ */ s("span", { children: "Report" })
|
|
618
618
|
] }) }),
|
|
@@ -625,160 +625,170 @@ const ne = ({
|
|
|
625
625
|
const t = e;
|
|
626
626
|
return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
|
|
627
627
|
}, pa = ({
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
628
|
+
className: e,
|
|
629
|
+
onBack: t,
|
|
630
|
+
showBackButton: n,
|
|
631
|
+
showStarButton: a = !1,
|
|
632
|
+
dmAgentEnabled: r = !1,
|
|
633
|
+
onLeaveConversation: i,
|
|
634
|
+
onBlockParticipant: o,
|
|
635
|
+
showDeleteConversation: l = !0,
|
|
636
|
+
showBlockParticipant: d = !0,
|
|
637
|
+
showReportParticipant: m = !0,
|
|
638
|
+
onDeleteConversationClick: p,
|
|
639
|
+
onBlockParticipantClick: h,
|
|
640
|
+
onReportParticipantClick: g,
|
|
641
|
+
customChannelActions: c,
|
|
642
|
+
renderChannelActions: b,
|
|
643
|
+
showChannelInfo: x = !0,
|
|
644
|
+
onParticipantNameClick: v
|
|
644
645
|
}) => {
|
|
645
|
-
var
|
|
646
|
-
const { channel:
|
|
646
|
+
var F, L, y;
|
|
647
|
+
const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
|
|
647
648
|
() => {
|
|
648
|
-
var
|
|
649
|
+
var E;
|
|
649
650
|
return je(
|
|
650
|
-
(
|
|
651
|
-
|
|
652
|
-
|
|
651
|
+
(E = f.state) == null ? void 0 : E.members,
|
|
652
|
+
N == null ? void 0 : N.userID,
|
|
653
|
+
f.type
|
|
653
654
|
);
|
|
654
655
|
},
|
|
655
|
-
[(
|
|
656
|
-
),
|
|
656
|
+
[(F = f.state) == null ? void 0 : F.members, N == null ? void 0 : N.userID, f.type]
|
|
657
|
+
), C = ut(w == null ? void 0 : w.user), R = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = dt(f), D = ga(w), $ = async () => {
|
|
657
658
|
try {
|
|
658
|
-
|
|
659
|
-
} catch (
|
|
659
|
+
S ? await f.unpin() : await f.pin();
|
|
660
|
+
} catch (E) {
|
|
660
661
|
console.error(
|
|
661
662
|
"[ChannelHeaderRedesign] Failed to update pinned status:",
|
|
662
|
-
|
|
663
|
+
E
|
|
663
664
|
);
|
|
664
665
|
}
|
|
665
666
|
};
|
|
666
|
-
return /* @__PURE__ */ s(
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
children:
|
|
689
|
-
|
|
690
|
-
|
|
667
|
+
return /* @__PURE__ */ s(
|
|
668
|
+
"div",
|
|
669
|
+
{
|
|
670
|
+
className: k(
|
|
671
|
+
"@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
|
|
672
|
+
e
|
|
673
|
+
),
|
|
674
|
+
children: /* @__PURE__ */ u("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
|
|
675
|
+
/* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
|
|
676
|
+
"button",
|
|
677
|
+
{
|
|
678
|
+
className: k(
|
|
679
|
+
We,
|
|
680
|
+
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
681
|
+
),
|
|
682
|
+
onClick: t || (() => {
|
|
683
|
+
}),
|
|
684
|
+
type: "button",
|
|
685
|
+
"aria-label": "Back to conversations",
|
|
686
|
+
children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
|
|
687
|
+
}
|
|
688
|
+
) }),
|
|
689
|
+
/* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ u(
|
|
690
|
+
"button",
|
|
691
|
+
{
|
|
692
|
+
type: "button",
|
|
693
|
+
onClick: v,
|
|
694
|
+
"aria-label": `View details for ${C}`,
|
|
695
|
+
className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
|
|
696
|
+
children: [
|
|
697
|
+
/* @__PURE__ */ s(
|
|
698
|
+
ne,
|
|
699
|
+
{
|
|
700
|
+
id: ((y = w == null ? void 0 : w.user) == null ? void 0 : y.id) || f.id || "unknown",
|
|
701
|
+
name: C,
|
|
702
|
+
image: R,
|
|
703
|
+
dmAgentEnabled: r,
|
|
704
|
+
shape: "circle",
|
|
705
|
+
size: 48,
|
|
706
|
+
className: "-mb-2"
|
|
707
|
+
}
|
|
708
|
+
),
|
|
709
|
+
/* @__PURE__ */ u("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
|
|
710
|
+
/* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
|
|
711
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
|
|
712
|
+
/* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
|
|
713
|
+
D && /* @__PURE__ */ s(
|
|
714
|
+
"span",
|
|
715
|
+
{
|
|
716
|
+
"aria-label": "Paid customer",
|
|
717
|
+
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
718
|
+
children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
|
|
719
|
+
}
|
|
720
|
+
),
|
|
721
|
+
a && S && /* @__PURE__ */ s(
|
|
722
|
+
"span",
|
|
723
|
+
{
|
|
724
|
+
"aria-label": "Starred conversation",
|
|
725
|
+
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
726
|
+
children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
|
|
727
|
+
}
|
|
728
|
+
),
|
|
729
|
+
/* @__PURE__ */ s(
|
|
730
|
+
ve,
|
|
731
|
+
{
|
|
732
|
+
"aria-hidden": "true",
|
|
733
|
+
className: "size-4 shrink-0 text-black/65",
|
|
734
|
+
weight: "bold"
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
] })
|
|
738
|
+
] }),
|
|
739
|
+
r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
740
|
+
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
741
|
+
/* @__PURE__ */ s("span", { children: ha })
|
|
742
|
+
] })
|
|
743
|
+
] })
|
|
744
|
+
]
|
|
745
|
+
}
|
|
746
|
+
) }),
|
|
747
|
+
/* @__PURE__ */ u("div", { className: "flex items-start justify-end gap-2", children: [
|
|
748
|
+
a && /* @__PURE__ */ s(
|
|
749
|
+
"button",
|
|
691
750
|
{
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
751
|
+
className: We,
|
|
752
|
+
onClick: $,
|
|
753
|
+
type: "button",
|
|
754
|
+
"aria-pressed": S,
|
|
755
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
756
|
+
children: /* @__PURE__ */ s(
|
|
757
|
+
Ee,
|
|
758
|
+
{
|
|
759
|
+
className: k("size-5", {
|
|
760
|
+
"text-[#FFD60A]": S,
|
|
761
|
+
"text-black/90": !S
|
|
762
|
+
}),
|
|
763
|
+
weight: S ? "fill" : "regular"
|
|
764
|
+
}
|
|
765
|
+
)
|
|
699
766
|
}
|
|
700
767
|
),
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
/* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
|
|
704
|
-
/* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
|
|
705
|
-
A && /* @__PURE__ */ s(
|
|
706
|
-
"span",
|
|
707
|
-
{
|
|
708
|
-
"aria-label": "Paid customer",
|
|
709
|
-
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
710
|
-
children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
|
|
711
|
-
}
|
|
712
|
-
),
|
|
713
|
-
n && T && /* @__PURE__ */ s(
|
|
714
|
-
"span",
|
|
715
|
-
{
|
|
716
|
-
"aria-label": "Starred conversation",
|
|
717
|
-
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
718
|
-
children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
|
|
719
|
-
}
|
|
720
|
-
),
|
|
721
|
-
/* @__PURE__ */ s(
|
|
722
|
-
ve,
|
|
723
|
-
{
|
|
724
|
-
"aria-hidden": "true",
|
|
725
|
-
className: "size-4 shrink-0 text-black/65",
|
|
726
|
-
weight: "bold"
|
|
727
|
-
}
|
|
728
|
-
)
|
|
729
|
-
] })
|
|
730
|
-
] }),
|
|
731
|
-
a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
732
|
-
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
733
|
-
/* @__PURE__ */ s("span", { children: ha })
|
|
734
|
-
] })
|
|
735
|
-
] })
|
|
736
|
-
]
|
|
737
|
-
}
|
|
738
|
-
) }),
|
|
739
|
-
/* @__PURE__ */ m("div", { className: "flex items-start justify-end gap-2", children: [
|
|
740
|
-
n && /* @__PURE__ */ s(
|
|
741
|
-
"button",
|
|
742
|
-
{
|
|
743
|
-
className: We,
|
|
744
|
-
onClick: D,
|
|
745
|
-
type: "button",
|
|
746
|
-
"aria-pressed": T,
|
|
747
|
-
"aria-label": T ? "Unstar conversation" : "Star conversation",
|
|
748
|
-
children: /* @__PURE__ */ s(
|
|
749
|
-
Ee,
|
|
768
|
+
x && (b !== void 0 ? b : /* @__PURE__ */ s(
|
|
769
|
+
at,
|
|
750
770
|
{
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
771
|
+
channel: f,
|
|
772
|
+
participant: w,
|
|
773
|
+
showDeleteConversation: l,
|
|
774
|
+
showBlockParticipant: d,
|
|
775
|
+
showReportParticipant: m,
|
|
776
|
+
onLeaveConversation: i,
|
|
777
|
+
onBlockParticipant: o,
|
|
778
|
+
onDeleteConversationClick: p,
|
|
779
|
+
onBlockParticipantClick: h,
|
|
780
|
+
onReportParticipantClick: g,
|
|
781
|
+
customChannelActions: c,
|
|
782
|
+
triggerClassName: We
|
|
756
783
|
}
|
|
757
|
-
)
|
|
758
|
-
}
|
|
759
|
-
)
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
channel: b,
|
|
764
|
-
participant: x,
|
|
765
|
-
showDeleteConversation: o,
|
|
766
|
-
showBlockParticipant: l,
|
|
767
|
-
showReportParticipant: d,
|
|
768
|
-
onLeaveConversation: r,
|
|
769
|
-
onBlockParticipant: i,
|
|
770
|
-
onDeleteConversationClick: u,
|
|
771
|
-
onBlockParticipantClick: p,
|
|
772
|
-
onReportParticipantClick: h,
|
|
773
|
-
customChannelActions: f,
|
|
774
|
-
triggerClassName: We
|
|
775
|
-
}
|
|
776
|
-
))
|
|
777
|
-
] })
|
|
778
|
-
] }) });
|
|
779
|
-
}, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
|
|
784
|
+
))
|
|
785
|
+
] })
|
|
786
|
+
] })
|
|
787
|
+
}
|
|
788
|
+
);
|
|
789
|
+
}, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
|
|
780
790
|
function va(e) {
|
|
781
|
-
return e != null && e.length ? e.some((t) => t.type ===
|
|
791
|
+
return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
|
|
782
792
|
}
|
|
783
793
|
function xa(e) {
|
|
784
794
|
const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
|
|
@@ -787,9 +797,9 @@ function xa(e) {
|
|
|
787
797
|
), r = Z(async () => {
|
|
788
798
|
if (n != null && n.userID)
|
|
789
799
|
try {
|
|
790
|
-
a === "up" ? await t.deleteReaction(e.id,
|
|
800
|
+
a === "up" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
|
|
791
801
|
e.id,
|
|
792
|
-
{ type:
|
|
802
|
+
{ type: rt },
|
|
793
803
|
{ enforce_unique: !0, skip_push: !0 }
|
|
794
804
|
);
|
|
795
805
|
} catch {
|
|
@@ -797,9 +807,9 @@ function xa(e) {
|
|
|
797
807
|
}, [t, n == null ? void 0 : n.userID, e.id, a]), i = Z(async () => {
|
|
798
808
|
if (n != null && n.userID)
|
|
799
809
|
try {
|
|
800
|
-
a === "down" ? await t.deleteReaction(e.id,
|
|
810
|
+
a === "down" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
|
|
801
811
|
e.id,
|
|
802
|
-
{ type:
|
|
812
|
+
{ type: it },
|
|
803
813
|
{ enforce_unique: !0, skip_push: !0 }
|
|
804
814
|
);
|
|
805
815
|
} catch {
|
|
@@ -818,13 +828,13 @@ function hs({
|
|
|
818
828
|
const n = e == null ? void 0 : e.text, a = wa(t);
|
|
819
829
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
820
830
|
}
|
|
821
|
-
const _a = V.lazy(() => import("./Card-
|
|
831
|
+
const _a = V.lazy(() => import("./Card-CbRJaszK.js")), Na = V.lazy(() => import("./Card-CT51GZA-.js")), ya = V.lazy(() => import("./Card-t7hyYqE2.js")), mt = () => /* @__PURE__ */ s(
|
|
822
832
|
"div",
|
|
823
833
|
{
|
|
824
834
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
825
835
|
"aria-hidden": !0
|
|
826
836
|
}
|
|
827
|
-
), ka = (e) => /* @__PURE__ */ s(
|
|
837
|
+
), ka = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
|
|
828
838
|
[/pdf/, "pdf"],
|
|
829
839
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
830
840
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -879,76 +889,76 @@ const Ma = (e) => {
|
|
|
879
889
|
controls: o = !0,
|
|
880
890
|
showProgress: l = !1,
|
|
881
891
|
muted: d = !1,
|
|
882
|
-
onContainerClick:
|
|
892
|
+
onContainerClick: m
|
|
883
893
|
}) => {
|
|
884
|
-
const p = ce(t), h = G(null),
|
|
885
|
-
$(!1),
|
|
894
|
+
const p = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [x, v] = U(a), [f, N] = U(0), [w, C] = U(!1), [R, S] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [y, E] = U(!0), [I, M] = U(null), T = Z(() => {
|
|
895
|
+
$(!1), v(!0);
|
|
886
896
|
}, []), z = Z((_) => {
|
|
887
|
-
const
|
|
888
|
-
if (!
|
|
889
|
-
const H =
|
|
897
|
+
const A = g.current;
|
|
898
|
+
if (!A) return 0;
|
|
899
|
+
const H = A.getBoundingClientRect();
|
|
890
900
|
return Math.max(
|
|
891
901
|
0,
|
|
892
902
|
Math.min(1, (Ma(_) - H.left) / H.width)
|
|
893
903
|
);
|
|
894
904
|
}, []), O = Z((_) => {
|
|
895
|
-
const
|
|
896
|
-
|
|
905
|
+
const A = h.current;
|
|
906
|
+
A && A.duration && (A.currentTime = _ * A.duration);
|
|
897
907
|
}, []), j = (_) => {
|
|
898
908
|
_.stopPropagation(), C(!0);
|
|
899
|
-
const
|
|
900
|
-
|
|
909
|
+
const A = z(_);
|
|
910
|
+
N(A), O(A);
|
|
901
911
|
};
|
|
902
912
|
J(() => {
|
|
903
|
-
r !== void 0 && r !==
|
|
913
|
+
r !== void 0 && r !== b.current && (b.current = r, v(r));
|
|
904
914
|
}, [r]), J(() => {
|
|
905
|
-
if (!
|
|
915
|
+
if (!x) {
|
|
906
916
|
c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
|
|
907
917
|
return;
|
|
908
918
|
}
|
|
909
919
|
const _ = () => {
|
|
910
|
-
const
|
|
911
|
-
|
|
920
|
+
const A = h.current;
|
|
921
|
+
A && A.duration && !w && N(A.currentTime / A.duration), c.current = requestAnimationFrame(_);
|
|
912
922
|
};
|
|
913
923
|
return c.current = requestAnimationFrame(_), () => {
|
|
914
924
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
915
925
|
};
|
|
916
|
-
}, [
|
|
926
|
+
}, [x, w]), J(() => {
|
|
917
927
|
const _ = h.current;
|
|
918
|
-
_ && (
|
|
919
|
-
|
|
928
|
+
_ && (x ? _.play().catch((A) => {
|
|
929
|
+
v(!1), $(!0);
|
|
920
930
|
}) : _.pause());
|
|
921
|
-
}, [
|
|
922
|
-
if (!
|
|
923
|
-
const _ = (H) =>
|
|
931
|
+
}, [x]), J(() => {
|
|
932
|
+
if (!w) return;
|
|
933
|
+
const _ = (H) => N(z(H)), A = (H) => {
|
|
924
934
|
C(!1), O(z(H));
|
|
925
935
|
};
|
|
926
|
-
return window.addEventListener("mousemove", _), window.addEventListener("mouseup",
|
|
927
|
-
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup",
|
|
936
|
+
return window.addEventListener("mousemove", _), window.addEventListener("mouseup", A), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", A), () => {
|
|
937
|
+
window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", A);
|
|
928
938
|
};
|
|
929
|
-
}, [
|
|
930
|
-
const X =
|
|
931
|
-
return /* @__PURE__ */
|
|
939
|
+
}, [w, z, O]);
|
|
940
|
+
const X = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", K = Math.round(f * 100);
|
|
941
|
+
return /* @__PURE__ */ u(
|
|
932
942
|
"div",
|
|
933
943
|
{
|
|
934
944
|
role: "button",
|
|
935
945
|
tabIndex: 0,
|
|
936
|
-
className: `relative cursor-pointer overflow-hidden bg-black ${
|
|
946
|
+
className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
|
|
937
947
|
style: X,
|
|
938
948
|
onClick: (_) => {
|
|
939
|
-
if (
|
|
940
|
-
|
|
949
|
+
if (m) {
|
|
950
|
+
m(_);
|
|
941
951
|
return;
|
|
942
952
|
}
|
|
943
|
-
D || o &&
|
|
953
|
+
D || o && v((A) => !A);
|
|
944
954
|
},
|
|
945
955
|
onKeyDown: (_) => {
|
|
946
956
|
if (!(_.key !== "Enter" && _.key !== " ")) {
|
|
947
|
-
if (_.preventDefault(),
|
|
948
|
-
|
|
957
|
+
if (_.preventDefault(), m) {
|
|
958
|
+
m(_);
|
|
949
959
|
return;
|
|
950
960
|
}
|
|
951
|
-
D || o &&
|
|
961
|
+
D || o && v((A) => !A);
|
|
952
962
|
}
|
|
953
963
|
},
|
|
954
964
|
children: [
|
|
@@ -974,12 +984,12 @@ const Ma = (e) => {
|
|
|
974
984
|
style: { width: "100%", height: "100%" },
|
|
975
985
|
onLoadStart: () => L(!0),
|
|
976
986
|
onCanPlay: () => {
|
|
977
|
-
L(!1),
|
|
987
|
+
L(!1), E(!1);
|
|
978
988
|
},
|
|
979
989
|
onWaiting: () => L(!0),
|
|
980
990
|
onPlay: () => $(!1),
|
|
981
991
|
onEnded: () => {
|
|
982
|
-
i || (
|
|
992
|
+
i || (v(!1), N(0));
|
|
983
993
|
},
|
|
984
994
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
985
995
|
}
|
|
@@ -994,16 +1004,16 @@ const Ma = (e) => {
|
|
|
994
1004
|
style: { width: "100%", height: "100%" },
|
|
995
1005
|
onLoadStart: () => L(!0),
|
|
996
1006
|
onCanPlay: () => {
|
|
997
|
-
L(!1),
|
|
1007
|
+
L(!1), E(!1);
|
|
998
1008
|
},
|
|
999
1009
|
onWaiting: () => L(!0),
|
|
1000
1010
|
onPlay: () => $(!1),
|
|
1001
1011
|
onLoadedMetadata: () => {
|
|
1002
1012
|
const _ = h.current;
|
|
1003
|
-
_ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight &&
|
|
1013
|
+
_ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && M(_.videoWidth / _.videoHeight);
|
|
1004
1014
|
},
|
|
1005
1015
|
onEnded: () => {
|
|
1006
|
-
i || (
|
|
1016
|
+
i || (v(!1), N(0));
|
|
1007
1017
|
},
|
|
1008
1018
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1009
1019
|
}
|
|
@@ -1023,12 +1033,12 @@ const Ma = (e) => {
|
|
|
1023
1033
|
tabIndex: 0,
|
|
1024
1034
|
"aria-label": "Play preview",
|
|
1025
1035
|
onClick: (_) => {
|
|
1026
|
-
_.stopPropagation(),
|
|
1036
|
+
_.stopPropagation(), T();
|
|
1027
1037
|
},
|
|
1028
1038
|
onKeyDown: (_) => {
|
|
1029
|
-
_.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(),
|
|
1039
|
+
_.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), T());
|
|
1030
1040
|
},
|
|
1031
|
-
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(
|
|
1041
|
+
children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1032
1042
|
}
|
|
1033
1043
|
),
|
|
1034
1044
|
l && !o && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
|
|
@@ -1040,13 +1050,13 @@ const Ma = (e) => {
|
|
|
1040
1050
|
"aria-valuemin": 0,
|
|
1041
1051
|
"aria-valuemax": 100,
|
|
1042
1052
|
tabIndex: 0,
|
|
1043
|
-
ref:
|
|
1053
|
+
ref: g,
|
|
1044
1054
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1045
1055
|
onMouseDown: j,
|
|
1046
1056
|
onTouchStart: j,
|
|
1047
1057
|
onClick: (_) => _.stopPropagation(),
|
|
1048
1058
|
onKeyDown: (_) => {
|
|
1049
|
-
_.key === "ArrowRight" && O(Math.min(1,
|
|
1059
|
+
_.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
|
|
1050
1060
|
},
|
|
1051
1061
|
children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
|
|
1052
1062
|
"div",
|
|
@@ -1057,20 +1067,20 @@ const Ma = (e) => {
|
|
|
1057
1067
|
) })
|
|
1058
1068
|
}
|
|
1059
1069
|
) }),
|
|
1060
|
-
o && /* @__PURE__ */
|
|
1070
|
+
o && /* @__PURE__ */ u("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
|
|
1061
1071
|
/* @__PURE__ */ s(
|
|
1062
1072
|
"button",
|
|
1063
1073
|
{
|
|
1064
1074
|
type: "button",
|
|
1065
1075
|
onClick: (_) => {
|
|
1066
|
-
_.stopPropagation(),
|
|
1076
|
+
_.stopPropagation(), v((A) => !A);
|
|
1067
1077
|
},
|
|
1068
1078
|
className: "shrink-0 text-white",
|
|
1069
|
-
"aria-label":
|
|
1070
|
-
children:
|
|
1079
|
+
"aria-label": x ? "Pause" : "Play",
|
|
1080
|
+
children: x ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1071
1081
|
}
|
|
1072
1082
|
),
|
|
1073
|
-
/* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ u(
|
|
1074
1084
|
"div",
|
|
1075
1085
|
{
|
|
1076
1086
|
role: "slider",
|
|
@@ -1079,21 +1089,21 @@ const Ma = (e) => {
|
|
|
1079
1089
|
"aria-valuemin": 0,
|
|
1080
1090
|
"aria-valuemax": 100,
|
|
1081
1091
|
tabIndex: 0,
|
|
1082
|
-
ref:
|
|
1092
|
+
ref: g,
|
|
1083
1093
|
className: "relative flex h-4 w-full cursor-pointer items-center",
|
|
1084
1094
|
onMouseDown: j,
|
|
1085
1095
|
onTouchStart: j,
|
|
1086
1096
|
onClick: (_) => _.stopPropagation(),
|
|
1087
|
-
onMouseEnter: () =>
|
|
1088
|
-
onMouseLeave: () =>
|
|
1097
|
+
onMouseEnter: () => S(!0),
|
|
1098
|
+
onMouseLeave: () => S(!1),
|
|
1089
1099
|
onKeyDown: (_) => {
|
|
1090
|
-
_.key === "ArrowRight" && O(Math.min(1,
|
|
1100
|
+
_.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
|
|
1091
1101
|
},
|
|
1092
1102
|
children: [
|
|
1093
1103
|
/* @__PURE__ */ s(
|
|
1094
1104
|
"div",
|
|
1095
1105
|
{
|
|
1096
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${
|
|
1106
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || w ? "h-1.5" : "h-1"}`,
|
|
1097
1107
|
children: /* @__PURE__ */ s(
|
|
1098
1108
|
"div",
|
|
1099
1109
|
{
|
|
@@ -1106,7 +1116,7 @@ const Ma = (e) => {
|
|
|
1106
1116
|
/* @__PURE__ */ s(
|
|
1107
1117
|
"div",
|
|
1108
1118
|
{
|
|
1109
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${
|
|
1119
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1110
1120
|
style: { left: `${K}%` }
|
|
1111
1121
|
}
|
|
1112
1122
|
)
|
|
@@ -1126,7 +1136,7 @@ const Ma = (e) => {
|
|
|
1126
1136
|
mediaPlayerProps: i,
|
|
1127
1137
|
containedImage: o = !1
|
|
1128
1138
|
}) => {
|
|
1129
|
-
const l = ce(e), [d,
|
|
1139
|
+
const l = ce(e), [d, m] = U(!1);
|
|
1130
1140
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
|
|
1131
1141
|
Ra,
|
|
1132
1142
|
{
|
|
@@ -1143,7 +1153,7 @@ const Ma = (e) => {
|
|
|
1143
1153
|
alt: a ?? "",
|
|
1144
1154
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
1145
1155
|
draggable: !1,
|
|
1146
|
-
onLoad: () =>
|
|
1156
|
+
onLoad: () => m(!0)
|
|
1147
1157
|
}
|
|
1148
1158
|
) }) : /* @__PURE__ */ s(
|
|
1149
1159
|
"img",
|
|
@@ -1160,7 +1170,7 @@ const Ma = (e) => {
|
|
|
1160
1170
|
alt: a ?? "",
|
|
1161
1171
|
className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
|
|
1162
1172
|
draggable: !1,
|
|
1163
|
-
onLoad: () =>
|
|
1173
|
+
onLoad: () => m(!0)
|
|
1164
1174
|
}
|
|
1165
1175
|
) }) : /* @__PURE__ */ s(
|
|
1166
1176
|
"img",
|
|
@@ -1207,41 +1217,41 @@ const Ma = (e) => {
|
|
|
1207
1217
|
statusBadge: o,
|
|
1208
1218
|
action: l,
|
|
1209
1219
|
topLeft: d,
|
|
1210
|
-
topRight:
|
|
1220
|
+
topRight: m,
|
|
1211
1221
|
rootRef: p,
|
|
1212
1222
|
"data-testid": h
|
|
1213
1223
|
}) => {
|
|
1214
|
-
const
|
|
1215
|
-
return /* @__PURE__ */
|
|
1224
|
+
const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
|
|
1225
|
+
return /* @__PURE__ */ u(
|
|
1216
1226
|
"div",
|
|
1217
1227
|
{
|
|
1218
1228
|
ref: p,
|
|
1219
1229
|
"data-testid": h,
|
|
1220
1230
|
className: k(
|
|
1221
1231
|
"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)]",
|
|
1222
|
-
|
|
1232
|
+
g ? "bg-[#1e2330]" : "bg-white"
|
|
1223
1233
|
),
|
|
1224
1234
|
children: [
|
|
1225
1235
|
d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
|
|
1226
|
-
|
|
1236
|
+
m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
|
|
1227
1237
|
t,
|
|
1228
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ u("div", { className: "px-4 pb-3 pt-3", children: [
|
|
1229
1239
|
c.trim() !== "" && /* @__PURE__ */ s(
|
|
1230
1240
|
"p",
|
|
1231
1241
|
{
|
|
1232
1242
|
className: k("mb-0.5 truncate text-base font-medium", {
|
|
1233
|
-
"text-black": !
|
|
1234
|
-
"text-white/30":
|
|
1235
|
-
"text-white":
|
|
1243
|
+
"text-black": !g,
|
|
1244
|
+
"text-white/30": g && b,
|
|
1245
|
+
"text-white": g && !b
|
|
1236
1246
|
}),
|
|
1237
1247
|
children: c
|
|
1238
1248
|
}
|
|
1239
1249
|
),
|
|
1240
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1241
1251
|
we(r, {
|
|
1242
1252
|
className: k(
|
|
1243
1253
|
"size-5 shrink-0",
|
|
1244
|
-
|
|
1254
|
+
g ? "text-white/55" : "text-black/55"
|
|
1245
1255
|
),
|
|
1246
1256
|
weight: "regular"
|
|
1247
1257
|
}),
|
|
@@ -1250,7 +1260,7 @@ const Ma = (e) => {
|
|
|
1250
1260
|
{
|
|
1251
1261
|
className: k(
|
|
1252
1262
|
"text-xs font-medium",
|
|
1253
|
-
|
|
1263
|
+
g ? "text-white/55" : "text-black/55"
|
|
1254
1264
|
),
|
|
1255
1265
|
children: i
|
|
1256
1266
|
}
|
|
@@ -1266,7 +1276,7 @@ const Ma = (e) => {
|
|
|
1266
1276
|
function xs(e) {
|
|
1267
1277
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1268
1278
|
}
|
|
1269
|
-
function
|
|
1279
|
+
function ht(e) {
|
|
1270
1280
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1271
1281
|
}
|
|
1272
1282
|
function La(e) {
|
|
@@ -1284,8 +1294,8 @@ function Fa(e) {
|
|
|
1284
1294
|
function Oa(e) {
|
|
1285
1295
|
return e ? "text-white/20" : "text-black/20";
|
|
1286
1296
|
}
|
|
1287
|
-
const
|
|
1288
|
-
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0,
|
|
1297
|
+
const ft = ({ attachment: e, isMyMessage: t }) => {
|
|
1298
|
+
const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ u(V.Fragment, { children: [
|
|
1289
1299
|
/* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
|
|
1290
1300
|
"img",
|
|
1291
1301
|
{
|
|
@@ -1300,18 +1310,18 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1300
1310
|
children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
|
|
1301
1311
|
}
|
|
1302
1312
|
) }),
|
|
1303
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
|
|
1304
1314
|
n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
|
|
1305
1315
|
a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
|
|
1306
1316
|
d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
|
|
1307
1317
|
] })
|
|
1308
1318
|
] });
|
|
1309
|
-
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children:
|
|
1319
|
+
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1310
1320
|
};
|
|
1311
1321
|
function ws(e) {
|
|
1312
1322
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1313
1323
|
}
|
|
1314
|
-
function
|
|
1324
|
+
function gt(e) {
|
|
1315
1325
|
var t;
|
|
1316
1326
|
return (t = e.attachments) == null ? void 0 : t.find(ws);
|
|
1317
1327
|
}
|
|
@@ -1347,31 +1357,31 @@ const Ba = ({
|
|
|
1347
1357
|
},
|
|
1348
1358
|
disabled: n,
|
|
1349
1359
|
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",
|
|
1350
|
-
children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */
|
|
1360
|
+
children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ u(V.Fragment, { children: [
|
|
1351
1361
|
/* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
|
|
1352
1362
|
"Download"
|
|
1353
1363
|
] })
|
|
1354
1364
|
}
|
|
1355
1365
|
);
|
|
1356
1366
|
};
|
|
1357
|
-
function
|
|
1358
|
-
var h,
|
|
1367
|
+
function pt(e) {
|
|
1368
|
+
var h, g, c, b;
|
|
1359
1369
|
const t = (h = e.attachments) == null ? void 0 : h.find(
|
|
1360
|
-
(
|
|
1361
|
-
), n = (
|
|
1362
|
-
(
|
|
1370
|
+
(x) => x.type === "video" && x.asset_url
|
|
1371
|
+
), n = (g = e.attachments) == null ? void 0 : g.find(
|
|
1372
|
+
(x) => x.type === "image" && x.image_url
|
|
1363
1373
|
), a = (c = e.attachments) == null ? void 0 : c.find(
|
|
1364
|
-
(
|
|
1365
|
-
), r = (
|
|
1366
|
-
(
|
|
1374
|
+
(x) => x.type === "audio" && x.asset_url
|
|
1375
|
+
), r = (b = e.attachments) == null ? void 0 : b.find(
|
|
1376
|
+
(x) => x.type === "file" && x.asset_url
|
|
1367
1377
|
), i = t ?? n ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
|
|
1368
1378
|
if (!o) return null;
|
|
1369
|
-
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title,
|
|
1379
|
+
const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
|
|
1370
1380
|
return {
|
|
1371
1381
|
resolvedUrl: o,
|
|
1372
1382
|
resolvedType: l,
|
|
1373
1383
|
title: d,
|
|
1374
|
-
fileSize:
|
|
1384
|
+
fileSize: m,
|
|
1375
1385
|
thumbnailUrl: p
|
|
1376
1386
|
};
|
|
1377
1387
|
}
|
|
@@ -1436,8 +1446,8 @@ const _s = ({
|
|
|
1436
1446
|
message: e,
|
|
1437
1447
|
isMyMessage: t = !1
|
|
1438
1448
|
}) => {
|
|
1439
|
-
const n =
|
|
1440
|
-
return !n && !a ? null : /* @__PURE__ */
|
|
1449
|
+
const n = gt(e), a = pt(e);
|
|
1450
|
+
return !n && !a ? null : /* @__PURE__ */ u("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1441
1451
|
!t && e.user && /* @__PURE__ */ s(
|
|
1442
1452
|
ne,
|
|
1443
1453
|
{
|
|
@@ -1458,7 +1468,7 @@ const _s = ({
|
|
|
1458
1468
|
className: "str-chat__message-bubble",
|
|
1459
1469
|
"data-attachment-bubble": "true",
|
|
1460
1470
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1461
|
-
children: n ? /* @__PURE__ */ s("div", { className:
|
|
1471
|
+
children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
|
|
1462
1472
|
}
|
|
1463
1473
|
) })
|
|
1464
1474
|
}
|
|
@@ -1467,20 +1477,20 @@ const _s = ({
|
|
|
1467
1477
|
}, ja = ({
|
|
1468
1478
|
message: e
|
|
1469
1479
|
}) => {
|
|
1470
|
-
const t =
|
|
1480
|
+
const t = gt(e);
|
|
1471
1481
|
if (t)
|
|
1472
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1473
|
-
const n =
|
|
1482
|
+
return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
|
|
1483
|
+
const n = pt(e);
|
|
1474
1484
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
|
|
1475
1485
|
}, Va = ({
|
|
1476
1486
|
message: e
|
|
1477
1487
|
}) => {
|
|
1478
|
-
const t =
|
|
1488
|
+
const t = gt(e);
|
|
1479
1489
|
if (t)
|
|
1480
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1481
|
-
const n =
|
|
1490
|
+
return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
|
|
1491
|
+
const n = pt(e);
|
|
1482
1492
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
|
|
1483
|
-
},
|
|
1493
|
+
}, ol = Object.assign(Ua, {
|
|
1484
1494
|
Creator: ja,
|
|
1485
1495
|
Visitor: Va
|
|
1486
1496
|
}), Ga = {
|
|
@@ -1515,7 +1525,7 @@ const _s = ({
|
|
|
1515
1525
|
"data-testid": o
|
|
1516
1526
|
}) => {
|
|
1517
1527
|
const l = t != null && t !== "", d = Wa[qa(e)][a];
|
|
1518
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ u(
|
|
1519
1529
|
"div",
|
|
1520
1530
|
{
|
|
1521
1531
|
"data-testid": o,
|
|
@@ -1584,7 +1594,7 @@ const _s = ({
|
|
|
1584
1594
|
mimeType: t,
|
|
1585
1595
|
filename: n,
|
|
1586
1596
|
items: a
|
|
1587
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */
|
|
1597
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
1588
1598
|
/* @__PURE__ */ s(
|
|
1589
1599
|
"audio",
|
|
1590
1600
|
{
|
|
@@ -1596,7 +1606,7 @@ const _s = ({
|
|
|
1596
1606
|
}
|
|
1597
1607
|
),
|
|
1598
1608
|
n ?? null
|
|
1599
|
-
] }),
|
|
1609
|
+
] }), bt = ({
|
|
1600
1610
|
state: e,
|
|
1601
1611
|
src: t,
|
|
1602
1612
|
mimeType: n,
|
|
@@ -1607,33 +1617,33 @@ const _s = ({
|
|
|
1607
1617
|
preload: l,
|
|
1608
1618
|
onDismiss: d
|
|
1609
1619
|
}) => {
|
|
1610
|
-
const
|
|
1620
|
+
const m = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
|
|
1611
1621
|
if (h.length === 0)
|
|
1612
1622
|
return null;
|
|
1613
|
-
const
|
|
1623
|
+
const g = l ?? (h.length > 1 ? "none" : "metadata");
|
|
1614
1624
|
return /* @__PURE__ */ s(
|
|
1615
1625
|
Te,
|
|
1616
1626
|
{
|
|
1617
|
-
variant:
|
|
1627
|
+
variant: m,
|
|
1618
1628
|
text: i,
|
|
1619
1629
|
groupPosition: o,
|
|
1620
1630
|
"data-testid": "audio-attachment",
|
|
1621
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c,
|
|
1631
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
|
|
1622
1632
|
Ja,
|
|
1623
1633
|
{
|
|
1624
1634
|
item: c,
|
|
1625
|
-
preload:
|
|
1635
|
+
preload: g,
|
|
1626
1636
|
trailingAction: (
|
|
1627
1637
|
// Composer only supports a single attachment, so the
|
|
1628
1638
|
// dismiss control sits on the only player.
|
|
1629
|
-
p &&
|
|
1639
|
+
p && b === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
|
|
1630
1640
|
)
|
|
1631
1641
|
},
|
|
1632
|
-
`${c.src}-${
|
|
1642
|
+
`${c.src}-${b}`
|
|
1633
1643
|
)) })
|
|
1634
1644
|
}
|
|
1635
1645
|
);
|
|
1636
|
-
}, Za = (e) => /* @__PURE__ */ s(
|
|
1646
|
+
}, Za = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), tr = {
|
|
1637
1647
|
Composer: Za,
|
|
1638
1648
|
Sent: Qa,
|
|
1639
1649
|
Received: er
|
|
@@ -1700,7 +1710,7 @@ const ir = {
|
|
|
1700
1710
|
activateLabel: o,
|
|
1701
1711
|
trailingAction: l
|
|
1702
1712
|
}) => {
|
|
1703
|
-
const d = n ?? t ?? "File",
|
|
1713
|
+
const d = n ?? t ?? "File", m = rr(a, t, r), p = /* @__PURE__ */ s(
|
|
1704
1714
|
"div",
|
|
1705
1715
|
{
|
|
1706
1716
|
className: k(
|
|
@@ -1713,19 +1723,19 @@ const ir = {
|
|
|
1713
1723
|
weight: "regular"
|
|
1714
1724
|
})
|
|
1715
1725
|
}
|
|
1716
|
-
), h = /* @__PURE__ */
|
|
1726
|
+
), h = /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
|
|
1717
1727
|
/* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
|
|
1718
|
-
|
|
1728
|
+
m ? /* @__PURE__ */ s(
|
|
1719
1729
|
"p",
|
|
1720
1730
|
{
|
|
1721
1731
|
className: k(
|
|
1722
1732
|
"truncate text-xs leading-4",
|
|
1723
1733
|
ir[e]
|
|
1724
1734
|
),
|
|
1725
|
-
children:
|
|
1735
|
+
children: m
|
|
1726
1736
|
}
|
|
1727
1737
|
) : null
|
|
1728
|
-
] }),
|
|
1738
|
+
] }), g = i ? /* @__PURE__ */ u(
|
|
1729
1739
|
"button",
|
|
1730
1740
|
{
|
|
1731
1741
|
type: "button",
|
|
@@ -1740,12 +1750,12 @@ const ir = {
|
|
|
1740
1750
|
h
|
|
1741
1751
|
]
|
|
1742
1752
|
}
|
|
1743
|
-
) : /* @__PURE__ */
|
|
1753
|
+
) : /* @__PURE__ */ u(te, { children: [
|
|
1744
1754
|
p,
|
|
1745
1755
|
h
|
|
1746
1756
|
] });
|
|
1747
|
-
return /* @__PURE__ */
|
|
1748
|
-
|
|
1757
|
+
return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
|
|
1758
|
+
g,
|
|
1749
1759
|
l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
|
|
1750
1760
|
] });
|
|
1751
1761
|
};
|
|
@@ -1791,7 +1801,7 @@ const cr = ({
|
|
|
1791
1801
|
trailingAction: r
|
|
1792
1802
|
}
|
|
1793
1803
|
);
|
|
1794
|
-
},
|
|
1804
|
+
}, vt = ({
|
|
1795
1805
|
state: e,
|
|
1796
1806
|
src: t,
|
|
1797
1807
|
filename: n,
|
|
@@ -1801,26 +1811,26 @@ const cr = ({
|
|
|
1801
1811
|
items: o,
|
|
1802
1812
|
text: l,
|
|
1803
1813
|
groupPosition: d,
|
|
1804
|
-
onClick:
|
|
1814
|
+
onClick: m,
|
|
1805
1815
|
onDismiss: p
|
|
1806
1816
|
}) => {
|
|
1807
|
-
const h = Me(e),
|
|
1817
|
+
const h = Me(e), g = e === "composer" && !!p, c = cr({
|
|
1808
1818
|
src: t,
|
|
1809
1819
|
filename: n,
|
|
1810
1820
|
fileSize: a,
|
|
1811
1821
|
mimeType: r,
|
|
1812
1822
|
title: i,
|
|
1813
1823
|
items: o
|
|
1814
|
-
}),
|
|
1815
|
-
if ((
|
|
1816
|
-
const
|
|
1817
|
-
if (!
|
|
1818
|
-
const
|
|
1819
|
-
ks(
|
|
1824
|
+
}), b = (v) => {
|
|
1825
|
+
if ((m == null ? void 0 : m(v)) === !1) return;
|
|
1826
|
+
const f = c[v];
|
|
1827
|
+
if (!f) return;
|
|
1828
|
+
const N = f.filename ?? re(f.src);
|
|
1829
|
+
ks(f.src, N);
|
|
1820
1830
|
};
|
|
1821
1831
|
if (c.length === 0)
|
|
1822
1832
|
return null;
|
|
1823
|
-
const
|
|
1833
|
+
const x = /* @__PURE__ */ s(
|
|
1824
1834
|
"span",
|
|
1825
1835
|
{
|
|
1826
1836
|
className: k(
|
|
@@ -1838,29 +1848,29 @@ const cr = ({
|
|
|
1838
1848
|
text: l,
|
|
1839
1849
|
groupPosition: d,
|
|
1840
1850
|
"data-testid": "file-attachment",
|
|
1841
|
-
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((
|
|
1851
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((v, f) => /* @__PURE__ */ s(
|
|
1842
1852
|
dr,
|
|
1843
1853
|
{
|
|
1844
1854
|
variant: h,
|
|
1845
|
-
item:
|
|
1846
|
-
index:
|
|
1847
|
-
onActivate:
|
|
1848
|
-
trailingAction:
|
|
1855
|
+
item: v,
|
|
1856
|
+
index: f,
|
|
1857
|
+
onActivate: b,
|
|
1858
|
+
trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : x
|
|
1849
1859
|
},
|
|
1850
|
-
`${
|
|
1860
|
+
`${v.src}-${f}`
|
|
1851
1861
|
)) })
|
|
1852
1862
|
}
|
|
1853
1863
|
);
|
|
1854
|
-
}, ur = (e) => /* @__PURE__ */ s(
|
|
1864
|
+
}, ur = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), fr = {
|
|
1855
1865
|
Composer: ur,
|
|
1856
1866
|
Sent: mr,
|
|
1857
1867
|
Received: hr
|
|
1858
|
-
},
|
|
1868
|
+
}, xt = ({
|
|
1859
1869
|
onPrev: e,
|
|
1860
1870
|
onNext: t,
|
|
1861
1871
|
prevLabel: n = "Previous",
|
|
1862
1872
|
nextLabel: a = "Next"
|
|
1863
|
-
}) => /* @__PURE__ */
|
|
1873
|
+
}) => /* @__PURE__ */ u(te, { children: [
|
|
1864
1874
|
/* @__PURE__ */ s(
|
|
1865
1875
|
"button",
|
|
1866
1876
|
{
|
|
@@ -1890,7 +1900,7 @@ const cr = ({
|
|
|
1890
1900
|
tone: i = "dark",
|
|
1891
1901
|
onTriggered: o
|
|
1892
1902
|
}) => {
|
|
1893
|
-
const [l, d] = U(!1),
|
|
1903
|
+
const [l, d] = U(!1), m = Z(
|
|
1894
1904
|
(c) => {
|
|
1895
1905
|
c.stopPropagation(), !l && (d(!0), ks(e, t).catch(() => {
|
|
1896
1906
|
}).finally(() => {
|
|
@@ -1898,7 +1908,7 @@ const cr = ({
|
|
|
1898
1908
|
}));
|
|
1899
1909
|
},
|
|
1900
1910
|
[l, e, t, o]
|
|
1901
|
-
), p = r ?? n !== "pill",
|
|
1911
|
+
), p = r ?? n !== "pill", g = { className: k(
|
|
1902
1912
|
n === "pill" ? "size-4" : "size-5",
|
|
1903
1913
|
"shrink-0"
|
|
1904
1914
|
), weight: "bold" };
|
|
@@ -1906,7 +1916,7 @@ const cr = ({
|
|
|
1906
1916
|
"button",
|
|
1907
1917
|
{
|
|
1908
1918
|
type: "button",
|
|
1909
|
-
onClick:
|
|
1919
|
+
onClick: m,
|
|
1910
1920
|
disabled: l,
|
|
1911
1921
|
"aria-label": a,
|
|
1912
1922
|
className: k(
|
|
@@ -1936,17 +1946,17 @@ const cr = ({
|
|
|
1936
1946
|
"button",
|
|
1937
1947
|
{
|
|
1938
1948
|
type: "button",
|
|
1939
|
-
onClick:
|
|
1949
|
+
onClick: m,
|
|
1940
1950
|
disabled: l,
|
|
1941
1951
|
"aria-label": a,
|
|
1942
1952
|
className: "mes-media-viewer__action",
|
|
1943
1953
|
children: l ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1944
1954
|
}
|
|
1945
|
-
) : /* @__PURE__ */
|
|
1955
|
+
) : /* @__PURE__ */ u(
|
|
1946
1956
|
"button",
|
|
1947
1957
|
{
|
|
1948
1958
|
type: "button",
|
|
1949
|
-
onClick:
|
|
1959
|
+
onClick: m,
|
|
1950
1960
|
disabled: l,
|
|
1951
1961
|
"aria-label": p ? a : void 0,
|
|
1952
1962
|
className: k(
|
|
@@ -1961,12 +1971,12 @@ const cr = ({
|
|
|
1961
1971
|
weight: "bold",
|
|
1962
1972
|
"aria-hidden": !0
|
|
1963
1973
|
}
|
|
1964
|
-
) : /* @__PURE__ */ s(Se, { ...
|
|
1974
|
+
) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
|
|
1965
1975
|
p ? null : a
|
|
1966
1976
|
]
|
|
1967
1977
|
}
|
|
1968
1978
|
);
|
|
1969
|
-
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1979
|
+
}, Xe = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
|
|
1970
1980
|
length: e,
|
|
1971
1981
|
initialIndex: t,
|
|
1972
1982
|
open: n
|
|
@@ -1984,14 +1994,14 @@ const cr = ({
|
|
|
1984
1994
|
}, [e]);
|
|
1985
1995
|
return J(() => {
|
|
1986
1996
|
if (!n || e <= 1) return;
|
|
1987
|
-
const d = (
|
|
1988
|
-
if (
|
|
1997
|
+
const d = (m) => {
|
|
1998
|
+
if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
|
|
1989
1999
|
const p = document.activeElement;
|
|
1990
|
-
p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (
|
|
2000
|
+
p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
|
|
1991
2001
|
};
|
|
1992
2002
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
1993
2003
|
}, [n, e, o, l]), { index: r, prev: o, next: l };
|
|
1994
|
-
},
|
|
2004
|
+
}, _t = ({
|
|
1995
2005
|
open: e,
|
|
1996
2006
|
onClose: t,
|
|
1997
2007
|
ariaLabel: n,
|
|
@@ -2002,7 +2012,7 @@ const cr = ({
|
|
|
2002
2012
|
}) => {
|
|
2003
2013
|
const l = G(null), d = G(null);
|
|
2004
2014
|
return J(() => {
|
|
2005
|
-
var
|
|
2015
|
+
var g;
|
|
2006
2016
|
const h = l.current;
|
|
2007
2017
|
if (h) {
|
|
2008
2018
|
if (e) {
|
|
@@ -2016,7 +2026,7 @@ const cr = ({
|
|
|
2016
2026
|
else
|
|
2017
2027
|
h.setAttribute("open", "");
|
|
2018
2028
|
const c = typeof document < "u" ? document.activeElement : null;
|
|
2019
|
-
return (
|
|
2029
|
+
return (g = d.current) == null || g.focus(), () => {
|
|
2020
2030
|
if (h.open)
|
|
2021
2031
|
if (typeof h.close == "function")
|
|
2022
2032
|
try {
|
|
@@ -2046,7 +2056,7 @@ const cr = ({
|
|
|
2046
2056
|
// `jsx-a11y` rules below don't model `<dialog>` as interactive, so
|
|
2047
2057
|
// we silence them locally with the rationale captured here.
|
|
2048
2058
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
2049
|
-
/* @__PURE__ */
|
|
2059
|
+
/* @__PURE__ */ u(
|
|
2050
2060
|
"dialog",
|
|
2051
2061
|
{
|
|
2052
2062
|
ref: l,
|
|
@@ -2060,9 +2070,9 @@ const cr = ({
|
|
|
2060
2070
|
h.target === l.current && t();
|
|
2061
2071
|
},
|
|
2062
2072
|
children: [
|
|
2063
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ u("div", { className: "mes-media-viewer__chrome", children: [
|
|
2064
2074
|
a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
|
|
2065
|
-
/* @__PURE__ */
|
|
2075
|
+
/* @__PURE__ */ u("div", { className: "mes-media-viewer__actions", children: [
|
|
2066
2076
|
r,
|
|
2067
2077
|
/* @__PURE__ */ s(
|
|
2068
2078
|
"button",
|
|
@@ -2087,7 +2097,7 @@ const cr = ({
|
|
|
2087
2097
|
initialIndex: n = 0,
|
|
2088
2098
|
onClose: a
|
|
2089
2099
|
}) => {
|
|
2090
|
-
const { index: r, prev: i, next: o } =
|
|
2100
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2091
2101
|
length: t.length,
|
|
2092
2102
|
initialIndex: n,
|
|
2093
2103
|
open: e
|
|
@@ -2095,8 +2105,8 @@ const cr = ({
|
|
|
2095
2105
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "image"),
|
|
2096
2106
|
[l]
|
|
2097
2107
|
);
|
|
2098
|
-
return l ? /* @__PURE__ */
|
|
2099
|
-
|
|
2108
|
+
return l ? /* @__PURE__ */ u(
|
|
2109
|
+
_t,
|
|
2100
2110
|
{
|
|
2101
2111
|
open: e,
|
|
2102
2112
|
onClose: a,
|
|
@@ -2126,7 +2136,7 @@ const cr = ({
|
|
|
2126
2136
|
`${r}:${l.src}`
|
|
2127
2137
|
),
|
|
2128
2138
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2129
|
-
|
|
2139
|
+
xt,
|
|
2130
2140
|
{
|
|
2131
2141
|
onPrev: i,
|
|
2132
2142
|
onNext: o,
|
|
@@ -2145,25 +2155,25 @@ const cr = ({
|
|
|
2145
2155
|
}) => {
|
|
2146
2156
|
const r = e.length;
|
|
2147
2157
|
if (r === 0) return null;
|
|
2148
|
-
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d,
|
|
2158
|
+
const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, p) => {
|
|
2149
2159
|
const h = k(gr, "h-full w-full");
|
|
2150
|
-
return t ? /* @__PURE__ */
|
|
2160
|
+
return t ? /* @__PURE__ */ u(
|
|
2151
2161
|
"button",
|
|
2152
2162
|
{
|
|
2153
2163
|
type: "button",
|
|
2154
|
-
onClick: () => t(
|
|
2155
|
-
"aria-label": d.ariaLabel ?? `Open media ${
|
|
2164
|
+
onClick: () => t(m),
|
|
2165
|
+
"aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
|
|
2156
2166
|
className: k(h, "cursor-zoom-in"),
|
|
2157
2167
|
children: [
|
|
2158
2168
|
d.content,
|
|
2159
2169
|
p
|
|
2160
2170
|
]
|
|
2161
2171
|
},
|
|
2162
|
-
|
|
2163
|
-
) : /* @__PURE__ */
|
|
2172
|
+
m
|
|
2173
|
+
) : /* @__PURE__ */ u("div", { className: h, children: [
|
|
2164
2174
|
d.content,
|
|
2165
2175
|
p
|
|
2166
|
-
] },
|
|
2176
|
+
] }, m);
|
|
2167
2177
|
};
|
|
2168
2178
|
return i.length === 1 ? /* @__PURE__ */ s("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
|
|
2169
2179
|
"div",
|
|
@@ -2172,9 +2182,9 @@ const cr = ({
|
|
|
2172
2182
|
"grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
|
|
2173
2183
|
a
|
|
2174
2184
|
),
|
|
2175
|
-
children: i.map((d,
|
|
2185
|
+
children: i.map((d, m) => l(d, m))
|
|
2176
2186
|
}
|
|
2177
|
-
) : i.length === 3 ? /* @__PURE__ */
|
|
2187
|
+
) : i.length === 3 ? /* @__PURE__ */ u(
|
|
2178
2188
|
"div",
|
|
2179
2189
|
{
|
|
2180
2190
|
className: k(
|
|
@@ -2194,12 +2204,12 @@ const cr = ({
|
|
|
2194
2204
|
"grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
|
|
2195
2205
|
a
|
|
2196
2206
|
),
|
|
2197
|
-
children: i.map((d,
|
|
2198
|
-
const p = o > 0 &&
|
|
2207
|
+
children: i.map((d, m) => {
|
|
2208
|
+
const p = o > 0 && m === i.length - 1;
|
|
2199
2209
|
return l(
|
|
2200
2210
|
d,
|
|
2201
|
-
|
|
2202
|
-
p ? /* @__PURE__ */
|
|
2211
|
+
m,
|
|
2212
|
+
p ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
|
|
2203
2213
|
"+",
|
|
2204
2214
|
o
|
|
2205
2215
|
] }) : null
|
|
@@ -2239,10 +2249,10 @@ const cr = ({
|
|
|
2239
2249
|
alt: n.alt,
|
|
2240
2250
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2241
2251
|
})), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
2242
|
-
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer:
|
|
2252
|
+
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(
|
|
2243
2253
|
r
|
|
2244
2254
|
);
|
|
2245
|
-
return /* @__PURE__ */
|
|
2255
|
+
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
2246
2256
|
/* @__PURE__ */ s(
|
|
2247
2257
|
"button",
|
|
2248
2258
|
{
|
|
@@ -2270,7 +2280,7 @@ const cr = ({
|
|
|
2270
2280
|
open: o,
|
|
2271
2281
|
items: Is([{ src: e, alt: t }], n),
|
|
2272
2282
|
initialIndex: l,
|
|
2273
|
-
onClose:
|
|
2283
|
+
onClose: m
|
|
2274
2284
|
}
|
|
2275
2285
|
)
|
|
2276
2286
|
] });
|
|
@@ -2285,15 +2295,15 @@ const cr = ({
|
|
|
2285
2295
|
loading: l = "lazy",
|
|
2286
2296
|
onClick: d
|
|
2287
2297
|
}) => {
|
|
2288
|
-
const
|
|
2298
|
+
const m = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Re(
|
|
2289
2299
|
d
|
|
2290
2300
|
);
|
|
2291
|
-
if (
|
|
2301
|
+
if (m.length === 0)
|
|
2292
2302
|
return null;
|
|
2293
|
-
const
|
|
2294
|
-
(
|
|
2303
|
+
const x = m.map(
|
|
2304
|
+
(v, f) => pr(v, f, m.length, l)
|
|
2295
2305
|
);
|
|
2296
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ u(
|
|
2297
2307
|
Te,
|
|
2298
2308
|
{
|
|
2299
2309
|
variant: p,
|
|
@@ -2301,14 +2311,14 @@ const cr = ({
|
|
|
2301
2311
|
groupPosition: o,
|
|
2302
2312
|
"data-testid": "image-attachment",
|
|
2303
2313
|
children: [
|
|
2304
|
-
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles:
|
|
2314
|
+
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: x, onTileActivate: c }) }),
|
|
2305
2315
|
/* @__PURE__ */ s(
|
|
2306
2316
|
Ss,
|
|
2307
2317
|
{
|
|
2308
2318
|
open: h,
|
|
2309
|
-
items: Is(
|
|
2310
|
-
initialIndex:
|
|
2311
|
-
onClose:
|
|
2319
|
+
items: Is(m, a),
|
|
2320
|
+
initialIndex: g,
|
|
2321
|
+
onClose: b
|
|
2312
2322
|
}
|
|
2313
2323
|
)
|
|
2314
2324
|
]
|
|
@@ -2324,19 +2334,19 @@ const cr = ({
|
|
|
2324
2334
|
initialIndex: n = 0,
|
|
2325
2335
|
onClose: a
|
|
2326
2336
|
}) => {
|
|
2327
|
-
const { index: r, prev: i, next: o } =
|
|
2337
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2328
2338
|
length: t.length,
|
|
2329
2339
|
initialIndex: n,
|
|
2330
2340
|
open: e
|
|
2331
2341
|
}), l = t[r], d = se(
|
|
2332
2342
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
|
|
2333
2343
|
[l]
|
|
2334
|
-
),
|
|
2344
|
+
), m = se(
|
|
2335
2345
|
() => l ? kr(l.src) : void 0,
|
|
2336
2346
|
[l]
|
|
2337
2347
|
);
|
|
2338
|
-
return !l || !
|
|
2339
|
-
|
|
2348
|
+
return !l || !m ? null : /* @__PURE__ */ u(
|
|
2349
|
+
_t,
|
|
2340
2350
|
{
|
|
2341
2351
|
open: e,
|
|
2342
2352
|
onClose: a,
|
|
@@ -2347,7 +2357,7 @@ const cr = ({
|
|
|
2347
2357
|
/* @__PURE__ */ s(
|
|
2348
2358
|
"iframe",
|
|
2349
2359
|
{
|
|
2350
|
-
src:
|
|
2360
|
+
src: m,
|
|
2351
2361
|
title: d,
|
|
2352
2362
|
className: "mes-media-viewer__iframe",
|
|
2353
2363
|
sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
|
|
@@ -2355,7 +2365,7 @@ const cr = ({
|
|
|
2355
2365
|
`${r}:${l.src}`
|
|
2356
2366
|
),
|
|
2357
2367
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2358
|
-
|
|
2368
|
+
xt,
|
|
2359
2369
|
{
|
|
2360
2370
|
onPrev: i,
|
|
2361
2371
|
onNext: o,
|
|
@@ -2396,7 +2406,7 @@ const cr = ({
|
|
|
2396
2406
|
trailingAction: r
|
|
2397
2407
|
}
|
|
2398
2408
|
);
|
|
2399
|
-
},
|
|
2409
|
+
}, Nt = ({
|
|
2400
2410
|
state: e,
|
|
2401
2411
|
src: t,
|
|
2402
2412
|
filename: n,
|
|
@@ -2406,18 +2416,18 @@ const cr = ({
|
|
|
2406
2416
|
text: o,
|
|
2407
2417
|
groupPosition: l,
|
|
2408
2418
|
onClick: d,
|
|
2409
|
-
onDismiss:
|
|
2419
|
+
onDismiss: m
|
|
2410
2420
|
}) => {
|
|
2411
|
-
const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen:
|
|
2421
|
+
const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
|
|
2412
2422
|
d
|
|
2413
|
-
),
|
|
2423
|
+
), v = e === "composer" && !!m;
|
|
2414
2424
|
if (h.length === 0)
|
|
2415
2425
|
return null;
|
|
2416
|
-
const
|
|
2417
|
-
src:
|
|
2418
|
-
filename:
|
|
2426
|
+
const f = h.map((N) => ({
|
|
2427
|
+
src: N.src,
|
|
2428
|
+
filename: N.filename ?? re(N.src)
|
|
2419
2429
|
}));
|
|
2420
|
-
return /* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ u(
|
|
2421
2431
|
Te,
|
|
2422
2432
|
{
|
|
2423
2433
|
variant: p,
|
|
@@ -2425,11 +2435,11 @@ const cr = ({
|
|
|
2425
2435
|
groupPosition: l,
|
|
2426
2436
|
"data-testid": "pdf-attachment",
|
|
2427
2437
|
children: [
|
|
2428
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
2429
|
-
const C =
|
|
2438
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((N, w) => {
|
|
2439
|
+
const C = N.filename ?? re(N.src), R = v && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2430
2440
|
Cs,
|
|
2431
2441
|
{
|
|
2432
|
-
url:
|
|
2442
|
+
url: N.src,
|
|
2433
2443
|
filename: C,
|
|
2434
2444
|
variant: "inline",
|
|
2435
2445
|
label: `Download ${C}`,
|
|
@@ -2440,27 +2450,27 @@ const cr = ({
|
|
|
2440
2450
|
Sr,
|
|
2441
2451
|
{
|
|
2442
2452
|
variant: p,
|
|
2443
|
-
item:
|
|
2444
|
-
index:
|
|
2445
|
-
onActivate:
|
|
2446
|
-
trailingAction:
|
|
2453
|
+
item: N,
|
|
2454
|
+
index: w,
|
|
2455
|
+
onActivate: b,
|
|
2456
|
+
trailingAction: R
|
|
2447
2457
|
},
|
|
2448
|
-
`${
|
|
2458
|
+
`${N.src}-${w}`
|
|
2449
2459
|
);
|
|
2450
2460
|
}) }),
|
|
2451
2461
|
/* @__PURE__ */ s(
|
|
2452
2462
|
yr,
|
|
2453
2463
|
{
|
|
2454
|
-
open:
|
|
2455
|
-
items:
|
|
2464
|
+
open: g,
|
|
2465
|
+
items: f,
|
|
2456
2466
|
initialIndex: c,
|
|
2457
|
-
onClose:
|
|
2467
|
+
onClose: x
|
|
2458
2468
|
}
|
|
2459
2469
|
)
|
|
2460
2470
|
]
|
|
2461
2471
|
}
|
|
2462
2472
|
);
|
|
2463
|
-
}, Er = (e) => /* @__PURE__ */ s(
|
|
2473
|
+
}, Er = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Ar = {
|
|
2464
2474
|
Composer: Er,
|
|
2465
2475
|
Sent: Ir,
|
|
2466
2476
|
Received: Tr
|
|
@@ -2470,7 +2480,7 @@ const cr = ({
|
|
|
2470
2480
|
initialIndex: n = 0,
|
|
2471
2481
|
onClose: a
|
|
2472
2482
|
}) => {
|
|
2473
|
-
const { index: r, prev: i, next: o } =
|
|
2483
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2474
2484
|
length: t.length,
|
|
2475
2485
|
initialIndex: n,
|
|
2476
2486
|
open: e
|
|
@@ -2478,8 +2488,8 @@ const cr = ({
|
|
|
2478
2488
|
() => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "video"),
|
|
2479
2489
|
[l]
|
|
2480
2490
|
);
|
|
2481
|
-
return l ? /* @__PURE__ */
|
|
2482
|
-
|
|
2491
|
+
return l ? /* @__PURE__ */ u(
|
|
2492
|
+
_t,
|
|
2483
2493
|
{
|
|
2484
2494
|
open: e,
|
|
2485
2495
|
onClose: a,
|
|
@@ -2503,7 +2513,7 @@ const cr = ({
|
|
|
2503
2513
|
`${r}:${l.src}`
|
|
2504
2514
|
),
|
|
2505
2515
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2506
|
-
|
|
2516
|
+
xt,
|
|
2507
2517
|
{
|
|
2508
2518
|
onPrev: i,
|
|
2509
2519
|
onNext: o,
|
|
@@ -2514,10 +2524,10 @@ const cr = ({
|
|
|
2514
2524
|
]
|
|
2515
2525
|
}
|
|
2516
2526
|
) : null;
|
|
2517
|
-
}, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(
|
|
2527
|
+
}, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
|
|
2518
2528
|
item: e,
|
|
2519
2529
|
index: t
|
|
2520
|
-
}) => /* @__PURE__ */
|
|
2530
|
+
}) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
2521
2531
|
e.poster ? /* @__PURE__ */ s(
|
|
2522
2532
|
"img",
|
|
2523
2533
|
{
|
|
@@ -2553,15 +2563,15 @@ const cr = ({
|
|
|
2553
2563
|
preload: n.preload,
|
|
2554
2564
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
2555
2565
|
})), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
2556
|
-
const { viewerOpen: l, viewerIndex: d, handleActivate:
|
|
2566
|
+
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: p } = Re(
|
|
2557
2567
|
i
|
|
2558
2568
|
);
|
|
2559
|
-
return /* @__PURE__ */
|
|
2569
|
+
return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
|
|
2560
2570
|
/* @__PURE__ */ s(
|
|
2561
2571
|
"button",
|
|
2562
2572
|
{
|
|
2563
2573
|
type: "button",
|
|
2564
|
-
onClick: () =>
|
|
2574
|
+
onClick: () => m(0),
|
|
2565
2575
|
"aria-label": "Play video",
|
|
2566
2576
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
2567
2577
|
children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
|
|
@@ -2591,17 +2601,17 @@ const cr = ({
|
|
|
2591
2601
|
text: o,
|
|
2592
2602
|
groupPosition: l,
|
|
2593
2603
|
preload: d,
|
|
2594
|
-
onClick:
|
|
2604
|
+
onClick: m
|
|
2595
2605
|
}) => {
|
|
2596
|
-
const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen:
|
|
2597
|
-
|
|
2606
|
+
const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
|
|
2607
|
+
m
|
|
2598
2608
|
);
|
|
2599
2609
|
if (p.length === 0)
|
|
2600
2610
|
return null;
|
|
2601
|
-
const
|
|
2602
|
-
(
|
|
2611
|
+
const v = p.map(
|
|
2612
|
+
(f, N) => Rr(f, N, p.length)
|
|
2603
2613
|
);
|
|
2604
|
-
return /* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ u(
|
|
2605
2615
|
Te,
|
|
2606
2616
|
{
|
|
2607
2617
|
variant: h,
|
|
@@ -2612,18 +2622,18 @@ const cr = ({
|
|
|
2612
2622
|
/* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
|
|
2613
2623
|
Es,
|
|
2614
2624
|
{
|
|
2615
|
-
tiles:
|
|
2616
|
-
onTileActivate:
|
|
2625
|
+
tiles: v,
|
|
2626
|
+
onTileActivate: b,
|
|
2617
2627
|
className: "overflow-hidden rounded-md"
|
|
2618
2628
|
}
|
|
2619
2629
|
) }),
|
|
2620
2630
|
/* @__PURE__ */ s(
|
|
2621
2631
|
As,
|
|
2622
2632
|
{
|
|
2623
|
-
open:
|
|
2633
|
+
open: g,
|
|
2624
2634
|
items: Rs(p, r),
|
|
2625
2635
|
initialIndex: c,
|
|
2626
|
-
onClose:
|
|
2636
|
+
onClose: x
|
|
2627
2637
|
}
|
|
2628
2638
|
)
|
|
2629
2639
|
]
|
|
@@ -2643,7 +2653,7 @@ const cr = ({
|
|
|
2643
2653
|
isUnlocking: () => !1
|
|
2644
2654
|
}, Br = {
|
|
2645
2655
|
LockedAttachment: $r
|
|
2646
|
-
}, Ls =
|
|
2656
|
+
}, Ls = lt({}), cl = Ls.Provider;
|
|
2647
2657
|
function Ur(e) {
|
|
2648
2658
|
return Ie(Ls)[e] ?? Br[e];
|
|
2649
2659
|
}
|
|
@@ -2690,31 +2700,31 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2690
2700
|
if (!r && !i)
|
|
2691
2701
|
return null;
|
|
2692
2702
|
if (r) {
|
|
2693
|
-
const
|
|
2694
|
-
if (!
|
|
2695
|
-
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip",
|
|
2696
|
-
return /* @__PURE__ */
|
|
2703
|
+
const g = (h = e.metadata) == null ? void 0 : h.amount_text;
|
|
2704
|
+
if (!g) return null;
|
|
2705
|
+
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
|
|
2706
|
+
return /* @__PURE__ */ u("div", { className: c, children: [
|
|
2697
2707
|
/* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
|
|
2698
|
-
/* @__PURE__ */ s("span", { children:
|
|
2708
|
+
/* @__PURE__ */ s("span", { children: b })
|
|
2699
2709
|
] });
|
|
2700
2710
|
}
|
|
2701
2711
|
const o = n && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
|
|
2702
2712
|
"message-chatbot-indicator",
|
|
2703
2713
|
n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
2704
2714
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
2705
|
-
].join(" "),
|
|
2706
|
-
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */
|
|
2707
|
-
|
|
2715
|
+
].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
|
|
2716
|
+
return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(te, { children: [
|
|
2717
|
+
m,
|
|
2708
2718
|
p
|
|
2709
|
-
] }) : /* @__PURE__ */
|
|
2719
|
+
] }) : /* @__PURE__ */ u(te, { children: [
|
|
2710
2720
|
p,
|
|
2711
|
-
|
|
2721
|
+
m
|
|
2712
2722
|
] }) });
|
|
2713
2723
|
}, qr = ({
|
|
2714
2724
|
selected: e,
|
|
2715
2725
|
onVoteUp: t,
|
|
2716
2726
|
onVoteDown: n
|
|
2717
|
-
}) => /* @__PURE__ */
|
|
2727
|
+
}) => /* @__PURE__ */ u("div", { className: "message-vote-buttons", children: [
|
|
2718
2728
|
/* @__PURE__ */ s(
|
|
2719
2729
|
"button",
|
|
2720
2730
|
{
|
|
@@ -2752,7 +2762,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2752
2762
|
if (((o = t[l].user) == null ? void 0 : o.id) === a) return t[l].id;
|
|
2753
2763
|
}
|
|
2754
2764
|
}, [t, a]);
|
|
2755
|
-
return e.id !== r ? null : /* @__PURE__ */
|
|
2765
|
+
return e.id !== r ? null : /* @__PURE__ */ u(te, { children: [
|
|
2756
2766
|
/* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
|
|
2757
2767
|
/* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
2758
2768
|
] });
|
|
@@ -2765,7 +2775,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
|
2765
2775
|
MessageSendingStatus: Wr
|
|
2766
2776
|
}
|
|
2767
2777
|
), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2768
|
-
function
|
|
2778
|
+
function yt(e) {
|
|
2769
2779
|
if (typeof e != "string") return;
|
|
2770
2780
|
const t = e.trim();
|
|
2771
2781
|
if (t === "") return;
|
|
@@ -2783,7 +2793,7 @@ const Zr = {
|
|
|
2783
2793
|
const n = k(
|
|
2784
2794
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2785
2795
|
Zr[e]
|
|
2786
|
-
), a =
|
|
2796
|
+
), a = yt(t.href);
|
|
2787
2797
|
return a ? /* @__PURE__ */ s(
|
|
2788
2798
|
"a",
|
|
2789
2799
|
{
|
|
@@ -2815,7 +2825,7 @@ const Zr = {
|
|
|
2815
2825
|
}, ti = "text-white/30", si = {
|
|
2816
2826
|
dark: "text-white/55",
|
|
2817
2827
|
light: "text-black/55"
|
|
2818
|
-
},
|
|
2828
|
+
}, kt = ({
|
|
2819
2829
|
variant: e,
|
|
2820
2830
|
title: t,
|
|
2821
2831
|
placeholderTitle: n,
|
|
@@ -2825,26 +2835,26 @@ const Zr = {
|
|
|
2825
2835
|
cta: o,
|
|
2826
2836
|
trailingAction: l
|
|
2827
2837
|
}) => {
|
|
2828
|
-
const d = e === "dark",
|
|
2829
|
-
if (!p && !h && !c && !
|
|
2830
|
-
const
|
|
2838
|
+
const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", p = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
|
|
2839
|
+
if (!p && !h && !c && !b) return null;
|
|
2840
|
+
const v = k(
|
|
2831
2841
|
"truncate text-base font-medium leading-6",
|
|
2832
2842
|
d && !t ? ti : ei[e]
|
|
2833
|
-
),
|
|
2843
|
+
), f = k(
|
|
2834
2844
|
"truncate text-xs leading-4",
|
|
2835
2845
|
si[e]
|
|
2836
2846
|
);
|
|
2837
|
-
return /* @__PURE__ */
|
|
2838
|
-
/* @__PURE__ */
|
|
2839
|
-
/* @__PURE__ */
|
|
2840
|
-
/* @__PURE__ */
|
|
2841
|
-
p && /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
|
|
2848
|
+
/* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
|
|
2849
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
2850
|
+
/* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
2851
|
+
p && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2842
2852
|
i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
|
|
2843
|
-
/* @__PURE__ */ s("p", { className: k("min-w-0",
|
|
2853
|
+
/* @__PURE__ */ s("p", { className: k("min-w-0", v), children: m })
|
|
2844
2854
|
] }),
|
|
2845
|
-
h && /* @__PURE__ */ s("p", { className:
|
|
2855
|
+
h && /* @__PURE__ */ s("p", { className: f, children: a })
|
|
2846
2856
|
] }),
|
|
2847
|
-
!
|
|
2857
|
+
!b && c && /* @__PURE__ */ s("p", { className: f, children: g })
|
|
2848
2858
|
] }),
|
|
2849
2859
|
l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
|
|
2850
2860
|
] }),
|
|
@@ -2868,15 +2878,15 @@ const Zr = {
|
|
|
2868
2878
|
bgClassName: l,
|
|
2869
2879
|
"data-testid": d
|
|
2870
2880
|
}) => {
|
|
2871
|
-
const
|
|
2881
|
+
const m = n != null || a != null, p = k(
|
|
2872
2882
|
ni,
|
|
2873
2883
|
l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
|
|
2874
2884
|
// `focus-ring` is a design-system utility from the component-library
|
|
2875
2885
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
2876
2886
|
// with offset, so keyboard users can see the focused card.
|
|
2877
|
-
|
|
2887
|
+
m ? "cursor-pointer no-underline focus-ring" : null
|
|
2878
2888
|
), h = o ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
|
|
2879
|
-
return n ? /* @__PURE__ */
|
|
2889
|
+
return n ? /* @__PURE__ */ u(
|
|
2880
2890
|
"a",
|
|
2881
2891
|
{
|
|
2882
2892
|
ref: i,
|
|
@@ -2891,7 +2901,7 @@ const Zr = {
|
|
|
2891
2901
|
h
|
|
2892
2902
|
]
|
|
2893
2903
|
}
|
|
2894
|
-
) : a ? /* @__PURE__ */
|
|
2904
|
+
) : a ? /* @__PURE__ */ u(
|
|
2895
2905
|
"button",
|
|
2896
2906
|
{
|
|
2897
2907
|
ref: i,
|
|
@@ -2905,7 +2915,7 @@ const Zr = {
|
|
|
2905
2915
|
h
|
|
2906
2916
|
]
|
|
2907
2917
|
}
|
|
2908
|
-
) : /* @__PURE__ */
|
|
2918
|
+
) : /* @__PURE__ */ u(
|
|
2909
2919
|
"div",
|
|
2910
2920
|
{
|
|
2911
2921
|
ref: i,
|
|
@@ -2923,11 +2933,11 @@ const Zr = {
|
|
|
2923
2933
|
}, ri = {
|
|
2924
2934
|
dark: "size-16 text-white/25",
|
|
2925
2935
|
light: "size-16 text-black/25"
|
|
2926
|
-
}, Ve = (e, t) => !!t && !!e && ce(e) === "audio",
|
|
2936
|
+
}, Ve = (e, t) => !!t && !!e && ce(e) === "audio", Ct = (e, t) => {
|
|
2927
2937
|
if (!t || !e) return !1;
|
|
2928
2938
|
const n = ce(e);
|
|
2929
2939
|
return n === "video" || n === "audio";
|
|
2930
|
-
},
|
|
2940
|
+
}, St = "bg-[#F2F3F4]", $e = ({
|
|
2931
2941
|
variant: e,
|
|
2932
2942
|
thumbnailUrl: t,
|
|
2933
2943
|
sourceUrl: n,
|
|
@@ -2946,7 +2956,7 @@ const Zr = {
|
|
|
2946
2956
|
className: "block w-full",
|
|
2947
2957
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
2948
2958
|
}
|
|
2949
|
-
) }) : /* @__PURE__ */
|
|
2959
|
+
) }) : /* @__PURE__ */ u(
|
|
2950
2960
|
"div",
|
|
2951
2961
|
{
|
|
2952
2962
|
className: k(
|
|
@@ -3001,11 +3011,11 @@ const Zr = {
|
|
|
3001
3011
|
sourceUrl: o,
|
|
3002
3012
|
layout: l = "featured",
|
|
3003
3013
|
appIcon: d,
|
|
3004
|
-
cta:
|
|
3014
|
+
cta: m,
|
|
3005
3015
|
onDismiss: p,
|
|
3006
3016
|
onEditClick: h
|
|
3007
3017
|
}) => {
|
|
3008
|
-
const
|
|
3018
|
+
const g = l === "classic", c = Ve(r, o), b = p ? /* @__PURE__ */ s(
|
|
3009
3019
|
"button",
|
|
3010
3020
|
{
|
|
3011
3021
|
type: "button",
|
|
@@ -3014,7 +3024,7 @@ const Zr = {
|
|
|
3014
3024
|
className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
|
|
3015
3025
|
children: /* @__PURE__ */ s(Ue, { className: "size-3", weight: "bold" })
|
|
3016
3026
|
}
|
|
3017
|
-
) : void 0,
|
|
3027
|
+
) : void 0, x = h ? /* @__PURE__ */ s(
|
|
3018
3028
|
"button",
|
|
3019
3029
|
{
|
|
3020
3030
|
type: "button",
|
|
@@ -3024,7 +3034,7 @@ const Zr = {
|
|
|
3024
3034
|
children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
|
|
3025
3035
|
}
|
|
3026
3036
|
) : void 0;
|
|
3027
|
-
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName:
|
|
3037
|
+
return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3028
3038
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3029
3039
|
$e,
|
|
3030
3040
|
{
|
|
@@ -3034,14 +3044,14 @@ const Zr = {
|
|
|
3034
3044
|
mimeType: r
|
|
3035
3045
|
}
|
|
3036
3046
|
) }),
|
|
3037
|
-
|
|
3038
|
-
] }) }) : /* @__PURE__ */
|
|
3047
|
+
b && /* @__PURE__ */ s("div", { className: "shrink-0", children: b })
|
|
3048
|
+
] }) }) : /* @__PURE__ */ u(
|
|
3039
3049
|
Oe,
|
|
3040
3050
|
{
|
|
3041
3051
|
variant: "dark",
|
|
3042
|
-
topRight:
|
|
3052
|
+
topRight: g ? b : void 0,
|
|
3043
3053
|
children: [
|
|
3044
|
-
!
|
|
3054
|
+
!g && /* @__PURE__ */ s(
|
|
3045
3055
|
$e,
|
|
3046
3056
|
{
|
|
3047
3057
|
variant: "dark",
|
|
@@ -3049,11 +3059,11 @@ const Zr = {
|
|
|
3049
3059
|
sourceUrl: o,
|
|
3050
3060
|
title: e,
|
|
3051
3061
|
mimeType: r,
|
|
3052
|
-
topRight:
|
|
3062
|
+
topRight: b
|
|
3053
3063
|
}
|
|
3054
3064
|
),
|
|
3055
3065
|
/* @__PURE__ */ s(
|
|
3056
|
-
|
|
3066
|
+
kt,
|
|
3057
3067
|
{
|
|
3058
3068
|
variant: "dark",
|
|
3059
3069
|
title: e,
|
|
@@ -3061,8 +3071,8 @@ const Zr = {
|
|
|
3061
3071
|
description: n,
|
|
3062
3072
|
url: a,
|
|
3063
3073
|
appIcon: d,
|
|
3064
|
-
cta:
|
|
3065
|
-
trailingAction:
|
|
3074
|
+
cta: m,
|
|
3075
|
+
trailingAction: x
|
|
3066
3076
|
}
|
|
3067
3077
|
)
|
|
3068
3078
|
]
|
|
@@ -3078,23 +3088,23 @@ const Zr = {
|
|
|
3078
3088
|
layout: o = "featured",
|
|
3079
3089
|
appIcon: l,
|
|
3080
3090
|
cta: d,
|
|
3081
|
-
onClick:
|
|
3091
|
+
onClick: m
|
|
3082
3092
|
}) => {
|
|
3083
|
-
const p =
|
|
3093
|
+
const p = Ct(a, i), h = yt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? m : void 0, b = Ve(a, i) ? St : void 0, x = d && m ? {
|
|
3084
3094
|
...d,
|
|
3085
3095
|
onClick: () => {
|
|
3086
|
-
var
|
|
3087
|
-
|
|
3096
|
+
var v;
|
|
3097
|
+
m(), (v = d.onClick) == null || v.call(d);
|
|
3088
3098
|
}
|
|
3089
3099
|
} : d;
|
|
3090
|
-
return /* @__PURE__ */
|
|
3100
|
+
return /* @__PURE__ */ u(
|
|
3091
3101
|
Oe,
|
|
3092
3102
|
{
|
|
3093
3103
|
variant: "light",
|
|
3094
|
-
href:
|
|
3104
|
+
href: g,
|
|
3095
3105
|
onClick: c,
|
|
3096
3106
|
ariaLabel: e ?? "Open attachment preview",
|
|
3097
|
-
bgClassName:
|
|
3107
|
+
bgClassName: b,
|
|
3098
3108
|
"data-testid": "link-attachment",
|
|
3099
3109
|
children: [
|
|
3100
3110
|
o === "featured" && /* @__PURE__ */ s(
|
|
@@ -3108,14 +3118,14 @@ const Zr = {
|
|
|
3108
3118
|
}
|
|
3109
3119
|
),
|
|
3110
3120
|
/* @__PURE__ */ s(
|
|
3111
|
-
|
|
3121
|
+
kt,
|
|
3112
3122
|
{
|
|
3113
3123
|
variant: "light",
|
|
3114
3124
|
title: e,
|
|
3115
3125
|
description: t,
|
|
3116
3126
|
url: n,
|
|
3117
3127
|
appIcon: l,
|
|
3118
|
-
cta:
|
|
3128
|
+
cta: x
|
|
3119
3129
|
}
|
|
3120
3130
|
)
|
|
3121
3131
|
]
|
|
@@ -3131,17 +3141,17 @@ const Zr = {
|
|
|
3131
3141
|
sourceUrl: o,
|
|
3132
3142
|
layout: l = "featured",
|
|
3133
3143
|
appIcon: d,
|
|
3134
|
-
cta:
|
|
3144
|
+
cta: m,
|
|
3135
3145
|
onClick: p
|
|
3136
3146
|
}) => {
|
|
3137
|
-
const h =
|
|
3138
|
-
return /* @__PURE__ */
|
|
3147
|
+
const h = Ct(r, o), g = yt(a), c = m == null && g != null && !h ? g : void 0, b = m == null && !h && c != null ? p : void 0;
|
|
3148
|
+
return /* @__PURE__ */ u(
|
|
3139
3149
|
Oe,
|
|
3140
3150
|
{
|
|
3141
3151
|
variant: "dark",
|
|
3142
3152
|
href: c,
|
|
3143
|
-
onClick:
|
|
3144
|
-
bgClassName: Ve(r, o) ?
|
|
3153
|
+
onClick: b,
|
|
3154
|
+
bgClassName: Ve(r, o) ? St : void 0,
|
|
3145
3155
|
children: [
|
|
3146
3156
|
l === "featured" && /* @__PURE__ */ s(
|
|
3147
3157
|
$e,
|
|
@@ -3154,7 +3164,7 @@ const Zr = {
|
|
|
3154
3164
|
}
|
|
3155
3165
|
),
|
|
3156
3166
|
/* @__PURE__ */ s(
|
|
3157
|
-
|
|
3167
|
+
kt,
|
|
3158
3168
|
{
|
|
3159
3169
|
variant: "dark",
|
|
3160
3170
|
title: e,
|
|
@@ -3162,7 +3172,7 @@ const Zr = {
|
|
|
3162
3172
|
description: n,
|
|
3163
3173
|
url: a,
|
|
3164
3174
|
appIcon: d,
|
|
3165
|
-
cta:
|
|
3175
|
+
cta: m
|
|
3166
3176
|
}
|
|
3167
3177
|
)
|
|
3168
3178
|
]
|
|
@@ -3172,7 +3182,7 @@ const Zr = {
|
|
|
3172
3182
|
Composer: ii,
|
|
3173
3183
|
Sent: oi,
|
|
3174
3184
|
Received: li
|
|
3175
|
-
}
|
|
3185
|
+
};
|
|
3176
3186
|
function P(e) {
|
|
3177
3187
|
const t = e == null ? void 0 : e.trim();
|
|
3178
3188
|
return t || void 0;
|
|
@@ -3180,7 +3190,7 @@ function P(e) {
|
|
|
3180
3190
|
function ts(e) {
|
|
3181
3191
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3182
3192
|
}
|
|
3183
|
-
function
|
|
3193
|
+
function ci(e, t) {
|
|
3184
3194
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3185
3195
|
return !1;
|
|
3186
3196
|
const n = ts(e), a = ts(t);
|
|
@@ -3201,11 +3211,11 @@ function ss(e) {
|
|
|
3201
3211
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3202
3212
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3203
3213
|
sourceUrl: a,
|
|
3204
|
-
layout: n ||
|
|
3214
|
+
layout: n || Ct(r, a) ? "featured" : "classic",
|
|
3205
3215
|
mimeType: r
|
|
3206
3216
|
};
|
|
3207
3217
|
}
|
|
3208
|
-
function
|
|
3218
|
+
function di(e) {
|
|
3209
3219
|
var t;
|
|
3210
3220
|
return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3211
3221
|
}
|
|
@@ -3235,27 +3245,21 @@ function Fs(e) {
|
|
|
3235
3245
|
a(r);
|
|
3236
3246
|
continue;
|
|
3237
3247
|
}
|
|
3238
|
-
const i =
|
|
3248
|
+
const i = di(r);
|
|
3239
3249
|
i && n(i, r);
|
|
3240
3250
|
}
|
|
3241
3251
|
return t;
|
|
3242
3252
|
}
|
|
3243
|
-
function
|
|
3244
|
-
let t = 0;
|
|
3245
|
-
for (const n of e)
|
|
3246
|
-
t += n.type === "link" ? n.attachments.length : 1;
|
|
3247
|
-
return t;
|
|
3248
|
-
}
|
|
3249
|
-
function fi(e) {
|
|
3253
|
+
function ui(e) {
|
|
3250
3254
|
return e.filter((t) => t.type === "media").length;
|
|
3251
3255
|
}
|
|
3252
|
-
function
|
|
3256
|
+
function mi(e, t, n) {
|
|
3253
3257
|
return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3254
3258
|
}
|
|
3255
3259
|
function ns(e) {
|
|
3256
3260
|
return P(e.image_url) ?? P(e.asset_url) ?? "";
|
|
3257
3261
|
}
|
|
3258
|
-
function
|
|
3262
|
+
function hi(e) {
|
|
3259
3263
|
switch (e) {
|
|
3260
3264
|
case "image":
|
|
3261
3265
|
return ye.Image;
|
|
@@ -3269,7 +3273,7 @@ function pi(e) {
|
|
|
3269
3273
|
return ye.File;
|
|
3270
3274
|
}
|
|
3271
3275
|
}
|
|
3272
|
-
function
|
|
3276
|
+
function fi(e, t) {
|
|
3273
3277
|
if (t.length > 1)
|
|
3274
3278
|
switch (e) {
|
|
3275
3279
|
case "image":
|
|
@@ -3356,69 +3360,90 @@ function bi(e, t) {
|
|
|
3356
3360
|
};
|
|
3357
3361
|
}
|
|
3358
3362
|
}
|
|
3359
|
-
function
|
|
3363
|
+
function gi({
|
|
3360
3364
|
groupPosition: e,
|
|
3361
3365
|
isMyMessage: t,
|
|
3362
|
-
segment: n
|
|
3363
|
-
text: a
|
|
3366
|
+
segment: n
|
|
3364
3367
|
}) {
|
|
3365
|
-
const
|
|
3366
|
-
...
|
|
3367
|
-
groupPosition: e
|
|
3368
|
-
...a ? { text: a } : {}
|
|
3368
|
+
const a = hi(n.kind), r = {
|
|
3369
|
+
...fi(n.kind, n.attachments),
|
|
3370
|
+
groupPosition: e
|
|
3369
3371
|
};
|
|
3370
|
-
return t ? /* @__PURE__ */ s(
|
|
3372
|
+
return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
|
|
3371
3373
|
}
|
|
3372
|
-
const
|
|
3374
|
+
const pi = ({
|
|
3373
3375
|
groupPosition: e,
|
|
3374
3376
|
isMyMessage: t,
|
|
3375
|
-
message: n
|
|
3377
|
+
message: n,
|
|
3378
|
+
renderText: a
|
|
3376
3379
|
}) => {
|
|
3377
|
-
var
|
|
3378
|
-
const
|
|
3379
|
-
if (
|
|
3380
|
-
const
|
|
3381
|
-
let p = 0
|
|
3382
|
-
const
|
|
3383
|
-
const
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
f.push(
|
|
3387
|
-
/* @__PURE__ */ m(V.Fragment, { children: [
|
|
3388
|
-
/* @__PURE__ */ s(N, { ...ss(b) }),
|
|
3389
|
-
x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
|
|
3390
|
-
] }, g)
|
|
3380
|
+
var b;
|
|
3381
|
+
const r = Fs(n.attachments);
|
|
3382
|
+
if (r.length === 0) return null;
|
|
3383
|
+
const i = ui(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, m = o && ci(o, d) ? void 0 : o;
|
|
3384
|
+
let p = 0;
|
|
3385
|
+
const h = [], g = (x, v) => {
|
|
3386
|
+
const f = t ? es.Sent : es.Received;
|
|
3387
|
+
h.push(
|
|
3388
|
+
/* @__PURE__ */ s(f, { ...ss(x) }, v)
|
|
3391
3389
|
);
|
|
3392
|
-
},
|
|
3393
|
-
const
|
|
3394
|
-
|
|
3390
|
+
}, c = (x, v) => {
|
|
3391
|
+
const f = mi(
|
|
3392
|
+
p,
|
|
3395
3393
|
i,
|
|
3396
3394
|
e
|
|
3397
3395
|
);
|
|
3398
|
-
p += 1, h
|
|
3396
|
+
p += 1, h.push(
|
|
3399
3397
|
/* @__PURE__ */ s(
|
|
3400
|
-
|
|
3398
|
+
gi,
|
|
3401
3399
|
{
|
|
3402
|
-
groupPosition:
|
|
3400
|
+
groupPosition: f,
|
|
3403
3401
|
isMyMessage: t,
|
|
3404
|
-
segment:
|
|
3405
|
-
text: x ? u : void 0
|
|
3402
|
+
segment: x
|
|
3406
3403
|
},
|
|
3407
|
-
|
|
3404
|
+
v
|
|
3408
3405
|
)
|
|
3409
3406
|
);
|
|
3410
3407
|
};
|
|
3411
|
-
return
|
|
3412
|
-
if (
|
|
3413
|
-
|
|
3414
|
-
|
|
3408
|
+
return r.forEach((x, v) => {
|
|
3409
|
+
if (x.type === "link") {
|
|
3410
|
+
x.attachments.forEach((f, N) => {
|
|
3411
|
+
g(f, `link-${v}-${N}`);
|
|
3415
3412
|
});
|
|
3416
3413
|
return;
|
|
3417
3414
|
}
|
|
3418
|
-
|
|
3419
|
-
}), /* @__PURE__ */
|
|
3420
|
-
|
|
3421
|
-
|
|
3415
|
+
c(x, `media-${v}`);
|
|
3416
|
+
}), /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3417
|
+
/* @__PURE__ */ u(
|
|
3418
|
+
"div",
|
|
3419
|
+
{
|
|
3420
|
+
className: "str-chat__message-bubble",
|
|
3421
|
+
"data-attachment-bubble": "true",
|
|
3422
|
+
style: {
|
|
3423
|
+
background: "transparent",
|
|
3424
|
+
borderRadius: 0,
|
|
3425
|
+
overflow: "visible",
|
|
3426
|
+
padding: 0
|
|
3427
|
+
},
|
|
3428
|
+
children: [
|
|
3429
|
+
h,
|
|
3430
|
+
!m && /* @__PURE__ */ s(et, {})
|
|
3431
|
+
]
|
|
3432
|
+
}
|
|
3433
|
+
),
|
|
3434
|
+
m ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
|
|
3435
|
+
/* @__PURE__ */ s(
|
|
3436
|
+
tt,
|
|
3437
|
+
{
|
|
3438
|
+
message: n,
|
|
3439
|
+
renderText: a
|
|
3440
|
+
}
|
|
3441
|
+
),
|
|
3442
|
+
/* @__PURE__ */ s(et, {})
|
|
3443
|
+
] }) : null
|
|
3444
|
+
] });
|
|
3445
|
+
}, bi = (e) => {
|
|
3446
|
+
var Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt, Gt, Ht;
|
|
3422
3447
|
const {
|
|
3423
3448
|
additionalMessageInputProps: t,
|
|
3424
3449
|
chatbotVotingEnabled: n,
|
|
@@ -3428,41 +3453,41 @@ const xi = ({
|
|
|
3428
3453
|
groupedByUser: o,
|
|
3429
3454
|
handleAction: l,
|
|
3430
3455
|
handleOpenThread: d,
|
|
3431
|
-
handleRetry:
|
|
3456
|
+
handleRetry: m,
|
|
3432
3457
|
highlighted: p,
|
|
3433
3458
|
isMessageAIGenerated: h,
|
|
3434
|
-
isMyMessage:
|
|
3459
|
+
isMyMessage: g,
|
|
3435
3460
|
message: c,
|
|
3436
|
-
renderText:
|
|
3437
|
-
threadList:
|
|
3438
|
-
viewerLanguage:
|
|
3439
|
-
} = e, { client:
|
|
3440
|
-
Attachment:
|
|
3441
|
-
EditMessageModal:
|
|
3442
|
-
MessageActions:
|
|
3461
|
+
renderText: b,
|
|
3462
|
+
threadList: x,
|
|
3463
|
+
viewerLanguage: v
|
|
3464
|
+
} = e, { client: f } = oe("CustomMessage"), { channel: N } = le("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: R, onDownloadClick: S } = Ur("LockedAttachment"), [D, $] = U(!1), F = Js(c.id), { selected: L, voteUp: y, voteDown: E } = xa(c), {
|
|
3465
|
+
Attachment: I = Zs,
|
|
3466
|
+
EditMessageModal: M = Qs,
|
|
3467
|
+
MessageActions: T,
|
|
3443
3468
|
MessageBlocked: z = en,
|
|
3444
3469
|
MessageBouncePrompt: O = tn,
|
|
3445
3470
|
MessageDeleted: j = sn,
|
|
3446
3471
|
MessageIsThreadReplyInChannelButtonIndicator: X = nn,
|
|
3447
|
-
MessageRepliesCountButton:
|
|
3472
|
+
MessageRepliesCountButton: ee = an,
|
|
3448
3473
|
ReminderNotification: K = rn,
|
|
3449
3474
|
StreamedMessageText: _ = ln,
|
|
3450
|
-
PinIndicator:
|
|
3475
|
+
PinIndicator: A
|
|
3451
3476
|
} = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
|
|
3452
3477
|
() => h == null ? void 0 : h(c),
|
|
3453
3478
|
[h, c]
|
|
3454
3479
|
), B = se(() => {
|
|
3455
3480
|
const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
|
|
3456
3481
|
if (!Fe(c)) return pe;
|
|
3457
|
-
const
|
|
3458
|
-
return
|
|
3482
|
+
const Yt = pe.filter((qt) => !("type" in qt) || !ws(qt));
|
|
3483
|
+
return Yt.length === pe.length ? pe : Yt;
|
|
3459
3484
|
}, [c]), W = se(
|
|
3460
3485
|
() => Fs(B),
|
|
3461
3486
|
[B]
|
|
3462
3487
|
), Q = se(() => {
|
|
3463
|
-
const me = hs({ message: c, viewerLanguage:
|
|
3488
|
+
const me = hs({ message: c, viewerLanguage: v });
|
|
3464
3489
|
return me === c.text ? c : { ...c, text: me };
|
|
3465
|
-
}, [c,
|
|
3490
|
+
}, [c, v]), de = W.length > 0, De = W.reduce(
|
|
3466
3491
|
(me, pe) => me + pe.attachments.length,
|
|
3467
3492
|
0
|
|
3468
3493
|
) === ((B == null ? void 0 : B.length) ?? 0), Le = Xa(
|
|
@@ -3478,10 +3503,10 @@ const xi = ({
|
|
|
3478
3503
|
return /* @__PURE__ */ s(j, { message: c });
|
|
3479
3504
|
if (un(c))
|
|
3480
3505
|
return /* @__PURE__ */ s(z, {});
|
|
3481
|
-
const ae = !
|
|
3506
|
+
const ae = !x && !!c.reply_count, ue = !x && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, It = mn(c);
|
|
3482
3507
|
let he;
|
|
3483
|
-
ie ? he = () =>
|
|
3484
|
-
const fe =
|
|
3508
|
+
ie ? he = () => m(c) : It && (he = () => $(!0));
|
|
3509
|
+
const fe = g(), js = k(
|
|
3485
3510
|
"str-chat__message str-chat__message-simple",
|
|
3486
3511
|
`str-chat__message--${c.type}`,
|
|
3487
3512
|
`str-chat__message--${c.status}`,
|
|
@@ -3492,16 +3517,16 @@ const xi = ({
|
|
|
3492
3517
|
"str-chat__message--highlighted": p,
|
|
3493
3518
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3494
3519
|
"str-chat__message--with-reactions": q,
|
|
3495
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3520
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Dt = c == null ? void 0 : c.error) == null ? void 0 : Dt.status) !== 403,
|
|
3496
3521
|
"str-chat__message-with-thread-link": ae || ue,
|
|
3497
3522
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3498
3523
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3499
3524
|
"str-chat__virtual-message__wrapper--group": o
|
|
3500
3525
|
}
|
|
3501
|
-
), Ge = c.poll_id &&
|
|
3502
|
-
return /* @__PURE__ */
|
|
3526
|
+
), Ge = c.poll_id && f.polls.fromState(c.poll_id), Tt = Yr(c), ge = Fe(c), At = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Mt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
|
|
3527
|
+
return /* @__PURE__ */ u(te, { children: [
|
|
3503
3528
|
a && /* @__PURE__ */ s(
|
|
3504
|
-
|
|
3529
|
+
M,
|
|
3505
3530
|
{
|
|
3506
3531
|
additionalMessageInputProps: t
|
|
3507
3532
|
}
|
|
@@ -3514,14 +3539,14 @@ const xi = ({
|
|
|
3514
3539
|
open: D
|
|
3515
3540
|
}
|
|
3516
3541
|
),
|
|
3517
|
-
/* @__PURE__ */
|
|
3542
|
+
/* @__PURE__ */ u(
|
|
3518
3543
|
"div",
|
|
3519
3544
|
{
|
|
3520
3545
|
className: js,
|
|
3521
3546
|
"data-message-id": c.id,
|
|
3522
3547
|
"data-dd-privacy": "mask",
|
|
3523
3548
|
children: [
|
|
3524
|
-
|
|
3549
|
+
A && /* @__PURE__ */ s(A, {}),
|
|
3525
3550
|
!!F && /* @__PURE__ */ s(K, { reminder: F }),
|
|
3526
3551
|
c.user && /* @__PURE__ */ s(
|
|
3527
3552
|
ne,
|
|
@@ -3539,7 +3564,7 @@ const xi = ({
|
|
|
3539
3564
|
"div",
|
|
3540
3565
|
{
|
|
3541
3566
|
className: k("str-chat__message-inner", {
|
|
3542
|
-
"str-chat__simple-message--error-failed": ie ||
|
|
3567
|
+
"str-chat__simple-message--error-failed": ie || It
|
|
3543
3568
|
}),
|
|
3544
3569
|
"data-testid": "message-inner",
|
|
3545
3570
|
onClick: he,
|
|
@@ -3552,77 +3577,63 @@ const xi = ({
|
|
|
3552
3577
|
marginInlineEnd: 0,
|
|
3553
3578
|
marginInlineStart: 0
|
|
3554
3579
|
},
|
|
3555
|
-
children:
|
|
3556
|
-
fe ? /* @__PURE__ */
|
|
3557
|
-
|
|
3580
|
+
children: At ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3581
|
+
fe ? /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3582
|
+
T && /* @__PURE__ */ s(T, {}),
|
|
3558
3583
|
/* @__PURE__ */ s(
|
|
3559
3584
|
Zt.Sent,
|
|
3560
3585
|
{
|
|
3561
|
-
title: (
|
|
3562
|
-
mimeType: (
|
|
3563
|
-
thumbnailUrl: (
|
|
3564
|
-
amountText: (
|
|
3565
|
-
detail: (
|
|
3566
|
-
paymentStatus: (
|
|
3567
|
-
onPreviewClick: () => C == null ? void 0 : C(c,
|
|
3568
|
-
onFetchSource: async () => await (
|
|
3586
|
+
title: (Lt = c.metadata) == null ? void 0 : Lt.attachment_title,
|
|
3587
|
+
mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
|
|
3588
|
+
thumbnailUrl: (Pt = c.metadata) == null ? void 0 : Pt.attachment_thumbnail,
|
|
3589
|
+
amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
|
|
3590
|
+
detail: (Ot = c.metadata) == null ? void 0 : Ot.attachment_detail,
|
|
3591
|
+
paymentStatus: ($t = c.metadata) == null ? void 0 : $t.payment_status,
|
|
3592
|
+
onPreviewClick: () => C == null ? void 0 : C(c, N),
|
|
3593
|
+
onFetchSource: async () => await (R == null ? void 0 : R(c, N))
|
|
3569
3594
|
}
|
|
3570
3595
|
)
|
|
3571
|
-
] }) : /* @__PURE__ */
|
|
3596
|
+
] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3572
3597
|
/* @__PURE__ */ s(
|
|
3573
3598
|
Zt.Received,
|
|
3574
3599
|
{
|
|
3575
|
-
title: (
|
|
3576
|
-
mimeType: (
|
|
3577
|
-
thumbnailUrl: (
|
|
3578
|
-
amountText: (
|
|
3579
|
-
detail: (
|
|
3580
|
-
paymentStatus: (
|
|
3581
|
-
isUnlocking:
|
|
3582
|
-
onUnlockClick: () => C == null ? void 0 : C(c,
|
|
3583
|
-
onFetchSource: async () => await (
|
|
3584
|
-
onDownloadClick: () =>
|
|
3600
|
+
title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
|
|
3601
|
+
mimeType: (Ut = c.metadata) == null ? void 0 : Ut.attachment_mime_type,
|
|
3602
|
+
thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
|
|
3603
|
+
amountText: (Vt = c.metadata) == null ? void 0 : Vt.amount_text,
|
|
3604
|
+
detail: (Gt = c.metadata) == null ? void 0 : Gt.attachment_detail,
|
|
3605
|
+
paymentStatus: (Ht = c.metadata) == null ? void 0 : Ht.payment_status,
|
|
3606
|
+
isUnlocking: w(c.id),
|
|
3607
|
+
onUnlockClick: () => C == null ? void 0 : C(c, N),
|
|
3608
|
+
onFetchSource: async () => await (R == null ? void 0 : R(c, N)),
|
|
3609
|
+
onDownloadClick: () => S == null ? void 0 : S(c, N)
|
|
3585
3610
|
}
|
|
3586
3611
|
),
|
|
3587
|
-
|
|
3612
|
+
T && /* @__PURE__ */ s(T, {})
|
|
3588
3613
|
] }),
|
|
3589
3614
|
c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
|
|
3590
|
-
|
|
3615
|
+
tt,
|
|
3591
3616
|
{
|
|
3592
3617
|
message: Q,
|
|
3593
|
-
renderText:
|
|
3618
|
+
renderText: b
|
|
3594
3619
|
}
|
|
3595
3620
|
) })
|
|
3596
|
-
] }) :
|
|
3621
|
+
] }) : Tt ? (
|
|
3597
3622
|
/* Tip-only messages render as a standalone bubble */
|
|
3598
3623
|
/* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
|
|
3599
|
-
) : Vs ? /* @__PURE__ */ s(
|
|
3600
|
-
|
|
3624
|
+
) : Vs ? /* @__PURE__ */ s(
|
|
3625
|
+
pi,
|
|
3601
3626
|
{
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
padding: 0
|
|
3627
|
+
groupPosition: Le,
|
|
3628
|
+
isMyMessage: fe,
|
|
3629
|
+
message: {
|
|
3630
|
+
...Q,
|
|
3631
|
+
attachments: B
|
|
3608
3632
|
},
|
|
3609
|
-
|
|
3610
|
-
/* @__PURE__ */ s(
|
|
3611
|
-
xi,
|
|
3612
|
-
{
|
|
3613
|
-
groupPosition: Le,
|
|
3614
|
-
isMyMessage: fe,
|
|
3615
|
-
message: {
|
|
3616
|
-
attachments: B,
|
|
3617
|
-
text: Q.text
|
|
3618
|
-
}
|
|
3619
|
-
}
|
|
3620
|
-
),
|
|
3621
|
-
/* @__PURE__ */ s(Wt, {})
|
|
3622
|
-
]
|
|
3633
|
+
renderText: b
|
|
3623
3634
|
}
|
|
3624
|
-
)
|
|
3625
|
-
ge && !
|
|
3635
|
+
) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
|
|
3636
|
+
ge && !Mt && /* @__PURE__ */ s(
|
|
3626
3637
|
Ke,
|
|
3627
3638
|
{
|
|
3628
3639
|
message: c,
|
|
@@ -3632,7 +3643,7 @@ const xi = ({
|
|
|
3632
3643
|
),
|
|
3633
3644
|
Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
|
|
3634
3645
|
B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3635
|
-
|
|
3646
|
+
I,
|
|
3636
3647
|
{
|
|
3637
3648
|
actionHandler: l,
|
|
3638
3649
|
attachments: B
|
|
@@ -3642,21 +3653,21 @@ const xi = ({
|
|
|
3642
3653
|
_,
|
|
3643
3654
|
{
|
|
3644
3655
|
message: Q,
|
|
3645
|
-
renderText:
|
|
3656
|
+
renderText: b
|
|
3646
3657
|
}
|
|
3647
3658
|
) : /* @__PURE__ */ s(
|
|
3648
|
-
|
|
3659
|
+
tt,
|
|
3649
3660
|
{
|
|
3650
3661
|
message: Q,
|
|
3651
|
-
renderText:
|
|
3662
|
+
renderText: b
|
|
3652
3663
|
}
|
|
3653
3664
|
),
|
|
3654
|
-
/* @__PURE__ */ s(
|
|
3665
|
+
/* @__PURE__ */ s(et, {})
|
|
3655
3666
|
] }) })
|
|
3656
3667
|
}
|
|
3657
3668
|
),
|
|
3658
|
-
!
|
|
3659
|
-
(!ge ||
|
|
3669
|
+
!At && !Tt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
|
|
3670
|
+
(!ge || Mt) && /* @__PURE__ */ s(
|
|
3660
3671
|
Ke,
|
|
3661
3672
|
{
|
|
3662
3673
|
message: c,
|
|
@@ -3669,13 +3680,13 @@ const xi = ({
|
|
|
3669
3680
|
{
|
|
3670
3681
|
selected: L,
|
|
3671
3682
|
onVoteUp: y,
|
|
3672
|
-
onVoteDown:
|
|
3683
|
+
onVoteDown: E
|
|
3673
3684
|
}
|
|
3674
3685
|
)
|
|
3675
3686
|
] }),
|
|
3676
3687
|
/* @__PURE__ */ s(Xr, {}),
|
|
3677
3688
|
ae && /* @__PURE__ */ s(
|
|
3678
|
-
|
|
3689
|
+
ee,
|
|
3679
3690
|
{
|
|
3680
3691
|
onClick: d,
|
|
3681
3692
|
reply_count: c.reply_count
|
|
@@ -3687,13 +3698,13 @@ const xi = ({
|
|
|
3687
3698
|
c.id
|
|
3688
3699
|
)
|
|
3689
3700
|
] });
|
|
3690
|
-
},
|
|
3691
|
-
|
|
3701
|
+
}, vi = V.memo(
|
|
3702
|
+
bi,
|
|
3692
3703
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
|
|
3693
|
-
),
|
|
3704
|
+
), xi = (e) => {
|
|
3694
3705
|
const t = _e("CustomMessage");
|
|
3695
|
-
return /* @__PURE__ */ s(
|
|
3696
|
-
},
|
|
3706
|
+
return /* @__PURE__ */ s(vi, { ...t, ...e });
|
|
3707
|
+
}, wi = () => {
|
|
3697
3708
|
var n;
|
|
3698
3709
|
const { handleDelete: e, message: t } = _e("CustomMessageActions");
|
|
3699
3710
|
return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
|
|
@@ -3706,7 +3717,7 @@ const xi = ({
|
|
|
3706
3717
|
children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3707
3718
|
}
|
|
3708
3719
|
);
|
|
3709
|
-
},
|
|
3720
|
+
}, _i = () => {
|
|
3710
3721
|
const { handleFlag: e } = _e("CustomMessageActions");
|
|
3711
3722
|
return /* @__PURE__ */ s(
|
|
3712
3723
|
ds,
|
|
@@ -3718,24 +3729,24 @@ const xi = ({
|
|
|
3718
3729
|
children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
3719
3730
|
}
|
|
3720
3731
|
);
|
|
3721
|
-
},
|
|
3732
|
+
}, Ni = () => {
|
|
3722
3733
|
var t;
|
|
3723
3734
|
const { message: e } = _e("CustomMessageActions");
|
|
3724
3735
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
|
|
3725
3736
|
ta,
|
|
3726
3737
|
{
|
|
3727
3738
|
messageActionSet: [
|
|
3728
|
-
{ Component:
|
|
3729
|
-
{ Component:
|
|
3739
|
+
{ Component: wi, placement: "quick", type: "delete" },
|
|
3740
|
+
{ Component: _i, placement: "quick", type: "flag" }
|
|
3730
3741
|
]
|
|
3731
3742
|
}
|
|
3732
3743
|
);
|
|
3733
|
-
},
|
|
3744
|
+
}, yi = ({
|
|
3734
3745
|
link: e,
|
|
3735
3746
|
onDismiss: t
|
|
3736
3747
|
}) => {
|
|
3737
3748
|
const { og_scrape_url: n, title: a, image_url: r } = e;
|
|
3738
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ u(
|
|
3739
3750
|
"a",
|
|
3740
3751
|
{
|
|
3741
3752
|
href: n,
|
|
@@ -3763,21 +3774,21 @@ const xi = ({
|
|
|
3763
3774
|
children: /* @__PURE__ */ s(Ue, { className: "size-4 text-black/90" })
|
|
3764
3775
|
}
|
|
3765
3776
|
),
|
|
3766
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ u("div", { className: "p-2", children: [
|
|
3767
3778
|
a && /* @__PURE__ */ s("div", { className: "truncate text-[14px] font-medium leading-5 text-white", children: a }),
|
|
3768
3779
|
/* @__PURE__ */ s("div", { className: "truncate text-[12px] leading-4 text-white/55", children: n })
|
|
3769
3780
|
] })
|
|
3770
3781
|
]
|
|
3771
3782
|
}
|
|
3772
3783
|
);
|
|
3773
|
-
},
|
|
3784
|
+
}, ki = (e) => ({
|
|
3774
3785
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
3775
|
-
(t) =>
|
|
3786
|
+
(t) => Wt.previewIsLoaded(t) || Wt.previewIsLoading(t)
|
|
3776
3787
|
)
|
|
3777
|
-
}),
|
|
3788
|
+
}), Ci = () => {
|
|
3778
3789
|
const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
|
|
3779
3790
|
e.state,
|
|
3780
|
-
|
|
3791
|
+
ki
|
|
3781
3792
|
), n = (r) => {
|
|
3782
3793
|
e.dismissPreview(r);
|
|
3783
3794
|
};
|
|
@@ -3790,9 +3801,9 @@ const xi = ({
|
|
|
3790
3801
|
// block so it keeps its intrinsic height and the container scrolls — a
|
|
3791
3802
|
// bare flex-column child would be shrunk on the column axis and its
|
|
3792
3803
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3793
|
-
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
|
|
3804
|
+
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3794
3805
|
) : null;
|
|
3795
|
-
},
|
|
3806
|
+
}, Et = V.createContext(!1), dl = () => Ie(Et), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3796
3807
|
"button",
|
|
3797
3808
|
{
|
|
3798
3809
|
...n,
|
|
@@ -3802,9 +3813,9 @@ const xi = ({
|
|
|
3802
3813
|
onClick: e,
|
|
3803
3814
|
children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
|
|
3804
3815
|
}
|
|
3805
|
-
),
|
|
3806
|
-
const e = Ie(
|
|
3807
|
-
SendButton: r =
|
|
3816
|
+
), Ei = () => {
|
|
3817
|
+
const e = Ie(Et), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
|
|
3818
|
+
SendButton: r = Si,
|
|
3808
3819
|
AttachmentPreviewList: i = wn
|
|
3809
3820
|
} = is("CustomMessageInput");
|
|
3810
3821
|
return (
|
|
@@ -3816,16 +3827,16 @@ const xi = ({
|
|
|
3816
3827
|
// content height and the squeeze never reaches the preview list. Stream's
|
|
3817
3828
|
// <MessageInput> renders its Input directly (context providers only, no
|
|
3818
3829
|
// wrapper element), so this is a direct flex item of that row.
|
|
3819
|
-
/* @__PURE__ */
|
|
3830
|
+
/* @__PURE__ */ u(
|
|
3820
3831
|
"div",
|
|
3821
3832
|
{
|
|
3822
3833
|
className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
|
|
3823
3834
|
"data-dd-privacy": "mask",
|
|
3824
3835
|
children: [
|
|
3825
3836
|
/* @__PURE__ */ s(_n, {}),
|
|
3826
|
-
/* @__PURE__ */ s(
|
|
3837
|
+
/* @__PURE__ */ s(Ci, {}),
|
|
3827
3838
|
/* @__PURE__ */ s(i, {}),
|
|
3828
|
-
/* @__PURE__ */
|
|
3839
|
+
/* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
|
|
3829
3840
|
/* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
|
|
3830
3841
|
Nn,
|
|
3831
3842
|
{
|
|
@@ -3854,7 +3865,7 @@ const xi = ({
|
|
|
3854
3865
|
}
|
|
3855
3866
|
)
|
|
3856
3867
|
);
|
|
3857
|
-
},
|
|
3868
|
+
}, Ii = ({
|
|
3858
3869
|
renderActions: e,
|
|
3859
3870
|
renderFooter: t,
|
|
3860
3871
|
disabled: n = !1,
|
|
@@ -3863,11 +3874,11 @@ const xi = ({
|
|
|
3863
3874
|
}) => {
|
|
3864
3875
|
var l;
|
|
3865
3876
|
const { channel: i } = le(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
|
|
3866
|
-
return n ? /* @__PURE__ */
|
|
3877
|
+
return n ? /* @__PURE__ */ u(te, { children: [
|
|
3867
3878
|
/* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
|
|
3868
3879
|
t == null ? void 0 : t()
|
|
3869
|
-
] }) : /* @__PURE__ */
|
|
3870
|
-
/* @__PURE__ */
|
|
3880
|
+
] }) : /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
|
|
3881
|
+
/* @__PURE__ */ u(
|
|
3871
3882
|
"div",
|
|
3872
3883
|
{
|
|
3873
3884
|
inert: o ? "" : void 0,
|
|
@@ -3875,23 +3886,23 @@ const xi = ({
|
|
|
3875
3886
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3876
3887
|
children: [
|
|
3877
3888
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3878
|
-
/* @__PURE__ */ s(
|
|
3889
|
+
/* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
|
|
3879
3890
|
]
|
|
3880
3891
|
}
|
|
3881
3892
|
),
|
|
3882
3893
|
t == null ? void 0 : t()
|
|
3883
3894
|
] });
|
|
3884
|
-
},
|
|
3895
|
+
}, Ti = [
|
|
3885
3896
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
3886
3897
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
3887
|
-
],
|
|
3898
|
+
], Ai = {
|
|
3888
3899
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
3889
3900
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
3890
|
-
},
|
|
3901
|
+
}, Mi = [
|
|
3891
3902
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
3892
|
-
],
|
|
3903
|
+
], Ri = {
|
|
3893
3904
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
3894
|
-
}, Ze = "age safety guidelines.",
|
|
3905
|
+
}, Ze = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", as = (e) => Ti.includes(e), Li = (e) => Mi.includes(e), zi = (e) => {
|
|
3895
3906
|
var a;
|
|
3896
3907
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
3897
3908
|
if (as(t))
|
|
@@ -3899,7 +3910,7 @@ const xi = ({
|
|
|
3899
3910
|
kind: "dm-agent",
|
|
3900
3911
|
type: t
|
|
3901
3912
|
};
|
|
3902
|
-
if (
|
|
3913
|
+
if (Li(t))
|
|
3903
3914
|
return {
|
|
3904
3915
|
kind: "age-safety",
|
|
3905
3916
|
type: t
|
|
@@ -3910,17 +3921,17 @@ const xi = ({
|
|
|
3910
3921
|
kind: "dm-agent",
|
|
3911
3922
|
type: n
|
|
3912
3923
|
};
|
|
3913
|
-
},
|
|
3924
|
+
}, Pi = (e) => {
|
|
3914
3925
|
const t = e.indexOf(Ze);
|
|
3915
3926
|
if (t === -1)
|
|
3916
3927
|
return e;
|
|
3917
3928
|
const n = t + Ze.length;
|
|
3918
|
-
return /* @__PURE__ */
|
|
3929
|
+
return /* @__PURE__ */ u(te, { children: [
|
|
3919
3930
|
e.slice(0, t),
|
|
3920
3931
|
/* @__PURE__ */ s(
|
|
3921
3932
|
"a",
|
|
3922
3933
|
{
|
|
3923
|
-
href:
|
|
3934
|
+
href: Di,
|
|
3924
3935
|
target: "_blank",
|
|
3925
3936
|
rel: "noopener noreferrer",
|
|
3926
3937
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -3929,15 +3940,15 @@ const xi = ({
|
|
|
3929
3940
|
),
|
|
3930
3941
|
e.slice(n)
|
|
3931
3942
|
] });
|
|
3932
|
-
},
|
|
3943
|
+
}, Fi = (e) => {
|
|
3933
3944
|
var a, r;
|
|
3934
|
-
const t = e.message.hide_date === !0, n =
|
|
3945
|
+
const t = e.message.hide_date === !0, n = zi(
|
|
3935
3946
|
e.message
|
|
3936
3947
|
);
|
|
3937
3948
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
3938
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
3939
|
-
return /* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3949
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
|
|
3950
|
+
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3951
|
+
/* @__PURE__ */ u(
|
|
3941
3952
|
"div",
|
|
3942
3953
|
{
|
|
3943
3954
|
className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
|
|
@@ -3961,9 +3972,9 @@ const xi = ({
|
|
|
3961
3972
|
] });
|
|
3962
3973
|
}
|
|
3963
3974
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
3964
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
3965
|
-
return /* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
3975
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
|
|
3976
|
+
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
3977
|
+
/* @__PURE__ */ u(
|
|
3967
3978
|
"div",
|
|
3968
3979
|
{
|
|
3969
3980
|
className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
|
|
@@ -3980,22 +3991,22 @@ const xi = ({
|
|
|
3980
3991
|
"data-testid": "age-safety-system-message-icon"
|
|
3981
3992
|
}
|
|
3982
3993
|
),
|
|
3983
|
-
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
3994
|
+
/* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
|
|
3984
3995
|
]
|
|
3985
3996
|
}
|
|
3986
3997
|
),
|
|
3987
3998
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
3988
3999
|
] });
|
|
3989
4000
|
}
|
|
3990
|
-
return /* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
4001
|
+
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4002
|
+
/* @__PURE__ */ u("div", { className: "str-chat__message--system__text", children: [
|
|
3992
4003
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
|
|
3993
4004
|
/* @__PURE__ */ s("p", { children: e.message.text }),
|
|
3994
4005
|
/* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
|
|
3995
4006
|
] }),
|
|
3996
4007
|
!t && /* @__PURE__ */ s(Ye, { message: e.message })
|
|
3997
4008
|
] });
|
|
3998
|
-
}, Os =
|
|
4009
|
+
}, Os = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
|
|
3999
4010
|
"animateTransform",
|
|
4000
4011
|
{
|
|
4001
4012
|
attributeName: "transform",
|
|
@@ -4005,47 +4016,47 @@ const xi = ({
|
|
|
4005
4016
|
begin: `${120 * t}ms`,
|
|
4006
4017
|
repeatCount: "indefinite"
|
|
4007
4018
|
}
|
|
4008
|
-
) }),
|
|
4019
|
+
) }), Oi = /* @__PURE__ */ new Set([
|
|
4009
4020
|
qe.Thinking,
|
|
4010
4021
|
qe.Generating,
|
|
4011
4022
|
qe.ExternalSources
|
|
4012
|
-
]),
|
|
4013
|
-
var
|
|
4023
|
+
]), $i = ({ threadList: e }) => {
|
|
4024
|
+
var b, x;
|
|
4014
4025
|
const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
|
|
4015
|
-
if (!e && l &&
|
|
4016
|
-
const
|
|
4026
|
+
if (!e && l && Oi.has(o)) {
|
|
4027
|
+
const v = Bi(t, (b = r.user) == null ? void 0 : b.id);
|
|
4017
4028
|
return /* @__PURE__ */ s(
|
|
4018
4029
|
rs,
|
|
4019
4030
|
{
|
|
4020
|
-
avatarId: (
|
|
4021
|
-
avatarName: (
|
|
4022
|
-
avatarImage:
|
|
4031
|
+
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
4032
|
+
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
4033
|
+
avatarImage: v == null ? void 0 : v.image,
|
|
4023
4034
|
testId: "typing-indicator-ai"
|
|
4024
4035
|
}
|
|
4025
4036
|
);
|
|
4026
4037
|
}
|
|
4027
4038
|
if ((n == null ? void 0 : n.typing_events) === !1)
|
|
4028
4039
|
return null;
|
|
4029
|
-
const
|
|
4030
|
-
({ parent_id:
|
|
4031
|
-
var
|
|
4032
|
-
return (
|
|
4040
|
+
const m = e ? [] : Object.values(i).filter(
|
|
4041
|
+
({ parent_id: v, user: f }) => {
|
|
4042
|
+
var N;
|
|
4043
|
+
return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && !v;
|
|
4033
4044
|
}
|
|
4034
4045
|
), p = e ? Object.values(i).filter(
|
|
4035
|
-
({ parent_id:
|
|
4036
|
-
var
|
|
4037
|
-
return (
|
|
4046
|
+
({ parent_id: v, user: f }) => {
|
|
4047
|
+
var N;
|
|
4048
|
+
return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && v === (a == null ? void 0 : a.id);
|
|
4038
4049
|
}
|
|
4039
|
-
) : [], h = e ? p :
|
|
4050
|
+
) : [], h = e ? p : m;
|
|
4040
4051
|
if (!h.length)
|
|
4041
4052
|
return null;
|
|
4042
|
-
const
|
|
4053
|
+
const g = (x = h[0]) == null ? void 0 : x.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4043
4054
|
return /* @__PURE__ */ s(
|
|
4044
4055
|
rs,
|
|
4045
4056
|
{
|
|
4046
|
-
avatarId: (
|
|
4047
|
-
avatarName: (
|
|
4048
|
-
avatarImage: (
|
|
4057
|
+
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4058
|
+
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
4059
|
+
avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
|
|
4049
4060
|
testId: "typing-indicator"
|
|
4050
4061
|
}
|
|
4051
4062
|
);
|
|
@@ -4062,7 +4073,7 @@ const xi = ({
|
|
|
4062
4073
|
style: {
|
|
4063
4074
|
marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
|
|
4064
4075
|
},
|
|
4065
|
-
children: /* @__PURE__ */
|
|
4076
|
+
children: /* @__PURE__ */ u("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
|
|
4066
4077
|
/* @__PURE__ */ s(
|
|
4067
4078
|
ne,
|
|
4068
4079
|
{
|
|
@@ -4074,7 +4085,7 @@ const xi = ({
|
|
|
4074
4085
|
shape: "circle"
|
|
4075
4086
|
}
|
|
4076
4087
|
),
|
|
4077
|
-
/* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ u(
|
|
4078
4089
|
"svg",
|
|
4079
4090
|
{
|
|
4080
4091
|
"aria-hidden": "true",
|
|
@@ -4093,7 +4104,7 @@ const xi = ({
|
|
|
4093
4104
|
] })
|
|
4094
4105
|
}
|
|
4095
4106
|
);
|
|
4096
|
-
function
|
|
4107
|
+
function Bi(e, t) {
|
|
4097
4108
|
var a;
|
|
4098
4109
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4099
4110
|
for (const r of Object.values(n)) {
|
|
@@ -4102,12 +4113,12 @@ function Vi(e, t) {
|
|
|
4102
4113
|
return i;
|
|
4103
4114
|
}
|
|
4104
4115
|
}
|
|
4105
|
-
const
|
|
4116
|
+
const Ui = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
4106
4117
|
"div",
|
|
4107
4118
|
{
|
|
4108
4119
|
className: k("flex items-center justify-center h-full", e),
|
|
4109
4120
|
children: [
|
|
4110
|
-
/* @__PURE__ */
|
|
4121
|
+
/* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
4111
4122
|
/* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
|
|
4112
4123
|
"animateTransform",
|
|
4113
4124
|
{
|
|
@@ -4145,12 +4156,12 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
|
|
|
4145
4156
|
t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
|
|
4146
4157
|
]
|
|
4147
4158
|
}
|
|
4148
|
-
), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */
|
|
4149
|
-
/* @__PURE__ */ s(
|
|
4159
|
+
), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
4160
|
+
/* @__PURE__ */ s(ji, { className: "w-6 h-6" }),
|
|
4150
4161
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4151
4162
|
] }) }));
|
|
4152
4163
|
Be.displayName = "LoadingState";
|
|
4153
|
-
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant",
|
|
4164
|
+
const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
|
|
4154
4165
|
onBack: e,
|
|
4155
4166
|
showBackButton: t,
|
|
4156
4167
|
showStarButton: n = !1,
|
|
@@ -4160,35 +4171,35 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4160
4171
|
showDeleteConversation: o = !0,
|
|
4161
4172
|
showBlockParticipant: l = !0,
|
|
4162
4173
|
showReportParticipant: d = !0,
|
|
4163
|
-
onDeleteConversationClick:
|
|
4174
|
+
onDeleteConversationClick: m,
|
|
4164
4175
|
onBlockParticipantClick: p,
|
|
4165
4176
|
onReportParticipantClick: h,
|
|
4166
|
-
customChannelActions:
|
|
4177
|
+
customChannelActions: g,
|
|
4167
4178
|
renderChannelActions: c,
|
|
4168
|
-
showChannelInfo:
|
|
4169
|
-
onParticipantNameClick:
|
|
4170
|
-
renderHeaderTitleBadges:
|
|
4179
|
+
showChannelInfo: b = !0,
|
|
4180
|
+
onParticipantNameClick: x,
|
|
4181
|
+
renderHeaderTitleBadges: v
|
|
4171
4182
|
}) => {
|
|
4172
|
-
var
|
|
4173
|
-
const { channel:
|
|
4183
|
+
var E, I, M, T, z, O;
|
|
4184
|
+
const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
|
|
4174
4185
|
() => {
|
|
4175
4186
|
var j;
|
|
4176
4187
|
return je(
|
|
4177
|
-
(j =
|
|
4178
|
-
|
|
4179
|
-
|
|
4188
|
+
(j = f.state) == null ? void 0 : j.members,
|
|
4189
|
+
N == null ? void 0 : N.userID,
|
|
4190
|
+
f.type
|
|
4180
4191
|
);
|
|
4181
4192
|
},
|
|
4182
|
-
[(
|
|
4183
|
-
), C =
|
|
4184
|
-
channel:
|
|
4185
|
-
participant:
|
|
4186
|
-
}), $ = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */
|
|
4193
|
+
[(E = f.state) == null ? void 0 : E.members, N == null ? void 0 : N.userID, f.type]
|
|
4194
|
+
), C = ut(w == null ? void 0 : w.user), R = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = dt(f), D = v == null ? void 0 : v({
|
|
4195
|
+
channel: f,
|
|
4196
|
+
participant: w
|
|
4197
|
+
}), $ = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(te, { children: [
|
|
4187
4198
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
|
|
4188
4199
|
D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
|
|
4189
4200
|
] }), y = async () => {
|
|
4190
4201
|
try {
|
|
4191
|
-
|
|
4202
|
+
S ? await f.unpin() : await f.pin();
|
|
4192
4203
|
} catch (j) {
|
|
4193
4204
|
console.error(
|
|
4194
4205
|
"[CustomChannelHeader] Failed to update pinned status:",
|
|
@@ -4196,8 +4207,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4196
4207
|
);
|
|
4197
4208
|
}
|
|
4198
4209
|
};
|
|
4199
|
-
return /* @__PURE__ */
|
|
4200
|
-
/* @__PURE__ */
|
|
4210
|
+
return /* @__PURE__ */ u("div", { className: "@container", children: [
|
|
4211
|
+
/* @__PURE__ */ u("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
|
|
4201
4212
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
|
|
4202
4213
|
"button",
|
|
4203
4214
|
{
|
|
@@ -4209,7 +4220,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4209
4220
|
}),
|
|
4210
4221
|
type: "button",
|
|
4211
4222
|
"aria-label": "Back to conversations",
|
|
4212
|
-
children: /* @__PURE__ */ s(
|
|
4223
|
+
children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
|
|
4213
4224
|
}
|
|
4214
4225
|
) }),
|
|
4215
4226
|
/* @__PURE__ */ s(
|
|
@@ -4217,11 +4228,11 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4217
4228
|
{
|
|
4218
4229
|
className: "flex flex-col gap-1 items-center",
|
|
4219
4230
|
"data-dd-privacy": "mask",
|
|
4220
|
-
children:
|
|
4231
|
+
children: x ? /* @__PURE__ */ u(
|
|
4221
4232
|
"button",
|
|
4222
4233
|
{
|
|
4223
4234
|
type: "button",
|
|
4224
|
-
onClick:
|
|
4235
|
+
onClick: x,
|
|
4225
4236
|
"aria-label": `View details for ${C}`,
|
|
4226
4237
|
className: k(
|
|
4227
4238
|
$,
|
|
@@ -4231,37 +4242,37 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4231
4242
|
/* @__PURE__ */ s(
|
|
4232
4243
|
ne,
|
|
4233
4244
|
{
|
|
4234
|
-
id: ((
|
|
4245
|
+
id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || f.id || "unknown",
|
|
4235
4246
|
name: C,
|
|
4236
|
-
image:
|
|
4237
|
-
starred: n &&
|
|
4247
|
+
image: R,
|
|
4248
|
+
starred: n && S,
|
|
4238
4249
|
dmAgentEnabled: a,
|
|
4239
4250
|
size: 48
|
|
4240
4251
|
}
|
|
4241
4252
|
),
|
|
4242
|
-
/* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
|
|
4243
4254
|
L,
|
|
4244
4255
|
/* @__PURE__ */ s(ve, { className: "size-3 shrink-0", weight: "bold" })
|
|
4245
4256
|
] }),
|
|
4246
|
-
a && /* @__PURE__ */
|
|
4257
|
+
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4247
4258
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
4248
4259
|
/* @__PURE__ */ s("span", { children: Pe })
|
|
4249
4260
|
] })
|
|
4250
4261
|
]
|
|
4251
4262
|
}
|
|
4252
|
-
) : /* @__PURE__ */
|
|
4263
|
+
) : /* @__PURE__ */ u("div", { className: $, children: [
|
|
4253
4264
|
/* @__PURE__ */ s(
|
|
4254
4265
|
ne,
|
|
4255
4266
|
{
|
|
4256
|
-
id: ((
|
|
4267
|
+
id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || f.id || "unknown",
|
|
4257
4268
|
name: C,
|
|
4258
|
-
image:
|
|
4259
|
-
starred: n &&
|
|
4269
|
+
image: R,
|
|
4270
|
+
starred: n && S,
|
|
4260
4271
|
dmAgentEnabled: a,
|
|
4261
4272
|
size: 48
|
|
4262
4273
|
}
|
|
4263
4274
|
),
|
|
4264
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
|
|
4265
4276
|
L,
|
|
4266
4277
|
/* @__PURE__ */ s(
|
|
4267
4278
|
ve,
|
|
@@ -4271,54 +4282,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4271
4282
|
}
|
|
4272
4283
|
)
|
|
4273
4284
|
] }),
|
|
4274
|
-
a && /* @__PURE__ */
|
|
4285
|
+
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4275
4286
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
4276
4287
|
/* @__PURE__ */ s("span", { children: Pe })
|
|
4277
4288
|
] })
|
|
4278
4289
|
] })
|
|
4279
4290
|
}
|
|
4280
4291
|
),
|
|
4281
|
-
/* @__PURE__ */
|
|
4292
|
+
/* @__PURE__ */ u("div", { className: "flex justify-end items-center gap-2", children: [
|
|
4282
4293
|
n && /* @__PURE__ */ s(
|
|
4283
4294
|
"button",
|
|
4284
4295
|
{
|
|
4285
4296
|
className: be,
|
|
4286
4297
|
onClick: y,
|
|
4287
4298
|
type: "button",
|
|
4288
|
-
"aria-label":
|
|
4299
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4289
4300
|
children: /* @__PURE__ */ s(
|
|
4290
4301
|
Ee,
|
|
4291
4302
|
{
|
|
4292
4303
|
className: k("size-5", {
|
|
4293
|
-
"text-yellow-600":
|
|
4294
|
-
"text-black/90": !
|
|
4304
|
+
"text-yellow-600": S,
|
|
4305
|
+
"text-black/90": !S
|
|
4295
4306
|
}),
|
|
4296
|
-
weight:
|
|
4307
|
+
weight: S ? "duotone" : "regular"
|
|
4297
4308
|
}
|
|
4298
4309
|
)
|
|
4299
4310
|
}
|
|
4300
4311
|
),
|
|
4301
|
-
|
|
4302
|
-
|
|
4312
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4313
|
+
at,
|
|
4303
4314
|
{
|
|
4304
|
-
channel:
|
|
4305
|
-
participant:
|
|
4315
|
+
channel: f,
|
|
4316
|
+
participant: w,
|
|
4306
4317
|
showDeleteConversation: o,
|
|
4307
4318
|
showBlockParticipant: l,
|
|
4308
4319
|
showReportParticipant: d,
|
|
4309
4320
|
onLeaveConversation: r,
|
|
4310
4321
|
onBlockParticipant: i,
|
|
4311
|
-
onDeleteConversationClick:
|
|
4322
|
+
onDeleteConversationClick: m,
|
|
4312
4323
|
onBlockParticipantClick: p,
|
|
4313
4324
|
onReportParticipantClick: h,
|
|
4314
|
-
customChannelActions:
|
|
4325
|
+
customChannelActions: g,
|
|
4315
4326
|
triggerClassName: k(be, "bg-[#F1F0EE]")
|
|
4316
4327
|
}
|
|
4317
4328
|
))
|
|
4318
4329
|
] })
|
|
4319
4330
|
] }),
|
|
4320
|
-
/* @__PURE__ */
|
|
4321
|
-
/* @__PURE__ */
|
|
4331
|
+
/* @__PURE__ */ u("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
|
|
4332
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
|
|
4322
4333
|
t && e && /* @__PURE__ */ s(
|
|
4323
4334
|
"button",
|
|
4324
4335
|
{
|
|
@@ -4329,14 +4340,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4329
4340
|
type: "button",
|
|
4330
4341
|
onClick: e,
|
|
4331
4342
|
"aria-label": "Back to conversations",
|
|
4332
|
-
children: /* @__PURE__ */ s(
|
|
4343
|
+
children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
|
|
4333
4344
|
}
|
|
4334
4345
|
),
|
|
4335
|
-
|
|
4346
|
+
x ? /* @__PURE__ */ u(
|
|
4336
4347
|
"button",
|
|
4337
4348
|
{
|
|
4338
4349
|
type: "button",
|
|
4339
|
-
onClick:
|
|
4350
|
+
onClick: x,
|
|
4340
4351
|
"aria-label": `View details for ${C}`,
|
|
4341
4352
|
className: k(
|
|
4342
4353
|
F,
|
|
@@ -4346,40 +4357,40 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4346
4357
|
/* @__PURE__ */ s(
|
|
4347
4358
|
ne,
|
|
4348
4359
|
{
|
|
4349
|
-
id: ((z =
|
|
4360
|
+
id: ((z = w == null ? void 0 : w.user) == null ? void 0 : z.id) || f.id || "unknown",
|
|
4350
4361
|
name: C,
|
|
4351
|
-
image:
|
|
4352
|
-
starred: n &&
|
|
4362
|
+
image: R,
|
|
4363
|
+
starred: n && S,
|
|
4353
4364
|
dmAgentEnabled: a,
|
|
4354
4365
|
size: 48
|
|
4355
4366
|
}
|
|
4356
4367
|
),
|
|
4357
|
-
/* @__PURE__ */
|
|
4358
|
-
/* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4369
|
+
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4359
4370
|
L,
|
|
4360
4371
|
/* @__PURE__ */ s(ve, { className: "size-4 shrink-0", weight: "bold" })
|
|
4361
4372
|
] }),
|
|
4362
|
-
a && /* @__PURE__ */
|
|
4373
|
+
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4363
4374
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
4364
4375
|
/* @__PURE__ */ s("span", { className: "truncate", children: Pe })
|
|
4365
4376
|
] })
|
|
4366
4377
|
] })
|
|
4367
4378
|
]
|
|
4368
4379
|
}
|
|
4369
|
-
) : /* @__PURE__ */
|
|
4380
|
+
) : /* @__PURE__ */ u("div", { className: F, children: [
|
|
4370
4381
|
/* @__PURE__ */ s(
|
|
4371
4382
|
ne,
|
|
4372
4383
|
{
|
|
4373
|
-
id: ((O =
|
|
4384
|
+
id: ((O = w == null ? void 0 : w.user) == null ? void 0 : O.id) || f.id || "unknown",
|
|
4374
4385
|
name: C,
|
|
4375
|
-
image:
|
|
4376
|
-
starred: n &&
|
|
4386
|
+
image: R,
|
|
4387
|
+
starred: n && S,
|
|
4377
4388
|
dmAgentEnabled: a,
|
|
4378
4389
|
size: 48
|
|
4379
4390
|
}
|
|
4380
4391
|
),
|
|
4381
|
-
/* @__PURE__ */
|
|
4382
|
-
/* @__PURE__ */
|
|
4392
|
+
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
4393
|
+
/* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
|
|
4383
4394
|
L,
|
|
4384
4395
|
/* @__PURE__ */ s(
|
|
4385
4396
|
ve,
|
|
@@ -4389,54 +4400,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4389
4400
|
}
|
|
4390
4401
|
)
|
|
4391
4402
|
] }),
|
|
4392
|
-
a && /* @__PURE__ */
|
|
4403
|
+
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4393
4404
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
|
|
4394
4405
|
/* @__PURE__ */ s("span", { className: "truncate", children: Pe })
|
|
4395
4406
|
] })
|
|
4396
4407
|
] })
|
|
4397
4408
|
] })
|
|
4398
4409
|
] }),
|
|
4399
|
-
/* @__PURE__ */
|
|
4410
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
4400
4411
|
n && /* @__PURE__ */ s(
|
|
4401
4412
|
"button",
|
|
4402
4413
|
{
|
|
4403
4414
|
className: be,
|
|
4404
4415
|
onClick: y,
|
|
4405
4416
|
type: "button",
|
|
4406
|
-
"aria-label":
|
|
4417
|
+
"aria-label": S ? "Unstar conversation" : "Star conversation",
|
|
4407
4418
|
children: /* @__PURE__ */ s(
|
|
4408
4419
|
Ee,
|
|
4409
4420
|
{
|
|
4410
4421
|
className: k("size-6", {
|
|
4411
|
-
"text-yellow-600":
|
|
4412
|
-
"text-black/90": !
|
|
4422
|
+
"text-yellow-600": S,
|
|
4423
|
+
"text-black/90": !S
|
|
4413
4424
|
}),
|
|
4414
|
-
weight:
|
|
4425
|
+
weight: S ? "duotone" : "regular"
|
|
4415
4426
|
}
|
|
4416
4427
|
)
|
|
4417
4428
|
}
|
|
4418
4429
|
),
|
|
4419
|
-
|
|
4420
|
-
|
|
4430
|
+
b && (c !== void 0 ? c : /* @__PURE__ */ s(
|
|
4431
|
+
at,
|
|
4421
4432
|
{
|
|
4422
|
-
channel:
|
|
4423
|
-
participant:
|
|
4433
|
+
channel: f,
|
|
4434
|
+
participant: w,
|
|
4424
4435
|
showDeleteConversation: o,
|
|
4425
4436
|
showBlockParticipant: l,
|
|
4426
4437
|
showReportParticipant: d,
|
|
4427
4438
|
onLeaveConversation: r,
|
|
4428
4439
|
onBlockParticipant: i,
|
|
4429
|
-
onDeleteConversationClick:
|
|
4440
|
+
onDeleteConversationClick: m,
|
|
4430
4441
|
onBlockParticipantClick: p,
|
|
4431
4442
|
onReportParticipantClick: h,
|
|
4432
|
-
customChannelActions:
|
|
4443
|
+
customChannelActions: g,
|
|
4433
4444
|
triggerClassName: be
|
|
4434
4445
|
}
|
|
4435
4446
|
))
|
|
4436
4447
|
] })
|
|
4437
4448
|
] })
|
|
4438
4449
|
] });
|
|
4439
|
-
},
|
|
4450
|
+
}, Gi = ({
|
|
4440
4451
|
onBack: e,
|
|
4441
4452
|
showBackButton: t,
|
|
4442
4453
|
renderMessageInputActions: n,
|
|
@@ -4446,143 +4457,146 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4446
4457
|
onBlockParticipant: o,
|
|
4447
4458
|
showDeleteConversation: l = !0,
|
|
4448
4459
|
onDeleteConversationClick: d,
|
|
4449
|
-
onBlockParticipantClick:
|
|
4460
|
+
onBlockParticipantClick: m,
|
|
4450
4461
|
onReportParticipantClick: p,
|
|
4451
4462
|
showBlockParticipant: h = !0,
|
|
4452
|
-
showReportParticipant:
|
|
4463
|
+
showReportParticipant: g = !0,
|
|
4453
4464
|
composerDisabled: c = !1,
|
|
4454
|
-
composerDisabledReason:
|
|
4455
|
-
showStarButton:
|
|
4456
|
-
chatbotVotingEnabled:
|
|
4457
|
-
renderChannelBanner:
|
|
4458
|
-
renderHeaderTitleBadges:
|
|
4459
|
-
customChannelActions:
|
|
4465
|
+
composerDisabledReason: b,
|
|
4466
|
+
showStarButton: x = !1,
|
|
4467
|
+
chatbotVotingEnabled: v = !1,
|
|
4468
|
+
renderChannelBanner: f,
|
|
4469
|
+
renderHeaderTitleBadges: N,
|
|
4470
|
+
customChannelActions: w,
|
|
4460
4471
|
renderChannelActions: C,
|
|
4461
|
-
renderMessage:
|
|
4462
|
-
dmAgentEnabled:
|
|
4472
|
+
renderMessage: R,
|
|
4473
|
+
dmAgentEnabled: S = !1,
|
|
4463
4474
|
viewerLanguage: D,
|
|
4464
4475
|
showChannelInfo: $ = !0,
|
|
4465
4476
|
onParticipantNameClick: F,
|
|
4466
4477
|
composerInput: L
|
|
4467
4478
|
}) => {
|
|
4468
|
-
var _,
|
|
4469
|
-
const { channel: y } = le(), { client:
|
|
4479
|
+
var _, A, H, q;
|
|
4480
|
+
const { channel: y } = le(), { client: E } = oe(), I = V.useMemo(
|
|
4470
4481
|
() => {
|
|
4471
4482
|
var Y;
|
|
4472
4483
|
return je(
|
|
4473
4484
|
(Y = y.state) == null ? void 0 : Y.members,
|
|
4474
|
-
|
|
4485
|
+
E == null ? void 0 : E.userID,
|
|
4475
4486
|
y.type
|
|
4476
4487
|
);
|
|
4477
4488
|
},
|
|
4478
|
-
[(_ = y.state) == null ? void 0 : _.members,
|
|
4479
|
-
),
|
|
4489
|
+
[(_ = y.state) == null ? void 0 : _.members, E == null ? void 0 : E.userID, y.type]
|
|
4490
|
+
), M = V.useMemo(() => {
|
|
4480
4491
|
var W;
|
|
4481
|
-
const Y =
|
|
4492
|
+
const Y = E == null ? void 0 : E.userID;
|
|
4482
4493
|
return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Q) => {
|
|
4483
4494
|
var de;
|
|
4484
4495
|
return ((de = Q.user) == null ? void 0 : de.id) === Y;
|
|
4485
4496
|
}) : void 0;
|
|
4486
|
-
}, [
|
|
4497
|
+
}, [E == null ? void 0 : E.userID, (A = y.state) == null ? void 0 : A.members]), T = ((H = M == null ? void 0 : M.user) == null ? void 0 : H.is_account) ?? (M == null ? void 0 : M.is_account), z = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), O = S && T === !1 && z === !0, j = y.state.messages.some(
|
|
4487
4498
|
(Y) => Y.type !== "deleted"
|
|
4488
|
-
), X =
|
|
4499
|
+
), X = f ? /* @__PURE__ */ s(V.Fragment, { children: f() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
|
|
4489
4500
|
pa,
|
|
4490
4501
|
{
|
|
4502
|
+
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4491
4503
|
onBack: e,
|
|
4492
4504
|
showBackButton: t,
|
|
4493
4505
|
showChannelInfo: $,
|
|
4494
|
-
showStarButton:
|
|
4506
|
+
showStarButton: x,
|
|
4495
4507
|
dmAgentEnabled: O,
|
|
4496
4508
|
onLeaveConversation: i,
|
|
4497
4509
|
onBlockParticipant: o,
|
|
4498
4510
|
showDeleteConversation: l,
|
|
4499
4511
|
showBlockParticipant: h,
|
|
4500
|
-
showReportParticipant:
|
|
4512
|
+
showReportParticipant: g,
|
|
4501
4513
|
onDeleteConversationClick: d,
|
|
4502
|
-
onBlockParticipantClick:
|
|
4514
|
+
onBlockParticipantClick: m,
|
|
4503
4515
|
onReportParticipantClick: p,
|
|
4504
|
-
customChannelActions:
|
|
4516
|
+
customChannelActions: w,
|
|
4505
4517
|
renderChannelActions: C,
|
|
4506
4518
|
onParticipantNameClick: F
|
|
4507
4519
|
}
|
|
4508
4520
|
) : null, K = Z(
|
|
4509
4521
|
(Y) => {
|
|
4510
4522
|
const { message: B } = _e("ChannelView"), W = /* @__PURE__ */ s(
|
|
4511
|
-
|
|
4523
|
+
xi,
|
|
4512
4524
|
{
|
|
4513
4525
|
...Y,
|
|
4514
|
-
chatbotVotingEnabled:
|
|
4526
|
+
chatbotVotingEnabled: v,
|
|
4515
4527
|
viewerLanguage: D
|
|
4516
4528
|
}
|
|
4517
4529
|
);
|
|
4518
|
-
return !
|
|
4530
|
+
return !R || !B ? W : R(W, B);
|
|
4519
4531
|
},
|
|
4520
|
-
[
|
|
4532
|
+
[v, R, D]
|
|
4521
4533
|
);
|
|
4522
|
-
return /* @__PURE__ */ s(
|
|
4534
|
+
return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
|
|
4523
4535
|
Sn,
|
|
4524
4536
|
{
|
|
4525
4537
|
overrides: {
|
|
4526
4538
|
Message: K,
|
|
4527
|
-
MessageActions:
|
|
4539
|
+
MessageActions: Ni
|
|
4528
4540
|
},
|
|
4529
|
-
children: /* @__PURE__ */
|
|
4530
|
-
!F && /* @__PURE__ */
|
|
4541
|
+
children: /* @__PURE__ */ u(En, { children: [
|
|
4542
|
+
!F && /* @__PURE__ */ u(te, { children: [
|
|
4531
4543
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4532
|
-
|
|
4544
|
+
Vi,
|
|
4533
4545
|
{
|
|
4534
4546
|
onBack: e,
|
|
4535
4547
|
showBackButton: t,
|
|
4536
4548
|
showChannelInfo: $,
|
|
4537
|
-
showStarButton:
|
|
4549
|
+
showStarButton: x,
|
|
4538
4550
|
dmAgentEnabled: O,
|
|
4539
4551
|
onLeaveConversation: i,
|
|
4540
4552
|
onBlockParticipant: o,
|
|
4541
4553
|
showDeleteConversation: l,
|
|
4542
4554
|
showBlockParticipant: h,
|
|
4543
|
-
showReportParticipant:
|
|
4555
|
+
showReportParticipant: g,
|
|
4544
4556
|
onDeleteConversationClick: d,
|
|
4545
|
-
onBlockParticipantClick:
|
|
4557
|
+
onBlockParticipantClick: m,
|
|
4546
4558
|
onReportParticipantClick: p,
|
|
4547
|
-
customChannelActions:
|
|
4559
|
+
customChannelActions: w,
|
|
4548
4560
|
renderChannelActions: C,
|
|
4549
|
-
renderHeaderTitleBadges:
|
|
4561
|
+
renderHeaderTitleBadges: N
|
|
4550
4562
|
}
|
|
4551
4563
|
) }, "lt-channel-header"),
|
|
4552
4564
|
X
|
|
4553
4565
|
] }),
|
|
4554
|
-
|
|
4555
|
-
te,
|
|
4556
|
-
X
|
|
4557
|
-
] }),
|
|
4558
|
-
/* @__PURE__ */ s(
|
|
4566
|
+
/* @__PURE__ */ u(
|
|
4559
4567
|
"div",
|
|
4560
4568
|
{
|
|
4561
4569
|
className: "flex-1 overflow-hidden relative",
|
|
4562
|
-
children:
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4570
|
+
children: [
|
|
4571
|
+
F && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
|
|
4572
|
+
ee,
|
|
4573
|
+
X
|
|
4574
|
+
] }) }),
|
|
4575
|
+
/* @__PURE__ */ s(
|
|
4576
|
+
In,
|
|
4577
|
+
{
|
|
4578
|
+
head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4579
|
+
ee,
|
|
4580
|
+
X
|
|
4581
|
+
] }) : void 0,
|
|
4582
|
+
hideDeletedMessages: !0,
|
|
4583
|
+
hideNewMessageSeparator: !1
|
|
4584
|
+
}
|
|
4585
|
+
)
|
|
4586
|
+
]
|
|
4573
4587
|
},
|
|
4574
4588
|
"lt-channel-message-list"
|
|
4575
4589
|
),
|
|
4576
4590
|
r ? /* @__PURE__ */ s(V.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
|
|
4577
4591
|
/* @__PURE__ */ s(
|
|
4578
|
-
|
|
4592
|
+
Ii,
|
|
4579
4593
|
{
|
|
4580
4594
|
...n && {
|
|
4581
4595
|
renderActions: () => n == null ? void 0 : n(y)
|
|
4582
4596
|
},
|
|
4583
4597
|
renderFooter: () => a == null ? void 0 : a(y),
|
|
4584
4598
|
disabled: c,
|
|
4585
|
-
disabledReason:
|
|
4599
|
+
disabledReason: b,
|
|
4586
4600
|
composerInput: L
|
|
4587
4601
|
},
|
|
4588
4602
|
"lt-channel-message-input"
|
|
@@ -4601,86 +4615,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4601
4615
|
onLeaveConversation: o,
|
|
4602
4616
|
onBlockParticipant: l,
|
|
4603
4617
|
className: d,
|
|
4604
|
-
CustomChannelEmptyState:
|
|
4618
|
+
CustomChannelEmptyState: m = Ui,
|
|
4605
4619
|
showDeleteConversation: p = !0,
|
|
4606
4620
|
onDeleteConversationClick: h,
|
|
4607
|
-
onBlockParticipantClick:
|
|
4621
|
+
onBlockParticipantClick: g,
|
|
4608
4622
|
onReportParticipantClick: c,
|
|
4609
|
-
showBlockParticipant:
|
|
4610
|
-
showReportParticipant:
|
|
4611
|
-
composerDisabled:
|
|
4612
|
-
composerDisabledReason:
|
|
4613
|
-
dmAgentEnabled:
|
|
4614
|
-
messageMetadata:
|
|
4623
|
+
showBlockParticipant: b = !0,
|
|
4624
|
+
showReportParticipant: x = !0,
|
|
4625
|
+
composerDisabled: v = !1,
|
|
4626
|
+
composerDisabledReason: f,
|
|
4627
|
+
dmAgentEnabled: N,
|
|
4628
|
+
messageMetadata: w,
|
|
4615
4629
|
onMessageSent: C,
|
|
4616
|
-
showStarButton:
|
|
4617
|
-
chatbotVotingEnabled:
|
|
4630
|
+
showStarButton: R = !1,
|
|
4631
|
+
chatbotVotingEnabled: S = !1,
|
|
4618
4632
|
renderChannelBanner: D,
|
|
4619
4633
|
renderHeaderTitleBadges: $,
|
|
4620
4634
|
customChannelActions: F,
|
|
4621
4635
|
renderChannelActions: L,
|
|
4622
4636
|
renderMessage: y,
|
|
4623
|
-
onMessageLinkClick:
|
|
4624
|
-
sendButton:
|
|
4625
|
-
attachmentPreviewList:
|
|
4626
|
-
viewerLanguage:
|
|
4637
|
+
onMessageLinkClick: E,
|
|
4638
|
+
sendButton: I,
|
|
4639
|
+
attachmentPreviewList: M,
|
|
4640
|
+
viewerLanguage: T,
|
|
4627
4641
|
showChannelInfo: z = !0,
|
|
4628
4642
|
onParticipantNameClick: O,
|
|
4629
4643
|
composerInput: j
|
|
4630
4644
|
}) => {
|
|
4631
4645
|
const X = Z(
|
|
4632
|
-
async (K, _,
|
|
4646
|
+
async (K, _, A) => {
|
|
4633
4647
|
var Q;
|
|
4634
|
-
const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q =
|
|
4648
|
+
const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = N && !H, Y = {
|
|
4635
4649
|
..._,
|
|
4636
4650
|
...q && { silent: !0 },
|
|
4637
|
-
...
|
|
4651
|
+
...w && {
|
|
4638
4652
|
metadata: {
|
|
4639
4653
|
..._.metadata ?? {},
|
|
4640
|
-
...
|
|
4654
|
+
...w
|
|
4641
4655
|
}
|
|
4642
4656
|
}
|
|
4643
4657
|
}, B = {
|
|
4644
|
-
...
|
|
4658
|
+
...A,
|
|
4645
4659
|
...q && { skip_push: !0 }
|
|
4646
4660
|
}, W = await e.sendMessage(Y, B);
|
|
4647
4661
|
return C == null || C(W), W;
|
|
4648
4662
|
},
|
|
4649
|
-
[e,
|
|
4650
|
-
),
|
|
4663
|
+
[e, N, w, C]
|
|
4664
|
+
), ee = G(null);
|
|
4651
4665
|
return J(() => {
|
|
4652
|
-
if (!
|
|
4653
|
-
const K =
|
|
4666
|
+
if (!E) return;
|
|
4667
|
+
const K = ee.current;
|
|
4654
4668
|
if (!K) return;
|
|
4655
|
-
const _ = (
|
|
4656
|
-
const H =
|
|
4669
|
+
const _ = (A) => {
|
|
4670
|
+
const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
|
|
4657
4671
|
if (!Y) return;
|
|
4658
4672
|
const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((de) => de.id === W) : void 0;
|
|
4659
|
-
|
|
4673
|
+
E(Y, Q);
|
|
4660
4674
|
};
|
|
4661
4675
|
return K.addEventListener("click", _), () => K.removeEventListener("click", _);
|
|
4662
|
-
}, [
|
|
4676
|
+
}, [E, e]), /* @__PURE__ */ s(
|
|
4663
4677
|
"div",
|
|
4664
4678
|
{
|
|
4665
|
-
ref:
|
|
4679
|
+
ref: ee,
|
|
4666
4680
|
className: k(
|
|
4667
4681
|
"messaging-channel-view h-full flex flex-col",
|
|
4668
4682
|
d
|
|
4669
4683
|
),
|
|
4670
|
-
children: /* @__PURE__ */ s(Os.Provider, { value:
|
|
4684
|
+
children: /* @__PURE__ */ s(Os.Provider, { value: N ?? !1, children: /* @__PURE__ */ s(
|
|
4671
4685
|
Cn,
|
|
4672
4686
|
{
|
|
4673
4687
|
channel: e,
|
|
4674
|
-
MessageSystem:
|
|
4675
|
-
EmptyStateIndicator:
|
|
4688
|
+
MessageSystem: Fi,
|
|
4689
|
+
EmptyStateIndicator: m,
|
|
4676
4690
|
LoadingIndicator: Be,
|
|
4677
4691
|
DateSeparator: ba,
|
|
4678
|
-
TypingIndicator:
|
|
4692
|
+
TypingIndicator: $i,
|
|
4679
4693
|
doSendMessageRequest: X,
|
|
4680
|
-
...
|
|
4681
|
-
...
|
|
4694
|
+
...I ? { SendButton: I } : {},
|
|
4695
|
+
...M ? { AttachmentPreviewList: M } : {},
|
|
4682
4696
|
children: /* @__PURE__ */ s(
|
|
4683
|
-
|
|
4697
|
+
Gi,
|
|
4684
4698
|
{
|
|
4685
4699
|
onBack: t,
|
|
4686
4700
|
showBackButton: n,
|
|
@@ -4689,24 +4703,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4689
4703
|
renderConversationFooter: i,
|
|
4690
4704
|
onLeaveConversation: o,
|
|
4691
4705
|
onBlockParticipant: l,
|
|
4692
|
-
CustomChannelEmptyState:
|
|
4706
|
+
CustomChannelEmptyState: m,
|
|
4693
4707
|
showDeleteConversation: p,
|
|
4694
4708
|
onDeleteConversationClick: h,
|
|
4695
|
-
onBlockParticipantClick:
|
|
4709
|
+
onBlockParticipantClick: g,
|
|
4696
4710
|
onReportParticipantClick: c,
|
|
4697
|
-
showBlockParticipant:
|
|
4698
|
-
showReportParticipant:
|
|
4699
|
-
composerDisabled:
|
|
4700
|
-
composerDisabledReason:
|
|
4701
|
-
showStarButton:
|
|
4702
|
-
dmAgentEnabled:
|
|
4703
|
-
chatbotVotingEnabled:
|
|
4711
|
+
showBlockParticipant: b,
|
|
4712
|
+
showReportParticipant: x,
|
|
4713
|
+
composerDisabled: v,
|
|
4714
|
+
composerDisabledReason: f,
|
|
4715
|
+
showStarButton: R,
|
|
4716
|
+
dmAgentEnabled: N,
|
|
4717
|
+
chatbotVotingEnabled: S,
|
|
4704
4718
|
renderChannelBanner: D,
|
|
4705
4719
|
renderHeaderTitleBadges: $,
|
|
4706
4720
|
customChannelActions: F,
|
|
4707
4721
|
renderChannelActions: L,
|
|
4708
4722
|
renderMessage: y,
|
|
4709
|
-
viewerLanguage:
|
|
4723
|
+
viewerLanguage: T,
|
|
4710
4724
|
showChannelInfo: z,
|
|
4711
4725
|
onParticipantNameClick: O,
|
|
4712
4726
|
composerInput: j
|
|
@@ -4719,7 +4733,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4719
4733
|
}
|
|
4720
4734
|
);
|
|
4721
4735
|
$s.displayName = "ChannelView";
|
|
4722
|
-
const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */
|
|
4736
|
+
const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
|
|
4723
4737
|
/* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
4724
4738
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
4725
4739
|
/* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
|
|
@@ -4734,7 +4748,7 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4734
4748
|
)
|
|
4735
4749
|
] }) }));
|
|
4736
4750
|
ke.displayName = "ErrorState";
|
|
4737
|
-
const
|
|
4751
|
+
const ul = ({
|
|
4738
4752
|
capabilities: e = {},
|
|
4739
4753
|
renderMessageInputActions: t,
|
|
4740
4754
|
renderConversationFooter: n,
|
|
@@ -4744,20 +4758,20 @@ const fl = ({
|
|
|
4744
4758
|
initialParticipantData: o,
|
|
4745
4759
|
CustomChannelEmptyState: l,
|
|
4746
4760
|
onBlockParticipantClick: d,
|
|
4747
|
-
onReportParticipantClick:
|
|
4761
|
+
onReportParticipantClick: m,
|
|
4748
4762
|
dmAgentEnabled: p,
|
|
4749
4763
|
onMessageSent: h,
|
|
4750
|
-
chatbotVotingEnabled:
|
|
4764
|
+
chatbotVotingEnabled: g = !1,
|
|
4751
4765
|
viewerLanguage: c,
|
|
4752
|
-
renderHeaderTitleBadges:
|
|
4753
|
-
renderChannelBanner:
|
|
4754
|
-
customChannelActions:
|
|
4755
|
-
renderChannelActions:
|
|
4756
|
-
onParticipantNameClick:
|
|
4757
|
-
renderMessage:
|
|
4766
|
+
renderHeaderTitleBadges: b,
|
|
4767
|
+
renderChannelBanner: x,
|
|
4768
|
+
customChannelActions: v,
|
|
4769
|
+
renderChannelActions: f,
|
|
4770
|
+
onParticipantNameClick: N,
|
|
4771
|
+
renderMessage: w,
|
|
4758
4772
|
onMessageLinkClick: C,
|
|
4759
|
-
showChannelInfo:
|
|
4760
|
-
composerInput:
|
|
4773
|
+
showChannelInfo: R,
|
|
4774
|
+
composerInput: S
|
|
4761
4775
|
}) => {
|
|
4762
4776
|
const {
|
|
4763
4777
|
client: D,
|
|
@@ -4765,29 +4779,29 @@ const fl = ({
|
|
|
4765
4779
|
isLoading: F,
|
|
4766
4780
|
error: L,
|
|
4767
4781
|
refreshConnection: y,
|
|
4768
|
-
service:
|
|
4769
|
-
debug:
|
|
4770
|
-
} = sa(), [
|
|
4782
|
+
service: E,
|
|
4783
|
+
debug: I
|
|
4784
|
+
} = sa(), [M, T] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: ee = !0 } = e, K = G(o);
|
|
4771
4785
|
K.current = o;
|
|
4772
4786
|
const _ = G(a);
|
|
4773
4787
|
_.current = a;
|
|
4774
|
-
const
|
|
4788
|
+
const A = G(null), H = G(null);
|
|
4775
4789
|
J(() => {
|
|
4776
|
-
H.current =
|
|
4777
|
-
}, [
|
|
4790
|
+
H.current = M;
|
|
4791
|
+
}, [M]), J(() => {
|
|
4778
4792
|
if (!D || !$) return;
|
|
4779
4793
|
const B = D.userID;
|
|
4780
4794
|
if (!B) return;
|
|
4781
4795
|
const W = `${B}::${i}`;
|
|
4782
|
-
if (
|
|
4783
|
-
|
|
4796
|
+
if (A.current === W) return;
|
|
4797
|
+
A.current = W;
|
|
4784
4798
|
const Q = () => {
|
|
4785
|
-
|
|
4799
|
+
A.current === W && (A.current = null);
|
|
4786
4800
|
};
|
|
4787
4801
|
(async () => {
|
|
4788
4802
|
var De, Le;
|
|
4789
4803
|
try {
|
|
4790
|
-
|
|
4804
|
+
I && console.log(
|
|
4791
4805
|
"[MessagingShell] Loading initial conversation with:",
|
|
4792
4806
|
i
|
|
4793
4807
|
);
|
|
@@ -4800,27 +4814,27 @@ const fl = ({
|
|
|
4800
4814
|
{ limit: 1 }
|
|
4801
4815
|
);
|
|
4802
4816
|
if (ae.length > 0) {
|
|
4803
|
-
|
|
4817
|
+
T(ae[0]), O(null), (De = _.current) == null || De.call(_, ae[0]), I && console.log(
|
|
4804
4818
|
"[MessagingShell] Initial conversation loaded:",
|
|
4805
4819
|
ae[0].id
|
|
4806
4820
|
);
|
|
4807
4821
|
return;
|
|
4808
4822
|
}
|
|
4809
4823
|
const ue = K.current;
|
|
4810
|
-
if (!ue || !
|
|
4811
|
-
Q(), O("No conversation found with this account"),
|
|
4824
|
+
if (!ue || !E) {
|
|
4825
|
+
Q(), O("No conversation found with this account"), I && console.log(
|
|
4812
4826
|
"[MessagingShell] No conversation found for:",
|
|
4813
4827
|
i
|
|
4814
4828
|
);
|
|
4815
4829
|
return;
|
|
4816
4830
|
}
|
|
4817
4831
|
try {
|
|
4818
|
-
const ie = await
|
|
4832
|
+
const ie = await E.startChannelWithParticipant({
|
|
4819
4833
|
id: ue.id,
|
|
4820
4834
|
name: ue.name,
|
|
4821
4835
|
phone: ue.phone
|
|
4822
4836
|
});
|
|
4823
|
-
|
|
4837
|
+
T(ie), O(null), (Le = _.current) == null || Le.call(_, ie), I && console.log(
|
|
4824
4838
|
"[MessagingShell] Channel created and loaded:",
|
|
4825
4839
|
ie.id
|
|
4826
4840
|
);
|
|
@@ -4837,12 +4851,12 @@ const fl = ({
|
|
|
4837
4851
|
), Q(), H.current || O("Failed to load conversation");
|
|
4838
4852
|
}
|
|
4839
4853
|
})();
|
|
4840
|
-
}, [i, D, $,
|
|
4854
|
+
}, [i, D, $, E, I]);
|
|
4841
4855
|
const q = G(r);
|
|
4842
4856
|
q.current = r;
|
|
4843
4857
|
const Y = Z(() => {
|
|
4844
4858
|
var B;
|
|
4845
|
-
|
|
4859
|
+
T(null), X(!0), (B = q.current) == null || B.call(q);
|
|
4846
4860
|
}, []);
|
|
4847
4861
|
return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: y }) : !$ || !D ? /* @__PURE__ */ s(
|
|
4848
4862
|
ke,
|
|
@@ -4850,36 +4864,36 @@ const fl = ({
|
|
|
4850
4864
|
message: "Not connected to messaging service",
|
|
4851
4865
|
onBack: y
|
|
4852
4866
|
}
|
|
4853
|
-
) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !
|
|
4867
|
+
) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !M ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : M ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
4854
4868
|
$s,
|
|
4855
4869
|
{
|
|
4856
|
-
channel:
|
|
4870
|
+
channel: M,
|
|
4857
4871
|
renderMessageInputActions: t,
|
|
4858
4872
|
renderConversationFooter: n,
|
|
4859
|
-
renderChannelBanner:
|
|
4873
|
+
renderChannelBanner: x,
|
|
4860
4874
|
onLeaveConversation: Y,
|
|
4861
4875
|
onBlockParticipant: Y,
|
|
4862
4876
|
CustomChannelEmptyState: l,
|
|
4863
|
-
showDeleteConversation:
|
|
4877
|
+
showDeleteConversation: ee,
|
|
4864
4878
|
onBlockParticipantClick: d,
|
|
4865
|
-
onReportParticipantClick:
|
|
4879
|
+
onReportParticipantClick: m,
|
|
4866
4880
|
dmAgentEnabled: p,
|
|
4867
4881
|
onMessageSent: h,
|
|
4868
|
-
chatbotVotingEnabled:
|
|
4882
|
+
chatbotVotingEnabled: g,
|
|
4869
4883
|
viewerLanguage: c,
|
|
4870
|
-
renderHeaderTitleBadges:
|
|
4871
|
-
customChannelActions:
|
|
4872
|
-
renderChannelActions:
|
|
4873
|
-
onParticipantNameClick:
|
|
4874
|
-
renderMessage:
|
|
4884
|
+
renderHeaderTitleBadges: b,
|
|
4885
|
+
customChannelActions: v,
|
|
4886
|
+
renderChannelActions: f,
|
|
4887
|
+
onParticipantNameClick: N,
|
|
4888
|
+
renderMessage: w,
|
|
4875
4889
|
onMessageLinkClick: C,
|
|
4876
|
-
showChannelInfo:
|
|
4877
|
-
composerInput:
|
|
4890
|
+
showChannelInfo: R,
|
|
4891
|
+
composerInput: S
|
|
4878
4892
|
},
|
|
4879
|
-
|
|
4893
|
+
M.id
|
|
4880
4894
|
) }) }) : /* @__PURE__ */ s(Be, {});
|
|
4881
4895
|
};
|
|
4882
|
-
function
|
|
4896
|
+
function Hi(e) {
|
|
4883
4897
|
const t = e.state.pending_messages;
|
|
4884
4898
|
if (t != null && t.length)
|
|
4885
4899
|
for (const n of t)
|
|
@@ -4893,18 +4907,18 @@ const Bs = V.createContext({
|
|
|
4893
4907
|
renderMessagePreview: void 0,
|
|
4894
4908
|
channelPreview: void 0,
|
|
4895
4909
|
viewerLanguage: void 0
|
|
4896
|
-
}),
|
|
4910
|
+
}), Yi = Bs.Provider, qi = () => V.useContext(Bs), Wi = (e, t) => {
|
|
4897
4911
|
const n = new Date(
|
|
4898
4912
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
4899
4913
|
), r = new Date(
|
|
4900
4914
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
4901
4915
|
).getTime() - n.getTime();
|
|
4902
4916
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
4903
|
-
},
|
|
4917
|
+
}, Xi = (e) => {
|
|
4904
4918
|
const t = /* @__PURE__ */ new Date();
|
|
4905
4919
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
4906
4920
|
return "Just now";
|
|
4907
|
-
const a =
|
|
4921
|
+
const a = Wi(e, t);
|
|
4908
4922
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
4909
4923
|
hour: "numeric",
|
|
4910
4924
|
minute: "2-digit",
|
|
@@ -4924,7 +4938,7 @@ const Bs = V.createContext({
|
|
|
4924
4938
|
channelPreview: o,
|
|
4925
4939
|
renderMessagePreview: l,
|
|
4926
4940
|
viewerLanguage: d
|
|
4927
|
-
} =
|
|
4941
|
+
} = qi(), { client: m } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
|
|
4928
4942
|
if (o)
|
|
4929
4943
|
return /* @__PURE__ */ s(
|
|
4930
4944
|
o,
|
|
@@ -4936,40 +4950,40 @@ const Bs = V.createContext({
|
|
|
4936
4950
|
viewerLanguage: d
|
|
4937
4951
|
}
|
|
4938
4952
|
);
|
|
4939
|
-
const
|
|
4953
|
+
const g = () => {
|
|
4940
4954
|
t && r(t);
|
|
4941
4955
|
}, c = (y) => {
|
|
4942
|
-
const
|
|
4943
|
-
!
|
|
4944
|
-
},
|
|
4956
|
+
const E = y.key === "Enter" || y.key === " ", I = y.repeat;
|
|
4957
|
+
!E || I || (y.preventDefault(), g());
|
|
4958
|
+
}, b = je(
|
|
4945
4959
|
($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
|
|
4946
|
-
|
|
4960
|
+
m == null ? void 0 : m.userID,
|
|
4947
4961
|
t == null ? void 0 : t.type
|
|
4948
|
-
),
|
|
4949
|
-
var
|
|
4950
|
-
const y = (
|
|
4962
|
+
), x = ut(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, f = (() => {
|
|
4963
|
+
var E;
|
|
4964
|
+
const y = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
|
|
4951
4965
|
if (y != null && y.length) {
|
|
4952
|
-
for (let
|
|
4953
|
-
if (y[
|
|
4966
|
+
for (let I = y.length - 1; I >= 0; I--)
|
|
4967
|
+
if (y[I].type !== "system") return y[I];
|
|
4954
4968
|
}
|
|
4955
|
-
})(),
|
|
4969
|
+
})(), w = (() => {
|
|
4956
4970
|
var z, O, j, X;
|
|
4957
4971
|
const y = hs({
|
|
4958
|
-
message:
|
|
4972
|
+
message: f,
|
|
4959
4973
|
viewerLanguage: d
|
|
4960
4974
|
});
|
|
4961
|
-
if (((z =
|
|
4962
|
-
if (((O =
|
|
4963
|
-
if (((j =
|
|
4975
|
+
if (((z = f == null ? void 0 : f.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
|
|
4976
|
+
if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
|
|
4977
|
+
if (((j = f == null ? void 0 : f.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
|
|
4964
4978
|
return y ? `📎 ${y}` : "📎 Sent an attachment";
|
|
4965
4979
|
if (y) return y;
|
|
4966
|
-
const
|
|
4967
|
-
return
|
|
4968
|
-
})(), C =
|
|
4980
|
+
const T = (X = f == null ? void 0 : f.attachments) == null ? void 0 : X[0];
|
|
4981
|
+
return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
4982
|
+
})(), C = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", R = f ? Fe(f) : !1, S = l ? l(f, w) : `${R ? "✨ " : ""}${w}`, D = n ?? 0;
|
|
4969
4983
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
4970
4984
|
channelId: t == null ? void 0 : t.id,
|
|
4971
4985
|
isSelected: p,
|
|
4972
|
-
participantName:
|
|
4986
|
+
participantName: x,
|
|
4973
4987
|
unreadCount: D,
|
|
4974
4988
|
hasTimestamp: !!C
|
|
4975
4989
|
}), /* @__PURE__ */ s(
|
|
@@ -4977,7 +4991,7 @@ const Bs = V.createContext({
|
|
|
4977
4991
|
{
|
|
4978
4992
|
role: "button",
|
|
4979
4993
|
tabIndex: 0,
|
|
4980
|
-
onClick:
|
|
4994
|
+
onClick: g,
|
|
4981
4995
|
onKeyDown: c,
|
|
4982
4996
|
className: k(
|
|
4983
4997
|
"group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
|
|
@@ -4987,20 +5001,20 @@ const Bs = V.createContext({
|
|
|
4987
5001
|
}
|
|
4988
5002
|
),
|
|
4989
5003
|
"data-dd-privacy": "mask",
|
|
4990
|
-
children: /* @__PURE__ */
|
|
5004
|
+
children: /* @__PURE__ */ u("div", { className: "flex items-start gap-4", children: [
|
|
4991
5005
|
/* @__PURE__ */ s(
|
|
4992
5006
|
ne,
|
|
4993
5007
|
{
|
|
4994
|
-
id: ((L =
|
|
4995
|
-
name:
|
|
4996
|
-
image:
|
|
5008
|
+
id: ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) || t.id || "unknown",
|
|
5009
|
+
name: x,
|
|
5010
|
+
image: v,
|
|
4997
5011
|
size: 48,
|
|
4998
5012
|
starred: h
|
|
4999
5013
|
}
|
|
5000
5014
|
),
|
|
5001
|
-
/* @__PURE__ */
|
|
5002
|
-
/* @__PURE__ */
|
|
5003
|
-
/* @__PURE__ */
|
|
5015
|
+
/* @__PURE__ */ u("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
5016
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2", children: [
|
|
5017
|
+
/* @__PURE__ */ u(
|
|
5004
5018
|
"h3",
|
|
5005
5019
|
{
|
|
5006
5020
|
className: k(
|
|
@@ -5008,14 +5022,14 @@ const Bs = V.createContext({
|
|
|
5008
5022
|
),
|
|
5009
5023
|
children: [
|
|
5010
5024
|
h && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
|
|
5011
|
-
|
|
5025
|
+
x
|
|
5012
5026
|
]
|
|
5013
5027
|
}
|
|
5014
5028
|
),
|
|
5015
5029
|
C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
|
|
5016
5030
|
] }),
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children:
|
|
5031
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
5032
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
|
|
5019
5033
|
D > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: D > 99 ? "99+" : D })
|
|
5020
5034
|
] })
|
|
5021
5035
|
] })
|
|
@@ -5025,42 +5039,42 @@ const Bs = V.createContext({
|
|
|
5025
5039
|
}
|
|
5026
5040
|
);
|
|
5027
5041
|
Us.displayName = "CustomChannelPreview";
|
|
5028
|
-
const
|
|
5042
|
+
const Ki = { last_message_at: -1 }, Ji = V.memo(
|
|
5029
5043
|
({
|
|
5030
5044
|
onChannelSelect: e,
|
|
5031
5045
|
selectedChannel: t,
|
|
5032
5046
|
filters: n,
|
|
5033
5047
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5034
5048
|
channelRenderFilterFn: r,
|
|
5035
|
-
sort: i =
|
|
5049
|
+
sort: i = Ki,
|
|
5036
5050
|
className: o,
|
|
5037
5051
|
customEmptyStateIndicator: l,
|
|
5038
5052
|
channelListPaginator: d = An,
|
|
5039
|
-
channelPreview:
|
|
5053
|
+
channelPreview: m,
|
|
5040
5054
|
renderMessagePreview: p,
|
|
5041
5055
|
viewerLanguage: h
|
|
5042
5056
|
}) => {
|
|
5043
|
-
const
|
|
5044
|
-
|
|
5045
|
-
const { debug: c = !1 } =
|
|
5046
|
-
(
|
|
5047
|
-
for (const
|
|
5048
|
-
|
|
5049
|
-
return r ? r(
|
|
5057
|
+
const g = V.useRef(0);
|
|
5058
|
+
g.current++;
|
|
5059
|
+
const { debug: c = !1 } = ct(), b = V.useCallback(
|
|
5060
|
+
(v) => {
|
|
5061
|
+
for (const f of v)
|
|
5062
|
+
Hi(f);
|
|
5063
|
+
return r ? r(v) : v;
|
|
5050
5064
|
},
|
|
5051
5065
|
[r]
|
|
5052
5066
|
);
|
|
5053
5067
|
c && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5054
|
-
renderCount:
|
|
5068
|
+
renderCount: g.current,
|
|
5055
5069
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5056
5070
|
filters: n
|
|
5057
5071
|
});
|
|
5058
|
-
const
|
|
5072
|
+
const x = V.useMemo(
|
|
5059
5073
|
() => ({
|
|
5060
5074
|
selectedChannel: t,
|
|
5061
5075
|
onChannelSelect: e,
|
|
5062
5076
|
debug: c,
|
|
5063
|
-
channelPreview:
|
|
5077
|
+
channelPreview: m,
|
|
5064
5078
|
renderMessagePreview: p,
|
|
5065
5079
|
viewerLanguage: h
|
|
5066
5080
|
}),
|
|
@@ -5068,7 +5082,7 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5068
5082
|
t,
|
|
5069
5083
|
e,
|
|
5070
5084
|
c,
|
|
5071
|
-
|
|
5085
|
+
m,
|
|
5072
5086
|
p,
|
|
5073
5087
|
h
|
|
5074
5088
|
]
|
|
@@ -5080,14 +5094,14 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5080
5094
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5081
5095
|
o
|
|
5082
5096
|
),
|
|
5083
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5097
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: x, children: /* @__PURE__ */ s(
|
|
5084
5098
|
Tn,
|
|
5085
5099
|
{
|
|
5086
5100
|
filters: n,
|
|
5087
5101
|
sort: i,
|
|
5088
5102
|
options: { limit: 30 },
|
|
5089
5103
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
5090
|
-
channelRenderFilterFn:
|
|
5104
|
+
channelRenderFilterFn: b,
|
|
5091
5105
|
Paginator: d,
|
|
5092
5106
|
Preview: Us,
|
|
5093
5107
|
EmptyStateIndicator: l
|
|
@@ -5098,8 +5112,8 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5098
5112
|
);
|
|
5099
5113
|
}
|
|
5100
5114
|
);
|
|
5101
|
-
|
|
5102
|
-
const
|
|
5115
|
+
Ji.displayName = "ChannelList";
|
|
5116
|
+
const Zi = ({
|
|
5103
5117
|
question: e,
|
|
5104
5118
|
onClick: t,
|
|
5105
5119
|
loading: n = !1,
|
|
@@ -5121,7 +5135,7 @@ const tl = ({
|
|
|
5121
5135
|
),
|
|
5122
5136
|
children: e
|
|
5123
5137
|
}
|
|
5124
|
-
),
|
|
5138
|
+
), ml = ({
|
|
5125
5139
|
faqs: e,
|
|
5126
5140
|
onFaqClick: t,
|
|
5127
5141
|
loadingFaqId: n,
|
|
@@ -5130,8 +5144,8 @@ const tl = ({
|
|
|
5130
5144
|
avatarImage: i,
|
|
5131
5145
|
avatarName: o
|
|
5132
5146
|
}) => {
|
|
5133
|
-
const l = e.filter((d) => d.enabled).sort((d,
|
|
5134
|
-
return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */
|
|
5147
|
+
const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
|
|
5148
|
+
return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ u("div", { className: "flex gap-3 items-end", children: [
|
|
5135
5149
|
(i || o) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
|
|
5136
5150
|
ne,
|
|
5137
5151
|
{
|
|
@@ -5142,7 +5156,7 @@ const tl = ({
|
|
|
5142
5156
|
shape: "circle"
|
|
5143
5157
|
}
|
|
5144
5158
|
) }),
|
|
5145
|
-
/* @__PURE__ */
|
|
5159
|
+
/* @__PURE__ */ u(
|
|
5146
5160
|
"div",
|
|
5147
5161
|
{
|
|
5148
5162
|
className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
|
|
@@ -5150,7 +5164,7 @@ const tl = ({
|
|
|
5150
5164
|
children: [
|
|
5151
5165
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5152
5166
|
l.map((d) => /* @__PURE__ */ s(
|
|
5153
|
-
|
|
5167
|
+
Zi,
|
|
5154
5168
|
{
|
|
5155
5169
|
question: d.question,
|
|
5156
5170
|
onClick: () => t(d.id),
|
|
@@ -5165,29 +5179,29 @@ const tl = ({
|
|
|
5165
5179
|
};
|
|
5166
5180
|
export {
|
|
5167
5181
|
bs as A,
|
|
5168
|
-
|
|
5169
|
-
|
|
5182
|
+
dl as B,
|
|
5183
|
+
Ui as C,
|
|
5170
5184
|
Ur as D,
|
|
5171
5185
|
xa as E,
|
|
5172
|
-
|
|
5186
|
+
ml as F,
|
|
5173
5187
|
sa as G,
|
|
5174
5188
|
es as L,
|
|
5175
|
-
|
|
5189
|
+
ol as M,
|
|
5176
5190
|
Ne as a,
|
|
5177
5191
|
ne as b,
|
|
5178
|
-
|
|
5192
|
+
Ji as c,
|
|
5179
5193
|
$s as d,
|
|
5180
|
-
|
|
5181
|
-
|
|
5194
|
+
cl as e,
|
|
5195
|
+
Zi as f,
|
|
5182
5196
|
ce as g,
|
|
5183
5197
|
Zt as h,
|
|
5184
5198
|
ye as i,
|
|
5185
5199
|
qr as j,
|
|
5186
|
-
|
|
5187
|
-
|
|
5200
|
+
ll as k,
|
|
5201
|
+
ul as l,
|
|
5188
5202
|
rr as m,
|
|
5189
5203
|
sr as n,
|
|
5190
|
-
|
|
5204
|
+
Xi as o,
|
|
5191
5205
|
ar as p,
|
|
5192
5206
|
hs as q,
|
|
5193
5207
|
we as r,
|
|
@@ -5196,8 +5210,8 @@ export {
|
|
|
5196
5210
|
Xa as u,
|
|
5197
5211
|
wa as v,
|
|
5198
5212
|
je as w,
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5213
|
+
gt as x,
|
|
5214
|
+
pt as y,
|
|
5215
|
+
ut as z
|
|
5202
5216
|
};
|
|
5203
|
-
//# sourceMappingURL=index-
|
|
5217
|
+
//# sourceMappingURL=index-C2r41RoF.js.map
|