@sisense/sdk-ui-preact 2.22.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/ai.cjs +74 -74
  2. package/dist/ai.js +190 -190
  3. package/dist/{index-kxX21arA-e16cd0d3.js → index-DCAC0mJe-142baf5c.js} +18 -1
  4. package/dist/{index-kxX21arA-4d73ca0a.cjs → index-DCAC0mJe-82998fcb.cjs} +1 -1
  5. package/dist/index.cjs +360 -347
  6. package/dist/index.js +14242 -14152
  7. package/dist/quota-notification-CVl0isIV-71961d61.cjs +902 -0
  8. package/dist/{quota-notification-D6oMJal8-47078282.js → quota-notification-CVl0isIV-f248786a.js} +23611 -22902
  9. package/dist/translations/de-de.cjs +1 -1
  10. package/dist/translations/de-de.js +19 -2
  11. package/dist/translations/en-us.cjs +1 -1
  12. package/dist/translations/en-us.js +1 -1
  13. package/dist/translations/es-ar.cjs +1 -1
  14. package/dist/translations/es-ar.js +19 -2
  15. package/dist/translations/es-es.cjs +1 -1
  16. package/dist/translations/es-es.js +19 -2
  17. package/dist/translations/fr-fr.cjs +1 -1
  18. package/dist/translations/fr-fr.js +19 -2
  19. package/dist/translations/it-it.cjs +1 -1
  20. package/dist/translations/it-it.js +19 -2
  21. package/dist/translations/ja-jp.cjs +1 -1
  22. package/dist/translations/ja-jp.js +19 -2
  23. package/dist/translations/ko-kr.cjs +1 -1
  24. package/dist/translations/ko-kr.js +19 -2
  25. package/dist/translations/nl-nl.cjs +1 -1
  26. package/dist/translations/nl-nl.js +19 -2
  27. package/dist/translations/pt-br.cjs +1 -1
  28. package/dist/translations/pt-br.js +19 -2
  29. package/dist/translations/ru-ru.cjs +1 -1
  30. package/dist/translations/ru-ru.js +19 -2
  31. package/dist/translations/tr-tr.cjs +1 -1
  32. package/dist/translations/tr-tr.js +19 -2
  33. package/dist/translations/zh-cn.cjs +1 -1
  34. package/dist/translations/zh-cn.js +19 -2
  35. package/package.json +3 -3
  36. package/dist/quota-notification-D6oMJal8-33693a50.cjs +0 -861
package/dist/ai.js CHANGED
@@ -1,5 +1,5 @@
1
- import { c as at, b as rr, cR as pa, fT as ua, fU as ga, fV as ha, fW as ma, fX as fa, fY as ba, s as Te, bz as Ne, bx as xa, bw as ka, cl as ya, b_ as H, m as wa, fZ as Le, b8 as bt, d7 as Be, bF as _a, bh as De, f_ as Nt, f$ as Ca, db as ar, ai as va, ff as Sa, g0 as ir, K as Je, aE as or, I as C, a5 as P, o as nr, a6 as Ma, D as Xe, g1 as Ia, g2 as Da, aa as xe, g3 as lr, ab as Aa, i as f, ax as sr, aB as dr, ad as cr, J as pr, r as D, k as n, L as z, Z as Y, g4 as La, b5 as Ta, aP as Na, T as $, c6 as ye, z as N, b3 as xt, p as E, y as we, G as v, aq as ja, c9 as za, A as he, g5 as Oa, aL as Ce, ak as it, u as ve, g6 as Ea, g7 as Ra, cg as Za, cj as $a, bA as Ae, d$ as ur, x as kt, q as Wa, g8 as ze, cB as qa, g9 as jt, a as Ue, ga as Pa, gb as Ga, gc as gr, gd as Ha, ge as Ya, fR as Ba, fB as Ua, cS as Qa, cT as Fa, d4 as hr, cZ as Va, gf as Ja, gg as Xa, gh as Ka, aY as ei, gi as ti, e2 as ri, bI as ai, gj as ii, dv as mr, gk as oi, cY as ni, cX as li, ao as si, _ as di, gl as ci, dt as pi, gm as ui } from "./quota-notification-D6oMJal8-47078282.js";
2
- import "./index-kxX21arA-e16cd0d3.js";
1
+ import { b as at, v as rr, cU as pa, fX as ua, fY as ga, fZ as ha, f_ as ma, f$ as fa, g0 as ba, w as Te, bA as Ne, by as xa, bx as ka, cn as ya, c0 as B, d as wa, g1 as Le, b9 as bt, da as Ue, bG as _a, bi as De, g2 as Nt, g3 as Ca, de as ar, aj as va, fj as Sa, g4 as ir, n as Je, aF as or, P as C, a6 as P, m as nr, a7 as Ma, D as Xe, g5 as Ia, g6 as Da, ab as xe, g7 as lr, ac as Aa, h as f, ay as sr, aC as dr, ae as cr, t as pr, s as D, j as n, Q as O, $ as H, g8 as La, b6 as Ta, aQ as Na, T as $, c8 as ye, G as N, b4 as xt, q as E, y as we, I as v, ar as ja, cb as Oa, A as he, g9 as za, aM as Ce, al as it, u as ve, ga as Ea, gb as Ra, ci as Za, cl as $a, bB as Ae, e3 as ur, o as kt, r as Wa, gc as Oe, cE as qa, gd as jt, a as Ye, ge as Pa, gf as Ga, gg as gr, gh as Ba, gi as Ha, fV as Ua, fF as Ya, cV as Qa, cW as Fa, d7 as hr, d0 as Va, gj as Ja, gk as Xa, gl as Ka, aZ as ei, gm as ti, e6 as ri, bK as ai, gn as ii, dz as mr, go as oi, c$ as ni, c_ as li, ap as si, _ as di, gp as ci, dx as pi, gq as ui } from "./quota-notification-CVl0isIV-f248786a.js";
2
+ import "./index-DCAC0mJe-142baf5c.js";
3
3
  let fr = class extends rr {
4
4
  constructor(t, r) {
5
5
  var a;
@@ -55,17 +55,17 @@ function br(e) {
55
55
  }) : hi(e);
56
56
  }
57
57
  const mi = (e) => "dashboardOid" in e && "widgetOid" in e;
