@linktr.ee/messaging-react 1.0.2 → 1.1.0-rc-1760927977
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/assets/index.css +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +836 -1079
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/components/ActionButton/ActionButton.stories.tsx +2 -1
- package/src/components/ActionButton/ActionButton.test.tsx +2 -0
- package/src/components/Avatar/Avatar.stories.tsx +2 -1
- package/src/components/Avatar/index.tsx +2 -1
- package/src/components/ChannelList/ChannelList.stories.tsx +4 -2
- package/src/components/ChannelList/CustomChannelPreview.stories.tsx +31 -27
- package/src/components/ChannelList/CustomChannelPreview.tsx +5 -11
- package/src/components/ChannelList/index.tsx +43 -35
- package/src/components/ChannelView.tsx +150 -127
- package/src/components/CloseButton/index.tsx +4 -5
- package/src/components/IconButton/IconButton.stories.tsx +3 -3
- package/src/components/Loading/Loading.stories.tsx +2 -1
- package/src/components/Loading/index.tsx +7 -9
- package/src/components/MessagingShell/EmptyState.stories.tsx +2 -1
- package/src/components/MessagingShell/ErrorState.stories.tsx +2 -1
- package/src/components/MessagingShell/LoadingState.stories.tsx +2 -1
- package/src/components/MessagingShell/LoadingState.tsx +3 -5
- package/src/components/MessagingShell/index.tsx +159 -135
- package/src/components/ParticipantPicker/ParticipantItem.stories.tsx +4 -2
- package/src/components/ParticipantPicker/ParticipantItem.tsx +25 -21
- package/src/components/ParticipantPicker/ParticipantPicker.stories.tsx +4 -2
- package/src/components/ParticipantPicker/ParticipantPicker.tsx +104 -76
- package/src/components/ParticipantPicker/index.tsx +93 -72
- package/src/components/SearchInput/SearchInput.stories.tsx +2 -1
- package/src/components/SearchInput/SearchInput.test.tsx +4 -2
- package/src/components/SearchInput/index.tsx +14 -15
- package/src/hooks/useParticipants.ts +1 -0
- package/src/index.ts +3 -0
- package/src/providers/MessagingProvider.tsx +213 -135
- package/src/stories/mocks.tsx +18 -19
- package/src/styles.css +75 -0
- package/src/test/setup.ts +11 -12
- package/src/test/utils.tsx +6 -7
- package/src/types.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,101 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as e from "react";
|
|
3
|
-
import _, { createContext as de, useContext as we, useState as A, useRef as $, useEffect as B, useCallback as H } from "react";
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as se } from "react/jsx-runtime";
|
|
4
2
|
import L from "classnames";
|
|
5
|
-
import {
|
|
6
|
-
import { StreamChatService as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
weight: "regular",
|
|
11
|
-
mirrored: !1
|
|
12
|
-
}), D = e.forwardRef(
|
|
13
|
-
(n, a) => {
|
|
14
|
-
const {
|
|
15
|
-
alt: l,
|
|
16
|
-
color: o,
|
|
17
|
-
size: c,
|
|
18
|
-
weight: m,
|
|
19
|
-
mirrored: u,
|
|
20
|
-
children: r,
|
|
21
|
-
weights: s,
|
|
22
|
-
...w
|
|
23
|
-
} = n, {
|
|
24
|
-
color: C = "currentColor",
|
|
25
|
-
size: f,
|
|
26
|
-
weight: i = "regular",
|
|
27
|
-
mirrored: b = !1,
|
|
28
|
-
...x
|
|
29
|
-
} = e.useContext(Le);
|
|
30
|
-
return /* @__PURE__ */ e.createElement(
|
|
31
|
-
"svg",
|
|
32
|
-
{
|
|
33
|
-
ref: a,
|
|
34
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
-
width: c ?? f,
|
|
36
|
-
height: c ?? f,
|
|
37
|
-
fill: o ?? C,
|
|
38
|
-
viewBox: "0 0 256 256",
|
|
39
|
-
transform: u || b ? "scale(-1, 1)" : void 0,
|
|
40
|
-
...x,
|
|
41
|
-
...w
|
|
42
|
-
},
|
|
43
|
-
!!l && /* @__PURE__ */ e.createElement("title", null, l),
|
|
44
|
-
r,
|
|
45
|
-
s.get(m ?? i)
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
D.displayName = "IconBase";
|
|
50
|
-
const Ve = /* @__PURE__ */ new Map([
|
|
51
|
-
[
|
|
52
|
-
"bold",
|
|
53
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232.49,55.51l-32-32a12,12,0,0,0-17,0l-96,96A12,12,0,0,0,84,128v32a12,12,0,0,0,12,12h32a12,12,0,0,0,8.49-3.51l96-96A12,12,0,0,0,232.49,55.51ZM192,49l15,15L196,75,181,60Zm-69,99H108V133l56-56,15,15Zm105-7.43V208a20,20,0,0,1-20,20H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28h67.43a12,12,0,0,1,0,24H52V204H204V140.57a12,12,0,0,1,24,0Z" }))
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
"duotone",
|
|
57
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M200,88l-72,72H96V128l72-72Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }))
|
|
58
|
-
],
|
|
59
|
-
[
|
|
60
|
-
"fill",
|
|
61
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Zm5.66-58.34-96,96A8,8,0,0,1,128,168H96a8,8,0,0,1-8-8V128a8,8,0,0,1,2.34-5.66l96-96a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,229.66,69.66Zm-17-5.66L192,43.31,179.31,56,200,76.69Z" }))
|
|
62
|
-
],
|
|
63
|
-
[
|
|
64
|
-
"light",
|
|
65
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228.24,59.76l-32-32a6,6,0,0,0-8.48,0l-96,96A6,6,0,0,0,90,128v32a6,6,0,0,0,6,6h32a6,6,0,0,0,4.24-1.76l96-96A6,6,0,0,0,228.24,59.76ZM125.51,154H102V130.49l66-66L191.51,88ZM200,79.51,176.49,56,192,40.49,215.51,64ZM222,128v80a14,14,0,0,1-14,14H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34h80a6,6,0,0,1,0,12H48a2,2,0,0,0-2,2V208a2,2,0,0,0,2,2H208a2,2,0,0,0,2-2V128a6,6,0,0,1,12,0Z" }))
|
|
66
|
-
],
|
|
67
|
-
[
|
|
68
|
-
"regular",
|
|
69
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M229.66,58.34l-32-32a8,8,0,0,0-11.32,0l-96,96A8,8,0,0,0,88,128v32a8,8,0,0,0,8,8h32a8,8,0,0,0,5.66-2.34l96-96A8,8,0,0,0,229.66,58.34ZM124.69,152H104V131.31l64-64L188.69,88ZM200,76.69,179.31,56,192,43.31,212.69,64ZM224,128v80a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32h80a8,8,0,0,1,0,16H48V208H208V128a8,8,0,0,1,16,0Z" }))
|
|
70
|
-
],
|
|
71
|
-
[
|
|
72
|
-
"thin",
|
|
73
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M226.83,61.17l-32-32a4,4,0,0,0-5.66,0l-96,96A4,4,0,0,0,92,128v32a4,4,0,0,0,4,4h32a4,4,0,0,0,2.83-1.17l96-96A4,4,0,0,0,226.83,61.17ZM126.34,156H100V129.66l68-68L194.34,88ZM200,82.34,173.66,56,192,37.66,218.34,64ZM220,128v80a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36h80a4,4,0,0,1,0,8H48a4,4,0,0,0-4,4V208a4,4,0,0,0,4,4H208a4,4,0,0,0,4-4V128a4,4,0,0,1,8,0Z" }))
|
|
74
|
-
]
|
|
75
|
-
]), me = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Ve }));
|
|
76
|
-
me.displayName = "NotePencilIcon";
|
|
77
|
-
function J({ label: n, className: a, children: l, ...o }) {
|
|
78
|
-
return /* @__PURE__ */ d(
|
|
79
|
-
"button",
|
|
80
|
-
{
|
|
81
|
-
type: "button",
|
|
82
|
-
className: L(
|
|
83
|
-
"rounded-full p-2 transition-colors focus-ring",
|
|
84
|
-
{
|
|
85
|
-
"cursor-not-allowed opacity-50": o.disabled,
|
|
86
|
-
"hover:bg-sand": !o.disabled
|
|
87
|
-
},
|
|
88
|
-
a
|
|
89
|
-
),
|
|
90
|
-
...o,
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ t("span", { className: "sr-only", children: n }),
|
|
93
|
-
l
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
const he = de({
|
|
3
|
+
import $, { createContext as ue, useContext as me, useCallback as U, useState as w, useRef as A, useEffect as B } from "react";
|
|
4
|
+
import { StreamChatService as he } from "@linktr.ee/messaging-core";
|
|
5
|
+
import { Chat as fe, useChatContext as ge, ChannelList as xe, Channel as Ne, Window as Ce, MessageList as be, useChannelStateContext as ve, MessageInput as we } from "stream-chat-react";
|
|
6
|
+
import { NotePencilIcon as Ee, XIcon as oe, ArrowLeftIcon as Ie, DotsThreeIcon as ye, SpinnerGapIcon as Q, SignOutIcon as Se, ProhibitInsetIcon as te, FlagIcon as Re, MagnifyingGlassIcon as ke, ChatCircleDotsIcon as ne } from "@phosphor-icons/react";
|
|
7
|
+
const ae = ue({
|
|
99
8
|
service: null,
|
|
100
9
|
client: null,
|
|
101
10
|
isConnected: !1,
|
|
@@ -106,147 +15,230 @@ const he = de({
|
|
|
106
15
|
refreshConnection: async () => {
|
|
107
16
|
},
|
|
108
17
|
debug: !1
|
|
109
|
-
}),
|
|
110
|
-
children:
|
|
111
|
-
user:
|
|
112
|
-
serviceConfig:
|
|
113
|
-
apiKey:
|
|
114
|
-
capabilities:
|
|
18
|
+
}), Z = () => me(ae), Xe = ({
|
|
19
|
+
children: t,
|
|
20
|
+
user: s,
|
|
21
|
+
serviceConfig: n,
|
|
22
|
+
apiKey: l,
|
|
23
|
+
capabilities: a = {},
|
|
115
24
|
customization: m = {},
|
|
116
|
-
debug:
|
|
25
|
+
debug: d = !1
|
|
117
26
|
}) => {
|
|
118
|
-
const r = (
|
|
119
|
-
|
|
120
|
-
|
|
27
|
+
const r = U(
|
|
28
|
+
(N, ...S) => {
|
|
29
|
+
d && console.log(`🔥 [MessagingProvider] ${N}`, ...S);
|
|
30
|
+
},
|
|
31
|
+
[d]
|
|
32
|
+
);
|
|
121
33
|
r("🔄 RENDER START", {
|
|
122
|
-
userId:
|
|
123
|
-
apiKey: (
|
|
124
|
-
serviceConfig: !!
|
|
125
|
-
capabilities: Object.keys(
|
|
34
|
+
userId: s == null ? void 0 : s.id,
|
|
35
|
+
apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
|
|
36
|
+
serviceConfig: !!n,
|
|
37
|
+
capabilities: Object.keys(a),
|
|
126
38
|
customization: Object.keys(m)
|
|
127
39
|
});
|
|
128
|
-
const [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
40
|
+
const [o, b] = w(null), [x, g] = w(null), [c, C] = w(!1), [v, y] = w(!1), [I, P] = w(null), p = A(!1), E = A({
|
|
41
|
+
userId: s == null ? void 0 : s.id,
|
|
42
|
+
apiKey: l,
|
|
43
|
+
serviceConfig: n,
|
|
44
|
+
capabilities: a,
|
|
45
|
+
customization: m
|
|
46
|
+
}), R = A(0);
|
|
47
|
+
R.current++, r("📊 RENDER INFO", {
|
|
48
|
+
renderCount: R.current,
|
|
49
|
+
currentProps: { userId: s == null ? void 0 : s.id, apiKey: (l == null ? void 0 : l.substring(0, 8)) + "..." },
|
|
132
50
|
propChanges: {
|
|
133
|
-
userChanged:
|
|
134
|
-
apiKeyChanged:
|
|
135
|
-
serviceConfigChanged:
|
|
136
|
-
capabilitiesChanged:
|
|
137
|
-
customizationChanged:
|
|
51
|
+
userChanged: E.current.userId !== (s == null ? void 0 : s.id),
|
|
52
|
+
apiKeyChanged: E.current.apiKey !== l,
|
|
53
|
+
serviceConfigChanged: E.current.serviceConfig !== n,
|
|
54
|
+
capabilitiesChanged: E.current.capabilities !== a,
|
|
55
|
+
customizationChanged: E.current.customization !== m
|
|
138
56
|
}
|
|
139
|
-
}),
|
|
140
|
-
|
|
57
|
+
}), E.current = {
|
|
58
|
+
userId: s == null ? void 0 : s.id,
|
|
59
|
+
apiKey: l,
|
|
60
|
+
serviceConfig: n,
|
|
61
|
+
capabilities: a,
|
|
62
|
+
customization: m
|
|
63
|
+
}, B(() => {
|
|
64
|
+
const N = R.current;
|
|
141
65
|
if (r("🔧 SERVICE INIT EFFECT TRIGGERED", {
|
|
142
66
|
renderCount: N,
|
|
143
|
-
apiKey: !!
|
|
144
|
-
serviceConfig: !!
|
|
67
|
+
apiKey: !!l,
|
|
68
|
+
serviceConfig: !!n,
|
|
145
69
|
dependencies: {
|
|
146
|
-
apiKey: (
|
|
147
|
-
serviceConfigRef:
|
|
148
|
-
serviceConfigStable:
|
|
149
|
-
apiKeyStable:
|
|
70
|
+
apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
|
|
71
|
+
serviceConfigRef: n,
|
|
72
|
+
serviceConfigStable: E.current.serviceConfig === n,
|
|
73
|
+
apiKeyStable: E.current.apiKey === l
|
|
150
74
|
}
|
|
151
|
-
}), !
|
|
152
|
-
r("⚠️ SERVICE INIT SKIPPED", {
|
|
75
|
+
}), !l || !n) {
|
|
76
|
+
r("⚠️ SERVICE INIT SKIPPED", {
|
|
77
|
+
renderCount: N,
|
|
78
|
+
reason: "Missing apiKey or serviceConfig"
|
|
79
|
+
});
|
|
153
80
|
return;
|
|
154
81
|
}
|
|
155
82
|
r("🚀 CREATING NEW SERVICE", {
|
|
156
83
|
renderCount: N,
|
|
157
|
-
apiKey: (
|
|
158
|
-
serviceConfigChanged:
|
|
84
|
+
apiKey: (l == null ? void 0 : l.substring(0, 8)) + "...",
|
|
85
|
+
serviceConfigChanged: E.current.serviceConfig !== n
|
|
159
86
|
});
|
|
160
|
-
const
|
|
161
|
-
...
|
|
162
|
-
apiKey:
|
|
163
|
-
debug:
|
|
87
|
+
const S = new he({
|
|
88
|
+
...n,
|
|
89
|
+
apiKey: l,
|
|
90
|
+
debug: d
|
|
164
91
|
});
|
|
165
|
-
return
|
|
166
|
-
|
|
92
|
+
return b(S), r("✅ SERVICE SET", {
|
|
93
|
+
renderCount: N,
|
|
94
|
+
serviceInstance: !!S
|
|
95
|
+
}), () => {
|
|
96
|
+
r("🧹 SERVICE CLEANUP", {
|
|
97
|
+
renderCount: N,
|
|
98
|
+
reason: "Effect cleanup"
|
|
99
|
+
}), S.disconnectUser().catch(console.error);
|
|
167
100
|
};
|
|
168
|
-
}, [
|
|
169
|
-
const
|
|
101
|
+
}, [l, n, d, r]);
|
|
102
|
+
const T = A(null);
|
|
170
103
|
B(() => {
|
|
171
|
-
var
|
|
104
|
+
var S, j;
|
|
172
105
|
if (r("🔗 USER CONNECTION EFFECT TRIGGERED", {
|
|
173
|
-
hasService: !!
|
|
174
|
-
hasUser: !!
|
|
175
|
-
userId:
|
|
176
|
-
isConnecting:
|
|
177
|
-
isConnected:
|
|
178
|
-
dependencies: { service: !!
|
|
179
|
-
}), !
|
|
106
|
+
hasService: !!o,
|
|
107
|
+
hasUser: !!s,
|
|
108
|
+
userId: s == null ? void 0 : s.id,
|
|
109
|
+
isConnecting: p.current,
|
|
110
|
+
isConnected: c,
|
|
111
|
+
dependencies: { service: !!o, userId: s == null ? void 0 : s.id }
|
|
112
|
+
}), !o || !s) {
|
|
180
113
|
r("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
|
|
181
114
|
return;
|
|
182
115
|
}
|
|
183
|
-
if (
|
|
116
|
+
if (p.current) {
|
|
184
117
|
r("⚠️ USER CONNECTION SKIPPED", "Already connecting");
|
|
185
118
|
return;
|
|
186
119
|
}
|
|
187
|
-
if (((
|
|
188
|
-
r(
|
|
120
|
+
if (((S = T.current) == null ? void 0 : S.serviceId) === o && ((j = T.current) == null ? void 0 : j.userId) === s.id) {
|
|
121
|
+
r(
|
|
122
|
+
"⚠️ USER CONNECTION SKIPPED",
|
|
123
|
+
"Already connected this user with this service"
|
|
124
|
+
);
|
|
189
125
|
return;
|
|
190
126
|
}
|
|
191
127
|
(async () => {
|
|
192
|
-
r("🚀 STARTING USER CONNECTION", { userId:
|
|
128
|
+
r("🚀 STARTING USER CONNECTION", { userId: s.id }), p.current = !0, y(!0), P(null);
|
|
193
129
|
try {
|
|
194
|
-
r("📞 CALLING SERVICE.CONNECTUSER", { userId:
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
130
|
+
r("📞 CALLING SERVICE.CONNECTUSER", { userId: s.id });
|
|
131
|
+
const F = await o.connectUser(s);
|
|
132
|
+
g(F), C(!0), T.current = { serviceId: o, userId: s.id }, r("✅ USER CONNECTION SUCCESS", {
|
|
133
|
+
userId: s.id,
|
|
134
|
+
clientId: F.userID
|
|
135
|
+
});
|
|
136
|
+
} catch (F) {
|
|
137
|
+
const H = F instanceof Error ? F.message : "Connection failed";
|
|
138
|
+
P(H), r("❌ USER CONNECTION ERROR", {
|
|
139
|
+
userId: s.id,
|
|
140
|
+
error: H
|
|
141
|
+
});
|
|
200
142
|
} finally {
|
|
201
|
-
|
|
143
|
+
y(!1), p.current = !1, r("🔄 USER CONNECTION FINISHED", {
|
|
144
|
+
userId: s.id,
|
|
145
|
+
isConnected: c
|
|
146
|
+
});
|
|
202
147
|
}
|
|
203
148
|
})();
|
|
204
|
-
}, [s,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
149
|
+
}, [o, s, r, c]), B(() => (r("🔌 CLEANUP EFFECT REGISTERED", {
|
|
150
|
+
hasService: !!o,
|
|
151
|
+
isConnected: c
|
|
152
|
+
}), () => {
|
|
153
|
+
o && c ? (r(
|
|
154
|
+
"🧹 CLEANUP EFFECT TRIGGERED",
|
|
155
|
+
"Cleaning up connection on unmount"
|
|
156
|
+
), T.current = null, o.disconnectUser().catch(console.error)) : r("🔇 CLEANUP EFFECT SKIPPED", {
|
|
157
|
+
hasService: !!o,
|
|
158
|
+
isConnected: c
|
|
159
|
+
});
|
|
160
|
+
}), [o, c, r]);
|
|
161
|
+
const u = U(async () => {
|
|
162
|
+
if (r("🔄 REFRESH CONNECTION CALLED", {
|
|
163
|
+
hasService: !!o,
|
|
164
|
+
hasUser: !!s
|
|
165
|
+
}), !o || !s) {
|
|
209
166
|
r("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
|
|
210
167
|
return;
|
|
211
168
|
}
|
|
212
|
-
r("🚀 STARTING CONNECTION REFRESH", { userId:
|
|
169
|
+
r("🚀 STARTING CONNECTION REFRESH", { userId: s.id }), y(!0);
|
|
213
170
|
try {
|
|
214
|
-
r("🔌 DISCONNECTING FOR REFRESH"), await
|
|
215
|
-
const N = await
|
|
216
|
-
|
|
171
|
+
r("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), r("📞 RECONNECTING FOR REFRESH");
|
|
172
|
+
const N = await o.connectUser(s);
|
|
173
|
+
g(N), C(!0), P(null), r("✅ CONNECTION REFRESH SUCCESS", { userId: s.id });
|
|
217
174
|
} catch (N) {
|
|
218
|
-
const
|
|
219
|
-
|
|
175
|
+
const S = N instanceof Error ? N.message : "Refresh failed";
|
|
176
|
+
P(S), r("❌ CONNECTION REFRESH ERROR", {
|
|
177
|
+
userId: s.id,
|
|
178
|
+
error: S
|
|
179
|
+
});
|
|
220
180
|
} finally {
|
|
221
|
-
|
|
181
|
+
y(!1), r("🔄 CONNECTION REFRESH FINISHED", { userId: s.id });
|
|
222
182
|
}
|
|
223
|
-
}, [s,
|
|
224
|
-
hasService: !!
|
|
225
|
-
hasClient: !!
|
|
226
|
-
isConnected:
|
|
227
|
-
isLoading:
|
|
228
|
-
hasError: !!
|
|
229
|
-
capabilitiesKeys: Object.keys(
|
|
183
|
+
}, [o, s, r]), f = $.useMemo(() => (r("💫 CONTEXT VALUE MEMOIZATION", {
|
|
184
|
+
hasService: !!o,
|
|
185
|
+
hasClient: !!x,
|
|
186
|
+
isConnected: c,
|
|
187
|
+
isLoading: v,
|
|
188
|
+
hasError: !!I,
|
|
189
|
+
capabilitiesKeys: Object.keys(a),
|
|
230
190
|
customizationKeys: Object.keys(m)
|
|
231
191
|
}), {
|
|
232
|
-
service:
|
|
233
|
-
client:
|
|
234
|
-
isConnected:
|
|
235
|
-
isLoading:
|
|
236
|
-
error:
|
|
237
|
-
capabilities:
|
|
192
|
+
service: o,
|
|
193
|
+
client: x,
|
|
194
|
+
isConnected: c,
|
|
195
|
+
isLoading: v,
|
|
196
|
+
error: I,
|
|
197
|
+
capabilities: a,
|
|
238
198
|
customization: m,
|
|
239
|
-
refreshConnection:
|
|
240
|
-
debug:
|
|
241
|
-
}), [
|
|
199
|
+
refreshConnection: u,
|
|
200
|
+
debug: d
|
|
201
|
+
}), [
|
|
202
|
+
o,
|
|
203
|
+
x,
|
|
204
|
+
c,
|
|
205
|
+
v,
|
|
206
|
+
I,
|
|
207
|
+
a,
|
|
208
|
+
m,
|
|
209
|
+
u,
|
|
210
|
+
d,
|
|
211
|
+
r
|
|
212
|
+
]);
|
|
242
213
|
return r("🔄 RENDER END", {
|
|
243
|
-
renderCount:
|
|
244
|
-
willRenderChat: !!(
|
|
245
|
-
contextValueReady: !!
|
|
246
|
-
}), /* @__PURE__ */
|
|
247
|
-
};
|
|
248
|
-
function
|
|
249
|
-
|
|
214
|
+
renderCount: R.current,
|
|
215
|
+
willRenderChat: !!(x && c),
|
|
216
|
+
contextValueReady: !!f
|
|
217
|
+
}), /* @__PURE__ */ e(ae.Provider, { value: f, children: x && c ? /* @__PURE__ */ e(fe, { client: x, children: t }) : t });
|
|
218
|
+
}, Pe = () => Z();
|
|
219
|
+
function q({ label: t, className: s, children: n, ...l }) {
|
|
220
|
+
return /* @__PURE__ */ i(
|
|
221
|
+
"button",
|
|
222
|
+
{
|
|
223
|
+
type: "button",
|
|
224
|
+
className: L(
|
|
225
|
+
"rounded-full p-2 transition-colors focus-ring",
|
|
226
|
+
{
|
|
227
|
+
"cursor-not-allowed opacity-50": l.disabled,
|
|
228
|
+
"hover:bg-sand": !l.disabled
|
|
229
|
+
},
|
|
230
|
+
s
|
|
231
|
+
),
|
|
232
|
+
...l,
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: t }),
|
|
235
|
+
n
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
function Te(t) {
|
|
241
|
+
const s = [
|
|
250
242
|
{ bgColor: "bg-primary/20", textColor: "text-primary" },
|
|
251
243
|
// #8129D9 - purple
|
|
252
244
|
{ bgColor: "bg-forest/20", textColor: "text-forest" },
|
|
@@ -272,929 +264,692 @@ function He(n) {
|
|
|
272
264
|
{ bgColor: "bg-moss/20", textColor: "text-moss" }
|
|
273
265
|
// #70764d - olive green
|
|
274
266
|
];
|
|
275
|
-
let
|
|
276
|
-
for (let
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
return
|
|
267
|
+
let n = 0;
|
|
268
|
+
for (let a = 0; a < t.length; a++)
|
|
269
|
+
n = (n << 5) - n + t.charCodeAt(a), n = n & n;
|
|
270
|
+
const l = Math.abs(n) % s.length;
|
|
271
|
+
return s[l];
|
|
280
272
|
}
|
|
281
|
-
const
|
|
282
|
-
id:
|
|
283
|
-
name:
|
|
284
|
-
image:
|
|
285
|
-
size:
|
|
286
|
-
className:
|
|
273
|
+
const Y = ({
|
|
274
|
+
id: t,
|
|
275
|
+
name: s,
|
|
276
|
+
image: n,
|
|
277
|
+
size: l = 40,
|
|
278
|
+
className: a
|
|
287
279
|
}) => {
|
|
288
|
-
const { bgColor: m, textColor:
|
|
289
|
-
return /* @__PURE__ */
|
|
280
|
+
const { bgColor: m, textColor: d } = Te(t), r = s.charAt(0).toUpperCase(), b = l < 32 ? "text-xs" : l < 56 ? "text-sm" : "text-lg";
|
|
281
|
+
return /* @__PURE__ */ e(
|
|
290
282
|
"div",
|
|
291
283
|
{
|
|
292
284
|
className: L(
|
|
293
285
|
"flex-shrink-0 overflow-hidden rounded-full",
|
|
294
|
-
|
|
286
|
+
a
|
|
295
287
|
),
|
|
296
|
-
style: { width: `${
|
|
297
|
-
children:
|
|
288
|
+
style: { width: `${l}px`, height: `${l}px` },
|
|
289
|
+
children: n ? /* @__PURE__ */ e(
|
|
298
290
|
"img",
|
|
299
291
|
{
|
|
300
|
-
src:
|
|
292
|
+
src: n,
|
|
301
293
|
alt: "",
|
|
302
294
|
className: "h-full w-full object-cover aspect-square"
|
|
303
295
|
}
|
|
304
|
-
) : /* @__PURE__ */
|
|
296
|
+
) : /* @__PURE__ */ e(
|
|
305
297
|
"div",
|
|
306
298
|
{
|
|
307
299
|
className: L(
|
|
308
300
|
"flex h-full w-full items-center justify-center font-semibold",
|
|
309
301
|
m,
|
|
310
|
-
|
|
311
|
-
|
|
302
|
+
d,
|
|
303
|
+
b
|
|
312
304
|
),
|
|
313
305
|
children: r
|
|
314
306
|
}
|
|
315
307
|
)
|
|
316
308
|
}
|
|
317
309
|
);
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const m = (a == null ? void 0 : a.id) === (n == null ? void 0 : n.id), u = () => {
|
|
327
|
-
n && l(n);
|
|
328
|
-
}, s = Object.values(((p = n == null ? void 0 : n.state) == null ? void 0 : p.members) || {}).find(
|
|
329
|
-
(g) => {
|
|
330
|
-
var h, N;
|
|
331
|
-
return ((h = g.user) == null ? void 0 : h.id) && g.user.id !== ((N = n == null ? void 0 : n._client) == null ? void 0 : N.userID);
|
|
310
|
+
}, De = ({ channel: t, selectedChannel: s, onChannelSelect: n, debug: l = !1 }) => {
|
|
311
|
+
var v, y, I, P, p, E, R;
|
|
312
|
+
const a = (s == null ? void 0 : s.id) === (t == null ? void 0 : t.id), m = () => {
|
|
313
|
+
t && n(t);
|
|
314
|
+
}, r = Object.values(((v = t == null ? void 0 : t.state) == null ? void 0 : v.members) || {}).find(
|
|
315
|
+
(T) => {
|
|
316
|
+
var u, f;
|
|
317
|
+
return ((u = T.user) == null ? void 0 : u.id) && T.user.id !== ((f = t == null ? void 0 : t._client) == null ? void 0 : f.userID);
|
|
332
318
|
}
|
|
333
|
-
),
|
|
334
|
-
w.charAt(0).toUpperCase();
|
|
335
|
-
const f = (v = (R = n == null ? void 0 : n.state) == null ? void 0 : R.messages) == null ? void 0 : v[n.state.messages.length - 1], i = (f == null ? void 0 : f.text) || "No messages yet", b = f != null && f.created_at ? new Date(f.created_at).toLocaleTimeString([], {
|
|
319
|
+
), o = ((y = r == null ? void 0 : r.user) == null ? void 0 : y.name) || "Conversation", b = (I = r == null ? void 0 : r.user) == null ? void 0 : I.image, x = (p = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages) == null ? void 0 : p[t.state.messages.length - 1], g = (x == null ? void 0 : x.text) || "No messages yet", c = x != null && x.created_at ? new Date(x.created_at).toLocaleTimeString([], {
|
|
336
320
|
hour: "2-digit",
|
|
337
321
|
minute: "2-digit"
|
|
338
|
-
}) : "",
|
|
339
|
-
return
|
|
340
|
-
channelId:
|
|
341
|
-
isSelected:
|
|
342
|
-
participantName:
|
|
343
|
-
unread:
|
|
344
|
-
hasTimestamp: !!
|
|
345
|
-
}), /* @__PURE__ */
|
|
322
|
+
}) : "", C = ((E = t == null ? void 0 : t.state) == null ? void 0 : E.unreadCount) || 0;
|
|
323
|
+
return l && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
324
|
+
channelId: t == null ? void 0 : t.id,
|
|
325
|
+
isSelected: a,
|
|
326
|
+
participantName: o,
|
|
327
|
+
unread: C,
|
|
328
|
+
hasTimestamp: !!c
|
|
329
|
+
}), /* @__PURE__ */ e(
|
|
346
330
|
"button",
|
|
347
331
|
{
|
|
348
332
|
type: "button",
|
|
349
|
-
onClick:
|
|
333
|
+
onClick: m,
|
|
350
334
|
className: L(
|
|
351
335
|
"w-full px-4 py-3 transition-colors border-b border-sand text-left max-w-full overflow-hidden focus-ring",
|
|
352
336
|
{
|
|
353
|
-
"bg-primary-alt/10 border-l-4 border-l-primary":
|
|
354
|
-
"hover:bg-sand": !
|
|
337
|
+
"bg-primary-alt/10 border-l-4 border-l-primary": a,
|
|
338
|
+
"hover:bg-sand": !a
|
|
355
339
|
}
|
|
356
340
|
),
|
|
357
|
-
children: /* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
|
|
341
|
+
children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
|
|
342
|
+
/* @__PURE__ */ e(
|
|
343
|
+
Y,
|
|
360
344
|
{
|
|
361
|
-
id: ((
|
|
362
|
-
name:
|
|
363
|
-
image:
|
|
345
|
+
id: ((R = r == null ? void 0 : r.user) == null ? void 0 : R.id) || t.id || "unknown",
|
|
346
|
+
name: o,
|
|
347
|
+
image: b,
|
|
364
348
|
size: 44
|
|
365
349
|
}
|
|
366
350
|
),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
|
|
352
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2", children: [
|
|
353
|
+
/* @__PURE__ */ e(
|
|
370
354
|
"h3",
|
|
371
355
|
{
|
|
372
356
|
className: L(
|
|
373
357
|
"text-sm font-medium truncate",
|
|
374
|
-
|
|
358
|
+
a ? "text-primary" : "text-charcoal"
|
|
375
359
|
),
|
|
376
|
-
children:
|
|
360
|
+
children: o
|
|
377
361
|
}
|
|
378
362
|
),
|
|
379
|
-
|
|
363
|
+
c && /* @__PURE__ */ e("span", { className: "text-xs text-stone flex-shrink-0", children: c })
|
|
380
364
|
] }),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
|
|
365
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
|
|
366
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone mr-2 flex-1 line-clamp-2", children: g }),
|
|
367
|
+
C > 0 && /* @__PURE__ */ e("span", { className: "bg-primary text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: C > 99 ? "99+" : C })
|
|
384
368
|
] })
|
|
385
369
|
] })
|
|
386
370
|
] })
|
|
387
371
|
}
|
|
388
372
|
);
|
|
389
|
-
},
|
|
390
|
-
onChannelSelect:
|
|
391
|
-
selectedChannel:
|
|
392
|
-
showStartConversation:
|
|
393
|
-
onStartConversation:
|
|
394
|
-
participantLabel:
|
|
373
|
+
}, pe = ({
|
|
374
|
+
onChannelSelect: t,
|
|
375
|
+
selectedChannel: s,
|
|
376
|
+
showStartConversation: n = !1,
|
|
377
|
+
onStartConversation: l,
|
|
378
|
+
participantLabel: a = "participants",
|
|
395
379
|
className: m
|
|
396
380
|
}) => {
|
|
397
|
-
var
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
const { debug: r = !1 } =
|
|
381
|
+
var x;
|
|
382
|
+
const d = $.useRef(0);
|
|
383
|
+
d.current++;
|
|
384
|
+
const { debug: r = !1 } = Z();
|
|
401
385
|
r && console.log("📺 [ChannelList] 🔄 RENDER START", {
|
|
402
|
-
renderCount:
|
|
403
|
-
selectedChannelId:
|
|
404
|
-
showStartConversation:
|
|
405
|
-
participantLabel:
|
|
386
|
+
renderCount: d.current,
|
|
387
|
+
selectedChannelId: s == null ? void 0 : s.id,
|
|
388
|
+
showStartConversation: n,
|
|
389
|
+
participantLabel: a
|
|
406
390
|
});
|
|
407
|
-
const { client:
|
|
391
|
+
const { client: o } = ge();
|
|
408
392
|
r && console.log("📺 [ChannelList] 📡 CHAT CONTEXT", {
|
|
409
|
-
renderCount:
|
|
410
|
-
hasClient: !!
|
|
411
|
-
clientUserId:
|
|
412
|
-
clientConnected: (
|
|
393
|
+
renderCount: d.current,
|
|
394
|
+
hasClient: !!o,
|
|
395
|
+
clientUserId: o == null ? void 0 : o.userID,
|
|
396
|
+
clientConnected: (x = o == null ? void 0 : o.wsConnection) == null ? void 0 : x.isHealthy
|
|
413
397
|
});
|
|
414
|
-
const
|
|
415
|
-
const
|
|
398
|
+
const b = $.useMemo(() => {
|
|
399
|
+
const g = o.userID, c = g ? { type: "messaging", members: { $in: [g] }, hidden: !1 } : { type: "messaging" };
|
|
416
400
|
return r && console.log("📺 [ChannelList] 🔍 FILTERS MEMOIZED", {
|
|
417
|
-
renderCount:
|
|
418
|
-
userId:
|
|
419
|
-
filters:
|
|
420
|
-
}),
|
|
421
|
-
}, [
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
] }) }),
|
|
435
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden min-w-0", children: (r && console.log("📺 [ChannelList] 🎬 RENDERING STREAM CHANNEL LIST", {
|
|
436
|
-
renderCount: u.current,
|
|
437
|
-
filters: w,
|
|
438
|
-
hasClient: !!s,
|
|
439
|
-
clientUserId: s == null ? void 0 : s.userID
|
|
440
|
-
}), /* @__PURE__ */ t(
|
|
441
|
-
ve,
|
|
442
|
-
{
|
|
443
|
-
filters: w,
|
|
444
|
-
sort: { last_message_at: -1 },
|
|
445
|
-
options: { limit: 30 },
|
|
446
|
-
Preview: (f) => {
|
|
447
|
-
var i, b;
|
|
448
|
-
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
449
|
-
channelId: (i = f.channel) == null ? void 0 : i.id,
|
|
450
|
-
selectedChannelId: a == null ? void 0 : a.id,
|
|
451
|
-
isSelected: (a == null ? void 0 : a.id) === ((b = f.channel) == null ? void 0 : b.id)
|
|
452
|
-
}), /* @__PURE__ */ t(
|
|
453
|
-
Se,
|
|
401
|
+
renderCount: d.current,
|
|
402
|
+
userId: g,
|
|
403
|
+
filters: c
|
|
404
|
+
}), c;
|
|
405
|
+
}, [o.userID, r]);
|
|
406
|
+
return /* @__PURE__ */ i(
|
|
407
|
+
"div",
|
|
408
|
+
{
|
|
409
|
+
className: L(
|
|
410
|
+
"h-full flex flex-col min-w-0 overflow-hidden",
|
|
411
|
+
m
|
|
412
|
+
),
|
|
413
|
+
children: [
|
|
414
|
+
/* @__PURE__ */ e("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-3 min-h-10 min-w-0", children: [
|
|
415
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Conversations" }),
|
|
416
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: n && l && /* @__PURE__ */ e(
|
|
417
|
+
q,
|
|
454
418
|
{
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
419
|
+
label: "Start a new conversation",
|
|
420
|
+
onClick: l,
|
|
421
|
+
className: "inline-flex size-10 items-center justify-center",
|
|
422
|
+
children: /* @__PURE__ */ e(Ee, { className: "h-5 w-5" })
|
|
459
423
|
}
|
|
460
|
-
)
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
"bold",
|
|
501
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M168.49,151.51a12,12,0,0,1-17,17l-64-64a12,12,0,0,1,17-17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z" }))
|
|
502
|
-
],
|
|
503
|
-
[
|
|
504
|
-
"duotone",
|
|
505
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M165.66,154.34a8,8,0,0,1-11.32,11.32l-64-64a8,8,0,0,1,11.32-11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }))
|
|
506
|
-
],
|
|
507
|
-
[
|
|
508
|
-
"fill",
|
|
509
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,141.66a8,8,0,0,1-11.32,0l-64-64a8,8,0,0,1,11.32-11.32l64,64A8,8,0,0,1,165.66,165.66Z" }))
|
|
510
|
-
],
|
|
511
|
-
[
|
|
512
|
-
"light",
|
|
513
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M164.24,155.76a6,6,0,1,1-8.48,8.48l-64-64a6,6,0,0,1,8.48-8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z" }))
|
|
514
|
-
],
|
|
515
|
-
[
|
|
516
|
-
"regular",
|
|
517
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M165.66,154.34a8,8,0,0,1-11.32,11.32l-64-64a8,8,0,0,1,11.32-11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" }))
|
|
518
|
-
],
|
|
519
|
-
[
|
|
520
|
-
"thin",
|
|
521
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M162.83,157.17a4,4,0,0,1-5.66,5.66l-64-64a4,4,0,0,1,5.66-5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z" }))
|
|
522
|
-
]
|
|
523
|
-
]), ne = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Te }));
|
|
524
|
-
ne.displayName = "ProhibitInsetIcon";
|
|
525
|
-
const De = /* @__PURE__ */ new Map([
|
|
526
|
-
[
|
|
527
|
-
"bold",
|
|
528
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z" }))
|
|
529
|
-
],
|
|
530
|
-
[
|
|
531
|
-
"duotone",
|
|
532
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
533
|
-
"path",
|
|
534
|
-
{
|
|
535
|
-
d: "M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",
|
|
536
|
-
opacity: "0.2"
|
|
537
|
-
}
|
|
538
|
-
), /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z" }))
|
|
539
|
-
],
|
|
540
|
-
[
|
|
541
|
-
"fill",
|
|
542
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z" }))
|
|
543
|
-
],
|
|
544
|
-
[
|
|
545
|
-
"light",
|
|
546
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z" }))
|
|
547
|
-
],
|
|
548
|
-
[
|
|
549
|
-
"regular",
|
|
550
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z" }))
|
|
551
|
-
],
|
|
552
|
-
[
|
|
553
|
-
"thin",
|
|
554
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z" }))
|
|
555
|
-
]
|
|
556
|
-
]), fe = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: De }));
|
|
557
|
-
fe.displayName = "SignOutIcon";
|
|
558
|
-
const Oe = /* @__PURE__ */ new Map([
|
|
559
|
-
[
|
|
560
|
-
"bold",
|
|
561
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm84,84H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z" }))
|
|
562
|
-
],
|
|
563
|
-
[
|
|
564
|
-
"duotone",
|
|
565
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z" }))
|
|
566
|
-
],
|
|
567
|
-
[
|
|
568
|
-
"fill",
|
|
569
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z" }))
|
|
570
|
-
],
|
|
571
|
-
[
|
|
572
|
-
"light",
|
|
573
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm90,90H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z" }))
|
|
574
|
-
],
|
|
575
|
-
[
|
|
576
|
-
"regular",
|
|
577
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z" }))
|
|
578
|
-
],
|
|
579
|
-
[
|
|
580
|
-
"thin",
|
|
581
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm92,92H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z" }))
|
|
582
|
-
]
|
|
583
|
-
]), W = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Oe }));
|
|
584
|
-
W.displayName = "SpinnerGapIcon";
|
|
585
|
-
const Ue = /* @__PURE__ */ new Map([
|
|
586
|
-
[
|
|
587
|
-
"bold",
|
|
588
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z" }))
|
|
589
|
-
],
|
|
590
|
-
[
|
|
591
|
-
"duotone",
|
|
592
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M112,56V200L40,128Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z" }))
|
|
593
|
-
],
|
|
594
|
-
[
|
|
595
|
-
"fill",
|
|
596
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z" }))
|
|
597
|
-
],
|
|
598
|
-
[
|
|
599
|
-
"light",
|
|
600
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z" }))
|
|
601
|
-
],
|
|
602
|
-
[
|
|
603
|
-
"regular",
|
|
604
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" }))
|
|
605
|
-
],
|
|
606
|
-
[
|
|
607
|
-
"thin",
|
|
608
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z" }))
|
|
609
|
-
]
|
|
610
|
-
]), ge = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Ue }));
|
|
611
|
-
ge.displayName = "ArrowLeftIcon";
|
|
612
|
-
const $e = /* @__PURE__ */ new Map([
|
|
613
|
-
[
|
|
614
|
-
"bold",
|
|
615
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z" }))
|
|
616
|
-
],
|
|
617
|
-
[
|
|
618
|
-
"duotone",
|
|
619
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
620
|
-
"path",
|
|
621
|
-
{
|
|
622
|
-
d: "M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z",
|
|
623
|
-
opacity: "0.2"
|
|
624
|
-
}
|
|
625
|
-
), /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z" }))
|
|
626
|
-
],
|
|
627
|
-
[
|
|
628
|
-
"fill",
|
|
629
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z" }))
|
|
630
|
-
],
|
|
631
|
-
[
|
|
632
|
-
"light",
|
|
633
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z" }))
|
|
634
|
-
],
|
|
635
|
-
[
|
|
636
|
-
"regular",
|
|
637
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z" }))
|
|
638
|
-
],
|
|
639
|
-
[
|
|
640
|
-
"thin",
|
|
641
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z" }))
|
|
642
|
-
]
|
|
643
|
-
]), Ee = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: $e }));
|
|
644
|
-
Ee.displayName = "DotsThreeIcon";
|
|
645
|
-
const je = /* @__PURE__ */ new Map([
|
|
646
|
-
[
|
|
647
|
-
"bold",
|
|
648
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
649
|
-
],
|
|
650
|
-
[
|
|
651
|
-
"duotone",
|
|
652
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
653
|
-
"path",
|
|
654
|
-
{
|
|
655
|
-
d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
|
|
656
|
-
opacity: "0.2"
|
|
657
|
-
}
|
|
658
|
-
), /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
659
|
-
],
|
|
660
|
-
[
|
|
661
|
-
"fill",
|
|
662
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
663
|
-
],
|
|
664
|
-
[
|
|
665
|
-
"light",
|
|
666
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z" }))
|
|
667
|
-
],
|
|
668
|
-
[
|
|
669
|
-
"regular",
|
|
670
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
671
|
-
],
|
|
672
|
-
[
|
|
673
|
-
"thin",
|
|
674
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
675
|
-
]
|
|
676
|
-
]), re = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: je }));
|
|
677
|
-
re.displayName = "XIcon";
|
|
678
|
-
function xe({ onClick: n }) {
|
|
679
|
-
return /* @__PURE__ */ t(J, { label: "Close", onClick: n, className: "p-1", children: /* @__PURE__ */ t(re, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
680
|
-
}
|
|
681
|
-
const Y = ({
|
|
682
|
-
variant: n = "default",
|
|
683
|
-
className: a,
|
|
684
|
-
children: l,
|
|
685
|
-
...o
|
|
686
|
-
}) => /* @__PURE__ */ t(
|
|
424
|
+
) })
|
|
425
|
+
] }) }),
|
|
426
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden min-w-0", children: (r && console.log("📺 [ChannelList] 🎬 RENDERING STREAM CHANNEL LIST", {
|
|
427
|
+
renderCount: d.current,
|
|
428
|
+
filters: b,
|
|
429
|
+
hasClient: !!o,
|
|
430
|
+
clientUserId: o == null ? void 0 : o.userID
|
|
431
|
+
}), /* @__PURE__ */ e(
|
|
432
|
+
xe,
|
|
433
|
+
{
|
|
434
|
+
filters: b,
|
|
435
|
+
sort: { last_message_at: -1 },
|
|
436
|
+
options: { limit: 30 },
|
|
437
|
+
Preview: (g) => {
|
|
438
|
+
var c, C;
|
|
439
|
+
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
440
|
+
channelId: (c = g.channel) == null ? void 0 : c.id,
|
|
441
|
+
selectedChannelId: s == null ? void 0 : s.id,
|
|
442
|
+
isSelected: (s == null ? void 0 : s.id) === ((C = g.channel) == null ? void 0 : C.id)
|
|
443
|
+
}), /* @__PURE__ */ e(
|
|
444
|
+
De,
|
|
445
|
+
{
|
|
446
|
+
...g,
|
|
447
|
+
selectedChannel: s,
|
|
448
|
+
onChannelSelect: t,
|
|
449
|
+
debug: r
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
)) })
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}, X = ({
|
|
459
|
+
variant: t = "default",
|
|
460
|
+
className: s,
|
|
461
|
+
children: n,
|
|
462
|
+
...l
|
|
463
|
+
}) => /* @__PURE__ */ e(
|
|
687
464
|
"button",
|
|
688
465
|
{
|
|
689
466
|
type: "button",
|
|
690
467
|
className: L(
|
|
691
468
|
"flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
|
|
692
|
-
|
|
693
|
-
|
|
469
|
+
t === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
|
|
470
|
+
s
|
|
694
471
|
),
|
|
695
|
-
...
|
|
696
|
-
children:
|
|
472
|
+
...l,
|
|
473
|
+
children: n
|
|
697
474
|
}
|
|
698
|
-
)
|
|
699
|
-
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
475
|
+
);
|
|
476
|
+
function ie({ onClick: t }) {
|
|
477
|
+
return /* @__PURE__ */ e(q, { label: "Close", onClick: t, className: "p-1", children: /* @__PURE__ */ e(oe, { className: "h-5 w-5 text-stone", weight: "bold" }) });
|
|
478
|
+
}
|
|
479
|
+
const Oe = ({ renderActions: t }) => /* @__PURE__ */ i("div", { className: "message-input flex items-center gap-2 p-4", children: [
|
|
480
|
+
t && t(),
|
|
481
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(we, { focus: !0, maxRows: 4 }) })
|
|
482
|
+
] }), Ue = ({ onBack: t, showBackButton: s, onShowInfo: n, canShowInfo: l }) => {
|
|
483
|
+
var o, b, x, g;
|
|
484
|
+
const { channel: a } = ve(), m = $.useMemo(() => Object.values(a.state.members || {}).find(
|
|
485
|
+
(C) => {
|
|
486
|
+
var v;
|
|
487
|
+
return ((v = C.user) == null ? void 0 : v.id) && C.user.id !== a._client.userID;
|
|
707
488
|
}
|
|
708
|
-
), [
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
|
|
489
|
+
), [a._client.userID, a.state.members]), d = ((o = m == null ? void 0 : m.user) == null ? void 0 : o.name) || ((b = m == null ? void 0 : m.user) == null ? void 0 : b.id) || "Unknown member", r = (x = m == null ? void 0 : m.user) == null ? void 0 : x.image;
|
|
490
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-3 min-h-12", children: [
|
|
491
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
492
|
+
s && t && /* @__PURE__ */ e(
|
|
712
493
|
"button",
|
|
713
494
|
{
|
|
714
495
|
type: "button",
|
|
715
|
-
onClick:
|
|
496
|
+
onClick: t,
|
|
716
497
|
className: "inline-flex items-center justify-center w-8 h-8 rounded-lg hover:bg-sand focus:outline-none focus:ring-2 focus:ring-primary transition-colors lg:hidden",
|
|
717
498
|
"aria-label": "Back to channel list",
|
|
718
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ e(Ie, { className: "h-5 w-5 text-stone", weight: "bold" })
|
|
719
500
|
}
|
|
720
501
|
),
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
|
|
502
|
+
/* @__PURE__ */ e(
|
|
503
|
+
Y,
|
|
723
504
|
{
|
|
724
|
-
id: ((
|
|
725
|
-
name:
|
|
505
|
+
id: ((g = m == null ? void 0 : m.user) == null ? void 0 : g.id) || a.id || "unknown",
|
|
506
|
+
name: d,
|
|
726
507
|
image: r,
|
|
727
508
|
size: 40
|
|
728
509
|
}
|
|
729
510
|
),
|
|
730
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("h1", { className: "text-lg font-semibold text-charcoal truncate", children: d }) })
|
|
731
512
|
] }),
|
|
732
|
-
|
|
733
|
-
J,
|
|
734
|
-
{
|
|
735
|
-
label: "Chat info",
|
|
736
|
-
onClick: l,
|
|
737
|
-
children: /* @__PURE__ */ t(Ee, { className: "h-6 w-6 text-charcoal", weight: "bold" })
|
|
738
|
-
}
|
|
739
|
-
)
|
|
513
|
+
l && n && /* @__PURE__ */ e(q, { label: "Chat info", onClick: n, children: /* @__PURE__ */ e(ye, { className: "h-6 w-6 text-charcoal", weight: "bold" }) })
|
|
740
514
|
] });
|
|
741
|
-
},
|
|
742
|
-
|
|
743
|
-
|
|
515
|
+
}, Le = ({
|
|
516
|
+
isOpen: t,
|
|
517
|
+
onClose: s,
|
|
518
|
+
participant: n,
|
|
519
|
+
channel: l,
|
|
520
|
+
followerStatusLabel: a,
|
|
521
|
+
onLeaveConversation: m,
|
|
522
|
+
onBlockParticipant: d
|
|
523
|
+
}) => {
|
|
524
|
+
var F, H, V, _, W, G, z;
|
|
525
|
+
const { service: r, debug: o } = Z(), b = A(null), [x, g] = w(!1), [c, C] = w(!1), [v, y] = w(!1);
|
|
744
526
|
B(() => {
|
|
745
|
-
const
|
|
746
|
-
|
|
747
|
-
}, [
|
|
748
|
-
const
|
|
749
|
-
var
|
|
750
|
-
if (!(!r || !((
|
|
527
|
+
const k = b.current;
|
|
528
|
+
k && (t ? k.showModal() : k.close());
|
|
529
|
+
}, [t]);
|
|
530
|
+
const I = U(async () => {
|
|
531
|
+
var k;
|
|
532
|
+
if (!(!r || !((k = n == null ? void 0 : n.user) != null && k.id)))
|
|
751
533
|
try {
|
|
752
|
-
const
|
|
753
|
-
(
|
|
534
|
+
const h = (await r.getBlockedUsers()).some(
|
|
535
|
+
(O) => {
|
|
536
|
+
var M;
|
|
537
|
+
return O.blocked_user_id === ((M = n == null ? void 0 : n.user) == null ? void 0 : M.id);
|
|
538
|
+
}
|
|
539
|
+
);
|
|
540
|
+
g(h);
|
|
541
|
+
} catch (D) {
|
|
542
|
+
console.error(
|
|
543
|
+
"[ChannelInfoDialog] Failed to check blocked status:",
|
|
544
|
+
D
|
|
754
545
|
);
|
|
755
|
-
f(T);
|
|
756
|
-
} catch (S) {
|
|
757
|
-
console.error("[ChannelInfoDialog] Failed to check blocked status:", S);
|
|
758
546
|
}
|
|
759
|
-
}, [r, (
|
|
547
|
+
}, [r, (F = n == null ? void 0 : n.user) == null ? void 0 : F.id]);
|
|
760
548
|
B(() => {
|
|
761
|
-
|
|
762
|
-
}, [
|
|
763
|
-
const
|
|
764
|
-
var
|
|
765
|
-
if (!
|
|
766
|
-
|
|
549
|
+
t && I();
|
|
550
|
+
}, [t, I]);
|
|
551
|
+
const P = async () => {
|
|
552
|
+
var k;
|
|
553
|
+
if (!c) {
|
|
554
|
+
o && console.log("[ChannelInfoDialog] Leave conversation", l.cid), C(!0);
|
|
767
555
|
try {
|
|
768
|
-
const
|
|
769
|
-
await
|
|
770
|
-
} catch (
|
|
771
|
-
console.error("[ChannelInfoDialog] Failed to leave conversation",
|
|
556
|
+
const D = ((k = l._client) == null ? void 0 : k.userID) ?? null;
|
|
557
|
+
await l.hide(D, !1), m && await m(l), s();
|
|
558
|
+
} catch (D) {
|
|
559
|
+
console.error("[ChannelInfoDialog] Failed to leave conversation", D);
|
|
772
560
|
} finally {
|
|
773
|
-
|
|
561
|
+
C(!1);
|
|
774
562
|
}
|
|
775
563
|
}
|
|
776
|
-
},
|
|
777
|
-
var
|
|
778
|
-
if (!(
|
|
779
|
-
|
|
564
|
+
}, p = async () => {
|
|
565
|
+
var k, D, h;
|
|
566
|
+
if (!(v || !r)) {
|
|
567
|
+
o && console.log("[ChannelInfoDialog] Block member", (k = n == null ? void 0 : n.user) == null ? void 0 : k.id), y(!0);
|
|
780
568
|
try {
|
|
781
|
-
await r.blockUser((
|
|
782
|
-
} catch (
|
|
783
|
-
console.error("[ChannelInfoDialog] Failed to block member",
|
|
569
|
+
await r.blockUser((D = n == null ? void 0 : n.user) == null ? void 0 : D.id), d && await d((h = n == null ? void 0 : n.user) == null ? void 0 : h.id), s();
|
|
570
|
+
} catch (O) {
|
|
571
|
+
console.error("[ChannelInfoDialog] Failed to block member", O);
|
|
784
572
|
} finally {
|
|
785
|
-
|
|
573
|
+
y(!1);
|
|
786
574
|
}
|
|
787
575
|
}
|
|
788
|
-
},
|
|
789
|
-
var
|
|
790
|
-
if (!(
|
|
791
|
-
|
|
576
|
+
}, E = async () => {
|
|
577
|
+
var k, D, h;
|
|
578
|
+
if (!(v || !r)) {
|
|
579
|
+
o && console.log("[ChannelInfoDialog] Unblock member", (k = n == null ? void 0 : n.user) == null ? void 0 : k.id), y(!0);
|
|
792
580
|
try {
|
|
793
|
-
await r.unBlockUser((
|
|
794
|
-
} catch (
|
|
795
|
-
console.error("[ChannelInfoDialog] Failed to unblock member",
|
|
581
|
+
await r.unBlockUser((D = n == null ? void 0 : n.user) == null ? void 0 : D.id), d && await d((h = n == null ? void 0 : n.user) == null ? void 0 : h.id), s();
|
|
582
|
+
} catch (O) {
|
|
583
|
+
console.error("[ChannelInfoDialog] Failed to unblock member", O);
|
|
796
584
|
} finally {
|
|
797
|
-
|
|
585
|
+
y(!1);
|
|
798
586
|
}
|
|
799
587
|
}
|
|
800
|
-
},
|
|
801
|
-
|
|
588
|
+
}, R = () => {
|
|
589
|
+
s(), window.open(
|
|
802
590
|
"https://linktr.ee/s/about/trust-center/report",
|
|
803
591
|
"_blank",
|
|
804
592
|
"noopener,noreferrer"
|
|
805
593
|
);
|
|
806
594
|
};
|
|
807
|
-
if (!
|
|
808
|
-
const
|
|
809
|
-
return
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
/* @__PURE__ */
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
595
|
+
if (!n) return null;
|
|
596
|
+
const T = ((H = n.user) == null ? void 0 : H.name) || ((V = n.user) == null ? void 0 : V.id) || "Unknown member", u = (_ = n.user) == null ? void 0 : _.image, f = (W = n.user) == null ? void 0 : W.email, N = (G = n.user) == null ? void 0 : G.username, S = f || (N ? `linktr.ee/${N}` : void 0), j = ((z = n.user) == null ? void 0 : z.id) || "unknown";
|
|
597
|
+
return (
|
|
598
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
599
|
+
/* @__PURE__ */ e(
|
|
600
|
+
"dialog",
|
|
601
|
+
{
|
|
602
|
+
ref: b,
|
|
603
|
+
className: "mes-dialog",
|
|
604
|
+
onClose: s,
|
|
605
|
+
onClick: (k) => {
|
|
606
|
+
k.target === b.current && s();
|
|
607
|
+
},
|
|
608
|
+
children: /* @__PURE__ */ i("div", { className: "ml-auto flex h-full w-full flex-col bg-white shadow-max-elevation-light", children: [
|
|
609
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between border-b border-sand px-4 py-3", children: [
|
|
610
|
+
/* @__PURE__ */ e("h2", { className: "text-base font-semibold text-charcoal", children: "Chat info" }),
|
|
611
|
+
/* @__PURE__ */ e(ie, { onClick: s })
|
|
612
|
+
] }),
|
|
613
|
+
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: [
|
|
614
|
+
/* @__PURE__ */ e("div", { className: "rounded-2xl bg-chalk p-4", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-4", children: [
|
|
615
|
+
/* @__PURE__ */ e(
|
|
616
|
+
Y,
|
|
617
|
+
{
|
|
618
|
+
id: j,
|
|
619
|
+
name: T,
|
|
620
|
+
image: u,
|
|
621
|
+
size: 64
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
625
|
+
/* @__PURE__ */ e("p", { className: "truncate text-base font-semibold text-charcoal", children: T }),
|
|
626
|
+
S && /* @__PURE__ */ e("p", { className: "truncate text-sm text-stone", children: S }),
|
|
627
|
+
a && /* @__PURE__ */ e("span", { className: "mt-2 inline-flex items-center rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium text-green-700", children: a })
|
|
628
|
+
] })
|
|
629
|
+
] }) }),
|
|
630
|
+
/* @__PURE__ */ i("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
631
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
632
|
+
X,
|
|
633
|
+
{
|
|
634
|
+
onClick: P,
|
|
635
|
+
disabled: c,
|
|
636
|
+
"aria-busy": c,
|
|
637
|
+
children: [
|
|
638
|
+
c ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(Se, { className: "h-5 w-5" }),
|
|
639
|
+
/* @__PURE__ */ e("span", { children: "Leave Conversation" })
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
) }),
|
|
643
|
+
/* @__PURE__ */ e("li", { children: x ? /* @__PURE__ */ i(
|
|
644
|
+
X,
|
|
645
|
+
{
|
|
646
|
+
onClick: E,
|
|
647
|
+
disabled: v,
|
|
648
|
+
"aria-busy": v,
|
|
649
|
+
children: [
|
|
650
|
+
v ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(te, { className: "h-5 w-5" }),
|
|
651
|
+
/* @__PURE__ */ e("span", { children: "Unblock" })
|
|
652
|
+
]
|
|
653
|
+
}
|
|
654
|
+
) : /* @__PURE__ */ i(
|
|
655
|
+
X,
|
|
656
|
+
{
|
|
657
|
+
onClick: p,
|
|
658
|
+
disabled: v,
|
|
659
|
+
"aria-busy": v,
|
|
660
|
+
children: [
|
|
661
|
+
v ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ e(te, { className: "h-5 w-5" }),
|
|
662
|
+
/* @__PURE__ */ e("span", { children: "Block" })
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
) }),
|
|
666
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(X, { variant: "danger", onClick: R, children: [
|
|
667
|
+
/* @__PURE__ */ e(Re, { className: "h-5 w-5" }),
|
|
668
|
+
/* @__PURE__ */ e("span", { children: "Report" })
|
|
669
|
+
] }) })
|
|
838
670
|
] })
|
|
839
|
-
] }) }),
|
|
840
|
-
/* @__PURE__ */ d("ul", { className: "flex flex-col gap-2 mt-2", children: [
|
|
841
|
-
/* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
|
|
842
|
-
Y,
|
|
843
|
-
{
|
|
844
|
-
onClick: V,
|
|
845
|
-
disabled: i,
|
|
846
|
-
"aria-busy": i,
|
|
847
|
-
children: [
|
|
848
|
-
i ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(fe, { className: "h-5 w-5" }),
|
|
849
|
-
/* @__PURE__ */ t("span", { children: "Leave Conversation" })
|
|
850
|
-
]
|
|
851
|
-
}
|
|
852
|
-
) }),
|
|
853
|
-
/* @__PURE__ */ t("li", { children: C ? /* @__PURE__ */ d(
|
|
854
|
-
Y,
|
|
855
|
-
{
|
|
856
|
-
onClick: v,
|
|
857
|
-
disabled: x,
|
|
858
|
-
"aria-busy": x,
|
|
859
|
-
children: [
|
|
860
|
-
x ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(ne, { className: "h-5 w-5" }),
|
|
861
|
-
/* @__PURE__ */ t("span", { children: "Unblock" })
|
|
862
|
-
]
|
|
863
|
-
}
|
|
864
|
-
) : /* @__PURE__ */ d(
|
|
865
|
-
Y,
|
|
866
|
-
{
|
|
867
|
-
onClick: R,
|
|
868
|
-
disabled: x,
|
|
869
|
-
"aria-busy": x,
|
|
870
|
-
children: [
|
|
871
|
-
x ? /* @__PURE__ */ t(W, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ t(ne, { className: "h-5 w-5" }),
|
|
872
|
-
/* @__PURE__ */ t("span", { children: "Block" })
|
|
873
|
-
]
|
|
874
|
-
}
|
|
875
|
-
) }),
|
|
876
|
-
/* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(Y, { variant: "danger", onClick: y, children: [
|
|
877
|
-
/* @__PURE__ */ t(ue, { className: "h-5 w-5" }),
|
|
878
|
-
/* @__PURE__ */ t("span", { children: "Report" })
|
|
879
|
-
] }) })
|
|
880
671
|
] })
|
|
881
672
|
] })
|
|
882
|
-
|
|
883
|
-
|
|
673
|
+
}
|
|
674
|
+
)
|
|
884
675
|
);
|
|
885
|
-
},
|
|
886
|
-
channel:
|
|
887
|
-
onBack:
|
|
888
|
-
showBackButton:
|
|
889
|
-
renderMessageInputActions:
|
|
890
|
-
onLeaveConversation:
|
|
676
|
+
}, Fe = ({
|
|
677
|
+
channel: t,
|
|
678
|
+
onBack: s,
|
|
679
|
+
showBackButton: n = !1,
|
|
680
|
+
renderMessageInputActions: l,
|
|
681
|
+
onLeaveConversation: a,
|
|
891
682
|
onBlockParticipant: m,
|
|
892
|
-
className:
|
|
683
|
+
className: d
|
|
893
684
|
}) => {
|
|
894
|
-
const [r,
|
|
895
|
-
(
|
|
896
|
-
var
|
|
897
|
-
return ((
|
|
685
|
+
const [r, o] = w(!1), b = $.useMemo(() => Object.values(t.state.members || {}).find(
|
|
686
|
+
(c) => {
|
|
687
|
+
var C;
|
|
688
|
+
return ((C = c.user) == null ? void 0 : C.id) && c.user.id !== t._client.userID;
|
|
898
689
|
}
|
|
899
|
-
), [
|
|
900
|
-
const
|
|
901
|
-
return
|
|
902
|
-
}, [
|
|
903
|
-
return /* @__PURE__ */
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
|
|
690
|
+
), [t._client.userID, t.state.members]), x = $.useMemo(() => {
|
|
691
|
+
const g = t.data ?? {};
|
|
692
|
+
return g.followerStatus ? String(g.followerStatus) : g.isFollower ? "Subscribed to you" : void 0;
|
|
693
|
+
}, [t.data]);
|
|
694
|
+
return /* @__PURE__ */ i("div", { className: L("h-full flex flex-col", d), children: [
|
|
695
|
+
/* @__PURE__ */ e(Ne, { channel: t, children: /* @__PURE__ */ i(Ce, { children: [
|
|
696
|
+
/* @__PURE__ */ e("div", { className: "border-b border-sand bg-white px-4 py-3", children: /* @__PURE__ */ e(
|
|
697
|
+
Ue,
|
|
907
698
|
{
|
|
908
|
-
onBack:
|
|
909
|
-
showBackButton:
|
|
910
|
-
onShowInfo: () =>
|
|
911
|
-
canShowInfo: !!
|
|
699
|
+
onBack: s,
|
|
700
|
+
showBackButton: n,
|
|
701
|
+
onShowInfo: () => o(!0),
|
|
702
|
+
canShowInfo: !!b
|
|
912
703
|
}
|
|
913
704
|
) }),
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
|
|
705
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ e(be, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 }) }),
|
|
706
|
+
/* @__PURE__ */ e(
|
|
707
|
+
Oe,
|
|
917
708
|
{
|
|
918
|
-
renderActions: () =>
|
|
709
|
+
renderActions: () => l == null ? void 0 : l(t)
|
|
919
710
|
}
|
|
920
711
|
)
|
|
921
712
|
] }) }),
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
|
|
713
|
+
/* @__PURE__ */ e(
|
|
714
|
+
Le,
|
|
924
715
|
{
|
|
925
716
|
isOpen: r,
|
|
926
|
-
onClose: () =>
|
|
927
|
-
participant:
|
|
928
|
-
channel:
|
|
929
|
-
followerStatusLabel:
|
|
930
|
-
onLeaveConversation:
|
|
717
|
+
onClose: () => o(!1),
|
|
718
|
+
participant: b,
|
|
719
|
+
channel: t,
|
|
720
|
+
followerStatusLabel: x,
|
|
721
|
+
onLeaveConversation: a,
|
|
931
722
|
onBlockParticipant: m
|
|
932
723
|
}
|
|
933
724
|
)
|
|
934
725
|
] });
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
[
|
|
941
|
-
"duotone",
|
|
942
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
943
|
-
"path",
|
|
944
|
-
{
|
|
945
|
-
d: "M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",
|
|
946
|
-
opacity: "0.2"
|
|
947
|
-
}
|
|
948
|
-
), /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm12-88a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm-44,0a12,12,0,1,1-12-12A12,12,0,0,1,96,128Zm88,0a12,12,0,1,1-12-12A12,12,0,0,1,184,128Z" }))
|
|
949
|
-
],
|
|
950
|
-
[
|
|
951
|
-
"fill",
|
|
952
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z" }))
|
|
953
|
-
],
|
|
954
|
-
[
|
|
955
|
-
"light",
|
|
956
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58,10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z" }))
|
|
957
|
-
],
|
|
958
|
-
[
|
|
959
|
-
"regular",
|
|
960
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM84,116a12,12,0,1,0,12,12A12,12,0,0,0,84,116Zm88,0a12,12,0,1,0,12,12A12,12,0,0,0,172,116Zm60,12A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z" }))
|
|
961
|
-
],
|
|
962
|
-
[
|
|
963
|
-
"thin",
|
|
964
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56,8A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z" }))
|
|
965
|
-
]
|
|
966
|
-
]), le = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: We }));
|
|
967
|
-
le.displayName = "ChatCircleDotsIcon";
|
|
968
|
-
const Xe = /* @__PURE__ */ new Map([
|
|
969
|
-
[
|
|
970
|
-
"bold",
|
|
971
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
|
|
972
|
-
],
|
|
973
|
-
[
|
|
974
|
-
"duotone",
|
|
975
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z", opacity: "0.2" }), /* @__PURE__ */ e.createElement("path", { d: "M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
|
|
976
|
-
],
|
|
977
|
-
[
|
|
978
|
-
"fill",
|
|
979
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z" }))
|
|
980
|
-
],
|
|
981
|
-
[
|
|
982
|
-
"light",
|
|
983
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z" }))
|
|
984
|
-
],
|
|
985
|
-
[
|
|
986
|
-
"regular",
|
|
987
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" }))
|
|
988
|
-
],
|
|
989
|
-
[
|
|
990
|
-
"thin",
|
|
991
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("path", { d: "M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z" }))
|
|
992
|
-
]
|
|
993
|
-
]), Ne = e.forwardRef((n, a) => /* @__PURE__ */ e.createElement(D, { ref: a, ...n, weights: Xe }));
|
|
994
|
-
Ne.displayName = "MagnifyingGlassIcon";
|
|
995
|
-
function Qe({
|
|
996
|
-
searchQuery: n,
|
|
997
|
-
setSearchQuery: a,
|
|
998
|
-
placeholder: l
|
|
726
|
+
};
|
|
727
|
+
function Me({
|
|
728
|
+
searchQuery: t,
|
|
729
|
+
setSearchQuery: s,
|
|
730
|
+
placeholder: n
|
|
999
731
|
}) {
|
|
1000
|
-
const
|
|
1001
|
-
return /* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
|
|
732
|
+
const l = A(null);
|
|
733
|
+
return /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
734
|
+
/* @__PURE__ */ e(
|
|
735
|
+
ke,
|
|
1004
736
|
{
|
|
1005
737
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone",
|
|
1006
738
|
weight: "bold"
|
|
1007
739
|
}
|
|
1008
740
|
),
|
|
1009
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ e(
|
|
1010
742
|
"input",
|
|
1011
743
|
{
|
|
1012
|
-
ref:
|
|
744
|
+
ref: l,
|
|
1013
745
|
type: "text",
|
|
1014
|
-
placeholder:
|
|
1015
|
-
value:
|
|
1016
|
-
onChange: (
|
|
746
|
+
placeholder: n,
|
|
747
|
+
value: t,
|
|
748
|
+
onChange: (a) => s(a.target.value),
|
|
1017
749
|
className: "w-full pl-10 pr-10 py-3 text-sm border border-sand rounded-xl focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent"
|
|
1018
750
|
}
|
|
1019
751
|
),
|
|
1020
|
-
|
|
1021
|
-
|
|
752
|
+
t && /* @__PURE__ */ e(
|
|
753
|
+
q,
|
|
1022
754
|
{
|
|
1023
755
|
label: "Clear search",
|
|
1024
756
|
onClick: () => {
|
|
1025
|
-
var
|
|
1026
|
-
|
|
757
|
+
var a;
|
|
758
|
+
s(""), (a = l.current) == null || a.focus();
|
|
1027
759
|
},
|
|
1028
760
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-stone hover:text-charcoal",
|
|
1029
|
-
children: /* @__PURE__ */
|
|
761
|
+
children: /* @__PURE__ */ e(oe, { className: "h-4 w-4", weight: "bold" })
|
|
1030
762
|
}
|
|
1031
763
|
)
|
|
1032
764
|
] });
|
|
1033
765
|
}
|
|
1034
|
-
const
|
|
1035
|
-
participantSource:
|
|
1036
|
-
onSelectParticipant:
|
|
1037
|
-
onClose:
|
|
1038
|
-
existingParticipantIds:
|
|
1039
|
-
participantLabel:
|
|
766
|
+
const je = ({
|
|
767
|
+
participantSource: t,
|
|
768
|
+
onSelectParticipant: s,
|
|
769
|
+
onClose: n,
|
|
770
|
+
existingParticipantIds: l = /* @__PURE__ */ new Set(),
|
|
771
|
+
participantLabel: a = "participants",
|
|
1040
772
|
searchPlaceholder: m = "Search participants...",
|
|
1041
|
-
className:
|
|
773
|
+
className: d
|
|
1042
774
|
}) => {
|
|
1043
|
-
const { debug: r } =
|
|
775
|
+
const { debug: r } = Z(), [o, b] = w(""), [x, g] = w([]), [c, C] = w(!1), [v, y] = w(null), [I, P] = w(
|
|
776
|
+
null
|
|
777
|
+
), p = A(!1);
|
|
1044
778
|
B(() => {
|
|
1045
|
-
if (
|
|
1046
|
-
r && console.log(
|
|
779
|
+
if (t.loading) {
|
|
780
|
+
r && console.log(
|
|
781
|
+
"[ParticipantPicker] Waiting for participant source to finish loading..."
|
|
782
|
+
);
|
|
1047
783
|
return;
|
|
1048
784
|
}
|
|
1049
|
-
if (
|
|
785
|
+
if (p.current) return;
|
|
1050
786
|
(async () => {
|
|
1051
|
-
r && console.log("[ParticipantPicker] Loading initial participants..."),
|
|
787
|
+
r && console.log("[ParticipantPicker] Loading initial participants..."), C(!0), y(null);
|
|
1052
788
|
try {
|
|
1053
|
-
const
|
|
789
|
+
const f = await t.loadParticipants({
|
|
1054
790
|
search: "",
|
|
1055
791
|
// Load all participants initially
|
|
1056
792
|
limit: 100
|
|
1057
793
|
});
|
|
1058
|
-
f
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
794
|
+
g(f.participants), p.current = !0, r && console.log(
|
|
795
|
+
"[ParticipantPicker] Participants loaded successfully:",
|
|
796
|
+
f.participants.length
|
|
797
|
+
);
|
|
798
|
+
} catch (f) {
|
|
799
|
+
const N = f instanceof Error ? f.message : "Failed to load participants";
|
|
800
|
+
y(N), console.error("[ParticipantPicker] Failed to load participants:", f);
|
|
1062
801
|
} finally {
|
|
1063
|
-
|
|
802
|
+
C(!1);
|
|
1064
803
|
}
|
|
1065
804
|
})();
|
|
1066
|
-
}, [
|
|
1067
|
-
const
|
|
805
|
+
}, [t.loading, r]);
|
|
806
|
+
const E = x.filter((u) => !l.has(u.id)).filter((u) => {
|
|
1068
807
|
var N;
|
|
1069
|
-
if (!
|
|
1070
|
-
const
|
|
1071
|
-
return
|
|
1072
|
-
}),
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
808
|
+
if (!o) return !0;
|
|
809
|
+
const f = o.toLowerCase();
|
|
810
|
+
return u.name.toLowerCase().includes(f) || ((N = u.email) == null ? void 0 : N.toLowerCase().includes(f)) || !1;
|
|
811
|
+
}), R = U(
|
|
812
|
+
async (u) => {
|
|
813
|
+
if (!I) {
|
|
814
|
+
P(u.id);
|
|
815
|
+
try {
|
|
816
|
+
await s(u);
|
|
817
|
+
} catch (f) {
|
|
818
|
+
console.error("[ParticipantPicker] Failed to start chat:", f), P(null);
|
|
819
|
+
}
|
|
1079
820
|
}
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
|
|
821
|
+
},
|
|
822
|
+
[s, I]
|
|
823
|
+
), T = (u, f) => {
|
|
824
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), R(f));
|
|
1083
825
|
};
|
|
1084
|
-
return /* @__PURE__ */
|
|
1085
|
-
/* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
/* @__PURE__ */
|
|
826
|
+
return /* @__PURE__ */ i("div", { className: L("flex flex-col h-full", d), children: [
|
|
827
|
+
/* @__PURE__ */ i("div", { className: "px-4 py-4 border-b border-sand bg-chalk", children: [
|
|
828
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-3", children: [
|
|
829
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-charcoal", children: "Start a new Conversation" }),
|
|
830
|
+
/* @__PURE__ */ e(ie, { onClick: n })
|
|
1089
831
|
] }),
|
|
1090
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ i("p", { className: "text-xs text-stone mb-3", children: [
|
|
1091
833
|
"Select a ",
|
|
1092
|
-
|
|
834
|
+
a.slice(0, -1),
|
|
1093
835
|
" to start messaging (",
|
|
1094
|
-
|
|
836
|
+
E.length,
|
|
1095
837
|
" available)",
|
|
1096
|
-
|
|
838
|
+
t.totalCount !== void 0 && ` • ${t.totalCount} ${a} total`
|
|
1097
839
|
] }),
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
-
|
|
840
|
+
/* @__PURE__ */ e(
|
|
841
|
+
Me,
|
|
1100
842
|
{
|
|
1101
|
-
searchQuery:
|
|
1102
|
-
setSearchQuery:
|
|
843
|
+
searchQuery: o,
|
|
844
|
+
setSearchQuery: b,
|
|
1103
845
|
placeholder: m
|
|
1104
846
|
}
|
|
1105
847
|
)
|
|
1106
848
|
] }),
|
|
1107
|
-
|
|
849
|
+
v && /* @__PURE__ */ i("div", { className: "p-4 text-sm text-danger bg-danger-alt", children: [
|
|
1108
850
|
"Error loading ",
|
|
1109
|
-
|
|
851
|
+
a,
|
|
1110
852
|
": ",
|
|
1111
|
-
|
|
853
|
+
v
|
|
1112
854
|
] }),
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto", children: c && E.length === 0 ? /* @__PURE__ */ e("div", { className: "h-32 flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
856
|
+
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
857
|
+
/* @__PURE__ */ i("span", { className: "text-sm text-stone", children: [
|
|
1116
858
|
"Loading ",
|
|
1117
|
-
|
|
859
|
+
a,
|
|
1118
860
|
"..."
|
|
1119
861
|
] })
|
|
1120
|
-
] }) }) :
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
] }) : /* @__PURE__ */
|
|
1125
|
-
|
|
1126
|
-
const
|
|
1127
|
-
return /* @__PURE__ */
|
|
862
|
+
] }) }) : E.length === 0 ? /* @__PURE__ */ i("div", { className: "p-6 text-center", children: [
|
|
863
|
+
/* @__PURE__ */ e("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-sand", children: /* @__PURE__ */ e(ne, { className: "h-8 w-8 text-charcoal" }) }),
|
|
864
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-charcoal mb-2", children: o ? `No ${a} found` : x.length > 0 ? `Already chatting with all ${a}` : `No ${a} yet` }),
|
|
865
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-stone", children: o ? "Try a different search term" : x.length > 0 ? `You have existing conversations with all your ${a}` : `${a.charAt(0).toUpperCase() + a.slice(1)} will appear here` })
|
|
866
|
+
] }) : /* @__PURE__ */ i("ul", { className: "space-y-0", children: [
|
|
867
|
+
E.map((u) => {
|
|
868
|
+
const f = u.name || u.email || u.id, N = u.email && u.name ? u.email : u.phone;
|
|
869
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
1128
870
|
"button",
|
|
1129
871
|
{
|
|
1130
872
|
type: "button",
|
|
1131
|
-
onClick: () =>
|
|
1132
|
-
onKeyDown: (
|
|
873
|
+
onClick: () => R(u),
|
|
874
|
+
onKeyDown: (S) => T(S, u),
|
|
1133
875
|
className: "w-full px-4 py-3 hover:bg-sand transition-colors border-b border-sand text-left focus:outline-none focus:ring-2 focus:ring-black",
|
|
1134
|
-
children: /* @__PURE__ */
|
|
1135
|
-
/* @__PURE__ */
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
|
|
876
|
+
children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
877
|
+
/* @__PURE__ */ i("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
|
|
878
|
+
/* @__PURE__ */ e(
|
|
879
|
+
Y,
|
|
1138
880
|
{
|
|
1139
|
-
id:
|
|
1140
|
-
name:
|
|
1141
|
-
image:
|
|
881
|
+
id: u.id,
|
|
882
|
+
name: f,
|
|
883
|
+
image: u.image,
|
|
1142
884
|
size: 40
|
|
1143
885
|
}
|
|
1144
886
|
),
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
N && /* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
888
|
+
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-charcoal truncate", children: f }),
|
|
889
|
+
N && /* @__PURE__ */ e("p", { className: "text-xs text-stone truncate", children: N })
|
|
1148
890
|
] })
|
|
1149
891
|
] }),
|
|
1150
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ e("div", { className: "flex-shrink-0", children: I === u.id ? /* @__PURE__ */ e(Q, { className: "h-5 w-5 text-primary animate-spin" }) : /* @__PURE__ */ e(ne, { className: "h-5 w-5 text-stone" }) })
|
|
1151
893
|
] })
|
|
1152
894
|
}
|
|
1153
|
-
) },
|
|
895
|
+
) }, u.id);
|
|
1154
896
|
}),
|
|
1155
|
-
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
897
|
+
c && /* @__PURE__ */ e("li", { className: "p-4 flex justify-center", children: /* @__PURE__ */ i("div", { className: "flex items-center space-x-2", children: [
|
|
898
|
+
/* @__PURE__ */ e("div", { className: "w-4 h-4 animate-spin rounded-full border-2 border-primary border-t-transparent" }),
|
|
899
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading more..." })
|
|
1158
900
|
] }) })
|
|
1159
901
|
] }) })
|
|
1160
902
|
] });
|
|
1161
|
-
},
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
903
|
+
}, Ae = ({ hasChannels: t, onStartConversation: s, participantLabel: n }) => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ i("div", { className: "text-center max-w-sm", children: [
|
|
904
|
+
/* @__PURE__ */ e("div", { className: "w-24 h-24 bg-primary-alt/10 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "💬" }) }),
|
|
905
|
+
/* @__PURE__ */ e("h2", { className: "font-semibold text-charcoal", children: "Welcome to Messages" }),
|
|
906
|
+
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t ? /* @__PURE__ */ i(se, { children: [
|
|
1165
907
|
"Choose a conversation from the list or",
|
|
1166
908
|
" ",
|
|
1167
|
-
|
|
909
|
+
s && /* @__PURE__ */ i(re, { onClick: s, children: [
|
|
1168
910
|
"start a new conversation with a ",
|
|
1169
|
-
|
|
911
|
+
n.slice(0, -1),
|
|
1170
912
|
"."
|
|
1171
913
|
] })
|
|
1172
|
-
] }) :
|
|
1173
|
-
/* @__PURE__ */
|
|
914
|
+
] }) : s && /* @__PURE__ */ i(se, { children: [
|
|
915
|
+
/* @__PURE__ */ i(re, { onClick: s, children: [
|
|
1174
916
|
"Start a new conversation with one of your ",
|
|
1175
|
-
|
|
917
|
+
n
|
|
1176
918
|
] }),
|
|
1177
919
|
" ",
|
|
1178
920
|
"to begin messaging."
|
|
1179
921
|
] }) })
|
|
1180
|
-
] }) }),
|
|
1181
|
-
onClick:
|
|
1182
|
-
children:
|
|
1183
|
-
}) => /* @__PURE__ */
|
|
922
|
+
] }) }), re = ({
|
|
923
|
+
onClick: t,
|
|
924
|
+
children: s
|
|
925
|
+
}) => /* @__PURE__ */ e(
|
|
1184
926
|
"button",
|
|
1185
927
|
{
|
|
1186
928
|
type: "button",
|
|
1187
|
-
onClick:
|
|
929
|
+
onClick: t,
|
|
1188
930
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:text-primary-alt focus:outline-none focus:ring-2 focus:ring-primary",
|
|
1189
|
-
children:
|
|
931
|
+
children: s
|
|
1190
932
|
}
|
|
1191
|
-
),
|
|
933
|
+
), le = ({ error: t, onRetry: s }) => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full p-8", children: /* @__PURE__ */ i("div", { className: "text-center max-w-md", children: [
|
|
934
|
+
/* @__PURE__ */ e("div", { className: "w-24 h-24 bg-danger-alt rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ e("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
935
|
+
/* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-charcoal mb-3", children: "Connection Error" }),
|
|
936
|
+
/* @__PURE__ */ e("p", { className: "text-stone text-sm mb-6", children: t }),
|
|
937
|
+
s && /* @__PURE__ */ e(
|
|
938
|
+
"button",
|
|
939
|
+
{
|
|
940
|
+
type: "button",
|
|
941
|
+
onClick: s,
|
|
942
|
+
className: "inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-alt focus:outline-none focus:ring-2 focus:ring-primary transition-colors",
|
|
943
|
+
children: "Try Again"
|
|
944
|
+
}
|
|
945
|
+
)
|
|
946
|
+
] }) }), Be = ({ className: t, message: s }) => /* @__PURE__ */ i(
|
|
1192
947
|
"div",
|
|
1193
948
|
{
|
|
1194
|
-
className: L("flex items-center justify-center h-full",
|
|
949
|
+
className: L("flex items-center justify-center h-full", t),
|
|
1195
950
|
children: [
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ i("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
|
|
952
|
+
/* @__PURE__ */ e("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ e(
|
|
1198
953
|
"animateTransform",
|
|
1199
954
|
{
|
|
1200
955
|
attributeName: "transform",
|
|
@@ -1205,7 +960,7 @@ const qe = ({
|
|
|
1205
960
|
begin: "0.1"
|
|
1206
961
|
}
|
|
1207
962
|
) }),
|
|
1208
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ e("circle", { cx: "30", cy: "50", r: "6", children: /* @__PURE__ */ e(
|
|
1209
964
|
"animateTransform",
|
|
1210
965
|
{
|
|
1211
966
|
attributeName: "transform",
|
|
@@ -1216,7 +971,7 @@ const qe = ({
|
|
|
1216
971
|
begin: "0.2"
|
|
1217
972
|
}
|
|
1218
973
|
) }),
|
|
1219
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ e("circle", { cx: "54", cy: "50", r: "6", children: /* @__PURE__ */ e(
|
|
1220
975
|
"animateTransform",
|
|
1221
976
|
{
|
|
1222
977
|
attributeName: "transform",
|
|
@@ -1228,246 +983,248 @@ const qe = ({
|
|
|
1228
983
|
}
|
|
1229
984
|
) })
|
|
1230
985
|
] }),
|
|
1231
|
-
|
|
986
|
+
s && /* @__PURE__ */ e("span", { className: "text-stone", children: s })
|
|
1232
987
|
]
|
|
1233
988
|
}
|
|
1234
|
-
),
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
] }) }),
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
{
|
|
1244
|
-
type: "button",
|
|
1245
|
-
onClick: a,
|
|
1246
|
-
className: "inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary-alt focus:outline-none focus:ring-2 focus:ring-primary transition-colors",
|
|
1247
|
-
children: "Try Again"
|
|
1248
|
-
}
|
|
1249
|
-
)
|
|
1250
|
-
] }) }), o1 = ({
|
|
1251
|
-
capabilities: n = {},
|
|
1252
|
-
customization: a = {},
|
|
1253
|
-
className: l,
|
|
1254
|
-
renderMessageInputActions: o,
|
|
1255
|
-
onChannelSelect: c,
|
|
1256
|
-
onParticipantSelect: m
|
|
989
|
+
), He = () => /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
990
|
+
/* @__PURE__ */ e(Be, { className: "w-6 h-6" }),
|
|
991
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
992
|
+
] }) }), Qe = ({
|
|
993
|
+
capabilities: t = {},
|
|
994
|
+
className: s,
|
|
995
|
+
renderMessageInputActions: n,
|
|
996
|
+
onChannelSelect: l,
|
|
997
|
+
onParticipantSelect: a
|
|
1257
998
|
}) => {
|
|
1258
999
|
const {
|
|
1259
|
-
service:
|
|
1260
|
-
client:
|
|
1261
|
-
isConnected:
|
|
1262
|
-
isLoading:
|
|
1263
|
-
error:
|
|
1264
|
-
refreshConnection:
|
|
1265
|
-
debug:
|
|
1266
|
-
} =
|
|
1267
|
-
showStartConversation:
|
|
1268
|
-
participantSource:
|
|
1269
|
-
participantLabel:
|
|
1270
|
-
} =
|
|
1271
|
-
if (!
|
|
1272
|
-
const
|
|
1273
|
-
if (
|
|
1000
|
+
service: m,
|
|
1001
|
+
client: d,
|
|
1002
|
+
isConnected: r,
|
|
1003
|
+
isLoading: o,
|
|
1004
|
+
error: b,
|
|
1005
|
+
refreshConnection: x,
|
|
1006
|
+
debug: g
|
|
1007
|
+
} = Pe(), [c, C] = w(null), [v, y] = w(!1), [I, P] = w(!1), [p, E] = w(/* @__PURE__ */ new Set()), [R, T] = w(0), u = A(null), {
|
|
1008
|
+
showStartConversation: f = !1,
|
|
1009
|
+
participantSource: N,
|
|
1010
|
+
participantLabel: S = "participants"
|
|
1011
|
+
} = t, j = A(null), F = U(async () => {
|
|
1012
|
+
if (!d || !r) return;
|
|
1013
|
+
const h = d.userID;
|
|
1014
|
+
if (h)
|
|
1274
1015
|
try {
|
|
1275
|
-
|
|
1276
|
-
const O = await
|
|
1016
|
+
g && console.log("[MessagingShell] Syncing channels for user:", h);
|
|
1017
|
+
const O = await d.queryChannels(
|
|
1277
1018
|
{
|
|
1278
1019
|
type: "messaging",
|
|
1279
|
-
members: { $in: [
|
|
1020
|
+
members: { $in: [h] }
|
|
1280
1021
|
},
|
|
1281
1022
|
{},
|
|
1282
1023
|
{ limit: 100 }
|
|
1283
|
-
),
|
|
1284
|
-
O.forEach((
|
|
1285
|
-
const
|
|
1286
|
-
Object.values(
|
|
1287
|
-
var
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1024
|
+
), M = /* @__PURE__ */ new Set();
|
|
1025
|
+
O.forEach((J) => {
|
|
1026
|
+
const ce = J.state.members;
|
|
1027
|
+
Object.values(ce).forEach((de) => {
|
|
1028
|
+
var ee;
|
|
1029
|
+
const K = (ee = de.user) == null ? void 0 : ee.id;
|
|
1030
|
+
K && K !== h && M.add(K);
|
|
1290
1031
|
});
|
|
1291
|
-
}),
|
|
1032
|
+
}), E(M), y(O.length > 0), j.current = h, g && console.log("[MessagingShell] Channels synced successfully:", {
|
|
1292
1033
|
channelCount: O.length,
|
|
1293
|
-
memberCount:
|
|
1034
|
+
memberCount: M.size
|
|
1294
1035
|
});
|
|
1295
1036
|
} catch (O) {
|
|
1296
1037
|
console.error("[MessagingShell] Failed to sync channels:", O);
|
|
1297
1038
|
}
|
|
1298
|
-
}, [
|
|
1039
|
+
}, [d, r, g]);
|
|
1299
1040
|
B(() => {
|
|
1300
|
-
if (!
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1303
|
-
}, [
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
}, [
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
name: E.name,
|
|
1319
|
-
email: E.email,
|
|
1320
|
-
phone: E.phone
|
|
1321
|
-
});
|
|
1041
|
+
if (!d || !r) return;
|
|
1042
|
+
const h = d.userID;
|
|
1043
|
+
h && j.current !== h && F();
|
|
1044
|
+
}, [d, r, F]);
|
|
1045
|
+
const H = U(
|
|
1046
|
+
(h) => {
|
|
1047
|
+
C(h), l == null || l(h);
|
|
1048
|
+
},
|
|
1049
|
+
[l]
|
|
1050
|
+
), V = U(() => {
|
|
1051
|
+
C(null);
|
|
1052
|
+
}, []), _ = U(() => {
|
|
1053
|
+
var h;
|
|
1054
|
+
N && (T((O) => O + 1), P(!0), (h = u.current) == null || h.showModal());
|
|
1055
|
+
}, [N]), W = U(
|
|
1056
|
+
async (h) => {
|
|
1057
|
+
var O;
|
|
1058
|
+
if (m)
|
|
1322
1059
|
try {
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1060
|
+
g && console.log(
|
|
1061
|
+
"[MessagingShell] Starting conversation with:",
|
|
1062
|
+
h.id
|
|
1063
|
+
);
|
|
1064
|
+
const M = await m.startChannelWithFollower({
|
|
1065
|
+
id: h.id,
|
|
1066
|
+
name: h.name,
|
|
1067
|
+
email: h.email,
|
|
1068
|
+
phone: h.phone
|
|
1069
|
+
});
|
|
1070
|
+
try {
|
|
1071
|
+
await M.show();
|
|
1072
|
+
} catch (J) {
|
|
1073
|
+
console.warn("[MessagingShell] Failed to unhide channel:", J);
|
|
1074
|
+
}
|
|
1075
|
+
C(M), P(!1), (O = u.current) == null || O.close(), a == null || a(h);
|
|
1076
|
+
} catch (M) {
|
|
1077
|
+
console.error("[MessagingShell] Failed to start conversation:", M);
|
|
1326
1078
|
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1079
|
+
},
|
|
1080
|
+
[m, a, g]
|
|
1081
|
+
), G = U(() => {
|
|
1082
|
+
var h;
|
|
1083
|
+
P(!1), (h = u.current) == null || h.close();
|
|
1084
|
+
}, []), z = U(
|
|
1085
|
+
async (h) => {
|
|
1086
|
+
g && console.log("[MessagingShell] Leaving conversation:", h.id), C(null), j.current = null, await F();
|
|
1087
|
+
},
|
|
1088
|
+
[F, g]
|
|
1089
|
+
), k = U(
|
|
1090
|
+
async (h) => {
|
|
1091
|
+
g && console.log("[MessagingShell] Blocking participant:", h), C(null), j.current = null, await F();
|
|
1092
|
+
},
|
|
1093
|
+
[F, g]
|
|
1094
|
+
), D = !!c;
|
|
1095
|
+
return o ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(He, {}) }) : b ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(le, { error: b, onRetry: x }) }) : !r || !d ? /* @__PURE__ */ e("div", { className: L("h-full", s), children: /* @__PURE__ */ e(
|
|
1096
|
+
le,
|
|
1341
1097
|
{
|
|
1342
1098
|
error: "Not connected to messaging service",
|
|
1343
|
-
onRetry:
|
|
1099
|
+
onRetry: x
|
|
1344
1100
|
}
|
|
1345
|
-
) }) : /* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1101
|
+
) }) : /* @__PURE__ */ i("div", { className: L("h-full bg-white overflow-hidden", s), children: [
|
|
1102
|
+
/* @__PURE__ */ i("div", { className: "flex h-full min-h-0", children: [
|
|
1103
|
+
/* @__PURE__ */ e(
|
|
1348
1104
|
"div",
|
|
1349
1105
|
{
|
|
1350
1106
|
className: L(
|
|
1351
1107
|
"min-h-0 min-w-0 bg-white lg:bg-chalk lg:flex lg:flex-col lg:border-r lg:border-sand",
|
|
1352
1108
|
{
|
|
1353
|
-
"hidden lg:flex lg:w-80 lg:min-w-[280px] lg:max-w-[360px]":
|
|
1354
|
-
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": !
|
|
1109
|
+
"hidden lg:flex lg:w-80 lg:min-w-[280px] lg:max-w-[360px]": D,
|
|
1110
|
+
"flex flex-col w-full lg:flex-1 lg:max-w-2xl": !D
|
|
1355
1111
|
}
|
|
1356
1112
|
),
|
|
1357
|
-
children: /* @__PURE__ */
|
|
1358
|
-
|
|
1113
|
+
children: /* @__PURE__ */ e(
|
|
1114
|
+
pe,
|
|
1359
1115
|
{
|
|
1360
|
-
onChannelSelect:
|
|
1361
|
-
selectedChannel:
|
|
1362
|
-
showStartConversation:
|
|
1363
|
-
onStartConversation:
|
|
1364
|
-
participantLabel:
|
|
1116
|
+
onChannelSelect: H,
|
|
1117
|
+
selectedChannel: c || void 0,
|
|
1118
|
+
showStartConversation: f && !!N,
|
|
1119
|
+
onStartConversation: _,
|
|
1120
|
+
participantLabel: S
|
|
1365
1121
|
}
|
|
1366
1122
|
)
|
|
1367
1123
|
}
|
|
1368
1124
|
),
|
|
1369
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ e(
|
|
1370
1126
|
"div",
|
|
1371
1127
|
{
|
|
1372
1128
|
className: L("flex-1 flex-col min-w-0 min-h-0", {
|
|
1373
|
-
"hidden lg:flex": !
|
|
1374
|
-
flex:
|
|
1129
|
+
"hidden lg:flex": !D,
|
|
1130
|
+
flex: D
|
|
1375
1131
|
}),
|
|
1376
|
-
children:
|
|
1377
|
-
|
|
1132
|
+
children: c ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 flex flex-col", children: /* @__PURE__ */ e(
|
|
1133
|
+
Fe,
|
|
1378
1134
|
{
|
|
1379
|
-
channel:
|
|
1380
|
-
onBack:
|
|
1135
|
+
channel: c,
|
|
1136
|
+
onBack: V,
|
|
1381
1137
|
showBackButton: !0,
|
|
1382
|
-
renderMessageInputActions:
|
|
1383
|
-
onLeaveConversation:
|
|
1384
|
-
onBlockParticipant:
|
|
1138
|
+
renderMessageInputActions: n,
|
|
1139
|
+
onLeaveConversation: z,
|
|
1140
|
+
onBlockParticipant: k
|
|
1385
1141
|
},
|
|
1386
|
-
|
|
1387
|
-
) }) : /* @__PURE__ */
|
|
1388
|
-
|
|
1142
|
+
c.id
|
|
1143
|
+
) }) : /* @__PURE__ */ e(
|
|
1144
|
+
Ae,
|
|
1389
1145
|
{
|
|
1390
|
-
hasChannels:
|
|
1391
|
-
onStartConversation:
|
|
1392
|
-
participantLabel:
|
|
1146
|
+
hasChannels: v,
|
|
1147
|
+
onStartConversation: f ? _ : void 0,
|
|
1148
|
+
participantLabel: S
|
|
1393
1149
|
}
|
|
1394
1150
|
)
|
|
1395
1151
|
}
|
|
1396
1152
|
)
|
|
1397
1153
|
] }),
|
|
1398
|
-
|
|
1154
|
+
N && // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
1155
|
+
/* @__PURE__ */ e(
|
|
1399
1156
|
"dialog",
|
|
1400
1157
|
{
|
|
1401
|
-
ref:
|
|
1158
|
+
ref: u,
|
|
1402
1159
|
className: "mes-dialog",
|
|
1403
|
-
onClick: (
|
|
1404
|
-
|
|
1160
|
+
onClick: (h) => {
|
|
1161
|
+
h.target === u.current && G();
|
|
1405
1162
|
},
|
|
1406
1163
|
onClose: G,
|
|
1407
|
-
children: /* @__PURE__ */
|
|
1408
|
-
|
|
1164
|
+
children: /* @__PURE__ */ e("div", { className: "h-full w-full bg-white shadow-max-elevation-light", children: /* @__PURE__ */ e(
|
|
1165
|
+
je,
|
|
1409
1166
|
{
|
|
1410
|
-
participantSource:
|
|
1411
|
-
onSelectParticipant:
|
|
1167
|
+
participantSource: N,
|
|
1168
|
+
onSelectParticipant: W,
|
|
1412
1169
|
onClose: G,
|
|
1413
|
-
existingParticipantIds:
|
|
1414
|
-
participantLabel:
|
|
1415
|
-
searchPlaceholder: `Search ${
|
|
1170
|
+
existingParticipantIds: p,
|
|
1171
|
+
participantLabel: S,
|
|
1172
|
+
searchPlaceholder: `Search ${S}...`
|
|
1416
1173
|
},
|
|
1417
|
-
|
|
1174
|
+
R
|
|
1418
1175
|
) })
|
|
1419
1176
|
}
|
|
1420
1177
|
)
|
|
1421
1178
|
] });
|
|
1422
|
-
},
|
|
1423
|
-
const { initialSearch:
|
|
1424
|
-
if (
|
|
1425
|
-
const
|
|
1426
|
-
r(!0),
|
|
1179
|
+
}, Ze = (t, s = {}) => {
|
|
1180
|
+
const { initialSearch: n = "", pageSize: l = 20 } = s, [a, m] = w([]), [d, r] = w(!1), [o, b] = w(null), [x, g] = w(n), [c, C] = w(!0), [v, y] = w(), I = U(async (R = !1, T) => {
|
|
1181
|
+
if (d) return;
|
|
1182
|
+
const u = T !== void 0 ? T : x;
|
|
1183
|
+
r(!0), b(null);
|
|
1427
1184
|
try {
|
|
1428
|
-
const
|
|
1429
|
-
search:
|
|
1430
|
-
limit:
|
|
1431
|
-
cursor:
|
|
1185
|
+
const f = await t.loadParticipants({
|
|
1186
|
+
search: u || void 0,
|
|
1187
|
+
limit: l,
|
|
1188
|
+
cursor: R ? void 0 : v
|
|
1432
1189
|
});
|
|
1433
1190
|
m(
|
|
1434
|
-
(N) =>
|
|
1435
|
-
),
|
|
1436
|
-
} catch (
|
|
1437
|
-
const N =
|
|
1438
|
-
|
|
1191
|
+
(N) => R ? f.participants : [...N, ...f.participants]
|
|
1192
|
+
), C(f.hasMore), y(f.nextCursor);
|
|
1193
|
+
} catch (f) {
|
|
1194
|
+
const N = f instanceof Error ? f.message : "Failed to load participants";
|
|
1195
|
+
b(N), console.error("[useParticipants] Load error:", f);
|
|
1439
1196
|
} finally {
|
|
1440
1197
|
r(!1);
|
|
1441
1198
|
}
|
|
1442
|
-
}, [
|
|
1443
|
-
|
|
1444
|
-
}, [
|
|
1445
|
-
|
|
1446
|
-
}, [
|
|
1447
|
-
|
|
1448
|
-
}, [
|
|
1199
|
+
}, [t, x, v, l, d]), P = U(() => {
|
|
1200
|
+
c && !d && I(!1);
|
|
1201
|
+
}, [c, d, I]), p = U((R) => {
|
|
1202
|
+
g(R), y(void 0), I(!0, R);
|
|
1203
|
+
}, [I]), E = U(() => {
|
|
1204
|
+
y(void 0), I(!0);
|
|
1205
|
+
}, [I]);
|
|
1449
1206
|
return B(() => {
|
|
1450
|
-
|
|
1451
|
-
}, [
|
|
1452
|
-
participants:
|
|
1453
|
-
loading:
|
|
1454
|
-
error:
|
|
1455
|
-
searchQuery:
|
|
1456
|
-
hasMore:
|
|
1457
|
-
totalCount:
|
|
1458
|
-
loadMore:
|
|
1459
|
-
search:
|
|
1460
|
-
refresh:
|
|
1207
|
+
I(!0);
|
|
1208
|
+
}, [t.loadParticipants]), {
|
|
1209
|
+
participants: a,
|
|
1210
|
+
loading: d,
|
|
1211
|
+
error: o,
|
|
1212
|
+
searchQuery: x,
|
|
1213
|
+
hasMore: c,
|
|
1214
|
+
totalCount: t.totalCount,
|
|
1215
|
+
loadMore: P,
|
|
1216
|
+
search: p,
|
|
1217
|
+
refresh: E
|
|
1461
1218
|
};
|
|
1462
1219
|
};
|
|
1463
1220
|
export {
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1221
|
+
Y as Avatar,
|
|
1222
|
+
pe as ChannelList,
|
|
1223
|
+
Fe as ChannelView,
|
|
1224
|
+
Xe as MessagingProvider,
|
|
1225
|
+
Qe as MessagingShell,
|
|
1226
|
+
je as ParticipantPicker,
|
|
1227
|
+
Pe as useMessaging,
|
|
1228
|
+
Ze as useParticipants
|
|
1472
1229
|
};
|
|
1473
1230
|
//# sourceMappingURL=index.js.map
|