@linktr.ee/messaging-react 3.6.2-rc-1783305830 → 3.6.2-rc-1783311170

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 (31) hide show
  1. package/dist/{Card-DzbA42LS.js → Card-CJh6R76n.js} +2 -2
  2. package/dist/{Card-DzbA42LS.js.map → Card-CJh6R76n.js.map} +1 -1
  3. package/dist/{Card-ApKu84eU.cjs → Card-CK1jw1VU.cjs} +2 -2
  4. package/dist/{Card-ApKu84eU.cjs.map → Card-CK1jw1VU.cjs.map} +1 -1
  5. package/dist/{Card-BsrjOcey.cjs → Card-CSwQT3wz.cjs} +2 -2
  6. package/dist/{Card-BsrjOcey.cjs.map → Card-CSwQT3wz.cjs.map} +1 -1
  7. package/dist/{Card-DRsxhw3X.cjs → Card-DQtg7wWP.cjs} +2 -2
  8. package/dist/{Card-DRsxhw3X.cjs.map → Card-DQtg7wWP.cjs.map} +1 -1
  9. package/dist/{Card-ByFl70ay.js → Card-DUoHKAuh.js} +2 -2
  10. package/dist/{Card-ByFl70ay.js.map → Card-DUoHKAuh.js.map} +1 -1
  11. package/dist/{Card-BQaLggg8.js → Card-DnEyeR_d.js} +3 -3
  12. package/dist/{Card-BQaLggg8.js.map → Card-DnEyeR_d.js.map} +1 -1
  13. package/dist/{LockedThumbnail-C6roO49v.cjs → LockedThumbnail-BZLpmTpY.cjs} +2 -2
  14. package/dist/{LockedThumbnail-C6roO49v.cjs.map → LockedThumbnail-BZLpmTpY.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-B1MyKjeC.js → LockedThumbnail-C_F2Sw-9.js} +2 -2
  16. package/dist/{LockedThumbnail-B1MyKjeC.js.map → LockedThumbnail-C_F2Sw-9.js.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-Dy-mY8YE.js → index-DcEVHNS3.js} +1062 -1068
  19. package/dist/index-DcEVHNS3.js.map +1 -0
  20. package/dist/index-LP0PQJxl.cjs +2 -0
  21. package/dist/index-LP0PQJxl.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +64 -53
  26. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +54 -36
  27. package/src/components/CustomMessage/index.tsx +7 -10
  28. package/src/styles.css +19 -4
  29. package/dist/index-Cx5L9rqX.cjs +0 -2
  30. package/dist/index-Cx5L9rqX.cjs.map +0 -1
  31. package/dist/index-Dy-mY8YE.js.map +0 -1
