@sendbird/ai-agent-messenger-react 1.19.0 → 1.19.1

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,23 +1,23 @@
1
- var Wo = Object.defineProperty;
2
- var jo = (e, t, n) => t in e ? Wo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var U = (e, t, n) => jo(e, typeof t != "symbol" ? t + "" : t, n);
4
- import qo, { ConnectionHandler as Cr, SendbirdError as tt, SendbirdChatOptions as Ko, SendbirdProduct as Yo, DeviceOsPlatform as At, SendbirdPlatform as Tr, SessionHandler as Xo, LogLevel as Sr, ConnectionState as Zo } from "@sendbird/chat";
1
+ var jo = Object.defineProperty;
2
+ var qo = (e, t, n) => t in e ? jo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var U = (e, t, n) => qo(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import Ko, { ConnectionHandler as Cr, SendbirdError as tt, SendbirdChatOptions as Yo, SendbirdProduct as Xo, DeviceOsPlatform as At, SendbirdPlatform as Tr, SessionHandler as Zo, ConnectionState as Sr, LogLevel as Ar } from "@sendbird/chat";
5
5
  import * as o from "react";
6
- import { createContext as qe, useContext as we, useLayoutEffect as re, useState as S, useEffect as z, useRef as V, useCallback as N, useMemo as ae, forwardRef as Ke, useImperativeHandle as Jo, useId as Qo, useReducer as es, PureComponent as ts, Suspense as ns, lazy as B, Fragment as Ar, Children as rs } from "react";
7
- import m, { css as R, ThemeProvider as os, useTheme as it, createGlobalStyle as ss, StyleSheetManager as is, keyframes as wr } from "styled-components";
6
+ import { createContext as qe, useContext as we, useLayoutEffect as re, useState as S, useEffect as z, useRef as V, useCallback as N, useMemo as ae, forwardRef as Ke, useImperativeHandle as Jo, useId as Qo, useReducer as es, PureComponent as ts, Suspense as ns, lazy as B, Fragment as wr, Children as rs } from "react";
7
+ import m, { css as R, ThemeProvider as os, useTheme as it, createGlobalStyle as ss, StyleSheetManager as is, keyframes as Ir } from "styled-components";
8
8
  import { isSameMinute as On, differenceInMinutes as as, isToday as ls, differenceInHours as cs, format as ds, isSameDay as us } from "date-fns";
9
9
  import { enUS as ms } from "date-fns/locale/en-US";
10
10
  import { SendingStatus as We, ReplyType as gs, MessageMetaArray as ps } from "@sendbird/chat/message";
11
11
  import { ConversationStatus as Se, AIAgentModule as hs, ConversationType as fs, AIAgentMessageFeedbackRating as Dn } from "@sendbird/chat/aiAgent";
12
- import { GroupChannelListOrder as Ir, GroupChannelHandler as Es, GroupChannelModule as bs } from "@sendbird/chat/groupChannel";
13
- import { useGroupChannelMessages as xs, useGroupChannelHandler as Ye, useForceUpdate as kr } from "@sendbird/uikit-tools";
12
+ import { GroupChannelListOrder as kr, GroupChannelHandler as Es, GroupChannelModule as bs } from "@sendbird/chat/groupChannel";
13
+ import { useGroupChannelMessages as xs, useGroupChannelHandler as Ye, useForceUpdate as $r } from "@sendbird/uikit-tools";
14
14
  import { createPortal as _s } from "react-dom";
15
15
  import { isSameDay as ys } from "date-fns/isSameDay";
16
16
  import { renderer as vs, parser as Cs, MessageProvider as Ts } from "@sendbird/react-uikit-message-template-view";
17
17
  import { createMessageTemplate as Ss } from "@sendbird/uikit-message-template";
18
- import $r from "dompurify";
18
+ import Mr from "dompurify";
19
19
  import As from "@emotion/is-prop-valid";
20
- const Ge = "sb-agent", Mr = "KEY_IMG_ASPECT_RATIO", Zt = "*/*", W = {
20
+ const Ge = "sb-agent", Lr = "KEY_IMG_ASPECT_RATIO", Zt = "*/*", W = {
21
21
  BODY_MAX_WIDTH: 244,
22
22
  WIDE_BODY_MAX_WIDTH: 640,
23
23
  AVATAR_SIZE: 26,
@@ -49,7 +49,7 @@ const Ge = "sb-agent", Mr = "KEY_IMG_ASPECT_RATIO", Zt = "*/*", W = {
49
49
  },
50
50
  isIncoming: (e, t) => xe(e) && e.sender.userId !== t,
51
51
  isOutgoing: (e, t) => xe(e) && (e.sender.userId === t || e.sendingStatus === We.PENDING)
52
- }, Le = (e) => e.startsWith("image/"), Lr = (e) => e.startsWith("video/"), un = (e, t) => {
52
+ }, Le = (e) => e.startsWith("image/"), Or = (e) => e.startsWith("video/"), un = (e, t) => {
53
53
  if (e && !e.startsWith(".")) {
54
54
  const n = e.split(".").pop();
55
55
  if (n && n !== e)
@@ -61,7 +61,7 @@ const Ge = "sb-agent", Mr = "KEY_IMG_ASPECT_RATIO", Zt = "*/*", W = {
61
61
  return n.toUpperCase();
62
62
  }
63
63
  return "FILE";
64
- }, Or = (e) => {
64
+ }, Dr = (e) => {
65
65
  var t;
66
66
  return e.messageType === "file" ? e.message.length > 0 && e.file.name !== e.message : e.messageType === "multipleFiles" ? e.message.length > 0 && ((t = e.files[0]) == null ? void 0 : t.name) !== e.message : e.message.length > 0;
67
67
  }, mn = (e) => {
@@ -98,7 +98,7 @@ const Ge = "sb-agent", Mr = "KEY_IMG_ASPECT_RATIO", Zt = "*/*", W = {
98
98
  };
99
99
  function Ie() {
100
100
  }
101
- function Dr() {
101
+ function Rr() {
102
102
  const e = typeof navigator < "u" ? navigator.userAgent : "", t = /iPad|iPhone|iPod/.test(e), n = /Android/.test(e);
103
103
  return t || n;
104
104
  }
@@ -201,7 +201,7 @@ const Jt = (e) => {
201
201
  }
202
202
  }
203
203
  };
204
- }, Rr = (e, t, n = {}) => {
204
+ }, Nr = (e, t, n = {}) => {
205
205
  let r = null, s = null, i = null;
206
206
  const { leading: a = !0, trailing: l = !0 } = n, c = (...d) => {
207
207
  const u = Date.now();
@@ -232,7 +232,7 @@ class Rs {
232
232
  U(this, "_channels");
233
233
  U(this, "_isDisposed", !1);
234
234
  U(this, "_handlerId", `handler-id-${Date.now()}`);
235
- U(this, "_order", Ir.LATEST_LAST_MESSAGE);
235
+ U(this, "_order", kr.LATEST_LAST_MESSAGE);
236
236
  U(this, "_limit");
237
237
  U(this, "_query");
238
238
  U(this, "_token");
@@ -252,7 +252,7 @@ class Rs {
252
252
  copilotConversationOnly: (d = this.filter) == null ? void 0 : d.copilotConversationOnly,
253
253
  copilotSupportChannelUrl: (u = this.filter) == null ? void 0 : u.copilotSupportChannelUrl,
254
254
  limit: this._limit
255
- }), this._token = "", this._timestamp = Number.MAX_SAFE_INTEGER, this._isSyncing = !1, this._throttledOnChannelChanged = Rr(
255
+ }), this._token = "", this._timestamp = Number.MAX_SAFE_INTEGER, this._isSyncing = !1, this._throttledOnChannelChanged = Nr(
256
256
  (h) => {
257
257
  this._query.belongsTo(h) ? this._addChannelsToView([h], !1) : this._removeChannelsFromView([h.url]);
258
258
  },
@@ -437,7 +437,7 @@ const Qt = (e, t) => e.findIndex((n) => n.isIdentical(t)), Ns = (e, t, n) => {
437
437
  return { place: e.length, oldPosition: -1 };
438
438
  }, Fn = (e, t, n) => {
439
439
  switch (n) {
440
- case Ir.LATEST_LAST_MESSAGE:
440
+ case kr.LATEST_LAST_MESSAGE:
441
441
  if (e.lastMessage && t.lastMessage) {
442
442
  const r = t.lastMessage.createdAt - e.lastMessage.createdAt;
443
443
  return r === 0 ? t.createdAt - e.createdAt : r;
@@ -446,7 +446,7 @@ const Qt = (e, t) => e.findIndex((n) => n.isIdentical(t)), Ns = (e, t, n) => {
446
446
  return 0;
447
447
  }
448
448
  };
449
- class Nr {
449
+ class Fr {
450
450
  constructor(t) {
451
451
  U(this, "subscribers", {});
452
452
  this.logger = t;
@@ -488,7 +488,7 @@ class Ot {
488
488
  return JSON.stringify({ type: this.type, payload: this.payload });
489
489
  }
490
490
  }
491
- const Fr = {
491
+ const Br = {
492
492
  CloseConversation: (e) => new Bs(e),
493
493
  MessengerSettingsUpdated: (e) => new Ps(e),
494
494
  ActiveChannelUpdated: (e) => new Us(e),
@@ -518,8 +518,8 @@ class Hs extends Ot {
518
518
  U(this, "type", "anon.token.expired");
519
519
  }
520
520
  }
521
- var Br = /* @__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))(Br || {});
522
- class Pr {
521
+ var Pr = /* @__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))(Pr || {});
522
+ class Ur {
523
523
  constructor(t) {
524
524
  U(this, "level");
525
525
  this.level = t;
@@ -557,7 +557,7 @@ class Bn {
557
557
  }
558
558
  const zs = (e) => ({
559
559
  onSessionTokenRequired: (t) => {
560
- t(null), e.send(Fr.AnonymousSessionTokenExpired());
560
+ t(null), e.send(Br.AnonymousSessionTokenExpired());
561
561
  }
562
562
  }), Gs = "ai_agent:stats", Ws = "conversation_initial_render", js = 800220;
563
563
  var J = /* @__PURE__ */ ((e) => (e.AUTH = "auth_duration", e.GET_CHANNEL = "get_channel_duration", e.GET_MESSAGES = "get_messages_duration", e.TOTAL_DURATION = "total_duration", e.TOTAL_DURATION_FROM_CACHE = "total_duration_from_cache", e))(J || {});
@@ -812,7 +812,7 @@ function Qs(e, t) {
812
812
  csat_submitted_label: t.submitted_label
813
813
  } : e;
814
814
  }
815
- const Ur = (e) => {
815
+ const Hr = (e) => {
816
816
  try {
817
817
  const t = JSON.parse(e);
818
818
  return typeof t == "string" ? JSON.stringify(t).slice(1, -1) : e.trim();
@@ -844,7 +844,7 @@ function pn({
844
844
  if (!r && !["number", "boolean", "string"].includes(typeof a))
845
845
  throw new Error(`If transformer is not provided, value(${i}:${a}) must be a {string, number, or boolean}`);
846
846
  const l = r ? r(a) : String(a), c = n(i);
847
- return s.replace(c, Ur(l));
847
+ return s.replace(c, Hr(l));
848
848
  }, e);
849
849
  }
850
850
  async function ni({
@@ -858,32 +858,32 @@ async function ni({
858
858
  const l = await r(a);
859
859
  return { regex: n(i), transformedValue: l };
860
860
  })
861
- )).reduce((i, { regex: a, transformedValue: l }) => i.replace(a, Ur(l)), e);
861
+ )).reduce((i, { regex: a, transformedValue: l }) => i.replace(a, Hr(l)), e);
862
862
  }
863
863
  var en = /* @__PURE__ */ ((e) => (e[e.EXTERNAL_AUTH_TOKEN_EXPIRED = 1] = "EXTERNAL_AUTH_TOKEN_EXPIRED", e))(en || {});
864
- const Hr = (e) => typeof e == "object" && e !== null, Un = (e, t) => t in e && typeof e[t] == "string" && e[t] !== "", ri = (e) => !Hr(e) || !Un(e, "channel_url") || !Un(e, "ai_agent_id") ? null : {
864
+ const Vr = (e) => typeof e == "object" && e !== null, Un = (e, t) => t in e && typeof e[t] == "string" && e[t] !== "", ri = (e) => !Vr(e) || !Un(e, "channel_url") || !Un(e, "ai_agent_id") ? null : {
865
865
  channelUrl: e.channel_url,
866
866
  aiAgentId: e.ai_agent_id
867
867
  }, oi = {
868
868
  1: ri
869
869
  };
870
870
  function si(e) {
871
- if (!Hr(e) || !("cat" in e) || typeof e.cat != "number" || !("data" in e)) return null;
871
+ if (!Vr(e) || !("cat" in e) || typeof e.cat != "number" || !("data" in e)) return null;
872
872
  const t = e.cat, n = oi[t];
873
873
  if (!n) return null;
874
874
  const r = n(e.data);
875
875
  return r ? { category: t, data: r } : null;
876
876
  }
877
877
  function Hn(e, t, n, r) {
878
- const s = qo.init({
878
+ const s = Ko.init({
879
879
  appId: e,
880
880
  modules: [new bs(), new hs()],
881
881
  localCacheEnabled: !0,
882
- options: new Ko({ typingIndicatorInvalidateTime: 2e4 }),
882
+ options: new Yo({ typingIndicatorInvalidateTime: 2e4 }),
883
883
  ...r
884
884
  });
885
885
  return s.addSendbirdExtensions(
886
- [{ version: n, product: Yo.AI_AGENT, platform: t.platform }],
886
+ [{ version: n, product: Xo.AI_AGENT, platform: t.platform }],
887
887
  { platform: t.deviceOSPlatform, version: t.deviceOSVersion },
888
888
  t.customData
889
889
  ) || console.warn("Invalid Sendbird Extensions", t), s;
@@ -1006,11 +1006,11 @@ function mi({
1006
1006
  messengerVersion: _,
1007
1007
  extensions: E = {
1008
1008
  platform: Tr.JS,
1009
- deviceOSPlatform: Dr() ? At.MOBILE_WEB : At.WEB
1009
+ deviceOSPlatform: Rr() ? At.MOBILE_WEB : At.WEB
1010
1010
  }
1011
1011
  }) {
1012
1012
  const [p, b] = S(() => {
1013
- const x = f ?? new Pr(Br.WARN), v = y ?? new Nr(x);
1013
+ const x = f ?? new Ur(Pr.WARN), v = y ?? new Fr(x);
1014
1014
  return {
1015
1015
  logger: x,
1016
1016
  dispatcher: v,
@@ -1055,11 +1055,11 @@ const gi = (e, t, n) => xs(e, t, { ...n, strictStreamingOrder: !0 }), st = {
1055
1055
  WHITE: "#ffffff",
1056
1056
  BLACK: "#000000"
1057
1057
  };
1058
- function Vr(e) {
1058
+ function zr(e) {
1059
1059
  return e.length === 4 ? `#${[...e.slice(1)].map((t) => t + t).join("")}` : e;
1060
1060
  }
1061
1061
  function pi(e) {
1062
- const t = Vr(e);
1062
+ const t = zr(e);
1063
1063
  return [
1064
1064
  parseInt(t.slice(1, 3), 16),
1065
1065
  // r
@@ -1105,7 +1105,7 @@ function bi(e, t = "light") {
1105
1105
  };
1106
1106
  }
1107
1107
  function tn(e) {
1108
- const t = Vr(e), n = 149, r = +`0x${t[1]}${t[2]}`, s = +`0x${t[3]}${t[4]}`, i = +`0x${t[5]}${t[6]}`;
1108
+ const t = zr(e), n = 149, r = +`0x${t[1]}${t[2]}`, s = +`0x${t[3]}${t[4]}`, i = +`0x${t[5]}${t[6]}`;
1109
1109
  return r * 0.299 + s * 0.587 + i * 0.114 > n ? st.BLACK : st.WHITE;
1110
1110
  }
1111
1111
  function xi(e, t, n, r, s) {
@@ -1378,7 +1378,7 @@ const Gt = 25 * 1024 * 1024, zn = 1, Gn = /* @__PURE__ */ new Set(["image/png",
1378
1378
  createAttachmentRules: r
1379
1379
  };
1380
1380
  };
1381
- function zr() {
1381
+ function Gr() {
1382
1382
  const { chatSDK: e, logger: t } = se();
1383
1383
  return N(
1384
1384
  async (n) => {
@@ -1398,7 +1398,7 @@ function ki() {
1398
1398
  const { chatSDK: e, logger: t } = se(), n = N(
1399
1399
  async (s, i, a) => {
1400
1400
  if (t.debug("useChatConnection.connect: start, session", s.userId), i) {
1401
- const l = new Xo({
1401
+ const l = new Zo({
1402
1402
  ...i,
1403
1403
  onSessionTokenRequired: $i(i.onSessionTokenRequired, a)
1404
1404
  });
@@ -1475,7 +1475,7 @@ function Ri({
1475
1475
  onPostDeauth: a,
1476
1476
  forceCreateChannel: l
1477
1477
  }) {
1478
- const { aiAgentId: c, language: d, context: u, countryCode: h, logger: f, cache: y, dispatcher: _ } = se(), { connect: E, disconnect: p } = ki(), { type: b, userSessionCandidate: x } = Di(e), v = zr(), T = N(async () => {
1478
+ const { aiAgentId: c, language: d, context: u, countryCode: h, logger: f, cache: y, dispatcher: _ } = se(), { connect: E, disconnect: p } = ki(), { type: b, userSessionCandidate: x } = Di(e), v = Gr(), T = N(async () => {
1479
1479
  var F;
1480
1480
  f.debug("useAuthentication.authenticate: start");
1481
1481
  const w = x != null && x.userId ? y.messenger.getSettings(x.userId) : null;
@@ -1581,7 +1581,7 @@ const Ni = () => {
1581
1581
  function({ userSessionInfo: e, forceCreateChannel: t, children: n }, r) {
1582
1582
  const { appId: s, aiAgentId: i, chatSDK: a, language: l, countryCode: c, context: d, cache: u, logger: h } = se(), { updateTheme: f } = hn(), [y, _] = S(void 0), [E, p] = S(void 0), [b, x] = S(null), [v, T] = S(null), [I, w] = S(null), [C, $] = S(null), [F] = S(() => ({
1583
1583
  initialRender: new Ys((A, O) => a.aiAgent.appendStat(A, O))
1584
- })), { updateBaseAttachmentRules: D, createAttachmentRules: L } = Ii(), { shouldSyncCachedTemplate: j, syncCachedTemplates: q } = Ni(), Z = zr(), { authenticate: de, deauthenticate: ue } = Ri({
1584
+ })), { updateBaseAttachmentRules: D, createAttachmentRules: L } = Ii(), { shouldSyncCachedTemplate: j, syncCachedTemplates: q } = Ni(), Z = Gr(), { authenticate: de, deauthenticate: ue } = Ri({
1585
1585
  userSessionInfo: e,
1586
1586
  forceCreateChannel: t,
1587
1587
  onUpdateMessengerSettings: N(
@@ -1691,7 +1691,7 @@ const Ni = () => {
1691
1691
  },
1692
1692
  [a]
1693
1693
  ), [ge] = S(
1694
- () => Rr(
1694
+ () => Nr(
1695
1695
  (A) => {
1696
1696
  var O;
1697
1697
  h.info("agentMessengerSession.channelChanged: channel.conversation", A.conversation), p({
@@ -1816,7 +1816,7 @@ const Ni = () => {
1816
1816
  }, [e, n]);
1817
1817
  };
1818
1818
  function Ui(e) {
1819
- const { chatSDK: t, logger: n, aiAgentId: r } = se(), { sdkUser: s, activeChannel: i, setActiveChannel: a, statsTrackers: l } = ct(), c = kr(), [d, u] = S(void 0), [h, f] = S(void 0), [y, _] = S(!1);
1819
+ const { chatSDK: t, logger: n, aiAgentId: r } = se(), { sdkUser: s, activeChannel: i, setActiveChannel: a, statsTrackers: l } = ct(), c = $r(), [d, u] = S(void 0), [h, f] = S(void 0), [y, _] = S(!1);
1820
1820
  function E(b) {
1821
1821
  if (b.isAIAgent && !b.conversation) {
1822
1822
  _(!0);
@@ -1889,10 +1889,14 @@ const Hi = (e) => {
1889
1889
  onConnectionLost: () => r("reconnecting")
1890
1890
  }), z(() => {
1891
1891
  if (t)
1892
- return t.subscribe(() => {
1893
- r("reconnecting");
1892
+ return t.subscribe((s) => {
1893
+ if (!s) {
1894
+ r("reconnecting");
1895
+ return;
1896
+ }
1897
+ r((i) => i === "reconnecting" && e.connectionState === Sr.OPEN ? "connected" : i);
1894
1898
  });
1895
- }, [t]), n;
1899
+ }, [t, e]), n;
1896
1900
  }, Gi = 3e4, Wi = ({
1897
1901
  shouldApply: e,
1898
1902
  lastMessage: t,
@@ -1912,7 +1916,7 @@ const Hi = (e) => {
1912
1916
  a.current && clearTimeout(a.current);
1913
1917
  };
1914
1918
  }, [n, l]), s && e;
1915
- }, Gr = (e) => {
1919
+ }, Wr = (e) => {
1916
1920
  const { chatSDK: t } = se(), [n, r] = S([]);
1917
1921
  return Ye(t, {
1918
1922
  onTypingStatusUpdated(s) {
@@ -1923,7 +1927,7 @@ const Hi = (e) => {
1923
1927
  }
1924
1928
  }), n;
1925
1929
  }, ji = ({ channel: e, lastMessage: t, aiAgentUserId: n, isStreamAnimating: r }) => {
1926
- const [s, i] = S(!1), a = Gr(e);
1930
+ const [s, i] = S(!1), a = Wr(e);
1927
1931
  return z(() => {
1928
1932
  if (!t) return;
1929
1933
  const l = a.some((d) => d.userId === n), c = at(t, n) && (Oe.isStreaming(t) || r);
@@ -2182,7 +2186,7 @@ function ea(e) {
2182
2186
  }
2183
2187
  const {
2184
2188
  Provider: ta,
2185
- useContext: Wr
2189
+ useContext: jr
2186
2190
  } = oe("MessageTemplateFetching");
2187
2191
  function na({ children: e, internalVariables: t }) {
2188
2192
  const n = V({}), r = V({}), [s, i] = S({}), a = N((d, u) => {
@@ -2361,7 +2365,7 @@ const sa = ({
2361
2365
  internalVariables: n
2362
2366
  })), a = Re({ ...r, uiTemplateString: a, variables: n }), a = Ne({ ...r, uiTemplateString: a, colorVariables: i }), a = Ne({ ...r, uiTemplateString: a, colorVariables: t }), a = Re({ ...r, uiTemplateString: a }), Dt(a);
2363
2367
  }, aa = (e) => {
2364
- const { aiAgentColorVariables: t = {} } = e, { internalVariables: n } = Wr();
2368
+ const { aiAgentColorVariables: t = {} } = e, { internalVariables: n } = jr();
2365
2369
  return S(() => {
2366
2370
  const r = e.onGetCachedTemplate(e.templateKey);
2367
2371
  return r ? sa({
@@ -2375,7 +2379,7 @@ const sa = ({
2375
2379
  }, la = (e) => {
2376
2380
  const [t] = aa(e);
2377
2381
  if (t) return t;
2378
- const { aiAgentColorVariables: n = {} } = e, { internalVariables: r, fetchTemplate: s, suspend: i } = Wr();
2382
+ const { aiAgentColorVariables: n = {} } = e, { internalVariables: r, fetchTemplate: s, suspend: i } = jr();
2379
2383
  return i(e.templateKey, async () => {
2380
2384
  const l = await s({ ...e, suspense: !0 });
2381
2385
  return await ia({
@@ -2518,15 +2522,15 @@ const sa = ({
2518
2522
  getValueOrDefault: () => null,
2519
2523
  validate: () => ({ isValid: !1 })
2520
2524
  };
2521
- function jr(e) {
2525
+ function qr(e) {
2522
2526
  return ha[e.type] || fa;
2523
2527
  }
2524
2528
  function qn(e) {
2525
- return jr(e).getValueOrDefault(e);
2529
+ return qr(e).getValueOrDefault(e);
2526
2530
  }
2527
2531
  function Ea(e, t, n = {}) {
2528
2532
  const r = { ...da, ...n };
2529
- return jr(e).validate(e, t, r);
2533
+ return qr(e).validate(e, t, r);
2530
2534
  }
2531
2535
  const ba = (e, t = {}) => {
2532
2536
  const { labels: n = {}, onSubmit: r, onCancel: s } = t, [i, a] = S({}), [l, c] = S(() => {
@@ -2608,11 +2612,11 @@ const ba = (e, t = {}) => {
2608
2612
  }
2609
2613
  };
2610
2614
  }, xa = (e) => {
2611
- const { aiAgentInfo: t } = ct(), r = Gr(e)[0];
2615
+ const { aiAgentInfo: t } = ct(), r = Wr(e)[0];
2612
2616
  if (!r) return null;
2613
2617
  const s = r.userId === (t == null ? void 0 : t.userId);
2614
2618
  return { user: s ? t : r, isBot: s };
2615
- }, qr = ({ channel: e, userSession: t, aiAgentInfo: n }) => {
2619
+ }, Kr = ({ channel: e, userSession: t, aiAgentInfo: n }) => {
2616
2620
  if (!t || !n || !e)
2617
2621
  return { fallbackIcon: "delight", url: void 0, title: "" };
2618
2622
  const r = (() => {
@@ -2713,7 +2717,7 @@ const _a = /* @__PURE__ */ new Set(["free_text", "single_choice"]), ya = ({ csat
2713
2717
  streamText: f.initialEnabled ? t.slice(0, a) : t,
2714
2718
  isAnimating: E
2715
2719
  };
2716
- }, Aa = "1.19.0", me = "sb-agent", he = {
2720
+ }, Aa = "1.19.1", me = "sb-agent", he = {
2717
2721
  ENTRY: `${me}-entry`,
2718
2722
  MODAL_ROOT: `${me}-modal-root`,
2719
2723
  WINDOW: `${me}-window`,
@@ -2724,8 +2728,8 @@ const _a = /* @__PURE__ */ new Set(["free_text", "single_choice"]), ya = ({ csat
2724
2728
  TOOLTIP: _t - 2,
2725
2729
  WINDOW: _t - 3,
2726
2730
  LAUNCHER: _t - 4
2727
- }, Kr = 36, wa = 100, Yr = Aa, Xr = "noopener noreferrer nofollow";
2728
- function Zr() {
2731
+ }, Yr = 36, wa = 100, Xr = Aa, Zr = "noopener noreferrer nofollow";
2732
+ function Jr() {
2729
2733
  return {
2730
2734
  isOnline: () => navigator.onLine,
2731
2735
  subscribe: (e) => {
@@ -2737,7 +2741,7 @@ function Zr() {
2737
2741
  };
2738
2742
  }
2739
2743
  const yt = {};
2740
- function Jr() {
2744
+ function Qr() {
2741
2745
  return {
2742
2746
  get: (e) => {
2743
2747
  try {
@@ -2996,7 +3000,7 @@ async function Na(e) {
2996
3000
  if (t) return t;
2997
3001
  try {
2998
3002
  if (La.has(e)) {
2999
- const { default: n } = await Oa(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./Pegg7Snc.js"), "./languages/en.ts": () => Promise.resolve().then(() => Ra), "./languages/es.ts": () => import("./C-dJq_hf.js"), "./languages/fr.ts": () => import("./kEl07Dux.js"), "./languages/hi.ts": () => import("./DSsAaVrV.js"), "./languages/it.ts": () => import("./fyKo7Xbp.js"), "./languages/ja.ts": () => import("./BEvfkh3_.js"), "./languages/ko.ts": () => import("./Dqs_T84t.js"), "./languages/pt.ts": () => import("./Cmz3dl3b.js"), "./languages/tr.ts": () => import("./CWV-J3Ta.js") }), `./languages/${e}.ts`, 3);
3003
+ const { default: n } = await Oa(/* @__PURE__ */ Object.assign({ "./languages/de.ts": () => import("./3MMW9yZj.js"), "./languages/en.ts": () => Promise.resolve().then(() => Ra), "./languages/es.ts": () => import("./CTiYbbZ0.js"), "./languages/fr.ts": () => import("./B328z7Yh.js"), "./languages/hi.ts": () => import("./DKppAyK1.js"), "./languages/it.ts": () => import("./Bnz_J6Ij.js"), "./languages/ja.ts": () => import("./C0ROszna.js"), "./languages/ko.ts": () => import("./BQt0I0G7.js"), "./languages/pt.ts": () => import("./DLrmbQi7.js"), "./languages/tr.ts": () => import("./BrmYafuu.js") }), `./languages/${e}.ts`, 3);
3000
3004
  return rn.set(e, n), n;
3001
3005
  }
3002
3006
  return wt;
@@ -3134,7 +3138,7 @@ const {
3134
3138
  }
3135
3139
  }, {
3136
3140
  Provider: Ha,
3137
- useContext: Qr
3141
+ useContext: eo
3138
3142
  } = oe("MessengerTheme");
3139
3143
  function Va(e) {
3140
3144
  const { theme: t, appearance: n, logger: r } = e;
@@ -3177,7 +3181,7 @@ const Ga = (e, t) => {
3177
3181
  }, [e, t]);
3178
3182
  }, {
3179
3183
  Provider: ja,
3180
- Consumer: eo,
3184
+ Consumer: to,
3181
3185
  useContext: X
3182
3186
  } = oe("Messenger");
3183
3187
  function qa({
@@ -3209,7 +3213,7 @@ function qa({
3209
3213
  e
3210
3214
  ));
3211
3215
  }
3212
- const to = /iPad|iPhone|iPod/.test(navigator.userAgent), Ka = /Android/.test(navigator.userAgent), dt = (e) => to || Ka;
3216
+ const no = /iPad|iPhone|iPod/.test(navigator.userAgent), Ka = /Android/.test(navigator.userAgent), dt = (e) => no || Ka;
3213
3217
  let et = null, jt = null;
3214
3218
  const Ya = (e, t = 5e3) => {
3215
3219
  et && (clearInterval(et), clearTimeout(jt));
@@ -3219,7 +3223,7 @@ const Ya = (e, t = 5e3) => {
3219
3223
  }, 750), jt = setTimeout(() => {
3220
3224
  clearInterval(et), et = null, jt = null, document.title = n;
3221
3225
  }, t);
3222
- }, no = () => {
3226
+ }, ro = () => {
3223
3227
  import("./DP0MwObA.js").then((e) => {
3224
3228
  new Audio(e.default).play().catch(() => {
3225
3229
  });
@@ -3255,7 +3259,7 @@ const Ya = (e, t = 5e3) => {
3255
3259
  return n.set(e, i), i;
3256
3260
  }, Za = (e) => e ? R`display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:${e};overflow:hidden;` : "", Ja = m.span`font-stretch:normal;letter-spacing:normal;${({ $variant: e, theme: t }) => Xa(e, t.typography)}color:${({ $color: e }) => e};${({ $maxTextLines: e }) => Za(e)}`, Ft = ({ style: e, rootElementId: t, visible: n, onClose: r, children: s }) => {
3257
3261
  if (!n) return null;
3258
- const { rootElement: i } = Qr(), a = Be(i), l = Be(i, !0);
3262
+ const { rootElement: i } = eo(), a = Be(i), l = Be(i, !0);
3259
3263
  return _s(
3260
3264
  /* @__PURE__ */ o.createElement(Qa, { onClick: r, style: e }, /* @__PURE__ */ o.createElement(el, { onClick: (c) => c.stopPropagation() }, s)),
3261
3265
  a.getElementById(t) ?? a.getElementById(he.MODAL_ROOT) ?? l.body
@@ -3320,7 +3324,7 @@ const Ya = (e, t = 5e3) => {
3320
3324
  );
3321
3325
  };
3322
3326
  function cl({ sound: e }) {
3323
- Ya("🔔You have received a new message"), e && no();
3327
+ Ya("🔔You have received a new message"), e && ro();
3324
3328
  }
3325
3329
  const dl = (e) => {
3326
3330
  const { chatSDK: t, handlers: n, logger: r } = X(), { aiAgentInfo: s } = le(), i = V(/* @__PURE__ */ new Set()), a = (u) => {
@@ -3345,7 +3349,7 @@ const dl = (e) => {
3345
3349
  }), {
3346
3350
  checkForUserActionRequired: d
3347
3351
  };
3348
- }, kt = `@${me}-focused-channel`, ro = `${Date.now()}-${Math.random().toString(36).slice(2)}`, ul = () => {
3352
+ }, kt = `@${me}-focused-channel`, oo = `${Date.now()}-${Math.random().toString(36).slice(2)}`, ul = () => {
3349
3353
  try {
3350
3354
  const e = localStorage.getItem(kt);
3351
3355
  return e ? JSON.parse(e).channelUrl ?? null : null;
@@ -3354,14 +3358,14 @@ const dl = (e) => {
3354
3358
  }
3355
3359
  }, Qn = (e) => {
3356
3360
  try {
3357
- localStorage.setItem(kt, JSON.stringify({ channelUrl: e, tabId: ro }));
3361
+ localStorage.setItem(kt, JSON.stringify({ channelUrl: e, tabId: oo }));
3358
3362
  } catch {
3359
3363
  }
3360
3364
  }, er = () => {
3361
3365
  try {
3362
3366
  const e = localStorage.getItem(kt);
3363
3367
  if (!e) return;
3364
- JSON.parse(e).tabId === ro && localStorage.removeItem(kt);
3368
+ JSON.parse(e).tabId === oo && localStorage.removeItem(kt);
3365
3369
  } catch {
3366
3370
  }
3367
3371
  }, ml = (e, t) => (z(() => {
@@ -3378,7 +3382,7 @@ const dl = (e) => {
3378
3382
  Ye(n, {
3379
3383
  onMessageReceived(l, c) {
3380
3384
  if (!s || l.url !== e || i()) return;
3381
- (xe(c) && c.sender.userId !== (r == null ? void 0 : r.userId) || c.isAdminMessage() && !c.silent) && no();
3385
+ (xe(c) && c.sender.userId !== (r == null ? void 0 : r.userId) || c.isAdminMessage() && !c.silent) && ro();
3382
3386
  }
3383
3387
  });
3384
3388
  };
@@ -3395,7 +3399,7 @@ async function hl(e) {
3395
3399
  if ("file" in e && e.file instanceof File && e.file.type.startsWith("image/")) {
3396
3400
  const { width: t, height: n } = await pl(e.file);
3397
3401
  return new ps({
3398
- key: Mr,
3402
+ key: Lr,
3399
3403
  value: [t, n]
3400
3404
  });
3401
3405
  }
@@ -3424,7 +3428,7 @@ async function xn(e) {
3424
3428
  let t = e;
3425
3429
  t && (!t.startsWith("http://") && !t.startsWith("https://") && (t = "https://" + t), window.open(t, "_blank", "noopener,noreferrer"));
3426
3430
  }
3427
- function oo(e) {
3431
+ function so(e) {
3428
3432
  requestAnimationFrame(() => {
3429
3433
  requestAnimationFrame(() => {
3430
3434
  e();
@@ -3490,7 +3494,7 @@ function _l({ scrollMode: e, messageStackDirection: t, children: n }) {
3490
3494
  }, [v, w]), $ = N(() => {
3491
3495
  s.current && (s.current.disconnect(), s.current = null), i.current = tr, f(0), _(0);
3492
3496
  }, []), F = N((A = !0) => {
3493
- u.current = !1, oo(() => {
3497
+ u.current = !1, so(() => {
3494
3498
  const O = r.current;
3495
3499
  O && O.scrollTo({
3496
3500
  top: O.scrollHeight,
@@ -3739,11 +3743,11 @@ const Al = (e) => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3
3739
3743
  },
3740
3744
  /* @__PURE__ */ o.createElement($t, { errorFallback: /* @__PURE__ */ o.createElement(Rl, null) }, /* @__PURE__ */ o.createElement(s, null))
3741
3745
  );
3742
- }, Ol = R`[dir='rtl'] &{transform:scaleX(-1);}`, Dl = m.div`width:${({ $size: e }) => be(e)};height:${({ $size: e }) => be(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 && Ol};`, Rl = () => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64" }, /* @__PURE__ */ o.createElement("rect", { x: "8", y: "8", width: "48", height: "48", fill: "none", className: "stroke", rx: "4" }), /* @__PURE__ */ o.createElement("line", { x1: "20", y1: "20", x2: "44", y2: "44", className: "stroke" }), /* @__PURE__ */ o.createElement("line", { x1: "44", y1: "20", x2: "20", y2: "44", className: "stroke" })), Nl = 0.75, so = 6, Fl = so * 2;
3746
+ }, Ol = R`[dir='rtl'] &{transform:scaleX(-1);}`, Dl = m.div`width:${({ $size: e }) => be(e)};height:${({ $size: e }) => be(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 && Ol};`, Rl = () => /* @__PURE__ */ o.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64" }, /* @__PURE__ */ o.createElement("rect", { x: "8", y: "8", width: "48", height: "48", fill: "none", className: "stroke", rx: "4" }), /* @__PURE__ */ o.createElement("line", { x1: "20", y1: "20", x2: "44", y2: "44", className: "stroke" }), /* @__PURE__ */ o.createElement("line", { x1: "44", y1: "20", x2: "20", y2: "44", className: "stroke" })), Nl = 0.75, io = 6, Fl = io * 2;
3743
3747
  let sn = null;
3744
3748
  typeof Intl < "u" && "Segmenter" in Intl && (sn = new Intl.Segmenter(void 0, { granularity: "grapheme" }));
3745
3749
  const Bl = (e) => sn ? Array.from(sn.segment(e), (t) => t.segment) : [...e], Pl = (e) => {
3746
- const t = Math.floor(e.length * Nl), n = Math.max(0, e.length - so);
3750
+ const t = Math.floor(e.length * Nl), n = Math.max(0, e.length - io);
3747
3751
  return Math.max(t, n);
3748
3752
  }, nr = (e, t = "") => {
3749
3753
  if (e.length < Fl)
@@ -3759,7 +3763,7 @@ const Bl = (e) => sn ? Array.from(sn.segment(e), (t) => t.segment) : [...e], Pl
3759
3763
  return nr(t);
3760
3764
  const s = t.slice(0, n), i = t.slice(n);
3761
3765
  return nr(s, i);
3762
- }, io = ({ children: e, ...t }) => {
3766
+ }, ao = ({ children: e, ...t }) => {
3763
3767
  const { start: n, end: r } = ae(() => Ul(e), [e]);
3764
3768
  return r ? /* @__PURE__ */ o.createElement(Hl, null, /* @__PURE__ */ o.createElement(Vl, { ...t }, n), /* @__PURE__ */ o.createElement(zl, { ...t }, r)) : /* @__PURE__ */ o.createElement(M, { ...t }, n);
3765
3769
  }, Hl = m.span`display:flex;width:100%;min-width:0;overflow:hidden;direction:inherit;`, Vl = m(M)`overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0;`, zl = m(M)`flex-shrink:0;white-space:nowrap;`, yn = ({
@@ -3770,7 +3774,7 @@ const Bl = (e) => sn ? Array.from(sn.segment(e), (t) => t.segment) : [...e], Pl
3770
3774
  onClick: s
3771
3775
  }) => {
3772
3776
  const { colors: i } = it();
3773
- return /* @__PURE__ */ o.createElement(Gl, { onClick: s, $clickable: !!s }, /* @__PURE__ */ o.createElement(jl, { $bgColor: r ?? i.base.primary }, /* @__PURE__ */ o.createElement(G, { type: "file-document", size: 24, color: n ?? i.base.primaryContrastContent })), /* @__PURE__ */ o.createElement(ql, null, /* @__PURE__ */ o.createElement(io, { variant: "button", color: g.themedColor.textHighEmphasis }, e), /* @__PURE__ */ o.createElement(M, { color: g.themedColor.textMidEmphasis, variant: "caption3" }, t)));
3777
+ return /* @__PURE__ */ o.createElement(Gl, { onClick: s, $clickable: !!s }, /* @__PURE__ */ o.createElement(jl, { $bgColor: r ?? i.base.primary }, /* @__PURE__ */ o.createElement(G, { type: "file-document", size: 24, color: n ?? i.base.primaryContrastContent })), /* @__PURE__ */ o.createElement(ql, null, /* @__PURE__ */ o.createElement(ao, { variant: "button", color: g.themedColor.textHighEmphasis }, e), /* @__PURE__ */ o.createElement(M, { color: g.themedColor.textMidEmphasis, variant: "caption3" }, t)));
3774
3778
  }, Gl = m.div`border-radius:12px;gap:8px;width:${W.BODY_MAX_WIDTH}px;height:64px;display:flex;align-items:center;padding:12px;box-sizing:border-box;border:1px solid ${g.themedColor.textDisabled};background-color:${g.themedColor.bg_50_600};${({ $clickable: e }) => e && Wl}`, Wl = R`cursor:pointer;&:hover{background-color:${g.themedColor.bg_100_500};}`, jl = m.div`border-radius:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background-color:${({ $bgColor: e }) => e};`, ql = m.div`display:flex;flex:1;flex-direction:column;gap:4px;min-width:0;`;
3775
3779
  function Kl({ file: e, children: t, onClickFile: n }) {
3776
3780
  return /* @__PURE__ */ o.createElement(Yl, null, /* @__PURE__ */ o.createElement(
@@ -3816,7 +3820,7 @@ const Jl = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:$
3816
3820
  gridColumns: t > 0 ? Bt : Mt,
3817
3821
  wideBottomCount: t
3818
3822
  };
3819
- }, ao = ({ images: e, isPending: t = !1, onClickImage: n }) => {
3823
+ }, lo = ({ images: e, isPending: t = !1, onClickImage: n }) => {
3820
3824
  const r = e.length;
3821
3825
  if (r === 0) return null;
3822
3826
  const { gridColumns: s, wideBottomCount: i = 0 } = ic(r);
@@ -3857,7 +3861,7 @@ const Jl = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:$
3857
3861
  }
3858
3862
  `}
3859
3863
  }
3860
- `, dc = m.div`position:absolute;top:0;left:0;width:100%;height:100%;background-color:${g.color.overlay.dark};pointer-events:none;`, lo = m.div`display:flex;align-items:center;justify-content:center;`, uc = m(lo)`position:absolute;inset:0;`, mc = m(lo)`position:absolute;inset:0;${H.light`
3864
+ `, dc = m.div`position:absolute;top:0;left:0;width:100%;height:100%;background-color:${g.color.overlay.dark};pointer-events:none;`, co = m.div`display:flex;align-items:center;justify-content:center;`, uc = m(co)`position:absolute;inset:0;`, mc = m(co)`position:absolute;inset:0;${H.light`
3861
3865
  background-color: ${g.color.background200};
3862
3866
  `}
3863
3867
  ${H.dark`
@@ -3873,8 +3877,8 @@ const Jl = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:$
3873
3877
  const a = e[i];
3874
3878
  a && (r ? r({ files: e, index: i }) : n && n({ url: a.url, type: a.type || "image/*" }));
3875
3879
  };
3876
- return /* @__PURE__ */ o.createElement(hc, null, /* @__PURE__ */ o.createElement(ao, { images: e, onClickImage: s }), t);
3877
- }, hc = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:${W.GAP_GROUPED}px;`, fc = "✱", co = (e) => {
3880
+ return /* @__PURE__ */ o.createElement(hc, null, /* @__PURE__ */ o.createElement(lo, { images: e, onClickImage: s }), t);
3881
+ }, hc = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:${W.GAP_GROUPED}px;`, fc = "✱", uo = (e) => {
3878
3882
  const t = new RegExp(`(\`+)([^\`]+?)\\1|(${fc}+)`, "g");
3879
3883
  return e.replace(t, (n, r, s, i) => r ? n : i ? `<span id=${Xl} aria-label="masked-text">${i}</span>` : n);
3880
3884
  }, Ec = (e) => e.replace(/\*\*(.*?)\*\*/g, "<b>$1</b>"), rr = (e) => {
@@ -3889,10 +3893,10 @@ const Jl = m.div`display:flex;flex-direction:column;align-items:flex-start;gap:$
3889
3893
  localFiles: (t = e.messageParams) == null ? void 0 : t.fileInfoList.map((n) => n.file)
3890
3894
  }
3891
3895
  };
3892
- }, bc = B(async () => ({ default: (await import("./C4NDe7Wd.js")).MarkdownText })), xc = B(async () => ({ default: (await import("./Ch_6OPTz.js")).CodeBlock }));
3896
+ }, bc = B(async () => ({ default: (await import("./DGBsXgND.js")).MarkdownText })), xc = B(async () => ({ default: (await import("./Ch_6OPTz.js")).CodeBlock }));
3893
3897
  function _c(e) {
3894
3898
  var s, i;
3895
- const t = e.maxBodyWidth ?? W.BODY_MAX_WIDTH, n = ae(() => ks(e.message, co), [e.message]), r = {
3899
+ const t = e.maxBodyWidth ?? W.BODY_MAX_WIDTH, n = ae(() => ks(e.message, uo), [e.message]), r = {
3896
3900
  id: `${ke}-text-body`,
3897
3901
  $maxWidth: t,
3898
3902
  $color: (s = e.customStyle) == null ? void 0 : s.bubbleContentColor,
@@ -3911,7 +3915,7 @@ const or = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
3911
3915
  transition: max-width 0.3s;
3912
3916
  overflow-wrap: break-word;
3913
3917
  `, sr = m(M)`align-items:flex-start;line-height:140%;white-space:pre-wrap;padding:0 12px;`;
3914
- function uo({ id: e, src: t, size: n = 56, onClick: r, style: s }) {
3918
+ function mo({ id: e, src: t, size: n = 56, onClick: r, style: s }) {
3915
3919
  return /* @__PURE__ */ o.createElement(yc, { id: e, tabIndex: 0, onClick: r, $size: be(n), style: s }, t ? /* @__PURE__ */ o.createElement(vc, { src: t }) : /* @__PURE__ */ o.createElement(G, { type: "user", size: n }));
3916
3920
  }
3917
3921
  const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position:relative;flex-shrink:0;height:${(e) => e.$size};width:${(e) => e.$size};background-color:${g.themedColor.bg_100_500};&:focus{outline:none;}`, vc = m.img`object-fit:cover;width:100%;height:100%;position:absolute;`, Cc = ({
@@ -3919,7 +3923,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
3919
3923
  isBotMessage: t
3920
3924
  }) => {
3921
3925
  const n = `${ke}-sender-avatar`;
3922
- return t && !e.profileUrl ? /* @__PURE__ */ o.createElement(Tc, { id: n }, /* @__PURE__ */ o.createElement(G, { type: "delight", size: "100%" })) : /* @__PURE__ */ o.createElement(uo, { id: n, size: W.AVATAR_SIZE, src: e.profileUrl });
3926
+ return t && !e.profileUrl ? /* @__PURE__ */ o.createElement(Tc, { id: n }, /* @__PURE__ */ o.createElement(G, { type: "delight", size: "100%" })) : /* @__PURE__ */ o.createElement(mo, { id: n, size: W.AVATAR_SIZE, src: e.profileUrl });
3923
3927
  }, Tc = m.div`flex-shrink:0;width:${W.AVATAR_SIZE}px;height:${W.AVATAR_SIZE}px;box-sizing:border-box;padding:4px;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:${({ theme: e }) => e.colors.base.primary}!important;ellipse,path{fill:${({ theme: e }) => e.colors.base.primaryContrastContent}!important;}}`, Sc = ({ sender: e }) => /* @__PURE__ */ o.createElement(Ac, { id: `${ke}-sender-name`, variant: "caption1", color: g.themedColor.textMidEmphasis }, e.nickname), Ac = m(M)`text-align:start;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:5px;padding-inline:0 7px;`, wc = ({ createdAt: e }) => {
3924
3928
  const { stringSet: t, format: n } = Y();
3925
3929
  return e ? /* @__PURE__ */ o.createElement(M, { id: `${ke}-sent-time`, variant: "caption4", color: g.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
@@ -3949,7 +3953,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
3949
3953
  ))));
3950
3954
  }, Rc = m.div`display:flex;flex-direction:column;gap:8px;border-radius:8px;padding:8px 12px 6px;`, Nc = m(M)`opacity:0.5;`, Fc = m.div`display:flex;flex-direction:column;gap:8px;`, Bc = m(M)`text-decoration:underline;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;`, Pc = m.div`display:flex;align-items:center;gap:4px;cursor:pointer;&:hover{opacity:0.5;}`, Uc = (e) => /* @__PURE__ */ o.createElement(o.Fragment, null), Hc = ({ visible: e, onClose: t, children: n }) => /* @__PURE__ */ o.createElement(Ft, { rootElementId: he.WINDOW, visible: e, onClose: t }, /* @__PURE__ */ o.createElement(Wc, null, n)), Vc = ({ onClick: e, destructive: t, icon: n, children: r }) => /* @__PURE__ */ o.createElement(zc, { onClick: e, $destructive: t }, n && /* @__PURE__ */ o.createElement(Gc, null, /* @__PURE__ */ o.createElement(G, { type: n, size: 24, color: g.themedColor.primary })), r), De = Object.assign(Hc, {
3951
3955
  ActionItem: Vc
3952
- }), zc = m.button`all:unset;display:flex;align-items:center;gap:24px;width:100%;padding:12px 24px;cursor:pointer;color:${({ $destructive: e }) => e ? g.themedColor.error : g.themedColor.textHighEmphasis};`, Gc = m.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Wc = m.div`position:absolute;left:0;right:0;bottom:0;border-radius:12px 12px 0 0;flex-direction:column;align-items:flex-end;margin:0 auto;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, an = (e) => `${e}-filled`, jc = (e) => e === "good" ? Dn.GOOD : Dn.BAD, mo = R`&:hover{opacity:0.8;}&:active{opacity:0.6;}`, ir = {
3956
+ }), zc = m.button`all:unset;display:flex;align-items:center;gap:24px;width:100%;padding:12px 24px;cursor:pointer;color:${({ $destructive: e }) => e ? g.themedColor.error : g.themedColor.textHighEmphasis};`, Gc = m.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Wc = m.div`position:absolute;left:0;right:0;bottom:0;border-radius:12px 12px 0 0;flex-direction:column;align-items:flex-end;margin:0 auto;box-sizing:border-box;background-color:${({ theme: e }) => e.colors.base.modalContentBackground};`, an = (e) => `${e}-filled`, jc = (e) => e === "good" ? Dn.GOOD : Dn.BAD, go = R`&:hover{opacity:0.8;}&:active{opacity:0.6;}`, ir = {
3953
3957
  good: g.themedColor.secondary,
3954
3958
  bad: g.themedColor.error
3955
3959
  }, qc = ({
@@ -4017,7 +4021,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4017
4021
  &:active {
4018
4022
  opacity: 0.6;
4019
4023
  }
4020
- `, Qc = m.div`display:flex;flex-direction:column;gap:6px;`, ed = m.textarea`font-family:inherit;font-size:12px;line-height:16px;border:1px solid ${g.themedColor.textDisabled};border-radius:4px;padding:6px 12px;color:${g.themedColor.textHighEmphasis};background-color:${g.themedColor.textLowEmphasisInverse};resize:none;field-sizing:content;min-height:28px;max-height:118px;overflow-y:auto;&::placeholder{color:${g.themedColor.textLowEmphasis};}&:focus{outline:none;}`, td = m.div`padding-inline:24px;padding-block:16px;display:flex;justify-content:flex-end;gap:4px;`, go = m.button`width:86px;height:40px;border-radius:20px;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s;`, nd = m(go)`${mo}`, rd = m(go)`cursor:${({ disabled: e }) => e ? "not-allowed" : "pointer"};opacity:${({ disabled: e }) => e ? 0.4 : 1};&:hover:not(:disabled){opacity:0.8;}&:active:not(:disabled){opacity:0.6;}background-color:${({ theme: e }) => e.colors.base.primary};span{color:${({ theme: e }) => e.colors.base.primaryContrastContent};}`, ar = {
4024
+ `, Qc = m.div`display:flex;flex-direction:column;gap:6px;`, ed = m.textarea`font-family:inherit;font-size:12px;line-height:16px;border:1px solid ${g.themedColor.textDisabled};border-radius:4px;padding:6px 12px;color:${g.themedColor.textHighEmphasis};background-color:${g.themedColor.textLowEmphasisInverse};resize:none;field-sizing:content;min-height:28px;max-height:118px;overflow-y:auto;&::placeholder{color:${g.themedColor.textLowEmphasis};}&:focus{outline:none;}`, td = m.div`padding-inline:24px;padding-block:16px;display:flex;justify-content:flex-end;gap:4px;`, po = m.button`width:86px;height:40px;border-radius:20px;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s;`, nd = m(po)`${go}`, rd = m(po)`cursor:${({ disabled: e }) => e ? "not-allowed" : "pointer"};opacity:${({ disabled: e }) => e ? 0.4 : 1};&:hover:not(:disabled){opacity:0.8;}&:active:not(:disabled){opacity:0.6;}background-color:${({ theme: e }) => e.colors.base.primary};span{color:${({ theme: e }) => e.colors.base.primaryContrastContent};}`, ar = {
4021
4025
  good: g.themedColor.secondary,
4022
4026
  bad: g.themedColor.error
4023
4027
  }, od = ({
@@ -4076,7 +4080,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4076
4080
  background-color: ${e ? g.color.background500 : "transparent"};
4077
4081
  `}
4078
4082
 
4079
- ${mo}
4083
+ ${go}
4080
4084
  `, cr = m(M)`color:${g.themedColor.textMidEmphasis};${H.dark`
4081
4085
  color: ${g.themedColor.textHighEmphasis};
4082
4086
  `}
@@ -4217,7 +4221,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4217
4221
  }
4218
4222
  };
4219
4223
  }
4220
- }, po = (e) => {
4224
+ }, ho = (e) => {
4221
4225
  const { options: t, submitted: n = !1, error: r = !1, className: s } = e, { selectedValues: i, handleOptionClick: a } = yd(e);
4222
4226
  return /* @__PURE__ */ o.createElement(Cd, { className: s }, t.map((l) => {
4223
4227
  const c = i.includes(l.value);
@@ -4271,7 +4275,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4271
4275
  ${r} ${kd}
4272
4276
  ` : r;
4273
4277
  }}
4274
- `, Md = (e) => /* @__PURE__ */ o.createElement(po, { ...e, multiple: !1 }), Ld = (e) => /* @__PURE__ */ o.createElement(po, { ...e, multiple: !0 }), Od = m.div`width:100%;height:1px;background-color:${g.themedColor.textDisabled};`, Dd = ({ className: e }) => /* @__PURE__ */ o.createElement(Od, { className: e }), Rd = ({
4278
+ `, Md = (e) => /* @__PURE__ */ o.createElement(ho, { ...e, multiple: !1 }), Ld = (e) => /* @__PURE__ */ o.createElement(ho, { ...e, multiple: !0 }), Od = m.div`width:100%;height:1px;background-color:${g.themedColor.textDisabled};`, Dd = ({ className: e }) => /* @__PURE__ */ o.createElement(Od, { className: e }), Rd = ({
4275
4279
  value: e = "",
4276
4280
  onChange: t,
4277
4281
  placeholder: n,
@@ -4296,7 +4300,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4296
4300
  $submitted: i
4297
4301
  };
4298
4302
  return r === "multi-line" ? /* @__PURE__ */ o.createElement(Fd, { ...u }) : /* @__PURE__ */ o.createElement(Nd, { ...u });
4299
- }, ho = R`width:100%;padding:8px 12px;border-radius:6px;font-size:14px;font-weight:400;line-height:1.43;outline:none;transition:all 0.2s ease;&::placeholder{color:${g.themedColor.textLowEmphasis};}`, fo = R`color:${g.themedColor.textHighEmphasis};border:1px solid transparent;cursor:not-allowed;${H.light`
4303
+ }, fo = R`width:100%;padding:8px 12px;border-radius:6px;font-size:14px;font-weight:400;line-height:1.43;outline:none;transition:all 0.2s ease;&::placeholder{color:${g.themedColor.textLowEmphasis};}`, Eo = R`color:${g.themedColor.textHighEmphasis};border:1px solid transparent;cursor:not-allowed;${H.light`
4300
4304
  background-color: ${g.color.ondark.textMidEmphasis};
4301
4305
  `}
4302
4306
  ${H.dark`
@@ -4306,13 +4310,13 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4306
4310
  &::placeholder {
4307
4311
  color: ${g.themedColor.textLowEmphasis};
4308
4312
  }
4309
- `, Eo = R`border:1px solid ${g.themedColor.error};color:${g.themedColor.textHighEmphasis};${H.light`
4313
+ `, bo = R`border:1px solid ${g.themedColor.error};color:${g.themedColor.textHighEmphasis};${H.light`
4310
4314
  background-color: ${g.color.background50};
4311
4315
  `}
4312
4316
  ${H.dark`
4313
4317
  background-color: ${g.color.onlight.textLowEmphasis};
4314
4318
  `}
4315
- `, bo = R`border:1px solid ${g.themedColor.textDisabled};color:${g.themedColor.textHighEmphasis};${H.light`
4319
+ `, xo = R`border:1px solid ${g.themedColor.textDisabled};color:${g.themedColor.textHighEmphasis};${H.light`
4316
4320
  background-color: ${g.color.background50};
4317
4321
  `}
4318
4322
  ${H.dark`
@@ -4322,7 +4326,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4322
4326
  &:focus {
4323
4327
  border-color: ${g.themedColor.primary};
4324
4328
  }
4325
- `, Nd = m.input`${ho};height:36px;${({ $error: e, $submitted: t }) => t ? fo : e ? Eo : bo}`, Fd = m.textarea`${ho};height:96px;resize:none;font-family:inherit;${({ $error: e, $submitted: t }) => t ? fo : e ? Eo : bo}`, Bd = ({ children: e, className: t, style: n }) => /* @__PURE__ */ o.createElement(M, { variant: "button", color: g.themedColor.textHighEmphasis, className: t, style: n }, e), ne = {
4329
+ `, Nd = m.input`${fo};height:36px;${({ $error: e, $submitted: t }) => t ? Eo : e ? bo : xo}`, Fd = m.textarea`${fo};height:96px;resize:none;font-family:inherit;${({ $error: e, $submitted: t }) => t ? Eo : e ? bo : xo}`, Bd = ({ children: e, className: t, style: n }) => /* @__PURE__ */ o.createElement(M, { variant: "button", color: g.themedColor.textHighEmphasis, className: t, style: n }, e), ne = {
4326
4330
  Title: Bd,
4327
4331
  Label: pd,
4328
4332
  ErrorLabel: gd,
@@ -4385,7 +4389,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4385
4389
  const b = () => t.version > Pd, x = () => t.fields.some((v) => !Ud.has(v.type));
4386
4390
  return b() || x() ? { visible: !1, cancelable: !0, reason: n.FORM_NOT_SUPPORTED } : l === "draft" && (e.isHandedOff || e.isConversationClosed) ? { visible: !1, cancelable: !1, reason: n.FORM_UNAVAILABLE } : { visible: !0, cancelable: !0, reason: "" };
4387
4391
  }, [t.version, t.fields, l, e.isHandedOff, e.isConversationClosed]);
4388
- return l === "canceled" ? null : E.visible ? /* @__PURE__ */ o.createElement(Ar, null, /* @__PURE__ */ o.createElement(ur, { $maxWidth: e.maxBodyWidth ?? W.BODY_MAX_WIDTH }, /* @__PURE__ */ o.createElement(ne.Title, null, t.title), /* @__PURE__ */ o.createElement(Vd, null, c.map((b) => /* @__PURE__ */ o.createElement(zd, { key: b.key }, /* @__PURE__ */ o.createElement(ne.Label, { style: { marginBottom: "6px" }, required: b.required }, b.label), b.type === "text" && /* @__PURE__ */ o.createElement(
4392
+ return l === "canceled" ? null : E.visible ? /* @__PURE__ */ o.createElement(wr, null, /* @__PURE__ */ o.createElement(ur, { $maxWidth: e.maxBodyWidth ?? W.BODY_MAX_WIDTH }, /* @__PURE__ */ o.createElement(ne.Title, null, t.title), /* @__PURE__ */ o.createElement(Vd, null, c.map((b) => /* @__PURE__ */ o.createElement(zd, { key: b.key }, /* @__PURE__ */ o.createElement(ne.Label, { style: { marginBottom: "6px" }, required: b.required }, b.label), b.type === "text" && /* @__PURE__ */ o.createElement(
4389
4393
  ne.TextInput,
4390
4394
  {
4391
4395
  value: b.value || "",
@@ -4471,7 +4475,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4471
4475
  const s = e == null ? void 0 : e.message_template;
4472
4476
  if (!jd.has((s == null ? void 0 : s.type) ?? "default")) throw new Error("Unsupported template type");
4473
4477
  if (!n) throw new Error("onRequestMessageTemplate is required");
4474
- const { theme: a } = Qr(), l = la({
4478
+ const { theme: a } = eo(), l = la({
4475
4479
  onRequestTemplate: n,
4476
4480
  onGetCachedTemplate: t,
4477
4481
  theme: a.selectedTheme,
@@ -4515,7 +4519,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4515
4519
  }
4516
4520
  `}
4517
4521
  `, eu = R`flex-direction:column;align-items:flex-end;`, tu = R`flex-direction:row;overflow-x:scroll;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}`, nu = R`max-width:calc(100% - 70px);white-space:pre-wrap;`, ru = R`white-space:nowrap;`, ou = (e) => {
4518
- const { components: t } = Pe.useContext(), { stringSet: n } = Y(), r = Or(e) ? /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e }) : null;
4522
+ const { components: t } = Pe.useContext(), { stringSet: n } = Y(), r = Dr(e) ? /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e }) : null;
4519
4523
  if (e.messageType === "user")
4520
4524
  return r;
4521
4525
  if (e.messageType === "file") {
@@ -4523,7 +4527,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4523
4527
  return s.type.startsWith("image") || s.type.startsWith("video") ? /* @__PURE__ */ o.createElement(t.MediaMessageBody, { ...e }, r) : /* @__PURE__ */ o.createElement(t.FileMessageBody, { ...e }, r);
4524
4528
  }
4525
4529
  return e.messageType === "multipleFiles" ? /* @__PURE__ */ o.createElement(t.MultipleFilesMessageBody, { ...e }, r) : /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e, message: n.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
4526
- }, su = (e) => /* @__PURE__ */ o.createElement(xo, { ...e, testerMode: !1 }), Pe = _e({
4530
+ }, su = (e) => /* @__PURE__ */ o.createElement(_o, { ...e, testerMode: !1 }), Pe = _e({
4527
4531
  template: su,
4528
4532
  components: {
4529
4533
  SenderName: Sc,
@@ -4544,7 +4548,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4544
4548
  Feedback: od,
4545
4549
  MessageLogs: Wd
4546
4550
  }
4547
- }), xo = (e) => {
4551
+ }), _o = (e) => {
4548
4552
  var p, b, x, v, T, I, w;
4549
4553
  const { components: t } = Pe.useContext(), { streamText: n, isAnimating: r } = Sa({
4550
4554
  text: e.message,
@@ -4571,7 +4575,7 @@ const yc = m.div`border-radius:50%;display:inline-block;overflow:hidden;position
4571
4575
  )),
4572
4576
  messageTemplateLoadingFallback: s.messageTemplateLoadingFallback ?? /* @__PURE__ */ o.createElement(Kt, { $extraStartPadding: E }, /* @__PURE__ */ o.createElement(t.TypingIndicator, { ...s }))
4573
4577
  }
4574
- )), /* @__PURE__ */ o.createElement(t.CustomMessageTemplate, { ...s }), c && /* @__PURE__ */ o.createElement(mr, { $extraStartPadding: E }, /* @__PURE__ */ o.createElement(t.Form, { ...s }))), _ && f && /* @__PURE__ */ o.createElement(lu, { $extraStartPadding: E + 8 }, /* @__PURE__ */ o.createElement(t.SentTime, { ...s })), /* @__PURE__ */ o.createElement(Ar, null, !i && /* @__PURE__ */ o.createElement(mt, { $extraStartPadding: E + 8 }, /* @__PURE__ */ o.createElement(t.Feedback, { ...s })), s.suggestedRepliesVisible && /* @__PURE__ */ o.createElement(t.SuggestedReplies, { ...s }), /* @__PURE__ */ o.createElement(t.MessageLogs, { ...s })));
4578
+ )), /* @__PURE__ */ o.createElement(t.CustomMessageTemplate, { ...s }), c && /* @__PURE__ */ o.createElement(mr, { $extraStartPadding: E }, /* @__PURE__ */ o.createElement(t.Form, { ...s }))), _ && f && /* @__PURE__ */ o.createElement(lu, { $extraStartPadding: E + 8 }, /* @__PURE__ */ o.createElement(t.SentTime, { ...s })), /* @__PURE__ */ o.createElement(wr, null, !i && /* @__PURE__ */ o.createElement(mt, { $extraStartPadding: E + 8 }, /* @__PURE__ */ o.createElement(t.Feedback, { ...s })), s.suggestedRepliesVisible && /* @__PURE__ */ o.createElement(t.SuggestedReplies, { ...s }), /* @__PURE__ */ o.createElement(t.MessageLogs, { ...s })));
4575
4579
  }, iu = m.div`display:flex;flex-direction:column;align-items:flex-start;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
4576
4580
  `, mt = m.div`display:flex;align-self:stretch;justify-content:flex-start;${({ $startPadding: e = W.HORIZONTAL_PADDING, $endPadding: t = W.HORIZONTAL_PADDING, $extraStartPadding: n = 0 }) => `
4577
4581
  padding-inline: ${e + n}px ${t}px;
@@ -4632,13 +4636,13 @@ const gu = m.div`display:flex;flex-direction:column;align-items:flex-end;gap:${W
4632
4636
  const h = a[u];
4633
4637
  h && (s ? s({ files: a, index: u }) : r && r({ url: h.url, type: h.type || "image/*" }));
4634
4638
  };
4635
- return /* @__PURE__ */ o.createElement(Eu, null, /* @__PURE__ */ o.createElement(ao, { images: a, isPending: l, onClickImage: d }), i);
4639
+ return /* @__PURE__ */ o.createElement(Eu, null, /* @__PURE__ */ o.createElement(lo, { images: a, isPending: l, onClickImage: d }), i);
4636
4640
  }, Eu = m.div`display:flex;flex-direction:column;align-items:flex-end;gap:${W.GAP_GROUPED}px;`;
4637
4641
  function bu(e) {
4638
4642
  var n, r;
4639
4643
  const t = ae(() => {
4640
- const s = Ec(co(e.message));
4641
- return $r.sanitize(s);
4644
+ const s = Ec(uo(e.message));
4645
+ return Mr.sanitize(s);
4642
4646
  }, [e.message]);
4643
4647
  return /* @__PURE__ */ o.createElement(
4644
4648
  xu,
@@ -4675,7 +4679,7 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
4675
4679
  return e ? /* @__PURE__ */ o.createElement(M, { variant: "caption4", color: g.themedColor.textLowEmphasis }, n(e, t.DATE_FORMAT__MESSAGE_TIMESTAMP)) : null;
4676
4680
  }, Tu = (e) => {
4677
4681
  const { components: t } = Pt.useContext(), { stringSet: n } = Y(), r = () => {
4678
- const a = Or(e) ? /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e }) : null;
4682
+ const a = Dr(e) ? /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e }) : null;
4679
4683
  return e.messageType === "user" ? a : e.messageType === "file" ? e.file.type.startsWith("image") ? /* @__PURE__ */ o.createElement(t.MediaMessageBody, { ...e }, a) : /* @__PURE__ */ o.createElement(t.FileMessageBody, { ...e }, a) : e.messageType === "multipleFiles" ? /* @__PURE__ */ o.createElement(t.MultipleFilesMessageBody, { ...e }, a) : /* @__PURE__ */ o.createElement(t.TextMessageBody, { ...e, message: n.UNKNOWN__UNKNOWN_MESSAGE_TYPE });
4680
4684
  }, s = e.sendingStatus === "failed" && e.onClickFailedMessage, i = (a) => {
4681
4685
  var l;
@@ -4709,8 +4713,8 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
4709
4713
  MultipleFilesMessageBody: fu
4710
4714
  }
4711
4715
  }), Au = m.div`display:flex;flex:1;flex-direction:column;align-items:flex-end;margin-bottom:${({ $marginBottom: e }) => `${e}px`};
4712
- `, _o = m.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = W.HORIZONTAL_PADDING, $endPadding: t = W.HORIZONTAL_PADDING, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
4713
- `, wu = m(_o)``, Iu = m(_o)`margin-top:${W.BODY_TIME_GAP}px;`, ku = (e) => e.messageType !== "admin" ? null : /* @__PURE__ */ o.createElement($u, null, /* @__PURE__ */ o.createElement(M, { variant: "caption2", color: g.themedColor.textMidEmphasis }, Mu($r.sanitize(e.message)))), $u = m.div`text-align:center;text-wrap:pretty;word-break:break-word;padding-inline:${W.HORIZONTAL_PADDING}px;a{text-decoration:underline;color:inherit;}`, Mu = (e) => {
4716
+ `, yo = m.div`display:flex;align-self:stretch;justify-content:flex-end;${({ $startPadding: e = W.HORIZONTAL_PADDING, $endPadding: t = W.HORIZONTAL_PADDING, $extraEndPadding: n = 0 }) => `padding-inline: ${e}px ${t + n}px;`};
4717
+ `, wu = m(yo)``, Iu = m(yo)`margin-top:${W.BODY_TIME_GAP}px;`, ku = (e) => e.messageType !== "admin" ? null : /* @__PURE__ */ o.createElement($u, null, /* @__PURE__ */ o.createElement(M, { variant: "caption2", color: g.themedColor.textMidEmphasis }, Mu(Mr.sanitize(e.message)))), $u = m.div`text-align:center;text-wrap:pretty;word-break:break-word;padding-inline:${W.HORIZONTAL_PADDING}px;a{text-decoration:underline;color:inherit;}`, Mu = (e) => {
4714
4718
  try {
4715
4719
  const t = [];
4716
4720
  let n = e, r = 0;
@@ -4727,14 +4731,14 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
4727
4731
  (h, f) => f.match.index < h.match.index ? f : h
4728
4732
  ), { match: c, type: d } = l, u = c.index;
4729
4733
  u > 0 && t.push(n.slice(0, u)), d === "link" ? t.push(
4730
- /* @__PURE__ */ o.createElement("a", { key: r++, href: c[2], target: "_blank", rel: Xr }, c[1])
4734
+ /* @__PURE__ */ o.createElement("a", { key: r++, href: c[2], target: "_blank", rel: Zr }, c[1])
4731
4735
  ) : d === "bold" && t.push(/* @__PURE__ */ o.createElement("strong", { key: r++ }, c[1])), n = n.slice(u + c[0].length);
4732
4736
  }
4733
4737
  return t.filter((s) => s !== "");
4734
4738
  } catch {
4735
4739
  return [e];
4736
4740
  }
4737
- }, yo = ({ onClick: e, checked: t, label: n, disabled: r, labelVariant: s = "caption2" }) => {
4741
+ }, vo = ({ onClick: e, checked: t, label: n, disabled: r, labelVariant: s = "caption2" }) => {
4738
4742
  const i = t ? g.themedColor.primary : r ? g.themedColor.textDisabled : g.themedColor.textLowEmphasis, a = t ? g.themedColor.textHighEmphasis : r ? g.themedColor.textLowEmphasis : g.themedColor.textHighEmphasis;
4739
4743
  return /* @__PURE__ */ o.createElement(Du, { onClick: e, disabled: r }, /* @__PURE__ */ o.createElement(Lu, null, /* @__PURE__ */ o.createElement(G, { size: 20, type: t ? "radio-on" : "radio-off", color: i })), /* @__PURE__ */ o.createElement(Ou, { variant: s, color: a }, n));
4740
4744
  }, Lu = m.div`width:20px;height:20px;`, Ou = m(M)`line-height:20px;word-break:break-word;`, Du = m.button`all:unset;display:flex;align-items:flex-start;justify-content:flex-start;gap:2px;&:enabled{cursor:pointer;}`, Ru = ({ csatPayload: e, submitted: t, defaultValue: n, value: r, onChange: s }) => (z(() => {
@@ -4743,7 +4747,7 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
4743
4747
  { label: e.cre.positive_label, value: !0 },
4744
4748
  { label: e.cre.negative_label, value: !1 }
4745
4749
  ].map((i) => /* @__PURE__ */ o.createElement(
4746
- yo,
4750
+ vo,
4747
4751
  {
4748
4752
  key: i.label,
4749
4753
  checked: r === i.value,
@@ -4771,7 +4775,7 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
4771
4775
  error: s
4772
4776
  }
4773
4777
  ), e.response_type === "single_choice" && /* @__PURE__ */ o.createElement(Uu, null, e.options.map((a) => /* @__PURE__ */ o.createElement(
4774
- yo,
4778
+ vo,
4775
4779
  {
4776
4780
  key: a,
4777
4781
  checked: n === a,
@@ -5018,11 +5022,11 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
5018
5022
  const { stringSet: e } = Y();
5019
5023
  return /* @__PURE__ */ o.createElement(M, { variant: "body2", color: g.themedColor.textMidEmphasis, style: { textAlign: "center" } }, e.CSAT_SUBMISSION_EXPIRED);
5020
5024
  }, tm = ({ onMount: e, children: t }) => (z(() => {
5021
- e && oo(e);
5025
+ e && so(e);
5022
5026
  }, []), /* @__PURE__ */ o.createElement(o.Fragment, null, t)), nm = (e) => {
5023
5027
  if (e.messageType !== "admin.csat")
5024
5028
  throw new Error("Invalid message type");
5025
- const { extendedMessagePayload: t, onSubmitCSAT: n, onScrollToBottom: r } = e, { csat: s, csatReason: i, csatExpireAt: a, isResolvedWhenDeterminedByUser: l } = e, c = kr(), d = Qu(t == null ? void 0 : t.csat), u = V(!1);
5029
+ const { extendedMessagePayload: t, onSubmitCSAT: n, onScrollToBottom: r } = e, { csat: s, csatReason: i, csatExpireAt: a, isResolvedWhenDeterminedByUser: l } = e, c = $r(), d = Qu(t == null ? void 0 : t.csat), u = V(!1);
5026
5030
  if (!d || !d.visibility || !Ae[d.type]) return null;
5027
5031
  const h = d.type === Ae.AI_AGENT_CSAT_5 || d.type === Ae.AI_AGENT_CSAT_5_WITH_CRE || d.type === Ae.HELPDESK_CSAT_5 ? Yt : () => null;
5028
5032
  return /* @__PURE__ */ o.createElement(rm, null, !s && Pn(a) ? /* @__PURE__ */ o.createElement(em, null) : /* @__PURE__ */ o.createElement(
@@ -5142,14 +5146,14 @@ const xu = m.div`display:flex;flex-direction:column;border-radius:12px;overflow:
5142
5146
  color: ${t};
5143
5147
  }
5144
5148
  `}
5145
- `, Ct = m.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Lt = m.div`display:flex;gap:8px;align-items:center;word-break:break-word;`, cm = m(Lt)`cursor:pointer;gap:4px;`, Xt = m(Lt)`flex-direction:row;align-items:center;`, pr = m.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, vo = qe(null);
5149
+ `, Ct = m.div`display:flex;align-items:center;justify-content:center;flex-shrink:0;`, Lt = m.div`display:flex;gap:8px;align-items:center;word-break:break-word;`, cm = m(Lt)`cursor:pointer;gap:4px;`, Xt = m(Lt)`flex-direction:row;align-items:center;`, pr = m.div`display:flex;gap:4px;flex-direction:column;align-items:flex-start;`, Co = qe(null);
5146
5150
  function dm({
5147
5151
  testerType: e,
5148
5152
  origin: t,
5149
5153
  children: n
5150
5154
  }) {
5151
5155
  return /* @__PURE__ */ o.createElement(
5152
- vo.Provider,
5156
+ Co.Provider,
5153
5157
  {
5154
5158
  value: { testerType: e, isActionbookTester: e === "actionbook", origin: t }
5155
5159
  },
@@ -5158,13 +5162,13 @@ function dm({
5158
5162
  );
5159
5163
  }
5160
5164
  const Xe = () => {
5161
- const e = we(vo);
5165
+ const e = we(Co);
5162
5166
  if (!e) throw new Error("_UNSAFE_INTERNAL_DashboardTesterProvider not found");
5163
5167
  return e;
5164
5168
  }, um = () => {
5165
5169
  const { isActionbookTester: e } = Xe();
5166
5170
  return /* @__PURE__ */ o.createElement(Pe.Template, { template: e ? mm : void 0 }, /* @__PURE__ */ o.createElement(Pe.MessageLogs, { component: gm }));
5167
- }, mm = (e) => /* @__PURE__ */ o.createElement(xo, { ...e, testerMode: !0, maxBodyWidth: W.WIDE_BODY_MAX_WIDTH }), gm = ({ extendedMessagePayload: e = {} }) => {
5171
+ }, mm = (e) => /* @__PURE__ */ o.createElement(_o, { ...e, testerMode: !0, maxBodyWidth: W.WIDE_BODY_MAX_WIDTH }), gm = ({ extendedMessagePayload: e = {} }) => {
5168
5172
  const { handlers: t } = X(), { manual: n, groundedness: r, function_calls: s, agent_message_templates: i, is_thinking: a } = e;
5169
5173
  return a || !n && !(r != null && r.length) && !(s != null && s.length) && !(i != null && i.length) ? /* @__PURE__ */ o.createElement(o.Fragment, null) : /* @__PURE__ */ o.createElement(pm, null, /* @__PURE__ */ o.createElement(hm, { width: 4 }), /* @__PURE__ */ o.createElement(
5170
5174
  am,
@@ -5236,7 +5240,7 @@ const Xe = () => {
5236
5240
  f,
5237
5241
  T > 0 && /* @__PURE__ */ o.createElement("div", { style: { minHeight: T } })
5238
5242
  ), /* @__PURE__ */ o.createElement(_m, { id: "infinite-list-overlay-container" }, /* @__PURE__ */ o.createElement(ym, { id: "infinite-list-overlay" }, y)));
5239
- }), bm = m.div`display:flex;position:relative;flex:1;overflow:hidden;`, xm = m.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:${g.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, _m = m.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, ym = m.div`pointer-events:auto;`, vm = (e) => Le(e) || Lr(e);
5243
+ }), bm = m.div`display:flex;position:relative;flex:1;overflow:hidden;`, xm = m.div`display:flex;flex:1;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:${g.themedColor.textLowEmphasis}transparent;&::-webkit-scrollbar-thumb:hover{background-color:transparent;}`, _m = m.div`position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;`, ym = m.div`pointer-events:auto;`, vm = (e) => Le(e) || Or(e);
5240
5244
  function Cm(e) {
5241
5245
  return e.isAdminMessage() ? e.message === "The channel's custom_type was updated." : !1;
5242
5246
  }
@@ -5255,7 +5259,7 @@ const $e = ({
5255
5259
  return /* @__PURE__ */ o.createElement(Sm, { as: e, disabled: s, ...i }, /* @__PURE__ */ o.createElement(G, { type: t, size: n, color: r ?? a }));
5256
5260
  }, Sm = m.button`all:unset;padding:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;&:disabled{cursor:not-allowed;}`, Am = ({ files: e, initialIndex: t = 0, onClose: n, visible: r }) => {
5257
5261
  var I, w;
5258
- const [s, i] = S(t), [a, l] = S(!1), { stringSet: c, format: d } = Y(), { config: u } = X(), h = e.length, f = e[s], y = ((w = (I = u == null ? void 0 : u.conversation) == null ? void 0 : I.fileViewer) == null ? void 0 : w.downloadEnabled) !== !1, _ = h > 1, E = (f == null ? void 0 : f.type) || "", p = Le(E), b = Lr(E), x = !vm(E);
5262
+ const [s, i] = S(t), [a, l] = S(!1), { stringSet: c, format: d } = Y(), { config: u } = X(), h = e.length, f = e[s], y = ((w = (I = u == null ? void 0 : u.conversation) == null ? void 0 : I.fileViewer) == null ? void 0 : w.downloadEnabled) !== !1, _ = h > 1, E = (f == null ? void 0 : f.type) || "", p = Le(E), b = Or(E), x = !vm(E);
5259
5263
  z(() => {
5260
5264
  r && (i(t), l(!1));
5261
5265
  }, [r, t]);
@@ -5416,7 +5420,7 @@ const $e = ({
5416
5420
  as: "a",
5417
5421
  href: "https://delight.ai?utm_medium=product&utm_source=aiagent&utm_campaign=fy26-glbl-ai-agent-poweredby",
5418
5422
  "aria-label": "Learn more about Delight AI Agent",
5419
- rel: Xr,
5423
+ rel: Zr,
5420
5424
  target: "_blank"
5421
5425
  },
5422
5426
  "Sendbird"
@@ -5474,9 +5478,9 @@ const $e = ({
5474
5478
  });
5475
5479
  }, Ht = (Fe) => {
5476
5480
  Ve({ files: [Fe], index: 0 });
5477
- }, Ho = () => {
5481
+ }, Vo = () => {
5478
5482
  k.isFileMessage() && xn(k.url);
5479
- }, Vo = Ee ? /* @__PURE__ */ o.createElement(r.DateSeparator, { style: { margin: "16px 0" }, date: k.createdAt }) : null, ht = {
5483
+ }, zo = Ee ? /* @__PURE__ */ o.createElement(r.DateSeparator, { style: { margin: "16px 0" }, date: k.createdAt }) : null, ht = {
5480
5484
  data: k.data,
5481
5485
  maxBodyWidth: d.expanded ? W.WIDE_BODY_MAX_WIDTH : void 0,
5482
5486
  extendedMessagePayload: k.extendedMessagePayload,
@@ -5484,13 +5488,13 @@ const $e = ({
5484
5488
  groupType: fe,
5485
5489
  onClickMedia: Ht,
5486
5490
  onClickMediaFiles: Ve,
5487
- onClickFile: Ho
5488
- }, zo = () => {
5491
+ onClickFile: Vo
5492
+ }, Go = () => {
5489
5493
  if (ze.isOutgoing(k, u.userId))
5490
5494
  return "outgoingmessage";
5491
5495
  if (ze.isIncoming(k, u.userId))
5492
5496
  return "incomingmessage";
5493
- }, Go = (() => {
5497
+ }, Wo = (() => {
5494
5498
  var Fe, ft, Ln;
5495
5499
  if (ze.isAdmin(k))
5496
5500
  return ze.isCSAT(k) ? y ? /* @__PURE__ */ o.createElement(
@@ -5518,7 +5522,7 @@ const $e = ({
5518
5522
  if (k.isUserMessage())
5519
5523
  return /* @__PURE__ */ o.createElement(e, { messageType: "user", ...ve });
5520
5524
  if (k.isFileMessage()) {
5521
- const [K, ie] = ((Fe = k.metaArrays.find((Ce) => Ce.key === Mr)) == null ? void 0 : Fe.value) ?? [];
5525
+ const [K, ie] = ((Fe = k.metaArrays.find((Ce) => Ce.key === Lr)) == null ? void 0 : Fe.value) ?? [];
5522
5526
  return /* @__PURE__ */ o.createElement(
5523
5527
  e,
5524
5528
  {
@@ -5614,7 +5618,7 @@ const $e = ({
5614
5618
  }
5615
5619
  }
5616
5620
  })();
5617
- return /* @__PURE__ */ o.createElement("div", { key: A, id: `${me}-message-item`, role: "listitem", "data-layout-id": zo() }, Vo, Go);
5621
+ return /* @__PURE__ */ o.createElement("div", { key: A, id: `${me}-message-item`, role: "listitem", "data-layout-id": Go() }, zo, Wo);
5618
5622
  };
5619
5623
  return /* @__PURE__ */ o.createElement(mg, { id: `${me}-message-list` }, /* @__PURE__ */ o.createElement(
5620
5624
  Em,
@@ -5740,7 +5744,7 @@ const $e = ({
5740
5744
  a && l ? n.push(i) : a ? r.push(i) : s.push(i);
5741
5745
  }
5742
5746
  return { passed: n, failedBySize: r, failedByType: s };
5743
- }, Co = qe(void 0), xg = ({ children: e }) => {
5747
+ }, To = qe(void 0), xg = ({ children: e }) => {
5744
5748
  var w;
5745
5749
  const { chatSDK: t } = X(), { createAttachmentRules: n } = le(), { stringSet: r } = Y(), { channelSource: s } = ce(), [i, a] = S([]), [l, c] = S({
5746
5750
  visible: !1,
@@ -5788,7 +5792,7 @@ const $e = ({
5788
5792
  a((C) => (C.forEach(($) => URL.revokeObjectURL($.preview.url)), []));
5789
5793
  };
5790
5794
  return /* @__PURE__ */ o.createElement(
5791
- Co.Provider,
5795
+ To.Provider,
5792
5796
  {
5793
5797
  value: {
5794
5798
  files: i,
@@ -5805,7 +5809,7 @@ const $e = ({
5805
5809
  /* @__PURE__ */ o.createElement(bn, { ...l, onClose: () => c({ visible: !1, title: "" }) })
5806
5810
  );
5807
5811
  }, wn = () => {
5808
- const e = we(Co);
5812
+ const e = we(To);
5809
5813
  if (!e)
5810
5814
  throw new Error("useFileUpload must be used within FileUploadProvider");
5811
5815
  return e;
@@ -5845,9 +5849,9 @@ const yg = (e, t) => {
5845
5849
  return !i || r.length === 0 ? null : /* @__PURE__ */ o.createElement(vg, null, r.map(({ preview: { type: a, name: l, url: c } }, d) => /* @__PURE__ */ o.createElement(Cg, { key: c, onMouseOver: () => n(d), onMouseLeave: () => n(void 0) }, (e || t === d) && /* @__PURE__ */ o.createElement(Tg, { title: "Remove file", onClick: () => s(d) }, /* @__PURE__ */ o.createElement(G, { type: "close-filled", color: g.themedColor.textMidEmphasis })), a.startsWith("image/") ? /* @__PURE__ */ o.createElement("img", { alt: "file-image", src: c }) : /* @__PURE__ */ o.createElement(yn, { name: l, type: un(l, a) }))));
5846
5850
  }, Ag = {
5847
5851
  textArea: R`min-height:40px;height:40px;font-size:16px;line-height:24px;`
5848
- }, To = m.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, fr = m.div`width:100%;position:relative;background-color:${g.themedColor.bg_100_500};border-radius:20px;`, Er = m.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, br = m.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:${g.themedColor.textHighEmphasis};resize:none;width:100%;height:${Kr}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${to && Ag.textArea};&::placeholder{color:${g.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${g.themedColor.textDisabled};}}`, wg = m.input`display:none;`;
5852
+ }, So = m.button`all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;width:32px;height:32px;`, fr = m.div`width:100%;position:relative;background-color:${g.themedColor.bg_100_500};border-radius:20px;`, Er = m.div`display:flex;flex-direction:row;align-items:flex-end;position:relative;`, br = m.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:${g.themedColor.textHighEmphasis};resize:none;width:100%;height:${Yr}px;overflow-wrap:break-word;white-space:pre-wrap;overflow-x:hidden;${no && Ag.textArea};&::placeholder{color:${g.themedColor.textLowEmphasis};}&:disabled{cursor:not-allowed;&::placeholder{color:${g.themedColor.textDisabled};}}`, wg = m.input`display:none;`;
5849
5853
  m.div`display:flex;align-items:center;gap:24px;`;
5850
- const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{background-color:${g.themedColor.bg_100_500};path{fill:${g.themedColor.textHighEmphasis};}}&:active{background-color:${g.themedColor.bg_200_400};}}`, xr = m.div`padding:10px 16px 10px 12px;position:relative;display:flex;align-items:center;gap:8px;`, _r = (e) => e.startsWith("image/"), yr = ({ disabled: e }) => {
5854
+ const Ig = m(So)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}&:not(:disabled){&:hover{background-color:${g.themedColor.bg_100_500};path{fill:${g.themedColor.textHighEmphasis};}}&:active{background-color:${g.themedColor.bg_200_400};}}`, xr = m.div`padding:10px 16px 10px 12px;position:relative;display:flex;align-items:center;gap:8px;`, _r = (e) => e.startsWith("image/"), yr = ({ disabled: e }) => {
5851
5855
  var I, w, C, $, F;
5852
5856
  const { stringSet: t } = Y(), { config: n } = X(), r = V(null), s = V(null), [i, a] = S(!1), { addFiles: l, isFileUploadEnabled: c, acceptableMimeTypes: d, showFileUploadAlert: u } = wn(), h = d.includes(Zt), f = h ? ["image/*"] : d.filter(_r), y = h ? [Zt] : d.filter((D) => !_r(D)), _ = !!((C = (w = (I = n == null ? void 0 : n.conversation) == null ? void 0 : I.input) == null ? void 0 : w.gallery) != null && C.photoEnabled), E = !!((F = ($ = n == null ? void 0 : n.conversation) == null ? void 0 : $.input) != null && F.fileEnabled), p = () => h || f.length > 0, b = () => h || y.length > 0, x = (D) => {
5853
5857
  const L = D.currentTarget.files;
@@ -5945,7 +5949,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
5945
5949
  if (e.current) {
5946
5950
  e.current.style.height = "";
5947
5951
  const w = Math.min(wa, e.current.scrollHeight);
5948
- Kr < w && (e.current.style.height = `${w}px`);
5952
+ Yr < w && (e.current.style.height = `${w}px`);
5949
5953
  }
5950
5954
  n(I.target.value);
5951
5955
  };
@@ -5961,7 +5965,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
5961
5965
  onChange: T,
5962
5966
  onPaste: x
5963
5967
  }
5964
- ))), E && /* @__PURE__ */ o.createElement(To, { onClick: () => b() }, /* @__PURE__ */ o.createElement(G, { type: "send", color: g.color.primary.main, size: 20 })));
5968
+ ))), E && /* @__PURE__ */ o.createElement(So, { onClick: () => b() }, /* @__PURE__ */ o.createElement(G, { type: "send", color: g.color.primary.main, size: 20 })));
5965
5969
  }, $g = m.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:${g.themedColor.textLowEmphasis};&& a{font-weight:700;text-decoration:none;${H.light`
5966
5970
  color: ${g.color.information.light};
5967
5971
  `};
@@ -5969,7 +5973,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
5969
5973
  color: ${g.color.information.main};
5970
5974
  `};
5971
5975
  }
5972
- `, Mg = B(() => import("./C4NDe7Wd.js").then((e) => ({ default: e.MarkdownText }))), Lg = () => {
5976
+ `, Mg = B(() => import("./DGBsXgND.js").then((e) => ({ default: e.MarkdownText }))), Lg = () => {
5973
5977
  const { aiAgentInfo: e, userSession: t } = le(), { messageSource: n, channelSource: r } = ce(), [s, i] = S(null), a = En("special-notice", r.channel), l = N(() => r.channel ? a ? n.messages.some((c) => at(c, (t == null ? void 0 : t.userId) ?? "")) : !0 : null, [r.channel, a, n.messages, t == null ? void 0 : t.userId]);
5974
5978
  return z(() => {
5975
5979
  s || i(l());
@@ -5978,7 +5982,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
5978
5982
  var s;
5979
5983
  const { testerType: e } = Xe(), { channelSource: t } = ce(), n = pe(t.channel), r = !!e && ((s = t.channel) == null ? void 0 : s.isAIAgent);
5980
5984
  return n && r ? /* @__PURE__ */ o.createElement(hg, null) : /* @__PURE__ */ o.createElement(Og, null);
5981
- }, So = ({ start: e, title: t, titleAlign: n = "start", end: r }) => {
5985
+ }, Ao = ({ start: e, title: t, titleAlign: n = "start", end: r }) => {
5982
5986
  const s = V(null), i = V(null), [a, l] = S(0), [c, d] = S(0);
5983
5987
  return re(() => {
5984
5988
  s.current && l(s.current.offsetWidth), i.current && d(i.current.offsetWidth);
@@ -5992,7 +5996,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
5992
5996
  const { enableCloseConversationButton: e, dispatcher: t } = X(), { channelSource: n } = ce(), r = n.channel, s = gt(), i = (r == null ? void 0 : r.isAIAgent) && e, a = !gn(r);
5993
5997
  if (!i) return null;
5994
5998
  const l = async () => {
5995
- r && await t.send(Fr.CloseConversation({ channelUrl: r.url }));
5999
+ r && await t.send(Br.CloseConversation({ channelUrl: r.url }));
5996
6000
  };
5997
6001
  return /* @__PURE__ */ o.createElement($e, { "aria-label": "close conversation", type: "mute", size: s, disabled: a, onClick: l });
5998
6002
  }, jg = () => {
@@ -6041,17 +6045,17 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
6041
6045
  "aria-label": e.A11Y_OPEN_CONVERSATION_LIST
6042
6046
  }
6043
6047
  ) : null;
6044
- }, Ao = ({ channel: e, size: t = 40 }) => {
6045
- const { userSession: n, aiAgentInfo: r } = le(), { fallbackIcon: s, url: i } = qr({ channel: e, aiAgentInfo: r, userSession: n }), a = it();
6046
- return i ? /* @__PURE__ */ o.createElement(uo, { src: i, size: t }) : /* @__PURE__ */ o.createElement(ep, { $size: t, $bgColor: a.colors.base.primary }, /* @__PURE__ */ o.createElement(G, { type: s, size: t * 0.55, color: a.colors.base.primaryContrastContent }));
6048
+ }, wo = ({ channel: e, size: t = 40 }) => {
6049
+ const { userSession: n, aiAgentInfo: r } = le(), { fallbackIcon: s, url: i } = Kr({ channel: e, aiAgentInfo: r, userSession: n }), a = it();
6050
+ return i ? /* @__PURE__ */ o.createElement(mo, { src: i, size: t }) : /* @__PURE__ */ o.createElement(ep, { $size: t, $bgColor: a.colors.base.primary }, /* @__PURE__ */ o.createElement(G, { type: s, size: t * 0.55, color: a.colors.base.primaryContrastContent }));
6047
6051
  }, ep = m.div`width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;border-radius:50%;background-color:${({ $bgColor: e }) => e};display:flex;align-items:center;justify-content:center;flex-shrink:0;`, tp = () => {
6048
6052
  var l, c;
6049
- const { channelSource: e } = ce(), { aiAgentInfo: t, userSession: n } = le(), { config: r } = se(), s = e.channel, i = qr({ channel: s, userSession: n, aiAgentInfo: t }), a = (c = (l = r == null ? void 0 : r.conversation) == null ? void 0 : l.header) == null ? void 0 : c.avatarEnabled;
6050
- return /* @__PURE__ */ o.createElement(np, null, a && /* @__PURE__ */ o.createElement(Ao, { channel: s, size: 34 }), /* @__PURE__ */ o.createElement(rp, { variant: "h2", color: g.themedColor.textHighEmphasis }, i.title));
6053
+ const { channelSource: e } = ce(), { aiAgentInfo: t, userSession: n } = le(), { config: r } = se(), s = e.channel, i = Kr({ channel: s, userSession: n, aiAgentInfo: t }), a = (c = (l = r == null ? void 0 : r.conversation) == null ? void 0 : l.header) == null ? void 0 : c.avatarEnabled;
6054
+ return /* @__PURE__ */ o.createElement(np, null, a && /* @__PURE__ */ o.createElement(wo, { channel: s, size: 34 }), /* @__PURE__ */ o.createElement(rp, { variant: "h2", color: g.themedColor.textHighEmphasis }, i.title));
6051
6055
  }, np = m.div`display:flex;flex-direction:row;align-items:center;gap:6px;overflow:hidden;`, rp = m(M)`text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px 0;`, op = (e) => {
6052
6056
  const { components: t } = Ze.useContext();
6053
6057
  return /* @__PURE__ */ o.createElement(
6054
- So,
6058
+ Ao,
6055
6059
  {
6056
6060
  start: /* @__PURE__ */ o.createElement(t.StartArea, null),
6057
6061
  title: /* @__PURE__ */ o.createElement(t.TitleArea, null),
@@ -6118,7 +6122,7 @@ const Ig = m(To)`flex-shrink:0;border-radius:8px;&:disabled{cursor:not-allowed;}
6118
6122
  }), mp = m.div`height:100%;width:100%;display:flex;flex-direction:column;flex:1;background-color:${({ theme: e }) => e.colors.base.background};`, {
6119
6123
  Provider: gp,
6120
6124
  Context: Yh,
6121
- useContext: wo
6125
+ useContext: Io
6122
6126
  } = oe("ConversationList");
6123
6127
  function pp({
6124
6128
  conversationListLimit: e,
@@ -6135,7 +6139,7 @@ function pp({
6135
6139
  (s) => /* @__PURE__ */ o.createElement(gp, { value: { ...s, onOpenConversationView: n } }, r)
6136
6140
  );
6137
6141
  }
6138
- const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e }), dn = 99, fp = (e) => {
6142
+ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(wo, { channel: e }), dn = 99, fp = (e) => {
6139
6143
  var c;
6140
6144
  const { channel: t, onClick: n } = e, { stringSet: r, format: s } = Y(), i = ci(t, {
6141
6145
  formatMultipleFilesCount: r.CONVERSATION_LIST__MULTIPLE_FILES_COUNT
@@ -6145,8 +6149,8 @@ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e
6145
6149
  hoursAgo: r.DATE_FORMAT__HOURS_AGO,
6146
6150
  dateShortFormat: r.DATE_FORMAT__DATE_SHORT
6147
6151
  }), l = t.unreadMessageCount;
6148
- return /* @__PURE__ */ o.createElement(Ep, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ o.createElement(bp, null, /* @__PURE__ */ o.createElement(hp, { ...e })), /* @__PURE__ */ o.createElement(xp, null, /* @__PURE__ */ o.createElement(_p, null, (c = t.lastMessage) != null && c.isFileMessage() && (!t.lastMessage.message || t.lastMessage.name === t.lastMessage.message) ? /* @__PURE__ */ o.createElement(io, { variant: "subtitle1", color: g.themedColor.textHighEmphasis }, i) : /* @__PURE__ */ o.createElement(M, { variant: "subtitle1", color: g.themedColor.textHighEmphasis, maxTextLines: 1 }, i), /* @__PURE__ */ o.createElement(yp, null, pe(t) && /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(M, { variant: "caption1", color: g.themedColor.textMidEmphasis, maxTextLines: 1 }, r.CONVERSATION_LIST__ENDED), /* @__PURE__ */ o.createElement(vp, null)), /* @__PURE__ */ o.createElement(M, { variant: "caption2", color: g.themedColor.textLowEmphasis, maxTextLines: 1 }, a))), l > 0 && /* @__PURE__ */ o.createElement(Cp, { $count: l }, /* @__PURE__ */ o.createElement(M, { variant: "caption3", color: g.themedColor.textHighEmphasisInverse }, l <= dn ? l : `${dn}+`))));
6149
- }, Io = _e({
6152
+ return /* @__PURE__ */ o.createElement(Ep, { role: "button", onClick: () => n == null ? void 0 : n() }, /* @__PURE__ */ o.createElement(bp, null, /* @__PURE__ */ o.createElement(hp, { ...e })), /* @__PURE__ */ o.createElement(xp, null, /* @__PURE__ */ o.createElement(_p, null, (c = t.lastMessage) != null && c.isFileMessage() && (!t.lastMessage.message || t.lastMessage.name === t.lastMessage.message) ? /* @__PURE__ */ o.createElement(ao, { variant: "subtitle1", color: g.themedColor.textHighEmphasis }, i) : /* @__PURE__ */ o.createElement(M, { variant: "subtitle1", color: g.themedColor.textHighEmphasis, maxTextLines: 1 }, i), /* @__PURE__ */ o.createElement(yp, null, pe(t) && /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(M, { variant: "caption1", color: g.themedColor.textMidEmphasis, maxTextLines: 1 }, r.CONVERSATION_LIST__ENDED), /* @__PURE__ */ o.createElement(vp, null)), /* @__PURE__ */ o.createElement(M, { variant: "caption2", color: g.themedColor.textLowEmphasis, maxTextLines: 1 }, a))), l > 0 && /* @__PURE__ */ o.createElement(Cp, { $count: l }, /* @__PURE__ */ o.createElement(M, { variant: "caption3", color: g.themedColor.textHighEmphasisInverse }, l <= dn ? l : `${dn}+`))));
6153
+ }, ko = _e({
6150
6154
  template: fp,
6151
6155
  // Note: 리스트 변경되면 디자인 변경 가능성이 있어서 일단 컴포넌트는 비워둠
6152
6156
  components: {}
@@ -6160,7 +6164,7 @@ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e
6160
6164
  };
6161
6165
  return /* @__PURE__ */ o.createElement(Sp, { onScroll: (s) => r(s) }, e.map((s, i) => t(s, i)));
6162
6166
  }, Sp = m.div`width:100%;height:100%;display:flex;flex-direction:column;flex:1;overflow:auto;overscroll-behavior:contain;`, Ap = () => {
6163
- const { stringSet: e } = Y(), { listSource: t, onOpenConversationView: n } = wo(), { Template: r } = Io.useContext();
6167
+ const { stringSet: e } = Y(), { listSource: t, onOpenConversationView: n } = Io(), { Template: r } = ko.useContext();
6164
6168
  return t.initialized ? t.channels.length === 0 ? /* @__PURE__ */ o.createElement(rt, { type: "noChannels", label: e.CONVERSATION_LIST__NO_CONVERSATIONS }) : /* @__PURE__ */ o.createElement(
6165
6169
  Tp,
6166
6170
  {
@@ -6185,7 +6189,7 @@ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e
6185
6189
  }
6186
6190
  ) : /* @__PURE__ */ o.createElement(rt, { type: "loading" });
6187
6191
  }, wp = () => {
6188
- const { stringSet: e } = Y(), { language: t, countryCode: n, context: r } = X(), { aiAgentInfo: s, refreshActiveChannel: i, createConversation: a, setActiveChannel: l } = le(), { onOpenConversationView: c } = wo();
6192
+ const { stringSet: e } = Y(), { language: t, countryCode: n, context: r } = X(), { aiAgentInfo: s, refreshActiveChannel: i, createConversation: a, setActiveChannel: l } = le(), { onOpenConversationView: c } = Io();
6189
6193
  return /* @__PURE__ */ o.createElement(
6190
6194
  Ip,
6191
6195
  {
@@ -6218,7 +6222,7 @@ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e
6218
6222
  }, Lp = m(M)`padding:0 4px;width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;`, Op = (e) => {
6219
6223
  const { components: t } = pt.useContext();
6220
6224
  return /* @__PURE__ */ o.createElement(
6221
- So,
6225
+ Ao,
6222
6226
  {
6223
6227
  start: /* @__PURE__ */ o.createElement(t.StartArea, null),
6224
6228
  title: /* @__PURE__ */ o.createElement(t.TitleArea, null),
@@ -6280,7 +6284,7 @@ const hp = ({ channel: e }) => /* @__PURE__ */ o.createElement(Ao, { channel: e
6280
6284
  An,
6281
6285
  kn,
6282
6286
  Ze,
6283
- Io,
6287
+ ko,
6284
6288
  pt,
6285
6289
  Sn
6286
6290
  );
@@ -6296,9 +6300,9 @@ function jp({
6296
6300
  }) {
6297
6301
  return Wa(Ia, t), /* @__PURE__ */ o.createElement(is, { target: t }, /* @__PURE__ */ o.createElement(Va, { rootElement: t, logger: n, appearance: e, theme: l }, /* @__PURE__ */ o.createElement(na, { internalVariables: a == null ? void 0 : a.__internalVariables }, /* @__PURE__ */ o.createElement(Ba, { stringSet: s, logger: n, language: r }, /* @__PURE__ */ o.createElement(Wp, null, i, /* @__PURE__ */ o.createElement(Gp, null))))));
6298
6302
  }
6299
- const ko = Ke(function({
6303
+ const $o = Ke(function({
6300
6304
  rootElement: t = document.body,
6301
- logLevel: n = Sr.WARN,
6305
+ logLevel: n = Ar.WARN,
6302
6306
  language: r = navigator.language,
6303
6307
  userSessionInfo: s,
6304
6308
  children: i,
@@ -6321,8 +6325,8 @@ const ko = Ke(function({
6321
6325
  qa,
6322
6326
  {
6323
6327
  rootElement: t,
6324
- keyValueStorage: Jr(),
6325
- networkStateAdapter: Zr(),
6328
+ keyValueStorage: Qr(),
6329
+ networkStateAdapter: Jr(),
6326
6330
  language: r,
6327
6331
  logger: nt,
6328
6332
  dispatcher: qp,
@@ -6332,7 +6336,7 @@ const ko = Ke(function({
6332
6336
  ...l.customWebSocketHost && { customWebSocketHost: l.customWebSocketHost }
6333
6337
  },
6334
6338
  chatSDK: l.customChatSDK,
6335
- messengerVersion: Yr,
6339
+ messengerVersion: Xr,
6336
6340
  ...l
6337
6341
  },
6338
6342
  /* @__PURE__ */ o.createElement(
@@ -6346,10 +6350,10 @@ const ko = Ke(function({
6346
6350
  )
6347
6351
  )
6348
6352
  ));
6349
- }), nt = new Pr(Sr.WARN), qp = new Nr(nt), {
6353
+ }), nt = new Ur(Ar.WARN), qp = new Fr(nt), {
6350
6354
  Provider: Kp,
6351
6355
  useContext: $n
6352
- } = oe("PageChildren"), $o = ({ children: e }) => {
6356
+ } = oe("PageChildren"), Mo = ({ children: e }) => {
6353
6357
  const [t, n] = S(null), [r, s] = S(null);
6354
6358
  return /* @__PURE__ */ o.createElement(
6355
6359
  Kp,
@@ -6363,7 +6367,7 @@ const ko = Ke(function({
6363
6367
  },
6364
6368
  e
6365
6369
  );
6366
- }, Mo = ({ children: e, isOpened: t }) => {
6370
+ }, Lo = ({ children: e, isOpened: t }) => {
6367
6371
  const { dir: n, rootElement: r } = X(), s = Be(r, !0);
6368
6372
  return z(() => {
6369
6373
  const i = "sb-agent-block-scroll";
@@ -6400,7 +6404,7 @@ function Jp({
6400
6404
  /* @__PURE__ */ o.createElement(rh, { $isOpened: t, $animated: a, $fillColor: d, $iconSize: u }, /* @__PURE__ */ o.createElement(vr.Close, { size: u }))
6401
6405
  );
6402
6406
  }
6403
- const Qp = R`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, eh = R`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:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;filter:${({ $fillColor: e }) => e === st.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, Lo = R`svg{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;${({ $fillColor: e }) => R`
6407
+ const Qp = R`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transform:scale(1.1);}&:active{transform:scale(0.8);}`, eh = R`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:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;filter:${({ $fillColor: e }) => e === st.WHITE ? "grayscale(100%) brightness(2000%)" : "grayscale(100%) invert(100%) saturate(0%) brightness(0%) contrast(1000%)"};}}`, Oo = R`svg{width:${({ $iconSize: e }) => e}px;height:${({ $iconSize: e }) => e}px;${({ $fillColor: e }) => R`
6404
6408
  ellipse,
6405
6409
  path {
6406
6410
  fill: ${e};
@@ -6410,11 +6414,11 @@ const Qp = R`&:hover{transition:transform 250ms cubic-bezier(0.33,0,0,1);transfo
6410
6414
  }
6411
6415
  `}
6412
6416
  }
6413
- `, th = m.button`position:relative;padding:0;width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;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 && Qp}`, Oo = m.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;`, nh = m(Oo)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${eh}${Lo}`, rh = m(Oo)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${Lo}`, vr = {
6417
+ `, th = m.button`position:relative;padding:0;width:${({ $size: e }) => e}px;height:${({ $size: e }) => e}px;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 && Qp}`, Do = m.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;`, nh = m(Do)`opacity:${({ $isOpened: e }) => e ? 0 : 1};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(-90deg) scale(0)" : "rotate(0deg)")};${eh}${Oo}`, rh = m(Do)`scale:${({ $isOpened: e }) => e ? 1 : 0};transform:${({ $animated: e, $isOpened: t }) => e && (t ? "rotate(0deg)" : "rotate(-90deg)")};${Oo}`, vr = {
6414
6418
  Open: (e) => e.url ? /* @__PURE__ */ o.createElement("img", { src: e.url, alt: "launcher-img", "data-default-icon": e.isDefaultIcon }) : /* @__PURE__ */ o.createElement(G, { size: e.size, type: "delight" }),
6415
6419
  Close: ({ size: e }) => /* @__PURE__ */ o.createElement(G, { size: e, type: "chevron-down" })
6416
6420
  };
6417
- function Do({ className: e, size: t }) {
6421
+ function Ro({ className: e, size: t }) {
6418
6422
  const { colors: n } = it(), { dir: r, state: s } = X(), { launcherInfo: i, statsTrackers: a } = le();
6419
6423
  return re(() => {
6420
6424
  a.initialRender.setPresentMethod("launcher_toggle");
@@ -6441,7 +6445,7 @@ function sh() {
6441
6445
  s.current && (clearTimeout(s.current), s.current = null);
6442
6446
  }
6443
6447
  function a() {
6444
- e.connectionState === Zo.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), i(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
6448
+ e.connectionState === Sr.CLOSED && (e.reconnect(), n.debug("useSDKInactivityTimeout: reconnected")), i(), n.debug("useSDKInactivityTimeout: clear disconnect schedule");
6445
6449
  }
6446
6450
  function l() {
6447
6451
  i(), s.current = setTimeout(async () => {
@@ -6451,18 +6455,18 @@ function sh() {
6451
6455
  t.opened ? a() : (l(), n.debug("useSDKInactivityTimeout: schedule disconnect"));
6452
6456
  }, [r, e, t.opened]);
6453
6457
  }
6454
- const Ro = qe(null);
6455
- function No() {
6456
- const e = we(Ro);
6458
+ const No = qe(null);
6459
+ function Fo() {
6460
+ const e = we(No);
6457
6461
  if (!e)
6458
6462
  throw new Error("useNavigator() must be used within <Navigator />");
6459
6463
  return e;
6460
6464
  }
6461
- function Fo({ children: e }) {
6462
- const t = No();
6465
+ function Bo({ children: e }) {
6466
+ const t = Fo();
6463
6467
  return typeof e == "function" ? e(t) : /* @__PURE__ */ o.createElement(o.Fragment, null, e);
6464
6468
  }
6465
- const ih = wr`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, ah = wr`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, lh = R`animation-name:${ih};animation-duration:0.3s;animation-fill-mode:forwards;`, ch = R``, dh = R`animation-name:${ah};animation-duration:0.3s;animation-fill-mode:forwards;`, uh = R`visibility:hidden;`, mh = m.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
6469
+ const ih = Ir`0%{transform:translateY(40px);opacity:0;}100%{transform:translateY(0px);opacity:1;}`, ah = Ir`0%{transform:translateY(0px);opacity:1;}100%{transform:translateY(40px);opacity:0;}`, lh = R`animation-name:${ih};animation-duration:0.3s;animation-fill-mode:forwards;`, ch = R``, dh = R`animation-name:${ah};animation-duration:0.3s;animation-fill-mode:forwards;`, uh = R`visibility:hidden;`, mh = m.div`position:absolute;top:0;left:0;width:100%;height:100%;${({ $transitionState: e }) => {
6466
6470
  switch (e) {
6467
6471
  case "entering":
6468
6472
  return lh;
@@ -6514,7 +6518,7 @@ function St({ initialId: e, children: t }) {
6514
6518
  },
6515
6519
  activeScreenId: s
6516
6520
  }), [i, a, s]), c = ae(() => rs.toArray(t).filter(
6517
- (p) => p.type === Fo
6521
+ (p) => p.type === Bo
6518
6522
  ), [t]), d = ae(() => {
6519
6523
  const p = {};
6520
6524
  return c.forEach((b) => {
@@ -6532,7 +6536,7 @@ function St({ initialId: e, children: t }) {
6532
6536
  b === e ? p[b] = "entered" : p[b] = "exited";
6533
6537
  }), p;
6534
6538
  }), [_, E] = S({});
6535
- return /* @__PURE__ */ o.createElement(Ro.Provider, { value: l }, /* @__PURE__ */ o.createElement(gh, null, Object.keys(d).map((p) => {
6539
+ return /* @__PURE__ */ o.createElement(No.Provider, { value: l }, /* @__PURE__ */ o.createElement(gh, null, Object.keys(d).map((p) => {
6536
6540
  var T;
6537
6541
  if (!u[p]) return null;
6538
6542
  const b = f[p] || "exited", x = p === s, v = `${p}-${_[p] || 0}`;
@@ -6540,11 +6544,11 @@ function St({ initialId: e, children: t }) {
6540
6544
  })));
6541
6545
  }
6542
6546
  const gh = m.div`position:relative;width:100%;height:100%;`;
6543
- St.Screen = Fo;
6547
+ St.Screen = Bo;
6544
6548
  const Te = {
6545
6549
  conv: "conv",
6546
6550
  convList: "conv-list"
6547
- }, Bo = ({ isOpened: e, entryPoint: t, selectedChannelUrl: n, setSelectedChannelUrl: r }) => {
6551
+ }, Po = ({ isOpened: e, entryPoint: t, selectedChannelUrl: n, setSelectedChannelUrl: r }) => {
6548
6552
  const { conversationChildren: s, conversationListChildren: i } = $n(), a = (() => {
6549
6553
  switch (t) {
6550
6554
  case "Conversation":
@@ -6577,7 +6581,7 @@ const Te = {
6577
6581
  i
6578
6582
  )));
6579
6583
  }, ph = ({ onOpenConversationView: e }) => {
6580
- const { registerOnJoinedProactiveConversation: t } = le(), { navigation: n } = No();
6584
+ const { registerOnJoinedProactiveConversation: t } = le(), { navigation: n } = Fo();
6581
6585
  return t(({ channel: r }) => {
6582
6586
  e(r.url), n.navigate(Te.conv);
6583
6587
  }), null;
@@ -6587,9 +6591,9 @@ function hh({ isExpanded: e, isOpened: t, children: n, launcher: r }) {
6587
6591
  return /* @__PURE__ */ o.createElement(fh, null, /* @__PURE__ */ o.createElement(Eh, { dir: s, id: he.WINDOW, $isExpanded: e, $isOpened: t }, n), r);
6588
6592
  }
6589
6593
  const fh = m.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end;`, Eh = m.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 && xh};${({ $isExpanded: e }) => e && bh};`, bh = R`width:743px;height:723px;`, xh = R`z-index:${Ue.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;`, Xh = Ke(function({ children: e, initialChannelUrl: t, ...n }, r) {
6590
- const s = dt(), [i, a] = S(t), l = s ? Mo : hh;
6591
- return /* @__PURE__ */ o.createElement(ko, { enableExpandButton: !s, ref: r, ...n }, /* @__PURE__ */ o.createElement(eo, null, ({ state: c }) => /* @__PURE__ */ o.createElement($o, null, /* @__PURE__ */ o.createElement(l, { isExpanded: c.expanded, isOpened: c.opened, launcher: /* @__PURE__ */ o.createElement(Do, null) }, /* @__PURE__ */ o.createElement(
6592
- Bo,
6594
+ const s = dt(), [i, a] = S(t), l = s ? Lo : hh;
6595
+ return /* @__PURE__ */ o.createElement($o, { enableExpandButton: !s, ref: r, ...n }, /* @__PURE__ */ o.createElement(to, null, ({ state: c }) => /* @__PURE__ */ o.createElement(Mo, null, /* @__PURE__ */ o.createElement(l, { isExpanded: c.expanded, isOpened: c.opened, launcher: /* @__PURE__ */ o.createElement(Ro, null) }, /* @__PURE__ */ o.createElement(
6596
+ Po,
6593
6597
  {
6594
6598
  isOpened: c.opened,
6595
6599
  entryPoint: n.entryPoint,
@@ -6601,7 +6605,7 @@ const fh = m.div`display:flex;flex-direction:column;gap:8px;align-items:flex-end
6601
6605
  Provider: _h,
6602
6606
  useContext: Mn
6603
6607
  } = oe("FixedMessengerStyle");
6604
- function Po(e, t, n, r = 0) {
6608
+ function Uo(e, t, n, r = 0) {
6605
6609
  const { top: s, bottom: i, start: a, end: l } = n;
6606
6610
  let c = "", d = "";
6607
6611
  switch (e) {
@@ -6626,7 +6630,7 @@ function yh(e) {
6626
6630
  const { horizontal: t, vertical: n, margin: r, launcherSize: s } = Mn();
6627
6631
  return /* @__PURE__ */ o.createElement(vh, { ...e, size: s, $horizontal: t, $vertical: n, $margin: r });
6628
6632
  }
6629
- const vh = m(Do)`position:fixed;z-index:${Ue.LAUNCHER};${({ $horizontal: e, $vertical: t, $margin: n }) => Po(e, t, n)};`;
6633
+ const vh = m(Ro)`position:fixed;z-index:${Ue.LAUNCHER};${({ $horizontal: e, $vertical: t, $margin: n }) => Uo(e, t, n)};`;
6630
6634
  function Ch({ isExpanded: e, isOpened: t, children: n }) {
6631
6635
  const { dir: r } = X(), { horizontal: s, vertical: i, margin: a, launcherSize: l } = Mn();
6632
6636
  return /* @__PURE__ */ o.createElement(
@@ -6644,7 +6648,7 @@ function Ch({ isExpanded: e, isOpened: t, children: n }) {
6644
6648
  n
6645
6649
  );
6646
6650
  }
6647
- const Th = m.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;${({ $horizontal: e, $vertical: t, $margin: n, $launcherSize: r }) => Po(e, t, n, r + 12)};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:${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "left" : "right"} ${t}`};
6651
+ const Th = m.div`background:${({ theme: e }) => e.colors.base.background};display:flex;overscroll-behavior:none;-webkit-overflow-scrolling:auto;position:fixed;${({ $horizontal: e, $vertical: t, $margin: n, $launcherSize: r }) => Uo(e, t, n, r + 12)};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:${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "left" : "right"} ${t}`};
6648
6652
  [dir='rtl'] &:not([dir='ltr']),
6649
6653
  &[dir='rtl'] {
6650
6654
  transform-origin: ${({ $horizontal: e, $vertical: t }) => `${e === "start" ? "right" : "left"} ${t}`};
@@ -6652,18 +6656,18 @@ const Th = m.div`background:${({ theme: e }) => e.colors.base.background};displa
6652
6656
 
6653
6657
  ${({ $isOpened: e }) => e && Ah};
6654
6658
  ${({ $isExpanded: e }) => e && Sh};
6655
- `, Sh = R`width:743px;height:723px;`, Ah = R`z-index:${Ue.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;`, Uo = { top: 24, bottom: 24, start: 24, end: 24 }, wh = Ke(function({ children: e, initialChannelUrl: t, ...n }, r) {
6656
- const [s, i] = S(t), [a, l] = S("end-bottom"), [c, d] = S(Uo), [u, h] = S(48), f = dt(), y = f ? Mo : Ch, { horizontal: _, vertical: E } = ae(() => {
6659
+ `, Sh = R`width:743px;height:723px;`, Ah = R`z-index:${Ue.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;`, Ho = { top: 24, bottom: 24, start: 24, end: 24 }, wh = Ke(function({ children: e, initialChannelUrl: t, ...n }, r) {
6660
+ const [s, i] = S(t), [a, l] = S("end-bottom"), [c, d] = S(Ho), [u, h] = S(48), f = dt(), y = f ? Lo : Ch, { horizontal: _, vertical: E } = ae(() => {
6657
6661
  const [p, b] = a.split("-");
6658
6662
  return { horizontal: p === "start" ? "start" : "end", vertical: b === "top" ? "top" : "bottom" };
6659
6663
  }, [a]);
6660
- return /* @__PURE__ */ o.createElement(ko, { enableExpandButton: !f, ref: r, ...n }, /* @__PURE__ */ o.createElement(eo, null, ({ state: p }) => /* @__PURE__ */ o.createElement(
6664
+ return /* @__PURE__ */ o.createElement($o, { enableExpandButton: !f, ref: r, ...n }, /* @__PURE__ */ o.createElement(to, null, ({ state: p }) => /* @__PURE__ */ o.createElement(
6661
6665
  _h,
6662
6666
  {
6663
6667
  value: { horizontal: _, vertical: E, margin: c, launcherSize: u, setPosition: l, setMargin: d, setLauncherSize: h }
6664
6668
  },
6665
- /* @__PURE__ */ o.createElement($o, null, /* @__PURE__ */ o.createElement(y, { isExpanded: p.expanded, isOpened: p.opened }, /* @__PURE__ */ o.createElement(
6666
- Bo,
6669
+ /* @__PURE__ */ o.createElement(Mo, null, /* @__PURE__ */ o.createElement(y, { isExpanded: p.expanded, isOpened: p.opened }, /* @__PURE__ */ o.createElement(
6670
+ Po,
6667
6671
  {
6668
6672
  isOpened: p.opened,
6669
6673
  entryPoint: n.entryPoint,
@@ -6676,7 +6680,7 @@ const Th = m.div`background:${({ theme: e }) => e.colors.base.background};displa
6676
6680
  var s, i, a, l;
6677
6681
  const { setPosition: t, setMargin: n, setLauncherSize: r } = Mn();
6678
6682
  return re(() => {
6679
- e.position && t(e.position), e.margin && n({ ...Uo, ...e.margin }), e.launcherSize && r(e.launcherSize);
6683
+ e.position && t(e.position), e.margin && n({ ...Ho, ...e.margin }), e.launcherSize && r(e.launcherSize);
6680
6684
  }, [
6681
6685
  e.position,
6682
6686
  (s = e.margin) == null ? void 0 : s.top,
@@ -6710,16 +6714,16 @@ const Th = m.div`background:${({ theme: e }) => e.colors.base.background};displa
6710
6714
  }), [e]);
6711
6715
  };
6712
6716
  ai.set(Tr.JS, {
6713
- deviceOSPlatform: Dr() ? At.MOBILE_WEB : At.WEB,
6714
- messengerVersion: Yr,
6715
- keyValueStorage: Jr(),
6716
- networkStateAdapter: Zr()
6717
+ deviceOSPlatform: Rr() ? At.MOBILE_WEB : At.WEB,
6718
+ messengerVersion: Xr,
6719
+ keyValueStorage: Qr(),
6720
+ networkStateAdapter: Jr()
6717
6721
  });
6718
6722
  export {
6719
- Xr as A,
6723
+ Zr as A,
6720
6724
  le as B,
6721
6725
  Ae as C,
6722
- Fr as D,
6726
+ Br as D,
6723
6727
  Jh as E,
6724
6728
  Zh as F,
6725
6729
  Pe as I,
@@ -6728,7 +6732,7 @@ export {
6728
6732
  Pt as O,
6729
6733
  Sn as P,
6730
6734
  Cn as S,
6731
- ko as a,
6735
+ $o as a,
6732
6736
  jp as b,
6733
6737
  g as c,
6734
6738
  Bn as d,
@@ -6743,15 +6747,15 @@ export {
6743
6747
  $a as m,
6744
6748
  pp as n,
6745
6749
  pt as o,
6746
- Io as p,
6750
+ ko as p,
6747
6751
  kn as q,
6748
6752
  Xh as r,
6749
- Br as s,
6753
+ Pr as s,
6750
6754
  An as t,
6751
6755
  am as u,
6752
6756
  qp as v,
6753
6757
  ce as w,
6754
- wo as x,
6758
+ Io as x,
6755
6759
  Y as y,
6756
6760
  X as z
6757
6761
  };