@sendbird/ai-agent-messenger-react 1.1.0 → 1.1.2

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.
@@ -1,19 +1,19 @@
1
1
  import * as r from "react";
2
- import { createContext as ye, useContext as J, useEffect as R, useState as C, useId as un, useRef as D, useCallback as P, useLayoutEffect as ge, lazy as T, Suspense as $e, useMemo as Ie, Component as ur, Fragment as Lt, useReducer as mr, forwardRef as gr, Children as pr } from "react";
3
- import hr, { SendbirdProduct as fr, DeviceOsPlatform as Rt, SendbirdPlatform as br, ConnectionHandler as dt, SendbirdError as xr, SessionHandler as Er, LogLevel as mn, ConnectionState as vr } from "@sendbird/chat";
4
- import c, { css as k, ThemeProvider as yr, useTheme as ut, createGlobalStyle as Cr, StyleSheetManager as Tr, keyframes as gn } from "styled-components";
5
- import { format as pn, isSameMinute as Nt, isSameDay as _r } from "date-fns";
6
- import { enUS as Sr } from "date-fns/locale/en-US";
7
- import { AIAgentModule as wr, ConversationStatus as z, ConversationListOrder as kr, ConversationType as Ar } from "@sendbird/chat/aiAgent";
8
- import { useGroupChannelMessages as Ir, useGroupChannelHandler as hn, useForceUpdate as $r } from "@sendbird/uikit-tools";
9
- import { GroupChannelModule as Mr } from "@sendbird/chat/groupChannel";
10
- import { MessageMetaArray as Or, SendingStatus as Lr } from "@sendbird/chat/message";
11
- import { isSameDay as Rr } from "date-fns/isSameDay";
12
- import { renderer as Nr, parser as Dr, MessageProvider as Br } from "@sendbird/react-uikit-message-template-view";
13
- import { createMessageTemplate as Pr } from "@sendbird/uikit-message-template";
14
- import fn from "dompurify";
15
- import { createPortal as Fr } from "react-dom";
16
- import Hr from "@emotion/is-prop-valid";
2
+ import { createContext as ye, useContext as J, useEffect as R, useState as T, useId as mn, useRef as D, useCallback as P, useLayoutEffect as ge, lazy as C, Suspense as $e, useMemo as Ie, Component as gr, Fragment as Rt, useReducer as pr, forwardRef as hr, Children as fr } from "react";
3
+ import br, { SendbirdProduct as xr, DeviceOsPlatform as Nt, SendbirdPlatform as Er, ConnectionHandler as ut, SendbirdError as vr, SessionHandler as yr, LogLevel as gn, ConnectionState as Cr } from "@sendbird/chat";
4
+ import c, { css as k, ThemeProvider as Tr, useTheme as mt, createGlobalStyle as _r, StyleSheetManager as Sr, keyframes as pn } from "styled-components";
5
+ import { format as hn, isSameMinute as Dt, isSameDay as wr } from "date-fns";
6
+ import { enUS as kr } from "date-fns/locale/en-US";
7
+ import { AIAgentModule as Ar, ConversationStatus as z, ConversationListOrder as Ir, ConversationType as $r } from "@sendbird/chat/aiAgent";
8
+ import { useGroupChannelMessages as Mr, useGroupChannelHandler as fn, useForceUpdate as Or } from "@sendbird/uikit-tools";
9
+ import { GroupChannelModule as Lr } from "@sendbird/chat/groupChannel";
10
+ import { MessageMetaArray as Rr, SendingStatus as Nr } from "@sendbird/chat/message";
11
+ import { isSameDay as Dr } from "date-fns/isSameDay";
12
+ import { renderer as Br, parser as Pr, MessageProvider as Fr } from "@sendbird/react-uikit-message-template-view";
13
+ import { createMessageTemplate as Hr } from "@sendbird/uikit-message-template";
14
+ import bn from "dompurify";
15
+ import { createPortal as Ur } from "react-dom";
16
+ import zr from "@emotion/is-prop-valid";
17
17
  const W = (e, t) => {
18
18
  const n = ye(null), o = ({ children: a, value: l }) => /* @__PURE__ */ r.createElement(n.Provider, { value: l }, typeof a == "function" ? a(l) : a), i = ({ children: a }) => /* @__PURE__ */ r.createElement(n.Consumer, null, (l) => l ? typeof a == "function" ? a(l) : a : null), s = () => {
19
19
  const a = J(n);
@@ -33,7 +33,7 @@ function Ce(e) {
33
33
  }
34
34
  });
35
35
  function n({ children: s }) {
36
- const [a, l] = C(() => e.template), [d, g] = C(e.components), m = {
36
+ const [a, l] = T(() => e.template), [d, g] = T(e.components), m = {
37
37
  Template: a,
38
38
  updateTemplate: (p) => l(() => p),
39
39
  components: d,
@@ -61,23 +61,23 @@ function Ce(e) {
61
61
  };
62
62
  }), i;
63
63
  }