@@ -1,12 +1,12 @@
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 H, useEffect as K, useId as Gs, useMemo as ae, Suspense as rt } from "react";
1
+ import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
+ import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as ae, Suspense as it } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as me, useChatContext as he, 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 On, FilePptIcon as Fn, 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, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
5
+ import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Ln, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Dn, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as ea, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = at({
8
+ import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = rt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = at({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), it = () => Se(us), ol = ({
19
+ }), lt = () => Ie(us), dl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -24,10 +24,10 @@ const us = at({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var M, E;
27
+ var A, E;
28
28
  const l = J(
29
- (C, ...T) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...T);
29
+ (C, ...I) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,37 +37,37 @@ const us = 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), [b, c] = B(!1), [w, v] = B(null), f = H(!1), x = H(null), _ = H(n);
41
- _.current = n;
42
- const A = H(i);
43
- A.current = i;
44
- const S = H({
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 S = G(i);
43
+ S.current = i;
44
+ const T = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: n,
48
48
  capabilities: r
49
- }), I = H(0);
50
- I.current++, l("📊 RENDER INFO", {
51
- renderCount: I.current,
49
+ }), M = G(0);
50
+ M.current++, l("📊 RENDER INFO", {
51
+ renderCount: M.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: 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
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
58
58
  }
59
- }), S.current = {
59
+ }), T.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 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;
65
+ const D = G(null);
66
+ a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Ys(a) });
67
+ const L = a ? ((E = D.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
- const C = I.current, T = _.current;
70
- if (!a || !D || !T) {
69
+ const C = M.current, I = N.current;
70
+ if (!a || !L || !I) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: C,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
@@ -78,20 +78,20 @@ const us = at({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const O = new Hs({
82
- ...T,
81
+ const $ = new Hs({
82
+ ...I,
83
83
  apiKey: a,
84
- debug: A.current,
85
- client: D
84
+ debug: S.current,
85
+ client: L
86
86
  });
87
- x.current = O, d(O), l("✅ SERVICE SET", {
87
+ x.current = $, d($), l("✅ SERVICE SET", {
88
88
  renderCount: C,
89
- serviceInstance: !!O
89
+ serviceInstance: !!$
90
90
  });
91
- }, [a, D]);
92
- const $ = H(null);
91
+ }, [a, L]);
92
+ const O = G(null);
93
93
  K(() => {
94
- var T, O;
94
+ var I, $;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const us = at({
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((T = $.current) == null ? void 0 : T.serviceId) === o && ((O = $.current) == null ? void 0 : O.userId) === t.id) {
110
+ if (((I = O.current) == null ? void 0 : I.serviceId) === o && (($ = O.current) == null ? void 0 : $.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 us = at({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, c(!0), v(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), f.current = !0, v(!0), b(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
121
  const F = await o.connectUser(t);
122
- p(F), g(!0), $.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
122
+ p(F), g(!0), O.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
124
  clientId: F.userID
125
125
  });
126
126
  } catch (F) {
127
127
  const V = F instanceof Error ? F.message : "Connection failed";
128
- v(V), l("❌ USER CONNECTION ERROR", {
128
+ b(V), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
130
  error: V
131
131
  });
132
132
  } finally {
133
- c(!1), f.current = !1, l("🔄 USER CONNECTION FINISHED", {
133
+ v(!1), f.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 = D;
140
+ const C = L;
141
141
  return () => {
142
- var T;
143
- C && ($.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
142
+ var I;
143
+ C && (O.current = null, (I = x.current) == null || I.disconnectUser().catch(console.error));
144
144
  };
145
- }, [D]);
145
+ }, [L]);
146
146
  const z = J(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
@@ -151,32 +151,32 @@ const us = at({
151
151
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), c(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), v(!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), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ p(C), g(!0), b(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (C) {
160
- const T = C instanceof Error ? C.message : "Refresh failed";
161
- v(T), l("❌ CONNECTION REFRESH ERROR", {
160
+ const I = C instanceof Error ? C.message : "Refresh failed";
161
+ b(I), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: T
163
+ error: I
164
164
  });
165
165
  } finally {
166
- c(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ v(!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: b,
172
+ isLoading: c,
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: b,
179
+ isLoading: c,
180
180
  error: w,
181
181
  capabilities: r,
182
182
  refreshConnection: z,
@@ -185,7 +185,7 @@ const us = at({
185
185
  o,
186
186
  u,
187
187
  h,
188
- b,
188
+ c,
189
189
  w,
190
190
  r,
191
191
  z,
@@ -193,20 +193,20 @@ const us = at({
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: I.current,
197
- willRenderChat: !!D,
196
+ renderCount: M.current,
197
+ willRenderChat: !!L,
198
198
  contextValueReady: !!y
199
- }), /* @__PURE__ */ s(us.Provider, { value: y, children: D ? /* @__PURE__ */ s(
199
+ }), /* @__PURE__ */ s(us.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
200
  qs,
201
201
  {
202
- client: D,
202
+ client: L,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, ta = () => it(), lt = (e) => {
209
+ }, sa = () => lt(), ot = (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 us = at({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, sa = "linktree-official", na = "linktree-official-sender";
231
+ }, na = "linktree-official", aa = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === sa) {
234
+ if (n === na) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === na;
238
+ return ((l = i.user) == null ? void 0 : l.id) === aa;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,15 +247,15 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
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());
250
+ const ra = /^[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 ia(e) {
252
+ return ra.test(e.trim());
253
253
  }
254
254
  function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ra(n);
256
+ return !n || t && n === t ? !1 : !ia(n);
257
257
  }
258
- function ot(e) {
258
+ function ct(e) {
259
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
261
  const Jt = [
@@ -286,7 +286,7 @@ const Jt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function ia(e) {
289
+ function la(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -295,15 +295,15 @@ function ia(e) {
295
295
  return Math.abs(t);
296
296
  }
297
297
  function ms(e) {
298
- return Jt[ia(e) % Jt.length];
298
+ return Jt[la(e) % Jt.length];
299
299
  }
300
- function la(e) {
300
+ function oa(e) {
301
301
  return ms(e).emoji;
302
302
  }
303
- function oa(e) {
303
+ function ca(e) {
304
304
  return ms(e).bgColor;
305
305
  }
306
- const ne = ({
306
+ const se = ({
307
307
  id: e,
308
308
  image: t,
309
309
  size: n = 40,
@@ -312,7 +312,7 @@ const ne = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
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, g = 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(
315
+ const o = oa(e), d = ca(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(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -342,7 +342,7 @@ const ne = ({
342
342
  width: `${n}px`,
343
343
  height: `${n}px`,
344
344
  backgroundColor: t ? void 0 : d,
345
- ...b
345
+ ...c
346
346
  },
347
347
  children: [
348
348
  r && /* @__PURE__ */ s(
@@ -362,7 +362,7 @@ const ne = ({
362
362
  "bg-transparent"
363
363
  ),
364
364
  style: {
365
- ...b,
365
+ ...c,
366
366
  ...l && {
367
367
  borderWidth: `${g}px`,
368
368
  borderStyle: "solid",
@@ -370,13 +370,13 @@ const ne = ({
370
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
371
371
  }
372
372
  },
373
- children: c
373
+ children: v
374
374
  }
375
375
  )
376
376
  ]
377
377
  }
378
378
  );
379
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
379
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -389,11 +389,11 @@ const ne = ({
389
389
  onActionComplete: u,
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
- var M;
393
- const { service: h, debug: g } = it(), b = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, c = !!(a && n && h && b), [w, v] = B(!1), [f, x] = B(null), [_, A] = B(!1), [S, I] = B(!1), L = c && ((f == null ? void 0 : f.participantId) !== b || (f == null ? void 0 : f.service) !== h);
392
+ var A;
393
+ const { service: h, debug: g } = lt(), 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, S] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
394
394
  return K(() => {
395
- if (!c || !h || !b) {
396
- v(!1), x(null);
395
+ if (!v || !h || !c) {
396
+ b(!1), x(null);
397
397
  return;
398
398
  }
399
399
  let E = !1;
@@ -401,69 +401,69 @@ const ne = ({
401
401
  try {
402
402
  const C = await h.getBlockedUsers();
403
403
  if (E) return;
404
- v(
404
+ b(
405
405
  C.some(
406
- (T) => T.blocked_user_id === b
406
+ (I) => I.blocked_user_id === c
407
407
  )
408
408
  );
409
409
  } catch (C) {
410
410
  E || console.error(`[${p}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- E || x({ participantId: b, service: h });
412
+ E || x({ participantId: c, service: h });
413
413
  }
414
414
  })(), () => {
415
415
  E = !0;
416
416
  };
417
- }, [c, h, b, p]), {
417
+ }, [v, h, c, p]), {
418
418
  isParticipantBlocked: w,
419
- isCheckingBlockedStatus: L,
420
- isLeaving: _,
421
- isUpdatingBlockStatus: S,
419
+ isCheckingBlockedStatus: D,
420
+ isLeaving: N,
421
+ isUpdatingBlockStatus: T,
422
422
  handleLeaveConversation: async () => {
423
423
  var E;
424
- if (!_) {
425
- l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), A(!0);
424
+ if (!N) {
425
+ l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), S(!0);
426
426
  try {
427
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
- A(!1);
432
+ S(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var E, C, T;
438
- if (!(S || !h)) {
439
- o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
437
+ var E, C, I;
438
+ if (!(T || !h)) {
439
+ o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
440
440
  try {
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 (O) {
443
- console.error(`[${p}] Failed to block member`, O);
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`, $);
444
444
  } finally {
445
- I(!1);
445
+ M(!1);
446
446
  }
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var E, C, T;
451
- if (!(S || !h)) {
452
- o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), I(!0);
450
+ var E, C, I;
451
+ if (!(T || !h)) {
452
+ o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
453
453
  try {
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 (O) {
456
- console.error(`[${p}] Failed to unblock member`, O);
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`, $);
457
457
  } finally {
458
- I(!1);
458
+ M(!1);
459
459
  }
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, _e = ({
466
+ }, Ne = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: n,
@@ -480,7 +480,7 @@ const ne = ({
480
480
  ...a,
481
481
  children: n
482
482
  }
483
- ), tt = ({
483
+ ), st = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,16 +494,16 @@ const ne = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, b] = B(!1), c = H(null), w = Gs(), v = J(() => b(!1), []), {
497
+ const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
498
498
  isParticipantBlocked: f,
499
499
  isCheckingBlockedStatus: x,
500
- isLeaving: _,
501
- isUpdatingBlockStatus: A,
502
- handleLeaveConversation: S,
503
- handleBlockUser: I,
504
- handleUnblockUser: L,
505
- handleReportUser: D
506
- } = da({
500
+ isLeaving: N,
501
+ isUpdatingBlockStatus: S,
502
+ handleLeaveConversation: T,
503
+ handleBlockUser: M,
504
+ handleUnblockUser: D,
505
+ handleReportUser: L
506
+ } = ua({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
@@ -513,20 +513,20 @@ const ne = ({
513
513
  onDeleteConversationClick: o,
514
514
  onBlockParticipantClick: d,
515
515
  onReportParticipantClick: u,
516
- onActionComplete: v,
516
+ onActionComplete: b,
517
517
  logLabel: "ChannelActionsMenu"
518
518
  });
519
519
  return K(() => {
520
520
  if (!g) return;
521
- const z = (M) => {
522
- c.current && !c.current.contains(M.target) && b(!1);
523
- }, y = (M) => {
524
- M.key === "Escape" && b(!1);
521
+ const z = (A) => {
522
+ v.current && !v.current.contains(A.target) && c(!1);
523
+ }, y = (A) => {
524
+ A.key === "Escape" && c(!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: c, className: "relative", children: [
529
+ }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
530
530
  /* @__PURE__ */ m(
531
531
  "button",
532
532
  {
@@ -535,9 +535,9 @@ const ne = ({
535
535
  "aria-haspopup": "true",
536
536
  "aria-expanded": g,
537
537
  "aria-controls": g ? w : void 0,
538
- onClick: () => b((z) => !z),
538
+ onClick: () => c((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
@@ -553,13 +553,13 @@ const ne = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
- _e,
556
+ Ne,
557
557
  {
558
- onClick: S,
559
- disabled: _,
560
- "aria-busy": _,
558
+ onClick: T,
559
+ disabled: N,
560
+ "aria-busy": N,
561
561
  children: [
562
- _ ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Mn, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -567,34 +567,34 @@ const ne = ({
567
567
  a && /* @__PURE__ */ s("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
574
  ) : f ? /* @__PURE__ */ m(
575
- _e,
575
+ Ne,
576
576
  {
577
- onClick: L,
578
- disabled: A,
579
- "aria-busy": A,
577
+ onClick: D,
578
+ disabled: S,
579
+ "aria-busy": S,
580
580
  children: [
581
- A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
581
+ S ? /* @__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
- _e,
586
+ Ne,
587
587
  {
588
- onClick: I,
589
- disabled: A,
590
- "aria-busy": A,
588
+ onClick: M,
589
+ disabled: S,
590
+ "aria-busy": S,
591
591
  children: [
592
- A ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
592
+ S ? /* @__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: D, children: [
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: L, children: [
598
598
  /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
@@ -603,10 +603,10 @@ const ne = ({
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", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (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", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
- }, ga = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
+ }, pa = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -620,24 +620,24 @@ const ne = ({
620
620
  onBlockParticipantClick: p,
621
621
  onReportParticipantClick: h,
622
622
  customChannelActions: g,
623
- renderChannelActions: b,
624
- showChannelInfo: c = !0,
623
+ renderChannelActions: c,
624
+ showChannelInfo: v = !0,
625
625
  onParticipantNameClick: w
626
626
  }) => {
627
- var D, $, z;
628
- const { channel: v } = me(), { client: f } = he(), x = U.useMemo(
627
+ var L, O, z;
628
+ const { channel: b } = ue(), { client: f } = me(), x = U.useMemo(
629
629
  () => {
630
630
  var y;
631
631
  return Ue(
632
- (y = v.state) == null ? void 0 : y.members,
632
+ (y = b.state) == null ? void 0 : y.members,
633
633
  f == null ? void 0 : f.userID,
634
- v.type
634
+ b.type
635
635
  );
636
636
  },
637
- [(D = v.state) == null ? void 0 : D.members, f == null ? void 0 : f.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 () => {
637
+ [(L = b.state) == null ? void 0 : L.members, f == null ? void 0 : f.userID, b.type]
638
+ ), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), D = async () => {
639
639
  try {
640
- S ? await v.unpin() : await v.pin();
640
+ T ? await b.unpin() : await b.pin();
641
641
  } catch (y) {
642
642
  console.error(
643
643
  "[ChannelHeaderRedesign] Failed to update pinned status:",
@@ -657,7 +657,7 @@ const ne = ({
657
657
  }),
658
658
  type: "button",
659
659
  "aria-label": "Back to conversations",
660
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
661
661
  }
662
662
  ) }),
663
663
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
@@ -665,15 +665,15 @@ const ne = ({
665
665
  {
666
666
  type: "button",
667
667
  onClick: w,
668
- "aria-label": `View details for ${_}`,
668
+ "aria-label": `View details for ${N}`,
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
- ne,
672
+ se,
673
673
  {
674
- id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || v.id || "unknown",
675
- name: _,
676
- image: A,
674
+ id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
+ name: N,
676
+ image: S,
677
677
  dmAgentEnabled: a,
678
678
  shape: "circle",
679
679
  size: 48,
@@ -682,17 +682,17 @@ const ne = ({
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: _ }),
685
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
686
686
  /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
687
- I && /* @__PURE__ */ s(
687
+ M && /* @__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(Rn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
- n && S && /* @__PURE__ */ s(
695
+ n && T && /* @__PURE__ */ s(
696
696
  "span",
697
697
  {
698
698
  "aria-label": "Starred conversation",
@@ -712,7 +712,7 @@ const ne = ({
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: ma })
715
+ /* @__PURE__ */ s("span", { children: ha })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -723,26 +723,26 @@ const ne = ({
723
723
  "button",
724
724
  {
725
725
  className: We,
726
- onClick: L,
726
+ onClick: D,
727
727
  type: "button",
728
- "aria-pressed": S,
729
- "aria-label": S ? "Unstar conversation" : "Star conversation",
728
+ "aria-pressed": T,
729
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
731
  Ee,
732
732
  {
733
733
  className: k("size-5", {
734
- "text-[#FFD60A]": S,
735
- "text-black/90": !S
734
+ "text-[#FFD60A]": T,
735
+ "text-black/90": !T
736
736
  }),
737
- weight: S ? "fill" : "regular"
737
+ weight: T ? "fill" : "regular"
738
738
  }
739
739
  )
740
740
  }
741
741
  ),
742
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
743
- tt,
742
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
+ st,
744
744
  {
745
- channel: v,
745
+ channel: b,
746
746
  participant: x,
747
747
  showDeleteConversation: l,
748
748
  showBlockParticipant: o,
@@ -758,20 +758,20 @@ const ne = ({
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, pa = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
- function ba(e) {
763
- return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
- }
761
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
765
762
  function va(e) {
766
- const { channel: t } = me(), { client: n } = he("useMessageVote"), a = ae(
767
- () => ba(e.own_reactions),
763
+ return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
764
+ }
765
+ function xa(e) {
766
+ const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
+ () => va(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
771
771
  try {
772
- a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
773
773
  e.id,
774
- { type: st },
774
+ { type: nt },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function va(e) {
779
779
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
780
780
  if (n != null && n.userID)
781
781
  try {
782
- a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
783
783
  e.id,
784
- { type: nt },
784
+ { type: at },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,7 +789,7 @@ function va(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 xa(e) {
792
+ function wa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
795
  function hs({
@@ -797,16 +797,16 @@ function hs({
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = xa(t);
800
+ const n = e == null ? void 0 : e.text, a = wa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const wa = U.lazy(() => import("./Card-DzbA42LS.js")), _a = U.lazy(() => import("./Card-ByFl70ay.js")), Na = U.lazy(() => import("./Card-BQaLggg8.js")), ct = () => /* @__PURE__ */ s(
803
+ const _a = U.lazy(() => import("./Card-CJh6R76n.js")), Na = U.lazy(() => import("./Card-DUoHKAuh.js")), ya = U.lazy(() => import("./Card-DnEyeR_d.js")), dt = () => /* @__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
- ), 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 = [
809
+ ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -816,7 +816,7 @@ const wa = U.lazy(() => import("./Card-DzbA42LS.js")), _a = U.lazy(() => import(
816
816
  [/plain|rtf/, "text"],
817
817
  [/markdown/, "markdown"]
818
818
  ];
819
- function oe(e) {
819
+ function le(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
822
  function ps(e) {
@@ -825,33 +825,33 @@ function ps(e) {
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Sa = {
828
+ const Ia = {
829
829
  video: cs,
830
- audio: Dn,
831
- image: Ln,
830
+ audio: zn,
831
+ image: Dn,
832
832
  document: os
833
- }, Ia = {
834
- pdf: Un,
835
- doc: Bn,
836
- xls: jn,
837
- csv: $n,
838
- ppt: Fn,
833
+ }, Ta = {
834
+ pdf: Vn,
835
+ doc: Un,
836
+ xls: Bn,
837
+ csv: jn,
838
+ ppt: $n,
839
839
  zip: On,
840
- text: Pn,
841
- markdown: zn,
840
+ text: Fn,
841
+ markdown: Pn,
842
842
  generic: os
843
843
  };
844
- function Ta(e) {
845
- const t = oe(e);
846
- return t !== "document" ? Sa[t] : Ia[ps(e)];
844
+ function Aa(e) {
845
+ const t = le(e);
846
+ return t !== "document" ? Ia[t] : Ta[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Ta(e), t);
849
+ return U.createElement(Aa(e), t);
850
850
  }
851
- const Aa = (e) => {
851
+ const Ma = (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
- }, Ma = ({
854
+ }, Ra = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,74 +863,74 @@ const Aa = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = oe(t), h = H(null), g = H(null), b = H(null), c = H(r), [w, v] = B(a), [f, 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
- }, []), O = J((N) => {
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, S] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
867
+ L(!1), b(!0);
868
+ }, []), $ = J((_) => {
869
869
  const R = g.current;
870
870
  if (!R) return 0;
871
- const G = R.getBoundingClientRect();
871
+ const H = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Aa(N) - G.left) / G.width)
874
+ Math.min(1, (Ma(_) - H.left) / H.width)
875
875
  );
876
- }, []), F = J((N) => {
876
+ }, []), F = J((_) => {
877
877
  const R = h.current;
878
- R && R.duration && (R.currentTime = N * R.duration);
879
- }, []), V = (N) => {
880
- N.stopPropagation(), A(!0);
881
- const R = O(N);
878
+ R && R.duration && (R.currentTime = _ * R.duration);
879
+ }, []), V = (_) => {
880
+ _.stopPropagation(), S(!0);
881
+ const R = $(_);
882
882
  x(R), F(R);
883
883
  };
884
884
  K(() => {
885
- r !== void 0 && r !== c.current && (c.current = r, v(r));
885
+ r !== void 0 && r !== v.current && (v.current = r, b(r));
886
886
  }, [r]), K(() => {
887
887
  if (!w) {
888
- b.current !== null && (cancelAnimationFrame(b.current), b.current = null);
888
+ c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
889
889
  return;
890
890
  }
891
- const N = () => {
891
+ const _ = () => {
892
892
  const R = h.current;
893
- R && R.duration && !_ && x(R.currentTime / R.duration), b.current = requestAnimationFrame(N);
893
+ R && R.duration && !N && x(R.currentTime / R.duration), c.current = requestAnimationFrame(_);
894
894
  };
895
- return b.current = requestAnimationFrame(N), () => {
896
- b.current !== null && cancelAnimationFrame(b.current);
895
+ return c.current = requestAnimationFrame(_), () => {
896
+ c.current !== null && cancelAnimationFrame(c.current);
897
897
  };
898
- }, [w, _]), K(() => {
899
- const N = h.current;
900
- N && (w ? N.play().catch((R) => {
901
- v(!1), D(!0);
902
- }) : N.pause());
898
+ }, [w, N]), K(() => {
899
+ const _ = h.current;
900
+ _ && (w ? _.play().catch((R) => {
901
+ b(!1), L(!0);
902
+ }) : _.pause());
903
903
  }, [w]), K(() => {
904
- if (!_) return;
905
- const N = (G) => x(O(G)), R = (G) => {
906
- A(!1), F(O(G));
904
+ if (!N) return;
905
+ const _ = (H) => x($(H)), R = (H) => {
906
+ S(!1), F($(H));
907
907
  };
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);
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);
910
910
  };
911
- }, [_, O, F]);
912
- const Z = E ? { aspectRatio: String(E) } : void 0, ee = E ? "" : " aspect-video", X = Math.round(f * 100);
911
+ }, [N, $, F]);
912
+ const Q = E ? { aspectRatio: String(E) } : void 0, te = E ? "" : " aspect-video", X = Math.round(f * 100);
913
913
  return /* @__PURE__ */ m(
914
914
  "div",
915
915
  {
916
916
  role: "button",
917
917
  tabIndex: 0,
918
- className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
- style: Z,
920
- onClick: (N) => {
918
+ className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
919
+ style: Q,
920
+ onClick: (_) => {
921
921
  if (u) {
922
- u(N);
922
+ u(_);
923
923
  return;
924
924
  }
925
- L || l && v((R) => !R);
925
+ D || l && b((R) => !R);
926
926
  },
927
- onKeyDown: (N) => {
928
- if (!(N.key !== "Enter" && N.key !== " ")) {
929
- if (N.preventDefault(), u) {
930
- u(N);
927
+ onKeyDown: (_) => {
928
+ if (!(_.key !== "Enter" && _.key !== " ")) {
929
+ if (_.preventDefault(), u) {
930
+ u(_);
931
931
  return;
932
932
  }
933
- L || l && v((R) => !R);
933
+ D || l && b((R) => !R);
934
934
  }
935
935
  },
936
936
  children: [
@@ -956,12 +956,12 @@ const Aa = (e) => {
956
956
  style: { width: "100%", height: "100%" },
957
957
  onLoadStart: () => z(!0),
958
958
  onCanPlay: () => {
959
- z(!1), M(!1);
959
+ z(!1), A(!1);
960
960
  },
961
961
  onWaiting: () => z(!0),
962
- onPlay: () => D(!1),
962
+ onPlay: () => L(!1),
963
963
  onEnded: () => {
964
- i || (v(!1), x(0));
964
+ i || (b(!1), x(0));
965
965
  },
966
966
  children: /* @__PURE__ */ s("track", { kind: "captions" })
967
967
  }
@@ -976,41 +976,41 @@ const Aa = (e) => {
976
976
  style: { width: "100%", height: "100%" },
977
977
  onLoadStart: () => z(!0),
978
978
  onCanPlay: () => {
979
- z(!1), M(!1);
979
+ z(!1), A(!1);
980
980
  },
981
981
  onWaiting: () => z(!0),
982
- onPlay: () => D(!1),
982
+ onPlay: () => L(!1),
983
983
  onLoadedMetadata: () => {
984
- const N = h.current;
985
- N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && C(N.videoWidth / N.videoHeight);
984
+ const _ = h.current;
985
+ _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && C(_.videoWidth / _.videoHeight);
986
986
  },
987
987
  onEnded: () => {
988
- i || (v(!1), x(0));
988
+ i || (b(!1), x(0));
989
989
  },
990
990
  children: /* @__PURE__ */ s("track", { kind: "captions" })
991
991
  }
992
992
  ) }),
993
- $ && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
- ke,
993
+ O && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
+ Ce,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
998
998
  }
999
999
  ) }),
1000
- L && !l && /* @__PURE__ */ s(
1000
+ D && !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: (N) => {
1008
- N.stopPropagation(), T();
1007
+ onClick: (_) => {
1008
+ _.stopPropagation(), I();
1009
1009
  },
1010
- onKeyDown: (N) => {
1011
- N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), T());
1010
+ onKeyDown: (_) => {
1011
+ _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1012
1012
  },
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" }) })
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(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
1015
1015
  ),
1016
1016
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1026,9 +1026,9 @@ const Aa = (e) => {
1026
1026
  className: "relative flex h-4 w-full cursor-pointer items-center",
1027
1027
  onMouseDown: V,
1028
1028
  onTouchStart: V,
1029
- onClick: (N) => N.stopPropagation(),
1030
- onKeyDown: (N) => {
1031
- N.key === "ArrowRight" && F(Math.min(1, f + 0.05)), N.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
1029
+ onClick: (_) => _.stopPropagation(),
1030
+ onKeyDown: (_) => {
1031
+ _.key === "ArrowRight" && F(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && F(Math.max(0, f - 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 Aa = (e) => {
1044
1044
  "button",
1045
1045
  {
1046
1046
  type: "button",
1047
- onClick: (N) => {
1048
- N.stopPropagation(), v((R) => !R);
1047
+ onClick: (_) => {
1048
+ _.stopPropagation(), b((R) => !R);
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1065,17 +1065,17 @@ const Aa = (e) => {
1065
1065
  className: "relative flex h-4 w-full cursor-pointer items-center",
1066
1066
  onMouseDown: V,
1067
1067
  onTouchStart: V,
1068
- onClick: (N) => N.stopPropagation(),
1069
- onMouseEnter: () => I(!0),
1070
- onMouseLeave: () => I(!1),
1071
- onKeyDown: (N) => {
1072
- N.key === "ArrowRight" && F(Math.min(1, f + 0.05)), N.key === "ArrowLeft" && F(Math.max(0, f - 0.05));
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));
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 ${S || _ ? "h-1.5" : "h-1"}`,
1078
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1079
1079
  children: /* @__PURE__ */ s(
1080
1080
  "div",
1081
1081
  {
@@ -1088,7 +1088,7 @@ const Aa = (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 ${S || _ ? "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 ${T || N ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1092
1092
  style: { left: `${X}%` }
1093
1093
  }
1094
1094
  )
@@ -1099,7 +1099,7 @@ const Aa = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
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 = ({
1102
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", La = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1108,9 +1108,9 @@ const Aa = (e) => {
1108
1108
  mediaPlayerProps: i,
1109
1109
  containedImage: l = !1
1110
1110
  }) => {
1111
- const o = oe(e), [d, u] = B(!1);
1111
+ const o = le(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ma,
1113
+ Ra,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1161,7 +1161,7 @@ const Aa = (e) => {
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1193,7 +1193,7 @@ const Aa = (e) => {
1193
1193
  rootRef: p,
1194
1194
  "data-testid": h
1195
1195
  }) => {
1196
- const g = e === "dark", b = g ? n ?? a : n ?? "", c = g && !n;
1196
+ const g = e === "dark", c = g ? n ?? a : n ?? "", v = g && !n;
1197
1197
  return /* @__PURE__ */ m(
1198
1198
  "div",
1199
1199
  {
@@ -1208,15 +1208,15 @@ const Aa = (e) => {
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
- b.trim() !== "" && /* @__PURE__ */ s(
1211
+ c.trim() !== "" && /* @__PURE__ */ s(
1212
1212
  "p",
1213
1213
  {
1214
1214
  className: k("mb-0.5 truncate text-base font-medium", {
1215
1215
  "text-black": !g,
1216
- "text-white/30": g && c,
1217
- "text-white": g && !c
1216
+ "text-white/30": g && v,
1217
+ "text-white": g && !v
1218
1218
  }),
1219
- children: b
1219
+ children: c
1220
1220
  }
1221
1221
  ),
1222
1222
  /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
@@ -1248,25 +1248,25 @@ const Aa = (e) => {
1248
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
- function dt(e) {
1251
+ function ut(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 La(e) {
1254
+ function Da(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function Da(e) {
1257
+ function za(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function za(e) {
1260
+ function Pa(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Pa(e) {
1263
+ function Fa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
1266
  function Oa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const ut = ({ attachment: e, isMyMessage: t }) => {
1269
+ const mt = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
1271
1271
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1272
1272
  "img",
@@ -1278,14 +1278,14 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1278
1278
  ) : /* @__PURE__ */ s(
1279
1279
  "div",
1280
1280
  {
1281
- className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Oa(t)}` })
1281
+ className: `aspect-video w-full rounded-[20px] ${Da(t)} flex items-center justify-center`,
1282
+ children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(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 ${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 })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(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 });
@@ -1293,11 +1293,11 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1293
1293
  function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function mt(e) {
1296
+ function ht(e) {
1297
1297
  var t;
1298
1298
  return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function Fa(e, t) {
1300
+ async function $a(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 $a = ({
1312
+ const ja = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const $a = ({
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), $a(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,22 +1329,22 @@ const $a = ({
1329
1329
  },
1330
1330
  disabled: n,
1331
1331
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1332
- children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
- /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1332
+ children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
+ /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ht(e) {
1340
- var h, g, b, c;
1339
+ function ft(e) {
1340
+ var h, g, c, v;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
1343
1343
  ), n = (g = e.attachments) == null ? void 0 : g.find(
1344
1344
  (w) => w.type === "image" && w.image_url
1345
- ), a = (b = e.attachments) == null ? void 0 : b.find(
1345
+ ), a = (c = e.attachments) == null ? void 0 : c.find(
1346
1346
  (w) => w.type === "audio" && w.asset_url
1347
- ), r = (c = e.attachments) == null ? void 0 : c.find(
1347
+ ), r = (v = e.attachments) == null ? void 0 : v.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;
@@ -1392,7 +1392,7 @@ const _s = ({
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = oe(t), l = a !== void 0 ? xs(a) : void 0;
1395
+ const i = le(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
1397
  vs,
1398
1398
  {
@@ -1411,17 +1411,17 @@ const _s = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s($a, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, ja = ({
1417
+ }, Ba = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = mt(e), a = ht(e);
1421
+ const n = ht(e), a = ft(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
- ne,
1424
+ se,
1425
1425
  {
1426
1426
  className: "str-chat__avatar str-chat__message-sender-avatar",
1427
1427
  id: e.user.id,
@@ -1439,41 +1439,41 @@ const _s = ({
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(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ba = ({
1448
+ }, Ua = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = mt(e);
1451
+ const t = ht(e);
1452
1452
  if (t)
1453
- return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
- const n = ht(e);
1453
+ return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1454
+ const n = ft(e);
1455
1455
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
- }, Ua = ({
1456
+ }, Va = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = mt(e);
1459
+ const t = ht(e);
1460
1460
  if (t)
1461
- return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
- const n = ht(e);
1461
+ return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1462
+ const n = ft(e);
1463
1463
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
- }, cl = Object.assign(ja, {
1465
- Creator: Ba,
1466
- Visitor: Ua
1467
- }), Va = {
1464
+ }, ul = Object.assign(Ba, {
1465
+ Creator: Ua,
1466
+ Visitor: Va
1467
+ }), Ga = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ga = {
1470
+ }, Ha = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ha = {
1473
+ }, Ya = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1476
+ }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
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 _s = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = qa[Ya(e)][a];
1498
+ const o = t != null && t !== "", d = Wa[qa(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const _s = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Va[e],
1514
1513
  Ga[e],
1514
+ Ha[e],
1515
1515
  n && "border",
1516
- n && Ha[e],
1516
+ n && Ya[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const _s = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
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 }] : [], Ka = ({ 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 }] : [], Ja = ({ 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
  {
@@ -1577,7 +1577,7 @@ const _s = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), ft = ({
1580
+ ] }), gt = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,7 +1588,7 @@ const _s = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
1594
  const g = o ?? (h.length > 1 ? "none" : "metadata");
@@ -1599,30 +1599,30 @@ const _s = ({
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((b, c) => /* @__PURE__ */ s(
1603
- Ka,
1602
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
+ Ja,
1604
1604
  {
1605
- item: b,
1605
+ item: c,
1606
1606
  preload: g,
1607
1607
  trailingAction: (
1608
1608
  // Composer only supports a single attachment, so the
1609
1609
  // dismiss control sits on the only player.
1610
- p && c === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1610
+ p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1611
1611
  )
1612
1612
  },
1613
- `${b.src}-${c}`
1613
+ `${c.src}-${v}`
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
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
1617
+ }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1618
+ Composer: Za,
1619
+ Sent: Qa,
1620
+ Received: er
1621
1621
  };
1622
- function tr(e) {
1622
+ function sr(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 sr = {
1625
+ const nr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const sr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function nr(e, t) {
1635
+ function ar(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 nr(e, t) {
1641
1641
  }
1642
1642
  }
1643
1643
  if (!e) return;
1644
- if (oe(e) === "document") {
1645
- const r = ps(e), i = sr[r];
1644
+ if (le(e) === "document") {
1645
+ const r = ps(e), i = nr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function nr(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function ar(e, t, n) {
1654
- const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1653
+ function rr(e, t, n) {
1654
+ const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,13 +1662,13 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const rr = {
1665
+ const ir = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, ir = {
1668
+ }, lr = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, lr = {
1671
+ }, or = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
1674
  }, ys = ({
@@ -1681,16 +1681,16 @@ const rr = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = rr(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
- ir[e]
1689
+ lr[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", lr[e]),
1693
+ className: k("size-6", or[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,7 +1701,7 @@ const rr = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- rr[e]
1704
+ ir[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
@@ -1721,7 +1721,7 @@ const rr = {
1721
1721
  h
1722
1722
  ]
1723
1723
  }
1724
- ) : /* @__PURE__ */ m(te, { children: [
1724
+ ) : /* @__PURE__ */ m(ee, { children: [
1725
1725
  p,
1726
1726
  h
1727
1727
  ] });
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const or = ({
1747
+ const cr = ({
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 }] : [], cr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1772,7 +1772,7 @@ const or = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, gt = ({
1775
+ }, pt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,21 +1785,21 @@ const or = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, b = or({
1788
+ const h = Me(e), g = e === "composer" && !!p, c = cr({
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
- }), c = (v) => {
1796
- if ((u == null ? void 0 : u(v)) === !1) return;
1797
- const f = b[v];
1795
+ }), v = (b) => {
1796
+ if ((u == null ? void 0 : u(b)) === !1) return;
1797
+ const f = c[b];
1798
1798
  if (!f) return;
1799
1799
  const x = f.filename ?? re(f.src);
1800
1800
  ks(f.src, x);
1801
1801
  };
1802
- if (b.length === 0)
1802
+ if (c.length === 0)
1803
1803
  return null;
1804
1804
  const w = /* @__PURE__ */ s(
1805
1805
  "span",
@@ -1809,7 +1809,7 @@ const or = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1819,29 +1819,29 @@ const or = ({
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: b.map((v, f) => /* @__PURE__ */ s(
1823
- cr,
1822
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
+ dr,
1824
1824
  {
1825
1825
  variant: h,
1826
- item: v,
1826
+ item: b,
1827
1827
  index: f,
1828
- onActivate: c,
1828
+ onActivate: v,
1829
1829
  trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1830
1830
  },
1831
- `${v.src}-${f}`
1831
+ `${b.src}-${f}`
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
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
- }, pt = ({
1835
+ }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1836
+ Composer: ur,
1837
+ Sent: mr,
1838
+ Received: hr
1839
+ }, bt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
1843
1843
  nextLabel: a = "Next"
1844
- }) => /* @__PURE__ */ m(te, { children: [
1844
+ }) => /* @__PURE__ */ m(ee, { children: [
1845
1845
  /* @__PURE__ */ s(
1846
1846
  "button",
1847
1847
  {
@@ -1849,7 +1849,7 @@ const or = ({
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(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1872,8 +1872,8 @@ const or = ({
1872
1872
  onTriggered: l
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
- (b) => {
1876
- b.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1875
+ (c) => {
1876
+ c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
@@ -1898,14 +1898,14 @@ const or = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- ke,
1901
+ Ce,
1902
1902
  {
1903
1903
  className: "size-4 animate-spin",
1904
1904
  weight: "bold",
1905
1905
  "aria-hidden": !0
1906
1906
  }
1907
1907
  ) : /* @__PURE__ */ s(
1908
- Ce,
1908
+ Se,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const or = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const or = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- ke,
1939
+ Ce,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
1949
1949
  );
1950
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const or = ({
1972
1972
  };
1973
1973
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1974
1974
  }, [n, e, l, o]), { index: r, prev: l, next: o };
1975
- }, vt = ({
1975
+ }, xt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -1981,7 +1981,7 @@ const or = ({
1981
1981
  children: i,
1982
1982
  "data-testid": l
1983
1983
  }) => {
1984
- const o = H(null), d = H(null);
1984
+ const o = G(null), d = G(null);
1985
1985
  return K(() => {
1986
1986
  var g;
1987
1987
  const h = o.current;
@@ -1996,7 +1996,7 @@ const or = ({
1996
1996
  }
1997
1997
  else
1998
1998
  h.setAttribute("open", "");
1999
- const b = typeof document < "u" ? document.activeElement : null;
1999
+ const c = typeof document < "u" ? document.activeElement : null;
2000
2000
  return (g = d.current) == null || g.focus(), () => {
2001
2001
  if (h.open)
2002
2002
  if (typeof h.close == "function")
@@ -2007,7 +2007,7 @@ const or = ({
2007
2007
  }
2008
2008
  else
2009
2009
  h.removeAttribute("open");
2010
- b && document.body.contains(b) && b.focus();
2010
+ c && document.body.contains(c) && c.focus();
2011
2011
  };
2012
2012
  }
2013
2013
  if (h.open)
@@ -2062,13 +2062,13 @@ const or = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Es = ({
2065
+ }, Ss = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
2069
2069
  onClose: a
2070
2070
  }) => {
2071
- const { index: r, prev: i, next: l } = bt({
2071
+ const { index: r, prev: i, next: l } = vt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
@@ -2077,7 +2077,7 @@ const or = ({
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- vt,
2080
+ xt,
2081
2081
  {
2082
2082
  open: e,
2083
2083
  onClose: a,
@@ -2107,7 +2107,7 @@ const or = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- pt,
2110
+ bt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const or = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
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 = ({
2121
+ }, gr = "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 = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const or = ({
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(fr, "h-full w-full");
2130
+ const h = k(gr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const or = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, gr = (e, t, n, a) => ({
2199
+ }, pr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,7 +2211,7 @@ const or = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), pr = ({
2214
+ }), br = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
@@ -2219,7 +2219,7 @@ const or = ({
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
- })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), vr = ({ 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,7 +2246,7 @@ const or = ({
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
- Es,
2249
+ Ss,
2250
2250
  {
2251
2251
  open: l,
2252
2252
  items: Is([{ src: e, alt: t }], n),
@@ -2266,13 +2266,13 @@ const or = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: b, closeViewer: c } = Re(
2269
+ const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (v, f) => gr(v, f, u.length, o)
2275
+ (b, f) => pr(b, f, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,30 +2282,30 @@ const or = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: b }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Es,
2287
+ Ss,
2288
2288
  {
2289
2289
  open: h,
2290
2290
  items: Is(u, a),
2291
2291
  initialIndex: g,
2292
- onClose: c
2292
+ onClose: v
2293
2293
  }
2294
2294
  )
2295
2295
  ]
2296
2296
  }
2297
2297
  );
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 = ({
2298
+ }, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
2299
+ Composer: xr,
2300
+ Sent: wr,
2301
+ Received: _r
2302
+ }, yr = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
2306
2306
  onClose: a
2307
2307
  }) => {
2308
- const { index: r, prev: i, next: l } = bt({
2308
+ const { index: r, prev: i, next: l } = vt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
@@ -2313,11 +2313,11 @@ const or = ({
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
2315
  ), u = ae(
2316
- () => o ? yr(o.src) : void 0,
2316
+ () => o ? kr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- vt,
2320
+ xt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const or = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- pt,
2339
+ bt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const or = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, yr = (e) => {
2350
+ }, kr = (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
- }, kr = ({
2353
+ }, Cr = ({
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 }] : [], Cr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2377,7 +2377,7 @@ const or = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, xt = ({
2380
+ }, wt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,9 +2389,9 @@ const or = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = kr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2392
+ const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2393
2393
  d
2394
- ), v = e === "composer" && !!u;
2394
+ ), b = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
2396
2396
  return null;
2397
2397
  const f = h.map((x) => ({
@@ -2406,52 +2406,52 @@ const or = ({
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, _) => {
2410
- const A = x.filename ?? re(x.src), S = v && _ === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2409
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
+ const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
2411
  Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
- filename: A,
2414
+ filename: S,
2415
2415
  variant: "inline",
2416
- label: `Download ${A}`,
2416
+ label: `Download ${S}`,
2417
2417
  tone: p
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Cr,
2421
+ Sr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
2425
- index: _,
2426
- onActivate: c,
2427
- trailingAction: S
2425
+ index: N,
2426
+ onActivate: v,
2427
+ trailingAction: T
2428
2428
  },
2429
- `${x.src}-${_}`
2429
+ `${x.src}-${N}`
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- Nr,
2433
+ yr,
2434
2434
  {
2435
2435
  open: g,
2436
2436
  items: f,
2437
- initialIndex: b,
2437
+ initialIndex: c,
2438
2438
  onClose: w
2439
2439
  }
2440
2440
  )
2441
2441
  ]
2442
2442
  }
2443
2443
  );
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 = {
2444
+ }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2445
2445
  Composer: Er,
2446
- Sent: Sr,
2447
- Received: Ir
2446
+ Sent: Ir,
2447
+ Received: Tr
2448
2448
  }, As = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
2452
2452
  onClose: a
2453
2453
  }) => {
2454
- const { index: r, prev: i, next: l } = bt({
2454
+ const { index: r, prev: i, next: l } = vt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
@@ -2460,7 +2460,7 @@ const or = ({
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- vt,
2463
+ xt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const or = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- pt,
2487
+ bt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const or = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
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 = ({
2498
+ }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { 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: [
@@ -2517,11 +2517,11 @@ const or = ({
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Ar, {})
2521
- ] }), Mr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Mr, {})
2521
+ ] }), Rr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
2523
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
- }), Rr = ({
2524
+ }), Lr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
@@ -2533,7 +2533,7 @@ const or = ({
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
- })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2536
+ })), Dr = ({ 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
  );
@@ -2574,13 +2574,13 @@ const or = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Rr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: b, handleActivate: c, closeViewer: w } = Re(
2577
+ const p = Lr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
- const v = p.map(
2583
- (f, x) => Mr(f, x, p.length)
2582
+ const b = p.map(
2583
+ (f, x) => Rr(f, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,10 +2591,10 @@ const or = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Ss,
2594
+ Es,
2595
2595
  {
2596
- tiles: v,
2597
- onTileActivate: c,
2596
+ tiles: b,
2597
+ onTileActivate: v,
2598
2598
  className: "overflow-hidden rounded-md"
2599
2599
  }
2600
2600
  ) }),
@@ -2603,32 +2603,32 @@ const or = ({
2603
2603
  {
2604
2604
  open: g,
2605
2605
  items: Rs(p, r),
2606
- initialIndex: b,
2606
+ initialIndex: c,
2607
2607
  onClose: w
2608
2608
  }
2609
2609
  )
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2614
- Composer: Dr,
2615
- Sent: zr,
2616
- Received: Pr
2617
- }, Ne = {
2618
- Image: _r,
2613
+ }, zr = (e) => /* @__PURE__ */ s(Dr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2614
+ Composer: zr,
2615
+ Sent: Pr,
2616
+ Received: Fr
2617
+ }, ye = {
2618
+ Image: Nr,
2619
2619
  Video: Or,
2620
- Audio: er,
2621
- Pdf: Tr,
2622
- File: hr
2623
- }, Fr = {
2624
- isUnlocking: () => !1
2620
+ Audio: tr,
2621
+ Pdf: Ar,
2622
+ File: fr
2625
2623
  }, $r = {
2626
- LockedAttachment: Fr
2627
- }, Ds = at({}), dl = Ds.Provider;
2628
- function jr(e) {
2629
- return Se(Ds)[e] ?? $r[e];
2624
+ isUnlocking: () => !1
2625
+ }, jr = {
2626
+ LockedAttachment: $r
2627
+ }, Ds = rt({}), ml = Ds.Provider;
2628
+ function Br(e) {
2629
+ return Ie(Ds)[e] ?? jr[e];
2630
2630
  }
2631
- const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2632
2632
  "svg",
2633
2633
  {
2634
2634
  width: e,
@@ -2645,19 +2645,19 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2645
  }
2646
2646
  )
2647
2647
  }
2648
- ), Ur = (e) => {
2648
+ ), Vr = (e) => {
2649
2649
  var t;
2650
2650
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2651
- }, Vr = (e) => {
2651
+ }, Gr = (e) => {
2652
2652
  var t;
2653
2653
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2654
- }, Oe = (e) => {
2654
+ }, Fe = (e) => {
2655
2655
  var t;
2656
2656
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2657
- }, Gr = (e) => {
2657
+ }, Hr = (e) => {
2658
2658
  var t;
2659
2659
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2660
- }, zs = (e) => Ur(e) || Vr(e), Hr = (e) => {
2660
+ }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2661
2661
  var t;
2662
2662
  return zs(e) && !((t = e.text) != null && t.trim());
2663
2663
  }, Ke = ({
@@ -2667,31 +2667,31 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2667
2667
  hasAttachment: a = !1
2668
2668
  }) => {
2669
2669
  var h;
2670
- const r = zs(e), i = Oe(e);
2670
+ const r = zs(e), i = Fe(e);
2671
2671
  if (!r && !i)
2672
2672
  return null;
2673
2673
  if (r) {
2674
2674
  const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2675
2675
  if (!g) return null;
2676
- const b = t ? "message-tip-standalone" : "message-tag message-tag--tip", c = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
- return /* @__PURE__ */ m("div", { className: b, children: [
2678
- /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2679
- /* @__PURE__ */ s("span", { children: c })
2676
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
+ return /* @__PURE__ */ m("div", { className: c, children: [
2678
+ /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2679
+ /* @__PURE__ */ s("span", { children: v })
2680
2680
  ] });
2681
2681
  }
2682
2682
  const l = n && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
2683
2683
  "message-chatbot-indicator",
2684
2684
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2685
2685
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2686
- ].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 }) });
2687
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
2686
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2687
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2688
2688
  u,
2689
2689
  p
2690
- ] }) : /* @__PURE__ */ m(te, { children: [
2690
+ ] }) : /* @__PURE__ */ m(ee, { children: [
2691
2691
  p,
2692
2692
  u
2693
2693
  ] }) });
2694
- }, Yr = ({
2694
+ }, qr = ({
2695
2695
  selected: e,
2696
2696
  onVoteUp: t,
2697
2697
  onVoteDown: n
@@ -2707,7 +2707,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2707
2707
  "aria-label": "Good response",
2708
2708
  "aria-pressed": e === "up",
2709
2709
  "data-tooltip": "Good response",
2710
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2710
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2711
2711
  }
2712
2712
  ),
2713
2713
  /* @__PURE__ */ s(
@@ -2721,43 +2721,45 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2721
2721
  "aria-label": "Bad response",
2722
2722
  "aria-pressed": e === "down",
2723
2723
  "data-tooltip": "Bad response",
2724
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2724
+ children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2725
2725
  }
2726
2726
  )
2727
- ] }), qr = ({
2728
- message: e,
2729
- isMyMessage: t,
2730
- lastOwnMessageId: n
2731
- }) => !(t && e.type !== "error" && n === e.id) || e.status !== "received" ? null : /* @__PURE__ */ m(
2732
- "div",
2727
+ ] }), Je = () => {
2728
+ const { lastOwnMessage: e, message: t } = _e(
2729
+ "SentMessageDeliveryStatus"
2730
+ );
2731
+ return (e == null ? void 0 : e.id) !== t.id ? null : /* @__PURE__ */ m(ee, { children: [
2732
+ /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2733
+ /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2734
+ ] });
2735
+ }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2736
+ Xs,
2733
2737
  {
2734
- className: "str-chat__message-delivery-status",
2735
- "data-testid": "sent-message-delivery-status",
2736
- children: [
2737
- /* @__PURE__ */ s(Xn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2738
- /* @__PURE__ */ s("span", { children: "Delivered" })
2739
- ]
2738
+ MessageSentStatus: Je,
2739
+ MessageDeliveredStatus: Je,
2740
+ MessageReadStatus: Je,
2741
+ MessageSendingStatus: Wr
2740
2742
  }
2741
- ), Wr = /^([a-z][a-z0-9+.-]*):/i, Xr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2742
- function wt(e) {
2743
+ ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2744
+ function _t(e) {
2743
2745
  if (typeof e != "string") return;
2744
2746
  const t = e.trim();
2745
2747
  if (t === "") return;
2746
- const n = Wr.exec(t);
2748
+ const n = Kr.exec(t);
2747
2749
  if (n) {
2748
2750
  const a = n[1].toLowerCase();
2749
- return Xr.has(a) ? t : void 0;
2751
+ return Jr.has(a) ? t : void 0;
2750
2752
  }
2751
2753
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2752
2754
  }
2753
- const Kr = {
2755
+ const Zr = {
2754
2756
  dark: "bg-white text-[#121110] hover:bg-white/90",
2755
2757
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2756
- }, Jr = ({ variant: e, cta: t }) => {
2758
+ }, Qr = ({ variant: e, cta: t }) => {
2757
2759
  const n = k(
2758
2760
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2759
- Kr[e]
2760
- ), a = wt(t.href);
2761
+ Zr[e]
2762
+ ), a = _t(t.href);
2761
2763
  return a ? /* @__PURE__ */ s(
2762
2764
  "a",
2763
2765
  {
@@ -2783,13 +2785,13 @@ const Kr = {
2783
2785
  children: t.label
2784
2786
  }
2785
2787
  );
2786
- }, Zr = {
2788
+ }, ei = {
2787
2789
  dark: "text-white",
2788
2790
  light: "text-black/90"
2789
- }, Qr = "text-white/30", ei = {
2791
+ }, ti = "text-white/30", si = {
2790
2792
  dark: "text-white/55",
2791
2793
  light: "text-black/55"
2792
- }, _t = ({
2794
+ }, Nt = ({
2793
2795
  variant: e,
2794
2796
  title: t,
2795
2797
  placeholderTitle: n,
@@ -2799,14 +2801,14 @@ const Kr = {
2799
2801
  cta: l,
2800
2802
  trailingAction: o
2801
2803
  }) => {
2802
- const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", b = g !== "", c = l != null;
2803
- if (!p && !h && !b && !c) return null;
2804
- const v = k(
2804
+ 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;
2805
+ if (!p && !h && !c && !v) return null;
2806
+ const b = k(
2805
2807
  "truncate text-base font-medium leading-6",
2806
- d && !t ? Qr : Zr[e]
2808
+ d && !t ? ti : ei[e]
2807
2809
  ), f = k(
2808
2810
  "truncate text-xs leading-4",
2809
- ei[e]
2811
+ si[e]
2810
2812
  );
2811
2813
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2812
2814
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -2814,24 +2816,24 @@ const Kr = {
2814
2816
  /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2815
2817
  p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2816
2818
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2817
- /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: u })
2819
+ /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2818
2820
  ] }),
2819
2821
  h && /* @__PURE__ */ s("p", { className: f, children: a })
2820
2822
  ] }),
2821
- !c && b && /* @__PURE__ */ s("p", { className: f, children: g })
2823
+ !v && c && /* @__PURE__ */ s("p", { className: f, children: g })
2822
2824
  ] }),
2823
2825
  o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
2824
2826
  ] }),
2825
- l && /* @__PURE__ */ s(Jr, { variant: e, cta: l })
2827
+ l && /* @__PURE__ */ s(Qr, { variant: e, cta: l })
2826
2828
  ] });
2827
- }, ti = k(
2829
+ }, ni = k(
2828
2830
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2829
2831
  // 1px hairline border that sits flush with the card chrome — matches
2830
2832
  // the messaging design system's "small border around link attachments"
2831
2833
  // treatment from the mobile spec. The drop shadow remains for depth.
2832
2834
  "border border-black/[0.08]",
2833
2835
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2834
- ), Fe = ({
2836
+ ), Oe = ({
2835
2837
  variant: e,
2836
2838
  children: t,
2837
2839
  href: n,
@@ -2843,7 +2845,7 @@ const Kr = {
2843
2845
  "data-testid": d
2844
2846
  }) => {
2845
2847
  const u = n != null || a != null, p = k(
2846
- ti,
2848
+ ni,
2847
2849
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2848
2850
  // `focus-ring` is a design-system utility from the component-library
2849
2851
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2891,17 +2893,17 @@ const Kr = {
2891
2893
  ]
2892
2894
  }
2893
2895
  );
2894
- }, si = {
2896
+ }, ai = {
2895
2897
  dark: "bg-white/10",
2896
2898
  light: "bg-black/5"
2897
- }, ni = {
2899
+ }, ri = {
2898
2900
  dark: "size-16 text-white/25",
2899
2901
  light: "size-16 text-black/25"
2900
- }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", Nt = (e, t) => {
2902
+ }, Ve = (e, t) => !!t && !!e && le(e) === "audio", yt = (e, t) => {
2901
2903
  if (!t || !e) return !1;
2902
- const n = oe(e);
2904
+ const n = le(e);
2903
2905
  return n === "video" || n === "audio";
2904
- }, yt = "bg-[#F2F3F4]", $e = ({
2906
+ }, kt = "bg-[#F2F3F4]", $e = ({
2905
2907
  variant: e,
2906
2908
  thumbnailUrl: t,
2907
2909
  sourceUrl: n,
@@ -2910,7 +2912,7 @@ const Kr = {
2910
2912
  topLeft: i,
2911
2913
  topRight: l
2912
2914
  }) => {
2913
- const o = oe(r), d = !!n && o === "video";
2915
+ const o = le(r), d = !!n && o === "video";
2914
2916
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2915
2917
  "audio",
2916
2918
  {
@@ -2952,10 +2954,10 @@ const Kr = {
2952
2954
  {
2953
2955
  className: k(
2954
2956
  "flex h-full w-full items-center justify-center",
2955
- si[e]
2957
+ ai[e]
2956
2958
  ),
2957
2959
  children: we(r, {
2958
- className: ni[e],
2960
+ className: ri[e],
2959
2961
  weight: "regular"
2960
2962
  })
2961
2963
  }
@@ -2965,7 +2967,7 @@ const Kr = {
2965
2967
  ]
2966
2968
  }
2967
2969
  );
2968
- }, ai = ({
2970
+ }, ii = ({
2969
2971
  title: e,
2970
2972
  placeholderTitle: t,
2971
2973
  description: n,
@@ -2979,7 +2981,7 @@ const Kr = {
2979
2981
  onDismiss: p,
2980
2982
  onEditClick: h
2981
2983
  }) => {
2982
- const g = o === "classic", b = Ve(r, l), c = p ? /* @__PURE__ */ s(
2984
+ const g = o === "classic", c = Ve(r, l), v = p ? /* @__PURE__ */ s(
2983
2985
  "button",
2984
2986
  {
2985
2987
  type: "button",
@@ -2995,10 +2997,10 @@ const Kr = {
2995
2997
  onClick: h,
2996
2998
  "aria-label": "Edit attachment",
2997
2999
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2998
- children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3000
+ children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2999
3001
  }
3000
3002
  ) : void 0;
3001
- return b ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3003
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3002
3004
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3003
3005
  $e,
3004
3006
  {
@@ -3008,12 +3010,12 @@ const Kr = {
3008
3010
  mimeType: r
3009
3011
  }
3010
3012
  ) }),
3011
- c && /* @__PURE__ */ s("div", { className: "shrink-0", children: c })
3013
+ v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3012
3014
  ] }) }) : /* @__PURE__ */ m(
3013
- Fe,
3015
+ Oe,
3014
3016
  {
3015
3017
  variant: "dark",
3016
- topRight: g ? c : void 0,
3018
+ topRight: g ? v : void 0,
3017
3019
  children: [
3018
3020
  !g && /* @__PURE__ */ s(
3019
3021
  $e,
@@ -3023,11 +3025,11 @@ const Kr = {
3023
3025
  sourceUrl: l,
3024
3026
  title: e,
3025
3027
  mimeType: r,
3026
- topRight: c
3028
+ topRight: v
3027
3029
  }
3028
3030
  ),
3029
3031
  /* @__PURE__ */ s(
3030
- _t,
3032
+ Nt,
3031
3033
  {
3032
3034
  variant: "dark",
3033
3035
  title: e,
@@ -3042,7 +3044,7 @@ const Kr = {
3042
3044
  ]
3043
3045
  }
3044
3046
  );
3045
- }, ri = ({
3047
+ }, li = ({
3046
3048
  title: e,
3047
3049
  description: t,
3048
3050
  url: n,
@@ -3054,21 +3056,21 @@ const Kr = {
3054
3056
  cta: d,
3055
3057
  onClick: u
3056
3058
  }) => {
3057
- const p = Nt(a, i), h = wt(n), g = 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 ? {
3059
+ const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3058
3060
  ...d,
3059
3061
  onClick: () => {
3060
- var v;
3061
- u(), (v = d.onClick) == null || v.call(d);
3062
+ var b;
3063
+ u(), (b = d.onClick) == null || b.call(d);
3062
3064
  }
3063
3065
  } : d;
3064
3066
  return /* @__PURE__ */ m(
3065
- Fe,
3067
+ Oe,
3066
3068
  {
3067
3069
  variant: "light",
3068
3070
  href: g,
3069
- onClick: b,
3071
+ onClick: c,
3070
3072
  ariaLabel: e ?? "Open attachment preview",
3071
- bgClassName: c,
3073
+ bgClassName: v,
3072
3074
  "data-testid": "link-attachment",
3073
3075
  children: [
3074
3076
  l === "featured" && /* @__PURE__ */ s(
@@ -3082,7 +3084,7 @@ const Kr = {
3082
3084
  }
3083
3085
  ),
3084
3086
  /* @__PURE__ */ s(
3085
- _t,
3087
+ Nt,
3086
3088
  {
3087
3089
  variant: "light",
3088
3090
  title: e,
@@ -3095,7 +3097,7 @@ const Kr = {
3095
3097
  ]
3096
3098
  }
3097
3099
  );
3098
- }, ii = ({
3100
+ }, oi = ({
3099
3101
  title: e,
3100
3102
  placeholderTitle: t,
3101
3103
  description: n,
@@ -3108,14 +3110,14 @@ const Kr = {
3108
3110
  cta: u,
3109
3111
  onClick: p
3110
3112
  }) => {
3111
- const h = Nt(r, l), g = wt(a), b = u == null && g != null && !h ? g : void 0, c = u == null && !h && b != null ? p : void 0;
3113
+ const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3112
3114
  return /* @__PURE__ */ m(
3113
- Fe,
3115
+ Oe,
3114
3116
  {
3115
3117
  variant: "dark",
3116
- href: b,
3117
- onClick: c,
3118
- bgClassName: Ve(r, l) ? yt : void 0,
3118
+ href: c,
3119
+ onClick: v,
3120
+ bgClassName: Ve(r, l) ? kt : void 0,
3119
3121
  children: [
3120
3122
  o === "featured" && /* @__PURE__ */ s(
3121
3123
  $e,
@@ -3128,7 +3130,7 @@ const Kr = {
3128
3130
  }
3129
3131
  ),
3130
3132
  /* @__PURE__ */ s(
3131
- _t,
3133
+ Nt,
3132
3134
  {
3133
3135
  variant: "dark",
3134
3136
  title: e,
@@ -3143,10 +3145,10 @@ const Kr = {
3143
3145
  }
3144
3146
  );
3145
3147
  }, es = {
3146
- Composer: ai,
3147
- Sent: ii,
3148
- Received: ri
3149
- }, li = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", oi = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3148
+ Composer: ii,
3149
+ Sent: oi,
3150
+ Received: li
3151
+ }, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3150
3152
  function P(e) {
3151
3153
  const t = e == null ? void 0 : e.trim();
3152
3154
  return t || void 0;
@@ -3154,7 +3156,7 @@ function P(e) {
3154
3156
  function ts(e) {
3155
3157
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3156
3158
  }
3157
- function ci(e, t) {
3159
+ function ui(e, t) {
3158
3160
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3159
3161
  return !1;
3160
3162
  const n = ts(e), a = ts(t);
@@ -3175,11 +3177,11 @@ function ss(e) {
3175
3177
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3176
3178
  // native video/audio player in the hero instead of a static thumbnail.
3177
3179
  sourceUrl: a,
3178
- layout: n || Nt(r, a) ? "featured" : "classic",
3180
+ layout: n || yt(r, a) ? "featured" : "classic",
3179
3181
  mimeType: r
3180
3182
  };
3181
3183
  }
3182
- function di(e) {
3184
+ function mi(e) {
3183
3185
  var t;
3184
3186
  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;
3185
3187
  }
@@ -3187,7 +3189,7 @@ function Ps(e) {
3187
3189
  const t = P(e.og_scrape_url);
3188
3190
  return e.type === "link" || !!t && !e.asset_url;
3189
3191
  }
3190
- function Os(e) {
3192
+ function Fs(e) {
3191
3193
  if (!(e != null && e.length)) return [];
3192
3194
  const t = [], n = (r, i) => {
3193
3195
  const l = t[t.length - 1];
@@ -3209,41 +3211,41 @@ function Os(e) {
3209
3211
  a(r);
3210
3212
  continue;
3211
3213
  }
3212
- const i = di(r);
3214
+ const i = mi(r);
3213
3215
  i && n(i, r);
3214
3216
  }
3215
3217
  return t;
3216
3218
  }
3217
- function ui(e) {
3219
+ function hi(e) {
3218
3220
  let t = 0;
3219
3221
  for (const n of e)
3220
3222
  t += n.type === "link" ? n.attachments.length : 1;
3221
3223
  return t;
3222
3224
  }
3223
- function mi(e) {
3225
+ function fi(e) {
3224
3226
  return e.filter((t) => t.type === "media").length;
3225
3227
  }
3226
- function hi(e, t, n) {
3228
+ function gi(e, t, n) {
3227
3229
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3228
3230
  }
3229
3231
  function ns(e) {
3230
3232
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3231
3233
  }
3232
- function fi(e) {
3234
+ function pi(e) {
3233
3235
  switch (e) {
3234
3236
  case "image":
3235
- return Ne.Image;
3237
+ return ye.Image;
3236
3238
  case "video":
3237
- return Ne.Video;
3239
+ return ye.Video;
3238
3240
  case "audio":
3239
- return Ne.Audio;
3241
+ return ye.Audio;
3240
3242
  case "pdf":
3241
- return Ne.Pdf;
3243
+ return ye.Pdf;
3242
3244
  default:
3243
- return Ne.File;
3245
+ return ye.File;
3244
3246
  }
3245
3247
  }
3246
- function gi(e, t) {
3248
+ function bi(e, t) {
3247
3249
  if (t.length > 1)
3248
3250
  switch (e) {
3249
3251
  case "image":
@@ -3330,69 +3332,69 @@ function gi(e, t) {
3330
3332
  };
3331
3333
  }
3332
3334
  }
3333
- function pi({
3335
+ function vi({
3334
3336
  groupPosition: e,
3335
3337
  isMyMessage: t,
3336
3338
  segment: n,
3337
3339
  text: a
3338
3340
  }) {
3339
- const r = fi(n.kind), i = {
3340
- ...gi(n.kind, n.attachments),
3341
+ const r = pi(n.kind), i = {
3342
+ ...bi(n.kind, n.attachments),
3341
3343
  groupPosition: e,
3342
3344
  ...a ? { text: a } : {}
3343
3345
  };
3344
3346
  return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3345
3347
  }
3346
- const bi = ({
3348
+ const xi = ({
3347
3349
  groupPosition: e,
3348
3350
  isMyMessage: t,
3349
3351
  message: n
3350
3352
  }) => {
3351
3353
  var w;
3352
- const a = Os(n.attachments);
3354
+ const a = Fs(n.attachments);
3353
3355
  if (a.length === 0) return null;
3354
- const r = ui(a), i = mi(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 && ci(l, d) ? void 0 : l;
3356
+ const r = hi(a), i = fi(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" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3355
3357
  let p = 0, h = 0;
3356
- const g = [], b = (v, f) => {
3358
+ const g = [], c = (b, f) => {
3357
3359
  const x = p === r - 1;
3358
3360
  p += 1;
3359
- const _ = t ? es.Sent : es.Received;
3361
+ const N = t ? es.Sent : es.Received;
3360
3362
  g.push(
3361
3363
  /* @__PURE__ */ m(U.Fragment, { children: [
3362
- /* @__PURE__ */ s(_, { ...ss(v) }),
3363
- x && u ? /* @__PURE__ */ s("div", { className: t ? li : oi, children: u }) : null
3364
+ /* @__PURE__ */ s(N, { ...ss(b) }),
3365
+ x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3364
3366
  ] }, f)
3365
3367
  );
3366
- }, c = (v, f) => {
3367
- const x = p === r - 1, _ = hi(
3368
+ }, v = (b, f) => {
3369
+ const x = p === r - 1, N = gi(
3368
3370
  h,
3369
3371
  i,
3370
3372
  e
3371
3373
  );
3372
3374
  p += 1, h += 1, g.push(
3373
3375
  /* @__PURE__ */ s(
3374
- pi,
3376
+ vi,
3375
3377
  {
3376
- groupPosition: _,
3378
+ groupPosition: N,
3377
3379
  isMyMessage: t,
3378
- segment: v,
3380
+ segment: b,
3379
3381
  text: x ? u : void 0
3380
3382
  },
3381
3383
  f
3382
3384
  )
3383
3385
  );
3384
3386
  };
3385
- return a.forEach((v, f) => {
3386
- if (v.type === "link") {
3387
- v.attachments.forEach((x, _) => {
3388
- b(x, `link-${f}-${_}`);
3387
+ return a.forEach((b, f) => {
3388
+ if (b.type === "link") {
3389
+ b.attachments.forEach((x, N) => {
3390
+ c(x, `link-${f}-${N}`);
3389
3391
  });
3390
3392
  return;
3391
3393
  }
3392
- c(v, `media-${f}`);
3393
- }), /* @__PURE__ */ s(te, { children: g });
3394
- }, vi = (e) => {
3395
- var At, Mt, Rt, Lt, Dt, zt, Pt, Ot, Ft, $t, jt, Bt, Ut, Vt;
3394
+ v(b, `media-${f}`);
3395
+ }), /* @__PURE__ */ s(ee, { children: g });
3396
+ }, wi = (e) => {
3397
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3396
3398
  const {
3397
3399
  additionalMessageInputProps: t,
3398
3400
  chatbotVotingEnabled: n,
@@ -3406,86 +3408,85 @@ const bi = ({
3406
3408
  highlighted: p,
3407
3409
  isMessageAIGenerated: h,
3408
3410
  isMyMessage: g,
3409
- lastOwnMessage: b,
3410
3411
  message: c,
3411
- renderText: w,
3412
- threadList: v,
3413
- viewerLanguage: f
3414
- } = e, { client: x } = he("CustomMessage"), { channel: _ } = me("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), {
3415
- Attachment: C = Js,
3416
- EditMessageModal: T = Zs,
3417
- MessageActions: O,
3418
- MessageBlocked: F = Qs,
3419
- MessageBouncePrompt: V = en,
3420
- MessageDeleted: Z = tn,
3421
- MessageIsThreadReplyInChannelButtonIndicator: ee = sn,
3422
- MessageRepliesCountButton: X = nn,
3423
- ReminderNotification: N = an,
3424
- StreamedMessageText: R = rn,
3425
- PinIndicator: G
3426
- } = is("CustomMessage"), Y = ln(c), q = on(c), W = ae(
3412
+ renderText: v,
3413
+ threadList: w,
3414
+ viewerLanguage: b
3415
+ } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [D, L] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
3416
+ Attachment: E = Zs,
3417
+ EditMessageModal: C = Qs,
3418
+ MessageActions: I,
3419
+ MessageBlocked: $ = en,
3420
+ MessageBouncePrompt: F = tn,
3421
+ MessageDeleted: V = sn,
3422
+ MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3423
+ MessageRepliesCountButton: te = an,
3424
+ ReminderNotification: X = rn,
3425
+ StreamedMessageText: _ = ln,
3426
+ PinIndicator: R
3427
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = ae(
3427
3428
  () => h == null ? void 0 : h(c),
3428
3429
  [h, c]
3429
3430
  ), j = ae(() => {
3430
- const ue = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...ue] : ue;
3431
- if (!Oe(c)) return pe;
3431
+ const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3432
+ if (!Fe(c)) return pe;
3432
3433
  const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3433
3434
  return Gt.length === pe.length ? pe : Gt;
3434
- }, [c]), Q = ae(
3435
- () => Os(j),
3435
+ }, [c]), W = ae(
3436
+ () => Fs(j),
3436
3437
  [j]
3437
- ), se = ae(() => {
3438
- const ue = hs({ message: c, viewerLanguage: f });
3439
- return ue === c.text ? c : { ...c, text: ue };
3440
- }, [c, f]), Le = Q.length > 0, De = Q.reduce(
3441
- (ue, pe) => ue + pe.attachments.length,
3438
+ ), Z = ae(() => {
3439
+ const de = hs({ message: c, viewerLanguage: b });
3440
+ return de === c.text ? c : { ...c, text: de };
3441
+ }, [c, b]), oe = W.length > 0, Le = W.reduce(
3442
+ (de, pe) => de + pe.attachments.length,
3442
3443
  0
3443
- ) === ((j == null ? void 0 : j.length) ?? 0), ie = Wa(
3444
+ ) === ((j == null ? void 0 : j.length) ?? 0), De = Xa(
3444
3445
  {
3445
3446
  endOfGroup: r,
3446
3447
  firstOfGroup: i,
3447
3448
  groupedByUser: l
3448
3449
  }
3449
3450
  );
3450
- if (cn(c))
3451
+ if (dn(c))
3451
3452
  return null;
3452
3453
  if (c.deleted_at || c.type === "deleted")
3453
- return /* @__PURE__ */ s(Z, { message: c });
3454
- if (dn(c))
3455
- return /* @__PURE__ */ s(F, {});
3456
- 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);
3457
- let fe;
3458
- Ct ? fe = () => u(c) : Et && (fe = () => $(!0));
3459
- const de = g(), Us = k(
3454
+ return /* @__PURE__ */ s(V, { message: c });
3455
+ if (un(c))
3456
+ return /* @__PURE__ */ s($, {});
3457
+ const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3458
+ let he;
3459
+ ie ? he = () => u(c) : St && (he = () => L(!0));
3460
+ const fe = g(), Us = k(
3460
3461
  "str-chat__message str-chat__message-simple",
3461
3462
  `str-chat__message--${c.type}`,
3462
3463
  `str-chat__message--${c.status}`,
3463
- de ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3464
+ fe ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3464
3465
  c.text ? "str-chat__message--has-text" : "has-no-text",
3465
3466
  {
3466
- "str-chat__message--has-attachment": Y,
3467
+ "str-chat__message--has-attachment": H,
3467
3468
  "str-chat__message--highlighted": p,
3468
3469
  "str-chat__message--pinned pinned-message": c.pinned,
3469
3470
  "str-chat__message--with-reactions": q,
3470
3471
  "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,
3471
- "str-chat__message-with-thread-link": ce || le,
3472
+ "str-chat__message-with-thread-link": ne || ce,
3472
3473
  "str-chat__virtual-message__wrapper--end": r,
3473
3474
  "str-chat__virtual-message__wrapper--first": i,
3474
3475
  "str-chat__virtual-message__wrapper--group": l
3475
3476
  }
3476
- ), Ge = c.poll_id && x.polls.fromState(c.poll_id), St = Hr(c), ge = Oe(c), It = Gr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && de && He, Vs = Le && De && !c.quoted_message && !Ge && !W && !ge;
3477
- return /* @__PURE__ */ m(te, { children: [
3477
+ ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
3478
+ return /* @__PURE__ */ m(ee, { children: [
3478
3479
  a && /* @__PURE__ */ s(
3479
- T,
3480
+ C,
3480
3481
  {
3481
3482
  additionalMessageInputProps: t
3482
3483
  }
3483
3484
  ),
3484
3485
  D && /* @__PURE__ */ s(
3485
- mn,
3486
+ hn,
3486
3487
  {
3487
- MessageBouncePrompt: V,
3488
- onClose: () => $(!1),
3488
+ MessageBouncePrompt: F,
3489
+ onClose: () => L(!1),
3489
3490
  open: D
3490
3491
  }
3491
3492
  ),
@@ -3496,10 +3497,10 @@ const bi = ({
3496
3497
  "data-message-id": c.id,
3497
3498
  "data-dd-privacy": "mask",
3498
3499
  children: [
3499
- G && /* @__PURE__ */ s(G, {}),
3500
- !!z && /* @__PURE__ */ s(N, { reminder: z }),
3500
+ R && /* @__PURE__ */ s(R, {}),
3501
+ !!O && /* @__PURE__ */ s(X, { reminder: O }),
3501
3502
  c.user && /* @__PURE__ */ s(
3502
- ne,
3503
+ se,
3503
3504
  {
3504
3505
  className: "str-chat__avatar str-chat__message-sender-avatar",
3505
3506
  id: c.user.id,
@@ -3514,13 +3515,13 @@ const bi = ({
3514
3515
  "div",
3515
3516
  {
3516
3517
  className: k("str-chat__message-inner", {
3517
- "str-chat__simple-message--error-failed": Ct || Et
3518
+ "str-chat__simple-message--error-failed": ie || St
3518
3519
  }),
3519
3520
  "data-testid": "message-inner",
3520
- onClick: fe,
3521
- onKeyDown: fe,
3522
- role: fe ? "button" : void 0,
3523
- tabIndex: fe ? 0 : void 0,
3521
+ onClick: he,
3522
+ onKeyDown: he,
3523
+ role: he ? "button" : void 0,
3524
+ tabIndex: he ? 0 : void 0,
3524
3525
  style: {
3525
3526
  // Force margins to 0 to prevent hover layout shift
3526
3527
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -3528,8 +3529,8 @@ const bi = ({
3528
3529
  marginInlineStart: 0
3529
3530
  },
3530
3531
  children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3531
- de ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3532
- O && /* @__PURE__ */ s(O, {}),
3532
+ fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3533
+ I && /* @__PURE__ */ s(I, {}),
3533
3534
  /* @__PURE__ */ s(
3534
3535
  Zt.Sent,
3535
3536
  {
@@ -3538,37 +3539,37 @@ const bi = ({
3538
3539
  thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3539
3540
  amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3540
3541
  detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3541
- paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
3542
- onPreviewClick: () => S == null ? void 0 : S(c, _),
3543
- onFetchSource: async () => await (I == null ? void 0 : I(c, _))
3542
+ paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3543
+ onPreviewClick: () => S == null ? void 0 : S(c, x),
3544
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3544
3545
  }
3545
3546
  )
3546
3547
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3547
3548
  /* @__PURE__ */ s(
3548
3549
  Zt.Received,
3549
3550
  {
3550
- title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
3551
+ title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3551
3552
  mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3552
3553
  thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3553
3554
  amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3554
3555
  detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3555
3556
  paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3556
- isUnlocking: A(c.id),
3557
- onUnlockClick: () => S == null ? void 0 : S(c, _),
3558
- onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
3559
- onDownloadClick: () => L == null ? void 0 : L(c, _)
3557
+ isUnlocking: N(c.id),
3558
+ onUnlockClick: () => S == null ? void 0 : S(c, x),
3559
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3560
+ onDownloadClick: () => M == null ? void 0 : M(c, x)
3560
3561
  }
3561
3562
  ),
3562
- O && /* @__PURE__ */ s(O, {})
3563
+ I && /* @__PURE__ */ s(I, {})
3563
3564
  ] }),
3564
3565
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3565
3566
  qt,
3566
3567
  {
3567
- message: se,
3568
- renderText: w
3568
+ message: Z,
3569
+ renderText: v
3569
3570
  }
3570
3571
  ) })
3571
- ] }) : St ? (
3572
+ ] }) : Et ? (
3572
3573
  /* Tip-only messages render as a standalone bubble */
3573
3574
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3574
3575
  ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
@@ -3583,13 +3584,13 @@ const bi = ({
3583
3584
  },
3584
3585
  children: [
3585
3586
  /* @__PURE__ */ s(
3586
- bi,
3587
+ xi,
3587
3588
  {
3588
- groupPosition: ie,
3589
- isMyMessage: de,
3589
+ groupPosition: De,
3590
+ isMyMessage: fe,
3590
3591
  message: {
3591
3592
  attachments: j,
3592
- text: se.text
3593
+ text: Z.text
3593
3594
  }
3594
3595
  }
3595
3596
  ),
@@ -3602,85 +3603,78 @@ const bi = ({
3602
3603
  {
3603
3604
  message: c,
3604
3605
  hasAttachment: He,
3605
- isMyMessage: de
3606
+ isMyMessage: fe
3606
3607
  }
3607
3608
  ),
3608
- Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3609
+ Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3609
3610
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3610
- C,
3611
+ E,
3611
3612
  {
3612
3613
  actionHandler: o,
3613
3614
  attachments: j
3614
3615
  }
3615
3616
  ) : null,
3616
- W ? /* @__PURE__ */ s(
3617
- R,
3617
+ Y ? /* @__PURE__ */ s(
3618
+ _,
3618
3619
  {
3619
- message: se,
3620
- renderText: w
3620
+ message: Z,
3621
+ renderText: v
3621
3622
  }
3622
3623
  ) : /* @__PURE__ */ s(
3623
3624
  qt,
3624
3625
  {
3625
- message: se,
3626
- renderText: w
3626
+ message: Z,
3627
+ renderText: v
3627
3628
  }
3628
3629
  ),
3629
3630
  /* @__PURE__ */ s(Wt, {})
3630
3631
  ] }) })
3631
3632
  }
3632
3633
  ),
3633
- !It && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3634
+ !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3634
3635
  (!ge || Tt) && /* @__PURE__ */ s(
3635
3636
  Ke,
3636
3637
  {
3637
3638
  message: c,
3638
3639
  hasAttachment: He,
3639
- isMyMessage: de
3640
+ isMyMessage: fe
3640
3641
  }
3641
3642
  ),
3642
3643
  n && ge && /* @__PURE__ */ s(
3643
- Yr,
3644
+ qr,
3644
3645
  {
3645
- selected: y,
3646
- onVoteUp: M,
3647
- onVoteDown: E
3646
+ selected: z,
3647
+ onVoteUp: y,
3648
+ onVoteDown: A
3648
3649
  }
3649
3650
  )
3650
3651
  ] }),
3651
- /* @__PURE__ */ s(
3652
- qr,
3653
- {
3654
- message: c,
3655
- isMyMessage: de,
3656
- lastOwnMessageId: b == null ? void 0 : b.id
3657
- }
3658
- ),
3659
- ce && /* @__PURE__ */ s(
3660
- X,
3652
+ /* @__PURE__ */ s(Xr, {}),
3653
+ ne && /* @__PURE__ */ s(
3654
+ te,
3661
3655
  {
3662
3656
  onClick: d,
3663
3657
  reply_count: c.reply_count
3664
3658
  }
3665
3659
  ),
3666
- le && /* @__PURE__ */ s(ee, {})
3660
+ ce && /* @__PURE__ */ s(Q, {})
3667
3661
  ]
3668
3662
  },
3669
3663
  c.id
3670
3664
  )
3671
3665
  ] });
3672
- }, xi = U.memo(
3673
- vi,
3666
+ }, _i = U.memo(
3667
+ wi,
3674
3668
  (e, t) => {
3675
3669
  var n, a;
3676
- return e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || ((n = e.lastOwnMessage) == null ? void 0 : n.id) !== ((a = t.lastOwnMessage) == null ? void 0 : a.id) ? !1 : Xs(e, t);
3670
+ return e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || ((n = e.lastOwnMessage) == null ? void 0 : n.id) !== ((a = t.lastOwnMessage) == null ? void 0 : a.id) ? !1 : Ks(e, t);
3677
3671
  }
3678
- ), wi = (e) => {
3679
- const t = Ie("CustomMessage");
3680
- return /* @__PURE__ */ s(xi, { ...t, ...e });
3681
- }, _i = () => {
3672
+ ), Ni = (e) => {
3673
+ const t = _e("CustomMessage");
3674
+ return /* @__PURE__ */ s(_i, { ...t, ...e });
3675
+ }, yi = () => {
3682
3676
  var n;
3683
- const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3677
+ const { handleDelete: e, message: t } = _e("CustomMessageActions");
3684
3678
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3685
3679
  ds,
3686
3680
  {
@@ -3688,11 +3682,11 @@ const bi = ({
3688
3682
  "aria-label": "Delete",
3689
3683
  title: "Delete",
3690
3684
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3691
- children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3685
+ children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3692
3686
  }
3693
3687
  );
3694
- }, Ni = () => {
3695
- const { handleFlag: e } = Ie("CustomMessageActions");
3688
+ }, ki = () => {
3689
+ const { handleFlag: e } = _e("CustomMessageActions");
3696
3690
  return /* @__PURE__ */ s(
3697
3691
  ds,
3698
3692
  {
@@ -3703,19 +3697,19 @@ const bi = ({
3703
3697
  children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3704
3698
  }
3705
3699
  );
3706
- }, yi = () => {
3700
+ }, Ci = () => {
3707
3701
  var t;
3708
- const { message: e } = Ie("CustomMessageActions");
3702
+ const { message: e } = _e("CustomMessageActions");
3709
3703
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3710
- ea,
3704
+ ta,
3711
3705
  {
3712
3706
  messageActionSet: [
3713
- { Component: _i, placement: "quick", type: "delete" },
3714
- { Component: Ni, placement: "quick", type: "flag" }
3707
+ { Component: yi, placement: "quick", type: "delete" },
3708
+ { Component: ki, placement: "quick", type: "flag" }
3715
3709
  ]
3716
3710
  }
3717
3711
  );
3718
- }, ki = ({
3712
+ }, Si = ({
3719
3713
  link: e,
3720
3714
  onDismiss: t
3721
3715
  }) => {
@@ -3755,14 +3749,14 @@ const bi = ({
3755
3749
  ]
3756
3750
  }
3757
3751
  );
3758
- }, Ci = (e) => ({
3752
+ }, Ei = (e) => ({
3759
3753
  linkPreviews: Array.from(e.previews.values()).filter(
3760
3754
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3761
3755
  )
3762
- }), Ei = () => {
3763
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3756
+ }), Ii = () => {
3757
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3764
3758
  e.state,
3765
- Ci
3759
+ Ei
3766
3760
  ), n = (r) => {
3767
3761
  e.dismissPreview(r);
3768
3762
  };
@@ -3775,9 +3769,9 @@ const bi = ({
3775
3769
  // block so it keeps its intrinsic height and the container scrolls — a
3776
3770
  // bare flex-column child would be shrunk on the column axis and its
3777
3771
  // fixed-height hero would spill out of the collapsed card box.
3778
- /* @__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(ki, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3772
+ /* @__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(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3779
3773
  ) : null;
3780
- }, kt = U.createContext(!1), ul = () => Se(kt), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3774
+ }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3781
3775
  "button",
3782
3776
  {
3783
3777
  ...n,
@@ -3785,12 +3779,12 @@ const bi = ({
3785
3779
  "aria-label": "Send",
3786
3780
  disabled: t,
3787
3781
  onClick: e,
3788
- children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3782
+ children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3789
3783
  }
3790
- ), Ii = () => {
3791
- const e = Se(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3792
- SendButton: r = Si,
3793
- AttachmentPreviewList: i = xn
3784
+ ), Ai = () => {
3785
+ const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3786
+ SendButton: r = Ti,
3787
+ AttachmentPreviewList: i = wn
3794
3788
  } = is("CustomMessageInput");
3795
3789
  return (
3796
3790
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
@@ -3807,12 +3801,12 @@ const bi = ({
3807
3801
  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)]",
3808
3802
  "data-dd-privacy": "mask",
3809
3803
  children: [
3810
- /* @__PURE__ */ s(wn, {}),
3811
- /* @__PURE__ */ s(Ei, {}),
3804
+ /* @__PURE__ */ s(_n, {}),
3805
+ /* @__PURE__ */ s(Ii, {}),
3812
3806
  /* @__PURE__ */ s(i, {}),
3813
3807
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3814
3808
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3815
- _n,
3809
+ Nn,
3816
3810
  {
3817
3811
  "aria-disabled": e || void 0,
3818
3812
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3838,7 +3832,7 @@ const bi = ({
3838
3832
  }
3839
3833
  )
3840
3834
  );
3841
- }, Ti = ({
3835
+ }, Mi = ({
3842
3836
  renderActions: e,
3843
3837
  renderFooter: t,
3844
3838
  disabled: n = !1,
@@ -3846,8 +3840,8 @@ const bi = ({
3846
3840
  composerInput: r
3847
3841
  }) => {
3848
3842
  var o;
3849
- const { channel: i } = me(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3850
- return n ? /* @__PURE__ */ m(te, { children: [
3843
+ const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3844
+ return n ? /* @__PURE__ */ m(ee, { children: [
3851
3845
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3852
3846
  t == null ? void 0 : t()
3853
3847
  ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
@@ -3859,23 +3853,23 @@ const bi = ({
3859
3853
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3860
3854
  children: [
3861
3855
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3862
- /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ii }) })
3856
+ /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3863
3857
  ]
3864
3858
  }
3865
3859
  ),
3866
3860
  t == null ? void 0 : t()
3867
3861
  ] });
3868
- }, Ai = [
3862
+ }, Ri = [
3869
3863
  "SYSTEM_DM_AGENT_PAUSED",
3870
3864
  "SYSTEM_DM_AGENT_RESUMED"
3871
- ], Mi = {
3865
+ ], Li = {
3872
3866
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3873
3867
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3874
- }, Ri = [
3868
+ }, Di = [
3875
3869
  "SYSTEM_AGE_SAFETY_BLOCKED"
3876
- ], Li = {
3870
+ ], zi = {
3877
3871
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3878
- }, Je = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", as = (e) => Ai.includes(e), zi = (e) => Ri.includes(e), Pi = (e) => {
3872
+ }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3879
3873
  var a;
3880
3874
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3881
3875
  if (as(t))
@@ -3883,7 +3877,7 @@ const bi = ({
3883
3877
  kind: "dm-agent",
3884
3878
  type: t
3885
3879
  };
3886
- if (zi(t))
3880
+ if (Fi(t))
3887
3881
  return {
3888
3882
  kind: "age-safety",
3889
3883
  type: t
@@ -3894,32 +3888,32 @@ const bi = ({
3894
3888
  kind: "dm-agent",
3895
3889
  type: n
3896
3890
  };
3897
- }, Oi = (e) => {
3898
- const t = e.indexOf(Je);
3891
+ }, $i = (e) => {
3892
+ const t = e.indexOf(Ze);
3899
3893
  if (t === -1)
3900
3894
  return e;
3901
- const n = t + Je.length;
3902
- return /* @__PURE__ */ m(te, { children: [
3895
+ const n = t + Ze.length;
3896
+ return /* @__PURE__ */ m(ee, { children: [
3903
3897
  e.slice(0, t),
3904
3898
  /* @__PURE__ */ s(
3905
3899
  "a",
3906
3900
  {
3907
- href: Di,
3901
+ href: Pi,
3908
3902
  target: "_blank",
3909
3903
  rel: "noopener noreferrer",
3910
3904
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3911
- children: Je
3905
+ children: Ze
3912
3906
  }
3913
3907
  ),
3914
3908
  e.slice(n)
3915
3909
  ] });
3916
- }, Fi = (e) => {
3910
+ }, ji = (e) => {
3917
3911
  var a, r;
3918
- const t = e.message.hide_date === !0, n = Pi(
3912
+ const t = e.message.hide_date === !0, n = Oi(
3919
3913
  e.message
3920
3914
  );
3921
3915
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3922
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Mi[n.type];
3916
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3923
3917
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3924
3918
  /* @__PURE__ */ m(
3925
3919
  "div",
@@ -3945,7 +3939,7 @@ const bi = ({
3945
3939
  ] });
3946
3940
  }
3947
3941
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3948
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Li[n.type];
3942
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3949
3943
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3950
3944
  /* @__PURE__ */ m(
3951
3945
  "div",
@@ -3955,7 +3949,7 @@ const bi = ({
3955
3949
  "data-age-safety-system-type": n.type,
3956
3950
  children: [
3957
3951
  /* @__PURE__ */ s(
3958
- Qn,
3952
+ ea,
3959
3953
  {
3960
3954
  size: 24,
3961
3955
  weight: "duotone",
@@ -3964,7 +3958,7 @@ const bi = ({
3964
3958
  "data-testid": "age-safety-system-message-icon"
3965
3959
  }
3966
3960
  ),
3967
- /* @__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) }) })
3961
+ /* @__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: $i(i) }) })
3968
3962
  ]
3969
3963
  }
3970
3964
  ),
@@ -3979,7 +3973,7 @@ const bi = ({
3979
3973
  ] }),
3980
3974
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3981
3975
  ] });
3982
- }, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3976
+ }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3983
3977
  "animateTransform",
3984
3978
  {
3985
3979
  attributeName: "transform",
@@ -3989,21 +3983,21 @@ const bi = ({
3989
3983
  begin: `${120 * t}ms`,
3990
3984
  repeatCount: "indefinite"
3991
3985
  }
3992
- ) }), $i = /* @__PURE__ */ new Set([
3986
+ ) }), Bi = /* @__PURE__ */ new Set([
3993
3987
  qe.Thinking,
3994
3988
  qe.Generating,
3995
3989
  qe.ExternalSources
3996
- ]), ji = ({ threadList: e }) => {
3997
- var c, w;
3998
- const { channel: t, channelConfig: n, thread: a } = me(), { client: r } = he(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Se(Fs);
3999
- if (!e && o && $i.has(l)) {
4000
- const v = Bi(t, (c = r.user) == null ? void 0 : c.id);
3990
+ ]), Ui = ({ threadList: e }) => {
3991
+ var v, w;
3992
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3993
+ if (!e && o && Bi.has(l)) {
3994
+ const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
4001
3995
  return /* @__PURE__ */ s(
4002
3996
  rs,
4003
3997
  {
4004
- avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
4005
- avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
4006
- avatarImage: v == null ? void 0 : v.image,
3998
+ avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
3999
+ avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
4000
+ avatarImage: b == null ? void 0 : b.image,
4007
4001
  testId: "typing-indicator-ai"
4008
4002
  }
4009
4003
  );
@@ -4011,25 +4005,25 @@ const bi = ({
4011
4005
  if ((n == null ? void 0 : n.typing_events) === !1)
4012
4006
  return null;
4013
4007
  const u = e ? [] : Object.values(i).filter(
4014
- ({ parent_id: v, user: f }) => {
4008
+ ({ parent_id: b, user: f }) => {
4015
4009
  var x;
4016
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !v;
4010
+ return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4017
4011
  }
4018
4012
  ), p = e ? Object.values(i).filter(
4019
- ({ parent_id: v, user: f }) => {
4013
+ ({ parent_id: b, user: f }) => {
4020
4014
  var x;
4021
- return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && v === (a == null ? void 0 : a.id);
4015
+ return (f == null ? void 0 : f.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4022
4016
  }
4023
4017
  ) : [], h = e ? p : u;
4024
4018
  if (!h.length)
4025
4019
  return null;
4026
- const g = (w = h[0]) == null ? void 0 : w.user, b = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4020
+ 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;
4027
4021
  return /* @__PURE__ */ s(
4028
4022
  rs,
4029
4023
  {
4030
- avatarId: (g == null ? void 0 : g.id) ?? (b == null ? void 0 : b.id) ?? "typing-user",
4031
- avatarName: (g == null ? void 0 : g.name) ?? (b == null ? void 0 : b.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4032
- avatarImage: (g == null ? void 0 : g.image) ?? (b == null ? void 0 : b.image),
4024
+ avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4025
+ avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4026
+ avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4033
4027
  testId: "typing-indicator"
4034
4028
  }
4035
4029
  );
@@ -4048,7 +4042,7 @@ const bi = ({
4048
4042
  },
4049
4043
  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: [
4050
4044
  /* @__PURE__ */ s(
4051
- ne,
4045
+ se,
4052
4046
  {
4053
4047
  className: "str-chat__avatar str-chat__message-sender-avatar",
4054
4048
  id: e,
@@ -4068,16 +4062,16 @@ const bi = ({
4068
4062
  height: "13",
4069
4063
  overflow: "visible",
4070
4064
  children: [
4071
- /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4072
- /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4073
- /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4065
+ /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4066
+ /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4067
+ /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4074
4068
  ]
4075
4069
  }
4076
4070
  ) }) }) }) }) })
4077
4071
  ] })
4078
4072
  }
4079
4073
  );
4080
- function Bi(e, t) {
4074
+ function Vi(e, t) {
4081
4075
  var a;
4082
4076
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4083
4077
  for (const r of Object.values(n)) {
@@ -4086,7 +4080,7 @@ function Bi(e, t) {
4086
4080
  return i;
4087
4081
  }
4088
4082
  }
4089
- const Ui = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4083
+ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4090
4084
  "div",
4091
4085
  {
4092
4086
  className: k("flex items-center justify-center h-full", e),
@@ -4130,11 +4124,11 @@ const Ui = () => null, Vi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4130
4124
  ]
4131
4125
  }
4132
4126
  ), 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: [
4133
- /* @__PURE__ */ s(Vi, { className: "w-6 h-6" }),
4127
+ /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4134
4128
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4135
4129
  ] }) }));
4136
4130
  je.displayName = "LoadingState";
4137
- 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", Gi = ({
4131
+ 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", Yi = ({
4138
4132
  onBack: e,
4139
4133
  showBackButton: t,
4140
4134
  showStarButton: n = !1,
@@ -4148,13 +4142,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4148
4142
  onBlockParticipantClick: p,
4149
4143
  onReportParticipantClick: h,
4150
4144
  customChannelActions: g,
4151
- renderChannelActions: b,
4152
- showChannelInfo: c = !0,
4145
+ renderChannelActions: c,
4146
+ showChannelInfo: v = !0,
4153
4147
  onParticipantNameClick: w,
4154
- renderHeaderTitleBadges: v
4148
+ renderHeaderTitleBadges: b
4155
4149
  }) => {
4156
- var M, E, C, T, O, F;
4157
- const { channel: f } = me(), { client: x } = he(), _ = U.useMemo(
4150
+ var A, E, C, I, $, F;
4151
+ const { channel: f } = ue(), { client: x } = me(), N = U.useMemo(
4158
4152
  () => {
4159
4153
  var V;
4160
4154
  return Ue(
@@ -4163,16 +4157,16 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4163
4157
  f.type
4164
4158
  );
4165
4159
  },
4166
- [(M = f.state) == null ? void 0 : M.members, x == null ? void 0 : x.userID, f.type]
4167
- ), A = ot(_ == null ? void 0 : _.user), S = (E = _ == null ? void 0 : _.user) == null ? void 0 : E.image, I = lt(f), L = v == null ? void 0 : v({
4160
+ [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4161
+ ), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), D = b == null ? void 0 : b({
4168
4162
  channel: f,
4169
- participant: _
4170
- }), 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: [
4171
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: A }),
4172
- L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4163
+ participant: N
4164
+ }), 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(ee, { children: [
4165
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
4166
+ D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4173
4167
  ] }), y = async () => {
4174
4168
  try {
4175
- I ? await f.unpin() : await f.pin();
4169
+ M ? await f.unpin() : await f.pin();
4176
4170
  } catch (V) {
4177
4171
  console.error(
4178
4172
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4193,7 +4187,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4193
4187
  }),
4194
4188
  type: "button",
4195
4189
  "aria-label": "Back to conversations",
4196
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4190
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4197
4191
  }
4198
4192
  ) }),
4199
4193
  /* @__PURE__ */ s(
@@ -4206,19 +4200,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4206
4200
  {
4207
4201
  type: "button",
4208
4202
  onClick: w,
4209
- "aria-label": `View details for ${A}`,
4203
+ "aria-label": `View details for ${S}`,
4210
4204
  className: k(
4211
- D,
4205
+ L,
4212
4206
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4213
4207
  ),
4214
4208
  children: [
4215
4209
  /* @__PURE__ */ s(
4216
- ne,
4210
+ se,
4217
4211
  {
4218
- id: ((C = _ == null ? void 0 : _.user) == null ? void 0 : C.id) || f.id || "unknown",
4219
- name: A,
4220
- image: S,
4221
- starred: n && I,
4212
+ id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4213
+ name: S,
4214
+ image: T,
4215
+ starred: n && M,
4222
4216
  dmAgentEnabled: a,
4223
4217
  size: 48
4224
4218
  }
@@ -4233,14 +4227,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4233
4227
  ] })
4234
4228
  ]
4235
4229
  }
4236
- ) : /* @__PURE__ */ m("div", { className: D, children: [
4230
+ ) : /* @__PURE__ */ m("div", { className: L, children: [
4237
4231
  /* @__PURE__ */ s(
4238
- ne,
4232
+ se,
4239
4233
  {
4240
- id: ((T = _ == null ? void 0 : _.user) == null ? void 0 : T.id) || f.id || "unknown",
4241
- name: A,
4242
- image: S,
4243
- starred: n && I,
4234
+ id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4235
+ name: S,
4236
+ image: T,
4237
+ starred: n && M,
4244
4238
  dmAgentEnabled: a,
4245
4239
  size: 48
4246
4240
  }
@@ -4269,24 +4263,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4269
4263
  className: be,
4270
4264
  onClick: y,
4271
4265
  type: "button",
4272
- "aria-label": I ? "Unstar conversation" : "Star conversation",
4266
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
4273
4267
  children: /* @__PURE__ */ s(
4274
4268
  Ee,
4275
4269
  {
4276
4270
  className: k("size-5", {
4277
- "text-yellow-600": I,
4278
- "text-black/90": !I
4271
+ "text-yellow-600": M,
4272
+ "text-black/90": !M
4279
4273
  }),
4280
- weight: I ? "duotone" : "regular"
4274
+ weight: M ? "duotone" : "regular"
4281
4275
  }
4282
4276
  )
4283
4277
  }
4284
4278
  ),
4285
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
4286
- tt,
4279
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4280
+ st,
4287
4281
  {
4288
4282
  channel: f,
4289
- participant: _,
4283
+ participant: N,
4290
4284
  showDeleteConversation: l,
4291
4285
  showBlockParticipant: o,
4292
4286
  showReportParticipant: d,
@@ -4313,7 +4307,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4313
4307
  type: "button",
4314
4308
  onClick: e,
4315
4309
  "aria-label": "Back to conversations",
4316
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4310
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4317
4311
  }
4318
4312
  ),
4319
4313
  w ? /* @__PURE__ */ m(
@@ -4321,19 +4315,19 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4321
4315
  {
4322
4316
  type: "button",
4323
4317
  onClick: w,
4324
- "aria-label": `View details for ${A}`,
4318
+ "aria-label": `View details for ${S}`,
4325
4319
  className: k(
4326
- $,
4320
+ O,
4327
4321
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
4328
4322
  ),
4329
4323
  children: [
4330
4324
  /* @__PURE__ */ s(
4331
- ne,
4325
+ se,
4332
4326
  {
4333
- id: ((O = _ == null ? void 0 : _.user) == null ? void 0 : O.id) || f.id || "unknown",
4334
- name: A,
4335
- image: S,
4336
- starred: n && I,
4327
+ id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4328
+ name: S,
4329
+ image: T,
4330
+ starred: n && M,
4337
4331
  dmAgentEnabled: a,
4338
4332
  size: 48
4339
4333
  }
@@ -4350,14 +4344,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4350
4344
  ] })
4351
4345
  ]
4352
4346
  }
4353
- ) : /* @__PURE__ */ m("div", { className: $, children: [
4347
+ ) : /* @__PURE__ */ m("div", { className: O, children: [
4354
4348
  /* @__PURE__ */ s(
4355
- ne,
4349
+ se,
4356
4350
  {
4357
- id: ((F = _ == null ? void 0 : _.user) == null ? void 0 : F.id) || f.id || "unknown",
4358
- name: A,
4359
- image: S,
4360
- starred: n && I,
4351
+ id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4352
+ name: S,
4353
+ image: T,
4354
+ starred: n && M,
4361
4355
  dmAgentEnabled: a,
4362
4356
  size: 48
4363
4357
  }
@@ -4387,24 +4381,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4387
4381
  className: be,
4388
4382
  onClick: y,
4389
4383
  type: "button",
4390
- "aria-label": I ? "Unstar conversation" : "Star conversation",
4384
+ "aria-label": M ? "Unstar conversation" : "Star conversation",
4391
4385
  children: /* @__PURE__ */ s(
4392
4386
  Ee,
4393
4387
  {
4394
4388
  className: k("size-6", {
4395
- "text-yellow-600": I,
4396
- "text-black/90": !I
4389
+ "text-yellow-600": M,
4390
+ "text-black/90": !M
4397
4391
  }),
4398
- weight: I ? "duotone" : "regular"
4392
+ weight: M ? "duotone" : "regular"
4399
4393
  }
4400
4394
  )
4401
4395
  }
4402
4396
  ),
4403
- c && (b !== void 0 ? b : /* @__PURE__ */ s(
4404
- tt,
4397
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4398
+ st,
4405
4399
  {
4406
4400
  channel: f,
4407
- participant: _,
4401
+ participant: N,
4408
4402
  showDeleteConversation: l,
4409
4403
  showBlockParticipant: o,
4410
4404
  showReportParticipant: d,
@@ -4420,7 +4414,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4420
4414
  ] })
4421
4415
  ] })
4422
4416
  ] });
4423
- }, Hi = ({
4417
+ }, qi = ({
4424
4418
  onBack: e,
4425
4419
  showBackButton: t,
4426
4420
  renderMessageInputActions: n,
@@ -4434,47 +4428,47 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4434
4428
  onReportParticipantClick: p,
4435
4429
  showBlockParticipant: h = !0,
4436
4430
  showReportParticipant: g = !0,
4437
- composerDisabled: b = !1,
4438
- composerDisabledReason: c,
4431
+ composerDisabled: c = !1,
4432
+ composerDisabledReason: v,
4439
4433
  showStarButton: w = !1,
4440
- chatbotVotingEnabled: v = !1,
4434
+ chatbotVotingEnabled: b = !1,
4441
4435
  renderChannelBanner: f,
4442
4436
  renderHeaderTitleBadges: x,
4443
- customChannelActions: _,
4444
- renderChannelActions: A,
4445
- renderMessage: S,
4446
- dmAgentEnabled: I = !1,
4447
- viewerLanguage: L,
4448
- showChannelInfo: D = !0,
4449
- onParticipantNameClick: $,
4437
+ customChannelActions: N,
4438
+ renderChannelActions: S,
4439
+ renderMessage: T,
4440
+ dmAgentEnabled: M = !1,
4441
+ viewerLanguage: D,
4442
+ showChannelInfo: L = !0,
4443
+ onParticipantNameClick: O,
4450
4444
  composerInput: z
4451
4445
  }) => {
4452
- var N, R, G, Y;
4453
- const { channel: y } = me(), { client: M } = he(), E = U.useMemo(
4446
+ var _, R, H, q;
4447
+ const { channel: y } = ue(), { client: A } = me(), E = U.useMemo(
4454
4448
  () => {
4455
- var q;
4449
+ var Y;
4456
4450
  return Ue(
4457
- (q = y.state) == null ? void 0 : q.members,
4458
- M == null ? void 0 : M.userID,
4451
+ (Y = y.state) == null ? void 0 : Y.members,
4452
+ A == null ? void 0 : A.userID,
4459
4453
  y.type
4460
4454
  );
4461
4455
  },
4462
- [(N = y.state) == null ? void 0 : N.members, M == null ? void 0 : M.userID, y.type]
4456
+ [(_ = y.state) == null ? void 0 : _.members, A == null ? void 0 : A.userID, y.type]
4463
4457
  ), C = U.useMemo(() => {
4464
- var j;
4465
- const q = M == null ? void 0 : M.userID;
4466
- return q ? Object.values(((j = y.state) == null ? void 0 : j.members) || {}).find((Q) => {
4467
- var se;
4468
- return ((se = Q.user) == null ? void 0 : se.id) === q;
4458
+ var W;
4459
+ const Y = A == null ? void 0 : A.userID;
4460
+ return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Z) => {
4461
+ var oe;
4462
+ return ((oe = Z.user) == null ? void 0 : oe.id) === Y;
4469
4463
  }) : void 0;
4470
- }, [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), O = ((Y = E == null ? void 0 : E.user) == null ? void 0 : Y.is_account) ?? (E == null ? void 0 : E.is_account), F = I && T === !1 && O === !0, V = y.state.messages.some(
4471
- (q) => q.type !== "deleted"
4472
- ), Z = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, ee = $ ? /* @__PURE__ */ s(
4473
- ga,
4464
+ }, [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 = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4465
+ (Y) => Y.type !== "deleted"
4466
+ ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4467
+ pa,
4474
4468
  {
4475
4469
  onBack: e,
4476
4470
  showBackButton: t,
4477
- showChannelInfo: D,
4471
+ showChannelInfo: L,
4478
4472
  showStarButton: w,
4479
4473
  dmAgentEnabled: F,
4480
4474
  onLeaveConversation: i,
@@ -4485,39 +4479,39 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4485
4479
  onDeleteConversationClick: d,
4486
4480
  onBlockParticipantClick: u,
4487
4481
  onReportParticipantClick: p,
4488
- customChannelActions: _,
4489
- renderChannelActions: A,
4490
- onParticipantNameClick: $
4482
+ customChannelActions: N,
4483
+ renderChannelActions: S,
4484
+ onParticipantNameClick: O
4491
4485
  }
4492
4486
  ) : null, X = J(
4493
- (q) => {
4494
- const { message: W } = Ie("ChannelView"), j = /* @__PURE__ */ s(
4495
- wi,
4487
+ (Y) => {
4488
+ const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4489
+ Ni,
4496
4490
  {
4497
- ...q,
4498
- chatbotVotingEnabled: v,
4499
- viewerLanguage: L
4491
+ ...Y,
4492
+ chatbotVotingEnabled: b,
4493
+ viewerLanguage: D
4500
4494
  }
4501
4495
  );
4502
- return !S || !W ? j : S(j, W);
4496
+ return !T || !j ? W : T(W, j);
4503
4497
  },
4504
- [v, S, L]
4498
+ [b, T, D]
4505
4499
  );
4506
- return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4507
- Cn,
4500
+ return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4501
+ Sn,
4508
4502
  {
4509
4503
  overrides: {
4510
4504
  Message: X,
4511
- MessageActions: yi
4505
+ MessageActions: Ci
4512
4506
  },
4513
4507
  children: /* @__PURE__ */ m(En, { children: [
4514
- !$ && /* @__PURE__ */ m(te, { children: [
4508
+ !O && /* @__PURE__ */ m(ee, { children: [
4515
4509
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4516
- Gi,
4510
+ Yi,
4517
4511
  {
4518
4512
  onBack: e,
4519
4513
  showBackButton: t,
4520
- showChannelInfo: D,
4514
+ showChannelInfo: L,
4521
4515
  showStarButton: w,
4522
4516
  dmAgentEnabled: F,
4523
4517
  onLeaveConversation: i,
@@ -4528,27 +4522,27 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4528
4522
  onDeleteConversationClick: d,
4529
4523
  onBlockParticipantClick: u,
4530
4524
  onReportParticipantClick: p,
4531
- customChannelActions: _,
4532
- renderChannelActions: A,
4525
+ customChannelActions: N,
4526
+ renderChannelActions: S,
4533
4527
  renderHeaderTitleBadges: x
4534
4528
  }
4535
4529
  ) }, "lt-channel-header"),
4536
- Z
4530
+ Q
4537
4531
  ] }),
4538
- $ && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4539
- ee,
4540
- Z
4532
+ O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4533
+ te,
4534
+ Q
4541
4535
  ] }),
4542
4536
  /* @__PURE__ */ s(
4543
4537
  "div",
4544
4538
  {
4545
4539
  className: "flex-1 overflow-hidden relative",
4546
4540
  children: /* @__PURE__ */ s(
4547
- Sn,
4541
+ In,
4548
4542
  {
4549
- head: $ && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4550
- ee,
4551
- Z
4543
+ head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4544
+ te,
4545
+ Q
4552
4546
  ] }) : void 0,
4553
4547
  hideDeletedMessages: !0,
4554
4548
  hideNewMessageSeparator: !1
@@ -4559,14 +4553,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4559
4553
  ),
4560
4554
  r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4561
4555
  /* @__PURE__ */ s(
4562
- Ti,
4556
+ Mi,
4563
4557
  {
4564
4558
  ...n && {
4565
4559
  renderActions: () => n == null ? void 0 : n(y)
4566
4560
  },
4567
4561
  renderFooter: () => a == null ? void 0 : a(y),
4568
- disabled: b,
4569
- disabledReason: c,
4562
+ disabled: c,
4563
+ disabledReason: v,
4570
4564
  composerInput: z
4571
4565
  },
4572
4566
  "lt-channel-message-input"
@@ -4585,86 +4579,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4585
4579
  onLeaveConversation: l,
4586
4580
  onBlockParticipant: o,
4587
4581
  className: d,
4588
- CustomChannelEmptyState: u = Ui,
4582
+ CustomChannelEmptyState: u = Gi,
4589
4583
  showDeleteConversation: p = !0,
4590
4584
  onDeleteConversationClick: h,
4591
4585
  onBlockParticipantClick: g,
4592
- onReportParticipantClick: b,
4593
- showBlockParticipant: c = !0,
4586
+ onReportParticipantClick: c,
4587
+ showBlockParticipant: v = !0,
4594
4588
  showReportParticipant: w = !0,
4595
- composerDisabled: v = !1,
4589
+ composerDisabled: b = !1,
4596
4590
  composerDisabledReason: f,
4597
4591
  dmAgentEnabled: x,
4598
- messageMetadata: _,
4599
- onMessageSent: A,
4600
- showStarButton: S = !1,
4601
- chatbotVotingEnabled: I = !1,
4602
- renderChannelBanner: L,
4603
- renderHeaderTitleBadges: D,
4604
- customChannelActions: $,
4592
+ messageMetadata: N,
4593
+ onMessageSent: S,
4594
+ showStarButton: T = !1,
4595
+ chatbotVotingEnabled: M = !1,
4596
+ renderChannelBanner: D,
4597
+ renderHeaderTitleBadges: L,
4598
+ customChannelActions: O,
4605
4599
  renderChannelActions: z,
4606
4600
  renderMessage: y,
4607
- onMessageLinkClick: M,
4601
+ onMessageLinkClick: A,
4608
4602
  sendButton: E,
4609
4603
  attachmentPreviewList: C,
4610
- viewerLanguage: T,
4611
- showChannelInfo: O = !0,
4604
+ viewerLanguage: I,
4605
+ showChannelInfo: $ = !0,
4612
4606
  onParticipantNameClick: F,
4613
4607
  composerInput: V
4614
4608
  }) => {
4615
- const Z = J(
4616
- async (X, N, R) => {
4617
- var Q;
4618
- const G = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, Y = x && !G, q = {
4619
- ...N,
4620
- ...Y && { silent: !0 },
4621
- ..._ && {
4609
+ const Q = J(
4610
+ async (X, _, R) => {
4611
+ var Z;
4612
+ const H = ((Z = e.data) == null ? void 0 : Z.chatbot_paused) === !0, q = x && !H, Y = {
4613
+ ..._,
4614
+ ...q && { silent: !0 },
4615
+ ...N && {
4622
4616
  metadata: {
4623
- ...N.metadata ?? {},
4624
- ..._
4617
+ ..._.metadata ?? {},
4618
+ ...N
4625
4619
  }
4626
4620
  }
4627
- }, W = {
4621
+ }, j = {
4628
4622
  ...R,
4629
- ...Y && { skip_push: !0 }
4630
- }, j = await e.sendMessage(q, W);
4631
- return A == null || A(j), j;
4623
+ ...q && { skip_push: !0 }
4624
+ }, W = await e.sendMessage(Y, j);
4625
+ return S == null || S(W), W;
4632
4626
  },
4633
- [e, x, _, A]
4634
- ), ee = H(null);
4627
+ [e, x, N, S]
4628
+ ), te = G(null);
4635
4629
  return K(() => {
4636
- if (!M) return;
4637
- const X = ee.current;
4630
+ if (!A) return;
4631
+ const X = te.current;
4638
4632
  if (!X) return;
4639
- const N = (R) => {
4640
- const G = R.target, Y = G == null ? void 0 : G.closest("a[href]"), q = Y == null ? void 0 : Y.getAttribute("href");
4641
- if (!q) return;
4642
- 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;
4643
- M(q, Q);
4633
+ const _ = (R) => {
4634
+ const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4635
+ if (!Y) return;
4636
+ 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;
4637
+ A(Y, Z);
4644
4638
  };
4645
- return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4646
- }, [M, e]), /* @__PURE__ */ s(
4639
+ return X.addEventListener("click", _), () => X.removeEventListener("click", _);
4640
+ }, [A, e]), /* @__PURE__ */ s(
4647
4641
  "div",
4648
4642
  {
4649
- ref: ee,
4643
+ ref: te,
4650
4644
  className: k(
4651
4645
  "messaging-channel-view h-full flex flex-col",
4652
4646
  d
4653
4647
  ),
4654
- children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4655
- kn,
4648
+ children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4649
+ Cn,
4656
4650
  {
4657
4651
  channel: e,
4658
- MessageSystem: Fi,
4652
+ MessageSystem: ji,
4659
4653
  EmptyStateIndicator: u,
4660
4654
  LoadingIndicator: je,
4661
- DateSeparator: pa,
4662
- TypingIndicator: ji,
4663
- doSendMessageRequest: Z,
4655
+ DateSeparator: ba,
4656
+ TypingIndicator: Ui,
4657
+ doSendMessageRequest: Q,
4664
4658
  ...E ? { SendButton: E } : {},
4665
4659
  ...C ? { AttachmentPreviewList: C } : {},
4666
4660
  children: /* @__PURE__ */ s(
4667
- Hi,
4661
+ qi,
4668
4662
  {
4669
4663
  onBack: t,
4670
4664
  showBackButton: n,
@@ -4677,21 +4671,21 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4677
4671
  showDeleteConversation: p,
4678
4672
  onDeleteConversationClick: h,
4679
4673
  onBlockParticipantClick: g,
4680
- onReportParticipantClick: b,
4681
- showBlockParticipant: c,
4674
+ onReportParticipantClick: c,
4675
+ showBlockParticipant: v,
4682
4676
  showReportParticipant: w,
4683
- composerDisabled: v,
4677
+ composerDisabled: b,
4684
4678
  composerDisabledReason: f,
4685
- showStarButton: S,
4679
+ showStarButton: T,
4686
4680
  dmAgentEnabled: x,
4687
- chatbotVotingEnabled: I,
4688
- renderChannelBanner: L,
4689
- renderHeaderTitleBadges: D,
4690
- customChannelActions: $,
4681
+ chatbotVotingEnabled: M,
4682
+ renderChannelBanner: D,
4683
+ renderHeaderTitleBadges: L,
4684
+ customChannelActions: O,
4691
4685
  renderChannelActions: z,
4692
4686
  renderMessage: y,
4693
- viewerLanguage: T,
4694
- showChannelInfo: O,
4687
+ viewerLanguage: I,
4688
+ showChannelInfo: $,
4695
4689
  onParticipantNameClick: F,
4696
4690
  composerInput: V
4697
4691
  }
@@ -4703,7 +4697,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4703
4697
  }
4704
4698
  );
4705
4699
  $s.displayName = "ChannelView";
4706
- 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: [
4700
+ const ke = 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: [
4707
4701
  /* @__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: "⚠️" }) }),
4708
4702
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4709
4703
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4717,8 +4711,8 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4717
4711
  }
4718
4712
  )
4719
4713
  ] }) }));
4720
- ye.displayName = "ErrorState";
4721
- const ml = ({
4714
+ ke.displayName = "ErrorState";
4715
+ const fl = ({
4722
4716
  capabilities: e = {},
4723
4717
  renderMessageInputActions: t,
4724
4718
  renderConversationFooter: n,
@@ -4732,41 +4726,41 @@ const ml = ({
4732
4726
  dmAgentEnabled: p,
4733
4727
  onMessageSent: h,
4734
4728
  chatbotVotingEnabled: g = !1,
4735
- viewerLanguage: b,
4736
- renderHeaderTitleBadges: c,
4729
+ viewerLanguage: c,
4730
+ renderHeaderTitleBadges: v,
4737
4731
  renderChannelBanner: w,
4738
- customChannelActions: v,
4732
+ customChannelActions: b,
4739
4733
  renderChannelActions: f,
4740
4734
  onParticipantNameClick: x,
4741
- renderMessage: _,
4742
- onMessageLinkClick: A,
4743
- showChannelInfo: S,
4744
- composerInput: I
4735
+ renderMessage: N,
4736
+ onMessageLinkClick: S,
4737
+ showChannelInfo: T,
4738
+ composerInput: M
4745
4739
  }) => {
4746
4740
  const {
4747
- client: L,
4748
- isConnected: D,
4749
- isLoading: $,
4741
+ client: D,
4742
+ isConnected: L,
4743
+ isLoading: O,
4750
4744
  error: z,
4751
4745
  refreshConnection: y,
4752
- service: M,
4746
+ service: A,
4753
4747
  debug: E
4754
- } = ta(), [C, T] = B(null), [O, F] = B(null), [V, Z] = B(!1), { showDeleteConversation: ee = !0 } = e, X = H(l);
4748
+ } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4755
4749
  X.current = l;
4756
- const N = H(a);
4757
- N.current = a;
4758
- const R = H(null), G = H(null);
4750
+ const _ = G(a);
4751
+ _.current = a;
4752
+ const R = G(null), H = G(null);
4759
4753
  K(() => {
4760
- G.current = C;
4754
+ H.current = C;
4761
4755
  }, [C]), K(() => {
4762
- if (!L || !D) return;
4763
- const W = L.userID;
4764
- if (!W) return;
4765
- const j = `${W}::${i}`;
4766
- if (R.current === j) return;
4767
- R.current = j;
4768
- const Q = () => {
4769
- R.current === j && (R.current = null);
4756
+ if (!D || !L) return;
4757
+ const j = D.userID;
4758
+ if (!j) return;
4759
+ const W = `${j}::${i}`;
4760
+ if (R.current === W) return;
4761
+ R.current = W;
4762
+ const Z = () => {
4763
+ R.current === W && (R.current = null);
4770
4764
  };
4771
4765
  (async () => {
4772
4766
  var Le, De;
@@ -4775,95 +4769,95 @@ const ml = ({
4775
4769
  "[MessagingShell] Loading initial conversation with:",
4776
4770
  i
4777
4771
  );
4778
- const ie = await L.queryChannels(
4772
+ const ne = await D.queryChannels(
4779
4773
  {
4780
4774
  type: "messaging",
4781
- members: { $eq: [W, i] }
4775
+ members: { $eq: [j, i] }
4782
4776
  },
4783
4777
  {},
4784
4778
  { limit: 1 }
4785
4779
  );
4786
- if (ie.length > 0) {
4787
- T(ie[0]), F(null), (Le = N.current) == null || Le.call(N, ie[0]), E && console.log(
4780
+ if (ne.length > 0) {
4781
+ I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), E && console.log(
4788
4782
  "[MessagingShell] Initial conversation loaded:",
4789
- ie[0].id
4783
+ ne[0].id
4790
4784
  );
4791
4785
  return;
4792
4786
  }
4793
4787
  const ce = X.current;
4794
- if (!ce || !M) {
4795
- Q(), F("No conversation found with this account"), E && console.log(
4788
+ if (!ce || !A) {
4789
+ Z(), F("No conversation found with this account"), E && console.log(
4796
4790
  "[MessagingShell] No conversation found for:",
4797
4791
  i
4798
4792
  );
4799
4793
  return;
4800
4794
  }
4801
4795
  try {
4802
- const le = await M.startChannelWithParticipant({
4796
+ const ie = await A.startChannelWithParticipant({
4803
4797
  id: ce.id,
4804
4798
  name: ce.name,
4805
4799
  phone: ce.phone
4806
4800
  });
4807
- T(le), F(null), (De = N.current) == null || De.call(N, le), E && console.log(
4801
+ I(ie), F(null), (De = _.current) == null || De.call(_, ie), E && console.log(
4808
4802
  "[MessagingShell] Channel created and loaded:",
4809
- le.id
4803
+ ie.id
4810
4804
  );
4811
- } catch (le) {
4805
+ } catch (ie) {
4812
4806
  console.error(
4813
4807
  "[MessagingShell] Failed to create conversation:",
4814
- le
4815
- ), Q(), F("Failed to create conversation");
4808
+ ie
4809
+ ), Z(), F("Failed to create conversation");
4816
4810
  }
4817
- } catch (ie) {
4811
+ } catch (ne) {
4818
4812
  console.error(
4819
4813
  "[MessagingShell] Failed to load initial conversation:",
4820
- ie
4821
- ), Q(), G.current || F("Failed to load conversation");
4814
+ ne
4815
+ ), Z(), H.current || F("Failed to load conversation");
4822
4816
  }
4823
4817
  })();
4824
- }, [i, L, D, M, E]);
4825
- const Y = H(r);
4826
- Y.current = r;
4827
- const q = J(() => {
4828
- var W;
4829
- T(null), Z(!0), (W = Y.current) == null || W.call(Y);
4818
+ }, [i, D, L, A, E]);
4819
+ const q = G(r);
4820
+ q.current = r;
4821
+ const Y = J(() => {
4822
+ var j;
4823
+ I(null), Q(!0), (j = q.current) == null || j.call(q);
4830
4824
  }, []);
4831
- return $ ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !D || !L ? /* @__PURE__ */ s(
4832
- ye,
4825
+ return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4826
+ ke,
4833
4827
  {
4834
4828
  message: "Not connected to messaging service",
4835
4829
  onBack: y
4836
4830
  }
4837
- ) : O ? /* @__PURE__ */ s(ye, { message: O }) : 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(
4831
+ ) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { 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(
4838
4832
  $s,
4839
4833
  {
4840
4834
  channel: C,
4841
4835
  renderMessageInputActions: t,
4842
4836
  renderConversationFooter: n,
4843
4837
  renderChannelBanner: w,
4844
- onLeaveConversation: q,
4845
- onBlockParticipant: q,
4838
+ onLeaveConversation: Y,
4839
+ onBlockParticipant: Y,
4846
4840
  CustomChannelEmptyState: o,
4847
- showDeleteConversation: ee,
4841
+ showDeleteConversation: te,
4848
4842
  onBlockParticipantClick: d,
4849
4843
  onReportParticipantClick: u,
4850
4844
  dmAgentEnabled: p,
4851
4845
  onMessageSent: h,
4852
4846
  chatbotVotingEnabled: g,
4853
- viewerLanguage: b,
4854
- renderHeaderTitleBadges: c,
4855
- customChannelActions: v,
4847
+ viewerLanguage: c,
4848
+ renderHeaderTitleBadges: v,
4849
+ customChannelActions: b,
4856
4850
  renderChannelActions: f,
4857
4851
  onParticipantNameClick: x,
4858
- renderMessage: _,
4859
- onMessageLinkClick: A,
4860
- showChannelInfo: S,
4861
- composerInput: I
4852
+ renderMessage: N,
4853
+ onMessageLinkClick: S,
4854
+ showChannelInfo: T,
4855
+ composerInput: M
4862
4856
  },
4863
4857
  C.id
4864
4858
  ) }) }) : /* @__PURE__ */ s(je, {});
4865
4859
  };
4866
- function Yi(e) {
4860
+ function Wi(e) {
4867
4861
  const t = e.state.pending_messages;
4868
4862
  if (t != null && t.length)
4869
4863
  for (const n of t)
@@ -4877,18 +4871,18 @@ const js = U.createContext({
4877
4871
  renderMessagePreview: void 0,
4878
4872
  channelPreview: void 0,
4879
4873
  viewerLanguage: void 0
4880
- }), qi = js.Provider, Wi = () => U.useContext(js), Xi = (e, t) => {
4874
+ }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4881
4875
  const n = new Date(
4882
4876
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4883
4877
  ), r = new Date(
4884
4878
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4885
4879
  ).getTime() - n.getTime();
4886
4880
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4887
- }, Ki = (e) => {
4881
+ }, Zi = (e) => {
4888
4882
  const t = /* @__PURE__ */ new Date();
4889
4883
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4890
4884
  return "Just now";
4891
- const a = Xi(e, t);
4885
+ const a = Ji(e, t);
4892
4886
  return a === 0 ? e.toLocaleTimeString([], {
4893
4887
  hour: "numeric",
4894
4888
  minute: "2-digit",
@@ -4900,7 +4894,7 @@ const js = U.createContext({
4900
4894
  });
4901
4895
  }, Bs = U.memo(
4902
4896
  (e) => {
4903
- var D, $, z;
4897
+ var L, O, z;
4904
4898
  const { channel: t, unread: n } = e, {
4905
4899
  selectedChannel: a,
4906
4900
  onChannelSelect: r,
@@ -4908,7 +4902,7 @@ const js = U.createContext({
4908
4902
  channelPreview: l,
4909
4903
  renderMessagePreview: o,
4910
4904
  viewerLanguage: d
4911
- } = Wi(), { client: u } = he(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4905
+ } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4912
4906
  if (l)
4913
4907
  return /* @__PURE__ */ s(
4914
4908
  l,
@@ -4922,47 +4916,47 @@ const js = U.createContext({
4922
4916
  );
4923
4917
  const g = () => {
4924
4918
  t && r(t);
4925
- }, b = (y) => {
4926
- const M = y.key === "Enter" || y.key === " ", E = y.repeat;
4927
- !M || E || (y.preventDefault(), g());
4928
- }, c = Ue(
4929
- (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
4919
+ }, c = (y) => {
4920
+ const A = y.key === "Enter" || y.key === " ", E = y.repeat;
4921
+ !A || E || (y.preventDefault(), g());
4922
+ }, v = Ue(
4923
+ (L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
4930
4924
  u == null ? void 0 : u.userID,
4931
4925
  t == null ? void 0 : t.type
4932
- ), w = ot(c == null ? void 0 : c.user), v = ($ = c == null ? void 0 : c.user) == null ? void 0 : $.image, f = (() => {
4933
- var M;
4934
- const y = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
4926
+ ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4927
+ var A;
4928
+ const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4935
4929
  if (y != null && y.length) {
4936
4930
  for (let E = y.length - 1; E >= 0; E--)
4937
4931
  if (y[E].type !== "system") return y[E];
4938
4932
  }
4939
- })(), _ = (() => {
4940
- var O, F, V, Z;
4933
+ })(), N = (() => {
4934
+ var $, F, V, Q;
4941
4935
  const y = hs({
4942
4936
  message: f,
4943
4937
  viewerLanguage: d
4944
4938
  });
4945
- if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4939
+ if ((($ = f == null ? void 0 : f.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4946
4940
  if (((F = f == null ? void 0 : f.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4947
4941
  if (((V = f == null ? void 0 : f.metadata) == null ? void 0 : V.custom_type) === "MESSAGE_ATTACHMENT")
4948
4942
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4949
4943
  if (y) return y;
4950
- const T = (Z = f == null ? void 0 : f.attachments) == null ? void 0 : Z[0];
4951
- 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";
4952
- })(), A = f != null && f.created_at ? Ki(new Date(f.created_at)) : "", S = f ? Oe(f) : !1, I = o ? o(f, _) : `${S ? "✨ " : ""}${_}`, L = n ?? 0;
4944
+ const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4945
+ 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";
4946
+ })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4953
4947
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4954
4948
  channelId: t == null ? void 0 : t.id,
4955
4949
  isSelected: p,
4956
4950
  participantName: w,
4957
- unreadCount: L,
4958
- hasTimestamp: !!A
4951
+ unreadCount: D,
4952
+ hasTimestamp: !!S
4959
4953
  }), /* @__PURE__ */ s(
4960
4954
  "div",
4961
4955
  {
4962
4956
  role: "button",
4963
4957
  tabIndex: 0,
4964
4958
  onClick: g,
4965
- onKeyDown: b,
4959
+ onKeyDown: c,
4966
4960
  className: k(
4967
4961
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4968
4962
  {
@@ -4973,11 +4967,11 @@ const js = U.createContext({
4973
4967
  "data-dd-privacy": "mask",
4974
4968
  children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
4975
4969
  /* @__PURE__ */ s(
4976
- ne,
4970
+ se,
4977
4971
  {
4978
- id: ((z = c == null ? void 0 : c.user) == null ? void 0 : z.id) || t.id || "unknown",
4972
+ id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || t.id || "unknown",
4979
4973
  name: w,
4980
- image: v,
4974
+ image: b,
4981
4975
  size: 48,
4982
4976
  starred: h
4983
4977
  }
@@ -4996,11 +4990,11 @@ const js = U.createContext({
4996
4990
  ]
4997
4991
  }
4998
4992
  ),
4999
- A && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: A })
4993
+ S && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: S })
5000
4994
  ] }),
5001
4995
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5002
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: I }),
5003
- 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 })
4996
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
4997
+ 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 })
5004
4998
  ] })
5005
4999
  ] })
5006
5000
  ] })
@@ -5009,32 +5003,32 @@ const js = U.createContext({
5009
5003
  }
5010
5004
  );
5011
5005
  Bs.displayName = "CustomChannelPreview";
5012
- const Ji = { last_message_at: -1 }, Zi = U.memo(
5006
+ const Qi = { last_message_at: -1 }, el = U.memo(
5013
5007
  ({
5014
5008
  onChannelSelect: e,
5015
5009
  selectedChannel: t,
5016
5010
  filters: n,
5017
5011
  allowNewMessagesFromUnfilteredChannels: a = !1,
5018
5012
  channelRenderFilterFn: r,
5019
- sort: i = Ji,
5013
+ sort: i = Qi,
5020
5014
  className: l,
5021
5015
  customEmptyStateIndicator: o,
5022
- channelListPaginator: d = Tn,
5016
+ channelListPaginator: d = An,
5023
5017
  channelPreview: u,
5024
5018
  renderMessagePreview: p,
5025
5019
  viewerLanguage: h
5026
5020
  }) => {
5027
5021
  const g = U.useRef(0);
5028
5022
  g.current++;
5029
- const { debug: b = !1 } = it(), c = U.useCallback(
5030
- (v) => {
5031
- for (const f of v)
5032
- Yi(f);
5033
- return r ? r(v) : v;
5023
+ const { debug: c = !1 } = lt(), v = U.useCallback(
5024
+ (b) => {
5025
+ for (const f of b)
5026
+ Wi(f);
5027
+ return r ? r(b) : b;
5034
5028
  },
5035
5029
  [r]
5036
5030
  );
5037
- b && console.log("📺 [ChannelList] 🔄 RENDER START", {
5031
+ c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5038
5032
  renderCount: g.current,
5039
5033
  selectedChannelId: t == null ? void 0 : t.id,
5040
5034
  filters: n
@@ -5043,7 +5037,7 @@ const Ji = { last_message_at: -1 }, Zi = U.memo(
5043
5037
  () => ({
5044
5038
  selectedChannel: t,
5045
5039
  onChannelSelect: e,
5046
- debug: b,
5040
+ debug: c,
5047
5041
  channelPreview: u,
5048
5042
  renderMessagePreview: p,
5049
5043
  viewerLanguage: h
@@ -5051,7 +5045,7 @@ const Ji = { last_message_at: -1 }, Zi = U.memo(
5051
5045
  [
5052
5046
  t,
5053
5047
  e,
5054
- b,
5048
+ c,
5055
5049
  u,
5056
5050
  p,
5057
5051
  h
@@ -5064,14 +5058,14 @@ const Ji = { last_message_at: -1 }, Zi = U.memo(
5064
5058
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5065
5059
  l
5066
5060
  ),
5067
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(qi, { value: w, children: /* @__PURE__ */ s(
5068
- In,
5061
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5062
+ Tn,
5069
5063
  {
5070
5064
  filters: n,
5071
5065
  sort: i,
5072
5066
  options: { limit: 30 },
5073
5067
  allowNewMessagesFromUnfilteredChannels: a,
5074
- channelRenderFilterFn: c,
5068
+ channelRenderFilterFn: v,
5075
5069
  Paginator: d,
5076
5070
  Preview: Bs,
5077
5071
  EmptyStateIndicator: o
@@ -5082,8 +5076,8 @@ const Ji = { last_message_at: -1 }, Zi = U.memo(
5082
5076
  );
5083
5077
  }
5084
5078
  );
5085
- Zi.displayName = "ChannelList";
5086
- const Qi = ({
5079
+ el.displayName = "ChannelList";
5080
+ const tl = ({
5087
5081
  question: e,
5088
5082
  onClick: t,
5089
5083
  loading: n = !1,
@@ -5105,7 +5099,7 @@ const Qi = ({
5105
5099
  ),
5106
5100
  children: e
5107
5101
  }
5108
- ), hl = ({
5102
+ ), gl = ({
5109
5103
  faqs: e,
5110
5104
  onFaqClick: t,
5111
5105
  loadingFaqId: n,
@@ -5117,7 +5111,7 @@ const Qi = ({
5117
5111
  const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5118
5112
  return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5119
5113
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5120
- ne,
5114
+ se,
5121
5115
  {
5122
5116
  id: l || "account",
5123
5117
  name: l || "Account",
@@ -5134,7 +5128,7 @@ const Qi = ({
5134
5128
  children: [
5135
5129
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5136
5130
  o.map((d) => /* @__PURE__ */ s(
5137
- Qi,
5131
+ tl,
5138
5132
  {
5139
5133
  question: d.question,
5140
5134
  onClick: () => t(d.id),
@@ -5149,39 +5143,39 @@ const Qi = ({
5149
5143
  };
5150
5144
  export {
5151
5145
  bs as A,
5152
- ul as B,
5153
- Ui as C,
5154
- jr as D,
5155
- va as E,
5156
- hl as F,
5157
- ta as G,
5146
+ hl as B,
5147
+ Gi as C,
5148
+ Br as D,
5149
+ xa as E,
5150
+ gl as F,
5151
+ sa as G,
5158
5152
  es as L,
5159
- cl as M,
5160
- _e as a,
5161
- ne as b,
5162
- Zi as c,
5153
+ ul as M,
5154
+ Ne as a,
5155
+ se as b,
5156
+ el as c,
5163
5157
  $s as d,
5164
- dl as e,
5165
- Qi as f,
5166
- oe as g,
5158
+ ml as e,
5159
+ tl as f,
5160
+ le as g,
5167
5161
  Zt as h,
5168
- Ne as i,
5169
- Yr as j,
5170
- ol as k,
5171
- ml as l,
5172
- ar as m,
5173
- tr as n,
5174
- Ki as o,
5175
- nr as p,
5162
+ ye as i,
5163
+ qr as j,
5164
+ dl as k,
5165
+ fl as l,
5166
+ rr as m,
5167
+ sr as n,
5168
+ Zi as o,
5169
+ ar as p,
5176
5170
  hs as q,
5177
5171
  we as r,
5178
5172
  ws as s,
5179
- ra as t,
5180
- Wa as u,
5181
- xa as v,
5173
+ ia as t,
5174
+ Xa as u,
5175
+ wa as v,
5182
5176
  Ue as w,
5183
- mt as x,
5184
- ht as y,
5185
- ot as z
5177
+ ht as x,
5178
+ ft as y,
5179
+ ct as z
5186
5180
  };
5187
- //# sourceMappingURL=index-Dy-mY8YE.js.map
5181
+ //# sourceMappingURL=index-DcEVHNS3.js.map