@linktr.ee/messaging-react 3.9.1-rc-1783580113 → 3.9.1-rc-1783580497

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 (34) hide show
  1. package/dist/{Card-t7hyYqE2.js → Card-B54RRcbp.js} +3 -3
  2. package/dist/{Card-t7hyYqE2.js.map → Card-B54RRcbp.js.map} +1 -1
  3. package/dist/{Card-Bm6-f8ki.cjs → Card-B8f6KX7F.cjs} +2 -2
  4. package/dist/{Card-Bm6-f8ki.cjs.map → Card-B8f6KX7F.cjs.map} +1 -1
  5. package/dist/{Card-BacmKRPX.cjs → Card-BPBVesM6.cjs} +2 -2
  6. package/dist/{Card-BacmKRPX.cjs.map → Card-BPBVesM6.cjs.map} +1 -1
  7. package/dist/{Card-CbRJaszK.js → Card-DKBW4iY7.js} +2 -2
  8. package/dist/{Card-CbRJaszK.js.map → Card-DKBW4iY7.js.map} +1 -1
  9. package/dist/{Card-BAWe1nw6.cjs → Card-S1VJxeZ_.cjs} +2 -2
  10. package/dist/{Card-BAWe1nw6.cjs.map → Card-S1VJxeZ_.cjs.map} +1 -1
  11. package/dist/{Card-CT51GZA-.js → Card-VmLMt6vQ.js} +2 -2
  12. package/dist/{Card-CT51GZA-.js.map → Card-VmLMt6vQ.js.map} +1 -1
  13. package/dist/{LockedThumbnail-D2AyOLj7.cjs → LockedThumbnail-BMqj203z.cjs} +2 -2
  14. package/dist/{LockedThumbnail-D2AyOLj7.cjs.map → LockedThumbnail-BMqj203z.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-DA2ypEZM.js → LockedThumbnail-z7Xnw4K_.js} +2 -2
  16. package/dist/{LockedThumbnail-DA2ypEZM.js.map → LockedThumbnail-z7Xnw4K_.js.map} +1 -1
  17. package/dist/{index-C2r41RoF.js → index-CD2uC47U.js} +1171 -1191
  18. package/dist/index-CD2uC47U.js.map +1 -0
  19. package/dist/index-OfsiVKqy.cjs +2 -0
  20. package/dist/index-OfsiVKqy.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelHeaderRedesign.tsx +1 -8
  25. package/src/components/ChannelView.tsx +9 -12
  26. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +29 -11
  27. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +19 -27
  28. package/src/components/CustomMessage/StreamAttachmentMessage.stories.tsx +12 -19
  29. package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +26 -44
  30. package/src/components/CustomMessage/StreamAttachmentMessage.tsx +43 -37
  31. package/src/components/CustomMessage/index.tsx +21 -9
  32. package/dist/index-C2r41RoF.js.map +0 -1
  33. package/dist/index-DgqwF0XA.cjs +0 -2
  34. package/dist/index-DgqwF0XA.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as s, jsxs as u, Fragment as te } from "react/jsx-runtime";
