@linktr.ee/messaging-react 3.6.2-rc-1783314663 → 3.6.2-rc-1783317817

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 (30) hide show
  1. package/dist/{Card-CLfoYI1R.cjs → Card-BYdqLBN3.cjs} +2 -2
  2. package/dist/{Card-CLfoYI1R.cjs.map → Card-BYdqLBN3.cjs.map} +1 -1
  3. package/dist/{Card-Byosl29s.js → Card-CZDLISxS.js} +3 -3
  4. package/dist/{Card-Byosl29s.js.map → Card-CZDLISxS.js.map} +1 -1
  5. package/dist/{Card-ILtY9lfF.js → Card-Ca5OtJh6.js} +2 -2
  6. package/dist/{Card-ILtY9lfF.js.map → Card-Ca5OtJh6.js.map} +1 -1
  7. package/dist/{Card-CSkWY9mH.cjs → Card-DuSTf-S8.cjs} +2 -2
  8. package/dist/{Card-CSkWY9mH.cjs.map → Card-DuSTf-S8.cjs.map} +1 -1
  9. package/dist/{Card-CqEKHw9S.js → Card-gjy-ib_1.js} +2 -2
  10. package/dist/{Card-CqEKHw9S.js.map → Card-gjy-ib_1.js.map} +1 -1
  11. package/dist/{Card-UN0QRlxk.cjs → Card-iHrzL32q.cjs} +2 -2
  12. package/dist/{Card-UN0QRlxk.cjs.map → Card-iHrzL32q.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-BKI_6JUF.js → LockedThumbnail-COK5XPQ9.js} +2 -2
  14. package/dist/{LockedThumbnail-BKI_6JUF.js.map → LockedThumbnail-COK5XPQ9.js.map} +1 -1
  15. package/dist/{LockedThumbnail-DZ6C2xsr.cjs → LockedThumbnail-DrWiitE6.cjs} +2 -2
  16. package/dist/{LockedThumbnail-DZ6C2xsr.cjs.map → LockedThumbnail-DrWiitE6.cjs.map} +1 -1
  17. package/dist/{index-DPwo1avm.js → index-CnR5N9Co.js} +1155 -1154
  18. package/dist/index-CnR5N9Co.js.map +1 -0
  19. package/dist/index-pODWIZCi.cjs +2 -0
  20. package/dist/index-pODWIZCi.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/CustomMessage/CustomMessage.stories.tsx +3 -3
  25. package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +18 -12
  26. package/src/components/CustomMessage/MessageDeliveryStatus.tsx +23 -13
  27. package/src/components/CustomMessage/index.tsx +2 -1
  28. package/dist/index-DPwo1avm.js.map +0 -1
  29. package/dist/index-Q0FmgUJF.cjs +0 -2
  30. package/dist/index-Q0FmgUJF.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