64
- function Ur(...e) {
64
+ function Wr(...e) {
65
65
  return function({ children: n }) {
66
66
  return e.reduce((o, i) => /* @__PURE__ */ r.createElement(i, null, o), n);
67
67
  };
68
68
  }
69
69
  function ot() {
70
70
  }
71
- function zr() {
71
+ function Vr() {
72
72
  const e = /iPad|iPhone|iPod/.test(navigator.userAgent), t = /Android/.test(navigator.userAgent);
73
73
  return e || t;
74
74
  }
75
- class bn {
75
+ class xn {
76
76
  constructor(t) {
77
77
  this.logger = t, this.subscribers = {};
78
78
  }
79
79
  async send(t) {
80
- const n = Wr(), o = this.subscribers[t.type];
80
+ const n = Gr(), o = this.subscribers[t.type];
81
81
  if (o) {
82
82
  this.logger.debug(`messenger.dispatcher: dispatching command: ${t.type}`, t.payload);
83
83
  const i = o.map((s) => s(t.payload));
@@ -94,14 +94,14 @@ class bn {
94
94
  this.subscribers[t] && (this.subscribers[t] = this.subscribers[t].filter((o) => o !== n));
95
95
  }
96
96
  }
97
- const Wr = () => {
97
+ const Gr = () => {
98
98
  let e = ot, t = ot;
99
99
  return { promise: new Promise((o, i) => {
100
100
  e = o, t = i;
101
101
  }), resolve: e, reject: t };
102
- }, Vr = "1.1.0", ke = "sb-agent", Gr = Vr;
103
- var xn = /* @__PURE__ */ ((e) => (e[e.VERBOSE = 0] = "VERBOSE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.NONE = 5] = "NONE", e))(xn || {});
104
- class En {
102
+ }, jr = "1.1.2", ke = "sb-agent", Kr = jr;
103
+ var En = /* @__PURE__ */ ((e) => (e[e.VERBOSE = 0] = "VERBOSE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN = 3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.NONE = 5] = "NONE", e))(En || {});
104
+ class vn {
105
105
  constructor(t) {
106
106
  this.level = t;
107
107
  }
@@ -121,24 +121,24 @@ class En {
121
121
  this.level <= 4 && console.error(`[${ke}/error]`, ...t);
122
122
  }
123
123
  }
124
- function Dt(e, t, n) {
125
- const o = hr.init({
124
+ function Bt(e, t, n) {
125
+ const o = br.init({
126
126
  appId: e,
127
- modules: [new Mr(), new wr()],
127
+ modules: [new Lr(), new Ar()],
128
128
  localCacheEnabled: !0,
129
129
  ...n
130
130
  });
131
131
  return o.addSendbirdExtensions(
132
- [{ version: Gr, product: fr.AI_AGENT, platform: t.platform }],
132
+ [{ version: Kr, product: xr.AI_AGENT, platform: t.platform }],
133
133
  { platform: t.deviceOSPlatform, version: t.deviceOSVersion },
134
134
  t.customData
135
135
  ) || console.warn("Invalid Sendbird Extensions", t), o;
136
136
  }
137
137
  const {
138
- Provider: jr,
138
+ Provider: Zr,
139
139
  useContext: Ze
140
140
  } = W("AIAgent");
141
- function Kr({
141
+ function Yr({
142
142
  appId: e,
143
143
  aiAgentId: t,
144
144
  language: n,
@@ -150,19 +150,19 @@ function Kr({
150
150
  logger: d,
151
151
  children: g,
152
152
  extensions: m = {
153
- platform: br.JS,
154
- deviceOSPlatform: zr() ? Rt.MOBILE_WEB : Rt.WEB
153
+ platform: Er.JS,
154
+ deviceOSPlatform: Vr() ? Nt.MOBILE_WEB : Nt.WEB
155
155
  }
156
156
  }) {
157
- const [p, h] = C(() => {
158
- const b = d ?? new En(xn.WARN), x = l ?? new bn(b);
157
+ const [p, h] = T(() => {
158
+ const b = d ?? new vn(En.WARN), x = l ?? new xn(b);
159
159
  return {
160
160
  appId: e,
161
161
  aiAgentId: t,
162
162
  language: n,
163
163
  countryCode: o,
164
164
  context: i,
165
- chatSDK: s ?? Dt(e, m, a),
165
+ chatSDK: s ?? Bt(e, m, a),
166
166
  logger: b,
167
167
  dispatcher: x
168
168
  };
@@ -170,14 +170,14 @@ function Kr({
170
170
  return (n !== p.language || o !== p.countryCode) && h((b) => ({ ...b, language: n, countryCode: o, context: i })), s && s !== p.chatSDK ? h((b) => ({ ...b, aiAgentId: t, chatSDK: s })) : !s && p.chatSDK.appId !== e && h((b) => ({
171
171
  ...b,
172
172
  aiAgentId: t,
173
- chatSDK: Dt(e, m, { newInstance: !0, ...a })
173
+ chatSDK: Bt(e, m, { newInstance: !0, ...a })
174
174
  })), R(() => () => {
175
175
  p.chatSDK.disconnectWebSocket();
176
- }, [p.chatSDK]), /* @__PURE__ */ r.createElement(jr, { value: p }, g);
176
+ }, [p.chatSDK]), /* @__PURE__ */ r.createElement(Zr, { value: p }, g);
177
177
  }
178
- const Zr = (e, t, n) => Ir(e, t, { ...n, strictStreamingOrder: !0 });
178
+ const qr = (e, t, n) => Mr(e, t, { ...n, strictStreamingOrder: !0 });
179
179
  var it = /* @__PURE__ */ ((e) => (e.ConversationClose = "conv.close", e))(it || {});
180
- class Yr {
180
+ class Jr {
181
181
  constructor(t = {}) {
182
182
  this.payload = t;
183
183
  }
@@ -185,17 +185,17 @@ class Yr {
185
185
  return JSON.stringify({ type: this.type, payload: this.payload });
186
186
  }
187
187
  }
188
- class qr extends Yr {
188
+ class Xr extends Jr {
189
189
  constructor() {
190
190
  super(...arguments), this.type = "conv.close";
191
191
  }
192
192
  }
193
- const Jr = {
194
- CloseConversation: () => new qr()
193
+ const Qr = {
194
+ CloseConversation: () => new Xr()
195
195
  }, {
196
- Provider: Xr
196
+ Provider: eo
197
197
  } = W("AIAgentConversation");
198
- function Qr({
198
+ function to({
199
199
  children: e,
200
200
  channelUrl: t,
201
201
  onChannelDeleted: n,
@@ -204,8 +204,8 @@ function Qr({
204
204
  onBeforeSendMessage: s,
205
205
  onAfterSendMessage: a = ot
206
206
  }) {
207
- var v;
208
- const { chatSDK: l, logger: d, dispatcher: g } = Ze(), { channel: m, channelFetchError: p, fetchChannel: h } = eo(t), b = Zr(l, m, {
207
+ var E;
208
+ const { chatSDK: l, logger: d, dispatcher: g } = Ze(), { channel: m, channelFetchError: p, fetchChannel: h } = no(t), b = qr(l, m, {
209
209
  shouldCountNewMessages: () => !1,
210
210
  onChannelDeleted: n,
211
211
  onMessagesReceived: o,
@@ -219,7 +219,7 @@ function Qr({
219
219
  return g.subscribe(it.ConversationClose, f), () => {
220
220
  g.unsubscribe(it.ConversationClose, f);
221
221
  };
222
- }, [g, (v = m == null ? void 0 : m.conversation) == null ? void 0 : v.status, i]);
222
+ }, [g, (E = m == null ? void 0 : m.conversation) == null ? void 0 : E.status, i]);
223
223
  const x = {
224
224
  conversation: (m == null ? void 0 : m.conversation) ?? void 0,
225
225
  channelSource: {
@@ -244,20 +244,20 @@ function Qr({
244
244
  }
245
245
  }
246
246
  };
247
- return /* @__PURE__ */ r.createElement(Xr, { value: x }, e);
247
+ return /* @__PURE__ */ r.createElement(eo, { value: x }, e);
248
248
  }
249
- function eo(e) {
250
- const { chatSDK: t, logger: n } = Ze(), [o, i] = C(void 0), [s, a] = C(void 0);
249
+ function no(e) {
250
+ const { chatSDK: t, logger: n } = Ze(), [o, i] = T(void 0), [s, a] = T(void 0);
251
251
  async function l() {
252
252
  if (n.debug("conversation.fetchChannel: start"), i(void 0), a(void 0), e)
253
253
  try {
254
254
  n.debug("conversation.fetchChannel: get channel", e);
255
255
  const d = await t.groupChannel.getChannel(e);
256
256
  i(d);
257
- const g = new dt({ onReconnectSucceeded: () => d.refresh() });
257
+ const g = new ut({ onReconnectSucceeded: () => d.refresh() });
258
258
  t.addConnectionHandler("sba-refresh", g), n.debug("conversation.fetchChannel: fetched channel", d);
259
259
  } catch (d) {
260
- d instanceof xr && a(d), n.error("conversation.fetchChannel: error", d);
260
+ d instanceof vr && a(d), n.error("conversation.fetchChannel: error", d);
261
261
  }
262
262
  }
263
263
  return R(() => {
@@ -268,13 +268,13 @@ function eo(e) {
268
268
  fetchChannel: l
269
269
  };
270
270
  }
271
- const to = (e, t) => {
272
- const n = un(), [o, i] = C(!1), [s, a] = C(null), [l, d] = C([]), [g, m] = C(null), p = D(!1), h = P(async () => {
271
+ const ro = (e, t) => {
272
+ const n = mn(), [o, i] = T(!1), [s, a] = T(null), [l, d] = T([]), [g, m] = T(null), p = D(!1), h = P(async () => {
273
273
  if (!p.current && e.currentUser) {
274
274
  p.current = !0, i(!1), a(null), d([]);
275
275
  try {
276
- const x = e.aiAgent.createConversationListQuery(t), v = await x.next();
277
- d(v), m(x), a(null);
276
+ const x = e.aiAgent.createConversationListQuery(t), E = await x.next();
277
+ d(E), m(x), a(null);
278
278
  } catch (x) {
279
279
  m(null), a(x);
280
280
  } finally {
@@ -283,11 +283,11 @@ const to = (e, t) => {
283
283
  }
284
284
  }, [e, t.aiAgentId, t.status, t.limit, t.order, t.reverse]), b = P(async () => {
285
285
  g && g.next().then((x) => {
286
- d((v) => [...v, ...x]);
286
+ d((E) => [...E, ...x]);
287
287
  }).catch(() => {
288
288
  });
289
289
  }, [g]);
290
- return R(() => (e.addConnectionHandler(n, new dt({ onConnected: () => h() })), () => e.removeConnectionHandler(n)), [e, n, h]), R(() => {
290
+ return R(() => (e.addConnectionHandler(n, new ut({ onConnected: () => h() })), () => e.removeConnectionHandler(n)), [e, n, h]), R(() => {
291
291
  h();
292
292
  }, [h]), {
293
293
  initialized: o,
@@ -296,13 +296,13 @@ const to = (e, t) => {
296
296
  loadMore: b
297
297
  };
298
298
  }, {
299
- Provider: no
299
+ Provider: oo
300
300
  } = W("AIAgentConversationList");
301
- function ro({ children: e }) {
302
- const { chatSDK: t, aiAgentId: n } = Ze(), o = to(t, {
301
+ function io({ children: e }) {
302
+ const { chatSDK: t, aiAgentId: n } = Ze(), o = ro(t, {
303
303
  aiAgentId: n,
304
304
  status: z.CLOSED,
305
- order: kr.UPDATED_AT,
305
+ order: Ir.UPDATED_AT,
306
306
  reverse: !0
307
307
  }), i = {
308
308
  listSource: {
@@ -312,18 +312,18 @@ function ro({ children: e }) {
312
312
  loadMore: () => o.loadMore()
313
313
  }
314
314
  };
315
- return /* @__PURE__ */ r.createElement(no, { value: i }, e);
315
+ return /* @__PURE__ */ r.createElement(oo, { value: i }, e);
316
316
  }
317
317
  const st = {
318
318
  DEFAULT_BOT_MSG_BG: "#eeeeee",
319
319
  WHITE: "#ffffff",
320
320
  BLACK: "#000000"
321
321
  };
322
- function vn(e) {
322
+ function yn(e) {
323
323
  return e.length === 4 ? `#${[...e.slice(1)].map((t) => t + t).join("")}` : e;
324
324
  }
325
- function oo(e) {
326
- const t = vn(e);
325
+ function so(e) {
326
+ const t = yn(e);
327
327
  return [
328
328
  parseInt(t.slice(1, 3), 16),
329
329
  // r
@@ -333,17 +333,17 @@ function oo(e) {
333
333
  // b
334
334
  ];
335
335
  }
336
- function io(e) {
336
+ function ao(e) {
337
337
  return `#${e.map((t) => t.toString(16).padStart(2, "0")).join("")}`;
338
338
  }
339
- function so(e, t, n) {
339
+ function lo(e, t, n) {
340
340
  e /= 255, t /= 255, n /= 255;
341
341
  const o = Math.max(e, t, n), i = Math.min(e, t, n), s = o - i;
342
342
  let a = 0, l = 0;
343
343
  const d = (o + i) / 2;
344
344
  return o !== i && (l = d > 0.5 ? s / (2 - o - i) : s / (o + i)), o === e ? a = (t - n) / s + (t < n ? 6 : 0) : o === t ? a = (n - e) / s + 2 : o === n && (a = (e - t) / s + 4), a /= 6, [a, l, d];
345
345
  }
346
- function ao(e, t, n) {
346
+ function co(e, t, n) {
347
347
  let o, i, s;
348
348
  if (t === 0)
349
349
  o = i = s = n;
@@ -356,10 +356,10 @@ function ao(e, t, n) {
356
356
  return [Math.round(o * 255), Math.round(i * 255), Math.round(s * 255)];
357
357
  }
358
358
  function De(e, t, n) {
359
- const [o, i, s] = oo(e), [a, l, d] = so(o, i, s), g = Math.max(0, Math.min(1, d * t)), m = Math.max(0, Math.min(1, l * n)), [p, h, b] = ao(a, m, g);
360
- return io([Math.round(p), Math.round(h), Math.round(b)]);
359
+ const [o, i, s] = so(e), [a, l, d] = lo(o, i, s), g = Math.max(0, Math.min(1, d * t)), m = Math.max(0, Math.min(1, l * n)), [p, h, b] = co(a, m, g);
360
+ return ao([Math.round(p), Math.round(h), Math.round(b)]);
361
361
  }
362
- function lo(e, t = "light") {
362
+ function uo(e, t = "light") {
363
363
  return {
364
364
  extraDark: De(e, 0.6, 1.2),
365
365
  dark: De(e, 0.85, 1.1),
@@ -369,10 +369,10 @@ function lo(e, t = "light") {
369
369
  };
370
370
  }
371
371
  function at(e) {
372
- const t = vn(e), n = 149, o = +`0x${t[1]}${t[2]}`, i = +`0x${t[3]}${t[4]}`, s = +`0x${t[5]}${t[6]}`;
372
+ const t = yn(e), n = 149, o = +`0x${t[1]}${t[2]}`, i = +`0x${t[3]}${t[4]}`, s = +`0x${t[5]}${t[6]}`;
373
373
  return o * 0.299 + i * 0.587 + s * 0.114 > n ? st.BLACK : st.WHITE;
374
374
  }
375
- function co(e, t, n, o, i) {
375
+ function mo(e, t, n, o, i) {
376
376
  return {
377
377
  base: {
378
378
  primary: t,
@@ -401,7 +401,7 @@ function co(e, t, n, o, i) {
401
401
  }
402
402
  };
403
403
  }
404
- const uo = (e, t, n, o, i) => ({
404
+ const go = (e, t, n, o, i) => ({
405
405
  base: {
406
406
  primary: t,
407
407
  primaryContrastContent: n,
@@ -494,8 +494,8 @@ const uo = (e, t, n, o, i) => ({
494
494
  caption3: { fontSize: 11, fontWeight: 700 },
495
495
  caption4: { fontSize: 11, fontWeight: 400 }
496
496
  };
497
- function Bt(e) {
498
- const t = mo(e), { colors: n, aiAgentColorVariables: o } = go(e, t), i = po(e);
497
+ function Pt(e) {
498
+ const t = po(e), { colors: n, aiAgentColorVariables: o } = ho(e, t), i = bo(e);
499
499
  return {
500
500
  selectedTheme: e.selectedTheme,
501
501
  palette: t,
@@ -504,18 +504,18 @@ function Bt(e) {
504
504
  typography: i
505
505
  };
506
506
  }
507
- function mo({ selectedTheme: e, palette: t, primary: n }) {
508
- const o = t != null && t.primary ? t.primary : n ? n === Be.primary.main ? Be.primary : lo(n, e) : Be.primary;
507
+ function po({ selectedTheme: e, palette: t, primary: n }) {
508
+ const o = t != null && t.primary ? t.primary : n ? n === Be.primary.main ? Be.primary : uo(n, e) : Be.primary;
509
509
  return {
510
510
  ...Be,
511
511
  primary: o,
512
512
  ...t
513
513
  };
514
514
  }
515
- function go({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, botMessageBackgroundContrast: o }, i) {
515
+ function ho({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, botMessageBackgroundContrast: o }, i) {
516
516
  const s = i.primary.main, a = t ?? at(s), l = n ?? st.DEFAULT_BOT_MSG_BG, d = o ?? at(l);
517
517
  return {
518
- colors: (e === "light" ? co : uo)(
518
+ colors: (e === "light" ? mo : go)(
519
519
  i,
520
520
  s,
521
521
  a,
@@ -530,25 +530,32 @@ function go({ selectedTheme: e, primaryContrast: t, botMessageBackground: n, bot
530
530
  }
531
531
  };
532
532
  }
533
- function po({ typography: e }) {
533
+ function fo(e, t, n) {
534
+ const o = { ...e };
535
+ return n.forEach((i) => {
536
+ const s = t[i];
537
+ s != null && (o[i] = s);
538
+ }), o;
539
+ }
540
+ function bo({ typography: e }) {
534
541
  if (!e)
535
542
  return Qe;
536
543
  const t = { ...Qe };
537
544
  return Object.keys(e).forEach((n) => {
538
545
  const o = e[n];
539
546
  if (o && typeof o == "object") {
540
- const s = { ...Qe[n] };
541
- o.fontSize !== void 0 && o.fontSize !== null && (s.fontSize = o.fontSize), o.fontWeight !== void 0 && o.fontWeight !== null && (s.fontWeight = o.fontWeight), o.fontFamily !== void 0 && o.fontFamily !== null && (s.fontFamily = o.fontFamily), t[n] = s;
547
+ const i = Qe[n], s = ["fontSize", "fontWeight", "fontFamily", "lineHeight"];
548
+ t[n] = fo(i, o, s);
542
549
  }
543
550
  }), t;
544
551
  }
545
552
  const {
546
- Provider: ho,
547
- useContext: yn
553
+ Provider: xo,
554
+ useContext: Cn
548
555
  } = W("AIAgentTheme");
549
- function fo({ logger: e, palette: t, typography: n, appearance: o, children: i }) {
550
- const [s, a] = C(
551
- () => Bt({
556
+ function Eo({ logger: e, palette: t, typography: n, appearance: o, children: i }) {
557
+ const [s, a] = T(
558
+ () => Pt({
552
559
  selectedTheme: (o == null ? void 0 : o.theme) ?? "light",
553
560
  palette: t,
554
561
  typography: n,
@@ -564,16 +571,16 @@ function fo({ logger: e, palette: t, typography: n, appearance: o, children: i }
564
571
  botMessageBackgroundContrast: void 0
565
572
  };
566
573
  !h.primary && (p != null && p.primaryColor) && (h.primary = p.primaryColor, h.primaryContrast = p.primaryContrastColor), !h.botMessageBackground && (p != null && p.botMessageBackgroundColor) && (h.botMessageBackground = p.botMessageBackgroundColor, h.botMessageBackgroundContrast = p.botMessageBackgroundContrastColor);
567
- const b = Bt({ selectedTheme: m, palette: t, typography: n, ...h });
574
+ const b = Pt({ selectedTheme: m, palette: t, typography: n, ...h });
568
575
  a(b), e == null || e.info("theme.update:", m);
569
576
  },
570
577
  [o == null ? void 0 : o.theme, o == null ? void 0 : o.primaryColor, o == null ? void 0 : o.botMessageBackgroundColor, t, n, e]
571
578
  );
572
579
  return R(() => {
573
580
  (o != null && o.theme || o != null && o.primaryColor || o != null && o.botMessageBackgroundColor) && l(s.selectedTheme);
574
- }, [o == null ? void 0 : o.theme, o == null ? void 0 : o.primaryColor, o == null ? void 0 : o.botMessageBackgroundColor]), /* @__PURE__ */ r.createElement(ho, { value: { theme: s, updateTheme: l } }, i);
581
+ }, [o == null ? void 0 : o.theme, o == null ? void 0 : o.primaryColor, o == null ? void 0 : o.botMessageBackgroundColor]), /* @__PURE__ */ r.createElement(xo, { value: { theme: s, updateTheme: l } }, i);
575
582
  }
576
- const Cn = (e) => {
583
+ const Tn = (e) => {
577
584
  try {
578
585
  const t = JSON.parse(e);
579
586
  return typeof t == "string" ? JSON.stringify(t).slice(1, -1) : e.trim();
@@ -581,11 +588,11 @@ const Cn = (e) => {
581
588
  return JSON.stringify(e).slice(1, -1);
582
589
  }
583
590
  }, Me = (e) => JSON.parse(e), Ye = (e) => JSON.parse(e);
584
- function bo(e, t) {
591
+ function vo(e, t) {
585
592
  const [n, o] = t.split(",").map((i) => i.trim());
586
593
  return e === "dark" && o || n;
587
594
  }
588
- function xo(e) {
595
+ function yo(e) {
589
596
  const t = {};
590
597
  function n(o, i = "") {
591
598
  for (const [s, a] of Object.entries(o)) {
@@ -595,7 +602,7 @@ function xo(e) {
595
602
  }
596
603
  return n(e), t;
597
604
  }
598
- function mt({
605
+ function gt({
599
606
  template: e,
600
607
  variables: t,
601
608
  variableKeyPattern: n,
@@ -605,10 +612,10 @@ function mt({
605
612
  if (!o && !["number", "boolean", "string"].includes(typeof a))
606
613
  throw new Error("If transformer is not provided, value must be a {string, number, or boolean}");
607
614
  const l = o ? o(a) : String(a), d = n(s);
608
- return i.replace(d, Cn(l));
615
+ return i.replace(d, Tn(l));
609
616
  }, e);
610
617
  }
611
- async function Eo({
618
+ async function Co({
612
619
  template: e,
613
620
  variables: t,
614
621
  variableKeyPattern: n,
@@ -619,19 +626,19 @@ async function Eo({
619
626
  const l = await o(a);
620
627
  return { regex: n(s), transformedValue: l };
621
628
  })
622
- )).reduce((s, { regex: a, transformedValue: l }) => s.replace(a, Cn(l)), e);
629
+ )).reduce((s, { regex: a, transformedValue: l }) => s.replace(a, Tn(l)), e);
623
630
  }
624
- const vo = (e) => ({
631
+ const To = (e) => ({
625
632
  setTemplate: (t, n) => e.onSetTemplate(t, n),
626
633
  getTemplate: (t) => e.onGetTemplate(t),
627
634
  setCachedToken: (t) => e.onSetCachedToken(t),
628
635
  getCachedToken: () => e.onGetCachedToken(),
629
636
  clear: () => e.onClear()
630
637
  }), {
631
- Provider: yo,
632
- useContext: Tn
638
+ Provider: _o,
639
+ useContext: _n
633
640
  } = W("MessageCacheTemplate");
634
- function Co({ logger: e, storage: t, children: n }) {
641
+ function So({ logger: e, storage: t, children: n }) {
635
642
  const o = P(
636
643
  (a) => {
637
644
  var g, m;
@@ -658,9 +665,9 @@ function Co({ logger: e, storage: t, children: n }) {
658
665
  ), s = P(() => {
659
666
  t.clear();
660
667
  }, [t]);
661
- return /* @__PURE__ */ r.createElement(yo, { value: { shouldSyncCachedTemplate: o, syncCachedTemplates: i, clearCachedTemplates: s, storage: t } }, n);
668
+ return /* @__PURE__ */ r.createElement(_o, { value: { shouldSyncCachedTemplate: o, syncCachedTemplates: i, clearCachedTemplates: s, storage: t } }, n);
662
669
  }
663
- function To(e) {
670
+ function wo(e) {
664
671
  let t = "pending", n = e.then((o) => {
665
672
  t = "resolved", n = o;
666
673
  }).catch((o) => {
@@ -675,11 +682,11 @@ function To(e) {
675
682
  };
676
683
  }
677
684
  const {
678
- Provider: _o,
679
- useContext: _n
685
+ Provider: ko,
686
+ useContext: Sn
680
687
  } = W("MessageTemplateFetching");
681
- function So({ children: e, internalVariables: t }) {
682
- const n = D({}), o = D({}), [i, s] = C({}), a = P((g, m) => {
688
+ function Ao({ children: e, internalVariables: t }) {
689
+ const n = D({}), o = D({}), [i, s] = T({}), a = P((g, m) => {
683
690
  s((p) => ({
684
691
  ...p,
685
692
  [g]: { fetching: !1, error: !1, ...p[g], ...m }
@@ -696,12 +703,12 @@ function So({ children: e, internalVariables: t }) {
696
703
  const x = o.current[p];
697
704
  if (x) return x;
698
705
  h || a(p, { fetching: !0 });
699
- const v = g(p).catch((f) => {
706
+ const E = g(p).catch((f) => {
700
707
  throw h || a(p, { error: !0 }), f;
701
708
  }).finally(() => {
702
709
  h || a(p, { fetching: !1 }), delete o.current[p];
703
710
  });
704
- return o.current[p] = v, v;
711
+ return o.current[p] = E, E;
705
712
  },
706
713
  [a]
707
714
  ), d = {
@@ -710,7 +717,7 @@ function So({ children: e, internalVariables: t }) {
710
717
  suspend: (g, m) => {
711
718
  if (n.current[g])
712
719
  return n.current[g];
713
- const p = To(m());
720
+ const p = wo(m());
714
721
  return n.current[g] = p, p;
715
722
  },
716
723
  getIsFetching: (g) => {
@@ -722,15 +729,15 @@ function So({ children: e, internalVariables: t }) {
722
729
  return ((m = i[g]) == null ? void 0 : m.error) ?? !1;
723
730
  }
724
731
  };
725
- return /* @__PURE__ */ r.createElement(_o, { value: d }, e);
732
+ return /* @__PURE__ */ r.createElement(ko, { value: d }, e);
726
733
  }
727
734
  const qe = {
728
735
  VARIABLE: (e) => new RegExp(`\\{${e}\\}`, "g"),
729
736
  VIEW_VARIABLE: (e) => new RegExp(`"{@${e}}"`, "g")
730
737
  };
731
738
  function oe({ uiTemplateString: e, variables: t = {} }) {
732
- const n = xo(t);
733
- return mt({
739
+ const n = yo(t);
740
+ return gt({
734
741
  template: e,
735
742
  variables: n,
736
743
  variableKeyPattern: (o) => qe.VARIABLE(o)
@@ -741,14 +748,14 @@ function ie({
741
748
  uiTemplateString: t,
742
749
  colorVariables: n = {}
743
750
  }) {
744
- return mt({
751
+ return gt({
745
752
  template: t,
746
753
  variables: n,
747
754
  variableKeyPattern: (o) => qe.VARIABLE(o),
748
- variableValueTransformer: (o) => bo(e, o)
755
+ variableValueTransformer: (o) => vo(e, o)
749
756
  });
750
757
  }
751
- function wo({
758
+ function Io({
752
759
  theme: e,
753
760
  uiTemplateString: t,
754
761
  viewVariables: n = {},
@@ -757,13 +764,13 @@ function wo({
757
764
  onRequestTemplate: s
758
765
  }) {
759
766
  const l = Object.values(n).flat().map((g) => g.key);
760
- return [...new Set(l)].some((g) => !s(g)) ? null : mt({
767
+ return [...new Set(l)].some((g) => !s(g)) ? null : gt({
761
768
  template: t,
762
769
  variables: n,
763
770
  variableKeyPattern: (g) => qe.VIEW_VARIABLE(g),
764
771
  variableValueTransformer: (g) => {
765
772
  const m = g.map(({ key: p, variables: h }) => {
766
- const b = s(p), { ui_template: x, color_variables: v } = Me(b);
773
+ const b = s(p), { ui_template: x, color_variables: E } = Me(b);
767
774
  let f = JSON.stringify(x);
768
775
  return f = oe({
769
776
  uiTemplateString: f,
@@ -771,7 +778,7 @@ function wo({
771
778
  }), f = ie({
772
779
  theme: e,
773
780
  uiTemplateString: f,
774
- colorVariables: v
781
+ colorVariables: E
775
782
  }), f = ie({
776
783
  theme: e,
777
784
  uiTemplateString: f,
@@ -785,7 +792,7 @@ function wo({
785
792
  }
786
793
  });
787
794
  }
788
- async function ko({
795
+ async function $o({
789
796
  theme: e,
790
797
  uiTemplateString: t,
791
798
  viewVariables: n = {},
@@ -793,7 +800,7 @@ async function ko({
793
800
  internalVariables: i,
794
801
  onRequestTemplate: s
795
802
  }) {
796
- return Eo({
803
+ return Co({
797
804
  template: t,
798
805
  variables: n,
799
806
  variableKeyPattern: (a) => qe.VIEW_VARIABLE(a),
@@ -821,7 +828,7 @@ async function ko({
821
828
  }
822
829
  });
823
830
  }
824
- const Ao = ({
831
+ const Mo = ({
825
832
  rawTemplate: e,
826
833
  aiAgentColorVariables: t,
827
834
  internalVariables: n,
@@ -830,7 +837,7 @@ const Ao = ({
830
837
  const { ui_template: i, color_variables: s } = Me(e);
831
838
  let a = JSON.stringify(i);
832
839
  if (Object.keys(o.viewVariables ?? {}).length > 0) {
833
- const d = wo({
840
+ const d = Io({
834
841
  ...o,
835
842
  uiTemplateString: a,
836
843
  aiAgentColorVariables: t,
@@ -840,7 +847,7 @@ const Ao = ({
840
847
  a = d;
841
848
  }
842
849
  return a = oe({ ...o, uiTemplateString: a, variables: n }), a = ie({ ...o, uiTemplateString: a, colorVariables: s }), a = ie({ ...o, uiTemplateString: a, colorVariables: t }), a = oe({ ...o, uiTemplateString: a }), Ye(a);
843
- }, Io = async ({
850
+ }, Oo = async ({
844
851
  rawTemplate: e,
845
852
  aiAgentColorVariables: t,
846
853
  internalVariables: n,
@@ -848,17 +855,17 @@ const Ao = ({
848
855
  }) => {
849
856
  const { ui_template: i, color_variables: s } = Me(e);
850
857
  let a = JSON.stringify(i);
851
- return Object.keys(o.viewVariables ?? {}).length > 0 && (a = await ko({
858
+ return Object.keys(o.viewVariables ?? {}).length > 0 && (a = await $o({
852
859
  ...o,
853
860
  uiTemplateString: a,
854
861
  aiAgentColorVariables: t,
855
862
  internalVariables: n
856
863
  })), a = oe({ ...o, uiTemplateString: a, variables: n }), a = ie({ ...o, uiTemplateString: a, colorVariables: s }), a = ie({ ...o, uiTemplateString: a, colorVariables: t }), a = oe({ ...o, uiTemplateString: a }), Ye(a);
857
- }, $o = (e) => {
858
- const { aiAgentColorVariables: t = {} } = e, { internalVariables: n } = _n();
859
- return C(() => {
864
+ }, Lo = (e) => {
865
+ const { aiAgentColorVariables: t = {} } = e, { internalVariables: n } = Sn();
866
+ return T(() => {
860
867
  const o = e.onGetCachedTemplate(e.templateKey);
861
- return o ? Ao({
868
+ return o ? Mo({
862
869
  ...e,
863
870
  rawTemplate: o,
864
871
  aiAgentColorVariables: t,
@@ -866,20 +873,20 @@ const Ao = ({
866
873
  onRequestTemplate: e.onGetCachedTemplate
867
874
  }) : null;
868
875
  });
869
- }, Mo = (e) => {
870
- const [t] = $o(e);
876
+ }, Ro = (e) => {
877
+ const [t] = Lo(e);
871
878
  if (t) return t;
872
- const { aiAgentColorVariables: n = {} } = e, { internalVariables: o, fetchTemplate: i, suspend: s } = _n();
879
+ const { aiAgentColorVariables: n = {} } = e, { internalVariables: o, fetchTemplate: i, suspend: s } = Sn();
873
880
  return s(e.templateKey, async () => {
874
881
  const l = await i({ ...e, suspense: !0 });
875
- return await Io({
882
+ return await Oo({
876
883
  ...e,
877
884
  rawTemplate: l,
878
885
  aiAgentColorVariables: n,
879
886
  internalVariables: o
880
887
  });
881
888
  }).value;
882
- }, Oo = '@import"https://fonts.googleapis.com/css?family=Roboto:400,500,600,700&display=swap";.sb-message-template__border{position:relative}.sb-message-template__border:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;box-shadow:inset 0 0 0 var(--border-width) var(--border-color);border-radius:var(--border-radius);pointer-events:none}.sb-message-template__action{cursor:pointer}.sb-message-template__parent{font-family:Roboto,serif}.sb-message-template__text{font-family:inherit;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;letter-spacing:normal;text-align:left}.sb-message-template__text-button{font-family:inherit;background-color:#e0e0e0;text-align:center;padding:10px;border-radius:6px;font-size:14px;font-weight:600;font-stretch:normal;font-style:normal;letter-spacing:normal}.sendbird-theme--light .sb-message-template__text-button{color:#742ddd}.sendbird-theme--dark .sb-message-template__text-button{color:#c2a9fa}.sb-message-template__text-button:hover{opacity:1;box-shadow:#0000001a 0 1px 3px,#0000000f 0 1px 2px}.sb-message-template__text-button,.sb-message-template__image-button{cursor:pointer;border-style:none}.sb-message-template__parent{border-radius:unset;background-color:transparent;overflow:hidden}.sb-message-template__parent *{box-sizing:border-box;line-height:1.3}.sb-message-template__carousel{display:flex;width:100%;box-sizing:border-box;touch-action:pan-y}', Oe = "en", Lo = /* @__PURE__ */ new Set([
889
+ }, No = '@import"https://fonts.googleapis.com/css?family=Roboto:400,500,600,700&display=swap";.sb-message-template__border{position:relative}.sb-message-template__border:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;box-shadow:inset 0 0 0 var(--border-width) var(--border-color);border-radius:var(--border-radius);pointer-events:none}.sb-message-template__action{cursor:pointer}.sb-message-template__parent{font-family:Roboto,serif}.sb-message-template__text{font-family:inherit;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;letter-spacing:normal;text-align:left}.sb-message-template__text-button{font-family:inherit;background-color:#e0e0e0;text-align:center;padding:10px;border-radius:6px;font-size:14px;font-weight:600;font-stretch:normal;font-style:normal;letter-spacing:normal}.sendbird-theme--light .sb-message-template__text-button{color:#742ddd}.sendbird-theme--dark .sb-message-template__text-button{color:#c2a9fa}.sb-message-template__text-button:hover{opacity:1;box-shadow:#0000001a 0 1px 3px,#0000000f 0 1px 2px}.sb-message-template__text-button,.sb-message-template__image-button{cursor:pointer;border-style:none}.sb-message-template__parent{border-radius:unset;background-color:transparent;overflow:hidden}.sb-message-template__parent *{box-sizing:border-box;line-height:1.3}.sb-message-template__carousel{display:flex;width:100%;box-sizing:border-box;touch-action:pan-y}', Oe = "en", Do = /* @__PURE__ */ new Set([
883
890
  Oe,
884
891
  "ko",
885
892
  "es",
@@ -890,7 +897,7 @@ const Ao = ({
890
897
  "de",
891
898
  "tr",
892
899
  "ja"
893
- ]), Ro = (e, t, n) => {
900
+ ]), Bo = (e, t, n) => {
894
901
  const o = e[t];
895
902
  return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, s) => {
896
903
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
@@ -902,7 +909,7 @@ const Ao = ({
902
909
  )
903
910
  );
904
911
  });
905
- }, No = Sr, Do = {
912
+ }, Po = kr, Fo = {
906
913
  // Channel - Common
907
914
  CHANNEL_FROZEN: "Channel frozen",
908
915
  PLACE_HOLDER__WRONG: "Something went wrong",
@@ -953,61 +960,61 @@ const Ao = ({
953
960
  CONVERSATION_LIST__NO_CONVERSATIONS: "No conversations yet",
954
961
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: "MM/dd/yyyy",
955
962
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION: "h:mma"
956
- }, gt = { language: "en", dateLocale: No, stringSet: Do }, Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
963
+ }, pt = { language: "en", dateLocale: Po, stringSet: Fo }, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
957
964
  __proto__: null,
958
- default: gt
959
- }, Symbol.toStringTag, { value: "Module" })), We = /* @__PURE__ */ new Map([[Oe, gt]]);
960
- async function Po(e) {
965
+ default: pt
966
+ }, Symbol.toStringTag, { value: "Module" })), We = /* @__PURE__ */ new Map([[Oe, pt]]);
967
+ async function Uo(e) {
961
968
  if (We.has(e))
962
969
  return We.get(e);
963
- const t = Lo.has(e) ? e : Oe;
970
+ const t = Do.has(e) ? e : Oe;
964
971
  try {
965
- const { default: n } = await Ro(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./DvjrAXLD.js"), "./languages/en.ts": () => Promise.resolve().then(() => Bo), "./languages/es.ts": () => import("./zI14HLvP.js"), "./languages/fr.ts": () => import("./B9V0T5ZP.js"), "./languages/hi.ts": () => import("./YRQ0vk5Q.js"), "./languages/it.ts": () => import("./BQWJPfGp.js"), "./languages/ja.ts": () => import("./sl-YrKkN.js"), "./languages/ko.ts": () => import("./B8c_rqvH.js"), "./languages/pt.ts": () => import("./BSz49qaD.js"), "./languages/tr.ts": () => import("./D_eZyIAR.js") }), `./languages/${t}.ts`, 3);
972
+ const { default: n } = await Bo(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./DvjrAXLD.js"), "./languages/en.ts": () => Promise.resolve().then(() => Ho), "./languages/es.ts": () => import("./zI14HLvP.js"), "./languages/fr.ts": () => import("./B9V0T5ZP.js"), "./languages/hi.ts": () => import("./YRQ0vk5Q.js"), "./languages/it.ts": () => import("./BQWJPfGp.js"), "./languages/ja.ts": () => import("./sl-YrKkN.js"), "./languages/ko.ts": () => import("./B8c_rqvH.js"), "./languages/pt.ts": () => import("./BSz49qaD.js"), "./languages/tr.ts": () => import("./D_eZyIAR.js") }), `./languages/${t}.ts`, 3);
966
973
  return We.set(e, n), n;
967
974
  } catch {
968
- return gt;
975
+ return pt;
969
976
  }
970
977
  }
971
978
  const {
972
- Provider: Fo,
979
+ Provider: zo,
973
980
  useContext: M
974
981
  } = W("Localization");
975
- function Ho(e) {
982
+ function Wo(e) {
976
983
  var t;
977
984
  return ((t = e.split("-")) == null ? void 0 : t[0]) ?? Oe;
978
985
  }
979
- function Uo({
986
+ function Vo({
980
987
  language: e = navigator.language,
981
988
  logger: t,
982
989
  stringSet: n,
983
990
  children: o
984
991
  }) {
985
- const [i, s] = C(We.get(Oe));
992
+ const [i, s] = T(We.get(Oe));
986
993
  return R(() => {
987
- const a = Ho(e);
988
- i.language !== a && (t == null || t.debug("localization.useEffect: update language", `${i.language} -> ${a}`), Po(a).then(s));
994
+ const a = Wo(e);
995
+ i.language !== a && (t == null || t.debug("localization.useEffect: update language", `${i.language} -> ${a}`), Uo(a).then(s));
989
996
  }, [e]), /* @__PURE__ */ r.createElement(
990
- Fo,
997
+ zo,
991
998
  {
992
999
  value: {
993
1000
  language: i.language,
994
1001
  stringSet: { ...i.stringSet, ...n },
995
1002
  dateLocale: i.dateLocale,
996
- format: (a, l, d) => pn(a, l, { locale: i.dateLocale, ...d })
1003
+ format: (a, l, d) => hn(a, l, { locale: i.dateLocale, ...d })
997
1004
  }
998
1005
  },
999
1006
  o
1000
1007
  );
1001
1008
  }
1002
- const Ve = "data-sb-agent-theme", Pt = (e) => (t, ...n) => {
1009
+ const Ve = "data-sb-agent-theme", Ft = (e) => (t, ...n) => {
1003
1010
  let o = "";
1004
1011
  return t.forEach((i, s) => {
1005
1012
  o += i + (n[s] ?? "");
1006
1013
  }), `[${Ve}='${e}'] & { ${o} }`;
1007
1014
  }, B = {
1008
- light: Pt("light"),
1009
- dark: Pt("dark")
1010
- }, zo = k(({ theme: e }) => {
1015
+ light: Ft("light"),
1016
+ dark: Ft("dark")
1017
+ }, Go = k(({ theme: e }) => {
1011
1018
  const { palette: t } = e;
1012
1019
  return `
1013
1020
  :root,
@@ -1059,7 +1066,7 @@ const Ve = "data-sb-agent-theme", Pt = (e) => (t, ...n) => {
1059
1066
  --sendbird-overlay-light: ${t.overlay.light};
1060
1067
  }
1061
1068
  `;
1062
- }), Wo = k`[${Ve}='light'] &{--sb-text-high-emphasis:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled:var(--sendbird-onlight-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-ondark-text-disabled);--sb-bg-50-600:var(--sendbird-background-50);--sb-bg-100-500:var(--sendbird-background-100);--sb-bg-200-400:var(--sendbird-background-200);--sb-primary:var(--sendbird-primary-main);--sb-secondary:var(--sendbird-secondary-main);--sb-error:var(--sendbird-error-main);--sb-information:var(--sendbird-information-light);}[${Ve}='dark'] &{--sb-text-high-emphasis:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled:var(--sendbird-ondark-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-onlight-text-disabled);--sb-bg-50-600:var(--sendbird-background-600);--sb-bg-100-500:var(--sendbird-background-500);--sb-bg-200-400:var(--sendbird-background-400);--sb-primary:var(--sendbird-primary-light);--sb-secondary:var(--sendbird-secondary-light);--sb-error:var(--sendbird-error-light);--sb-information:var(--sendbird-information-light);}`, u = {
1069
+ }), jo = k`[${Ve}='light'] &{--sb-text-high-emphasis:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled:var(--sendbird-onlight-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-ondark-text-disabled);--sb-bg-50-600:var(--sendbird-background-50);--sb-bg-100-500:var(--sendbird-background-100);--sb-bg-200-400:var(--sendbird-background-200);--sb-primary:var(--sendbird-primary-main);--sb-secondary:var(--sendbird-secondary-main);--sb-error:var(--sendbird-error-main);--sb-information:var(--sendbird-information-light);}[${Ve}='dark'] &{--sb-text-high-emphasis:var(--sendbird-ondark-text-high-emphasis);--sb-text-mid-emphasis:var(--sendbird-ondark-text-mid-emphasis);--sb-text-low-emphasis:var(--sendbird-ondark-text-low-emphasis);--sb-text-disabled:var(--sendbird-ondark-text-disabled);--sb-text-high-emphasis-inverse:var(--sendbird-onlight-text-high-emphasis);--sb-text-mid-emphasis-inverse:var(--sendbird-onlight-text-mid-emphasis);--sb-text-low-emphasis-inverse:var(--sendbird-onlight-text-low-emphasis);--sb-text-disabled-inverse:var(--sendbird-onlight-text-disabled);--sb-bg-50-600:var(--sendbird-background-600);--sb-bg-100-500:var(--sendbird-background-500);--sb-bg-200-400:var(--sendbird-background-400);--sb-primary:var(--sendbird-primary-light);--sb-secondary:var(--sendbird-secondary-light);--sb-error:var(--sendbird-error-light);--sb-information:var(--sendbird-information-light);}`, u = {
1063
1070
  color: {
1064
1071
  primary: {
1065
1072
  dark: "var(--sendbird-primary-dark)",
@@ -1100,33 +1107,33 @@ const Ve = "data-sb-agent-theme", Pt = (e) => (t, ...n) => {
1100
1107
  error: "var(--sb-error)"
1101
1108
  }
1102
1109
  }, {
1103
- Provider: Vo,
1104
- useContext: Go
1110
+ Provider: Ko,
1111
+ useContext: Zo
1105
1112
  } = W("AIAgentTheme");
1106
- function jo(e) {
1113
+ function Yo(e) {
1107
1114
  const { theme: t, appearance: n, logger: o } = e;
1108
1115
  return /* @__PURE__ */ r.createElement(
1109
- fo,
1116
+ Eo,
1110
1117
  {
1111
1118
  appearance: n,
1112
1119
  palette: t == null ? void 0 : t.palette,
1113
1120
  typography: t == null ? void 0 : t.typography,
1114
1121
  logger: o
1115
1122
  },
1116
- /* @__PURE__ */ r.createElement(Ko, { ...e })
1123
+ /* @__PURE__ */ r.createElement(qo, { ...e })
1117
1124
  );
1118
1125
  }
1119
- function Ko({ rootElement: e = document.body, children: t }) {
1120
- const { theme: n, updateTheme: o } = yn();
1126
+ function qo({ rootElement: e = document.body, children: t }) {
1127
+ const { theme: n, updateTheme: o } = Cn();
1121
1128
  return ge(() => {
1122
1129
  e.setAttribute(Ve, n.selectedTheme);
1123
- }, [e, n.selectedTheme]), /* @__PURE__ */ r.createElement(yr, { theme: n }, /* @__PURE__ */ r.createElement(Vo, { value: { theme: n, updateTheme: o } }, t));
1130
+ }, [e, n.selectedTheme]), /* @__PURE__ */ r.createElement(Tr, { theme: n }, /* @__PURE__ */ r.createElement(Ko, { value: { theme: n, updateTheme: o } }, t));
1124
1131
  }
1125
1132
  function pe(e, t) {
1126
1133
  const n = e.getRootNode({ composed: t });
1127
1134
  return n instanceof ShadowRoot || n instanceof Document ? n : document;
1128
1135
  }
1129
- const Zo = (e, t) => {
1136
+ const Jo = (e, t) => {
1130
1137
  R(() => {
1131
1138
  const n = pe(t) instanceof ShadowRoot, o = pe(t, !0);
1132
1139
  if (!(n ? t : o).querySelector(`link[href*='${e}']`)) {
@@ -1134,7 +1141,7 @@ const Zo = (e, t) => {
1134
1141
  s.rel = "stylesheet", s.href = e, (n ? t : o.head).appendChild(s);
1135
1142
  }
1136
1143
  }, [e, t]);
1137
- }, Yo = (e, t = document.body) => {
1144
+ }, Xo = (e, t = document.body) => {
1138
1145
  R(() => {
1139
1146
  const n = pe(t), i = n instanceof ShadowRoot ? t : n.head;
1140
1147
  if (!i) return;
@@ -1142,24 +1149,24 @@ const Zo = (e, t) => {
1142
1149
  let a = i.querySelector(`style#${s}`);
1143
1150
  a ? a.textContent !== e && (a.textContent = e) : (a = i.ownerDocument.createElement("style"), a.id = s, a.textContent = e, i.appendChild(a));
1144
1151
  }, [e, t]);
1145
- }, pt = /iPad|iPhone|iPod/.test(navigator.userAgent), qo = /Android/.test(navigator.userAgent), Le = (e) => pt || qo, Z = "sb-agent", X = {
1146
- ENTRY: `${Z}-entry`,
1147
- MODAL_ROOT: `${Z}-modal-root`,
1148
- WINDOW: `${Z}-window`,
1149
- LAUNCHER: `${Z}-launcher`
1152
+ }, ht = /iPad|iPhone|iPod/.test(navigator.userAgent), Qo = /Android/.test(navigator.userAgent), Le = (e) => ht || Qo, Y = "sb-agent", X = {
1153
+ ENTRY: `${Y}-entry`,
1154
+ MODAL_ROOT: `${Y}-modal-root`,
1155
+ WINDOW: `${Y}-window`,
1156
+ LAUNCHER: `${Y}-launcher`
1150
1157
  }, Pe = 2147483647, he = {
1151
1158
  MODAL: Pe - 1,
1152
1159
  // FIXME: need to cover the case where the tooltip is on the top of the modal
1153
1160
  TOOLTIP: Pe - 2,
1154
1161
  WINDOW: Pe - 3,
1155
1162
  LAUNCHER: Pe - 4
1156
- }, Sn = {
1157
- SESSION: `@${Z}-session`,
1158
- USER_DATA: `@${Z}-udata`
1159
1163
  }, wn = {
1164
+ SESSION: `@${Y}-session`,
1165
+ USER_DATA: `@${Y}-udata`
1166
+ }, kn = {
1160
1167
  DEFAULT_PRIMARY: "#742ddd",
1161
1168
  WHITE: "#ffffff"
1162
- }, kn = 36, Jo = 100, Xo = 25 * 1024 * 1024, An = ["application/pdf", "image/jpeg", "image/jpg", "image/png"], ht = "noopener noreferrer nofollow", Fe = {}, q = {
1169
+ }, An = 36, ei = 100, ti = 25 * 1024 * 1024, In = ["application/pdf", "image/jpeg", "image/jpg", "image/png"], ft = "noopener noreferrer nofollow", Fe = {}, q = {
1163
1170
  getItem: (e) => {
1164
1171
  try {
1165
1172
  return localStorage.getItem(e);
@@ -1194,7 +1201,7 @@ const Zo = (e, t) => {
1194
1201
  }
1195
1202
  }
1196
1203
  };
1197
- function In(e) {
1204
+ function $n(e) {
1198
1205
  const { keyGenerator: t, keyParamsValidator: n } = e;
1199
1206
  function o(a) {
1200
1207
  try {
@@ -1223,30 +1230,30 @@ function In(e) {
1223
1230
  }
1224
1231
  return { get: o, set: i, clear: s };
1225
1232
  }
1226
- const et = In({
1233
+ const et = $n({
1227
1234
  keyGenerator: ({ appId: e, aiAgentId: t, userId: n }) => {
1228
- const o = Qo(`${e}/${t}/${n}`);
1229
- return `${Sn.USER_DATA}/${o}`;
1235
+ const o = ni(`${e}/${t}/${n}`);
1236
+ return `${wn.USER_DATA}/${o}`;
1230
1237
  },
1231
1238
  keyParamsValidator: ({ appId: e, aiAgentId: t, userId: n }) => {
1232
1239
  if (!e || !t || !n)
1233
1240
  throw new Error("Invalid parameters for user data cache");
1234
1241
  }
1235
1242
  });
1236
- function Qo(e) {
1243
+ function ni(e) {
1237
1244
  let t = 0;
1238
1245
  for (let n = 0; n < e.length; n++)
1239
1246
  t = (t << 5) - t + e.charCodeAt(n), t |= 0;
1240
1247
  return t.toString(16);
1241
1248
  }
1242
- const tt = In({
1243
- keyGenerator: ({ appId: e, aiAgentId: t }) => `${Sn.SESSION}/${e}/${t}`
1249
+ const tt = $n({
1250
+ keyGenerator: ({ appId: e, aiAgentId: t }) => `${wn.SESSION}/${e}/${t}`
1244
1251
  }), {
1245
- Provider: ei,
1246
- Consumer: $n,
1252
+ Provider: ri,
1253
+ Consumer: Mn,
1247
1254
  useContext: N
1248
1255
  } = W("Agent");
1249
- function ti({
1256
+ function oi({
1250
1257
  children: e,
1251
1258
  state: t,
1252
1259
  enableCloseConversationButton: n = !1,
@@ -1254,14 +1261,14 @@ function ti({
1254
1261
  enableAutoDisconnectInLauncher: i = !0,
1255
1262
  ...s
1256
1263
  }) {
1257
- const a = Ze(), [l, d] = C(!1), [g, m] = C(!1), p = {
1264
+ const a = Ze(), [l, d] = T(!1), [g, m] = T(!1), p = {
1258
1265
  opened: (t == null ? void 0 : t.opened) ?? l,
1259
1266
  setOpened: (t == null ? void 0 : t.setOpened) ?? d,
1260
1267
  expanded: (t == null ? void 0 : t.expanded) ?? g,
1261
1268
  setExpanded: (t == null ? void 0 : t.setExpanded) ?? m
1262
1269
  };
1263
1270
  return /* @__PURE__ */ r.createElement(
1264
- ei,
1271
+ ri,
1265
1272
  {
1266
1273
  value: {
1267
1274
  ...s,
@@ -1275,10 +1282,10 @@ function ti({
1275
1282
  e
1276
1283
  );
1277
1284
  }
1278
- function ni() {
1279
- const { chatSDK: e, logger: t } = N(), { shouldSyncCachedTemplate: n, syncCachedTemplates: o, clearCachedTemplates: i } = Tn(), s = P(
1285
+ function ii() {
1286
+ const { chatSDK: e, logger: t } = N(), { shouldSyncCachedTemplate: n, syncCachedTemplates: o, clearCachedTemplates: i } = _n(), s = P(
1280
1287
  async (l, d) => {
1281
- t.debug("authManager.authenticate: session:", l.userId), d && e.setSessionHandler(new Er(d)), await e.connect(l.userId, l.authToken), t.debug("authManager.authenticate: user:", e.currentUser), n(e) && await o(e);
1288
+ t.debug("authManager.authenticate: session:", l.userId), d && e.setSessionHandler(new yr(d)), await e.connect(l.userId, l.authToken), t.debug("authManager.authenticate: user:", e.currentUser), n(e) && await o(e);
1282
1289
  },
1283
1290
  [e, t, n, o]
1284
1291
  ), a = P(async () => {
@@ -1289,18 +1296,18 @@ function ni() {
1289
1296
  deauthenticate: a
1290
1297
  };
1291
1298
  }
1292
- const ri = 24 * 60 * 60 * 1e3, {
1293
- Provider: oi,
1299
+ const si = 24 * 60 * 60 * 1e3, {
1300
+ Provider: ai,
1294
1301
  useContext: F
1295
1302
  } = W("MessengerSession");
1296
- function ii({
1303
+ function li({
1297
1304
  userSessionInfo: e,
1298
1305
  children: t
1299
1306
  }) {
1300
- const { appId: n, aiAgentId: o, chatSDK: i, agentPreviewConfigs: s, state: a, logger: l, language: d, countryCode: g, context: m, handlers: p } = N(), { updateTheme: h } = yn(), { authenticate: b, deauthenticate: x } = ni(), [v, f] = C(
1307
+ const { appId: n, aiAgentId: o, chatSDK: i, agentPreviewConfigs: s, state: a, logger: l, language: d, countryCode: g, context: m, handlers: p } = N(), { updateTheme: h } = Cn(), { authenticate: b, deauthenticate: x } = ii(), [E, f] = T(
1301
1308
  void 0
1302
- ), [y, _] = C(void 0), [w, O] = C(null), [ee, H] = C(null), [le, _e] = C(null), E = s == null ? void 0 : s.forceCreateChannel;
1303
- function U() {
1309
+ ), [y, _] = T(void 0), [w, O] = T(null), [ee, U] = T(null), [le, _e] = T(null), v = s == null ? void 0 : s.forceCreateChannel;
1310
+ function H() {
1304
1311
  if (e) {
1305
1312
  l.debug("messengerSession.initialize: manual session info detected");
1306
1313
  const A = ["userId", "authToken", "sessionHandler"].filter((L) => !(L in e));
@@ -1309,14 +1316,14 @@ function ii({
1309
1316
  ), e;
1310
1317
  }
1311
1318
  const I = tt.get({ appId: n, aiAgentId: o });
1312
- return I ? I.expireAt - ri <= Date.now() ? (l.debug("messengerSession.initialize: auto session expired, clear cache"), tt.clear({ appId: n, aiAgentId: o }), et.clear({ appId: n, aiAgentId: o, userId: I.userId }), null) : (l.debug("messengerSession.initialize: auto session info detected"), I) : null;
1319
+ return I ? I.expireAt - si <= Date.now() ? (l.debug("messengerSession.initialize: auto session expired, clear cache"), tt.clear({ appId: n, aiAgentId: o }), et.clear({ appId: n, aiAgentId: o, userId: I.userId }), null) : (l.debug("messengerSession.initialize: auto session info detected"), I) : null;
1313
1320
  }
1314
1321
  const te = P(
1315
1322
  (I, A) => {
1316
1323
  et.set({ appId: n, aiAgentId: o, userId: I }, { knownActiveChannelUrl: A });
1317
1324
  },
1318
1325
  [n, o]
1319
- ), G = P(
1326
+ ), j = P(
1320
1327
  (I) => {
1321
1328
  const A = et.get({ appId: n, aiAgentId: o, userId: I });
1322
1329
  return A == null ? void 0 : A.knownActiveChannelUrl;
@@ -1331,8 +1338,8 @@ function ii({
1331
1338
  language: d,
1332
1339
  country: g,
1333
1340
  context: m,
1334
- forceCreateChannel: E,
1335
- knownActiveChannelUrl: G(w.userId)
1341
+ forceCreateChannel: v,
1342
+ knownActiveChannelUrl: j(w.userId)
1336
1343
  });
1337
1344
  return te(w.userId, I.active_channel.channel_url), f({ url: I.active_channel.channel_url, status: z.OPEN }), l.info(
1338
1345
  "messengerSession.refreshActiveChannel: refreshed active channel",
@@ -1348,21 +1355,21 @@ function ii({
1348
1355
  d,
1349
1356
  g,
1350
1357
  m,
1351
- E,
1352
- G,
1358
+ v,
1359
+ j,
1353
1360
  te
1354
1361
  ]);
1355
- return hn(i, {
1362
+ return fn(i, {
1356
1363
  onChannelChanged: (I) => {
1357
1364
  var A;
1358
- I.isGroupChannel() && I.url === (v == null ? void 0 : v.url) && (l.info("messengerSession.channelChanged: channel.conversation", I.conversation), f({ url: I.url, status: ((A = I.conversation) == null ? void 0 : A.status) ?? z.OPEN }));
1365
+ I.isGroupChannel() && I.url === (E == null ? void 0 : E.url) && (l.info("messengerSession.channelChanged: channel.conversation", I.conversation), f({ url: I.url, status: ((A = I.conversation) == null ? void 0 : A.status) ?? z.OPEN }));
1359
1366
  },
1360
1367
  async onUserJoined(I, A) {
1361
- var j, fe;
1362
- if (I.conversation && I.conversation.type === Ar.PROACTIVE && A.userId === ((j = i.currentUser) == null ? void 0 : j.userId)) {
1368
+ var K, fe;
1369
+ if (I.conversation && I.conversation.type === $r.PROACTIVE && A.userId === ((K = i.currentUser) == null ? void 0 : K.userId)) {
1363
1370
  l.info("messengerSession.onUserJoined: proactive channel joined", I.url);
1364
1371
  const Se = ((fe = I.conversation) == null ? void 0 : fe.status) ?? z.OPEN;
1365
- f({ url: I.url, status: Se }), a.setOpened(!0), si({
1372
+ f({ url: I.url, status: Se }), a.setOpened(!0), ci({
1366
1373
  sound: document.hidden || !a.opened
1367
1374
  });
1368
1375
  }
@@ -1370,29 +1377,29 @@ function ii({
1370
1377
  }), R(() => {
1371
1378
  async function I() {
1372
1379
  l.debug("messengerSession.initialize: start");
1373
- const A = U(), L = await i.aiAgent.requestMessengerSettings({
1380
+ const A = H(), L = await i.aiAgent.requestMessengerSettings({
1374
1381
  aiAgentId: o,
1375
1382
  userId: A == null ? void 0 : A.userId,
1376
1383
  language: d,
1377
1384
  country: g,
1378
1385
  context: m,
1379
- forceCreateChannel: E,
1380
- knownActiveChannelUrl: G(A == null ? void 0 : A.userId)
1386
+ forceCreateChannel: v,
1387
+ knownActiveChannelUrl: j(A == null ? void 0 : A.userId)
1381
1388
  });
1382
1389
  l.debug("messengerSession.initialize: messenger settings response", L);
1383
- let j = null;
1390
+ let K = null;
1384
1391
  if (L.auto_created_user) {
1385
- const { user_id: K, session_token: ne, expire_at: we } = L.auto_created_user;
1386
- tt.set({ appId: n, aiAgentId: o }, { userId: K, authToken: ne, expireAt: we }), j = { userId: K, authToken: ne };
1392
+ const { user_id: Z, session_token: ne, expire_at: we } = L.auto_created_user;
1393
+ tt.set({ appId: n, aiAgentId: o }, { userId: Z, authToken: ne, expireAt: we }), K = { userId: Z, authToken: ne };
1387
1394
  } else
1388
- j = {
1395
+ K = {
1389
1396
  userId: (A == null ? void 0 : A.userId) ?? "",
1390
1397
  authToken: (A == null ? void 0 : A.authToken) ?? ""
1391
1398
  };
1392
- te(j.userId, L.active_channel.channel_url);
1399
+ te(K.userId, L.active_channel.channel_url);
1393
1400
  function fe() {
1394
- const K = L.appearance.selected_theme;
1395
- h(K, (we) => {
1401
+ const Z = L.appearance.selected_theme;
1402
+ h(Z, (we) => {
1396
1403
  const ce = L.appearance.themes[we];
1397
1404
  return {
1398
1405
  primaryColor: ce.primary_color,
@@ -1400,7 +1407,7 @@ function ii({
1400
1407
  primaryContrastColor: ce.primary_contrast_color,
1401
1408
  botMessageBackgroundContrastColor: ce.bot_message_bg_contrast_color
1402
1409
  };
1403
- }), _(void 0), O(j), H({
1410
+ }), _(void 0), O(K), U({
1404
1411
  userId: L.bot.bot_userid,
1405
1412
  profileUrl: L.bot.bot_profile_url,
1406
1413
  nickname: L.bot.bot_nickname,
@@ -1417,9 +1424,9 @@ function ii({
1417
1424
  f({ url: L.active_channel.channel_url, status: z.OPEN });
1418
1425
  }
1419
1426
  try {
1420
- fe(), await b(j, e == null ? void 0 : e.sessionHandler), Se();
1421
- } catch (K) {
1422
- K instanceof Error && (l.error("messengerSession.initialize: failed to connect", K), _(K));
1427
+ fe(), await b(K, e == null ? void 0 : e.sessionHandler), Se();
1428
+ } catch (Z) {
1429
+ Z instanceof Error && (l.error("messengerSession.initialize: failed to connect", Z), _(Z));
1423
1430
  }
1424
1431
  }
1425
1432
  I().catch((A) => {
@@ -1428,11 +1435,11 @@ function ii({
1428
1435
  }, [i, n, o, e == null ? void 0 : e.userId, e == null ? void 0 : e.authToken]), R(() => {
1429
1436
  p != null && p.onRegisterDeauthenticateHandler && (l.debug("messengerSession: registering deauthenticate handler"), p.onRegisterDeauthenticateHandler(x));
1430
1437
  }, [p == null ? void 0 : p.onRegisterDeauthenticateHandler, x]), !w || !ee || !le ? null : /* @__PURE__ */ r.createElement(
1431
- oi,
1438
+ ai,
1432
1439
  {
1433
1440
  value: {
1434
1441
  userSession: w,
1435
- activeChannel: v,
1442
+ activeChannel: E,
1436
1443
  refreshActiveChannel: Xe,
1437
1444
  connectionError: y,
1438
1445
  aiAgentInfo: { ...ee, ...s == null ? void 0 : s.bot },
@@ -1442,7 +1449,7 @@ function ii({
1442
1449
  t
1443
1450
  );
1444
1451
  }
1445
- function si({ sound: e }) {
1452
+ function ci({ sound: e }) {
1446
1453
  const t = "🔔You have received a new message", n = document.title, o = setInterval(() => {
1447
1454
  document.title = document.title === t ? n : t;
1448
1455
  }, 750);
@@ -1450,7 +1457,7 @@ function si({ sound: e }) {
1450
1457
  new Audio(i.default).play();
1451
1458
  });
1452
1459
  }
1453
- const ai = ({ publishSynchronous: e = !1 }) => {
1460
+ const di = ({ publishSynchronous: e = !1 }) => {
1454
1461
  const t = /* @__PURE__ */ new Set();
1455
1462
  return {
1456
1463
  publish: (n) => {
@@ -1461,8 +1468,8 @@ const ai = ({ publishSynchronous: e = !1 }) => {
1461
1468
  subscribe: (n) => (t.add(n), () => t.delete(n))
1462
1469
  };
1463
1470
  };
1464
- function li(e, t = []) {
1465
- const n = D(null), o = D(0), i = D(0), [s] = C(() => ai({ publishSynchronous: !0 })), [a, l] = C(!0);
1471
+ function ui(e, t = []) {
1472
+ const n = D(null), o = D(0), i = D(0), [s] = T(() => di({ publishSynchronous: !0 })), [a, l] = T(!0);
1466
1473
  return ge(() => {
1467
1474
  o.current = 0, i.current = 0, l(!0), n.current && (n.current.scrollTop = n.current.scrollHeight);
1468
1475
  }, t), ge(() => s.subscribe(({ type: d, data: g }) => {
@@ -1470,10 +1477,10 @@ function li(e, t = []) {
1470
1477
  if (!n.current) return m == null ? void 0 : m();
1471
1478
  if (d === "scrollToBottom" && (n.current.scroll ? n.current.scroll({
1472
1479
  top: n.current.scrollHeight,
1473
- behavior: Ft(e, p)
1480
+ behavior: Ht(e, p)
1474
1481
  }) : n.current.scrollTop = n.current.scrollHeight, i.current = 0, l(!0), m == null || m()), d === "scroll") {
1475
- const h = g == null ? void 0 : g.top, { scrollTop: b, scrollHeight: x, clientHeight: v } = n.current;
1476
- n.current.scroll ? n.current.scroll({ top: h, behavior: Ft(e, p) }) : typeof h == "number" && (n.current.scrollTop = h), i.current = Math.max(0, x - b - v), l(i.current === 0), m == null || m();
1482
+ const h = g == null ? void 0 : g.top, { scrollTop: b, scrollHeight: x, clientHeight: E } = n.current;
1483
+ n.current.scroll ? n.current.scroll({ top: h, behavior: Ht(e, p) }) : typeof h == "number" && (n.current.scrollTop = h), i.current = Math.max(0, x - b - E), l(i.current === 0), m == null || m();
1477
1484
  }
1478
1485
  }), [e]), {
1479
1486
  scrollRef: n,
@@ -1484,10 +1491,10 @@ function li(e, t = []) {
1484
1491
  scrollPositionRef: o
1485
1492
  };
1486
1493
  }
1487
- function Ft(e, t) {
1494
+ function Ht(e, t) {
1488
1495
  return typeof t == "boolean" ? t ? "smooth" : "auto" : e;
1489
1496
  }
1490
- function ci(e) {
1497
+ function mi(e) {
1491
1498
  return new Promise((t) => {
1492
1499
  const n = new Image();
1493
1500
  n.onload = function() {
@@ -1496,23 +1503,23 @@ function ci(e) {
1496
1503
  }, n.src = URL.createObjectURL(e);
1497
1504
  });
1498
1505
  }
1499
- async function di(e) {
1506
+ async function gi(e) {
1500
1507
  if ("file" in e && e.file instanceof File && e.file.type.startsWith("image/")) {
1501
- const { width: t, height: n } = await ci(e.file);
1502
- return new Or({
1503
- key: Mn,
1508
+ const { width: t, height: n } = await mi(e.file);
1509
+ return new Rr({
1510
+ key: On,
1504
1511
  value: [t, n]
1505
1512
  });
1506
1513
  }
1507
1514
  }
1508
- const Mn = "KEY_IMG_ASPECT_RATIO", ui = ({ onScroll: e }) => {
1515
+ const On = "KEY_IMG_ASPECT_RATIO", pi = ({ onScroll: e }) => {
1509
1516
  const { agentPreviewConfigs: t, handlers: n } = N(), o = D(t == null ? void 0 : t.agentAttributes);
1510
1517
  return o.current = t == null ? void 0 : t.agentAttributes, {
1511
1518
  onBeforeSendMessage: async (i) => {
1512
- const s = await di(i), a = {
1519
+ const s = await gi(i), a = {
1513
1520
  ...i,
1514
1521
  metaArrays: s ? [s] : void 0
1515
- }, l = mi(o.current);
1522
+ }, l = hi(o.current);
1516
1523
  return l ? { ...a, data: JSON.stringify(l) } : a;
1517
1524
  },
1518
1525
  onAfterSendMessage: (i) => {
@@ -1520,26 +1527,26 @@ const Mn = "KEY_IMG_ASPECT_RATIO", ui = ({ onScroll: e }) => {
1520
1527
  e(), (s = n == null ? void 0 : n.onMessageSend) == null || s.call(n, i.message);
1521
1528
  }
1522
1529
  };
1523
- }, mi = (e) => {
1530
+ }, hi = (e) => {
1524
1531
  if (!e) return null;
1525
1532
  const t = {};
1526
1533
  return e.ai && Object.keys(e.ai).length > 0 && (t.ai_attrs = e.ai), e.safeguard && Object.keys(e.safeguard).length > 0 && (t.safeguard_attrs = e.safeguard), typeof e.use_prompt_cache == "boolean" && (t.use_prompt_cache = e.use_prompt_cache), Object.keys(t).length > 0 ? t : null;
1527
1534
  }, {
1528
- Provider: gi,
1529
- useContext: Y
1530
- } = W("Conversation"), pi = ({
1535
+ Provider: fi,
1536
+ useContext: G
1537
+ } = W("Conversation"), bi = ({
1531
1538
  closedChannelUrl: e,
1532
1539
  onClearClosedChannelUrl: t,
1533
1540
  onNavigateToConversationList: n,
1534
1541
  children: o
1535
1542
  }) => {
1536
- const { activeChannel: i, refreshActiveChannel: s } = F(), a = li("smooth"), l = () => {
1543
+ const { activeChannel: i, refreshActiveChannel: s } = F(), a = ui("smooth"), l = () => {
1537
1544
  setTimeout(() => a.scrollPubSub.publish({ type: "scrollToBottom" }), 25);
1538
- }, { onBeforeSendMessage: d, onAfterSendMessage: g } = ui({ onScroll: l }), m = P(async () => {
1545
+ }, { onBeforeSendMessage: d, onAfterSendMessage: g } = pi({ onScroll: l }), m = P(async () => {
1539
1546
  await s(), e && (t == null || t());
1540
1547
  }, [s, e, t]);
1541
1548
  return /* @__PURE__ */ r.createElement(
1542
- Qr,
1549
+ to,
1543
1550
  {
1544
1551
  channelUrl: e || (i == null ? void 0 : i.url),
1545
1552
  onBeforeSendMessage: d,
@@ -1549,7 +1556,7 @@ const Mn = "KEY_IMG_ASPECT_RATIO", ui = ({ onScroll: e }) => {
1549
1556
  onConversationClosedViaDispatcher: m
1550
1557
  },
1551
1558
  (p) => /* @__PURE__ */ r.createElement(
1552
- gi,
1559
+ fi,
1553
1560
  {
1554
1561
  value: { ...p, scrollSource: a, goToActiveConversation: m, onNavigateToConversationList: n }
1555
1562
  },
@@ -1559,35 +1566,38 @@ const Mn = "KEY_IMG_ASPECT_RATIO", ui = ({ onScroll: e }) => {
1559
1566
  };
1560
1567
  function Ge() {
1561
1568
  }
1562
- async function On(e) {
1569
+ async function Ln(e) {
1563
1570
  let t = e;
1564
1571
  t && (!t.startsWith("http://") && !t.startsWith("https://") && (t = "https://" + t), window.open(t, "_blank", "noopener,noreferrer"));
1565
1572
  }
1566
- function Ht(e) {
1573
+ function Ut(e) {
1567
1574
  try {
1568
1575
  return JSON.parse(e === "" ? "{}" : e);
1569
1576
  } catch {
1570
1577
  return {};
1571
1578
  }
1572
1579
  }
1573
- function Ln(e) {
1580
+ function Rn(e) {
1574
1581
  return !e || !e.conversation ? !1 : e.conversation.status === z.CLOSED;
1575
1582
  }
1576
- function Rn(e) {
1583
+ function Nn(e) {
1577
1584
  return !e || !e.conversation ? !1 : e.conversation.status === z.OPEN;
1578
1585
  }
1579
- function hi(e) {
1580
- var o;
1581
- const t = (o = e == null ? void 0 : e.conversation) == null ? void 0 : o.handoff, n = !!(t != null && t.timestamp);
1582
- return Rn(e) && !n;
1586
+ function Dn(e) {
1587
+ var n;
1588
+ const t = (n = e == null ? void 0 : e.conversation) == null ? void 0 : n.handoff;
1589
+ return !!(t != null && t.timestamp);
1583
1590
  }
1584
- const ft = ye({
1591
+ function xi(e) {
1592
+ return Nn(e) && !Dn(e);
1593
+ }
1594
+ const bt = ye({
1585
1595
  onDrop: Ge,
1586
1596
  subscribe: () => Ge
1587
1597
  }), lt = ({ children: e }) => {
1588
1598
  const t = D(/* @__PURE__ */ new Set());
1589
1599
  return /* @__PURE__ */ r.createElement(
1590
- ft.Provider,
1600
+ bt.Provider,
1591
1601
  {
1592
1602
  value: {
1593
1603
  onDrop: (n) => {
@@ -1602,96 +1612,97 @@ const ft = ye({
1602
1612
  },
1603
1613
  e
1604
1614
  );
1605
- }, fi = ({ onDropFiles: e }) => {
1606
- const { subscribe: t } = J(ft);
1615
+ }, Ei = ({ onDropFiles: e }) => {
1616
+ const { subscribe: t } = J(bt);
1607
1617
  R(() => t(e), [e]);
1608
1618
  };
1609
1619
  lt.Consumer = ({ children: e }) => {
1610
- const { onDrop: t } = J(ft);
1620
+ const { onDrop: t } = J(bt);
1611
1621
  return e({ onDrop: t, onDragOver: (i) => i.preventDefault() });
1612
1622
  };
1613
1623
  const se = (e) => {
1614
1624
  const t = e;
1615
1625
  return typeof t == "number" ? `${t}px` : t;
1616
- }, bi = /* @__PURE__ */ new Set(["send", "chat", "message", "chevron-right"]), xi = {
1617
- spinner: T(() => import("./BcUGcaq2.js")),
1618
- chat: T(() => import("./DcFCGVBm.js")),
1619
- message: T(() => import("./DsGXnanX.js")),
1620
- error: T(() => import("./B6fvrWGq.js")),
1621
- info: T(() => import("./CAIYsKDy.js")),
1622
- refresh: T(() => import("./B6xd54zt.js")),
1623
- "chevron-down": T(() => import("./BsimU71m.js")),
1624
- "chevron-right": T(() => import("./NmJl7zv3.js")),
1625
- done: T(() => import("./D_q6g3Dd.js")),
1626
- user: T(() => import("./CvqfQEhO.js")),
1627
- "file-document": T(() => import("./BAr50pfO.js")),
1628
- download: T(() => import("./B2CtcWp3.js")),
1629
- attach: T(() => import("./DY2ULcTX.js")),
1630
- delete: T(() => import("./DMruRpOm.js")),
1631
- close: T(() => import("./CuaBI7kd.js")),
1632
- "close-filled": T(() => import("./CxQFWLnW.js")),
1633
- send: T(() => import("./DZJyDpNp.js")),
1634
- menu: T(() => import("./BUYabNz7.js")),
1635
- expand: T(() => import("./wBtIAuNm.js")),
1636
- collapse: T(() => import("./C0RFfifL.js")),
1637
- agent: T(() => import("./Cc7XmLN1.js")),
1638
- question: T(() => import("./dqwvRBog.js")),
1639
- actionbook: T(() => import("./CrjNuryZ.js")),
1640
- function: T(() => import("./CvdSjw1c.js")),
1641
- "radio-on": T(() => import("./nmdo2Fbj.js")),
1642
- "radio-off": T(() => import("./BnZcRFmS.js")),
1643
- confluence: T(() => import("./BOnlh2zd.js")),
1644
- zendesk: T(() => import("./BAJ6LEKc.js")),
1645
- salesforce: T(() => import("./CT2kv4lr.js")),
1646
- sprinklr: T(() => import("./m2INcyV2.js")),
1647
- website: T(() => import("./BgGVGNdg.js")),
1648
- snippet: T(() => import("./BFcXPuf5.js")),
1649
- template: T(() => import("./awO7aBCv.js"))
1626
+ }, vi = /* @__PURE__ */ new Set(["send", "chat", "message", "chevron-right"]), yi = {
1627
+ spinner: C(() => import("./BcUGcaq2.js")),
1628
+ chat: C(() => import("./DcFCGVBm.js")),
1629
+ message: C(() => import("./DsGXnanX.js")),
1630
+ error: C(() => import("./B6fvrWGq.js")),
1631
+ info: C(() => import("./CAIYsKDy.js")),
1632
+ refresh: C(() => import("./B6xd54zt.js")),
1633
+ "chevron-down": C(() => import("./BsimU71m.js")),
1634
+ "chevron-right": C(() => import("./NmJl7zv3.js")),
1635
+ done: C(() => import("./D_q6g3Dd.js")),
1636
+ user: C(() => import("./CvqfQEhO.js")),
1637
+ "file-document": C(() => import("./BAr50pfO.js")),
1638
+ download: C(() => import("./B2CtcWp3.js")),
1639
+ attach: C(() => import("./DY2ULcTX.js")),
1640
+ delete: C(() => import("./DMruRpOm.js")),
1641
+ close: C(() => import("./CuaBI7kd.js")),
1642
+ "close-filled": C(() => import("./CxQFWLnW.js")),
1643
+ send: C(() => import("./DZJyDpNp.js")),
1644
+ menu: C(() => import("./BUYabNz7.js")),
1645
+ expand: C(() => import("./wBtIAuNm.js")),
1646
+ collapse: C(() => import("./C0RFfifL.js")),
1647
+ agent: C(() => import("./Cc7XmLN1.js")),
1648
+ question: C(() => import("./dqwvRBog.js")),
1649
+ actionbook: C(() => import("./CrjNuryZ.js")),
1650
+ function: C(() => import("./CvdSjw1c.js")),
1651
+ "radio-on": C(() => import("./nmdo2Fbj.js")),
1652
+ "radio-off": C(() => import("./BnZcRFmS.js")),
1653
+ confluence: C(() => import("./BOnlh2zd.js")),
1654
+ zendesk: C(() => import("./BAJ6LEKc.js")),
1655
+ salesforce: C(() => import("./CT2kv4lr.js")),
1656
+ sprinklr: C(() => import("./m2INcyV2.js")),
1657
+ website: C(() => import("./BgGVGNdg.js")),
1658
+ snippet: C(() => import("./BFcXPuf5.js")),
1659
+ template: C(() => import("./awO7aBCv.js"))
1650
1660
  }, $ = ({ type: e, size: t = 24, className: n, color: o }) => {
1651
- const i = xi[e];
1661
+ const i = yi[e];
1652
1662
  return /* @__PURE__ */ r.createElement(
1653
- vi,
1663
+ Ti,
1654
1664
  {
1655
1665
  className: n,
1656
- $rtlFlip: bi.has(e),
1666
+ $rtlFlip: vi.has(e),
1657
1667
  $size: t,
1658
1668
  $color: o ?? u.color.primary.main
1659
1669
  },
1660
1670
  /* @__PURE__ */ r.createElement($e, { fallback: null }, /* @__PURE__ */ r.createElement(i, null))
1661
1671
  );
1662
- }, Ei = k`[dir='rtl'] &{transform:scaleX(-1);}`, vi = c.div`width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};display:inline-block;&:focus{outline:none;}svg{display:block;}[class*='fill']{fill:${({ $color: e }) => e};}[class*='stroke']{stroke:${({ $color: e }) => e};stroke-width:2px;stroke-linejoin:round;}${({ $rtlFlip: e }) => e && Ei};`, S = ({
1672
+ }, Ci = k`[dir='rtl'] &{transform:scaleX(-1);}`, Ti = c.div`width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};display:inline-block;&:focus{outline:none;}svg{display:block;}[class*='fill']{fill:${({ $color: e }) => e};}[class*='stroke']{stroke:${({ $color: e }) => e};stroke-width:2px;stroke-linejoin:round;}${({ $rtlFlip: e }) => e && Ci};`, S = ({
1663
1673
  as: e,
1664
1674
  variant: t = "body1",
1665
1675
  color: n,
1666
1676
  className: o,
1667
1677
  ...i
1668
- }) => /* @__PURE__ */ r.createElement(Ci, { as: e, $variant: t, className: o, $color: n, ...i }), Ut = /* @__PURE__ */ new WeakMap(), yi = (e, t) => {
1669
- let n = Ut.get(t);
1670
- n || (n = /* @__PURE__ */ new Map(), Ut.set(t, n));
1678
+ }) => /* @__PURE__ */ r.createElement(Si, { as: e, $variant: t, className: o, $color: n, ...i }), zt = /* @__PURE__ */ new WeakMap(), _i = (e, t) => {
1679
+ let n = zt.get(t);
1680
+ n || (n = /* @__PURE__ */ new Map(), zt.set(t, n));
1671
1681
  const o = n.get(e);
1672
1682
  if (o) return o;
1673
1683
  const i = t[e] ?? t.body1, s = k`font-size:${se(i.fontSize)};font-weight:${i.fontWeight};${i.fontFamily ? `font-family: ${i.fontFamily};` : ""}
1684
+ ${i.lineHeight ? `line-height: ${i.lineHeight};` : "line-height: 100%;"}
1674
1685
  `;
1675
1686
  return n.set(e, s), s;
1676
- }, Ci = c.span`font-stretch:normal;font-style:normal;letter-spacing:normal;line-height:100%;${({ $variant: e, theme: t }) => yi(e, t.typography)}color:${({ $color: e }) => e};`, $d = ({ iconSize: e = 64, icon: t, className: n, label: o, children: i }) => /* @__PURE__ */ r.createElement(_i, { className: n }, /* @__PURE__ */ r.createElement($, { type: t, size: e, color: u.themedColor.textLowEmphasis }), /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.themedColor.textMidEmphasis }, o), i), Ti = c.div`position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;`, _i = c.div`display:flex;flex-direction:column;min-height:104px;align-items:center;gap:20px;text-align:center;`, Si = {
1677
- loading: T(() => import("./xCNPjZNB.js")),
1678
- error: T(() => import("./Cfv5QpcS.js")),
1679
- noChannels: T(() => import("./BdwtEHgL.js")),
1680
- noMessages: T(() => import("./CXSnn4qx.js"))
1687
+ }, Si = c.span`font-stretch:normal;font-style:normal;letter-spacing:normal;${({ $variant: e, theme: t }) => _i(e, t.typography)}color:${({ $color: e }) => e};`, Ld = ({ iconSize: e = 64, icon: t, className: n, label: o, children: i }) => /* @__PURE__ */ r.createElement(ki, { className: n }, /* @__PURE__ */ r.createElement($, { type: t, size: e, color: u.themedColor.textLowEmphasis }), /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.themedColor.textMidEmphasis }, o), i), wi = c.div`position:relative;display:flex;justify-content:center;align-items:center;width:100%;height:100%;`, ki = c.div`display:flex;flex-direction:column;min-height:104px;align-items:center;gap:20px;text-align:center;`, Ai = {
1688
+ loading: C(() => import("./BUZAFjik.js")),
1689
+ error: C(() => import("./u7xN649y.js")),
1690
+ noChannels: C(() => import("./y47rQgeT.js")),
1691
+ noMessages: C(() => import("./BO79e6F7.js"))
1681
1692
  }, Ee = ({ className: e, type: t = "loading", ...n }) => {
1682
- const o = Si[t];
1683
- return /* @__PURE__ */ r.createElement(Ti, { className: e }, /* @__PURE__ */ r.createElement($e, { fallback: null }, /* @__PURE__ */ r.createElement(o, { ...n })));
1684
- }, Re = 244, Nn = 640, je = 26, Dn = 4, Q = 12, Te = 2, wi = 16, ae = `${Z}-incoming-msg`, ki = `${Z}-marked-text`;
1685
- function bt(e) {
1693
+ const o = Ai[t];
1694
+ return /* @__PURE__ */ r.createElement(wi, { className: e }, /* @__PURE__ */ r.createElement($e, { fallback: null }, /* @__PURE__ */ r.createElement(o, { ...n })));
1695
+ }, Re = 244, Bn = 640, je = 26, Pn = 4, Q = 12, Te = 2, Ii = 16, ae = `${Y}-incoming-msg`, $i = `${Y}-marked-text`;
1696
+ function xt(e) {
1686
1697
  switch (e) {
1687
1698
  case "top":
1688
1699
  case "middle":
1689
1700
  return Te;
1690
1701
  default:
1691
- return wi;
1702
+ return Ii;
1692
1703
  }
1693
1704
  }
1694
- function xt(e, t) {
1705
+ function Et(e, t) {
1695
1706
  if (t) {
1696
1707
  const [, n] = t.split("/");
1697
1708
  if (n)
@@ -1704,54 +1715,54 @@ function xt(e, t) {
1704
1715
  }
1705
1716
  return "FILE";
1706
1717
  }
1707
- function Bn(e) {
1718
+ function Fn(e) {
1708
1719
  return e.messageType === "file" ? e.message.length > 0 && e.file.name !== e.message : e.message.length > 0;
1709
1720
  }
1710
- function Et({
1721
+ function vt({
1711
1722
  name: e,
1712
1723
  type: t = "FILE",
1713
1724
  iconColor: n,
1714
1725
  iconBackgroundColor: o,
1715
1726
  onClick: i
1716
1727
  }) {
1717
- const { colors: s } = ut();
1718
- return /* @__PURE__ */ r.createElement(Ai, { onClick: i, $clickable: !!i }, /* @__PURE__ */ r.createElement($i, { $bgColor: o ?? s.base.primary }, /* @__PURE__ */ r.createElement($, { type: "file-document", size: 24, color: n ?? s.base.primaryContrastContent })), /* @__PURE__ */ r.createElement(Mi, null, /* @__PURE__ */ r.createElement(Oi, { variant: "button", color: u.themedColor.textHighEmphasis }, e), /* @__PURE__ */ r.createElement(S, { color: u.themedColor.textMidEmphasis, variant: "caption3" }, t)));
1728
+ const { colors: s } = mt();
1729
+ return /* @__PURE__ */ r.createElement(Mi, { onClick: i, $clickable: !!i }, /* @__PURE__ */ r.createElement(Li, { $bgColor: o ?? s.base.primary }, /* @__PURE__ */ r.createElement($, { type: "file-document", size: 24, color: n ?? s.base.primaryContrastContent })), /* @__PURE__ */ r.createElement(Ri, null, /* @__PURE__ */ r.createElement(Ni, { variant: "button", color: u.themedColor.textHighEmphasis }, e), /* @__PURE__ */ r.createElement(S, { color: u.themedColor.textMidEmphasis, variant: "caption3" }, t)));
1719
1730
  }
1720
- const Ai = c.div`border-radius:12px;gap:8px;width:${Re}px;height:64px;display:flex;align-items:center;padding:12px;box-sizing:border-box;border:1px solid ${u.themedColor.textDisabled};background-color:${u.themedColor.bg_50_600};${({ $clickable: e }) => e && Ii}`, Ii = k`cursor:pointer;&:hover{background-color:${u.themedColor.bg_100_500};}`, $i = c.div`border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background-color:${({ $bgColor: e }) => e};`, Mi = c.div`display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;`, Oi = c(S)`text-overflow:ellipsis;white-space:nowrap;overflow:hidden;`;
1721
- function Li({ file: e, children: t, onClickFile: n }) {
1722
- return /* @__PURE__ */ r.createElement(Ri, null, /* @__PURE__ */ r.createElement(
1723
- Et,
1731
+ const Mi = c.div`border-radius:12px;gap:8px;width:${Re}px;height:64px;display:flex;align-items:center;padding:12px;box-sizing:border-box;border:1px solid ${u.themedColor.textDisabled};background-color:${u.themedColor.bg_50_600};${({ $clickable: e }) => e && Oi}`, Oi = k`cursor:pointer;&:hover{background-color:${u.themedColor.bg_100_500};}`, Li = c.div`border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background-color:${({ $bgColor: e }) => e};`, Ri = c.div`display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;`, Ni = c(S)`text-overflow:ellipsis;white-space:nowrap;overflow:hidden;`;
1732
+ function Di({ file: e, children: t, onClickFile: n }) {
1733
+ return /* @__PURE__ */ r.createElement(Bi, null, /* @__PURE__ */ r.createElement(
1734
+ vt,
1724
1735
  {
1725
1736
  name: e.name,
1726
- type: xt(e.name, e.type),
1737
+ type: Et(e.name, e.type),
1727
1738
  onClick: n && (() => n == null ? void 0 : n(e))
1728
1739
  }
1729
1740
  ), t);
1730
1741
  }
1731
- const Ri = c.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`;
1732
- function Ni({ file: e, onClickMedia: t, children: n }) {
1733
- const o = () => e.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Pi, { src: e.url, alt: "image-message" }) : e.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Fi, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: e.url }), /* @__PURE__ */ r.createElement("track", { kind: "captions" })) : null;
1742
+ const Bi = c.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`;
1743
+ function Pi({ file: e, onClickMedia: t, children: n }) {
1744
+ const o = () => e.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Ui, { src: e.url, alt: "image-message" }) : e.type.startsWith("video") ? /* @__PURE__ */ r.createElement(zi, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: e.url }), /* @__PURE__ */ r.createElement("track", { kind: "captions" })) : null;
1734
1745
  if (o) {
1735
1746
  const i = {
1736
1747
  id: `${ae}-media-body`,
1737
1748
  onClick: () => t == null ? void 0 : t(e)
1738
1749
  };
1739
- return /* @__PURE__ */ r.createElement(Di, null, /* @__PURE__ */ r.createElement(Bi, { ...i }, o()), n);
1750
+ return /* @__PURE__ */ r.createElement(Fi, null, /* @__PURE__ */ r.createElement(Hi, { ...i }, o()), n);
1740
1751
  }
1741
1752
  return null;
1742
1753
  }
1743
- const Di = c.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`, Bi = c.div`width:${Re}px;height:160px;border-radius:12px;overflow:hidden;cursor:pointer;${B.light`
1754
+ const Fi = c.div`display:flex;flex-direction:column;align-items:flex-start;gap:${Te}px;`, Hi = c.div`width:${Re}px;height:160px;border-radius:12px;overflow:hidden;cursor:pointer;${B.light`
1744
1755
  background-color: ${u.color.background100};
1745
1756
  `}
1746
1757
  ${B.dark`
1747
1758
  background-color: ${u.color.background400};
1748
1759
  `}
1749
- `, Pi = c.img`width:100%;height:100%;object-fit:cover;`, Fi = c.video`width:100%;height:100%;object-fit:cover;`, Hi = "✱";
1750
- function Pn(e) {
1751
- const t = new RegExp(`${Hi}+`, "g");
1752
- return e.replace(t, (n) => `<span id=${ki} aria-label="masked-text">${n}</span>`);
1760
+ `, Ui = c.img`width:100%;height:100%;object-fit:cover;`, zi = c.video`width:100%;height:100%;object-fit:cover;`, Wi = "✱";
1761
+ function Hn(e) {
1762
+ const t = new RegExp(`${Wi}+`, "g");
1763
+ return e.replace(t, (n) => `<span id=${$i} aria-label="masked-text">${n}</span>`);
1753
1764
  }
1754
- function Ui(e) {
1765
+ function Vi(e) {
1755
1766
  const t = /```(\w+)?\n([\s\S]*?)```/g, n = [];
1756
1767
  let o = 0;
1757
1768
  return e.replace(t, (i, ...s) => {
@@ -1767,71 +1778,71 @@ function Ui(e) {
1767
1778
  }), o < e.length && n.push({
1768
1779
  type: "text",
1769
1780
  value: e.slice(o).trim()
1770
- }), n.map((i) => i.type !== "text" ? i : { ...i, value: Pn(i.value) });
1781
+ }), n.map((i) => i.type !== "text" ? i : { ...i, value: Hn(i.value) });
1771
1782
  }
1772
- const zi = T(async () => ({ default: (await import("./BvhxxGUf.js")).MarkdownText })), Wi = T(async () => ({ default: (await import("./DH2PekOm.js")).CodeBlock }));
1773
- function zt(e) {
1783
+ const Gi = C(async () => ({ default: (await import("./HxsmHNdw.js")).MarkdownText })), ji = C(async () => ({ default: (await import("./DH2PekOm.js")).CodeBlock }));
1784
+ function Wt(e) {
1774
1785
  var i, s;
1775
- const t = e.maxBodyWidth ?? Re, n = Ie(() => Ui(e.message), [e.message]), o = {
1786
+ const t = e.maxBodyWidth ?? Re, n = Ie(() => Vi(e.message), [e.message]), o = {
1776
1787
  id: `${ae}-text-body`,
1777
1788
  $maxWidth: t,
1778
1789
  $color: (i = e.customStyle) == null ? void 0 : i.bubbleContentColor,
1779
1790
  $bgColor: (s = e.customStyle) == null ? void 0 : s.bubbleBackgroundColor
1780
1791
  };
1781
- return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Wt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Wt, { ...o }, n.map((a, l) => a.type === "text" ? /* @__PURE__ */ r.createElement(Vt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement($e, { fallback: a.value }, /* @__PURE__ */ r.createElement(zi, null, a.value))) : a.type === "code" ? /* @__PURE__ */ r.createElement($e, { key: l, fallback: /* @__PURE__ */ r.createElement(Vt, { variant: "body3" }, a.value) }, /* @__PURE__ */ r.createElement(Wi, { code: a.value, language: a.language })) : null), e.children);
1792
+ return n.length === 0 ? e.children ? /* @__PURE__ */ r.createElement(Vt, { ...o }, e.children) : null : /* @__PURE__ */ r.createElement(Vt, { ...o }, n.map((a, l) => a.type === "text" ? /* @__PURE__ */ r.createElement(Gt, { key: l, variant: "body3" }, /* @__PURE__ */ r.createElement($e, { fallback: a.value }, /* @__PURE__ */ r.createElement(Gi, null, a.value))) : a.type === "code" ? /* @__PURE__ */ r.createElement($e, { key: l, fallback: /* @__PURE__ */ r.createElement(Gt, { variant: "body3" }, a.value) }, /* @__PURE__ */ r.createElement(ji, { code: a.value, language: a.language })) : null), e.children);
1782
1793
  }
1783
- const Wt = c.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => k`
1794
+ const Vt = c.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => k`
1784
1795
  color: ${t || e.colors.messageIncoming.text};
1785
1796
  background-color: ${n || e.colors.messageIncoming.background};
1786
1797
  `}
1787
1798
  padding: 12px 0;
1788
1799
  transition: max-width 0.3s;
1789
1800
  overflow-wrap: break-word;
1790
- `, Vt = c(S)`align-items:flex-start;line-height:18px;white-space:pre-wrap;padding:0 12px;`;
1791
- function Vi(e) {
1792
- const { stringSet: t } = M(), n = Bn(e) ? /* @__PURE__ */ r.createElement(zt, { ...e }) : null;
1801
+ `, Gt = c(S)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
1802
+ function Ki(e) {
1803
+ const { stringSet: t } = M(), n = Fn(e) ? /* @__PURE__ */ r.createElement(Wt, { ...e }) : null;
1793
1804
  if (e.messageType === "user")
1794
1805
  return n;
1795
1806
  if (e.messageType === "file") {
1796
1807
  const o = e.file;
1797
- return o.type.startsWith("image") || o.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Ni, { ...e }, n) : /* @__PURE__ */ r.createElement(Li, { ...e }, n);
1808
+ return o.type.startsWith("image") || o.type.startsWith("video") ? /* @__PURE__ */ r.createElement(Pi, { ...e }, n) : /* @__PURE__ */ r.createElement(Di, { ...e }, n);
1798
1809
  }
1799
- return /* @__PURE__ */ r.createElement(zt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
1810
+ return /* @__PURE__ */ r.createElement(Wt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
1800
1811
  }
1801
- const vt = (e) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0008 0.973633C10.6172 0.973633 9.49558 2.09527 9.49558 3.47888C9.49558 4.50705 10.115 5.39055 11.0009 5.77664V7.47887H13.0009V5.77653C13.8868 5.3904 14.5061 4.50696 14.5061 3.47888C14.5061 2.09527 13.3844 0.973633 12.0008 0.973633ZM0.250977 16.5788L0.250977 10.5789H2.25098L2.25098 16.5788H0.250977ZM21.7511 10.5789V16.5788H23.7511V10.5789H21.7511ZM18.251 7.47888H3.25097V18.9789C3.25097 20.3596 4.37026 21.4789 5.75097 21.4789H18.251C19.6317 21.4789 20.751 20.3596 20.751 18.9789V9.97887C20.751 8.59816 19.6317 7.47888 18.251 7.47888ZM9.78434 11.9539V15.2038C9.78434 15.7561 9.33663 16.2038 8.78434 16.2038C8.23206 16.2038 7.78434 15.7561 7.78434 15.2038V11.9539C7.78434 11.4016 8.23206 10.9539 8.78434 10.9539C9.33663 10.9539 9.78434 11.4016 9.78434 11.9539ZM16.2677 11.9539V15.2038C16.2677 15.7561 15.82 16.2038 15.2677 16.2038C14.7154 16.2038 14.2677 15.7561 14.2677 15.2038V11.9539C14.2677 11.4016 14.7154 10.9539 15.2677 10.9539C15.82 10.9539 16.2677 11.4016 16.2677 11.9539Z", fill: "#0D0D0D" }));
1802
- function yt({ id: e, src: t, size: n = 56, onClick: o, style: i }) {
1803
- return /* @__PURE__ */ r.createElement(Gi, { id: e, tabIndex: 0, onClick: o, $size: se(n), style: i }, t ? /* @__PURE__ */ r.createElement(ji, { src: t }) : /* @__PURE__ */ r.createElement($, { type: "user", size: n }));
1812
+ const yt = (e) => /* @__PURE__ */ r.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.0008 0.973633C10.6172 0.973633 9.49558 2.09527 9.49558 3.47888C9.49558 4.50705 10.115 5.39055 11.0009 5.77664V7.47887H13.0009V5.77653C13.8868 5.3904 14.5061 4.50696 14.5061 3.47888C14.5061 2.09527 13.3844 0.973633 12.0008 0.973633ZM0.250977 16.5788L0.250977 10.5789H2.25098L2.25098 16.5788H0.250977ZM21.7511 10.5789V16.5788H23.7511V10.5789H21.7511ZM18.251 7.47888H3.25097V18.9789C3.25097 20.3596 4.37026 21.4789 5.75097 21.4789H18.251C19.6317 21.4789 20.751 20.3596 20.751 18.9789V9.97887C20.751 8.59816 19.6317 7.47888 18.251 7.47888ZM9.78434 11.9539V15.2038C9.78434 15.7561 9.33663 16.2038 8.78434 16.2038C8.23206 16.2038 7.78434 15.7561 7.78434 15.2038V11.9539C7.78434 11.4016 8.23206 10.9539 8.78434 10.9539C9.33663 10.9539 9.78434 11.4016 9.78434 11.9539ZM16.2677 11.9539V15.2038C16.2677 15.7561 15.82 16.2038 15.2677 16.2038C14.7154 16.2038 14.2677 15.7561 14.2677 15.2038V11.9539C14.2677 11.4016 14.7154 10.9539 15.2677 10.9539C15.82 10.9539 16.2677 11.4016 16.2677 11.9539Z", fill: "#0D0D0D" }));
1813
+ function Ct({ id: e, src: t, size: n = 56, onClick: o, style: i }) {
1814
+ return /* @__PURE__ */ r.createElement(Zi, { id: e, tabIndex: 0, onClick: o, $size: se(n), style: i }, t ? /* @__PURE__ */ r.createElement(Yi, { src: t }) : /* @__PURE__ */ r.createElement($, { type: "user", size: n }));
1804
1815
  }
1805
- const Gi = c.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${u.themedColor.bg_100_500};&:focus{outline:none;}`, ji = c.img`object-fit:cover;width:100%;height:100%;position:absolute;`;
1806
- function Ki({ sender: e, isBotMessage: t }) {
1816
+ const Zi = c.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${u.themedColor.bg_100_500};&:focus{outline:none;}`, Yi = c.img`object-fit:cover;width:100%;height:100%;position:absolute;`;
1817
+ function qi({ sender: e, isBotMessage: t }) {
1807
1818
  const n = `${ae}-sender-avatar`;
1808
- return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(Zi, { id: n }, /* @__PURE__ */ r.createElement(vt, null)) : /* @__PURE__ */ r.createElement(yt, { id: n, size: je, src: e.profileUrl });
1819
+ return !e.profileUrl && t ? /* @__PURE__ */ r.createElement(Ji, { id: n }, /* @__PURE__ */ r.createElement(yt, null)) : /* @__PURE__ */ r.createElement(Ct, { id: n, size: je, src: e.profileUrl });
1809
1820
  }
1810
- const Zi = c.div`flex-shrink:0;width:${je}px;height:${je}px;box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary};path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}}`;
1811
- function Yi({ sender: e }) {
1812
- return /* @__PURE__ */ r.createElement(qi, { id: `${ae}-sender-name`, variant: "caption1", color: u.themedColor.textMidEmphasis }, e.nickname);
1821
+ const Ji = c.div`flex-shrink:0;width:${je}px;height:${je}px;box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary};path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}}`;
1822
+ function Xi({ sender: e }) {
1823
+ return /* @__PURE__ */ r.createElement(Qi, { id: `${ae}-sender-name`, variant: "caption1", color: u.themedColor.textMidEmphasis }, e.nickname);
1813
1824
  }
1814
- const qi = c(S)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`;
1815
- function Ji({ createdAt: e }) {
1825
+ const Qi = c(S)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`;
1826
+ function es({ createdAt: e }) {
1816
1827
  const { stringSet: t, format: n } = M();
1817
1828
  return e ? /* @__PURE__ */ r.createElement(S, { id: `${ae}-sent-time`, variant: "caption4", color: u.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
1818
1829
  }
1819
- function Xi({ customStyle: e }) {
1820
- return /* @__PURE__ */ r.createElement(Qi, { $bgColor: e == null ? void 0 : e.bubbleBackgroundColor }, [0, 1, 2].map((t) => /* @__PURE__ */ r.createElement(es, { key: t, $color: e == null ? void 0 : e.bubbleContentColor })));
1830
+ function ts({ customStyle: e }) {
1831
+ return /* @__PURE__ */ r.createElement(ns, { $bgColor: e == null ? void 0 : e.bubbleBackgroundColor }, [0, 1, 2].map((t) => /* @__PURE__ */ r.createElement(rs, { key: t, $color: e == null ? void 0 : e.bubbleContentColor })));
1821
1832
  }
1822
- const Qi = c.div`align-items:center;border-radius:12px;display:flex;gap:6px;justify-content:center;padding:16px 12px;background-color:${({ theme: e, $bgColor: t }) => t || e.colors.messageIncoming.background};`, es = c.span`animation:blink 1.4s infinite;animation-fill-mode:both;border-radius:50%;height:8px;width:8px;background:${({ theme: e, $color: t }) => t || e.colors.messageIncoming.text};@keyframes blink{0%{opacity:0.12;transform:scale(1);}21.43%{opacity:0.38;transform:scale(1.2);}42.86%{opacity:0.12;transform:scale(1);}100%{opacity:0.12;transform:scale(1);}}&:nth-child(1){animation-delay:0.4s;}&:nth-child(2){animation-delay:0.6s;}&:nth-child(3){animation-delay:0.8s;}`;
1823
- function ts({
1833
+ const ns = c.div`align-items:center;border-radius:12px;display:flex;gap:6px;justify-content:center;padding:16px 12px;background-color:${({ theme: e, $bgColor: t }) => t || e.colors.messageIncoming.background};`, rs = c.span`animation:blink 1.4s infinite;animation-fill-mode:both;border-radius:50%;height:8px;width:8px;background:${({ theme: e, $color: t }) => t || e.colors.messageIncoming.text};@keyframes blink{0%{opacity:0.12;transform:scale(1);}21.43%{opacity:0.38;transform:scale(1.2);}42.86%{opacity:0.12;transform:scale(1);}100%{opacity:0.12;transform:scale(1);}}&:nth-child(1){animation-delay:0.4s;}&:nth-child(2){animation-delay:0.6s;}&:nth-child(3){animation-delay:0.8s;}`;
1834
+ function os({
1824
1835
  extendedMessagePayload: e,
1825
- onClickCTA: t = ({ url: n }) => On(n)
1836
+ onClickCTA: t = ({ url: n }) => Ln(n)
1826
1837
  }) {
1827
1838
  const n = e == null ? void 0 : e.cta_button;
1828
- return n ? /* @__PURE__ */ r.createElement(ns, { id: `${ae}-ext-cta-button`, role: "button", onClick: () => t(n) }, /* @__PURE__ */ r.createElement(rs, { variant: "button" }, n.label)) : null;
1839
+ return n ? /* @__PURE__ */ r.createElement(is, { id: `${ae}-ext-cta-button`, role: "button", onClick: () => t(n) }, /* @__PURE__ */ r.createElement(ss, { variant: "button" }, n.label)) : null;
1829
1840
  }
1830
- const ns = c.div`display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;padding:8px;background-color:${u.color.primary.main};color:${({ theme: e }) => e.colors.base.primaryContrastContent};&:hover{background-color:${u.color.primary.dark};}`, rs = c(S)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`;
1831
- function os(e) {
1841
+ const is = c.div`display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:6px;padding:8px;background-color:${u.color.primary.main};color:${({ theme: e }) => e.colors.base.primaryContrastContent};&:hover{background-color:${u.color.primary.dark};}`, ss = c(S)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`;
1842
+ function as(e) {
1832
1843
  return /* @__PURE__ */ r.createElement(r.Fragment, null);
1833
1844
  }
1834
- class is extends ur {
1845
+ class ls extends gr {
1835
1846
  constructor(t) {
1836
1847
  super(t), this.state = {
1837
1848
  hasError: !1
@@ -1844,30 +1855,30 @@ class is extends ur {
1844
1855
  return this.state.hasError ? this.props.errorFallback : /* @__PURE__ */ r.createElement($e, { fallback: this.props.loadingFallback }, this.props.children);
1845
1856
  }
1846
1857
  }
1847
- const ss = /* @__PURE__ */ new Set(["default"]), { MessageTemplate: as } = Pr({
1848
- parser: Dr,
1849
- renderer: Nr,
1858
+ const cs = /* @__PURE__ */ new Set(["default"]), { MessageTemplate: ds } = Hr({
1859
+ parser: Pr,
1860
+ renderer: Br,
1850
1861
  Container: (e) => /* @__PURE__ */ r.createElement("div", { ...e })
1851
1862
  });
1852
- function ls(e) {
1863
+ function us(e) {
1853
1864
  return /* @__PURE__ */ r.createElement(
1854
- is,
1865
+ ls,
1855
1866
  {
1856
1867
  errorFallback: e.messageTemplateErrorFallback,
1857
1868
  loadingFallback: e.messageTemplateLoadingFallback
1858
1869
  },
1859
- /* @__PURE__ */ r.createElement(cs, { ...e })
1870
+ /* @__PURE__ */ r.createElement(ms, { ...e })
1860
1871
  );
1861
1872
  }
1862
- const cs = ({
1873
+ const ms = ({
1863
1874
  extendedMessagePayload: e,
1864
1875
  onGetCachedMessageTemplate: t = () => null,
1865
1876
  onRequestMessageTemplate: n
1866
1877
  }) => {
1867
1878
  const o = e == null ? void 0 : e.message_template;
1868
- if (!ss.has((o == null ? void 0 : o.type) ?? "default")) throw new Error("Unsupported template type");
1879
+ if (!cs.has((o == null ? void 0 : o.type) ?? "default")) throw new Error("Unsupported template type");
1869
1880
  if (!n) throw new Error("onRequestMessageTemplate is required");
1870
- const { theme: s } = Go(), a = Mo({
1881
+ const { theme: s } = Zo(), a = Ro({
1871
1882
  onRequestTemplate: n,
1872
1883
  onGetCachedTemplate: t,
1873
1884
  theme: s.selectedTheme,
@@ -1876,16 +1887,16 @@ const cs = ({
1876
1887
  viewVariables: o == null ? void 0 : o.view_variables,
1877
1888
  aiAgentColorVariables: s.aiAgentColorVariables
1878
1889
  });
1879
- return /* @__PURE__ */ r.createElement(ds, { id: `${ae}-ext-message-template` }, /* @__PURE__ */ r.createElement(Br, { message: {} }, /* @__PURE__ */ r.createElement(as, { templateItems: a.body.items, templateVersion: a.version })));
1880
- }, ds = c.div`box-sizing:border-box;overflow:hidden;width:100%;`;
1881
- function us({
1890
+ return /* @__PURE__ */ r.createElement(gs, { id: `${ae}-ext-message-template` }, /* @__PURE__ */ r.createElement(Fr, { message: {} }, /* @__PURE__ */ r.createElement(ds, { templateItems: a.body.items, templateVersion: a.version })));
1891
+ }, gs = c.div`box-sizing:border-box;overflow:hidden;width:100%;`;
1892
+ function ps({
1882
1893
  extendedMessagePayload: e,
1883
1894
  onClickSuggestedReply: t,
1884
1895
  suggestedRepliesDirection: n = "vertical"
1885
1896
  }) {
1886
- const [o, i] = C(!1), s = (e == null ? void 0 : e.suggested_replies) ?? [];
1887
- return s.length === 0 || o ? null : /* @__PURE__ */ r.createElement(ms, { id: `${ae}-ext-suggested-replies`, $type: n }, s.map((a, l) => /* @__PURE__ */ r.createElement(
1888
- gs,
1897
+ const [o, i] = T(!1), s = (e == null ? void 0 : e.suggested_replies) ?? [];
1898
+ return s.length === 0 || o ? null : /* @__PURE__ */ r.createElement(hs, { id: `${ae}-ext-suggested-replies`, $type: n }, s.map((a, l) => /* @__PURE__ */ r.createElement(
1899
+ fs,
1889
1900
  {
1890
1901
  key: l,
1891
1902
  $type: n,
@@ -1897,38 +1908,38 @@ function us({
1897
1908
  a
1898
1909
  )));
1899
1910
  }
1900
- const ms = c.div`margin:16px 0;padding:0 ${Q}px;position:relative;display:flex;gap:8px;${({ $type: e }) => e === "vertical" ? ps : hs};`, gs = c(S)`box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;border-radius:100px;cursor:pointer;word-break:break-word;color:${u.color.primary.main};border:1px solid ${u.color.primary.main};background-color:${u.themedColor.bg_50_600};&:hover{background-color:${u.themedColor.bg_100_500};}${({ $type: e, theme: t }) => k`
1901
- ${e === "vertical" ? fs : bs};
1911
+ const hs = c.div`margin:16px 0;padding:0 ${Q}px;position:relative;display:flex;gap:8px;${({ $type: e }) => e === "vertical" ? bs : xs};`, fs = c(S)`box-sizing:border-box;padding:8px 12px;display:flex;align-items:center;border-radius:20px / clamp(20px,5%,100px);cursor:pointer;word-break:break-word;color:${u.color.primary.main};border:1px solid ${u.color.primary.main};background-color:${u.themedColor.bg_50_600};&:hover{background-color:${u.themedColor.bg_100_500};}${({ $type: e, theme: t }) => k`
1912
+ ${e === "vertical" ? Es : vs};
1902
1913
  &:active {
1903
1914
  background-color: ${t.colors.base.primary};
1904
1915
  color: ${t.colors.base.primaryContrastContent};
1905
1916
  }
1906
1917
  `}
1907
- `, ps = k`flex-direction:column;align-items:flex-end;`, hs = k`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, fs = k`max-width:calc(100% - 70px);white-space:pre-wrap;`, bs = k`white-space:nowrap;`;
1908
- function Ct(e) {
1918
+ `, bs = k`flex-direction:column;align-items:flex-end;`, xs = k`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, Es = k`max-width:calc(100% - 70px);white-space:pre-wrap;`, vs = k`white-space:nowrap;`;
1919
+ function Tt(e) {
1909
1920
  return e();
1910
1921
  }
1911
1922
  const ve = Ce({
1912
- template: xs,
1923
+ template: ys,
1913
1924
  components: {
1914
- SenderName: Yi,
1915
- SenderAvatar: Ki,
1916
- SentTime: Ji,
1917
- MessageBody: Vi,
1918
- TypingIndicator: Xi,
1919
- SuggestedReplies: us,
1920
- MessageTemplate: ls,
1921
- CTAButton: ts,
1922
- MessageLogs: os
1925
+ SenderName: Xi,
1926
+ SenderAvatar: qi,
1927
+ SentTime: es,
1928
+ MessageBody: Ki,
1929
+ TypingIndicator: ts,
1930
+ SuggestedReplies: ps,
1931
+ MessageTemplate: us,
1932
+ CTAButton: os,
1933
+ MessageLogs: as
1923
1934
  }
1924
1935
  });
1925
- function xs(e) {
1926
- return /* @__PURE__ */ r.createElement(Fn, { ...e, testerMode: !1 });
1936
+ function ys(e) {
1937
+ return /* @__PURE__ */ r.createElement(Un, { ...e, testerMode: !1 });
1927
1938
  }
1928
- function Fn(e) {
1939
+ function Un(e) {
1929
1940
  var p, h, b, x;
1930
- const { components: t } = ve.useContext(), n = !!e.isTyping, o = e.testerMode, i = !!((p = e.extendedMessagePayload) != null && p.message_template), s = !!((h = e.extendedMessagePayload) != null && h.cta_button), a = !!e.createdAt, l = Ct(() => e.messageType === "user" ? e.message.length > 0 : !0), d = e.groupType === "top" || e.groupType === "single", g = e.groupType === "bottom" || e.groupType === "single", m = o ? 0 : je;
1931
- return /* @__PURE__ */ r.createElement(Es, { $marginBottom: n ? 0 : bt(e.groupType) }, d && /* @__PURE__ */ r.createElement(vs, null, !o && /* @__PURE__ */ r.createElement(t.SenderAvatar, { ...e }), /* @__PURE__ */ r.createElement(t.SenderName, { ...e })), /* @__PURE__ */ r.createElement(Lt, null, /* @__PURE__ */ r.createElement(nt, { $extraStartPadding: m }, n && /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }), /* @__PURE__ */ r.createElement(t.MessageBody, { ...e }, s && /* @__PURE__ */ r.createElement("div", { style: { marginTop: 12, marginInline: 12 } }, /* @__PURE__ */ r.createElement(t.CTAButton, { ...e })))), i && /* @__PURE__ */ r.createElement(Gt, { $startPadding: 0, $endPadding: 0, style: { marginTop: l ? Te : 0 } }, /* @__PURE__ */ r.createElement(
1941
+ const { components: t } = ve.useContext(), n = !!e.isTyping, o = e.testerMode, i = !!((p = e.extendedMessagePayload) != null && p.message_template), s = !!((h = e.extendedMessagePayload) != null && h.cta_button), a = !!e.createdAt, l = Tt(() => e.messageType === "user" ? e.message.length > 0 : !0), d = e.groupType === "top" || e.groupType === "single", g = e.groupType === "bottom" || e.groupType === "single", m = o ? 0 : je;
1942
+ return /* @__PURE__ */ r.createElement(Cs, { $marginBottom: n ? 0 : xt(e.groupType) }, d && /* @__PURE__ */ r.createElement(Ts, null, !o && /* @__PURE__ */ r.createElement(t.SenderAvatar, { ...e }), /* @__PURE__ */ r.createElement(t.SenderName, { ...e })), /* @__PURE__ */ r.createElement(Rt, null, /* @__PURE__ */ r.createElement(nt, { $extraStartPadding: m }, n && /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }), /* @__PURE__ */ r.createElement(t.MessageBody, { ...e }, s && /* @__PURE__ */ r.createElement("div", { style: { marginTop: 12, marginInline: 12 } }, /* @__PURE__ */ r.createElement(t.CTAButton, { ...e })))), i && /* @__PURE__ */ r.createElement(jt, { $startPadding: 0, $endPadding: 0, style: { marginTop: l ? Te : 0 } }, /* @__PURE__ */ r.createElement(
1932
1943
  t.MessageTemplate,
1933
1944
  {
1934
1945
  ...e,
@@ -1942,71 +1953,71 @@ function Fn(e) {
1942
1953
  )),
1943
1954
  messageTemplateLoadingFallback: e.messageTemplateLoadingFallback ?? /* @__PURE__ */ r.createElement(nt, { $extraStartPadding: m }, /* @__PURE__ */ r.createElement(t.TypingIndicator, { ...e }))
1944
1955
  }
1945
- ))), g && a && /* @__PURE__ */ r.createElement(ys, { $extraStartPadding: m + 8 }, /* @__PURE__ */ r.createElement(t.SentTime, { ...e })), /* @__PURE__ */ r.createElement(Lt, null, e.suggestedRepliesVisible && /* @__PURE__ */ r.createElement(Gt, null, /* @__PURE__ */ r.createElement(t.SuggestedReplies, { ...e })), /* @__PURE__ */ r.createElement(t.MessageLogs, { ...e })));
1956
+ ))), g && a && /* @__PURE__ */ r.createElement(_s, { $extraStartPadding: m + 8 }, /* @__PURE__ */ r.createElement(t.SentTime, { ...e })), /* @__PURE__ */ r.createElement(Rt, null, e.suggestedRepliesVisible && /* @__PURE__ */ r.createElement(jt, null, /* @__PURE__ */ r.createElement(t.SuggestedReplies, { ...e })), /* @__PURE__ */ r.createElement(t.MessageLogs, { ...e })));
1946
1957
  }
1947
- const Es = c.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
1958
+ const Cs = c.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
1948
1959
  `, Je = c.div`display:flex;align-self:stretch;justify-content:flex-start;${({ $startPadding: e = Q, $endPadding: t = Q, $extraStartPadding: n = 0 }) => `
1949
1960
  padding-inline: ${e + n}px ${t}px;
1950
1961
  `}
1951
- `, vs = c(Je)`display:flex;flex-direction:row;align-items:center;gap:8px;`, nt = c(Je)`display:flex;`, ys = c(Je)`margin-top:${Dn}px;display:flex;align-items:flex-start;justify-content:flex-start;`, Gt = c(Je)`display:flex;flex-direction:column;${({ $startPadding: e = Q, $endPadding: t = Q, $extraStartPadding: n = 0 }) => `
1962
+ `, Ts = c(Je)`display:flex;flex-direction:row;align-items:center;gap:8px;`, nt = c(Je)`display:flex;`, _s = c(Je)`margin-top:${Pn}px;display:flex;align-items:flex-start;justify-content:flex-start;`, jt = c(Je)`display:flex;flex-direction:column;${({ $startPadding: e = Q, $endPadding: t = Q, $extraStartPadding: n = 0 }) => `
1952
1963
  padding-inline: ${e + n}px ${t}px;
1953
1964
  `}
1954
1965
  `;
1955
- function Cs({ file: e, children: t, onClickFile: n }) {
1956
- return /* @__PURE__ */ r.createElement(Ts, null, /* @__PURE__ */ r.createElement(
1957
- Et,
1966
+ function Ss({ file: e, children: t, onClickFile: n }) {
1967
+ return /* @__PURE__ */ r.createElement(ws, null, /* @__PURE__ */ r.createElement(
1968
+ vt,
1958
1969
  {
1959
1970
  name: e.name,
1960
- type: xt(e.name, e.type),
1971
+ type: Et(e.name, e.type),
1961
1972
  onClick: n && (() => n == null ? void 0 : n(e))
1962
1973
  }
1963
1974
  ), t);
1964
1975
  }
1965
- const Ts = c.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, Hn = ({ className: e, children: t, size: n = 26 }) => /* @__PURE__ */ r.createElement(_s, { className: e, $size: n }, t ?? /* @__PURE__ */ r.createElement($, { type: "spinner", size: n })), _s = c.div`display:flex;align-items:center;justify-content:center;width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};animation:1s infinite linear;animation-name:rotate;@keyframes rotate{from{transform:rotate(0);}to{transform:rotate(360deg);}}`;
1966
- function Ss({ file: e, metadata: t, onClickMedia: n, children: o }) {
1967
- const { aspectRatio: i, localFile: s } = t, [a] = C(() => s instanceof File ? URL.createObjectURL(s) : e.url), [l, d] = C(!1), g = {
1976
+ const ws = c.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, zn = ({ className: e, children: t, size: n = 26 }) => /* @__PURE__ */ r.createElement(ks, { className: e, $size: n }, t ?? /* @__PURE__ */ r.createElement($, { type: "spinner", size: n })), ks = c.div`display:flex;align-items:center;justify-content:center;width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};animation:1s infinite linear;animation-name:rotate;@keyframes rotate{from{transform:rotate(0);}to{transform:rotate(360deg);}}`;
1977
+ function As({ file: e, metadata: t, onClickMedia: n, children: o }) {
1978
+ const { aspectRatio: i, localFile: s } = t, [a] = T(() => s instanceof File ? URL.createObjectURL(s) : e.url), [l, d] = T(!1), g = {
1968
1979
  onClick: () => n == null ? void 0 : n(e),
1969
1980
  $ratio: i
1970
1981
  };
1971
- return /* @__PURE__ */ r.createElement(ws, null, /* @__PURE__ */ r.createElement(ks, { ...g }, !l && /* @__PURE__ */ r.createElement(Hn, { size: 26 }, /* @__PURE__ */ r.createElement($, { type: "spinner", color: "textLowEmphasis", size: 26 })), /* @__PURE__ */ r.createElement(As, { $loaded: l, src: a, alt: "image-message", onLoad: () => d(!0) })), o);
1982
+ return /* @__PURE__ */ r.createElement(Is, null, /* @__PURE__ */ r.createElement($s, { ...g }, !l && /* @__PURE__ */ r.createElement(zn, { size: 26 }, /* @__PURE__ */ r.createElement($, { type: "spinner", color: "textLowEmphasis", size: 26 })), /* @__PURE__ */ r.createElement(Ms, { $loaded: l, src: a, alt: "image-message", onLoad: () => d(!0) })), o);
1972
1983
  }
1973
- const ws = c.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, ks = c.div`width:${Re}px;border-radius:12px;overflow:hidden;cursor:pointer;height:auto;aspect-ratio:${(e) => e.$ratio};position:relative;display:flex;align-items:center;justify-content:center;${B.light`
1984
+ const Is = c.div`display:flex;flex-direction:column;align-items:flex-end;gap:${Te}px;`, $s = c.div`width:${Re}px;border-radius:12px;overflow:hidden;cursor:pointer;height:auto;aspect-ratio:${(e) => e.$ratio};position:relative;display:flex;align-items:center;justify-content:center;${B.light`
1974
1985
  background-color: ${u.color.background100};
1975
1986
  `}
1976
1987
  ${B.dark`
1977
1988
  background-color: ${u.color.background400};
1978
1989
  `}
1979
- `, As = c.img`position:absolute;width:100%;height:100%;inset-block-start:0;inset-inline-start:0;object-fit:cover;opacity:${(e) => e.$loaded ? 1 : 0};transition:opacity 0.5s ease;`;
1980
- function jt(e) {
1990
+ `, Ms = c.img`position:absolute;width:100%;height:100%;inset-block-start:0;inset-inline-start:0;object-fit:cover;opacity:${(e) => e.$loaded ? 1 : 0};transition:opacity 0.5s ease;`;
1991
+ function Kt(e) {
1981
1992
  var n, o;
1982
- const t = Ie(() => fn.sanitize(Pn(e.message)), [e.message]);
1993
+ const t = Ie(() => bn.sanitize(Hn(e.message)), [e.message]);
1983
1994
  return /* @__PURE__ */ r.createElement(
1984
- Is,
1995
+ Os,
1985
1996
  {
1986
1997
  $maxWidth: e.maxBodyWidth ?? Re,
1987
1998
  $color: (n = e.customStyle) == null ? void 0 : n.bubbleContentColor,
1988
1999
  $bgColor: (o = e.customStyle) == null ? void 0 : o.bubbleBackgroundColor
1989
2000
  },
1990
- /* @__PURE__ */ r.createElement($s, { variant: "body3", dangerouslySetInnerHTML: { __html: t } })
2001
+ /* @__PURE__ */ r.createElement(Ls, { variant: "body3", dangerouslySetInnerHTML: { __html: t } })
1991
2002
  );
1992
2003
  }
1993
- const Is = c.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => k`
2004
+ const Os = c.div`display:flex;flex-direction:column;border-radius:12px;overflow:hidden;max-width:${({ $maxWidth: e }) => e}px;${({ theme: e, $color: t, $bgColor: n }) => k`
1994
2005
  color: ${t || e.colors.messageOutgoing.text};
1995
2006
  background-color: ${n || e.colors.messageOutgoing.background};
1996
2007
  `}
1997
2008
  padding: 12px 0;
1998
2009
  transition: max-width 0.3s;
1999
2010
  overflow-wrap: break-word;
2000
- `, $s = c(S)`align-items:flex-start;line-height:18px;white-space:pre-wrap;padding:0 12px;`;
2001
- function Ms(e) {
2002
- const { stringSet: t } = M(), n = Bn(e) ? /* @__PURE__ */ r.createElement(jt, { ...e }) : null;
2003
- return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(Ss, { ...e }, n) : /* @__PURE__ */ r.createElement(Cs, { ...e }, n) : /* @__PURE__ */ r.createElement(jt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
2011
+ `, Ls = c(S)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
2012
+ function Rs(e) {
2013
+ const { stringSet: t } = M(), n = Fn(e) ? /* @__PURE__ */ r.createElement(Kt, { ...e }) : null;
2014
+ return e.messageType === "user" ? n : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ r.createElement(As, { ...e }, n) : /* @__PURE__ */ r.createElement(Ss, { ...e }, n) : /* @__PURE__ */ r.createElement(Kt, { ...e, message: t.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
2004
2015
  }
2005
- function Os({ sendingStatus: e }) {
2006
- const t = ut();
2016
+ function Ns({ sendingStatus: e }) {
2017
+ const t = mt();
2007
2018
  switch (e) {
2008
2019
  case "pending":
2009
- return /* @__PURE__ */ r.createElement(Ls, { size: 16 }, /* @__PURE__ */ r.createElement($, { type: "spinner", color: t.colors.messageOutgoing.background, size: 16 }));
2020
+ return /* @__PURE__ */ r.createElement(Ds, { size: 16 }, /* @__PURE__ */ r.createElement($, { type: "spinner", color: t.colors.messageOutgoing.background, size: 16 }));
2010
2021
  case "failed":
2011
2022
  return /* @__PURE__ */ r.createElement("div", { style: { marginBottom: 2 } }, /* @__PURE__ */ r.createElement($, { type: "error", color: u.themedColor.error, size: 16 }));
2012
2023
  case "scheduled":
@@ -2016,41 +2027,41 @@ function Os({ sendingStatus: e }) {
2016
2027
  return /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement($, { type: "chevron-down" }));
2017
2028
  }
2018
2029
  }
2019
- const Ls = c(Hn)`margin-bottom:2px;width:16px;height:16px;`;
2020
- function Rs({ createdAt: e }) {
2030
+ const Ds = c(zn)`margin-bottom:2px;width:16px;height:16px;`;
2031
+ function Bs({ createdAt: e }) {
2021
2032
  const { stringSet: t, format: n } = M();
2022
2033
  return e ? /* @__PURE__ */ r.createElement(S, { variant: "caption4", color: u.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
2023
2034
  }
2024
- const Tt = Ce({
2025
- template: Ns,
2035
+ const _t = Ce({
2036
+ template: Ps,
2026
2037
  components: {
2027
- SendingStatus: Os,
2028
- SentTime: Rs,
2029
- MessageBody: Ms
2038
+ SendingStatus: Ns,
2039
+ SentTime: Bs,
2040
+ MessageBody: Rs
2030
2041
  }
2031
2042
  });
2032
- function Ns(e) {
2033
- const { components: t } = Tt.useContext(), n = e.sendingStatus === "succeeded", o = e.groupType === "bottom" || e.groupType === "single";
2034
- return /* @__PURE__ */ r.createElement(Ds, { $marginBottom: bt(e.groupType) }, /* @__PURE__ */ r.createElement(Bs, null, /* @__PURE__ */ r.createElement(t.MessageBody, { ...e })), o && /* @__PURE__ */ r.createElement(Ps, { $extraEndPadding: 8 }, n ? /* @__PURE__ */ r.createElement(t.SentTime, { ...e }) : /* @__PURE__ */ r.createElement(t.SendingStatus, { ...e })));
2043
+ function Ps(e) {
2044
+ const { components: t } = _t.useContext(), n = e.sendingStatus === "succeeded", o = e.groupType === "bottom" || e.groupType === "single";
2045
+ return /* @__PURE__ */ r.createElement(Fs, { $marginBottom: xt(e.groupType) }, /* @__PURE__ */ r.createElement(Hs, null, /* @__PURE__ */ r.createElement(t.MessageBody, { ...e })), o && /* @__PURE__ */ r.createElement(Us, { $extraEndPadding: 8 }, n ? /* @__PURE__ */ r.createElement(t.SentTime, { ...e }) : /* @__PURE__ */ r.createElement(t.SendingStatus, { ...e })));
2035
2046
  }
2036
- const Ds = c.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2037
- `, Un = c.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = Q, $endPadding: t = Q, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
2038
- `, Bs = c(Un)``, Ps = c(Un)`margin-top:${Dn}px;`;
2039
- function Fs(e) {
2040
- return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(Hs, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, Us(fn.sanitize(e.message))));
2047
+ const Fs = c.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
2048
+ `, Wn = c.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = Q, $endPadding: t = Q, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
2049
+ `, Hs = c(Wn)``, Us = c(Wn)`margin-top:${Pn}px;`;
2050
+ function zs(e) {
2051
+ return e.messageType !== "admin" ? null : /* @__PURE__ */ r.createElement(Ws, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, Vs(bn.sanitize(e.message))));
2041
2052
  }
2042
- const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color:inherit;}`, Us = (e) => {
2053
+ const Ws = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color:inherit;}`, Vs = (e) => {
2043
2054
  const t = /\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, n = [];
2044
2055
  let o = 0;
2045
2056
  return e.replace(t, (i, s, a, l) => (n.push(e.slice(o, l)), n.push(
2046
- /* @__PURE__ */ r.createElement("a", { key: a, href: a, target: "_blank", rel: ht }, s)
2057
+ /* @__PURE__ */ r.createElement("a", { key: a, href: a, target: "_blank", rel: ft }, s)
2047
2058
  ), o = l + i.length, i)), n.push(e.slice(o)), n;
2048
- }, zs = ({ submitted: e, defaultValue: t, value: n, onChange: o }) => {
2059
+ }, Gs = ({ submitted: e, defaultValue: t, value: n, onChange: o }) => {
2049
2060
  const { stringSet: i } = M();
2050
2061
  return R(() => {
2051
2062
  typeof n > "u" && typeof t == "boolean" && (o == null || o(t));
2052
- }, [n, t]), /* @__PURE__ */ r.createElement(Ws, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, i.CSAT_CRE_TITLE), /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
2053
- Kt,
2063
+ }, [n, t]), /* @__PURE__ */ r.createElement(js, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, i.CSAT_CRE_TITLE), /* @__PURE__ */ r.createElement("div", null, /* @__PURE__ */ r.createElement(
2064
+ Zt,
2054
2065
  {
2055
2066
  checked: n === !0,
2056
2067
  label: i.CSAT_CRE_SOLVED,
@@ -2058,7 +2069,7 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2058
2069
  onClick: () => o == null ? void 0 : o(!0)
2059
2070
  }
2060
2071
  ), /* @__PURE__ */ r.createElement(
2061
- Kt,
2072
+ Zt,
2062
2073
  {
2063
2074
  checked: n === !1,
2064
2075
  label: i.CSAT_CRE_NOT_SOLVED,
@@ -2066,17 +2077,17 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2066
2077
  onClick: () => o == null ? void 0 : o(!1)
2067
2078
  }
2068
2079
  )));
2069
- }, Kt = ({ onClick: e, checked: t, label: n, disabled: o }) => {
2080
+ }, Zt = ({ onClick: e, checked: t, label: n, disabled: o }) => {
2070
2081
  const i = t ? u.color.primary.main : o ? u.themedColor.textDisabled : u.themedColor.textLowEmphasis, s = t ? u.themedColor.textHighEmphasis : o ? u.themedColor.textLowEmphasis : u.themedColor.textHighEmphasis;
2071
- return /* @__PURE__ */ r.createElement(Vs, { onClick: e, disabled: o }, /* @__PURE__ */ r.createElement($, { size: 24, type: t ? "radio-on" : "radio-off", color: i }), /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: s }, n));
2072
- }, Ws = c.div`display:flex;flex-direction:column;gap:8px;`, Vs = c.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, Gs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), js = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), Ks = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Zs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), Ys = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), qs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), Js = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), Xs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), Qs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ea = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
2082
+ return /* @__PURE__ */ r.createElement(Ks, { onClick: e, disabled: o }, /* @__PURE__ */ r.createElement($, { size: 24, type: t ? "radio-on" : "radio-off", color: i }), /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: s }, n));
2083
+ }, js = c.div`display:flex;flex-direction:column;gap:8px;`, Ks = c.button`all:unset;display:flex;align-items:center;justify-content:flex-start;gap:2px;span{line-height:initial;}&:enabled{cursor:pointer;}`, Zs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", id: "csat1", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08301 20C2.08301 10.1049 10.1046 2.08334 19.9997 2.08334C29.8948 2.08334 37.9163 10.1049 37.9163 20C37.9163 29.8952 29.8948 37.9167 19.9997 37.9167C10.1046 37.9167 2.08301 29.8952 2.08301 20Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5824 29.3328C13.1344 29.7473 13.918 29.636 14.3326 29.084C15.6269 27.3607 17.6835 26.25 19.9997 26.25C22.316 26.25 24.3727 27.3607 25.6668 29.084C26.0815 29.636 26.865 29.7473 27.4172 29.3328C27.9692 28.9182 28.0805 28.1347 27.6658 27.5825C25.9198 25.2577 23.1357 23.75 19.9997 23.75C16.8638 23.75 14.0797 25.2577 12.3336 27.5825C11.919 28.1347 12.0304 28.9182 12.5824 29.3328Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M28.4449 13.7707C29.1324 13.8328 29.64 14.4406 29.578 15.1281C29.516 15.8153 28.909 16.3221 28.2219 16.2608C28.2219 16.2608 28.0282 16.2502 27.9267 16.2487C27.7224 16.2457 27.4382 16.2509 27.1224 16.2833C26.7864 16.3177 26.4644 16.3782 26.1799 16.4662L26.304 16.86C26.7792 18.3675 25.5094 19.5813 24.2057 19.5813C23.504 19.5813 22.8319 19.2617 22.4295 18.6857C22.0025 18.0745 21.9417 17.241 22.4075 16.5344C22.7505 16.0143 23.2444 15.3831 23.8959 14.8657C24.8355 14.1195 26.0435 13.8809 26.867 13.7963C27.3024 13.7517 28.0149 13.7319 28.4449 13.7707Z", fill: "black", fillOpacity: 0.12 }), /* @__PURE__ */ r.createElement("path", { d: "M11.5553 13.7707C10.8677 13.8328 10.3601 14.4406 10.4221 15.1281C10.4842 15.8153 11.0912 16.3221 11.7782 16.2608C11.7782 16.2608 11.972 16.2502 12.0734 16.2487C12.2778 16.2457 12.562 16.2509 12.8778 16.2833C13.2137 16.3177 13.5357 16.3782 13.8203 16.4662L13.6962 16.86C13.2209 18.3675 14.4907 19.5813 15.7944 19.5813C16.4962 19.5813 17.1683 19.2617 17.5707 18.6857C17.9975 18.0745 18.0585 17.241 17.5925 16.5344C17.2497 16.0143 16.7557 15.3831 16.1043 14.8657C15.1646 14.1195 13.9566 13.8809 13.1331 13.7963C12.6978 13.7517 11.9853 13.7319 11.5553 13.7707Z", fill: "black", fillOpacity: 0.12 })), Ys = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.08337 19.9999C2.08337 10.1048 10.1049 2.08325 20 2.08325C29.8952 2.08325 37.9167 10.1048 37.9167 19.9999C37.9167 29.8951 29.8952 37.9166 20 37.9166C10.1049 37.9166 2.08337 29.8951 2.08337 19.9999Z", fill: "url(#paint0_linear_159_173206)" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.5828 29.3328C13.1348 29.7473 13.9184 29.636 14.3329 29.084C15.6272 27.3607 17.6839 26.25 20 26.25C22.3164 26.25 24.373 27.3607 25.6672 29.084C26.0819 29.636 26.8654 29.7473 27.4175 29.3328C27.9695 28.9182 28.0809 28.1347 27.6662 27.5825C25.9202 25.2577 23.136 23.75 20 23.75C16.8642 23.75 14.0801 25.2577 12.334 27.5825C11.9194 28.1347 12.0308 28.9182 12.5828 29.3328Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M28.4454 13.7707C29.1329 13.8328 29.6405 14.4406 29.5785 15.1281C29.5165 15.8153 28.9095 16.3221 28.2224 16.2608C28.2224 16.2608 28.0287 16.2502 27.9272 16.2487C27.7229 16.2457 27.4387 16.2509 27.1229 16.2833C26.7869 16.3177 26.4649 16.3782 26.1804 16.4662L26.3045 16.86C26.7797 18.3675 25.5099 19.5813 24.2062 19.5813C23.5045 19.5813 22.8324 19.2617 22.43 18.6857C22.003 18.0745 21.9422 17.241 22.408 16.5344C22.751 16.0143 23.2449 15.3831 23.8964 14.8657C24.836 14.1195 26.044 13.8809 26.8675 13.7963C27.3029 13.7517 28.0154 13.7319 28.4454 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.5549 13.7707C10.8674 13.8328 10.3597 14.4406 10.4218 15.1281C10.4838 15.8153 11.0908 16.3221 11.7779 16.2608C11.7779 16.2608 11.9716 16.2502 12.073 16.2487C12.2774 16.2457 12.5616 16.2509 12.8774 16.2833C13.2134 16.3177 13.5353 16.3782 13.8199 16.4662L13.6958 16.86C13.2205 18.3675 14.4904 19.5813 15.794 19.5813C16.4958 19.5813 17.168 19.2617 17.5703 18.6857C17.9971 18.0745 18.0581 17.241 17.5921 16.5344C17.2493 16.0143 16.7553 15.3831 16.1039 14.8657C15.1643 14.1195 13.9562 13.8809 13.1327 13.7963C12.6974 13.7517 11.9849 13.7319 11.5549 13.7707Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("linearGradient", { id: "paint0_linear_159_173206", x1: 20, y1: 2.08325, x2: 20, y2: 37.9166, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ r.createElement("stop", { stopColor: "#FF2D1D" }), /* @__PURE__ */ r.createElement("stop", { offset: 1, stopColor: "#FFA540" })))), qs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M15 28.333C16.3927 27.2867 18.124 26.6667 20 26.6667C21.876 26.6667 23.6073 27.2867 25 28.333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 13.3511C11.667 13.3511 14.0161 13.139 15.3268 14.18M15.3268 14.18L14.8882 15.5711C14.7153 16.1199 15.1675 16.6667 15.7943 16.6667C16.4531 16.6667 16.8882 16.0723 16.549 15.5579C16.2483 15.102 15.8388 14.5866 15.3268 14.18ZM23.3337 13.3511C23.3337 13.3511 25.6827 13.139 26.9935 14.18M26.9935 14.18L26.555 15.5711C26.382 16.1199 26.8342 16.6667 27.461 16.6667C28.1198 16.6667 28.5548 16.0723 28.2157 15.5579C27.915 15.102 27.5055 14.5866 26.9935 14.18Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Js = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { d: "M14.249 27.334C15.851 26.13 17.844 25.417 20 25.417c2.156 0 4.149.714 5.751 1.917.553.415.664 1.199.25 1.751-.415.552-1.199.664-1.751.25-1.183-.889-2.652-1.416-4.25-1.416s-3.067.527-4.25 1.416c-.553.414-1.336.302-1.751-.25-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M23.445 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.125-.394c-.285-.088-.607-.148-.942-.182-.316-.033-.6-.038-.804-.035-.101.002-.242.01-.294.013Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { d: "M11.779 14.596c-.687.062-1.294-.445-1.356-1.132-.062-.687.445-1.295 1.132-1.357.082-.005.342-.02.482-.022.277-.004.662.002 1.097.047.823.085 2.031.323 2.97 1.07.652.518 1.146 1.15 1.489 1.67.466.706.405 1.54-.022 2.15-.402.576-1.074.896-1.775.896-1.304 0-2.573-1.214-2.098-2.722l.124-.394c-.284-.088-.606-.148-.941-.182-.316-.033-.6-.038-.804-.035-.101.002-.243.01-.294.013Z", fill: "#141B34" })), Xs = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M15 26.6667H25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), Qs = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.75 26.667c0-.691.56-1.25 1.25-1.25h10c.69 0 1.25.559 1.25 1.25 0 .691-.56 1.25-1.25 1.25h-10c-.69 0-1.25-.559-1.25-1.25Z", fill: "#141B34" })), ea = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6667C29.2044 36.6667 36.6663 29.2048 36.6663 20C36.6663 10.7953 29.2044 3.33334 19.9997 3.33334C10.7949 3.33334 3.33301 10.7953 3.33301 20C3.33301 29.2048 10.7949 36.6667 19.9997 36.6667Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M13.333 25C14.8532 27.024 17.2735 28.3333 19.9997 28.3333C22.7258 28.3333 25.1462 27.024 26.6663 25", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M13.348 15H13.333M26.6663 15H26.6513", stroke: "black", strokeOpacity: 0.12, strokeWidth: 3.33333, strokeLinecap: "round", strokeLinejoin: "round" })), ta = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.583 24.001c.552-.414 1.335-.302 1.75.25 1.294 1.723 3.35 2.834 5.667 2.834s4.373-1.11 5.667-2.834c.415-.552 1.199-.664 1.751-.25.552.415.664 1.199.25 1.751C25.92 28.076 23.136 29.584 20 29.584s-5.92-1.508-7.666-3.832c-.415-.552-.303-1.336.249-1.751Z", fill: "#141B34" }), /* @__PURE__ */ r.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.25 15c0-1.151.933-2.083 2.083-2.083h.015c1.151 0 2.084.933 2.084 2.083 0 1.151-.933 2.083-2.084 2.083h-.015c-1.15 0-2.083-.933-2.083-2.083ZM24.568 15c0-1.151.933-2.083 2.084-2.083h.015c1.151 0 2.083.933 2.083 2.083 0 1.151-.932 2.083-2.083 2.083h-.015c-1.151 0-2.084-.933-2.084-2.083Z", fill: "#141B34" })), na = (e) => /* @__PURE__ */ r.createElement("svg", { width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M19.9997 36.6663C29.2044 36.6663 36.6663 29.2044 36.6663 19.9997C36.6663 10.7949 29.2044 3.33301 19.9997 3.33301C10.7949 3.33301 3.33301 10.7949 3.33301 19.9997C3.33301 29.2044 10.7949 36.6663 19.9997 36.6663Z", fill: "#E0E0E0" }), /* @__PURE__ */ r.createElement("path", { d: "M19.9997 30C23.16 30 25.8145 27.867 26.56 24.9832C26.9068 23.6413 26.4033 23.3333 25.0765 23.3333H14.9228C13.5959 23.3333 13.0925 23.6413 13.4393 24.9832C14.1848 27.867 16.8393 30 19.9997 30Z", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.8333C11.667 14.4526 12.7863 13.3333 14.167 13.3333C15.5477 13.3333 16.667 14.4526 16.667 15.8333M23.3337 15.8333C23.3337 14.4526 24.453 13.3333 25.8337 13.3333C27.2143 13.3333 28.3337 14.4526 28.3337 15.8333", stroke: "black", strokeOpacity: 0.12, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), ra = (e) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 40, height: 40, viewBox: "0 0 40 40", fill: "none", ...e }, /* @__PURE__ */ r.createElement("path", { d: "M2.083 20C2.083 10.105 10.105 2.083 20 2.083c9.895 0 17.917 8.021 17.917 17.917 0 9.895-8.022 17.917-17.917 17.917C10.105 37.917 2.083 29.895 2.083 20Z", fill: "#FFD46E" }), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip0_159_173224)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#clip1_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("mask", { id: "mask0_159_173224", style: {
2073
2084
  maskType: "alpha"
2074
- }, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))), ta = [
2085
+ }, maskUnits: "userSpaceOnUse", x: 12, y: 22, width: 16, height: 9 }, /* @__PURE__ */ r.createElement("path", { d: "M20 30.624c3.752 0 6.904-2.532 7.789-5.956.412-1.593-.185-1.959-1.76-1.959H13.973c-1.575 0-2.173.366-1.761 1.959.885 3.424 4.037 5.956 7.788 5.956Z", fill: "#141B34" })), /* @__PURE__ */ r.createElement("g", { mask: "url(#mask0_159_173224)" }, /* @__PURE__ */ r.createElement("path", { d: "M20 32.998c3.278 0 5.936-1.594 5.936-3.561 0-1.968-2.658-3.562-5.936-3.562-3.278 0-5.936 1.594-5.936 3.562 0 1.967 2.658 3.561 5.936 3.561Z", fill: "#FF493B" }))), /* @__PURE__ */ r.createElement("path", { d: "M11.667 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5M23.333 15.833c0-1.381 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5", stroke: "#141B34", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("clipPath", { id: "clip0_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })), /* @__PURE__ */ r.createElement("clipPath", { id: "clip1_159_173224" }, /* @__PURE__ */ r.createElement("rect", { width: 15.83, height: 7.915, fill: "white", transform: "translate(12.085 22.709)" })))), oa = [
2075
2086
  {
2076
2087
  value: 1,
2077
2088
  Icon: {
2078
- Active: js,
2079
- Inactive: Gs
2089
+ Active: Ys,
2090
+ Inactive: Zs
2080
2091
  },
2081
2092
  isActive: (e) => e <= 1,
2082
2093
  getTooltip: (e) => e.CSAT5_RATING_SCORE_1
@@ -2084,8 +2095,8 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2084
2095
  {
2085
2096
  value: 2,
2086
2097
  Icon: {
2087
- Active: Zs,
2088
- Inactive: Ks
2098
+ Active: Js,
2099
+ Inactive: qs
2089
2100
  },
2090
2101
  isActive: (e) => e === 2,
2091
2102
  getTooltip: (e) => e.CSAT5_RATING_SCORE_2
@@ -2093,8 +2104,8 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2093
2104
  {
2094
2105
  value: 3,
2095
2106
  Icon: {
2096
- Active: qs,
2097
- Inactive: Ys
2107
+ Active: Qs,
2108
+ Inactive: Xs
2098
2109
  },
2099
2110
  isActive: (e) => e === 3,
2100
2111
  getTooltip: (e) => e.CSAT5_RATING_SCORE_3
@@ -2102,8 +2113,8 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2102
2113
  {
2103
2114
  value: 4,
2104
2115
  Icon: {
2105
- Active: Xs,
2106
- Inactive: Js
2116
+ Active: ta,
2117
+ Inactive: ea
2107
2118
  },
2108
2119
  isActive: (e) => e === 4,
2109
2120
  getTooltip: (e) => e.CSAT5_RATING_SCORE_4
@@ -2111,16 +2122,13 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2111
2122
  {
2112
2123
  value: 5,
2113
2124
  Icon: {
2114
- Active: ea,
2115
- Inactive: Qs
2125
+ Active: ra,
2126
+ Inactive: na
2116
2127
  },
2117
2128
  isActive: (e) => 5 <= e,
2118
2129
  getTooltip: (e) => e.CSAT5_RATING_SCORE_5
2119
2130
  }
2120
- ], na = () => ta, zn = ({ label: e, children: t, position: n = "top", disabled: o }) => {
2121
- const [i, s] = C(!1);
2122
- return o ? t : /* @__PURE__ */ r.createElement("div", { style: { position: "relative" }, onMouseEnter: () => s(!0), onMouseLeave: () => s(!1) }, t, /* @__PURE__ */ r.createElement(ia, { $visible: i, $position: n }, /* @__PURE__ */ r.createElement(sa, { variant: "caption1" }, e), /* @__PURE__ */ r.createElement(ra, { $position: n })));
2123
- }, ra = ({ $position: e }) => /* @__PURE__ */ r.createElement(
2131
+ ], ia = () => oa, Vn = ({ label: e, children: t, position: n = "top", disabled: o }) => o ? t : /* @__PURE__ */ r.createElement(ct, null, t, /* @__PURE__ */ r.createElement(la, { $position: n }, /* @__PURE__ */ r.createElement(ca, { variant: "caption1" }, e), /* @__PURE__ */ r.createElement(sa, { $position: n }))), sa = ({ $position: e }) => /* @__PURE__ */ r.createElement(
2124
2132
  "svg",
2125
2133
  {
2126
2134
  style: { transform: e === "top" ? "rotate(0)" : "rotate(180deg)" },
@@ -2131,13 +2139,13 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2131
2139
  fill: "none"
2132
2140
  },
2133
2141
  /* @__PURE__ */ r.createElement("path", { d: "M6 6L0 0h12L6 6Z", fill: u.themedColor.textHighEmphasis })
2134
- ), oa = {
2142
+ ), aa = {
2135
2143
  top: k`flex-direction:column;top:0;transform:translate(-50%,-100%);`,
2136
2144
  bottom: k`flex-direction:column-reverse;bottom:0;transform:translate(-50%,100%);`
2137
- }, ia = c.div`display:${({ $visible: e }) => e ? "flex" : "none"};align-items:center;position:absolute;left:50%;z-index:${he.TOOLTIP};${({ $position: e }) => oa[e]}`, sa = c(S)`padding:6px 8px;background:${u.themedColor.textHighEmphasis};color:${u.themedColor.textHighEmphasisInverse};border-radius:4px;font-size:12px;white-space:nowrap;`, aa = ({ submitted: e, value: t, onChange: n }) => {
2138
- const { stringSet: o } = M(), i = na(), s = typeof t == "number";
2139
- return /* @__PURE__ */ r.createElement(la, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, o.CSAT_RATING_TITLE), /* @__PURE__ */ r.createElement(ca, null, i.map((a) => /* @__PURE__ */ r.createElement(zn, { disabled: e, key: a.value, label: a.getTooltip(o) }, /* @__PURE__ */ r.createElement(
2140
- da,
2145
+ }, ct = c.div`position:relative;`, la = c.div`display:flex;align-items:center;position:absolute;left:50%;z-index:${he.TOOLTIP};${({ $position: e }) => aa[e]}opacity:0;transition:opacity 0.2s ease-in-out;pointer-events:none;${ct}:hover &,${ct}:focus-within &{opacity:1;}`, ca = c(S)`padding:6px 8px;background:${u.themedColor.textHighEmphasis};color:${u.themedColor.textHighEmphasisInverse};border-radius:4px;font-size:12px;white-space:nowrap;`, da = ({ submitted: e, value: t, onChange: n }) => {
2146
+ const { stringSet: o } = M(), i = ia(), s = typeof t == "number";
2147
+ return /* @__PURE__ */ r.createElement(ua, null, /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textMidEmphasis }, o.CSAT_RATING_TITLE), /* @__PURE__ */ r.createElement(ma, null, i.map((a) => /* @__PURE__ */ r.createElement(Vn, { disabled: e, key: a.value, label: a.getTooltip(o) }, /* @__PURE__ */ r.createElement(
2148
+ ga,
2141
2149
  {
2142
2150
  disabled: e,
2143
2151
  onClick: () => n(a.value),
@@ -2145,16 +2153,16 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2145
2153
  },
2146
2154
  s ? a.isActive(t) ? /* @__PURE__ */ r.createElement(a.Icon.Active, null) : /* @__PURE__ */ r.createElement(a.Icon.Inactive, null) : /* @__PURE__ */ r.createElement(a.Icon.Active, null)
2147
2155
  )))));
2148
- }, la = c.div`display:flex;flex-direction:column;gap:8px;`, ca = c.div`display:flex;justify-content:space-between;width:100%;max-width:320px;`, da = c.button`background-color:transparent;border:none;border-radius:4px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;&:enabled:hover{cursor:pointer;background-color:${u.color.background200};${B.dark`
2156
+ }, ua = c.div`display:flex;flex-direction:column;gap:8px;`, ma = c.div`display:flex;justify-content:space-between;width:100%;max-width:320px;`, ga = c.button`background-color:transparent;border:none;border-radius:4px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;&:enabled:hover{cursor:pointer;background-color:${u.color.background200};${B.dark`
2149
2157
  background-color: ${u.color.background500};
2150
2158
  `}
2151
2159
  }
2152
2160
 
2153
- ${({ $inactive: e, theme: t }) => e && t.selected === "dark" && ua};
2154
- `, ua = k`[fill]{fill:white;fill-opacity:0.12;}[stroke]{stroke:white;stroke-opacity:0.12;}`, ma = ({ submitted: e, value: t = "", onChange: n }) => {
2161
+ ${({ $inactive: e, theme: t }) => e && t.selectedTheme === "dark" && pa};
2162
+ `, pa = k`[fill]{fill:white;fill-opacity:0.12;}[stroke]{stroke:white;stroke-opacity:0.12;}`, ha = ({ submitted: e, value: t = "", onChange: n }) => {
2155
2163
  const { stringSet: o } = M();
2156
2164
  return e && !t ? null : /* @__PURE__ */ r.createElement(
2157
- ga,
2165
+ fa,
2158
2166
  {
2159
2167
  disabled: e,
2160
2168
  maxLength: 255,
@@ -2163,7 +2171,7 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2163
2171
  placeholder: o.CSAT_REASON_PLACEHOLDER
2164
2172
  }
2165
2173
  );
2166
- }, ga = c.input`box-sizing:border-box;width:100%;border-radius:4px;padding:10px 16px;font-size:14px;font-weight:400;font-style:normal;border:unset;&:focus{outline:none;}color:${u.themedColor.textHighEmphasis};&::placeholder{color:${u.themedColor.textLowEmphasis};}background-color:${u.color.background50};${B.dark`
2174
+ }, fa = c.input`box-sizing:border-box;width:100%;border-radius:4px;padding:10px 16px;font-size:14px;font-weight:400;font-style:normal;border:unset;&:focus{outline:none;}color:${u.themedColor.textHighEmphasis};&::placeholder{color:${u.themedColor.textLowEmphasis};}background-color:${u.color.background50};${B.dark`
2167
2175
  background-color: ${u.themedColor.textDisabled};
2168
2176
  `}
2169
2177
 
@@ -2176,82 +2184,82 @@ const Hs = c.div`text-align:center;text-wrap:pretty;a{text-decoration:none;color
2176
2184
  background-color: ${u.themedColor.textDisabled};
2177
2185
  `}
2178
2186
  }
2179
- `, pa = ({ submitted: e }) => {
2187
+ `, ba = ({ submitted: e }) => {
2180
2188
  const { stringSet: t } = M();
2181
2189
  return e ? /* @__PURE__ */ r.createElement(S, { variant: "h2", color: u.themedColor.textHighEmphasis }, t.CSAT_TITLE_SUBMITTED) : /* @__PURE__ */ r.createElement(S, { variant: "h2", color: u.themedColor.textHighEmphasis }, t.CSAT_TITLE_UNSUBMITTED);
2182
2190
  };
2183
2191
  var me = /* @__PURE__ */ ((e) => (e.AI_AGENT_CSAT_5 = "AI_AGENT_CSAT_5", e.AI_AGENT_CSAT_5_WITH_CRE = "AI_AGENT_CSAT_5_WITH_CRE", e))(me || {});
2184
- const ha = (e) => mr((t, n) => ({ ...t, ...n }), e), Zt = ({
2192
+ const xa = (e) => pr((t, n) => ({ ...t, ...n }), e), Yt = ({
2185
2193
  type: e,
2186
2194
  renderSubmitButton: t,
2187
2195
  initialCsat: n,
2188
2196
  initialCsatReason: o,
2189
2197
  initialIsResolved: i
2190
2198
  }) => {
2191
- const [s, a] = ha({
2199
+ const [s, a] = xa({
2192
2200
  csatType: e,
2193
2201
  csat: n,
2194
2202
  csatReason: o,
2195
2203
  isResolved: i
2196
2204
  }), l = typeof n == "number" ? "submitted" : e === me.AI_AGENT_CSAT_5 && typeof s.csat == "number" || e === me.AI_AGENT_CSAT_5_WITH_CRE && typeof s.csat == "number" && typeof s.isResolved == "boolean" ? "submittable" : "unsubmittable", d = { state: l, submitted: l === "submitted" };
2197
- return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(fa, null, /* @__PURE__ */ r.createElement(pa, { ...d }), e === me.AI_AGENT_CSAT_5_WITH_CRE && /* @__PURE__ */ r.createElement(
2198
- zs,
2205
+ return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Ea, null, /* @__PURE__ */ r.createElement(ba, { ...d }), e === me.AI_AGENT_CSAT_5_WITH_CRE && /* @__PURE__ */ r.createElement(
2206
+ Gs,
2199
2207
  {
2200
2208
  ...d,
2201
2209
  defaultValue: i,
2202
2210
  value: s.isResolved,
2203
2211
  onChange: (g) => a({ isResolved: g })
2204
2212
  }
2205
- ), /* @__PURE__ */ r.createElement(aa, { ...d, value: s.csat, onChange: (g) => a({ csat: g }) }), s.csat && /* @__PURE__ */ r.createElement(
2206
- ma,
2213
+ ), /* @__PURE__ */ r.createElement(da, { ...d, value: s.csat, onChange: (g) => a({ csat: g }) }), s.csat && /* @__PURE__ */ r.createElement(
2214
+ ha,
2207
2215
  {
2208
2216
  ...d,
2209
2217
  value: s.csatReason,
2210
2218
  onChange: (g) => a({ csatReason: g })
2211
2219
  }
2212
2220
  )), l !== "submitted" && t({ state: l, params: s }));
2213
- }, fa = c.div`display:flex;flex-direction:column;gap:12px;`, ba = () => {
2221
+ }, Ea = c.div`display:flex;flex-direction:column;gap:12px;`, va = () => {
2214
2222
  const { stringSet: e } = M();
2215
2223
  return /* @__PURE__ */ r.createElement(S, { variant: "body2", color: u.themedColor.textMidEmphasis, style: { textAlign: "center" } }, e.CSAT_SUBMISSION_EXPIRED);
2216
- }, xa = (e) => {
2224
+ }, ya = (e) => {
2217
2225
  if (e.messageType !== "admin.csat")
2218
2226
  throw new Error("Invalid message type");
2219
- const t = $r(), { stringSet: n } = M(), { extendedMessagePayload: o, csat: i, csatReason: s, csatExpireAt: a, isResolvedWhenDeterminedByUser: l, onSubmitCSAT: d } = e, { visibility: g, type: m } = (o == null ? void 0 : o.csat) ?? {};
2227
+ const t = Or(), { stringSet: n } = M(), { extendedMessagePayload: o, csat: i, csatReason: s, csatExpireAt: a, isResolvedWhenDeterminedByUser: l, onSubmitCSAT: d } = e, { visibility: g, type: m } = (o == null ? void 0 : o.csat) ?? {};
2220
2228
  if (!g || !m || !me[m]) return null;
2221
- const p = m === me.AI_AGENT_CSAT_5 || m === me.AI_AGENT_CSAT_5_WITH_CRE ? Zt : () => null, h = (b) => {
2222
- b.csat && !Yt(a) ? d({
2229
+ const p = m === me.AI_AGENT_CSAT_5 || m === me.AI_AGENT_CSAT_5_WITH_CRE ? Yt : () => null, h = (b) => {
2230
+ b.csat && !qt(a) ? d({
2223
2231
  csatType: b.csatType,
2224
2232
  csat: b.csat,
2225
2233
  csatReason: b.csatReason,
2226
2234
  isResolved: b.isResolved
2227
2235
  }) : t();
2228
2236
  };
2229
- return /* @__PURE__ */ r.createElement(Ea, null, !i && Yt(a) ? /* @__PURE__ */ r.createElement(ba, null) : /* @__PURE__ */ r.createElement(
2237
+ return /* @__PURE__ */ r.createElement(Ca, null, !i && qt(a) ? /* @__PURE__ */ r.createElement(va, null) : /* @__PURE__ */ r.createElement(
2230
2238
  p,
2231
2239
  {
2232
2240
  type: m,
2233
2241
  initialCsat: i,
2234
2242
  initialCsatReason: s,
2235
2243
  initialIsResolved: l,
2236
- renderSubmitButton: ({ state: b, params: x }) => /* @__PURE__ */ r.createElement(va, { disabled: b !== "submittable", onClick: () => h(x) }, /* @__PURE__ */ r.createElement(S, { variant: "button" }, n.CSAT_SUBMIT_LABEL))
2244
+ renderSubmitButton: ({ state: b, params: x }) => /* @__PURE__ */ r.createElement(Ta, { disabled: b !== "submittable", onClick: () => h(x) }, /* @__PURE__ */ r.createElement(S, { variant: "button" }, n.CSAT_SUBMIT_LABEL))
2237
2245
  }
2238
2246
  ));
2239
- }, Ea = c.div`display:flex;flex-direction:column;background-color:${({ theme: e }) => e.colors.csat.background};border-radius:16px;gap:16px;padding:24px;`, va = c.button`all:unset;background-color:${({ theme: e }) => e.colors.base.primary};color:${({ theme: e }) => e.colors.base.primaryContrastContent};border-radius:6px;padding:10px 20px;display:flex;align-items:center;justify-content:center;cursor:pointer;&:hover{background-color:${u.color.primary.dark};}&:disabled{color:${u.color.ondark.textLowEmphasis};background-color:${u.themedColor.textDisabled};cursor:not-allowed;}`;
2240
- function Yt(e) {
2247
+ }, Ca = c.div`display:flex;flex-direction:column;background-color:${({ theme: e }) => e.colors.csat.background};border-radius:16px;gap:16px;padding:24px;`, Ta = c.button`all:unset;background-color:${({ theme: e }) => e.colors.base.primary};color:${({ theme: e }) => e.colors.base.primaryContrastContent};border-radius:6px;padding:10px 20px;display:flex;align-items:center;justify-content:center;cursor:pointer;&:hover{background-color:${u.color.primary.dark};}&:disabled{color:${u.color.ondark.textLowEmphasis};background-color:${u.themedColor.textDisabled};cursor:not-allowed;}`;
2248
+ function qt(e) {
2241
2249
  return !!e && e < Date.now();
2242
2250
  }
2243
- const _t = Ce({
2244
- template: ya,
2251
+ const St = Ce({
2252
+ template: _a,
2245
2253
  components: {
2246
- AdminMessage: Fs,
2247
- CSATMessage: xa
2254
+ AdminMessage: zs,
2255
+ CSATMessage: ya
2248
2256
  }
2249
2257
  });
2250
- function ya(e) {
2251
- const { components: t } = _t.useContext(), n = Ct(() => e.messageType === "admin" ? /* @__PURE__ */ r.createElement(t.AdminMessage, { ...e }) : e.messageType === "admin.csat" ? /* @__PURE__ */ r.createElement(t.CSATMessage, { ...e }) : null);
2252
- return /* @__PURE__ */ r.createElement(Ca, { $marginBottom: bt(e.groupType) }, n);
2258
+ function _a(e) {
2259
+ const { components: t } = St.useContext(), n = Tt(() => e.messageType === "admin" ? /* @__PURE__ */ r.createElement(t.AdminMessage, { ...e }) : e.messageType === "admin.csat" ? /* @__PURE__ */ r.createElement(t.CSATMessage, { ...e }) : null);
2260
+ return /* @__PURE__ */ r.createElement(Sa, { $marginBottom: xt(e.groupType) }, n);
2253
2261
  }
2254
- const Ca = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) => e}px;`, qt = {
2262
+ const Sa = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) => e}px;`, Jt = {
2255
2263
  file: "attach",
2256
2264
  snippet: "snippet",
2257
2265
  site: "website",
@@ -2261,7 +2269,7 @@ const Ca = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) =>
2261
2269
  sb_zendesk: "zendesk",
2262
2270
  sb_desk: "snippet"
2263
2271
  // TODO: request icon
2264
- }, Ta = ({
2272
+ }, wa = ({
2265
2273
  actionbook: e,
2266
2274
  functionCalls: t,
2267
2275
  groundedness: n,
@@ -2279,9 +2287,9 @@ const Ca = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) =>
2279
2287
  // Note: This component is used with the dashboard, so cssVars should not be used.
2280
2288
  iconColor: h = "#000000",
2281
2289
  textColor: b = "#000000",
2282
- highlightColor: x = wn.DEFAULT_PRIMARY
2290
+ highlightColor: x = kn.DEFAULT_PRIMARY
2283
2291
  } = p;
2284
- return /* @__PURE__ */ r.createElement(Jt, null, e && /* @__PURE__ */ r.createElement(Jt, null, /* @__PURE__ */ r.createElement(Ke, null, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "actionbook", color: h })), /* @__PURE__ */ r.createElement(
2292
+ return /* @__PURE__ */ r.createElement(Xt, null, e && /* @__PURE__ */ r.createElement(Xt, null, /* @__PURE__ */ r.createElement(Ke, null, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "actionbook", color: h })), /* @__PURE__ */ r.createElement(
2285
2293
  He,
2286
2294
  {
2287
2295
  $clickable: !!i,
@@ -2291,19 +2299,19 @@ const Ca = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) =>
2291
2299
  onClick: () => i == null ? void 0 : i(e)
2292
2300
  },
2293
2301
  e.name
2294
- ))), t == null ? void 0 : t.map((v) => /* @__PURE__ */ r.createElement(rt, { key: v.key }, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "function", color: h })), /* @__PURE__ */ r.createElement(Ke, null, /* @__PURE__ */ r.createElement(
2302
+ ))), t == null ? void 0 : t.map((E) => /* @__PURE__ */ r.createElement(rt, { key: E.key }, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "function", color: h })), /* @__PURE__ */ r.createElement(Ke, null, /* @__PURE__ */ r.createElement(
2295
2303
  He,
2296
2304
  {
2297
2305
  $clickable: !!i,
2298
2306
  $highlightColor: x,
2299
2307
  variant: "body2",
2300
2308
  color: b,
2301
- onClick: () => s == null ? void 0 : s(v)
2309
+ onClick: () => s == null ? void 0 : s(E)
2302
2310
  },
2303
- v.name
2304
- ), /* @__PURE__ */ r.createElement(Sa, { role: "button", onClick: () => a == null ? void 0 : a(v) }, /* @__PURE__ */ r.createElement(S, { variant: "body2", color: x }, "View details"), /* @__PURE__ */ r.createElement($, { type: "chevron-right", size: 16, color: x }))))), n == null ? void 0 : n.map((v) => /* @__PURE__ */ r.createElement(rt, { key: v.id }, /* @__PURE__ */ r.createElement(Ue, null, m({
2305
- default: /* @__PURE__ */ r.createElement($, { size: 16, type: qt[v.source_type] ?? qt.snippet, color: h }),
2306
- sourceType: v.source_type
2311
+ E.name
2312
+ ), /* @__PURE__ */ r.createElement(Aa, { role: "button", onClick: () => a == null ? void 0 : a(E) }, /* @__PURE__ */ r.createElement(S, { variant: "body2", color: x }, "View details"), /* @__PURE__ */ r.createElement($, { type: "chevron-right", size: 16, color: x }))))), n == null ? void 0 : n.map((E) => /* @__PURE__ */ r.createElement(rt, { key: E.id }, /* @__PURE__ */ r.createElement(Ue, null, m({
2313
+ default: /* @__PURE__ */ r.createElement($, { size: 16, type: Jt[E.source_type] ?? Jt.snippet, color: h }),
2314
+ sourceType: E.source_type
2307
2315
  })), /* @__PURE__ */ r.createElement(
2308
2316
  He,
2309
2317
  {
@@ -2311,44 +2319,44 @@ const Ca = c.div`padding-inline:${Q}px;margin-bottom:${({ $marginBottom: e }) =>
2311
2319
  $highlightColor: x,
2312
2320
  variant: "body2",
2313
2321
  color: b,
2314
- onClick: () => l == null ? void 0 : l(v)
2322
+ onClick: () => l == null ? void 0 : l(E)
2315
2323
  },
2316
- v.preview_title
2317
- ))), o == null ? void 0 : o.map((v) => /* @__PURE__ */ r.createElement(rt, { key: v.key }, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "template", color: h })), /* @__PURE__ */ r.createElement(
2324
+ E.preview_title
2325
+ ))), o == null ? void 0 : o.map((E) => /* @__PURE__ */ r.createElement(rt, { key: E.key }, /* @__PURE__ */ r.createElement(Ue, null, /* @__PURE__ */ r.createElement($, { size: 16, type: "template", color: h })), /* @__PURE__ */ r.createElement(
2318
2326
  He,
2319
2327
  {
2320
2328
  $clickable: !!d,
2321
2329
  $highlightColor: x,
2322
2330
  variant: "body2",
2323
2331
  color: b,
2324
- onClick: () => d == null ? void 0 : d(v)
2332
+ onClick: () => d == null ? void 0 : d(E)
2325
2333
  },
2326
- v.name
2334
+ E.name
2327
2335
  ))), g);
2328
- }, _a = c(S)`font-weight:400;`, He = c(_a)`${({ $clickable: e, $highlightColor: t }) => e && k`
2336
+ }, ka = c(S)`font-weight:400;`, He = c(ka)`${({ $clickable: e, $highlightColor: t }) => e && k`
2329
2337
  cursor: pointer;
2330
2338
  text-decoration: underline;
2331
2339
  &:hover {
2332
2340
  color: ${t};
2333
2341
  }
2334
2342
  `}
2335
- `, Ue = c.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Ke = c.div`display:flex;gap:8px;align-items:center;`, Sa = c(Ke)`cursor:pointer;gap:4px;`, rt = c(Ke)`flex-direction:row;align-items:center;`, Jt = c.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Wn = ye(
2343
+ `, Ue = c.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Ke = c.div`display:flex;gap:8px;align-items:center;`, Aa = c(Ke)`cursor:pointer;gap:4px;`, rt = c(Ke)`flex-direction:row;align-items:center;`, Xt = c.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Gn = ye(
2336
2344
  null
2337
2345
  );
2338
- function wa({
2346
+ function Ia({
2339
2347
  isDashboardActionbookTester: e = !1,
2340
2348
  children: t
2341
2349
  }) {
2342
- return /* @__PURE__ */ r.createElement(Wn.Provider, { value: { isDashboardActionbookTester: e } }, e && /* @__PURE__ */ r.createElement(ka, null), t);
2350
+ return /* @__PURE__ */ r.createElement(Gn.Provider, { value: { isDashboardActionbookTester: e } }, e && /* @__PURE__ */ r.createElement($a, null), t);
2343
2351
  }
2344
- const St = () => {
2345
- const e = J(Wn);
2352
+ const wt = () => {
2353
+ const e = J(Gn);
2346
2354
  if (!e) throw new Error("_UNSAFE_INTERNAL_DashboardActionbookTesterProvider not found");
2347
2355
  return e;
2348
- }, ka = () => /* @__PURE__ */ r.createElement(ve.Template, { template: Aa }, /* @__PURE__ */ r.createElement(ve.MessageLogs, { component: Ia })), Aa = (e) => /* @__PURE__ */ r.createElement(Fn, { ...e, testerMode: !0, maxBodyWidth: Nn }), Ia = ({ extendedMessagePayload: e = {} }) => {
2356
+ }, $a = () => /* @__PURE__ */ r.createElement(ve.Template, { template: Ma }, /* @__PURE__ */ r.createElement(ve.MessageLogs, { component: Oa })), Ma = (e) => /* @__PURE__ */ r.createElement(Un, { ...e, testerMode: !0, maxBodyWidth: Bn }), Oa = ({ extendedMessagePayload: e = {} }) => {
2349
2357
  const { handlers: t } = N(), { manual: n, groundedness: o, function_calls: i, agent_message_templates: s, is_thinking: a } = e;
2350
- return a || !n && !(o != null && o.length) && !(i != null && i.length) && !(s != null && s.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement($a, null, /* @__PURE__ */ r.createElement(Ma, { width: 4 }), /* @__PURE__ */ r.createElement(
2351
- Ta,
2358
+ return a || !n && !(o != null && o.length) && !(i != null && i.length) && !(s != null && s.length) ? /* @__PURE__ */ r.createElement(r.Fragment, null) : /* @__PURE__ */ r.createElement(La, null, /* @__PURE__ */ r.createElement(Ra, { width: 4 }), /* @__PURE__ */ r.createElement(
2359
+ wa,
2352
2360
  {
2353
2361
  actionbook: n,
2354
2362
  functionCalls: i,
@@ -2360,12 +2368,12 @@ const St = () => {
2360
2368
  textColor: u.themedColor.textHighEmphasis,
2361
2369
  barColor: u.themedColor.textDisabled
2362
2370
  },
2363
- bottomContent: /* @__PURE__ */ r.createElement(Oa, { variant: "caption2", color: u.themedColor.textLowEmphasis }, "Only visible in the tester")
2371
+ bottomContent: /* @__PURE__ */ r.createElement(Na, { variant: "caption2", color: u.themedColor.textLowEmphasis }, "Only visible in the tester")
2364
2372
  }
2365
2373
  ));
2366
- }, $a = c.div`display:flex;gap:16px;margin:16px ${Q}px 0;align-self:stretch;`, Ma = c.div`width:${({ width: e }) => e}px;background-color:${u.themedColor.textDisabled};border-radius:100px;flex-shrink:0;`, Oa = c(S)`margin-top:5px;`, wt = {
2374
+ }, La = c.div`display:flex;gap:16px;margin:16px ${Q}px 0;align-self:stretch;`, Ra = c.div`width:${({ width: e }) => e}px;background-color:${u.themedColor.textDisabled};border-radius:100px;flex-shrink:0;`, Na = c(S)`margin-top:5px;`, kt = {
2367
2375
  isStreaming(e) {
2368
- const t = Ht(e.data);
2376
+ const t = Ut(e.data);
2369
2377
  return typeof t == "object" ? !!t.stream : !1;
2370
2378
  },
2371
2379
  isWelcomeMessage(e, t) {
@@ -2373,67 +2381,67 @@ const St = () => {
2373
2381
  if (((n = e.extendedMessagePayload) == null ? void 0 : n.bot_message_type) === "welcome")
2374
2382
  return !0;
2375
2383
  if ((e.isUserMessage() || e.isFileMessage()) && e.sender.userId === t) {
2376
- const o = Ht(e.data);
2384
+ const o = Ut(e.data);
2377
2385
  return !(o != null && o.respond_mesg_id) && !(o != null && o.stream);
2378
2386
  }
2379
2387
  return !1;
2380
2388
  }
2381
2389
  };
2382
- function La(e) {
2390
+ function Da(e) {
2383
2391
  return "sendingStatus" in e ? e.sendingStatus === "succeeded" ? String(e.messageId) : e.reqId : String(e.messageId);
2384
2392
  }
2385
- const Ra = (e, t, n, o = !0) => {
2393
+ const Ba = (e, t, n, o = !0) => {
2386
2394
  if (!o || !e.isUserMessage() && !e.isFileMessage())
2387
2395
  return "single";
2388
2396
  const i = () => {
2389
2397
  if (!t || !t.isUserMessage() && !t.isFileMessage()) return !1;
2390
- const d = t.sender.userId === e.sender.userId, g = Nt(t.createdAt, e.createdAt);
2398
+ const d = t.sender.userId === e.sender.userId, g = Dt(t.createdAt, e.createdAt);
2391
2399
  return d && g;
2392
2400
  }, s = () => {
2393
2401
  if (!n || !n.isUserMessage() && !n.isFileMessage()) return !1;
2394
- const d = n.sender.userId === e.sender.userId, g = Nt(n.createdAt, e.createdAt);
2402
+ const d = n.sender.userId === e.sender.userId, g = Dt(n.createdAt, e.createdAt);
2395
2403
  return d && g;
2396
2404
  }, a = i(), l = s();
2397
2405
  return a && l ? "middle" : a ? "bottom" : l ? "top" : "single";
2398
2406
  };
2399
- function Na(e, t) {
2400
- return e.filter((n) => wt.isWelcomeMessage(n, t));
2407
+ function Pa(e, t) {
2408
+ return e.filter((n) => kt.isWelcomeMessage(n, t));
2401
2409
  }
2402
- function Vn(e, t) {
2403
- return Da(e) === t;
2410
+ function jn(e, t) {
2411
+ return Fa(e) === t;
2404
2412
  }
2405
- function Da(e) {
2413
+ function Fa(e) {
2406
2414
  var t;
2407
2415
  if (e)
2408
2416
  return e.isUserMessage() || e.isFileMessage() || e.isMultipleFilesMessage() ? e.sender.userId : ((t = e == null ? void 0 : e.sender) == null ? void 0 : t.userId) ?? void 0;
2409
2417
  }
2410
- function Ba(e) {
2418
+ function Ha(e) {
2411
2419
  return e.isAdminMessage() ? e.message === "The channel's custom_type was updated." : !1;
2412
2420
  }
2413
- const Xt = (e) => !!e && "sender" in e, Gn = (e) => e.startsWith("image/"), jn = (e) => e.startsWith("video/"), Qt = (e) => Gn(e) || jn(e), ze = {
2421
+ const Qt = (e) => !!e && "sender" in e, Kn = (e) => e.startsWith("image/"), Zn = (e) => e.startsWith("video/"), en = (e) => Kn(e) || Zn(e), ze = {
2414
2422
  isAdmin: (e) => e.isAdminMessage(),
2415
2423
  isCSAT: (e) => {
2416
2424
  var t;
2417
2425
  return e.isAdminMessage() && !!((t = e.extendedMessagePayload) != null && t.csat);
2418
2426
  },
2419
- isIncoming: (e, t) => Xt(e) && e.sender.userId !== t,
2420
- isOutgoing: (e, t) => Xt(e) && (e.sender.userId === t || e.sendingStatus === Lr.PENDING)
2421
- }, Kn = ({ rootElementId: e, visible: t, onClose: n, children: o }) => {
2427
+ isIncoming: (e, t) => Qt(e) && e.sender.userId !== t,
2428
+ isOutgoing: (e, t) => Qt(e) && (e.sender.userId === t || e.sendingStatus === Nr.PENDING)
2429
+ }, Yn = ({ rootElementId: e, visible: t, onClose: n, children: o }) => {
2422
2430
  if (!t) return null;
2423
2431
  const { rootElement: i } = N(), s = pe(i), a = pe(i, !0);
2424
- return Fr(
2425
- /* @__PURE__ */ r.createElement(Pa, { onClick: n }, /* @__PURE__ */ r.createElement(Fa, { onClick: (l) => l.stopPropagation() }, o)),
2432
+ return Ur(
2433
+ /* @__PURE__ */ r.createElement(Ua, { onClick: n }, /* @__PURE__ */ r.createElement(za, { onClick: (l) => l.stopPropagation() }, o)),
2426
2434
  s.getElementById(e) ?? s.getElementById(X.MODAL_ROOT) ?? a.body
2427
2435
  );
2428
- }, Pa = c.div`position:fixed;top:0;left:0;width:100%;height:100%;background:${u.color.overlay.dark};display:flex;justify-content:center;align-items:center;z-index:${he.MODAL};`, Fa = c.div`border-radius:4px;overflow:hidden;box-shadow:0 16px 24px 2px rgba(13,13,13,0.12),0 6px 30px 5px rgba(13,13,13,0.08),0 6px 10px -5px rgba(13,13,13,0.04);z-index:${he.MODAL};`, Ha = c.div`flex-shrink:0;width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};background-color:${({ theme: e }) => e.colors.base.primary};box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;}`, Ua = c(vt)`path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}`;
2429
- function Zn({ size: e }) {
2436
+ }, Ua = c.div`position:fixed;top:0;left:0;width:100%;height:100%;background:${u.color.overlay.dark};display:flex;justify-content:center;align-items:center;z-index:${he.MODAL};`, za = c.div`border-radius:4px;overflow:hidden;box-shadow:0 16px 24px 2px rgba(13,13,13,0.12),0 6px 30px 5px rgba(13,13,13,0.08),0 6px 10px -5px rgba(13,13,13,0.04);z-index:${he.MODAL};`, Wa = c.div`flex-shrink:0;width:${({ $size: e }) => se(e)};height:${({ $size: e }) => se(e)};background-color:${({ theme: e }) => e.colors.base.primary};box-sizing:border-box;padding:6px;border-radius:50%;display:flex;justify-content:center;align-items:center;}`, Va = c(yt)`path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent};}`;
2437
+ function qn({ size: e }) {
2430
2438
  const { aiAgentInfo: t } = F();
2431
- return t.profileUrl ? /* @__PURE__ */ r.createElement(yt, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(Ha, { $size: e }, /* @__PURE__ */ r.createElement(Ua, null));
2439
+ return t.profileUrl ? /* @__PURE__ */ r.createElement(Ct, { size: e, src: t.profileUrl }) : /* @__PURE__ */ r.createElement(Wa, { $size: e }, /* @__PURE__ */ r.createElement(Va, null));
2432
2440
  }
2433
- const za = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none;`, Wa = c.div`height:64px;min-height:64px;box-sizing:border-box;display:flex;justify-content:space-between;border-bottom:1px solid ${u.themedColor.textDisabled};background-color:${u.themedColor.bg_50_600};@media screen and (max-width:768px){position:relative;}`, Va = c.div`box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:64px;padding:16px 20px;width:calc(100% - 128px);`, Ga = c.div`margin-inline-end:8px;`, ja = c.div`max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;@media screen and (max-width:768px){position:absolute;inset-inline-start:64px;top:10px;display:block;max-width:calc(100vw - 240px);}`, Ka = c.div`display:inline-block;margin-inline-start:8px;padding-top:5px;@media screen and (max-width:768px){position:absolute;inset-inline-start:56px;top:24px;}`, Za = c.div`display:flex;width:160px;justify-content:flex-end;`, Ya = c.div`inset-inline-end:0;display:flex;flex-direction:row;`, ct = c.div`width:64px;padding:21px;box-sizing:border-box;cursor:${(e) => e.disabled ? "not-allowed" : "pointer"};`, qa = c(ct)`border-inline-start:1px solid ${u.themedColor.textDisabled};`, Ja = c.div`width:100%;height:100%;display:flex;align-items:center;justify-content:center;`, Xa = c.video`max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none;`, Qa = c.img`max-width:90%;max-height:90%;user-select:none;-webkit-user-drag:none;`, el = c.div`max-width:100%;max-height:100%;display:flex;justify-content:center;align-items:center;`, tl = ({ message: e, onClose: t, onDownloadClick: n }) => {
2441
+ const Ga = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none;`, ja = c.div`height:64px;min-height:64px;box-sizing:border-box;display:flex;justify-content:space-between;border-bottom:1px solid ${u.themedColor.textDisabled};background-color:${u.themedColor.bg_50_600};@media screen and (max-width:768px){position:relative;}`, Ka = c.div`box-sizing:border-box;display:flex;flex-direction:row;align-items:center;height:64px;padding:16px 20px;width:calc(100% - 128px);`, Za = c.div`margin-inline-end:8px;`, Ya = c.div`max-width:500px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;@media screen and (max-width:768px){position:absolute;inset-inline-start:64px;top:10px;display:block;max-width:calc(100vw - 240px);}`, qa = c.div`display:inline-block;margin-inline-start:8px;padding-top:5px;@media screen and (max-width:768px){position:absolute;inset-inline-start:56px;top:24px;}`, Ja = c.div`display:flex;width:160px;justify-content:flex-end;`, Xa = c.div`inset-inline-end:0;display:flex;flex-direction:row;`, dt = c.div`width:64px;padding:21px;box-sizing:border-box;cursor:${(e) => e.disabled ? "not-allowed" : "pointer"};`, Qa = c(dt)`border-inline-start:1px solid ${u.themedColor.textDisabled};`, el = c.div`width:100%;height:100%;display:flex;align-items:center;justify-content:center;`, tl = c.video`max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none;`, nl = c.img`max-width:90%;max-height:90%;user-select:none;-webkit-user-drag:none;`, rl = c.div`max-width:100%;max-height:100%;display:flex;justify-content:center;align-items:center;`, ol = ({ message: e, onClose: t, onDownloadClick: n }) => {
2434
2442
  const { sender: o, type: i, url: s, name: a = "", threadInfo: l } = e, { profileUrl: d, nickname: g, userId: m } = o, { userSession: p, aiAgentInfo: h } = F();
2435
2443
  return /* @__PURE__ */ r.createElement(
2436
- rl,
2444
+ sl,
2437
2445
  {
2438
2446
  profileUrl: d,
2439
2447
  nickname: g,
@@ -2447,7 +2455,7 @@ const za = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2447
2455
  onDownloadClick: n
2448
2456
  }
2449
2457
  );
2450
- }, nl = ({ profileUrl: e, isBotMessage: t }) => !e && t ? /* @__PURE__ */ r.createElement(Zn, { size: 32 }) : /* @__PURE__ */ r.createElement(yt, { size: 32, src: e }), rl = ({
2458
+ }, il = ({ profileUrl: e, isBotMessage: t }) => !e && t ? /* @__PURE__ */ r.createElement(qn, { size: 32 }) : /* @__PURE__ */ r.createElement(Ct, { size: 32, src: e }), sl = ({
2451
2459
  profileUrl: e,
2452
2460
  isBotMessage: t,
2453
2461
  nickname: n,
@@ -2461,8 +2469,8 @@ const za = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2461
2469
  onDownloadClick: m
2462
2470
  }) => {
2463
2471
  const { stringSet: p } = M();
2464
- return /* @__PURE__ */ r.createElement(Kn, { onClose: l, visible: !0, rootElementId: X.MODAL_ROOT }, /* @__PURE__ */ r.createElement(za, null, /* @__PURE__ */ r.createElement(Wa, null, /* @__PURE__ */ r.createElement(Va, null, /* @__PURE__ */ r.createElement(Ga, null, /* @__PURE__ */ r.createElement(nl, { profileUrl: e, isBotMessage: t })), /* @__PURE__ */ r.createElement(ja, null, /* @__PURE__ */ r.createElement(S, { variant: "h2", color: u.themedColor.textHighEmphasis }, o)), /* @__PURE__ */ r.createElement(Ka, null, /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.color.ondark.textMidEmphasis }, n))), /* @__PURE__ */ r.createElement(Za, null, Qt(i) && /* @__PURE__ */ r.createElement(Ya, null, /* @__PURE__ */ r.createElement(ct, { as: "a", href: s, target: "_blank", rel: ht, onClick: m }, /* @__PURE__ */ r.createElement($, { type: "download", color: u.themedColor.textHighEmphasis, size: 24 })), d && a && /* @__PURE__ */ r.createElement(
2465
- ct,
2472
+ return /* @__PURE__ */ r.createElement(Yn, { onClose: l, visible: !0, rootElementId: X.MODAL_ROOT }, /* @__PURE__ */ r.createElement(Ga, null, /* @__PURE__ */ r.createElement(ja, null, /* @__PURE__ */ r.createElement(Ka, null, /* @__PURE__ */ r.createElement(Za, null, /* @__PURE__ */ r.createElement(il, { profileUrl: e, isBotMessage: t })), /* @__PURE__ */ r.createElement(Ya, null, /* @__PURE__ */ r.createElement(S, { variant: "h2", color: u.themedColor.textHighEmphasis }, o)), /* @__PURE__ */ r.createElement(qa, null, /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.color.ondark.textMidEmphasis }, n))), /* @__PURE__ */ r.createElement(Ja, null, en(i) && /* @__PURE__ */ r.createElement(Xa, null, /* @__PURE__ */ r.createElement(dt, { as: "a", href: s, target: "_blank", rel: ft, onClick: m }, /* @__PURE__ */ r.createElement($, { type: "download", color: u.themedColor.textHighEmphasis, size: 24 })), d && a && /* @__PURE__ */ r.createElement(
2473
+ dt,
2466
2474
  {
2467
2475
  disabled: g,
2468
2476
  onClick: () => {
@@ -2477,14 +2485,14 @@ const za = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2477
2485
  size: 24
2478
2486
  }
2479
2487
  )
2480
- )), /* @__PURE__ */ r.createElement(qa, { onClick: l }, /* @__PURE__ */ r.createElement($, { type: "close", color: u.themedColor.textHighEmphasis, size: 24 })))), /* @__PURE__ */ r.createElement(Ja, { onClick: (h) => h.currentTarget === h.target && l() }, jn(i) && /* @__PURE__ */ r.createElement(Xa, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: s, type: i })), Gn(i) && /* @__PURE__ */ r.createElement(Qa, { src: s, alt: o }), !Qt(i) && /* @__PURE__ */ r.createElement(el, null, /* @__PURE__ */ r.createElement(S, { variant: "h1", color: u.themedColor.textHighEmphasis }, p.FILE_VIEWER__UNSUPPORT)))));
2481
- }, Yn = ({
2488
+ )), /* @__PURE__ */ r.createElement(Qa, { onClick: l }, /* @__PURE__ */ r.createElement($, { type: "close", color: u.themedColor.textHighEmphasis, size: 24 })))), /* @__PURE__ */ r.createElement(el, { onClick: (h) => h.currentTarget === h.target && l() }, Zn(i) && /* @__PURE__ */ r.createElement(tl, { controls: !0 }, /* @__PURE__ */ r.createElement("source", { src: s, type: i })), Kn(i) && /* @__PURE__ */ r.createElement(nl, { src: s, alt: o }), !en(i) && /* @__PURE__ */ r.createElement(rl, null, /* @__PURE__ */ r.createElement(S, { variant: "h1", color: u.themedColor.textHighEmphasis }, p.FILE_VIEWER__UNSUPPORT)))));
2489
+ }, Jn = ({
2482
2490
  className: e,
2483
2491
  locale: t,
2484
2492
  date: n = Date.now(),
2485
2493
  formatString: o = "MMMM dd, yyyy",
2486
2494
  style: i
2487
- }) => /* @__PURE__ */ r.createElement(ol, { style: i, className: e }, /* @__PURE__ */ r.createElement(S, { variant: "caption4", color: u.themedColor.textMidEmphasis }, pn(n, o, { locale: t }))), ol = c.div`display:flex;justify-content:center;align-items:center;`, il = gr(function(t, n) {
2495
+ }) => /* @__PURE__ */ r.createElement(al, { style: i, className: e }, /* @__PURE__ */ r.createElement(S, { variant: "caption4", color: u.themedColor.textMidEmphasis }, hn(n, o, { locale: t }))), al = c.div`display:flex;justify-content:center;align-items:center;`, ll = hr(function(t, n) {
2488
2496
  const {
2489
2497
  messages: o,
2490
2498
  renderMessage: i,
@@ -2498,26 +2506,26 @@ const za = c.div`width:100%;height:100%;position:fixed;top:0;left:0;outline:none
2498
2506
  depsForResetScrollPositionToBottom: h,
2499
2507
  scrollPositionRef: b,
2500
2508
  scrollDistanceFromBottomRef: x,
2501
- stackDirection: v = "top"
2502
- } = t, f = n && "current" in n ? n : { current: null }, y = D(!1), _ = D(void 0), w = D(0), O = D(0), ee = D(0), H = b ?? O, le = x ?? ee;
2509
+ stackDirection: E = "top"
2510
+ } = t, f = n && "current" in n ? n : { current: null }, y = D(!1), _ = D(void 0), w = D(0), O = D(0), ee = D(0), U = b ?? O, le = x ?? ee;
2503
2511
  ge(() => {
2504
2512
  f.current && (f.current.scrollTop = f.current.scrollHeight);
2505
2513
  }, h), ge(() => {
2506
- f.current && (_.current === "top" && (f.current.scrollTop = f.current.scrollHeight - H.current), _.current === "bottom" && (f.current.scrollTop = w.current), _.current = void 0);
2514
+ f.current && (_.current === "top" && (f.current.scrollTop = f.current.scrollHeight - U.current), _.current === "bottom" && (f.current.scrollTop = w.current), _.current = void 0);
2507
2515
  }, [f.current, o.length]);
2508
2516
  const _e = async () => {
2509
2517
  if (!f.current) return;
2510
- const E = f.current;
2511
- if (p(sl(E)), H.current = E.scrollHeight - E.scrollTop, le.current = H.current - E.clientHeight, w.current = E.scrollTop, y.current) return;
2512
- const U = E.clientHeight * Math.min(Math.max(0, m), 1);
2513
- E.scrollTop <= U ? (y.current = !0, _.current = "top", await d(), y.current = !1) : E.scrollHeight - E.scrollTop - E.clientHeight <= U ? (y.current = !0, _.current = "bottom", await g(), y.current = !1) : _.current = void 0;
2518
+ const v = f.current;
2519
+ if (p(cl(v)), U.current = v.scrollHeight - v.scrollTop, le.current = U.current - v.clientHeight, w.current = v.scrollTop, y.current) return;
2520
+ const H = v.clientHeight * Math.min(Math.max(0, m), 1);
2521
+ v.scrollTop <= H ? (y.current = !0, _.current = "top", await d(), y.current = !1) : v.scrollHeight - v.scrollTop - v.clientHeight <= H ? (y.current = !0, _.current = "bottom", await g(), y.current = !1) : _.current = void 0;
2514
2522
  };
2515
- return /* @__PURE__ */ r.createElement(al, { id: "infinite-list-container" }, /* @__PURE__ */ r.createElement(ll, { id: "infinite-list-inner", ref: f, onScroll: _e }, v === "bottom" && /* @__PURE__ */ r.createElement("div", { style: { flexGrow: 1 } }), s, o.map((E, U) => i({ message: E, index: U })), a), /* @__PURE__ */ r.createElement(cl, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ r.createElement(dl, { id: "infinite-list-overlay" }, l)));
2523
+ return /* @__PURE__ */ r.createElement(dl, { id: "infinite-list-container" }, /* @__PURE__ */ r.createElement(ul, { id: "infinite-list-inner", ref: f, onScroll: _e }, E === "bottom" && /* @__PURE__ */ r.createElement("div", { style: { flexGrow: 1 } }), s, o.map((v, H) => i({ message: v, index: H })), a), /* @__PURE__ */ r.createElement(ml, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ r.createElement(gl, { id: "infinite-list-overlay" }, l)));
2516
2524
  });
2517
- function sl(e) {
2525
+ function cl(e) {
2518
2526
  return e.scrollTop <= 10 ? "top" : e.scrollHeight - (e.scrollTop + e.clientHeight) <= 10 ? "bottom" : "middle";
2519
2527
  }
2520
- const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;scrollbar-color:${u.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, cl = c.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, dl = c.div`pointer-events:auto;`, ul = ({ className: e, onClick: t }) => /* @__PURE__ */ r.createElement(ml, { className: e, onClick: t, tabIndex: 0 }, /* @__PURE__ */ r.createElement($, { size: 24, type: "chevron-down", color: u.color.primary.main })), ml = c.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:24px;box-shadow:0 2px 8px 0 rgba(0,0,0,0.08),0 4px 6px 0 rgba(0,0,0,0.12);${B.light`
2528
+ const dl = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ul = c.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;scrollbar-color:${u.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, ml = c.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, gl = c.div`pointer-events:auto;`, pl = ({ className: e, onClick: t }) => /* @__PURE__ */ r.createElement(hl, { className: e, onClick: t, tabIndex: 0 }, /* @__PURE__ */ r.createElement($, { size: 24, type: "chevron-down", color: u.color.primary.main })), hl = c.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:24px;box-shadow:0 2px 8px 0 rgba(0,0,0,0.08),0 4px 6px 0 rgba(0,0,0,0.12);${B.light`
2521
2529
  background-color: ${u.color.background50};
2522
2530
  &:hover {
2523
2531
  background-color: ${u.color.background100};
@@ -2539,9 +2547,9 @@ const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c
2539
2547
  &:focus {
2540
2548
  outline: none;
2541
2549
  }
2542
- `, qn = () => {
2543
- const { chatSDK: e } = N(), { channelSource: t } = Y(), [n, o] = C([]);
2544
- return hn(e, {
2550
+ `, Xn = () => {
2551
+ const { chatSDK: e } = N(), { channelSource: t } = G(), [n, o] = T([]);
2552
+ return fn(e, {
2545
2553
  onTypingStatusUpdated(i) {
2546
2554
  var s;
2547
2555
  if (i.url === ((s = t.channel) == null ? void 0 : s.url)) {
@@ -2550,22 +2558,22 @@ const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c
2550
2558
  }
2551
2559
  }
2552
2560
  }), n;
2553
- }, gl = () => {
2554
- const { agentPreviewConfigs: e = {}, aiAgentId: t } = N(), { aiAgentInfo: n } = F(), { stringSet: o, dateLocale: i } = M(), { messageSource: s } = Y(), { Template: a } = ve.useContext(), l = e.welcomeMessages ?? [], d = s.messages, g = Na(d, t), m = d[g.length + 1], p = g[0] ?? m;
2561
+ }, fl = () => {
2562
+ const { agentPreviewConfigs: e = {}, aiAgentId: t } = N(), { aiAgentInfo: n } = F(), { stringSet: o, dateLocale: i } = M(), { messageSource: s } = G(), { Template: a } = ve.useContext(), l = e.welcomeMessages ?? [], d = s.messages, g = Pa(d, t), m = d[g.length + 1], p = g[0] ?? m;
2555
2563
  return {
2556
2564
  /**
2557
2565
  * Returns a list of messages filtered according to business requirements.
2558
2566
  */
2559
- filteredMessages: d.filter((h) => Ba(h) ? !1 : l.length > 0 ? !wt.isWelcomeMessage(h, t) : !0),
2567
+ filteredMessages: d.filter((h) => Ha(h) ? !1 : l.length > 0 ? !kt.isWelcomeMessage(h, t) : !0),
2560
2568
  /**
2561
2569
  * Determines whether to display the DateSeparator in the data list by comparing it with the welcome messages from Bot Studio.
2562
2570
  */
2563
- shouldShowOriginalDate: (h) => h > 0 || l.length === 0 ? !0 : m && !_r(m.createdAt, (p == null ? void 0 : p.createdAt) ?? 0),
2571
+ shouldShowOriginalDate: (h) => h > 0 || l.length === 0 ? !0 : m && !wr(m.createdAt, (p == null ? void 0 : p.createdAt) ?? 0),
2564
2572
  /**
2565
2573
  * Renders the list of welcome messages from Bot Studio.
2566
2574
  */
2567
2575
  renderAgentPreviewWelcomeMessages: () => l.length === 0 ? null : /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(
2568
- Yn,
2576
+ Jn,
2569
2577
  {
2570
2578
  style: { margin: "16px 0" },
2571
2579
  date: p == null ? void 0 : p.createdAt,
@@ -2573,7 +2581,7 @@ const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c
2573
2581
  formatString: o.DATE_FORMAT__MESSAGE_LIST__DATE_SEPARATOR
2574
2582
  }
2575
2583
  ), l.map((h, b) => {
2576
- const x = b === l.length - 1, v = g.length !== d.length, f = l.length === 1 ? "single" : b === 0 ? "top" : x || v ? "bottom" : "middle";
2584
+ const x = b === l.length - 1, E = g.length !== d.length, f = l.length === 1 ? "single" : b === 0 ? "top" : x || E ? "bottom" : "middle";
2577
2585
  return /* @__PURE__ */ r.createElement(
2578
2586
  a,
2579
2587
  {
@@ -2584,7 +2592,7 @@ const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c
2584
2592
  createdAt: (p == null ? void 0 : p.createdAt) ?? Date.now(),
2585
2593
  extendedMessagePayload: { suggested_replies: h.suggestedReplies },
2586
2594
  suggestedRepliesDirection: e.suggestedRepliesDirection,
2587
- suggestedRepliesVisible: x && !v,
2595
+ suggestedRepliesVisible: x && !E,
2588
2596
  isBotMessage: !0,
2589
2597
  onClickSuggestedReply: async ({ reply: y }) => {
2590
2598
  s.sendUserMessage({ message: y });
@@ -2593,37 +2601,37 @@ const al = c.div`display:flex;position:relative;flex:1;overflow:hidden;`, ll = c
2593
2601
  );
2594
2602
  }))
2595
2603
  };
2596
- }, pl = (e) => c(e).withConfig({ shouldForwardProp: Hr });
2597
- function hl(e) {
2604
+ }, bl = (e) => c(e).withConfig({ shouldForwardProp: zr });
2605
+ function xl(e) {
2598
2606
  var o;
2599
2607
  const t = "remove_powered_by", n = (o = e == null ? void 0 : e.appInfo) == null ? void 0 : o.applicationAttributes;
2600
2608
  return Array.isArray(n) && n.includes(t);
2601
2609
  }
2602
- const fl = ({ style: e }) => {
2603
- const { stringSet: t } = M(), { chatSDK: n } = N(), { isDashboardActionbookTester: o } = St();
2604
- return hl(n) || o ? null : /* @__PURE__ */ r.createElement(bl, { variant: "caption2", style: e }, t.POWERED_BY + " ", /* @__PURE__ */ r.createElement(
2605
- xl,
2610
+ const El = ({ style: e }) => {
2611
+ const { stringSet: t } = M(), { chatSDK: n } = N(), { isDashboardActionbookTester: o } = wt();
2612
+ return xl(n) || o ? null : /* @__PURE__ */ r.createElement(vl, { variant: "caption2", style: e }, t.POWERED_BY + " ", /* @__PURE__ */ r.createElement(
2613
+ yl,
2606
2614
  {
2607
2615
  variant: "caption2",
2608
2616
  as: "a",
2609
2617
  href: "https://sendbird.com?utm_medium=product&utm_source=aiagent&utm_campaign=fy26-glbl-ai-agent-poweredby",
2610
2618
  "aria-label": "Learn more about Sendbird",
2611
- rel: ht,
2619
+ rel: ft,
2612
2620
  target: "_blank"
2613
2621
  },
2614
2622
  "Sendbird"
2615
2623
  ));
2616
- }, bl = c(S)`color:${u.themedColor.textLowEmphasis};text-align:center;`, xl = pl(S)`
2624
+ }, vl = c(S)`color:${u.themedColor.textLowEmphasis};text-align:center;`, yl = bl(S)`
2617
2625
  color: ${u.themedColor.textLowEmphasis};
2618
2626
  cursor: pointer;
2619
2627
  text-decoration: none;
2620
- `, El = () => {
2628
+ `, Cl = () => {
2621
2629
  var d;
2622
- const { stringSet: e } = M(), { activeChannel: t } = F(), { channelSource: n, goToActiveConversation: o, scrollSource: i } = Y(), s = Ln(n.channel), l = t && ((d = n.channel) == null ? void 0 : d.url) === (t == null ? void 0 : t.url) && s;
2630
+ const { stringSet: e } = M(), { activeChannel: t } = F(), { channelSource: n, goToActiveConversation: o, scrollSource: i } = G(), s = Rn(n.channel), l = t && ((d = n.channel) == null ? void 0 : d.url) === (t == null ? void 0 : t.url) && s;
2623
2631
  return ge(() => {
2624
2632
  l && i.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } });
2625
- }, [l]), l ? /* @__PURE__ */ r.createElement(vl, null, /* @__PURE__ */ r.createElement(
2626
- yl,
2633
+ }, [l]), l ? /* @__PURE__ */ r.createElement(Tl, null, /* @__PURE__ */ r.createElement(
2634
+ _l,
2627
2635
  {
2628
2636
  variant: "button",
2629
2637
  role: "button",
@@ -2632,114 +2640,117 @@ const fl = ({ style: e }) => {
2632
2640
  },
2633
2641
  e.START_NEW_CONVERSATION
2634
2642
  )) : null;
2635
- }, vl = c.div`display:flex;justify-content:center;margin:16px 0;`, yl = c(S)`border-radius:6px;box-sizing:border-box;padding:10px 20px;border:1px solid ${u.themedColor.textDisabled};cursor:pointer;user-select:none;`, Cl = !0, Tl = () => {
2636
- const { Template: e } = Tt.useContext(), { Template: t } = ve.useContext(), { Template: n } = _t.useContext(), [o, i] = C(null), { userSession: s, aiAgentInfo: a } = F(), { agentPreviewConfigs: l, chatSDK: d, state: g } = N(), { stringSet: m, dateLocale: p } = M(), { conversation: h, channelSource: b, messageSource: x, scrollSource: v } = Y(), { isDashboardActionbookTester: f } = St(), { filteredMessages: y, shouldShowOriginalDate: _, renderAgentPreviewWelcomeMessages: w } = gl(), { storage: O } = Tn(), ee = qn(), H = Ct(() => {
2637
- const E = ee[0];
2638
- return E ? E.userId === a.userId ? a : E : null;
2643
+ }, Tl = c.div`display:flex;justify-content:center;margin:16px 0;`, _l = c(S)`border-radius:6px;box-sizing:border-box;padding:10px 20px;border:1px solid ${u.themedColor.textDisabled};cursor:pointer;user-select:none;`, Sl = !0, wl = () => {
2644
+ const { Template: e } = _t.useContext(), { Template: t } = ve.useContext(), { Template: n } = St.useContext(), [o, i] = T(null), { userSession: s, aiAgentInfo: a } = F(), { agentPreviewConfigs: l, chatSDK: d, state: g } = N(), { stringSet: m, dateLocale: p } = M(), { conversation: h, channelSource: b, messageSource: x, scrollSource: E } = G(), { isDashboardActionbookTester: f } = wt(), { filteredMessages: y, shouldShowOriginalDate: _, renderAgentPreviewWelcomeMessages: w } = fl(), { storage: O } = _n(), ee = Xn(), U = Tt(() => {
2645
+ const v = ee[0];
2646
+ if (!v) return null;
2647
+ const H = v.userId === a.userId;
2648
+ return { user: H ? a : v, isBot: H };
2639
2649
  });
2640
2650
  R(() => {
2641
- H && setTimeout(() => v.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } }), 25);
2642
- }, [!!H, v]);
2643
- const le = (E, U = !1) => {
2651
+ U && setTimeout(() => E.scrollPubSub.publish({ type: "scrollToBottom", data: { animated: !0 } }), 25);
2652
+ }, [!!U, E]);
2653
+ const le = (v, H = !1) => {
2644
2654
  var te;
2645
- return U ? a : ((te = b.channel) == null ? void 0 : te.members.find((G) => G.userId === E.sender.userId)) ?? E.sender;
2655
+ return H ? a : ((te = b.channel) == null ? void 0 : te.members.find((j) => j.userId === v.sender.userId)) ?? v.sender;
2646
2656
  }, _e = () => {
2647
2657
  if (!x.initialized)
2648
2658
  return /* @__PURE__ */ r.createElement(Ee, { type: "loading" });
2649
2659
  if (x.messages.length === 0) {
2650
- const E = w();
2651
- return E ? /* @__PURE__ */ r.createElement("div", { style: { width: "100%" } }, E) : /* @__PURE__ */ r.createElement(Ee, { type: "noMessages", label: m.PLACE_HOLDER__NO_MESSAGES });
2660
+ const v = w();
2661
+ return v ? /* @__PURE__ */ r.createElement("div", { style: { width: "100%" } }, v) : /* @__PURE__ */ r.createElement(Ee, { type: "noMessages", label: m.PLACE_HOLDER__NO_MESSAGES });
2652
2662
  }
2653
2663
  return /* @__PURE__ */ r.createElement(
2654
- il,
2664
+ ll,
2655
2665
  {
2656
- ref: v.scrollRef,
2657
- scrollPositionRef: v.scrollPositionRef,
2658
- scrollDistanceFromBottomRef: v.scrollDistanceFromBottomRef,
2659
- onScrollPosition: (E) => v.setIsScrollBottomReached(E === "bottom"),
2666
+ ref: E.scrollRef,
2667
+ scrollPositionRef: E.scrollPositionRef,
2668
+ scrollDistanceFromBottomRef: E.scrollDistanceFromBottomRef,
2669
+ onScrollPosition: (v) => E.setIsScrollBottomReached(v === "bottom"),
2660
2670
  stackDirection: l == null ? void 0 : l.messageStackDirection,
2661
2671
  messages: y,
2662
2672
  onLoadPrev: x.loadPrevious,
2663
2673
  onLoadNext: x.loadNext,
2664
2674
  depsForResetScrollPositionToBottom: [x.initialized, x.messages.length !== 0],
2665
- messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(fl, { style: { marginTop: 16 } }), w()),
2666
- messageBottomArea: /* @__PURE__ */ r.createElement(r.Fragment, null, H && /* @__PURE__ */ r.createElement(
2675
+ messageTopArea: /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(El, { style: { marginTop: 16 } }), w()),
2676
+ messageBottomArea: /* @__PURE__ */ r.createElement(r.Fragment, null, U && /* @__PURE__ */ r.createElement(
2667
2677
  t,
2668
2678
  {
2669
2679
  isTyping: !0,
2670
- sender: H,
2680
+ isBotMessage: U.isBot,
2681
+ sender: U.user,
2671
2682
  messageType: "user",
2672
2683
  groupType: "single",
2673
2684
  message: ""
2674
2685
  }
2675
- ), /* @__PURE__ */ r.createElement(El, null)),
2676
- overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !v.isScrollBottomReached && /* @__PURE__ */ r.createElement(Sl, { onClick: () => v.scrollPubSub.publish({ type: "scrollToBottom" }) })),
2677
- renderMessage: ({ message: E, index: U }) => {
2678
- const te = La(E), G = y[U - 1], Xe = y[U + 1], I = y[y.length - 1], A = E === I, L = Ra(E, G, Xe, Cl), j = !Rr((G == null ? void 0 : G.createdAt) ?? 0, E.createdAt) && _(U) && !f, fe = () => {
2679
- E.isFileMessage() && i(E);
2686
+ ), /* @__PURE__ */ r.createElement(Cl, null)),
2687
+ overlayArea: /* @__PURE__ */ r.createElement(r.Fragment, null, !E.isScrollBottomReached && /* @__PURE__ */ r.createElement(Al, { onClick: () => E.scrollPubSub.publish({ type: "scrollToBottom" }) })),
2688
+ renderMessage: ({ message: v, index: H }) => {
2689
+ const te = Da(v), j = y[H - 1], Xe = y[H + 1], I = y[y.length - 1], A = v === I, L = Ba(v, j, Xe, Sl), K = !Dr((j == null ? void 0 : j.createdAt) ?? 0, v.createdAt) && _(H) && !f, fe = () => {
2690
+ v.isFileMessage() && i(v);
2680
2691
  }, Se = () => {
2681
- E.isFileMessage() && On(E.url);
2682
- }, K = j ? /* @__PURE__ */ r.createElement(
2683
- Yn,
2692
+ v.isFileMessage() && Ln(v.url);
2693
+ }, Z = K ? /* @__PURE__ */ r.createElement(
2694
+ Jn,
2684
2695
  {
2685
2696
  style: { margin: "16px 0" },
2686
- date: E.createdAt,
2697
+ date: v.createdAt,
2687
2698
  locale: p,
2688
2699
  formatString: m.DATE_FORMAT__MESSAGE_LIST__DATE_SEPARATOR
2689
2700
  }
2690
2701
  ) : null, ne = {
2691
- maxBodyWidth: g.expanded ? Nn : void 0,
2692
- extendedMessagePayload: E.extendedMessagePayload,
2693
- createdAt: E.createdAt,
2702
+ maxBodyWidth: g.expanded ? Bn : void 0,
2703
+ extendedMessagePayload: v.extendedMessagePayload,
2704
+ createdAt: v.createdAt,
2694
2705
  groupType: L,
2695
2706
  onClickMedia: fe,
2696
2707
  onClickFile: Se
2697
2708
  }, we = (() => {
2698
- var ce, Mt;
2699
- if (ze.isAdmin(E))
2700
- return ze.isCSAT(E) ? h ? /* @__PURE__ */ r.createElement(
2709
+ var ce, Ot;
2710
+ if (ze.isAdmin(v))
2711
+ return ze.isCSAT(v) ? h ? /* @__PURE__ */ r.createElement(
2701
2712
  n,
2702
2713
  {
2703
2714
  ...ne,
2704
2715
  ...h,
2705
- isResolvedWhenDeterminedByUser: wl(h),
2716
+ isResolvedWhenDeterminedByUser: Il(h),
2706
2717
  messageType: "admin.csat",
2707
2718
  onSubmitCSAT: ({ csat: re, csatType: de, csatReason: V, isResolved: be }) => {
2708
- var Ot;
2709
- re && ((Ot = b.channel) == null || Ot.submitCSAT({ csat: re, csatType: de, csatReason: V, isResolved: be }));
2719
+ var Lt;
2720
+ re && ((Lt = b.channel) == null || Lt.submitCSAT({ csat: re, csatType: de, csatReason: V, isResolved: be }));
2710
2721
  }
2711
2722
  }
2712
- ) : null : /* @__PURE__ */ r.createElement(n, { ...ne, messageType: "admin", message: E.message });
2713
- if (ze.isOutgoing(E, s.userId)) {
2723
+ ) : null : /* @__PURE__ */ r.createElement(n, { ...ne, messageType: "admin", message: v.message });
2724
+ if (ze.isOutgoing(v, s.userId)) {
2714
2725
  const re = {
2715
2726
  ...ne,
2716
- message: E.message,
2717
- sender: le(E),
2718
- sendingStatus: E.sendingStatus
2727
+ message: v.message,
2728
+ sender: le(v),
2729
+ sendingStatus: v.sendingStatus
2719
2730
  };
2720
- if (E.isUserMessage())
2731
+ if (v.isUserMessage())
2721
2732
  return /* @__PURE__ */ r.createElement(e, { messageType: "user", ...re });
2722
- if (E.isFileMessage()) {
2723
- const [de, V] = ((ce = E.metaArrays.find((be) => be.key === Mn)) == null ? void 0 : ce.value) ?? [];
2733
+ if (v.isFileMessage()) {
2734
+ const [de, V] = ((ce = v.metaArrays.find((be) => be.key === On)) == null ? void 0 : ce.value) ?? [];
2724
2735
  return /* @__PURE__ */ r.createElement(
2725
2736
  e,
2726
2737
  {
2727
2738
  messageType: "file",
2728
- file: E,
2739
+ file: v,
2729
2740
  metadata: {
2730
2741
  aspectRatio: de && V ? `${de}/${V}` : "1/1",
2731
- localFile: (Mt = E.messageParams) == null ? void 0 : Mt.file
2742
+ localFile: (Ot = v.messageParams) == null ? void 0 : Ot.file
2732
2743
  },
2733
2744
  ...re
2734
2745
  }
2735
2746
  );
2736
2747
  }
2737
2748
  }
2738
- if (ze.isIncoming(E, s.userId)) {
2739
- const re = E.sender.userId === a.userId, de = {
2749
+ if (ze.isIncoming(v, s.userId)) {
2750
+ const re = v.sender.userId === a.userId, de = {
2740
2751
  ...ne,
2741
- sender: le(E, re),
2742
- message: E.message,
2752
+ sender: le(v, re),
2753
+ message: v.message,
2743
2754
  suggestedRepliesVisible: A,
2744
2755
  suggestedRepliesDirection: l == null ? void 0 : l.suggestedRepliesDirection,
2745
2756
  isBotMessage: re,
@@ -2752,124 +2763,124 @@ const fl = ({ style: e }) => {
2752
2763
  },
2753
2764
  onGetCachedMessageTemplate: (V) => O.getTemplate(V)
2754
2765
  };
2755
- if (E.isUserMessage())
2766
+ if (v.isUserMessage())
2756
2767
  return /* @__PURE__ */ r.createElement(t, { messageType: "user", ...de });
2757
- if (E.isFileMessage())
2758
- return /* @__PURE__ */ r.createElement(t, { messageType: "file", file: E, ...de });
2768
+ if (v.isFileMessage())
2769
+ return /* @__PURE__ */ r.createElement(t, { messageType: "file", file: v, ...de });
2759
2770
  }
2760
2771
  })();
2761
- return /* @__PURE__ */ r.createElement("div", { key: te, id: `${Z}-message-item` }, K, we);
2772
+ return /* @__PURE__ */ r.createElement("div", { key: te, id: `${Y}-message-item` }, Z, we);
2762
2773
  }
2763
2774
  }
2764
2775
  );
2765
2776
  };
2766
- return /* @__PURE__ */ r.createElement(_l, { id: `${Z}-message-list` }, _e(), o && /* @__PURE__ */ r.createElement(tl, { onClose: () => i(null), message: o }));
2767
- }, _l = c.div`overflow-y:hidden;display:flex;flex:1;position:relative;`, Sl = c(ul)`position:absolute;bottom:20px;inset-inline-end:20px;`;
2768
- function wl(e) {
2777
+ return /* @__PURE__ */ r.createElement(kl, { id: `${Y}-message-list` }, _e(), o && /* @__PURE__ */ r.createElement(ol, { onClose: () => i(null), message: o }));
2778
+ }, kl = c.div`overflow-y:hidden;display:flex;flex:1;position:relative;`, Al = c(pl)`position:absolute;bottom:20px;inset-inline-end:20px;`;
2779
+ function Il(e) {
2769
2780
  var t;
2770
2781
  if (((t = e == null ? void 0 : e.resolution) == null ? void 0 : t.determinedBy) === "user")
2771
2782
  return e.resolution.isResolved;
2772
2783
  }
2773
- const kl = () => {
2774
- const { stringSet: e } = M(), { connectionError: t } = F(), { channelSource: n } = Y(), o = t || n.error;
2784
+ const $l = () => {
2785
+ const { stringSet: e } = M(), { connectionError: t } = F(), { channelSource: n } = G(), o = t || n.error;
2775
2786
  if (o) {
2776
2787
  const i = t ? void 0 : { label: e.RETRY, onClick: () => n.refetch() };
2777
2788
  return /* @__PURE__ */ r.createElement(Ee, { type: "error", label: o.message, action: i });
2778
2789
  }
2779
- return n.channel ? /* @__PURE__ */ r.createElement(Tl, null) : /* @__PURE__ */ r.createElement(Ee, { type: "loading" });
2780
- }, Jn = () => {
2781
- const { stringSet: e } = M(), { activeChannel: t } = F(), [n] = C(() => (t == null ? void 0 : t.status) === z.OPEN);
2790
+ return n.channel ? /* @__PURE__ */ r.createElement(wl, null) : /* @__PURE__ */ r.createElement(Ee, { type: "loading" });
2791
+ }, Qn = () => {
2792
+ const { stringSet: e } = M(), { activeChannel: t } = F(), [n] = T(() => (t == null ? void 0 : t.status) === z.OPEN);
2782
2793
  return n ? e.RETURN_TO_CONVERSATION : e.START_NEW_CONVERSATION;
2783
- }, Al = () => {
2784
- const { stringSet: e } = M(), { goToActiveConversation: t } = Y(), n = Jn();
2785
- return /* @__PURE__ */ r.createElement(Il, null, /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.themedColor.textMidEmphasis }, e.CONVERSATION_CLOSED_FOOTER_LABEL), /* @__PURE__ */ r.createElement($l, { onClick: t }, /* @__PURE__ */ r.createElement(S, { variant: "button", color: u.themedColor.textHighEmphasis }, n)));
2786
- }, Il = c.div`display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 0;gap:14px;${B.light`
2794
+ }, Ml = () => {
2795
+ const { stringSet: e } = M(), { goToActiveConversation: t } = G(), n = Qn();
2796
+ return /* @__PURE__ */ r.createElement(Ol, null, /* @__PURE__ */ r.createElement(S, { variant: "body1", color: u.themedColor.textMidEmphasis }, e.CONVERSATION_CLOSED_FOOTER_LABEL), /* @__PURE__ */ r.createElement(Ll, { onClick: t }, /* @__PURE__ */ r.createElement(S, { variant: "button", color: u.themedColor.textHighEmphasis }, n)));
2797
+ }, Ol = c.div`display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 0;gap:14px;${B.light`
2787
2798
  background-color: ${u.color.background100};
2788
2799
  `}
2789
2800
  ${B.dark`
2790
2801
  background-color: ${u.color.background500};
2791
2802
  `}
2792
- `, $l = c.button`all:unset;padding:10px 20px;border-radius:6px;border:1px solid ${u.themedColor.textDisabled};cursor:pointer;${B.light`
2803
+ `, Ll = c.button`all:unset;padding:10px 20px;border-radius:6px;border:1px solid ${u.themedColor.textDisabled};cursor:pointer;${B.light`
2793
2804
  background-color: ${u.color.background50};
2794
2805
  `}
2795
2806
  ${B.dark`
2796
2807
  background-color: ${u.color.background700};
2797
2808
  `}
2798
- `, Xn = ye(void 0), Ml = ({ children: e }) => {
2799
- const { stringSet: t } = M(), { aiAgentInfo: n } = F(), [o, i] = C([]), [s, a] = C({
2809
+ `, er = ye(void 0), Rl = ({ children: e }) => {
2810
+ const { stringSet: t } = M(), { aiAgentInfo: n } = F(), { channelSource: o } = G(), [i, s] = T([]), [a, l] = T({
2800
2811
  visible: !1,
2801
2812
  title: "",
2802
2813
  buttonText: t.BUTTON__OK
2803
- }), l = n == null ? void 0 : n.replyToFile, d = (p) => {
2804
- if (!l) return;
2805
- const h = p.filter((b) => An.includes(b.type));
2806
- if (h.length !== 0) {
2807
- if (h.some((b) => b.size > Xo)) {
2808
- a((b) => ({
2809
- ...b,
2814
+ }), d = (n == null ? void 0 : n.replyToFile) || Dn(o.channel), g = (h) => {
2815
+ if (!d) return;
2816
+ const b = h.filter((x) => In.includes(x.type));
2817
+ if (b.length !== 0) {
2818
+ if (b.some((x) => x.size > ti)) {
2819
+ l((x) => ({
2820
+ ...x,
2810
2821
  visible: !0,
2811
2822
  title: t.FILE_UPLOAD_NOTIFICATION__SIZE_LIMIT.replace("%d", "25")
2812
2823
  }));
2813
2824
  return;
2814
2825
  }
2815
- if (h.length > 1 || h.length > 0 && o.length > 0) {
2816
- a((b) => ({
2817
- ...b,
2826
+ if (b.length > 1 || b.length > 0 && i.length > 0) {
2827
+ l((x) => ({
2828
+ ...x,
2818
2829
  visible: !0,
2819
2830
  title: t.FILE_UPLOAD_NOTIFICATION__COUNT_LIMIT
2820
2831
  }));
2821
2832
  return;
2822
2833
  }
2823
- i((b) => [
2824
- ...b,
2825
- ...h.map((x) => ({
2826
- file: x,
2827
- preview: { url: URL.createObjectURL(x), type: x.type, name: x.name }
2834
+ s((x) => [
2835
+ ...x,
2836
+ ...b.map((E) => ({
2837
+ file: E,
2838
+ preview: { url: URL.createObjectURL(E), type: E.type, name: E.name }
2828
2839
  }))
2829
2840
  ]);
2830
2841
  }
2831
- }, g = (p) => {
2832
- i((h) => {
2833
- var x;
2834
- const b = (x = h[p]) == null ? void 0 : x.preview;
2835
- return b && URL.revokeObjectURL(b.url), h.filter((v, f) => f !== p);
2842
+ }, m = (h) => {
2843
+ s((b) => {
2844
+ var E;
2845
+ const x = (E = b[h]) == null ? void 0 : E.preview;
2846
+ return x && URL.revokeObjectURL(x.url), b.filter((f, y) => y !== h);
2836
2847
  });
2837
- }, m = () => {
2838
- i((p) => (p.forEach((h) => URL.revokeObjectURL(h.preview.url)), []));
2848
+ }, p = () => {
2849
+ s((h) => (h.forEach((b) => URL.revokeObjectURL(b.preview.url)), []));
2839
2850
  };
2840
2851
  return /* @__PURE__ */ r.createElement(
2841
- Xn.Provider,
2852
+ er.Provider,
2842
2853
  {
2843
2854
  value: {
2844
- files: o,
2845
- addFiles: d,
2846
- removeFile: g,
2847
- clearFiles: m,
2848
- isFileUploadEnabled: l
2855
+ files: i,
2856
+ addFiles: g,
2857
+ removeFile: m,
2858
+ clearFiles: p,
2859
+ isFileUploadEnabled: d
2849
2860
  }
2850
2861
  },
2851
2862
  e,
2852
- /* @__PURE__ */ r.createElement(Ol, { ...s, onClose: () => a((p) => ({ ...p, visible: !1, title: "" })) })
2863
+ /* @__PURE__ */ r.createElement(Nl, { ...a, onClose: () => l((h) => ({ ...h, visible: !1, title: "" })) })
2853
2864
  );
2854
- }, kt = () => {
2855
- const e = J(Xn);
2865
+ }, At = () => {
2866
+ const e = J(er);
2856
2867
  if (!e)
2857
2868
  throw new Error("useFileUpload must be used within FileUploadProvider");
2858
2869
  return e;
2859
- }, Ol = ({
2870
+ }, Nl = ({
2860
2871
  title: e,
2861
2872
  buttonText: t,
2862
2873
  visible: n,
2863
2874
  onClose: o
2864
- }) => /* @__PURE__ */ r.createElement(Kn, { rootElementId: X.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(Ll, null, /* @__PURE__ */ r.createElement(Nl, null, /* @__PURE__ */ r.createElement(S, { variant: "h1", color: u.themedColor.textHighEmphasis }, e)), /* @__PURE__ */ r.createElement(Rl, null, /* @__PURE__ */ r.createElement(Dl, { onClick: o }, /* @__PURE__ */ r.createElement(S, { variant: "button", color: u.themedColor.textHighEmphasisInverse }, t))))), Ll = c.div`width:100%;height:auto;padding-block:18px 24px;padding-inline:24px;margin:0 auto;border-radius:4px;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, Rl = c.div`display:flex;flex-direction:row;justify-content:flex-end;`, Nl = c.div`margin-bottom:16px;`, Dl = c.button`display:flex;justify-content:center;align-items:center;border-radius:4px;cursor:pointer;background-color:${u.themedColor.error};border:1px solid ${u.themedColor.error};padding:10px 16px;&:hover{background-color:${u.color.error.dark};border-color:${u.color.error.dark};}&:active{background-color:${u.color.error.extraDark};}`;
2865
- function Bl({ blurred: e, elementRef: t, document: n = window.document }) {
2875
+ }) => /* @__PURE__ */ r.createElement(Yn, { rootElementId: X.WINDOW, visible: n, onClose: o }, /* @__PURE__ */ r.createElement(Dl, null, /* @__PURE__ */ r.createElement(Pl, null, /* @__PURE__ */ r.createElement(S, { variant: "h1", color: u.themedColor.textHighEmphasis }, e)), /* @__PURE__ */ r.createElement(Bl, null, /* @__PURE__ */ r.createElement(Fl, { onClick: o }, /* @__PURE__ */ r.createElement(S, { variant: "button", color: u.themedColor.textHighEmphasisInverse }, t))))), Dl = c.div`width:100%;height:auto;padding-block:18px 24px;padding-inline:24px;margin:0 auto;border-radius:4px;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, Bl = c.div`display:flex;flex-direction:row;justify-content:flex-end;`, Pl = c.div`margin-bottom:16px;`, Fl = c.button`display:flex;justify-content:center;align-items:center;border-radius:4px;cursor:pointer;background-color:${u.themedColor.error};border:1px solid ${u.themedColor.error};padding:10px 16px;&:hover{background-color:${u.color.error.dark};border-color:${u.color.error.dark};}&:active{background-color:${u.color.error.extraDark};}`;
2876
+ function Hl({ blurred: e, elementRef: t, document: n = window.document }) {
2866
2877
  const o = D(!1);
2867
2878
  e && t.current && n.activeElement === t.current && (o.current = !0), ge(() => {
2868
2879
  var i;
2869
2880
  !e && o.current && ((i = t.current) == null || i.focus(), o.current = !1);
2870
2881
  }, [e]);
2871
2882
  }
2872
- const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex;flex-direction:row;gap:10px;padding:8px 16px;background-color:transparent;`, Fl = c.div`display:flex;flex-shrink:0;position:relative;margin-block-start:8px;border-radius:12px;height:64px;img{border-radius:12px;object-fit:cover;width:64px;-webkit-user-drag:none;}`, Hl = c.div`display:flex;align-items:center;justify-content:center;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;cursor:pointer;border-radius:50%;${B.light`
2883
+ const Ul = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex;flex-direction:row;gap:10px;padding:8px 16px;background-color:transparent;`, zl = c.div`display:flex;flex-shrink:0;position:relative;margin-block-start:8px;border-radius:12px;height:64px;img{border-radius:12px;object-fit:cover;width:64px;-webkit-user-drag:none;}`, Wl = c.div`display:flex;align-items:center;justify-content:center;position:absolute;inset-inline-end:-8px;inset-block-start:-8px;cursor:pointer;border-radius:50%;${B.light`
2873
2884
  background-color: ${u.color.background50};
2874
2885
  `}
2875
2886
  ${B.dark`
@@ -2888,19 +2899,19 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2888
2899
  circle {
2889
2900
  stroke: ${u.themedColor.bg_50_600};
2890
2901
  }
2891
- `, Ul = () => {
2892
- const e = Le(), [t, n] = C(), { files: o, removeFile: i, isFileUploadEnabled: s } = kt();
2893
- return !s || o.length === 0 ? null : /* @__PURE__ */ r.createElement(Pl, null, o.map(({ preview: { type: a, name: l, url: d } }, g) => /* @__PURE__ */ r.createElement(Fl, { key: d, onMouseOver: () => n(g), onMouseLeave: () => n(void 0) }, (e || t === g) && /* @__PURE__ */ r.createElement(Hl, { title: "Remove file", onClick: () => i(g) }, /* @__PURE__ */ r.createElement($, { type: "close-filled", color: u.themedColor.textMidEmphasis })), a.startsWith("image/") ? /* @__PURE__ */ r.createElement("img", { alt: "file-image", src: d }) : /* @__PURE__ */ r.createElement(Et, { name: l, type: xt(l, a) }))));
2894
- }, zl = ({ channel: e, messages: t }) => {
2895
- const { stringSet: n } = M(), { aiAgentInfo: o } = F(), i = Wl(), s = Vl({
2902
+ `, Vl = () => {
2903
+ const e = Le(), [t, n] = T(), { files: o, removeFile: i, isFileUploadEnabled: s } = At();
2904
+ return !s || o.length === 0 ? null : /* @__PURE__ */ r.createElement(Ul, null, o.map(({ preview: { type: a, name: l, url: d } }, g) => /* @__PURE__ */ r.createElement(zl, { key: d, onMouseOver: () => n(g), onMouseLeave: () => n(void 0) }, (e || t === g) && /* @__PURE__ */ r.createElement(Wl, { title: "Remove file", onClick: () => i(g) }, /* @__PURE__ */ r.createElement($, { type: "close-filled", color: u.themedColor.textMidEmphasis })), a.startsWith("image/") ? /* @__PURE__ */ r.createElement("img", { alt: "file-image", src: d }) : /* @__PURE__ */ r.createElement(vt, { name: l, type: Et(l, a) }))));
2905
+ }, Gl = ({ channel: e, messages: t }) => {
2906
+ const { stringSet: n } = M(), { aiAgentInfo: o } = F(), i = jl(), s = Kl({
2896
2907
  lastMessage: t[t.length - 1],
2897
2908
  aiAgentUserId: o.userId
2898
2909
  });
2899
- return !e || !i || Ln(e) ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__DISABLED] : s ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__WAIT_AI_AGENT_RESPONSE] : [!1, n.MESSAGE_INPUT__PLACE_HOLDER];
2900
- }, Wl = () => {
2901
- const e = un(), { chatSDK: t } = N(), [n, o] = C(!0);
2910
+ return !e || !i || Rn(e) ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__DISABLED] : s ? [!0, n.MESSAGE_INPUT__PLACE_HOLDER__WAIT_AI_AGENT_RESPONSE] : [!1, n.MESSAGE_INPUT__PLACE_HOLDER];
2911
+ }, jl = () => {
2912
+ const e = mn(), { chatSDK: t } = N(), [n, o] = T(!0);
2902
2913
  return R(() => {
2903
- const i = new dt({
2914
+ const i = new ut({
2904
2915
  onDisconnected: () => o(!1),
2905
2916
  onConnected: () => o(!0),
2906
2917
  onReconnectSucceeded: () => o(!0)
@@ -2909,23 +2920,23 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2909
2920
  t.removeConnectionHandler(e);
2910
2921
  };
2911
2922
  }, [t]), n;
2912
- }, Vl = ({
2923
+ }, Kl = ({
2913
2924
  lastMessage: e,
2914
2925
  aiAgentUserId: t
2915
2926
  }) => {
2916
- const [n, o] = C(!1), i = qn();
2927
+ const [n, o] = T(!1), i = Xn();
2917
2928
  return R(() => {
2918
2929
  if (!e) return;
2919
- const s = i.some((l) => l.userId === t), a = Vn(e, t) && wt.isStreaming(e);
2930
+ const s = i.some((l) => l.userId === t), a = jn(e, t) && kt.isStreaming(e);
2920
2931
  o(!!(a || s));
2921
2932
  }, [i, e, t]), n;
2922
- }, Qn = {
2933
+ }, tr = {
2923
2934
  textArea: k`min-height:40px;height:40px;font-size:16px;line-height:24px;`,
2924
2935
  attachIcon: k`margin-bottom:4px;`
2925
- }, er = c.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, Gl = c(er)`flex-shrink:0;margin-inline-end:12px;margin-bottom:2px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{path{fill:${u.themedColor.textHighEmphasis};}}&:active{border-radius:4px;background-color:${u.themedColor.bg_200_400};}}${pt && Qn.attachIcon};`, jl = c.input`display:none;`, en = c.div`width:100%;position:relative;background-color:${u.themedColor.bg_100_500};border-radius:20px;`, tn = c.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, nn = c.textarea`all:unset;display:block;flex:1;min-width:0;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;font-size:14px;line-height:20px;color:${u.themedColor.textHighEmphasis};resize:none;width:100%;height:${kn}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${pt && Qn.textArea};&::placeholder{color:${u.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${u.themedColor.textDisabled};}}`, rn = c.div`padding:12px 16px;position:relative;display:flex;align-items:center;`, on = ({ disabled: e }) => {
2926
- const t = D(null), { addFiles: n, clearFiles: o, files: i, isFileUploadEnabled: s } = kt();
2936
+ }, nr = c.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, Zl = c(nr)`flex-shrink:0;margin-inline-end:12px;margin-bottom:2px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{path{fill:${u.themedColor.textHighEmphasis};}}&:active{border-radius:4px;background-color:${u.themedColor.bg_200_400};}}${ht && tr.attachIcon};`, Yl = c.input`display:none;`, tn = c.div`width:100%;position:relative;background-color:${u.themedColor.bg_100_500};border-radius:20px;`, nn = c.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, rn = c.textarea`all:unset;display:block;flex:1;min-width:0;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:12px;box-sizing:border-box;font-size:14px;line-height:20px;color:${u.themedColor.textHighEmphasis};resize:none;width:100%;height:${An}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${ht && tr.textArea};&::placeholder{color:${u.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${u.themedColor.textDisabled};}}`, on = c.div`padding:12px 16px;position:relative;display:flex;align-items:center;`, sn = ({ disabled: e }) => {
2937
+ const t = D(null), { addFiles: n, clearFiles: o, files: i, isFileUploadEnabled: s } = At();
2927
2938
  return !s || i.length > 0 ? null : /* @__PURE__ */ r.createElement(
2928
- Gl,
2939
+ Zl,
2929
2940
  {
2930
2941
  disabled: e,
2931
2942
  onClick: () => {
@@ -2942,7 +2953,7 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2942
2953
  }
2943
2954
  ),
2944
2955
  /* @__PURE__ */ r.createElement(
2945
- jl,
2956
+ Yl,
2946
2957
  {
2947
2958
  type: "file",
2948
2959
  ref: t,
@@ -2950,24 +2961,24 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2950
2961
  const l = a.currentTarget.files;
2951
2962
  l && n(Array.from(l)), a.target.value = "";
2952
2963
  },
2953
- accept: An.join(",")
2964
+ accept: In.join(",")
2954
2965
  }
2955
2966
  )
2956
2967
  );
2957
- }, Kl = () => {
2958
- const e = D(null), [t, n] = C(""), { rootElement: o } = N(), { channelSource: i, messageSource: s } = Y(), [a, l] = zl({
2968
+ }, ql = () => {
2969
+ const e = D(null), [t, n] = T(""), { rootElement: o } = N(), { channelSource: i, messageSource: s } = G(), [a, l] = Gl({
2959
2970
  channel: i.channel,
2960
2971
  messages: s.messages
2961
- }), { files: d, addFiles: g, clearFiles: m } = kt();
2962
- fi({ onDropFiles: g }), Bl({ blurred: a, elementRef: e, document: pe(o) });
2972
+ }), { files: d, addFiles: g, clearFiles: m } = At();
2973
+ Ei({ onDropFiles: g }), Hl({ blurred: a, elementRef: e, document: pe(o) });
2963
2974
  const p = t.trim().length > 0, h = d.length > 0, b = !a && (p || h), x = () => {
2964
2975
  e.current && (e.current.value = "", e.current.style.height = ""), m(), n("");
2965
- }, v = async () => {
2976
+ }, E = async () => {
2966
2977
  const w = t.trim(), O = { message: w };
2967
2978
  if (!(!w && !d.length)) {
2968
2979
  if (d.length > 0) {
2969
- const ee = d[0].file, H = { ...O, file: ee };
2970
- s.sendFileMessage(H), x();
2980
+ const ee = d[0].file, U = { ...O, file: ee };
2981
+ s.sendFileMessage(U), x();
2971
2982
  return;
2972
2983
  }
2973
2984
  s.sendUserMessage(O), x();
@@ -2976,17 +2987,17 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2976
2987
  const O = Array.from(w.clipboardData.files);
2977
2988
  O.length > 0 && (w.preventDefault(), g(O));
2978
2989
  }, y = (w) => {
2979
- w.key !== "Enter" || w.nativeEvent.isComposing || w.shiftKey || (w.preventDefault(), v());
2990
+ w.key !== "Enter" || w.nativeEvent.isComposing || w.shiftKey || (w.preventDefault(), E());
2980
2991
  }, _ = (w) => {
2981
2992
  if (e.current) {
2982
2993
  e.current.style.height = "";
2983
- const O = Math.min(Jo, e.current.scrollHeight);
2984
- kn < O && (e.current.style.height = `${O}px`);
2994
+ const O = Math.min(ei, e.current.scrollHeight);
2995
+ An < O && (e.current.style.height = `${O}px`);
2985
2996
  }
2986
2997
  n(w.target.value);
2987
2998
  };
2988
- return a ? /* @__PURE__ */ r.createElement(rn, null, /* @__PURE__ */ r.createElement(en, null, /* @__PURE__ */ r.createElement(tn, null, /* @__PURE__ */ r.createElement(nn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(on, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(rn, null, /* @__PURE__ */ r.createElement(en, null, /* @__PURE__ */ r.createElement(Ul, null), /* @__PURE__ */ r.createElement(tn, null, /* @__PURE__ */ r.createElement(
2989
- nn,
2999
+ return a ? /* @__PURE__ */ r.createElement(on, null, /* @__PURE__ */ r.createElement(tn, null, /* @__PURE__ */ r.createElement(nn, null, /* @__PURE__ */ r.createElement(rn, { disabled: !0, placeholder: l }), /* @__PURE__ */ r.createElement(sn, { disabled: !0 })))) : /* @__PURE__ */ r.createElement(on, null, /* @__PURE__ */ r.createElement(tn, null, /* @__PURE__ */ r.createElement(Vl, null), /* @__PURE__ */ r.createElement(nn, null, /* @__PURE__ */ r.createElement(
3000
+ rn,
2990
3001
  {
2991
3002
  ref: e,
2992
3003
  role: "textbox",
@@ -2997,24 +3008,24 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
2997
3008
  onChange: _,
2998
3009
  onPaste: f
2999
3010
  }
3000
- ), /* @__PURE__ */ r.createElement(on, null))), b && /* @__PURE__ */ r.createElement(er, { onClick: () => v() }, /* @__PURE__ */ r.createElement($, { type: "send", color: u.color.primary.main, size: 20 })));
3001
- }, Zl = c.div`padding:8px 16px;text-align:center;word-break:break-word;white-space:pre-wrap;line-height:1.43;letter-spacing:-0.2px;font-size:14px;font-weight:400;color:${u.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${B.light`
3011
+ ), /* @__PURE__ */ r.createElement(sn, null))), b && /* @__PURE__ */ r.createElement(nr, { onClick: () => E() }, /* @__PURE__ */ r.createElement($, { type: "send", color: u.color.primary.main, size: 20 })));
3012
+ }, Jl = c.div`padding:8px 16px;text-align:center;word-break:break-word;white-space:pre-wrap;line-height:1.43;letter-spacing:-0.2px;font-size:14px;font-weight:400;color:${u.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${B.light`
3002
3013
  color: ${u.color.information.light};
3003
3014
  `};
3004
3015
  ${B.dark`
3005
3016
  color: ${u.color.information.main};
3006
3017
  `};
3007
3018
  }
3008
- `, Yl = T(() => import("./BvhxxGUf.js").then((e) => ({ default: e.MarkdownText }))), ql = () => {
3009
- const { aiAgentInfo: e } = F(), { messageSource: t } = Y(), { userSession: n } = F();
3010
- return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((i) => Vn(i, n.userId))) ? null : /* @__PURE__ */ r.createElement(Zl, null, /* @__PURE__ */ r.createElement(Yl, null, e.specialNotice));
3011
- }, Jl = () => /* @__PURE__ */ r.createElement(Xl, null, /* @__PURE__ */ r.createElement(ql, null), /* @__PURE__ */ r.createElement(Ml, null, /* @__PURE__ */ r.createElement(Kl, null))), Xl = c.div`z-index:0;border:none;width:100%;`, Ql = () => {
3019
+ `, Xl = C(() => import("./HxsmHNdw.js").then((e) => ({ default: e.MarkdownText }))), Ql = () => {
3020
+ const { aiAgentInfo: e } = F(), { messageSource: t } = G(), { userSession: n } = F();
3021
+ return !e.specialNoticeEnabled || !e.specialNotice || !(t.initialized && !t.messages.some((i) => jn(i, n.userId))) ? null : /* @__PURE__ */ r.createElement(Jl, null, /* @__PURE__ */ r.createElement(Xl, null, e.specialNotice));
3022
+ }, ec = () => /* @__PURE__ */ r.createElement(tc, null, /* @__PURE__ */ r.createElement(Ql, null), /* @__PURE__ */ r.createElement(Rl, null, /* @__PURE__ */ r.createElement(ql, null))), tc = c.div`z-index:0;border:none;width:100%;`, nc = () => {
3012
3023
  var s, a, l;
3013
- const { activeChannel: e } = F(), { channelSource: t } = Y(), n = ((a = (s = t.channel) == null ? void 0 : s.conversation) == null ? void 0 : a.status) === z.CLOSED;
3014
- return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(Al, null) : /* @__PURE__ */ r.createElement(Jl, null);
3015
- }, ec = () => {
3024
+ const { activeChannel: e } = F(), { channelSource: t } = G(), n = ((a = (s = t.channel) == null ? void 0 : s.conversation) == null ? void 0 : a.status) === z.CLOSED;
3025
+ return !(((l = t.channel) == null ? void 0 : l.url) === (e == null ? void 0 : e.url)) && n ? /* @__PURE__ */ r.createElement(Ml, null) : /* @__PURE__ */ r.createElement(ec, null);
3026
+ }, rc = () => {
3016
3027
  var _;
3017
- const { state: e, logger: t, enableCloseConversationButton: n, enableExpandButton: o, dispatcher: i } = N(), { stringSet: s } = M(), { aiAgentInfo: a, activeChannel: l } = F(), { channelSource: d, onNavigateToConversationList: g } = Y(), m = d.channel, h = Le() ? 24 : 16, b = () => {
3028
+ const { state: e, logger: t, enableCloseConversationButton: n, enableExpandButton: o, dispatcher: i } = N(), { stringSet: s } = M(), { aiAgentInfo: a, activeChannel: l } = F(), { channelSource: d, onNavigateToConversationList: g } = G(), m = d.channel, h = Le() ? 24 : 16, b = () => {
3018
3029
  e.setOpened(!1);
3019
3030
  }, x = async () => {
3020
3031
  try {
@@ -3023,106 +3034,106 @@ const Pl = c.div`&::-webkit-scrollbar{display:none;}overflow-x:auto;display:flex
3023
3034
  } catch (w) {
3024
3035
  t.error("conversation.handleAgentHandoff: error", w);
3025
3036
  }
3026
- }, v = async () => {
3027
- m && await i.send(Jr.CloseConversation());
3037
+ }, E = async () => {
3038
+ m && await i.send(Qr.CloseConversation());
3028
3039
  }, f = l && (m == null ? void 0 : m.url) === l.url, y = a.showHandoffButton && !!((_ = m == null ? void 0 : m.conversation) != null && _.handoff) && f;
3029
- return /* @__PURE__ */ r.createElement(ic, null, /* @__PURE__ */ r.createElement(sc, null, g && /* @__PURE__ */ r.createElement(Ne, { onClick: () => g() }, /* @__PURE__ */ r.createElement($, { type: "menu", size: 24, color: u.themedColor.textHighEmphasis })), f && /* @__PURE__ */ r.createElement(Zn, { size: 34 }), /* @__PURE__ */ r.createElement(lc, { variant: "h2", color: u.themedColor.textHighEmphasis }, a.nickname || (m == null ? void 0 : m.name))), /* @__PURE__ */ r.createElement(ac, null, y && /* @__PURE__ */ r.createElement(
3030
- oc,
3040
+ return /* @__PURE__ */ r.createElement(lc, null, /* @__PURE__ */ r.createElement(cc, null, g && /* @__PURE__ */ r.createElement(Ne, { onClick: () => g() }, /* @__PURE__ */ r.createElement($, { type: "menu", size: 24, color: u.themedColor.textHighEmphasis })), f && /* @__PURE__ */ r.createElement(qn, { size: 34 }), /* @__PURE__ */ r.createElement(uc, { variant: "h2", color: u.themedColor.textHighEmphasis }, a.nickname || (m == null ? void 0 : m.name))), /* @__PURE__ */ r.createElement(dc, null, y && /* @__PURE__ */ r.createElement(
3041
+ ac,
3031
3042
  {
3032
3043
  tooltipLabel: s.HEADER_BUTTON__AGENT_HANDOFF,
3033
- disabled: !hi(m),
3044
+ disabled: !xi(m),
3034
3045
  size: h,
3035
3046
  onClick: x
3036
3047
  }
3037
3048
  ), n && /* @__PURE__ */ r.createElement(
3038
- rc,
3049
+ sc,
3039
3050
  {
3040
- disabled: !Rn(m),
3051
+ disabled: !Nn(m),
3041
3052
  size: h,
3042
- onClick: v
3053
+ onClick: E
3043
3054
  }
3044
- ), o && /* @__PURE__ */ r.createElement(tc, { size: h }), /* @__PURE__ */ r.createElement(nc, { size: h, onClick: b })));
3045
- }, tc = ({ size: e, disabled: t }) => {
3055
+ ), o && /* @__PURE__ */ r.createElement(oc, { size: h }), /* @__PURE__ */ r.createElement(ic, { size: h, onClick: b })));
3056
+ }, oc = ({ size: e, disabled: t }) => {
3046
3057
  const { state: n } = N();
3047
3058
  return /* @__PURE__ */ r.createElement(Ne, { "aria-label": "expand", onClick: () => n.setExpanded(!n.expanded), disabled: t }, /* @__PURE__ */ r.createElement($, { type: n.expanded ? "collapse" : "expand", size: e, color: u.themedColor.textHighEmphasis }));
3048
- }, nc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Ne, { "aria-label": "close messenger", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement($, { type: "close", size: e, color: u.themedColor.textHighEmphasis })), rc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Ne, { "aria-label": "close conversation", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(
3059
+ }, ic = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Ne, { "aria-label": "close messenger", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement($, { type: "close", size: e, color: u.themedColor.textHighEmphasis })), sc = ({ size: e, disabled: t, onClick: n }) => /* @__PURE__ */ r.createElement(Ne, { "aria-label": "close conversation", onClick: n, disabled: t }, /* @__PURE__ */ r.createElement(
3049
3060
  $,
3050
3061
  {
3051
3062
  type: "refresh",
3052
3063
  size: e,
3053
3064
  color: t ? u.themedColor.textDisabled : u.themedColor.textHighEmphasis
3054
3065
  }
3055
- )), oc = ({ size: e, onClick: t, disabled: n, tooltipLabel: o }) => /* @__PURE__ */ r.createElement(zn, { label: o, position: "bottom", disabled: n }, /* @__PURE__ */ r.createElement(Ne, { "aria-label": "agent", onClick: t, disabled: n }, /* @__PURE__ */ r.createElement(
3066
+ )), ac = ({ size: e, onClick: t, disabled: n, tooltipLabel: o }) => /* @__PURE__ */ r.createElement(Vn, { label: o, position: "bottom", disabled: n }, /* @__PURE__ */ r.createElement(Ne, { "aria-label": "agent", onClick: t, disabled: n }, /* @__PURE__ */ r.createElement(
3056
3067
  $,
3057
3068
  {
3058
3069
  type: "agent",
3059
3070
  size: e,
3060
3071
  color: n ? u.themedColor.textDisabled : u.themedColor.textHighEmphasis
3061
3072
  }
3062
- ))), ic = c.div`height:56px;box-sizing:border-box;display:flex;align-items:center;padding:11px 12px;border-bottom:1px solid ${u.themedColor.textDisabled};background-color:${({ theme: e }) => e.colors.base.headerBackground};`, sc = c.div`display:flex;flex:1;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, ac = c.div`display:flex;gap:10px;align-items:center;justify-content:center;`, lc = c(S)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, Ne = c.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, cc = () => {
3063
- const { isDashboardActionbookTester: e } = St();
3064
- return e ? null : /* @__PURE__ */ r.createElement(ec, null);
3065
- }, sn = ({
3073
+ ))), lc = c.div`height:56px;box-sizing:border-box;display:flex;align-items:center;padding:11px 12px;border-bottom:1px solid ${u.themedColor.textDisabled};background-color:${({ theme: e }) => e.colors.base.headerBackground};`, cc = c.div`display:flex;flex:1;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, dc = c.div`display:flex;gap:10px;align-items:center;justify-content:center;`, uc = c(S)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, Ne = c.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, mc = () => {
3074
+ const { isDashboardActionbookTester: e } = wt();
3075
+ return e ? null : /* @__PURE__ */ r.createElement(rc, null);
3076
+ }, an = ({
3066
3077
  children: e,
3067
3078
  onNavigateToConversationList: t,
3068
3079
  closedChannelUrl: n,
3069
3080
  onClearClosedChannelUrl: o
3070
3081
  }) => {
3071
- const { Template: i } = At.useContext();
3082
+ const { Template: i } = It.useContext();
3072
3083
  return /* @__PURE__ */ r.createElement(
3073
- pi,
3084
+ bi,
3074
3085
  {
3075
3086
  onNavigateToConversationList: t,
3076
3087
  closedChannelUrl: n,
3077
3088
  onClearClosedChannelUrl: o
3078
3089
  },
3079
- /* @__PURE__ */ r.createElement(lt, null, /* @__PURE__ */ r.createElement(lt.Consumer, null, (s) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(uc, { ...s }, /* @__PURE__ */ r.createElement(i, null)), e)))
3090
+ /* @__PURE__ */ r.createElement(lt, null, /* @__PURE__ */ r.createElement(lt.Consumer, null, (s) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(pc, { ...s }, /* @__PURE__ */ r.createElement(i, null)), e)))
3080
3091
  );
3081
- }, At = Ce({
3082
- template: dc,
3092
+ }, It = Ce({
3093
+ template: gc,
3083
3094
  components: {
3084
- Header: cc,
3085
- Body: kl,
3086
- Footer: Ql
3095
+ Header: mc,
3096
+ Body: $l,
3097
+ Footer: nc
3087
3098
  }
3088
3099
  });
3089
- function dc() {
3090
- const { components: e } = At.useContext();
3100
+ function gc() {
3101
+ const { components: e } = It.useContext();
3091
3102
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
3092
3103
  }
3093
- const uc = c.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
3094
- Provider: mc,
3095
- useContext: tr
3104
+ const pc = c.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
3105
+ Provider: hc,
3106
+ useContext: rr
3096
3107
  } = W("ConversationList");
3097
- function gc({
3108
+ function fc({
3098
3109
  onOpenConversationView: e = Ge,
3099
3110
  children: t
3100
3111
  }) {
3101
- return /* @__PURE__ */ r.createElement(ro, null, (n) => /* @__PURE__ */ r.createElement(mc, { value: { ...n, onOpenConversationView: e } }, t));
3112
+ return /* @__PURE__ */ r.createElement(io, null, (n) => /* @__PURE__ */ r.createElement(hc, { value: { ...n, onOpenConversationView: e } }, t));
3102
3113
  }
3103
- const nr = Ce({
3104
- template: pc,
3114
+ const or = Ce({
3115
+ template: bc,
3105
3116
  // Note: 리스트 변경되면 디자인 변경 가능성이 있어서 일단 컴포넌트는 비워둠
3106
3117
  components: {}
3107
3118
  });
3108
- function pc({
3119
+ function bc({
3109
3120
  title: e = "",
3110
3121
  lastMessageTimestamp: t = Date.now(),
3111
3122
  onClick: n
3112
3123
  }) {
3113
3124
  const { stringSet: o, format: i } = M();
3114
- return /* @__PURE__ */ r.createElement(hc, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ r.createElement(bc, null, /* @__PURE__ */ r.createElement(xc, null, /* @__PURE__ */ r.createElement(S, { variant: "subtitle1", color: u.themedColor.textHighEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE)), /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textLowEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION))), /* @__PURE__ */ r.createElement(S, { variant: "body3", color: u.themedColor.textMidEmphasis }, e || o.CONVERSATION_LIST__TOPICS_FALLBACK)), /* @__PURE__ */ r.createElement($, { type: "chevron-right", size: 16, color: u.themedColor.textHighEmphasis }), /* @__PURE__ */ r.createElement(fc, null));
3125
+ return /* @__PURE__ */ r.createElement(xc, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ r.createElement(vc, null, /* @__PURE__ */ r.createElement(yc, null, /* @__PURE__ */ r.createElement(S, { variant: "subtitle1", color: u.themedColor.textHighEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE)), /* @__PURE__ */ r.createElement(S, { variant: "caption2", color: u.themedColor.textLowEmphasis }, i(t, o.DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION))), /* @__PURE__ */ r.createElement(S, { variant: "body3", color: u.themedColor.textMidEmphasis }, e || o.CONVERSATION_LIST__TOPICS_FALLBACK)), /* @__PURE__ */ r.createElement($, { type: "chevron-right", size: 16, color: u.themedColor.textHighEmphasis }), /* @__PURE__ */ r.createElement(Ec, null));
3115
3126
  }
3116
- const hc = c.div`display:flex;flex-direction:row;align-items:center;position:relative;width:100%;padding:14px 16px;box-sizing:border-box;gap:4px;cursor:pointer;`, fc = c.div`position:absolute;bottom:0;height:1px;width:calc(100% - 32px);background-color:${u.themedColor.textDisabled};`, bc = c.div`gap:4px;display:flex;flex-direction:column;flex:1;`, xc = c.div`display:flex;justify-content:flex-start;align-items:center;gap:6px;`, Ec = ({ items: e, renderItem: t, onEndReached: n }) => {
3127
+ const xc = c.div`display:flex;flex-direction:row;align-items:center;position:relative;width:100%;padding:14px 16px;box-sizing:border-box;gap:4px;cursor:pointer;`, Ec = c.div`position:absolute;bottom:0;height:1px;width:calc(100% - 32px);background-color:${u.themedColor.textDisabled};`, vc = c.div`gap:4px;display:flex;flex-direction:column;flex:1;`, yc = c.div`display:flex;justify-content:flex-start;align-items:center;gap:6px;`, Cc = ({ items: e, renderItem: t, onEndReached: n }) => {
3117
3128
  const o = (i) => {
3118
3129
  const s = i.target;
3119
3130
  s.scrollHeight - s.scrollTop === s.clientHeight && (n == null || n());
3120
3131
  };
3121
- return /* @__PURE__ */ r.createElement(vc, { onScroll: (i) => o(i) }, e.map((i, s) => t(i, s)));
3122
- }, vc = c.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;`, yc = () => {
3123
- const { stringSet: e } = M(), { listSource: t, onOpenConversationView: n } = tr(), { Template: o } = nr.useContext();
3132
+ return /* @__PURE__ */ r.createElement(Tc, { onScroll: (i) => o(i) }, e.map((i, s) => t(i, s)));
3133
+ }, Tc = c.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;`, _c = () => {
3134
+ const { stringSet: e } = M(), { listSource: t, onOpenConversationView: n } = rr(), { Template: o } = or.useContext();
3124
3135
  return t.initialized ? t.conversations.length === 0 ? /* @__PURE__ */ r.createElement(Ee, { type: "noChannels", label: e.CONVERSATION_LIST__NO_CONVERSATIONS }) : /* @__PURE__ */ r.createElement(
3125
- Ec,
3136
+ Cc,
3126
3137
  {
3127
3138
  items: t.conversations,
3128
3139
  renderItem: (i, s) => {
@@ -3143,10 +3154,10 @@ const hc = c.div`display:flex;flex-direction:row;align-items:center;position:rel
3143
3154
  }
3144
3155
  }
3145
3156
  ) : /* @__PURE__ */ r.createElement(Ee, { type: "loading" });
3146
- }, Cc = () => {
3147
- const { refreshActiveChannel: e } = F(), { onOpenConversationView: t } = tr(), n = Jn();
3157
+ }, Sc = () => {
3158
+ const { refreshActiveChannel: e } = F(), { onOpenConversationView: t } = rr(), n = Qn();
3148
3159
  return /* @__PURE__ */ r.createElement(
3149
- Tc,
3160
+ wc,
3150
3161
  {
3151
3162
  role: "button",
3152
3163
  onClick: async () => {
@@ -3154,35 +3165,35 @@ const hc = c.div`display:flex;flex-direction:row;align-items:center;position:rel
3154
3165
  t(o, z.OPEN);
3155
3166
  }
3156
3167
  },
3157
- /* @__PURE__ */ r.createElement(_c, { variant: "h1" }, n)
3168
+ /* @__PURE__ */ r.createElement(kc, { variant: "h1" }, n)
3158
3169
  );
3159
- }, Tc = c.div`background-color:${({ theme: e }) => e.colors.base.primary};display:flex;align-items:center;justify-content:center;padding:16px;cursor:pointer;`, _c = c(S)`color:${({ theme: e }) => e.colors.base.primaryContrastContent};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, Sc = () => {
3170
+ }, wc = c.div`background-color:${({ theme: e }) => e.colors.base.primary};display:flex;align-items:center;justify-content:center;padding:16px;cursor:pointer;`, kc = c(S)`color:${({ theme: e }) => e.colors.base.primaryContrastContent};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, Ac = () => {
3160
3171
  const { stringSet: e } = M();
3161
- return /* @__PURE__ */ r.createElement(wc, null, /* @__PURE__ */ r.createElement(kc, { variant: "h2", color: u.themedColor.textHighEmphasis }, e.CONVERSATION_LIST__HEADER_TITLE), /* @__PURE__ */ r.createElement(Ac, null));
3162
- }, wc = c.div`display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;flex-shrink:0;height:56px;position:relative;background-color:${({ theme: e }) => e.colors.base.headerBackground};`, kc = c(S)`padding:0 12px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Ac = c.div`position:absolute;bottom:0;width:100%;height:1px;background-color:${u.themedColor.textDisabled};`, Ic = ({ children: e, onOpenConversationView: t }) => {
3163
- const { Template: n } = It.useContext();
3164
- return /* @__PURE__ */ r.createElement(gc, { onOpenConversationView: t }, /* @__PURE__ */ r.createElement(Mc, null, /* @__PURE__ */ r.createElement(n, null)), e);
3165
- }, It = Ce({
3166
- template: $c,
3172
+ return /* @__PURE__ */ r.createElement(Ic, null, /* @__PURE__ */ r.createElement($c, { variant: "h2", color: u.themedColor.textHighEmphasis }, e.CONVERSATION_LIST__HEADER_TITLE), /* @__PURE__ */ r.createElement(Mc, null));
3173
+ }, Ic = c.div`display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;flex-shrink:0;height:56px;position:relative;background-color:${({ theme: e }) => e.colors.base.headerBackground};`, $c = c(S)`padding:0 12px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Mc = c.div`position:absolute;bottom:0;width:100%;height:1px;background-color:${u.themedColor.textDisabled};`, Oc = ({ children: e, onOpenConversationView: t }) => {
3174
+ const { Template: n } = $t.useContext();
3175
+ return /* @__PURE__ */ r.createElement(fc, { onOpenConversationView: t }, /* @__PURE__ */ r.createElement(Rc, null, /* @__PURE__ */ r.createElement(n, null)), e);
3176
+ }, $t = Ce({
3177
+ template: Lc,
3167
3178
  components: {
3168
- Header: Sc,
3169
- Body: yc,
3170
- Footer: Cc
3179
+ Header: Ac,
3180
+ Body: _c,
3181
+ Footer: Sc
3171
3182
  }
3172
3183
  });
3173
- function $c() {
3174
- const { components: e } = It.useContext();
3184
+ function Lc() {
3185
+ const { components: e } = $t.useContext();
3175
3186
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(e.Header, null), /* @__PURE__ */ r.createElement(e.Body, null), /* @__PURE__ */ r.createElement(e.Footer, null));
3176
3187
  }
3177
- const Mc = c.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, Oc = k`:where(#${X.ENTRY}) :not(code *){font-family:'Roboto',sans-serif;box-sizing:border-box;}`, Lc = [Oc, zo, Wo], Rc = (e, ...t) => Cr(e, ...Lc, ...t), Nc = Rc``, Dc = Ur(
3178
- At,
3188
+ const Rc = c.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, Nc = k`:where(#${X.ENTRY}) :not(code *){font-family:'Roboto',sans-serif;box-sizing:border-box;}`, Dc = [Nc, Go, jo], Bc = (e, ...t) => _r(e, ...Dc, ...t), Pc = Bc``, Fc = Wr(
3189
+ It,
3179
3190
  ve,
3180
- Tt,
3181
3191
  _t,
3182
- It,
3183
- nr
3192
+ St,
3193
+ $t,
3194
+ or
3184
3195
  );
3185
- function Bc({
3196
+ function Hc({
3186
3197
  appearance: e,
3187
3198
  rootElement: t,
3188
3199
  logger: n,
@@ -3192,9 +3203,9 @@ function Bc({
3192
3203
  messageTemplate: a,
3193
3204
  theme: l
3194
3205
  }) {
3195
- return Yo(Oo, t), /* @__PURE__ */ r.createElement(Tr, { target: t }, /* @__PURE__ */ r.createElement(jo, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(So, { internalVariables: a == null ? void 0 : a.__internalVariables }, /* @__PURE__ */ r.createElement(Uo, { stringSet: i, logger: n, language: o }, /* @__PURE__ */ r.createElement(Dc, null, s, /* @__PURE__ */ r.createElement(Nc, null))))));
3206
+ return Xo(No, t), /* @__PURE__ */ r.createElement(Sr, { target: t }, /* @__PURE__ */ r.createElement(Yo, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ r.createElement(Ao, { internalVariables: a == null ? void 0 : a.__internalVariables }, /* @__PURE__ */ r.createElement(Vo, { stringSet: i, logger: n, language: o }, /* @__PURE__ */ r.createElement(Fc, null, s, /* @__PURE__ */ r.createElement(Pc, null))))));
3196
3207
  }
3197
- const an = {
3208
+ const ln = {
3198
3209
  key_payment_plan_container: {
3199
3210
  color_variables: {},
3200
3211
  created_at: 1232,
@@ -3380,17 +3391,17 @@ const an = {
3380
3391
  }
3381
3392
  }
3382
3393
  };
3383
- function rr({
3394
+ function ir({
3384
3395
  rootElement: e = document.body,
3385
- logLevel: t = mn.WARN,
3396
+ logLevel: t = gn.WARN,
3386
3397
  language: n = navigator.language,
3387
3398
  userSessionInfo: o,
3388
3399
  children: i,
3389
3400
  ...s
3390
3401
  }) {
3391
3402
  var a;
3392
- return xe.level !== t && (xe.level = t), Zo("https://fonts.googleapis.com/css2?family=Roboto&display=swap", e), /* @__PURE__ */ r.createElement("div", { id: X.ENTRY, style: { width: "fit-content", height: "fit-content" } }, /* @__PURE__ */ r.createElement(Co, { logger: xe, storage: Fc }, /* @__PURE__ */ r.createElement(
3393
- Bc,
3403
+ return xe.level !== t && (xe.level = t), Jo("https://fonts.googleapis.com/css2?family=Roboto&display=swap", e), /* @__PURE__ */ r.createElement("div", { id: X.ENTRY, style: { width: "fit-content", height: "fit-content" } }, /* @__PURE__ */ r.createElement(So, { logger: xe, storage: zc }, /* @__PURE__ */ r.createElement(
3404
+ Hc,
3394
3405
  {
3395
3406
  logger: xe,
3396
3407
  rootElement: e,
@@ -3401,7 +3412,7 @@ function rr({
3401
3412
  theme: s.theme
3402
3413
  },
3403
3414
  /* @__PURE__ */ r.createElement(
3404
- Kr,
3415
+ Yr,
3405
3416
  {
3406
3417
  appId: s.appId,
3407
3418
  aiAgentId: s.aiAgentId,
@@ -3409,11 +3420,11 @@ function rr({
3409
3420
  countryCode: s.countryCode,
3410
3421
  context: s.context,
3411
3422
  logger: xe,
3412
- dispatcher: Pc,
3423
+ dispatcher: Uc,
3413
3424
  chatParams: { customApiHost: s.customApiHost, customWebSocketHost: s.customWebSocketHost }
3414
3425
  },
3415
- /* @__PURE__ */ r.createElement(ti, { rootElement: e, ...s }, /* @__PURE__ */ r.createElement(ii, { userSessionInfo: o }, /* @__PURE__ */ r.createElement(
3416
- wa,
3426
+ /* @__PURE__ */ r.createElement(oi, { rootElement: e, ...s }, /* @__PURE__ */ r.createElement(li, { userSessionInfo: o }, /* @__PURE__ */ r.createElement(
3427
+ Ia,
3417
3428
  {
3418
3429
  isDashboardActionbookTester: s._UNSAFE_INTERNAL_isActionbookTester
3419
3430
  },
@@ -3423,33 +3434,33 @@ function rr({
3423
3434
  )
3424
3435
  )));
3425
3436
  }
3426
- const xe = new En(mn.WARN), Pc = new bn(xe), $t = "@sba/message-template", ln = (e) => `${$t}/templates/${e}`, cn = () => `${$t}/token`, Fc = vo({
3437
+ const xe = new vn(gn.WARN), Uc = new xn(xe), Mt = "@sba/message-template", cn = (e) => `${Mt}/templates/${e}`, dn = () => `${Mt}/token`, zc = To({
3427
3438
  onSetTemplate: (e, t) => {
3428
- an[e] || q.setItem(ln(e), t);
3439
+ ln[e] || q.setItem(cn(e), t);
3429
3440
  },
3430
3441
  onGetTemplate: (e) => {
3431
- const t = an[e];
3432
- return t ? JSON.stringify(t) : q.getItem(ln(e));
3442
+ const t = ln[e];
3443
+ return t ? JSON.stringify(t) : q.getItem(cn(e));
3433
3444
  },
3434
3445
  onSetCachedToken(e) {
3435
- q.setItem(cn(), e);
3446
+ q.setItem(dn(), e);
3436
3447
  },
3437
3448
  onGetCachedToken() {
3438
- return q.getItem(cn());
3449
+ return q.getItem(dn());
3439
3450
  },
3440
3451
  onClear: () => {
3441
- q.getKeys($t).forEach(q.deleteItem);
3452
+ q.getKeys(Mt).forEach(q.deleteItem);
3442
3453
  }
3443
- }), or = ({ children: e, isOpened: t }) => {
3454
+ }), sr = ({ children: e, isOpened: t }) => {
3444
3455
  const { dir: n, rootElement: o } = N(), i = pe(o, !0);
3445
3456
  return R(() => {
3446
3457
  const s = "sb-agent-block-scroll";
3447
3458
  return t ? i.body.classList.add(s) : i.body.classList.remove(s), () => {
3448
3459
  i.body.classList.remove(s);
3449
3460
  };
3450
- }, [i, t]), /* @__PURE__ */ r.createElement(Hc, { dir: n, $visible: t }, e);
3451
- }, Hc = c.div`width:100%;height:100%;position:fixed;top:0;left:0;z-index:${he.WINDOW};visibility:${({ $visible: e }) => e ? "visible" : "hidden"};`;
3452
- function Uc({
3461
+ }, [i, t]), /* @__PURE__ */ r.createElement(Wc, { dir: n, $visible: t }, e);
3462
+ }, Wc = c.div`width:100%;height:100%;position:fixed;top:0;left:0;z-index:${he.WINDOW};visibility:${({ $visible: e }) => e ? "visible" : "hidden"};`;
3463
+ function Vc({
3453
3464
  className: e,
3454
3465
  isOpened: t,
3455
3466
  onClick: n,
@@ -3461,7 +3472,7 @@ function Uc({
3461
3472
  }) {
3462
3473
  const d = at(l);
3463
3474
  return /* @__PURE__ */ r.createElement(
3464
- Vc,
3475
+ Kc,
3465
3476
  {
3466
3477
  dir: s,
3467
3478
  id: X.LAUNCHER,
@@ -3471,11 +3482,11 @@ function Uc({
3471
3482
  $animated: a,
3472
3483
  $backgroundColor: l
3473
3484
  },
3474
- /* @__PURE__ */ r.createElement(Gc, { $isOpened: t, $animated: a, $fillColor: d }, /* @__PURE__ */ r.createElement(dn.Open, { url: i, isDefaultIcon: o === "default_icon" })),
3475
- /* @__PURE__ */ r.createElement(jc, { $isOpened: t, $animated: a, $fillColor: d }, /* @__PURE__ */ r.createElement(dn.Close, null))
3485
+ /* @__PURE__ */ r.createElement(Zc, { $isOpened: t, $animated: a, $fillColor: d }, /* @__PURE__ */ r.createElement(un.Open, { url: i, isDefaultIcon: o === "default_icon" })),
3486
+ /* @__PURE__ */ r.createElement(Yc, { $isOpened: t, $animated: a, $fillColor: d }, /* @__PURE__ */ r.createElement(un.Close, null))
3476
3487
  );
3477
3488
  }
3478
- const zc = k`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, Wc = k`img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;&[data-default-icon='true']{width:32px;height:32px;filter:${({ $fillColor: e }) => e === wn.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, ir = k`svg{width:32px;height:32px;${({ $fillColor: e }) => k`
3489
+ const Gc = k`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, jc = k`img{width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-drag:none;&[data-default-icon='true']{width:32px;height:32px;filter:${({ $fillColor: e }) => e === kn.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, ar = k`svg{width:32px;height:32px;${({ $fillColor: e }) => k`
3479
3490
  path {
3480
3491
  fill: ${e};
3481
3492
  }
@@ -3484,14 +3495,14 @@ const zc = k`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transfo
3484
3495
  }
3485
3496
  `}
3486
3497
  }
3487
- `, Vc = c.button`position:relative;padding:0;width:48px;height:48px;background:${({ $backgroundColor: e }) => e};border-radius:50%;transition:all 0.3s cubic-bezier(0.31,-0.105,0.43,1.4);border:none;display:flex;justify-content:center;align-items:center;box-shadow:0 16px 24px 2px rgba(33,33,33,0.12),0 6px 30px 5px rgba(33,33,33,0.08),0 6px 10px -5px rgba(33,33,33,0.04);${({ $animated: e }) => e && zc}`, sr = c.span`position:absolute;width:100%;height:100%;border-radius:50%;overflow:hidden;transition:transform 0.16s linear,opacity 0.08s linear,scale 0.16s linear;user-select:none;display:flex;justify-content:center;align-items:center;`, Gc = c(sr)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${Wc}${ir}`, jc = c(sr)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${ir}`, dn = {
3488
- Open: (e) => e.url ? /* @__PURE__ */ r.createElement("img", { src: e.url, alt: "launcher-img", "data-default-icon": e.isDefaultIcon }) : /* @__PURE__ */ r.createElement(vt, null),
3498
+ `, Kc = c.button`position:relative;padding:0;width:48px;height:48px;background:${({ $backgroundColor: e }) => e};border-radius:50%;transition:all 0.3s cubic-bezier(0.31,-0.105,0.43,1.4);border:none;display:flex;justify-content:center;align-items:center;box-shadow:0 16px 24px 2px rgba(33,33,33,0.12),0 6px 30px 5px rgba(33,33,33,0.08),0 6px 10px -5px rgba(33,33,33,0.04);${({ $animated: e }) => e && Gc}`, lr = c.span`position:absolute;width:100%;height:100%;border-radius:50%;overflow:hidden;transition:transform 0.16s linear,opacity 0.08s linear,scale 0.16s linear;user-select:none;display:flex;justify-content:center;align-items:center;`, Zc = c(lr)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${jc}${ar}`, Yc = c(lr)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${ar}`, un = {
3499
+ Open: (e) => e.url ? /* @__PURE__ */ r.createElement("img", { src: e.url, alt: "launcher-img", "data-default-icon": e.isDefaultIcon }) : /* @__PURE__ */ r.createElement(yt, null),
3489
3500
  Close: () => /* @__PURE__ */ r.createElement($, { size: 32, type: "chevron-down" })
3490
3501
  };
3491
- function ar({ className: e }) {
3492
- const { colors: t } = ut(), { dir: n, state: o } = N(), { launcherInfo: i } = F();
3493
- return Zc(), /* @__PURE__ */ r.createElement(
3494
- Uc,
3502
+ function cr({ className: e }) {
3503
+ const { colors: t } = mt(), { dir: n, state: o } = N(), { launcherInfo: i } = F();
3504
+ return Jc(), /* @__PURE__ */ r.createElement(
3505
+ Vc,
3495
3506
  {
3496
3507
  dir: n,
3497
3508
  className: e,
@@ -3503,8 +3514,8 @@ function ar({ className: e }) {
3503
3514
  }
3504
3515
  );
3505
3516
  }
3506
- const Kc = 1e3 * 60;
3507
- function Zc() {
3517
+ const qc = 1e3 * 60;
3518
+ function Jc() {
3508
3519
  const { chatSDK: e, state: t, logger: n, enableAutoDisconnectInLauncher: o } = N(), i = D(null);
3509
3520
  R(() => {
3510
3521
  if (!o) return;
@@ -3512,37 +3523,37 @@ function Zc() {
3512
3523
  i.current && (clearTimeout(i.current), i.current = null);
3513
3524
  }
3514
3525
  function a() {
3515
- e.connectionState === vr.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), s(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
3526
+ e.connectionState === Cr.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), s(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
3516
3527
  }
3517
3528
  function l() {
3518
3529
  s(), i.current = setTimeout(async () => {
3519
3530
  await e.disconnectWebSocket(), n.debug("useSDKInactivityTimeout: disconnected");
3520
- }, Kc);
3531
+ }, qc);
3521
3532
  }
3522
3533
  t.opened ? a() : (l(), n.debug("useSDKInactivityTimeout: schedule disconnect"));
3523
3534
  }, [o, e, t.opened]);
3524
3535
  }
3525
- const lr = ye(null);
3526
- function Yc() {
3527
- const e = J(lr);
3536
+ const dr = ye(null);
3537
+ function Xc() {
3538
+ const e = J(dr);
3528
3539
  if (!e)
3529
3540
  throw new Error("useNavigator() must be used within <Navigator />");
3530
3541
  return e;
3531
3542
  }
3532
- function cr({ children: e }) {
3533
- const t = Yc();
3543
+ function ur({ children: e }) {
3544
+ const t = Xc();
3534
3545
  return typeof e == "function" ? e(t) : /* @__PURE__ */ r.createElement(r.Fragment, null, e);
3535
3546
  }
3536
- const qc = gn`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, Jc = gn`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, Xc = k`animation-name:${qc};animation-duration:0.3s;animation-fill-mode:forwards;`, Qc = k``, ed = k`animation-name:${Jc};animation-duration:0.3s;animation-fill-mode:forwards;`, td = k`visibility:hidden;`, nd = c.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
3547
+ const Qc = pn`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, ed = pn`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, td = k`animation-name:${Qc};animation-duration:0.3s;animation-fill-mode:forwards;`, nd = k``, rd = k`animation-name:${ed};animation-duration:0.3s;animation-fill-mode:forwards;`, od = k`visibility:hidden;`, id = c.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
3537
3548
  switch (e) {
3538
3549
  case "entering":
3539
- return Xc;
3550
+ return td;
3540
3551
  case "entered":
3541
- return Qc;
3552
+ return nd;
3542
3553
  case "exiting":
3543
- return ed;
3554
+ return rd;
3544
3555
  case "exited":
3545
- return td;
3556
+ return od;
3546
3557
  default:
3547
3558
  return "";
3548
3559
  }
@@ -3583,111 +3594,111 @@ function Ae({ initialId: e, children: t }) {
3583
3594
  navigate: n,
3584
3595
  pop: o
3585
3596
  }
3586
- }), [n, o]), s = Ie(() => pr.toArray(t).filter(
3587
- (f) => f.type === cr
3597
+ }), [n, o]), s = Ie(() => fr.toArray(t).filter(
3598
+ (f) => f.type === ur
3588
3599
  ), [t]), a = Ie(() => {
3589
3600
  const f = {};
3590
3601
  return s.forEach((y) => {
3591
3602
  const { id: _, lazy: w, children: O } = y.props;
3592
3603
  f[_] = { lazy: w, element: typeof O == "function" ? O(i) : O };
3593
3604
  }), f;
3594
- }, [s]), [l, d] = C([e]), [g, m] = C(() => {
3605
+ }, [s]), [l, d] = T([e]), [g, m] = T(() => {
3595
3606
  const f = {};
3596
3607
  return Object.entries(a).forEach(([y, { lazy: _ }]) => {
3597
3608
  _ === !1 && (f[y] = !0);
3598
3609
  }), f[e] = !0, f;
3599
- }), [p, h] = C(() => {
3610
+ }), [p, h] = T(() => {
3600
3611
  const f = {};
3601
3612
  return Object.keys(a).forEach((y) => {
3602
3613
  y === e ? f[y] = "entered" : f[y] = "exited";
3603
3614
  }), f;
3604
- }), [b, x] = C({}), v = l[l.length - 1];
3605
- return /* @__PURE__ */ r.createElement(lr.Provider, { value: i }, /* @__PURE__ */ r.createElement(rd, null, Object.keys(a).map((f) => {
3615
+ }), [b, x] = T({}), E = l[l.length - 1];
3616
+ return /* @__PURE__ */ r.createElement(dr.Provider, { value: i }, /* @__PURE__ */ r.createElement(sd, null, Object.keys(a).map((f) => {
3606
3617
  var O;
3607
3618
  if (!g[f]) return null;
3608
- const y = p[f] || "exited", _ = f === v, w = `${f}-${b[f] || 0}`;
3609
- return /* @__PURE__ */ r.createElement(nd, { key: w, $transitionState: y, $active: _ }, (O = a[f]) == null ? void 0 : O.element);
3619
+ const y = p[f] || "exited", _ = f === E, w = `${f}-${b[f] || 0}`;
3620
+ return /* @__PURE__ */ r.createElement(id, { key: w, $transitionState: y, $active: _ }, (O = a[f]) == null ? void 0 : O.element);
3610
3621
  })));
3611
3622
  }
3612
- const rd = c.div`position:relative;width:100%;height:100%;`;
3613
- Ae.Screen = cr;
3623
+ const sd = c.div`position:relative;width:100%;height:100%;`;
3624
+ Ae.Screen = ur;
3614
3625
  const ue = {
3615
3626
  activeConv: "active-conv",
3616
3627
  closedConv: "closed-conv",
3617
3628
  convList: "conv-list"
3618
- }, dr = ({ setClosedChannelUrl: e, closedChannelUrl: t }) => /* @__PURE__ */ r.createElement(Ae, { initialId: ue.activeConv }, /* @__PURE__ */ r.createElement(Ae.Screen, { id: ue.activeConv }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(sn, { onNavigateToConversationList: () => n.navigate(ue.convList, { reset: !0 }) })), /* @__PURE__ */ r.createElement(Ae.Screen, { id: ue.closedConv }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(
3619
- sn,
3629
+ }, mr = ({ setClosedChannelUrl: e, closedChannelUrl: t }) => /* @__PURE__ */ r.createElement(Ae, { initialId: ue.activeConv }, /* @__PURE__ */ r.createElement(Ae.Screen, { id: ue.activeConv }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(an, { onNavigateToConversationList: () => n.navigate(ue.convList, { reset: !0 }) })), /* @__PURE__ */ r.createElement(Ae.Screen, { id: ue.closedConv }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(
3630
+ an,
3620
3631
  {
3621
3632
  onNavigateToConversationList: () => n.pop(),
3622
3633
  closedChannelUrl: t,
3623
3634
  onClearClosedChannelUrl: () => e(void 0)
3624
3635
  }
3625
3636
  )), /* @__PURE__ */ r.createElement(Ae.Screen, { id: ue.convList, lazy: !0 }, ({ navigation: n }) => /* @__PURE__ */ r.createElement(
3626
- Ic,
3637
+ Oc,
3627
3638
  {
3628
3639
  onOpenConversationView: (o, i) => {
3629
3640
  i === "closed" ? (e(o), n.navigate(ue.closedConv, { reset: !0 })) : n.navigate(ue.activeConv);
3630
3641
  }
3631
3642
  }
3632
3643
  )));
3633
- function od({ isExpanded: e, isOpened: t, children: n, launcher: o }) {
3644
+ function ad({ isExpanded: e, isOpened: t, children: n, launcher: o }) {
3634
3645
  const { dir: i } = N();
3635
- return /* @__PURE__ */ r.createElement(id, null, /* @__PURE__ */ r.createElement(sd, { dir: i, id: X.WINDOW, $isExpanded: e, $isOpened: t }, n), o);
3646
+ return /* @__PURE__ */ r.createElement(ld, null, /* @__PURE__ */ r.createElement(cd, { dir: i, id: X.WINDOW, $isExpanded: e, $isOpened: t }, n), o);
3636
3647
  }
3637
- const id = c.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, sd = c.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && ld};${({ $isExpanded: e }) => e && ad};`, ad = k`width:743px;height:723px;`, ld = k`z-index:${he.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, Md = ({ children: e, ...t }) => {
3638
- const n = Le(), [o, i] = C(), s = n ? or : od;
3639
- return /* @__PURE__ */ r.createElement(rr, { enableExpandButton: !n, ...t }, /* @__PURE__ */ r.createElement($n, null, ({ state: a }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(s, { isExpanded: a.expanded, isOpened: a.opened, launcher: /* @__PURE__ */ r.createElement(ar, null) }, /* @__PURE__ */ r.createElement(
3640
- dr,
3648
+ const ld = c.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, cd = c.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && ud};${({ $isExpanded: e }) => e && dd};`, dd = k`width:743px;height:723px;`, ud = k`z-index:${he.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, Rd = ({ children: e, ...t }) => {
3649
+ const n = Le(), [o, i] = T(), s = n ? sr : ad;
3650
+ return /* @__PURE__ */ r.createElement(ir, { enableExpandButton: !n, ...t }, /* @__PURE__ */ r.createElement(Mn, null, ({ state: a }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(s, { isExpanded: a.expanded, isOpened: a.opened, launcher: /* @__PURE__ */ r.createElement(cr, null) }, /* @__PURE__ */ r.createElement(
3651
+ mr,
3641
3652
  {
3642
3653
  closedChannelUrl: o,
3643
3654
  setClosedChannelUrl: i
3644
3655
  }
3645
3656
  )), e)));
3646
3657
  };
3647
- function cd(e) {
3648
- return /* @__PURE__ */ r.createElement(dd, { ...e });
3658
+ function md(e) {
3659
+ return /* @__PURE__ */ r.createElement(gd, { ...e });
3649
3660
  }
3650
- const dd = c(ar)`position:fixed;z-index:${he.LAUNCHER};bottom:24px;inset-inline-end:24px;`;
3651
- function ud({ isExpanded: e, isOpened: t, children: n }) {
3661
+ const gd = c(cr)`position:fixed;z-index:${he.LAUNCHER};bottom:24px;inset-inline-end:24px;`;
3662
+ function pd({ isExpanded: e, isOpened: t, children: n }) {
3652
3663
  const { dir: o } = N();
3653
- return /* @__PURE__ */ r.createElement(md, { dir: o, id: X.WINDOW, $isExpanded: e, $isOpened: t }, n);
3664
+ return /* @__PURE__ */ r.createElement(hd, { dir: o, id: X.WINDOW, $isExpanded: e, $isOpened: t }, n);
3654
3665
  }
3655
- const md = c.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;bottom:84px;inset-inline-end:20px;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && pd};${({ $isExpanded: e }) => e && gd};`, gd = k`width:743px;height:723px;`, pd = k`z-index:${he.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, Od = ({ children: e, ...t }) => {
3656
- const n = Le(), [o, i] = C(), s = n ? or : ud;
3657
- return /* @__PURE__ */ r.createElement(rr, { enableExpandButton: !n, ...t }, /* @__PURE__ */ r.createElement($n, null, ({ state: a }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(s, { isExpanded: a.expanded, isOpened: a.opened }, /* @__PURE__ */ r.createElement(
3658
- dr,
3666
+ const hd = c.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;bottom:84px;inset-inline-end:20px;height:640px;min-height:80px;width:400px;max-width:80vw;max-height:80vh;box-shadow:0px 16px 24px 2px rgba(33,33,33,0.12),0px 6px 30px 5px rgba(33,33,33,0.08),0px 6px 10px -5px rgba(33,33,33,0.04);border-radius:16px;overflow:hidden;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 150ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;transform:scale(0.15);opacity:0;transform-origin:right bottom;[dir='rtl'] &:not([dir='ltr']),&[dir='rtl']{transform-origin:left bottom;}${({ $isOpened: e }) => e && bd};${({ $isExpanded: e }) => e && fd};`, fd = k`width:743px;height:723px;`, bd = k`z-index:${he.WINDOW};pointer-events:all;transform:scale(1);opacity:1;transition:width 200ms ease 0s,height 200ms ease 0s,max-height 200ms ease 0s,transform 300ms cubic-bezier(0,1.2,1,1) 0s,opacity 83ms ease-out 0s;`, Nd = ({ children: e, ...t }) => {
3667
+ const n = Le(), [o, i] = T(), s = n ? sr : pd;
3668
+ return /* @__PURE__ */ r.createElement(ir, { enableExpandButton: !n, ...t }, /* @__PURE__ */ r.createElement(Mn, null, ({ state: a }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(s, { isExpanded: a.expanded, isOpened: a.opened }, /* @__PURE__ */ r.createElement(
3669
+ mr,
3659
3670
  {
3660
3671
  closedChannelUrl: o,
3661
3672
  setClosedChannelUrl: i
3662
3673
  }
3663
- )), /* @__PURE__ */ r.createElement(cd, null), e)));
3674
+ )), /* @__PURE__ */ r.createElement(md, null), e)));
3664
3675
  };
3665
3676
  export {
3666
- ht as A,
3667
- Jr as C,
3668
- Md as D,
3669
- Od as F,
3677
+ ft as A,
3678
+ Qr as C,
3679
+ Rd as D,
3680
+ Nd as F,
3670
3681
  $ as I,
3671
- Hn as L,
3672
- Ta as M,
3673
- Tt as O,
3674
- $d as P,
3675
- _t as S,
3682
+ zn as L,
3683
+ wa as M,
3684
+ _t as O,
3685
+ Ld as P,
3686
+ St as S,
3676
3687
  S as a,
3677
- rr as b,
3688
+ ir as b,
3678
3689
  u as c,
3679
- Bc as d,
3690
+ Hc as d,
3680
3691
  F as e,
3681
3692
  M as f,
3682
- Uc as g,
3693
+ Vc as g,
3683
3694
  ve as h,
3684
3695
  me as i,
3685
- nr as j,
3686
- sn as k,
3687
- At as l,
3688
- Pc as m,
3689
- Ic as n,
3690
- It as o,
3691
- xn as p,
3696
+ or as j,
3697
+ an as k,
3698
+ It as l,
3699
+ Uc as m,
3700
+ Oc as n,
3701
+ $t as o,
3702
+ En as p,
3692
3703
  N as u
3693
3704
  };