@linktr.ee/messaging-react 3.13.4 → 3.14.0-rc-1784604876
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-C0aP28ZH.cjs → Card-5OElkb1I.cjs} +2 -2
- package/dist/{Card-C0aP28ZH.cjs.map → Card-5OElkb1I.cjs.map} +1 -1
- package/dist/{Card-fPhu90tj.js → Card-BcvG9C1y.js} +2 -2
- package/dist/{Card-fPhu90tj.js.map → Card-BcvG9C1y.js.map} +1 -1
- package/dist/{index-Cw1ij-Py.js → index-0uNeCMZl.js} +303 -300
- package/dist/{index-Cw1ij-Py.js.map → index-0uNeCMZl.js.map} +1 -1
- package/dist/{index-34_jzKSz.cjs → index-CBSdgfCs.cjs} +2 -2
- package/dist/{index-34_jzKSz.cjs.map → index-CBSdgfCs.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/testing.d.ts +9 -0
- package/package.json +2 -2
- package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +98 -1
- package/src/components/CustomMessageInput/index.tsx +28 -0
- package/src/stream-custom-data.ts +9 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import V, { createContext as dt, useContext as Te, useCallback as Q, useState as
|
|
2
|
+
import V, { createContext as dt, useContext as Te, useCallback as Q, useState as U, useRef as G, useEffect as K, useId as qs, useMemo as re, Suspense as Ws } from "react";
|
|
3
3
|
import { StreamChatService as Xs } from "@linktr.ee/messaging-core";
|
|
4
4
|
import { StreamChat as Ks, LinkPreviewsManager as Ht } from "stream-chat";
|
|
5
|
-
import { Chat as Zs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as Js, MessageStatus as Qs, useMessageContext as Ne, MessageErrorIcon as at, MessageText as $e, areMessageUIPropsEqual as en, useMessageReminder as tn, useComponentContext as cs, Attachment as sn, EditMessageModal as nn, MessageBlocked as an, MessageBouncePrompt as rn, MessageDeleted as ln, MessageIsThreadReplyInChannelButtonIndicator as on, MessageRepliesCountButton as cn, ReminderNotification as dn, StreamedMessageText as un, messageHasAttachments as mn, messageHasReactions as hn, isDateSeparatorMessage as fn, isMessageBlocked as gn, isMessageBounced as pn, MessageBounceModal as bn, Poll as vn, useMessageComposer as xn, useStateStore as
|
|
6
|
-
import { StarIcon as Ie, DotsThreeIcon as Ln, SpinnerGapIcon as Pe, SignOutIcon as Dn, ProhibitInsetIcon as Xt, FlagIcon as ds, ArrowLeftIcon as rt, CurrencyDollarIcon as zn, CaretRightIcon as xe, SparkleIcon as
|
|
5
|
+
import { Chat as Zs, useChannelStateContext as oe, useChatContext as fe, DateSeparator as Js, MessageStatus as Qs, useMessageContext as Ne, MessageErrorIcon as at, MessageText as $e, areMessageUIPropsEqual as en, useMessageReminder as tn, useComponentContext as cs, Attachment as sn, EditMessageModal as nn, MessageBlocked as an, MessageBouncePrompt as rn, MessageDeleted as ln, MessageIsThreadReplyInChannelButtonIndicator as on, MessageRepliesCountButton as cn, ReminderNotification as dn, StreamedMessageText as un, messageHasAttachments as mn, messageHasReactions as hn, isDateSeparatorMessage as fn, isMessageBlocked as gn, isMessageBounced as pn, MessageBounceModal as bn, Poll as vn, useMessageComposer as xn, useStateStore as _n, MessageInput as qt, useMessageInputContext as wn, useMessageComposerHasSendableData as Nn, AttachmentPreviewList as yn, QuotedMessagePreview as kn, TextareaComposer as Cn, MessageTimestamp as Ke, AIStates as Ze, useTypingContext as Sn, useAIState as En, Channel as In, WithComponents as Tn, Window as Mn, MessageList as Wt, ChannelList as An, InfiniteScroll as Rn } from "stream-chat-react";
|
|
6
|
+
import { StarIcon as Ie, DotsThreeIcon as Ln, SpinnerGapIcon as Pe, SignOutIcon as Dn, ProhibitInsetIcon as Xt, FlagIcon as ds, ArrowLeftIcon as rt, CurrencyDollarIcon as zn, CaretRightIcon as xe, SparkleIcon as _e, FileIcon as us, ImageIcon as Pn, SpeakerHighIcon as On, VideoCameraIcon as ms, FileMdIcon as Fn, FileTextIcon as $n, FileZipIcon as Bn, FilePptIcon as Un, FileCsvIcon as jn, FileXlsIcon as Vn, FileDocIcon as Gn, FilePdfIcon as Yn, CircleNotchIcon as Se, PlayIcon as it, PauseIcon as Hn, LinkIcon as qn, DownloadSimpleIcon as Ee, XIcon as Ye, CaretLeftIcon as Wn, GiftIcon as Xn, ThumbsUpIcon as Kn, ThumbsDownIcon as Zn, ChecksIcon as Jn, PencilSimpleIcon as Qn, TrashSimpleIcon as ea, ArrowUpIcon as ta, ProhibitIcon as sa } from "@phosphor-icons/react";
|
|
7
7
|
import C from "classnames";
|
|
8
8
|
import { MessageActions as na, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
|
|
9
9
|
const fs = dt({
|
|
@@ -16,7 +16,7 @@ const fs = dt({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), ut = () => Te(fs),
|
|
19
|
+
}), ut = () => Te(fs), pl = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: n,
|
|
@@ -38,7 +38,7 @@ const fs = dt({
|
|
|
38
38
|
serviceConfig: !!n,
|
|
39
39
|
capabilities: Object.keys(r)
|
|
40
40
|
});
|
|
41
|
-
const [d, m] =
|
|
41
|
+
const [d, m] = U(null), [g, h] = U(null), [f, c] = U(!1), [b, v] = U(!1), [x, p] = U(null), w = G(!1), _ = G(null), S = G(n);
|
|
42
42
|
S.current = n;
|
|
43
43
|
const z = G(i);
|
|
44
44
|
z.current = i;
|
|
@@ -69,7 +69,7 @@ const fs = dt({
|
|
|
69
69
|
K(() => {
|
|
70
70
|
const M = R.current, O = S.current;
|
|
71
71
|
if (o) {
|
|
72
|
-
|
|
72
|
+
_.current = null, m(null), h(null), c(!1), p(null), v(!1);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
if (!a || !D || !O) {
|
|
@@ -89,7 +89,7 @@ const fs = dt({
|
|
|
89
89
|
debug: z.current,
|
|
90
90
|
client: D
|
|
91
91
|
});
|
|
92
|
-
|
|
92
|
+
_.current = $, m($), l("✅ SERVICE SET", {
|
|
93
93
|
renderCount: M,
|
|
94
94
|
serviceInstance: !!$
|
|
95
95
|
});
|
|
@@ -101,7 +101,7 @@ const fs = dt({
|
|
|
101
101
|
hasService: !!d,
|
|
102
102
|
hasUser: !!t,
|
|
103
103
|
userId: t == null ? void 0 : t.id,
|
|
104
|
-
isConnecting:
|
|
104
|
+
isConnecting: w.current,
|
|
105
105
|
isConnected: f,
|
|
106
106
|
dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
|
|
107
107
|
}), o)
|
|
@@ -110,7 +110,7 @@ const fs = dt({
|
|
|
110
110
|
l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
if (
|
|
113
|
+
if (w.current) {
|
|
114
114
|
l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
@@ -122,7 +122,7 @@ const fs = dt({
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
(async () => {
|
|
125
|
-
l("🚀 STARTING USER CONNECTION", { userId: t.id }),
|
|
125
|
+
l("🚀 STARTING USER CONNECTION", { userId: t.id }), w.current = !0, v(!0), p(null);
|
|
126
126
|
try {
|
|
127
127
|
l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
|
|
128
128
|
const j = await d.connectUser(t);
|
|
@@ -137,7 +137,7 @@ const fs = dt({
|
|
|
137
137
|
error: Z
|
|
138
138
|
});
|
|
139
139
|
} finally {
|
|
140
|
-
v(!1),
|
|
140
|
+
v(!1), w.current = !1, l("🔄 USER CONNECTION FINISHED", {
|
|
141
141
|
userId: t.id,
|
|
142
142
|
isConnected: f
|
|
143
143
|
});
|
|
@@ -147,7 +147,7 @@ const fs = dt({
|
|
|
147
147
|
const M = D;
|
|
148
148
|
return () => {
|
|
149
149
|
var O;
|
|
150
|
-
M && (L.current = null, (O =
|
|
150
|
+
M && (L.current = null, (O = _.current) == null || O.disconnectUser().catch(console.error));
|
|
151
151
|
};
|
|
152
152
|
}, [D]);
|
|
153
153
|
const y = Q(async () => {
|
|
@@ -226,7 +226,7 @@ const fs = dt({
|
|
|
226
226
|
) : e });
|
|
227
227
|
}, aa = () => ut(), mt = (e) => {
|
|
228
228
|
var a, r;
|
|
229
|
-
const [t, n] =
|
|
229
|
+
const [t, n] = U(
|
|
230
230
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
231
231
|
);
|
|
232
232
|
return K(() => {
|
|
@@ -408,10 +408,10 @@ const ne = ({
|
|
|
408
408
|
logLabel: g = "useChannelModerationActions"
|
|
409
409
|
}) => {
|
|
410
410
|
var I;
|
|
411
|
-
const { service: h, debug: f } = ut(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [v, x] =
|
|
411
|
+
const { service: h, debug: f } = ut(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, b = !!(a && n && h && c), [v, x] = U(!1), [p, w] = U(null), [_, S] = U(!1), [z, E] = U(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== h);
|
|
412
412
|
return K(() => {
|
|
413
413
|
if (!b || !h || !c) {
|
|
414
|
-
x(!1),
|
|
414
|
+
x(!1), w(null);
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
let k = !1;
|
|
@@ -427,7 +427,7 @@ const ne = ({
|
|
|
427
427
|
} catch (T) {
|
|
428
428
|
k || console.error(`[${g}] Failed to check blocked status:`, T);
|
|
429
429
|
} finally {
|
|
430
|
-
k ||
|
|
430
|
+
k || w({ participantId: c, service: h });
|
|
431
431
|
}
|
|
432
432
|
})(), () => {
|
|
433
433
|
k = !0;
|
|
@@ -435,11 +435,11 @@ const ne = ({
|
|
|
435
435
|
}, [b, h, c, g]), {
|
|
436
436
|
isParticipantBlocked: v,
|
|
437
437
|
isCheckingBlockedStatus: R,
|
|
438
|
-
isLeaving:
|
|
438
|
+
isLeaving: _,
|
|
439
439
|
isUpdatingBlockStatus: z,
|
|
440
440
|
handleLeaveConversation: async () => {
|
|
441
441
|
var k;
|
|
442
|
-
if (!
|
|
442
|
+
if (!_) {
|
|
443
443
|
o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), S(!0);
|
|
444
444
|
try {
|
|
445
445
|
const T = ((k = e._client) == null ? void 0 : k.userID) ?? null;
|
|
@@ -512,10 +512,10 @@ const ne = ({
|
|
|
512
512
|
customChannelActions: g,
|
|
513
513
|
triggerClassName: h
|
|
514
514
|
}) => {
|
|
515
|
-
const [f, c] =
|
|
515
|
+
const [f, c] = U(!1), b = G(null), v = qs(), x = Q(() => c(!1), []), {
|
|
516
516
|
isParticipantBlocked: p,
|
|
517
|
-
isCheckingBlockedStatus:
|
|
518
|
-
isLeaving:
|
|
517
|
+
isCheckingBlockedStatus: w,
|
|
518
|
+
isLeaving: _,
|
|
519
519
|
isUpdatingBlockStatus: S,
|
|
520
520
|
handleLeaveConversation: z,
|
|
521
521
|
handleBlockUser: E,
|
|
@@ -574,15 +574,15 @@ const ne = ({
|
|
|
574
574
|
ye,
|
|
575
575
|
{
|
|
576
576
|
onClick: z,
|
|
577
|
-
disabled:
|
|
578
|
-
"aria-busy":
|
|
577
|
+
disabled: _,
|
|
578
|
+
"aria-busy": _,
|
|
579
579
|
children: [
|
|
580
|
-
|
|
580
|
+
_ ? /* @__PURE__ */ s(Pe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Dn, { className: "h-5 w-5" }),
|
|
581
581
|
/* @__PURE__ */ s("span", { children: "Delete Conversation" })
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
a && /* @__PURE__ */ s("li", { children:
|
|
585
|
+
a && /* @__PURE__ */ s("li", { children: w ? (
|
|
586
586
|
// Block status not yet resolved — show a disabled placeholder
|
|
587
587
|
// so a premature click can't act on a stale block state.
|
|
588
588
|
/* @__PURE__ */ u(ye, { disabled: !0, "aria-busy": !0, children: [
|
|
@@ -641,17 +641,17 @@ const ne = ({
|
|
|
641
641
|
onParticipantNameClick: x
|
|
642
642
|
}) => {
|
|
643
643
|
var D, L, y, I;
|
|
644
|
-
const { channel: p } = oe(), { client:
|
|
644
|
+
const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
|
|
645
645
|
() => {
|
|
646
646
|
var k;
|
|
647
647
|
return He(
|
|
648
648
|
(k = p.state) == null ? void 0 : k.members,
|
|
649
|
-
|
|
649
|
+
w == null ? void 0 : w.userID,
|
|
650
650
|
p.type
|
|
651
651
|
);
|
|
652
652
|
},
|
|
653
|
-
[(D = p.state) == null ? void 0 : D.members,
|
|
654
|
-
), S = ht(
|
|
653
|
+
[(D = p.state) == null ? void 0 : D.members, w == null ? void 0 : w.userID, p.type]
|
|
654
|
+
), S = ht(_ == null ? void 0 : _.user), z = (L = _ == null ? void 0 : _.user) == null ? void 0 : L.image, E = mt(p), R = pa((y = p.data) == null ? void 0 : y.customer_tag) && (_ == null ? void 0 : _.is_follower) === !0, F = async () => {
|
|
655
655
|
try {
|
|
656
656
|
E ? await p.unpin() : await p.pin();
|
|
657
657
|
} catch (k) {
|
|
@@ -694,7 +694,7 @@ const ne = ({
|
|
|
694
694
|
/* @__PURE__ */ s(
|
|
695
695
|
ne,
|
|
696
696
|
{
|
|
697
|
-
id: ((I =
|
|
697
|
+
id: ((I = _ == null ? void 0 : _.user) == null ? void 0 : I.id) || p.id || "unknown",
|
|
698
698
|
name: S,
|
|
699
699
|
image: z,
|
|
700
700
|
dmAgentEnabled: r,
|
|
@@ -734,7 +734,7 @@ const ne = ({
|
|
|
734
734
|
] })
|
|
735
735
|
] }),
|
|
736
736
|
r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
|
|
737
|
-
/* @__PURE__ */ s(
|
|
737
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
738
738
|
/* @__PURE__ */ s("span", { children: ga })
|
|
739
739
|
] })
|
|
740
740
|
] })
|
|
@@ -766,7 +766,7 @@ const ne = ({
|
|
|
766
766
|
lt,
|
|
767
767
|
{
|
|
768
768
|
channel: p,
|
|
769
|
-
participant:
|
|
769
|
+
participant: _,
|
|
770
770
|
showDeleteConversation: l,
|
|
771
771
|
showBlockParticipant: d,
|
|
772
772
|
showReportParticipant: m,
|
|
@@ -787,7 +787,7 @@ const ne = ({
|
|
|
787
787
|
function xa(e) {
|
|
788
788
|
return e != null && e.length ? e.some((t) => t.type === ct) ? "down" : e.some((t) => t.type === ot) ? "up" : null : null;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function _a(e) {
|
|
791
791
|
const { channel: t } = oe(), { client: n } = fe("useMessageVote"), a = re(
|
|
792
792
|
() => xa(e.own_reactions),
|
|
793
793
|
[e.own_reactions]
|
|
@@ -814,7 +814,7 @@ function wa(e) {
|
|
|
814
814
|
}, [t, n == null ? void 0 : n.userID, e.id, a]);
|
|
815
815
|
return { selected: a, voteUp: r, voteDown: i };
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function wa(e) {
|
|
818
818
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
819
819
|
}
|
|
820
820
|
function ps({
|
|
@@ -822,7 +822,7 @@ function ps({
|
|
|
822
822
|
viewerLanguage: t
|
|
823
823
|
}) {
|
|
824
824
|
var r;
|
|
825
|
-
const n = e == null ? void 0 : e.text, a =
|
|
825
|
+
const n = e == null ? void 0 : e.text, a = wa(t);
|
|
826
826
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
|
|
827
827
|
}
|
|
828
828
|
const Na = ["linktr.ee"], Jt = "messaging-attachment-v1_0";
|
|
@@ -875,8 +875,8 @@ const Sa = {
|
|
|
875
875
|
doc: Gn,
|
|
876
876
|
xls: Vn,
|
|
877
877
|
csv: jn,
|
|
878
|
-
ppt:
|
|
879
|
-
zip:
|
|
878
|
+
ppt: Un,
|
|
879
|
+
zip: Bn,
|
|
880
880
|
text: $n,
|
|
881
881
|
markdown: Fn,
|
|
882
882
|
generic: us
|
|
@@ -885,7 +885,7 @@ function Ia(e) {
|
|
|
885
885
|
const t = ce(e);
|
|
886
886
|
return t !== "document" ? Sa[t] : Ea[bs(e)];
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function we(e, t) {
|
|
889
889
|
return V.createElement(Ia(e), t);
|
|
890
890
|
}
|
|
891
891
|
const Ta = (e) => {
|
|
@@ -903,7 +903,7 @@ const Ta = (e) => {
|
|
|
903
903
|
muted: d = !1,
|
|
904
904
|
onContainerClick: m
|
|
905
905
|
}) => {
|
|
906
|
-
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] =
|
|
906
|
+
const g = ce(t), h = G(null), f = G(null), c = G(null), b = G(r), [v, x] = U(a), [p, w] = U(0), [_, S] = U(!1), [z, E] = U(!1), [R, F] = U(!1), [D, L] = U(!1), [y, I] = U(!0), [k, T] = U(null), M = Q(() => {
|
|
907
907
|
F(!1), x(!0);
|
|
908
908
|
}, []), O = Q((N) => {
|
|
909
909
|
const A = f.current;
|
|
@@ -919,7 +919,7 @@ const Ta = (e) => {
|
|
|
919
919
|
}, []), j = (N) => {
|
|
920
920
|
N.stopPropagation(), S(!0);
|
|
921
921
|
const A = O(N);
|
|
922
|
-
|
|
922
|
+
w(A), $(A);
|
|
923
923
|
};
|
|
924
924
|
K(() => {
|
|
925
925
|
r !== void 0 && r !== b.current && (b.current = r, x(r));
|
|
@@ -930,25 +930,25 @@ const Ta = (e) => {
|
|
|
930
930
|
}
|
|
931
931
|
const N = () => {
|
|
932
932
|
const A = h.current;
|
|
933
|
-
A && A.duration && !
|
|
933
|
+
A && A.duration && !_ && w(A.currentTime / A.duration), c.current = requestAnimationFrame(N);
|
|
934
934
|
};
|
|
935
935
|
return c.current = requestAnimationFrame(N), () => {
|
|
936
936
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
937
937
|
};
|
|
938
|
-
}, [v,
|
|
938
|
+
}, [v, _]), K(() => {
|
|
939
939
|
const N = h.current;
|
|
940
940
|
N && (v ? N.play().catch((A) => {
|
|
941
941
|
x(!1), F(!0);
|
|
942
942
|
}) : N.pause());
|
|
943
943
|
}, [v]), K(() => {
|
|
944
|
-
if (!
|
|
945
|
-
const N = (Y) =>
|
|
944
|
+
if (!_) return;
|
|
945
|
+
const N = (Y) => w(O(Y)), A = (Y) => {
|
|
946
946
|
S(!1), $(O(Y));
|
|
947
947
|
};
|
|
948
948
|
return window.addEventListener("mousemove", N), window.addEventListener("mouseup", A), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", A), () => {
|
|
949
949
|
window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", A);
|
|
950
950
|
};
|
|
951
|
-
}, [
|
|
951
|
+
}, [_, O, $]);
|
|
952
952
|
const Z = k ? { aspectRatio: String(k) } : void 0, ee = k ? "" : " aspect-video", X = Math.round(p * 100);
|
|
953
953
|
return /* @__PURE__ */ u(
|
|
954
954
|
"div",
|
|
@@ -982,7 +982,7 @@ const Ta = (e) => {
|
|
|
982
982
|
className: "absolute inset-0 h-full w-full object-cover"
|
|
983
983
|
}
|
|
984
984
|
),
|
|
985
|
-
!n && (g === "audio" || y) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children:
|
|
985
|
+
!n && (g === "audio" || y) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: we(t, {
|
|
986
986
|
className: "size-12 text-black/20",
|
|
987
987
|
weight: "regular"
|
|
988
988
|
}) }),
|
|
@@ -1001,7 +1001,7 @@ const Ta = (e) => {
|
|
|
1001
1001
|
onWaiting: () => L(!0),
|
|
1002
1002
|
onPlay: () => F(!1),
|
|
1003
1003
|
onEnded: () => {
|
|
1004
|
-
i || (x(!1),
|
|
1004
|
+
i || (x(!1), w(0));
|
|
1005
1005
|
},
|
|
1006
1006
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1007
1007
|
}
|
|
@@ -1025,7 +1025,7 @@ const Ta = (e) => {
|
|
|
1025
1025
|
N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && T(N.videoWidth / N.videoHeight);
|
|
1026
1026
|
},
|
|
1027
1027
|
onEnded: () => {
|
|
1028
|
-
i || (x(!1),
|
|
1028
|
+
i || (x(!1), w(0));
|
|
1029
1029
|
},
|
|
1030
1030
|
children: /* @__PURE__ */ s("track", { kind: "captions" })
|
|
1031
1031
|
}
|
|
@@ -1115,7 +1115,7 @@ const Ta = (e) => {
|
|
|
1115
1115
|
/* @__PURE__ */ s(
|
|
1116
1116
|
"div",
|
|
1117
1117
|
{
|
|
1118
|
-
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z ||
|
|
1118
|
+
className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${z || _ ? "h-1.5" : "h-1"}`,
|
|
1119
1119
|
children: /* @__PURE__ */ s(
|
|
1120
1120
|
"div",
|
|
1121
1121
|
{
|
|
@@ -1128,7 +1128,7 @@ const Ta = (e) => {
|
|
|
1128
1128
|
/* @__PURE__ */ s(
|
|
1129
1129
|
"div",
|
|
1130
1130
|
{
|
|
1131
|
-
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z ||
|
|
1131
|
+
className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${z || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
1132
1132
|
style: { left: `${X}%` }
|
|
1133
1133
|
}
|
|
1134
1134
|
)
|
|
@@ -1148,7 +1148,7 @@ const Ta = (e) => {
|
|
|
1148
1148
|
mediaPlayerProps: i,
|
|
1149
1149
|
containedImage: o = !1
|
|
1150
1150
|
}) => {
|
|
1151
|
-
const l = ce(e), [d, m] =
|
|
1151
|
+
const l = ce(e), [d, m] = U(!1), g = he(t), h = he(n);
|
|
1152
1152
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
|
|
1153
1153
|
Ma,
|
|
1154
1154
|
{
|
|
@@ -1196,7 +1196,7 @@ const Ta = (e) => {
|
|
|
1196
1196
|
"div",
|
|
1197
1197
|
{
|
|
1198
1198
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1199
|
-
children:
|
|
1199
|
+
children: we(e, {
|
|
1200
1200
|
className: Qt(r),
|
|
1201
1201
|
weight: "regular"
|
|
1202
1202
|
})
|
|
@@ -1213,7 +1213,7 @@ const Ta = (e) => {
|
|
|
1213
1213
|
"div",
|
|
1214
1214
|
{
|
|
1215
1215
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1216
|
-
children:
|
|
1216
|
+
children: we(e, {
|
|
1217
1217
|
className: Qt(r),
|
|
1218
1218
|
weight: "regular"
|
|
1219
1219
|
})
|
|
@@ -1260,7 +1260,7 @@ const Ta = (e) => {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
),
|
|
1262
1262
|
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1263
|
-
|
|
1263
|
+
we(r, {
|
|
1264
1264
|
className: C(
|
|
1265
1265
|
"size-5 shrink-0",
|
|
1266
1266
|
f ? "text-white/55" : "text-black/55"
|
|
@@ -1285,7 +1285,7 @@ const Ta = (e) => {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
);
|
|
1287
1287
|
};
|
|
1288
|
-
function
|
|
1288
|
+
function _s(e) {
|
|
1289
1289
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1290
1290
|
}
|
|
1291
1291
|
function ft(e) {
|
|
@@ -1319,7 +1319,7 @@ const gt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1319
1319
|
"div",
|
|
1320
1320
|
{
|
|
1321
1321
|
className: `aspect-video w-full rounded-[20px] ${Ra(t)} flex items-center justify-center`,
|
|
1322
|
-
children: /* @__PURE__ */ s(
|
|
1322
|
+
children: /* @__PURE__ */ s(qn, { className: `size-12 ${Pa(t)}` })
|
|
1323
1323
|
}
|
|
1324
1324
|
) }),
|
|
1325
1325
|
/* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
|
|
@@ -1330,12 +1330,12 @@ const gt = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1330
1330
|
] });
|
|
1331
1331
|
return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function ws(e) {
|
|
1334
1334
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1335
1335
|
}
|
|
1336
1336
|
function pt(e) {
|
|
1337
1337
|
var t;
|
|
1338
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1338
|
+
return (t = e.attachments) == null ? void 0 : t.find(ws);
|
|
1339
1339
|
}
|
|
1340
1340
|
async function Oa(e, t) {
|
|
1341
1341
|
let n;
|
|
@@ -1353,7 +1353,7 @@ const Fa = ({
|
|
|
1353
1353
|
url: e,
|
|
1354
1354
|
filename: t
|
|
1355
1355
|
}) => {
|
|
1356
|
-
const [n, a] =
|
|
1356
|
+
const [n, a] = U(!1);
|
|
1357
1357
|
return /* @__PURE__ */ s(
|
|
1358
1358
|
"button",
|
|
1359
1359
|
{
|
|
@@ -1404,7 +1404,7 @@ const Ns = ({
|
|
|
1404
1404
|
fileSize: a,
|
|
1405
1405
|
thumbnailUrl: r
|
|
1406
1406
|
}) => {
|
|
1407
|
-
const i = a !== void 0 ?
|
|
1407
|
+
const i = a !== void 0 ? _s(a) : void 0;
|
|
1408
1408
|
return /* @__PURE__ */ s(
|
|
1409
1409
|
xs,
|
|
1410
1410
|
{
|
|
@@ -1432,7 +1432,7 @@ const Ns = ({
|
|
|
1432
1432
|
fileSize: a,
|
|
1433
1433
|
thumbnailUrl: r
|
|
1434
1434
|
}) => {
|
|
1435
|
-
const i = ce(t), o = a !== void 0 ?
|
|
1435
|
+
const i = ce(t), o = a !== void 0 ? _s(a) : void 0;
|
|
1436
1436
|
return /* @__PURE__ */ s(
|
|
1437
1437
|
xs,
|
|
1438
1438
|
{
|
|
@@ -1486,7 +1486,7 @@ const Ns = ({
|
|
|
1486
1486
|
}
|
|
1487
1487
|
)
|
|
1488
1488
|
] });
|
|
1489
|
-
},
|
|
1489
|
+
}, Ba = ({
|
|
1490
1490
|
message: e
|
|
1491
1491
|
}) => {
|
|
1492
1492
|
const t = pt(e);
|
|
@@ -1494,7 +1494,7 @@ const Ns = ({
|
|
|
1494
1494
|
return /* @__PURE__ */ s("div", { className: ft(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(gt, { attachment: t, isMyMessage: !0 }) });
|
|
1495
1495
|
const n = bt(e);
|
|
1496
1496
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
|
|
1497
|
-
},
|
|
1497
|
+
}, Ua = ({
|
|
1498
1498
|
message: e
|
|
1499
1499
|
}) => {
|
|
1500
1500
|
const t = pt(e);
|
|
@@ -1502,9 +1502,9 @@ const Ns = ({
|
|
|
1502
1502
|
return /* @__PURE__ */ s("div", { className: ft(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(gt, { attachment: t, isMyMessage: !1 }) });
|
|
1503
1503
|
const n = bt(e);
|
|
1504
1504
|
return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ys, { ...n }) }) : null;
|
|
1505
|
-
},
|
|
1506
|
-
Creator:
|
|
1507
|
-
Visitor:
|
|
1505
|
+
}, bl = Object.assign($a, {
|
|
1506
|
+
Creator: Ba,
|
|
1507
|
+
Visitor: Ua
|
|
1508
1508
|
}), ja = {
|
|
1509
1509
|
dark: "bg-[#1e2330]",
|
|
1510
1510
|
light: "bg-[#f2f1ef]"
|
|
@@ -1597,11 +1597,11 @@ const Ns = ({
|
|
|
1597
1597
|
),
|
|
1598
1598
|
children: /* @__PURE__ */ s(Ye, { className: "size-3", weight: "bold" })
|
|
1599
1599
|
}
|
|
1600
|
-
), Re = (e) => e === "received" ? "light" : "dark",
|
|
1600
|
+
), Re = (e) => e === "received" ? "light" : "dark", qa = ({
|
|
1601
1601
|
firstOfGroup: e,
|
|
1602
1602
|
endOfGroup: t,
|
|
1603
1603
|
groupedByUser: n
|
|
1604
|
-
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
1604
|
+
}) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Wa = ({
|
|
1605
1605
|
src: e,
|
|
1606
1606
|
mimeType: t,
|
|
1607
1607
|
filename: n,
|
|
@@ -1629,7 +1629,7 @@ const Ns = ({
|
|
|
1629
1629
|
preload: l,
|
|
1630
1630
|
onDismiss: d
|
|
1631
1631
|
}) => {
|
|
1632
|
-
const m = Re(e), g = e === "composer" && !!d, h =
|
|
1632
|
+
const m = Re(e), g = e === "composer" && !!d, h = Wa({ src: t, mimeType: n, filename: a, items: r });
|
|
1633
1633
|
if (h.length === 0)
|
|
1634
1634
|
return null;
|
|
1635
1635
|
const f = l ?? (h.length > 1 ? "none" : "metadata");
|
|
@@ -1730,7 +1730,7 @@ const ar = {
|
|
|
1730
1730
|
rr[e]
|
|
1731
1731
|
),
|
|
1732
1732
|
"aria-hidden": !0,
|
|
1733
|
-
children:
|
|
1733
|
+
children: we(a, {
|
|
1734
1734
|
className: C("size-6", ir[e]),
|
|
1735
1735
|
weight: "regular"
|
|
1736
1736
|
})
|
|
@@ -1837,8 +1837,8 @@ const lr = ({
|
|
|
1837
1837
|
if ((m == null ? void 0 : m(x)) === !1) return;
|
|
1838
1838
|
const p = c[x];
|
|
1839
1839
|
if (!p) return;
|
|
1840
|
-
const
|
|
1841
|
-
Cs(p.src,
|
|
1840
|
+
const w = p.filename ?? ie(p.src);
|
|
1841
|
+
Cs(p.src, w);
|
|
1842
1842
|
};
|
|
1843
1843
|
if (c.length === 0)
|
|
1844
1844
|
return null;
|
|
@@ -1877,7 +1877,7 @@ const lr = ({
|
|
|
1877
1877
|
Composer: cr,
|
|
1878
1878
|
Sent: dr,
|
|
1879
1879
|
Received: ur
|
|
1880
|
-
},
|
|
1880
|
+
}, _t = ({
|
|
1881
1881
|
onPrev: e,
|
|
1882
1882
|
onNext: t,
|
|
1883
1883
|
prevLabel: n = "Previous",
|
|
@@ -1890,7 +1890,7 @@ const lr = ({
|
|
|
1890
1890
|
onClick: e,
|
|
1891
1891
|
"aria-label": n,
|
|
1892
1892
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
1893
|
-
children: /* @__PURE__ */ s(
|
|
1893
|
+
children: /* @__PURE__ */ s(Wn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
1894
1894
|
}
|
|
1895
1895
|
),
|
|
1896
1896
|
/* @__PURE__ */ s(
|
|
@@ -1912,7 +1912,7 @@ const lr = ({
|
|
|
1912
1912
|
tone: i = "dark",
|
|
1913
1913
|
onTriggered: o
|
|
1914
1914
|
}) => {
|
|
1915
|
-
const [l, d] =
|
|
1915
|
+
const [l, d] = U(!1), m = Q(
|
|
1916
1916
|
(c) => {
|
|
1917
1917
|
c.stopPropagation(), !l && (d(!0), Cs(e, t).catch(() => {
|
|
1918
1918
|
}).finally(() => {
|
|
@@ -1988,12 +1988,12 @@ const lr = ({
|
|
|
1988
1988
|
]
|
|
1989
1989
|
}
|
|
1990
1990
|
);
|
|
1991
|
-
}, Qe = (e, t, n) => Math.min(Math.max(e, t), n),
|
|
1991
|
+
}, Qe = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
|
|
1992
1992
|
length: e,
|
|
1993
1993
|
initialIndex: t,
|
|
1994
1994
|
open: n
|
|
1995
1995
|
}) => {
|
|
1996
|
-
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] =
|
|
1996
|
+
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = U(a);
|
|
1997
1997
|
K(() => {
|
|
1998
1998
|
n && i(Qe(t, 0, Math.max(e - 1, 0)));
|
|
1999
1999
|
}, [n, t, e]), K(() => {
|
|
@@ -2109,7 +2109,7 @@ const lr = ({
|
|
|
2109
2109
|
initialIndex: n = 0,
|
|
2110
2110
|
onClose: a
|
|
2111
2111
|
}) => {
|
|
2112
|
-
const { index: r, prev: i, next: o } =
|
|
2112
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2113
2113
|
length: t.length,
|
|
2114
2114
|
initialIndex: n,
|
|
2115
2115
|
open: e
|
|
@@ -2148,7 +2148,7 @@ const lr = ({
|
|
|
2148
2148
|
`${r}:${l.src}`
|
|
2149
2149
|
),
|
|
2150
2150
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2151
|
-
|
|
2151
|
+
_t,
|
|
2152
2152
|
{
|
|
2153
2153
|
onPrev: i,
|
|
2154
2154
|
onNext: o,
|
|
@@ -2230,7 +2230,7 @@ const lr = ({
|
|
|
2230
2230
|
}
|
|
2231
2231
|
);
|
|
2232
2232
|
}, Le = (e) => {
|
|
2233
|
-
const [t, n] =
|
|
2233
|
+
const [t, n] = U(!1), [a, r] = U(0), i = Q(
|
|
2234
2234
|
(l) => {
|
|
2235
2235
|
(e == null ? void 0 : e(l)) !== !1 && (r(l), n(!0));
|
|
2236
2236
|
},
|
|
@@ -2336,17 +2336,17 @@ const lr = ({
|
|
|
2336
2336
|
]
|
|
2337
2337
|
}
|
|
2338
2338
|
);
|
|
2339
|
-
}, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }),
|
|
2339
|
+
}, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), _r = {
|
|
2340
2340
|
Composer: br,
|
|
2341
2341
|
Sent: vr,
|
|
2342
2342
|
Received: xr
|
|
2343
|
-
},
|
|
2343
|
+
}, wr = ({
|
|
2344
2344
|
open: e,
|
|
2345
2345
|
items: t,
|
|
2346
2346
|
initialIndex: n = 0,
|
|
2347
2347
|
onClose: a
|
|
2348
2348
|
}) => {
|
|
2349
|
-
const { index: r, prev: i, next: o } =
|
|
2349
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2350
2350
|
length: t.length,
|
|
2351
2351
|
initialIndex: n,
|
|
2352
2352
|
open: e
|
|
@@ -2377,7 +2377,7 @@ const lr = ({
|
|
|
2377
2377
|
`${r}:${l.src}`
|
|
2378
2378
|
),
|
|
2379
2379
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2380
|
-
|
|
2380
|
+
_t,
|
|
2381
2381
|
{
|
|
2382
2382
|
onPrev: i,
|
|
2383
2383
|
onNext: o,
|
|
@@ -2435,9 +2435,9 @@ const lr = ({
|
|
|
2435
2435
|
), x = e === "composer" && !!m;
|
|
2436
2436
|
if (h.length === 0)
|
|
2437
2437
|
return null;
|
|
2438
|
-
const p = h.map((
|
|
2439
|
-
src:
|
|
2440
|
-
filename:
|
|
2438
|
+
const p = h.map((w) => ({
|
|
2439
|
+
src: w.src,
|
|
2440
|
+
filename: w.filename ?? ie(w.src)
|
|
2441
2441
|
}));
|
|
2442
2442
|
return /* @__PURE__ */ u(
|
|
2443
2443
|
Me,
|
|
@@ -2447,11 +2447,11 @@ const lr = ({
|
|
|
2447
2447
|
groupPosition: l,
|
|
2448
2448
|
"data-testid": "pdf-attachment",
|
|
2449
2449
|
children: [
|
|
2450
|
-
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((
|
|
2451
|
-
const S =
|
|
2450
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((w, _) => {
|
|
2451
|
+
const S = w.filename ?? ie(w.src), z = x && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
|
|
2452
2452
|
Ss,
|
|
2453
2453
|
{
|
|
2454
|
-
url:
|
|
2454
|
+
url: w.src,
|
|
2455
2455
|
filename: S,
|
|
2456
2456
|
variant: "inline",
|
|
2457
2457
|
label: `Download ${S}`,
|
|
@@ -2462,16 +2462,16 @@ const lr = ({
|
|
|
2462
2462
|
kr,
|
|
2463
2463
|
{
|
|
2464
2464
|
variant: g,
|
|
2465
|
-
item:
|
|
2466
|
-
index:
|
|
2465
|
+
item: w,
|
|
2466
|
+
index: _,
|
|
2467
2467
|
onActivate: b,
|
|
2468
2468
|
trailingAction: z
|
|
2469
2469
|
},
|
|
2470
|
-
`${
|
|
2470
|
+
`${w.src}-${_}`
|
|
2471
2471
|
);
|
|
2472
2472
|
}) }),
|
|
2473
2473
|
/* @__PURE__ */ s(
|
|
2474
|
-
|
|
2474
|
+
wr,
|
|
2475
2475
|
{
|
|
2476
2476
|
open: f,
|
|
2477
2477
|
items: p,
|
|
@@ -2492,7 +2492,7 @@ const lr = ({
|
|
|
2492
2492
|
initialIndex: n = 0,
|
|
2493
2493
|
onClose: a
|
|
2494
2494
|
}) => {
|
|
2495
|
-
const { index: r, prev: i, next: o } =
|
|
2495
|
+
const { index: r, prev: i, next: o } = wt({
|
|
2496
2496
|
length: t.length,
|
|
2497
2497
|
initialIndex: n,
|
|
2498
2498
|
open: e
|
|
@@ -2525,7 +2525,7 @@ const lr = ({
|
|
|
2525
2525
|
`${r}:${l.src}`
|
|
2526
2526
|
),
|
|
2527
2527
|
t.length > 1 ? /* @__PURE__ */ s(
|
|
2528
|
-
|
|
2528
|
+
_t,
|
|
2529
2529
|
{
|
|
2530
2530
|
onPrev: i,
|
|
2531
2531
|
onNext: o,
|
|
@@ -2621,7 +2621,7 @@ const lr = ({
|
|
|
2621
2621
|
if (g.length === 0)
|
|
2622
2622
|
return null;
|
|
2623
2623
|
const x = g.map(
|
|
2624
|
-
(p,
|
|
2624
|
+
(p, w) => Mr(p, w, g.length)
|
|
2625
2625
|
);
|
|
2626
2626
|
return /* @__PURE__ */ u(
|
|
2627
2627
|
Me,
|
|
@@ -2656,7 +2656,7 @@ const lr = ({
|
|
|
2656
2656
|
Sent: Dr,
|
|
2657
2657
|
Received: zr
|
|
2658
2658
|
}, ke = {
|
|
2659
|
-
Image:
|
|
2659
|
+
Image: _r,
|
|
2660
2660
|
Video: Pr,
|
|
2661
2661
|
Audio: Qa,
|
|
2662
2662
|
Pdf: Ir,
|
|
@@ -2665,17 +2665,17 @@ const lr = ({
|
|
|
2665
2665
|
isUnlocking: () => !1
|
|
2666
2666
|
}, Fr = {
|
|
2667
2667
|
LockedAttachment: Or
|
|
2668
|
-
}, zs = dt({}),
|
|
2668
|
+
}, zs = dt({}), vl = zs.Provider;
|
|
2669
2669
|
function $r(e) {
|
|
2670
2670
|
return Te(zs)[e] ?? Fr[e];
|
|
2671
2671
|
}
|
|
2672
|
-
const
|
|
2672
|
+
const Br = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-BcvG9C1y.js")), jr = () => /* @__PURE__ */ s(
|
|
2673
2673
|
"div",
|
|
2674
2674
|
{
|
|
2675
2675
|
className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
|
|
2676
2676
|
"aria-hidden": !0
|
|
2677
2677
|
}
|
|
2678
|
-
), Oe = (e) => /* @__PURE__ */ s(
|
|
2678
|
+
), Oe = (e) => /* @__PURE__ */ s(Ws, { fallback: /* @__PURE__ */ s(jr, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(Br, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
|
|
2679
2679
|
"svg",
|
|
2680
2680
|
{
|
|
2681
2681
|
width: e,
|
|
@@ -2698,7 +2698,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2698
2698
|
}, Yr = (e) => {
|
|
2699
2699
|
var t;
|
|
2700
2700
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
2701
|
-
},
|
|
2701
|
+
}, Be = (e) => {
|
|
2702
2702
|
var t;
|
|
2703
2703
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
2704
2704
|
}, kt = (e) => {
|
|
@@ -2707,10 +2707,10 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2707
2707
|
}, Hr = (e) => {
|
|
2708
2708
|
var t;
|
|
2709
2709
|
return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
2710
|
-
},
|
|
2710
|
+
}, qr = (e) => {
|
|
2711
2711
|
var t;
|
|
2712
2712
|
return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
2713
|
-
}, Ps = (e) => Gr(e) || Yr(e),
|
|
2713
|
+
}, Ps = (e) => Gr(e) || Yr(e), Wr = (e) => {
|
|
2714
2714
|
var t;
|
|
2715
2715
|
return Ps(e) && !((t = e.text) != null && t.trim());
|
|
2716
2716
|
}, et = ({
|
|
@@ -2720,7 +2720,7 @@ const Ur = V.lazy(() => import("./Card-qS17qnN0.js")), Br = V.lazy(() => import(
|
|
|
2720
2720
|
hasAttachment: a = !1
|
|
2721
2721
|
}) => {
|
|
2722
2722
|
var h;
|
|
2723
|
-
const r = Ps(e), i =
|
|
2723
|
+
const r = Ps(e), i = Be(e);
|
|
2724
2724
|
if (!r && !i)
|
|
2725
2725
|
return null;
|
|
2726
2726
|
if (r) {
|
|
@@ -2891,7 +2891,7 @@ const ei = {
|
|
|
2891
2891
|
// treatment from the mobile spec. The drop shadow remains for depth.
|
|
2892
2892
|
"border border-black/[0.08]",
|
|
2893
2893
|
"shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
|
|
2894
|
-
),
|
|
2894
|
+
), Ue = ({
|
|
2895
2895
|
variant: e,
|
|
2896
2896
|
children: t,
|
|
2897
2897
|
href: n,
|
|
@@ -2957,7 +2957,7 @@ const ei = {
|
|
|
2957
2957
|
}, li = {
|
|
2958
2958
|
dark: "size-16 text-white/25",
|
|
2959
2959
|
light: "size-16 text-black/25"
|
|
2960
|
-
},
|
|
2960
|
+
}, qe = (e, t) => !!t && !!e && ce(e) === "audio", Et = (e, t) => {
|
|
2961
2961
|
if (!t || !e) return !1;
|
|
2962
2962
|
const n = ce(e);
|
|
2963
2963
|
return n === "video" || n === "audio";
|
|
@@ -2971,7 +2971,7 @@ const ei = {
|
|
|
2971
2971
|
topRight: o
|
|
2972
2972
|
}) => {
|
|
2973
2973
|
const l = ce(r), d = !!n && l === "video", m = he(t);
|
|
2974
|
-
return
|
|
2974
|
+
return qe(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
|
|
2975
2975
|
"audio",
|
|
2976
2976
|
{
|
|
2977
2977
|
src: n,
|
|
@@ -3014,7 +3014,7 @@ const ei = {
|
|
|
3014
3014
|
"flex h-full w-full items-center justify-center",
|
|
3015
3015
|
ii[e]
|
|
3016
3016
|
),
|
|
3017
|
-
children:
|
|
3017
|
+
children: we(r, {
|
|
3018
3018
|
className: li[e],
|
|
3019
3019
|
weight: "regular"
|
|
3020
3020
|
})
|
|
@@ -3039,7 +3039,7 @@ const ei = {
|
|
|
3039
3039
|
onDismiss: g,
|
|
3040
3040
|
onEditClick: h
|
|
3041
3041
|
}) => {
|
|
3042
|
-
const f = l === "classic", c =
|
|
3042
|
+
const f = l === "classic", c = qe(r, o), b = g ? /* @__PURE__ */ s(
|
|
3043
3043
|
"button",
|
|
3044
3044
|
{
|
|
3045
3045
|
type: "button",
|
|
@@ -3058,7 +3058,7 @@ const ei = {
|
|
|
3058
3058
|
children: /* @__PURE__ */ s(Qn, { className: "size-5", weight: "regular" })
|
|
3059
3059
|
}
|
|
3060
3060
|
) : void 0;
|
|
3061
|
-
return c ? /* @__PURE__ */ s(
|
|
3061
|
+
return c ? /* @__PURE__ */ s(Ue, { variant: "dark", bgClassName: It, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
3062
3062
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
|
|
3063
3063
|
je,
|
|
3064
3064
|
{
|
|
@@ -3070,7 +3070,7 @@ const ei = {
|
|
|
3070
3070
|
) }),
|
|
3071
3071
|
b && /* @__PURE__ */ s("div", { className: "shrink-0", children: b })
|
|
3072
3072
|
] }) }) : /* @__PURE__ */ u(
|
|
3073
|
-
|
|
3073
|
+
Ue,
|
|
3074
3074
|
{
|
|
3075
3075
|
variant: "dark",
|
|
3076
3076
|
topRight: f ? b : void 0,
|
|
@@ -3114,7 +3114,7 @@ const ei = {
|
|
|
3114
3114
|
cta: d,
|
|
3115
3115
|
onClick: m
|
|
3116
3116
|
}) => {
|
|
3117
|
-
const g = Et(a, i), h = Ct(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b =
|
|
3117
|
+
const g = Et(a, i), h = Ct(n), f = d == null && h != null && !g ? h : void 0, c = d == null && !g ? m : void 0, b = qe(a, i) ? It : void 0, v = d && m ? {
|
|
3118
3118
|
...d,
|
|
3119
3119
|
onClick: () => {
|
|
3120
3120
|
var x;
|
|
@@ -3122,7 +3122,7 @@ const ei = {
|
|
|
3122
3122
|
}
|
|
3123
3123
|
} : d;
|
|
3124
3124
|
return /* @__PURE__ */ u(
|
|
3125
|
-
|
|
3125
|
+
Ue,
|
|
3126
3126
|
{
|
|
3127
3127
|
variant: "light",
|
|
3128
3128
|
href: f,
|
|
@@ -3170,12 +3170,12 @@ const ei = {
|
|
|
3170
3170
|
}) => {
|
|
3171
3171
|
const h = Et(r, o), f = Ct(a), c = m == null && f != null && !h ? f : void 0, b = m == null && !h && c != null ? g : void 0;
|
|
3172
3172
|
return /* @__PURE__ */ u(
|
|
3173
|
-
|
|
3173
|
+
Ue,
|
|
3174
3174
|
{
|
|
3175
3175
|
variant: "dark",
|
|
3176
3176
|
href: c,
|
|
3177
3177
|
onClick: b,
|
|
3178
|
-
bgClassName:
|
|
3178
|
+
bgClassName: qe(r, o) ? It : void 0,
|
|
3179
3179
|
children: [
|
|
3180
3180
|
l === "featured" && /* @__PURE__ */ s(
|
|
3181
3181
|
je,
|
|
@@ -3431,8 +3431,8 @@ const vi = ({
|
|
|
3431
3431
|
};
|
|
3432
3432
|
return r.forEach((v, x) => {
|
|
3433
3433
|
if (v.type === "link") {
|
|
3434
|
-
v.attachments.forEach((p,
|
|
3435
|
-
f(p, `link-${x}-${
|
|
3434
|
+
v.attachments.forEach((p, w) => {
|
|
3435
|
+
f(p, `link-${x}-${w}`);
|
|
3436
3436
|
});
|
|
3437
3437
|
return;
|
|
3438
3438
|
}
|
|
@@ -3467,7 +3467,7 @@ const vi = ({
|
|
|
3467
3467
|
] }) : null
|
|
3468
3468
|
] });
|
|
3469
3469
|
}, xi = (e) => {
|
|
3470
|
-
var Dt, zt, Pt, Ot, Ft, $t,
|
|
3470
|
+
var Dt, zt, Pt, Ot, Ft, $t, Bt, Ut, jt, Vt;
|
|
3471
3471
|
const {
|
|
3472
3472
|
additionalMessageInputProps: t,
|
|
3473
3473
|
chatbotVotingEnabled: n,
|
|
@@ -3485,7 +3485,7 @@ const vi = ({
|
|
|
3485
3485
|
renderText: b,
|
|
3486
3486
|
threadList: v,
|
|
3487
3487
|
viewerLanguage: x
|
|
3488
|
-
} = e, { client: p } = fe("CustomMessage"), { channel:
|
|
3488
|
+
} = e, { client: p } = fe("CustomMessage"), { channel: w } = oe("CustomMessage"), { isUnlocking: _, onUnlockClick: S, onFetchSource: z, onDownloadClick: E } = $r("LockedAttachment"), [R, F] = U(!1), D = tn(c.id), { selected: L, voteUp: y, voteDown: I } = _a(c), {
|
|
3489
3489
|
Attachment: k = sn,
|
|
3490
3490
|
EditMessageModal: T = nn,
|
|
3491
3491
|
MessageActions: M,
|
|
@@ -3497,24 +3497,24 @@ const vi = ({
|
|
|
3497
3497
|
ReminderNotification: X = dn,
|
|
3498
3498
|
StreamedMessageText: N = un,
|
|
3499
3499
|
PinIndicator: A
|
|
3500
|
-
} = cs("CustomMessage"), Y = mn(c),
|
|
3500
|
+
} = cs("CustomMessage"), Y = mn(c), q = hn(c), H = re(
|
|
3501
3501
|
() => h == null ? void 0 : h(c),
|
|
3502
3502
|
[h, c]
|
|
3503
|
-
),
|
|
3503
|
+
), B = re(() => {
|
|
3504
3504
|
const me = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...me] : me;
|
|
3505
|
-
if (!
|
|
3506
|
-
const Gt = be.filter((Yt) => !("type" in Yt) || !
|
|
3505
|
+
if (!Be(c)) return be;
|
|
3506
|
+
const Gt = be.filter((Yt) => !("type" in Yt) || !ws(Yt));
|
|
3507
3507
|
return Gt.length === be.length ? be : Gt;
|
|
3508
|
-
}, [c]),
|
|
3509
|
-
() => Fs(
|
|
3510
|
-
[
|
|
3508
|
+
}, [c]), W = re(
|
|
3509
|
+
() => Fs(B),
|
|
3510
|
+
[B]
|
|
3511
3511
|
), J = re(() => {
|
|
3512
3512
|
const me = ps({ message: c, viewerLanguage: x });
|
|
3513
3513
|
return me === c.text ? c : { ...c, text: me };
|
|
3514
|
-
}, [c, x]), de =
|
|
3514
|
+
}, [c, x]), de = W.length > 0, De = W.reduce(
|
|
3515
3515
|
(me, be) => me + be.attachments.length,
|
|
3516
3516
|
0
|
|
3517
|
-
) === ((
|
|
3517
|
+
) === ((B == null ? void 0 : B.length) ?? 0), ze = qa({
|
|
3518
3518
|
endOfGroup: r,
|
|
3519
3519
|
firstOfGroup: i,
|
|
3520
3520
|
groupedByUser: o
|
|
@@ -3538,14 +3538,14 @@ const vi = ({
|
|
|
3538
3538
|
"str-chat__message--has-attachment": Y,
|
|
3539
3539
|
"str-chat__message--highlighted": g,
|
|
3540
3540
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3541
|
-
"str-chat__message--with-reactions":
|
|
3541
|
+
"str-chat__message--with-reactions": q,
|
|
3542
3542
|
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((zt = c == null ? void 0 : c.error) == null ? void 0 : zt.status) !== 403,
|
|
3543
3543
|
"str-chat__message-with-thread-link": ae || ue,
|
|
3544
3544
|
"str-chat__virtual-message__wrapper--end": r,
|
|
3545
3545
|
"str-chat__virtual-message__wrapper--first": i,
|
|
3546
3546
|
"str-chat__virtual-message__wrapper--group": o
|
|
3547
3547
|
}
|
|
3548
|
-
),
|
|
3548
|
+
), We = c.poll_id && p.polls.fromState(c.poll_id), Mt = Wr(c), pe = Be(c), Ys = kt(c), Xe = !!(B != null && B.length && !c.quoted_message), At = pe && se && Xe, Hs = de && De && !c.quoted_message && !We && !H && !pe, Rt = {
|
|
3549
3549
|
contentType: "text",
|
|
3550
3550
|
amountText: (Pt = c.metadata) == null ? void 0 : Pt.amount_text,
|
|
3551
3551
|
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
@@ -3554,11 +3554,11 @@ const vi = ({
|
|
|
3554
3554
|
contentType: "media",
|
|
3555
3555
|
title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
|
|
3556
3556
|
mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
|
|
3557
|
-
thumbnailUrl: (
|
|
3558
|
-
amountText: (
|
|
3557
|
+
thumbnailUrl: (Bt = c.metadata) == null ? void 0 : Bt.attachment_thumbnail,
|
|
3558
|
+
amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
|
|
3559
3559
|
detail: (jt = c.metadata) == null ? void 0 : jt.attachment_detail,
|
|
3560
3560
|
paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
|
|
3561
|
-
onFetchSource: z ? () => z(c,
|
|
3561
|
+
onFetchSource: z ? () => z(c, w) : void 0
|
|
3562
3562
|
};
|
|
3563
3563
|
return /* @__PURE__ */ u(te, { children: [
|
|
3564
3564
|
a && /* @__PURE__ */ s(
|
|
@@ -3626,12 +3626,12 @@ const vi = ({
|
|
|
3626
3626
|
{
|
|
3627
3627
|
...Rt,
|
|
3628
3628
|
isMine: !1,
|
|
3629
|
-
isUnlocking:
|
|
3630
|
-
onUnlockClick: () => S == null ? void 0 : S(c,
|
|
3629
|
+
isUnlocking: _(c.id),
|
|
3630
|
+
onUnlockClick: () => S == null ? void 0 : S(c, w)
|
|
3631
3631
|
}
|
|
3632
3632
|
),
|
|
3633
3633
|
!se && M && /* @__PURE__ */ s(M, {})
|
|
3634
|
-
] }) }) :
|
|
3634
|
+
] }) }) : qr(c) ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
3635
3635
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3636
3636
|
se && M && /* @__PURE__ */ s(M, {}),
|
|
3637
3637
|
se ? /* @__PURE__ */ s(
|
|
@@ -3639,16 +3639,16 @@ const vi = ({
|
|
|
3639
3639
|
{
|
|
3640
3640
|
...Lt,
|
|
3641
3641
|
isMine: !0,
|
|
3642
|
-
onPreviewClick: () => S ? S(c,
|
|
3642
|
+
onPreviewClick: () => S ? S(c, w) : void 0
|
|
3643
3643
|
}
|
|
3644
3644
|
) : /* @__PURE__ */ s(
|
|
3645
3645
|
Oe,
|
|
3646
3646
|
{
|
|
3647
3647
|
...Lt,
|
|
3648
3648
|
isMine: !1,
|
|
3649
|
-
isUnlocking:
|
|
3650
|
-
onUnlockClick: () => S ? S(c,
|
|
3651
|
-
onDownloadClick: () => E ? E(c,
|
|
3649
|
+
isUnlocking: _(c.id),
|
|
3650
|
+
onUnlockClick: () => S ? S(c, w) : void 0,
|
|
3651
|
+
onDownloadClick: () => E ? E(c, w) : void 0
|
|
3652
3652
|
}
|
|
3653
3653
|
),
|
|
3654
3654
|
!se && M && /* @__PURE__ */ s(M, {})
|
|
@@ -3667,7 +3667,7 @@ const vi = ({
|
|
|
3667
3667
|
isMyMessage: se,
|
|
3668
3668
|
message: {
|
|
3669
3669
|
...J,
|
|
3670
|
-
attachments:
|
|
3670
|
+
attachments: B,
|
|
3671
3671
|
// MessageText prefers message.i18n[userLanguage_text] from
|
|
3672
3672
|
// Stream's TranslationContext over message.text. Drop i18n so
|
|
3673
3673
|
// the caption uses displayMessage.text from viewerLanguage.
|
|
@@ -3684,12 +3684,12 @@ const vi = ({
|
|
|
3684
3684
|
isMyMessage: se
|
|
3685
3685
|
}
|
|
3686
3686
|
),
|
|
3687
|
-
|
|
3688
|
-
|
|
3687
|
+
We && /* @__PURE__ */ s(vn, { poll: We }),
|
|
3688
|
+
B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
|
|
3689
3689
|
k,
|
|
3690
3690
|
{
|
|
3691
3691
|
actionHandler: l,
|
|
3692
|
-
attachments:
|
|
3692
|
+
attachments: B
|
|
3693
3693
|
}
|
|
3694
3694
|
) : null,
|
|
3695
3695
|
H ? /* @__PURE__ */ s(
|
|
@@ -3741,12 +3741,12 @@ const vi = ({
|
|
|
3741
3741
|
c.id
|
|
3742
3742
|
)
|
|
3743
3743
|
] });
|
|
3744
|
-
},
|
|
3744
|
+
}, _i = V.memo(
|
|
3745
3745
|
xi,
|
|
3746
3746
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : en(e, t)
|
|
3747
|
-
),
|
|
3747
|
+
), wi = (e) => {
|
|
3748
3748
|
const t = Ne("CustomMessage");
|
|
3749
|
-
return /* @__PURE__ */ s(
|
|
3749
|
+
return /* @__PURE__ */ s(_i, { ...t, ...e });
|
|
3750
3750
|
}, Ni = () => {
|
|
3751
3751
|
var n;
|
|
3752
3752
|
const { handleDelete: e, message: t } = Ne("CustomMessageActions");
|
|
@@ -3829,7 +3829,7 @@ const vi = ({
|
|
|
3829
3829
|
(t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
|
|
3830
3830
|
)
|
|
3831
3831
|
}), Ei = () => {
|
|
3832
|
-
const { linkPreviewsManager: e } = xn(), { linkPreviews: t } =
|
|
3832
|
+
const { linkPreviewsManager: e } = xn(), { linkPreviews: t } = _n(
|
|
3833
3833
|
e.state,
|
|
3834
3834
|
Si
|
|
3835
3835
|
), n = (r) => {
|
|
@@ -3846,7 +3846,7 @@ const vi = ({
|
|
|
3846
3846
|
// fixed-height hero would spill out of the collapsed card box.
|
|
3847
3847
|
/* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
|
|
3848
3848
|
) : null;
|
|
3849
|
-
}, Ve = V.createContext(!1),
|
|
3849
|
+
}, Ve = V.createContext(!1), Ii = 40, xl = () => Te(Ve), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
|
|
3850
3850
|
"button",
|
|
3851
3851
|
{
|
|
3852
3852
|
...n,
|
|
@@ -3857,8 +3857,8 @@ const vi = ({
|
|
|
3857
3857
|
children: /* @__PURE__ */ s(ta, { weight: "bold", className: "size-4" })
|
|
3858
3858
|
}
|
|
3859
3859
|
), as = () => {
|
|
3860
|
-
const e = Te(Ve), { handleSubmit: t } =
|
|
3861
|
-
SendButton: r =
|
|
3860
|
+
const e = Te(Ve), { handleSubmit: t } = wn(), n = Nn(), a = e || !n, {
|
|
3861
|
+
SendButton: r = Ti,
|
|
3862
3862
|
AttachmentPreviewList: i = yn
|
|
3863
3863
|
} = cs("CustomMessageInput");
|
|
3864
3864
|
return (
|
|
@@ -3925,10 +3925,13 @@ const vi = ({
|
|
|
3925
3925
|
if (!h || !f)
|
|
3926
3926
|
return;
|
|
3927
3927
|
const c = () => {
|
|
3928
|
+
const v = f.querySelector(
|
|
3929
|
+
".str-chat__message-list-scroll"
|
|
3930
|
+
), x = v ? v.scrollHeight - v.scrollTop - v.clientHeight < Ii : !1;
|
|
3928
3931
|
f.style.setProperty(
|
|
3929
3932
|
"--messaging-composer-height",
|
|
3930
3933
|
`${h.offsetHeight + 16}px`
|
|
3931
|
-
);
|
|
3934
|
+
), x && v && (v.scrollTop = v.scrollHeight);
|
|
3932
3935
|
};
|
|
3933
3936
|
if (c(), typeof ResizeObserver > "u")
|
|
3934
3937
|
return;
|
|
@@ -3986,7 +3989,7 @@ const vi = ({
|
|
|
3986
3989
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
3987
3990
|
children: [
|
|
3988
3991
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
3989
|
-
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(
|
|
3992
|
+
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(qt, { Input: i ?? as }) })
|
|
3990
3993
|
]
|
|
3991
3994
|
}
|
|
3992
3995
|
),
|
|
@@ -4005,28 +4008,28 @@ const vi = ({
|
|
|
4005
4008
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4006
4009
|
children: [
|
|
4007
4010
|
e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4008
|
-
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(
|
|
4011
|
+
/* @__PURE__ */ s(Ve.Provider, { value: l, children: /* @__PURE__ */ s(qt, { Input: as }) })
|
|
4009
4012
|
]
|
|
4010
4013
|
}
|
|
4011
4014
|
),
|
|
4012
4015
|
n == null ? void 0 : n()
|
|
4013
4016
|
] });
|
|
4014
|
-
},
|
|
4017
|
+
}, Mi = [
|
|
4015
4018
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
4016
4019
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
4017
|
-
],
|
|
4020
|
+
], Ai = {
|
|
4018
4021
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4019
4022
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4020
|
-
},
|
|
4023
|
+
}, Ri = [
|
|
4021
4024
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
4022
|
-
],
|
|
4025
|
+
], Li = ["SYSTEM_AGE_SAFETY_BLOCKED"], Di = {
|
|
4023
4026
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4024
|
-
}, st = "age safety guidelines.",
|
|
4027
|
+
}, st = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", is = (e) => Mi.includes(e), Pi = (e) => Ri.includes(e), Oi = (e) => Li.includes(
|
|
4025
4028
|
e
|
|
4026
|
-
),
|
|
4029
|
+
), Fi = (e) => {
|
|
4027
4030
|
var t;
|
|
4028
|
-
return
|
|
4029
|
-
},
|
|
4031
|
+
return Oi((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4032
|
+
}, $i = (e) => {
|
|
4030
4033
|
var a;
|
|
4031
4034
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4032
4035
|
if (is(t))
|
|
@@ -4034,7 +4037,7 @@ const vi = ({
|
|
|
4034
4037
|
kind: "dm-agent",
|
|
4035
4038
|
type: t
|
|
4036
4039
|
};
|
|
4037
|
-
if (
|
|
4040
|
+
if (Pi(t))
|
|
4038
4041
|
return {
|
|
4039
4042
|
kind: "age-safety",
|
|
4040
4043
|
type: t
|
|
@@ -4045,7 +4048,7 @@ const vi = ({
|
|
|
4045
4048
|
kind: "dm-agent",
|
|
4046
4049
|
type: n
|
|
4047
4050
|
};
|
|
4048
|
-
},
|
|
4051
|
+
}, Bi = (e) => {
|
|
4049
4052
|
const t = e.indexOf(st);
|
|
4050
4053
|
if (t === -1)
|
|
4051
4054
|
return e;
|
|
@@ -4055,7 +4058,7 @@ const vi = ({
|
|
|
4055
4058
|
/* @__PURE__ */ s(
|
|
4056
4059
|
"a",
|
|
4057
4060
|
{
|
|
4058
|
-
href:
|
|
4061
|
+
href: zi,
|
|
4059
4062
|
target: "_blank",
|
|
4060
4063
|
rel: "noopener noreferrer",
|
|
4061
4064
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -4066,11 +4069,11 @@ const vi = ({
|
|
|
4066
4069
|
] });
|
|
4067
4070
|
}, Ui = (e) => {
|
|
4068
4071
|
var a, r;
|
|
4069
|
-
const t = !
|
|
4072
|
+
const t = !Fi(e.message), n = $i(
|
|
4070
4073
|
e.message
|
|
4071
4074
|
);
|
|
4072
4075
|
if ((n == null ? void 0 : n.kind) === "dm-agent") {
|
|
4073
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4076
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
|
|
4074
4077
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4075
4078
|
/* @__PURE__ */ u(
|
|
4076
4079
|
"div",
|
|
@@ -4080,7 +4083,7 @@ const vi = ({
|
|
|
4080
4083
|
"data-dm-agent-system-type": n.type,
|
|
4081
4084
|
children: [
|
|
4082
4085
|
/* @__PURE__ */ s(
|
|
4083
|
-
|
|
4086
|
+
_e,
|
|
4084
4087
|
{
|
|
4085
4088
|
size: 16,
|
|
4086
4089
|
weight: "regular",
|
|
@@ -4096,7 +4099,7 @@ const vi = ({
|
|
|
4096
4099
|
] });
|
|
4097
4100
|
}
|
|
4098
4101
|
if ((n == null ? void 0 : n.kind) === "age-safety") {
|
|
4099
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4102
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
|
|
4100
4103
|
return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4101
4104
|
/* @__PURE__ */ u(
|
|
4102
4105
|
"div",
|
|
@@ -4115,7 +4118,7 @@ const vi = ({
|
|
|
4115
4118
|
"data-testid": "age-safety-system-message-icon"
|
|
4116
4119
|
}
|
|
4117
4120
|
),
|
|
4118
|
-
/* @__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:
|
|
4121
|
+
/* @__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: Bi(i) }) })
|
|
4119
4122
|
]
|
|
4120
4123
|
}
|
|
4121
4124
|
),
|
|
@@ -4140,15 +4143,15 @@ const vi = ({
|
|
|
4140
4143
|
begin: `${120 * t}ms`,
|
|
4141
4144
|
repeatCount: "indefinite"
|
|
4142
4145
|
}
|
|
4143
|
-
) }),
|
|
4146
|
+
) }), ji = /* @__PURE__ */ new Set([
|
|
4144
4147
|
Ze.Thinking,
|
|
4145
4148
|
Ze.Generating,
|
|
4146
4149
|
Ze.ExternalSources
|
|
4147
|
-
]),
|
|
4150
|
+
]), Vi = ({ threadList: e }) => {
|
|
4148
4151
|
var b, v;
|
|
4149
4152
|
const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = fe(), { typing: i = {} } = Sn(), { aiState: o } = En(t), l = Te($s);
|
|
4150
|
-
if (!e && l &&
|
|
4151
|
-
const x =
|
|
4153
|
+
if (!e && l && ji.has(o)) {
|
|
4154
|
+
const x = Gi(t, (b = r.user) == null ? void 0 : b.id);
|
|
4152
4155
|
return /* @__PURE__ */ s(
|
|
4153
4156
|
ls,
|
|
4154
4157
|
{
|
|
@@ -4163,13 +4166,13 @@ const vi = ({
|
|
|
4163
4166
|
return null;
|
|
4164
4167
|
const m = e ? [] : Object.values(i).filter(
|
|
4165
4168
|
({ parent_id: x, user: p }) => {
|
|
4166
|
-
var
|
|
4167
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4169
|
+
var w;
|
|
4170
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && !x;
|
|
4168
4171
|
}
|
|
4169
4172
|
), g = e ? Object.values(i).filter(
|
|
4170
4173
|
({ parent_id: x, user: p }) => {
|
|
4171
|
-
var
|
|
4172
|
-
return (p == null ? void 0 : p.id) !== ((
|
|
4174
|
+
var w;
|
|
4175
|
+
return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && x === (a == null ? void 0 : a.id);
|
|
4173
4176
|
}
|
|
4174
4177
|
) : [], h = e ? g : m;
|
|
4175
4178
|
if (!h.length)
|
|
@@ -4228,7 +4231,7 @@ const vi = ({
|
|
|
4228
4231
|
] })
|
|
4229
4232
|
}
|
|
4230
4233
|
);
|
|
4231
|
-
function
|
|
4234
|
+
function Gi(e, t) {
|
|
4232
4235
|
var a;
|
|
4233
4236
|
const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4234
4237
|
for (const r of Object.values(n)) {
|
|
@@ -4237,7 +4240,7 @@ function Vi(e, t) {
|
|
|
4237
4240
|
return i;
|
|
4238
4241
|
}
|
|
4239
4242
|
}
|
|
4240
|
-
const
|
|
4243
|
+
const Yi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
4241
4244
|
"div",
|
|
4242
4245
|
{
|
|
4243
4246
|
className: C("flex items-center justify-center h-full", e),
|
|
@@ -4281,11 +4284,11 @@ const Gi = () => null, Yi = ({ className: e, message: t }) => /* @__PURE__ */ u(
|
|
|
4281
4284
|
]
|
|
4282
4285
|
}
|
|
4283
4286
|
), Ge = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
|
|
4284
|
-
/* @__PURE__ */ s(
|
|
4287
|
+
/* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
|
|
4285
4288
|
/* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4286
4289
|
] }) }));
|
|
4287
4290
|
Ge.displayName = "LoadingState";
|
|
4288
|
-
const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Fe = "Replies instantly with AI assistant",
|
|
4291
|
+
const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Fe = "Replies instantly with AI assistant", qi = ({
|
|
4289
4292
|
onBack: e,
|
|
4290
4293
|
showBackButton: t,
|
|
4291
4294
|
showStarButton: n = !1,
|
|
@@ -4305,19 +4308,19 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4305
4308
|
renderHeaderTitleBadges: x
|
|
4306
4309
|
}) => {
|
|
4307
4310
|
var I, k, T, M, O, $;
|
|
4308
|
-
const { channel: p } = oe(), { client:
|
|
4311
|
+
const { channel: p } = oe(), { client: w } = fe(), _ = V.useMemo(
|
|
4309
4312
|
() => {
|
|
4310
4313
|
var j;
|
|
4311
4314
|
return He(
|
|
4312
4315
|
(j = p.state) == null ? void 0 : j.members,
|
|
4313
|
-
|
|
4316
|
+
w == null ? void 0 : w.userID,
|
|
4314
4317
|
p.type
|
|
4315
4318
|
);
|
|
4316
4319
|
},
|
|
4317
|
-
[(I = p.state) == null ? void 0 : I.members,
|
|
4318
|
-
), S = ht(
|
|
4320
|
+
[(I = p.state) == null ? void 0 : I.members, w == null ? void 0 : w.userID, p.type]
|
|
4321
|
+
), S = ht(_ == null ? void 0 : _.user), z = (k = _ == null ? void 0 : _.user) == null ? void 0 : k.image, E = mt(p), R = x == null ? void 0 : x({
|
|
4319
4322
|
channel: p,
|
|
4320
|
-
participant:
|
|
4323
|
+
participant: _
|
|
4321
4324
|
}), F = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", D = "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: [
|
|
4322
4325
|
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
|
|
4323
4326
|
R && /* @__PURE__ */ s("span", { className: "shrink-0", children: R })
|
|
@@ -4366,7 +4369,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4366
4369
|
/* @__PURE__ */ s(
|
|
4367
4370
|
ne,
|
|
4368
4371
|
{
|
|
4369
|
-
id: ((T =
|
|
4372
|
+
id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || p.id || "unknown",
|
|
4370
4373
|
name: S,
|
|
4371
4374
|
image: z,
|
|
4372
4375
|
starred: n && E,
|
|
@@ -4379,7 +4382,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4379
4382
|
/* @__PURE__ */ s(xe, { className: "size-3 shrink-0", weight: "bold" })
|
|
4380
4383
|
] }),
|
|
4381
4384
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4382
|
-
/* @__PURE__ */ s(
|
|
4385
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4383
4386
|
/* @__PURE__ */ s("span", { children: Fe })
|
|
4384
4387
|
] })
|
|
4385
4388
|
]
|
|
@@ -4388,7 +4391,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4388
4391
|
/* @__PURE__ */ s(
|
|
4389
4392
|
ne,
|
|
4390
4393
|
{
|
|
4391
|
-
id: ((M =
|
|
4394
|
+
id: ((M = _ == null ? void 0 : _.user) == null ? void 0 : M.id) || p.id || "unknown",
|
|
4392
4395
|
name: S,
|
|
4393
4396
|
image: z,
|
|
4394
4397
|
starred: n && E,
|
|
@@ -4407,7 +4410,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4407
4410
|
)
|
|
4408
4411
|
] }),
|
|
4409
4412
|
a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4410
|
-
/* @__PURE__ */ s(
|
|
4413
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4411
4414
|
/* @__PURE__ */ s("span", { children: Fe })
|
|
4412
4415
|
] })
|
|
4413
4416
|
] })
|
|
@@ -4437,7 +4440,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4437
4440
|
lt,
|
|
4438
4441
|
{
|
|
4439
4442
|
channel: p,
|
|
4440
|
-
participant:
|
|
4443
|
+
participant: _,
|
|
4441
4444
|
showDeleteConversation: o,
|
|
4442
4445
|
showBlockParticipant: l,
|
|
4443
4446
|
showReportParticipant: d,
|
|
@@ -4481,7 +4484,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4481
4484
|
/* @__PURE__ */ s(
|
|
4482
4485
|
ne,
|
|
4483
4486
|
{
|
|
4484
|
-
id: ((O =
|
|
4487
|
+
id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || p.id || "unknown",
|
|
4485
4488
|
name: S,
|
|
4486
4489
|
image: z,
|
|
4487
4490
|
starred: n && E,
|
|
@@ -4495,7 +4498,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4495
4498
|
/* @__PURE__ */ s(xe, { className: "size-4 shrink-0", weight: "bold" })
|
|
4496
4499
|
] }),
|
|
4497
4500
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4498
|
-
/* @__PURE__ */ s(
|
|
4501
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4499
4502
|
/* @__PURE__ */ s("span", { className: "truncate", children: Fe })
|
|
4500
4503
|
] })
|
|
4501
4504
|
] })
|
|
@@ -4505,7 +4508,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4505
4508
|
/* @__PURE__ */ s(
|
|
4506
4509
|
ne,
|
|
4507
4510
|
{
|
|
4508
|
-
id: (($ =
|
|
4511
|
+
id: (($ = _ == null ? void 0 : _.user) == null ? void 0 : $.id) || p.id || "unknown",
|
|
4509
4512
|
name: S,
|
|
4510
4513
|
image: z,
|
|
4511
4514
|
starred: n && E,
|
|
@@ -4525,7 +4528,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4525
4528
|
)
|
|
4526
4529
|
] }),
|
|
4527
4530
|
a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
|
|
4528
|
-
/* @__PURE__ */ s(
|
|
4531
|
+
/* @__PURE__ */ s(_e, { className: "size-3 shrink-0 text-black/55" }),
|
|
4529
4532
|
/* @__PURE__ */ s("span", { className: "truncate", children: Fe })
|
|
4530
4533
|
] })
|
|
4531
4534
|
] })
|
|
@@ -4555,7 +4558,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4555
4558
|
lt,
|
|
4556
4559
|
{
|
|
4557
4560
|
channel: p,
|
|
4558
|
-
participant:
|
|
4561
|
+
participant: _,
|
|
4559
4562
|
showDeleteConversation: o,
|
|
4560
4563
|
showBlockParticipant: l,
|
|
4561
4564
|
showReportParticipant: d,
|
|
@@ -4590,8 +4593,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4590
4593
|
showStarButton: v = !1,
|
|
4591
4594
|
chatbotVotingEnabled: x = !1,
|
|
4592
4595
|
renderChannelBanner: p,
|
|
4593
|
-
renderHeaderTitleBadges:
|
|
4594
|
-
customChannelActions:
|
|
4596
|
+
renderHeaderTitleBadges: w,
|
|
4597
|
+
customChannelActions: _,
|
|
4595
4598
|
renderChannelActions: S,
|
|
4596
4599
|
renderMessage: z,
|
|
4597
4600
|
dmAgentEnabled: E = !1,
|
|
@@ -4600,7 +4603,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4600
4603
|
onParticipantNameClick: D,
|
|
4601
4604
|
composerInput: L
|
|
4602
4605
|
}) => {
|
|
4603
|
-
var N, A, Y,
|
|
4606
|
+
var N, A, Y, q;
|
|
4604
4607
|
const { channel: y } = oe(), { client: I } = fe(), k = V.useMemo(
|
|
4605
4608
|
() => {
|
|
4606
4609
|
var H;
|
|
@@ -4612,13 +4615,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4612
4615
|
},
|
|
4613
4616
|
[(N = y.state) == null ? void 0 : N.members, I == null ? void 0 : I.userID, y.type]
|
|
4614
4617
|
), T = V.useMemo(() => {
|
|
4615
|
-
var
|
|
4618
|
+
var W;
|
|
4616
4619
|
const H = I == null ? void 0 : I.userID;
|
|
4617
|
-
return H ? Object.values(((
|
|
4620
|
+
return H ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((J) => {
|
|
4618
4621
|
var de;
|
|
4619
4622
|
return ((de = J.user) == null ? void 0 : de.id) === H;
|
|
4620
4623
|
}) : void 0;
|
|
4621
|
-
}, [I == null ? void 0 : I.userID, (A = y.state) == null ? void 0 : A.members]), M = ((Y = T == null ? void 0 : T.user) == null ? void 0 : Y.is_account) ?? (T == null ? void 0 : T.is_account), O = ((
|
|
4624
|
+
}, [I == null ? void 0 : I.userID, (A = y.state) == null ? void 0 : A.members]), M = ((Y = T == null ? void 0 : T.user) == null ? void 0 : Y.is_account) ?? (T == null ? void 0 : T.is_account), O = ((q = k == null ? void 0 : k.user) == null ? void 0 : q.is_account) ?? (k == null ? void 0 : k.is_account), $ = E && M === !1 && O === !0, j = y.state.messages.some(
|
|
4622
4625
|
(H) => H.type !== "deleted"
|
|
4623
4626
|
), Z = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = D ? /* @__PURE__ */ s(
|
|
4624
4627
|
ba,
|
|
@@ -4637,21 +4640,21 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4637
4640
|
onDeleteConversationClick: d,
|
|
4638
4641
|
onBlockParticipantClick: m,
|
|
4639
4642
|
onReportParticipantClick: g,
|
|
4640
|
-
customChannelActions:
|
|
4643
|
+
customChannelActions: _,
|
|
4641
4644
|
renderChannelActions: S,
|
|
4642
4645
|
onParticipantNameClick: D
|
|
4643
4646
|
}
|
|
4644
4647
|
) : null, X = Q(
|
|
4645
4648
|
(H) => {
|
|
4646
|
-
const { message:
|
|
4647
|
-
|
|
4649
|
+
const { message: B } = Ne("ChannelView"), W = /* @__PURE__ */ s(
|
|
4650
|
+
wi,
|
|
4648
4651
|
{
|
|
4649
4652
|
...H,
|
|
4650
4653
|
chatbotVotingEnabled: x,
|
|
4651
4654
|
viewerLanguage: R
|
|
4652
4655
|
}
|
|
4653
4656
|
);
|
|
4654
|
-
return !z || !
|
|
4657
|
+
return !z || !B ? W : z(W, B);
|
|
4655
4658
|
},
|
|
4656
4659
|
[x, z, R]
|
|
4657
4660
|
);
|
|
@@ -4667,7 +4670,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4667
4670
|
children: /* @__PURE__ */ u(Mn, { children: [
|
|
4668
4671
|
!D && /* @__PURE__ */ u(te, { children: [
|
|
4669
4672
|
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
4670
|
-
|
|
4673
|
+
qi,
|
|
4671
4674
|
{
|
|
4672
4675
|
onBack: e,
|
|
4673
4676
|
showBackButton: t,
|
|
@@ -4682,9 +4685,9 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4682
4685
|
onDeleteConversationClick: d,
|
|
4683
4686
|
onBlockParticipantClick: m,
|
|
4684
4687
|
onReportParticipantClick: g,
|
|
4685
|
-
customChannelActions:
|
|
4688
|
+
customChannelActions: _,
|
|
4686
4689
|
renderChannelActions: S,
|
|
4687
|
-
renderHeaderTitleBadges:
|
|
4690
|
+
renderHeaderTitleBadges: w
|
|
4688
4691
|
}
|
|
4689
4692
|
) }, "lt-channel-header"),
|
|
4690
4693
|
Z
|
|
@@ -4700,7 +4703,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4700
4703
|
Z
|
|
4701
4704
|
] }) }),
|
|
4702
4705
|
/* @__PURE__ */ s(
|
|
4703
|
-
|
|
4706
|
+
Wt,
|
|
4704
4707
|
{
|
|
4705
4708
|
head: D && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4706
4709
|
ee,
|
|
@@ -4741,7 +4744,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4741
4744
|
Z
|
|
4742
4745
|
] }) }),
|
|
4743
4746
|
/* @__PURE__ */ s(
|
|
4744
|
-
|
|
4747
|
+
Wt,
|
|
4745
4748
|
{
|
|
4746
4749
|
head: D && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
|
|
4747
4750
|
ee,
|
|
@@ -4773,7 +4776,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4773
4776
|
] })
|
|
4774
4777
|
}
|
|
4775
4778
|
) });
|
|
4776
|
-
},
|
|
4779
|
+
}, Bs = V.memo(
|
|
4777
4780
|
({
|
|
4778
4781
|
channel: e,
|
|
4779
4782
|
onBack: t,
|
|
@@ -4784,7 +4787,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4784
4787
|
onLeaveConversation: o,
|
|
4785
4788
|
onBlockParticipant: l,
|
|
4786
4789
|
className: d,
|
|
4787
|
-
CustomChannelEmptyState: m =
|
|
4790
|
+
CustomChannelEmptyState: m = Yi,
|
|
4788
4791
|
showDeleteConversation: g = !0,
|
|
4789
4792
|
onDeleteConversationClick: h,
|
|
4790
4793
|
onBlockParticipantClick: f,
|
|
@@ -4793,8 +4796,8 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4793
4796
|
showReportParticipant: v = !0,
|
|
4794
4797
|
composerDisabled: x = !1,
|
|
4795
4798
|
composerDisabledReason: p,
|
|
4796
|
-
dmAgentEnabled:
|
|
4797
|
-
messageMetadata:
|
|
4799
|
+
dmAgentEnabled: w,
|
|
4800
|
+
messageMetadata: _,
|
|
4798
4801
|
onMessageSent: S,
|
|
4799
4802
|
showStarButton: z = !1,
|
|
4800
4803
|
chatbotVotingEnabled: E = !1,
|
|
@@ -4814,31 +4817,31 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4814
4817
|
const Z = Q(
|
|
4815
4818
|
async (X, N, A) => {
|
|
4816
4819
|
var J;
|
|
4817
|
-
const Y = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0,
|
|
4820
|
+
const Y = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, q = w && !Y, H = {
|
|
4818
4821
|
...N,
|
|
4819
|
-
...
|
|
4820
|
-
...
|
|
4822
|
+
...q && { silent: !0 },
|
|
4823
|
+
..._ && {
|
|
4821
4824
|
metadata: {
|
|
4822
4825
|
...N.metadata ?? {},
|
|
4823
|
-
...
|
|
4826
|
+
..._
|
|
4824
4827
|
}
|
|
4825
4828
|
}
|
|
4826
|
-
},
|
|
4829
|
+
}, B = {
|
|
4827
4830
|
...A,
|
|
4828
|
-
...
|
|
4829
|
-
},
|
|
4830
|
-
return S == null || S(
|
|
4831
|
+
...q && { skip_push: !0 }
|
|
4832
|
+
}, W = await e.sendMessage(H, B);
|
|
4833
|
+
return S == null || S(W), W;
|
|
4831
4834
|
},
|
|
4832
|
-
[e,
|
|
4835
|
+
[e, w, _, S]
|
|
4833
4836
|
), ee = G(null);
|
|
4834
4837
|
return K(() => {
|
|
4835
4838
|
if (!I) return;
|
|
4836
4839
|
const X = ee.current;
|
|
4837
4840
|
if (!X) return;
|
|
4838
4841
|
const N = (A) => {
|
|
4839
|
-
const Y = A.target,
|
|
4842
|
+
const Y = A.target, q = Y == null ? void 0 : Y.closest("a[href]"), H = q == null ? void 0 : q.getAttribute("href");
|
|
4840
4843
|
if (!H) return;
|
|
4841
|
-
const
|
|
4844
|
+
const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), J = W ? e.state.messages.find((de) => de.id === W) : void 0;
|
|
4842
4845
|
I(H, J);
|
|
4843
4846
|
};
|
|
4844
4847
|
return X.addEventListener("click", N), () => X.removeEventListener("click", N);
|
|
@@ -4850,7 +4853,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4850
4853
|
"messaging-channel-view h-full flex flex-col",
|
|
4851
4854
|
d
|
|
4852
4855
|
),
|
|
4853
|
-
children: /* @__PURE__ */ s($s.Provider, { value:
|
|
4856
|
+
children: /* @__PURE__ */ s($s.Provider, { value: w ?? !1, children: /* @__PURE__ */ s(
|
|
4854
4857
|
In,
|
|
4855
4858
|
{
|
|
4856
4859
|
channel: e,
|
|
@@ -4858,7 +4861,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4858
4861
|
EmptyStateIndicator: m,
|
|
4859
4862
|
LoadingIndicator: Ge,
|
|
4860
4863
|
DateSeparator: va,
|
|
4861
|
-
TypingIndicator:
|
|
4864
|
+
TypingIndicator: Vi,
|
|
4862
4865
|
doSendMessageRequest: Z,
|
|
4863
4866
|
...k ? { SendButton: k } : {},
|
|
4864
4867
|
...T ? { AttachmentPreviewList: T } : {},
|
|
@@ -4882,7 +4885,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4882
4885
|
composerDisabled: x,
|
|
4883
4886
|
composerDisabledReason: p,
|
|
4884
4887
|
showStarButton: z,
|
|
4885
|
-
dmAgentEnabled:
|
|
4888
|
+
dmAgentEnabled: w,
|
|
4886
4889
|
chatbotVotingEnabled: E,
|
|
4887
4890
|
renderChannelBanner: R,
|
|
4888
4891
|
renderHeaderTitleBadges: F,
|
|
@@ -4901,7 +4904,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
4901
4904
|
);
|
|
4902
4905
|
}
|
|
4903
4906
|
);
|
|
4904
|
-
|
|
4907
|
+
Bs.displayName = "ChannelView";
|
|
4905
4908
|
const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
|
|
4906
4909
|
/* @__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: "⚠️" }) }),
|
|
4907
4910
|
/* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -4917,7 +4920,7 @@ const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
|
|
|
4917
4920
|
)
|
|
4918
4921
|
] }) }));
|
|
4919
4922
|
Ce.displayName = "ErrorState";
|
|
4920
|
-
const
|
|
4923
|
+
const _l = ({
|
|
4921
4924
|
capabilities: e = {},
|
|
4922
4925
|
renderMessageInputActions: t,
|
|
4923
4926
|
renderConversationFooter: n,
|
|
@@ -4936,8 +4939,8 @@ const xl = ({
|
|
|
4936
4939
|
renderChannelBanner: v,
|
|
4937
4940
|
customChannelActions: x,
|
|
4938
4941
|
renderChannelActions: p,
|
|
4939
|
-
onParticipantNameClick:
|
|
4940
|
-
renderMessage:
|
|
4942
|
+
onParticipantNameClick: w,
|
|
4943
|
+
renderMessage: _,
|
|
4941
4944
|
onMessageLinkClick: S,
|
|
4942
4945
|
showChannelInfo: z,
|
|
4943
4946
|
composerInput: E
|
|
@@ -4950,7 +4953,7 @@ const xl = ({
|
|
|
4950
4953
|
refreshConnection: y,
|
|
4951
4954
|
service: I,
|
|
4952
4955
|
debug: k
|
|
4953
|
-
} = aa(), [T, M] =
|
|
4956
|
+
} = aa(), [T, M] = U(null), [O, $] = U(null), [j, Z] = U(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
|
|
4954
4957
|
X.current = o;
|
|
4955
4958
|
const N = G(a);
|
|
4956
4959
|
N.current = a;
|
|
@@ -4959,13 +4962,13 @@ const xl = ({
|
|
|
4959
4962
|
Y.current = T;
|
|
4960
4963
|
}, [T]), K(() => {
|
|
4961
4964
|
if (!R || !F) return;
|
|
4962
|
-
const
|
|
4963
|
-
if (!
|
|
4964
|
-
const
|
|
4965
|
-
if (A.current ===
|
|
4966
|
-
A.current =
|
|
4965
|
+
const B = R.userID;
|
|
4966
|
+
if (!B) return;
|
|
4967
|
+
const W = `${B}::${i}`;
|
|
4968
|
+
if (A.current === W) return;
|
|
4969
|
+
A.current = W;
|
|
4967
4970
|
const J = () => {
|
|
4968
|
-
A.current ===
|
|
4971
|
+
A.current === W && (A.current = null);
|
|
4969
4972
|
};
|
|
4970
4973
|
(async () => {
|
|
4971
4974
|
var De, ze;
|
|
@@ -4977,7 +4980,7 @@ const xl = ({
|
|
|
4977
4980
|
const ae = await R.queryChannels(
|
|
4978
4981
|
{
|
|
4979
4982
|
type: "messaging",
|
|
4980
|
-
members: { $eq: [
|
|
4983
|
+
members: { $eq: [B, i] }
|
|
4981
4984
|
},
|
|
4982
4985
|
{},
|
|
4983
4986
|
{ limit: 1 }
|
|
@@ -5021,11 +5024,11 @@ const xl = ({
|
|
|
5021
5024
|
}
|
|
5022
5025
|
})();
|
|
5023
5026
|
}, [i, R, F, I, k]);
|
|
5024
|
-
const
|
|
5025
|
-
|
|
5027
|
+
const q = G(r);
|
|
5028
|
+
q.current = r;
|
|
5026
5029
|
const H = Q(() => {
|
|
5027
|
-
var
|
|
5028
|
-
M(null), Z(!0), (
|
|
5030
|
+
var B;
|
|
5031
|
+
M(null), Z(!0), (B = q.current) == null || B.call(q);
|
|
5029
5032
|
}, []);
|
|
5030
5033
|
return D ? /* @__PURE__ */ s(Ge, {}) : L ? /* @__PURE__ */ s(Ce, { message: L, onBack: y }) : !F || !R ? /* @__PURE__ */ s(
|
|
5031
5034
|
Ce,
|
|
@@ -5034,7 +5037,7 @@ const xl = ({
|
|
|
5034
5037
|
onBack: y
|
|
5035
5038
|
}
|
|
5036
5039
|
) : O ? /* @__PURE__ */ s(Ce, { message: O }) : j && !T ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
|
|
5037
|
-
|
|
5040
|
+
Bs,
|
|
5038
5041
|
{
|
|
5039
5042
|
channel: T,
|
|
5040
5043
|
renderMessageInputActions: t,
|
|
@@ -5053,8 +5056,8 @@ const xl = ({
|
|
|
5053
5056
|
renderHeaderTitleBadges: b,
|
|
5054
5057
|
customChannelActions: x,
|
|
5055
5058
|
renderChannelActions: p,
|
|
5056
|
-
onParticipantNameClick:
|
|
5057
|
-
renderMessage:
|
|
5059
|
+
onParticipantNameClick: w,
|
|
5060
|
+
renderMessage: _,
|
|
5058
5061
|
onMessageLinkClick: S,
|
|
5059
5062
|
showChannelInfo: z,
|
|
5060
5063
|
composerInput: E
|
|
@@ -5062,13 +5065,13 @@ const xl = ({
|
|
|
5062
5065
|
T.id
|
|
5063
5066
|
) }) }) : /* @__PURE__ */ s(Ge, {});
|
|
5064
5067
|
};
|
|
5065
|
-
function
|
|
5068
|
+
function Xi(e) {
|
|
5066
5069
|
const t = e.state.pending_messages;
|
|
5067
5070
|
if (t != null && t.length)
|
|
5068
5071
|
for (const n of t)
|
|
5069
5072
|
e.state.addMessageSorted(n.message);
|
|
5070
5073
|
}
|
|
5071
|
-
const
|
|
5074
|
+
const Us = V.createContext({
|
|
5072
5075
|
selectedChannel: void 0,
|
|
5073
5076
|
onChannelSelect: () => {
|
|
5074
5077
|
},
|
|
@@ -5076,18 +5079,18 @@ const Bs = V.createContext({
|
|
|
5076
5079
|
renderMessagePreview: void 0,
|
|
5077
5080
|
channelPreview: void 0,
|
|
5078
5081
|
viewerLanguage: void 0
|
|
5079
|
-
}),
|
|
5082
|
+
}), Ki = Us.Provider, Zi = () => V.useContext(Us), Ji = (e, t) => {
|
|
5080
5083
|
const n = new Date(
|
|
5081
5084
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
5082
5085
|
), r = new Date(
|
|
5083
5086
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
5084
5087
|
).getTime() - n.getTime();
|
|
5085
5088
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
5086
|
-
},
|
|
5089
|
+
}, Qi = (e) => {
|
|
5087
5090
|
const t = /* @__PURE__ */ new Date();
|
|
5088
5091
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5089
5092
|
return "Just now";
|
|
5090
|
-
const a =
|
|
5093
|
+
const a = Ji(e, t);
|
|
5091
5094
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5092
5095
|
hour: "numeric",
|
|
5093
5096
|
minute: "2-digit",
|
|
@@ -5107,7 +5110,7 @@ const Bs = V.createContext({
|
|
|
5107
5110
|
channelPreview: o,
|
|
5108
5111
|
renderMessagePreview: l,
|
|
5109
5112
|
viewerLanguage: d
|
|
5110
|
-
} =
|
|
5113
|
+
} = Zi(), { client: m } = fe(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = mt(t);
|
|
5111
5114
|
if (o)
|
|
5112
5115
|
return /* @__PURE__ */ s(
|
|
5113
5116
|
o,
|
|
@@ -5135,7 +5138,7 @@ const Bs = V.createContext({
|
|
|
5135
5138
|
for (let k = y.length - 1; k >= 0; k--)
|
|
5136
5139
|
if (y[k].type !== "system") return y[k];
|
|
5137
5140
|
}
|
|
5138
|
-
})(),
|
|
5141
|
+
})(), _ = (() => {
|
|
5139
5142
|
var M;
|
|
5140
5143
|
const y = ps({
|
|
5141
5144
|
message: p,
|
|
@@ -5154,7 +5157,7 @@ const Bs = V.createContext({
|
|
|
5154
5157
|
if (y) return y;
|
|
5155
5158
|
const T = (M = p == null ? void 0 : p.attachments) == null ? void 0 : M[0];
|
|
5156
5159
|
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";
|
|
5157
|
-
})(), S = p != null && p.created_at ?
|
|
5160
|
+
})(), S = p != null && p.created_at ? Qi(new Date(p.created_at)) : "", z = p ? Be(p) : !1, E = l ? l(p, _) : `${z ? "✨ " : ""}${_}`, R = n ?? 0;
|
|
5158
5161
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5159
5162
|
channelId: t == null ? void 0 : t.id,
|
|
5160
5163
|
isSelected: g,
|
|
@@ -5214,14 +5217,14 @@ const Bs = V.createContext({
|
|
|
5214
5217
|
}
|
|
5215
5218
|
);
|
|
5216
5219
|
js.displayName = "CustomChannelPreview";
|
|
5217
|
-
const
|
|
5220
|
+
const el = { last_message_at: -1 }, tl = V.memo(
|
|
5218
5221
|
({
|
|
5219
5222
|
onChannelSelect: e,
|
|
5220
5223
|
selectedChannel: t,
|
|
5221
5224
|
filters: n,
|
|
5222
5225
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5223
5226
|
channelRenderFilterFn: r,
|
|
5224
|
-
sort: i =
|
|
5227
|
+
sort: i = el,
|
|
5225
5228
|
className: o,
|
|
5226
5229
|
customEmptyStateIndicator: l,
|
|
5227
5230
|
channelListPaginator: d = Rn,
|
|
@@ -5235,18 +5238,18 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5235
5238
|
onAddedToChannel: x,
|
|
5236
5239
|
onChannelUpdated: p
|
|
5237
5240
|
}) => {
|
|
5238
|
-
const
|
|
5239
|
-
|
|
5240
|
-
const { debug:
|
|
5241
|
+
const w = V.useRef(0);
|
|
5242
|
+
w.current++;
|
|
5243
|
+
const { debug: _ = !1 } = ut(), S = V.useCallback(
|
|
5241
5244
|
(E) => {
|
|
5242
5245
|
for (const R of E)
|
|
5243
|
-
|
|
5246
|
+
Xi(R);
|
|
5244
5247
|
return r ? r(E) : E;
|
|
5245
5248
|
},
|
|
5246
5249
|
[r]
|
|
5247
5250
|
);
|
|
5248
|
-
|
|
5249
|
-
renderCount:
|
|
5251
|
+
_ && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
5252
|
+
renderCount: w.current,
|
|
5250
5253
|
selectedChannelId: t == null ? void 0 : t.id,
|
|
5251
5254
|
filters: n
|
|
5252
5255
|
});
|
|
@@ -5254,7 +5257,7 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5254
5257
|
() => ({
|
|
5255
5258
|
selectedChannel: t,
|
|
5256
5259
|
onChannelSelect: e,
|
|
5257
|
-
debug:
|
|
5260
|
+
debug: _,
|
|
5258
5261
|
channelPreview: m,
|
|
5259
5262
|
renderMessagePreview: g,
|
|
5260
5263
|
viewerLanguage: h
|
|
@@ -5262,7 +5265,7 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5262
5265
|
[
|
|
5263
5266
|
t,
|
|
5264
5267
|
e,
|
|
5265
|
-
|
|
5268
|
+
_,
|
|
5266
5269
|
m,
|
|
5267
5270
|
g,
|
|
5268
5271
|
h
|
|
@@ -5275,7 +5278,7 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5275
5278
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5276
5279
|
o
|
|
5277
5280
|
),
|
|
5278
|
-
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(
|
|
5281
|
+
children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Ki, { value: z, children: /* @__PURE__ */ s(
|
|
5279
5282
|
An,
|
|
5280
5283
|
{
|
|
5281
5284
|
filters: n,
|
|
@@ -5299,11 +5302,11 @@ const Qi = { last_message_at: -1 }, el = V.memo(
|
|
|
5299
5302
|
);
|
|
5300
5303
|
}
|
|
5301
5304
|
);
|
|
5302
|
-
|
|
5303
|
-
const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`,
|
|
5305
|
+
tl.displayName = "ChannelList";
|
|
5306
|
+
const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, sl = {
|
|
5304
5307
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5305
5308
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5306
|
-
},
|
|
5309
|
+
}, nl = ({ variant: e }) => /* @__PURE__ */ s(
|
|
5307
5310
|
"span",
|
|
5308
5311
|
{
|
|
5309
5312
|
"aria-hidden": "true",
|
|
@@ -5313,12 +5316,12 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5313
5316
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5314
5317
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5315
5318
|
transformOrigin: "center",
|
|
5316
|
-
backgroundColor:
|
|
5319
|
+
backgroundColor: sl[e],
|
|
5317
5320
|
WebkitMask: os,
|
|
5318
5321
|
mask: os
|
|
5319
5322
|
}
|
|
5320
5323
|
}
|
|
5321
|
-
),
|
|
5324
|
+
), al = {
|
|
5322
5325
|
sent: {
|
|
5323
5326
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5324
5327
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5343,17 +5346,17 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5343
5346
|
r
|
|
5344
5347
|
),
|
|
5345
5348
|
style: {
|
|
5346
|
-
...
|
|
5349
|
+
...al[e],
|
|
5347
5350
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5348
5351
|
isolation: "isolate"
|
|
5349
5352
|
},
|
|
5350
5353
|
children: [
|
|
5351
5354
|
a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5352
5355
|
/* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
|
|
5353
|
-
n && /* @__PURE__ */ s(
|
|
5356
|
+
n && /* @__PURE__ */ s(nl, { variant: e })
|
|
5354
5357
|
]
|
|
5355
5358
|
}
|
|
5356
|
-
),
|
|
5359
|
+
), rl = ({
|
|
5357
5360
|
text: e,
|
|
5358
5361
|
tail: t,
|
|
5359
5362
|
header: n,
|
|
@@ -5367,10 +5370,10 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5367
5370
|
header: n,
|
|
5368
5371
|
className: a
|
|
5369
5372
|
}
|
|
5370
|
-
),
|
|
5371
|
-
Sent:
|
|
5372
|
-
Received:
|
|
5373
|
-
},
|
|
5373
|
+
), il = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Vs, { variant: "sent", text: e, tail: t, className: n }), wl = {
|
|
5374
|
+
Sent: il,
|
|
5375
|
+
Received: rl
|
|
5376
|
+
}, ll = ({
|
|
5374
5377
|
question: e,
|
|
5375
5378
|
onClick: t,
|
|
5376
5379
|
loading: n = !1,
|
|
@@ -5392,7 +5395,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5392
5395
|
),
|
|
5393
5396
|
children: e
|
|
5394
5397
|
}
|
|
5395
|
-
),
|
|
5398
|
+
), Nl = ({
|
|
5396
5399
|
faqs: e,
|
|
5397
5400
|
onFaqClick: t,
|
|
5398
5401
|
loadingFaqId: n,
|
|
@@ -5421,7 +5424,7 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5421
5424
|
children: [
|
|
5422
5425
|
a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5423
5426
|
l.map((d) => /* @__PURE__ */ s(
|
|
5424
|
-
|
|
5427
|
+
ll,
|
|
5425
5428
|
{
|
|
5426
5429
|
question: d.question,
|
|
5427
5430
|
onClick: () => t(d.id),
|
|
@@ -5437,40 +5440,40 @@ const os = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|
|
5437
5440
|
export {
|
|
5438
5441
|
vs as A,
|
|
5439
5442
|
bt as B,
|
|
5440
|
-
|
|
5443
|
+
Yi as C,
|
|
5441
5444
|
ht as D,
|
|
5442
|
-
|
|
5443
|
-
|
|
5445
|
+
xl as E,
|
|
5446
|
+
Nl as F,
|
|
5444
5447
|
$r as G,
|
|
5445
|
-
|
|
5448
|
+
_a as H,
|
|
5446
5449
|
aa as I,
|
|
5447
5450
|
es as L,
|
|
5448
|
-
|
|
5451
|
+
bl as M,
|
|
5449
5452
|
ye as a,
|
|
5450
5453
|
ne as b,
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5454
|
+
tl as c,
|
|
5455
|
+
Bs as d,
|
|
5456
|
+
vl as e,
|
|
5457
|
+
ll as f,
|
|
5455
5458
|
ce as g,
|
|
5456
5459
|
Oe as h,
|
|
5457
5460
|
ke as i,
|
|
5458
5461
|
wl as j,
|
|
5459
5462
|
Xr as k,
|
|
5460
|
-
|
|
5461
|
-
|
|
5463
|
+
pl as l,
|
|
5464
|
+
_l as m,
|
|
5462
5465
|
nr as n,
|
|
5463
5466
|
he as o,
|
|
5464
5467
|
er as p,
|
|
5465
|
-
|
|
5466
|
-
|
|
5468
|
+
Qi as q,
|
|
5469
|
+
we as r,
|
|
5467
5470
|
sr as s,
|
|
5468
5471
|
ps as t,
|
|
5469
|
-
|
|
5472
|
+
ws as u,
|
|
5470
5473
|
oa as v,
|
|
5471
|
-
|
|
5472
|
-
|
|
5474
|
+
qa as w,
|
|
5475
|
+
wa as x,
|
|
5473
5476
|
He as y,
|
|
5474
5477
|
pt as z
|
|
5475
5478
|
};
|
|
5476
|
-
//# sourceMappingURL=index-
|
|
5479
|
+
//# sourceMappingURL=index-0uNeCMZl.js.map
|