58
- var fi = Object.defineProperty, bi = Object.defineProperties, xi = Object.getOwnPropertyDescriptors, Qe = Object.getOwnPropertySymbols, xr = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable, zt = (e, t, r) => t in e ? fi(e, t, {
58
+ var fi = Object.defineProperty, bi = Object.defineProperties, xi = Object.getOwnPropertyDescriptors, Qe = Object.getOwnPropertySymbols, xr = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable, Ot = (e, t, r) => t in e ? fi(e, t, {
59
59
  enumerable: !0,
60
60
  configurable: !0,
61
61
  writable: !0,
62
62
  value: r
63
63
  }) : e[t] = r, j = (e, t) => {
64
64
  for (var r in t || (t = {}))
65
- xr.call(t, r) && zt(e, r, t[r]);
65
+ xr.call(t, r) && Ot(e, r, t[r]);
66
66
  if (Qe)
67
67
  for (var r of Qe(t))
68
- kr.call(t, r) && zt(e, r, t[r]);
68
+ kr.call(t, r) && Ot(e, r, t[r]);
69
69
  return e;
70
70
  }, ie = (e, t) => bi(e, xi(t)), ki = (e, t) => {
71
71
  var r = {};
@@ -95,7 +95,7 @@ function be(e) {
95
95
  var t;
96
96
  return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
97
97
  }
98
- function Ot(e) {
98
+ function zt(e) {
99
99
  const t = "measures" in e && ae(e.measures) || "values" in e && ae(e.values);
100
100
  return _i(e) ? "values" in e.dataOptions && ae(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && ae(e.dataOptions.value) || "secondary" in e.dataOptions && ae(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !ae(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => be(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && be(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && be(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && be(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && be(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && be(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && ae(e.dataOptions.geo) && "color" in e.dataOptions && ae(e.dataOptions.color) : "value" in e.dataOptions && ae(e.dataOptions.value) : t;
101
101
  }
@@ -660,7 +660,7 @@ const wr = (e, t) => Si[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => wr(`${a}Tmpl`,
660
660
  } : {}), a ? {
661
661
  measure: Ge(a)
662
662
  } : {});
663
- }, He = 6;
663
+ }, Be = 6;
664
664
  function Ti(e) {
665
665
  switch (e) {
666
666
  case "line":
@@ -796,7 +796,7 @@ const Ni = {
796
796
  navigator: {
797
797
  enabled: !0
798
798
  }
799
- }, zi = {
799
+ }, Oi = {
800
800
  subtype: "line/basic",
801
801
  lineWidth: {
802
802
  width: "bold"
@@ -806,7 +806,7 @@ const Ni = {
806
806
  size: "small",
807
807
  fill: "filled"
808
808
  }
809
- }, Oi = {
809
+ }, zi = {
810
810
  subtype: "area/basic",
811
811
  lineWidth: {
812
812
  width: "bold"
@@ -923,7 +923,7 @@ const $i = {
923
923
  cellColor: "#e6e6e6",
924
924
  hideValues: !0
925
925
  }
926
- }, Hi = {
926
+ }, Bi = {
927
927
  legend: {
928
928
  enabled: !0,
929
929
  position: "bottom"
@@ -931,7 +931,7 @@ const $i = {
931
931
  tooltip: {
932
932
  mode: "value"
933
933
  }
934
- }, Yi = {
934
+ }, Hi = {
935
935
  legend: {
936
936
  enabled: !0,
937
937
  position: "bottom"
@@ -983,7 +983,7 @@ const $i = {
983
983
  scatterBubbleMinSize: 10,
984
984
  scatterBubbleMaxSize: 10
985
985
  }
986
- }, Bi = {
986
+ }, Ui = {
987
987
  header: {
988
988
  color: {
989
989
  enabled: !1
@@ -999,7 +999,7 @@ const $i = {
999
999
  enabled: !1
1000
1000
  }
1001
1001
  }
1002
- }, Ui = {
1002
+ }, Yi = {
1003
1003
  subtype: "scattermap",
1004
1004
  markers: {
1005
1005
  fill: "filled",
@@ -1066,11 +1066,11 @@ const $i = {
1066
1066
  function Vi(e) {
1067
1067
  switch (e) {
1068
1068
  case "indicator":
1069
- return H(Ni);
1069
+ return B(Ni);
1070
1070
  case "line":
1071
- return Se(zi);
1072
- case "area":
1073
1071
  return Se(Oi);
1072
+ case "area":
1073
+ return Se(zi);
1074
1074
  case "bar":
1075
1075
  return Se(Ei);
1076
1076
  case "column":
@@ -1078,27 +1078,27 @@ function Vi(e) {
1078
1078
  case "polar":
1079
1079
  return Se(Zi);
1080
1080
  case "pie":
1081
- return H($i);
1081
+ return B($i);
1082
1082
  case "funnel":
1083
- return H(Wi);
1083
+ return B(Wi);
1084
1084
  case "treemap":
1085
- return H(Pi);
1085
+ return B(Pi);
1086
1086
  case "calendar-heatmap":
1087
- return H(Gi);
1087
+ return B(Gi);
1088
1088
  case "sunburst":
1089
- return H(Hi);
1089
+ return B(Bi);
1090
1090
  case "scatter":
1091
- return H(Yi);
1091
+ return B(Hi);
1092
1092
  case "scattermap":
1093
- return H(Ui);
1093
+ return B(Yi);
1094
1094
  case "areamap":
1095
- return H(Qi);
1095
+ return B(Qi);
1096
1096
  case "boxplot":
1097
- return H(Fi);
1097
+ return B(Fi);
1098
1098
  case "table":
1099
- return H(Bi);
1099
+ return B(Ui);
1100
1100
  case "pivot":
1101
- return H(qi);
1101
+ return B(qi);
1102
1102
  case "pivot2":
1103
1103
  return {};
1104
1104
  case "image":
@@ -1186,7 +1186,7 @@ function Rt(e, t) {
1186
1186
  return a ?? {};
1187
1187
  }
1188
1188
  function eo(e) {
1189
- return le(e, He);
1189
+ return le(e, Be);
1190
1190
  }
1191
1191
  function Zt(e, t = "data-source-placeholder") {
1192
1192
  if (!e)
@@ -1226,7 +1226,7 @@ const Wt = `
1226
1226
  }, so = (e, t, r, a) => {
1227
1227
  if (Ne(e)) {
1228
1228
  yr(e.chartType);
1229
- const i = Ot(e), o = {
1229
+ const i = zt(e), o = {
1230
1230
  idString: e.id,
1231
1231
  widgetTypeString: "chart",
1232
1232
  titleString: e.title,
@@ -1236,13 +1236,13 @@ const Wt = `
1236
1236
  filtersString: qt(e.filters),
1237
1237
  componentString: "ChartWidget",
1238
1238
  extraImportsString: $t(e.filters || [], i),
1239
- styleOptionsString: le(a ? Et(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, He),
1240
- drilldownOptionsString: le(e.drilldownOptions || {}, He)
1239
+ styleOptionsString: le(a ? Et(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, Be),
1240
+ drilldownOptionsString: le(e.drilldownOptions || {}, Be)
1241
1241
  };
1242
1242
  return ct(r.chart, o, t);
1243
1243
  }
1244
1244
  if (xa(e)) {
1245
- const i = Ot(e), o = {
1245
+ const i = zt(e), o = {
1246
1246
  idString: e.id,
1247
1247
  widgetTypeString: "pivot",
1248
1248
  titleString: e.title,
@@ -1251,7 +1251,7 @@ const Wt = `
1251
1251
  filtersString: qt(e.filters),
1252
1252
  componentString: "PivotTableWidget",
1253
1253
  extraImportsString: $t(e.filters || [], i),
1254
- styleOptionsString: le(a ? Et(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, He)
1254
+ styleOptionsString: le(a ? Et(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, Be)
1255
1255
  };
1256
1256
  return ct(r.pivot, o, t);
1257
1257
  }
@@ -1334,7 +1334,7 @@ const uo = (e) => {
1334
1334
  const [u, c] = s;
1335
1335
  return o[`${u}`] = Array.isArray(c) ? c.map((g) => {
1336
1336
  var b, x;
1337
- const l = Be(g);
1337
+ const l = Ue(g);
1338
1338
  delete l.enabled;
1339
1339
  const p = a[l.column.name];
1340
1340
  if (!p)
@@ -1392,10 +1392,10 @@ const uo = (e) => {
1392
1392
  }
1393
1393
  }, Gt = (e, t) => {
1394
1394
  var r, a, i, o;
1395
- return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => Be(s).column.name).join(", ") : (o = (i = e.value) != null ? i : e.y) == null ? void 0 : o.map((s) => Be(s).column.name).join(", ");
1396
- }, Ht = (e, t) => {
1395
+ return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => Ue(s).column.name).join(", ") : (o = (i = e.value) != null ? i : e.y) == null ? void 0 : o.map((s) => Ue(s).column.name).join(", ");
1396
+ }, Bt = (e, t) => {
1397
1397
  var r;
1398
- return (r = e[t]) == null ? void 0 : r.map((a) => Be(a).column.name).join(", ");
1398
+ return (r = e[t]) == null ? void 0 : r.map((a) => Ue(a).column.name).join(", ");
1399
1399
  }, fo = (e, t, r, a) => {
1400
1400
  let i;
1401
1401
  if (a && e in Pt)
@@ -1424,10 +1424,10 @@ const uo = (e) => {
1424
1424
  indicatorComponents: {
1425
1425
  title: {
1426
1426
  shouldBeShown: !0,
1427
- text: Ht(t, "value")
1427
+ text: Bt(t, "value")
1428
1428
  }
1429
1429
  }
1430
- }, s = Ht(t, "secondary");
1430
+ }, s = Bt(t, "secondary");
1431
1431
  s && o != null && o.indicatorComponents && (o.indicatorComponents.secondaryTitle = {
1432
1432
  text: s
1433
1433
  }), i = De(Nt(), o, r);
@@ -1450,8 +1450,8 @@ const uo = (e) => {
1450
1450
  chartFamily: "table",
1451
1451
  axesMapping: {}
1452
1452
  }, ko = (e) => e.map((t) => ya(t.jaql)), yo = (e) => e.reduce((t, r) => {
1453
- if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(H(r)), r.panel !== "scope") {
1454
- const a = H(r);
1453
+ if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(B(r)), r.panel !== "scope") {
1454
+ const a = B(r);
1455
1455
  delete a.jaql.filter, t.metadataColumns.push(a);
1456
1456
  }
1457
1457
  return t;
@@ -1503,10 +1503,10 @@ const uo = (e) => {
1503
1503
  console.error(r);
1504
1504
  return;
1505
1505
  }
1506
- }, Oe = (e, t) => wo(e, t), _o = (e) => mi(e) ? lo(e) : co(e), dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1506
+ }, ze = (e, t) => wo(e, t), _o = (e) => mi(e) ? lo(e) : co(e), dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1507
1507
  __proto__: null,
1508
1508
  toWidgetCode: _o,
1509
- toWidgetProps: Oe
1509
+ toWidgetProps: ze
1510
1510
  }, Symbol.toStringTag, {
1511
1511
  value: "Module"
1512
1512
  }));
@@ -1620,7 +1620,7 @@ class Mo extends Ja {
1620
1620
  }
1621
1621
  }
1622
1622
  function wt(e, t, r) {
1623
- const a = Pa(e, t), i = ze({
1623
+ const a = Pa(e, t), i = Oe({
1624
1624
  context: a.context
1625
1625
  }), [o] = E(() => new Mo(i, a));
1626
1626
  we(() => {
@@ -1629,7 +1629,7 @@ function wt(e, t, r) {
1629
1629
  const s = Ga(N((c) => o.subscribe(gr.batchCalls(c)), [o]), () => o.getCurrentResult(), () => o.getCurrentResult()), u = N((c, g) => {
1630
1630
  o.mutate(c, g).catch(Io);
1631
1631
  }, [o]);
1632
- if (s.error && Ha(o.options.useErrorBoundary, [s.error]))
1632
+ if (s.error && Ba(o.options.useErrorBoundary, [s.error]))
1633
1633
  throw s.error;
1634
1634
  return T(M({}, s), {
1635
1635
  mutate: u,
@@ -1714,14 +1714,14 @@ class jo {
1714
1714
  }), this.volatile = r, this.httpClient = t, this.isUnifiedNarrationEnabled = a, this.isSisenseAiEnabled = i;
1715
1715
  }
1716
1716
  }
1717
- const zo = new or({
1717
+ const Oo = new or({
1718
1718
  defaultOptions: {
1719
1719
  queries: {
1720
1720
  refetchOnWindowFocus: !1,
1721
1721
  refetchOnMount: !1
1722
1722
  }
1723
1723
  }
1724
- }), _t = Je(void 0), oe = () => kt(_t), Oo = ({
1724
+ }), _t = Je(void 0), oe = () => kt(_t), zo = ({
1725
1725
  children: e,
1726
1726
  volatile: t
1727
1727
  }) => {
@@ -1734,7 +1734,7 @@ const zo = new or({
1734
1734
  return /* @__PURE__ */ n(_t.Provider, {
1735
1735
  value: a,
1736
1736
  children: /* @__PURE__ */ n(ur, {
1737
- client: zo,
1737
+ client: Oo,
1738
1738
  children: e
1739
1739
  })
1740
1740
  });
@@ -1744,7 +1744,7 @@ function cd({
1744
1744
  volatile: t
1745
1745
  }) {
1746
1746
  return /* @__PURE__ */ n(Ir, {
1747
- children: /* @__PURE__ */ n(Oo, {
1747
+ children: /* @__PURE__ */ n(zo, {
1748
1748
  volatile: t,
1749
1749
  children: e
1750
1750
  })
@@ -1834,7 +1834,7 @@ function Zo(e, t) {
1834
1834
  request: a
1835
1835
  } = Tr(e), i = yield t.ai.getNlqResult(r, a);
1836
1836
  return {
1837
- widgetProps: i ? Oe(i, {
1837
+ widgetProps: i ? ze(i, {
1838
1838
  useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
1839
1839
  }) : void 0,
1840
1840
  nlqResult: i
@@ -1890,7 +1890,7 @@ const $o = (e) => {
1890
1890
  } : null)),
1891
1891
  enabled: !!s && c
1892
1892
  }), h = $(() => l == null ? void 0 : l.map((m) => T(M({}, m), {
1893
- widgetProps: m.jaql ? Oe(m, {
1893
+ widgetProps: m.jaql ? ze(m, {
1894
1894
  useCustomizedStyleOptions: a
1895
1895
  }) : void 0
1896
1896
  })), [l, a]);
@@ -1910,18 +1910,18 @@ const $o = (e) => {
1910
1910
  enableInsights: !0,
1911
1911
  numOfRecommendations: 4,
1912
1912
  numOfRecentPrompts: 5
1913
- }), zr = Je(M({}, jr)), se = () => kt(zr), qo = ({
1913
+ }), Or = Je(M({}, jr)), se = () => kt(Or), qo = ({
1914
1914
  children: e,
1915
1915
  value: t
1916
1916
  }) => {
1917
1917
  const {
1918
1918
  t: r
1919
- } = z(), a = Object.entries(t).reduce((i, [o, s]) => (s !== void 0 && (i[o] = s), i), T(M({}, jr), {
1919
+ } = O(), a = Object.entries(t).reduce((i, [o, s]) => (s !== void 0 && (i[o] = s), i), T(M({}, jr), {
1920
1920
  inputPromptText: r("ai.config.inputPromptText"),
1921
1921
  welcomeText: r("ai.config.welcomeText"),
1922
1922
  suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
1923
1923
  }));
1924
- return /* @__PURE__ */ n(zr.Provider, {
1924
+ return /* @__PURE__ */ n(Or.Provider, {
1925
1925
  value: a,
1926
1926
  children: e
1927
1927
  });
@@ -1941,8 +1941,8 @@ const $o = (e) => {
1941
1941
  }),
1942
1942
  enabled: !!t && !!e
1943
1943
  });
1944
- }, Or = (e) => {
1945
- const t = oe(), r = ze();
1944
+ }, zr = (e) => {
1945
+ const t = oe(), r = Oe();
1946
1946
  return wt({
1947
1947
  mutationFn: () => J(void 0, null, function* () {
1948
1948
  if (!(!t || !e))
@@ -1962,7 +1962,7 @@ const $o = (e) => {
1962
1962
  isError: a
1963
1963
  } = Po(e), {
1964
1964
  mutate: i
1965
- } = Or(e);
1965
+ } = zr(e);
1966
1966
  return we(() => {
1967
1967
  a && i();
1968
1968
  }, [a, i]), {
@@ -1988,7 +1988,7 @@ const $o = (e) => {
1988
1988
  isLoading: r,
1989
1989
  fetchStatus: a
1990
1990
  };
1991
- }, Ho = () => {
1991
+ }, Bo = () => {
1992
1992
  const e = oe(), {
1993
1993
  data: t,
1994
1994
  isLoading: r
@@ -2001,8 +2001,8 @@ const $o = (e) => {
2001
2001
  data: t ?? [],
2002
2002
  isLoading: r
2003
2003
  };
2004
- }, Yo = (e, t, r) => {
2005
- const a = ze(), i = oe(), o = wt({
2004
+ }, Ho = (e, t, r) => {
2005
+ const a = Oe(), i = oe(), o = wt({
2006
2006
  mutationFn: () => J(void 0, null, function* () {
2007
2007
  if (!(!i || !e))
2008
2008
  return i.ai.chat.create(e, r);
@@ -2012,7 +2012,7 @@ const $o = (e) => {
2012
2012
  return we(() => {
2013
2013
  t && o.isIdle && o.mutate();
2014
2014
  }, [t, o]), o;
2015
- }, Bo = (e, t) => {
2015
+ }, Uo = (e, t) => {
2016
2016
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
2017
2017
  case "nlq":
2018
2018
  return {
@@ -2029,12 +2029,12 @@ const $o = (e) => {
2029
2029
  default:
2030
2030
  throw Error(`${t}${JSON.stringify(e)}`);
2031
2031
  }
2032
- }, Uo = (e, t) => {
2033
- const r = ze(), a = N((c) => {
2032
+ }, Yo = (e, t) => {
2033
+ const r = Oe(), a = N((c) => {
2034
2034
  e && r.setQueriesData([Ct, e], (g) => g && [...g, c]);
2035
2035
  }, [r, e]), {
2036
2036
  t: i
2037
- } = z(), o = oe(), {
2037
+ } = O(), o = oe(), {
2038
2038
  mutate: s,
2039
2039
  isLoading: u
2040
2040
  } = wt({
@@ -2065,7 +2065,7 @@ const $o = (e) => {
2065
2065
  if (!c)
2066
2066
  return;
2067
2067
  const g = i("ai.errors.unknownResponse");
2068
- a(Bo(c, g));
2068
+ a(Uo(c, g));
2069
2069
  }
2070
2070
  });
2071
2071
  return {
@@ -2077,14 +2077,14 @@ const $o = (e) => {
2077
2077
  const {
2078
2078
  data: i,
2079
2079
  isLoading: o
2080
- } = Ho(), s = Do(), u = s.getChatId(e, t) || ((a = i.find((x) => {
2080
+ } = Bo(), s = Do(), u = s.getChatId(e, t) || ((a = i.find((x) => {
2081
2081
  var l;
2082
2082
  return x.contextTitle === e && ((l = x.contextDetails) == null ? void 0 : l.dashboardId) === (t == null ? void 0 : t.dashboardId);
2083
2083
  })) == null ? void 0 : a.chatId), {
2084
2084
  isError: c,
2085
2085
  data: g,
2086
2086
  isSuccess: b
2087
- } = Yo(e, r && !o && !u, t);
2087
+ } = Ho(e, r && !o && !u, t);
2088
2088
  return we(() => {
2089
2089
  b && g && !u && s.saveChatId(g.chatId, e, t);
2090
2090
  }, [g, b, e, t, u, s]), {
@@ -2102,7 +2102,7 @@ const $o = (e) => {
2102
2102
  }, [e]), Mt = (e) => !!e && "type" in e && e.type === "nlq", Qo = (e) => !!e && "type" in e && e.type === "text", Fo = (e, t) => {
2103
2103
  const {
2104
2104
  t: r
2105
- } = z(), {
2105
+ } = O(), {
2106
2106
  enableFollowupQuestions: a
2107
2107
  } = se(), {
2108
2108
  chatId: i,
@@ -2118,7 +2118,7 @@ const $o = (e) => {
2118
2118
  const {
2119
2119
  mutate: x,
2120
2120
  isLoading: l
2121
- } = Uo(i, a), p = Er(c);
2121
+ } = Yo(i, a), p = Er(c);
2122
2122
  return {
2123
2123
  chatId: i,
2124
2124
  history: c ?? [],
@@ -2173,10 +2173,10 @@ const $o = (e) => {
2173
2173
  min-height: ${Jo}px;
2174
2174
  width: ${({
2175
2175
  width: e
2176
- }) => e ? Yt(e) : `${Xo}px`};
2176
+ }) => e ? Ht(e) : `${Xo}px`};
2177
2177
  height: ${({
2178
2178
  height: e
2179
- }) => e ? Yt(e) : `${Ko}px`};
2179
+ }) => e ? Ht(e) : `${Ko}px`};
2180
2180
 
2181
2181
  ${({
2182
2182
  theme: e
@@ -2188,7 +2188,7 @@ const $o = (e) => {
2188
2188
  theme: e
2189
2189
  }) => e.aiChat.border === !1 ? "none" : e.aiChat.border};
2190
2190
  `;
2191
- function Yt(e) {
2191
+ function Ht(e) {
2192
2192
  return typeof e == "number" ? `${e}px` : e;
2193
2193
  }
2194
2194
  function tn({
@@ -2245,7 +2245,7 @@ function an({
2245
2245
  }) {
2246
2246
  const {
2247
2247
  t
2248
- } = z();
2248
+ } = O();
2249
2249
  return /* @__PURE__ */ v(rn, {
2250
2250
  theme: e,
2251
2251
  children: [/* @__PURE__ */ n("div", {
@@ -2369,7 +2369,7 @@ function pn({
2369
2369
  themeSettings: c
2370
2370
  } = D(), {
2371
2371
  t: g
2372
- } = z(), b = u.length === 1;
2372
+ } = O(), b = u.length === 1;
2373
2373
  return /* @__PURE__ */ n(mr, {
2374
2374
  open: gt(o) && u.length > 0,
2375
2375
  anchorEl: i,
@@ -2566,13 +2566,13 @@ function yn({
2566
2566
  }, [x, c]), d = N((y) => {
2567
2567
  u == null || u(y.target.value), g(y.target.value);
2568
2568
  }, [u]), h = he(null);
2569
- Ue(() => {
2569
+ Ye(() => {
2570
2570
  h.current && (h.current.style.height = "inherit", h.current.style.height = `${Math.max(
2571
2571
  h.current.scrollHeight + 2,
2572
2572
  // account for 1px top/bottom border
2573
2573
  kn
2574
2574
  )}px`);
2575
- }, [c]), Ue(() => {
2575
+ }, [c]), Ye(() => {
2576
2576
  h.current && h.current.focus({
2577
2577
  preventScroll: !0
2578
2578
  });
@@ -2581,7 +2581,7 @@ function yn({
2581
2581
  themeSettings: m
2582
2582
  } = D(), {
2583
2583
  t: k
2584
- } = z(), _ = N((y) => {
2584
+ } = O(), _ = N((y) => {
2585
2585
  var I;
2586
2586
  if ((I = document.getElementById("csdk-chatbot-frame")) != null && I.contains(y.relatedTarget)) {
2587
2587
  const A = (S) => {
@@ -2667,7 +2667,7 @@ function Rr({
2667
2667
  children: [/* @__PURE__ */ n(_n, {
2668
2668
  theme: r,
2669
2669
  children: e
2670
- }), /* @__PURE__ */ n(Ya, {}), t && /* @__PURE__ */ n(Cn, {
2670
+ }), /* @__PURE__ */ n(Ha, {}), t && /* @__PURE__ */ n(Cn, {
2671
2671
  onClick: t.onClick,
2672
2672
  children: t.text
2673
2673
  })]
@@ -2803,11 +2803,11 @@ const Mn = ["children", "options"], w = {
2803
2803
  textStrikethroughed: "32",
2804
2804
  unorderedList: "33"
2805
2805
  };
2806
- var Bt;
2806
+ var Ut;
2807
2807
  (function(e) {
2808
2808
  e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
2809
- })(Bt || (Bt = {}));
2810
- const Ut = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
2809
+ })(Ut || (Ut = {}));
2810
+ const Yt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
2811
2811
  class: "className",
2812
2812
  for: "htmlFor"
2813
2813
  }), Qt = {
@@ -2817,11 +2817,11 @@ const Ut = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
2817
2817
  lt: "<",
2818
2818
  nbsp: " ",
2819
2819
  quot: "“"
2820
- }, In = ["style", "script"], Dn = ["src", "href", "data", "formAction", "srcDoc", "action"], An = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Ln = /mailto:/i, Tn = /\n{2,}$/, $r = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Nn = /^ *> ?/gm, jn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, zn = /^ {2,}\n/, On = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Wr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, qr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, En = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Rn = /^(?:\n *)*\n/, Zn = /\r\n?/g, $n = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Wn = /^\[\^([^\]]+)]/, qn = /\f/g, Pn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Gn = /^\s*?\[(x|\s)\]/, Pr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Gr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Hr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ht = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Hn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Yr = /^<!--[\s\S]*?(?:-->)/, Yn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, mt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Bn = /^\{.*\}$/, Un = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Qn = /^<([^ >]+@[^ >]+)>/, Fn = /^<([^ >]+:\/[^ >]+)>/, Vn = /-([a-z])?/gi, Br = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Jn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Xn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Kn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, el = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, tl = /\t/g, rl = /(^ *\||\| *$)/g, al = /^ *:-+: *$/, il = /^ *:-+ *$/, ol = /^ *-+: *$/, tt = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", nl = new RegExp(`^([*_])\\1${tt}\\1\\1(?!\\1)`), ll = new RegExp(`^([*_])${tt}\\1(?!\\1)`), sl = new RegExp(`^(==)${tt}\\1`), dl = new RegExp(`^(~~)${tt}\\1`), cl = /^\\([^0-9A-Za-z\s])/, Ft = /\\([^0-9A-Za-z\s])/g, pl = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, ul = /^\n+/, gl = /^([ \t]*)/, hl = /\\([^\\])/g, ml = /(?:^|\n)( *)$/, Dt = "(?:\\d+\\.)", At = "(?:[*+-])";
2821
- function Ur(e) {
2820
+ }, In = ["style", "script"], Dn = ["src", "href", "data", "formAction", "srcDoc", "action"], An = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Ln = /mailto:/i, Tn = /\n{2,}$/, $r = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Nn = /^ *> ?/gm, jn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, On = /^ {2,}\n/, zn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Wr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, qr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, En = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Rn = /^(?:\n *)*\n/, Zn = /\r\n?/g, $n = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Wn = /^\[\^([^\]]+)]/, qn = /\f/g, Pn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Gn = /^\s*?\[(x|\s)\]/, Pr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Gr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Br = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ht = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Bn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Hr = /^<!--[\s\S]*?(?:-->)/, Hn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, mt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Un = /^\{.*\}$/, Yn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Qn = /^<([^ >]+@[^ >]+)>/, Fn = /^<([^ >]+:\/[^ >]+)>/, Vn = /-([a-z])?/gi, Ur = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Jn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Xn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Kn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, el = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, tl = /\t/g, rl = /(^ *\||\| *$)/g, al = /^ *:-+: *$/, il = /^ *:-+ *$/, ol = /^ *-+: *$/, tt = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", nl = new RegExp(`^([*_])\\1${tt}\\1\\1(?!\\1)`), ll = new RegExp(`^([*_])${tt}\\1(?!\\1)`), sl = new RegExp(`^(==)${tt}\\1`), dl = new RegExp(`^(~~)${tt}\\1`), cl = /^\\([^0-9A-Za-z\s])/, Ft = /\\([^0-9A-Za-z\s])/g, pl = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, ul = /^\n+/, gl = /^([ \t]*)/, hl = /\\([^\\])/g, ml = /(?:^|\n)( *)$/, Dt = "(?:\\d+\\.)", At = "(?:[*+-])";
2821
+ function Yr(e) {
2822
2822
  return "( *)(" + (e === 1 ? Dt : At) + ") +";
2823
2823
  }
2824
- const Qr = Ur(1), Fr = Ur(2);
2824
+ const Qr = Yr(1), Fr = Yr(2);
2825
2825
  function Vr(e) {
2826
2826
  return new RegExp("^" + (e === 1 ? Qr : Fr));
2827
2827
  }
@@ -2875,7 +2875,7 @@ function Vt(e, t) {
2875
2875
  }))
2876
2876
  };
2877
2877
  }
2878
- const yl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), wl = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ta = [$r, Wr, qr, Pr, Hr, Gr, Br, Kr, ea], _l = [...ta, /^[^\n]+(?: \n|\n{2,})/, ht, Yr, mt];
2878
+ const yl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), wl = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ta = [$r, Wr, qr, Pr, Br, Gr, Ur, Kr, ea], _l = [...ta, /^[^\n]+(?: \n|\n{2,})/, ht, Hr, mt];
2879
2879
  function je(e) {
2880
2880
  let t = e.length;
2881
2881
  for (; t > 0 && e[t - 1] <= " "; )
@@ -2972,7 +2972,7 @@ function Il(e) {
2972
2972
  function Kt(e) {
2973
2973
  return e.replace(hl, "$1");
2974
2974
  }
2975
- function Ye(e, t, r) {
2975
+ function He(e, t, r) {
2976
2976
  const a = r.inline || !1, i = r.simple || !1;
2977
2977
  r.inline = !0, r.simple = !0;
2978
2978
  const o = e(t, r);
@@ -2991,7 +2991,7 @@ function Al(e, t, r) {
2991
2991
  return r.inline = a, i;
2992
2992
  }
2993
2993
  const ot = (e, t, r) => ({
2994
- children: Ye(t, e[2], r)
2994
+ children: He(t, e[2], r)
2995
2995
  });
2996
2996
  function nt() {
2997
2997
  return {};
@@ -3053,24 +3053,24 @@ function Tl(e = "", t = {}) {
3053
3053
  const k = m.indexOf("=");
3054
3054
  if (k !== -1) {
3055
3055
  const _ = function(S) {
3056
- return S.indexOf("-") !== -1 && S.match(Yn) === null && (S = S.replace(Vn, function(L, R) {
3056
+ return S.indexOf("-") !== -1 && S.match(Hn) === null && (S = S.replace(Vn, function(L, R) {
3057
3057
  return R.toUpperCase();
3058
3058
  })), S;
3059
3059
  }(m.slice(0, k)).trim(), y = function(S) {
3060
3060
  const L = S[0];
3061
3061
  return (L === '"' || L === "'") && S.length >= 2 && S[S.length - 1] === L ? S.slice(1, -1) : S;
3062
- }(m.slice(k + 1).trim()), I = Ut[_] || _;
3062
+ }(m.slice(k + 1).trim()), I = Yt[_] || _;
3063
3063
  if (I === "ref")
3064
3064
  return h;
3065
3065
  const A = h[I] = function(S, L, R, X) {
3066
3066
  return L === "style" ? function(K) {
3067
- const B = [];
3068
- let F = "", U = !1, G = !1, ee = "";
3067
+ const U = [];
3068
+ let F = "", Y = !1, G = !1, ee = "";
3069
3069
  if (!K)
3070
- return B;
3070
+ return U;
3071
3071
  for (let V = 0; V < K.length; V++) {
3072
3072
  const Z = K[V];
3073
- if (Z !== '"' && Z !== "'" || U || (G ? Z === ee && (G = !1, ee = "") : (G = !0, ee = Z)), Z === "(" && F.endsWith("url") ? U = !0 : Z === ")" && U && (U = !1), Z !== ";" || G || U)
3073
+ if (Z !== '"' && Z !== "'" || Y || (G ? Z === ee && (G = !1, ee = "") : (G = !0, ee = Z)), Z === "(" && F.endsWith("url") ? Y = !0 : Z === ")" && Y && (Y = !1), Z !== ";" || G || Y)
3074
3074
  F += Z;
3075
3075
  else {
3076
3076
  const Q = F.trim();
@@ -3078,7 +3078,7 @@ function Tl(e = "", t = {}) {
3078
3078
  const W = Q.indexOf(":");
3079
3079
  if (W > 0) {
3080
3080
  const me = Q.slice(0, W).trim(), _e = Q.slice(W + 1).trim();
3081
- B.push([me, _e]);
3081
+ U.push([me, _e]);
3082
3082
  }
3083
3083
  }
3084
3084
  F = "";
@@ -3089,17 +3089,17 @@ function Tl(e = "", t = {}) {
3089
3089
  const V = te.indexOf(":");
3090
3090
  if (V > 0) {
3091
3091
  const Z = te.slice(0, V).trim(), Q = te.slice(V + 1).trim();
3092
- B.push([Z, Q]);
3092
+ U.push([Z, Q]);
3093
3093
  }
3094
3094
  }
3095
- return B;
3096
- }(R).reduce(function(K, [B, F]) {
3097
- return K[B.replace(/(-[a-z])/g, (U) => U[1].toUpperCase())] = X(F, S, B), K;
3098
- }, {}) : Dn.indexOf(L) !== -1 ? X(R, S, L) : (R.match(Bn) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
3095
+ return U;
3096
+ }(R).reduce(function(K, [U, F]) {
3097
+ return K[U.replace(/(-[a-z])/g, (Y) => Y[1].toUpperCase())] = X(F, S, U), K;
3098
+ }, {}) : Dn.indexOf(L) !== -1 ? X(R, S, L) : (R.match(Un) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
3099
3099
  }(l, _, y, t.sanitizer);
3100
3100
  typeof A == "string" && (ht.test(A) || mt.test(A)) && (h[I] = a(A.trim()));
3101
3101
  } else
3102
- m !== "style" && (h[Ut[m] || m] = !0);
3102
+ m !== "style" && (h[Yt[m] || m] = !0);
3103
3103
  return h;
3104
3104
  }, {}) : null;
3105
3105
  }
@@ -3132,7 +3132,7 @@ function Tl(e = "", t = {}) {
3132
3132
  }
3133
3133
  },
3134
3134
  [w.breakLine]: {
3135
- match: Ie(zn),
3135
+ match: Ie(On),
3136
3136
  order: 1,
3137
3137
  parse: nt,
3138
3138
  render: (l, p, d) => r("br", {
@@ -3140,7 +3140,7 @@ function Tl(e = "", t = {}) {
3140
3140
  })
3141
3141
  },
3142
3142
  [w.breakThematic]: {
3143
- match: ne(On),
3143
+ match: ne(zn),
3144
3144
  order: 1,
3145
3145
  parse: nt,
3146
3146
  render: (l, p, d) => r("hr", {
@@ -3220,7 +3220,7 @@ function Tl(e = "", t = {}) {
3220
3220
  match: ne(t.enforceAtxHeadings ? Gr : Pr),
3221
3221
  order: 1,
3222
3222
  parse: (l, p, d) => ({
3223
- children: Ye(p, l[2], d),
3223
+ children: He(p, l[2], d),
3224
3224
  id: t.slugify(l[2], Me),
3225
3225
  level: l[1].length
3226
3226
  }),
@@ -3230,10 +3230,10 @@ function Tl(e = "", t = {}) {
3230
3230
  }, p(l.children, d))
3231
3231
  },
3232
3232
  [w.headingSetext]: {
3233
- match: ne(Hr),
3233
+ match: ne(Br),
3234
3234
  order: 0,
3235
3235
  parse: (l, p, d) => ({
3236
- children: Ye(p, l[1], d),
3236
+ children: He(p, l[1], d),
3237
3237
  level: l[2] === "=" ? 1 : 2,
3238
3238
  type: w.heading
3239
3239
  })
@@ -3242,7 +3242,7 @@ function Tl(e = "", t = {}) {
3242
3242
  match: Ie(ht),
3243
3243
  order: 1,
3244
3244
  parse(l, p, d) {
3245
- const [, h] = l[3].match(gl), m = new RegExp(`^${h}`, "gm"), k = l[3].replace(m, ""), _ = (y = k, _l.some((R) => R.test(y)) ? Al : Ye);
3245
+ const [, h] = l[3].match(gl), m = new RegExp(`^${h}`, "gm"), k = l[3].replace(m, ""), _ = (y = k, _l.some((R) => R.test(y)) ? Al : He);
3246
3246
  var y;
3247
3247
  const I = l[1].toLowerCase(), A = In.indexOf(I) !== -1, S = (A ? I : l[1]).trim(), L = {
3248
3248
  attrs: i(S, l[2]),
@@ -3270,7 +3270,7 @@ function Tl(e = "", t = {}) {
3270
3270
  }))
3271
3271
  },
3272
3272
  [w.htmlComment]: {
3273
- match: Ie(Yr),
3273
+ match: Ie(Hr),
3274
3274
  order: 1,
3275
3275
  parse: () => ({}),
3276
3276
  render: lt
@@ -3317,7 +3317,7 @@ function Tl(e = "", t = {}) {
3317
3317
  })
3318
3318
  },
3319
3319
  [w.linkBareUrlDetector]: {
3320
- match: ke((l, p) => p.inAnchor || t.disableAutoLink ? null : de(Un)(l, p)),
3320
+ match: ke((l, p) => p.inAnchor || t.disableAutoLink ? null : de(Yn)(l, p)),
3321
3321
  order: 0,
3322
3322
  parse: (l) => ({
3323
3323
  children: [{
@@ -3401,7 +3401,7 @@ function Tl(e = "", t = {}) {
3401
3401
  }, l.fallbackChildren)
3402
3402
  },
3403
3403
  [w.table]: {
3404
- match: ne(Br),
3404
+ match: ne(Ur),
3405
3405
  order: 1,
3406
3406
  parse: vl,
3407
3407
  render(l, p, d) {
@@ -3429,7 +3429,7 @@ function Tl(e = "", t = {}) {
3429
3429
  match: Ie(pl),
3430
3430
  order: 4,
3431
3431
  parse: (l) => ({
3432
- text: l[0].replace(Hn, (p, d) => t.namedCodesToUnicode[d] ? t.namedCodesToUnicode[d] : p)
3432
+ text: l[0].replace(Bn, (p, d) => t.namedCodesToUnicode[d] ? t.namedCodesToUnicode[d] : p)
3433
3433
  }),
3434
3434
  render: (l) => l.text
3435
3435
  },
@@ -3616,7 +3616,7 @@ const Nl = (e) => {
3616
3616
  })
3617
3617
  });
3618
3618
  };
3619
- function zl() {
3619
+ function Ol() {
3620
3620
  const {
3621
3621
  welcomeText: e
3622
3622
  } = se();
@@ -3625,7 +3625,7 @@ function zl() {
3625
3625
  children: e
3626
3626
  });
3627
3627
  }
3628
- const Ol = C.div`
3628
+ const zl = C.div`
3629
3629
  display: flex;
3630
3630
 
3631
3631
  ${({
@@ -3718,7 +3718,7 @@ function Ve({
3718
3718
  const {
3719
3719
  themeSettings: s
3720
3720
  } = D();
3721
- return /* @__PURE__ */ n(Ol, {
3721
+ return /* @__PURE__ */ n(zl, {
3722
3722
  align: t,
3723
3723
  children: /* @__PURE__ */ n(El, {
3724
3724
  "aria-label": o,
@@ -3737,8 +3737,8 @@ function Rl({
3737
3737
  }) {
3738
3738
  const {
3739
3739
  t: r
3740
- } = z();
3741
- return /* @__PURE__ */ v(Y, {
3740
+ } = O();
3741
+ return /* @__PURE__ */ v(H, {
3742
3742
  children: [/* @__PURE__ */ n(pe, {
3743
3743
  align: "left",
3744
3744
  children: r("ai.clearHistoryPrompt")
@@ -3788,7 +3788,7 @@ function Wl({
3788
3788
  }) {
3789
3789
  const {
3790
3790
  t
3791
- } = z();
3791
+ } = O();
3792
3792
  return /* @__PURE__ */ n(Ve, {
3793
3793
  align: "left",
3794
3794
  onClick: e,
@@ -3823,7 +3823,7 @@ const Pl = Xe(Ia, {
3823
3823
  paper: ["paper", `paperScroll${xe(r)}`, `paperWidth${xe(String(a))}`, i && "paperFullWidth", o && "paperFullScreen"]
3824
3824
  };
3825
3825
  return qa(s, ql, t);
3826
- }, Hl = Xe(Da, {
3826
+ }, Bl = Xe(Da, {
3827
3827
  name: "MuiDialog",
3828
3828
  slot: "Root",
3829
3829
  overridesResolver: (e, t) => t.root
@@ -3832,7 +3832,7 @@ const Pl = Xe(Ia, {
3832
3832
  // Use !important to override the Modal inline-style.
3833
3833
  position: "absolute !important"
3834
3834
  }
3835
- }), Yl = Xe("div", {
3835
+ }), Hl = Xe("div", {
3836
3836
  name: "MuiDialog",
3837
3837
  slot: "Container",
3838
3838
  overridesResolver: (e, t) => {
@@ -3874,7 +3874,7 @@ const Pl = Xe(Ia, {
3874
3874
  }
3875
3875
  }
3876
3876
  }]
3877
- }), Bl = Xe(lr, {
3877
+ }), Ul = Xe(lr, {
3878
3878
  name: "MuiDialog",
3879
3879
  slot: "Paper",
3880
3880
  overridesResolver: (e, t) => {
@@ -3970,7 +3970,7 @@ const Pl = Xe(Ia, {
3970
3970
  const r = ja({
3971
3971
  props: e,
3972
3972
  name: "MuiDialog"
3973
- }), a = za(), i = {
3973
+ }), a = Oa(), i = {
3974
3974
  enter: a.transitions.duration.enteringScreen,
3975
3975
  exit: a.transitions.duration.leavingScreen
3976
3976
  }, o = r, {
@@ -3995,9 +3995,9 @@ const Pl = Xe(Ia, {
3995
3995
  slots: R = {},
3996
3996
  slotProps: X = {},
3997
3997
  TransitionComponent: K = jt,
3998
- transitionDuration: B = i,
3998
+ transitionDuration: U = i,
3999
3999
  TransitionProps: F
4000
- } = o, U = Sr(o, ["aria-describedby", "aria-labelledby", "aria-modal", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "slots", "slotProps", "TransitionComponent", "transitionDuration", "TransitionProps"]), G = T(M({}, r), {
4000
+ } = o, Y = Sr(o, ["aria-describedby", "aria-labelledby", "aria-modal", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "slots", "slotProps", "TransitionComponent", "transitionDuration", "TransitionProps"]), G = T(M({}, r), {
4001
4001
  disableEscapeKeyDown: p,
4002
4002
  fullScreen: d,
4003
4003
  fullWidth: h,
@@ -4007,7 +4007,7 @@ const Pl = Xe(Ia, {
4007
4007
  te.current = fe.target === fe.currentTarget;
4008
4008
  }, Z = (fe) => {
4009
4009
  _ && _(fe), te.current && (te.current = null, k && k(fe), y && y(fe, "backdropClick"));
4010
- }, Q = Oa(u), W = $(() => ({
4010
+ }, Q = za(u), W = $(() => ({
4011
4011
  titleId: Q
4012
4012
  }), [Q]), me = M({
4013
4013
  transition: K
@@ -4019,25 +4019,25 @@ const Pl = Xe(Ia, {
4019
4019
  slots: me,
4020
4020
  slotProps: _e
4021
4021
  }, [Ze, rt] = Ce("root", {
4022
- elementType: Hl,
4022
+ elementType: Bl,
4023
4023
  shouldForwardComponentProp: !0,
4024
4024
  externalForwardedProps: ue,
4025
4025
  ownerState: G,
4026
4026
  className: it(ee.root, l),
4027
4027
  ref: t
4028
- }), [O, re] = Ce("backdrop", {
4028
+ }), [z, re] = Ce("backdrop", {
4029
4029
  elementType: Pl,
4030
4030
  shouldForwardComponentProp: !0,
4031
4031
  externalForwardedProps: ue,
4032
4032
  ownerState: G
4033
4033
  }), [$e, We] = Ce("paper", {
4034
- elementType: Bl,
4034
+ elementType: Ul,
4035
4035
  shouldForwardComponentProp: !0,
4036
4036
  externalForwardedProps: ue,
4037
4037
  ownerState: G,
4038
4038
  className: it(ee.paper, S.className)
4039
4039
  }), [la, sa] = Ce("container", {
4040
- elementType: Yl,
4040
+ elementType: Hl,
4041
4041
  externalForwardedProps: ue,
4042
4042
  ownerState: G,
4043
4043
  className: it(ee.container)
@@ -4048,18 +4048,18 @@ const Pl = Xe(Ia, {
4048
4048
  additionalProps: {
4049
4049
  appear: !0,
4050
4050
  in: I,
4051
- timeout: B,
4051
+ timeout: U,
4052
4052
  role: "presentation"
4053
4053
  }
4054
4054
  });
4055
4055
  return /* @__PURE__ */ ve(Ze, T(M(M({
4056
4056
  closeAfterTransition: !0,
4057
4057
  slots: {
4058
- backdrop: O
4058
+ backdrop: z
4059
4059
  },
4060
4060
  slotProps: {
4061
4061
  backdrop: M({
4062
- transitionDuration: B,
4062
+ transitionDuration: U,
4063
4063
  as: g
4064
4064
  }, re)
4065
4065
  },
@@ -4067,7 +4067,7 @@ const Pl = Xe(Ia, {
4067
4067
  onClose: y,
4068
4068
  open: I,
4069
4069
  onClick: Z
4070
- }, rt), U), {
4070
+ }, rt), Y), {
4071
4071
  children: /* @__PURE__ */ ve(da, T(M({}, ca), {
4072
4072
  children: /* @__PURE__ */ ve(la, T(M({
4073
4073
  onMouseDown: V
@@ -4252,7 +4252,7 @@ process.env.NODE_ENV !== "production" && (ia.propTypes = {
4252
4252
  */
4253
4253
  TransitionProps: f.object
4254
4254
  });
4255
- function Ul({
4255
+ function Yl({
4256
4256
  fillColor: e = "#262E3D"
4257
4257
  }) {
4258
4258
  return /* @__PURE__ */ v("svg", {
@@ -4447,7 +4447,7 @@ const Lt = (e) => cr(e.chart.backgroundColor), Xl = ({
4447
4447
  }, {
4448
4448
  themeSettings: o
4449
4449
  } = D();
4450
- return /* @__PURE__ */ v(Y, {
4450
+ return /* @__PURE__ */ v(H, {
4451
4451
  children: [/* @__PURE__ */ n(Re, {
4452
4452
  onClick: a,
4453
4453
  $hoverColor: Lt(o),
@@ -4491,7 +4491,7 @@ const Lt = (e) => cr(e.chart.backgroundColor), Xl = ({
4491
4491
  themeSettings: t
4492
4492
  } = D(), {
4493
4493
  t: r
4494
- } = z();
4494
+ } = O();
4495
4495
  return /* @__PURE__ */ n(Ee, {
4496
4496
  title: r("ai.preview"),
4497
4497
  children: /* @__PURE__ */ n(Re, {
@@ -4537,7 +4537,7 @@ function as({
4537
4537
  inlineElement: i,
4538
4538
  expandedElement: o
4539
4539
  } = $(() => {
4540
- const s = Oe(e, {
4540
+ const s = ze(e, {
4541
4541
  useCustomizedStyleOptions: !0
4542
4542
  });
4543
4543
  if (s === void 0 || !Ne(s))
@@ -4595,7 +4595,7 @@ function as({
4595
4595
  expandedElement: x
4596
4596
  };
4597
4597
  }, [e]);
4598
- return /* @__PURE__ */ v(Y, {
4598
+ return /* @__PURE__ */ v(H, {
4599
4599
  children: [i, /* @__PURE__ */ v(ia, {
4600
4600
  open: t,
4601
4601
  onClose: () => r(!1),
@@ -4615,7 +4615,7 @@ function as({
4615
4615
  }), /* @__PURE__ */ n(sr, {
4616
4616
  onClick: () => r(!1),
4617
4617
  "aria-label": "close expanded chart",
4618
- children: /* @__PURE__ */ n(Ul, {
4618
+ children: /* @__PURE__ */ n(Yl, {
4619
4619
  fillColor: a.aiChat.primaryTextColor
4620
4620
  })
4621
4621
  })]
@@ -4651,7 +4651,7 @@ function os({
4651
4651
  themeSettings: r
4652
4652
  } = D(), {
4653
4653
  t: a
4654
- } = z();
4654
+ } = O();
4655
4655
  return /* @__PURE__ */ n(Ee, {
4656
4656
  title: a("ai.buttons.incorrectResponse"),
4657
4657
  children: /* @__PURE__ */ n(Re, {
@@ -4690,7 +4690,7 @@ function ls({
4690
4690
  themeSettings: r
4691
4691
  } = D(), {
4692
4692
  t: a
4693
- } = z();
4693
+ } = O();
4694
4694
  return /* @__PURE__ */ n(Ee, {
4695
4695
  title: a("ai.buttons.correctResponse"),
4696
4696
  children: /* @__PURE__ */ n(Re, {
@@ -4771,8 +4771,8 @@ function Tt({
4771
4771
  }) {
4772
4772
  const [t, r] = E(!0), [a, i] = E(!1), {
4773
4773
  t: o
4774
- } = z(), s = he(null);
4775
- return Ue(() => {
4774
+ } = O(), s = he(null);
4775
+ return Ye(() => {
4776
4776
  s.current && s.current.scrollHeight > ps && i(!0);
4777
4777
  }, [e]), /* @__PURE__ */ v("div", {
4778
4778
  children: [/* @__PURE__ */ n("div", {
@@ -4798,7 +4798,7 @@ function us({
4798
4798
  isError: a
4799
4799
  } = Ke(e), {
4800
4800
  t: i
4801
- } = z();
4801
+ } = O();
4802
4802
  return r ? /* @__PURE__ */ n(It, {}) : a ? /* @__PURE__ */ n(pe, {
4803
4803
  align: "left",
4804
4804
  children: i("ai.errors.unexpected")
@@ -4843,13 +4843,13 @@ function hs({
4843
4843
  }
4844
4844
  }, k = r === "analyze", _ = `${c}${c && g ? `
4845
4845
  ` : ""}${g}`;
4846
- return /* @__PURE__ */ v(Y, {
4846
+ return /* @__PURE__ */ v(H, {
4847
4847
  children: [/* @__PURE__ */ n(ft, {
4848
4848
  sourceId: l,
4849
4849
  data: e,
4850
4850
  type: "chats/nlq",
4851
4851
  buttonVisibility: t ? "always" : "onHover",
4852
- renderContent: (y) => /* @__PURE__ */ v(Y, {
4852
+ renderContent: (y) => /* @__PURE__ */ v(H, {
4853
4853
  children: [/* @__PURE__ */ v(er, {
4854
4854
  children: [/* @__PURE__ */ n(ra, {
4855
4855
  align: "left",
@@ -4865,7 +4865,7 @@ function hs({
4865
4865
  data: m,
4866
4866
  type: "nlg/queryResult",
4867
4867
  buttonVisibility: p ? "onHover" : "never",
4868
- renderContent: (y) => /* @__PURE__ */ v(Y, {
4868
+ renderContent: (y) => /* @__PURE__ */ v(H, {
4869
4869
  children: [/* @__PURE__ */ v(er, {
4870
4870
  children: [/* @__PURE__ */ n(Wl, {
4871
4871
  onClick: h
@@ -4906,8 +4906,8 @@ function xs({
4906
4906
  }) {
4907
4907
  const {
4908
4908
  t
4909
- } = z();
4910
- return /* @__PURE__ */ n(Y, {
4909
+ } = O();
4910
+ return /* @__PURE__ */ n(H, {
4911
4911
  children: e.map((r, a) => /* @__PURE__ */ n(ii, {
4912
4912
  fallbackRender: (i) => bs(T(M({}, i), {
4913
4913
  displayMessage: t("ai.errors.unexpected")
@@ -5116,7 +5116,7 @@ function Is({
5116
5116
  }) {
5117
5117
  const {
5118
5118
  t: r
5119
- } = z(), [a, i] = E(!0), o = $(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
5119
+ } = O(), [a, i] = E(!0), o = $(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
5120
5120
  themeSettings: s
5121
5121
  } = D();
5122
5122
  return /* @__PURE__ */ v(Ms, {
@@ -5182,7 +5182,7 @@ function Ts({
5182
5182
  const a = e.length > 0, {
5183
5183
  suggestionsWelcomeText: i
5184
5184
  } = se();
5185
- return t ? /* @__PURE__ */ n(Ls, {}) : a ? /* @__PURE__ */ v(Y, {
5185
+ return t ? /* @__PURE__ */ n(Ls, {}) : a ? /* @__PURE__ */ v(H, {
5186
5186
  children: [i && /* @__PURE__ */ n(pe, {
5187
5187
  align: "left",
5188
5188
  children: i
@@ -5229,14 +5229,14 @@ const Ns = C.div`
5229
5229
  display: flex;
5230
5230
  flex-direction: column;
5231
5231
  row-gap: 6px;
5232
- `, zs = C.div`
5232
+ `, Os = C.div`
5233
5233
  display: flex;
5234
5234
  flex-direction: column;
5235
5235
  row-gap: ${({
5236
5236
  theme: e
5237
5237
  }) => e.aiChat.suggestions.gap};
5238
5238
  `;
5239
- function Os({
5239
+ function zs({
5240
5240
  contextTitle: e,
5241
5241
  onGoBack: t,
5242
5242
  contextDetails: r
@@ -5244,7 +5244,7 @@ function Os({
5244
5244
  var a, i, o, s;
5245
5245
  const {
5246
5246
  t: u
5247
- } = z(), {
5247
+ } = O(), {
5248
5248
  enableFollowupQuestions: c,
5249
5249
  enableHeader: g,
5250
5250
  numOfRecentPrompts: b,
@@ -5254,7 +5254,7 @@ function Os({
5254
5254
  themeSettings: p
5255
5255
  } = D(), {
5256
5256
  quotaState: d
5257
- } = Ba(), {
5257
+ } = Ua(), {
5258
5258
  data: h,
5259
5259
  isLoading: m,
5260
5260
  isError: k
@@ -5262,7 +5262,7 @@ function Os({
5262
5262
  contextTitle: e,
5263
5263
  count: x,
5264
5264
  customPrompt: l
5265
- }), _ = $(() => h == null ? void 0 : h.map((O) => O.nlqPrompt), [h]), {
5265
+ }), _ = $(() => h == null ? void 0 : h.map((z) => z.nlqPrompt), [h]), {
5266
5266
  history: y,
5267
5267
  lastNlqResponse: I,
5268
5268
  isAwaitingResponse: A,
@@ -5271,26 +5271,26 @@ function Os({
5271
5271
  chatId: R,
5272
5272
  lastError: X
5273
5273
  } = Fo(e, r), K = A || L || ((a = d == null ? void 0 : d.isExceeded) != null ? a : !1), {
5274
- mutate: B,
5274
+ mutate: U,
5275
5275
  isLoading: F
5276
- } = Or(R), [U, G] = E(!1), [ee, te] = E(!1), V = () => G(!0), Z = () => G(!1), Q = () => {
5277
- B(), Z();
5276
+ } = zr(R), [Y, G] = E(!1), [ee, te] = E(!1), V = () => G(!0), Z = () => G(!1), Q = () => {
5277
+ U(), Z();
5278
5278
  }, W = he(null), me = he(null), _e = () => {
5279
5279
  if (!(W != null && W.current))
5280
5280
  return;
5281
5281
  const {
5282
- scrollTop: O,
5282
+ scrollTop: z,
5283
5283
  clientHeight: re,
5284
5284
  scrollHeight: $e
5285
5285
  } = W.current;
5286
- if (O === void 0 || re === void 0 || $e === void 0)
5286
+ if (z === void 0 || re === void 0 || $e === void 0)
5287
5287
  return;
5288
- const We = $e - O - re > re / 2;
5288
+ const We = $e - z - re > re / 2;
5289
5289
  ee !== We && te(We);
5290
5290
  };
5291
- Ue(() => {
5291
+ Ye(() => {
5292
5292
  W.current && (W.current.scrollTop = W.current.scrollHeight);
5293
- }, [y, U, A]);
5293
+ }, [y, Y, A]);
5294
5294
  const ue = he(null), Ze = g ? /* @__PURE__ */ n(Zr, {
5295
5295
  ref: ue,
5296
5296
  title: e,
@@ -5299,13 +5299,13 @@ function Os({
5299
5299
  color: p.aiChat.header.textColor
5300
5300
  }),
5301
5301
  style: p.aiChat.header
5302
- }) : null, rt = $(() => [...new Set(y.filter((O) => O.role === "user").filter((O) => !(_ != null && _.includes(O.content))).map((O) => O.content).reverse())].slice(0, b), [y, b, _]);
5303
- return (X == null ? void 0 : X.message) === u("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Y, {
5302
+ }) : null, rt = $(() => [...new Set(y.filter((z) => z.role === "user").filter((z) => !(_ != null && _.includes(z.content))).map((z) => z.content).reverse())].slice(0, b), [y, b, _]);
5303
+ return (X == null ? void 0 : X.message) === u("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(H, {
5304
5304
  children: [g && Ze, /* @__PURE__ */ n(Rr, {
5305
5305
  text: X.message
5306
5306
  })]
5307
- }) : /* @__PURE__ */ v(Y, {
5308
- children: [Ze, /* @__PURE__ */ n(Ua, {}), /* @__PURE__ */ v(Ns, {
5307
+ }) : /* @__PURE__ */ v(H, {
5308
+ children: [Ze, /* @__PURE__ */ n(Ya, {}), /* @__PURE__ */ v(Ns, {
5309
5309
  ref: W,
5310
5310
  theme: p,
5311
5311
  onScroll: _e,
@@ -5313,13 +5313,13 @@ function Os({
5313
5313
  isVisible: ee,
5314
5314
  anchorElement: me.current,
5315
5315
  onClick: () => {
5316
- var O, re;
5316
+ var z, re;
5317
5317
  (re = W.current) == null || re.scroll({
5318
- top: (O = W.current) == null ? void 0 : O.scrollHeight,
5318
+ top: (z = W.current) == null ? void 0 : z.scrollHeight,
5319
5319
  behavior: "smooth"
5320
5320
  });
5321
5321
  }
5322
- }), /* @__PURE__ */ n(zl, {}), /* @__PURE__ */ n(Ts, {
5322
+ }), /* @__PURE__ */ n(Ol, {}), /* @__PURE__ */ n(Ts, {
5323
5323
  questions: _ || [],
5324
5324
  isLoading: m,
5325
5325
  onSelection: S
@@ -5328,19 +5328,19 @@ function Os({
5328
5328
  children: X.message
5329
5329
  }), L ? /* @__PURE__ */ n(et, {}) : /* @__PURE__ */ n(xs, {
5330
5330
  messages: y
5331
- }), c && I && ((o = (i = I.followupQuestions) == null ? void 0 : i.length) != null ? o : 0) > 0 && /* @__PURE__ */ n(zs, {
5331
+ }), c && I && ((o = (i = I.followupQuestions) == null ? void 0 : i.length) != null ? o : 0) > 0 && /* @__PURE__ */ n(Os, {
5332
5332
  theme: p,
5333
- children: (s = I.followupQuestions) == null ? void 0 : s.slice(0, 2).map((O, re) => /* @__PURE__ */ n(Ve, {
5333
+ children: (s = I.followupQuestions) == null ? void 0 : s.slice(0, 2).map((z, re) => /* @__PURE__ */ n(Ve, {
5334
5334
  align: "left",
5335
5335
  onClick: () => {
5336
- S(O);
5336
+ S(z);
5337
5337
  },
5338
5338
  children: /* @__PURE__ */ n("div", {
5339
5339
  className: "csdk-py-[7px] csdk-px-4",
5340
- children: O
5340
+ children: z
5341
5341
  })
5342
5342
  }, re))
5343
- }), (A || F) && /* @__PURE__ */ n(It, {}), U && /* @__PURE__ */ n(Rl, {
5343
+ }), (A || F) && /* @__PURE__ */ n(It, {}), Y && /* @__PURE__ */ n(Rl, {
5344
5344
  onCancel: Z,
5345
5345
  onConfirm: Q
5346
5346
  })]
@@ -5452,14 +5452,14 @@ const qs = C.div`
5452
5452
  theme: e
5453
5453
  }) => e.aiChat.primaryTextColor};
5454
5454
  `;
5455
- function Hs(e) {
5455
+ function Bs(e) {
5456
5456
  const {
5457
5457
  dataTopics: t
5458
5458
  } = e, {
5459
5459
  themeSettings: r
5460
5460
  } = D(), {
5461
5461
  t: a
5462
- } = z();
5462
+ } = O();
5463
5463
  return /* @__PURE__ */ v(qs, {
5464
5464
  children: [/* @__PURE__ */ n(Ps, {
5465
5465
  theme: r,
@@ -5472,11 +5472,11 @@ function Hs(e) {
5472
5472
  })))]
5473
5473
  });
5474
5474
  }
5475
- const Ys = "#000000", Bs = "#FFFFFF";
5476
- function Us({
5475
+ const Hs = "#000000", Us = "#FFFFFF";
5476
+ function Ys({
5477
5477
  isDarkBackground: e = !1
5478
5478
  }) {
5479
- const t = e ? Bs : Ys;
5479
+ const t = e ? Us : Hs;
5480
5480
  return /* @__PURE__ */ v("svg", {
5481
5481
  width: "32",
5482
5482
  height: "32",
@@ -5558,22 +5558,22 @@ function Vs({
5558
5558
  themeSettings: a
5559
5559
  } = D(), {
5560
5560
  t: i
5561
- } = z(), o = $(() => e == null ? void 0 : e.map((u) => ({
5561
+ } = O(), o = $(() => e == null ? void 0 : e.map((u) => ({
5562
5562
  title: u,
5563
5563
  onClick: () => t(u)
5564
5564
  })), [e, t]), s = Qa(Fa(a.aiChat.header.backgroundColor)) > 0.5;
5565
- return /* @__PURE__ */ v(Y, {
5565
+ return /* @__PURE__ */ v(H, {
5566
5566
  children: [r ? /* @__PURE__ */ n(Zr, {
5567
5567
  title: i("ai.analyticsChatbot"),
5568
5568
  leftNav: /* @__PURE__ */ n(Qs, {
5569
- children: /* @__PURE__ */ n(Us, {
5569
+ children: /* @__PURE__ */ n(Ys, {
5570
5570
  isDarkBackground: s
5571
5571
  })
5572
5572
  }),
5573
5573
  style: a.aiChat.header
5574
5574
  }) : null, /* @__PURE__ */ v(Fs, {
5575
5575
  theme: a,
5576
- children: [!o && /* @__PURE__ */ n(et, {}), o && /* @__PURE__ */ n(Hs, {
5576
+ children: [!o && /* @__PURE__ */ n(et, {}), o && /* @__PURE__ */ n(Bs, {
5577
5577
  dataTopics: o
5578
5578
  })]
5579
5579
  })]
@@ -5588,7 +5588,7 @@ function Js() {
5588
5588
  contextDetails: u
5589
5589
  } = se(), {
5590
5590
  t: c
5591
- } = z(), g = c("ai.errors.noAvailableDataTopics"), b = N((d) => {
5591
+ } = O(), g = c("ai.errors.noAvailableDataTopics"), b = N((d) => {
5592
5592
  d.length ? d.length === 1 && (a(void 0), t(d[0])) : a(g);
5593
5593
  }, [g]), x = $(() => {
5594
5594
  if (i && o === "idle") {
@@ -5596,7 +5596,7 @@ function Js() {
5596
5596
  return b(d), d;
5597
5597
  }
5598
5598
  return [];
5599
- }, [i, o, s, b]), l = ze(), p = N(() => {
5599
+ }, [i, o, s, b]), l = Oe(), p = N(() => {
5600
5600
  a(void 0), l.invalidateQueries(["getDataTopics"]);
5601
5601
  }, [l]);
5602
5602
  return r ? /* @__PURE__ */ n(Rr, {
@@ -5605,7 +5605,7 @@ function Js() {
5605
5605
  text: c("ai.buttons.refresh"),
5606
5606
  onClick: p
5607
5607
  }
5608
- }) : x.length === 1 && !e ? /* @__PURE__ */ n(et, {}) : e ? /* @__PURE__ */ n(Os, {
5608
+ }) : x.length === 1 && !e ? /* @__PURE__ */ n(et, {}) : e ? /* @__PURE__ */ n(zs, {
5609
5609
  contextTitle: e,
5610
5610
  contextDetails: u,
5611
5611
  onGoBack: x.length === 1 ? void 0 : () => t(void 0)
@@ -5644,9 +5644,9 @@ const fd = pr({
5644
5644
  isError: a
5645
5645
  } = Ke(e), {
5646
5646
  t: i
5647
- } = z();
5647
+ } = O();
5648
5648
  if (a)
5649
- return /* @__PURE__ */ n(Y, {
5649
+ return /* @__PURE__ */ n(H, {
5650
5650
  children: i("ai.errors.unexpected")
5651
5651
  });
5652
5652
  const o = t ?? i("ai.errors.insightsNotAvailable");
@@ -5741,7 +5741,7 @@ const Ks = C.div`
5741
5741
  initialFilters: i
5742
5742
  }), [c, g] = E(null);
5743
5743
  we(() => {
5744
- const h = Oe(s, {
5744
+ const h = ze(s, {
5745
5745
  useCustomizedStyleOptions: !0
5746
5746
  });
5747
5747
  if (!h)
@@ -5771,7 +5771,7 @@ const Ks = C.div`
5771
5771
  if (l || !c)
5772
5772
  return /* @__PURE__ */ n(It, {});
5773
5773
  if (!Ne(c))
5774
- return /* @__PURE__ */ n(Y, {});
5774
+ return /* @__PURE__ */ n(H, {});
5775
5775
  const d = a || T(M({}, c), {
5776
5776
  styleOptions: r,
5777
5777
  onDataReady: t