2
- import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as ae, Suspense as rt } from "react";
3
- import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Hs, LinkPreviewsManager as Ht } from "stream-chat";
5
- import { Chat as Ys, useChannelStateContext as ue, useChatContext as me, DateSeparator as qs, areMessageUIPropsEqual as Ws, useMessageReminder as Xs, useComponentContext as rs, Attachment as Ks, EditMessageModal as Js, MessageBlocked as Zs, MessageBouncePrompt as Qs, MessageDeleted as en, MessageIsThreadReplyInChannelButtonIndicator as tn, MessageRepliesCountButton as sn, ReminderNotification as nn, StreamedMessageText as an, messageHasAttachments as rn, messageHasReactions as ln, isDateSeparatorMessage as on, isMessageBlocked as cn, isMessageBounced as dn, MessageBounceModal as un, MessageText as Yt, MessageErrorIcon as qt, Poll as mn, useMessageContext as Ie, useMessageComposer as hn, useStateStore as fn, MessageInput as gn, useMessageInputContext as pn, useMessageComposerHasSendableData as bn, AttachmentPreviewList as vn, QuotedMessagePreview as xn, TextareaComposer as wn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as _n, useAIState as Nn, Channel as yn, WithComponents as kn, Window as Cn, MessageList as En, ChannelList as Sn, InfiniteScroll as In } from "stream-chat-react";
6
- import { StarIcon as Ee, DotsThreeIcon as Tn, SpinnerGapIcon as ze, SignOutIcon as An, ProhibitInsetIcon as Wt, FlagIcon as is, ArrowLeftIcon as Qe, CurrencyDollarIcon as Mn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as ls, ImageIcon as Rn, SpeakerHighIcon as Ln, VideoCameraIcon as os, FileMdIcon as Dn, FileTextIcon as zn, FileZipIcon as Pn, FilePptIcon as Fn, FileCsvIcon as On, FileXlsIcon as $n, FileDocIcon as jn, FilePdfIcon as Bn, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Un, LinkIcon as Vn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Gn, ChecksIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, PencilSimpleIcon as Xn, TrashSimpleIcon as Kn, ArrowUpIcon as Jn, ProhibitIcon as Zn } from "@phosphor-icons/react";
2
+ import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as H, useEffect as K, useId as Gs, useMemo as ae, Suspense as rt } from "react";
3
+ import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
+ import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as is, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as qt, MessageErrorIcon as Wt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as En, MessageList as Sn, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as cs, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, ChecksIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as Qn, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
- const ds = at({
8
+ import { MessageActions as ea, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = at({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const ds = at({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), it = () => Se(ds), ll = ({
19
+ }), it = () => Se(us), cl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -24,10 +24,10 @@ const ds = at({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var A, S;
27
+ var M, E;
28
28
  const l = J(
29
- (C, ...I) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
29
+ (C, ...T) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...T);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,37 +37,37 @@ const ds = at({
37
37
  serviceConfig: !!n,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
41
- N.current = n;
42
- const E = G(i);
43
- E.current = i;
44
- const T = G({
40
+ const [o, d] = B(null), [u, p] = B(null), [h, f] = B(!1), [b, c] = B(!1), [w, v] = B(null), g = H(!1), x = H(null), _ = H(n);
41
+ _.current = n;
42
+ const A = H(i);
43
+ A.current = i;
44
+ const S = H({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: n,
48
48
  capabilities: r
49
- }), M = G(0);
50
- M.current++, l("📊 RENDER INFO", {
51
- renderCount: M.current,
49
+ }), I = H(0);
50
+ I.current++, l("📊 RENDER INFO", {
51
+ renderCount: I.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: T.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: T.current.apiKey !== a,
56
- serviceConfigChanged: T.current.serviceConfig !== n,
57
- capabilitiesChanged: T.current.capabilities !== r
54
+ userChanged: S.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: S.current.apiKey !== a,
56
+ serviceConfigChanged: S.current.serviceConfig !== n,
57
+ capabilitiesChanged: S.current.capabilities !== r
58
58
  }
59
- }), T.current = {
59
+ }), S.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: n,
63
63
  capabilities: r
64
64
  };
65
- const D = G(null);
66
- a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Hs(a) });
67
- const L = a ? ((S = D.current) == null ? void 0 : S.client) ?? null : null;
65
+ const L = H(null);
66
+ a && ((M = L.current) == null ? void 0 : M.apiKey) !== a && (L.current = { apiKey: a, client: new Ys(a) });
67
+ const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
- const C = M.current, I = N.current;
70
- if (!a || !L || !I) {
69
+ const C = I.current, T = _.current;
70
+ if (!a || !D || !T) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -78,36 +78,36 @@ const ds = at({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Gs({
82
- ...I,
81
+ const F = new Hs({
82
+ ...T,
83
83
  apiKey: a,
84
- debug: E.current,
85
- client: L
84
+ debug: A.current,
85
+ client: D
86
86
  });
87
- x.current = $, d($), l("✅ SERVICE SET", {
87
+ x.current = F, d(F), l("✅ SERVICE SET", {
88
88
  renderCount: C,
89
- serviceInstance: !!$
89
+ serviceInstance: !!F
90
90
  });
91
- }, [a, L]);
92
- const O = G(null);
91
+ }, [a, D]);
92
+ const $ = H(null);
93
93
  K(() => {
94
- var I, $;
94
+ var T, F;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: f.current,
99
+ isConnecting: g.current,
100
100
  isConnected: h,
101
101
  dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
102
  }), !o || !t) {
103
103
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (f.current) {
106
+ if (g.current) {
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((I = O.current) == null ? void 0 : I.serviceId) === o && (($ = O.current) == null ? void 0 : $.userId) === t.id) {
110
+ if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((F = $.current) == null ? void 0 : F.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,34 +115,34 @@ const ds = at({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, v(!0), b(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), g.current = !0, c(!0), v(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const F = await o.connectUser(t);
122
- p(F), g(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const O = await o.connectUser(t);
122
+ p(O), f(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: F.userID
124
+ clientId: O.userID
125
125
  });
126
- } catch (F) {
127
- const V = F instanceof Error ? F.message : "Connection failed";
128
- b(V), l("❌ USER CONNECTION ERROR", {
126
+ } catch (O) {
127
+ const V = O instanceof Error ? O.message : "Connection failed";
128
+ v(V), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: V
131
131
  });
132
132
  } finally {
133
- v(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ c(!1), g.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: h
136
136
  });
137
137
  }
138
138
  })();
139
139
  }, [o, t, l, h]), K(() => {
140
- const C = L;
140
+ const C = D;
141
141
  return () => {
142
- var I;
143
- C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
142
+ var T;
143
+ C && ($.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
144
144
  };
145
- }, [L]);
145
+ }, [D]);
146
146
  const z = J(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
@@ -151,32 +151,32 @@ const ds = at({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), c(!0);
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
157
  const C = await o.connectUser(t);
158
- p(C), g(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ p(C), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (C) {
160
- const I = C instanceof Error ? C.message : "Refresh failed";
161
- b(I), l("❌ CONNECTION REFRESH ERROR", {
160
+ const T = C instanceof Error ? C.message : "Refresh failed";
161
+ v(T), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: I
163
+ error: T
164
164
  });
165
165
  } finally {
166
- v(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ c(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
168
  }, [o, t, l]), y = U.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!u,
171
171
  isConnected: h,
172
- isLoading: c,
172
+ isLoading: b,
173
173
  hasError: !!w,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: o,
177
177
  client: u,
178
178
  isConnected: h,
179
- isLoading: c,
179
+ isLoading: b,
180
180
  error: w,
181
181
  capabilities: r,
182
182
  refreshConnection: z,
@@ -185,7 +185,7 @@ const ds = at({
185
185
  o,
186
186
  u,
187
187
  h,
188
- c,
188
+ b,
189
189
  w,
190
190
  r,
191
191
  z,
@@ -193,20 +193,20 @@ const ds = at({
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: M.current,
197
- willRenderChat: !!L,
196
+ renderCount: I.current,
197
+ willRenderChat: !!D,
198
198
  contextValueReady: !!y
199
- }), /* @__PURE__ */ s(ds.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
- Ys,
199
+ }), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
200
+ qs,
201
201
  {
202
- client: L,
202
+ client: D,
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
- }, ea = () => it(), lt = (e) => {
209
+ }, ta = () => it(), lt = (e) => {
210
210
  var a, r;
211
211
  const [t, n] = B(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,14 +228,14 @@ const ds = at({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, ta = "linktree-official", sa = "linktree-official-sender";
231
+ }, sa = "linktree-official", na = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === ta) {
234
+ if (n === sa) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === sa;
238
+ return ((l = i.user) == null ? void 0 : l.id) === na;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,18 +247,18 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
250
- const na = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
- function aa(e) {
252
- return na.test(e.trim());
250
+ const aa = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
+ function ra(e) {
252
+ return aa.test(e.trim());
253
253
  }
254
- function Xt(e, t) {
254
+ function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !aa(n);
256
+ return !n || t && n === t ? !1 : !ra(n);
257
257
  }
258
258
  function ot(e) {
259
- return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
259
+ return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
- const Kt = [
261
+ const Jt = [
262
262
  { emoji: "🍎", bgColor: "#FFD1DD" },
263
263
  // Apple
264
264
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -286,7 +286,7 @@ const Kt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function ra(e) {
289
+ function ia(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -294,16 +294,16 @@ function ra(e) {
294
294
  }
295
295
  return Math.abs(t);
296
296
  }
297
- function us(e) {
298
- return Kt[ra(e) % Kt.length];
299
- }
300
- function ia(e) {
301
- return us(e).emoji;
297
+ function ms(e) {
298
+ return Jt[ia(e) % Jt.length];
302
299
  }
303
300
  function la(e) {
304
- return us(e).bgColor;
301
+ return ms(e).emoji;
305
302
  }
306
- const se = ({
303
+ function oa(e) {
304
+ return ms(e).bgColor;
305
+ }
306
+ const ne = ({
307
307
  id: e,
308
308
  image: t,
309
309
  size: n = 40,
@@ -312,7 +312,7 @@ const se = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = ia(e), d = la(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
315
+ const o = la(e), d = oa(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = n >= 40 ? 2 : 1, b = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: b, children: t ? /* @__PURE__ */ s(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -342,7 +342,7 @@ const se = ({
342
342
  width: `${n}px`,
343
343
  height: `${n}px`,
344
344
  backgroundColor: t ? void 0 : d,
345
- ...c
345
+ ...b
346
346
  },
347
347
  children: [
348
348
  r && /* @__PURE__ */ s(
@@ -362,21 +362,21 @@ const se = ({
362
362
  "bg-transparent"
363
363
  ),
364
364
  style: {
365
- ...c,
365
+ ...b,
366
366
  ...l && {
367
- borderWidth: `${g}px`,
367
+ borderWidth: `${f}px`,
368
368
  borderStyle: "solid",
369
369
  borderColor: "var(--AI-Gradient, #7F22FE)",
370
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
371
371
  }
372
372
  },
373
- children: v
373
+ children: c
374
374
  }
375
375
  )
376
376
  ]
377
377
  }
378
378
  );
379
- }, oa = "https://linktr.ee/s/about/trust-center/report", ca = ({
379
+ }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -389,78 +389,78 @@ const se = ({
389
389
  onActionComplete: u,
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
- var A;
393
- const { service: h, debug: g } = it(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, E] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
392
+ var M;
393
+ const { service: h, debug: f } = it(), b = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, c = !!(a && n && h && b), [w, v] = B(!1), [g, x] = B(null), [_, A] = B(!1), [S, I] = B(!1), L = c && ((g == null ? void 0 : g.participantId) !== b || (g == null ? void 0 : g.service) !== h);
394
394
  return K(() => {
395
- if (!v || !h || !c) {
396
- b(!1), x(null);
395
+ if (!c || !h || !b) {
396
+ v(!1), x(null);
397
397
  return;
398
398
  }
399
- let S = !1;
399
+ let E = !1;
400
400
  return (async () => {
401
401
  try {
402
402
  const C = await h.getBlockedUsers();
403
- if (S) return;
404
- b(
403
+ if (E) return;
404
+ v(
405
405
  C.some(
406
- (I) => I.blocked_user_id === c
406
+ (T) => T.blocked_user_id === b
407
407
  )
408
408
  );
409
409
  } catch (C) {
410
- S || console.error(`[${p}] Failed to check blocked status:`, C);
410
+ E || console.error(`[${p}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- S || x({ participantId: c, service: h });
412
+ E || x({ participantId: b, service: h });
413
413
  }
414
414
  })(), () => {
415
- S = !0;
415
+ E = !0;
416
416
  };
417
- }, [v, h, c, p]), {
417
+ }, [c, h, b, p]), {
418
418
  isParticipantBlocked: w,
419
- isCheckingBlockedStatus: D,
420
- isLeaving: N,
421
- isUpdatingBlockStatus: T,
419
+ isCheckingBlockedStatus: L,
420
+ isLeaving: _,
421
+ isUpdatingBlockStatus: S,
422
422
  handleLeaveConversation: async () => {
423
- var S;
424
- if (!N) {
425
- l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), E(!0);
423
+ var E;
424
+ if (!_) {
425
+ l == null || l(), f && console.log(`[${p}] Leave conversation`, e.cid), A(!0);
426
426
  try {
427
- const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
427
+ const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
428
428
  await e.hide(C, !1), r && await r(e), u == null || u();
429
429
  } catch (C) {
430
430
  console.error(`[${p}] Failed to leave conversation`, C);
431
431
  } finally {
432
- E(!1);
432
+ A(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var S, C, I;
438
- if (!(T || !h)) {
439
- o == null || o(), g && console.log(`[${p}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
437
+ var E, C, T;
438
+ if (!(S || !h)) {
439
+ o == null || o(), f && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
440
440
  try {
441
- await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
442
- } catch ($) {
443
- console.error(`[${p}] Failed to block member`, $);
441
+ await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
442
+ } catch (F) {
443
+ console.error(`[${p}] Failed to block member`, F);
444
444
  } finally {
445
- M(!1);
445
+ I(!1);
446
446
  }
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var S, C, I;
451
- if (!(T || !h)) {
452
- o == null || o(), g && console.log(`[${p}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
450
+ var E, C, T;
451
+ if (!(S || !h)) {
452
+ o == null || o(), f && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
453
453
  try {
454
- await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
455
- } catch ($) {
456
- console.error(`[${p}] Failed to unblock member`, $);
454
+ await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), u == null || u();
455
+ } catch (F) {
456
+ console.error(`[${p}] Failed to unblock member`, F);
457
457
  } finally {
458
- M(!1);
458
+ I(!1);
459
459
  }
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(oa, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
466
  }, _e = ({
@@ -494,55 +494,55 @@ const se = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = B(!1), v = G(null), w = Vs(), b = J(() => c(!1), []), {
498
- isParticipantBlocked: f,
497
+ const [f, b] = B(!1), c = H(null), w = Gs(), v = J(() => b(!1), []), {
498
+ isParticipantBlocked: g,
499
499
  isCheckingBlockedStatus: x,
500
- isLeaving: N,
501
- isUpdatingBlockStatus: E,
502
- handleLeaveConversation: T,
503
- handleBlockUser: M,
504
- handleUnblockUser: D,
505
- handleReportUser: L
506
- } = ca({
500
+ isLeaving: _,
501
+ isUpdatingBlockStatus: A,
502
+ handleLeaveConversation: S,
503
+ handleBlockUser: I,
504
+ handleUnblockUser: L,
505
+ handleReportUser: D
506
+ } = da({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
510
- enabled: g,
510
+ enabled: f,
511
511
  onLeaveConversation: i,
512
512
  onBlockParticipant: l,
513
513
  onDeleteConversationClick: o,
514
514
  onBlockParticipantClick: d,
515
515
  onReportParticipantClick: u,
516
- onActionComplete: b,
516
+ onActionComplete: v,
517
517
  logLabel: "ChannelActionsMenu"
518
518
  });
519
519
  return K(() => {
520
- if (!g) return;
521
- const z = (A) => {
522
- v.current && !v.current.contains(A.target) && c(!1);
523
- }, y = (A) => {
524
- A.key === "Escape" && c(!1);
520
+ if (!f) return;
521
+ const z = (M) => {
522
+ c.current && !c.current.contains(M.target) && b(!1);
523
+ }, y = (M) => {
524
+ M.key === "Escape" && b(!1);
525
525
  };
526
526
  return document.addEventListener("mousedown", z), document.addEventListener("keydown", y), () => {
527
527
  document.removeEventListener("mousedown", z), document.removeEventListener("keydown", y);
528
528
  };
529
- }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
529
+ }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: c, className: "relative", children: [
530
530
  /* @__PURE__ */ m(
531
531
  "button",
532
532
  {
533
533
  className: h,
534
534
  type: "button",
535
535
  "aria-haspopup": "true",
536
- "aria-expanded": g,
537
- "aria-controls": g ? w : void 0,
538
- onClick: () => c((z) => !z),
536
+ "aria-expanded": f,
537
+ "aria-controls": f ? w : void 0,
538
+ onClick: () => b((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(Tn, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
544
544
  ),
545
- g && /* @__PURE__ */ s(
545
+ f && /* @__PURE__ */ s(
546
546
  "div",
547
547
  {
548
548
  id: w,
@@ -555,11 +555,11 @@ const se = ({
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
556
  _e,
557
557
  {
558
- onClick: T,
559
- disabled: N,
560
- "aria-busy": N,
558
+ onClick: S,
559
+ disabled: _,
560
+ "aria-busy": _,
561
561
  children: [
562
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
562
+ _ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -571,31 +571,31 @@ const se = ({
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
- ) : f ? /* @__PURE__ */ m(
574
+ ) : g ? /* @__PURE__ */ m(
575
575
  _e,
576
576
  {
577
- onClick: D,
578
- disabled: E,
579
- "aria-busy": E,
577
+ onClick: L,
578
+ disabled: A,
579
+ "aria-busy": A,
580
580
  children: [
581
- E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
581
+ A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
586
  _e,
587
587
  {
588
- onClick: M,
589
- disabled: E,
590
- "aria-busy": E,
588
+ onClick: I,
589
+ disabled: A,
590
+ "aria-busy": A,
591
591
  children: [
592
- E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
592
+ A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ s("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: L, children: [
598
- /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: D, children: [
598
+ /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
601
601
  p
@@ -603,10 +603,10 @@ const se = ({
603
603
  }
604
604
  )
605
605
  ] });
606
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", da = "CUSTOMER_PAID", ua = "Replies instantly with AI assistant", ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === da, ha = (e) => {
606
+ }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ma);
609
- }, fa = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
+ }, ga = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -619,25 +619,25 @@ const se = ({
619
619
  onDeleteConversationClick: u,
620
620
  onBlockParticipantClick: p,
621
621
  onReportParticipantClick: h,
622
- customChannelActions: g,
623
- renderChannelActions: c,
624
- showChannelInfo: v = !0,
622
+ customChannelActions: f,
623
+ renderChannelActions: b,
624
+ showChannelInfo: c = !0,
625
625
  onParticipantNameClick: w
626
626
  }) => {
627
- var L, O, z;
628
- const { channel: b } = ue(), { client: f } = me(), x = U.useMemo(
627
+ var D, $, z;
628
+ const { channel: v } = ue(), { client: g } = me(), x = U.useMemo(
629
629
  () => {
630
630
  var y;
631
631
  return Ue(
632
- (y = b.state) == null ? void 0 : y.members,
633
- f == null ? void 0 : f.userID,
634
- b.type
632
+ (y = v.state) == null ? void 0 : y.members,
633
+ g == null ? void 0 : g.userID,
634
+ v.type
635
635
  );
636
636
  },
637
- [(L = b.state) == null ? void 0 : L.members, f == null ? void 0 : f.userID, b.type]
638
- ), N = ot(x == null ? void 0 : x.user), E = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = lt(b), M = ha(x), D = async () => {
637
+ [(D = v.state) == null ? void 0 : D.members, g == null ? void 0 : g.userID, v.type]
638
+ ), _ = ot(x == null ? void 0 : x.user), A = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, S = lt(v), I = fa(x), L = async () => {
639
639
  try {
640
- T ? await b.unpin() : await b.pin();
640
+ S ? await v.unpin() : await v.pin();
641
641
  } catch (y) {
642
642
  console.error(
643
643
  "[ChannelHeaderRedesign] Failed to update pinned status:",
@@ -665,15 +665,15 @@ const se = ({
665
665
  {
666
666
  type: "button",
667
667
  onClick: w,
668
- "aria-label": `View details for ${N}`,
668
+ "aria-label": `View details for ${_}`,
669
669
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
670
670
  children: [
671
671
  /* @__PURE__ */ s(
672
- se,
672
+ ne,
673
673
  {
674
- id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
- name: N,
676
- image: E,
674
+ id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || v.id || "unknown",
675
+ name: _,
676
+ image: A,
677
677
  dmAgentEnabled: a,
678
678
  shape: "circle",
679
679
  size: 48,
@@ -682,17 +682,17 @@ const se = ({
682
682
  ),
683
683
  /* @__PURE__ */ m("span", { className: "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 pl-3 pr-2 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95", children: [
684
684
  /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
685
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
685
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: _ }),
686
686
  /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
687
- M && /* @__PURE__ */ s(
687
+ I && /* @__PURE__ */ s(
688
688
  "span",
689
689
  {
690
690
  "aria-label": "Paid customer",
691
691
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
- children: /* @__PURE__ */ s(Mn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
- n && T && /* @__PURE__ */ s(
695
+ n && S && /* @__PURE__ */ s(
696
696
  "span",
697
697
  {
698
698
  "aria-label": "Starred conversation",
@@ -712,7 +712,7 @@ const se = ({
712
712
  ] }),
713
713
  a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
714
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
715
- /* @__PURE__ */ s("span", { children: ua })
715
+ /* @__PURE__ */ s("span", { children: ma })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -723,26 +723,26 @@ const se = ({
723
723
  "button",
724
724
  {
725
725
  className: We,
726
- onClick: D,
726
+ onClick: L,
727
727
  type: "button",
728
- "aria-pressed": T,
729
- "aria-label": T ? "Unstar conversation" : "Star conversation",
728
+ "aria-pressed": S,
729
+ "aria-label": S ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
731
  Ee,
732
732
  {
733
733
  className: k("size-5", {
734
- "text-[#FFD60A]": T,
735
- "text-black/90": !T
734
+ "text-[#FFD60A]": S,
735
+ "text-black/90": !S
736
736
  }),
737
- weight: T ? "fill" : "regular"
737
+ weight: S ? "fill" : "regular"
738
738
  }
739
739
  )
740
740
  }
741
741
  ),
742
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
742
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
743
743
  tt,
744
744
  {
745
- channel: b,
745
+ channel: v,
746
746
  participant: x,
747
747
  showDeleteConversation: l,
748
748
  showBlockParticipant: o,
@@ -752,19 +752,19 @@ const se = ({
752
752
  onDeleteConversationClick: u,
753
753
  onBlockParticipantClick: p,
754
754
  onReportParticipantClick: h,
755
- customChannelActions: g,
755
+ customChannelActions: f,
756
756
  triggerClassName: We
757
757
  }
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, ga = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
- function pa(e) {
761
+ }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
+ function ba(e) {
763
763
  return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
764
  }
765
- function ba(e) {
765
+ function va(e) {
766
766
  const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
- () => pa(e.own_reactions),
767
+ () => ba(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
@@ -789,24 +789,24 @@ function ba(e) {
789
789
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
790
790
  return { selected: a, voteUp: r, voteDown: i };
791
791
  }
792
- function va(e) {
792
+ function xa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
- function ms({
795
+ function hs({
796
796
  message: e,
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = va(t);
800
+ const n = e == null ? void 0 : e.text, a = xa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const xa = U.lazy(() => import("./Card-CqEKHw9S.js")), wa = U.lazy(() => import("./Card-ILtY9lfF.js")), _a = U.lazy(() => import("./Card-Byosl29s.js")), ct = () => /* @__PURE__ */ s(
803
+ const wa = U.lazy(() => import("./Card-gjy-ib_1.js")), _a = U.lazy(() => import("./Card-Ca5OtJh6.js")), Na = U.lazy(() => import("./Card-CZDLISxS.js")), ct = () => /* @__PURE__ */ s(
804
804
  "div",
805
805
  {
806
806
  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)]",
807
807
  "aria-hidden": !0
808
808
  }
809
- ), Na = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(xa, { ...e }) }), hs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), ya = hs, ka = fs, Jt = { Composer: Na, Sent: hs, Received: fs, Creator: ya, Visitor: ka }, Ca = [
809
+ ), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), gs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = fs, Ca = gs, Zt = { Composer: ya, Sent: fs, Received: gs, Creator: ka, Visitor: Ca }, Ea = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -816,42 +816,42 @@ const xa = U.lazy(() => import("./Card-CqEKHw9S.js")), wa = U.lazy(() => import(
816
816
  [/plain|rtf/, "text"],
817
817
  [/markdown/, "markdown"]
818
818
  ];
819
- function le(e) {
819
+ function oe(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
- function gs(e) {
823
- const t = Ca.find(
822
+ function ps(e) {
823
+ const t = Ea.find(
824
824
  ([n]) => n.test(e)
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Ea = {
829
- video: os,
830
- audio: Ln,
831
- image: Rn,
832
- document: ls
833
- }, Sa = {
834
- pdf: Bn,
835
- doc: jn,
836
- xls: $n,
837
- csv: On,
838
- ppt: Fn,
839
- zip: Pn,
840
- text: zn,
841
- markdown: Dn,
842
- generic: ls
828
+ const Sa = {
829
+ video: cs,
830
+ audio: Dn,
831
+ image: Ln,
832
+ document: os
833
+ }, Ia = {
834
+ pdf: Un,
835
+ doc: Bn,
836
+ xls: jn,
837
+ csv: $n,
838
+ ppt: On,
839
+ zip: Fn,
840
+ text: Pn,
841
+ markdown: zn,
842
+ generic: os
843
843
  };
844
- function Ia(e) {
845
- const t = le(e);
846
- return t !== "document" ? Ea[t] : Sa[gs(e)];
844
+ function Ta(e) {
845
+ const t = oe(e);
846
+ return t !== "document" ? Sa[t] : Ia[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Ia(e), t);
849
+ return U.createElement(Ta(e), t);
850
850
  }
851
- const Ta = (e) => {
851
+ const Aa = (e) => {
852
852
  var t, n;
853
853
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
854
- }, Aa = ({
854
+ }, Ma = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,74 +863,74 @@ const Ta = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, E] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [S, C] = B(null), I = J(() => {
867
- L(!1), b(!0);
868
- }, []), $ = J((_) => {
869
- const R = g.current;
866
+ const p = oe(t), h = H(null), f = H(null), b = H(null), c = H(r), [w, v] = B(a), [g, x] = B(0), [_, A] = B(!1), [S, I] = B(!1), [L, D] = B(!1), [$, z] = B(!1), [y, M] = B(!0), [E, C] = B(null), T = J(() => {
867
+ D(!1), v(!0);
868
+ }, []), F = J((N) => {
869
+ const R = f.current;
870
870
  if (!R) return 0;
871
- const H = R.getBoundingClientRect();
871
+ const G = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Ta(_) - H.left) / H.width)
874
+ Math.min(1, (Aa(N) - G.left) / G.width)
875
875
  );
876
- }, []), F = J((_) => {
876
+ }, []), O = J((N) => {
877
877
  const R = h.current;
878
- R && R.duration && (R.currentTime = _ * R.duration);
879
- }, []), V = (_) => {
880
- _.stopPropagation(), E(!0);
881
- const R = $(_);
882
- x(R), F(R);
878
+ R && R.duration && (R.currentTime = N * R.duration);
879
+ }, []), V = (N) => {
880
+ N.stopPropagation(), A(!0);
881
+ const R = F(N);
882
+ x(R), O(R);
883
883
  };
884
884
  K(() => {
885
- r !== void 0 && r !== v.current && (v.current = r, b(r));
885
+ r !== void 0 && r !== c.current && (c.current = r, v(r));
886
886
  }, [r]), K(() => {
887
887
  if (!w) {
888
- c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
888
+ b.current !== null && (cancelAnimationFrame(b.current), b.current = null);
889
889
  return;
890
890
  }
891
- const _ = () => {
891
+ const N = () => {
892
892
  const R = h.current;
893
- R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(_);
893
+ R && R.duration && !_ && x(R.currentTime / R.duration), b.current = requestAnimationFrame(N);
894
894
  };
895
- return c.current = requestAnimationFrame(_), () => {
896
- c.current !== null && cancelAnimationFrame(c.current);
895
+ return b.current = requestAnimationFrame(N), () => {
896
+ b.current !== null && cancelAnimationFrame(b.current);
897
897
  };
898
- }, [w, N]), K(() => {
899
- const _ = h.current;
900
- _ && (w ? _.play().catch((R) => {
901
- b(!1), L(!0);
902
- }) : _.pause());
898
+ }, [w, _]), K(() => {
899
+ const N = h.current;
900
+ N && (w ? N.play().catch((R) => {
901
+ v(!1), D(!0);
902
+ }) : N.pause());
903
903
  }, [w]), K(() => {
904
- if (!N) return;
905
- const _ = (H) => x($(H)), R = (H) => {
906
- E(!1), F($(H));
904
+ if (!_) return;
905
+ const N = (G) => x(F(G)), R = (G) => {
906
+ A(!1), O(F(G));
907
907
  };
908
- return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
- window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
908
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", R), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", R);
910
910
  };
911
- }, [N, $, F]);
912
- const Q = S ? { aspectRatio: String(S) } : void 0, ee = S ? "" : " aspect-video", X = Math.round(f * 100);
911
+ }, [_, F, O]);
912
+ const Z = E ? { aspectRatio: String(E) } : void 0, ee = E ? "" : " aspect-video", X = Math.round(g * 100);
913
913
  return /* @__PURE__ */ m(
914
914
  "div",
915
915
  {
916
916
  role: "button",
917
917
  tabIndex: 0,
918
918
  className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
- style: Q,
920
- onClick: (_) => {
919
+ style: Z,
920
+ onClick: (N) => {
921
921
  if (u) {
922
- u(_);
922
+ u(N);
923
923
  return;
924
924
  }
925
- D || l && b((R) => !R);
925
+ L || l && v((R) => !R);
926
926
  },
927
- onKeyDown: (_) => {
928
- if (!(_.key !== "Enter" && _.key !== " ")) {
929
- if (_.preventDefault(), u) {
930
- u(_);
927
+ onKeyDown: (N) => {
928
+ if (!(N.key !== "Enter" && N.key !== " ")) {
929
+ if (N.preventDefault(), u) {
930
+ u(N);
931
931
  return;
932
932
  }
933
- D || l && b((R) => !R);
933
+ L || l && v((R) => !R);
934
934
  }
935
935
  },
936
936
  children: [
@@ -956,12 +956,12 @@ const Ta = (e) => {
956
956
  style: { width: "100%", height: "100%" },
957
957
  onLoadStart: () => z(!0),
958
958
  onCanPlay: () => {
959
- z(!1), A(!1);
959
+ z(!1), M(!1);
960
960
  },
961
961
  onWaiting: () => z(!0),
962
- onPlay: () => L(!1),
962
+ onPlay: () => D(!1),
963
963
  onEnded: () => {
964
- i || (b(!1), x(0));
964
+ i || (v(!1), x(0));
965
965
  },
966
966
  children: /* @__PURE__ */ s("track", { kind: "captions" })
967
967
  }
@@ -976,39 +976,39 @@ const Ta = (e) => {
976
976
  style: { width: "100%", height: "100%" },
977
977
  onLoadStart: () => z(!0),
978
978
  onCanPlay: () => {
979
- z(!1), A(!1);
979
+ z(!1), M(!1);
980
980
  },
981
981
  onWaiting: () => z(!0),
982
- onPlay: () => L(!1),
982
+ onPlay: () => D(!1),
983
983
  onLoadedMetadata: () => {
984
- const _ = h.current;
985
- _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
984
+ const N = h.current;
985
+ N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
986
986
  },
987
987
  onEnded: () => {
988
- i || (b(!1), x(0));
988
+ i || (v(!1), x(0));
989
989
  },
990
990
  children: /* @__PURE__ */ s("track", { kind: "captions" })
991
991
  }
992
992
  ) }),
993
- O && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
993
+ $ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
994
  ke,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
998
998
  }
999
999
  ) }),
1000
- D && !l && /* @__PURE__ */ s(
1000
+ L && !l && /* @__PURE__ */ s(
1001
1001
  "div",
1002
1002
  {
1003
1003
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
1004
1004
  role: "button",
1005
1005
  tabIndex: 0,
1006
1006
  "aria-label": "Play preview",
1007
- onClick: (_) => {
1008
- _.stopPropagation(), I();
1007
+ onClick: (N) => {
1008
+ N.stopPropagation(), T();
1009
1009
  },
1010
- onKeyDown: (_) => {
1011
- _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1010
+ onKeyDown: (N) => {
1011
+ N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), T());
1012
1012
  },
1013
1013
  children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
@@ -1022,13 +1022,13 @@ const Ta = (e) => {
1022
1022
  "aria-valuemin": 0,
1023
1023
  "aria-valuemax": 100,
1024
1024
  tabIndex: 0,
1025
- ref: g,
1025
+ ref: f,
1026
1026
  className: "relative flex h-4 w-full cursor-pointer items-center",
1027
1027
  onMouseDown: V,
1028
1028
  onTouchStart: V,
1029
- onClick: (_) => _.stopPropagation(),
1030
- onKeyDown: (_) => {
1031
- _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1029
+ onClick: (N) => N.stopPropagation(),
1030
+ onKeyDown: (N) => {
1031
+ N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1032
1032
  },
1033
1033
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1034
1034
  "div",
@@ -1044,12 +1044,12 @@ const Ta = (e) => {
1044
1044
  "button",
1045
1045
  {
1046
1046
  type: "button",
1047
- onClick: (_) => {
1048
- _.stopPropagation(), b((R) => !R);
1047
+ onClick: (N) => {
1048
+ N.stopPropagation(), v((R) => !R);
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Un, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1061,21 +1061,21 @@ const Ta = (e) => {
1061
1061
  "aria-valuemin": 0,
1062
1062
  "aria-valuemax": 100,
1063
1063
  tabIndex: 0,
1064
- ref: g,
1064
+ ref: f,
1065
1065
  className: "relative flex h-4 w-full cursor-pointer items-center",
1066
1066
  onMouseDown: V,
1067
1067
  onTouchStart: V,
1068
- onClick: (_) => _.stopPropagation(),
1069
- onMouseEnter: () => M(!0),
1070
- onMouseLeave: () => M(!1),
1071
- onKeyDown: (_) => {
1072
- _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1068
+ onClick: (N) => N.stopPropagation(),
1069
+ onMouseEnter: () => I(!0),
1070
+ onMouseLeave: () => I(!1),
1071
+ onKeyDown: (N) => {
1072
+ N.key === "ArrowRight" && O(Math.min(1, g + 0.05)), N.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1073
1073
  },
1074
1074
  children: [
1075
1075
  /* @__PURE__ */ s(
1076
1076
  "div",
1077
1077
  {
1078
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1078
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || _ ? "h-1.5" : "h-1"}`,
1079
1079
  children: /* @__PURE__ */ s(
1080
1080
  "div",
1081
1081
  {
@@ -1088,7 +1088,7 @@ const Ta = (e) => {
1088
1088
  /* @__PURE__ */ s(
1089
1089
  "div",
1090
1090
  {
1091
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1091
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || _ ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1092
1092
  style: { left: `${X}%` }
1093
1093
  }
1094
1094
  )
@@ -1099,7 +1099,7 @@ const Ta = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ps = ({
1102
+ }, Qt = (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", bs = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1108,9 +1108,9 @@ const Ta = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: l = !1
1110
1110
  }) => {
1111
- const o = le(e), [d, u] = B(!1);
1111
+ const o = oe(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Aa,
1113
+ Ma,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1157,11 +1157,11 @@ const Ta = (e) => {
1157
1157
  {
1158
1158
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1159
1159
  children: we(e, {
1160
- className: Zt(r),
1160
+ className: Qt(r),
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ma(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1174,12 +1174,12 @@ const Ta = (e) => {
1174
1174
  {
1175
1175
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1176
1176
  children: we(e, {
1177
- className: Zt(r),
1177
+ className: Qt(r),
1178
1178
  weight: "regular"
1179
1179
  })
1180
1180
  }
1181
1181
  );
1182
- }, bs = ({
1182
+ }, vs = ({
1183
1183
  variant: e,
1184
1184
  thumbnail: t,
1185
1185
  title: n,
@@ -1193,7 +1193,7 @@ const Ta = (e) => {
1193
1193
  rootRef: p,
1194
1194
  "data-testid": h
1195
1195
  }) => {
1196
- const g = e === "dark", c = g ? n ?? a : n ?? "", v = g && !n;
1196
+ const f = e === "dark", b = f ? n ?? a : n ?? "", c = f && !n;
1197
1197
  return /* @__PURE__ */ m(
1198
1198
  "div",
1199
1199
  {
@@ -1201,29 +1201,29 @@ const Ta = (e) => {
1201
1201
  "data-testid": h,
1202
1202
  className: k(
1203
1203
  "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)]",
1204
- g ? "bg-[#121110]" : "bg-white"
1204
+ f ? "bg-[#121110]" : "bg-white"
1205
1205
  ),
1206
1206
  children: [
1207
1207
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1208
1208
  u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1209
1209
  t,
1210
1210
  /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1211
- c.trim() !== "" && /* @__PURE__ */ s(
1211
+ b.trim() !== "" && /* @__PURE__ */ s(
1212
1212
  "p",
1213
1213
  {
1214
1214
  className: k("mb-0.5 truncate text-base font-medium", {
1215
- "text-black": !g,
1216
- "text-white/30": g && v,
1217
- "text-white": g && !v
1215
+ "text-black": !f,
1216
+ "text-white/30": f && c,
1217
+ "text-white": f && !c
1218
1218
  }),
1219
- children: c
1219
+ children: b
1220
1220
  }
1221
1221
  ),
1222
1222
  /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1223
1223
  we(r, {
1224
1224
  className: k(
1225
1225
  "size-5 shrink-0",
1226
- g ? "text-white/55" : "text-black/55"
1226
+ f ? "text-white/55" : "text-black/55"
1227
1227
  ),
1228
1228
  weight: "regular"
1229
1229
  }),
@@ -1232,7 +1232,7 @@ const Ta = (e) => {
1232
1232
  {
1233
1233
  className: k(
1234
1234
  "text-xs font-medium",
1235
- g ? "text-white/55" : "text-black/55"
1235
+ f ? "text-white/55" : "text-black/55"
1236
1236
  ),
1237
1237
  children: i
1238
1238
  }
@@ -1245,25 +1245,25 @@ const Ta = (e) => {
1245
1245
  }
1246
1246
  );
1247
1247
  };
1248
- function vs(e) {
1248
+ function xs(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
1251
  function dt(e) {
1252
1252
  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)]`;
1253
1253
  }
1254
- function Ra(e) {
1254
+ function La(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function La(e) {
1257
+ function Da(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function Da(e) {
1260
+ function za(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function za(e) {
1263
+ function Pa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Pa(e) {
1266
+ function Fa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
1269
  const ut = ({ attachment: e, isMyMessage: t }) => {
@@ -1278,26 +1278,26 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1278
1278
  ) : /* @__PURE__ */ s(
1279
1279
  "div",
1280
1280
  {
1281
- className: `aspect-video w-full rounded-[20px] ${Ra(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Vn, { className: `size-12 ${Pa(t)}` })
1281
+ className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
+ children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
1283
1283
  }
1284
1284
  ) }),
1285
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1286
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${La(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Da(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${za(t)}`, children: d })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Da(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
1289
1289
  ] })
1290
1290
  ] });
1291
1291
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
1292
1292
  };
1293
- function xs(e) {
1293
+ function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
1296
  function mt(e) {
1297
1297
  var t;
1298
- return (t = e.attachments) == null ? void 0 : t.find(xs);
1298
+ return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function Fa(e, t) {
1300
+ async function Oa(e, t) {
1301
1301
  let n;
1302
1302
  try {
1303
1303
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1309,7 +1309,7 @@ async function Fa(e, t) {
1309
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1310
1310
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1311
1311
  }
1312
- const Oa = ({
1312
+ const $a = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const Oa = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), Fa(e, t).then(() => {
1324
+ a(!0), Oa(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1337,14 +1337,14 @@ const Oa = ({
1337
1337
  );
1338
1338
  };
1339
1339
  function ht(e) {
1340
- var h, g, c, v;
1340
+ var h, f, b, c;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
1343
- ), n = (g = e.attachments) == null ? void 0 : g.find(
1343
+ ), n = (f = e.attachments) == null ? void 0 : f.find(
1344
1344
  (w) => w.type === "image" && w.image_url
1345
- ), a = (c = e.attachments) == null ? void 0 : c.find(
1345
+ ), a = (b = e.attachments) == null ? void 0 : b.find(
1346
1346
  (w) => w.type === "audio" && w.asset_url
1347
- ), r = (v = e.attachments) == null ? void 0 : v.find(
1347
+ ), r = (c = e.attachments) == null ? void 0 : c.find(
1348
1348
  (w) => w.type === "file" && w.asset_url
1349
1349
  ), i = t ?? n ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1350
1350
  if (!l) return null;
@@ -1357,16 +1357,16 @@ function ht(e) {
1357
1357
  thumbnailUrl: p
1358
1358
  };
1359
1359
  }
1360
- const ws = ({
1360
+ const _s = ({
1361
1361
  resolvedUrl: e,
1362
1362
  resolvedType: t,
1363
1363
  title: n,
1364
1364
  fileSize: a,
1365
1365
  thumbnailUrl: r
1366
1366
  }) => {
1367
- const i = a !== void 0 ? vs(a) : void 0;
1367
+ const i = a !== void 0 ? xs(a) : void 0;
1368
1368
  return /* @__PURE__ */ s(
1369
- bs,
1369
+ vs,
1370
1370
  {
1371
1371
  variant: "dark",
1372
1372
  title: n,
@@ -1374,7 +1374,7 @@ const ws = ({
1374
1374
  mimeType: t,
1375
1375
  detail: i,
1376
1376
  thumbnail: /* @__PURE__ */ s(
1377
- ps,
1377
+ bs,
1378
1378
  {
1379
1379
  mimeType: t,
1380
1380
  sourceUrl: e,
@@ -1385,23 +1385,23 @@ const ws = ({
1385
1385
  )
1386
1386
  }
1387
1387
  );
1388
- }, _s = ({
1388
+ }, Ns = ({
1389
1389
  resolvedUrl: e,
1390
1390
  resolvedType: t,
1391
1391
  title: n,
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = le(t), l = a !== void 0 ? vs(a) : void 0;
1395
+ const i = oe(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
- bs,
1397
+ vs,
1398
1398
  {
1399
1399
  variant: "light",
1400
1400
  title: n,
1401
1401
  mimeType: t,
1402
1402
  detail: l,
1403
1403
  thumbnail: /* @__PURE__ */ s(
1404
- ps,
1404
+ bs,
1405
1405
  {
1406
1406
  mimeType: t,
1407
1407
  sourceUrl: e,
@@ -1411,17 +1411,17 @@ const ws = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s(Oa, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s($a, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, $a = ({
1417
+ }, ja = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
1421
  const n = mt(e), a = ht(e);
1422
1422
  return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1423
1423
  !t && e.user && /* @__PURE__ */ s(
1424
- se,
1424
+ ne,
1425
1425
  {
1426
1426
  className: "str-chat__avatar str-chat__message-sender-avatar",
1427
1427
  id: e.user.id,
@@ -1439,41 +1439,41 @@ const ws = ({
1439
1439
  {
1440
1440
  className: "str-chat__message-bubble",
1441
1441
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1442
- children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ws, { ...a }) : /* @__PURE__ */ s(_s, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, ja = ({
1448
+ }, Ba = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
1451
  const t = mt(e);
1452
1452
  if (t)
1453
1453
  return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
1454
  const n = ht(e);
1455
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ws, { ...n }) }) : null;
1456
- }, Ba = ({
1455
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
+ }, Ua = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
1459
  const t = mt(e);
1460
1460
  if (t)
1461
1461
  return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
1462
  const n = ht(e);
1463
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1464
- }, ol = Object.assign($a, {
1465
- Creator: ja,
1466
- Visitor: Ba
1467
- }), Ua = {
1463
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
+ }, dl = Object.assign(ja, {
1465
+ Creator: Ba,
1466
+ Visitor: Ua
1467
+ }), Va = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Va = {
1470
+ }, Ga = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ga = {
1473
+ }, Ha = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, Ha = (e) => e === "dark" ? "sender" : "receiver", Ya = {
1476
+ }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1477
1477
  sender: {
1478
1478
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1479
1479
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1495,7 +1495,7 @@ const ws = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = Ya[Ha(e)][a];
1498
+ const o = t != null && t !== "", d = qa[Ya(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const ws = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Ua[e],
1514
1513
  Va[e],
1514
+ Ga[e],
1515
1515
  n && "border",
1516
- n && Ga[e],
1516
+ n && Ha[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const ws = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", qa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Wa = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1564
1564
  src: e,
1565
1565
  mimeType: t,
1566
1566
  filename: n,
1567
1567
  items: a
1568
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Xa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1568
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ka = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1569
1569
  /* @__PURE__ */ s(
1570
1570
  "audio",
1571
1571
  {
@@ -1588,10 +1588,10 @@ const ws = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Wa({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
- const g = o ?? (h.length > 1 ? "none" : "metadata");
1594
+ const f = o ?? (h.length > 1 ? "none" : "metadata");
1595
1595
  return /* @__PURE__ */ s(
1596
1596
  Te,
1597
1597
  {
@@ -1599,30 +1599,30 @@ const ws = ({
1599
1599
  text: i,
1600
1600
  groupPosition: l,
1601
1601
  "data-testid": "audio-attachment",
1602
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
- Xa,
1602
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((b, c) => /* @__PURE__ */ s(
1603
+ Ka,
1604
1604
  {
1605
- item: c,
1606
- preload: g,
1605
+ item: b,
1606
+ preload: f,
1607
1607
  trailingAction: (
1608
1608
  // Composer only supports a single attachment, so the
1609
1609
  // dismiss control sits on the only player.
1610
- p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1610
+ p && c === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1611
1611
  )
1612
1612
  },
1613
- `${c.src}-${v}`
1613
+ `${b.src}-${c}`
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Ka = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), Qa = {
1618
- Composer: Ka,
1619
- Sent: Ja,
1620
- Received: Za
1617
+ }, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
1618
+ Composer: Ja,
1619
+ Sent: Za,
1620
+ Received: Qa
1621
1621
  };
1622
- function er(e) {
1622
+ function tr(e) {
1623
1623
  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`;
1624
1624
  }
1625
- const tr = {
1625
+ const sr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const tr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function sr(e, t) {
1635
+ function nr(e, t) {
1636
1636
  if (t) {
1637
1637
  const r = t.lastIndexOf(".");
1638
1638
  if (r > 0 && r < t.length - 1) {
@@ -1641,8 +1641,8 @@ function sr(e, t) {
1641
1641
  }
1642
1642
  }
1643
1643
  if (!e) return;
1644
- if (le(e) === "document") {
1645
- const r = gs(e), i = tr[r];
1644
+ if (oe(e) === "document") {
1645
+ const r = ps(e), i = sr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function sr(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function nr(e, t, n) {
1654
- const a = sr(e, t), r = typeof n == "number" && n > 0 ? er(n) : void 0;
1653
+ function ar(e, t, n) {
1654
+ const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,16 +1662,16 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const ar = {
1665
+ const rr = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, rr = {
1668
+ }, ir = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, ir = {
1671
+ }, lr = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
- }, Ns = ({
1674
+ }, ys = ({
1675
1675
  variant: e,
1676
1676
  filename: t,
1677
1677
  title: n,
@@ -1681,16 +1681,16 @@ const ar = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = nr(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1685
1685
  "div",
1686
1686
  {
1687
1687
  className: k(
1688
1688
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1689
- rr[e]
1689
+ ir[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", ir[e]),
1693
+ className: k("size-6", lr[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,12 +1701,12 @@ const ar = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- ar[e]
1704
+ rr[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
1708
1708
  ) : null
1709
- ] }), g = i ? /* @__PURE__ */ m(
1709
+ ] }), f = i ? /* @__PURE__ */ m(
1710
1710
  "button",
1711
1711
  {
1712
1712
  type: "button",
@@ -1726,11 +1726,11 @@ const ar = {
1726
1726
  h
1727
1727
  ] });
1728
1728
  return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1729
- g,
1729
+ f,
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
1733
- async function ys(e, t) {
1733
+ async function ks(e, t) {
1734
1734
  const n = t ?? re(e);
1735
1735
  try {
1736
1736
  const a = await fetch(e, { mode: "cors" });
@@ -1744,14 +1744,14 @@ async function ys(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const lr = ({
1747
+ const or = ({
1748
1748
  src: e,
1749
1749
  filename: t,
1750
1750
  fileSize: n,
1751
1751
  mimeType: a,
1752
1752
  title: r,
1753
1753
  items: i
1754
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], or = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], cr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1760,7 +1760,7 @@ const lr = ({
1760
1760
  }) => {
1761
1761
  const i = t.filename ?? re(t.src);
1762
1762
  return /* @__PURE__ */ s(
1763
- Ns,
1763
+ ys,
1764
1764
  {
1765
1765
  variant: e,
1766
1766
  filename: i,
@@ -1785,21 +1785,21 @@ const lr = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, c = lr({
1788
+ const h = Me(e), f = e === "composer" && !!p, b = or({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
1792
1792
  mimeType: r,
1793
1793
  title: i,
1794
1794
  items: l
1795
- }), v = (b) => {
1796
- if ((u == null ? void 0 : u(b)) === !1) return;
1797
- const f = c[b];
1798
- if (!f) return;
1799
- const x = f.filename ?? re(f.src);
1800
- ys(f.src, x);
1795
+ }), c = (v) => {
1796
+ if ((u == null ? void 0 : u(v)) === !1) return;
1797
+ const g = b[v];
1798
+ if (!g) return;
1799
+ const x = g.filename ?? re(g.src);
1800
+ ks(g.src, x);
1801
1801
  };
1802
- if (c.length === 0)
1802
+ if (b.length === 0)
1803
1803
  return null;
1804
1804
  const w = /* @__PURE__ */ s(
1805
1805
  "span",
@@ -1819,23 +1819,23 @@ const lr = ({
1819
1819
  text: o,
1820
1820
  groupPosition: d,
1821
1821
  "data-testid": "file-attachment",
1822
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
- or,
1822
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: b.map((v, g) => /* @__PURE__ */ s(
1823
+ cr,
1824
1824
  {
1825
1825
  variant: h,
1826
- item: b,
1827
- index: f,
1828
- onActivate: v,
1829
- trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1826
+ item: v,
1827
+ index: g,
1828
+ onActivate: c,
1829
+ trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1830
1830
  },
1831
- `${b.src}-${f}`
1831
+ `${v.src}-${g}`
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), mr = {
1836
- Composer: cr,
1837
- Sent: dr,
1838
- Received: ur
1835
+ }, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
1836
+ Composer: dr,
1837
+ Sent: ur,
1838
+ Received: mr
1839
1839
  }, pt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
@@ -1849,7 +1849,7 @@ const lr = ({
1849
1849
  onClick: e,
1850
1850
  "aria-label": n,
1851
1851
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1852
- children: /* @__PURE__ */ s(Gn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1862,7 +1862,7 @@ const lr = ({
1862
1862
  children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
1863
1863
  }
1864
1864
  )
1865
- ] }), ks = ({
1865
+ ] }), Cs = ({
1866
1866
  url: e,
1867
1867
  filename: t,
1868
1868
  variant: n = "pill",
@@ -1872,14 +1872,14 @@ const lr = ({
1872
1872
  onTriggered: l
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
- (c) => {
1876
- c.stopPropagation(), !o && (d(!0), ys(e, t).catch(() => {
1875
+ (b) => {
1876
+ b.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
1880
1880
  },
1881
1881
  [o, e, t, l]
1882
- ), p = r ?? n !== "pill", g = { className: k(
1882
+ ), p = r ?? n !== "pill", f = { className: k(
1883
1883
  n === "pill" ? "size-4" : "size-5",
1884
1884
  "shrink-0"
1885
1885
  ), weight: "bold" };
@@ -1942,7 +1942,7 @@ const lr = ({
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Ce, { ...f, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
@@ -1981,9 +1981,9 @@ const lr = ({
1981
1981
  children: i,
1982
1982
  "data-testid": l
1983
1983
  }) => {
1984
- const o = G(null), d = G(null);
1984
+ const o = H(null), d = H(null);
1985
1985
  return K(() => {
1986
- var g;
1986
+ var f;
1987
1987
  const h = o.current;
1988
1988
  if (h) {
1989
1989
  if (e) {
@@ -1996,8 +1996,8 @@ const lr = ({
1996
1996
  }
1997
1997
  else
1998
1998
  h.setAttribute("open", "");
1999
- const c = typeof document < "u" ? document.activeElement : null;
2000
- return (g = d.current) == null || g.focus(), () => {
1999
+ const b = typeof document < "u" ? document.activeElement : null;
2000
+ return (f = d.current) == null || f.focus(), () => {
2001
2001
  if (h.open)
2002
2002
  if (typeof h.close == "function")
2003
2003
  try {
@@ -2007,7 +2007,7 @@ const lr = ({
2007
2007
  }
2008
2008
  else
2009
2009
  h.removeAttribute("open");
2010
- c && document.body.contains(c) && c.focus();
2010
+ b && document.body.contains(b) && b.focus();
2011
2011
  };
2012
2012
  }
2013
2013
  if (h.open)
@@ -2062,7 +2062,7 @@ const lr = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Cs = ({
2065
+ }, Es = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
@@ -2084,7 +2084,7 @@ const lr = ({
2084
2084
  ariaLabel: d,
2085
2085
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2086
2086
  actions: /* @__PURE__ */ s(
2087
- ks,
2087
+ Cs,
2088
2088
  {
2089
2089
  url: o.src,
2090
2090
  filename: d,
@@ -2118,7 +2118,7 @@ const lr = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, 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", Es = ({
2121
+ }, fr = "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", Ss = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const lr = ({
2127
2127
  const r = e.length;
2128
2128
  if (r === 0) return null;
2129
2129
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
2130
- const h = k(hr, "h-full w-full");
2130
+ const h = k(fr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const lr = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, fr = (e, t, n, a) => ({
2199
+ }, gr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,15 +2211,15 @@ const lr = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), gr = ({
2214
+ }), pr = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
2218
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ss = (e, t) => e.map((n, a) => ({
2218
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Is = (e, t) => e.map((n, a) => ({
2219
2219
  src: n.src,
2220
2220
  alt: n.alt,
2221
2221
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2222
- })), pr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2223
2223
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
2224
2224
  r
2225
2225
  );
@@ -2246,16 +2246,16 @@ const lr = ({
2246
2246
  ),
2247
2247
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2248
2248
  /* @__PURE__ */ s(
2249
- Cs,
2249
+ Es,
2250
2250
  {
2251
2251
  open: l,
2252
- items: Ss([{ src: e, alt: t }], n),
2252
+ items: Is([{ src: e, alt: t }], n),
2253
2253
  initialIndex: o,
2254
2254
  onClose: u
2255
2255
  }
2256
2256
  )
2257
2257
  ] });
2258
- }, Is = ({
2258
+ }, Ts = ({
2259
2259
  state: e,
2260
2260
  src: t,
2261
2261
  alt: n,
@@ -2266,13 +2266,13 @@ const lr = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = gr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2269
+ const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: b, closeViewer: c } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (b, f) => fr(b, f, u.length, o)
2275
+ (v, g) => gr(v, g, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,24 +2282,24 @@ const lr = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: b }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Cs,
2287
+ Es,
2288
2288
  {
2289
2289
  open: h,
2290
- items: Ss(u, a),
2291
- initialIndex: g,
2292
- onClose: v
2290
+ items: Is(u, a),
2291
+ initialIndex: f,
2292
+ onClose: c
2293
2293
  }
2294
2294
  )
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), wr = {
2299
- Composer: br,
2300
- Sent: vr,
2301
- Received: xr
2302
- }, _r = ({
2298
+ }, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), _r = {
2299
+ Composer: vr,
2300
+ Sent: xr,
2301
+ Received: wr
2302
+ }, Nr = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
@@ -2313,7 +2313,7 @@ const lr = ({
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
2315
  ), u = ae(
2316
- () => o ? Nr(o.src) : void 0,
2316
+ () => o ? yr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
@@ -2347,16 +2347,16 @@ const lr = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, Nr = (e) => {
2350
+ }, yr = (e) => {
2351
2351
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2352
2352
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2353
- }, yr = ({
2353
+ }, kr = ({
2354
2354
  src: e,
2355
2355
  filename: t,
2356
2356
  fileSize: n,
2357
2357
  title: a,
2358
2358
  items: r
2359
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], kr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Cr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2365,7 +2365,7 @@ const lr = ({
2365
2365
  }) => {
2366
2366
  const i = t.filename ?? re(t.src);
2367
2367
  return /* @__PURE__ */ s(
2368
- Ns,
2368
+ ys,
2369
2369
  {
2370
2370
  variant: e,
2371
2371
  filename: i,
@@ -2389,12 +2389,12 @@ const lr = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = yr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2392
+ const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2393
2393
  d
2394
- ), b = e === "composer" && !!u;
2394
+ ), v = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
2396
2396
  return null;
2397
- const f = h.map((x) => ({
2397
+ const g = h.map((x) => ({
2398
2398
  src: x.src,
2399
2399
  filename: x.filename ?? re(x.src)
2400
2400
  }));
@@ -2406,46 +2406,46 @@ const lr = ({
2406
2406
  groupPosition: o,
2407
2407
  "data-testid": "pdf-attachment",
2408
2408
  children: [
2409
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
- const E = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
- ks,
2409
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, _) => {
2410
+ const A = x.filename ?? re(x.src), S = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
+ Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
- filename: E,
2414
+ filename: A,
2415
2415
  variant: "inline",
2416
- label: `Download ${E}`,
2416
+ label: `Download ${A}`,
2417
2417
  tone: p
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- kr,
2421
+ Cr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
2425
- index: N,
2426
- onActivate: v,
2427
- trailingAction: T
2425
+ index: _,
2426
+ onActivate: c,
2427
+ trailingAction: S
2428
2428
  },
2429
- `${x.src}-${N}`
2429
+ `${x.src}-${_}`
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- _r,
2433
+ Nr,
2434
2434
  {
2435
- open: g,
2436
- items: f,
2437
- initialIndex: c,
2435
+ open: f,
2436
+ items: g,
2437
+ initialIndex: b,
2438
2438
  onClose: w
2439
2439
  }
2440
2440
  )
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Cr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Ir = {
2445
- Composer: Cr,
2446
- Sent: Er,
2447
- Received: Sr
2448
- }, Ts = ({
2444
+ }, Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
2445
+ Composer: Er,
2446
+ Sent: Sr,
2447
+ Received: Ir
2448
+ }, As = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
@@ -2495,7 +2495,7 @@ const lr = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Tr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), As = ({
2498
+ }, Ar = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2499
2499
  item: e,
2500
2500
  index: t
2501
2501
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2510,30 +2510,30 @@ const lr = ({
2510
2510
  className: "absolute inset-0 size-full rounded-md object-cover"
2511
2511
  }
2512
2512
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2513
- os,
2513
+ cs,
2514
2514
  {
2515
2515
  className: "size-16 rounded-md text-white/30",
2516
2516
  weight: "regular",
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Tr, {})
2521
- ] }), Ar = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Ar, {})
2521
+ ] }), Mr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
- content: /* @__PURE__ */ s(As, { item: e, index: t })
2524
- }), Mr = ({
2523
+ content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
+ }), Rr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
2528
2528
  preload: a,
2529
2529
  items: r
2530
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ms = (e, t) => e.map((n, a) => ({
2530
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Rs = (e, t) => e.map((n, a) => ({
2531
2531
  src: n.src,
2532
2532
  poster: n.poster,
2533
2533
  mimeType: n.mimeType,
2534
2534
  preload: n.preload,
2535
2535
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2536
- })), Rr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2536
+ })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2537
2537
  const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
2538
2538
  i
2539
2539
  );
@@ -2545,15 +2545,15 @@ const lr = ({
2545
2545
  onClick: () => u(0),
2546
2546
  "aria-label": "Play video",
2547
2547
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2548
- children: /* @__PURE__ */ s(As, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2548
+ children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2549
2549
  }
2550
2550
  ),
2551
2551
  l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: l }) }) : null,
2552
2552
  /* @__PURE__ */ s(
2553
- Ts,
2553
+ As,
2554
2554
  {
2555
2555
  open: o,
2556
- items: Ms(
2556
+ items: Rs(
2557
2557
  [{ src: e, poster: t, mimeType: n, preload: r }],
2558
2558
  a
2559
2559
  ),
@@ -2562,7 +2562,7 @@ const lr = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Rs = ({
2565
+ }, Ls = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const lr = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Mr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2577
+ const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
- const b = p.map(
2583
- (f, x) => Ar(f, x, p.length)
2582
+ const v = p.map(
2583
+ (g, x) => Mr(g, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,57 +2591,57 @@ const lr = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Es,
2594
+ Ss,
2595
2595
  {
2596
- tiles: b,
2597
- onTileActivate: v,
2596
+ tiles: v,
2597
+ onTileActivate: c,
2598
2598
  className: "overflow-hidden rounded-md"
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
- Ts,
2602
+ As,
2603
2603
  {
2604
- open: g,
2605
- items: Ms(p, r),
2606
- initialIndex: c,
2604
+ open: f,
2605
+ items: Rs(p, r),
2606
+ initialIndex: b,
2607
2607
  onClose: w
2608
2608
  }
2609
2609
  )
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, Lr = (e) => /* @__PURE__ */ s(Rr, { ...e }), Dr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), zr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Pr = {
2614
- Composer: Lr,
2615
- Sent: Dr,
2616
- Received: zr
2613
+ }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Fr = {
2614
+ Composer: Dr,
2615
+ Sent: zr,
2616
+ Received: Pr
2617
2617
  }, Ne = {
2618
- Image: wr,
2619
- Video: Pr,
2620
- Audio: Qa,
2621
- Pdf: Ir,
2622
- File: mr
2623
- }, Fr = {
2624
- isUnlocking: () => !1
2618
+ Image: _r,
2619
+ Video: Fr,
2620
+ Audio: er,
2621
+ Pdf: Tr,
2622
+ File: hr
2625
2623
  }, Or = {
2626
- LockedAttachment: Fr
2627
- }, Ls = at({}), cl = Ls.Provider;
2628
- function $r(e) {
2629
- return Se(Ls)[e] ?? Or[e];
2624
+ isUnlocking: () => !1
2625
+ }, $r = {
2626
+ LockedAttachment: Or
2627
+ }, Ds = at({}), ul = Ds.Provider;
2628
+ function jr(e) {
2629
+ return Se(Ds)[e] ?? $r[e];
2630
2630
  }
2631
- const jr = ({
2631
+ const Br = (e) => !!e && (e.includes("bottom") || e.includes("single")), Ur = ({
2632
2632
  message: e,
2633
- endOfGroup: t
2634
- }) => !t || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
2633
+ groupStyles: t
2634
+ }) => !Br(t) || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
2635
2635
  "div",
2636
2636
  {
2637
2637
  className: "str-chat__message-delivery-status",
2638
2638
  "data-testid": "message-delivery-status",
2639
2639
  children: [
2640
- /* @__PURE__ */ s(Hn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2640
+ /* @__PURE__ */ s(Yn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2641
2641
  /* @__PURE__ */ s("span", { children: "Delivered" })
2642
2642
  ]
2643
2643
  }
2644
- ), Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2644
+ ), Vr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2645
  "svg",
2646
2646
  {
2647
2647
  width: e,
@@ -2658,21 +2658,21 @@ const jr = ({
2658
2658
  }
2659
2659
  )
2660
2660
  }
2661
- ), Ur = (e) => {
2661
+ ), Gr = (e) => {
2662
2662
  var t;
2663
2663
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2664
- }, Vr = (e) => {
2664
+ }, Hr = (e) => {
2665
2665
  var t;
2666
2666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2667
2667
  }, Fe = (e) => {
2668
2668
  var t;
2669
2669
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2670
- }, Gr = (e) => {
2670
+ }, Yr = (e) => {
2671
2671
  var t;
2672
2672
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2673
- }, Ds = (e) => Ur(e) || Vr(e), Hr = (e) => {
2673
+ }, zs = (e) => Gr(e) || Hr(e), qr = (e) => {
2674
2674
  var t;
2675
- return Ds(e) && !((t = e.text) != null && t.trim());
2675
+ return zs(e) && !((t = e.text) != null && t.trim());
2676
2676
  }, Ke = ({
2677
2677
  message: e,
2678
2678
  standalone: t = !1,
@@ -2680,23 +2680,23 @@ const jr = ({
2680
2680
  hasAttachment: a = !1
2681
2681
  }) => {
2682
2682
  var h;
2683
- const r = Ds(e), i = Fe(e);
2683
+ const r = zs(e), i = Fe(e);
2684
2684
  if (!r && !i)
2685
2685
  return null;
2686
2686
  if (r) {
2687
- const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2688
- if (!g) return null;
2689
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2690
- return /* @__PURE__ */ m("div", { className: c, children: [
2691
- /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2692
- /* @__PURE__ */ s("span", { children: v })
2687
+ const f = (h = e.metadata) == null ? void 0 : h.amount_text;
2688
+ if (!f) return null;
2689
+ const b = t ? "message-tip-standalone" : "message-tag message-tag--tip", c = t ? `${f} tip` : `Delivered with ${f} tip`;
2690
+ return /* @__PURE__ */ m("div", { className: b, children: [
2691
+ /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2692
+ /* @__PURE__ */ s("span", { children: c })
2693
2693
  ] });
2694
2694
  }
2695
2695
  const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
2696
2696
  "message-chatbot-indicator",
2697
2697
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2698
2698
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2699
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Br, { size: l ? 12 : 15 }) });
2699
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Vr, { size: l ? 12 : 15 }) });
2700
2700
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
2701
2701
  u,
2702
2702
  p
@@ -2704,7 +2704,7 @@ const jr = ({
2704
2704
  p,
2705
2705
  u
2706
2706
  ] }) });
2707
- }, Yr = ({
2707
+ }, Wr = ({
2708
2708
  selected: e,
2709
2709
  onVoteUp: t,
2710
2710
  onVoteDown: n
@@ -2720,7 +2720,7 @@ const jr = ({
2720
2720
  "aria-label": "Good response",
2721
2721
  "aria-pressed": e === "up",
2722
2722
  "data-tooltip": "Good response",
2723
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2723
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2724
2724
  }
2725
2725
  ),
2726
2726
  /* @__PURE__ */ s(
@@ -2734,28 +2734,28 @@ const jr = ({
2734
2734
  "aria-label": "Bad response",
2735
2735
  "aria-pressed": e === "down",
2736
2736
  "data-tooltip": "Bad response",
2737
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2737
+ children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2738
2738
  }
2739
2739
  )
2740
- ] }), qr = /^([a-z][a-z0-9+.-]*):/i, Wr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2740
+ ] }), Xr = /^([a-z][a-z0-9+.-]*):/i, Kr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2741
2741
  function wt(e) {
2742
2742
  if (typeof e != "string") return;
2743
2743
  const t = e.trim();
2744
2744
  if (t === "") return;
2745
- const n = qr.exec(t);
2745
+ const n = Xr.exec(t);
2746
2746
  if (n) {
2747
2747
  const a = n[1].toLowerCase();
2748
- return Wr.has(a) ? t : void 0;
2748
+ return Kr.has(a) ? t : void 0;
2749
2749
  }
2750
2750
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2751
2751
  }
2752
- const Xr = {
2752
+ const Jr = {
2753
2753
  dark: "bg-white text-[#121110] hover:bg-white/90",
2754
2754
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2755
- }, Kr = ({ variant: e, cta: t }) => {
2755
+ }, Zr = ({ variant: e, cta: t }) => {
2756
2756
  const n = k(
2757
2757
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2758
- Xr[e]
2758
+ Jr[e]
2759
2759
  ), a = wt(t.href);
2760
2760
  return a ? /* @__PURE__ */ s(
2761
2761
  "a",
@@ -2782,10 +2782,10 @@ const Xr = {
2782
2782
  children: t.label
2783
2783
  }
2784
2784
  );
2785
- }, Jr = {
2785
+ }, Qr = {
2786
2786
  dark: "text-white",
2787
2787
  light: "text-black/90"
2788
- }, Zr = "text-white/30", Qr = {
2788
+ }, ei = "text-white/30", ti = {
2789
2789
  dark: "text-white/55",
2790
2790
  light: "text-black/55"
2791
2791
  }, _t = ({
@@ -2798,14 +2798,14 @@ const Xr = {
2798
2798
  cta: l,
2799
2799
  trailingAction: o
2800
2800
  }) => {
2801
- const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", v = l != null;
2802
- if (!p && !h && !c && !v) return null;
2803
- const b = k(
2801
+ const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", b = f !== "", c = l != null;
2802
+ if (!p && !h && !b && !c) return null;
2803
+ const v = k(
2804
2804
  "truncate text-base font-medium leading-6",
2805
- d && !t ? Zr : Jr[e]
2806
- ), f = k(
2805
+ d && !t ? ei : Qr[e]
2806
+ ), g = k(
2807
2807
  "truncate text-xs leading-4",
2808
- Qr[e]
2808
+ ti[e]
2809
2809
  );
2810
2810
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2811
2811
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -2813,17 +2813,17 @@ const Xr = {
2813
2813
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2814
2814
  p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2815
2815
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2816
- /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2816
+ /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: u })
2817
2817
  ] }),
2818
- h && /* @__PURE__ */ s("p", { className: f, children: a })
2818
+ h && /* @__PURE__ */ s("p", { className: g, children: a })
2819
2819
  ] }),
2820
- !v && c && /* @__PURE__ */ s("p", { className: f, children: g })
2820
+ !c && b && /* @__PURE__ */ s("p", { className: g, children: f })
2821
2821
  ] }),
2822
2822
  o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
2823
2823
  ] }),
2824
- l && /* @__PURE__ */ s(Kr, { variant: e, cta: l })
2824
+ l && /* @__PURE__ */ s(Zr, { variant: e, cta: l })
2825
2825
  ] });
2826
- }, ei = k(
2826
+ }, si = k(
2827
2827
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2828
2828
  // 1px hairline border that sits flush with the card chrome — matches
2829
2829
  // the messaging design system's "small border around link attachments"
@@ -2842,7 +2842,7 @@ const Xr = {
2842
2842
  "data-testid": d
2843
2843
  }) => {
2844
2844
  const u = n != null || a != null, p = k(
2845
- ei,
2845
+ si,
2846
2846
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2847
2847
  // `focus-ring` is a design-system utility from the component-library
2848
2848
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2890,15 +2890,15 @@ const Xr = {
2890
2890
  ]
2891
2891
  }
2892
2892
  );
2893
- }, ti = {
2893
+ }, ni = {
2894
2894
  dark: "bg-white/10",
2895
2895
  light: "bg-black/5"
2896
- }, si = {
2896
+ }, ai = {
2897
2897
  dark: "size-16 text-white/25",
2898
2898
  light: "size-16 text-black/25"
2899
- }, Ve = (e, t) => !!t && !!e && le(e) === "audio", Nt = (e, t) => {
2899
+ }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Nt = (e, t) => {
2900
2900
  if (!t || !e) return !1;
2901
- const n = le(e);
2901
+ const n = oe(e);
2902
2902
  return n === "video" || n === "audio";
2903
2903
  }, yt = "bg-[#F2F3F4]", $e = ({
2904
2904
  variant: e,
@@ -2909,7 +2909,7 @@ const Xr = {
2909
2909
  topLeft: i,
2910
2910
  topRight: l
2911
2911
  }) => {
2912
- const o = le(r), d = !!n && o === "video";
2912
+ const o = oe(r), d = !!n && o === "video";
2913
2913
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2914
2914
  "audio",
2915
2915
  {
@@ -2951,10 +2951,10 @@ const Xr = {
2951
2951
  {
2952
2952
  className: k(
2953
2953
  "flex h-full w-full items-center justify-center",
2954
- ti[e]
2954
+ ni[e]
2955
2955
  ),
2956
2956
  children: we(r, {
2957
- className: si[e],
2957
+ className: ai[e],
2958
2958
  weight: "regular"
2959
2959
  })
2960
2960
  }
@@ -2964,7 +2964,7 @@ const Xr = {
2964
2964
  ]
2965
2965
  }
2966
2966
  );
2967
- }, ni = ({
2967
+ }, ri = ({
2968
2968
  title: e,
2969
2969
  placeholderTitle: t,
2970
2970
  description: n,
@@ -2978,7 +2978,7 @@ const Xr = {
2978
2978
  onDismiss: p,
2979
2979
  onEditClick: h
2980
2980
  }) => {
2981
- const g = o === "classic", c = Ve(r, l), v = p ? /* @__PURE__ */ s(
2981
+ const f = o === "classic", b = Ve(r, l), c = p ? /* @__PURE__ */ s(
2982
2982
  "button",
2983
2983
  {
2984
2984
  type: "button",
@@ -2994,10 +2994,10 @@ const Xr = {
2994
2994
  onClick: h,
2995
2995
  "aria-label": "Edit attachment",
2996
2996
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2997
- children: /* @__PURE__ */ s(Xn, { className: "size-5", weight: "regular" })
2997
+ children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
2998
2998
  }
2999
2999
  ) : void 0;
3000
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3000
+ return b ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3001
3001
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3002
3002
  $e,
3003
3003
  {
@@ -3007,14 +3007,14 @@ const Xr = {
3007
3007
  mimeType: r
3008
3008
  }
3009
3009
  ) }),
3010
- v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3010
+ c && /* @__PURE__ */ s("div", { className: "shrink-0", children: c })
3011
3011
  ] }) }) : /* @__PURE__ */ m(
3012
3012
  Oe,
3013
3013
  {
3014
3014
  variant: "dark",
3015
- topRight: g ? v : void 0,
3015
+ topRight: f ? c : void 0,
3016
3016
  children: [
3017
- !g && /* @__PURE__ */ s(
3017
+ !f && /* @__PURE__ */ s(
3018
3018
  $e,
3019
3019
  {
3020
3020
  variant: "dark",
@@ -3022,7 +3022,7 @@ const Xr = {
3022
3022
  sourceUrl: l,
3023
3023
  title: e,
3024
3024
  mimeType: r,
3025
- topRight: v
3025
+ topRight: c
3026
3026
  }
3027
3027
  ),
3028
3028
  /* @__PURE__ */ s(
@@ -3041,7 +3041,7 @@ const Xr = {
3041
3041
  ]
3042
3042
  }
3043
3043
  );
3044
- }, ai = ({
3044
+ }, ii = ({
3045
3045
  title: e,
3046
3046
  description: t,
3047
3047
  url: n,
@@ -3053,21 +3053,21 @@ const Xr = {
3053
3053
  cta: d,
3054
3054
  onClick: u
3055
3055
  }) => {
3056
- const p = Nt(a, i), h = wt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? yt : void 0, w = d && u ? {
3056
+ const p = Nt(a, i), h = wt(n), f = d == null && h != null && !p ? h : void 0, b = d == null && !p ? u : void 0, c = Ve(a, i) ? yt : void 0, w = d && u ? {
3057
3057
  ...d,
3058
3058
  onClick: () => {
3059
- var b;
3060
- u(), (b = d.onClick) == null || b.call(d);
3059
+ var v;
3060
+ u(), (v = d.onClick) == null || v.call(d);
3061
3061
  }
3062
3062
  } : d;
3063
3063
  return /* @__PURE__ */ m(
3064
3064
  Oe,
3065
3065
  {
3066
3066
  variant: "light",
3067
- href: g,
3068
- onClick: c,
3067
+ href: f,
3068
+ onClick: b,
3069
3069
  ariaLabel: e ?? "Open attachment preview",
3070
- bgClassName: v,
3070
+ bgClassName: c,
3071
3071
  "data-testid": "link-attachment",
3072
3072
  children: [
3073
3073
  l === "featured" && /* @__PURE__ */ s(
@@ -3094,7 +3094,7 @@ const Xr = {
3094
3094
  ]
3095
3095
  }
3096
3096
  );
3097
- }, ri = ({
3097
+ }, li = ({
3098
3098
  title: e,
3099
3099
  placeholderTitle: t,
3100
3100
  description: n,
@@ -3107,13 +3107,13 @@ const Xr = {
3107
3107
  cta: u,
3108
3108
  onClick: p
3109
3109
  }) => {
3110
- const h = Nt(r, l), g = wt(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3110
+ const h = Nt(r, l), f = wt(a), b = u == null && f != null && !h ? f : void 0, c = u == null && !h && b != null ? p : void 0;
3111
3111
  return /* @__PURE__ */ m(
3112
3112
  Oe,
3113
3113
  {
3114
3114
  variant: "dark",
3115
- href: c,
3116
- onClick: v,
3115
+ href: b,
3116
+ onClick: c,
3117
3117
  bgClassName: Ve(r, l) ? yt : void 0,
3118
3118
  children: [
3119
3119
  o === "featured" && /* @__PURE__ */ s(
@@ -3141,22 +3141,22 @@ const Xr = {
3141
3141
  ]
3142
3142
  }
3143
3143
  );
3144
- }, Qt = {
3145
- Composer: ni,
3146
- Sent: ri,
3147
- Received: ai
3148
- }, ii = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", li = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3144
+ }, es = {
3145
+ Composer: ri,
3146
+ Sent: li,
3147
+ Received: ii
3148
+ }, oi = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3149
3149
  function P(e) {
3150
3150
  const t = e == null ? void 0 : e.trim();
3151
3151
  return t || void 0;
3152
3152
  }
3153
- function es(e) {
3153
+ function ts(e) {
3154
3154
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3155
3155
  }
3156
- function oi(e, t) {
3156
+ function di(e, t) {
3157
3157
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3158
3158
  return !1;
3159
- const n = es(e), a = es(t);
3159
+ const n = ts(e), a = ts(t);
3160
3160
  if (n === a)
3161
3161
  return !0;
3162
3162
  if (!n.includes(a))
@@ -3164,7 +3164,7 @@ function oi(e, t) {
3164
3164
  const r = n.split(a).join("");
3165
3165
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3166
3166
  }
3167
- function ts(e) {
3167
+ function ss(e) {
3168
3168
  const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
3169
3169
  return {
3170
3170
  title: P(e.title),
@@ -3178,15 +3178,15 @@ function ts(e) {
3178
3178
  mimeType: r
3179
3179
  };
3180
3180
  }
3181
- function ci(e) {
3181
+ function ui(e) {
3182
3182
  var t;
3183
- return zs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3183
+ return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3184
3184
  }
3185
- function zs(e) {
3185
+ function Ps(e) {
3186
3186
  const t = P(e.og_scrape_url);
3187
3187
  return e.type === "link" || !!t && !e.asset_url;
3188
3188
  }
3189
- function Ps(e) {
3189
+ function Fs(e) {
3190
3190
  if (!(e != null && e.length)) return [];
3191
3191
  const t = [], n = (r, i) => {
3192
3192
  const l = t[t.length - 1];
@@ -3204,31 +3204,31 @@ function Ps(e) {
3204
3204
  t.push({ type: "link", attachments: [r] });
3205
3205
  };
3206
3206
  for (const r of e) {
3207
- if (zs(r)) {
3207
+ if (Ps(r)) {
3208
3208
  a(r);
3209
3209
  continue;
3210
3210
  }
3211
- const i = ci(r);
3211
+ const i = ui(r);
3212
3212
  i && n(i, r);
3213
3213
  }
3214
3214
  return t;
3215
3215
  }
3216
- function di(e) {
3216
+ function mi(e) {
3217
3217
  let t = 0;
3218
3218
  for (const n of e)
3219
3219
  t += n.type === "link" ? n.attachments.length : 1;
3220
3220
  return t;
3221
3221
  }
3222
- function ui(e) {
3222
+ function hi(e) {
3223
3223
  return e.filter((t) => t.type === "media").length;
3224
3224
  }
3225
- function mi(e, t, n) {
3225
+ function fi(e, t, n) {
3226
3226
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3227
3227
  }
3228
- function ss(e) {
3228
+ function ns(e) {
3229
3229
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3230
3230
  }
3231
- function hi(e) {
3231
+ function gi(e) {
3232
3232
  switch (e) {
3233
3233
  case "image":
3234
3234
  return Ne.Image;
@@ -3242,13 +3242,13 @@ function hi(e) {
3242
3242
  return Ne.File;
3243
3243
  }
3244
3244
  }
3245
- function fi(e, t) {
3245
+ function pi(e, t) {
3246
3246
  if (t.length > 1)
3247
3247
  switch (e) {
3248
3248
  case "image":
3249
3249
  return {
3250
3250
  items: t.map((a) => ({
3251
- src: ss(a),
3251
+ src: ns(a),
3252
3252
  alt: P(a.title)
3253
3253
  }))
3254
3254
  };
@@ -3299,7 +3299,7 @@ function fi(e, t) {
3299
3299
  switch (e) {
3300
3300
  case "image":
3301
3301
  return {
3302
- src: ss(n),
3302
+ src: ns(n),
3303
3303
  alt: P(n.title)
3304
3304
  };
3305
3305
  case "video":
@@ -3329,69 +3329,69 @@ function fi(e, t) {
3329
3329
  };
3330
3330
  }
3331
3331
  }
3332
- function gi({
3332
+ function bi({
3333
3333
  groupPosition: e,
3334
3334
  isMyMessage: t,
3335
3335
  segment: n,
3336
3336
  text: a
3337
3337
  }) {
3338
- const r = hi(n.kind), i = {
3339
- ...fi(n.kind, n.attachments),
3338
+ const r = gi(n.kind), i = {
3339
+ ...pi(n.kind, n.attachments),
3340
3340
  groupPosition: e,
3341
3341
  ...a ? { text: a } : {}
3342
3342
  };
3343
3343
  return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3344
3344
  }
3345
- const pi = ({
3345
+ const vi = ({
3346
3346
  groupPosition: e,
3347
3347
  isMyMessage: t,
3348
3348
  message: n
3349
3349
  }) => {
3350
3350
  var w;
3351
- const a = Ps(n.attachments);
3351
+ const a = Fs(n.attachments);
3352
3352
  if (a.length === 0) return null;
3353
- const r = di(a), i = ui(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ts(o.attachments[0] ?? {}).url : void 0, u = l && oi(l, d) ? void 0 : l;
3353
+ const r = mi(a), i = hi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((v) => v.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && di(l, d) ? void 0 : l;
3354
3354
  let p = 0, h = 0;
3355
- const g = [], c = (b, f) => {
3355
+ const f = [], b = (v, g) => {
3356
3356
  const x = p === r - 1;
3357
3357
  p += 1;
3358
- const N = t ? Qt.Sent : Qt.Received;
3359
- g.push(
3358
+ const _ = t ? es.Sent : es.Received;
3359
+ f.push(
3360
3360
  /* @__PURE__ */ m(U.Fragment, { children: [
3361
- /* @__PURE__ */ s(N, { ...ts(b) }),
3362
- x && u ? /* @__PURE__ */ s("div", { className: t ? ii : li, children: u }) : null
3363
- ] }, f)
3361
+ /* @__PURE__ */ s(_, { ...ss(v) }),
3362
+ x && u ? /* @__PURE__ */ s("div", { className: t ? oi : ci, children: u }) : null
3363
+ ] }, g)
3364
3364
  );
3365
- }, v = (b, f) => {
3366
- const x = p === r - 1, N = mi(
3365
+ }, c = (v, g) => {
3366
+ const x = p === r - 1, _ = fi(
3367
3367
  h,
3368
3368
  i,
3369
3369
  e
3370
3370
  );
3371
- p += 1, h += 1, g.push(
3371
+ p += 1, h += 1, f.push(
3372
3372
  /* @__PURE__ */ s(
3373
- gi,
3373
+ bi,
3374
3374
  {
3375
- groupPosition: N,
3375
+ groupPosition: _,
3376
3376
  isMyMessage: t,
3377
- segment: b,
3377
+ segment: v,
3378
3378
  text: x ? u : void 0
3379
3379
  },
3380
- f
3380
+ g
3381
3381
  )
3382
3382
  );
3383
3383
  };
3384
- return a.forEach((b, f) => {
3385
- if (b.type === "link") {
3386
- b.attachments.forEach((x, N) => {
3387
- c(x, `link-${f}-${N}`);
3384
+ return a.forEach((v, g) => {
3385
+ if (v.type === "link") {
3386
+ v.attachments.forEach((x, _) => {
3387
+ b(x, `link-${g}-${_}`);
3388
3388
  });
3389
3389
  return;
3390
3390
  }
3391
- v(b, `media-${f}`);
3392
- }), /* @__PURE__ */ s(te, { children: g });
3393
- }, bi = (e) => {
3394
- var Tt, At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut;
3391
+ c(v, `media-${g}`);
3392
+ }), /* @__PURE__ */ s(te, { children: f });
3393
+ }, xi = (e) => {
3394
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3395
3395
  const {
3396
3396
  additionalMessageInputProps: t,
3397
3397
  chatbotVotingEnabled: n,
@@ -3399,105 +3399,106 @@ const pi = ({
3399
3399
  endOfGroup: r,
3400
3400
  firstOfGroup: i,
3401
3401
  groupedByUser: l,
3402
- handleAction: o,
3403
- handleOpenThread: d,
3404
- handleRetry: u,
3405
- highlighted: p,
3406
- isMessageAIGenerated: h,
3407
- isMyMessage: g,
3402
+ groupStyles: o,
3403
+ handleAction: d,
3404
+ handleOpenThread: u,
3405
+ handleRetry: p,
3406
+ highlighted: h,
3407
+ isMessageAIGenerated: f,
3408
+ isMyMessage: b,
3408
3409
  message: c,
3409
- renderText: v,
3410
- threadList: w,
3411
- viewerLanguage: b
3412
- } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: E, onFetchSource: T, onDownloadClick: M } = $r("LockedAttachment"), [D, L] = B(!1), O = Xs(c.id), { selected: z, voteUp: y, voteDown: A } = ba(c), {
3413
- Attachment: S = Ks,
3414
- EditMessageModal: C = Js,
3415
- MessageActions: I,
3416
- MessageBlocked: $ = Zs,
3417
- MessageBouncePrompt: F = Qs,
3418
- MessageDeleted: V = en,
3419
- MessageIsThreadReplyInChannelButtonIndicator: Q = tn,
3420
- MessageRepliesCountButton: ee = sn,
3421
- ReminderNotification: X = nn,
3422
- StreamedMessageText: _ = an,
3423
- PinIndicator: R
3424
- } = rs("CustomMessage"), H = rn(c), q = ln(c), Y = ae(
3425
- () => h == null ? void 0 : h(c),
3426
- [h, c]
3410
+ renderText: w,
3411
+ threadList: v,
3412
+ viewerLanguage: g
3413
+ } = e, { client: x } = me("CustomMessage"), { channel: _ } = ue("CustomMessage"), { isUnlocking: A, onUnlockClick: S, onFetchSource: I, onDownloadClick: L } = jr("LockedAttachment"), [D, $] = B(!1), z = Ks(c.id), { selected: y, voteUp: M, voteDown: E } = va(c), {
3414
+ Attachment: C = Js,
3415
+ EditMessageModal: T = Zs,
3416
+ MessageActions: F,
3417
+ MessageBlocked: O = Qs,
3418
+ MessageBouncePrompt: V = en,
3419
+ MessageDeleted: Z = tn,
3420
+ MessageIsThreadReplyInChannelButtonIndicator: ee = sn,
3421
+ MessageRepliesCountButton: X = nn,
3422
+ ReminderNotification: N = an,
3423
+ StreamedMessageText: R = rn,
3424
+ PinIndicator: G
3425
+ } = is("CustomMessage"), Y = ln(c), q = on(c), W = ae(
3426
+ () => f == null ? void 0 : f(c),
3427
+ [f, c]
3427
3428
  ), j = ae(() => {
3428
3429
  const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3429
3430
  if (!Fe(c)) return pe;
3430
- const Vt = pe.filter((Gt) => !("type" in Gt) || !xs(Gt));
3431
- return Vt.length === pe.length ? pe : Vt;
3432
- }, [c]), W = ae(
3433
- () => Ps(j),
3431
+ const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3432
+ return Gt.length === pe.length ? pe : Gt;
3433
+ }, [c]), Q = ae(
3434
+ () => Fs(j),
3434
3435
  [j]
3435
- ), Z = ae(() => {
3436
- const de = ms({ message: c, viewerLanguage: b });
3436
+ ), se = ae(() => {
3437
+ const de = hs({ message: c, viewerLanguage: g });
3437
3438
  return de === c.text ? c : { ...c, text: de };
3438
- }, [c, b]), oe = W.length > 0, Le = W.reduce(
3439
+ }, [c, g]), Le = Q.length > 0, De = Q.reduce(
3439
3440
  (de, pe) => de + pe.attachments.length,
3440
3441
  0
3441
- ) === ((j == null ? void 0 : j.length) ?? 0), De = qa(
3442
+ ) === ((j == null ? void 0 : j.length) ?? 0), ie = Wa(
3442
3443
  {
3443
3444
  endOfGroup: r,
3444
3445
  firstOfGroup: i,
3445
3446
  groupedByUser: l
3446
3447
  }
3447
3448
  );
3448
- if (on(c))
3449
+ if (cn(c))
3449
3450
  return null;
3450
3451
  if (c.deleted_at || c.type === "deleted")
3451
- return /* @__PURE__ */ s(V, { message: c });
3452
- if (cn(c))
3453
- return /* @__PURE__ */ s($, {});
3454
- const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Tt = c.error) == null ? void 0 : Tt.status) !== 403, Ct = dn(c);
3452
+ return /* @__PURE__ */ s(Z, { message: c });
3453
+ if (dn(c))
3454
+ return /* @__PURE__ */ s(O, {});
3455
+ const ce = !v && !!c.reply_count, le = !v && c.show_in_channel && c.parent_id, Ct = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, Et = un(c);
3455
3456
  let he;
3456
- ie ? he = () => u(c) : Ct && (he = () => L(!0));
3457
- const fe = g(), Bs = k(
3457
+ Ct ? he = () => p(c) : Et && (he = () => $(!0));
3458
+ const fe = b(), Us = k(
3458
3459
  "str-chat__message str-chat__message-simple",
3459
3460
  `str-chat__message--${c.type}`,
3460
3461
  `str-chat__message--${c.status}`,
3461
3462
  fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3462
3463
  c.text ? "str-chat__message--has-text" : "has-no-text",
3463
3464
  {
3464
- "str-chat__message--has-attachment": H,
3465
- "str-chat__message--highlighted": p,
3465
+ "str-chat__message--has-attachment": Y,
3466
+ "str-chat__message--highlighted": h,
3466
3467
  "str-chat__message--pinned pinned-message": c.pinned,
3467
3468
  "str-chat__message--with-reactions": q,
3468
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((At = c == null ? void 0 : c.error) == null ? void 0 : At.status) !== 403,
3469
- "str-chat__message-with-thread-link": ne || ce,
3469
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3470
+ "str-chat__message-with-thread-link": ce || le,
3470
3471
  "str-chat__virtual-message__wrapper--end": r,
3471
3472
  "str-chat__virtual-message__wrapper--first": i,
3472
3473
  "str-chat__virtual-message__wrapper--group": l
3473
3474
  }
3474
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Hr(c), ge = Fe(c), St = Gr(c), He = !!(j != null && j.length && !c.quoted_message), It = ge && fe && He, Us = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
3475
+ ), Ge = c.poll_id && x.polls.fromState(c.poll_id), St = qr(c), ge = Fe(c), It = Yr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = Le && De && !c.quoted_message && !Ge && !W && !ge;
3475
3476
  return /* @__PURE__ */ m(te, { children: [
3476
3477
  a && /* @__PURE__ */ s(
3477
- C,
3478
+ T,
3478
3479
  {
3479
3480
  additionalMessageInputProps: t
3480
3481
  }
3481
3482
  ),
3482
3483
  D && /* @__PURE__ */ s(
3483
- un,
3484
+ mn,
3484
3485
  {
3485
- MessageBouncePrompt: F,
3486
- onClose: () => L(!1),
3486
+ MessageBouncePrompt: V,
3487
+ onClose: () => $(!1),
3487
3488
  open: D
3488
3489
  }
3489
3490
  ),
3490
3491
  /* @__PURE__ */ m(
3491
3492
  "div",
3492
3493
  {
3493
- className: Bs,
3494
+ className: Us,
3494
3495
  "data-message-id": c.id,
3495
3496
  "data-dd-privacy": "mask",
3496
3497
  children: [
3497
- R && /* @__PURE__ */ s(R, {}),
3498
- !!O && /* @__PURE__ */ s(X, { reminder: O }),
3498
+ G && /* @__PURE__ */ s(G, {}),
3499
+ !!z && /* @__PURE__ */ s(N, { reminder: z }),
3499
3500
  c.user && /* @__PURE__ */ s(
3500
- se,
3501
+ ne,
3501
3502
  {
3502
3503
  className: "str-chat__avatar str-chat__message-sender-avatar",
3503
3504
  id: c.user.id,
@@ -3512,7 +3513,7 @@ const pi = ({
3512
3513
  "div",
3513
3514
  {
3514
3515
  className: k("str-chat__message-inner", {
3515
- "str-chat__simple-message--error-failed": ie || Ct
3516
+ "str-chat__simple-message--error-failed": Ct || Et
3516
3517
  }),
3517
3518
  "data-testid": "message-inner",
3518
3519
  onClick: he,
@@ -3525,51 +3526,51 @@ const pi = ({
3525
3526
  marginInlineEnd: 0,
3526
3527
  marginInlineStart: 0
3527
3528
  },
3528
- children: St ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3529
+ children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3529
3530
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3530
- I && /* @__PURE__ */ s(I, {}),
3531
+ F && /* @__PURE__ */ s(F, {}),
3531
3532
  /* @__PURE__ */ s(
3532
- Jt.Sent,
3533
+ Zt.Sent,
3533
3534
  {
3534
- title: (Mt = c.metadata) == null ? void 0 : Mt.attachment_title,
3535
- mimeType: (Rt = c.metadata) == null ? void 0 : Rt.attachment_mime_type,
3536
- thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3537
- amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
3538
- detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
3539
- paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
3540
- onPreviewClick: () => E == null ? void 0 : E(c, x),
3541
- onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3535
+ title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3536
+ mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3537
+ thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3538
+ amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3539
+ detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3540
+ paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3541
+ onPreviewClick: () => S == null ? void 0 : S(c, _),
3542
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _))
3542
3543
  }
3543
3544
  )
3544
3545
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3545
3546
  /* @__PURE__ */ s(
3546
- Jt.Received,
3547
+ Zt.Received,
3547
3548
  {
3548
- title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
3549
- mimeType: (Ot = c.metadata) == null ? void 0 : Ot.attachment_mime_type,
3550
- thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3551
- amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
3552
- detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
3553
- paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
3554
- isUnlocking: N(c.id),
3555
- onUnlockClick: () => E == null ? void 0 : E(c, x),
3556
- onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3557
- onDownloadClick: () => M == null ? void 0 : M(c, x)
3549
+ title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3550
+ mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3551
+ thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3552
+ amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3553
+ detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3554
+ paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3555
+ isUnlocking: A(c.id),
3556
+ onUnlockClick: () => S == null ? void 0 : S(c, _),
3557
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
3558
+ onDownloadClick: () => L == null ? void 0 : L(c, _)
3558
3559
  }
3559
3560
  ),
3560
- I && /* @__PURE__ */ s(I, {})
3561
+ F && /* @__PURE__ */ s(F, {})
3561
3562
  ] }),
3562
3563
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3563
- Yt,
3564
+ qt,
3564
3565
  {
3565
- message: Z,
3566
- renderText: v
3566
+ message: se,
3567
+ renderText: w
3567
3568
  }
3568
3569
  ) })
3569
- ] }) : Et ? (
3570
+ ] }) : St ? (
3570
3571
  /* Tip-only messages render as a standalone bubble */
3571
3572
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3572
- ) : Us ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3573
+ ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3573
3574
  "div",
3574
3575
  {
3575
3576
  className: "str-chat__message-bubble",
@@ -3581,21 +3582,21 @@ const pi = ({
3581
3582
  },
3582
3583
  children: [
3583
3584
  /* @__PURE__ */ s(
3584
- pi,
3585
+ vi,
3585
3586
  {
3586
- groupPosition: De,
3587
+ groupPosition: ie,
3587
3588
  isMyMessage: fe,
3588
3589
  message: {
3589
3590
  attachments: j,
3590
- text: Z.text
3591
+ text: se.text
3591
3592
  }
3592
3593
  }
3593
3594
  ),
3594
- /* @__PURE__ */ s(qt, {})
3595
+ /* @__PURE__ */ s(Wt, {})
3595
3596
  ]
3596
3597
  }
3597
3598
  ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3598
- ge && !It && /* @__PURE__ */ s(
3599
+ ge && !Tt && /* @__PURE__ */ s(
3599
3600
  Ke,
3600
3601
  {
3601
3602
  message: c,
@@ -3603,33 +3604,33 @@ const pi = ({
3603
3604
  isMyMessage: fe
3604
3605
  }
3605
3606
  ),
3606
- Ge && /* @__PURE__ */ s(mn, { poll: Ge }),
3607
+ Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3607
3608
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3608
- S,
3609
+ C,
3609
3610
  {
3610
- actionHandler: o,
3611
+ actionHandler: d,
3611
3612
  attachments: j
3612
3613
  }
3613
3614
  ) : null,
3614
- Y ? /* @__PURE__ */ s(
3615
- _,
3615
+ W ? /* @__PURE__ */ s(
3616
+ R,
3616
3617
  {
3617
- message: Z,
3618
- renderText: v
3618
+ message: se,
3619
+ renderText: w
3619
3620
  }
3620
3621
  ) : /* @__PURE__ */ s(
3621
- Yt,
3622
+ qt,
3622
3623
  {
3623
- message: Z,
3624
- renderText: v
3624
+ message: se,
3625
+ renderText: w
3625
3626
  }
3626
3627
  ),
3627
- /* @__PURE__ */ s(qt, {})
3628
+ /* @__PURE__ */ s(Wt, {})
3628
3629
  ] }) })
3629
3630
  }
3630
3631
  ),
3631
- !St && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3632
- (!ge || It) && /* @__PURE__ */ s(
3632
+ !It && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3633
+ (!ge || Tt) && /* @__PURE__ */ s(
3633
3634
  Ke,
3634
3635
  {
3635
3636
  message: c,
@@ -3638,72 +3639,72 @@ const pi = ({
3638
3639
  }
3639
3640
  ),
3640
3641
  n && ge && /* @__PURE__ */ s(
3641
- Yr,
3642
+ Wr,
3642
3643
  {
3643
- selected: z,
3644
- onVoteUp: y,
3645
- onVoteDown: A
3644
+ selected: y,
3645
+ onVoteUp: M,
3646
+ onVoteDown: E
3646
3647
  }
3647
3648
  )
3648
3649
  ] }),
3649
- /* @__PURE__ */ s(jr, { message: c, endOfGroup: r }),
3650
- ne && /* @__PURE__ */ s(
3651
- ee,
3650
+ /* @__PURE__ */ s(Ur, { message: c, groupStyles: o }),
3651
+ ce && /* @__PURE__ */ s(
3652
+ X,
3652
3653
  {
3653
- onClick: d,
3654
+ onClick: u,
3654
3655
  reply_count: c.reply_count
3655
3656
  }
3656
3657
  ),
3657
- ce && /* @__PURE__ */ s(Q, {})
3658
+ le && /* @__PURE__ */ s(ee, {})
3658
3659
  ]
3659
3660
  },
3660
3661
  c.id
3661
3662
  )
3662
3663
  ] });
3663
- }, vi = U.memo(
3664
- bi,
3665
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ws(e, t)
3666
- ), xi = (e) => {
3664
+ }, wi = U.memo(
3665
+ xi,
3666
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
3667
+ ), _i = (e) => {
3667
3668
  const t = Ie("CustomMessage");
3668
- return /* @__PURE__ */ s(vi, { ...t, ...e });
3669
- }, wi = () => {
3669
+ return /* @__PURE__ */ s(wi, { ...t, ...e });
3670
+ }, Ni = () => {
3670
3671
  var n;
3671
3672
  const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3672
3673
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3673
- cs,
3674
+ ds,
3674
3675
  {
3675
3676
  onClick: e,
3676
3677
  "aria-label": "Delete",
3677
3678
  title: "Delete",
3678
3679
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3679
- children: /* @__PURE__ */ s(Kn, { size: 16, weight: "light", "aria-hidden": !0 })
3680
+ children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3680
3681
  }
3681
3682
  );
3682
- }, _i = () => {
3683
+ }, yi = () => {
3683
3684
  const { handleFlag: e } = Ie("CustomMessageActions");
3684
3685
  return /* @__PURE__ */ s(
3685
- cs,
3686
+ ds,
3686
3687
  {
3687
3688
  onClick: e,
3688
3689
  "aria-label": "Report",
3689
3690
  title: "Report",
3690
3691
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3691
- children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3692
+ children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3692
3693
  }
3693
3694
  );
3694
- }, Ni = () => {
3695
+ }, ki = () => {
3695
3696
  var t;
3696
3697
  const { message: e } = Ie("CustomMessageActions");
3697
3698
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3698
- Qn,
3699
+ ea,
3699
3700
  {
3700
3701
  messageActionSet: [
3701
- { Component: wi, placement: "quick", type: "delete" },
3702
- { Component: _i, placement: "quick", type: "flag" }
3702
+ { Component: Ni, placement: "quick", type: "delete" },
3703
+ { Component: yi, placement: "quick", type: "flag" }
3703
3704
  ]
3704
3705
  }
3705
3706
  );
3706
- }, yi = ({
3707
+ }, Ci = ({
3707
3708
  link: e,
3708
3709
  onDismiss: t
3709
3710
  }) => {
@@ -3743,14 +3744,14 @@ const pi = ({
3743
3744
  ]
3744
3745
  }
3745
3746
  );
3746
- }, ki = (e) => ({
3747
+ }, Ei = (e) => ({
3747
3748
  linkPreviews: Array.from(e.previews.values()).filter(
3748
- (t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
3749
+ (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3749
3750
  )
3750
- }), Ci = () => {
3751
- const { linkPreviewsManager: e } = hn(), { linkPreviews: t } = fn(
3751
+ }), Si = () => {
3752
+ const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3752
3753
  e.state,
3753
- ki
3754
+ Ei
3754
3755
  ), n = (r) => {
3755
3756
  e.dismissPreview(r);
3756
3757
  };
@@ -3763,9 +3764,9 @@ const pi = ({
3763
3764
  // block so it keeps its intrinsic height and the container scrolls — a
3764
3765
  // bare flex-column child would be shrunk on the column axis and its
3765
3766
  // fixed-height hero would spill out of the collapsed card box.
3766
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3767
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Ci, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3767
3768
  ) : null;
3768
- }, kt = U.createContext(!1), dl = () => Se(kt), Ei = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3769
+ }, kt = U.createContext(!1), ml = () => Se(kt), Ii = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3769
3770
  "button",
3770
3771
  {
3771
3772
  ...n,
@@ -3773,13 +3774,13 @@ const pi = ({
3773
3774
  "aria-label": "Send",
3774
3775
  disabled: t,
3775
3776
  onClick: e,
3776
- children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
3777
+ children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3777
3778
  }
3778
- ), Si = () => {
3779
- const e = Se(kt), { handleSubmit: t } = pn(), n = bn(), a = e || !n, {
3780
- SendButton: r = Ei,
3781
- AttachmentPreviewList: i = vn
3782
- } = rs("CustomMessageInput");
3779
+ ), Ti = () => {
3780
+ const e = Se(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3781
+ SendButton: r = Ii,
3782
+ AttachmentPreviewList: i = xn
3783
+ } = is("CustomMessageInput");
3783
3784
  return (
3784
3785
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
3785
3786
  // preview list inside is the scrollable region); the textarea + send row
@@ -3795,12 +3796,12 @@ const pi = ({
3795
3796
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]",
3796
3797
  "data-dd-privacy": "mask",
3797
3798
  children: [
3798
- /* @__PURE__ */ s(xn, {}),
3799
- /* @__PURE__ */ s(Ci, {}),
3799
+ /* @__PURE__ */ s(wn, {}),
3800
+ /* @__PURE__ */ s(Si, {}),
3800
3801
  /* @__PURE__ */ s(i, {}),
3801
3802
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3802
3803
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3803
- wn,
3804
+ _n,
3804
3805
  {
3805
3806
  "aria-disabled": e || void 0,
3806
3807
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3826,7 +3827,7 @@ const pi = ({
3826
3827
  }
3827
3828
  )
3828
3829
  );
3829
- }, Ii = ({
3830
+ }, Ai = ({
3830
3831
  renderActions: e,
3831
3832
  renderFooter: t,
3832
3833
  disabled: n = !1,
@@ -3847,42 +3848,42 @@ const pi = ({
3847
3848
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3848
3849
  children: [
3849
3850
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3850
- /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(gn, { Input: r ?? Si }) })
3851
+ /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ti }) })
3851
3852
  ]
3852
3853
  }
3853
3854
  ),
3854
3855
  t == null ? void 0 : t()
3855
3856
  ] });
3856
- }, Ti = [
3857
+ }, Mi = [
3857
3858
  "SYSTEM_DM_AGENT_PAUSED",
3858
3859
  "SYSTEM_DM_AGENT_RESUMED"
3859
- ], Ai = {
3860
+ ], Ri = {
3860
3861
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3861
3862
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3862
- }, Mi = [
3863
+ }, Li = [
3863
3864
  "SYSTEM_AGE_SAFETY_BLOCKED"
3864
- ], Ri = {
3865
+ ], Di = {
3865
3866
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3866
- }, Je = "age safety guidelines.", Li = "https://linktr.ee/s/about/contact", ns = (e) => Ti.includes(e), Di = (e) => Mi.includes(e), zi = (e) => {
3867
+ }, Je = "age safety guidelines.", zi = "https://linktr.ee/s/about/contact", as = (e) => Mi.includes(e), Pi = (e) => Li.includes(e), Fi = (e) => {
3867
3868
  var a;
3868
3869
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3869
- if (ns(t))
3870
+ if (as(t))
3870
3871
  return {
3871
3872
  kind: "dm-agent",
3872
3873
  type: t
3873
3874
  };
3874
- if (Di(t))
3875
+ if (Pi(t))
3875
3876
  return {
3876
3877
  kind: "age-safety",
3877
3878
  type: t
3878
3879
  };
3879
3880
  const n = e.dm_agent_system_type;
3880
- if (ns(n))
3881
+ if (as(n))
3881
3882
  return {
3882
3883
  kind: "dm-agent",
3883
3884
  type: n
3884
3885
  };
3885
- }, Pi = (e) => {
3886
+ }, Oi = (e) => {
3886
3887
  const t = e.indexOf(Je);
3887
3888
  if (t === -1)
3888
3889
  return e;
@@ -3892,7 +3893,7 @@ const pi = ({
3892
3893
  /* @__PURE__ */ s(
3893
3894
  "a",
3894
3895
  {
3895
- href: Li,
3896
+ href: zi,
3896
3897
  target: "_blank",
3897
3898
  rel: "noopener noreferrer",
3898
3899
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -3901,13 +3902,13 @@ const pi = ({
3901
3902
  ),
3902
3903
  e.slice(n)
3903
3904
  ] });
3904
- }, Fi = (e) => {
3905
+ }, $i = (e) => {
3905
3906
  var a, r;
3906
- const t = e.message.hide_date === !0, n = zi(
3907
+ const t = e.message.hide_date === !0, n = Fi(
3907
3908
  e.message
3908
3909
  );
3909
3910
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3910
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
3911
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ri[n.type];
3911
3912
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3912
3913
  /* @__PURE__ */ m(
3913
3914
  "div",
@@ -3933,7 +3934,7 @@ const pi = ({
3933
3934
  ] });
3934
3935
  }
3935
3936
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3936
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
3937
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Di[n.type];
3937
3938
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3938
3939
  /* @__PURE__ */ m(
3939
3940
  "div",
@@ -3943,7 +3944,7 @@ const pi = ({
3943
3944
  "data-age-safety-system-type": n.type,
3944
3945
  children: [
3945
3946
  /* @__PURE__ */ s(
3946
- Zn,
3947
+ Qn,
3947
3948
  {
3948
3949
  size: 24,
3949
3950
  weight: "duotone",
@@ -3952,7 +3953,7 @@ const pi = ({
3952
3953
  "data-testid": "age-safety-system-message-icon"
3953
3954
  }
3954
3955
  ),
3955
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
3956
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Oi(i) }) })
3956
3957
  ]
3957
3958
  }
3958
3959
  ),
@@ -3967,7 +3968,7 @@ const pi = ({
3967
3968
  ] }),
3968
3969
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3969
3970
  ] });
3970
- }, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3971
+ }, Os = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3971
3972
  "animateTransform",
3972
3973
  {
3973
3974
  attributeName: "transform",
@@ -3977,21 +3978,21 @@ const pi = ({
3977
3978
  begin: `${120 * t}ms`,
3978
3979
  repeatCount: "indefinite"
3979
3980
  }
3980
- ) }), Oi = /* @__PURE__ */ new Set([
3981
+ ) }), ji = /* @__PURE__ */ new Set([
3981
3982
  qe.Thinking,
3982
3983
  qe.Generating,
3983
3984
  qe.ExternalSources
3984
- ]), $i = ({ threadList: e }) => {
3985
- var v, w;
3986
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = _n(), { aiState: l } = Nn(t), o = Se(Fs);
3987
- if (!e && o && Oi.has(l)) {
3988
- const b = ji(t, (v = r.user) == null ? void 0 : v.id);
3985
+ ]), Bi = ({ threadList: e }) => {
3986
+ var c, w;
3987
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Se(Os);
3988
+ if (!e && o && ji.has(l)) {
3989
+ const v = Ui(t, (c = r.user) == null ? void 0 : c.id);
3989
3990
  return /* @__PURE__ */ s(
3990
- as,
3991
+ rs,
3991
3992
  {
3992
- avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
3993
- avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
3994
- avatarImage: b == null ? void 0 : b.image,
3993
+ avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
3994
+ avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
3995
+ avatarImage: v == null ? void 0 : v.image,
3995
3996
  testId: "typing-indicator-ai"
3996
3997
  }
3997
3998
  );
@@ -3999,29 +4000,29 @@ const pi = ({
3999
4000
  if ((n == null ? void 0 : n.typing_events) === !1)
4000
4001
  return null;
4001
4002
  const u = e ? [] : Object.values(i).filter(
4002
- ({ parent_id: b, user: f }) => {
4003
+ ({ parent_id: v, user: g }) => {
4003
4004
  var x;
4004
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4005
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
4005
4006
  }
4006
4007
  ), p = e ? Object.values(i).filter(
4007
- ({ parent_id: b, user: f }) => {
4008
+ ({ parent_id: v, user: g }) => {
4008
4009
  var x;
4009
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4010
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
4010
4011
  }
4011
4012
  ) : [], h = e ? p : u;
4012
4013
  if (!h.length)
4013
4014
  return null;
4014
- const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4015
+ const f = (w = h[0]) == null ? void 0 : w.user, b = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4015
4016
  return /* @__PURE__ */ s(
4016
- as,
4017
+ rs,
4017
4018
  {
4018
- avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4019
- avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4020
- avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4019
+ avatarId: (f == null ? void 0 : f.id) ?? (b == null ? void 0 : b.id) ?? "typing-user",
4020
+ avatarName: (f == null ? void 0 : f.name) ?? (b == null ? void 0 : b.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4021
+ avatarImage: (f == null ? void 0 : f.image) ?? (b == null ? void 0 : b.image),
4021
4022
  testId: "typing-indicator"
4022
4023
  }
4023
4024
  );
4024
- }, as = ({
4025
+ }, rs = ({
4025
4026
  avatarId: e,
4026
4027
  avatarName: t,
4027
4028
  avatarImage: n,
@@ -4036,7 +4037,7 @@ const pi = ({
4036
4037
  },
4037
4038
  children: /* @__PURE__ */ m("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4038
4039
  /* @__PURE__ */ s(
4039
- se,
4040
+ ne,
4040
4041
  {
4041
4042
  className: "str-chat__avatar str-chat__message-sender-avatar",
4042
4043
  id: e,
@@ -4065,7 +4066,7 @@ const pi = ({
4065
4066
  ] })
4066
4067
  }
4067
4068
  );
4068
- function ji(e, t) {
4069
+ function Ui(e, t) {
4069
4070
  var a;
4070
4071
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4071
4072
  for (const r of Object.values(n)) {
@@ -4074,7 +4075,7 @@ function ji(e, t) {
4074
4075
  return i;
4075
4076
  }
4076
4077
  }
4077
- const Bi = () => null, Ui = ({ className: e, message: t }) => /* @__PURE__ */ m(
4078
+ const Vi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4078
4079
  "div",
4079
4080
  {
4080
4081
  className: k("flex items-center justify-center h-full", e),
@@ -4118,11 +4119,11 @@ const Bi = () => null, Ui = ({ className: e, message: t }) => /* @__PURE__ */ m(
4118
4119
  ]
4119
4120
  }
4120
4121
  ), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4121
- /* @__PURE__ */ s(Ui, { className: "w-6 h-6" }),
4122
+ /* @__PURE__ */ s(Gi, { className: "w-6 h-6" }),
4122
4123
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4123
4124
  ] }) }));
4124
4125
  je.displayName = "LoadingState";
4125
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
4126
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Hi = ({
4126
4127
  onBack: e,
4127
4128
  showBackButton: t,
4128
4129
  showStarButton: n = !1,
@@ -4135,32 +4136,32 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4135
4136
  onDeleteConversationClick: u,
4136
4137
  onBlockParticipantClick: p,
4137
4138
  onReportParticipantClick: h,
4138
- customChannelActions: g,
4139
- renderChannelActions: c,
4140
- showChannelInfo: v = !0,
4139
+ customChannelActions: f,
4140
+ renderChannelActions: b,
4141
+ showChannelInfo: c = !0,
4141
4142
  onParticipantNameClick: w,
4142
- renderHeaderTitleBadges: b
4143
+ renderHeaderTitleBadges: v
4143
4144
  }) => {
4144
- var A, S, C, I, $, F;
4145
- const { channel: f } = ue(), { client: x } = me(), N = U.useMemo(
4145
+ var M, E, C, T, F, O;
4146
+ const { channel: g } = ue(), { client: x } = me(), _ = U.useMemo(
4146
4147
  () => {
4147
4148
  var V;
4148
4149
  return Ue(
4149
- (V = f.state) == null ? void 0 : V.members,
4150
+ (V = g.state) == null ? void 0 : V.members,
4150
4151
  x == null ? void 0 : x.userID,
4151
- f.type
4152
+ g.type
4152
4153
  );
4153
4154
  },
4154
- [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4155
- ), E = ot(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, M = lt(f), D = b == null ? void 0 : b({
4156
- channel: f,
4157
- participant: N
4158
- }), 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", O = "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__ */ m(te, { children: [
4159
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: E }),
4160
- D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4155
+ [(M = g.state) == null ? void 0 : M.members, x == null ? void 0 : x.userID, g.type]
4156
+ ), A = ot(_ == null ? void 0 : _.user), S = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, I = lt(g), L = v == null ? void 0 : v({
4157
+ channel: g,
4158
+ participant: _
4159
+ }), D = "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__ */ m(te, { children: [
4160
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: A }),
4161
+ L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4161
4162
  ] }), y = async () => {
4162
4163
  try {
4163
- M ? await f.unpin() : await f.pin();
4164
+ I ? await g.unpin() : await g.pin();
4164
4165
  } catch (V) {
4165
4166
  console.error(
4166
4167
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4194,19 +4195,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4194
4195
  {
4195
4196
  type: "button",
4196
4197
  onClick: w,
4197
- "aria-label": `View details for ${E}`,
4198
+ "aria-label": `View details for ${A}`,
4198
4199
  className: k(
4199
- L,
4200
+ D,
4200
4201
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4201
4202
  ),
4202
4203
  children: [
4203
4204
  /* @__PURE__ */ s(
4204
- se,
4205
+ ne,
4205
4206
  {
4206
- id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4207
- name: E,
4208
- image: T,
4209
- starred: n && M,
4207
+ id: ((C = _ == null ? void 0 : _.user) == null ? void 0 : C.id) || g.id || "unknown",
4208
+ name: A,
4209
+ image: S,
4210
+ starred: n && I,
4210
4211
  dmAgentEnabled: a,
4211
4212
  size: 48
4212
4213
  }
@@ -4221,14 +4222,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4221
4222
  ] })
4222
4223
  ]
4223
4224
  }
4224
- ) : /* @__PURE__ */ m("div", { className: L, children: [
4225
+ ) : /* @__PURE__ */ m("div", { className: D, children: [
4225
4226
  /* @__PURE__ */ s(
4226
- se,
4227
+ ne,
4227
4228
  {
4228
- id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4229
- name: E,
4230
- image: T,
4231
- starred: n && M,
4229
+ id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || g.id || "unknown",
4230
+ name: A,
4231
+ image: S,
4232
+ starred: n && I,
4232
4233
  dmAgentEnabled: a,
4233
4234
  size: 48
4234
4235
  }
@@ -4257,24 +4258,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4257
4258
  className: be,
4258
4259
  onClick: y,
4259
4260
  type: "button",
4260
- "aria-label": M ? "Unstar conversation" : "Star conversation",
4261
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
4261
4262
  children: /* @__PURE__ */ s(
4262
4263
  Ee,
4263
4264
  {
4264
4265
  className: k("size-5", {
4265
- "text-yellow-600": M,
4266
- "text-black/90": !M
4266
+ "text-yellow-600": I,
4267
+ "text-black/90": !I
4267
4268
  }),
4268
- weight: M ? "duotone" : "regular"
4269
+ weight: I ? "duotone" : "regular"
4269
4270
  }
4270
4271
  )
4271
4272
  }
4272
4273
  ),
4273
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4274
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
4274
4275
  tt,
4275
4276
  {
4276
- channel: f,
4277
- participant: N,
4277
+ channel: g,
4278
+ participant: _,
4278
4279
  showDeleteConversation: l,
4279
4280
  showBlockParticipant: o,
4280
4281
  showReportParticipant: d,
@@ -4283,7 +4284,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4283
4284
  onDeleteConversationClick: u,
4284
4285
  onBlockParticipantClick: p,
4285
4286
  onReportParticipantClick: h,
4286
- customChannelActions: g,
4287
+ customChannelActions: f,
4287
4288
  triggerClassName: k(be, "bg-[#F1F0EE]")
4288
4289
  }
4289
4290
  ))
@@ -4309,19 +4310,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4309
4310
  {
4310
4311
  type: "button",
4311
4312
  onClick: w,
4312
- "aria-label": `View details for ${E}`,
4313
+ "aria-label": `View details for ${A}`,
4313
4314
  className: k(
4314
- O,
4315
+ $,
4315
4316
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4316
4317
  ),
4317
4318
  children: [
4318
4319
  /* @__PURE__ */ s(
4319
- se,
4320
+ ne,
4320
4321
  {
4321
- id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4322
- name: E,
4323
- image: T,
4324
- starred: n && M,
4322
+ id: ((F = _ == null ? void 0 : _.user) == null ? void 0 : F.id) || g.id || "unknown",
4323
+ name: A,
4324
+ image: S,
4325
+ starred: n && I,
4325
4326
  dmAgentEnabled: a,
4326
4327
  size: 48
4327
4328
  }
@@ -4338,14 +4339,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4338
4339
  ] })
4339
4340
  ]
4340
4341
  }
4341
- ) : /* @__PURE__ */ m("div", { className: O, children: [
4342
+ ) : /* @__PURE__ */ m("div", { className: $, children: [
4342
4343
  /* @__PURE__ */ s(
4343
- se,
4344
+ ne,
4344
4345
  {
4345
- id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4346
- name: E,
4347
- image: T,
4348
- starred: n && M,
4346
+ id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || g.id || "unknown",
4347
+ name: A,
4348
+ image: S,
4349
+ starred: n && I,
4349
4350
  dmAgentEnabled: a,
4350
4351
  size: 48
4351
4352
  }
@@ -4375,24 +4376,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4375
4376
  className: be,
4376
4377
  onClick: y,
4377
4378
  type: "button",
4378
- "aria-label": M ? "Unstar conversation" : "Star conversation",
4379
+ "aria-label": I ? "Unstar conversation" : "Star conversation",
4379
4380
  children: /* @__PURE__ */ s(
4380
4381
  Ee,
4381
4382
  {
4382
4383
  className: k("size-6", {
4383
- "text-yellow-600": M,
4384
- "text-black/90": !M
4384
+ "text-yellow-600": I,
4385
+ "text-black/90": !I
4385
4386
  }),
4386
- weight: M ? "duotone" : "regular"
4387
+ weight: I ? "duotone" : "regular"
4387
4388
  }
4388
4389
  )
4389
4390
  }
4390
4391
  ),
4391
- v && (c !== void 0 ? c : /* @__PURE__ */ s(
4392
+ c && (b !== void 0 ? b : /* @__PURE__ */ s(
4392
4393
  tt,
4393
4394
  {
4394
- channel: f,
4395
- participant: N,
4395
+ channel: g,
4396
+ participant: _,
4396
4397
  showDeleteConversation: l,
4397
4398
  showBlockParticipant: o,
4398
4399
  showReportParticipant: d,
@@ -4401,14 +4402,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4401
4402
  onDeleteConversationClick: u,
4402
4403
  onBlockParticipantClick: p,
4403
4404
  onReportParticipantClick: h,
4404
- customChannelActions: g,
4405
+ customChannelActions: f,
4405
4406
  triggerClassName: be
4406
4407
  }
4407
4408
  ))
4408
4409
  ] })
4409
4410
  ] })
4410
4411
  ] });
4411
- }, Gi = ({
4412
+ }, Yi = ({
4412
4413
  onBack: e,
4413
4414
  showBackButton: t,
4414
4415
  renderMessageInputActions: n,
@@ -4421,122 +4422,122 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4421
4422
  onBlockParticipantClick: u,
4422
4423
  onReportParticipantClick: p,
4423
4424
  showBlockParticipant: h = !0,
4424
- showReportParticipant: g = !0,
4425
- composerDisabled: c = !1,
4426
- composerDisabledReason: v,
4425
+ showReportParticipant: f = !0,
4426
+ composerDisabled: b = !1,
4427
+ composerDisabledReason: c,
4427
4428
  showStarButton: w = !1,
4428
- chatbotVotingEnabled: b = !1,
4429
- renderChannelBanner: f,
4429
+ chatbotVotingEnabled: v = !1,
4430
+ renderChannelBanner: g,
4430
4431
  renderHeaderTitleBadges: x,
4431
- customChannelActions: N,
4432
- renderChannelActions: E,
4433
- renderMessage: T,
4434
- dmAgentEnabled: M = !1,
4435
- viewerLanguage: D,
4436
- showChannelInfo: L = !0,
4437
- onParticipantNameClick: O,
4432
+ customChannelActions: _,
4433
+ renderChannelActions: A,
4434
+ renderMessage: S,
4435
+ dmAgentEnabled: I = !1,
4436
+ viewerLanguage: L,
4437
+ showChannelInfo: D = !0,
4438
+ onParticipantNameClick: $,
4438
4439
  composerInput: z
4439
4440
  }) => {
4440
- var _, R, H, q;
4441
- const { channel: y } = ue(), { client: A } = me(), S = U.useMemo(
4441
+ var N, R, G, Y;
4442
+ const { channel: y } = ue(), { client: M } = me(), E = U.useMemo(
4442
4443
  () => {
4443
- var Y;
4444
+ var q;
4444
4445
  return Ue(
4445
- (Y = y.state) == null ? void 0 : Y.members,
4446
- A == null ? void 0 : A.userID,
4446
+ (q = y.state) == null ? void 0 : q.members,
4447
+ M == null ? void 0 : M.userID,
4447
4448
  y.type
4448
4449
  );
4449
4450
  },
4450
- [(_ = y.state) == null ? void 0 : _.members, A == null ? void 0 : A.userID, y.type]
4451
+ [(N = y.state) == null ? void 0 : N.members, M == null ? void 0 : M.userID, y.type]
4451
4452
  ), C = U.useMemo(() => {
4452
- var W;
4453
- const Y = A == null ? void 0 : A.userID;
4454
- return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
4455
- var oe;
4456
- return ((oe = Z.user) == null ? void 0 : oe.id) === Y;
4453
+ var j;
4454
+ const q = M == null ? void 0 : M.userID;
4455
+ return q ? Object.values(((j = y.state) == null ? void 0 : j.members) || {}).find((Q) => {
4456
+ var se;
4457
+ return ((se = Q.user) == null ? void 0 : se.id) === q;
4457
4458
  }) : void 0;
4458
- }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4459
- (Y) => Y.type !== "deleted"
4460
- ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, ee = O ? /* @__PURE__ */ s(
4461
- fa,
4459
+ }, [M == null ? void 0 : M.userID, (R = y.state) == null ? void 0 : R.members]), T = ((G = C == null ? void 0 : C.user) == null ? void 0 : G.is_account) ?? (C == null ? void 0 : C.is_account), F = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), O = I && T === !1 && F === !0, V = y.state.messages.some(
4460
+ (q) => q.type !== "deleted"
4461
+ ), Z = g ? /* @__PURE__ */ s(U.Fragment, { children: g() }, "lt-channel-banner") : null, ee = $ ? /* @__PURE__ */ s(
4462
+ ga,
4462
4463
  {
4463
4464
  onBack: e,
4464
4465
  showBackButton: t,
4465
- showChannelInfo: L,
4466
+ showChannelInfo: D,
4466
4467
  showStarButton: w,
4467
- dmAgentEnabled: F,
4468
+ dmAgentEnabled: O,
4468
4469
  onLeaveConversation: i,
4469
4470
  onBlockParticipant: l,
4470
4471
  showDeleteConversation: o,
4471
4472
  showBlockParticipant: h,
4472
- showReportParticipant: g,
4473
+ showReportParticipant: f,
4473
4474
  onDeleteConversationClick: d,
4474
4475
  onBlockParticipantClick: u,
4475
4476
  onReportParticipantClick: p,
4476
- customChannelActions: N,
4477
- renderChannelActions: E,
4478
- onParticipantNameClick: O
4477
+ customChannelActions: _,
4478
+ renderChannelActions: A,
4479
+ onParticipantNameClick: $
4479
4480
  }
4480
4481
  ) : null, X = J(
4481
- (Y) => {
4482
- const { message: j } = Ie("ChannelView"), W = /* @__PURE__ */ s(
4483
- xi,
4482
+ (q) => {
4483
+ const { message: W } = Ie("ChannelView"), j = /* @__PURE__ */ s(
4484
+ _i,
4484
4485
  {
4485
- ...Y,
4486
- chatbotVotingEnabled: b,
4487
- viewerLanguage: D
4486
+ ...q,
4487
+ chatbotVotingEnabled: v,
4488
+ viewerLanguage: L
4488
4489
  }
4489
4490
  );
4490
- return !T || !j ? W : T(W, j);
4491
+ return !S || !W ? j : S(j, W);
4491
4492
  },
4492
- [b, T, D]
4493
+ [v, S, L]
4493
4494
  );
4494
4495
  return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4495
- kn,
4496
+ Cn,
4496
4497
  {
4497
4498
  overrides: {
4498
4499
  Message: X,
4499
- MessageActions: Ni
4500
+ MessageActions: ki
4500
4501
  },
4501
- children: /* @__PURE__ */ m(Cn, { children: [
4502
- !O && /* @__PURE__ */ m(te, { children: [
4502
+ children: /* @__PURE__ */ m(En, { children: [
4503
+ !$ && /* @__PURE__ */ m(te, { children: [
4503
4504
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4504
- Vi,
4505
+ Hi,
4505
4506
  {
4506
4507
  onBack: e,
4507
4508
  showBackButton: t,
4508
- showChannelInfo: L,
4509
+ showChannelInfo: D,
4509
4510
  showStarButton: w,
4510
- dmAgentEnabled: F,
4511
+ dmAgentEnabled: O,
4511
4512
  onLeaveConversation: i,
4512
4513
  onBlockParticipant: l,
4513
4514
  showDeleteConversation: o,
4514
4515
  showBlockParticipant: h,
4515
- showReportParticipant: g,
4516
+ showReportParticipant: f,
4516
4517
  onDeleteConversationClick: d,
4517
4518
  onBlockParticipantClick: u,
4518
4519
  onReportParticipantClick: p,
4519
- customChannelActions: N,
4520
- renderChannelActions: E,
4520
+ customChannelActions: _,
4521
+ renderChannelActions: A,
4521
4522
  renderHeaderTitleBadges: x
4522
4523
  }
4523
4524
  ) }, "lt-channel-header"),
4524
- Q
4525
+ Z
4525
4526
  ] }),
4526
- O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4527
+ $ && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4527
4528
  ee,
4528
- Q
4529
+ Z
4529
4530
  ] }),
4530
4531
  /* @__PURE__ */ s(
4531
4532
  "div",
4532
4533
  {
4533
4534
  className: "flex-1 overflow-hidden relative",
4534
4535
  children: /* @__PURE__ */ s(
4535
- En,
4536
+ Sn,
4536
4537
  {
4537
- head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4538
+ head: $ && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4538
4539
  ee,
4539
- Q
4540
+ Z
4540
4541
  ] }) : void 0,
4541
4542
  hideDeletedMessages: !0,
4542
4543
  hideNewMessageSeparator: !1
@@ -4547,14 +4548,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4547
4548
  ),
4548
4549
  r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4549
4550
  /* @__PURE__ */ s(
4550
- Ii,
4551
+ Ai,
4551
4552
  {
4552
4553
  ...n && {
4553
4554
  renderActions: () => n == null ? void 0 : n(y)
4554
4555
  },
4555
4556
  renderFooter: () => a == null ? void 0 : a(y),
4556
- disabled: c,
4557
- disabledReason: v,
4557
+ disabled: b,
4558
+ disabledReason: c,
4558
4559
  composerInput: z
4559
4560
  },
4560
4561
  "lt-channel-message-input"
@@ -4562,7 +4563,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4562
4563
  ] })
4563
4564
  }
4564
4565
  ) });
4565
- }, Os = U.memo(
4566
+ }, $s = U.memo(
4566
4567
  ({
4567
4568
  channel: e,
4568
4569
  onBack: t,
@@ -4573,65 +4574,65 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4573
4574
  onLeaveConversation: l,
4574
4575
  onBlockParticipant: o,
4575
4576
  className: d,
4576
- CustomChannelEmptyState: u = Bi,
4577
+ CustomChannelEmptyState: u = Vi,
4577
4578
  showDeleteConversation: p = !0,
4578
4579
  onDeleteConversationClick: h,
4579
- onBlockParticipantClick: g,
4580
- onReportParticipantClick: c,
4581
- showBlockParticipant: v = !0,
4580
+ onBlockParticipantClick: f,
4581
+ onReportParticipantClick: b,
4582
+ showBlockParticipant: c = !0,
4582
4583
  showReportParticipant: w = !0,
4583
- composerDisabled: b = !1,
4584
- composerDisabledReason: f,
4584
+ composerDisabled: v = !1,
4585
+ composerDisabledReason: g,
4585
4586
  dmAgentEnabled: x,
4586
- messageMetadata: N,
4587
- onMessageSent: E,
4588
- showStarButton: T = !1,
4589
- chatbotVotingEnabled: M = !1,
4590
- renderChannelBanner: D,
4591
- renderHeaderTitleBadges: L,
4592
- customChannelActions: O,
4587
+ messageMetadata: _,
4588
+ onMessageSent: A,
4589
+ showStarButton: S = !1,
4590
+ chatbotVotingEnabled: I = !1,
4591
+ renderChannelBanner: L,
4592
+ renderHeaderTitleBadges: D,
4593
+ customChannelActions: $,
4593
4594
  renderChannelActions: z,
4594
4595
  renderMessage: y,
4595
- onMessageLinkClick: A,
4596
- sendButton: S,
4596
+ onMessageLinkClick: M,
4597
+ sendButton: E,
4597
4598
  attachmentPreviewList: C,
4598
- viewerLanguage: I,
4599
- showChannelInfo: $ = !0,
4600
- onParticipantNameClick: F,
4599
+ viewerLanguage: T,
4600
+ showChannelInfo: F = !0,
4601
+ onParticipantNameClick: O,
4601
4602
  composerInput: V
4602
4603
  }) => {
4603
- const Q = J(
4604
- async (X, _, R) => {
4605
- var Z;
4606
- const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = x && !H, Y = {
4607
- ..._,
4608
- ...q && { silent: !0 },
4609
- ...N && {
4604
+ const Z = J(
4605
+ async (X, N, R) => {
4606
+ var Q;
4607
+ const G = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, Y = x && !G, q = {
4608
+ ...N,
4609
+ ...Y && { silent: !0 },
4610
+ ..._ && {
4610
4611
  metadata: {
4611
- ..._.metadata ?? {},
4612
- ...N
4612
+ ...N.metadata ?? {},
4613
+ ..._
4613
4614
  }
4614
4615
  }
4615
- }, j = {
4616
+ }, W = {
4616
4617
  ...R,
4617
- ...q && { skip_push: !0 }
4618
- }, W = await e.sendMessage(Y, j);
4619
- return E == null || E(W), W;
4618
+ ...Y && { skip_push: !0 }
4619
+ }, j = await e.sendMessage(q, W);
4620
+ return A == null || A(j), j;
4620
4621
  },
4621
- [e, x, N, E]
4622
- ), ee = G(null);
4622
+ [e, x, _, A]
4623
+ ), ee = H(null);
4623
4624
  return K(() => {
4624
- if (!A) return;
4625
+ if (!M) return;
4625
4626
  const X = ee.current;
4626
4627
  if (!X) return;
4627
- const _ = (R) => {
4628
- const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4629
- if (!Y) return;
4630
- const j = q == null ? void 0 : q.closest("[data-message-id]"), W = j == null ? void 0 : j.getAttribute("data-message-id"), Z = W ? e.state.messages.find((oe) => oe.id === W) : void 0;
4631
- A(Y, Z);
4628
+ const N = (R) => {
4629
+ const G = R.target, Y = G == null ? void 0 : G.closest("a[href]"), q = Y == null ? void 0 : Y.getAttribute("href");
4630
+ if (!q) return;
4631
+ const W = Y == null ? void 0 : Y.closest("[data-message-id]"), j = W == null ? void 0 : W.getAttribute("data-message-id"), Q = j ? e.state.messages.find((se) => se.id === j) : void 0;
4632
+ M(q, Q);
4632
4633
  };
4633
- return X.addEventListener("click", _), () => X.removeEventListener("click", _);
4634
- }, [A, e]), /* @__PURE__ */ s(
4634
+ return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4635
+ }, [M, e]), /* @__PURE__ */ s(
4635
4636
  "div",
4636
4637
  {
4637
4638
  ref: ee,
@@ -4639,20 +4640,20 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4639
4640
  "messaging-channel-view h-full flex flex-col",
4640
4641
  d
4641
4642
  ),
4642
- children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4643
- yn,
4643
+ children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4644
+ kn,
4644
4645
  {
4645
4646
  channel: e,
4646
- MessageSystem: Fi,
4647
+ MessageSystem: $i,
4647
4648
  EmptyStateIndicator: u,
4648
4649
  LoadingIndicator: je,
4649
- DateSeparator: ga,
4650
- TypingIndicator: $i,
4651
- doSendMessageRequest: Q,
4652
- ...S ? { SendButton: S } : {},
4650
+ DateSeparator: pa,
4651
+ TypingIndicator: Bi,
4652
+ doSendMessageRequest: Z,
4653
+ ...E ? { SendButton: E } : {},
4653
4654
  ...C ? { AttachmentPreviewList: C } : {},
4654
4655
  children: /* @__PURE__ */ s(
4655
- Gi,
4656
+ Yi,
4656
4657
  {
4657
4658
  onBack: t,
4658
4659
  showBackButton: n,
@@ -4664,23 +4665,23 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4664
4665
  CustomChannelEmptyState: u,
4665
4666
  showDeleteConversation: p,
4666
4667
  onDeleteConversationClick: h,
4667
- onBlockParticipantClick: g,
4668
- onReportParticipantClick: c,
4669
- showBlockParticipant: v,
4668
+ onBlockParticipantClick: f,
4669
+ onReportParticipantClick: b,
4670
+ showBlockParticipant: c,
4670
4671
  showReportParticipant: w,
4671
- composerDisabled: b,
4672
- composerDisabledReason: f,
4673
- showStarButton: T,
4672
+ composerDisabled: v,
4673
+ composerDisabledReason: g,
4674
+ showStarButton: S,
4674
4675
  dmAgentEnabled: x,
4675
- chatbotVotingEnabled: M,
4676
- renderChannelBanner: D,
4677
- renderHeaderTitleBadges: L,
4678
- customChannelActions: O,
4676
+ chatbotVotingEnabled: I,
4677
+ renderChannelBanner: L,
4678
+ renderHeaderTitleBadges: D,
4679
+ customChannelActions: $,
4679
4680
  renderChannelActions: z,
4680
4681
  renderMessage: y,
4681
- viewerLanguage: I,
4682
- showChannelInfo: $,
4683
- onParticipantNameClick: F,
4682
+ viewerLanguage: T,
4683
+ showChannelInfo: F,
4684
+ onParticipantNameClick: O,
4684
4685
  composerInput: V
4685
4686
  }
4686
4687
  )
@@ -4690,7 +4691,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4690
4691
  );
4691
4692
  }
4692
4693
  );
4693
- Os.displayName = "ChannelView";
4694
+ $s.displayName = "ChannelView";
4694
4695
  const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4695
4696
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4696
4697
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -4706,7 +4707,7 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4706
4707
  )
4707
4708
  ] }) }));
4708
4709
  ye.displayName = "ErrorState";
4709
- const ul = ({
4710
+ const hl = ({
4710
4711
  capabilities: e = {},
4711
4712
  renderMessageInputActions: t,
4712
4713
  renderConversationFooter: n,
@@ -4719,145 +4720,145 @@ const ul = ({
4719
4720
  onReportParticipantClick: u,
4720
4721
  dmAgentEnabled: p,
4721
4722
  onMessageSent: h,
4722
- chatbotVotingEnabled: g = !1,
4723
- viewerLanguage: c,
4724
- renderHeaderTitleBadges: v,
4723
+ chatbotVotingEnabled: f = !1,
4724
+ viewerLanguage: b,
4725
+ renderHeaderTitleBadges: c,
4725
4726
  renderChannelBanner: w,
4726
- customChannelActions: b,
4727
- renderChannelActions: f,
4727
+ customChannelActions: v,
4728
+ renderChannelActions: g,
4728
4729
  onParticipantNameClick: x,
4729
- renderMessage: N,
4730
- onMessageLinkClick: E,
4731
- showChannelInfo: T,
4732
- composerInput: M
4730
+ renderMessage: _,
4731
+ onMessageLinkClick: A,
4732
+ showChannelInfo: S,
4733
+ composerInput: I
4733
4734
  }) => {
4734
4735
  const {
4735
- client: D,
4736
- isConnected: L,
4737
- isLoading: O,
4736
+ client: L,
4737
+ isConnected: D,
4738
+ isLoading: $,
4738
4739
  error: z,
4739
4740
  refreshConnection: y,
4740
- service: A,
4741
- debug: S
4742
- } = ea(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(l);
4741
+ service: M,
4742
+ debug: E
4743
+ } = ta(), [C, T] = B(null), [F, O] = B(null), [V, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = H(l);
4743
4744
  X.current = l;
4744
- const _ = G(a);
4745
- _.current = a;
4746
- const R = G(null), H = G(null);
4745
+ const N = H(a);
4746
+ N.current = a;
4747
+ const R = H(null), G = H(null);
4747
4748
  K(() => {
4748
- H.current = C;
4749
+ G.current = C;
4749
4750
  }, [C]), K(() => {
4750
- if (!D || !L) return;
4751
- const j = D.userID;
4752
- if (!j) return;
4753
- const W = `${j}::${i}`;
4754
- if (R.current === W) return;
4755
- R.current = W;
4756
- const Z = () => {
4757
- R.current === W && (R.current = null);
4751
+ if (!L || !D) return;
4752
+ const W = L.userID;
4753
+ if (!W) return;
4754
+ const j = `${W}::${i}`;
4755
+ if (R.current === j) return;
4756
+ R.current = j;
4757
+ const Q = () => {
4758
+ R.current === j && (R.current = null);
4758
4759
  };
4759
4760
  (async () => {
4760
4761
  var Le, De;
4761
4762
  try {
4762
- S && console.log(
4763
+ E && console.log(
4763
4764
  "[MessagingShell] Loading initial conversation with:",
4764
4765
  i
4765
4766
  );
4766
- const ne = await D.queryChannels(
4767
+ const ie = await L.queryChannels(
4767
4768
  {
4768
4769
  type: "messaging",
4769
- members: { $eq: [j, i] }
4770
+ members: { $eq: [W, i] }
4770
4771
  },
4771
4772
  {},
4772
4773
  { limit: 1 }
4773
4774
  );
4774
- if (ne.length > 0) {
4775
- I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), S && console.log(
4775
+ if (ie.length > 0) {
4776
+ T(ie[0]), O(null), (Le = N.current) == null || Le.call(N, ie[0]), E && console.log(
4776
4777
  "[MessagingShell] Initial conversation loaded:",
4777
- ne[0].id
4778
+ ie[0].id
4778
4779
  );
4779
4780
  return;
4780
4781
  }
4781
4782
  const ce = X.current;
4782
- if (!ce || !A) {
4783
- Z(), F("No conversation found with this account"), S && console.log(
4783
+ if (!ce || !M) {
4784
+ Q(), O("No conversation found with this account"), E && console.log(
4784
4785
  "[MessagingShell] No conversation found for:",
4785
4786
  i
4786
4787
  );
4787
4788
  return;
4788
4789
  }
4789
4790
  try {
4790
- const ie = await A.startChannelWithParticipant({
4791
+ const le = await M.startChannelWithParticipant({
4791
4792
  id: ce.id,
4792
4793
  name: ce.name,
4793
4794
  phone: ce.phone
4794
4795
  });
4795
- I(ie), F(null), (De = _.current) == null || De.call(_, ie), S && console.log(
4796
+ T(le), O(null), (De = N.current) == null || De.call(N, le), E && console.log(
4796
4797
  "[MessagingShell] Channel created and loaded:",
4797
- ie.id
4798
+ le.id
4798
4799
  );
4799
- } catch (ie) {
4800
+ } catch (le) {
4800
4801
  console.error(
4801
4802
  "[MessagingShell] Failed to create conversation:",
4802
- ie
4803
- ), Z(), F("Failed to create conversation");
4803
+ le
4804
+ ), Q(), O("Failed to create conversation");
4804
4805
  }
4805
- } catch (ne) {
4806
+ } catch (ie) {
4806
4807
  console.error(
4807
4808
  "[MessagingShell] Failed to load initial conversation:",
4808
- ne
4809
- ), Z(), H.current || F("Failed to load conversation");
4809
+ ie
4810
+ ), Q(), G.current || O("Failed to load conversation");
4810
4811
  }
4811
4812
  })();
4812
- }, [i, D, L, A, S]);
4813
- const q = G(r);
4814
- q.current = r;
4815
- const Y = J(() => {
4816
- var j;
4817
- I(null), Q(!0), (j = q.current) == null || j.call(q);
4813
+ }, [i, L, D, M, E]);
4814
+ const Y = H(r);
4815
+ Y.current = r;
4816
+ const q = J(() => {
4817
+ var W;
4818
+ T(null), Z(!0), (W = Y.current) == null || W.call(Y);
4818
4819
  }, []);
4819
- return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4820
+ return $ ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4820
4821
  ye,
4821
4822
  {
4822
4823
  message: "Not connected to messaging service",
4823
4824
  onBack: y
4824
4825
  }
4825
- ) : $ ? /* @__PURE__ */ s(ye, { message: $ }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4826
- Os,
4826
+ ) : F ? /* @__PURE__ */ s(ye, { message: F }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4827
+ $s,
4827
4828
  {
4828
4829
  channel: C,
4829
4830
  renderMessageInputActions: t,
4830
4831
  renderConversationFooter: n,
4831
4832
  renderChannelBanner: w,
4832
- onLeaveConversation: Y,
4833
- onBlockParticipant: Y,
4833
+ onLeaveConversation: q,
4834
+ onBlockParticipant: q,
4834
4835
  CustomChannelEmptyState: o,
4835
4836
  showDeleteConversation: ee,
4836
4837
  onBlockParticipantClick: d,
4837
4838
  onReportParticipantClick: u,
4838
4839
  dmAgentEnabled: p,
4839
4840
  onMessageSent: h,
4840
- chatbotVotingEnabled: g,
4841
- viewerLanguage: c,
4842
- renderHeaderTitleBadges: v,
4843
- customChannelActions: b,
4844
- renderChannelActions: f,
4841
+ chatbotVotingEnabled: f,
4842
+ viewerLanguage: b,
4843
+ renderHeaderTitleBadges: c,
4844
+ customChannelActions: v,
4845
+ renderChannelActions: g,
4845
4846
  onParticipantNameClick: x,
4846
- renderMessage: N,
4847
- onMessageLinkClick: E,
4848
- showChannelInfo: T,
4849
- composerInput: M
4847
+ renderMessage: _,
4848
+ onMessageLinkClick: A,
4849
+ showChannelInfo: S,
4850
+ composerInput: I
4850
4851
  },
4851
4852
  C.id
4852
4853
  ) }) }) : /* @__PURE__ */ s(je, {});
4853
4854
  };
4854
- function Hi(e) {
4855
+ function qi(e) {
4855
4856
  const t = e.state.pending_messages;
4856
4857
  if (t != null && t.length)
4857
4858
  for (const n of t)
4858
4859
  e.state.addMessageSorted(n.message);
4859
4860
  }
4860
- const $s = U.createContext({
4861
+ const js = U.createContext({
4861
4862
  selectedChannel: void 0,
4862
4863
  onChannelSelect: () => {
4863
4864
  },
@@ -4865,18 +4866,18 @@ const $s = U.createContext({
4865
4866
  renderMessagePreview: void 0,
4866
4867
  channelPreview: void 0,
4867
4868
  viewerLanguage: void 0
4868
- }), Yi = $s.Provider, qi = () => U.useContext($s), Wi = (e, t) => {
4869
+ }), Wi = js.Provider, Xi = () => U.useContext(js), Ki = (e, t) => {
4869
4870
  const n = new Date(
4870
4871
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4871
4872
  ), r = new Date(
4872
4873
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4873
4874
  ).getTime() - n.getTime();
4874
4875
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4875
- }, Xi = (e) => {
4876
+ }, Ji = (e) => {
4876
4877
  const t = /* @__PURE__ */ new Date();
4877
4878
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4878
4879
  return "Just now";
4879
- const a = Wi(e, t);
4880
+ const a = Ki(e, t);
4880
4881
  return a === 0 ? e.toLocaleTimeString([], {
4881
4882
  hour: "numeric",
4882
4883
  minute: "2-digit",
@@ -4886,9 +4887,9 @@ const $s = U.createContext({
4886
4887
  day: "numeric",
4887
4888
  year: "2-digit"
4888
4889
  });
4889
- }, js = U.memo(
4890
+ }, Bs = U.memo(
4890
4891
  (e) => {
4891
- var L, O, z;
4892
+ var D, $, z;
4892
4893
  const { channel: t, unread: n } = e, {
4893
4894
  selectedChannel: a,
4894
4895
  onChannelSelect: r,
@@ -4896,7 +4897,7 @@ const $s = U.createContext({
4896
4897
  channelPreview: l,
4897
4898
  renderMessagePreview: o,
4898
4899
  viewerLanguage: d
4899
- } = qi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4900
+ } = Xi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4900
4901
  if (l)
4901
4902
  return /* @__PURE__ */ s(
4902
4903
  l,
@@ -4908,49 +4909,49 @@ const $s = U.createContext({
4908
4909
  viewerLanguage: d
4909
4910
  }
4910
4911
  );
4911
- const g = () => {
4912
+ const f = () => {
4912
4913
  t && r(t);
4913
- }, c = (y) => {
4914
- const A = y.key === "Enter" || y.key === " ", S = y.repeat;
4915
- !A || S || (y.preventDefault(), g());
4916
- }, v = Ue(
4917
- (L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
4914
+ }, b = (y) => {
4915
+ const M = y.key === "Enter" || y.key === " ", E = y.repeat;
4916
+ !M || E || (y.preventDefault(), f());
4917
+ }, c = Ue(
4918
+ (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4918
4919
  u == null ? void 0 : u.userID,
4919
4920
  t == null ? void 0 : t.type
4920
- ), w = ot(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4921
- var A;
4922
- const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4921
+ ), w = ot(c == null ? void 0 : c.user), v = ($ = c == null ? void 0 : c.user) == null ? void 0 : $.image, g = (() => {
4922
+ var M;
4923
+ const y = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
4923
4924
  if (y != null && y.length) {
4924
- for (let S = y.length - 1; S >= 0; S--)
4925
- if (y[S].type !== "system") return y[S];
4925
+ for (let E = y.length - 1; E >= 0; E--)
4926
+ if (y[E].type !== "system") return y[E];
4926
4927
  }
4927
- })(), N = (() => {
4928
- var $, F, V, Q;
4929
- const y = ms({
4930
- message: f,
4928
+ })(), _ = (() => {
4929
+ var F, O, V, Z;
4930
+ const y = hs({
4931
+ message: g,
4931
4932
  viewerLanguage: d
4932
4933
  });
4933
- if ((($ = f == null ? void 0 : f.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4934
- if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4935
- if (((V = f == null ? void 0 : f.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4934
+ if (((F = g == null ? void 0 : g.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4935
+ if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4936
+ if (((V = g == null ? void 0 : g.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4936
4937
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4937
4938
  if (y) return y;
4938
- const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4939
- return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4940
- })(), E = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4939
+ const T = (Z = g == null ? void 0 : g.attachments) == null ? void 0 : Z[0];
4940
+ return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4941
+ })(), A = g != null && g.created_at ? Ji(new Date(g.created_at)) : "", S = g ? Fe(g) : !1, I = o ? o(g, _) : `${S ? "✨ " : ""}${_}`, L = n ?? 0;
4941
4942
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4942
4943
  channelId: t == null ? void 0 : t.id,
4943
4944
  isSelected: p,
4944
4945
  participantName: w,
4945
- unreadCount: D,
4946
- hasTimestamp: !!E
4946
+ unreadCount: L,
4947
+ hasTimestamp: !!A
4947
4948
  }), /* @__PURE__ */ s(
4948
4949
  "div",
4949
4950
  {
4950
4951
  role: "button",
4951
4952
  tabIndex: 0,
4952
- onClick: g,
4953
- onKeyDown: c,
4953
+ onClick: f,
4954
+ onKeyDown: b,
4954
4955
  className: k(
4955
4956
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4956
4957
  {
@@ -4961,11 +4962,11 @@ const $s = U.createContext({
4961
4962
  "data-dd-privacy": "mask",
4962
4963
  children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
4963
4964
  /* @__PURE__ */ s(
4964
- se,
4965
+ ne,
4965
4966
  {
4966
- id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
4967
+ id: ((z = c == null ? void 0 : c.user) == null ? void 0 : z.id) || t.id || "unknown",
4967
4968
  name: w,
4968
- image: b,
4969
+ image: v,
4969
4970
  size: 48,
4970
4971
  starred: h
4971
4972
  }
@@ -4984,11 +4985,11 @@ const $s = U.createContext({
4984
4985
  ]
4985
4986
  }
4986
4987
  ),
4987
- E && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: E })
4988
+ A && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: A })
4988
4989
  ] }),
4989
4990
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4990
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
4991
- D > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: D > 99 ? "99+" : D })
4991
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
4992
+ L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
4992
4993
  ] })
4993
4994
  ] })
4994
4995
  ] })
@@ -4996,34 +4997,34 @@ const $s = U.createContext({
4996
4997
  );
4997
4998
  }
4998
4999
  );
4999
- js.displayName = "CustomChannelPreview";
5000
- const Ki = { last_message_at: -1 }, Ji = U.memo(
5000
+ Bs.displayName = "CustomChannelPreview";
5001
+ const Zi = { last_message_at: -1 }, Qi = U.memo(
5001
5002
  ({
5002
5003
  onChannelSelect: e,
5003
5004
  selectedChannel: t,
5004
5005
  filters: n,
5005
5006
  allowNewMessagesFromUnfilteredChannels: a = !1,
5006
5007
  channelRenderFilterFn: r,
5007
- sort: i = Ki,
5008
+ sort: i = Zi,
5008
5009
  className: l,
5009
5010
  customEmptyStateIndicator: o,
5010
- channelListPaginator: d = In,
5011
+ channelListPaginator: d = Tn,
5011
5012
  channelPreview: u,
5012
5013
  renderMessagePreview: p,
5013
5014
  viewerLanguage: h
5014
5015
  }) => {
5015
- const g = U.useRef(0);
5016
- g.current++;
5017
- const { debug: c = !1 } = it(), v = U.useCallback(
5018
- (b) => {
5019
- for (const f of b)
5020
- Hi(f);
5021
- return r ? r(b) : b;
5016
+ const f = U.useRef(0);
5017
+ f.current++;
5018
+ const { debug: b = !1 } = it(), c = U.useCallback(
5019
+ (v) => {
5020
+ for (const g of v)
5021
+ qi(g);
5022
+ return r ? r(v) : v;
5022
5023
  },
5023
5024
  [r]
5024
5025
  );
5025
- c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5026
- renderCount: g.current,
5026
+ b && console.log("📺 [ChannelList] 🔄 RENDER START", {
5027
+ renderCount: f.current,
5027
5028
  selectedChannelId: t == null ? void 0 : t.id,
5028
5029
  filters: n
5029
5030
  });
@@ -5031,7 +5032,7 @@ const Ki = { last_message_at: -1 }, Ji = U.memo(
5031
5032
  () => ({
5032
5033
  selectedChannel: t,
5033
5034
  onChannelSelect: e,
5034
- debug: c,
5035
+ debug: b,
5035
5036
  channelPreview: u,
5036
5037
  renderMessagePreview: p,
5037
5038
  viewerLanguage: h
@@ -5039,7 +5040,7 @@ const Ki = { last_message_at: -1 }, Ji = U.memo(
5039
5040
  [
5040
5041
  t,
5041
5042
  e,
5042
- c,
5043
+ b,
5043
5044
  u,
5044
5045
  p,
5045
5046
  h
@@ -5052,16 +5053,16 @@ const Ki = { last_message_at: -1 }, Ji = U.memo(
5052
5053
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5053
5054
  l
5054
5055
  ),
5055
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: w, children: /* @__PURE__ */ s(
5056
- Sn,
5056
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Wi, { value: w, children: /* @__PURE__ */ s(
5057
+ In,
5057
5058
  {
5058
5059
  filters: n,
5059
5060
  sort: i,
5060
5061
  options: { limit: 30 },
5061
5062
  allowNewMessagesFromUnfilteredChannels: a,
5062
- channelRenderFilterFn: v,
5063
+ channelRenderFilterFn: c,
5063
5064
  Paginator: d,
5064
- Preview: js,
5065
+ Preview: Bs,
5065
5066
  EmptyStateIndicator: o
5066
5067
  },
5067
5068
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5070,8 +5071,8 @@ const Ki = { last_message_at: -1 }, Ji = U.memo(
5070
5071
  );
5071
5072
  }
5072
5073
  );
5073
- Ji.displayName = "ChannelList";
5074
- const Zi = ({
5074
+ Qi.displayName = "ChannelList";
5075
+ const el = ({
5075
5076
  question: e,
5076
5077
  onClick: t,
5077
5078
  loading: n = !1,
@@ -5093,7 +5094,7 @@ const Zi = ({
5093
5094
  ),
5094
5095
  children: e
5095
5096
  }
5096
- ), ml = ({
5097
+ ), fl = ({
5097
5098
  faqs: e,
5098
5099
  onFaqClick: t,
5099
5100
  loadingFaqId: n,
@@ -5105,7 +5106,7 @@ const Zi = ({
5105
5106
  const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5106
5107
  return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5107
5108
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5108
- se,
5109
+ ne,
5109
5110
  {
5110
5111
  id: l || "account",
5111
5112
  name: l || "Account",
@@ -5122,7 +5123,7 @@ const Zi = ({
5122
5123
  children: [
5123
5124
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5124
5125
  o.map((d) => /* @__PURE__ */ s(
5125
- Zi,
5126
+ el,
5126
5127
  {
5127
5128
  question: d.question,
5128
5129
  onClick: () => t(d.id),
@@ -5136,40 +5137,40 @@ const Zi = ({
5136
5137
  ] }) });
5137
5138
  };
5138
5139
  export {
5139
- ps as A,
5140
- dl as B,
5141
- Bi as C,
5142
- $r as D,
5143
- ba as E,
5144
- ml as F,
5145
- ea as G,
5146
- Qt as L,
5147
- ol as M,
5140
+ bs as A,
5141
+ ml as B,
5142
+ Vi as C,
5143
+ jr as D,
5144
+ va as E,
5145
+ fl as F,
5146
+ ta as G,
5147
+ es as L,
5148
+ dl as M,
5148
5149
  _e as a,
5149
- se as b,
5150
- Ji as c,
5151
- Os as d,
5152
- cl as e,
5153
- Zi as f,
5154
- le as g,
5155
- Jt as h,
5150
+ ne as b,
5151
+ Qi as c,
5152
+ $s as d,
5153
+ ul as e,
5154
+ el as f,
5155
+ oe as g,
5156
+ Zt as h,
5156
5157
  Ne as i,
5157
- Yr as j,
5158
- ll as k,
5159
- ul as l,
5160
- nr as m,
5161
- er as n,
5162
- Xi as o,
5163
- sr as p,
5164
- ms as q,
5158
+ Wr as j,
5159
+ cl as k,
5160
+ hl as l,
5161
+ ar as m,
5162
+ tr as n,
5163
+ Ji as o,
5164
+ nr as p,
5165
+ hs as q,
5165
5166
  we as r,
5166
- xs as s,
5167
- aa as t,
5168
- qa as u,
5169
- va as v,
5167
+ ws as s,
5168
+ ra as t,
5169
+ Wa as u,
5170
+ xa as v,
5170
5171
  Ue as w,
5171
5172
  mt as x,
5172
5173
  ht as y,
5173
5174
  ot as z
5174
5175
  };
5175
- //# sourceMappingURL=index-DPwo1avm.js.map
5176
+ //# sourceMappingURL=index-CnR5N9Co.js.map