2
- import V, { createContext as lt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as se, Suspense as ot } from "react";
1
+ import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
+ import V, { createContext as rt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as ae, Suspense as it } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Ys, LinkPreviewsManager as Wt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as le, useChatContext as oe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, MessageErrorIcon as et, MessageText as tt, 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, 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 st, CurrencyDollarIcon as Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as nt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, 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";
4
+ import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
+ import { Chat as qs, useChannelStateContext as le, 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 Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, 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
8
  import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = lt({
9
+ const us = rt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = lt({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), ct = () => Ie(us), ll = ({
19
+ }), lt = () => Ie(us), dl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -25,10 +25,10 @@ const us = lt({
25
25
  debug: i = !1,
26
26
  client: o
27
27
  }) => {
28
- var I, M;
28
+ var S, R;
29
29
  const l = Z(
30
- (T, ...z) => {
31
- i && console.log(`🔥 [MessagingProvider] ${T}`, ...z);
30
+ (E, ...z) => {
31
+ i && console.log(`🔥 [MessagingProvider] ${E}`, ...z);
32
32
  },
33
33
  [i]
34
34
  );
@@ -38,71 +38,71 @@ const us = lt({
38
38
  serviceConfig: !!n,
39
39
  capabilities: Object.keys(r)
40
40
  });
41
- const [d, m] = U(null), [p, h] = U(null), [g, c] = U(!1), [b, x] = U(!1), [v, f] = U(null), N = G(!1), w = G(null), C = G(n);
41
+ const [d, u] = U(null), [p, h] = U(null), [f, c] = U(!1), [v, w] = U(!1), [b, g] = U(null), x = G(!1), N = G(null), C = G(n);
42
42
  C.current = n;
43
- const R = G(i);
44
- R.current = i;
45
- const S = G({
43
+ const T = G(i);
44
+ T.current = i;
45
+ const A = G({
46
46
  userId: t == null ? void 0 : t.id,
47
47
  apiKey: a,
48
48
  serviceConfig: n,
49
49
  capabilities: r
50
- }), D = G(0);
51
- D.current++, l("📊 RENDER INFO", {
52
- renderCount: D.current,
50
+ }), L = G(0);
51
+ L.current++, l("📊 RENDER INFO", {
52
+ renderCount: L.current,
53
53
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
54
54
  propChanges: {
55
- userChanged: S.current.userId !== (t == null ? void 0 : t.id),
56
- apiKeyChanged: S.current.apiKey !== a,
57
- serviceConfigChanged: S.current.serviceConfig !== n,
58
- capabilitiesChanged: S.current.capabilities !== r
55
+ userChanged: A.current.userId !== (t == null ? void 0 : t.id),
56
+ apiKeyChanged: A.current.apiKey !== a,
57
+ serviceConfigChanged: A.current.serviceConfig !== n,
58
+ capabilitiesChanged: A.current.capabilities !== r
59
59
  }
60
- }), S.current = {
60
+ }), A.current = {
61
61
  userId: t == null ? void 0 : t.id,
62
62
  apiKey: a,
63
63
  serviceConfig: n,
64
64
  capabilities: r
65
65
  };
66
66
  const $ = G(null);
67
- !o && a && ((I = $.current) == null ? void 0 : I.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
68
- const F = o || (a ? ((M = $.current) == null ? void 0 : M.client) ?? null : null);
67
+ !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
68
+ const F = o || (a ? ((R = $.current) == null ? void 0 : R.client) ?? null : null);
69
69
  J(() => {
70
- const T = D.current, z = C.current;
70
+ const E = L.current, z = C.current;
71
71
  if (o) {
72
- w.current = null, m(null), h(null), c(!1), f(null), x(!1);
72
+ N.current = null, u(null), h(null), c(!1), g(null), w(!1);
73
73
  return;
74
74
  }
75
75
  if (!a || !F || !z) {
76
76
  l("⚠️ SERVICE INIT SKIPPED", {
77
- renderCount: T,
77
+ renderCount: E,
78
78
  reason: "Missing apiKey, client, or serviceConfig"
79
79
  });
80
80
  return;
81
81
  }
82
82
  l("🚀 CREATING SERVICE", {
83
- renderCount: T,
83
+ renderCount: E,
84
84
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
85
85
  });
86
86
  const O = new Hs({
87
87
  ...z,
88
88
  apiKey: a,
89
- debug: R.current,
89
+ debug: T.current,
90
90
  client: F
91
91
  });
92
- w.current = O, m(O), l("✅ SERVICE SET", {
93
- renderCount: T,
92
+ N.current = O, u(O), l("✅ SERVICE SET", {
93
+ renderCount: E,
94
94
  serviceInstance: !!O
95
95
  });
96
96
  }, [a, F, o]);
97
- const L = G(null);
97
+ const D = G(null);
98
98
  J(() => {
99
99
  var z, O;
100
100
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
101
101
  hasService: !!d,
102
102
  hasUser: !!t,
103
103
  userId: t == null ? void 0 : t.id,
104
- isConnecting: N.current,
105
- isConnected: g,
104
+ isConnecting: x.current,
105
+ isConnected: f,
106
106
  dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
107
107
  }), o)
108
108
  return;
@@ -110,11 +110,11 @@ const us = lt({
110
110
  l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
111
111
  return;
112
112
  }
113
- if (N.current) {
113
+ if (x.current) {
114
114
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
115
115
  return;
116
116
  }
117
- if (((z = L.current) == null ? void 0 : z.serviceId) === d && ((O = L.current) == null ? void 0 : O.userId) === t.id) {
117
+ if (((z = D.current) == null ? void 0 : z.serviceId) === d && ((O = D.current) == null ? void 0 : O.userId) === t.id) {
118
118
  l(
119
119
  "⚠️ USER CONNECTION SKIPPED",
120
120
  "Already connected this user with this service"
@@ -122,32 +122,32 @@ const us = lt({
122
122
  return;
123
123
  }
124
124
  (async () => {
125
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, x(!0), f(null);
125
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), x.current = !0, w(!0), g(null);
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
128
  const j = await d.connectUser(t);
129
- h(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
+ h(j), c(!0), D.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
130
130
  userId: t.id,
131
131
  clientId: j.userID
132
132
  });
133
133
  } catch (j) {
134
134
  const X = j instanceof Error ? j.message : "Connection failed";
135
- f(X), l("❌ USER CONNECTION ERROR", {
135
+ g(X), l("❌ USER CONNECTION ERROR", {
136
136
  userId: t.id,
137
137
  error: X
138
138
  });
139
139
  } finally {
140
- x(!1), N.current = !1, l("🔄 USER CONNECTION FINISHED", {
140
+ w(!1), x.current = !1, l("🔄 USER CONNECTION FINISHED", {
141
141
  userId: t.id,
142
- isConnected: g
142
+ isConnected: f
143
143
  });
144
144
  }
145
145
  })();
146
- }, [d, t, l, g, o]), J(() => {
147
- const T = F;
146
+ }, [d, t, l, f, o]), J(() => {
147
+ const E = F;
148
148
  return () => {
149
149
  var z;
150
- T && (L.current = null, (z = w.current) == null || z.disconnectUser().catch(console.error));
150
+ E && (D.current = null, (z = N.current) == null || z.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [F]);
153
153
  const y = Z(async () => {
@@ -159,27 +159,27 @@ const us = lt({
159
159
  l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
160
160
  return;
161
161
  }
162
- l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), x(!0);
162
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
163
163
  try {
164
164
  l("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
165
- const T = await d.connectUser(t);
166
- h(T), c(!0), f(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
- } catch (T) {
168
- const z = T instanceof Error ? T.message : "Refresh failed";
169
- f(z), l("❌ CONNECTION REFRESH ERROR", {
165
+ const E = await d.connectUser(t);
166
+ h(E), c(!0), g(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
+ } catch (E) {
168
+ const z = E instanceof Error ? E.message : "Refresh failed";
169
+ g(z), l("❌ CONNECTION REFRESH ERROR", {
170
170
  userId: t.id,
171
171
  error: z
172
172
  });
173
173
  } finally {
174
- x(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
174
+ w(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
175
175
  }
176
176
  }
177
- }, [d, t, l, o]), E = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
177
+ }, [d, t, l, o]), I = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
178
178
  hasService: !!d,
179
179
  hasClient: !!p,
180
- isConnected: g,
181
- isLoading: b,
182
- hasError: !!v,
180
+ isConnected: f,
181
+ isLoading: v,
182
+ hasError: !!b,
183
183
  capabilitiesKeys: Object.keys(r)
184
184
  }), {
185
185
  // With an injected client, expose no service — the injected client owns
@@ -192,9 +192,9 @@ const us = lt({
192
192
  // path's `client`/`isLoading`/`error` (from connectUser) must not leak
193
193
  // through if the same provider previously attempted an apiKey connect.
194
194
  client: o ?? p,
195
- isConnected: o ? !0 : g,
196
- isLoading: o ? !1 : b,
197
- error: o ? null : v,
195
+ isConnected: o ? !0 : f,
196
+ isLoading: o ? !1 : v,
197
+ error: o ? null : b,
198
198
  capabilities: r,
199
199
  refreshConnection: y,
200
200
  debug: i
@@ -202,19 +202,19 @@ const us = lt({
202
202
  d,
203
203
  p,
204
204
  o,
205
- g,
206
- b,
205
+ f,
207
206
  v,
207
+ b,
208
208
  r,
209
209
  y,
210
210
  i,
211
211
  l
212
212
  ]);
213
213
  return l("🔄 RENDER END", {
214
- renderCount: D.current,
214
+ renderCount: L.current,
215
215
  willRenderChat: !!F,
216
- contextValueReady: !!E
217
- }), /* @__PURE__ */ s(us.Provider, { value: E, children: F ? /* @__PURE__ */ s(
216
+ contextValueReady: !!I
217
+ }), /* @__PURE__ */ s(us.Provider, { value: I, children: F ? /* @__PURE__ */ s(
218
218
  qs,
219
219
  {
220
220
  client: F,
@@ -224,7 +224,7 @@ const us = lt({
224
224
  children: e
225
225
  }
226
226
  ) : e });
227
- }, sa = () => ct(), dt = (e) => {
227
+ }, sa = () => lt(), ot = (e) => {
228
228
  var a, r;
229
229
  const [t, n] = U(
230
230
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -273,7 +273,7 @@ function Kt(e, t) {
273
273
  const n = e == null ? void 0 : e.trim();
274
274
  return !n || t && n === t ? !1 : !ia(n);
275
275
  }
276
- function ut(e) {
276
+ function ct(e) {
277
277
  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";
278
278
  }
279
279
  const Jt = [
@@ -321,7 +321,7 @@ function oa(e) {
321
321
  function ca(e) {
322
322
  return ms(e).bgColor;
323
323
  }
324
- const ne = ({
324
+ const se = ({
325
325
  id: e,
326
326
  image: t,
327
327
  size: n = 40,
@@ -330,7 +330,7 @@ const ne = ({
330
330
  shape: i = "squircle",
331
331
  dmAgentEnabled: o = !1
332
332
  }) => {
333
- const l = oa(e), d = ca(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
333
+ const l = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, f = 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(
334
334
  "img",
335
335
  {
336
336
  src: t,
@@ -348,7 +348,7 @@ const ne = ({
348
348
  children: l
349
349
  }
350
350
  ) });
351
- return /* @__PURE__ */ u(
351
+ return /* @__PURE__ */ m(
352
352
  "div",
353
353
  {
354
354
  className: k(
@@ -382,13 +382,13 @@ const ne = ({
382
382
  style: {
383
383
  ...c,
384
384
  ...o && {
385
- borderWidth: `${g}px`,
385
+ borderWidth: `${f}px`,
386
386
  borderStyle: "solid",
387
387
  borderColor: "var(--AI-Gradient, #7F22FE)",
388
388
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
389
389
  }
390
390
  },
391
- children: b
391
+ children: v
392
392
  }
393
393
  )
394
394
  ]
@@ -404,81 +404,81 @@ const ne = ({
404
404
  onDeleteConversationClick: o,
405
405
  onBlockParticipantClick: l,
406
406
  onReportParticipantClick: d,
407
- onActionComplete: m,
407
+ onActionComplete: u,
408
408
  logLabel: p = "useChannelModerationActions"
409
409
  }) => {
410
- var E;
411
- const { service: h, debug: g } = ct(), c = (E = t == null ? void 0 : t.user) == null ? void 0 : E.id, b = !!(a && n && h && c), [x, v] = U(!1), [f, N] = U(null), [w, C] = U(!1), [R, S] = U(!1), D = b && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
410
+ var I;
411
+ const { service: h, debug: f } = lt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, v = !!(a && n && h && c), [w, b] = U(!1), [g, x] = U(null), [N, C] = U(!1), [T, A] = U(!1), L = v && ((g == null ? void 0 : g.participantId) !== c || (g == null ? void 0 : g.service) !== h);
412
412
  return J(() => {
413
- if (!b || !h || !c) {
414
- v(!1), N(null);
413
+ if (!v || !h || !c) {
414
+ b(!1), x(null);
415
415
  return;
416
416
  }
417
- let I = !1;
417
+ let S = !1;
418
418
  return (async () => {
419
419
  try {
420
- const M = await h.getBlockedUsers();
421
- if (I) return;
422
- v(
423
- M.some(
424
- (T) => T.blocked_user_id === c
420
+ const R = await h.getBlockedUsers();
421
+ if (S) return;
422
+ b(
423
+ R.some(
424
+ (E) => E.blocked_user_id === c
425
425
  )
426
426
  );
427
- } catch (M) {
428
- I || console.error(`[${p}] Failed to check blocked status:`, M);
427
+ } catch (R) {
428
+ S || console.error(`[${p}] Failed to check blocked status:`, R);
429
429
  } finally {
430
- I || N({ participantId: c, service: h });
430
+ S || x({ participantId: c, service: h });
431
431
  }
432
432
  })(), () => {
433
- I = !0;
433
+ S = !0;
434
434
  };
435
- }, [b, h, c, p]), {
436
- isParticipantBlocked: x,
437
- isCheckingBlockedStatus: D,
438
- isLeaving: w,
439
- isUpdatingBlockStatus: R,
435
+ }, [v, h, c, p]), {
436
+ isParticipantBlocked: w,
437
+ isCheckingBlockedStatus: L,
438
+ isLeaving: N,
439
+ isUpdatingBlockStatus: T,
440
440
  handleLeaveConversation: async () => {
441
- var I;
442
- if (!w) {
443
- o == null || o(), g && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
441
+ var S;
442
+ if (!N) {
443
+ o == null || o(), f && console.log(`[${p}] Leave conversation`, e.cid), C(!0);
444
444
  try {
445
- const M = ((I = e._client) == null ? void 0 : I.userID) ?? null;
446
- await e.hide(M, !1), r && await r(e), m == null || m();
447
- } catch (M) {
448
- console.error(`[${p}] Failed to leave conversation`, M);
445
+ const R = ((S = e._client) == null ? void 0 : S.userID) ?? null;
446
+ await e.hide(R, !1), r && await r(e), u == null || u();
447
+ } catch (R) {
448
+ console.error(`[${p}] Failed to leave conversation`, R);
449
449
  } finally {
450
450
  C(!1);
451
451
  }
452
452
  }
453
453
  },
454
454
  handleBlockUser: async () => {
455
- var I, M, T;
456
- if (!(R || !h)) {
457
- l == null || l(), g && console.log(`[${p}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
455
+ var S, R, E;
456
+ if (!(T || !h)) {
457
+ l == null || l(), f && console.log(`[${p}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), A(!0);
458
458
  try {
459
- await h.blockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
459
+ await h.blockUser((R = t == null ? void 0 : t.user) == null ? void 0 : R.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
460
460
  } catch (z) {
461
461
  console.error(`[${p}] Failed to block member`, z);
462
462
  } finally {
463
- S(!1);
463
+ A(!1);
464
464
  }
465
465
  }
466
466
  },
467
467
  handleUnblockUser: async () => {
468
- var I, M, T;
469
- if (!(R || !h)) {
470
- l == null || l(), g && console.log(`[${p}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), S(!0);
468
+ var S, R, E;
469
+ if (!(T || !h)) {
470
+ l == null || l(), f && console.log(`[${p}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), A(!0);
471
471
  try {
472
- await h.unBlockUser((M = t == null ? void 0 : t.user) == null ? void 0 : M.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
472
+ await h.unBlockUser((R = t == null ? void 0 : t.user) == null ? void 0 : R.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), u == null || u();
473
473
  } catch (z) {
474
474
  console.error(`[${p}] Failed to unblock member`, z);
475
475
  } finally {
476
- S(!1);
476
+ A(!1);
477
477
  }
478
478
  }
479
479
  },
480
480
  handleReportUser: () => {
481
- d == null || d(), m == null || m(), window.open(da, "_blank", "noopener,noreferrer");
481
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
482
482
  }
483
483
  };
484
484
  }, Ne = ({
@@ -498,7 +498,7 @@ const ne = ({
498
498
  ...a,
499
499
  children: n
500
500
  }
501
- ), at = ({
501
+ ), st = ({
502
502
  channel: e,
503
503
  participant: t,
504
504
  showDeleteConversation: n = !0,
@@ -508,91 +508,91 @@ const ne = ({
508
508
  onBlockParticipant: o,
509
509
  onDeleteConversationClick: l,
510
510
  onBlockParticipantClick: d,
511
- onReportParticipantClick: m,
511
+ onReportParticipantClick: u,
512
512
  customChannelActions: p,
513
513
  triggerClassName: h
514
514
  }) => {
515
- const [g, c] = U(!1), b = G(null), x = Gs(), v = Z(() => c(!1), []), {
516
- isParticipantBlocked: f,
517
- isCheckingBlockedStatus: N,
518
- isLeaving: w,
515
+ const [f, c] = U(!1), v = G(null), w = Gs(), b = Z(() => c(!1), []), {
516
+ isParticipantBlocked: g,
517
+ isCheckingBlockedStatus: x,
518
+ isLeaving: N,
519
519
  isUpdatingBlockStatus: C,
520
- handleLeaveConversation: R,
521
- handleBlockUser: S,
522
- handleUnblockUser: D,
520
+ handleLeaveConversation: T,
521
+ handleBlockUser: A,
522
+ handleUnblockUser: L,
523
523
  handleReportUser: $
524
524
  } = ua({
525
525
  channel: e,
526
526
  participant: t,
527
527
  showBlockParticipant: a,
528
- enabled: g,
528
+ enabled: f,
529
529
  onLeaveConversation: i,
530
530
  onBlockParticipant: o,
531
531
  onDeleteConversationClick: l,
532
532
  onBlockParticipantClick: d,
533
- onReportParticipantClick: m,
534
- onActionComplete: v,
533
+ onReportParticipantClick: u,
534
+ onActionComplete: b,
535
535
  logLabel: "ChannelActionsMenu"
536
536
  });
537
537
  return J(() => {
538
- if (!g) return;
539
- const L = (E) => {
540
- b.current && !b.current.contains(E.target) && c(!1);
541
- }, y = (E) => {
542
- E.key === "Escape" && c(!1);
538
+ if (!f) return;
539
+ const D = (I) => {
540
+ v.current && !v.current.contains(I.target) && c(!1);
541
+ }, y = (I) => {
542
+ I.key === "Escape" && c(!1);
543
543
  };
544
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", y), () => {
545
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", y);
544
+ return document.addEventListener("mousedown", D), document.addEventListener("keydown", y), () => {
545
+ document.removeEventListener("mousedown", D), document.removeEventListener("keydown", y);
546
546
  };
547
- }, [g]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ u("div", { ref: b, className: "relative", children: [
548
- /* @__PURE__ */ u(
547
+ }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
548
+ /* @__PURE__ */ m(
549
549
  "button",
550
550
  {
551
551
  className: h,
552
552
  type: "button",
553
553
  "aria-haspopup": "true",
554
- "aria-expanded": g,
555
- "aria-controls": g ? x : void 0,
556
- onClick: () => c((L) => !L),
554
+ "aria-expanded": f,
555
+ "aria-controls": f ? w : void 0,
556
+ onClick: () => c((D) => !D),
557
557
  children: [
558
558
  /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
559
559
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
560
560
  ]
561
561
  }
562
562
  ),
563
- g && /* @__PURE__ */ s(
563
+ f && /* @__PURE__ */ s(
564
564
  "div",
565
565
  {
566
- id: x,
566
+ id: w,
567
567
  "aria-label": "Conversation options",
568
568
  className: k(
569
569
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
570
570
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
571
571
  ),
572
- children: /* @__PURE__ */ u("ul", { className: "flex flex-col gap-1", children: [
573
- n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(
572
+ children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
573
+ n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
574
574
  Ne,
575
575
  {
576
- onClick: R,
577
- disabled: w,
578
- "aria-busy": w,
576
+ onClick: T,
577
+ disabled: N,
578
+ "aria-busy": N,
579
579
  children: [
580
- w ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
580
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
582
582
  ]
583
583
  }
584
584
  ) }),
585
- a && /* @__PURE__ */ s("li", { children: N ? (
585
+ a && /* @__PURE__ */ s("li", { children: x ? (
586
586
  // Block status not yet resolved — show a disabled placeholder
587
587
  // so a premature click can't act on a stale block state.
588
- /* @__PURE__ */ u(Ne, { disabled: !0, "aria-busy": !0, children: [
588
+ /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
589
589
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
590
590
  /* @__PURE__ */ s("span", { children: "Block" })
591
591
  ] })
592
- ) : f ? /* @__PURE__ */ u(
592
+ ) : g ? /* @__PURE__ */ m(
593
593
  Ne,
594
594
  {
595
- onClick: D,
595
+ onClick: L,
596
596
  disabled: C,
597
597
  "aria-busy": C,
598
598
  children: [
@@ -600,10 +600,10 @@ const ne = ({
600
600
  /* @__PURE__ */ s("span", { children: "Unblock" })
601
601
  ]
602
602
  }
603
- ) : /* @__PURE__ */ u(
603
+ ) : /* @__PURE__ */ m(
604
604
  Ne,
605
605
  {
606
- onClick: S,
606
+ onClick: A,
607
607
  disabled: C,
608
608
  "aria-busy": C,
609
609
  children: [
@@ -612,7 +612,7 @@ const ne = ({
612
612
  ]
613
613
  }
614
614
  ) }),
615
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(Ne, { variant: "danger", onClick: $, children: [
615
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: $, children: [
616
616
  /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
617
617
  /* @__PURE__ */ s("span", { children: "Report" })
618
618
  ] }) }),
@@ -625,181 +625,171 @@ const ne = ({
625
625
  const t = e;
626
626
  return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
627
627
  }, pa = ({
628
- className: e,
629
- onBack: t,
630
- showBackButton: n,
631
- showStarButton: a = !1,
632
- dmAgentEnabled: r = !1,
633
- onLeaveConversation: i,
634
- onBlockParticipant: o,
635
- showDeleteConversation: l = !0,
636
- showBlockParticipant: d = !0,
637
- showReportParticipant: m = !0,
638
- onDeleteConversationClick: p,
639
- onBlockParticipantClick: h,
640
- onReportParticipantClick: g,
641
- customChannelActions: c,
642
- renderChannelActions: b,
643
- showChannelInfo: x = !0,
644
- onParticipantNameClick: v
628
+ onBack: e,
629
+ showBackButton: t,
630
+ showStarButton: n = !1,
631
+ dmAgentEnabled: a = !1,
632
+ onLeaveConversation: r,
633
+ onBlockParticipant: i,
634
+ showDeleteConversation: o = !0,
635
+ showBlockParticipant: l = !0,
636
+ showReportParticipant: d = !0,
637
+ onDeleteConversationClick: u,
638
+ onBlockParticipantClick: p,
639
+ onReportParticipantClick: h,
640
+ customChannelActions: f,
641
+ renderChannelActions: c,
642
+ showChannelInfo: v = !0,
643
+ onParticipantNameClick: w
645
644
  }) => {
646
- var F, L, y;
647
- const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
645
+ var $, F, D;
646
+ const { channel: b } = le(), { client: g } = me(), x = V.useMemo(
648
647
  () => {
649
- var E;
648
+ var y;
650
649
  return je(
651
- (E = f.state) == null ? void 0 : E.members,
652
- N == null ? void 0 : N.userID,
653
- f.type
650
+ (y = b.state) == null ? void 0 : y.members,
651
+ g == null ? void 0 : g.userID,
652
+ b.type
654
653
  );
655
654
  },
656
- [(F = f.state) == null ? void 0 : F.members, N == null ? void 0 : N.userID, f.type]
657
- ), C = ut(w == null ? void 0 : w.user), R = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = dt(f), D = ga(w), $ = async () => {
655
+ [($ = b.state) == null ? void 0 : $.members, g == null ? void 0 : g.userID, b.type]
656
+ ), N = ct(x == null ? void 0 : x.user), C = (F = x == null ? void 0 : x.user) == null ? void 0 : F.image, T = ot(b), A = ga(x), L = async () => {
658
657
  try {
659
- S ? await f.unpin() : await f.pin();
660
- } catch (E) {
658
+ T ? await b.unpin() : await b.pin();
659
+ } catch (y) {
661
660
  console.error(
662
661
  "[ChannelHeaderRedesign] Failed to update pinned status:",
663
- E
662
+ y
664
663
  );
665
664
  }
666
665
  };
667
- return /* @__PURE__ */ s(
668
- "div",
669
- {
670
- className: k(
671
- "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
672
- e
673
- ),
674
- children: /* @__PURE__ */ u("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
675
- /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
676
- "button",
677
- {
678
- className: k(
679
- We,
680
- "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
681
- ),
682
- onClick: t || (() => {
683
- }),
684
- type: "button",
685
- "aria-label": "Back to conversations",
686
- children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
687
- }
688
- ) }),
689
- /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ u(
690
- "button",
691
- {
692
- type: "button",
693
- onClick: v,
694
- "aria-label": `View details for ${C}`,
695
- 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",
696
- children: [
697
- /* @__PURE__ */ s(
698
- ne,
699
- {
700
- id: ((y = w == null ? void 0 : w.user) == null ? void 0 : y.id) || f.id || "unknown",
701
- name: C,
702
- image: R,
703
- dmAgentEnabled: r,
704
- shape: "circle",
705
- size: 48,
706
- className: "-mb-2"
707
- }
708
- ),
709
- /* @__PURE__ */ u("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: [
710
- /* @__PURE__ */ u("span", { className: "flex max-w-full items-center justify-center", children: [
711
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: C }),
712
- /* @__PURE__ */ u("span", { className: "ml-2 flex gap-1", children: [
713
- D && /* @__PURE__ */ s(
714
- "span",
715
- {
716
- "aria-label": "Paid customer",
717
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
718
- children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
719
- }
720
- ),
721
- a && S && /* @__PURE__ */ s(
722
- "span",
723
- {
724
- "aria-label": "Starred conversation",
725
- className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
726
- children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
727
- }
728
- ),
729
- /* @__PURE__ */ s(
730
- ve,
731
- {
732
- "aria-hidden": "true",
733
- className: "size-4 shrink-0 text-black/65",
734
- weight: "bold"
735
- }
736
- )
737
- ] })
738
- ] }),
739
- r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
740
- /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
741
- /* @__PURE__ */ s("span", { children: ha })
742
- ] })
743
- ] })
744
- ]
745
- }
746
- ) }),
747
- /* @__PURE__ */ u("div", { className: "flex items-start justify-end gap-2", children: [
748
- a && /* @__PURE__ */ s(
749
- "button",
666
+ return /* @__PURE__ */ s("div", { className: "@container w-full bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", children: /* @__PURE__ */ m("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
667
+ /* @__PURE__ */ s("div", { className: "flex items-start", children: t && /* @__PURE__ */ s(
668
+ "button",
669
+ {
670
+ className: k(
671
+ We,
672
+ "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
673
+ ),
674
+ onClick: e || (() => {
675
+ }),
676
+ type: "button",
677
+ "aria-label": "Back to conversations",
678
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
679
+ }
680
+ ) }),
681
+ /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
682
+ "button",
683
+ {
684
+ type: "button",
685
+ onClick: w,
686
+ "aria-label": `View details for ${N}`,
687
+ 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",
688
+ children: [
689
+ /* @__PURE__ */ s(
690
+ se,
750
691
  {
751
- className: We,
752
- onClick: $,
753
- type: "button",
754
- "aria-pressed": S,
755
- "aria-label": S ? "Unstar conversation" : "Star conversation",
756
- children: /* @__PURE__ */ s(
757
- Ee,
758
- {
759
- className: k("size-5", {
760
- "text-[#FFD60A]": S,
761
- "text-black/90": !S
762
- }),
763
- weight: S ? "fill" : "regular"
764
- }
765
- )
692
+ id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || b.id || "unknown",
693
+ name: N,
694
+ image: C,
695
+ dmAgentEnabled: a,
696
+ shape: "circle",
697
+ size: 48,
698
+ className: "-mb-2"
766
699
  }
767
700
  ),
768
- x && (b !== void 0 ? b : /* @__PURE__ */ s(
769
- at,
701
+ /* @__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: [
702
+ /* @__PURE__ */ m("span", { className: "flex max-w-full items-center justify-center", children: [
703
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
704
+ /* @__PURE__ */ m("span", { className: "ml-2 flex gap-1", children: [
705
+ A && /* @__PURE__ */ s(
706
+ "span",
707
+ {
708
+ "aria-label": "Paid customer",
709
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
710
+ children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
711
+ }
712
+ ),
713
+ n && T && /* @__PURE__ */ s(
714
+ "span",
715
+ {
716
+ "aria-label": "Starred conversation",
717
+ className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
718
+ children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
719
+ }
720
+ ),
721
+ /* @__PURE__ */ s(
722
+ ve,
723
+ {
724
+ "aria-hidden": "true",
725
+ className: "size-4 shrink-0 text-black/65",
726
+ weight: "bold"
727
+ }
728
+ )
729
+ ] })
730
+ ] }),
731
+ 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: [
732
+ /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
733
+ /* @__PURE__ */ s("span", { children: ha })
734
+ ] })
735
+ ] })
736
+ ]
737
+ }
738
+ ) }),
739
+ /* @__PURE__ */ m("div", { className: "flex items-start justify-end gap-2", children: [
740
+ n && /* @__PURE__ */ s(
741
+ "button",
742
+ {
743
+ className: We,
744
+ onClick: L,
745
+ type: "button",
746
+ "aria-pressed": T,
747
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
748
+ children: /* @__PURE__ */ s(
749
+ Ee,
770
750
  {
771
- channel: f,
772
- participant: w,
773
- showDeleteConversation: l,
774
- showBlockParticipant: d,
775
- showReportParticipant: m,
776
- onLeaveConversation: i,
777
- onBlockParticipant: o,
778
- onDeleteConversationClick: p,
779
- onBlockParticipantClick: h,
780
- onReportParticipantClick: g,
781
- customChannelActions: c,
782
- triggerClassName: We
751
+ className: k("size-5", {
752
+ "text-[#FFD60A]": T,
753
+ "text-black/90": !T
754
+ }),
755
+ weight: T ? "fill" : "regular"
783
756
  }
784
- ))
785
- ] })
786
- ] })
787
- }
788
- );
789
- }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
757
+ )
758
+ }
759
+ ),
760
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
761
+ st,
762
+ {
763
+ channel: b,
764
+ participant: x,
765
+ showDeleteConversation: o,
766
+ showBlockParticipant: l,
767
+ showReportParticipant: d,
768
+ onLeaveConversation: r,
769
+ onBlockParticipant: i,
770
+ onDeleteConversationClick: u,
771
+ onBlockParticipantClick: p,
772
+ onReportParticipantClick: h,
773
+ customChannelActions: f,
774
+ triggerClassName: We
775
+ }
776
+ ))
777
+ ] })
778
+ ] }) });
779
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
790
780
  function va(e) {
791
- return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
781
+ return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
792
782
  }
793
783
  function xa(e) {
794
- const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
784
+ const { channel: t } = le(), { client: n } = me("useMessageVote"), a = ae(
795
785
  () => va(e.own_reactions),
796
786
  [e.own_reactions]
797
787
  ), r = Z(async () => {
798
788
  if (n != null && n.userID)
799
789
  try {
800
- a === "up" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
790
+ a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
801
791
  e.id,
802
- { type: rt },
792
+ { type: nt },
803
793
  { enforce_unique: !0, skip_push: !0 }
804
794
  );
805
795
  } catch {
@@ -807,9 +797,9 @@ function xa(e) {
807
797
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = Z(async () => {
808
798
  if (n != null && n.userID)
809
799
  try {
810
- a === "down" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
800
+ a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
811
801
  e.id,
812
- { type: it },
802
+ { type: at },
813
803
  { enforce_unique: !0, skip_push: !0 }
814
804
  );
815
805
  } catch {
@@ -828,13 +818,13 @@ function hs({
828
818
  const n = e == null ? void 0 : e.text, a = wa(t);
829
819
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
830
820
  }
831
- const _a = V.lazy(() => import("./Card-CbRJaszK.js")), Na = V.lazy(() => import("./Card-CT51GZA-.js")), ya = V.lazy(() => import("./Card-t7hyYqE2.js")), mt = () => /* @__PURE__ */ s(
821
+ const _a = V.lazy(() => import("./Card-DKBW4iY7.js")), Na = V.lazy(() => import("./Card-VmLMt6vQ.js")), ya = V.lazy(() => import("./Card-B54RRcbp.js")), dt = () => /* @__PURE__ */ s(
832
822
  "div",
833
823
  {
834
824
  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)]",
835
825
  "aria-hidden": !0
836
826
  }
837
- ), ka = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(ot, { fallback: /* @__PURE__ */ s(mt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
827
+ ), 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 = [
838
828
  [/pdf/, "pdf"],
839
829
  [/wordprocessingml|msword|\.doc/, "doc"],
840
830
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -844,7 +834,7 @@ const _a = V.lazy(() => import("./Card-CbRJaszK.js")), Na = V.lazy(() => import(
844
834
  [/plain|rtf/, "text"],
845
835
  [/markdown/, "markdown"]
846
836
  ];
847
- function ce(e) {
837
+ function oe(e) {
848
838
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
849
839
  }
850
840
  function ps(e) {
@@ -856,7 +846,7 @@ function ps(e) {
856
846
  const Ia = {
857
847
  video: cs,
858
848
  audio: zn,
859
- image: Ln,
849
+ image: Dn,
860
850
  document: os
861
851
  }, Ta = {
862
852
  pdf: Vn,
@@ -870,7 +860,7 @@ const Ia = {
870
860
  generic: os
871
861
  };
872
862
  function Aa(e) {
873
- const t = ce(e);
863
+ const t = oe(e);
874
864
  return t !== "document" ? Ia[t] : Ta[ps(e)];
875
865
  }
876
866
  function we(e, t) {
@@ -889,76 +879,76 @@ const Ma = (e) => {
889
879
  controls: o = !0,
890
880
  showProgress: l = !1,
891
881
  muted: d = !1,
892
- onContainerClick: m
882
+ onContainerClick: u
893
883
  }) => {
894
- const p = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [x, v] = U(a), [f, N] = U(0), [w, C] = U(!1), [R, S] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [y, E] = U(!0), [I, M] = U(null), T = Z(() => {
895
- $(!1), v(!0);
884
+ const p = oe(t), h = G(null), f = G(null), c = G(null), v = G(r), [w, b] = U(a), [g, x] = U(0), [N, C] = U(!1), [T, A] = U(!1), [L, $] = U(!1), [F, D] = U(!1), [y, I] = U(!0), [S, R] = U(null), E = Z(() => {
885
+ $(!1), b(!0);
896
886
  }, []), z = Z((_) => {
897
- const A = g.current;
898
- if (!A) return 0;
899
- const H = A.getBoundingClientRect();
887
+ const M = f.current;
888
+ if (!M) return 0;
889
+ const H = M.getBoundingClientRect();
900
890
  return Math.max(
901
891
  0,
902
892
  Math.min(1, (Ma(_) - H.left) / H.width)
903
893
  );
904
894
  }, []), O = Z((_) => {
905
- const A = h.current;
906
- A && A.duration && (A.currentTime = _ * A.duration);
895
+ const M = h.current;
896
+ M && M.duration && (M.currentTime = _ * M.duration);
907
897
  }, []), j = (_) => {
908
898
  _.stopPropagation(), C(!0);
909
- const A = z(_);
910
- N(A), O(A);
899
+ const M = z(_);
900
+ x(M), O(M);
911
901
  };
912
902
  J(() => {
913
- r !== void 0 && r !== b.current && (b.current = r, v(r));
903
+ r !== void 0 && r !== v.current && (v.current = r, b(r));
914
904
  }, [r]), J(() => {
915
- if (!x) {
905
+ if (!w) {
916
906
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
917
907
  return;
918
908
  }
919
909
  const _ = () => {
920
- const A = h.current;
921
- A && A.duration && !w && N(A.currentTime / A.duration), c.current = requestAnimationFrame(_);
910
+ const M = h.current;
911
+ M && M.duration && !N && x(M.currentTime / M.duration), c.current = requestAnimationFrame(_);
922
912
  };
923
913
  return c.current = requestAnimationFrame(_), () => {
924
914
  c.current !== null && cancelAnimationFrame(c.current);
925
915
  };
926
- }, [x, w]), J(() => {
916
+ }, [w, N]), J(() => {
927
917
  const _ = h.current;
928
- _ && (x ? _.play().catch((A) => {
929
- v(!1), $(!0);
918
+ _ && (w ? _.play().catch((M) => {
919
+ b(!1), $(!0);
930
920
  }) : _.pause());
931
- }, [x]), J(() => {
932
- if (!w) return;
933
- const _ = (H) => N(z(H)), A = (H) => {
921
+ }, [w]), J(() => {
922
+ if (!N) return;
923
+ const _ = (H) => x(z(H)), M = (H) => {
934
924
  C(!1), O(z(H));
935
925
  };
936
- return window.addEventListener("mousemove", _), window.addEventListener("mouseup", A), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", A), () => {
937
- window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", A);
926
+ return window.addEventListener("mousemove", _), window.addEventListener("mouseup", M), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", M), () => {
927
+ window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", M);
938
928
  };
939
- }, [w, z, O]);
940
- const X = I ? { aspectRatio: String(I) } : void 0, ee = I ? "" : " aspect-video", K = Math.round(f * 100);
941
- return /* @__PURE__ */ u(
929
+ }, [N, z, O]);
930
+ const X = S ? { aspectRatio: String(S) } : void 0, te = S ? "" : " aspect-video", K = Math.round(g * 100);
931
+ return /* @__PURE__ */ m(
942
932
  "div",
943
933
  {
944
934
  role: "button",
945
935
  tabIndex: 0,
946
- className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
936
+ className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
947
937
  style: X,
948
938
  onClick: (_) => {
949
- if (m) {
950
- m(_);
939
+ if (u) {
940
+ u(_);
951
941
  return;
952
942
  }
953
- D || o && v((A) => !A);
943
+ L || o && b((M) => !M);
954
944
  },
955
945
  onKeyDown: (_) => {
956
946
  if (!(_.key !== "Enter" && _.key !== " ")) {
957
- if (_.preventDefault(), m) {
958
- m(_);
947
+ if (_.preventDefault(), u) {
948
+ u(_);
959
949
  return;
960
950
  }
961
- D || o && v((A) => !A);
951
+ L || o && b((M) => !M);
962
952
  }
963
953
  },
964
954
  children: [
@@ -982,14 +972,14 @@ const Ma = (e) => {
982
972
  loop: i,
983
973
  muted: d,
984
974
  style: { width: "100%", height: "100%" },
985
- onLoadStart: () => L(!0),
975
+ onLoadStart: () => D(!0),
986
976
  onCanPlay: () => {
987
- L(!1), E(!1);
977
+ D(!1), I(!1);
988
978
  },
989
- onWaiting: () => L(!0),
979
+ onWaiting: () => D(!0),
990
980
  onPlay: () => $(!1),
991
981
  onEnded: () => {
992
- i || (v(!1), N(0));
982
+ i || (b(!1), x(0));
993
983
  },
994
984
  children: /* @__PURE__ */ s("track", { kind: "captions" })
995
985
  }
@@ -1002,30 +992,30 @@ const Ma = (e) => {
1002
992
  muted: d,
1003
993
  playsInline: !0,
1004
994
  style: { width: "100%", height: "100%" },
1005
- onLoadStart: () => L(!0),
995
+ onLoadStart: () => D(!0),
1006
996
  onCanPlay: () => {
1007
- L(!1), E(!1);
997
+ D(!1), I(!1);
1008
998
  },
1009
- onWaiting: () => L(!0),
999
+ onWaiting: () => D(!0),
1010
1000
  onPlay: () => $(!1),
1011
1001
  onLoadedMetadata: () => {
1012
1002
  const _ = h.current;
1013
- _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && M(_.videoWidth / _.videoHeight);
1003
+ _ instanceof HTMLVideoElement && _.videoWidth && _.videoHeight && R(_.videoWidth / _.videoHeight);
1014
1004
  },
1015
1005
  onEnded: () => {
1016
- i || (v(!1), N(0));
1006
+ i || (b(!1), x(0));
1017
1007
  },
1018
1008
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1019
1009
  }
1020
1010
  ) }),
1021
- F && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1011
+ F && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1022
1012
  Ce,
1023
1013
  {
1024
1014
  className: "size-8 animate-spin text-white/80",
1025
1015
  weight: "bold"
1026
1016
  }
1027
1017
  ) }),
1028
- D && !o && /* @__PURE__ */ s(
1018
+ L && !o && /* @__PURE__ */ s(
1029
1019
  "div",
1030
1020
  {
1031
1021
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1033,12 +1023,12 @@ const Ma = (e) => {
1033
1023
  tabIndex: 0,
1034
1024
  "aria-label": "Play preview",
1035
1025
  onClick: (_) => {
1036
- _.stopPropagation(), T();
1026
+ _.stopPropagation(), E();
1037
1027
  },
1038
1028
  onKeyDown: (_) => {
1039
- _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), T());
1029
+ _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), E());
1040
1030
  },
1041
- 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(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1031
+ 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" }) })
1042
1032
  }
1043
1033
  ),
1044
1034
  l && !o && /* @__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(
@@ -1050,13 +1040,13 @@ const Ma = (e) => {
1050
1040
  "aria-valuemin": 0,
1051
1041
  "aria-valuemax": 100,
1052
1042
  tabIndex: 0,
1053
- ref: g,
1043
+ ref: f,
1054
1044
  className: "relative flex h-4 w-full cursor-pointer items-center",
1055
1045
  onMouseDown: j,
1056
1046
  onTouchStart: j,
1057
1047
  onClick: (_) => _.stopPropagation(),
1058
1048
  onKeyDown: (_) => {
1059
- _.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
1049
+ _.key === "ArrowRight" && O(Math.min(1, g + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1060
1050
  },
1061
1051
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1062
1052
  "div",
@@ -1067,20 +1057,20 @@ const Ma = (e) => {
1067
1057
  ) })
1068
1058
  }
1069
1059
  ) }),
1070
- o && /* @__PURE__ */ u("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1060
+ o && /* @__PURE__ */ m("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1071
1061
  /* @__PURE__ */ s(
1072
1062
  "button",
1073
1063
  {
1074
1064
  type: "button",
1075
1065
  onClick: (_) => {
1076
- _.stopPropagation(), v((A) => !A);
1066
+ _.stopPropagation(), b((M) => !M);
1077
1067
  },
1078
1068
  className: "shrink-0 text-white",
1079
- "aria-label": x ? "Pause" : "Play",
1080
- children: x ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
1069
+ "aria-label": w ? "Pause" : "Play",
1070
+ children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1081
1071
  }
1082
1072
  ),
1083
- /* @__PURE__ */ u(
1073
+ /* @__PURE__ */ m(
1084
1074
  "div",
1085
1075
  {
1086
1076
  role: "slider",
@@ -1089,21 +1079,21 @@ const Ma = (e) => {
1089
1079
  "aria-valuemin": 0,
1090
1080
  "aria-valuemax": 100,
1091
1081
  tabIndex: 0,
1092
- ref: g,
1082
+ ref: f,
1093
1083
  className: "relative flex h-4 w-full cursor-pointer items-center",
1094
1084
  onMouseDown: j,
1095
1085
  onTouchStart: j,
1096
1086
  onClick: (_) => _.stopPropagation(),
1097
- onMouseEnter: () => S(!0),
1098
- onMouseLeave: () => S(!1),
1087
+ onMouseEnter: () => A(!0),
1088
+ onMouseLeave: () => A(!1),
1099
1089
  onKeyDown: (_) => {
1100
- _.key === "ArrowRight" && O(Math.min(1, f + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, f - 0.05));
1090
+ _.key === "ArrowRight" && O(Math.min(1, g + 0.05)), _.key === "ArrowLeft" && O(Math.max(0, g - 0.05));
1101
1091
  },
1102
1092
  children: [
1103
1093
  /* @__PURE__ */ s(
1104
1094
  "div",
1105
1095
  {
1106
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${R || w ? "h-1.5" : "h-1"}`,
1096
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || N ? "h-1.5" : "h-1"}`,
1107
1097
  children: /* @__PURE__ */ s(
1108
1098
  "div",
1109
1099
  {
@@ -1116,7 +1106,7 @@ const Ma = (e) => {
1116
1106
  /* @__PURE__ */ s(
1117
1107
  "div",
1118
1108
  {
1119
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${R || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1109
+ 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"}`,
1120
1110
  style: { left: `${K}%` }
1121
1111
  }
1122
1112
  )
@@ -1127,7 +1117,7 @@ const Ma = (e) => {
1127
1117
  ]
1128
1118
  }
1129
1119
  );
1130
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1120
+ }, 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 = ({
1131
1121
  mimeType: e,
1132
1122
  sourceUrl: t,
1133
1123
  thumbnailUrl: n,
@@ -1136,7 +1126,7 @@ const Ma = (e) => {
1136
1126
  mediaPlayerProps: i,
1137
1127
  containedImage: o = !1
1138
1128
  }) => {
1139
- const l = ce(e), [d, m] = U(!1);
1129
+ const l = oe(e), [d, u] = U(!1);
1140
1130
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1141
1131
  Ra,
1142
1132
  {
@@ -1153,7 +1143,7 @@ const Ma = (e) => {
1153
1143
  alt: a ?? "",
1154
1144
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1155
1145
  draggable: !1,
1156
- onLoad: () => m(!0)
1146
+ onLoad: () => u(!0)
1157
1147
  }
1158
1148
  ) }) : /* @__PURE__ */ s(
1159
1149
  "img",
@@ -1170,7 +1160,7 @@ const Ma = (e) => {
1170
1160
  alt: a ?? "",
1171
1161
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
1172
1162
  draggable: !1,
1173
- onLoad: () => m(!0)
1163
+ onLoad: () => u(!0)
1174
1164
  }
1175
1165
  ) }) : /* @__PURE__ */ s(
1176
1166
  "img",
@@ -1189,7 +1179,7 @@ const Ma = (e) => {
1189
1179
  weight: "regular"
1190
1180
  })
1191
1181
  }
1192
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1182
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1193
1183
  "img",
1194
1184
  {
1195
1185
  src: n,
@@ -1217,41 +1207,41 @@ const Ma = (e) => {
1217
1207
  statusBadge: o,
1218
1208
  action: l,
1219
1209
  topLeft: d,
1220
- topRight: m,
1210
+ topRight: u,
1221
1211
  rootRef: p,
1222
1212
  "data-testid": h
1223
1213
  }) => {
1224
- const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
1225
- return /* @__PURE__ */ u(
1214
+ const f = e === "dark", c = f ? n ?? a : n ?? "", v = f && !n;
1215
+ return /* @__PURE__ */ m(
1226
1216
  "div",
1227
1217
  {
1228
1218
  ref: p,
1229
1219
  "data-testid": h,
1230
1220
  className: k(
1231
1221
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1232
- g ? "bg-[#1e2330]" : "bg-white"
1222
+ f ? "bg-[#1e2330]" : "bg-white"
1233
1223
  ),
1234
1224
  children: [
1235
1225
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1236
- m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1226
+ u ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1237
1227
  t,
1238
- /* @__PURE__ */ u("div", { className: "px-4 pb-3 pt-3", children: [
1228
+ /* @__PURE__ */ m("div", { className: "px-4 pb-3 pt-3", children: [
1239
1229
  c.trim() !== "" && /* @__PURE__ */ s(
1240
1230
  "p",
1241
1231
  {
1242
1232
  className: k("mb-0.5 truncate text-base font-medium", {
1243
- "text-black": !g,
1244
- "text-white/30": g && b,
1245
- "text-white": g && !b
1233
+ "text-black": !f,
1234
+ "text-white/30": f && v,
1235
+ "text-white": f && !v
1246
1236
  }),
1247
1237
  children: c
1248
1238
  }
1249
1239
  ),
1250
- /* @__PURE__ */ u("div", { className: "flex flex-wrap items-center gap-1", children: [
1240
+ /* @__PURE__ */ m("div", { className: "flex flex-wrap items-center gap-1", children: [
1251
1241
  we(r, {
1252
1242
  className: k(
1253
1243
  "size-5 shrink-0",
1254
- g ? "text-white/55" : "text-black/55"
1244
+ f ? "text-white/55" : "text-black/55"
1255
1245
  ),
1256
1246
  weight: "regular"
1257
1247
  }),
@@ -1260,7 +1250,7 @@ const Ma = (e) => {
1260
1250
  {
1261
1251
  className: k(
1262
1252
  "text-xs font-medium",
1263
- g ? "text-white/55" : "text-black/55"
1253
+ f ? "text-white/55" : "text-black/55"
1264
1254
  ),
1265
1255
  children: i
1266
1256
  }
@@ -1276,10 +1266,10 @@ const Ma = (e) => {
1276
1266
  function xs(e) {
1277
1267
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1278
1268
  }
1279
- function ht(e) {
1269
+ function ut(e) {
1280
1270
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1281
1271
  }
1282
- function La(e) {
1272
+ function Da(e) {
1283
1273
  return e ? "bg-white/10" : "bg-black/5";
1284
1274
  }
1285
1275
  function za(e) {
@@ -1294,8 +1284,8 @@ function Fa(e) {
1294
1284
  function Oa(e) {
1295
1285
  return e ? "text-white/20" : "text-black/20";
1296
1286
  }
1297
- const ft = ({ attachment: e, isMyMessage: t }) => {
1298
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ u(V.Fragment, { children: [
1287
+ const mt = ({ attachment: e, isMyMessage: t }) => {
1288
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ m(V.Fragment, { children: [
1299
1289
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1300
1290
  "img",
1301
1291
  {
@@ -1306,22 +1296,22 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1306
1296
  ) : /* @__PURE__ */ s(
1307
1297
  "div",
1308
1298
  {
1309
- className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1299
+ className: `aspect-video w-full rounded-[20px] ${Da(t)} flex items-center justify-center`,
1310
1300
  children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1311
1301
  }
1312
1302
  ) }),
1313
- /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
1303
+ /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1314
1304
  n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1315
1305
  a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1316
1306
  d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1317
1307
  ] })
1318
1308
  ] });
1319
- return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
1309
+ 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 });
1320
1310
  };
1321
1311
  function ws(e) {
1322
1312
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1323
1313
  }
1324
- function gt(e) {
1314
+ function ht(e) {
1325
1315
  var t;
1326
1316
  return (t = e.attachments) == null ? void 0 : t.find(ws);
1327
1317
  }
@@ -1357,31 +1347,31 @@ const Ba = ({
1357
1347
  },
1358
1348
  disabled: n,
1359
1349
  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",
1360
- children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ u(V.Fragment, { children: [
1350
+ children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(V.Fragment, { children: [
1361
1351
  /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1362
1352
  "Download"
1363
1353
  ] })
1364
1354
  }
1365
1355
  );
1366
1356
  };
1367
- function pt(e) {
1368
- var h, g, c, b;
1357
+ function ft(e) {
1358
+ var h, f, c, v;
1369
1359
  const t = (h = e.attachments) == null ? void 0 : h.find(
1370
- (x) => x.type === "video" && x.asset_url
1371
- ), n = (g = e.attachments) == null ? void 0 : g.find(
1372
- (x) => x.type === "image" && x.image_url
1360
+ (w) => w.type === "video" && w.asset_url
1361
+ ), n = (f = e.attachments) == null ? void 0 : f.find(
1362
+ (w) => w.type === "image" && w.image_url
1373
1363
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1374
- (x) => x.type === "audio" && x.asset_url
1375
- ), r = (b = e.attachments) == null ? void 0 : b.find(
1376
- (x) => x.type === "file" && x.asset_url
1364
+ (w) => w.type === "audio" && w.asset_url
1365
+ ), r = (v = e.attachments) == null ? void 0 : v.find(
1366
+ (w) => w.type === "file" && w.asset_url
1377
1367
  ), i = t ?? n ?? a ?? r, o = (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);
1378
1368
  if (!o) return null;
1379
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1369
+ const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, p = t == null ? void 0 : t.thumb_url;
1380
1370
  return {
1381
1371
  resolvedUrl: o,
1382
1372
  resolvedType: l,
1383
1373
  title: d,
1384
- fileSize: m,
1374
+ fileSize: u,
1385
1375
  thumbnailUrl: p
1386
1376
  };
1387
1377
  }
@@ -1420,7 +1410,7 @@ const _s = ({
1420
1410
  fileSize: a,
1421
1411
  thumbnailUrl: r
1422
1412
  }) => {
1423
- const i = ce(t), o = a !== void 0 ? xs(a) : void 0;
1413
+ const i = oe(t), o = a !== void 0 ? xs(a) : void 0;
1424
1414
  return /* @__PURE__ */ s(
1425
1415
  vs,
1426
1416
  {
@@ -1446,10 +1436,10 @@ const _s = ({
1446
1436
  message: e,
1447
1437
  isMyMessage: t = !1
1448
1438
  }) => {
1449
- const n = gt(e), a = pt(e);
1450
- return !n && !a ? null : /* @__PURE__ */ u("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: [
1439
+ const n = ht(e), a = ft(e);
1440
+ 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: [
1451
1441
  !t && e.user && /* @__PURE__ */ s(
1452
- ne,
1442
+ se,
1453
1443
  {
1454
1444
  className: "str-chat__avatar str-chat__message-sender-avatar",
1455
1445
  id: e.user.id,
@@ -1468,7 +1458,7 @@ const _s = ({
1468
1458
  className: "str-chat__message-bubble",
1469
1459
  "data-attachment-bubble": "true",
1470
1460
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1471
- children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1461
+ 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 })
1472
1462
  }
1473
1463
  ) })
1474
1464
  }
@@ -1477,20 +1467,20 @@ const _s = ({
1477
1467
  }, ja = ({
1478
1468
  message: e
1479
1469
  }) => {
1480
- const t = gt(e);
1470
+ const t = ht(e);
1481
1471
  if (t)
1482
- return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
1483
- const n = pt(e);
1472
+ return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1473
+ const n = ft(e);
1484
1474
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1485
1475
  }, Va = ({
1486
1476
  message: e
1487
1477
  }) => {
1488
- const t = gt(e);
1478
+ const t = ht(e);
1489
1479
  if (t)
1490
- return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
1491
- const n = pt(e);
1480
+ return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1481
+ const n = ft(e);
1492
1482
  return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1493
- }, ol = Object.assign(Ua, {
1483
+ }, ul = Object.assign(Ua, {
1494
1484
  Creator: ja,
1495
1485
  Visitor: Va
1496
1486
  }), Ga = {
@@ -1525,7 +1515,7 @@ const _s = ({
1525
1515
  "data-testid": o
1526
1516
  }) => {
1527
1517
  const l = t != null && t !== "", d = Wa[qa(e)][a];
1528
- return /* @__PURE__ */ u(
1518
+ return /* @__PURE__ */ m(
1529
1519
  "div",
1530
1520
  {
1531
1521
  "data-testid": o,
@@ -1594,7 +1584,7 @@ const _s = ({
1594
1584
  mimeType: t,
1595
1585
  filename: n,
1596
1586
  items: a
1597
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
1587
+ }) => 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: [
1598
1588
  /* @__PURE__ */ s(
1599
1589
  "audio",
1600
1590
  {
@@ -1606,7 +1596,7 @@ const _s = ({
1606
1596
  }
1607
1597
  ),
1608
1598
  n ?? null
1609
- ] }), bt = ({
1599
+ ] }), gt = ({
1610
1600
  state: e,
1611
1601
  src: t,
1612
1602
  mimeType: n,
@@ -1617,33 +1607,33 @@ const _s = ({
1617
1607
  preload: l,
1618
1608
  onDismiss: d
1619
1609
  }) => {
1620
- const m = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1610
+ const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1621
1611
  if (h.length === 0)
1622
1612
  return null;
1623
- const g = l ?? (h.length > 1 ? "none" : "metadata");
1613
+ const f = l ?? (h.length > 1 ? "none" : "metadata");
1624
1614
  return /* @__PURE__ */ s(
1625
1615
  Te,
1626
1616
  {
1627
- variant: m,
1617
+ variant: u,
1628
1618
  text: i,
1629
1619
  groupPosition: o,
1630
1620
  "data-testid": "audio-attachment",
1631
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, b) => /* @__PURE__ */ s(
1621
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1632
1622
  Ja,
1633
1623
  {
1634
1624
  item: c,
1635
- preload: g,
1625
+ preload: f,
1636
1626
  trailingAction: (
1637
1627
  // Composer only supports a single attachment, so the
1638
1628
  // dismiss control sits on the only player.
1639
- p && b === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1629
+ p && v === 0 ? /* @__PURE__ */ s(Ae, { onClick: d, variant: "inline" }) : void 0
1640
1630
  )
1641
1631
  },
1642
- `${c.src}-${b}`
1632
+ `${c.src}-${v}`
1643
1633
  )) })
1644
1634
  }
1645
1635
  );
1646
- }, Za = (e) => /* @__PURE__ */ s(bt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(bt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(bt, { ...e, state: "received" }), tr = {
1636
+ }, 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 = {
1647
1637
  Composer: Za,
1648
1638
  Sent: Qa,
1649
1639
  Received: er
@@ -1670,7 +1660,7 @@ function ar(e, t) {
1670
1660
  }
1671
1661
  }
1672
1662
  if (!e) return;
1673
- if (ce(e) === "document") {
1663
+ if (oe(e) === "document") {
1674
1664
  const r = ps(e), i = nr[r];
1675
1665
  if (i) return i;
1676
1666
  if (e === "application/octet-stream") return;
@@ -1710,7 +1700,7 @@ const ir = {
1710
1700
  activateLabel: o,
1711
1701
  trailingAction: l
1712
1702
  }) => {
1713
- const d = n ?? t ?? "File", m = rr(a, t, r), p = /* @__PURE__ */ s(
1703
+ const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1714
1704
  "div",
1715
1705
  {
1716
1706
  className: k(
@@ -1723,19 +1713,19 @@ const ir = {
1723
1713
  weight: "regular"
1724
1714
  })
1725
1715
  }
1726
- ), h = /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1716
+ ), h = /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1727
1717
  /* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
1728
- m ? /* @__PURE__ */ s(
1718
+ u ? /* @__PURE__ */ s(
1729
1719
  "p",
1730
1720
  {
1731
1721
  className: k(
1732
1722
  "truncate text-xs leading-4",
1733
1723
  ir[e]
1734
1724
  ),
1735
- children: m
1725
+ children: u
1736
1726
  }
1737
1727
  ) : null
1738
- ] }), g = i ? /* @__PURE__ */ u(
1728
+ ] }), f = i ? /* @__PURE__ */ m(
1739
1729
  "button",
1740
1730
  {
1741
1731
  type: "button",
@@ -1750,12 +1740,12 @@ const ir = {
1750
1740
  h
1751
1741
  ]
1752
1742
  }
1753
- ) : /* @__PURE__ */ u(te, { children: [
1743
+ ) : /* @__PURE__ */ m(ee, { children: [
1754
1744
  p,
1755
1745
  h
1756
1746
  ] });
1757
- return /* @__PURE__ */ u("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1758
- g,
1747
+ return /* @__PURE__ */ m("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1748
+ f,
1759
1749
  l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
1760
1750
  ] });
1761
1751
  };
@@ -1801,7 +1791,7 @@ const cr = ({
1801
1791
  trailingAction: r
1802
1792
  }
1803
1793
  );
1804
- }, vt = ({
1794
+ }, pt = ({
1805
1795
  state: e,
1806
1796
  src: t,
1807
1797
  filename: n,
@@ -1811,26 +1801,26 @@ const cr = ({
1811
1801
  items: o,
1812
1802
  text: l,
1813
1803
  groupPosition: d,
1814
- onClick: m,
1804
+ onClick: u,
1815
1805
  onDismiss: p
1816
1806
  }) => {
1817
- const h = Me(e), g = e === "composer" && !!p, c = cr({
1807
+ const h = Me(e), f = e === "composer" && !!p, c = cr({
1818
1808
  src: t,
1819
1809
  filename: n,
1820
1810
  fileSize: a,
1821
1811
  mimeType: r,
1822
1812
  title: i,
1823
1813
  items: o
1824
- }), b = (v) => {
1825
- if ((m == null ? void 0 : m(v)) === !1) return;
1826
- const f = c[v];
1827
- if (!f) return;
1828
- const N = f.filename ?? re(f.src);
1829
- ks(f.src, N);
1814
+ }), v = (b) => {
1815
+ if ((u == null ? void 0 : u(b)) === !1) return;
1816
+ const g = c[b];
1817
+ if (!g) return;
1818
+ const x = g.filename ?? re(g.src);
1819
+ ks(g.src, x);
1830
1820
  };
1831
1821
  if (c.length === 0)
1832
1822
  return null;
1833
- const x = /* @__PURE__ */ s(
1823
+ const w = /* @__PURE__ */ s(
1834
1824
  "span",
1835
1825
  {
1836
1826
  className: k(
@@ -1848,29 +1838,29 @@ const cr = ({
1848
1838
  text: l,
1849
1839
  groupPosition: d,
1850
1840
  "data-testid": "file-attachment",
1851
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((v, f) => /* @__PURE__ */ s(
1841
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, g) => /* @__PURE__ */ s(
1852
1842
  dr,
1853
1843
  {
1854
1844
  variant: h,
1855
- item: v,
1856
- index: f,
1857
- onActivate: b,
1858
- trailingAction: g && f === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : x
1845
+ item: b,
1846
+ index: g,
1847
+ onActivate: v,
1848
+ trailingAction: f && g === 0 ? /* @__PURE__ */ s(Ae, { onClick: p, variant: "inline" }) : w
1859
1849
  },
1860
- `${v.src}-${f}`
1850
+ `${b.src}-${g}`
1861
1851
  )) })
1862
1852
  }
1863
1853
  );
1864
- }, ur = (e) => /* @__PURE__ */ s(vt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(vt, { ...e, state: "received" }), fr = {
1854
+ }, 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 = {
1865
1855
  Composer: ur,
1866
1856
  Sent: mr,
1867
1857
  Received: hr
1868
- }, xt = ({
1858
+ }, bt = ({
1869
1859
  onPrev: e,
1870
1860
  onNext: t,
1871
1861
  prevLabel: n = "Previous",
1872
1862
  nextLabel: a = "Next"
1873
- }) => /* @__PURE__ */ u(te, { children: [
1863
+ }) => /* @__PURE__ */ m(ee, { children: [
1874
1864
  /* @__PURE__ */ s(
1875
1865
  "button",
1876
1866
  {
@@ -1900,7 +1890,7 @@ const cr = ({
1900
1890
  tone: i = "dark",
1901
1891
  onTriggered: o
1902
1892
  }) => {
1903
- const [l, d] = U(!1), m = Z(
1893
+ const [l, d] = U(!1), u = Z(
1904
1894
  (c) => {
1905
1895
  c.stopPropagation(), !l && (d(!0), ks(e, t).catch(() => {
1906
1896
  }).finally(() => {
@@ -1908,7 +1898,7 @@ const cr = ({
1908
1898
  }));
1909
1899
  },
1910
1900
  [l, e, t, o]
1911
- ), p = r ?? n !== "pill", g = { className: k(
1901
+ ), p = r ?? n !== "pill", f = { className: k(
1912
1902
  n === "pill" ? "size-4" : "size-5",
1913
1903
  "shrink-0"
1914
1904
  ), weight: "bold" };
@@ -1916,7 +1906,7 @@ const cr = ({
1916
1906
  "button",
1917
1907
  {
1918
1908
  type: "button",
1919
- onClick: m,
1909
+ onClick: u,
1920
1910
  disabled: l,
1921
1911
  "aria-label": a,
1922
1912
  className: k(
@@ -1946,17 +1936,17 @@ const cr = ({
1946
1936
  "button",
1947
1937
  {
1948
1938
  type: "button",
1949
- onClick: m,
1939
+ onClick: u,
1950
1940
  disabled: l,
1951
1941
  "aria-label": a,
1952
1942
  className: "mes-media-viewer__action",
1953
1943
  children: l ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1954
1944
  }
1955
- ) : /* @__PURE__ */ u(
1945
+ ) : /* @__PURE__ */ m(
1956
1946
  "button",
1957
1947
  {
1958
1948
  type: "button",
1959
- onClick: m,
1949
+ onClick: u,
1960
1950
  disabled: l,
1961
1951
  "aria-label": p ? a : void 0,
1962
1952
  className: k(
@@ -1971,12 +1961,12 @@ const cr = ({
1971
1961
  weight: "bold",
1972
1962
  "aria-hidden": !0
1973
1963
  }
1974
- ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1964
+ ) : /* @__PURE__ */ s(Se, { ...f, "aria-hidden": !0 }),
1975
1965
  p ? null : a
1976
1966
  ]
1977
1967
  }
1978
1968
  );
1979
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), wt = ({
1969
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1980
1970
  length: e,
1981
1971
  initialIndex: t,
1982
1972
  open: n
@@ -1994,14 +1984,14 @@ const cr = ({
1994
1984
  }, [e]);
1995
1985
  return J(() => {
1996
1986
  if (!n || e <= 1) return;
1997
- const d = (m) => {
1998
- if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
1987
+ const d = (u) => {
1988
+ if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
1999
1989
  const p = document.activeElement;
2000
- p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
1990
+ p && (p.tagName === "VIDEO" || p.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? o() : l());
2001
1991
  };
2002
1992
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2003
1993
  }, [n, e, o, l]), { index: r, prev: o, next: l };
2004
- }, _t = ({
1994
+ }, xt = ({
2005
1995
  open: e,
2006
1996
  onClose: t,
2007
1997
  ariaLabel: n,
@@ -2012,7 +2002,7 @@ const cr = ({
2012
2002
  }) => {
2013
2003
  const l = G(null), d = G(null);
2014
2004
  return J(() => {
2015
- var g;
2005
+ var f;
2016
2006
  const h = l.current;
2017
2007
  if (h) {
2018
2008
  if (e) {
@@ -2026,7 +2016,7 @@ const cr = ({
2026
2016
  else
2027
2017
  h.setAttribute("open", "");
2028
2018
  const c = typeof document < "u" ? document.activeElement : null;
2029
- return (g = d.current) == null || g.focus(), () => {
2019
+ return (f = d.current) == null || f.focus(), () => {
2030
2020
  if (h.open)
2031
2021
  if (typeof h.close == "function")
2032
2022
  try {
@@ -2056,7 +2046,7 @@ const cr = ({
2056
2046
  // `jsx-a11y` rules below don't model `<dialog>` as interactive, so
2057
2047
  // we silence them locally with the rationale captured here.
2058
2048
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2059
- /* @__PURE__ */ u(
2049
+ /* @__PURE__ */ m(
2060
2050
  "dialog",
2061
2051
  {
2062
2052
  ref: l,
@@ -2070,9 +2060,9 @@ const cr = ({
2070
2060
  h.target === l.current && t();
2071
2061
  },
2072
2062
  children: [
2073
- /* @__PURE__ */ u("div", { className: "mes-media-viewer__chrome", children: [
2063
+ /* @__PURE__ */ m("div", { className: "mes-media-viewer__chrome", children: [
2074
2064
  a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
2075
- /* @__PURE__ */ u("div", { className: "mes-media-viewer__actions", children: [
2065
+ /* @__PURE__ */ m("div", { className: "mes-media-viewer__actions", children: [
2076
2066
  r,
2077
2067
  /* @__PURE__ */ s(
2078
2068
  "button",
@@ -2097,16 +2087,16 @@ const cr = ({
2097
2087
  initialIndex: n = 0,
2098
2088
  onClose: a
2099
2089
  }) => {
2100
- const { index: r, prev: i, next: o } = wt({
2090
+ const { index: r, prev: i, next: o } = vt({
2101
2091
  length: t.length,
2102
2092
  initialIndex: n,
2103
2093
  open: e
2104
- }), l = t[r], d = se(
2094
+ }), l = t[r], d = ae(
2105
2095
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "image"),
2106
2096
  [l]
2107
2097
  );
2108
- return l ? /* @__PURE__ */ u(
2109
- _t,
2098
+ return l ? /* @__PURE__ */ m(
2099
+ xt,
2110
2100
  {
2111
2101
  open: e,
2112
2102
  onClose: a,
@@ -2136,7 +2126,7 @@ const cr = ({
2136
2126
  `${r}:${l.src}`
2137
2127
  ),
2138
2128
  t.length > 1 ? /* @__PURE__ */ s(
2139
- xt,
2129
+ bt,
2140
2130
  {
2141
2131
  onPrev: i,
2142
2132
  onNext: o,
@@ -2155,25 +2145,25 @@ const cr = ({
2155
2145
  }) => {
2156
2146
  const r = e.length;
2157
2147
  if (r === 0) return null;
2158
- const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, m, p) => {
2148
+ const i = e.slice(0, Math.min(r, n)), o = r - i.length, l = (d, u, p) => {
2159
2149
  const h = k(gr, "h-full w-full");
2160
- return t ? /* @__PURE__ */ u(
2150
+ return t ? /* @__PURE__ */ m(
2161
2151
  "button",
2162
2152
  {
2163
2153
  type: "button",
2164
- onClick: () => t(m),
2165
- "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
2154
+ onClick: () => t(u),
2155
+ "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
2166
2156
  className: k(h, "cursor-zoom-in"),
2167
2157
  children: [
2168
2158
  d.content,
2169
2159
  p
2170
2160
  ]
2171
2161
  },
2172
- m
2173
- ) : /* @__PURE__ */ u("div", { className: h, children: [
2162
+ u
2163
+ ) : /* @__PURE__ */ m("div", { className: h, children: [
2174
2164
  d.content,
2175
2165
  p
2176
- ] }, m);
2166
+ ] }, u);
2177
2167
  };
2178
2168
  return i.length === 1 ? /* @__PURE__ */ s("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ s(
2179
2169
  "div",
@@ -2182,9 +2172,9 @@ const cr = ({
2182
2172
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2183
2173
  a
2184
2174
  ),
2185
- children: i.map((d, m) => l(d, m))
2175
+ children: i.map((d, u) => l(d, u))
2186
2176
  }
2187
- ) : i.length === 3 ? /* @__PURE__ */ u(
2177
+ ) : i.length === 3 ? /* @__PURE__ */ m(
2188
2178
  "div",
2189
2179
  {
2190
2180
  className: k(
@@ -2204,12 +2194,12 @@ const cr = ({
2204
2194
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2205
2195
  a
2206
2196
  ),
2207
- children: i.map((d, m) => {
2208
- const p = o > 0 && m === i.length - 1;
2197
+ children: i.map((d, u) => {
2198
+ const p = o > 0 && u === i.length - 1;
2209
2199
  return l(
2210
2200
  d,
2211
- m,
2212
- p ? /* @__PURE__ */ u("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2201
+ u,
2202
+ p ? /* @__PURE__ */ m("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2213
2203
  "+",
2214
2204
  o
2215
2205
  ] }) : null
@@ -2249,10 +2239,10 @@ const cr = ({
2249
2239
  alt: n.alt,
2250
2240
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2251
2241
  })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2252
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Re(
2242
+ const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Re(
2253
2243
  r
2254
2244
  );
2255
- return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2245
+ return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2256
2246
  /* @__PURE__ */ s(
2257
2247
  "button",
2258
2248
  {
@@ -2280,7 +2270,7 @@ const cr = ({
2280
2270
  open: o,
2281
2271
  items: Is([{ src: e, alt: t }], n),
2282
2272
  initialIndex: l,
2283
- onClose: m
2273
+ onClose: u
2284
2274
  }
2285
2275
  )
2286
2276
  ] });
@@ -2295,15 +2285,15 @@ const cr = ({
2295
2285
  loading: l = "lazy",
2296
2286
  onClick: d
2297
2287
  }) => {
2298
- const m = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: b } = Re(
2288
+ const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: f, handleActivate: c, closeViewer: v } = Re(
2299
2289
  d
2300
2290
  );
2301
- if (m.length === 0)
2291
+ if (u.length === 0)
2302
2292
  return null;
2303
- const x = m.map(
2304
- (v, f) => pr(v, f, m.length, l)
2293
+ const w = u.map(
2294
+ (b, g) => pr(b, g, u.length, l)
2305
2295
  );
2306
- return /* @__PURE__ */ u(
2296
+ return /* @__PURE__ */ m(
2307
2297
  Te,
2308
2298
  {
2309
2299
  variant: p,
@@ -2311,14 +2301,14 @@ const cr = ({
2311
2301
  groupPosition: o,
2312
2302
  "data-testid": "image-attachment",
2313
2303
  children: [
2314
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: x, onTileActivate: c }) }),
2304
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2315
2305
  /* @__PURE__ */ s(
2316
2306
  Ss,
2317
2307
  {
2318
2308
  open: h,
2319
- items: Is(m, a),
2320
- initialIndex: g,
2321
- onClose: b
2309
+ items: Is(u, a),
2310
+ initialIndex: f,
2311
+ onClose: v
2322
2312
  }
2323
2313
  )
2324
2314
  ]
@@ -2334,19 +2324,19 @@ const cr = ({
2334
2324
  initialIndex: n = 0,
2335
2325
  onClose: a
2336
2326
  }) => {
2337
- const { index: r, prev: i, next: o } = wt({
2327
+ const { index: r, prev: i, next: o } = vt({
2338
2328
  length: t.length,
2339
2329
  initialIndex: n,
2340
2330
  open: e
2341
- }), l = t[r], d = se(
2331
+ }), l = t[r], d = ae(
2342
2332
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "document"),
2343
2333
  [l]
2344
- ), m = se(
2334
+ ), u = ae(
2345
2335
  () => l ? kr(l.src) : void 0,
2346
2336
  [l]
2347
2337
  );
2348
- return !l || !m ? null : /* @__PURE__ */ u(
2349
- _t,
2338
+ return !l || !u ? null : /* @__PURE__ */ m(
2339
+ xt,
2350
2340
  {
2351
2341
  open: e,
2352
2342
  onClose: a,
@@ -2357,7 +2347,7 @@ const cr = ({
2357
2347
  /* @__PURE__ */ s(
2358
2348
  "iframe",
2359
2349
  {
2360
- src: m,
2350
+ src: u,
2361
2351
  title: d,
2362
2352
  className: "mes-media-viewer__iframe",
2363
2353
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
@@ -2365,7 +2355,7 @@ const cr = ({
2365
2355
  `${r}:${l.src}`
2366
2356
  ),
2367
2357
  t.length > 1 ? /* @__PURE__ */ s(
2368
- xt,
2358
+ bt,
2369
2359
  {
2370
2360
  onPrev: i,
2371
2361
  onNext: o,
@@ -2406,7 +2396,7 @@ const cr = ({
2406
2396
  trailingAction: r
2407
2397
  }
2408
2398
  );
2409
- }, Nt = ({
2399
+ }, wt = ({
2410
2400
  state: e,
2411
2401
  src: t,
2412
2402
  filename: n,
@@ -2416,18 +2406,18 @@ const cr = ({
2416
2406
  text: o,
2417
2407
  groupPosition: l,
2418
2408
  onClick: d,
2419
- onDismiss: m
2409
+ onDismiss: u
2420
2410
  }) => {
2421
- const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
2411
+ const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2422
2412
  d
2423
- ), v = e === "composer" && !!m;
2413
+ ), b = e === "composer" && !!u;
2424
2414
  if (h.length === 0)
2425
2415
  return null;
2426
- const f = h.map((N) => ({
2427
- src: N.src,
2428
- filename: N.filename ?? re(N.src)
2416
+ const g = h.map((x) => ({
2417
+ src: x.src,
2418
+ filename: x.filename ?? re(x.src)
2429
2419
  }));
2430
- return /* @__PURE__ */ u(
2420
+ return /* @__PURE__ */ m(
2431
2421
  Te,
2432
2422
  {
2433
2423
  variant: p,
@@ -2435,11 +2425,11 @@ const cr = ({
2435
2425
  groupPosition: l,
2436
2426
  "data-testid": "pdf-attachment",
2437
2427
  children: [
2438
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((N, w) => {
2439
- const C = N.filename ?? re(N.src), R = v && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2428
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2429
+ const C = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2440
2430
  Cs,
2441
2431
  {
2442
- url: N.src,
2432
+ url: x.src,
2443
2433
  filename: C,
2444
2434
  variant: "inline",
2445
2435
  label: `Download ${C}`,
@@ -2450,27 +2440,27 @@ const cr = ({
2450
2440
  Sr,
2451
2441
  {
2452
2442
  variant: p,
2453
- item: N,
2454
- index: w,
2455
- onActivate: b,
2456
- trailingAction: R
2443
+ item: x,
2444
+ index: N,
2445
+ onActivate: v,
2446
+ trailingAction: T
2457
2447
  },
2458
- `${N.src}-${w}`
2448
+ `${x.src}-${N}`
2459
2449
  );
2460
2450
  }) }),
2461
2451
  /* @__PURE__ */ s(
2462
2452
  yr,
2463
2453
  {
2464
- open: g,
2465
- items: f,
2454
+ open: f,
2455
+ items: g,
2466
2456
  initialIndex: c,
2467
- onClose: x
2457
+ onClose: w
2468
2458
  }
2469
2459
  )
2470
2460
  ]
2471
2461
  }
2472
2462
  );
2473
- }, Er = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(Nt, { ...e, state: "received" }), Ar = {
2463
+ }, 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 = {
2474
2464
  Composer: Er,
2475
2465
  Sent: Ir,
2476
2466
  Received: Tr
@@ -2480,16 +2470,16 @@ const cr = ({
2480
2470
  initialIndex: n = 0,
2481
2471
  onClose: a
2482
2472
  }) => {
2483
- const { index: r, prev: i, next: o } = wt({
2473
+ const { index: r, prev: i, next: o } = vt({
2484
2474
  length: t.length,
2485
2475
  initialIndex: n,
2486
2476
  open: e
2487
- }), l = t[r], d = se(
2477
+ }), l = t[r], d = ae(
2488
2478
  () => (l == null ? void 0 : l.filename) ?? (l ? re(l.src) : "video"),
2489
2479
  [l]
2490
2480
  );
2491
- return l ? /* @__PURE__ */ u(
2492
- _t,
2481
+ return l ? /* @__PURE__ */ m(
2482
+ xt,
2493
2483
  {
2494
2484
  open: e,
2495
2485
  onClose: a,
@@ -2513,7 +2503,7 @@ const cr = ({
2513
2503
  `${r}:${l.src}`
2514
2504
  ),
2515
2505
  t.length > 1 ? /* @__PURE__ */ s(
2516
- xt,
2506
+ bt,
2517
2507
  {
2518
2508
  onPrev: i,
2519
2509
  onNext: o,
@@ -2524,10 +2514,10 @@ const cr = ({
2524
2514
  ]
2525
2515
  }
2526
2516
  ) : null;
2527
- }, 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(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2517
+ }, 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 = ({
2528
2518
  item: e,
2529
2519
  index: t
2530
- }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2520
+ }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2531
2521
  e.poster ? /* @__PURE__ */ s(
2532
2522
  "img",
2533
2523
  {
@@ -2550,7 +2540,7 @@ const cr = ({
2550
2540
  ] }), Rr = (e, t, n) => ({
2551
2541
  ariaLabel: `Play video ${t + 1} of ${n}`,
2552
2542
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2553
- }), Dr = ({
2543
+ }), Lr = ({
2554
2544
  src: e,
2555
2545
  poster: t,
2556
2546
  mimeType: n,
@@ -2562,16 +2552,16 @@ const cr = ({
2562
2552
  mimeType: n.mimeType,
2563
2553
  preload: n.preload,
2564
2554
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2565
- })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2566
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: p } = Re(
2555
+ })), Dr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2556
+ const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
2567
2557
  i
2568
2558
  );
2569
- return /* @__PURE__ */ u("div", { className: "relative w-fit", children: [
2559
+ return /* @__PURE__ */ m("div", { className: "relative w-fit", children: [
2570
2560
  /* @__PURE__ */ s(
2571
2561
  "button",
2572
2562
  {
2573
2563
  type: "button",
2574
- onClick: () => m(0),
2564
+ onClick: () => u(0),
2575
2565
  "aria-label": "Play video",
2576
2566
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2577
2567
  children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
@@ -2591,7 +2581,7 @@ const cr = ({
2591
2581
  }
2592
2582
  )
2593
2583
  ] });
2594
- }, Ds = ({
2584
+ }, Ls = ({
2595
2585
  state: e,
2596
2586
  src: t,
2597
2587
  poster: n,
@@ -2601,17 +2591,17 @@ const cr = ({
2601
2591
  text: o,
2602
2592
  groupPosition: l,
2603
2593
  preload: d,
2604
- onClick: m
2594
+ onClick: u
2605
2595
  }) => {
2606
- const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: x } = Re(
2607
- m
2596
+ const p = Lr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2597
+ u
2608
2598
  );
2609
2599
  if (p.length === 0)
2610
2600
  return null;
2611
- const v = p.map(
2612
- (f, N) => Rr(f, N, p.length)
2601
+ const b = p.map(
2602
+ (g, x) => Rr(g, x, p.length)
2613
2603
  );
2614
- return /* @__PURE__ */ u(
2604
+ return /* @__PURE__ */ m(
2615
2605
  Te,
2616
2606
  {
2617
2607
  variant: h,
@@ -2622,24 +2612,24 @@ const cr = ({
2622
2612
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2623
2613
  Es,
2624
2614
  {
2625
- tiles: v,
2626
- onTileActivate: b,
2615
+ tiles: b,
2616
+ onTileActivate: v,
2627
2617
  className: "overflow-hidden rounded-md"
2628
2618
  }
2629
2619
  ) }),
2630
2620
  /* @__PURE__ */ s(
2631
2621
  As,
2632
2622
  {
2633
- open: g,
2623
+ open: f,
2634
2624
  items: Rs(p, r),
2635
2625
  initialIndex: c,
2636
- onClose: x
2626
+ onClose: w
2637
2627
  }
2638
2628
  )
2639
2629
  ]
2640
2630
  }
2641
2631
  );
2642
- }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2632
+ }, zr = (e) => /* @__PURE__ */ s(Dr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2643
2633
  Composer: zr,
2644
2634
  Sent: Pr,
2645
2635
  Received: Fr
@@ -2653,9 +2643,9 @@ const cr = ({
2653
2643
  isUnlocking: () => !1
2654
2644
  }, Br = {
2655
2645
  LockedAttachment: $r
2656
- }, Ls = lt({}), cl = Ls.Provider;
2646
+ }, Ds = rt({}), ml = Ds.Provider;
2657
2647
  function Ur(e) {
2658
- return Ie(Ls)[e] ?? Br[e];
2648
+ return Ie(Ds)[e] ?? Br[e];
2659
2649
  }
2660
2650
  const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2661
2651
  "svg",
@@ -2700,31 +2690,31 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2700
2690
  if (!r && !i)
2701
2691
  return null;
2702
2692
  if (r) {
2703
- const g = (h = e.metadata) == null ? void 0 : h.amount_text;
2704
- if (!g) return null;
2705
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
2706
- return /* @__PURE__ */ u("div", { className: c, children: [
2693
+ const f = (h = e.metadata) == null ? void 0 : h.amount_text;
2694
+ if (!f) return null;
2695
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${f} tip` : `Delivered with ${f} tip`;
2696
+ return /* @__PURE__ */ m("div", { className: c, children: [
2707
2697
  /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2708
- /* @__PURE__ */ s("span", { children: b })
2698
+ /* @__PURE__ */ s("span", { children: v })
2709
2699
  ] });
2710
2700
  }
2711
2701
  const o = n && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
2712
2702
  "message-chatbot-indicator",
2713
2703
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2714
2704
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2715
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
2716
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ u(te, { children: [
2717
- m,
2705
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: l }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(jr, { size: o ? 12 : 15 }) });
2706
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !o ? /* @__PURE__ */ m(ee, { children: [
2707
+ u,
2718
2708
  p
2719
- ] }) : /* @__PURE__ */ u(te, { children: [
2709
+ ] }) : /* @__PURE__ */ m(ee, { children: [
2720
2710
  p,
2721
- m
2711
+ u
2722
2712
  ] }) });
2723
2713
  }, qr = ({
2724
2714
  selected: e,
2725
2715
  onVoteUp: t,
2726
2716
  onVoteDown: n
2727
- }) => /* @__PURE__ */ u("div", { className: "message-vote-buttons", children: [
2717
+ }) => /* @__PURE__ */ m("div", { className: "message-vote-buttons", children: [
2728
2718
  /* @__PURE__ */ s(
2729
2719
  "button",
2730
2720
  {
@@ -2754,15 +2744,9 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2754
2744
  }
2755
2745
  )
2756
2746
  ] }), Je = () => {
2757
- var i;
2758
- const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2759
- var o;
2760
- if (!(!a || !t)) {
2761
- for (let l = t.length - 1; l >= 0; l -= 1)
2762
- if (((o = t[l].user) == null ? void 0 : o.id) === a) return t[l].id;
2763
- }
2764
- }, [t, a]);
2765
- return e.id !== r ? null : /* @__PURE__ */ u(te, { children: [
2747
+ var a;
2748
+ const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), n = (a = t == null ? void 0 : t[t.length - 1]) == null ? void 0 : a.id;
2749
+ return e.id !== n ? null : /* @__PURE__ */ m(ee, { children: [
2766
2750
  /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2767
2751
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2768
2752
  ] });
@@ -2775,7 +2759,7 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2775
2759
  MessageSendingStatus: Wr
2776
2760
  }
2777
2761
  ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2778
- function yt(e) {
2762
+ function _t(e) {
2779
2763
  if (typeof e != "string") return;
2780
2764
  const t = e.trim();
2781
2765
  if (t === "") return;
@@ -2793,7 +2777,7 @@ const Zr = {
2793
2777
  const n = k(
2794
2778
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2795
2779
  Zr[e]
2796
- ), a = yt(t.href);
2780
+ ), a = _t(t.href);
2797
2781
  return a ? /* @__PURE__ */ s(
2798
2782
  "a",
2799
2783
  {
@@ -2825,7 +2809,7 @@ const Zr = {
2825
2809
  }, ti = "text-white/30", si = {
2826
2810
  dark: "text-white/55",
2827
2811
  light: "text-black/55"
2828
- }, kt = ({
2812
+ }, Nt = ({
2829
2813
  variant: e,
2830
2814
  title: t,
2831
2815
  placeholderTitle: n,
@@ -2835,26 +2819,26 @@ const Zr = {
2835
2819
  cta: o,
2836
2820
  trailingAction: l
2837
2821
  }) => {
2838
- const d = e === "dark", m = t ?? (d ? n : void 0) ?? "", p = m.trim() !== "", h = a != null && a.trim() !== "", g = typeof r == "string" ? r.trim() : "", c = g !== "", b = o != null;
2839
- if (!p && !h && !c && !b) return null;
2840
- const v = k(
2822
+ const d = e === "dark", u = t ?? (d ? n : void 0) ?? "", p = u.trim() !== "", h = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", v = o != null;
2823
+ if (!p && !h && !c && !v) return null;
2824
+ const b = k(
2841
2825
  "truncate text-base font-medium leading-6",
2842
2826
  d && !t ? ti : ei[e]
2843
- ), f = k(
2827
+ ), g = k(
2844
2828
  "truncate text-xs leading-4",
2845
2829
  si[e]
2846
2830
  );
2847
- return /* @__PURE__ */ u("div", { className: "px-4 py-3", children: [
2848
- /* @__PURE__ */ u("div", { className: "flex items-end gap-3", children: [
2849
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2850
- /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1", children: [
2851
- p && /* @__PURE__ */ u("div", { className: "flex min-w-0 items-center gap-2", children: [
2831
+ return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2832
+ /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
2833
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2834
+ /* @__PURE__ */ m("div", { className: "flex min-w-0 flex-col gap-1", children: [
2835
+ p && /* @__PURE__ */ m("div", { className: "flex min-w-0 items-center gap-2", children: [
2852
2836
  i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
2853
- /* @__PURE__ */ s("p", { className: k("min-w-0", v), children: m })
2837
+ /* @__PURE__ */ s("p", { className: k("min-w-0", b), children: u })
2854
2838
  ] }),
2855
- h && /* @__PURE__ */ s("p", { className: f, children: a })
2839
+ h && /* @__PURE__ */ s("p", { className: g, children: a })
2856
2840
  ] }),
2857
- !b && c && /* @__PURE__ */ s("p", { className: f, children: g })
2841
+ !v && c && /* @__PURE__ */ s("p", { className: g, children: f })
2858
2842
  ] }),
2859
2843
  l && /* @__PURE__ */ s("div", { className: "shrink-0", children: l })
2860
2844
  ] }),
@@ -2878,15 +2862,15 @@ const Zr = {
2878
2862
  bgClassName: l,
2879
2863
  "data-testid": d
2880
2864
  }) => {
2881
- const m = n != null || a != null, p = k(
2865
+ const u = n != null || a != null, p = k(
2882
2866
  ni,
2883
2867
  l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
2884
2868
  // `focus-ring` is a design-system utility from the component-library
2885
2869
  // tailwind preset — outline-none + a black 2px focus-visible ring
2886
2870
  // with offset, so keyboard users can see the focused card.
2887
- m ? "cursor-pointer no-underline focus-ring" : null
2871
+ u ? "cursor-pointer no-underline focus-ring" : null
2888
2872
  ), h = o ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
2889
- return n ? /* @__PURE__ */ u(
2873
+ return n ? /* @__PURE__ */ m(
2890
2874
  "a",
2891
2875
  {
2892
2876
  ref: i,
@@ -2901,7 +2885,7 @@ const Zr = {
2901
2885
  h
2902
2886
  ]
2903
2887
  }
2904
- ) : a ? /* @__PURE__ */ u(
2888
+ ) : a ? /* @__PURE__ */ m(
2905
2889
  "button",
2906
2890
  {
2907
2891
  ref: i,
@@ -2915,7 +2899,7 @@ const Zr = {
2915
2899
  h
2916
2900
  ]
2917
2901
  }
2918
- ) : /* @__PURE__ */ u(
2902
+ ) : /* @__PURE__ */ m(
2919
2903
  "div",
2920
2904
  {
2921
2905
  ref: i,
@@ -2933,11 +2917,11 @@ const Zr = {
2933
2917
  }, ri = {
2934
2918
  dark: "size-16 text-white/25",
2935
2919
  light: "size-16 text-black/25"
2936
- }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", Ct = (e, t) => {
2920
+ }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", yt = (e, t) => {
2937
2921
  if (!t || !e) return !1;
2938
- const n = ce(e);
2922
+ const n = oe(e);
2939
2923
  return n === "video" || n === "audio";
2940
- }, St = "bg-[#F2F3F4]", $e = ({
2924
+ }, kt = "bg-[#F2F3F4]", $e = ({
2941
2925
  variant: e,
2942
2926
  thumbnailUrl: t,
2943
2927
  sourceUrl: n,
@@ -2946,7 +2930,7 @@ const Zr = {
2946
2930
  topLeft: i,
2947
2931
  topRight: o
2948
2932
  }) => {
2949
- const l = ce(r), d = !!n && l === "video";
2933
+ const l = oe(r), d = !!n && l === "video";
2950
2934
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2951
2935
  "audio",
2952
2936
  {
@@ -2956,7 +2940,7 @@ const Zr = {
2956
2940
  className: "block w-full",
2957
2941
  children: /* @__PURE__ */ s("track", { kind: "captions" })
2958
2942
  }
2959
- ) }) : /* @__PURE__ */ u(
2943
+ ) }) : /* @__PURE__ */ m(
2960
2944
  "div",
2961
2945
  {
2962
2946
  className: k(
@@ -3011,11 +2995,11 @@ const Zr = {
3011
2995
  sourceUrl: o,
3012
2996
  layout: l = "featured",
3013
2997
  appIcon: d,
3014
- cta: m,
2998
+ cta: u,
3015
2999
  onDismiss: p,
3016
3000
  onEditClick: h
3017
3001
  }) => {
3018
- const g = l === "classic", c = Ve(r, o), b = p ? /* @__PURE__ */ s(
3002
+ const f = l === "classic", c = Ve(r, o), v = p ? /* @__PURE__ */ s(
3019
3003
  "button",
3020
3004
  {
3021
3005
  type: "button",
@@ -3024,7 +3008,7 @@ const Zr = {
3024
3008
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3025
3009
  children: /* @__PURE__ */ s(Ue, { className: "size-3", weight: "bold" })
3026
3010
  }
3027
- ) : void 0, x = h ? /* @__PURE__ */ s(
3011
+ ) : void 0, w = h ? /* @__PURE__ */ s(
3028
3012
  "button",
3029
3013
  {
3030
3014
  type: "button",
@@ -3034,7 +3018,7 @@ const Zr = {
3034
3018
  children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
3035
3019
  }
3036
3020
  ) : void 0;
3037
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
3021
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3038
3022
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3039
3023
  $e,
3040
3024
  {
@@ -3044,14 +3028,14 @@ const Zr = {
3044
3028
  mimeType: r
3045
3029
  }
3046
3030
  ) }),
3047
- b && /* @__PURE__ */ s("div", { className: "shrink-0", children: b })
3048
- ] }) }) : /* @__PURE__ */ u(
3031
+ v && /* @__PURE__ */ s("div", { className: "shrink-0", children: v })
3032
+ ] }) }) : /* @__PURE__ */ m(
3049
3033
  Oe,
3050
3034
  {
3051
3035
  variant: "dark",
3052
- topRight: g ? b : void 0,
3036
+ topRight: f ? v : void 0,
3053
3037
  children: [
3054
- !g && /* @__PURE__ */ s(
3038
+ !f && /* @__PURE__ */ s(
3055
3039
  $e,
3056
3040
  {
3057
3041
  variant: "dark",
@@ -3059,11 +3043,11 @@ const Zr = {
3059
3043
  sourceUrl: o,
3060
3044
  title: e,
3061
3045
  mimeType: r,
3062
- topRight: b
3046
+ topRight: v
3063
3047
  }
3064
3048
  ),
3065
3049
  /* @__PURE__ */ s(
3066
- kt,
3050
+ Nt,
3067
3051
  {
3068
3052
  variant: "dark",
3069
3053
  title: e,
@@ -3071,8 +3055,8 @@ const Zr = {
3071
3055
  description: n,
3072
3056
  url: a,
3073
3057
  appIcon: d,
3074
- cta: m,
3075
- trailingAction: x
3058
+ cta: u,
3059
+ trailingAction: w
3076
3060
  }
3077
3061
  )
3078
3062
  ]
@@ -3088,23 +3072,23 @@ const Zr = {
3088
3072
  layout: o = "featured",
3089
3073
  appIcon: l,
3090
3074
  cta: d,
3091
- onClick: m
3075
+ onClick: u
3092
3076
  }) => {
3093
- const p = Ct(a, i), h = yt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? m : void 0, b = Ve(a, i) ? St : void 0, x = d && m ? {
3077
+ const p = yt(a, i), h = _t(n), f = 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 ? {
3094
3078
  ...d,
3095
3079
  onClick: () => {
3096
- var v;
3097
- m(), (v = d.onClick) == null || v.call(d);
3080
+ var b;
3081
+ u(), (b = d.onClick) == null || b.call(d);
3098
3082
  }
3099
3083
  } : d;
3100
- return /* @__PURE__ */ u(
3084
+ return /* @__PURE__ */ m(
3101
3085
  Oe,
3102
3086
  {
3103
3087
  variant: "light",
3104
- href: g,
3088
+ href: f,
3105
3089
  onClick: c,
3106
3090
  ariaLabel: e ?? "Open attachment preview",
3107
- bgClassName: b,
3091
+ bgClassName: v,
3108
3092
  "data-testid": "link-attachment",
3109
3093
  children: [
3110
3094
  o === "featured" && /* @__PURE__ */ s(
@@ -3118,14 +3102,14 @@ const Zr = {
3118
3102
  }
3119
3103
  ),
3120
3104
  /* @__PURE__ */ s(
3121
- kt,
3105
+ Nt,
3122
3106
  {
3123
3107
  variant: "light",
3124
3108
  title: e,
3125
3109
  description: t,
3126
3110
  url: n,
3127
3111
  appIcon: l,
3128
- cta: x
3112
+ cta: w
3129
3113
  }
3130
3114
  )
3131
3115
  ]
@@ -3141,17 +3125,17 @@ const Zr = {
3141
3125
  sourceUrl: o,
3142
3126
  layout: l = "featured",
3143
3127
  appIcon: d,
3144
- cta: m,
3128
+ cta: u,
3145
3129
  onClick: p
3146
3130
  }) => {
3147
- const h = Ct(r, o), g = yt(a), c = m == null && g != null && !h ? g : void 0, b = m == null && !h && c != null ? p : void 0;
3148
- return /* @__PURE__ */ u(
3131
+ const h = yt(r, o), f = _t(a), c = u == null && f != null && !h ? f : void 0, v = u == null && !h && c != null ? p : void 0;
3132
+ return /* @__PURE__ */ m(
3149
3133
  Oe,
3150
3134
  {
3151
3135
  variant: "dark",
3152
3136
  href: c,
3153
- onClick: b,
3154
- bgClassName: Ve(r, o) ? St : void 0,
3137
+ onClick: v,
3138
+ bgClassName: Ve(r, o) ? kt : void 0,
3155
3139
  children: [
3156
3140
  l === "featured" && /* @__PURE__ */ s(
3157
3141
  $e,
@@ -3164,7 +3148,7 @@ const Zr = {
3164
3148
  }
3165
3149
  ),
3166
3150
  /* @__PURE__ */ s(
3167
- kt,
3151
+ Nt,
3168
3152
  {
3169
3153
  variant: "dark",
3170
3154
  title: e,
@@ -3172,7 +3156,7 @@ const Zr = {
3172
3156
  description: n,
3173
3157
  url: a,
3174
3158
  appIcon: d,
3175
- cta: m
3159
+ cta: u
3176
3160
  }
3177
3161
  )
3178
3162
  ]
@@ -3182,7 +3166,7 @@ const Zr = {
3182
3166
  Composer: ii,
3183
3167
  Sent: oi,
3184
3168
  Received: li
3185
- };
3169
+ }, 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]";
3186
3170
  function P(e) {
3187
3171
  const t = e == null ? void 0 : e.trim();
3188
3172
  return t || void 0;
@@ -3190,7 +3174,7 @@ function P(e) {
3190
3174
  function ts(e) {
3191
3175
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3192
3176
  }
3193
- function ci(e, t) {
3177
+ function ui(e, t) {
3194
3178
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3195
3179
  return !1;
3196
3180
  const n = ts(e), a = ts(t);
@@ -3211,11 +3195,11 @@ function ss(e) {
3211
3195
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3212
3196
  // native video/audio player in the hero instead of a static thumbnail.
3213
3197
  sourceUrl: a,
3214
- layout: n || Ct(r, a) ? "featured" : "classic",
3198
+ layout: n || yt(r, a) ? "featured" : "classic",
3215
3199
  mimeType: r
3216
3200
  };
3217
3201
  }
3218
- function di(e) {
3202
+ function mi(e) {
3219
3203
  var t;
3220
3204
  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;
3221
3205
  }
@@ -3245,21 +3229,27 @@ function Fs(e) {
3245
3229
  a(r);
3246
3230
  continue;
3247
3231
  }
3248
- const i = di(r);
3232
+ const i = mi(r);
3249
3233
  i && n(i, r);
3250
3234
  }
3251
3235
  return t;
3252
3236
  }
3253
- function ui(e) {
3237
+ function hi(e) {
3238
+ let t = 0;
3239
+ for (const n of e)
3240
+ t += n.type === "link" ? n.attachments.length : 1;
3241
+ return t;
3242
+ }
3243
+ function fi(e) {
3254
3244
  return e.filter((t) => t.type === "media").length;
3255
3245
  }
3256
- function mi(e, t, n) {
3246
+ function gi(e, t, n) {
3257
3247
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3258
3248
  }
3259
3249
  function ns(e) {
3260
3250
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3261
3251
  }
3262
- function hi(e) {
3252
+ function pi(e) {
3263
3253
  switch (e) {
3264
3254
  case "image":
3265
3255
  return ye.Image;
@@ -3273,7 +3263,7 @@ function hi(e) {
3273
3263
  return ye.File;
3274
3264
  }
3275
3265
  }
3276
- function fi(e, t) {
3266
+ function bi(e, t) {
3277
3267
  if (t.length > 1)
3278
3268
  switch (e) {
3279
3269
  case "image":
@@ -3360,90 +3350,69 @@ function fi(e, t) {
3360
3350
  };
3361
3351
  }
3362
3352
  }
3363
- function gi({
3353
+ function vi({
3364
3354
  groupPosition: e,
3365
3355
  isMyMessage: t,
3366
- segment: n
3356
+ segment: n,
3357
+ text: a
3367
3358
  }) {
3368
- const a = hi(n.kind), r = {
3369
- ...fi(n.kind, n.attachments),
3370
- groupPosition: e
3359
+ const r = pi(n.kind), i = {
3360
+ ...bi(n.kind, n.attachments),
3361
+ groupPosition: e,
3362
+ ...a ? { text: a } : {}
3371
3363
  };
3372
- return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3364
+ return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3373
3365
  }
3374
- const pi = ({
3366
+ const xi = ({
3375
3367
  groupPosition: e,
3376
3368
  isMyMessage: t,
3377
- message: n,
3378
- renderText: a
3369
+ message: n
3379
3370
  }) => {
3380
- var b;
3381
- const r = Fs(n.attachments);
3382
- if (r.length === 0) return null;
3383
- const i = ui(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, m = o && ci(o, d) ? void 0 : o;
3384
- let p = 0;
3385
- const h = [], g = (x, v) => {
3386
- const f = t ? es.Sent : es.Received;
3387
- h.push(
3388
- /* @__PURE__ */ s(f, { ...ss(x) }, v)
3371
+ var w;
3372
+ const a = Fs(n.attachments);
3373
+ if (a.length === 0) return null;
3374
+ const r = hi(a), i = fi(a), o = (w = n.text) == null ? void 0 : w.trim(), l = a.find((b) => b.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? ss(l.attachments[0] ?? {}).url : void 0, u = o && ui(o, d) ? void 0 : o;
3375
+ let p = 0, h = 0;
3376
+ const f = [], c = (b, g) => {
3377
+ const x = p === r - 1;
3378
+ p += 1;
3379
+ const N = t ? es.Sent : es.Received;
3380
+ f.push(
3381
+ /* @__PURE__ */ m(V.Fragment, { children: [
3382
+ /* @__PURE__ */ s(N, { ...ss(b) }),
3383
+ x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3384
+ ] }, g)
3389
3385
  );
3390
- }, c = (x, v) => {
3391
- const f = mi(
3392
- p,
3386
+ }, v = (b, g) => {
3387
+ const x = p === r - 1, N = gi(
3388
+ h,
3393
3389
  i,
3394
3390
  e
3395
3391
  );
3396
- p += 1, h.push(
3392
+ p += 1, h += 1, f.push(
3397
3393
  /* @__PURE__ */ s(
3398
- gi,
3394
+ vi,
3399
3395
  {
3400
- groupPosition: f,
3396
+ groupPosition: N,
3401
3397
  isMyMessage: t,
3402
- segment: x
3398
+ segment: b,
3399
+ text: x ? u : void 0
3403
3400
  },
3404
- v
3401
+ g
3405
3402
  )
3406
3403
  );
3407
3404
  };
3408
- return r.forEach((x, v) => {
3409
- if (x.type === "link") {
3410
- x.attachments.forEach((f, N) => {
3411
- g(f, `link-${v}-${N}`);
3405
+ return a.forEach((b, g) => {
3406
+ if (b.type === "link") {
3407
+ b.attachments.forEach((x, N) => {
3408
+ c(x, `link-${g}-${N}`);
3412
3409
  });
3413
3410
  return;
3414
3411
  }
3415
- c(x, `media-${v}`);
3416
- }), /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3417
- /* @__PURE__ */ u(
3418
- "div",
3419
- {
3420
- className: "str-chat__message-bubble",
3421
- "data-attachment-bubble": "true",
3422
- style: {
3423
- background: "transparent",
3424
- borderRadius: 0,
3425
- overflow: "visible",
3426
- padding: 0
3427
- },
3428
- children: [
3429
- h,
3430
- !m && /* @__PURE__ */ s(et, {})
3431
- ]
3432
- }
3433
- ),
3434
- m ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3435
- /* @__PURE__ */ s(
3436
- tt,
3437
- {
3438
- message: n,
3439
- renderText: a
3440
- }
3441
- ),
3442
- /* @__PURE__ */ s(et, {})
3443
- ] }) : null
3444
- ] });
3445
- }, bi = (e) => {
3446
- var Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt, Gt, Ht;
3412
+ v(b, `media-${g}`);
3413
+ }), /* @__PURE__ */ s(ee, { children: f });
3414
+ }, wi = (e) => {
3415
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt;
3447
3416
  const {
3448
3417
  additionalMessageInputProps: t,
3449
3418
  chatbotVotingEnabled: n,
@@ -3453,44 +3422,44 @@ const pi = ({
3453
3422
  groupedByUser: o,
3454
3423
  handleAction: l,
3455
3424
  handleOpenThread: d,
3456
- handleRetry: m,
3425
+ handleRetry: u,
3457
3426
  highlighted: p,
3458
3427
  isMessageAIGenerated: h,
3459
- isMyMessage: g,
3428
+ isMyMessage: f,
3460
3429
  message: c,
3461
- renderText: b,
3462
- threadList: x,
3463
- viewerLanguage: v
3464
- } = e, { client: f } = oe("CustomMessage"), { channel: N } = le("CustomMessage"), { isUnlocking: w, onUnlockClick: C, onFetchSource: R, onDownloadClick: S } = Ur("LockedAttachment"), [D, $] = U(!1), F = Js(c.id), { selected: L, voteUp: y, voteDown: E } = xa(c), {
3465
- Attachment: I = Zs,
3466
- EditMessageModal: M = Qs,
3467
- MessageActions: T,
3430
+ renderText: v,
3431
+ threadList: w,
3432
+ viewerLanguage: b
3433
+ } = e, { client: g } = me("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: C, onFetchSource: T, onDownloadClick: A } = Ur("LockedAttachment"), [L, $] = U(!1), F = Js(c.id), { selected: D, voteUp: y, voteDown: I } = xa(c), {
3434
+ Attachment: S = Zs,
3435
+ EditMessageModal: R = Qs,
3436
+ MessageActions: E,
3468
3437
  MessageBlocked: z = en,
3469
3438
  MessageBouncePrompt: O = tn,
3470
3439
  MessageDeleted: j = sn,
3471
3440
  MessageIsThreadReplyInChannelButtonIndicator: X = nn,
3472
- MessageRepliesCountButton: ee = an,
3441
+ MessageRepliesCountButton: te = an,
3473
3442
  ReminderNotification: K = rn,
3474
3443
  StreamedMessageText: _ = ln,
3475
- PinIndicator: A
3476
- } = is("CustomMessage"), H = on(c), q = cn(c), Y = se(
3444
+ PinIndicator: M
3445
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = ae(
3477
3446
  () => h == null ? void 0 : h(c),
3478
3447
  [h, c]
3479
- ), B = se(() => {
3480
- const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3448
+ ), B = ae(() => {
3449
+ const ue = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...ue] : ue;
3481
3450
  if (!Fe(c)) return pe;
3482
- const Yt = pe.filter((qt) => !("type" in qt) || !ws(qt));
3483
- return Yt.length === pe.length ? pe : Yt;
3484
- }, [c]), W = se(
3451
+ const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3452
+ return Gt.length === pe.length ? pe : Gt;
3453
+ }, [c]), W = ae(
3485
3454
  () => Fs(B),
3486
3455
  [B]
3487
- ), Q = se(() => {
3488
- const me = hs({ message: c, viewerLanguage: v });
3489
- return me === c.text ? c : { ...c, text: me };
3490
- }, [c, v]), de = W.length > 0, De = W.reduce(
3491
- (me, pe) => me + pe.attachments.length,
3456
+ ), Q = ae(() => {
3457
+ const ue = hs({ message: c, viewerLanguage: b });
3458
+ return ue === c.text ? c : { ...c, text: ue };
3459
+ }, [c, b]), ce = W.length > 0, Le = W.reduce(
3460
+ (ue, pe) => ue + pe.attachments.length,
3492
3461
  0
3493
- ) === ((B == null ? void 0 : B.length) ?? 0), Le = Xa(
3462
+ ) === ((B == null ? void 0 : B.length) ?? 0), De = Xa(
3494
3463
  {
3495
3464
  endOfGroup: r,
3496
3465
  firstOfGroup: i,
@@ -3503,10 +3472,10 @@ const pi = ({
3503
3472
  return /* @__PURE__ */ s(j, { message: c });
3504
3473
  if (un(c))
3505
3474
  return /* @__PURE__ */ s(z, {});
3506
- const ae = !x && !!c.reply_count, ue = !x && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Rt = c.error) == null ? void 0 : Rt.status) !== 403, It = mn(c);
3475
+ const ne = !w && !!c.reply_count, de = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3507
3476
  let he;
3508
- ie ? he = () => m(c) : It && (he = () => $(!0));
3509
- const fe = g(), js = k(
3477
+ ie ? he = () => u(c) : St && (he = () => $(!0));
3478
+ const fe = f(), js = k(
3510
3479
  "str-chat__message str-chat__message-simple",
3511
3480
  `str-chat__message--${c.type}`,
3512
3481
  `str-chat__message--${c.status}`,
@@ -3517,39 +3486,39 @@ const pi = ({
3517
3486
  "str-chat__message--highlighted": p,
3518
3487
  "str-chat__message--pinned pinned-message": c.pinned,
3519
3488
  "str-chat__message--with-reactions": q,
3520
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Dt = c == null ? void 0 : c.error) == null ? void 0 : Dt.status) !== 403,
3521
- "str-chat__message-with-thread-link": ae || ue,
3489
+ "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,
3490
+ "str-chat__message-with-thread-link": ne || de,
3522
3491
  "str-chat__virtual-message__wrapper--end": r,
3523
3492
  "str-chat__virtual-message__wrapper--first": i,
3524
3493
  "str-chat__virtual-message__wrapper--group": o
3525
3494
  }
3526
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Tt = Yr(c), ge = Fe(c), At = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Mt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3527
- return /* @__PURE__ */ u(te, { children: [
3495
+ ), Ge = c.poll_id && g.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Tt = ge && fe && He, Vs = ce && Le && !c.quoted_message && !Ge && !Y && !ge;
3496
+ return /* @__PURE__ */ m(ee, { children: [
3528
3497
  a && /* @__PURE__ */ s(
3529
- M,
3498
+ R,
3530
3499
  {
3531
3500
  additionalMessageInputProps: t
3532
3501
  }
3533
3502
  ),
3534
- D && /* @__PURE__ */ s(
3503
+ L && /* @__PURE__ */ s(
3535
3504
  hn,
3536
3505
  {
3537
3506
  MessageBouncePrompt: O,
3538
3507
  onClose: () => $(!1),
3539
- open: D
3508
+ open: L
3540
3509
  }
3541
3510
  ),
3542
- /* @__PURE__ */ u(
3511
+ /* @__PURE__ */ m(
3543
3512
  "div",
3544
3513
  {
3545
3514
  className: js,
3546
3515
  "data-message-id": c.id,
3547
3516
  "data-dd-privacy": "mask",
3548
3517
  children: [
3549
- A && /* @__PURE__ */ s(A, {}),
3518
+ M && /* @__PURE__ */ s(M, {}),
3550
3519
  !!F && /* @__PURE__ */ s(K, { reminder: F }),
3551
3520
  c.user && /* @__PURE__ */ s(
3552
- ne,
3521
+ se,
3553
3522
  {
3554
3523
  className: "str-chat__avatar str-chat__message-sender-avatar",
3555
3524
  id: c.user.id,
@@ -3564,7 +3533,7 @@ const pi = ({
3564
3533
  "div",
3565
3534
  {
3566
3535
  className: k("str-chat__message-inner", {
3567
- "str-chat__simple-message--error-failed": ie || It
3536
+ "str-chat__simple-message--error-failed": ie || St
3568
3537
  }),
3569
3538
  "data-testid": "message-inner",
3570
3539
  onClick: he,
@@ -3577,63 +3546,77 @@ const pi = ({
3577
3546
  marginInlineEnd: 0,
3578
3547
  marginInlineStart: 0
3579
3548
  },
3580
- children: At ? /* @__PURE__ */ u("div", { className: "str-chat__message-bubble-wrapper", children: [
3581
- fe ? /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3582
- T && /* @__PURE__ */ s(T, {}),
3549
+ children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3550
+ fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3551
+ E && /* @__PURE__ */ s(E, {}),
3583
3552
  /* @__PURE__ */ s(
3584
3553
  Zt.Sent,
3585
3554
  {
3586
- title: (Lt = c.metadata) == null ? void 0 : Lt.attachment_title,
3587
- mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
3588
- thumbnailUrl: (Pt = c.metadata) == null ? void 0 : Pt.attachment_thumbnail,
3589
- amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
3590
- detail: (Ot = c.metadata) == null ? void 0 : Ot.attachment_detail,
3591
- paymentStatus: ($t = c.metadata) == null ? void 0 : $t.payment_status,
3592
- onPreviewClick: () => C == null ? void 0 : C(c, N),
3593
- onFetchSource: async () => await (R == null ? void 0 : R(c, N))
3555
+ title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3556
+ mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3557
+ thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3558
+ amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3559
+ detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3560
+ paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3561
+ onPreviewClick: () => C == null ? void 0 : C(c, x),
3562
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3594
3563
  }
3595
3564
  )
3596
- ] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3565
+ ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3597
3566
  /* @__PURE__ */ s(
3598
3567
  Zt.Received,
3599
3568
  {
3600
- title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
3601
- mimeType: (Ut = c.metadata) == null ? void 0 : Ut.attachment_mime_type,
3602
- thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3603
- amountText: (Vt = c.metadata) == null ? void 0 : Vt.amount_text,
3604
- detail: (Gt = c.metadata) == null ? void 0 : Gt.attachment_detail,
3605
- paymentStatus: (Ht = c.metadata) == null ? void 0 : Ht.payment_status,
3606
- isUnlocking: w(c.id),
3607
- onUnlockClick: () => C == null ? void 0 : C(c, N),
3608
- onFetchSource: async () => await (R == null ? void 0 : R(c, N)),
3609
- onDownloadClick: () => S == null ? void 0 : S(c, N)
3569
+ title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3570
+ mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3571
+ thumbnailUrl: (Bt = c.metadata) == null ? void 0 : Bt.attachment_thumbnail,
3572
+ amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
3573
+ detail: (jt = c.metadata) == null ? void 0 : jt.attachment_detail,
3574
+ paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3575
+ isUnlocking: N(c.id),
3576
+ onUnlockClick: () => C == null ? void 0 : C(c, x),
3577
+ onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3578
+ onDownloadClick: () => A == null ? void 0 : A(c, x)
3610
3579
  }
3611
3580
  ),
3612
- T && /* @__PURE__ */ s(T, {})
3581
+ E && /* @__PURE__ */ s(E, {})
3613
3582
  ] }),
3614
3583
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3615
- tt,
3584
+ qt,
3616
3585
  {
3617
3586
  message: Q,
3618
- renderText: b
3587
+ renderText: v
3619
3588
  }
3620
3589
  ) })
3621
- ] }) : Tt ? (
3590
+ ] }) : Et ? (
3622
3591
  /* Tip-only messages render as a standalone bubble */
3623
3592
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3624
- ) : Vs ? /* @__PURE__ */ s(
3625
- pi,
3593
+ ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3594
+ "div",
3626
3595
  {
3627
- groupPosition: Le,
3628
- isMyMessage: fe,
3629
- message: {
3630
- ...Q,
3631
- attachments: B
3596
+ className: "str-chat__message-bubble",
3597
+ style: {
3598
+ background: "transparent",
3599
+ borderRadius: 0,
3600
+ overflow: "visible",
3601
+ padding: 0
3632
3602
  },
3633
- renderText: b
3603
+ children: [
3604
+ /* @__PURE__ */ s(
3605
+ xi,
3606
+ {
3607
+ groupPosition: De,
3608
+ isMyMessage: fe,
3609
+ message: {
3610
+ attachments: B,
3611
+ text: Q.text
3612
+ }
3613
+ }
3614
+ ),
3615
+ /* @__PURE__ */ s(Wt, {})
3616
+ ]
3634
3617
  }
3635
- ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ u("div", { className: "str-chat__message-bubble", children: [
3636
- ge && !Mt && /* @__PURE__ */ s(
3618
+ ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3619
+ ge && !Tt && /* @__PURE__ */ s(
3637
3620
  Ke,
3638
3621
  {
3639
3622
  message: c,
@@ -3643,7 +3626,7 @@ const pi = ({
3643
3626
  ),
3644
3627
  Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3645
3628
  B != null && B.length && !c.quoted_message ? /* @__PURE__ */ s(
3646
- I,
3629
+ S,
3647
3630
  {
3648
3631
  actionHandler: l,
3649
3632
  attachments: B
@@ -3653,21 +3636,21 @@ const pi = ({
3653
3636
  _,
3654
3637
  {
3655
3638
  message: Q,
3656
- renderText: b
3639
+ renderText: v
3657
3640
  }
3658
3641
  ) : /* @__PURE__ */ s(
3659
- tt,
3642
+ qt,
3660
3643
  {
3661
3644
  message: Q,
3662
- renderText: b
3645
+ renderText: v
3663
3646
  }
3664
3647
  ),
3665
- /* @__PURE__ */ s(et, {})
3648
+ /* @__PURE__ */ s(Wt, {})
3666
3649
  ] }) })
3667
3650
  }
3668
3651
  ),
3669
- !At && !Tt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
3670
- (!ge || Mt) && /* @__PURE__ */ s(
3652
+ !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3653
+ (!ge || Tt) && /* @__PURE__ */ s(
3671
3654
  Ke,
3672
3655
  {
3673
3656
  message: c,
@@ -3678,33 +3661,33 @@ const pi = ({
3678
3661
  n && ge && /* @__PURE__ */ s(
3679
3662
  qr,
3680
3663
  {
3681
- selected: L,
3664
+ selected: D,
3682
3665
  onVoteUp: y,
3683
- onVoteDown: E
3666
+ onVoteDown: I
3684
3667
  }
3685
3668
  )
3686
3669
  ] }),
3687
3670
  /* @__PURE__ */ s(Xr, {}),
3688
- ae && /* @__PURE__ */ s(
3689
- ee,
3671
+ ne && /* @__PURE__ */ s(
3672
+ te,
3690
3673
  {
3691
3674
  onClick: d,
3692
3675
  reply_count: c.reply_count
3693
3676
  }
3694
3677
  ),
3695
- ue && /* @__PURE__ */ s(X, {})
3678
+ de && /* @__PURE__ */ s(X, {})
3696
3679
  ]
3697
3680
  },
3698
3681
  c.id
3699
3682
  )
3700
3683
  ] });
3701
- }, vi = V.memo(
3702
- bi,
3684
+ }, _i = V.memo(
3685
+ wi,
3703
3686
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3704
- ), xi = (e) => {
3687
+ ), Ni = (e) => {
3705
3688
  const t = _e("CustomMessage");
3706
- return /* @__PURE__ */ s(vi, { ...t, ...e });
3707
- }, wi = () => {
3689
+ return /* @__PURE__ */ s(_i, { ...t, ...e });
3690
+ }, yi = () => {
3708
3691
  var n;
3709
3692
  const { handleDelete: e, message: t } = _e("CustomMessageActions");
3710
3693
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
@@ -3717,7 +3700,7 @@ const pi = ({
3717
3700
  children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3718
3701
  }
3719
3702
  );
3720
- }, _i = () => {
3703
+ }, ki = () => {
3721
3704
  const { handleFlag: e } = _e("CustomMessageActions");
3722
3705
  return /* @__PURE__ */ s(
3723
3706
  ds,
@@ -3729,24 +3712,24 @@ const pi = ({
3729
3712
  children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3730
3713
  }
3731
3714
  );
3732
- }, Ni = () => {
3715
+ }, Ci = () => {
3733
3716
  var t;
3734
3717
  const { message: e } = _e("CustomMessageActions");
3735
3718
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3736
3719
  ta,
3737
3720
  {
3738
3721
  messageActionSet: [
3739
- { Component: wi, placement: "quick", type: "delete" },
3740
- { Component: _i, placement: "quick", type: "flag" }
3722
+ { Component: yi, placement: "quick", type: "delete" },
3723
+ { Component: ki, placement: "quick", type: "flag" }
3741
3724
  ]
3742
3725
  }
3743
3726
  );
3744
- }, yi = ({
3727
+ }, Si = ({
3745
3728
  link: e,
3746
3729
  onDismiss: t
3747
3730
  }) => {
3748
3731
  const { og_scrape_url: n, title: a, image_url: r } = e;
3749
- return /* @__PURE__ */ u(
3732
+ return /* @__PURE__ */ m(
3750
3733
  "a",
3751
3734
  {
3752
3735
  href: n,
@@ -3774,21 +3757,21 @@ const pi = ({
3774
3757
  children: /* @__PURE__ */ s(Ue, { className: "size-4 text-black/90" })
3775
3758
  }
3776
3759
  ),
3777
- /* @__PURE__ */ u("div", { className: "p-2", children: [
3760
+ /* @__PURE__ */ m("div", { className: "p-2", children: [
3778
3761
  a && /* @__PURE__ */ s("div", { className: "truncate text-[14px] font-medium leading-5 text-white", children: a }),
3779
3762
  /* @__PURE__ */ s("div", { className: "truncate text-[12px] leading-4 text-white/55", children: n })
3780
3763
  ] })
3781
3764
  ]
3782
3765
  }
3783
3766
  );
3784
- }, ki = (e) => ({
3767
+ }, Ei = (e) => ({
3785
3768
  linkPreviews: Array.from(e.previews.values()).filter(
3786
- (t) => Wt.previewIsLoaded(t) || Wt.previewIsLoading(t)
3769
+ (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3787
3770
  )
3788
- }), Ci = () => {
3771
+ }), Ii = () => {
3789
3772
  const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3790
3773
  e.state,
3791
- ki
3774
+ Ei
3792
3775
  ), n = (r) => {
3793
3776
  e.dismissPreview(r);
3794
3777
  };
@@ -3801,9 +3784,9 @@ const pi = ({
3801
3784
  // block so it keeps its intrinsic height and the container scrolls — a
3802
3785
  // bare flex-column child would be shrunk on the column axis and its
3803
3786
  // fixed-height hero would spill out of the collapsed card box.
3804
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3787
+ /* @__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)) })
3805
3788
  ) : null;
3806
- }, Et = V.createContext(!1), dl = () => Ie(Et), Si = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3789
+ }, Ct = V.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3807
3790
  "button",
3808
3791
  {
3809
3792
  ...n,
@@ -3813,9 +3796,9 @@ const pi = ({
3813
3796
  onClick: e,
3814
3797
  children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3815
3798
  }
3816
- ), Ei = () => {
3817
- const e = Ie(Et), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3818
- SendButton: r = Si,
3799
+ ), Ai = () => {
3800
+ const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3801
+ SendButton: r = Ti,
3819
3802
  AttachmentPreviewList: i = wn
3820
3803
  } = is("CustomMessageInput");
3821
3804
  return (
@@ -3827,16 +3810,16 @@ const pi = ({
3827
3810
  // content height and the squeeze never reaches the preview list. Stream's
3828
3811
  // <MessageInput> renders its Input directly (context providers only, no
3829
3812
  // wrapper element), so this is a direct flex item of that row.
3830
- /* @__PURE__ */ u(
3813
+ /* @__PURE__ */ m(
3831
3814
  "div",
3832
3815
  {
3833
3816
  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)]",
3834
3817
  "data-dd-privacy": "mask",
3835
3818
  children: [
3836
3819
  /* @__PURE__ */ s(_n, {}),
3837
- /* @__PURE__ */ s(Ci, {}),
3820
+ /* @__PURE__ */ s(Ii, {}),
3838
3821
  /* @__PURE__ */ s(i, {}),
3839
- /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3822
+ /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3840
3823
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3841
3824
  Nn,
3842
3825
  {
@@ -3865,7 +3848,7 @@ const pi = ({
3865
3848
  }
3866
3849
  )
3867
3850
  );
3868
- }, Ii = ({
3851
+ }, Mi = ({
3869
3852
  renderActions: e,
3870
3853
  renderFooter: t,
3871
3854
  disabled: n = !1,
@@ -3874,11 +3857,11 @@ const pi = ({
3874
3857
  }) => {
3875
3858
  var l;
3876
3859
  const { channel: i } = le(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
3877
- return n ? /* @__PURE__ */ u(te, { children: [
3860
+ return n ? /* @__PURE__ */ m(ee, { children: [
3878
3861
  /* @__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 }),
3879
3862
  t == null ? void 0 : t()
3880
- ] }) : /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
3881
- /* @__PURE__ */ u(
3863
+ ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
3864
+ /* @__PURE__ */ m(
3882
3865
  "div",
3883
3866
  {
3884
3867
  inert: o ? "" : void 0,
@@ -3886,23 +3869,23 @@ const pi = ({
3886
3869
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3887
3870
  children: [
3888
3871
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3889
- /* @__PURE__ */ s(Et.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ei }) })
3872
+ /* @__PURE__ */ s(Ct.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3890
3873
  ]
3891
3874
  }
3892
3875
  ),
3893
3876
  t == null ? void 0 : t()
3894
3877
  ] });
3895
- }, Ti = [
3878
+ }, Ri = [
3896
3879
  "SYSTEM_DM_AGENT_PAUSED",
3897
3880
  "SYSTEM_DM_AGENT_RESUMED"
3898
- ], Ai = {
3881
+ ], Li = {
3899
3882
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3900
3883
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3901
- }, Mi = [
3884
+ }, Di = [
3902
3885
  "SYSTEM_AGE_SAFETY_BLOCKED"
3903
- ], Ri = {
3886
+ ], zi = {
3904
3887
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3905
- }, Ze = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", as = (e) => Ti.includes(e), Li = (e) => Mi.includes(e), zi = (e) => {
3888
+ }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3906
3889
  var a;
3907
3890
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3908
3891
  if (as(t))
@@ -3910,7 +3893,7 @@ const pi = ({
3910
3893
  kind: "dm-agent",
3911
3894
  type: t
3912
3895
  };
3913
- if (Li(t))
3896
+ if (Fi(t))
3914
3897
  return {
3915
3898
  kind: "age-safety",
3916
3899
  type: t
@@ -3921,17 +3904,17 @@ const pi = ({
3921
3904
  kind: "dm-agent",
3922
3905
  type: n
3923
3906
  };
3924
- }, Pi = (e) => {
3907
+ }, $i = (e) => {
3925
3908
  const t = e.indexOf(Ze);
3926
3909
  if (t === -1)
3927
3910
  return e;
3928
3911
  const n = t + Ze.length;
3929
- return /* @__PURE__ */ u(te, { children: [
3912
+ return /* @__PURE__ */ m(ee, { children: [
3930
3913
  e.slice(0, t),
3931
3914
  /* @__PURE__ */ s(
3932
3915
  "a",
3933
3916
  {
3934
- href: Di,
3917
+ href: Pi,
3935
3918
  target: "_blank",
3936
3919
  rel: "noopener noreferrer",
3937
3920
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -3940,15 +3923,15 @@ const pi = ({
3940
3923
  ),
3941
3924
  e.slice(n)
3942
3925
  ] });
3943
- }, Fi = (e) => {
3926
+ }, Bi = (e) => {
3944
3927
  var a, r;
3945
- const t = e.message.hide_date === !0, n = zi(
3928
+ const t = e.message.hide_date === !0, n = Oi(
3946
3929
  e.message
3947
3930
  );
3948
3931
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3949
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
3950
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3951
- /* @__PURE__ */ u(
3932
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3933
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3934
+ /* @__PURE__ */ m(
3952
3935
  "div",
3953
3936
  {
3954
3937
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
@@ -3972,9 +3955,9 @@ const pi = ({
3972
3955
  ] });
3973
3956
  }
3974
3957
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3975
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
3976
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3977
- /* @__PURE__ */ u(
3958
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3959
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3960
+ /* @__PURE__ */ m(
3978
3961
  "div",
3979
3962
  {
3980
3963
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
@@ -3991,22 +3974,22 @@ const pi = ({
3991
3974
  "data-testid": "age-safety-system-message-icon"
3992
3975
  }
3993
3976
  ),
3994
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Pi(i) }) })
3977
+ /* @__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) }) })
3995
3978
  ]
3996
3979
  }
3997
3980
  ),
3998
3981
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3999
3982
  ] });
4000
3983
  }
4001
- return /* @__PURE__ */ u("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4002
- /* @__PURE__ */ u("div", { className: "str-chat__message--system__text", children: [
3984
+ return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3985
+ /* @__PURE__ */ m("div", { className: "str-chat__message--system__text", children: [
4003
3986
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
4004
3987
  /* @__PURE__ */ s("p", { children: e.message.text }),
4005
3988
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
4006
3989
  ] }),
4007
3990
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
4008
3991
  ] });
4009
- }, Os = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3992
+ }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4010
3993
  "animateTransform",
4011
3994
  {
4012
3995
  attributeName: "transform",
@@ -4016,47 +3999,47 @@ const pi = ({
4016
3999
  begin: `${120 * t}ms`,
4017
4000
  repeatCount: "indefinite"
4018
4001
  }
4019
- ) }), Oi = /* @__PURE__ */ new Set([
4002
+ ) }), Ui = /* @__PURE__ */ new Set([
4020
4003
  qe.Thinking,
4021
4004
  qe.Generating,
4022
4005
  qe.ExternalSources
4023
- ]), $i = ({ threadList: e }) => {
4024
- var b, x;
4025
- const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4026
- if (!e && l && Oi.has(o)) {
4027
- const v = Bi(t, (b = r.user) == null ? void 0 : b.id);
4006
+ ]), ji = ({ threadList: e }) => {
4007
+ var v, w;
4008
+ const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4009
+ if (!e && l && Ui.has(o)) {
4010
+ const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
4028
4011
  return /* @__PURE__ */ s(
4029
4012
  rs,
4030
4013
  {
4031
- avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
4032
- avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
4033
- avatarImage: v == null ? void 0 : v.image,
4014
+ avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4015
+ avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
4016
+ avatarImage: b == null ? void 0 : b.image,
4034
4017
  testId: "typing-indicator-ai"
4035
4018
  }
4036
4019
  );
4037
4020
  }
4038
4021
  if ((n == null ? void 0 : n.typing_events) === !1)
4039
4022
  return null;
4040
- const m = e ? [] : Object.values(i).filter(
4041
- ({ parent_id: v, user: f }) => {
4042
- var N;
4043
- return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && !v;
4023
+ const u = e ? [] : Object.values(i).filter(
4024
+ ({ parent_id: b, user: g }) => {
4025
+ var x;
4026
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && !b;
4044
4027
  }
4045
4028
  ), p = e ? Object.values(i).filter(
4046
- ({ parent_id: v, user: f }) => {
4047
- var N;
4048
- return (f == null ? void 0 : f.id) !== ((N = r.user) == null ? void 0 : N.id) && v === (a == null ? void 0 : a.id);
4029
+ ({ parent_id: b, user: g }) => {
4030
+ var x;
4031
+ return (g == null ? void 0 : g.id) !== ((x = r.user) == null ? void 0 : x.id) && b === (a == null ? void 0 : a.id);
4049
4032
  }
4050
- ) : [], h = e ? p : m;
4033
+ ) : [], h = e ? p : u;
4051
4034
  if (!h.length)
4052
4035
  return null;
4053
- const g = (x = h[0]) == null ? void 0 : x.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4036
+ const f = (w = h[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4054
4037
  return /* @__PURE__ */ s(
4055
4038
  rs,
4056
4039
  {
4057
- avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4058
- avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4059
- avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4040
+ avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4041
+ avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4042
+ avatarImage: (f == null ? void 0 : f.image) ?? (c == null ? void 0 : c.image),
4060
4043
  testId: "typing-indicator"
4061
4044
  }
4062
4045
  );
@@ -4073,9 +4056,9 @@ const pi = ({
4073
4056
  style: {
4074
4057
  marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
4075
4058
  },
4076
- children: /* @__PURE__ */ u("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: [
4059
+ 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: [
4077
4060
  /* @__PURE__ */ s(
4078
- ne,
4061
+ se,
4079
4062
  {
4080
4063
  className: "str-chat__avatar str-chat__message-sender-avatar",
4081
4064
  id: e,
@@ -4085,7 +4068,7 @@ const pi = ({
4085
4068
  shape: "circle"
4086
4069
  }
4087
4070
  ),
4088
- /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ u(
4071
+ /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ m(
4089
4072
  "svg",
4090
4073
  {
4091
4074
  "aria-hidden": "true",
@@ -4104,7 +4087,7 @@ const pi = ({
4104
4087
  ] })
4105
4088
  }
4106
4089
  );
4107
- function Bi(e, t) {
4090
+ function Vi(e, t) {
4108
4091
  var a;
4109
4092
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4110
4093
  for (const r of Object.values(n)) {
@@ -4113,12 +4096,12 @@ function Bi(e, t) {
4113
4096
  return i;
4114
4097
  }
4115
4098
  }
4116
- const Ui = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4099
+ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4117
4100
  "div",
4118
4101
  {
4119
4102
  className: k("flex items-center justify-center h-full", e),
4120
4103
  children: [
4121
- /* @__PURE__ */ u("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4104
+ /* @__PURE__ */ m("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4122
4105
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
4123
4106
  "animateTransform",
4124
4107
  {
@@ -4156,12 +4139,12 @@ const Ui = () => null, ji = ({ className: e, message: t }) => /* @__PURE__ */ u(
4156
4139
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4157
4140
  ]
4158
4141
  }
4159
- ), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ u("div", { className: "flex items-center", children: [
4160
- /* @__PURE__ */ s(ji, { className: "w-6 h-6" }),
4142
+ ), Be = V.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4143
+ /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4161
4144
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4162
4145
  ] }) }));
4163
4146
  Be.displayName = "LoadingState";
4164
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
4147
+ 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 = ({
4165
4148
  onBack: e,
4166
4149
  showBackButton: t,
4167
4150
  showStarButton: n = !1,
@@ -4171,35 +4154,35 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4171
4154
  showDeleteConversation: o = !0,
4172
4155
  showBlockParticipant: l = !0,
4173
4156
  showReportParticipant: d = !0,
4174
- onDeleteConversationClick: m,
4157
+ onDeleteConversationClick: u,
4175
4158
  onBlockParticipantClick: p,
4176
4159
  onReportParticipantClick: h,
4177
- customChannelActions: g,
4160
+ customChannelActions: f,
4178
4161
  renderChannelActions: c,
4179
- showChannelInfo: b = !0,
4180
- onParticipantNameClick: x,
4181
- renderHeaderTitleBadges: v
4162
+ showChannelInfo: v = !0,
4163
+ onParticipantNameClick: w,
4164
+ renderHeaderTitleBadges: b
4182
4165
  }) => {
4183
- var E, I, M, T, z, O;
4184
- const { channel: f } = le(), { client: N } = oe(), w = V.useMemo(
4166
+ var I, S, R, E, z, O;
4167
+ const { channel: g } = le(), { client: x } = me(), N = V.useMemo(
4185
4168
  () => {
4186
4169
  var j;
4187
4170
  return je(
4188
- (j = f.state) == null ? void 0 : j.members,
4189
- N == null ? void 0 : N.userID,
4190
- f.type
4171
+ (j = g.state) == null ? void 0 : j.members,
4172
+ x == null ? void 0 : x.userID,
4173
+ g.type
4191
4174
  );
4192
4175
  },
4193
- [(E = f.state) == null ? void 0 : E.members, N == null ? void 0 : N.userID, f.type]
4194
- ), C = ut(w == null ? void 0 : w.user), R = (I = w == null ? void 0 : w.user) == null ? void 0 : I.image, S = dt(f), D = v == null ? void 0 : v({
4195
- channel: f,
4196
- participant: w
4197
- }), $ = "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", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ u(te, { children: [
4176
+ [(I = g.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, g.type]
4177
+ ), C = ct(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, A = ot(g), L = b == null ? void 0 : b({
4178
+ channel: g,
4179
+ participant: N
4180
+ }), $ = "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", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ m(ee, { children: [
4198
4181
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4199
- D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4182
+ L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4200
4183
  ] }), y = async () => {
4201
4184
  try {
4202
- S ? await f.unpin() : await f.pin();
4185
+ A ? await g.unpin() : await g.pin();
4203
4186
  } catch (j) {
4204
4187
  console.error(
4205
4188
  "[CustomChannelHeader] Failed to update pinned status:",
@@ -4207,8 +4190,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4207
4190
  );
4208
4191
  }
4209
4192
  };
4210
- return /* @__PURE__ */ u("div", { className: "@container", children: [
4211
- /* @__PURE__ */ u("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4193
+ return /* @__PURE__ */ m("div", { className: "@container", children: [
4194
+ /* @__PURE__ */ m("div", { className: "grid grid-cols-[1fr_auto_1fr] w-full items-center @lg:hidden px-6 py-3", children: [
4212
4195
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ s(
4213
4196
  "button",
4214
4197
  {
@@ -4220,7 +4203,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4220
4203
  }),
4221
4204
  type: "button",
4222
4205
  "aria-label": "Back to conversations",
4223
- children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
4206
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4224
4207
  }
4225
4208
  ) }),
4226
4209
  /* @__PURE__ */ s(
@@ -4228,11 +4211,11 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4228
4211
  {
4229
4212
  className: "flex flex-col gap-1 items-center",
4230
4213
  "data-dd-privacy": "mask",
4231
- children: x ? /* @__PURE__ */ u(
4214
+ children: w ? /* @__PURE__ */ m(
4232
4215
  "button",
4233
4216
  {
4234
4217
  type: "button",
4235
- onClick: x,
4218
+ onClick: w,
4236
4219
  "aria-label": `View details for ${C}`,
4237
4220
  className: k(
4238
4221
  $,
@@ -4240,40 +4223,40 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4240
4223
  ),
4241
4224
  children: [
4242
4225
  /* @__PURE__ */ s(
4243
- ne,
4226
+ se,
4244
4227
  {
4245
- id: ((M = w == null ? void 0 : w.user) == null ? void 0 : M.id) || f.id || "unknown",
4228
+ id: ((R = N == null ? void 0 : N.user) == null ? void 0 : R.id) || g.id || "unknown",
4246
4229
  name: C,
4247
- image: R,
4248
- starred: n && S,
4230
+ image: T,
4231
+ starred: n && A,
4249
4232
  dmAgentEnabled: a,
4250
4233
  size: 48
4251
4234
  }
4252
4235
  ),
4253
- /* @__PURE__ */ u("span", { className: "flex max-w-full items-center gap-0.5", children: [
4254
- L,
4236
+ /* @__PURE__ */ m("span", { className: "flex max-w-full items-center gap-0.5", children: [
4237
+ D,
4255
4238
  /* @__PURE__ */ s(ve, { className: "size-3 shrink-0", weight: "bold" })
4256
4239
  ] }),
4257
- a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4240
+ a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4258
4241
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4259
4242
  /* @__PURE__ */ s("span", { children: Pe })
4260
4243
  ] })
4261
4244
  ]
4262
4245
  }
4263
- ) : /* @__PURE__ */ u("div", { className: $, children: [
4246
+ ) : /* @__PURE__ */ m("div", { className: $, children: [
4264
4247
  /* @__PURE__ */ s(
4265
- ne,
4248
+ se,
4266
4249
  {
4267
- id: ((T = w == null ? void 0 : w.user) == null ? void 0 : T.id) || f.id || "unknown",
4250
+ id: ((E = N == null ? void 0 : N.user) == null ? void 0 : E.id) || g.id || "unknown",
4268
4251
  name: C,
4269
- image: R,
4270
- starred: n && S,
4252
+ image: T,
4253
+ starred: n && A,
4271
4254
  dmAgentEnabled: a,
4272
4255
  size: 48
4273
4256
  }
4274
4257
  ),
4275
- /* @__PURE__ */ u("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4276
- L,
4258
+ /* @__PURE__ */ m("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4259
+ D,
4277
4260
  /* @__PURE__ */ s(
4278
4261
  ve,
4279
4262
  {
@@ -4282,54 +4265,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4282
4265
  }
4283
4266
  )
4284
4267
  ] }),
4285
- a && /* @__PURE__ */ u("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4268
+ a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4286
4269
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4287
4270
  /* @__PURE__ */ s("span", { children: Pe })
4288
4271
  ] })
4289
4272
  ] })
4290
4273
  }
4291
4274
  ),
4292
- /* @__PURE__ */ u("div", { className: "flex justify-end items-center gap-2", children: [
4275
+ /* @__PURE__ */ m("div", { className: "flex justify-end items-center gap-2", children: [
4293
4276
  n && /* @__PURE__ */ s(
4294
4277
  "button",
4295
4278
  {
4296
4279
  className: be,
4297
4280
  onClick: y,
4298
4281
  type: "button",
4299
- "aria-label": S ? "Unstar conversation" : "Star conversation",
4282
+ "aria-label": A ? "Unstar conversation" : "Star conversation",
4300
4283
  children: /* @__PURE__ */ s(
4301
4284
  Ee,
4302
4285
  {
4303
4286
  className: k("size-5", {
4304
- "text-yellow-600": S,
4305
- "text-black/90": !S
4287
+ "text-yellow-600": A,
4288
+ "text-black/90": !A
4306
4289
  }),
4307
- weight: S ? "duotone" : "regular"
4290
+ weight: A ? "duotone" : "regular"
4308
4291
  }
4309
4292
  )
4310
4293
  }
4311
4294
  ),
4312
- b && (c !== void 0 ? c : /* @__PURE__ */ s(
4313
- at,
4295
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4296
+ st,
4314
4297
  {
4315
- channel: f,
4316
- participant: w,
4298
+ channel: g,
4299
+ participant: N,
4317
4300
  showDeleteConversation: o,
4318
4301
  showBlockParticipant: l,
4319
4302
  showReportParticipant: d,
4320
4303
  onLeaveConversation: r,
4321
4304
  onBlockParticipant: i,
4322
- onDeleteConversationClick: m,
4305
+ onDeleteConversationClick: u,
4323
4306
  onBlockParticipantClick: p,
4324
4307
  onReportParticipantClick: h,
4325
- customChannelActions: g,
4308
+ customChannelActions: f,
4326
4309
  triggerClassName: k(be, "bg-[#F1F0EE]")
4327
4310
  }
4328
4311
  ))
4329
4312
  ] })
4330
4313
  ] }),
4331
- /* @__PURE__ */ u("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4332
- /* @__PURE__ */ u("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4314
+ /* @__PURE__ */ m("div", { className: "px-6 py-3 hidden @lg:flex items-center justify-between gap-3 min-h-12 border-b border-b-black/[0.08]", children: [
4315
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-4 min-w-0", "data-dd-privacy": "mask", children: [
4333
4316
  t && e && /* @__PURE__ */ s(
4334
4317
  "button",
4335
4318
  {
@@ -4340,14 +4323,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4340
4323
  type: "button",
4341
4324
  onClick: e,
4342
4325
  "aria-label": "Back to conversations",
4343
- children: /* @__PURE__ */ s(st, { className: "size-5 text-black/90" })
4326
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4344
4327
  }
4345
4328
  ),
4346
- x ? /* @__PURE__ */ u(
4329
+ w ? /* @__PURE__ */ m(
4347
4330
  "button",
4348
4331
  {
4349
4332
  type: "button",
4350
- onClick: x,
4333
+ onClick: w,
4351
4334
  "aria-label": `View details for ${C}`,
4352
4335
  className: k(
4353
4336
  F,
@@ -4355,43 +4338,43 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4355
4338
  ),
4356
4339
  children: [
4357
4340
  /* @__PURE__ */ s(
4358
- ne,
4341
+ se,
4359
4342
  {
4360
- id: ((z = w == null ? void 0 : w.user) == null ? void 0 : z.id) || f.id || "unknown",
4343
+ id: ((z = N == null ? void 0 : N.user) == null ? void 0 : z.id) || g.id || "unknown",
4361
4344
  name: C,
4362
- image: R,
4363
- starred: n && S,
4345
+ image: T,
4346
+ starred: n && A,
4364
4347
  dmAgentEnabled: a,
4365
4348
  size: 48
4366
4349
  }
4367
4350
  ),
4368
- /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4369
- /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4370
- L,
4351
+ /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4352
+ /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4353
+ D,
4371
4354
  /* @__PURE__ */ s(ve, { className: "size-4 shrink-0", weight: "bold" })
4372
4355
  ] }),
4373
- a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4356
+ a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4374
4357
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4375
4358
  /* @__PURE__ */ s("span", { className: "truncate", children: Pe })
4376
4359
  ] })
4377
4360
  ] })
4378
4361
  ]
4379
4362
  }
4380
- ) : /* @__PURE__ */ u("div", { className: F, children: [
4363
+ ) : /* @__PURE__ */ m("div", { className: F, children: [
4381
4364
  /* @__PURE__ */ s(
4382
- ne,
4365
+ se,
4383
4366
  {
4384
- id: ((O = w == null ? void 0 : w.user) == null ? void 0 : O.id) || f.id || "unknown",
4367
+ id: ((O = N == null ? void 0 : N.user) == null ? void 0 : O.id) || g.id || "unknown",
4385
4368
  name: C,
4386
- image: R,
4387
- starred: n && S,
4369
+ image: T,
4370
+ starred: n && A,
4388
4371
  dmAgentEnabled: a,
4389
4372
  size: 48
4390
4373
  }
4391
4374
  ),
4392
- /* @__PURE__ */ u("div", { className: "min-w-0", children: [
4393
- /* @__PURE__ */ u("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4394
- L,
4375
+ /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4376
+ /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4377
+ D,
4395
4378
  /* @__PURE__ */ s(
4396
4379
  ve,
4397
4380
  {
@@ -4400,54 +4383,54 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4400
4383
  }
4401
4384
  )
4402
4385
  ] }),
4403
- a && /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4386
+ a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
4404
4387
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
4405
4388
  /* @__PURE__ */ s("span", { className: "truncate", children: Pe })
4406
4389
  ] })
4407
4390
  ] })
4408
4391
  ] })
4409
4392
  ] }),
4410
- /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
4393
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
4411
4394
  n && /* @__PURE__ */ s(
4412
4395
  "button",
4413
4396
  {
4414
4397
  className: be,
4415
4398
  onClick: y,
4416
4399
  type: "button",
4417
- "aria-label": S ? "Unstar conversation" : "Star conversation",
4400
+ "aria-label": A ? "Unstar conversation" : "Star conversation",
4418
4401
  children: /* @__PURE__ */ s(
4419
4402
  Ee,
4420
4403
  {
4421
4404
  className: k("size-6", {
4422
- "text-yellow-600": S,
4423
- "text-black/90": !S
4405
+ "text-yellow-600": A,
4406
+ "text-black/90": !A
4424
4407
  }),
4425
- weight: S ? "duotone" : "regular"
4408
+ weight: A ? "duotone" : "regular"
4426
4409
  }
4427
4410
  )
4428
4411
  }
4429
4412
  ),
4430
- b && (c !== void 0 ? c : /* @__PURE__ */ s(
4431
- at,
4413
+ v && (c !== void 0 ? c : /* @__PURE__ */ s(
4414
+ st,
4432
4415
  {
4433
- channel: f,
4434
- participant: w,
4416
+ channel: g,
4417
+ participant: N,
4435
4418
  showDeleteConversation: o,
4436
4419
  showBlockParticipant: l,
4437
4420
  showReportParticipant: d,
4438
4421
  onLeaveConversation: r,
4439
4422
  onBlockParticipant: i,
4440
- onDeleteConversationClick: m,
4423
+ onDeleteConversationClick: u,
4441
4424
  onBlockParticipantClick: p,
4442
4425
  onReportParticipantClick: h,
4443
- customChannelActions: g,
4426
+ customChannelActions: f,
4444
4427
  triggerClassName: be
4445
4428
  }
4446
4429
  ))
4447
4430
  ] })
4448
4431
  ] })
4449
4432
  ] });
4450
- }, Gi = ({
4433
+ }, qi = ({
4451
4434
  onBack: e,
4452
4435
  showBackButton: t,
4453
4436
  renderMessageInputActions: n,
@@ -4457,147 +4440,144 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4457
4440
  onBlockParticipant: o,
4458
4441
  showDeleteConversation: l = !0,
4459
4442
  onDeleteConversationClick: d,
4460
- onBlockParticipantClick: m,
4443
+ onBlockParticipantClick: u,
4461
4444
  onReportParticipantClick: p,
4462
4445
  showBlockParticipant: h = !0,
4463
- showReportParticipant: g = !0,
4446
+ showReportParticipant: f = !0,
4464
4447
  composerDisabled: c = !1,
4465
- composerDisabledReason: b,
4466
- showStarButton: x = !1,
4467
- chatbotVotingEnabled: v = !1,
4468
- renderChannelBanner: f,
4469
- renderHeaderTitleBadges: N,
4470
- customChannelActions: w,
4448
+ composerDisabledReason: v,
4449
+ showStarButton: w = !1,
4450
+ chatbotVotingEnabled: b = !1,
4451
+ renderChannelBanner: g,
4452
+ renderHeaderTitleBadges: x,
4453
+ customChannelActions: N,
4471
4454
  renderChannelActions: C,
4472
- renderMessage: R,
4473
- dmAgentEnabled: S = !1,
4474
- viewerLanguage: D,
4455
+ renderMessage: T,
4456
+ dmAgentEnabled: A = !1,
4457
+ viewerLanguage: L,
4475
4458
  showChannelInfo: $ = !0,
4476
4459
  onParticipantNameClick: F,
4477
- composerInput: L
4460
+ composerInput: D
4478
4461
  }) => {
4479
- var _, A, H, q;
4480
- const { channel: y } = le(), { client: E } = oe(), I = V.useMemo(
4462
+ var _, M, H, q;
4463
+ const { channel: y } = le(), { client: I } = me(), S = V.useMemo(
4481
4464
  () => {
4482
4465
  var Y;
4483
4466
  return je(
4484
4467
  (Y = y.state) == null ? void 0 : Y.members,
4485
- E == null ? void 0 : E.userID,
4468
+ I == null ? void 0 : I.userID,
4486
4469
  y.type
4487
4470
  );
4488
4471
  },
4489
- [(_ = y.state) == null ? void 0 : _.members, E == null ? void 0 : E.userID, y.type]
4490
- ), M = V.useMemo(() => {
4472
+ [(_ = y.state) == null ? void 0 : _.members, I == null ? void 0 : I.userID, y.type]
4473
+ ), R = V.useMemo(() => {
4491
4474
  var W;
4492
- const Y = E == null ? void 0 : E.userID;
4475
+ const Y = I == null ? void 0 : I.userID;
4493
4476
  return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Q) => {
4494
- var de;
4495
- return ((de = Q.user) == null ? void 0 : de.id) === Y;
4477
+ var ce;
4478
+ return ((ce = Q.user) == null ? void 0 : ce.id) === Y;
4496
4479
  }) : void 0;
4497
- }, [E == null ? void 0 : E.userID, (A = y.state) == null ? void 0 : A.members]), T = ((H = M == null ? void 0 : M.user) == null ? void 0 : H.is_account) ?? (M == null ? void 0 : M.is_account), z = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), O = S && T === !1 && z === !0, j = y.state.messages.some(
4480
+ }, [I == null ? void 0 : I.userID, (M = y.state) == null ? void 0 : M.members]), E = ((H = R == null ? void 0 : R.user) == null ? void 0 : H.is_account) ?? (R == null ? void 0 : R.is_account), z = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), O = A && E === !1 && z === !0, j = y.state.messages.some(
4498
4481
  (Y) => Y.type !== "deleted"
4499
- ), X = f ? /* @__PURE__ */ s(V.Fragment, { children: f() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4482
+ ), X = g ? /* @__PURE__ */ s(V.Fragment, { children: g() }, "lt-channel-banner") : null, te = F ? /* @__PURE__ */ s(
4500
4483
  pa,
4501
4484
  {
4502
- className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4503
4485
  onBack: e,
4504
4486
  showBackButton: t,
4505
4487
  showChannelInfo: $,
4506
- showStarButton: x,
4488
+ showStarButton: w,
4507
4489
  dmAgentEnabled: O,
4508
4490
  onLeaveConversation: i,
4509
4491
  onBlockParticipant: o,
4510
4492
  showDeleteConversation: l,
4511
4493
  showBlockParticipant: h,
4512
- showReportParticipant: g,
4494
+ showReportParticipant: f,
4513
4495
  onDeleteConversationClick: d,
4514
- onBlockParticipantClick: m,
4496
+ onBlockParticipantClick: u,
4515
4497
  onReportParticipantClick: p,
4516
- customChannelActions: w,
4498
+ customChannelActions: N,
4517
4499
  renderChannelActions: C,
4518
4500
  onParticipantNameClick: F
4519
4501
  }
4520
4502
  ) : null, K = Z(
4521
4503
  (Y) => {
4522
4504
  const { message: B } = _e("ChannelView"), W = /* @__PURE__ */ s(
4523
- xi,
4505
+ Ni,
4524
4506
  {
4525
4507
  ...Y,
4526
- chatbotVotingEnabled: v,
4527
- viewerLanguage: D
4508
+ chatbotVotingEnabled: b,
4509
+ viewerLanguage: L
4528
4510
  }
4529
4511
  );
4530
- return !R || !B ? W : R(W, B);
4512
+ return !T || !B ? W : T(W, B);
4531
4513
  },
4532
- [v, R, D]
4514
+ [b, T, L]
4533
4515
  );
4534
- return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4516
+ return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4535
4517
  Sn,
4536
4518
  {
4537
4519
  overrides: {
4538
4520
  Message: K,
4539
- MessageActions: Ni
4521
+ MessageActions: Ci
4540
4522
  },
4541
- children: /* @__PURE__ */ u(En, { children: [
4542
- !F && /* @__PURE__ */ u(te, { children: [
4523
+ children: /* @__PURE__ */ m(En, { children: [
4524
+ !F && /* @__PURE__ */ m(ee, { children: [
4543
4525
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4544
- Vi,
4526
+ Yi,
4545
4527
  {
4546
4528
  onBack: e,
4547
4529
  showBackButton: t,
4548
4530
  showChannelInfo: $,
4549
- showStarButton: x,
4531
+ showStarButton: w,
4550
4532
  dmAgentEnabled: O,
4551
4533
  onLeaveConversation: i,
4552
4534
  onBlockParticipant: o,
4553
4535
  showDeleteConversation: l,
4554
4536
  showBlockParticipant: h,
4555
- showReportParticipant: g,
4537
+ showReportParticipant: f,
4556
4538
  onDeleteConversationClick: d,
4557
- onBlockParticipantClick: m,
4539
+ onBlockParticipantClick: u,
4558
4540
  onReportParticipantClick: p,
4559
- customChannelActions: w,
4541
+ customChannelActions: N,
4560
4542
  renderChannelActions: C,
4561
- renderHeaderTitleBadges: N
4543
+ renderHeaderTitleBadges: x
4562
4544
  }
4563
4545
  ) }, "lt-channel-header"),
4564
4546
  X
4565
4547
  ] }),
4566
- /* @__PURE__ */ u(
4548
+ F && !j && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4549
+ te,
4550
+ X
4551
+ ] }),
4552
+ /* @__PURE__ */ s(
4567
4553
  "div",
4568
4554
  {
4569
4555
  className: "flex-1 overflow-hidden relative",
4570
- children: [
4571
- F && !j && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ u("div", { className: "str-chat__message-list-scroll", children: [
4572
- ee,
4573
- X
4574
- ] }) }),
4575
- /* @__PURE__ */ s(
4576
- In,
4577
- {
4578
- head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
4579
- ee,
4580
- X
4581
- ] }) : void 0,
4582
- hideDeletedMessages: !0,
4583
- hideNewMessageSeparator: !1
4584
- }
4585
- )
4586
- ]
4556
+ children: /* @__PURE__ */ s(
4557
+ In,
4558
+ {
4559
+ head: F && j ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4560
+ te,
4561
+ X
4562
+ ] }) : void 0,
4563
+ hideDeletedMessages: !0,
4564
+ hideNewMessageSeparator: !1
4565
+ }
4566
+ )
4587
4567
  },
4588
4568
  "lt-channel-message-list"
4589
4569
  ),
4590
4570
  r ? /* @__PURE__ */ s(V.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4591
4571
  /* @__PURE__ */ s(
4592
- Ii,
4572
+ Mi,
4593
4573
  {
4594
4574
  ...n && {
4595
4575
  renderActions: () => n == null ? void 0 : n(y)
4596
4576
  },
4597
4577
  renderFooter: () => a == null ? void 0 : a(y),
4598
4578
  disabled: c,
4599
- disabledReason: b,
4600
- composerInput: L
4579
+ disabledReason: v,
4580
+ composerInput: D
4601
4581
  },
4602
4582
  "lt-channel-message-input"
4603
4583
  )
@@ -4615,86 +4595,86 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4615
4595
  onLeaveConversation: o,
4616
4596
  onBlockParticipant: l,
4617
4597
  className: d,
4618
- CustomChannelEmptyState: m = Ui,
4598
+ CustomChannelEmptyState: u = Gi,
4619
4599
  showDeleteConversation: p = !0,
4620
4600
  onDeleteConversationClick: h,
4621
- onBlockParticipantClick: g,
4601
+ onBlockParticipantClick: f,
4622
4602
  onReportParticipantClick: c,
4623
- showBlockParticipant: b = !0,
4624
- showReportParticipant: x = !0,
4625
- composerDisabled: v = !1,
4626
- composerDisabledReason: f,
4627
- dmAgentEnabled: N,
4628
- messageMetadata: w,
4603
+ showBlockParticipant: v = !0,
4604
+ showReportParticipant: w = !0,
4605
+ composerDisabled: b = !1,
4606
+ composerDisabledReason: g,
4607
+ dmAgentEnabled: x,
4608
+ messageMetadata: N,
4629
4609
  onMessageSent: C,
4630
- showStarButton: R = !1,
4631
- chatbotVotingEnabled: S = !1,
4632
- renderChannelBanner: D,
4610
+ showStarButton: T = !1,
4611
+ chatbotVotingEnabled: A = !1,
4612
+ renderChannelBanner: L,
4633
4613
  renderHeaderTitleBadges: $,
4634
4614
  customChannelActions: F,
4635
- renderChannelActions: L,
4615
+ renderChannelActions: D,
4636
4616
  renderMessage: y,
4637
- onMessageLinkClick: E,
4638
- sendButton: I,
4639
- attachmentPreviewList: M,
4640
- viewerLanguage: T,
4617
+ onMessageLinkClick: I,
4618
+ sendButton: S,
4619
+ attachmentPreviewList: R,
4620
+ viewerLanguage: E,
4641
4621
  showChannelInfo: z = !0,
4642
4622
  onParticipantNameClick: O,
4643
4623
  composerInput: j
4644
4624
  }) => {
4645
4625
  const X = Z(
4646
- async (K, _, A) => {
4626
+ async (K, _, M) => {
4647
4627
  var Q;
4648
- const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = N && !H, Y = {
4628
+ const H = ((Q = e.data) == null ? void 0 : Q.chatbot_paused) === !0, q = x && !H, Y = {
4649
4629
  ..._,
4650
4630
  ...q && { silent: !0 },
4651
- ...w && {
4631
+ ...N && {
4652
4632
  metadata: {
4653
4633
  ..._.metadata ?? {},
4654
- ...w
4634
+ ...N
4655
4635
  }
4656
4636
  }
4657
4637
  }, B = {
4658
- ...A,
4638
+ ...M,
4659
4639
  ...q && { skip_push: !0 }
4660
4640
  }, W = await e.sendMessage(Y, B);
4661
4641
  return C == null || C(W), W;
4662
4642
  },
4663
- [e, N, w, C]
4664
- ), ee = G(null);
4643
+ [e, x, N, C]
4644
+ ), te = G(null);
4665
4645
  return J(() => {
4666
- if (!E) return;
4667
- const K = ee.current;
4646
+ if (!I) return;
4647
+ const K = te.current;
4668
4648
  if (!K) return;
4669
- const _ = (A) => {
4670
- const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4649
+ const _ = (M) => {
4650
+ const H = M.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4671
4651
  if (!Y) return;
4672
- const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((de) => de.id === W) : void 0;
4673
- E(Y, Q);
4652
+ const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((ce) => ce.id === W) : void 0;
4653
+ I(Y, Q);
4674
4654
  };
4675
4655
  return K.addEventListener("click", _), () => K.removeEventListener("click", _);
4676
- }, [E, e]), /* @__PURE__ */ s(
4656
+ }, [I, e]), /* @__PURE__ */ s(
4677
4657
  "div",
4678
4658
  {
4679
- ref: ee,
4659
+ ref: te,
4680
4660
  className: k(
4681
4661
  "messaging-channel-view h-full flex flex-col",
4682
4662
  d
4683
4663
  ),
4684
- children: /* @__PURE__ */ s(Os.Provider, { value: N ?? !1, children: /* @__PURE__ */ s(
4664
+ children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4685
4665
  Cn,
4686
4666
  {
4687
4667
  channel: e,
4688
- MessageSystem: Fi,
4689
- EmptyStateIndicator: m,
4668
+ MessageSystem: Bi,
4669
+ EmptyStateIndicator: u,
4690
4670
  LoadingIndicator: Be,
4691
4671
  DateSeparator: ba,
4692
- TypingIndicator: $i,
4672
+ TypingIndicator: ji,
4693
4673
  doSendMessageRequest: X,
4694
- ...I ? { SendButton: I } : {},
4695
- ...M ? { AttachmentPreviewList: M } : {},
4674
+ ...S ? { SendButton: S } : {},
4675
+ ...R ? { AttachmentPreviewList: R } : {},
4696
4676
  children: /* @__PURE__ */ s(
4697
- Gi,
4677
+ qi,
4698
4678
  {
4699
4679
  onBack: t,
4700
4680
  showBackButton: n,
@@ -4703,24 +4683,24 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4703
4683
  renderConversationFooter: i,
4704
4684
  onLeaveConversation: o,
4705
4685
  onBlockParticipant: l,
4706
- CustomChannelEmptyState: m,
4686
+ CustomChannelEmptyState: u,
4707
4687
  showDeleteConversation: p,
4708
4688
  onDeleteConversationClick: h,
4709
- onBlockParticipantClick: g,
4689
+ onBlockParticipantClick: f,
4710
4690
  onReportParticipantClick: c,
4711
- showBlockParticipant: b,
4712
- showReportParticipant: x,
4713
- composerDisabled: v,
4714
- composerDisabledReason: f,
4715
- showStarButton: R,
4716
- dmAgentEnabled: N,
4717
- chatbotVotingEnabled: S,
4718
- renderChannelBanner: D,
4691
+ showBlockParticipant: v,
4692
+ showReportParticipant: w,
4693
+ composerDisabled: b,
4694
+ composerDisabledReason: g,
4695
+ showStarButton: T,
4696
+ dmAgentEnabled: x,
4697
+ chatbotVotingEnabled: A,
4698
+ renderChannelBanner: L,
4719
4699
  renderHeaderTitleBadges: $,
4720
4700
  customChannelActions: F,
4721
- renderChannelActions: L,
4701
+ renderChannelActions: D,
4722
4702
  renderMessage: y,
4723
- viewerLanguage: T,
4703
+ viewerLanguage: E,
4724
4704
  showChannelInfo: z,
4725
4705
  onParticipantNameClick: O,
4726
4706
  composerInput: j
@@ -4733,7 +4713,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4733
4713
  }
4734
4714
  );
4735
4715
  $s.displayName = "ChannelView";
4736
- const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
4716
+ const ke = V.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: [
4737
4717
  /* @__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: "⚠️" }) }),
4738
4718
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4739
4719
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4748,7 +4728,7 @@ const ke = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4748
4728
  )
4749
4729
  ] }) }));
4750
4730
  ke.displayName = "ErrorState";
4751
- const ul = ({
4731
+ const fl = ({
4752
4732
  capabilities: e = {},
4753
4733
  renderMessageInputActions: t,
4754
4734
  renderConversationFooter: n,
@@ -4758,54 +4738,54 @@ const ul = ({
4758
4738
  initialParticipantData: o,
4759
4739
  CustomChannelEmptyState: l,
4760
4740
  onBlockParticipantClick: d,
4761
- onReportParticipantClick: m,
4741
+ onReportParticipantClick: u,
4762
4742
  dmAgentEnabled: p,
4763
4743
  onMessageSent: h,
4764
- chatbotVotingEnabled: g = !1,
4744
+ chatbotVotingEnabled: f = !1,
4765
4745
  viewerLanguage: c,
4766
- renderHeaderTitleBadges: b,
4767
- renderChannelBanner: x,
4768
- customChannelActions: v,
4769
- renderChannelActions: f,
4770
- onParticipantNameClick: N,
4771
- renderMessage: w,
4746
+ renderHeaderTitleBadges: v,
4747
+ renderChannelBanner: w,
4748
+ customChannelActions: b,
4749
+ renderChannelActions: g,
4750
+ onParticipantNameClick: x,
4751
+ renderMessage: N,
4772
4752
  onMessageLinkClick: C,
4773
- showChannelInfo: R,
4774
- composerInput: S
4753
+ showChannelInfo: T,
4754
+ composerInput: A
4775
4755
  }) => {
4776
4756
  const {
4777
- client: D,
4757
+ client: L,
4778
4758
  isConnected: $,
4779
4759
  isLoading: F,
4780
- error: L,
4760
+ error: D,
4781
4761
  refreshConnection: y,
4782
- service: E,
4783
- debug: I
4784
- } = sa(), [M, T] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: ee = !0 } = e, K = G(o);
4762
+ service: I,
4763
+ debug: S
4764
+ } = sa(), [R, E] = U(null), [z, O] = U(null), [j, X] = U(!1), { showDeleteConversation: te = !0 } = e, K = G(o);
4785
4765
  K.current = o;
4786
4766
  const _ = G(a);
4787
4767
  _.current = a;
4788
- const A = G(null), H = G(null);
4768
+ const M = G(null), H = G(null);
4789
4769
  J(() => {
4790
- H.current = M;
4791
- }, [M]), J(() => {
4792
- if (!D || !$) return;
4793
- const B = D.userID;
4770
+ H.current = R;
4771
+ }, [R]), J(() => {
4772
+ if (!L || !$) return;
4773
+ const B = L.userID;
4794
4774
  if (!B) return;
4795
4775
  const W = `${B}::${i}`;
4796
- if (A.current === W) return;
4797
- A.current = W;
4776
+ if (M.current === W) return;
4777
+ M.current = W;
4798
4778
  const Q = () => {
4799
- A.current === W && (A.current = null);
4779
+ M.current === W && (M.current = null);
4800
4780
  };
4801
4781
  (async () => {
4802
- var De, Le;
4782
+ var Le, De;
4803
4783
  try {
4804
- I && console.log(
4784
+ S && console.log(
4805
4785
  "[MessagingShell] Loading initial conversation with:",
4806
4786
  i
4807
4787
  );
4808
- const ae = await D.queryChannels(
4788
+ const ne = await L.queryChannels(
4809
4789
  {
4810
4790
  type: "messaging",
4811
4791
  members: { $eq: [B, i] }
@@ -4813,28 +4793,28 @@ const ul = ({
4813
4793
  {},
4814
4794
  { limit: 1 }
4815
4795
  );
4816
- if (ae.length > 0) {
4817
- T(ae[0]), O(null), (De = _.current) == null || De.call(_, ae[0]), I && console.log(
4796
+ if (ne.length > 0) {
4797
+ E(ne[0]), O(null), (Le = _.current) == null || Le.call(_, ne[0]), S && console.log(
4818
4798
  "[MessagingShell] Initial conversation loaded:",
4819
- ae[0].id
4799
+ ne[0].id
4820
4800
  );
4821
4801
  return;
4822
4802
  }
4823
- const ue = K.current;
4824
- if (!ue || !E) {
4825
- Q(), O("No conversation found with this account"), I && console.log(
4803
+ const de = K.current;
4804
+ if (!de || !I) {
4805
+ Q(), O("No conversation found with this account"), S && console.log(
4826
4806
  "[MessagingShell] No conversation found for:",
4827
4807
  i
4828
4808
  );
4829
4809
  return;
4830
4810
  }
4831
4811
  try {
4832
- const ie = await E.startChannelWithParticipant({
4833
- id: ue.id,
4834
- name: ue.name,
4835
- phone: ue.phone
4812
+ const ie = await I.startChannelWithParticipant({
4813
+ id: de.id,
4814
+ name: de.name,
4815
+ phone: de.phone
4836
4816
  });
4837
- T(ie), O(null), (Le = _.current) == null || Le.call(_, ie), I && console.log(
4817
+ E(ie), O(null), (De = _.current) == null || De.call(_, ie), S && console.log(
4838
4818
  "[MessagingShell] Channel created and loaded:",
4839
4819
  ie.id
4840
4820
  );
@@ -4844,56 +4824,56 @@ const ul = ({
4844
4824
  ie
4845
4825
  ), Q(), O("Failed to create conversation");
4846
4826
  }
4847
- } catch (ae) {
4827
+ } catch (ne) {
4848
4828
  console.error(
4849
4829
  "[MessagingShell] Failed to load initial conversation:",
4850
- ae
4830
+ ne
4851
4831
  ), Q(), H.current || O("Failed to load conversation");
4852
4832
  }
4853
4833
  })();
4854
- }, [i, D, $, E, I]);
4834
+ }, [i, L, $, I, S]);
4855
4835
  const q = G(r);
4856
4836
  q.current = r;
4857
4837
  const Y = Z(() => {
4858
4838
  var B;
4859
- T(null), X(!0), (B = q.current) == null || B.call(q);
4839
+ E(null), X(!0), (B = q.current) == null || B.call(q);
4860
4840
  }, []);
4861
- return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: y }) : !$ || !D ? /* @__PURE__ */ s(
4841
+ return F ? /* @__PURE__ */ s(Be, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: y }) : !$ || !L ? /* @__PURE__ */ s(
4862
4842
  ke,
4863
4843
  {
4864
4844
  message: "Not connected to messaging service",
4865
4845
  onBack: y
4866
4846
  }
4867
- ) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !M ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : M ? /* @__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(
4847
+ ) : z ? /* @__PURE__ */ s(ke, { message: z }) : j && !R ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : R ? /* @__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(
4868
4848
  $s,
4869
4849
  {
4870
- channel: M,
4850
+ channel: R,
4871
4851
  renderMessageInputActions: t,
4872
4852
  renderConversationFooter: n,
4873
- renderChannelBanner: x,
4853
+ renderChannelBanner: w,
4874
4854
  onLeaveConversation: Y,
4875
4855
  onBlockParticipant: Y,
4876
4856
  CustomChannelEmptyState: l,
4877
- showDeleteConversation: ee,
4857
+ showDeleteConversation: te,
4878
4858
  onBlockParticipantClick: d,
4879
- onReportParticipantClick: m,
4859
+ onReportParticipantClick: u,
4880
4860
  dmAgentEnabled: p,
4881
4861
  onMessageSent: h,
4882
- chatbotVotingEnabled: g,
4862
+ chatbotVotingEnabled: f,
4883
4863
  viewerLanguage: c,
4884
- renderHeaderTitleBadges: b,
4885
- customChannelActions: v,
4886
- renderChannelActions: f,
4887
- onParticipantNameClick: N,
4888
- renderMessage: w,
4864
+ renderHeaderTitleBadges: v,
4865
+ customChannelActions: b,
4866
+ renderChannelActions: g,
4867
+ onParticipantNameClick: x,
4868
+ renderMessage: N,
4889
4869
  onMessageLinkClick: C,
4890
- showChannelInfo: R,
4891
- composerInput: S
4870
+ showChannelInfo: T,
4871
+ composerInput: A
4892
4872
  },
4893
- M.id
4873
+ R.id
4894
4874
  ) }) }) : /* @__PURE__ */ s(Be, {});
4895
4875
  };
4896
- function Hi(e) {
4876
+ function Wi(e) {
4897
4877
  const t = e.state.pending_messages;
4898
4878
  if (t != null && t.length)
4899
4879
  for (const n of t)
@@ -4907,18 +4887,18 @@ const Bs = V.createContext({
4907
4887
  renderMessagePreview: void 0,
4908
4888
  channelPreview: void 0,
4909
4889
  viewerLanguage: void 0
4910
- }), Yi = Bs.Provider, qi = () => V.useContext(Bs), Wi = (e, t) => {
4890
+ }), Xi = Bs.Provider, Ki = () => V.useContext(Bs), Ji = (e, t) => {
4911
4891
  const n = new Date(
4912
4892
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4913
4893
  ), r = new Date(
4914
4894
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4915
4895
  ).getTime() - n.getTime();
4916
4896
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4917
- }, Xi = (e) => {
4897
+ }, Zi = (e) => {
4918
4898
  const t = /* @__PURE__ */ new Date();
4919
4899
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4920
4900
  return "Just now";
4921
- const a = Wi(e, t);
4901
+ const a = Ji(e, t);
4922
4902
  return a === 0 ? e.toLocaleTimeString([], {
4923
4903
  hour: "numeric",
4924
4904
  minute: "2-digit",
@@ -4930,7 +4910,7 @@ const Bs = V.createContext({
4930
4910
  });
4931
4911
  }, Us = V.memo(
4932
4912
  (e) => {
4933
- var $, F, L;
4913
+ var $, F, D;
4934
4914
  const { channel: t, unread: n } = e, {
4935
4915
  selectedChannel: a,
4936
4916
  onChannelSelect: r,
@@ -4938,7 +4918,7 @@ const Bs = V.createContext({
4938
4918
  channelPreview: o,
4939
4919
  renderMessagePreview: l,
4940
4920
  viewerLanguage: d
4941
- } = qi(), { client: m } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = dt(t);
4921
+ } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4942
4922
  if (o)
4943
4923
  return /* @__PURE__ */ s(
4944
4924
  o,
@@ -4950,48 +4930,48 @@ const Bs = V.createContext({
4950
4930
  viewerLanguage: d
4951
4931
  }
4952
4932
  );
4953
- const g = () => {
4933
+ const f = () => {
4954
4934
  t && r(t);
4955
4935
  }, c = (y) => {
4956
- const E = y.key === "Enter" || y.key === " ", I = y.repeat;
4957
- !E || I || (y.preventDefault(), g());
4958
- }, b = je(
4936
+ const I = y.key === "Enter" || y.key === " ", S = y.repeat;
4937
+ !I || S || (y.preventDefault(), f());
4938
+ }, v = je(
4959
4939
  ($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
4960
- m == null ? void 0 : m.userID,
4940
+ u == null ? void 0 : u.userID,
4961
4941
  t == null ? void 0 : t.type
4962
- ), x = ut(b == null ? void 0 : b.user), v = (F = b == null ? void 0 : b.user) == null ? void 0 : F.image, f = (() => {
4963
- var E;
4964
- const y = (E = t == null ? void 0 : t.state) == null ? void 0 : E.messages;
4942
+ ), w = ct(v == null ? void 0 : v.user), b = (F = v == null ? void 0 : v.user) == null ? void 0 : F.image, g = (() => {
4943
+ var I;
4944
+ const y = (I = t == null ? void 0 : t.state) == null ? void 0 : I.messages;
4965
4945
  if (y != null && y.length) {
4966
- for (let I = y.length - 1; I >= 0; I--)
4967
- if (y[I].type !== "system") return y[I];
4946
+ for (let S = y.length - 1; S >= 0; S--)
4947
+ if (y[S].type !== "system") return y[S];
4968
4948
  }
4969
- })(), w = (() => {
4949
+ })(), N = (() => {
4970
4950
  var z, O, j, X;
4971
4951
  const y = hs({
4972
- message: f,
4952
+ message: g,
4973
4953
  viewerLanguage: d
4974
4954
  });
4975
- if (((z = f == null ? void 0 : f.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4976
- if (((O = f == null ? void 0 : f.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4977
- if (((j = f == null ? void 0 : f.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
4955
+ if (((z = g == null ? void 0 : g.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return y ? `💵 ${y}` : "💵 Sent a tip";
4956
+ if (((O = g == null ? void 0 : g.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return y ? `💰 ${y}` : "💰 Sent a message";
4957
+ if (((j = g == null ? void 0 : g.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
4978
4958
  return y ? `📎 ${y}` : "📎 Sent an attachment";
4979
4959
  if (y) return y;
4980
- const T = (X = f == null ? void 0 : f.attachments) == null ? void 0 : X[0];
4981
- 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";
4982
- })(), C = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", R = f ? Fe(f) : !1, S = l ? l(f, w) : `${R ? "✨ " : ""}${w}`, D = n ?? 0;
4960
+ const E = (X = g == null ? void 0 : g.attachments) == null ? void 0 : X[0];
4961
+ return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4962
+ })(), C = g != null && g.created_at ? Zi(new Date(g.created_at)) : "", T = g ? Fe(g) : !1, A = l ? l(g, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4983
4963
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4984
4964
  channelId: t == null ? void 0 : t.id,
4985
4965
  isSelected: p,
4986
- participantName: x,
4987
- unreadCount: D,
4966
+ participantName: w,
4967
+ unreadCount: L,
4988
4968
  hasTimestamp: !!C
4989
4969
  }), /* @__PURE__ */ s(
4990
4970
  "div",
4991
4971
  {
4992
4972
  role: "button",
4993
4973
  tabIndex: 0,
4994
- onClick: g,
4974
+ onClick: f,
4995
4975
  onKeyDown: c,
4996
4976
  className: k(
4997
4977
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
@@ -5001,20 +4981,20 @@ const Bs = V.createContext({
5001
4981
  }
5002
4982
  ),
5003
4983
  "data-dd-privacy": "mask",
5004
- children: /* @__PURE__ */ u("div", { className: "flex items-start gap-4", children: [
4984
+ children: /* @__PURE__ */ m("div", { className: "flex items-start gap-4", children: [
5005
4985
  /* @__PURE__ */ s(
5006
- ne,
4986
+ se,
5007
4987
  {
5008
- id: ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) || t.id || "unknown",
5009
- name: x,
5010
- image: v,
4988
+ id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || t.id || "unknown",
4989
+ name: w,
4990
+ image: b,
5011
4991
  size: 48,
5012
4992
  starred: h
5013
4993
  }
5014
4994
  ),
5015
- /* @__PURE__ */ u("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5016
- /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2", children: [
5017
- /* @__PURE__ */ u(
4995
+ /* @__PURE__ */ m("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
4996
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2", children: [
4997
+ /* @__PURE__ */ m(
5018
4998
  "h3",
5019
4999
  {
5020
5000
  className: k(
@@ -5022,15 +5002,15 @@ const Bs = V.createContext({
5022
5002
  ),
5023
5003
  children: [
5024
5004
  h && /* @__PURE__ */ s("span", { className: "sr-only", children: "Starred conversation. " }),
5025
- x
5005
+ w
5026
5006
  ]
5027
5007
  }
5028
5008
  ),
5029
5009
  C && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: C })
5030
5010
  ] }),
5031
- /* @__PURE__ */ u("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5032
- /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: S }),
5033
- 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 })
5011
+ /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5012
+ /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
5013
+ 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 })
5034
5014
  ] })
5035
5015
  ] })
5036
5016
  ] })
@@ -5039,42 +5019,42 @@ const Bs = V.createContext({
5039
5019
  }
5040
5020
  );
5041
5021
  Us.displayName = "CustomChannelPreview";
5042
- const Ki = { last_message_at: -1 }, Ji = V.memo(
5022
+ const Qi = { last_message_at: -1 }, el = V.memo(
5043
5023
  ({
5044
5024
  onChannelSelect: e,
5045
5025
  selectedChannel: t,
5046
5026
  filters: n,
5047
5027
  allowNewMessagesFromUnfilteredChannels: a = !1,
5048
5028
  channelRenderFilterFn: r,
5049
- sort: i = Ki,
5029
+ sort: i = Qi,
5050
5030
  className: o,
5051
5031
  customEmptyStateIndicator: l,
5052
5032
  channelListPaginator: d = An,
5053
- channelPreview: m,
5033
+ channelPreview: u,
5054
5034
  renderMessagePreview: p,
5055
5035
  viewerLanguage: h
5056
5036
  }) => {
5057
- const g = V.useRef(0);
5058
- g.current++;
5059
- const { debug: c = !1 } = ct(), b = V.useCallback(
5060
- (v) => {
5061
- for (const f of v)
5062
- Hi(f);
5063
- return r ? r(v) : v;
5037
+ const f = V.useRef(0);
5038
+ f.current++;
5039
+ const { debug: c = !1 } = lt(), v = V.useCallback(
5040
+ (b) => {
5041
+ for (const g of b)
5042
+ Wi(g);
5043
+ return r ? r(b) : b;
5064
5044
  },
5065
5045
  [r]
5066
5046
  );
5067
5047
  c && console.log("📺 [ChannelList] 🔄 RENDER START", {
5068
- renderCount: g.current,
5048
+ renderCount: f.current,
5069
5049
  selectedChannelId: t == null ? void 0 : t.id,
5070
5050
  filters: n
5071
5051
  });
5072
- const x = V.useMemo(
5052
+ const w = V.useMemo(
5073
5053
  () => ({
5074
5054
  selectedChannel: t,
5075
5055
  onChannelSelect: e,
5076
5056
  debug: c,
5077
- channelPreview: m,
5057
+ channelPreview: u,
5078
5058
  renderMessagePreview: p,
5079
5059
  viewerLanguage: h
5080
5060
  }),
@@ -5082,7 +5062,7 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
5082
5062
  t,
5083
5063
  e,
5084
5064
  c,
5085
- m,
5065
+ u,
5086
5066
  p,
5087
5067
  h
5088
5068
  ]
@@ -5094,14 +5074,14 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
5094
5074
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5095
5075
  o
5096
5076
  ),
5097
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: x, children: /* @__PURE__ */ s(
5077
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5098
5078
  Tn,
5099
5079
  {
5100
5080
  filters: n,
5101
5081
  sort: i,
5102
5082
  options: { limit: 30 },
5103
5083
  allowNewMessagesFromUnfilteredChannels: a,
5104
- channelRenderFilterFn: b,
5084
+ channelRenderFilterFn: v,
5105
5085
  Paginator: d,
5106
5086
  Preview: Us,
5107
5087
  EmptyStateIndicator: l
@@ -5112,8 +5092,8 @@ const Ki = { last_message_at: -1 }, Ji = V.memo(
5112
5092
  );
5113
5093
  }
5114
5094
  );
5115
- Ji.displayName = "ChannelList";
5116
- const Zi = ({
5095
+ el.displayName = "ChannelList";
5096
+ const tl = ({
5117
5097
  question: e,
5118
5098
  onClick: t,
5119
5099
  loading: n = !1,
@@ -5135,7 +5115,7 @@ const Zi = ({
5135
5115
  ),
5136
5116
  children: e
5137
5117
  }
5138
- ), ml = ({
5118
+ ), gl = ({
5139
5119
  faqs: e,
5140
5120
  onFaqClick: t,
5141
5121
  loadingFaqId: n,
@@ -5144,10 +5124,10 @@ const Zi = ({
5144
5124
  avatarImage: i,
5145
5125
  avatarName: o
5146
5126
  }) => {
5147
- const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
5148
- return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ u("div", { className: "flex gap-3 items-end", children: [
5127
+ const l = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
5128
+ return l.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ m("div", { className: "flex gap-3 items-end", children: [
5149
5129
  (i || o) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5150
- ne,
5130
+ se,
5151
5131
  {
5152
5132
  id: o || "account",
5153
5133
  name: o || "Account",
@@ -5156,7 +5136,7 @@ const Zi = ({
5156
5136
  shape: "circle"
5157
5137
  }
5158
5138
  ) }),
5159
- /* @__PURE__ */ u(
5139
+ /* @__PURE__ */ m(
5160
5140
  "div",
5161
5141
  {
5162
5142
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
@@ -5164,7 +5144,7 @@ const Zi = ({
5164
5144
  children: [
5165
5145
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5166
5146
  l.map((d) => /* @__PURE__ */ s(
5167
- Zi,
5147
+ tl,
5168
5148
  {
5169
5149
  question: d.question,
5170
5150
  onClick: () => t(d.id),
@@ -5179,29 +5159,29 @@ const Zi = ({
5179
5159
  };
5180
5160
  export {
5181
5161
  bs as A,
5182
- dl as B,
5183
- Ui as C,
5162
+ hl as B,
5163
+ Gi as C,
5184
5164
  Ur as D,
5185
5165
  xa as E,
5186
- ml as F,
5166
+ gl as F,
5187
5167
  sa as G,
5188
5168
  es as L,
5189
- ol as M,
5169
+ ul as M,
5190
5170
  Ne as a,
5191
- ne as b,
5192
- Ji as c,
5171
+ se as b,
5172
+ el as c,
5193
5173
  $s as d,
5194
- cl as e,
5195
- Zi as f,
5196
- ce as g,
5174
+ ml as e,
5175
+ tl as f,
5176
+ oe as g,
5197
5177
  Zt as h,
5198
5178
  ye as i,
5199
5179
  qr as j,
5200
- ll as k,
5201
- ul as l,
5180
+ dl as k,
5181
+ fl as l,
5202
5182
  rr as m,
5203
5183
  sr as n,
5204
- Xi as o,
5184
+ Zi as o,
5205
5185
  ar as p,
5206
5186
  hs as q,
5207
5187
  we as r,
@@ -5210,8 +5190,8 @@ export {
5210
5190
  Xa as u,
5211
5191
  wa as v,
5212
5192
  je as w,
5213
- gt as x,
5214
- pt as y,
5215
- ut as z
5193
+ ht as x,
5194
+ ft as y,
5195
+ ct as z
5216
5196
  };
5217
- //# sourceMappingURL=index-C2r41RoF.js.map
5197
+ //# sourceMappingURL=index-CD2uC47U.js.map