@linktr.ee/messaging-react 3.5.0-rc-1782792813 → 3.5.0-rc-1782793221

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.
Files changed (37) hide show
  1. package/dist/{Card-BnGeMt4f.js → Card-49AvU29H.js} +2 -2
  2. package/dist/{Card-BnGeMt4f.js.map → Card-49AvU29H.js.map} +1 -1
  3. package/dist/{Card-DpCwDviq.cjs → Card-Cse19FAO.cjs} +2 -2
  4. package/dist/{Card-DpCwDviq.cjs.map → Card-Cse19FAO.cjs.map} +1 -1
  5. package/dist/{Card-qrDaFHtJ.cjs → Card-DBIVUdM5.cjs} +2 -2
  6. package/dist/{Card-qrDaFHtJ.cjs.map → Card-DBIVUdM5.cjs.map} +1 -1
  7. package/dist/{Card-BWWBaNKF.js → Card-DS8zNUkL.js} +2 -2
  8. package/dist/{Card-BWWBaNKF.js.map → Card-DS8zNUkL.js.map} +1 -1
  9. package/dist/{Card-Bj4YaHav.cjs → Card-DgPx-6aq.cjs} +2 -2
  10. package/dist/{Card-Bj4YaHav.cjs.map → Card-DgPx-6aq.cjs.map} +1 -1
  11. package/dist/{Card-DkXzpFLA.js → Card-q0zqEbga.js} +3 -3
  12. package/dist/{Card-DkXzpFLA.js.map → Card-q0zqEbga.js.map} +1 -1
  13. package/dist/{LockedThumbnail-DhXEk-NX.cjs → LockedThumbnail-BFgw9F0g.cjs} +2 -2
  14. package/dist/{LockedThumbnail-DhXEk-NX.cjs.map → LockedThumbnail-BFgw9F0g.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-DJR--PAi.js → LockedThumbnail-CRBDhB49.js} +2 -2
  16. package/dist/{LockedThumbnail-DJR--PAi.js.map → LockedThumbnail-CRBDhB49.js.map} +1 -1
  17. package/dist/index-BcmwckcI.cjs +2 -0
  18. package/dist/index-BcmwckcI.cjs.map +1 -0
  19. package/dist/{index-ubCRSgQk.js → index-DxzkXLSW.js} +1150 -1172
  20. package/dist/index-DxzkXLSW.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +0 -12
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelList/ChannelList.stories.tsx +37 -0
  26. package/src/components/ChannelList/CustomChannelPreview.stories.tsx +0 -110
  27. package/src/components/ChannelList/CustomChannelPreview.test.tsx +8 -58
  28. package/src/components/ChannelList/CustomChannelPreview.tsx +12 -7
  29. package/src/components/ChannelView.stories.tsx +7 -38
  30. package/src/components/ChannelView.test.tsx +27 -44
  31. package/src/components/ChannelView.tsx +6 -4
  32. package/src/hooks/useChannelStar.ts +6 -9
  33. package/src/stream-custom-data.ts +1 -16
  34. package/dist/index-DzOA7Yu8.cjs +0 -2
  35. package/dist/index-DzOA7Yu8.cjs.map +0 -1
  36. package/dist/index-ubCRSgQk.js.map +0 -1
  37. package/src/components/ParticipantBadges.tsx +0 -42
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import j, { createContext as We, useContext as _e, useCallback as J, useState as $, useRef as Y, useEffect as K, useId as Sn, useMemo as re, Suspense as Xe } from "react";
3
- import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as An, LinkPreviewsManager as Lt } from "stream-chat";
5
- import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Gt, Attachment as zn, EditMessageModal as Pn, MessageBlocked as On, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Dt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ye, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as ls, Channel as os, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
- import { StarIcon as Me, DotsThreeIcon as fs, SpinnerGapIcon as Te, SignOutIcon as gs, ProhibitInsetIcon as zt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as bs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as Ne, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as Pe, ArrowUpIcon as Rs, SparkleIcon as pe, ProhibitIcon as Ls, CurrencyDollarIcon as Ds, ArrowLeftIcon as Pt, CaretRightIcon as ve, PencilSimpleIcon as zs, CaretLeftIcon as Ps } from "@phosphor-icons/react";
7
- import y from "classnames";
8
- import { MessageActions as Os, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
2
+ import j, { createContext as We, useContext as _e, useCallback as J, useState as F, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
3
+ import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
5
+ import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as zn, MessageBouncePrompt as On, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as ye, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as $e, AIStates as Fe, useTypingContext as rs, useAIState as is, Channel as ls, WithComponents as os, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
+ import { StarIcon as Ge, DotsThreeIcon as hs, SpinnerGapIcon as Te, SignOutIcon as fs, ProhibitInsetIcon as Pt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as _s, FileDocIcon as ys, FilePdfIcon as ks, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Cs, LinkIcon as Es, DownloadSimpleIcon as Ne, GiftIcon as Is, ThumbsUpIcon as Ss, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Pe, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as zt, CaretRightIcon as ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
+ import _ from "classnames";
8
+ import { MessageActions as Ps, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
9
9
  const Xt = We({
10
10
  service: null,
11
11
  client: null,
@@ -16,7 +16,7 @@ const Xt = We({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Je = () => _e(Xt), ki = ({
19
+ }), Je = () => _e(Xt), _i = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,156 +24,156 @@ const Xt = We({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var M, S;
28
- const l = J(
29
- (k, ...T) => {
30
- i && console.log(`🔥 [MessagingProvider] ${k}`, ...T);
27
+ var D, k;
28
+ const o = J(
29
+ (C, ...S) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...S);
31
31
  },
32
32
  [i]
33
33
  );
34
- l("🔄 RENDER START", {
34
+ o("🔄 RENDER START", {
35
35
  userId: t == null ? void 0 : t.id,
36
36
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = $(null), [m, g] = $(null), [u, f] = $(!1), [c, b] = $(!1), [N, w] = $(null), p = Y(!1), v = Y(null), A = Y(s);
41
- A.current = s;
42
- const E = Y(i);
43
- E.current = i;
44
- const I = Y({
40
+ const [l, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, p] = F(!1), [N, w] = F(null), b = Y(!1), v = Y(null), M = Y(s);
41
+ M.current = s;
42
+ const T = Y(i);
43
+ T.current = i;
44
+ const y = Y({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), P = Y(0);
50
- P.current++, l("📊 RENDER INFO", {
51
- renderCount: P.current,
49
+ }), O = Y(0);
50
+ O.current++, o("📊 RENDER INFO", {
51
+ renderCount: O.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: I.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: I.current.apiKey !== a,
56
- serviceConfigChanged: I.current.serviceConfig !== s,
57
- capabilitiesChanged: I.current.capabilities !== r
54
+ userChanged: y.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: y.current.apiKey !== a,
56
+ serviceConfigChanged: y.current.serviceConfig !== s,
57
+ capabilitiesChanged: y.current.capabilities !== r
58
58
  }
59
- }), I.current = {
59
+ }), y.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const L = Y(null);
66
- a && ((M = L.current) == null ? void 0 : M.apiKey) !== a && (L.current = { apiKey: a, client: new An(a) });
67
- const _ = a ? ((S = L.current) == null ? void 0 : S.client) ?? null : null;
65
+ const P = Y(null);
66
+ a && ((D = P.current) == null ? void 0 : D.apiKey) !== a && (P.current = { apiKey: a, client: new Tn(a) });
67
+ const L = a ? ((k = P.current) == null ? void 0 : k.client) ?? null : null;
68
68
  K(() => {
69
- const k = P.current, T = A.current;
70
- if (!a || !_ || !T) {
71
- l("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: k,
69
+ const C = O.current, S = M.current;
70
+ if (!a || !L || !S) {
71
+ o("⚠️ SERVICE INIT SKIPPED", {
72
+ renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
- l("🚀 CREATING SERVICE", {
78
- renderCount: k,
77
+ o("🚀 CREATING SERVICE", {
78
+ renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const O = new Tn({
82
- ...T,
81
+ const $ = new Sn({
82
+ ...S,
83
83
  apiKey: a,
84
- debug: E.current,
85
- client: _
84
+ debug: T.current,
85
+ client: L
86
86
  });
87
- v.current = O, d(O), l("✅ SERVICE SET", {
88
- renderCount: k,
89
- serviceInstance: !!O
87
+ v.current = $, d($), o("✅ SERVICE SET", {
88
+ renderCount: C,
89
+ serviceInstance: !!$
90
90
  });
91
- }, [a, _]);
92
- const z = Y(null);
91
+ }, [a, L]);
92
+ const E = Y(null);
93
93
  K(() => {
94
- var T, O;
95
- if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
- hasService: !!o,
94
+ var S, $;
95
+ if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
+ hasService: !!l,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: p.current,
99
+ isConnecting: b.current,
100
100
  isConnected: u,
101
- dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
- }), !o || !t) {
103
- l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
101
+ dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
102
+ }), !l || !t) {
103
+ o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (p.current) {
107
- l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
106
+ if (b.current) {
107
+ o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((T = z.current) == null ? void 0 : T.serviceId) === o && ((O = z.current) == null ? void 0 : O.userId) === t.id) {
111
- l(
110
+ if (((S = E.current) == null ? void 0 : S.serviceId) === l && (($ = E.current) == null ? void 0 : $.userId) === t.id) {
111
+ o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
114
114
  );
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), w(null);
118
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, p(!0), w(null);
119
119
  try {
120
- l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const F = await o.connectUser(t);
122
- g(F), f(!0), z.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
120
+ o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
+ const z = await l.connectUser(t);
122
+ g(z), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: F.userID
124
+ clientId: z.userID
125
125
  });
126
- } catch (F) {
127
- const V = F instanceof Error ? F.message : "Connection failed";
128
- w(V), l("❌ USER CONNECTION ERROR", {
126
+ } catch (z) {
127
+ const V = z instanceof Error ? z.message : "Connection failed";
128
+ w(V), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: V
131
131
  });
132
132
  } finally {
133
- b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ p(!1), b.current = !1, o("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: u
136
136
  });
137
137
  }
138
138
  })();
139
- }, [o, t, l, u]), K(() => {
140
- const k = _;
139
+ }, [l, t, o, u]), K(() => {
140
+ const C = L;
141
141
  return () => {
142
- var T;
143
- k && (z.current = null, (T = v.current) == null || T.disconnectUser().catch(console.error));
142
+ var S;
143
+ C && (E.current = null, (S = v.current) == null || S.disconnectUser().catch(console.error));
144
144
  };
145
- }, [_]);
145
+ }, [L]);
146
146
  const R = J(async () => {
147
- if (l("🔄 REFRESH CONNECTION CALLED", {
148
- hasService: !!o,
147
+ if (o("🔄 REFRESH CONNECTION CALLED", {
148
+ hasService: !!l,
149
149
  hasUser: !!t
150
- }), !o || !t) {
151
- l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
150
+ }), !l || !t) {
151
+ o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
154
+ o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
155
155
  try {
156
- l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
- const k = await o.connectUser(t);
158
- g(k), f(!0), w(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (k) {
160
- const T = k instanceof Error ? k.message : "Refresh failed";
161
- w(T), l("❌ CONNECTION REFRESH ERROR", {
156
+ o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
+ const C = await l.connectUser(t);
158
+ g(C), f(!0), w(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (C) {
160
+ const S = C instanceof Error ? C.message : "Refresh failed";
161
+ w(S), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: T
163
+ error: S
164
164
  });
165
165
  } finally {
166
- b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ p(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), D = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
- hasService: !!o,
168
+ }, [l, t, o]), A = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
+ hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
172
172
  isLoading: c,
173
173
  hasError: !!N,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
- service: o,
176
+ service: l,
177
177
  client: m,
178
178
  isConnected: u,
179
179
  isLoading: c,
@@ -182,7 +182,7 @@ const Xt = We({
182
182
  refreshConnection: R,
183
183
  debug: i
184
184
  }), [
185
- o,
185
+ l,
186
186
  m,
187
187
  u,
188
188
  c,
@@ -190,25 +190,25 @@ const Xt = We({
190
190
  r,
191
191
  R,
192
192
  i,
193
- l
193
+ o
194
194
  ]);
195
- return l("🔄 RENDER END", {
196
- renderCount: P.current,
197
- willRenderChat: !!_,
198
- contextValueReady: !!D
199
- }), /* @__PURE__ */ n(Xt.Provider, { value: D, children: _ ? /* @__PURE__ */ n(
200
- Mn,
195
+ return o("🔄 RENDER END", {
196
+ renderCount: O.current,
197
+ willRenderChat: !!L,
198
+ contextValueReady: !!A
199
+ }), /* @__PURE__ */ n(Xt.Provider, { value: A, children: L ? /* @__PURE__ */ n(
200
+ An,
201
201
  {
202
- client: _,
202
+ client: L,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, $s = () => Je(), Kt = (e) => {
209
+ }, zs = () => Je(), Kt = (e) => {
210
210
  var a, r;
211
- const [t, s] = $(
211
+ const [t, s] = F(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return K(() => {
@@ -218,22 +218,23 @@ const Xt = We({
218
218
  return;
219
219
  }
220
220
  s(!!((o = e.state.membership) != null && o.pinned_at));
221
- const i = (d) => {
222
- var u, f, c, b, N;
223
- const m = (u = e._client) == null ? void 0 : u.userID, g = ((f = d.member) == null ? void 0 : f.user_id) ?? ((b = (c = d.member) == null ? void 0 : c.user) == null ? void 0 : b.id);
224
- !m || g !== m || s(!!((N = d.member) != null && N.pinned_at));
225
- }, l = e.on("member.updated", i);
226
- return () => {
227
- l.unsubscribe();
221
+ const i = (l) => {
222
+ var d;
223
+ s(
224
+ l != null && l.member ? !!l.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
225
+ );
226
+ };
227
+ return e.on("member.updated", i), () => {
228
+ e.off("member.updated", i);
228
229
  };
229
230
  }, [e]), t;
230
- }, Fs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
231
- function Bs(e) {
232
- return Fs.test(e.trim());
231
+ }, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
+ function $s(e) {
233
+ return Os.test(e.trim());
233
234
  }
234
235
  function Ot(e, t) {
235
236
  const s = e == null ? void 0 : e.trim();
236
- return !s || t && s === t ? !1 : !Bs(s);
237
+ return !s || t && s === t ? !1 : !$s(s);
237
238
  }
238
239
  function Jt(e) {
239
240
  return Ot(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ot(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
@@ -266,7 +267,7 @@ const $t = [
266
267
  "🍈"
267
268
  // Melon
268
269
  ];
269
- function Us(e) {
270
+ function Fs(e) {
270
271
  let t = 0;
271
272
  for (let s = 0; s < e.length; s++) {
272
273
  const a = e.charCodeAt(s);
@@ -274,8 +275,8 @@ function Us(e) {
274
275
  }
275
276
  return Math.abs(t);
276
277
  }
277
- function js(e) {
278
- const s = Us(e) % $t.length;
278
+ function Bs(e) {
279
+ const s = Fs(e) % $t.length;
279
280
  return $t[s];
280
281
  }
281
282
  const ne = ({
@@ -285,9 +286,9 @@ const ne = ({
285
286
  className: a,
286
287
  starred: r = !1,
287
288
  shape: i = "squircle",
288
- dmAgentEnabled: l = !1
289
+ dmAgentEnabled: o = !1
289
290
  }) => {
290
- const o = js(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
291
+ const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
291
292
  "img",
292
293
  {
293
294
  src: t,
@@ -298,17 +299,17 @@ const ne = ({
298
299
  "div",
299
300
  {
300
301
  "aria-hidden": "true",
301
- className: y(
302
+ className: _(
302
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
303
304
  m
304
305
  ),
305
- children: o
306
+ children: l
306
307
  }
307
308
  ) });
308
309
  return /* @__PURE__ */ h(
309
310
  "div",
310
311
  {
311
- className: y(
312
+ className: _(
312
313
  "relative flex-shrink-0 !bg-transparent",
313
314
  a
314
315
  ),
@@ -323,20 +324,20 @@ const ne = ({
323
324
  {
324
325
  "aria-hidden": "true",
325
326
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
326
- children: /* @__PURE__ */ n(Me, { className: "size-3 text-yellow-600", weight: "duotone" })
327
+ children: /* @__PURE__ */ n(Ge, { className: "size-3 text-yellow-600", weight: "duotone" })
327
328
  }
328
329
  ),
329
330
  /* @__PURE__ */ n(
330
331
  "div",
331
332
  {
332
333
  "data-testid": "avatar-ring",
333
- className: y(
334
+ className: _(
334
335
  "h-full w-full",
335
336
  "bg-transparent"
336
337
  ),
337
338
  style: {
338
339
  ...u,
339
- ...l && {
340
+ ...o && {
340
341
  borderWidth: `${g}px`,
341
342
  borderStyle: "solid",
342
343
  borderColor: "var(--AI-Gradient, #7F22FE)",
@@ -349,94 +350,94 @@ const ne = ({
349
350
  ]
350
351
  }
351
352
  );
352
- }, Vs = "https://linktr.ee/s/about/trust-center/report", Gs = ({
353
+ }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
353
354
  channel: e,
354
355
  participant: t,
355
356
  showBlockParticipant: s = !0,
356
357
  enabled: a = !0,
357
358
  onLeaveConversation: r,
358
359
  onBlockParticipant: i,
359
- onDeleteConversationClick: l,
360
- onBlockParticipantClick: o,
360
+ onDeleteConversationClick: o,
361
+ onBlockParticipantClick: l,
361
362
  onReportParticipantClick: d,
362
363
  onActionComplete: m,
363
364
  logLabel: g = "useChannelModerationActions"
364
365
  }) => {
365
- var M;
366
- const { service: u, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, b = !!(a && s && u && c), [N, w] = $(!1), [p, v] = $(null), [A, E] = $(!1), [I, P] = $(!1), L = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
366
+ var D;
367
+ const { service: u, debug: f } = Je(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && u && c), [N, w] = F(!1), [b, v] = F(null), [M, T] = F(!1), [y, O] = F(!1), P = p && ((b == null ? void 0 : b.participantId) !== c || (b == null ? void 0 : b.service) !== u);
367
368
  return K(() => {
368
- if (!b || !u || !c) {
369
+ if (!p || !u || !c) {
369
370
  w(!1), v(null);
370
371
  return;
371
372
  }
372
- let S = !1;
373
+ let k = !1;
373
374
  return (async () => {
374
375
  try {
375
- const k = await u.getBlockedUsers();
376
- if (S) return;
376
+ const C = await u.getBlockedUsers();
377
+ if (k) return;
377
378
  w(
378
- k.some(
379
- (T) => T.blocked_user_id === c
379
+ C.some(
380
+ (S) => S.blocked_user_id === c
380
381
  )
381
382
  );
382
- } catch (k) {
383
- S || console.error(`[${g}] Failed to check blocked status:`, k);
383
+ } catch (C) {
384
+ k || console.error(`[${g}] Failed to check blocked status:`, C);
384
385
  } finally {
385
- S || v({ participantId: c, service: u });
386
+ k || v({ participantId: c, service: u });
386
387
  }
387
388
  })(), () => {
388
- S = !0;
389
+ k = !0;
389
390
  };
390
- }, [b, u, c, g]), {
391
+ }, [p, u, c, g]), {
391
392
  isParticipantBlocked: N,
392
- isCheckingBlockedStatus: L,
393
- isLeaving: A,
394
- isUpdatingBlockStatus: I,
393
+ isCheckingBlockedStatus: P,
394
+ isLeaving: M,
395
+ isUpdatingBlockStatus: y,
395
396
  handleLeaveConversation: async () => {
396
- var S;
397
- if (!A) {
398
- l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), E(!0);
397
+ var k;
398
+ if (!M) {
399
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
399
400
  try {
400
- const k = ((S = e._client) == null ? void 0 : S.userID) ?? null;
401
- await e.hide(k, !1), r && await r(e), m == null || m();
402
- } catch (k) {
403
- console.error(`[${g}] Failed to leave conversation`, k);
401
+ const C = ((k = e._client) == null ? void 0 : k.userID) ?? null;
402
+ await e.hide(C, !1), r && await r(e), m == null || m();
403
+ } catch (C) {
404
+ console.error(`[${g}] Failed to leave conversation`, C);
404
405
  } finally {
405
- E(!1);
406
+ T(!1);
406
407
  }
407
408
  }
408
409
  },
409
410
  handleBlockUser: async () => {
410
- var S, k, T;
411
- if (!(I || !u)) {
412
- o == null || o(), f && console.log(`[${g}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), P(!0);
411
+ var k, C, S;
412
+ if (!(y || !u)) {
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
413
414
  try {
414
- await u.blockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
415
- } catch (O) {
416
- console.error(`[${g}] Failed to block member`, O);
415
+ await u.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
416
+ } catch ($) {
417
+ console.error(`[${g}] Failed to block member`, $);
417
418
  } finally {
418
- P(!1);
419
+ O(!1);
419
420
  }
420
421
  }
421
422
  },
422
423
  handleUnblockUser: async () => {
423
- var S, k, T;
424
- if (!(I || !u)) {
425
- o == null || o(), f && console.log(`[${g}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), P(!0);
424
+ var k, C, S;
425
+ if (!(y || !u)) {
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
426
427
  try {
427
- await u.unBlockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
428
- } catch (O) {
429
- console.error(`[${g}] Failed to unblock member`, O);
428
+ await u.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
429
+ } catch ($) {
430
+ console.error(`[${g}] Failed to unblock member`, $);
430
431
  } finally {
431
- P(!1);
432
+ O(!1);
432
433
  }
433
434
  }
434
435
  },
435
436
  handleReportUser: () => {
436
- d == null || d(), m == null || m(), window.open(Vs, "_blank", "noopener,noreferrer");
437
+ d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
437
438
  }
438
439
  };
439
- }, be = ({
440
+ }, pe = ({
440
441
  variant: e = "default",
441
442
  className: t,
442
443
  children: s,
@@ -445,7 +446,7 @@ const ne = ({
445
446
  "button",
446
447
  {
447
448
  type: "button",
448
- className: y(
449
+ className: _(
449
450
  "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",
450
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
451
452
  t
@@ -460,30 +461,30 @@ const ne = ({
460
461
  showBlockParticipant: a = !0,
461
462
  showReportParticipant: r = !0,
462
463
  onLeaveConversation: i,
463
- onBlockParticipant: l,
464
- onDeleteConversationClick: o,
464
+ onBlockParticipant: o,
465
+ onDeleteConversationClick: l,
465
466
  onBlockParticipantClick: d,
466
467
  onReportParticipantClick: m,
467
468
  customChannelActions: g,
468
469
  triggerClassName: u
469
470
  }) => {
470
- const [f, c] = $(!1), b = Y(null), N = Sn(), w = J(() => c(!1), []), {
471
- isParticipantBlocked: p,
471
+ const [f, c] = F(!1), p = Y(null), N = In(), w = J(() => c(!1), []), {
472
+ isParticipantBlocked: b,
472
473
  isCheckingBlockedStatus: v,
473
- isLeaving: A,
474
- isUpdatingBlockStatus: E,
475
- handleLeaveConversation: I,
476
- handleBlockUser: P,
477
- handleUnblockUser: L,
478
- handleReportUser: _
479
- } = Gs({
474
+ isLeaving: M,
475
+ isUpdatingBlockStatus: T,
476
+ handleLeaveConversation: y,
477
+ handleBlockUser: O,
478
+ handleUnblockUser: P,
479
+ handleReportUser: L
480
+ } = js({
480
481
  channel: e,
481
482
  participant: t,
482
483
  showBlockParticipant: a,
483
484
  enabled: f,
484
485
  onLeaveConversation: i,
485
- onBlockParticipant: l,
486
- onDeleteConversationClick: o,
486
+ onBlockParticipant: o,
487
+ onDeleteConversationClick: l,
487
488
  onBlockParticipantClick: d,
488
489
  onReportParticipantClick: m,
489
490
  onActionComplete: w,
@@ -491,15 +492,15 @@ const ne = ({
491
492
  });
492
493
  return K(() => {
493
494
  if (!f) return;
494
- const R = (M) => {
495
- b.current && !b.current.contains(M.target) && c(!1);
496
- }, D = (M) => {
497
- M.key === "Escape" && c(!1);
495
+ const R = (D) => {
496
+ p.current && !p.current.contains(D.target) && c(!1);
497
+ }, A = (D) => {
498
+ D.key === "Escape" && c(!1);
498
499
  };
499
- return document.addEventListener("mousedown", R), document.addEventListener("keydown", D), () => {
500
- document.removeEventListener("mousedown", R), document.removeEventListener("keydown", D);
500
+ return document.addEventListener("mousedown", R), document.addEventListener("keydown", A), () => {
501
+ document.removeEventListener("mousedown", R), document.removeEventListener("keydown", A);
501
502
  };
502
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: p, className: "relative", children: [
503
504
  /* @__PURE__ */ h(
504
505
  "button",
505
506
  {
@@ -510,7 +511,7 @@ const ne = ({
510
511
  "aria-controls": f ? N : void 0,
511
512
  onClick: () => c((R) => !R),
512
513
  children: [
513
- /* @__PURE__ */ n(fs, { className: "size-5 text-black/90" }),
514
+ /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
514
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
515
516
  ]
516
517
  }
@@ -520,19 +521,19 @@ const ne = ({
520
521
  {
521
522
  id: N,
522
523
  "aria-label": "Conversation options",
523
- className: y(
524
+ className: _(
524
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
525
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
526
527
  ),
527
528
  children: /* @__PURE__ */ h("ul", { className: "flex flex-col gap-1", children: [
528
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
529
- be,
530
+ pe,
530
531
  {
531
- onClick: I,
532
- disabled: A,
533
- "aria-busy": A,
532
+ onClick: y,
533
+ disabled: M,
534
+ "aria-busy": M,
534
535
  children: [
535
- A ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
536
+ M ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
537
538
  ]
538
539
  }
@@ -540,34 +541,34 @@ const ne = ({
540
541
  a && /* @__PURE__ */ n("li", { children: v ? (
541
542
  // Block status not yet resolved — show a disabled placeholder
542
543
  // so a premature click can't act on a stale block state.
543
- /* @__PURE__ */ h(be, { disabled: !0, "aria-busy": !0, children: [
544
+ /* @__PURE__ */ h(pe, { disabled: !0, "aria-busy": !0, children: [
544
545
  /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }),
545
546
  /* @__PURE__ */ n("span", { children: "Block" })
546
547
  ] })
547
- ) : p ? /* @__PURE__ */ h(
548
- be,
548
+ ) : b ? /* @__PURE__ */ h(
549
+ pe,
549
550
  {
550
- onClick: L,
551
- disabled: E,
552
- "aria-busy": E,
551
+ onClick: P,
552
+ disabled: T,
553
+ "aria-busy": T,
553
554
  children: [
554
- E ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
555
+ T ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
555
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
556
557
  ]
557
558
  }
558
559
  ) : /* @__PURE__ */ h(
559
- be,
560
+ pe,
560
561
  {
561
- onClick: P,
562
- disabled: E,
563
- "aria-busy": E,
562
+ onClick: O,
563
+ disabled: T,
564
+ "aria-busy": T,
564
565
  children: [
565
- E ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(zt, { className: "h-5 w-5" }),
566
+ T ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Pt, { className: "h-5 w-5" }),
566
567
  /* @__PURE__ */ n("span", { children: "Block" })
567
568
  ]
568
569
  }
569
570
  ) }),
570
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(be, { variant: "danger", onClick: _, children: [
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(pe, { variant: "danger", onClick: L, children: [
571
572
  /* @__PURE__ */ n(Ht, { className: "h-5 w-5" }),
572
573
  /* @__PURE__ */ n("span", { children: "Report" })
573
574
  ] }) }),
@@ -576,13 +577,13 @@ const ne = ({
576
577
  }
577
578
  )
578
579
  ] });
579
- }, Hs = (e) => /* @__PURE__ */ n(Rn, { ...e, position: "center" }), Ye = "vote_up", qe = "vote_down";
580
- function Ys(e) {
580
+ }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ye = "vote_up", qe = "vote_down";
581
+ function Gs(e) {
581
582
  return e != null && e.length ? e.some((t) => t.type === qe) ? "down" : e.some((t) => t.type === Ye) ? "up" : null : null;
582
583
  }
583
- function qs(e) {
584
+ function Hs(e) {
584
585
  const { channel: t } = de(), { client: s } = Ke("useMessageVote"), a = re(
585
- () => Ys(e.own_reactions),
586
+ () => Gs(e.own_reactions),
586
587
  [e.own_reactions]
587
588
  ), r = J(async () => {
588
589
  if (s != null && s.userID)
@@ -607,7 +608,7 @@ function qs(e) {
607
608
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
608
609
  return { selected: a, voteUp: r, voteDown: i };
609
610
  }
610
- function Ws(e) {
611
+ function Ys(e) {
611
612
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
612
613
  }
613
614
  function Zt({
@@ -615,16 +616,16 @@ function Zt({
615
616
  viewerLanguage: t
616
617
  }) {
617
618
  var r;
618
- const s = e == null ? void 0 : e.text, a = Ws(t);
619
+ const s = e == null ? void 0 : e.text, a = Ys(t);
619
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
620
621
  }
621
- const Xs = j.lazy(() => import("./Card-BWWBaNKF.js")), Ks = j.lazy(() => import("./Card-BnGeMt4f.js")), Js = j.lazy(() => import("./Card-DkXzpFLA.js")), Ze = () => /* @__PURE__ */ n(
622
+ const qs = j.lazy(() => import("./Card-DS8zNUkL.js")), Ws = j.lazy(() => import("./Card-49AvU29H.js")), Xs = j.lazy(() => import("./Card-q0zqEbga.js")), Ze = () => /* @__PURE__ */ n(
622
623
  "div",
623
624
  {
624
625
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
625
626
  "aria-hidden": !0
626
627
  }
627
- ), Zs = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), en = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), Qs = Qt, ea = en, Bt = { Composer: Zs, Sent: Qt, Received: en, Creator: Qs, Visitor: ea }, ta = [
628
+ ), Ks = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), en = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Qt, Zs = en, Bt = { Composer: Ks, Sent: Qt, Received: en, Creator: Js, Visitor: Zs }, Qs = [
628
629
  [/pdf/, "pdf"],
629
630
  [/wordprocessingml|msword|\.doc/, "doc"],
630
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -638,96 +639,96 @@ function ie(e) {
638
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
639
640
  }
640
641
  function tn(e) {
641
- const t = ta.find(
642
+ const t = Qs.find(
642
643
  ([s]) => s.test(e)
643
644
  );
644
645
  return t ? t[1] : "generic";
645
646
  }
646
- const na = {
647
+ const ea = {
647
648
  video: qt,
648
649
  audio: ps,
649
- image: bs,
650
+ image: gs,
650
651
  document: Yt
651
- }, sa = {
652
- pdf: Cs,
653
- doc: ks,
654
- xls: ys,
655
- csv: _s,
656
- ppt: Ns,
657
- zip: ws,
658
- text: xs,
659
- markdown: vs,
652
+ }, ta = {
653
+ pdf: ks,
654
+ doc: ys,
655
+ xls: _s,
656
+ csv: Ns,
657
+ ppt: ws,
658
+ zip: xs,
659
+ text: vs,
660
+ markdown: bs,
660
661
  generic: Yt
661
662
  };
662
- function aa(e) {
663
+ function na(e) {
663
664
  const t = ie(e);
664
- return t !== "document" ? na[t] : sa[tn(e)];
665
+ return t !== "document" ? ea[t] : ta[tn(e)];
665
666
  }
666
667
  function ce(e, t) {
667
- return j.createElement(aa(e), t);
668
+ return j.createElement(na(e), t);
668
669
  }
669
- const ra = (e) => {
670
+ const sa = (e) => {
670
671
  var t, s;
671
672
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
672
- }, ia = ({
673
+ }, aa = ({
673
674
  source: e,
674
675
  mimeType: t,
675
676
  poster: s,
676
677
  autoPlay: a = !1,
677
678
  playing: r,
678
679
  loop: i = !1,
679
- controls: l = !0,
680
- showProgress: o = !1,
680
+ controls: o = !0,
681
+ showProgress: l = !1,
681
682
  muted: d = !1,
682
683
  onContainerClick: m
683
684
  }) => {
684
- const g = ie(t), u = Y(null), f = Y(null), c = Y(null), b = Y(r), [N, w] = $(a), [p, v] = $(0), [A, E] = $(!1), [I, P] = $(!1), [L, _] = $(!1), [z, R] = $(!1), [D, M] = $(!0), [S, k] = $(null), T = J(() => {
685
- _(!1), w(!0);
686
- }, []), O = J((x) => {
687
- const C = f.current;
688
- if (!C) return 0;
689
- const U = C.getBoundingClientRect();
685
+ const g = ie(t), u = Y(null), f = Y(null), c = Y(null), p = Y(r), [N, w] = F(a), [b, v] = F(0), [M, T] = F(!1), [y, O] = F(!1), [P, L] = F(!1), [E, R] = F(!1), [A, D] = F(!0), [k, C] = F(null), S = J(() => {
686
+ L(!1), w(!0);
687
+ }, []), $ = J((x) => {
688
+ const I = f.current;
689
+ if (!I) return 0;
690
+ const U = I.getBoundingClientRect();
690
691
  return Math.max(
691
692
  0,
692
- Math.min(1, (ra(x) - U.left) / U.width)
693
+ Math.min(1, (sa(x) - U.left) / U.width)
693
694
  );
694
- }, []), F = J((x) => {
695
- const C = u.current;
696
- C && C.duration && (C.currentTime = x * C.duration);
695
+ }, []), z = J((x) => {
696
+ const I = u.current;
697
+ I && I.duration && (I.currentTime = x * I.duration);
697
698
  }, []), V = (x) => {
698
- x.stopPropagation(), E(!0);
699
- const C = O(x);
700
- v(C), F(C);
699
+ x.stopPropagation(), T(!0);
700
+ const I = $(x);
701
+ v(I), z(I);
701
702
  };
702
703
  K(() => {
703
- r !== void 0 && r !== b.current && (b.current = r, w(r));
704
+ r !== void 0 && r !== p.current && (p.current = r, w(r));
704
705
  }, [r]), K(() => {
705
706
  if (!N) {
706
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
707
708
  return;
708
709
  }
709
710
  const x = () => {
710
- const C = u.current;
711
- C && C.duration && !A && v(C.currentTime / C.duration), c.current = requestAnimationFrame(x);
711
+ const I = u.current;
712
+ I && I.duration && !M && v(I.currentTime / I.duration), c.current = requestAnimationFrame(x);
712
713
  };
713
714
  return c.current = requestAnimationFrame(x), () => {
714
715
  c.current !== null && cancelAnimationFrame(c.current);
715
716
  };
716
- }, [N, A]), K(() => {
717
+ }, [N, M]), K(() => {
717
718
  const x = u.current;
718
- x && (N ? x.play().catch((C) => {
719
- w(!1), _(!0);
719
+ x && (N ? x.play().catch((I) => {
720
+ w(!1), L(!0);
720
721
  }) : x.pause());
721
722
  }, [N]), K(() => {
722
- if (!A) return;
723
- const x = (U) => v(O(U)), C = (U) => {
724
- E(!1), F(O(U));
723
+ if (!M) return;
724
+ const x = (U) => v($(U)), I = (U) => {
725
+ T(!1), z($(U));
725
726
  };
726
- return window.addEventListener("mousemove", x), window.addEventListener("mouseup", C), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", C), () => {
727
- window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", C);
727
+ return window.addEventListener("mousemove", x), window.addEventListener("mouseup", I), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", I), () => {
728
+ window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", I);
728
729
  };
729
- }, [A, O, F]);
730
- const ee = S ? { aspectRatio: String(S) } : void 0, Z = S ? "" : " aspect-video", G = Math.round(p * 100);
730
+ }, [M, $, z]);
731
+ const ee = k ? { aspectRatio: String(k) } : void 0, Z = k ? "" : " aspect-video", G = Math.round(b * 100);
731
732
  return /* @__PURE__ */ h(
732
733
  "div",
733
734
  {
@@ -740,7 +741,7 @@ const ra = (e) => {
740
741
  m(x);
741
742
  return;
742
743
  }
743
- L || l && w((C) => !C);
744
+ P || o && w((I) => !I);
744
745
  },
745
746
  onKeyDown: (x) => {
746
747
  if (!(x.key !== "Enter" && x.key !== " ")) {
@@ -748,11 +749,11 @@ const ra = (e) => {
748
749
  m(x);
749
750
  return;
750
751
  }
751
- L || l && w((C) => !C);
752
+ P || o && w((I) => !I);
752
753
  }
753
754
  },
754
755
  children: [
755
- s && (g === "audio" || D) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || A) && /* @__PURE__ */ n(
756
757
  "img",
757
758
  {
758
759
  src: s,
@@ -760,7 +761,7 @@ const ra = (e) => {
760
761
  className: "absolute inset-0 h-full w-full object-cover"
761
762
  }
762
763
  ),
763
- !s && (g === "audio" || D) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || A) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
765
  className: "size-12 text-black/20",
765
766
  weight: "regular"
766
767
  }) }),
@@ -774,10 +775,10 @@ const ra = (e) => {
774
775
  style: { width: "100%", height: "100%" },
775
776
  onLoadStart: () => R(!0),
776
777
  onCanPlay: () => {
777
- R(!1), M(!1);
778
+ R(!1), D(!1);
778
779
  },
779
780
  onWaiting: () => R(!0),
780
- onPlay: () => _(!1),
781
+ onPlay: () => L(!1),
781
782
  onEnded: () => {
782
783
  i || (w(!1), v(0));
783
784
  },
@@ -794,13 +795,13 @@ const ra = (e) => {
794
795
  style: { width: "100%", height: "100%" },
795
796
  onLoadStart: () => R(!0),
796
797
  onCanPlay: () => {
797
- R(!1), M(!1);
798
+ R(!1), D(!1);
798
799
  },
799
800
  onWaiting: () => R(!0),
800
- onPlay: () => _(!1),
801
+ onPlay: () => L(!1),
801
802
  onLoadedMetadata: () => {
802
803
  const x = u.current;
803
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && k(x.videoWidth / x.videoHeight);
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && C(x.videoWidth / x.videoHeight);
804
805
  },
805
806
  onEnded: () => {
806
807
  i || (w(!1), v(0));
@@ -808,14 +809,14 @@ const ra = (e) => {
808
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
809
810
  }
810
811
  ) }),
811
- z && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ E && !P && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
813
  we,
813
814
  {
814
815
  className: "size-8 animate-spin text-white/80",
815
816
  weight: "bold"
816
817
  }
817
818
  ) }),
818
- L && !l && /* @__PURE__ */ n(
819
+ P && !o && /* @__PURE__ */ n(
819
820
  "div",
820
821
  {
821
822
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -823,15 +824,15 @@ const ra = (e) => {
823
824
  tabIndex: 0,
824
825
  "aria-label": "Play preview",
825
826
  onClick: (x) => {
826
- x.stopPropagation(), T();
827
+ x.stopPropagation(), S();
827
828
  },
828
829
  onKeyDown: (x) => {
829
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), T());
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), S());
830
831
  },
831
832
  children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
832
833
  }
833
834
  ),
834
- o && !l && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
835
+ l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
835
836
  "div",
836
837
  {
837
838
  role: "slider",
@@ -846,7 +847,7 @@ const ra = (e) => {
846
847
  onTouchStart: V,
847
848
  onClick: (x) => x.stopPropagation(),
848
849
  onKeyDown: (x) => {
849
- x.key === "ArrowRight" && F(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
850
+ x.key === "ArrowRight" && z(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, b - 0.05));
850
851
  },
851
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
852
853
  "div",
@@ -857,17 +858,17 @@ const ra = (e) => {
857
858
  ) })
858
859
  }
859
860
  ) }),
860
- l && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
861
+ o && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
861
862
  /* @__PURE__ */ n(
862
863
  "button",
863
864
  {
864
865
  type: "button",
865
866
  onClick: (x) => {
866
- x.stopPropagation(), w((C) => !C);
867
+ x.stopPropagation(), w((I) => !I);
867
868
  },
868
869
  className: "shrink-0 text-white",
869
870
  "aria-label": N ? "Pause" : "Play",
870
- children: N ? /* @__PURE__ */ n(Es, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
871
+ children: N ? /* @__PURE__ */ n(Cs, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(He, { className: "size-5 translate-x-px", weight: "fill" })
871
872
  }
872
873
  ),
873
874
  /* @__PURE__ */ h(
@@ -884,16 +885,16 @@ const ra = (e) => {
884
885
  onMouseDown: V,
885
886
  onTouchStart: V,
886
887
  onClick: (x) => x.stopPropagation(),
887
- onMouseEnter: () => P(!0),
888
- onMouseLeave: () => P(!1),
888
+ onMouseEnter: () => O(!0),
889
+ onMouseLeave: () => O(!1),
889
890
  onKeyDown: (x) => {
890
- x.key === "ArrowRight" && F(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
891
+ x.key === "ArrowRight" && z(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, b - 0.05));
891
892
  },
892
893
  children: [
893
894
  /* @__PURE__ */ n(
894
895
  "div",
895
896
  {
896
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${I || A ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || M ? "h-1.5" : "h-1"}`,
897
898
  children: /* @__PURE__ */ n(
898
899
  "div",
899
900
  {
@@ -906,7 +907,7 @@ const ra = (e) => {
906
907
  /* @__PURE__ */ n(
907
908
  "div",
908
909
  {
909
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${I || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || M ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
910
911
  style: { left: `${G}%` }
911
912
  }
912
913
  )
@@ -917,18 +918,18 @@ const ra = (e) => {
917
918
  ]
918
919
  }
919
920
  );
920
- }, Ut = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", la = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", nn = ({
921
+ }, Ut = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", nn = ({
921
922
  mimeType: e,
922
923
  sourceUrl: t,
923
924
  thumbnailUrl: s,
924
925
  title: a,
925
926
  variant: r,
926
927
  mediaPlayerProps: i,
927
- containedImage: l = !1
928
+ containedImage: o = !1
928
929
  }) => {
929
- const o = ie(e), [d, m] = $(!1);
930
- return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
931
- ia,
930
+ const l = ie(e), [d, m] = F(!1);
931
+ return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
932
+ aa,
932
933
  {
933
934
  source: t,
934
935
  mimeType: e,
@@ -936,7 +937,7 @@ const ra = (e) => {
936
937
  controls: !0,
937
938
  ...i
938
939
  }
939
- ) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
940
+ ) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
940
941
  "img",
941
942
  {
942
943
  src: t,
@@ -953,7 +954,7 @@ const ra = (e) => {
953
954
  className: "block w-full",
954
955
  draggable: !1
955
956
  }
956
- ) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
957
+ ) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
957
958
  "img",
958
959
  {
959
960
  src: s,
@@ -979,7 +980,7 @@ const ra = (e) => {
979
980
  weight: "regular"
980
981
  })
981
982
  }
982
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${la(r)}`, children: /* @__PURE__ */ n(
983
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
983
984
  "img",
984
985
  {
985
986
  src: s,
@@ -1004,20 +1005,20 @@ const ra = (e) => {
1004
1005
  placeholderTitle: a = "Attachment title",
1005
1006
  mimeType: r,
1006
1007
  detail: i,
1007
- statusBadge: l,
1008
- action: o,
1008
+ statusBadge: o,
1009
+ action: l,
1009
1010
  topLeft: d,
1010
1011
  topRight: m,
1011
1012
  rootRef: g,
1012
1013
  "data-testid": u
1013
1014
  }) => {
1014
- const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
1015
1016
  return /* @__PURE__ */ h(
1016
1017
  "div",
1017
1018
  {
1018
1019
  ref: g,
1019
1020
  "data-testid": u,
1020
- className: y(
1021
+ className: _(
1021
1022
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1022
1023
  f ? "bg-[#121110]" : "bg-white"
1023
1024
  ),
@@ -1029,17 +1030,17 @@ const ra = (e) => {
1029
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1030
1031
  "p",
1031
1032
  {
1032
- className: y("mb-0.5 truncate text-base font-medium", {
1033
+ className: _("mb-0.5 truncate text-base font-medium", {
1033
1034
  "text-black": !f,
1034
- "text-white/30": f && b,
1035
- "text-white": f && !b
1035
+ "text-white/30": f && p,
1036
+ "text-white": f && !p
1036
1037
  }),
1037
1038
  children: c
1038
1039
  }
1039
1040
  ),
1040
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1041
1042
  ce(r, {
1042
- className: y(
1043
+ className: _(
1043
1044
  "size-5 shrink-0",
1044
1045
  f ? "text-white/55" : "text-black/55"
1045
1046
  ),
@@ -1048,16 +1049,16 @@ const ra = (e) => {
1048
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1049
1050
  "span",
1050
1051
  {
1051
- className: y(
1052
+ className: _(
1052
1053
  "text-xs font-medium",
1053
1054
  f ? "text-white/55" : "text-black/55"
1054
1055
  ),
1055
1056
  children: i
1056
1057
  }
1057
1058
  ),
1058
- l
1059
+ o
1059
1060
  ] }),
1060
- o
1061
+ l
1061
1062
  ] })
1062
1063
  ]
1063
1064
  }
@@ -1069,23 +1070,23 @@ function an(e) {
1069
1070
  function Qe(e) {
1070
1071
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1071
1072
  }
1072
- function oa(e) {
1073
+ function ia(e) {
1073
1074
  return e ? "bg-white/10" : "bg-black/5";
1074
1075
  }
1075
- function ca(e) {
1076
+ function la(e) {
1076
1077
  return e ? "text-white" : "text-black";
1077
1078
  }
1078
- function da(e) {
1079
+ function oa(e) {
1079
1080
  return e ? "text-white/55" : "text-black/55";
1080
1081
  }
1081
- function ua(e) {
1082
+ function ca(e) {
1082
1083
  return e ? "text-white/40" : "text-black/40";
1083
1084
  }
1084
- function ma(e) {
1085
+ function da(e) {
1085
1086
  return e ? "text-white/20" : "text-black/20";
1086
1087
  }
1087
1088
  const et = ({ attachment: e, isMyMessage: t }) => {
1088
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
1089
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
1089
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1090
1091
  "img",
1091
1092
  {
@@ -1096,14 +1097,14 @@ const et = ({ attachment: e, isMyMessage: t }) => {
1096
1097
  ) : /* @__PURE__ */ n(
1097
1098
  "div",
1098
1099
  {
1099
- className: `aspect-video w-full rounded-[20px] ${oa(t)} flex items-center justify-center`,
1100
- children: /* @__PURE__ */ n(Is, { className: `size-12 ${ma(t)}` })
1100
+ className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1101
+ children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
1101
1102
  }
1102
1103
  ) }),
1103
1104
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1104
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ca(t)}`, children: s }),
1105
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${da(t)}`, children: a }),
1106
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ua(t)}`, children: d })
1105
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${la(t)}`, children: s }),
1106
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
1107
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1107
1108
  ] })
1108
1109
  ] });
1109
1110
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
@@ -1115,7 +1116,7 @@ function tt(e) {
1115
1116
  var t;
1116
1117
  return (t = e.attachments) == null ? void 0 : t.find(rn);
1117
1118
  }
1118
- async function ha(e, t) {
1119
+ async function ua(e, t) {
1119
1120
  let s;
1120
1121
  try {
1121
1122
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1124,25 +1125,25 @@ async function ha(e, t) {
1124
1125
  }
1125
1126
  const a = await fetch(e, { mode: "cors" });
1126
1127
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
1127
- const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1128
- l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1128
+ const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1129
+ o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1129
1130
  }
1130
- const fa = ({
1131
+ const ma = ({
1131
1132
  url: e,
1132
1133
  filename: t
1133
1134
  }) => {
1134
- const [s, a] = $(!1);
1135
+ const [s, a] = F(!1);
1135
1136
  return /* @__PURE__ */ n(
1136
1137
  "button",
1137
1138
  {
1138
1139
  type: "button",
1139
1140
  onClick: (i) => {
1140
1141
  i.stopPropagation();
1141
- const l = window.open("", "_blank", "noopener,noreferrer");
1142
- a(!0), ha(e, t).then(() => {
1143
- l == null || l.close();
1142
+ const o = window.open("", "_blank", "noopener,noreferrer");
1143
+ a(!0), ua(e, t).then(() => {
1144
+ o == null || o.close();
1144
1145
  }).catch(() => {
1145
- l && (l.location.href = e);
1146
+ o && (o.location.href = e);
1146
1147
  }).finally(() => a(!1));
1147
1148
  },
1148
1149
  disabled: s,
@@ -1155,21 +1156,21 @@ const fa = ({
1155
1156
  );
1156
1157
  };
1157
1158
  function nt(e) {
1158
- var u, f, c, b;
1159
+ var u, f, c, p;
1159
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1160
1161
  (N) => N.type === "video" && N.asset_url
1161
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1162
1163
  (N) => N.type === "image" && N.image_url
1163
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1164
1165
  (N) => N.type === "audio" && N.asset_url
1165
- ), r = (b = e.attachments) == null ? void 0 : b.find(
1166
+ ), r = (p = e.attachments) == null ? void 0 : p.find(
1166
1167
  (N) => N.type === "file" && N.asset_url
1167
- ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1168
- if (!l) return null;
1169
- const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1168
+ ), i = t ?? s ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
+ if (!o) return null;
1170
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1170
1171
  return {
1171
- resolvedUrl: l,
1172
- resolvedType: o,
1172
+ resolvedUrl: o,
1173
+ resolvedType: l,
1173
1174
  title: d,
1174
1175
  fileSize: m,
1175
1176
  thumbnailUrl: g
@@ -1210,14 +1211,14 @@ const ln = ({
1210
1211
  fileSize: a,
1211
1212
  thumbnailUrl: r
1212
1213
  }) => {
1213
- const i = ie(t), l = a !== void 0 ? an(a) : void 0;
1214
+ const i = ie(t), o = a !== void 0 ? an(a) : void 0;
1214
1215
  return /* @__PURE__ */ n(
1215
1216
  sn,
1216
1217
  {
1217
1218
  variant: "light",
1218
1219
  title: s,
1219
1220
  mimeType: t,
1220
- detail: l,
1221
+ detail: o,
1221
1222
  thumbnail: /* @__PURE__ */ n(
1222
1223
  nn,
1223
1224
  {
@@ -1229,10 +1230,10 @@ const ln = ({
1229
1230
  containedImage: i === "image" || i === "document"
1230
1231
  }
1231
1232
  ),
1232
- action: /* @__PURE__ */ n(fa, { url: e, filename: s })
1233
+ action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1233
1234
  }
1234
1235
  );
1235
- }, ga = ({
1236
+ }, ha = ({
1236
1237
  message: e,
1237
1238
  isMyMessage: t = !1
1238
1239
  }) => {
@@ -1263,7 +1264,7 @@ const ln = ({
1263
1264
  }
1264
1265
  )
1265
1266
  ] });
1266
- }, ba = ({
1267
+ }, fa = ({
1267
1268
  message: e
1268
1269
  }) => {
1269
1270
  const t = tt(e);
@@ -1271,7 +1272,7 @@ const ln = ({
1271
1272
  return /* @__PURE__ */ n("div", { className: Qe(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !0 }) });
1272
1273
  const s = nt(e);
1273
1274
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ln, { ...s }) }) : null;
1274
- }, pa = ({
1275
+ }, ga = ({
1275
1276
  message: e
1276
1277
  }) => {
1277
1278
  const t = tt(e);
@@ -1279,18 +1280,18 @@ const ln = ({
1279
1280
  return /* @__PURE__ */ n("div", { className: Qe(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !1 }) });
1280
1281
  const s = nt(e);
1281
1282
  return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(on, { ...s }) }) : null;
1282
- }, Ci = Object.assign(ga, {
1283
- Creator: ba,
1284
- Visitor: pa
1285
- }), va = {
1283
+ }, yi = Object.assign(ha, {
1284
+ Creator: fa,
1285
+ Visitor: ga
1286
+ }), pa = {
1286
1287
  isUnlocking: () => !1
1287
- }, xa = {
1288
- LockedAttachment: va
1289
- }, cn = We({}), Ei = cn.Provider;
1290
- function wa(e) {
1291
- return _e(cn)[e] ?? xa[e];
1288
+ }, ba = {
1289
+ LockedAttachment: pa
1290
+ }, cn = We({}), ki = cn.Provider;
1291
+ function va(e) {
1292
+ return _e(cn)[e] ?? ba[e];
1292
1293
  }
1293
- const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1294
+ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1294
1295
  "svg",
1295
1296
  {
1296
1297
  width: e,
@@ -1307,53 +1308,53 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1307
1308
  }
1308
1309
  )
1309
1310
  }
1310
- ), _a = (e) => {
1311
+ ), wa = (e) => {
1311
1312
  var t;
1312
1313
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1313
- }, ya = (e) => {
1314
+ }, Na = (e) => {
1314
1315
  var t;
1315
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1316
- }, Re = (e) => {
1317
+ }, Me = (e) => {
1317
1318
  var t;
1318
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1319
- }, ka = (e) => {
1320
+ }, _a = (e) => {
1320
1321
  var t;
1321
1322
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1322
- }, dn = (e) => _a(e) || ya(e), Ca = (e) => {
1323
+ }, dn = (e) => wa(e) || Na(e), ya = (e) => {
1323
1324
  var t;
1324
1325
  return dn(e) && !((t = e.text) != null && t.trim());
1325
- }, Ue = ({
1326
+ }, Be = ({
1326
1327
  message: e,
1327
1328
  standalone: t = !1,
1328
1329
  isMyMessage: s = !1,
1329
1330
  hasAttachment: a = !1
1330
1331
  }) => {
1331
1332
  var u;
1332
- const r = dn(e), i = Re(e);
1333
+ const r = dn(e), i = Me(e);
1333
1334
  if (!r && !i)
1334
1335
  return null;
1335
1336
  if (r) {
1336
1337
  const f = (u = e.metadata) == null ? void 0 : u.amount_text;
1337
1338
  if (!f) return null;
1338
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1340
- /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1341
- /* @__PURE__ */ n("span", { children: b })
1341
+ /* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
1342
+ /* @__PURE__ */ n("span", { children: p })
1342
1343
  ] });
1343
1344
  }
1344
- const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
1345
+ const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1345
1346
  "message-chatbot-indicator",
1346
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1347
- l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1348
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Na, { size: l ? 12 : 15 }) });
1349
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(se, { children: [
1348
+ o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1350
1351
  m,
1351
1352
  g
1352
1353
  ] }) : /* @__PURE__ */ h(se, { children: [
1353
1354
  g,
1354
1355
  m
1355
1356
  ] }) });
1356
- }, Ea = ({
1357
+ }, ka = ({
1357
1358
  selected: e,
1358
1359
  onVoteUp: t,
1359
1360
  onVoteDown: s
@@ -1362,83 +1363,83 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1362
1363
  "button",
1363
1364
  {
1364
1365
  type: "button",
1365
- className: y("message-vote-button focus-ring", {
1366
+ className: _("message-vote-button focus-ring", {
1366
1367
  "message-vote-button--selected": e === "up"
1367
1368
  }),
1368
1369
  onClick: t,
1369
1370
  "aria-label": "Good response",
1370
1371
  "aria-pressed": e === "up",
1371
1372
  "data-tooltip": "Good response",
1372
- children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "up" ? "fill" : "regular" })
1373
+ children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "up" ? "fill" : "regular" })
1373
1374
  }
1374
1375
  ),
1375
1376
  /* @__PURE__ */ n(
1376
1377
  "button",
1377
1378
  {
1378
1379
  type: "button",
1379
- className: y("message-vote-button focus-ring", {
1380
+ className: _("message-vote-button focus-ring", {
1380
1381
  "message-vote-button--selected": e === "down"
1381
1382
  }),
1382
1383
  onClick: s,
1383
1384
  "aria-label": "Bad response",
1384
1385
  "aria-pressed": e === "down",
1385
1386
  "data-tooltip": "Bad response",
1386
- children: /* @__PURE__ */ n(As, { size: 16, weight: e === "down" ? "fill" : "regular" })
1387
+ children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
1387
1388
  }
1388
1389
  )
1389
- ] }), Ia = (e) => {
1390
- var pt, vt, xt, wt, Nt, _t, yt, kt, Ct, Et, It, St, Tt, At;
1390
+ ] }), Ca = (e) => {
1391
+ var bt, vt, xt, wt, Nt, _t, yt, kt, Ct, Et, It, St, Tt, At;
1391
1392
  const {
1392
1393
  additionalMessageInputProps: t,
1393
1394
  chatbotVotingEnabled: s,
1394
1395
  editing: a,
1395
1396
  endOfGroup: r,
1396
1397
  firstOfGroup: i,
1397
- groupedByUser: l,
1398
- handleAction: o,
1398
+ groupedByUser: o,
1399
+ handleAction: l,
1399
1400
  handleOpenThread: d,
1400
1401
  handleRetry: m,
1401
1402
  highlighted: g,
1402
1403
  isMessageAIGenerated: u,
1403
1404
  isMyMessage: f,
1404
1405
  message: c,
1405
- renderText: b,
1406
+ renderText: p,
1406
1407
  threadList: N,
1407
1408
  viewerLanguage: w
1408
- } = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: E, onFetchSource: I, onDownloadClick: P } = wa("LockedAttachment"), [L, _] = $(!1), z = Dn(c.id), { selected: R, voteUp: D, voteDown: M } = qs(c), {
1409
- Attachment: S = zn,
1410
- EditMessageModal: k = Pn,
1411
- MessageActions: T,
1412
- MessageBlocked: O = On,
1413
- MessageBouncePrompt: F = $n,
1414
- MessageDeleted: V = Fn,
1415
- MessageIsThreadReplyInChannelButtonIndicator: ee = Bn,
1416
- MessageRepliesCountButton: Z = Un,
1417
- ReminderNotification: G = jn,
1418
- StreamedMessageText: x = Vn,
1419
- PinIndicator: C
1420
- } = Gt("CustomMessage"), U = Gn(c), H = Hn(c), q = re(
1409
+ } = e, { client: b } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: T, onFetchSource: y, onDownloadClick: O } = va("LockedAttachment"), [P, L] = F(!1), E = Ln(c.id), { selected: R, voteUp: A, voteDown: D } = Hs(c), {
1410
+ Attachment: k = Dn,
1411
+ EditMessageModal: C = Pn,
1412
+ MessageActions: S,
1413
+ MessageBlocked: $ = zn,
1414
+ MessageBouncePrompt: z = On,
1415
+ MessageDeleted: V = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: ee = Fn,
1417
+ MessageRepliesCountButton: Z = Bn,
1418
+ ReminderNotification: G = Un,
1419
+ StreamedMessageText: x = jn,
1420
+ PinIndicator: I
1421
+ } = Gt("CustomMessage"), U = Vn(c), H = Gn(c), q = re(
1421
1422
  () => u == null ? void 0 : u(c),
1422
1423
  [u, c]
1423
1424
  ), B = re(() => {
1424
1425
  const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1425
- if (!Re(c)) return Se;
1426
+ if (!Me(c)) return Se;
1426
1427
  const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
1427
1428
  return Mt.length === Se.length ? Se : Mt;
1428
1429
  }, [c]), W = re(() => {
1429
1430
  const ge = Zt({ message: c, viewerLanguage: w });
1430
1431
  return ge === c.text ? c : { ...c, text: ge };
1431
1432
  }, [c, w]);
1432
- if (Yn(c))
1433
+ if (Hn(c))
1433
1434
  return null;
1434
1435
  if (c.deleted_at || c.type === "deleted")
1435
1436
  return /* @__PURE__ */ n(V, { message: c });
1436
- if (qn(c))
1437
- return /* @__PURE__ */ n(O, {});
1438
- const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((pt = c.error) == null ? void 0 : pt.status) !== 403, he = Wn(c);
1437
+ if (Yn(c))
1438
+ return /* @__PURE__ */ n($, {});
1439
+ const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
1439
1440
  let Q;
1440
- me ? Q = () => m(c) : he && (Q = () => _(!0));
1441
- const te = f(), le = y(
1441
+ me ? Q = () => m(c) : he && (Q = () => L(!0));
1442
+ const te = f(), le = _(
1442
1443
  "str-chat__message str-chat__message-simple",
1443
1444
  `str-chat__message--${c.type}`,
1444
1445
  `str-chat__message--${c.status}`,
@@ -1453,22 +1454,22 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1453
1454
  "str-chat__message-with-thread-link": X || ue,
1454
1455
  "str-chat__virtual-message__wrapper--end": r,
1455
1456
  "str-chat__virtual-message__wrapper--first": i,
1456
- "str-chat__virtual-message__wrapper--group": l
1457
+ "str-chat__virtual-message__wrapper--group": o
1457
1458
  }
1458
- ), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = Ca(c), fe = Re(c), gt = ka(c), $e = !!(B != null && B.length && !c.quoted_message), bt = fe && te && $e;
1459
+ ), ht = c.poll_id && b.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(B != null && B.length && !c.quoted_message), pt = fe && te && Oe;
1459
1460
  return /* @__PURE__ */ h(se, { children: [
1460
1461
  a && /* @__PURE__ */ n(
1461
- k,
1462
+ C,
1462
1463
  {
1463
1464
  additionalMessageInputProps: t
1464
1465
  }
1465
1466
  ),
1466
- L && /* @__PURE__ */ n(
1467
- Xn,
1467
+ P && /* @__PURE__ */ n(
1468
+ Wn,
1468
1469
  {
1469
- MessageBouncePrompt: F,
1470
- onClose: () => _(!1),
1471
- open: L
1470
+ MessageBouncePrompt: z,
1471
+ onClose: () => L(!1),
1472
+ open: P
1472
1473
  }
1473
1474
  ),
1474
1475
  /* @__PURE__ */ h(
@@ -1478,8 +1479,8 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1479
  "data-message-id": c.id,
1479
1480
  "data-dd-privacy": "mask",
1480
1481
  children: [
1481
- C && /* @__PURE__ */ n(C, {}),
1482
- !!z && /* @__PURE__ */ n(G, { reminder: z }),
1482
+ I && /* @__PURE__ */ n(I, {}),
1483
+ !!E && /* @__PURE__ */ n(G, { reminder: E }),
1483
1484
  c.user && /* @__PURE__ */ n(
1484
1485
  ne,
1485
1486
  {
@@ -1495,7 +1496,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1495
1496
  /* @__PURE__ */ n(
1496
1497
  "div",
1497
1498
  {
1498
- className: y("str-chat__message-inner", {
1499
+ className: _("str-chat__message-inner", {
1499
1500
  "str-chat__simple-message--error-failed": me || he
1500
1501
  }),
1501
1502
  "data-testid": "message-inner",
@@ -1511,7 +1512,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1511
1512
  },
1512
1513
  children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
1514
  te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- T && /* @__PURE__ */ n(T, {}),
1515
+ S && /* @__PURE__ */ n(S, {}),
1515
1516
  /* @__PURE__ */ n(
1516
1517
  Bt.Sent,
1517
1518
  {
@@ -1521,8 +1522,8 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1521
1522
  amountText: (_t = c.metadata) == null ? void 0 : _t.amount_text,
1522
1523
  detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1523
1524
  paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
1524
- onPreviewClick: () => E == null ? void 0 : E(c, v),
1525
- onFetchSource: async () => await (I == null ? void 0 : I(c, v))
1525
+ onPreviewClick: () => T == null ? void 0 : T(c, v),
1526
+ onFetchSource: async () => await (y == null ? void 0 : y(c, v))
1526
1527
  }
1527
1528
  )
1528
1529
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1535,38 +1536,38 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1535
1536
  amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1536
1537
  detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1537
1538
  paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1538
- isUnlocking: A(c.id),
1539
- onUnlockClick: () => E == null ? void 0 : E(c, v),
1540
- onFetchSource: async () => await (I == null ? void 0 : I(c, v)),
1541
- onDownloadClick: () => P == null ? void 0 : P(c, v)
1539
+ isUnlocking: M(c.id),
1540
+ onUnlockClick: () => T == null ? void 0 : T(c, v),
1541
+ onFetchSource: async () => await (y == null ? void 0 : y(c, v)),
1542
+ onDownloadClick: () => O == null ? void 0 : O(c, v)
1542
1543
  }
1543
1544
  ),
1544
- T && /* @__PURE__ */ n(T, {})
1545
+ S && /* @__PURE__ */ n(S, {})
1545
1546
  ] }),
1546
1547
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1548
  Dt,
1548
1549
  {
1549
1550
  message: W,
1550
- renderText: b
1551
+ renderText: p
1551
1552
  }
1552
1553
  ) })
1553
1554
  ] }) : ft ? (
1554
1555
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(Ue, { message: c, standalone: !0 })
1556
+ /* @__PURE__ */ n(Be, { message: c, standalone: !0 })
1556
1557
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1557
- fe && !bt && /* @__PURE__ */ n(
1558
- Ue,
1558
+ fe && !pt && /* @__PURE__ */ n(
1559
+ Be,
1559
1560
  {
1560
1561
  message: c,
1561
- hasAttachment: $e,
1562
+ hasAttachment: Oe,
1562
1563
  isMyMessage: te
1563
1564
  }
1564
1565
  ),
1565
- ht && /* @__PURE__ */ n(Kn, { poll: ht }),
1566
+ ht && /* @__PURE__ */ n(Xn, { poll: ht }),
1566
1567
  B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- S,
1568
+ k,
1568
1569
  {
1569
- actionHandler: o,
1570
+ actionHandler: l,
1570
1571
  attachments: B
1571
1572
  }
1572
1573
  ) : null,
@@ -1574,34 +1575,34 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1574
1575
  x,
1575
1576
  {
1576
1577
  message: W,
1577
- renderText: b
1578
+ renderText: p
1578
1579
  }
1579
1580
  ) : /* @__PURE__ */ n(
1580
1581
  Dt,
1581
1582
  {
1582
1583
  message: W,
1583
- renderText: b
1584
+ renderText: p
1584
1585
  }
1585
1586
  ),
1586
- /* @__PURE__ */ n(Jn, {})
1587
+ /* @__PURE__ */ n(Kn, {})
1587
1588
  ] }) })
1588
1589
  }
1589
1590
  ),
1590
1591
  !gt && !ft && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
- (!fe || bt) && /* @__PURE__ */ n(
1592
- Ue,
1592
+ (!fe || pt) && /* @__PURE__ */ n(
1593
+ Be,
1593
1594
  {
1594
1595
  message: c,
1595
- hasAttachment: $e,
1596
+ hasAttachment: Oe,
1596
1597
  isMyMessage: te
1597
1598
  }
1598
1599
  ),
1599
1600
  s && fe && /* @__PURE__ */ n(
1600
- Ea,
1601
+ ka,
1601
1602
  {
1602
1603
  selected: R,
1603
- onVoteUp: D,
1604
- onVoteDown: M
1604
+ onVoteUp: A,
1605
+ onVoteDown: D
1605
1606
  }
1606
1607
  )
1607
1608
  ] }),
@@ -1618,13 +1619,13 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1618
1619
  c.id
1619
1620
  )
1620
1621
  ] });
1621
- }, Sa = j.memo(
1622
- Ia,
1623
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ln(e, t)
1624
- ), Ta = (e) => {
1622
+ }, Ea = j.memo(
1623
+ Ca,
1624
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1625
+ ), Ia = (e) => {
1625
1626
  const t = ye("CustomMessage");
1626
- return /* @__PURE__ */ n(Sa, { ...t, ...e });
1627
- }, Aa = () => {
1627
+ return /* @__PURE__ */ n(Ea, { ...t, ...e });
1628
+ }, Sa = () => {
1628
1629
  var s;
1629
1630
  const { handleDelete: e, message: t } = ye("CustomMessageActions");
1630
1631
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
@@ -1634,10 +1635,10 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1634
1635
  "aria-label": "Delete",
1635
1636
  title: "Delete",
1636
1637
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1637
- children: /* @__PURE__ */ n(Ms, { size: 16, weight: "light", "aria-hidden": !0 })
1638
+ children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
1638
1639
  }
1639
1640
  );
1640
- }, Ma = () => {
1641
+ }, Ta = () => {
1641
1642
  const { handleFlag: e } = ye("CustomMessageActions");
1642
1643
  return /* @__PURE__ */ n(
1643
1644
  Wt,
@@ -1649,19 +1650,19 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1649
1650
  children: /* @__PURE__ */ n(Ht, { size: 16, weight: "light", "aria-hidden": !0 })
1650
1651
  }
1651
1652
  );
1652
- }, Ra = () => {
1653
+ }, Aa = () => {
1653
1654
  var t;
1654
1655
  const { message: e } = ye("CustomMessageActions");
1655
1656
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
- Os,
1657
+ Ps,
1657
1658
  {
1658
1659
  messageActionSet: [
1659
- { Component: Aa, placement: "quick", type: "delete" },
1660
- { Component: Ma, placement: "quick", type: "flag" }
1660
+ { Component: Sa, placement: "quick", type: "delete" },
1661
+ { Component: Ta, placement: "quick", type: "flag" }
1661
1662
  ]
1662
1663
  }
1663
1664
  );
1664
- }, La = ({
1665
+ }, Ma = ({
1665
1666
  link: e,
1666
1667
  onDismiss: t
1667
1668
  }) => {
@@ -1686,8 +1687,8 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1686
1687
  "button",
1687
1688
  {
1688
1689
  type: "button",
1689
- onClick: (l) => {
1690
- l.preventDefault(), t(s);
1690
+ onClick: (o) => {
1691
+ o.preventDefault(), t(s);
1691
1692
  },
1692
1693
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1693
1694
  "aria-label": "Close link preview",
@@ -1701,26 +1702,26 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1701
1702
  ]
1702
1703
  }
1703
1704
  );
1704
- }, Da = (e) => ({
1705
+ }, Ra = (e) => ({
1705
1706
  linkPreviews: Array.from(e.previews.values()).filter(
1706
1707
  (t) => Lt.previewIsLoaded(t) || Lt.previewIsLoading(t)
1707
1708
  )
1708
- }), za = () => {
1709
- const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Qn(
1709
+ }), La = () => {
1710
+ const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
1710
1711
  e.state,
1711
- Da
1712
+ Ra
1712
1713
  ), s = (r) => {
1713
1714
  e.dismissPreview(r);
1714
1715
  };
1715
1716
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1716
- La,
1717
+ Ma,
1717
1718
  {
1718
1719
  link: r,
1719
1720
  onDismiss: s
1720
1721
  },
1721
1722
  r.og_scrape_url
1722
1723
  )) }) : null;
1723
- }, st = j.createContext(!1), Ii = () => _e(st), Pa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
+ }, st = j.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1725
  "button",
1725
1726
  {
1726
1727
  ...s,
@@ -1728,12 +1729,12 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1728
1729
  "aria-label": "Send",
1729
1730
  disabled: t,
1730
1731
  onClick: e,
1731
- children: /* @__PURE__ */ n(Rs, { weight: "bold", className: "size-4" })
1732
+ children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1732
1733
  }
1733
- ), Oa = () => {
1734
- const e = _e(st), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1735
- SendButton: r = Pa,
1736
- AttachmentPreviewList: i = ss
1734
+ ), Pa = () => {
1735
+ const e = _e(st), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1736
+ SendButton: r = Da,
1737
+ AttachmentPreviewList: i = ns
1737
1738
  } = Gt("CustomMessageInput");
1738
1739
  return /* @__PURE__ */ h(
1739
1740
  "div",
@@ -1741,12 +1742,12 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1741
1742
  className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
1742
1743
  "data-dd-privacy": "mask",
1743
1744
  children: [
1744
- /* @__PURE__ */ n(as, {}),
1745
- /* @__PURE__ */ n(za, {}),
1745
+ /* @__PURE__ */ n(ss, {}),
1746
+ /* @__PURE__ */ n(La, {}),
1746
1747
  /* @__PURE__ */ n(i, {}),
1747
1748
  /* @__PURE__ */ h("div", { className: "flex", children: [
1748
1749
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1749
- rs,
1750
+ as,
1750
1751
  {
1751
1752
  "aria-disabled": e || void 0,
1752
1753
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1771,15 +1772,15 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1771
1772
  ]
1772
1773
  }
1773
1774
  );
1774
- }, $a = ({
1775
+ }, za = ({
1775
1776
  renderActions: e,
1776
1777
  renderFooter: t,
1777
1778
  disabled: s = !1,
1778
1779
  disabledReason: a,
1779
1780
  composerInput: r
1780
1781
  }) => {
1781
- var o;
1782
- const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1782
+ var l;
1783
+ const { channel: i } = de(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
1783
1784
  return s ? /* @__PURE__ */ h(se, { children: [
1784
1785
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1785
1786
  t == null ? void 0 : t()
@@ -1787,28 +1788,28 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1787
1788
  /* @__PURE__ */ h(
1788
1789
  "div",
1789
1790
  {
1790
- inert: l ? "" : void 0,
1791
- "aria-disabled": l || void 0,
1791
+ inert: o ? "" : void 0,
1792
+ "aria-disabled": o || void 0,
1792
1793
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1793
1794
  children: [
1794
1795
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1795
- /* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(es, { Input: r ?? Oa }) })
1796
+ /* @__PURE__ */ n(st.Provider, { value: o, children: /* @__PURE__ */ n(Qn, { Input: r ?? Pa }) })
1796
1797
  ]
1797
1798
  }
1798
1799
  ),
1799
1800
  t == null ? void 0 : t()
1800
1801
  ] });
1801
- }, Fa = [
1802
+ }, Oa = [
1802
1803
  "SYSTEM_DM_AGENT_PAUSED",
1803
1804
  "SYSTEM_DM_AGENT_RESUMED"
1804
- ], Ba = {
1805
+ ], $a = {
1805
1806
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1806
1807
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1807
- }, Ua = [
1808
+ }, Fa = [
1808
1809
  "SYSTEM_AGE_SAFETY_BLOCKED"
1809
- ], ja = {
1810
+ ], Ba = {
1810
1811
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1811
- }, je = "age safety guidelines.", Va = "https://linktr.ee/s/about/contact", jt = (e) => Fa.includes(e), Ga = (e) => Ua.includes(e), Ha = (e) => {
1812
+ }, Ue = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", jt = (e) => Oa.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1812
1813
  var a;
1813
1814
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1814
1815
  if (jt(t))
@@ -1816,7 +1817,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1816
1817
  kind: "dm-agent",
1817
1818
  type: t
1818
1819
  };
1819
- if (Ga(t))
1820
+ if (ja(t))
1820
1821
  return {
1821
1822
  kind: "age-safety",
1822
1823
  type: t
@@ -1827,32 +1828,32 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1827
1828
  kind: "dm-agent",
1828
1829
  type: s
1829
1830
  };
1830
- }, Ya = (e) => {
1831
- const t = e.indexOf(je);
1831
+ }, Ga = (e) => {
1832
+ const t = e.indexOf(Ue);
1832
1833
  if (t === -1)
1833
1834
  return e;
1834
- const s = t + je.length;
1835
+ const s = t + Ue.length;
1835
1836
  return /* @__PURE__ */ h(se, { children: [
1836
1837
  e.slice(0, t),
1837
1838
  /* @__PURE__ */ n(
1838
1839
  "a",
1839
1840
  {
1840
- href: Va,
1841
+ href: Ua,
1841
1842
  target: "_blank",
1842
1843
  rel: "noopener noreferrer",
1843
1844
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1844
- children: je
1845
+ children: Ue
1845
1846
  }
1846
1847
  ),
1847
1848
  e.slice(s)
1848
1849
  ] });
1849
- }, qa = (e) => {
1850
+ }, Ha = (e) => {
1850
1851
  var a, r;
1851
- const t = e.message.hide_date === !0, s = Ha(
1852
+ const t = e.message.hide_date === !0, s = Va(
1852
1853
  e.message
1853
1854
  );
1854
1855
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1855
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ba[s.type];
1856
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
1856
1857
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1857
1858
  /* @__PURE__ */ h(
1858
1859
  "div",
@@ -1862,7 +1863,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1862
1863
  "data-dm-agent-system-type": s.type,
1863
1864
  children: [
1864
1865
  /* @__PURE__ */ n(
1865
- pe,
1866
+ be,
1866
1867
  {
1867
1868
  size: 16,
1868
1869
  weight: "regular",
@@ -1874,11 +1875,11 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1874
1875
  ]
1875
1876
  }
1876
1877
  ),
1877
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1878
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1878
1879
  ] });
1879
1880
  }
1880
1881
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1881
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ja[s.type];
1882
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
1882
1883
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1883
1884
  /* @__PURE__ */ h(
1884
1885
  "div",
@@ -1888,7 +1889,7 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1888
1889
  "data-age-safety-system-type": s.type,
1889
1890
  children: [
1890
1891
  /* @__PURE__ */ n(
1891
- Ls,
1892
+ Rs,
1892
1893
  {
1893
1894
  size: 24,
1894
1895
  weight: "duotone",
@@ -1897,11 +1898,11 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1897
1898
  "data-testid": "age-safety-system-message-icon"
1898
1899
  }
1899
1900
  ),
1900
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ya(i) }) })
1901
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
1901
1902
  ]
1902
1903
  }
1903
1904
  ),
1904
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1905
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1905
1906
  ] });
1906
1907
  }
1907
1908
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1910,9 +1911,9 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1910
1911
  /* @__PURE__ */ n("p", { children: e.message.text }),
1911
1912
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1912
1913
  ] }),
1913
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1914
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1914
1915
  ] });
1915
- }, un = We(!1), Ve = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1916
+ }, un = We(!1), je = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1916
1917
  "animateTransform",
1917
1918
  {
1918
1919
  attributeName: "transform",
@@ -1922,15 +1923,15 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1922
1923
  begin: `${120 * t}ms`,
1923
1924
  repeatCount: "indefinite"
1924
1925
  }
1925
- ) }), Wa = /* @__PURE__ */ new Set([
1926
- Be.Thinking,
1927
- Be.Generating,
1928
- Be.ExternalSources
1929
- ]), Xa = ({ threadList: e }) => {
1930
- var b, N;
1931
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = is(), { aiState: l } = ls(t), o = _e(un);
1932
- if (!e && o && Wa.has(l)) {
1933
- const w = Ka(t, (b = r.user) == null ? void 0 : b.id);
1926
+ ) }), Ya = /* @__PURE__ */ new Set([
1927
+ Fe.Thinking,
1928
+ Fe.Generating,
1929
+ Fe.ExternalSources
1930
+ ]), qa = ({ threadList: e }) => {
1931
+ var p, N;
1932
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = _e(un);
1933
+ if (!e && l && Ya.has(o)) {
1934
+ const w = Wa(t, (p = r.user) == null ? void 0 : p.id);
1934
1935
  return /* @__PURE__ */ n(
1935
1936
  Vt,
1936
1937
  {
@@ -1944,14 +1945,14 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
1944
1945
  if ((s == null ? void 0 : s.typing_events) === !1)
1945
1946
  return null;
1946
1947
  const m = e ? [] : Object.values(i).filter(
1947
- ({ parent_id: w, user: p }) => {
1948
+ ({ parent_id: w, user: b }) => {
1948
1949
  var v;
1949
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1950
+ return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1950
1951
  }
1951
1952
  ), g = e ? Object.values(i).filter(
1952
- ({ parent_id: w, user: p }) => {
1953
+ ({ parent_id: w, user: b }) => {
1953
1954
  var v;
1954
- return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1955
+ return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1955
1956
  }
1956
1957
  ) : [], u = e ? g : m;
1957
1958
  if (!u.length)
@@ -2001,16 +2002,16 @@ const Na = ({ size: e = 15 }) => /* @__PURE__ */ n(
2001
2002
  height: "13",
2002
2003
  overflow: "visible",
2003
2004
  children: [
2004
- /* @__PURE__ */ n(Ve, { cx: "4", index: 0 }),
2005
- /* @__PURE__ */ n(Ve, { cx: "16", index: 1 }),
2006
- /* @__PURE__ */ n(Ve, { cx: "28", index: 2 })
2005
+ /* @__PURE__ */ n(je, { cx: "4", index: 0 }),
2006
+ /* @__PURE__ */ n(je, { cx: "16", index: 1 }),
2007
+ /* @__PURE__ */ n(je, { cx: "28", index: 2 })
2007
2008
  ]
2008
2009
  }
2009
2010
  ) }) }) }) }) })
2010
2011
  ] })
2011
2012
  }
2012
2013
  );
2013
- function Ka(e, t) {
2014
+ function Wa(e, t) {
2014
2015
  var a;
2015
2016
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2016
2017
  for (const r of Object.values(s)) {
@@ -2019,10 +2020,10 @@ function Ka(e, t) {
2019
2020
  return i;
2020
2021
  }
2021
2022
  }
2022
- const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2023
+ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2023
2024
  "div",
2024
2025
  {
2025
- className: y("flex items-center justify-center h-full", e),
2026
+ className: _("flex items-center justify-center h-full", e),
2026
2027
  children: [
2027
2028
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2028
2029
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2062,79 +2063,49 @@ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2062
2063
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2063
2064
  ]
2064
2065
  }
2065
- ), Le = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2066
- /* @__PURE__ */ n(Za, { className: "w-6 h-6" }),
2066
+ ), Re = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2067
+ /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2067
2068
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2068
2069
  ] }) }));
2069
- Le.displayName = "LoadingState";
2070
- const mn = ({ channel: e, participant: t }) => {
2071
- const s = (t == null ? void 0 : t.customer) === !0, a = Kt(e);
2072
- return !s && !a ? null : /* @__PURE__ */ h("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
2073
- s && /* @__PURE__ */ n(
2074
- "span",
2075
- {
2076
- role: "img",
2077
- "aria-label": "Customer",
2078
- className: "inline-flex size-4 items-center justify-center rounded-full bg-[#22C55E] text-white",
2079
- children: /* @__PURE__ */ n(
2080
- Ds,
2081
- {
2082
- "aria-hidden": "true",
2083
- className: "size-3",
2084
- weight: "bold"
2085
- }
2086
- )
2087
- }
2088
- ),
2089
- a && /* @__PURE__ */ n(
2090
- "span",
2091
- {
2092
- role: "img",
2093
- "aria-label": "Starred conversation",
2094
- className: "inline-flex size-4 items-center justify-center rounded-full bg-[#F6C343] text-white",
2095
- children: /* @__PURE__ */ n(Me, { "aria-hidden": "true", className: "size-3", weight: "fill" })
2096
- }
2097
- )
2098
- ] });
2099
- }, oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ae = "Replies instantly with AI assistant", Qa = ({
2070
+ Re.displayName = "LoadingState";
2071
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ae = "Replies instantly with AI assistant", Ja = ({
2100
2072
  onBack: e,
2101
2073
  showBackButton: t,
2102
2074
  showStarButton: s = !1,
2103
2075
  dmAgentEnabled: a = !1,
2104
2076
  onLeaveConversation: r,
2105
2077
  onBlockParticipant: i,
2106
- showDeleteConversation: l = !0,
2107
- showBlockParticipant: o = !0,
2078
+ showDeleteConversation: o = !0,
2079
+ showBlockParticipant: l = !0,
2108
2080
  showReportParticipant: d = !0,
2109
2081
  onDeleteConversationClick: m,
2110
2082
  onBlockParticipantClick: g,
2111
2083
  onReportParticipantClick: u,
2112
2084
  customChannelActions: f,
2113
2085
  renderChannelActions: c,
2114
- showChannelInfo: b = !0,
2086
+ showChannelInfo: p = !0,
2115
2087
  onParticipantNameClick: N,
2116
2088
  renderHeaderTitleBadges: w
2117
2089
  }) => {
2118
- var D, M, S, k, T, O, F;
2119
- const { channel: p } = de(), v = j.useMemo(() => {
2090
+ var A, D, k, C, S, $, z;
2091
+ const { channel: b } = de(), v = j.useMemo(() => {
2120
2092
  var Z, G;
2121
- const V = (Z = p._client) == null ? void 0 : Z.userID;
2122
- return V ? Object.values(((G = p.state) == null ? void 0 : G.members) || {}).find(
2093
+ const V = (Z = b._client) == null ? void 0 : Z.userID;
2094
+ return V ? Object.values(((G = b.state) == null ? void 0 : G.members) || {}).find(
2123
2095
  (x) => {
2124
- var C;
2125
- return ((C = x.user) == null ? void 0 : C.id) && x.user.id !== V;
2096
+ var I;
2097
+ return ((I = x.user) == null ? void 0 : I.id) && x.user.id !== V;
2126
2098
  }
2127
2099
  ) : void 0;
2128
- }, [(D = p._client) == null ? void 0 : D.userID, (M = p.state) == null ? void 0 : M.members]), A = Jt(v == null ? void 0 : v.user), E = (S = v == null ? void 0 : v.user) == null ? void 0 : S.image, I = Kt(p), P = w == null ? void 0 : w({
2129
- channel: p,
2100
+ }, [(A = b._client) == null ? void 0 : A.userID, (D = b.state) == null ? void 0 : D.members]), M = Jt(v == null ? void 0 : v.user), T = (k = v == null ? void 0 : v.user) == null ? void 0 : k.image, y = Kt(b), O = w == null ? void 0 : w({
2101
+ channel: b,
2130
2102
  participant: v
2131
- }), L = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", _ = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ h(se, { children: [
2132
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2133
- /* @__PURE__ */ n(mn, { channel: p, participant: v }),
2134
- P && /* @__PURE__ */ n("span", { className: "shrink-0", children: P })
2103
+ }), P = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", E = /* @__PURE__ */ h(se, { children: [
2104
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: M }),
2105
+ O && /* @__PURE__ */ n("span", { className: "shrink-0", children: O })
2135
2106
  ] }), R = async () => {
2136
2107
  try {
2137
- I ? await p.unpin() : await p.pin();
2108
+ y ? await b.unpin() : await b.pin();
2138
2109
  } catch (V) {
2139
2110
  console.error(
2140
2111
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -2147,7 +2118,7 @@ const mn = ({ channel: e, participant: t }) => {
2147
2118
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2148
2119
  "button",
2149
2120
  {
2150
- className: y(
2121
+ className: _(
2151
2122
  oe,
2152
2123
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2153
2124
  ),
@@ -2155,7 +2126,7 @@ const mn = ({ channel: e, participant: t }) => {
2155
2126
  }),
2156
2127
  type: "button",
2157
2128
  "aria-label": "Back to conversations",
2158
- children: /* @__PURE__ */ n(Pt, { className: "size-5 text-black/90" })
2129
+ children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2159
2130
  }
2160
2131
  ) }),
2161
2132
  /* @__PURE__ */ n(
@@ -2168,45 +2139,47 @@ const mn = ({ channel: e, participant: t }) => {
2168
2139
  {
2169
2140
  type: "button",
2170
2141
  onClick: N,
2171
- "aria-label": `View details for ${A}`,
2172
- className: y(
2173
- L,
2142
+ "aria-label": `View details for ${M}`,
2143
+ className: _(
2144
+ P,
2174
2145
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2175
2146
  ),
2176
2147
  children: [
2177
2148
  /* @__PURE__ */ n(
2178
2149
  ne,
2179
2150
  {
2180
- id: ((k = v == null ? void 0 : v.user) == null ? void 0 : k.id) || p.id || "unknown",
2181
- name: A,
2182
- image: E,
2151
+ id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || b.id || "unknown",
2152
+ name: M,
2153
+ image: T,
2154
+ starred: s && y,
2183
2155
  dmAgentEnabled: a,
2184
2156
  size: 48
2185
2157
  }
2186
2158
  ),
2187
2159
  /* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
2188
- z,
2160
+ E,
2189
2161
  /* @__PURE__ */ n(ve, { className: "size-3 shrink-0", weight: "bold" })
2190
2162
  ] }),
2191
2163
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2192
- /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2164
+ /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2193
2165
  /* @__PURE__ */ n("span", { children: Ae })
2194
2166
  ] })
2195
2167
  ]
2196
2168
  }
2197
- ) : /* @__PURE__ */ h("div", { className: L, children: [
2169
+ ) : /* @__PURE__ */ h("div", { className: P, children: [
2198
2170
  /* @__PURE__ */ n(
2199
2171
  ne,
2200
2172
  {
2201
- id: ((T = v == null ? void 0 : v.user) == null ? void 0 : T.id) || p.id || "unknown",
2202
- name: A,
2203
- image: E,
2173
+ id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || b.id || "unknown",
2174
+ name: M,
2175
+ image: T,
2176
+ starred: s && y,
2204
2177
  dmAgentEnabled: a,
2205
2178
  size: 48
2206
2179
  }
2207
2180
  ),
2208
2181
  /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
2209
- z,
2182
+ E,
2210
2183
  /* @__PURE__ */ n(
2211
2184
  ve,
2212
2185
  {
@@ -2216,7 +2189,7 @@ const mn = ({ channel: e, participant: t }) => {
2216
2189
  )
2217
2190
  ] }),
2218
2191
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2219
- /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2192
+ /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2220
2193
  /* @__PURE__ */ n("span", { children: Ae })
2221
2194
  ] })
2222
2195
  ] })
@@ -2229,26 +2202,26 @@ const mn = ({ channel: e, participant: t }) => {
2229
2202
  className: oe,
2230
2203
  onClick: R,
2231
2204
  type: "button",
2232
- "aria-label": I ? "Unstar conversation" : "Star conversation",
2205
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2233
2206
  children: /* @__PURE__ */ n(
2234
- Me,
2207
+ Ge,
2235
2208
  {
2236
- className: y("size-5", {
2237
- "text-yellow-600": I,
2238
- "text-black/90": !I
2209
+ className: _("size-5", {
2210
+ "text-yellow-600": y,
2211
+ "text-black/90": !y
2239
2212
  }),
2240
- weight: I ? "duotone" : "regular"
2213
+ weight: y ? "duotone" : "regular"
2241
2214
  }
2242
2215
  )
2243
2216
  }
2244
2217
  ),
2245
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2218
+ p && (c !== void 0 ? c : /* @__PURE__ */ n(
2246
2219
  Ft,
2247
2220
  {
2248
- channel: p,
2221
+ channel: b,
2249
2222
  participant: v,
2250
- showDeleteConversation: l,
2251
- showBlockParticipant: o,
2223
+ showDeleteConversation: o,
2224
+ showBlockParticipant: l,
2252
2225
  showReportParticipant: d,
2253
2226
  onLeaveConversation: r,
2254
2227
  onBlockParticipant: i,
@@ -2256,7 +2229,7 @@ const mn = ({ channel: e, participant: t }) => {
2256
2229
  onBlockParticipantClick: g,
2257
2230
  onReportParticipantClick: u,
2258
2231
  customChannelActions: f,
2259
- triggerClassName: y(oe, "bg-[#F1F0EE]")
2232
+ triggerClassName: _(oe, "bg-[#F1F0EE]")
2260
2233
  }
2261
2234
  ))
2262
2235
  ] })
@@ -2266,14 +2239,14 @@ const mn = ({ channel: e, participant: t }) => {
2266
2239
  t && e && /* @__PURE__ */ n(
2267
2240
  "button",
2268
2241
  {
2269
- className: y(
2242
+ className: _(
2270
2243
  oe,
2271
2244
  "messaging-channel-view-back-button-desktop"
2272
2245
  ),
2273
2246
  type: "button",
2274
2247
  onClick: e,
2275
2248
  "aria-label": "Back to conversations",
2276
- children: /* @__PURE__ */ n(Pt, { className: "size-5 text-black/90" })
2249
+ children: /* @__PURE__ */ n(zt, { className: "size-5 text-black/90" })
2277
2250
  }
2278
2251
  ),
2279
2252
  N ? /* @__PURE__ */ h(
@@ -2281,48 +2254,50 @@ const mn = ({ channel: e, participant: t }) => {
2281
2254
  {
2282
2255
  type: "button",
2283
2256
  onClick: N,
2284
- "aria-label": `View details for ${A}`,
2285
- className: y(
2286
- _,
2257
+ "aria-label": `View details for ${M}`,
2258
+ className: _(
2259
+ L,
2287
2260
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2288
2261
  ),
2289
2262
  children: [
2290
2263
  /* @__PURE__ */ n(
2291
2264
  ne,
2292
2265
  {
2293
- id: ((O = v == null ? void 0 : v.user) == null ? void 0 : O.id) || p.id || "unknown",
2294
- name: A,
2295
- image: E,
2266
+ id: (($ = v == null ? void 0 : v.user) == null ? void 0 : $.id) || b.id || "unknown",
2267
+ name: M,
2268
+ image: T,
2269
+ starred: s && y,
2296
2270
  dmAgentEnabled: a,
2297
2271
  size: 48
2298
2272
  }
2299
2273
  ),
2300
2274
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2301
2275
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2302
- z,
2276
+ E,
2303
2277
  /* @__PURE__ */ n(ve, { className: "size-4 shrink-0", weight: "bold" })
2304
2278
  ] }),
2305
2279
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2306
- /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2280
+ /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2307
2281
  /* @__PURE__ */ n("span", { className: "truncate", children: Ae })
2308
2282
  ] })
2309
2283
  ] })
2310
2284
  ]
2311
2285
  }
2312
- ) : /* @__PURE__ */ h("div", { className: _, children: [
2286
+ ) : /* @__PURE__ */ h("div", { className: L, children: [
2313
2287
  /* @__PURE__ */ n(
2314
2288
  ne,
2315
2289
  {
2316
- id: ((F = v == null ? void 0 : v.user) == null ? void 0 : F.id) || p.id || "unknown",
2317
- name: A,
2318
- image: E,
2290
+ id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || b.id || "unknown",
2291
+ name: M,
2292
+ image: T,
2293
+ starred: s && y,
2319
2294
  dmAgentEnabled: a,
2320
2295
  size: 48
2321
2296
  }
2322
2297
  ),
2323
2298
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2324
2299
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2325
- z,
2300
+ E,
2326
2301
  /* @__PURE__ */ n(
2327
2302
  ve,
2328
2303
  {
@@ -2332,7 +2307,7 @@ const mn = ({ channel: e, participant: t }) => {
2332
2307
  )
2333
2308
  ] }),
2334
2309
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2335
- /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2310
+ /* @__PURE__ */ n(be, { className: "size-3 shrink-0 text-black/55" }),
2336
2311
  /* @__PURE__ */ n("span", { className: "truncate", children: Ae })
2337
2312
  ] })
2338
2313
  ] })
@@ -2345,26 +2320,26 @@ const mn = ({ channel: e, participant: t }) => {
2345
2320
  className: oe,
2346
2321
  onClick: R,
2347
2322
  type: "button",
2348
- "aria-label": I ? "Unstar conversation" : "Star conversation",
2323
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2349
2324
  children: /* @__PURE__ */ n(
2350
- Me,
2325
+ Ge,
2351
2326
  {
2352
- className: y("size-6", {
2353
- "text-yellow-600": I,
2354
- "text-black/90": !I
2327
+ className: _("size-6", {
2328
+ "text-yellow-600": y,
2329
+ "text-black/90": !y
2355
2330
  }),
2356
- weight: I ? "duotone" : "regular"
2331
+ weight: y ? "duotone" : "regular"
2357
2332
  }
2358
2333
  )
2359
2334
  }
2360
2335
  ),
2361
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2336
+ p && (c !== void 0 ? c : /* @__PURE__ */ n(
2362
2337
  Ft,
2363
2338
  {
2364
- channel: p,
2339
+ channel: b,
2365
2340
  participant: v,
2366
- showDeleteConversation: l,
2367
- showBlockParticipant: o,
2341
+ showDeleteConversation: o,
2342
+ showBlockParticipant: l,
2368
2343
  showReportParticipant: d,
2369
2344
  onLeaveConversation: r,
2370
2345
  onBlockParticipant: i,
@@ -2378,115 +2353,115 @@ const mn = ({ channel: e, participant: t }) => {
2378
2353
  ] })
2379
2354
  ] })
2380
2355
  ] });
2381
- }, er = ({
2356
+ }, Za = ({
2382
2357
  onBack: e,
2383
2358
  showBackButton: t,
2384
2359
  renderMessageInputActions: s,
2385
2360
  renderMessageInputFooter: a,
2386
2361
  renderConversationFooter: r,
2387
2362
  onLeaveConversation: i,
2388
- onBlockParticipant: l,
2389
- showDeleteConversation: o = !0,
2363
+ onBlockParticipant: o,
2364
+ showDeleteConversation: l = !0,
2390
2365
  onDeleteConversationClick: d,
2391
2366
  onBlockParticipantClick: m,
2392
2367
  onReportParticipantClick: g,
2393
2368
  showBlockParticipant: u = !0,
2394
2369
  showReportParticipant: f = !0,
2395
2370
  composerDisabled: c = !1,
2396
- composerDisabledReason: b,
2371
+ composerDisabledReason: p,
2397
2372
  showStarButton: N = !1,
2398
2373
  chatbotVotingEnabled: w = !1,
2399
- renderChannelBanner: p,
2374
+ renderChannelBanner: b,
2400
2375
  renderHeaderTitleBadges: v,
2401
- customChannelActions: A,
2402
- renderChannelActions: E,
2403
- renderMessage: I,
2404
- dmAgentEnabled: P = !1,
2405
- viewerLanguage: L,
2406
- showChannelInfo: _ = !0,
2407
- onParticipantNameClick: z,
2376
+ customChannelActions: M,
2377
+ renderChannelActions: T,
2378
+ renderMessage: y,
2379
+ dmAgentEnabled: O = !1,
2380
+ viewerLanguage: P,
2381
+ showChannelInfo: L = !0,
2382
+ onParticipantNameClick: E,
2408
2383
  composerInput: R
2409
2384
  }) => {
2410
- var V, ee, Z, G, x, C;
2411
- const { channel: D } = de(), M = j.useMemo(() => {
2385
+ var V, ee, Z, G, x, I;
2386
+ const { channel: A } = de(), D = j.useMemo(() => {
2412
2387
  var q, B;
2413
- const U = (q = D._client) == null ? void 0 : q.userID;
2414
- return U ? Object.values(((B = D.state) == null ? void 0 : B.members) || {}).find(
2388
+ const U = (q = A._client) == null ? void 0 : q.userID;
2389
+ return U ? Object.values(((B = A.state) == null ? void 0 : B.members) || {}).find(
2415
2390
  (W) => {
2416
2391
  var X;
2417
2392
  return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
2418
2393
  }
2419
2394
  ) : void 0;
2420
- }, [(V = D._client) == null ? void 0 : V.userID, (ee = D.state) == null ? void 0 : ee.members]), S = j.useMemo(() => {
2395
+ }, [(V = A._client) == null ? void 0 : V.userID, (ee = A.state) == null ? void 0 : ee.members]), k = j.useMemo(() => {
2421
2396
  var q, B;
2422
- const U = (q = D._client) == null ? void 0 : q.userID;
2423
- return U ? Object.values(((B = D.state) == null ? void 0 : B.members) || {}).find((W) => {
2397
+ const U = (q = A._client) == null ? void 0 : q.userID;
2398
+ return U ? Object.values(((B = A.state) == null ? void 0 : B.members) || {}).find((W) => {
2424
2399
  var X;
2425
2400
  return ((X = W.user) == null ? void 0 : X.id) === U;
2426
2401
  }) : void 0;
2427
- }, [(Z = D._client) == null ? void 0 : Z.userID, (G = D.state) == null ? void 0 : G.members]), k = ((x = S == null ? void 0 : S.user) == null ? void 0 : x.is_account) ?? (S == null ? void 0 : S.is_account), T = ((C = M == null ? void 0 : M.user) == null ? void 0 : C.is_account) ?? (M == null ? void 0 : M.is_account), O = P && k === !1 && T === !0, F = J(
2402
+ }, [(Z = A._client) == null ? void 0 : Z.userID, (G = A.state) == null ? void 0 : G.members]), C = ((x = k == null ? void 0 : k.user) == null ? void 0 : x.is_account) ?? (k == null ? void 0 : k.is_account), S = ((I = D == null ? void 0 : D.user) == null ? void 0 : I.is_account) ?? (D == null ? void 0 : D.is_account), $ = O && C === !1 && S === !0, z = J(
2428
2403
  (U) => {
2429
2404
  const { message: H } = ye("ChannelView"), q = /* @__PURE__ */ n(
2430
- Ta,
2405
+ Ia,
2431
2406
  {
2432
2407
  ...U,
2433
2408
  chatbotVotingEnabled: w,
2434
- viewerLanguage: L
2409
+ viewerLanguage: P
2435
2410
  }
2436
2411
  );
2437
- return !I || !H ? q : I(q, H);
2412
+ return !y || !H ? q : y(q, H);
2438
2413
  },
2439
- [w, I, L]
2414
+ [w, y, P]
2440
2415
  );
2441
2416
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2442
- cs,
2417
+ os,
2443
2418
  {
2444
2419
  overrides: {
2445
- Message: F,
2446
- MessageActions: Ra
2420
+ Message: z,
2421
+ MessageActions: Aa
2447
2422
  },
2448
- children: /* @__PURE__ */ h(ds, { children: [
2423
+ children: /* @__PURE__ */ h(cs, { children: [
2449
2424
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2450
- Qa,
2425
+ Ja,
2451
2426
  {
2452
2427
  onBack: e,
2453
2428
  showBackButton: t,
2454
- showChannelInfo: _,
2429
+ showChannelInfo: L,
2455
2430
  showStarButton: N,
2456
- dmAgentEnabled: O,
2431
+ dmAgentEnabled: $,
2457
2432
  onLeaveConversation: i,
2458
- onBlockParticipant: l,
2459
- showDeleteConversation: o,
2433
+ onBlockParticipant: o,
2434
+ showDeleteConversation: l,
2460
2435
  showBlockParticipant: u,
2461
2436
  showReportParticipant: f,
2462
2437
  onDeleteConversationClick: d,
2463
2438
  onBlockParticipantClick: m,
2464
2439
  onReportParticipantClick: g,
2465
- customChannelActions: A,
2466
- renderChannelActions: E,
2467
- onParticipantNameClick: z,
2440
+ customChannelActions: M,
2441
+ renderChannelActions: T,
2442
+ onParticipantNameClick: E,
2468
2443
  renderHeaderTitleBadges: v
2469
2444
  }
2470
2445
  ) }, "lt-channel-header"),
2471
- p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
2446
+ b ? /* @__PURE__ */ n(j.Fragment, { children: b() }, "lt-channel-banner") : null,
2472
2447
  /* @__PURE__ */ n(
2473
2448
  "div",
2474
2449
  {
2475
2450
  className: "flex-1 overflow-hidden relative",
2476
- children: /* @__PURE__ */ n(us, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2451
+ children: /* @__PURE__ */ n(ds, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2477
2452
  },
2478
2453
  "lt-channel-message-list"
2479
2454
  ),
2480
- r ? /* @__PURE__ */ n(j.Fragment, { children: r(D) }, "lt-channel-conversation-footer") : null,
2455
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(A) }, "lt-channel-conversation-footer") : null,
2481
2456
  /* @__PURE__ */ n(
2482
- $a,
2457
+ za,
2483
2458
  {
2484
2459
  ...s && {
2485
- renderActions: () => s == null ? void 0 : s(D)
2460
+ renderActions: () => s == null ? void 0 : s(A)
2486
2461
  },
2487
- renderFooter: () => a == null ? void 0 : a(D),
2462
+ renderFooter: () => a == null ? void 0 : a(A),
2488
2463
  disabled: c,
2489
- disabledReason: b,
2464
+ disabledReason: p,
2490
2465
  composerInput: R
2491
2466
  },
2492
2467
  "lt-channel-message-input"
@@ -2494,7 +2469,7 @@ const mn = ({ channel: e, participant: t }) => {
2494
2469
  ] })
2495
2470
  }
2496
2471
  ) });
2497
- }, hn = j.memo(
2472
+ }, mn = j.memo(
2498
2473
  ({
2499
2474
  channel: e,
2500
2475
  onBack: t,
@@ -2502,117 +2477,117 @@ const mn = ({ channel: e, participant: t }) => {
2502
2477
  renderMessageInputActions: a,
2503
2478
  renderMessageInputFooter: r,
2504
2479
  renderConversationFooter: i,
2505
- onLeaveConversation: l,
2506
- onBlockParticipant: o,
2480
+ onLeaveConversation: o,
2481
+ onBlockParticipant: l,
2507
2482
  className: d,
2508
- CustomChannelEmptyState: m = Ja,
2483
+ CustomChannelEmptyState: m = Xa,
2509
2484
  showDeleteConversation: g = !0,
2510
2485
  onDeleteConversationClick: u,
2511
2486
  onBlockParticipantClick: f,
2512
2487
  onReportParticipantClick: c,
2513
- showBlockParticipant: b = !0,
2488
+ showBlockParticipant: p = !0,
2514
2489
  showReportParticipant: N = !0,
2515
2490
  composerDisabled: w = !1,
2516
- composerDisabledReason: p,
2491
+ composerDisabledReason: b,
2517
2492
  dmAgentEnabled: v,
2518
- messageMetadata: A,
2519
- onMessageSent: E,
2520
- showStarButton: I = !1,
2521
- chatbotVotingEnabled: P = !1,
2522
- renderChannelBanner: L,
2523
- renderHeaderTitleBadges: _,
2524
- customChannelActions: z,
2493
+ messageMetadata: M,
2494
+ onMessageSent: T,
2495
+ showStarButton: y = !1,
2496
+ chatbotVotingEnabled: O = !1,
2497
+ renderChannelBanner: P,
2498
+ renderHeaderTitleBadges: L,
2499
+ customChannelActions: E,
2525
2500
  renderChannelActions: R,
2526
- renderMessage: D,
2527
- onMessageLinkClick: M,
2528
- sendButton: S,
2529
- attachmentPreviewList: k,
2530
- viewerLanguage: T,
2531
- showChannelInfo: O = !0,
2532
- onParticipantNameClick: F,
2501
+ renderMessage: A,
2502
+ onMessageLinkClick: D,
2503
+ sendButton: k,
2504
+ attachmentPreviewList: C,
2505
+ viewerLanguage: S,
2506
+ showChannelInfo: $ = !0,
2507
+ onParticipantNameClick: z,
2533
2508
  composerInput: V
2534
2509
  }) => {
2535
2510
  const ee = J(
2536
- async (G, x, C) => {
2511
+ async (G, x, I) => {
2537
2512
  var X;
2538
2513
  const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, H = v && !U, q = {
2539
2514
  ...x,
2540
2515
  ...H && { silent: !0 },
2541
- ...A && {
2516
+ ...M && {
2542
2517
  metadata: {
2543
2518
  ...x.metadata ?? {},
2544
- ...A
2519
+ ...M
2545
2520
  }
2546
2521
  }
2547
2522
  }, B = {
2548
- ...C,
2523
+ ...I,
2549
2524
  ...H && { skip_push: !0 }
2550
2525
  }, W = await e.sendMessage(q, B);
2551
- return E == null || E(W), W;
2526
+ return T == null || T(W), W;
2552
2527
  },
2553
- [e, v, A, E]
2528
+ [e, v, M, T]
2554
2529
  ), Z = Y(null);
2555
2530
  return K(() => {
2556
- if (!M) return;
2531
+ if (!D) return;
2557
2532
  const G = Z.current;
2558
2533
  if (!G) return;
2559
- const x = (C) => {
2560
- const U = C.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2534
+ const x = (I) => {
2535
+ const U = I.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2561
2536
  if (!q) return;
2562
2537
  const B = H == null ? void 0 : H.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2563
- M(q, X);
2538
+ D(q, X);
2564
2539
  };
2565
2540
  return G.addEventListener("click", x), () => G.removeEventListener("click", x);
2566
- }, [M, e]), /* @__PURE__ */ n(
2541
+ }, [D, e]), /* @__PURE__ */ n(
2567
2542
  "div",
2568
2543
  {
2569
2544
  ref: Z,
2570
- className: y(
2545
+ className: _(
2571
2546
  "messaging-channel-view h-full flex flex-col",
2572
2547
  d
2573
2548
  ),
2574
2549
  children: /* @__PURE__ */ n(un.Provider, { value: v ?? !1, children: /* @__PURE__ */ n(
2575
- os,
2550
+ ls,
2576
2551
  {
2577
2552
  channel: e,
2578
- MessageSystem: qa,
2553
+ MessageSystem: Ha,
2579
2554
  EmptyStateIndicator: m,
2580
- LoadingIndicator: Le,
2581
- DateSeparator: Hs,
2582
- TypingIndicator: Xa,
2555
+ LoadingIndicator: Re,
2556
+ DateSeparator: Vs,
2557
+ TypingIndicator: qa,
2583
2558
  doSendMessageRequest: ee,
2584
- ...S ? { SendButton: S } : {},
2585
- ...k ? { AttachmentPreviewList: k } : {},
2559
+ ...k ? { SendButton: k } : {},
2560
+ ...C ? { AttachmentPreviewList: C } : {},
2586
2561
  children: /* @__PURE__ */ n(
2587
- er,
2562
+ Za,
2588
2563
  {
2589
2564
  onBack: t,
2590
2565
  showBackButton: s,
2591
2566
  renderMessageInputActions: a,
2592
2567
  renderMessageInputFooter: r,
2593
2568
  renderConversationFooter: i,
2594
- onLeaveConversation: l,
2595
- onBlockParticipant: o,
2569
+ onLeaveConversation: o,
2570
+ onBlockParticipant: l,
2596
2571
  CustomChannelEmptyState: m,
2597
2572
  showDeleteConversation: g,
2598
2573
  onDeleteConversationClick: u,
2599
2574
  onBlockParticipantClick: f,
2600
2575
  onReportParticipantClick: c,
2601
- showBlockParticipant: b,
2576
+ showBlockParticipant: p,
2602
2577
  showReportParticipant: N,
2603
2578
  composerDisabled: w,
2604
- composerDisabledReason: p,
2605
- showStarButton: I,
2579
+ composerDisabledReason: b,
2580
+ showStarButton: y,
2606
2581
  dmAgentEnabled: v,
2607
- chatbotVotingEnabled: P,
2608
- renderChannelBanner: L,
2609
- renderHeaderTitleBadges: _,
2610
- customChannelActions: z,
2582
+ chatbotVotingEnabled: O,
2583
+ renderChannelBanner: P,
2584
+ renderHeaderTitleBadges: L,
2585
+ customChannelActions: E,
2611
2586
  renderChannelActions: R,
2612
- renderMessage: D,
2613
- viewerLanguage: T,
2614
- showChannelInfo: O,
2615
- onParticipantNameClick: F,
2587
+ renderMessage: A,
2588
+ viewerLanguage: S,
2589
+ showChannelInfo: $,
2590
+ onParticipantNameClick: z,
2616
2591
  composerInput: V
2617
2592
  }
2618
2593
  )
@@ -2622,7 +2597,7 @@ const mn = ({ channel: e, participant: t }) => {
2622
2597
  );
2623
2598
  }
2624
2599
  );
2625
- hn.displayName = "ChannelView";
2600
+ mn.displayName = "ChannelView";
2626
2601
  const xe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2627
2602
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2628
2603
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -2638,64 +2613,64 @@ const xe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2638
2613
  )
2639
2614
  ] }) }));
2640
2615
  xe.displayName = "ErrorState";
2641
- const Si = ({
2616
+ const Ei = ({
2642
2617
  capabilities: e = {},
2643
2618
  renderMessageInputActions: t,
2644
2619
  renderConversationFooter: s,
2645
2620
  onChannelSelect: a,
2646
2621
  onExitConversation: r,
2647
2622
  initialParticipantFilter: i,
2648
- initialParticipantData: l,
2649
- CustomChannelEmptyState: o,
2623
+ initialParticipantData: o,
2624
+ CustomChannelEmptyState: l,
2650
2625
  onBlockParticipantClick: d,
2651
2626
  onReportParticipantClick: m,
2652
2627
  dmAgentEnabled: g,
2653
2628
  onMessageSent: u,
2654
2629
  chatbotVotingEnabled: f = !1,
2655
2630
  viewerLanguage: c,
2656
- renderHeaderTitleBadges: b,
2631
+ renderHeaderTitleBadges: p,
2657
2632
  renderChannelBanner: N,
2658
2633
  customChannelActions: w,
2659
- renderChannelActions: p,
2634
+ renderChannelActions: b,
2660
2635
  onParticipantNameClick: v,
2661
- renderMessage: A,
2662
- onMessageLinkClick: E,
2663
- showChannelInfo: I,
2664
- composerInput: P
2636
+ renderMessage: M,
2637
+ onMessageLinkClick: T,
2638
+ showChannelInfo: y,
2639
+ composerInput: O
2665
2640
  }) => {
2666
2641
  const {
2667
- client: L,
2668
- isConnected: _,
2669
- isLoading: z,
2642
+ client: P,
2643
+ isConnected: L,
2644
+ isLoading: E,
2670
2645
  error: R,
2671
- refreshConnection: D,
2672
- service: M,
2673
- debug: S
2674
- } = $s(), [k, T] = $(null), [O, F] = $(null), [V, ee] = $(!1), { showDeleteConversation: Z = !0 } = e, G = Y(l);
2675
- G.current = l;
2646
+ refreshConnection: A,
2647
+ service: D,
2648
+ debug: k
2649
+ } = zs(), [C, S] = F(null), [$, z] = F(null), [V, ee] = F(!1), { showDeleteConversation: Z = !0 } = e, G = Y(o);
2650
+ G.current = o;
2676
2651
  const x = Y(a);
2677
2652
  x.current = a;
2678
- const C = Y(null), U = Y(null);
2653
+ const I = Y(null), U = Y(null);
2679
2654
  K(() => {
2680
- U.current = k;
2681
- }, [k]), K(() => {
2682
- if (!L || !_) return;
2683
- const B = L.userID;
2655
+ U.current = C;
2656
+ }, [C]), K(() => {
2657
+ if (!P || !L) return;
2658
+ const B = P.userID;
2684
2659
  if (!B) return;
2685
2660
  const W = `${B}::${i}`;
2686
- if (C.current === W) return;
2687
- C.current = W;
2661
+ if (I.current === W) return;
2662
+ I.current = W;
2688
2663
  const X = () => {
2689
- C.current === W && (C.current = null);
2664
+ I.current === W && (I.current = null);
2690
2665
  };
2691
2666
  (async () => {
2692
2667
  var me, he;
2693
2668
  try {
2694
- S && console.log(
2669
+ k && console.log(
2695
2670
  "[MessagingShell] Loading initial conversation with:",
2696
2671
  i
2697
2672
  );
2698
- const Q = await L.queryChannels(
2673
+ const Q = await P.queryChannels(
2699
2674
  {
2700
2675
  type: "messaging",
2701
2676
  members: { $eq: [B, i] }
@@ -2704,27 +2679,27 @@ const Si = ({
2704
2679
  { limit: 1 }
2705
2680
  );
2706
2681
  if (Q.length > 0) {
2707
- T(Q[0]), F(null), (me = x.current) == null || me.call(x, Q[0]), S && console.log(
2682
+ S(Q[0]), z(null), (me = x.current) == null || me.call(x, Q[0]), k && console.log(
2708
2683
  "[MessagingShell] Initial conversation loaded:",
2709
2684
  Q[0].id
2710
2685
  );
2711
2686
  return;
2712
2687
  }
2713
2688
  const te = G.current;
2714
- if (!te || !M) {
2715
- X(), F("No conversation found with this account"), S && console.log(
2689
+ if (!te || !D) {
2690
+ X(), z("No conversation found with this account"), k && console.log(
2716
2691
  "[MessagingShell] No conversation found for:",
2717
2692
  i
2718
2693
  );
2719
2694
  return;
2720
2695
  }
2721
2696
  try {
2722
- const le = await M.startChannelWithParticipant({
2697
+ const le = await D.startChannelWithParticipant({
2723
2698
  id: te.id,
2724
2699
  name: te.name,
2725
2700
  phone: te.phone
2726
2701
  });
2727
- T(le), F(null), (he = x.current) == null || he.call(x, le), S && console.log(
2702
+ S(le), z(null), (he = x.current) == null || he.call(x, le), k && console.log(
2728
2703
  "[MessagingShell] Channel created and loaded:",
2729
2704
  le.id
2730
2705
  );
@@ -2732,38 +2707,38 @@ const Si = ({
2732
2707
  console.error(
2733
2708
  "[MessagingShell] Failed to create conversation:",
2734
2709
  le
2735
- ), X(), F("Failed to create conversation");
2710
+ ), X(), z("Failed to create conversation");
2736
2711
  }
2737
2712
  } catch (Q) {
2738
2713
  console.error(
2739
2714
  "[MessagingShell] Failed to load initial conversation:",
2740
2715
  Q
2741
- ), X(), U.current || F("Failed to load conversation");
2716
+ ), X(), U.current || z("Failed to load conversation");
2742
2717
  }
2743
2718
  })();
2744
- }, [i, L, _, M, S]);
2719
+ }, [i, P, L, D, k]);
2745
2720
  const H = Y(r);
2746
2721
  H.current = r;
2747
2722
  const q = J(() => {
2748
2723
  var B;
2749
- T(null), ee(!0), (B = H.current) == null || B.call(H);
2724
+ S(null), ee(!0), (B = H.current) == null || B.call(H);
2750
2725
  }, []);
2751
- return z ? /* @__PURE__ */ n(Le, {}) : R ? /* @__PURE__ */ n(xe, { message: R, onBack: D }) : !_ || !L ? /* @__PURE__ */ n(
2726
+ return E ? /* @__PURE__ */ n(Re, {}) : R ? /* @__PURE__ */ n(xe, { message: R, onBack: A }) : !L || !P ? /* @__PURE__ */ n(
2752
2727
  xe,
2753
2728
  {
2754
2729
  message: "Not connected to messaging service",
2755
- onBack: D
2730
+ onBack: A
2756
2731
  }
2757
- ) : O ? /* @__PURE__ */ n(xe, { message: O }) : V && !k ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : k ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2758
- hn,
2732
+ ) : $ ? /* @__PURE__ */ n(xe, { message: $ }) : V && !C ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : C ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2733
+ mn,
2759
2734
  {
2760
- channel: k,
2735
+ channel: C,
2761
2736
  renderMessageInputActions: t,
2762
2737
  renderConversationFooter: s,
2763
2738
  renderChannelBanner: N,
2764
2739
  onLeaveConversation: q,
2765
2740
  onBlockParticipant: q,
2766
- CustomChannelEmptyState: o,
2741
+ CustomChannelEmptyState: l,
2767
2742
  showDeleteConversation: Z,
2768
2743
  onBlockParticipantClick: d,
2769
2744
  onReportParticipantClick: m,
@@ -2771,43 +2746,43 @@ const Si = ({
2771
2746
  onMessageSent: u,
2772
2747
  chatbotVotingEnabled: f,
2773
2748
  viewerLanguage: c,
2774
- renderHeaderTitleBadges: b,
2749
+ renderHeaderTitleBadges: p,
2775
2750
  customChannelActions: w,
2776
- renderChannelActions: p,
2751
+ renderChannelActions: b,
2777
2752
  onParticipantNameClick: v,
2778
- renderMessage: A,
2779
- onMessageLinkClick: E,
2780
- showChannelInfo: I,
2781
- composerInput: P
2753
+ renderMessage: M,
2754
+ onMessageLinkClick: T,
2755
+ showChannelInfo: y,
2756
+ composerInput: O
2782
2757
  },
2783
- k.id
2784
- ) }) }) : /* @__PURE__ */ n(Le, {});
2758
+ C.id
2759
+ ) }) }) : /* @__PURE__ */ n(Re, {});
2785
2760
  };
2786
- function tr(e) {
2761
+ function Qa(e) {
2787
2762
  const t = e.state.pending_messages;
2788
2763
  if (t != null && t.length)
2789
2764
  for (const s of t)
2790
2765
  e.state.addMessageSorted(s.message);
2791
2766
  }
2792
- const fn = j.createContext({
2767
+ const hn = j.createContext({
2793
2768
  selectedChannel: void 0,
2794
2769
  onChannelSelect: () => {
2795
2770
  },
2796
2771
  debug: !1,
2797
2772
  renderMessagePreview: void 0,
2798
2773
  viewerLanguage: void 0
2799
- }), nr = fn.Provider, sr = () => j.useContext(fn), ar = (e, t) => {
2774
+ }), er = hn.Provider, tr = () => j.useContext(hn), nr = (e, t) => {
2800
2775
  const s = new Date(
2801
2776
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2802
2777
  ), r = new Date(
2803
2778
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2804
2779
  ).getTime() - s.getTime();
2805
2780
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2806
- }, rr = (e) => {
2781
+ }, sr = (e) => {
2807
2782
  const t = /* @__PURE__ */ new Date();
2808
2783
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2809
2784
  return "Just now";
2810
- const a = ar(e, t);
2785
+ const a = nr(e, t);
2811
2786
  return a === 0 ? e.toLocaleTimeString([], {
2812
2787
  hour: "numeric",
2813
2788
  minute: "2-digit",
@@ -2817,52 +2792,52 @@ const fn = j.createContext({
2817
2792
  day: "numeric",
2818
2793
  year: "2-digit"
2819
2794
  });
2820
- }, gn = j.memo(
2795
+ }, fn = j.memo(
2821
2796
  ({ channel: e, unread: t }) => {
2822
- var I, P, L;
2797
+ var O, P, L;
2823
2798
  const {
2824
2799
  selectedChannel: s,
2825
2800
  onChannelSelect: a,
2826
2801
  debug: r,
2827
2802
  renderMessagePreview: i,
2828
- viewerLanguage: l
2829
- } = sr(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2803
+ viewerLanguage: o
2804
+ } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2830
2805
  e && a(e);
2831
- }, m = (_) => {
2832
- const z = _.key === "Enter" || _.key === " ", R = _.repeat;
2833
- !z || R || (_.preventDefault(), d());
2834
- }, u = Object.values(((I = e == null ? void 0 : e.state) == null ? void 0 : I.members) || {}).find(
2835
- (_) => {
2836
- var z, R;
2837
- return ((z = _.user) == null ? void 0 : z.id) && _.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2806
+ }, m = (E) => {
2807
+ const R = E.key === "Enter" || E.key === " ", A = E.repeat;
2808
+ !R || A || (E.preventDefault(), d());
2809
+ }, u = Object.values(((O = e == null ? void 0 : e.state) == null ? void 0 : O.members) || {}).find(
2810
+ (E) => {
2811
+ var R, A;
2812
+ return ((R = E.user) == null ? void 0 : R.id) && E.user.id !== ((A = e == null ? void 0 : e._client) == null ? void 0 : A.userID);
2838
2813
  }
2839
- ), f = Jt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, b = (() => {
2840
- var z;
2841
- const _ = (z = e == null ? void 0 : e.state) == null ? void 0 : z.messages;
2842
- if (_ != null && _.length) {
2843
- for (let R = _.length - 1; R >= 0; R--)
2844
- if (_[R].type !== "system") return _[R];
2814
+ ), f = Jt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, p = (() => {
2815
+ var R;
2816
+ const E = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
2817
+ if (E != null && E.length) {
2818
+ for (let A = E.length - 1; A >= 0; A--)
2819
+ if (E[A].type !== "system") return E[A];
2845
2820
  }
2846
2821
  })(), w = (() => {
2847
- var S, k, T, O;
2848
- const _ = Zt({
2849
- message: b,
2850
- viewerLanguage: l
2822
+ var C, S, $, z;
2823
+ const E = Zt({
2824
+ message: p,
2825
+ viewerLanguage: o
2851
2826
  });
2852
- if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2853
- if (((k = b == null ? void 0 : b.metadata) == null ? void 0 : k.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2854
- if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_ATTACHMENT")
2855
- return _ ? `📎 ${_}` : "📎 Sent an attachment";
2856
- if (_) return _;
2857
- const M = (O = b == null ? void 0 : b.attachments) == null ? void 0 : O[0];
2858
- return M ? M.og_scrape_url ? M.og_scrape_url : M.type === "image" ? "📷 Sent an image" : M.type === "video" ? "🎥 Sent a video" : M.type === "audio" ? "🎵 Sent audio" : M.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2859
- })(), p = b != null && b.created_at ? rr(new Date(b.created_at)) : "", v = b ? Re(b) : !1, A = i ? i(b, w) : `${v ? "✨ " : ""}${w}`, E = t ?? 0;
2827
+ if (((C = p == null ? void 0 : p.metadata) == null ? void 0 : C.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
2828
+ if (((S = p == null ? void 0 : p.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
2829
+ if ((($ = p == null ? void 0 : p.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT")
2830
+ return E ? `📎 ${E}` : "📎 Sent an attachment";
2831
+ if (E) return E;
2832
+ const k = (z = p == null ? void 0 : p.attachments) == null ? void 0 : z[0];
2833
+ return k ? k.og_scrape_url ? k.og_scrape_url : k.type === "image" ? "📷 Sent an image" : k.type === "video" ? "🎥 Sent a video" : k.type === "audio" ? "🎵 Sent audio" : k.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2834
+ })(), b = p != null && p.created_at ? sr(new Date(p.created_at)) : "", v = p ? Me(p) : !1, M = i ? i(p, w) : `${v ? "✨ " : ""}${w}`, T = Kt(e), y = t ?? 0;
2860
2835
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2861
2836
  channelId: e == null ? void 0 : e.id,
2862
- isSelected: o,
2837
+ isSelected: l,
2863
2838
  participantName: f,
2864
- unreadCount: E,
2865
- hasTimestamp: !!p
2839
+ unreadCount: y,
2840
+ hasTimestamp: !!b
2866
2841
  }), /* @__PURE__ */ n(
2867
2842
  "div",
2868
2843
  {
@@ -2870,11 +2845,11 @@ const fn = j.createContext({
2870
2845
  tabIndex: 0,
2871
2846
  onClick: d,
2872
2847
  onKeyDown: m,
2873
- className: y(
2848
+ className: _(
2874
2849
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2875
2850
  {
2876
- "bg-black/[0.04]": o,
2877
- "hover:bg-black/[0.02]": !o
2851
+ "bg-black/[0.04]": l,
2852
+ "hover:bg-black/[0.02]": !l
2878
2853
  }
2879
2854
  ),
2880
2855
  "data-dd-privacy": "mask",
@@ -2885,26 +2860,29 @@ const fn = j.createContext({
2885
2860
  id: ((L = u == null ? void 0 : u.user) == null ? void 0 : L.id) || e.id || "unknown",
2886
2861
  name: f,
2887
2862
  image: c,
2888
- size: 48
2863
+ size: 48,
2864
+ starred: T
2889
2865
  }
2890
2866
  ),
2891
2867
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
2892
2868
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
2893
- /* @__PURE__ */ h("h3", { className: "flex min-w-0 items-center gap-1 text-sm font-medium text-[#191918]", children: [
2894
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: f }),
2895
- /* @__PURE__ */ n(
2896
- mn,
2897
- {
2898
- channel: e,
2899
- participant: u
2900
- }
2901
- )
2902
- ] }),
2903
- p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
2869
+ /* @__PURE__ */ h(
2870
+ "h3",
2871
+ {
2872
+ className: _(
2873
+ "text-sm font-medium truncate text-[#191918]"
2874
+ ),
2875
+ children: [
2876
+ T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2877
+ f
2878
+ ]
2879
+ }
2880
+ ),
2881
+ b && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: b })
2904
2882
  ] }),
2905
2883
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2906
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2907
- E > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: E > 99 ? "99+" : E })
2884
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
2885
+ y > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: y > 99 ? "99+" : y })
2908
2886
  ] })
2909
2887
  ] })
2910
2888
  ] })
@@ -2912,17 +2890,17 @@ const fn = j.createContext({
2912
2890
  );
2913
2891
  }
2914
2892
  );
2915
- gn.displayName = "CustomChannelPreview";
2916
- const ir = { last_message_at: -1 }, lr = j.memo(
2893
+ fn.displayName = "CustomChannelPreview";
2894
+ const ar = { last_message_at: -1 }, rr = j.memo(
2917
2895
  ({
2918
2896
  onChannelSelect: e,
2919
2897
  selectedChannel: t,
2920
2898
  filters: s,
2921
2899
  allowNewMessagesFromUnfilteredChannels: a = !1,
2922
2900
  channelRenderFilterFn: r,
2923
- sort: i = ir,
2924
- className: l,
2925
- customEmptyStateIndicator: o,
2901
+ sort: i = ar,
2902
+ className: o,
2903
+ customEmptyStateIndicator: l,
2926
2904
  channelPreview: d,
2927
2905
  renderMessagePreview: m,
2928
2906
  viewerLanguage: g
@@ -2932,7 +2910,7 @@ const ir = { last_message_at: -1 }, lr = j.memo(
2932
2910
  const { debug: f = !1 } = Je(), c = j.useCallback(
2933
2911
  (N) => {
2934
2912
  for (const w of N)
2935
- tr(w);
2913
+ Qa(w);
2936
2914
  return r ? r(N) : N;
2937
2915
  },
2938
2916
  [r]
@@ -2942,7 +2920,7 @@ const ir = { last_message_at: -1 }, lr = j.memo(
2942
2920
  selectedChannelId: t == null ? void 0 : t.id,
2943
2921
  filters: s
2944
2922
  });
2945
- const b = j.useMemo(
2923
+ const p = j.useMemo(
2946
2924
  () => ({
2947
2925
  selectedChannel: t,
2948
2926
  onChannelSelect: e,
@@ -2961,21 +2939,21 @@ const ir = { last_message_at: -1 }, lr = j.memo(
2961
2939
  return /* @__PURE__ */ n(
2962
2940
  "div",
2963
2941
  {
2964
- className: y(
2942
+ className: _(
2965
2943
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2966
- l
2944
+ o
2967
2945
  ),
2968
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(nr, { value: b, children: /* @__PURE__ */ n(
2969
- ms,
2946
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: p, children: /* @__PURE__ */ n(
2947
+ us,
2970
2948
  {
2971
2949
  filters: s,
2972
2950
  sort: i,
2973
2951
  options: { limit: 30 },
2974
2952
  allowNewMessagesFromUnfilteredChannels: a,
2975
2953
  channelRenderFilterFn: c,
2976
- Paginator: hs,
2977
- Preview: d ?? gn,
2978
- EmptyStateIndicator: o
2954
+ Paginator: ms,
2955
+ Preview: d ?? fn,
2956
+ EmptyStateIndicator: l
2979
2957
  },
2980
2958
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
2981
2959
  ) }) })
@@ -2983,26 +2961,26 @@ const ir = { last_message_at: -1 }, lr = j.memo(
2983
2961
  );
2984
2962
  }
2985
2963
  );
2986
- lr.displayName = "ChannelList";
2987
- const or = /^([a-z][a-z0-9+.-]*):/i, cr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2964
+ rr.displayName = "ChannelList";
2965
+ const ir = /^([a-z][a-z0-9+.-]*):/i, lr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2988
2966
  function at(e) {
2989
2967
  if (typeof e != "string") return;
2990
2968
  const t = e.trim();
2991
2969
  if (t === "") return;
2992
- const s = or.exec(t);
2970
+ const s = ir.exec(t);
2993
2971
  if (s) {
2994
2972
  const a = s[1].toLowerCase();
2995
- return cr.has(a) ? t : void 0;
2973
+ return lr.has(a) ? t : void 0;
2996
2974
  }
2997
2975
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2998
2976
  }
2999
- const dr = {
2977
+ const or = {
3000
2978
  dark: "bg-white text-[#121110] hover:bg-white/90",
3001
2979
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
3002
- }, ur = ({ variant: e, cta: t }) => {
3003
- const s = y(
2980
+ }, cr = ({ variant: e, cta: t }) => {
2981
+ const s = _(
3004
2982
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3005
- dr[e]
2983
+ or[e]
3006
2984
  ), a = at(t.href);
3007
2985
  return a ? /* @__PURE__ */ n(
3008
2986
  "a",
@@ -3029,10 +3007,10 @@ const dr = {
3029
3007
  children: t.label
3030
3008
  }
3031
3009
  );
3032
- }, mr = {
3010
+ }, dr = {
3033
3011
  dark: "text-white",
3034
3012
  light: "text-black/90"
3035
- }, hr = "text-white/30", fr = {
3013
+ }, ur = "text-white/30", mr = {
3036
3014
  dark: "text-white/55",
3037
3015
  light: "text-black/55"
3038
3016
  }, rt = ({
@@ -3042,17 +3020,17 @@ const dr = {
3042
3020
  description: a,
3043
3021
  url: r,
3044
3022
  appIcon: i,
3045
- cta: l,
3046
- trailingAction: o
3023
+ cta: o,
3024
+ trailingAction: l
3047
3025
  }) => {
3048
- const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
3049
- if (!g && !u && !c && !b) return null;
3050
- const w = y(
3026
+ const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", p = o != null;
3027
+ if (!g && !u && !c && !p) return null;
3028
+ const w = _(
3051
3029
  "truncate text-base font-medium leading-6",
3052
- d && !t ? hr : mr[e]
3053
- ), p = y(
3030
+ d && !t ? ur : dr[e]
3031
+ ), b = _(
3054
3032
  "truncate text-xs leading-4",
3055
- fr[e]
3033
+ mr[e]
3056
3034
  );
3057
3035
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
3058
3036
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -3060,42 +3038,42 @@ const dr = {
3060
3038
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
3061
3039
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3062
3040
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3063
- /* @__PURE__ */ n("p", { className: y("min-w-0", w), children: m })
3041
+ /* @__PURE__ */ n("p", { className: _("min-w-0", w), children: m })
3064
3042
  ] }),
3065
- u && /* @__PURE__ */ n("p", { className: p, children: a })
3043
+ u && /* @__PURE__ */ n("p", { className: b, children: a })
3066
3044
  ] }),
3067
- !b && c && /* @__PURE__ */ n("p", { className: p, children: f })
3045
+ !p && c && /* @__PURE__ */ n("p", { className: b, children: f })
3068
3046
  ] }),
3069
- o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3047
+ l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
3070
3048
  ] }),
3071
- l && /* @__PURE__ */ n(ur, { variant: e, cta: l })
3049
+ o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
3072
3050
  ] });
3073
- }, gr = y(
3051
+ }, hr = _(
3074
3052
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3075
3053
  // 1px hairline border that sits flush with the card chrome — matches
3076
3054
  // the messaging design system's "small border around link attachments"
3077
3055
  // treatment from the mobile spec. The drop shadow remains for depth.
3078
3056
  "border border-black/[0.08]",
3079
3057
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
3080
- ), De = ({
3058
+ ), Le = ({
3081
3059
  variant: e,
3082
3060
  children: t,
3083
3061
  href: s,
3084
3062
  onClick: a,
3085
3063
  ariaLabel: r,
3086
3064
  rootRef: i,
3087
- topRight: l,
3088
- bgClassName: o,
3065
+ topRight: o,
3066
+ bgClassName: l,
3089
3067
  "data-testid": d
3090
3068
  }) => {
3091
- const m = s != null || a != null, g = y(
3092
- gr,
3093
- o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3069
+ const m = s != null || a != null, g = _(
3070
+ hr,
3071
+ l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3094
3072
  // `focus-ring` is a design-system utility from the component-library
3095
3073
  // tailwind preset — outline-none + a black 2px focus-visible ring
3096
3074
  // with offset, so keyboard users can see the focused card.
3097
3075
  m ? "cursor-pointer no-underline focus-ring" : null
3098
- ), u = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3076
+ ), u = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
3099
3077
  return s ? /* @__PURE__ */ h(
3100
3078
  "a",
3101
3079
  {
@@ -3119,7 +3097,7 @@ const dr = {
3119
3097
  onClick: a,
3120
3098
  "aria-label": r,
3121
3099
  "data-testid": d,
3122
- className: y(g, "text-left"),
3100
+ className: _(g, "text-left"),
3123
3101
  children: [
3124
3102
  t,
3125
3103
  u
@@ -3137,27 +3115,27 @@ const dr = {
3137
3115
  ]
3138
3116
  }
3139
3117
  );
3140
- }, br = {
3118
+ }, fr = {
3141
3119
  dark: "bg-white/10",
3142
3120
  light: "bg-black/5"
3143
- }, pr = {
3121
+ }, gr = {
3144
3122
  dark: "size-16 text-white/25",
3145
3123
  light: "size-16 text-black/25"
3146
- }, Oe = (e, t) => !!t && !!e && ie(e) === "audio", bn = (e, t) => {
3124
+ }, ze = (e, t) => !!t && !!e && ie(e) === "audio", gn = (e, t) => {
3147
3125
  if (!t || !e) return !1;
3148
3126
  const s = ie(e);
3149
3127
  return s === "video" || s === "audio";
3150
- }, it = "bg-[#F2F3F4]", ze = ({
3128
+ }, it = "bg-[#F2F3F4]", De = ({
3151
3129
  variant: e,
3152
3130
  thumbnailUrl: t,
3153
3131
  sourceUrl: s,
3154
3132
  title: a,
3155
3133
  mimeType: r = "image/*",
3156
3134
  topLeft: i,
3157
- topRight: l
3135
+ topRight: o
3158
3136
  }) => {
3159
- const o = ie(r), d = !!s && o === "video";
3160
- return Oe(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3137
+ const l = ie(r), d = !!s && l === "video";
3138
+ return ze(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3161
3139
  "audio",
3162
3140
  {
3163
3141
  src: s,
@@ -3169,7 +3147,7 @@ const dr = {
3169
3147
  ) }) : /* @__PURE__ */ h(
3170
3148
  "div",
3171
3149
  {
3172
- className: y(
3150
+ className: _(
3173
3151
  "relative h-[180px] w-full overflow-hidden",
3174
3152
  d && "bg-black"
3175
3153
  ),
@@ -3196,36 +3174,36 @@ const dr = {
3196
3174
  ) : /* @__PURE__ */ n(
3197
3175
  "div",
3198
3176
  {
3199
- className: y(
3177
+ className: _(
3200
3178
  "flex h-full w-full items-center justify-center",
3201
- br[e]
3179
+ fr[e]
3202
3180
  ),
3203
3181
  children: ce(r, {
3204
- className: pr[e],
3182
+ className: gr[e],
3205
3183
  weight: "regular"
3206
3184
  })
3207
3185
  }
3208
3186
  ),
3209
3187
  i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
3210
- l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
3188
+ o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null
3211
3189
  ]
3212
3190
  }
3213
3191
  );
3214
- }, vr = ({
3192
+ }, pr = ({
3215
3193
  title: e,
3216
3194
  placeholderTitle: t,
3217
3195
  description: s,
3218
3196
  url: a,
3219
3197
  mimeType: r,
3220
3198
  thumbnailUrl: i,
3221
- sourceUrl: l,
3222
- layout: o = "featured",
3199
+ sourceUrl: o,
3200
+ layout: l = "featured",
3223
3201
  appIcon: d,
3224
3202
  cta: m,
3225
3203
  onDismiss: g,
3226
3204
  onEditClick: u
3227
3205
  }) => {
3228
- const f = o === "classic", c = Oe(r, l), b = g ? /* @__PURE__ */ n(
3206
+ const f = l === "classic", c = ze(r, o), p = g ? /* @__PURE__ */ n(
3229
3207
  "button",
3230
3208
  {
3231
3209
  type: "button",
@@ -3241,35 +3219,35 @@ const dr = {
3241
3219
  onClick: u,
3242
3220
  "aria-label": "Edit attachment",
3243
3221
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3244
- children: /* @__PURE__ */ n(zs, { className: "size-5", weight: "regular" })
3222
+ children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3245
3223
  }
3246
3224
  ) : void 0;
3247
- return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: it, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3225
+ return c ? /* @__PURE__ */ n(Le, { variant: "dark", bgClassName: it, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3248
3226
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3249
- ze,
3227
+ De,
3250
3228
  {
3251
3229
  variant: "dark",
3252
- sourceUrl: l,
3230
+ sourceUrl: o,
3253
3231
  title: e,
3254
3232
  mimeType: r
3255
3233
  }
3256
3234
  ) }),
3257
- b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3235
+ p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
3258
3236
  ] }) }) : /* @__PURE__ */ h(
3259
- De,
3237
+ Le,
3260
3238
  {
3261
3239
  variant: "dark",
3262
- topRight: f ? b : void 0,
3240
+ topRight: f ? p : void 0,
3263
3241
  children: [
3264
3242
  !f && /* @__PURE__ */ n(
3265
- ze,
3243
+ De,
3266
3244
  {
3267
3245
  variant: "dark",
3268
3246
  thumbnailUrl: i,
3269
- sourceUrl: l,
3247
+ sourceUrl: o,
3270
3248
  title: e,
3271
3249
  mimeType: r,
3272
- topRight: b
3250
+ topRight: p
3273
3251
  }
3274
3252
  ),
3275
3253
  /* @__PURE__ */ n(
@@ -3288,19 +3266,19 @@ const dr = {
3288
3266
  ]
3289
3267
  }
3290
3268
  );
3291
- }, xr = ({
3269
+ }, br = ({
3292
3270
  title: e,
3293
3271
  description: t,
3294
3272
  url: s,
3295
3273
  mimeType: a,
3296
3274
  thumbnailUrl: r,
3297
3275
  sourceUrl: i,
3298
- layout: l = "featured",
3299
- appIcon: o,
3276
+ layout: o = "featured",
3277
+ appIcon: l,
3300
3278
  cta: d,
3301
3279
  onClick: m
3302
3280
  }) => {
3303
- const g = bn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Oe(a, i) ? it : void 0, N = d && m ? {
3281
+ const g = gn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = ze(a, i) ? it : void 0, N = d && m ? {
3304
3282
  ...d,
3305
3283
  onClick: () => {
3306
3284
  var w;
@@ -3308,17 +3286,17 @@ const dr = {
3308
3286
  }
3309
3287
  } : d;
3310
3288
  return /* @__PURE__ */ h(
3311
- De,
3289
+ Le,
3312
3290
  {
3313
3291
  variant: "light",
3314
3292
  href: f,
3315
3293
  onClick: c,
3316
3294
  ariaLabel: e ?? "Open attachment preview",
3317
- bgClassName: b,
3295
+ bgClassName: p,
3318
3296
  "data-testid": "link-attachment",
3319
3297
  children: [
3320
- l === "featured" && /* @__PURE__ */ n(
3321
- ze,
3298
+ o === "featured" && /* @__PURE__ */ n(
3299
+ De,
3322
3300
  {
3323
3301
  variant: "light",
3324
3302
  thumbnailUrl: r,
@@ -3334,41 +3312,41 @@ const dr = {
3334
3312
  title: e,
3335
3313
  description: t,
3336
3314
  url: s,
3337
- appIcon: o,
3315
+ appIcon: l,
3338
3316
  cta: N
3339
3317
  }
3340
3318
  )
3341
3319
  ]
3342
3320
  }
3343
3321
  );
3344
- }, wr = ({
3322
+ }, vr = ({
3345
3323
  title: e,
3346
3324
  placeholderTitle: t,
3347
3325
  description: s,
3348
3326
  url: a,
3349
3327
  mimeType: r,
3350
3328
  thumbnailUrl: i,
3351
- sourceUrl: l,
3352
- layout: o = "featured",
3329
+ sourceUrl: o,
3330
+ layout: l = "featured",
3353
3331
  appIcon: d,
3354
3332
  cta: m,
3355
3333
  onClick: g
3356
3334
  }) => {
3357
- const u = bn(r, l), f = at(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3335
+ const u = gn(r, o), f = at(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
3358
3336
  return /* @__PURE__ */ h(
3359
- De,
3337
+ Le,
3360
3338
  {
3361
3339
  variant: "dark",
3362
3340
  href: c,
3363
- onClick: b,
3364
- bgClassName: Oe(r, l) ? it : void 0,
3341
+ onClick: p,
3342
+ bgClassName: ze(r, o) ? it : void 0,
3365
3343
  children: [
3366
- o === "featured" && /* @__PURE__ */ n(
3367
- ze,
3344
+ l === "featured" && /* @__PURE__ */ n(
3345
+ De,
3368
3346
  {
3369
3347
  variant: "dark",
3370
3348
  thumbnailUrl: i,
3371
- sourceUrl: l,
3349
+ sourceUrl: o,
3372
3350
  title: e,
3373
3351
  mimeType: r
3374
3352
  }
@@ -3388,20 +3366,20 @@ const dr = {
3388
3366
  ]
3389
3367
  }
3390
3368
  );
3391
- }, Ti = {
3392
- Composer: vr,
3393
- Sent: wr,
3394
- Received: xr
3395
- }, Nr = {
3369
+ }, Ii = {
3370
+ Composer: pr,
3371
+ Sent: vr,
3372
+ Received: br
3373
+ }, xr = {
3396
3374
  dark: "bg-[#121110]",
3397
3375
  light: "bg-[#e9eaed]"
3398
- }, _r = {
3376
+ }, wr = {
3399
3377
  dark: "text-white",
3400
3378
  light: "text-[#080707]"
3401
- }, yr = {
3379
+ }, Nr = {
3402
3380
  dark: "border-white/[0.08]",
3403
3381
  light: "border-black/[0.08]"
3404
- }, kr = (e) => e === "dark" ? "sender" : "receiver", Cr = {
3382
+ }, _r = (e) => e === "dark" ? "sender" : "receiver", yr = {
3405
3383
  sender: {
3406
3384
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3407
3385
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3421,15 +3399,15 @@ const dr = {
3421
3399
  groupPosition: a = "single",
3422
3400
  className: r,
3423
3401
  children: i,
3424
- "data-testid": l
3402
+ "data-testid": o
3425
3403
  }) => {
3426
- const o = t != null && t !== "", d = Cr[kr(e)][a];
3404
+ const l = t != null && t !== "", d = yr[_r(e)][a];
3427
3405
  return /* @__PURE__ */ h(
3428
3406
  "div",
3429
3407
  {
3430
- "data-testid": l,
3408
+ "data-testid": o,
3431
3409
  "data-group-position": a,
3432
- className: y(
3410
+ className: _(
3433
3411
  // 280px-wide bubble — matches the mobile chat attachment width
3434
3412
  // and keeps the document / image / audio bubbles visually
3435
3413
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3438,18 +3416,18 @@ const dr = {
3438
3416
  // as the surrounding `CustomMessage` text bubbles.
3439
3417
  "relative w-[280px] overflow-hidden px-2 py-2",
3440
3418
  d,
3441
- Nr[e],
3442
- _r[e],
3419
+ xr[e],
3420
+ wr[e],
3443
3421
  s && "border",
3444
- s && yr[e],
3422
+ s && Nr[e],
3445
3423
  r
3446
3424
  ),
3447
3425
  children: [
3448
3426
  i,
3449
- o ? /* @__PURE__ */ n(
3427
+ l ? /* @__PURE__ */ n(
3450
3428
  "p",
3451
3429
  {
3452
- className: y(
3430
+ className: _(
3453
3431
  // No `text-*` / `font-*` overrides here — caption inherits
3454
3432
  // the same font family + size as `.str-chat__message-text`
3455
3433
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3478,22 +3456,22 @@ const dr = {
3478
3456
  a.stopPropagation(), e();
3479
3457
  },
3480
3458
  "aria-label": s,
3481
- className: y(
3459
+ className: _(
3482
3460
  "flex size-6 items-center justify-center rounded-full text-white",
3483
3461
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3484
3462
  ),
3485
3463
  children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3486
3464
  }
3487
- ), Ee = (e) => e === "received" ? "light" : "dark", Ai = ({
3465
+ ), Ee = (e) => e === "received" ? "light" : "dark", Si = ({
3488
3466
  firstOfGroup: e,
3489
3467
  endOfGroup: t,
3490
3468
  groupedByUser: s
3491
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Er = ({
3469
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", kr = ({
3492
3470
  src: e,
3493
3471
  mimeType: t,
3494
3472
  filename: s,
3495
3473
  items: a
3496
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Ir = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3474
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3497
3475
  /* @__PURE__ */ n(
3498
3476
  "audio",
3499
3477
  {
@@ -3512,45 +3490,45 @@ const dr = {
3512
3490
  filename: a,
3513
3491
  items: r,
3514
3492
  text: i,
3515
- groupPosition: l,
3516
- preload: o,
3493
+ groupPosition: o,
3494
+ preload: l,
3517
3495
  onDismiss: d
3518
3496
  }) => {
3519
- const m = Ee(e), g = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3497
+ const m = Ee(e), g = e === "composer" && !!d, u = kr({ src: t, mimeType: s, filename: a, items: r });
3520
3498
  if (u.length === 0)
3521
3499
  return null;
3522
- const f = o ?? (u.length > 1 ? "none" : "metadata");
3500
+ const f = l ?? (u.length > 1 ? "none" : "metadata");
3523
3501
  return /* @__PURE__ */ n(
3524
3502
  ke,
3525
3503
  {
3526
3504
  variant: m,
3527
3505
  text: i,
3528
- groupPosition: l,
3506
+ groupPosition: o,
3529
3507
  "data-testid": "audio-attachment",
3530
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
3531
- Ir,
3508
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
3509
+ Cr,
3532
3510
  {
3533
3511
  item: c,
3534
3512
  preload: f,
3535
3513
  trailingAction: (
3536
3514
  // Composer only supports a single attachment, so the
3537
3515
  // dismiss control sits on the only player.
3538
- g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3516
+ g && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3539
3517
  )
3540
3518
  },
3541
- `${c.src}-${b}`
3519
+ `${c.src}-${p}`
3542
3520
  )) })
3543
3521
  }
3544
3522
  );
3545
- }, Sr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Mr = {
3546
- Composer: Sr,
3547
- Sent: Tr,
3548
- Received: Ar
3523
+ }, Er = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Tr = {
3524
+ Composer: Er,
3525
+ Sent: Ir,
3526
+ Received: Sr
3549
3527
  };
3550
- function Rr(e) {
3528
+ function Ar(e) {
3551
3529
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
3552
3530
  }
3553
- const Lr = {
3531
+ const Mr = {
3554
3532
  pdf: "PDF",
3555
3533
  doc: "DOC",
3556
3534
  xls: "XLS",
@@ -3560,7 +3538,7 @@ const Lr = {
3560
3538
  text: "TXT",
3561
3539
  markdown: "MD"
3562
3540
  };
3563
- function Dr(e, t) {
3541
+ function Rr(e, t) {
3564
3542
  if (t) {
3565
3543
  const r = t.lastIndexOf(".");
3566
3544
  if (r > 0 && r < t.length - 1) {
@@ -3570,7 +3548,7 @@ function Dr(e, t) {
3570
3548
  }
3571
3549
  if (!e) return;
3572
3550
  if (ie(e) === "document") {
3573
- const r = tn(e), i = Lr[r];
3551
+ const r = tn(e), i = Mr[r];
3574
3552
  if (i) return i;
3575
3553
  if (e === "application/octet-stream") return;
3576
3554
  }
@@ -3578,8 +3556,8 @@ function Dr(e, t) {
3578
3556
  if (!(!a || a === "*"))
3579
3557
  return a.toUpperCase();
3580
3558
  }
3581
- function zr(e, t, s) {
3582
- const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Rr(s) : void 0;
3559
+ function Lr(e, t, s) {
3560
+ const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3583
3561
  return [a, r].filter(Boolean).join(" · ") || void 0;
3584
3562
  }
3585
3563
  function ae(e) {
@@ -3590,13 +3568,13 @@ function ae(e) {
3590
3568
  return "download";
3591
3569
  }
3592
3570
  }
3593
- const Pr = {
3571
+ const Dr = {
3594
3572
  dark: "text-white/55",
3595
3573
  light: "text-black/65"
3596
- }, Or = {
3574
+ }, Pr = {
3597
3575
  dark: "bg-white/10",
3598
3576
  light: "bg-black/5"
3599
- }, $r = {
3577
+ }, zr = {
3600
3578
  dark: "text-white/85",
3601
3579
  light: "text-black/85"
3602
3580
  }, pn = ({
@@ -3606,19 +3584,19 @@ const Pr = {
3606
3584
  mimeType: a = "application/octet-stream",
3607
3585
  fileSize: r,
3608
3586
  onActivate: i,
3609
- activateLabel: l,
3610
- trailingAction: o
3587
+ activateLabel: o,
3588
+ trailingAction: l
3611
3589
  }) => {
3612
- const d = s ?? t ?? "File", m = zr(a, t, r), g = /* @__PURE__ */ n(
3590
+ const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3613
3591
  "div",
3614
3592
  {
3615
- className: y(
3593
+ className: _(
3616
3594
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3617
- Or[e]
3595
+ Pr[e]
3618
3596
  ),
3619
3597
  "aria-hidden": !0,
3620
3598
  children: ce(a, {
3621
- className: y("size-6", $r[e]),
3599
+ className: _("size-6", zr[e]),
3622
3600
  weight: "regular"
3623
3601
  })
3624
3602
  }
@@ -3627,9 +3605,9 @@ const Pr = {
3627
3605
  m ? /* @__PURE__ */ n(
3628
3606
  "p",
3629
3607
  {
3630
- className: y(
3608
+ className: _(
3631
3609
  "truncate text-xs leading-4",
3632
- Pr[e]
3610
+ Dr[e]
3633
3611
  ),
3634
3612
  children: m
3635
3613
  }
@@ -3639,8 +3617,8 @@ const Pr = {
3639
3617
  {
3640
3618
  type: "button",
3641
3619
  onClick: i,
3642
- "aria-label": l,
3643
- className: y(
3620
+ "aria-label": o,
3621
+ className: _(
3644
3622
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3645
3623
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3646
3624
  ),
@@ -3655,16 +3633,16 @@ const Pr = {
3655
3633
  ] });
3656
3634
  return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
3657
3635
  f,
3658
- o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3636
+ l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3659
3637
  ] });
3660
3638
  };
3661
- async function vn(e, t) {
3639
+ async function bn(e, t) {
3662
3640
  const s = t ?? ae(e);
3663
3641
  try {
3664
3642
  const a = await fetch(e, { mode: "cors" });
3665
3643
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
3666
- const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
3667
- l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
3644
+ const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
3645
+ o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
3668
3646
  } catch {
3669
3647
  if (!window.open(e, "_blank", "noopener,noreferrer")) {
3670
3648
  const r = document.createElement("a");
@@ -3672,14 +3650,14 @@ async function vn(e, t) {
3672
3650
  }
3673
3651
  }
3674
3652
  }
3675
- const Fr = ({
3653
+ const Or = ({
3676
3654
  src: e,
3677
3655
  filename: t,
3678
3656
  fileSize: s,
3679
3657
  mimeType: a,
3680
3658
  title: r,
3681
3659
  items: i
3682
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Br = ({
3660
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
3683
3661
  variant: e,
3684
3662
  item: t,
3685
3663
  index: s,
@@ -3707,32 +3685,32 @@ const Fr = ({
3707
3685
  fileSize: a,
3708
3686
  mimeType: r,
3709
3687
  title: i,
3710
- items: l,
3711
- text: o,
3688
+ items: o,
3689
+ text: l,
3712
3690
  groupPosition: d,
3713
3691
  onClick: m,
3714
3692
  onDismiss: g
3715
3693
  }) => {
3716
- const u = Ee(e), f = e === "composer" && !!g, c = Fr({
3694
+ const u = Ee(e), f = e === "composer" && !!g, c = Or({
3717
3695
  src: t,
3718
3696
  filename: s,
3719
3697
  fileSize: a,
3720
3698
  mimeType: r,
3721
3699
  title: i,
3722
- items: l
3723
- }), b = (w) => {
3700
+ items: o
3701
+ }), p = (w) => {
3724
3702
  if ((m == null ? void 0 : m(w)) === !1) return;
3725
- const p = c[w];
3726
- if (!p) return;
3727
- const v = p.filename ?? ae(p.src);
3728
- vn(p.src, v);
3703
+ const b = c[w];
3704
+ if (!b) return;
3705
+ const v = b.filename ?? ae(b.src);
3706
+ bn(b.src, v);
3729
3707
  };
3730
3708
  if (c.length === 0)
3731
3709
  return null;
3732
3710
  const N = /* @__PURE__ */ n(
3733
3711
  "span",
3734
3712
  {
3735
- className: y(
3713
+ className: _(
3736
3714
  "flex size-8 items-center justify-center rounded-full",
3737
3715
  u === "dark" ? "text-white/70" : "text-black/70"
3738
3716
  ),
@@ -3744,26 +3722,26 @@ const Fr = ({
3744
3722
  ke,
3745
3723
  {
3746
3724
  variant: u,
3747
- text: o,
3725
+ text: l,
3748
3726
  groupPosition: d,
3749
3727
  "data-testid": "file-attachment",
3750
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, p) => /* @__PURE__ */ n(
3751
- Br,
3728
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, b) => /* @__PURE__ */ n(
3729
+ $r,
3752
3730
  {
3753
3731
  variant: u,
3754
3732
  item: w,
3755
- index: p,
3756
- onActivate: b,
3757
- trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3733
+ index: b,
3734
+ onActivate: p,
3735
+ trailingAction: f && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3758
3736
  },
3759
- `${w.src}-${p}`
3737
+ `${w.src}-${b}`
3760
3738
  )) })
3761
3739
  }
3762
3740
  );
3763
- }, Ur = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), jr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Vr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), Gr = {
3764
- Composer: Ur,
3765
- Sent: jr,
3766
- Received: Vr
3741
+ }, Fr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), jr = {
3742
+ Composer: Fr,
3743
+ Sent: Br,
3744
+ Received: Ur
3767
3745
  }, ct = ({
3768
3746
  onPrev: e,
3769
3747
  onNext: t,
@@ -3777,7 +3755,7 @@ const Fr = ({
3777
3755
  onClick: e,
3778
3756
  "aria-label": s,
3779
3757
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3780
- children: /* @__PURE__ */ n(Ps, { size: 20, weight: "bold", "aria-hidden": !0 })
3758
+ children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3781
3759
  }
3782
3760
  ),
3783
3761
  /* @__PURE__ */ n(
@@ -3790,24 +3768,24 @@ const Fr = ({
3790
3768
  children: /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3791
3769
  }
3792
3770
  )
3793
- ] }), xn = ({
3771
+ ] }), vn = ({
3794
3772
  url: e,
3795
3773
  filename: t,
3796
3774
  variant: s = "pill",
3797
3775
  label: a = "Download",
3798
3776
  iconOnly: r,
3799
3777
  tone: i = "dark",
3800
- onTriggered: l
3778
+ onTriggered: o
3801
3779
  }) => {
3802
- const [o, d] = $(!1), m = J(
3780
+ const [l, d] = F(!1), m = J(
3803
3781
  (c) => {
3804
- c.stopPropagation(), !o && (d(!0), vn(e, t).catch(() => {
3782
+ c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3805
3783
  }).finally(() => {
3806
- d(!1), l == null || l();
3784
+ d(!1), o == null || o();
3807
3785
  }));
3808
3786
  },
3809
- [o, e, t, l]
3810
- ), g = r ?? s !== "pill", f = { className: y(
3787
+ [l, e, t, o]
3788
+ ), g = r ?? s !== "pill", f = { className: _(
3811
3789
  s === "pill" ? "size-4" : "size-5",
3812
3790
  "shrink-0"
3813
3791
  ), weight: "bold" };
@@ -3816,16 +3794,16 @@ const Fr = ({
3816
3794
  {
3817
3795
  type: "button",
3818
3796
  onClick: m,
3819
- disabled: o,
3797
+ disabled: l,
3820
3798
  "aria-label": a,
3821
- className: y(
3799
+ className: _(
3822
3800
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3823
3801
  {
3824
3802
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
3825
3803
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
3826
3804
  }[i]
3827
3805
  ),
3828
- children: o ? /* @__PURE__ */ n(
3806
+ children: l ? /* @__PURE__ */ n(
3829
3807
  we,
3830
3808
  {
3831
3809
  className: "size-4 animate-spin",
@@ -3846,24 +3824,24 @@ const Fr = ({
3846
3824
  {
3847
3825
  type: "button",
3848
3826
  onClick: m,
3849
- disabled: o,
3827
+ disabled: l,
3850
3828
  "aria-label": a,
3851
3829
  className: "mes-media-viewer__action",
3852
- children: o ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
3830
+ children: l ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
3853
3831
  }
3854
3832
  ) : /* @__PURE__ */ h(
3855
3833
  "button",
3856
3834
  {
3857
3835
  type: "button",
3858
3836
  onClick: m,
3859
- disabled: o,
3837
+ disabled: l,
3860
3838
  "aria-label": g ? a : void 0,
3861
- className: y(
3839
+ className: _(
3862
3840
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
3863
3841
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3864
3842
  ),
3865
3843
  children: [
3866
- o ? /* @__PURE__ */ n(
3844
+ l ? /* @__PURE__ */ n(
3867
3845
  we,
3868
3846
  {
3869
3847
  className: "size-4 animate-spin",
@@ -3875,20 +3853,20 @@ const Fr = ({
3875
3853
  ]
3876
3854
  }
3877
3855
  );
3878
- }, Ge = (e, t, s) => Math.min(Math.max(e, t), s), dt = ({
3856
+ }, Ve = (e, t, s) => Math.min(Math.max(e, t), s), dt = ({
3879
3857
  length: e,
3880
3858
  initialIndex: t,
3881
3859
  open: s
3882
3860
  }) => {
3883
- const a = Ge(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3861
+ const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
3884
3862
  K(() => {
3885
- s && i(Ge(t, 0, Math.max(e - 1, 0)));
3863
+ s && i(Ve(t, 0, Math.max(e - 1, 0)));
3886
3864
  }, [s, t, e]), K(() => {
3887
- i((d) => Ge(d, 0, Math.max(e - 1, 0)));
3865
+ i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3888
3866
  }, [e]);
3889
- const l = J(() => {
3867
+ const o = J(() => {
3890
3868
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3891
- }, [e]), o = J(() => {
3869
+ }, [e]), l = J(() => {
3892
3870
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3893
3871
  }, [e]);
3894
3872
  return K(() => {
@@ -3896,10 +3874,10 @@ const Fr = ({
3896
3874
  const d = (m) => {
3897
3875
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
3898
3876
  const g = document.activeElement;
3899
- g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? l() : o());
3877
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
3900
3878
  };
3901
3879
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3902
- }, [s, e, l, o]), { index: r, prev: l, next: o };
3880
+ }, [s, e, o, l]), { index: r, prev: o, next: l };
3903
3881
  }, ut = ({
3904
3882
  open: e,
3905
3883
  onClose: t,
@@ -3907,12 +3885,12 @@ const Fr = ({
3907
3885
  counter: a,
3908
3886
  actions: r,
3909
3887
  children: i,
3910
- "data-testid": l
3888
+ "data-testid": o
3911
3889
  }) => {
3912
- const o = Y(null), d = Y(null);
3890
+ const l = Y(null), d = Y(null);
3913
3891
  return K(() => {
3914
3892
  var f;
3915
- const u = o.current;
3893
+ const u = l.current;
3916
3894
  if (u) {
3917
3895
  if (e) {
3918
3896
  if (!u.open)
@@ -3958,15 +3936,15 @@ const Fr = ({
3958
3936
  /* @__PURE__ */ h(
3959
3937
  "dialog",
3960
3938
  {
3961
- ref: o,
3939
+ ref: l,
3962
3940
  className: "mes-media-viewer",
3963
3941
  "aria-label": s ?? "Attachment viewer",
3964
- "data-testid": l,
3942
+ "data-testid": o,
3965
3943
  onClose: () => {
3966
3944
  t();
3967
3945
  },
3968
3946
  onClick: (u) => {
3969
- u.target === o.current && t();
3947
+ u.target === l.current && t();
3970
3948
  },
3971
3949
  children: [
3972
3950
  /* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
@@ -3990,21 +3968,21 @@ const Fr = ({
3990
3968
  ]
3991
3969
  }
3992
3970
  );
3993
- }, wn = ({
3971
+ }, xn = ({
3994
3972
  open: e,
3995
3973
  items: t,
3996
3974
  initialIndex: s = 0,
3997
3975
  onClose: a
3998
3976
  }) => {
3999
- const { index: r, prev: i, next: l } = dt({
3977
+ const { index: r, prev: i, next: o } = dt({
4000
3978
  length: t.length,
4001
3979
  initialIndex: s,
4002
3980
  open: e
4003
- }), o = t[r], d = re(
4004
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
4005
- [o]
3981
+ }), l = t[r], d = re(
3982
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "image"),
3983
+ [l]
4006
3984
  );
4007
- return o ? /* @__PURE__ */ h(
3985
+ return l ? /* @__PURE__ */ h(
4008
3986
  ut,
4009
3987
  {
4010
3988
  open: e,
@@ -4012,9 +3990,9 @@ const Fr = ({
4012
3990
  ariaLabel: d,
4013
3991
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
4014
3992
  actions: /* @__PURE__ */ n(
4015
- xn,
3993
+ vn,
4016
3994
  {
4017
- url: o.src,
3995
+ url: l.src,
4018
3996
  filename: d,
4019
3997
  variant: "viewer",
4020
3998
  label: `Download ${d}`
@@ -4025,20 +4003,20 @@ const Fr = ({
4025
4003
  /* @__PURE__ */ n(
4026
4004
  "img",
4027
4005
  {
4028
- src: o.src,
4029
- alt: o.alt ?? d,
4006
+ src: l.src,
4007
+ alt: l.alt ?? d,
4030
4008
  draggable: !1,
4031
4009
  loading: "eager",
4032
4010
  decoding: "async",
4033
4011
  className: "mes-media-viewer__image"
4034
4012
  },
4035
- `${r}:${o.src}`
4013
+ `${r}:${l.src}`
4036
4014
  ),
4037
4015
  t.length > 1 ? /* @__PURE__ */ n(
4038
4016
  ct,
4039
4017
  {
4040
4018
  onPrev: i,
4041
- onNext: l,
4019
+ onNext: o,
4042
4020
  prevLabel: "Previous image",
4043
4021
  nextLabel: "Next image"
4044
4022
  }
@@ -4046,7 +4024,7 @@ const Fr = ({
4046
4024
  ]
4047
4025
  }
4048
4026
  ) : null;
4049
- }, Hr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Nn = ({
4027
+ }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", wn = ({
4050
4028
  tiles: e,
4051
4029
  onTileActivate: t,
4052
4030
  maxVisible: s = 4,
@@ -4054,15 +4032,15 @@ const Fr = ({
4054
4032
  }) => {
4055
4033
  const r = e.length;
4056
4034
  if (r === 0) return null;
4057
- const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, m, g) => {
4058
- const u = y(Hr, "h-full w-full");
4035
+ const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
4036
+ const u = _(Vr, "h-full w-full");
4059
4037
  return t ? /* @__PURE__ */ h(
4060
4038
  "button",
4061
4039
  {
4062
4040
  type: "button",
4063
4041
  onClick: () => t(m),
4064
4042
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
4065
- className: y(u, "cursor-zoom-in"),
4043
+ className: _(u, "cursor-zoom-in"),
4066
4044
  children: [
4067
4045
  d.content,
4068
4046
  g
@@ -4074,57 +4052,57 @@ const Fr = ({
4074
4052
  g
4075
4053
  ] }, m);
4076
4054
  };
4077
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4055
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: _("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4078
4056
  "div",
4079
4057
  {
4080
- className: y(
4058
+ className: _(
4081
4059
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
4082
4060
  a
4083
4061
  ),
4084
- children: i.map((d, m) => o(d, m))
4062
+ children: i.map((d, m) => l(d, m))
4085
4063
  }
4086
4064
  ) : i.length === 3 ? /* @__PURE__ */ h(
4087
4065
  "div",
4088
4066
  {
4089
- className: y(
4067
+ className: _(
4090
4068
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4091
4069
  a
4092
4070
  ),
4093
4071
  children: [
4094
- /* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
4095
- o(i[1], 1),
4096
- o(i[2], 2)
4072
+ /* @__PURE__ */ n("div", { className: "row-span-2", children: l(i[0], 0) }),
4073
+ l(i[1], 1),
4074
+ l(i[2], 2)
4097
4075
  ]
4098
4076
  }
4099
4077
  ) : /* @__PURE__ */ n(
4100
4078
  "div",
4101
4079
  {
4102
- className: y(
4080
+ className: _(
4103
4081
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4104
4082
  a
4105
4083
  ),
4106
4084
  children: i.map((d, m) => {
4107
- const g = l > 0 && m === i.length - 1;
4108
- return o(
4085
+ const g = o > 0 && m === i.length - 1;
4086
+ return l(
4109
4087
  d,
4110
4088
  m,
4111
4089
  g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4112
4090
  "+",
4113
- l
4091
+ o
4114
4092
  ] }) : null
4115
4093
  );
4116
4094
  })
4117
4095
  }
4118
4096
  );
4119
4097
  }, Ie = (e) => {
4120
- const [t, s] = $(!1), [a, r] = $(0), i = J(
4121
- (o) => {
4122
- (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4098
+ const [t, s] = F(!1), [a, r] = F(0), i = J(
4099
+ (l) => {
4100
+ (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4123
4101
  },
4124
4102
  [e]
4125
- ), l = J(() => s(!1), []);
4126
- return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4127
- }, Yr = (e, t, s, a) => ({
4103
+ ), o = J(() => s(!1), []);
4104
+ return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4105
+ }, Gr = (e, t, s, a) => ({
4128
4106
  ariaLabel: `Open image ${t + 1} of ${s}`,
4129
4107
  content: /* @__PURE__ */ n(
4130
4108
  "img",
@@ -4139,16 +4117,16 @@ const Fr = ({
4139
4117
  className: "absolute inset-0 size-full rounded-md object-cover"
4140
4118
  }
4141
4119
  )
4142
- }), qr = ({
4120
+ }), Hr = ({
4143
4121
  src: e,
4144
4122
  alt: t,
4145
4123
  items: s
4146
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], _n = (e, t) => e.map((s, a) => ({
4124
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Nn = (e, t) => e.map((s, a) => ({
4147
4125
  src: s.src,
4148
4126
  alt: s.alt,
4149
4127
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4150
- })), Wr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4151
- const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Ie(
4128
+ })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4129
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ie(
4152
4130
  r
4153
4131
  );
4154
4132
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4174,77 +4152,77 @@ const Fr = ({
4174
4152
  ),
4175
4153
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: i }) }) : null,
4176
4154
  /* @__PURE__ */ n(
4177
- wn,
4155
+ xn,
4178
4156
  {
4179
- open: l,
4180
- items: _n([{ src: e, alt: t }], s),
4181
- initialIndex: o,
4157
+ open: o,
4158
+ items: Nn([{ src: e, alt: t }], s),
4159
+ initialIndex: l,
4182
4160
  onClose: m
4183
4161
  }
4184
4162
  )
4185
4163
  ] });
4186
- }, yn = ({
4164
+ }, _n = ({
4187
4165
  state: e,
4188
4166
  src: t,
4189
4167
  alt: s,
4190
4168
  filename: a,
4191
4169
  items: r,
4192
4170
  text: i,
4193
- groupPosition: l,
4194
- loading: o = "lazy",
4171
+ groupPosition: o,
4172
+ loading: l = "lazy",
4195
4173
  onClick: d
4196
4174
  }) => {
4197
- const m = qr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = Ie(
4175
+ const m = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ie(
4198
4176
  d
4199
4177
  );
4200
4178
  if (m.length === 0)
4201
4179
  return null;
4202
4180
  const N = m.map(
4203
- (w, p) => Yr(w, p, m.length, o)
4181
+ (w, b) => Gr(w, b, m.length, l)
4204
4182
  );
4205
4183
  return /* @__PURE__ */ h(
4206
4184
  ke,
4207
4185
  {
4208
4186
  variant: g,
4209
4187
  text: i,
4210
- groupPosition: l,
4188
+ groupPosition: o,
4211
4189
  "data-testid": "image-attachment",
4212
4190
  children: [
4213
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Nn, { tiles: N, onTileActivate: c }) }),
4191
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: N, onTileActivate: c }) }),
4214
4192
  /* @__PURE__ */ n(
4215
- wn,
4193
+ xn,
4216
4194
  {
4217
4195
  open: u,
4218
- items: _n(m, a),
4196
+ items: Nn(m, a),
4219
4197
  initialIndex: f,
4220
- onClose: b
4198
+ onClose: p
4221
4199
  }
4222
4200
  )
4223
4201
  ]
4224
4202
  }
4225
4203
  );
4226
- }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "received" }), Zr = {
4227
- Composer: Xr,
4228
- Sent: Kr,
4229
- Received: Jr
4230
- }, Qr = ({
4204
+ }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4205
+ Composer: qr,
4206
+ Sent: Wr,
4207
+ Received: Xr
4208
+ }, Jr = ({
4231
4209
  open: e,
4232
4210
  items: t,
4233
4211
  initialIndex: s = 0,
4234
4212
  onClose: a
4235
4213
  }) => {
4236
- const { index: r, prev: i, next: l } = dt({
4214
+ const { index: r, prev: i, next: o } = dt({
4237
4215
  length: t.length,
4238
4216
  initialIndex: s,
4239
4217
  open: e
4240
- }), o = t[r], d = re(
4241
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4242
- [o]
4218
+ }), l = t[r], d = re(
4219
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
4220
+ [l]
4243
4221
  ), m = re(
4244
- () => o ? ei(o.src) : void 0,
4245
- [o]
4222
+ () => l ? Zr(l.src) : void 0,
4223
+ [l]
4246
4224
  );
4247
- return !o || !m ? null : /* @__PURE__ */ h(
4225
+ return !l || !m ? null : /* @__PURE__ */ h(
4248
4226
  ut,
4249
4227
  {
4250
4228
  open: e,
@@ -4261,13 +4239,13 @@ const Fr = ({
4261
4239
  className: "mes-media-viewer__iframe",
4262
4240
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
4263
4241
  },
4264
- `${r}:${o.src}`
4242
+ `${r}:${l.src}`
4265
4243
  ),
4266
4244
  t.length > 1 ? /* @__PURE__ */ n(
4267
4245
  ct,
4268
4246
  {
4269
4247
  onPrev: i,
4270
- onNext: l,
4248
+ onNext: o,
4271
4249
  prevLabel: "Previous document",
4272
4250
  nextLabel: "Next document"
4273
4251
  }
@@ -4275,16 +4253,16 @@ const Fr = ({
4275
4253
  ]
4276
4254
  }
4277
4255
  );
4278
- }, ei = (e) => {
4256
+ }, Zr = (e) => {
4279
4257
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4280
4258
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4281
- }, ti = ({
4259
+ }, Qr = ({
4282
4260
  src: e,
4283
4261
  filename: t,
4284
4262
  fileSize: s,
4285
4263
  title: a,
4286
4264
  items: r
4287
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ni = ({
4265
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
4288
4266
  variant: e,
4289
4267
  item: t,
4290
4268
  index: s,
@@ -4312,17 +4290,17 @@ const Fr = ({
4312
4290
  fileSize: a,
4313
4291
  title: r,
4314
4292
  items: i,
4315
- text: l,
4316
- groupPosition: o,
4293
+ text: o,
4294
+ groupPosition: l,
4317
4295
  onClick: d,
4318
4296
  onDismiss: m
4319
4297
  }) => {
4320
- const g = Ee(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4298
+ const g = Ee(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ie(
4321
4299
  d
4322
4300
  ), w = e === "composer" && !!m;
4323
4301
  if (u.length === 0)
4324
4302
  return null;
4325
- const p = u.map((v) => ({
4303
+ const b = u.map((v) => ({
4326
4304
  src: v.src,
4327
4305
  filename: v.filename ?? ae(v.src)
4328
4306
  }));
@@ -4330,38 +4308,38 @@ const Fr = ({
4330
4308
  ke,
4331
4309
  {
4332
4310
  variant: g,
4333
- text: l,
4334
- groupPosition: o,
4311
+ text: o,
4312
+ groupPosition: l,
4335
4313
  "data-testid": "pdf-attachment",
4336
4314
  children: [
4337
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, A) => {
4338
- const E = v.filename ?? ae(v.src), I = w && A === 0 ? /* @__PURE__ */ n(Ce, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4339
- xn,
4315
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, M) => {
4316
+ const T = v.filename ?? ae(v.src), y = w && M === 0 ? /* @__PURE__ */ n(Ce, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4317
+ vn,
4340
4318
  {
4341
4319
  url: v.src,
4342
- filename: E,
4320
+ filename: T,
4343
4321
  variant: "inline",
4344
- label: `Download ${E}`,
4322
+ label: `Download ${T}`,
4345
4323
  tone: g
4346
4324
  }
4347
4325
  );
4348
4326
  return /* @__PURE__ */ n(
4349
- ni,
4327
+ ei,
4350
4328
  {
4351
4329
  variant: g,
4352
4330
  item: v,
4353
- index: A,
4354
- onActivate: b,
4355
- trailingAction: I
4331
+ index: M,
4332
+ onActivate: p,
4333
+ trailingAction: y
4356
4334
  },
4357
- `${v.src}-${A}`
4335
+ `${v.src}-${M}`
4358
4336
  );
4359
4337
  }) }),
4360
4338
  /* @__PURE__ */ n(
4361
- Qr,
4339
+ Jr,
4362
4340
  {
4363
4341
  open: f,
4364
- items: p,
4342
+ items: b,
4365
4343
  initialIndex: c,
4366
4344
  onClose: N
4367
4345
  }
@@ -4369,25 +4347,25 @@ const Fr = ({
4369
4347
  ]
4370
4348
  }
4371
4349
  );
4372
- }, si = (e) => /* @__PURE__ */ n(mt, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(mt, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(mt, { ...e, state: "received" }), ii = {
4373
- Composer: si,
4374
- Sent: ai,
4375
- Received: ri
4376
- }, kn = ({
4350
+ }, ti = (e) => /* @__PURE__ */ n(mt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(mt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(mt, { ...e, state: "received" }), ai = {
4351
+ Composer: ti,
4352
+ Sent: ni,
4353
+ Received: si
4354
+ }, yn = ({
4377
4355
  open: e,
4378
4356
  items: t,
4379
4357
  initialIndex: s = 0,
4380
4358
  onClose: a
4381
4359
  }) => {
4382
- const { index: r, prev: i, next: l } = dt({
4360
+ const { index: r, prev: i, next: o } = dt({
4383
4361
  length: t.length,
4384
4362
  initialIndex: s,
4385
4363
  open: e
4386
- }), o = t[r], d = re(
4387
- () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
4388
- [o]
4364
+ }), l = t[r], d = re(
4365
+ () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "video"),
4366
+ [l]
4389
4367
  );
4390
- return o ? /* @__PURE__ */ h(
4368
+ return l ? /* @__PURE__ */ h(
4391
4369
  ut,
4392
4370
  {
4393
4371
  open: e,
@@ -4399,23 +4377,23 @@ const Fr = ({
4399
4377
  /* @__PURE__ */ n(
4400
4378
  "video",
4401
4379
  {
4402
- src: o.src,
4403
- poster: o.poster,
4380
+ src: l.src,
4381
+ poster: l.poster,
4404
4382
  controls: !0,
4405
4383
  autoPlay: !0,
4406
4384
  muted: !0,
4407
4385
  playsInline: !0,
4408
- preload: o.preload ?? "metadata",
4386
+ preload: l.preload ?? "metadata",
4409
4387
  className: "mes-media-viewer__video",
4410
- children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
4388
+ children: l.mimeType ? /* @__PURE__ */ n("source", { src: l.src, type: l.mimeType }) : null
4411
4389
  },
4412
- `${r}:${o.src}`
4390
+ `${r}:${l.src}`
4413
4391
  ),
4414
4392
  t.length > 1 ? /* @__PURE__ */ n(
4415
4393
  ct,
4416
4394
  {
4417
4395
  onPrev: i,
4418
- onNext: l,
4396
+ onNext: o,
4419
4397
  prevLabel: "Previous video",
4420
4398
  nextLabel: "Next video"
4421
4399
  }
@@ -4423,7 +4401,7 @@ const Fr = ({
4423
4401
  ]
4424
4402
  }
4425
4403
  ) : null;
4426
- }, li = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(He, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4404
+ }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(He, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), kn = ({
4427
4405
  item: e,
4428
4406
  index: t
4429
4407
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4445,24 +4423,24 @@ const Fr = ({
4445
4423
  "aria-hidden": !0
4446
4424
  }
4447
4425
  ) }),
4448
- /* @__PURE__ */ n(li, {})
4449
- ] }), oi = (e, t, s) => ({
4426
+ /* @__PURE__ */ n(ri, {})
4427
+ ] }), ii = (e, t, s) => ({
4450
4428
  ariaLabel: `Play video ${t + 1} of ${s}`,
4451
- content: /* @__PURE__ */ n(Cn, { item: e, index: t })
4452
- }), ci = ({
4429
+ content: /* @__PURE__ */ n(kn, { item: e, index: t })
4430
+ }), li = ({
4453
4431
  src: e,
4454
4432
  poster: t,
4455
4433
  mimeType: s,
4456
4434
  preload: a,
4457
4435
  items: r
4458
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], En = (e, t) => e.map((s, a) => ({
4436
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Cn = (e, t) => e.map((s, a) => ({
4459
4437
  src: s.src,
4460
4438
  poster: s.poster,
4461
4439
  mimeType: s.mimeType,
4462
4440
  preload: s.preload,
4463
4441
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4464
- })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4465
- const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: g } = Ie(
4442
+ })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4443
+ const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ie(
4466
4444
  i
4467
4445
  );
4468
4446
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4473,15 +4451,15 @@ const Fr = ({
4473
4451
  onClick: () => m(0),
4474
4452
  "aria-label": "Play video",
4475
4453
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4476
- children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4454
+ children: /* @__PURE__ */ n(kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4477
4455
  }
4478
4456
  ),
4479
- l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
4457
+ o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: o }) }) : null,
4480
4458
  /* @__PURE__ */ n(
4481
- kn,
4459
+ yn,
4482
4460
  {
4483
- open: o,
4484
- items: En(
4461
+ open: l,
4462
+ items: Cn(
4485
4463
  [{ src: e, poster: t, mimeType: s, preload: r }],
4486
4464
  a
4487
4465
  ),
@@ -4490,47 +4468,47 @@ const Fr = ({
4490
4468
  }
4491
4469
  )
4492
4470
  ] });
4493
- }, In = ({
4471
+ }, En = ({
4494
4472
  state: e,
4495
4473
  src: t,
4496
4474
  poster: s,
4497
4475
  mimeType: a,
4498
4476
  filename: r,
4499
4477
  items: i,
4500
- text: l,
4501
- groupPosition: o,
4478
+ text: o,
4479
+ groupPosition: l,
4502
4480
  preload: d,
4503
4481
  onClick: m
4504
4482
  }) => {
4505
- const g = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4483
+ const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ie(
4506
4484
  m
4507
4485
  );
4508
4486
  if (g.length === 0)
4509
4487
  return null;
4510
4488
  const w = g.map(
4511
- (p, v) => oi(p, v, g.length)
4489
+ (b, v) => ii(b, v, g.length)
4512
4490
  );
4513
4491
  return /* @__PURE__ */ h(
4514
4492
  ke,
4515
4493
  {
4516
4494
  variant: u,
4517
- text: l,
4518
- groupPosition: o,
4495
+ text: o,
4496
+ groupPosition: l,
4519
4497
  "data-testid": "video-attachment",
4520
4498
  children: [
4521
4499
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4522
- Nn,
4500
+ wn,
4523
4501
  {
4524
4502
  tiles: w,
4525
- onTileActivate: b,
4503
+ onTileActivate: p,
4526
4504
  className: "overflow-hidden rounded-md"
4527
4505
  }
4528
4506
  ) }),
4529
4507
  /* @__PURE__ */ n(
4530
- kn,
4508
+ yn,
4531
4509
  {
4532
4510
  open: f,
4533
- items: En(g, r),
4511
+ items: Cn(g, r),
4534
4512
  initialIndex: c,
4535
4513
  onClose: N
4536
4514
  }
@@ -4538,17 +4516,17 @@ const Fr = ({
4538
4516
  ]
4539
4517
  }
4540
4518
  );
4541
- }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(In, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(In, { ...e, state: "received" }), fi = {
4542
- Composer: ui,
4543
- Sent: mi,
4544
- Received: hi
4545
- }, Mi = {
4546
- Image: Zr,
4547
- Video: fi,
4548
- Audio: Mr,
4549
- Pdf: ii,
4550
- File: Gr
4551
- }, gi = ({
4519
+ }, ci = (e) => /* @__PURE__ */ n(oi, { ...e }), di = (e) => /* @__PURE__ */ n(En, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(En, { ...e, state: "received" }), mi = {
4520
+ Composer: ci,
4521
+ Sent: di,
4522
+ Received: ui
4523
+ }, Ti = {
4524
+ Image: Kr,
4525
+ Video: mi,
4526
+ Audio: Tr,
4527
+ Pdf: ai,
4528
+ File: jr
4529
+ }, hi = ({
4552
4530
  question: e,
4553
4531
  onClick: t,
4554
4532
  loading: s = !1,
@@ -4560,7 +4538,7 @@ const Fr = ({
4560
4538
  onClick: t,
4561
4539
  disabled: s,
4562
4540
  style: { backgroundColor: "#E6E5E3" },
4563
- className: y(
4541
+ className: _(
4564
4542
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4565
4543
  {
4566
4544
  "hover:brightness-95 active:brightness-90": !s,
@@ -4570,22 +4548,22 @@ const Fr = ({
4570
4548
  ),
4571
4549
  children: e
4572
4550
  }
4573
- ), Ri = ({
4551
+ ), Ai = ({
4574
4552
  faqs: e,
4575
4553
  onFaqClick: t,
4576
4554
  loadingFaqId: s,
4577
4555
  headerText: a,
4578
4556
  className: r,
4579
4557
  avatarImage: i,
4580
- avatarName: l
4558
+ avatarName: o
4581
4559
  }) => {
4582
- const o = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4583
- return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4584
- (i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4560
+ const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4561
+ return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4562
+ (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4585
4563
  ne,
4586
4564
  {
4587
- id: l || "account",
4588
- name: l || "Account",
4565
+ id: o || "account",
4566
+ name: o || "Account",
4589
4567
  image: i,
4590
4568
  size: 24,
4591
4569
  shape: "circle"
@@ -4598,8 +4576,8 @@ const Fr = ({
4598
4576
  style: { backgroundColor: "#F1F0EE" },
4599
4577
  children: [
4600
4578
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4601
- o.map((d) => /* @__PURE__ */ n(
4602
- gi,
4579
+ l.map((d) => /* @__PURE__ */ n(
4580
+ hi,
4603
4581
  {
4604
4582
  question: d.question,
4605
4583
  onClick: () => t(d.id),
@@ -4614,38 +4592,38 @@ const Fr = ({
4614
4592
  };
4615
4593
  export {
4616
4594
  nn as A,
4617
- wa as B,
4618
- Ja as C,
4619
- qs as D,
4620
- $s as E,
4621
- Ri as F,
4622
- Ti as L,
4623
- Ci as M,
4624
- be as a,
4595
+ va as B,
4596
+ Xa as C,
4597
+ Hs as D,
4598
+ zs as E,
4599
+ Ai as F,
4600
+ Ii as L,
4601
+ yi as M,
4602
+ pe as a,
4625
4603
  ne as b,
4626
- lr as c,
4627
- hn as d,
4628
- Ei as e,
4629
- gi as f,
4604
+ rr as c,
4605
+ mn as d,
4606
+ ki as e,
4607
+ hi as f,
4630
4608
  ie as g,
4631
4609
  Bt as h,
4632
- Mi as i,
4633
- Ea as j,
4634
- ki as k,
4635
- Si as l,
4636
- zr as m,
4637
- Rr as n,
4638
- rr as o,
4639
- Dr as p,
4610
+ Ti as i,
4611
+ ka as j,
4612
+ _i as k,
4613
+ Ei as l,
4614
+ Lr as m,
4615
+ Ar as n,
4616
+ sr as o,
4617
+ Rr as p,
4640
4618
  Zt as q,
4641
4619
  ce as r,
4642
4620
  rn as s,
4643
- Bs as t,
4644
- Ai as u,
4645
- Ws as v,
4621
+ $s as t,
4622
+ Si as u,
4623
+ Ys as v,
4646
4624
  tt as w,
4647
4625
  nt as x,
4648
4626
  Jt as y,
4649
- Ii as z
4627
+ Ci as z
4650
4628
  };
4651
- //# sourceMappingURL=index-ubCRSgQk.js.map
4629
+ //# sourceMappingURL=index-DxzkXLSW.js.map