@sisense/sdk-ui-preact 2.12.0 → 2.13.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.
package/dist/ai.js CHANGED
@@ -1,8 +1,8 @@
1
- import { w as Xe, v as Vt, c6 as ra, fm as aa, fn as ia, fo as oa, fp as na, fq as la, fr as sa, s as De, bH as Ge, bG as da, cM as ca, bN as pa, bp as G, fs as Ie, aD as ut, co as ot, b0 as ua, av as Ze, ft as ga, fu as ha, cx as Jt, X as ma, b as Xt, af as Kt, I as Qe, L as ba, d as Ue, fv as fa, fw as xa, R as be, fx as er, S as ka, g as b, i as tr, q as D, l as n, j as E, ae as Y, fy as ya, aA as wa, an as Ca, T as P, bx as xe, z as j, aw as gt, p as R, y as ke, aq as rr, a4 as _a, bA as va, A as ce, fz as Sa, at as we, a1 as Ke, u as Ce, fA as Ma, bJ as Ia, bL as Da, cN as Me, dB as ar, ar as ht, k as Aa, fB as Le, a8 as C, d0 as q, C as v, c3 as La, fC as It, a as Be, fD as Ta, fE as Na, fF as ir, fG as ja, fH as Oa, cK as Ea, cL as za, fI as Ra, fJ as Za, fK as Wa, dT as qa, c5 as Pa, fL as Ga, c$ as or, fM as Ba, dn as Ha, b7 as Ya, er as $a, _ as Qa, b2 as nr, b3 as lr, fN as Ua, fO as Fa, cl as Va, eJ as Ja, cY as Xa, fP as Ka } from "./use-common-filters-DIF4c8WP-f178a602.js";
1
+ import { w as Xe, v as Vt, c6 as aa, fy as ia, fz as oa, fA as na, fB as la, fC as sa, fD as da, j as De, bH as Ge, bG as ca, cK as pa, bN as ua, bp as G, fE as Ie, aD as ut, cm as ot, b0 as ga, av as Ze, fF as ha, fG as ma, cr as Jt, a0 as fa, S as Xt, af as Kt, K as Qe, H as ba, e as Ue, fH as xa, fI as ka, U as fe, fJ as er, V as ya, i as f, m as tr, t as D, k as n, J as E, ae as Y, fK as wa, aA as Ca, an as _a, T as P, bx as xe, z as j, aw as gt, r as R, y as ke, aq as rr, a4 as va, bA as Sa, A as pe, fL as Ma, at as we, a2 as Ke, u as Ce, fM as Ia, bJ as Da, bL as Aa, cL as Me, dz as ar, ar as ht, n as La, fN as Le, a8 as C, c_ as q, l as v, c3 as Ta, fO as It, a as Be, fP as Na, fQ as ja, fR as ir, fS as Oa, fT as Ea, cI as za, cJ as Ra, fU as Za, fV as Wa, fW as qa, dR as Pa, c5 as Ga, fX as Ba, cZ as or, fY as Ha, dl as Ya, b7 as $a, en as Qa, _ as Ua, b2 as nr, b3 as lr, fZ as Fa, f_ as Va, cj as Ja, eE as Xa, cW as Ka, f$ as ei } from "./use-common-filters-qFWk1Ia5-a72aafa2.js";
2
2
  let sr = class extends Vt {
3
3
  constructor(t, r) {
4
4
  var a;
5
- super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.__serializable = "JaqlElement", this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = ra(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
5
+ super((a = t.jaql.title) !== null && a !== void 0 ? a : "", r), this.__serializable = "JaqlElement", this.expression = t.jaql.dim || t.jaql.formula, this.metadataItem = t, t.jaql.agg ? this.aggregation = t.jaql.agg : delete this.aggregation, t.jaql.formula ? this.formula = t.jaql.formula : delete this.formula, t.jaql.sort ? this.sortType = aa(t.jaql.sort) : delete this.sortType, this.skipValidation = !0;
6
6
  }
7
7
  get id() {
8
8
  return this.expression;
@@ -18,23 +18,23 @@ let sr = class extends Vt {
18
18
  return t.metadataItem = this.metadataItem, t.type = this.type, t;
19
19
  }
20
20
  };
21
- const ei = {
21
+ const ti = {
22
22
  text: Xe.TextAttribute,
23
23
  numeric: Xe.NumericAttribute,
24
24
  datetime: Xe.DateLevel
25
25
  };
26
- function ti(e) {
26
+ function ri(e) {
27
27
  var t;
28
- return new sr(e, (t = ei[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
28
+ return new sr(e, (t = ti[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
29
29
  }
30
30
  function dr(e) {
31
31
  const {
32
32
  jaql: t
33
33
  } = e;
34
34
  if (t.formula)
35
- return aa(t);
36
- const r = ia(t);
37
- return "agg" in t && t.dim && t.datatype ? oa({
35
+ return ia(t);
36
+ const r = oa(t);
37
+ return "agg" in t && t.dim && t.datatype ? na({
38
38
  expression: t.dim,
39
39
  dataType: t.datatype,
40
40
  agg: t.agg || "",
@@ -43,7 +43,7 @@ function dr(e) {
43
43
  sort: t.sort,
44
44
  title: t.title,
45
45
  dataSource: t.datasource
46
- }) : t.dim && t.datatype ? na({
46
+ }) : t.dim && t.datatype ? la({
47
47
  expression: t.dim,
48
48
  dataType: t.datatype,
49
49
  granularity: r,
@@ -51,10 +51,10 @@ function dr(e) {
51
51
  title: t.title,
52
52
  panel: e.panel,
53
53
  dataSource: t.datasource
54
- }) : ti(e);
54
+ }) : ri(e);
55
55
  }
56
- const ri = (e) => "dashboardOid" in e && "widgetOid" in e;
57
- var ai = Object.defineProperty, ii = Object.defineProperties, oi = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, cr = Object.prototype.hasOwnProperty, pr = Object.prototype.propertyIsEnumerable, Dt = (e, t, r) => t in e ? ai(e, t, {
56
+ const ai = (e) => "dashboardOid" in e && "widgetOid" in e;
57
+ var ii = Object.defineProperty, oi = Object.defineProperties, ni = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, cr = Object.prototype.hasOwnProperty, pr = Object.prototype.propertyIsEnumerable, Dt = (e, t, r) => t in e ? ii(e, t, {
58
58
  enumerable: !0,
59
59
  configurable: !0,
60
60
  writable: !0,
@@ -66,7 +66,7 @@ var ai = Object.defineProperty, ii = Object.defineProperties, oi = Object.getOwn
66
66
  for (var r of He(t))
67
67
  pr.call(t, r) && Dt(e, r, t[r]);
68
68
  return e;
69
- }, ee = (e, t) => ii(e, oi(t)), ni = (e, t) => {
69
+ }, ee = (e, t) => oi(e, ni(t)), li = (e, t) => {
70
70
  var r = {};
71
71
  for (var a in e)
72
72
  cr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
@@ -75,19 +75,19 @@ var ai = Object.defineProperty, ii = Object.defineProperties, oi = Object.getOwn
75
75
  t.indexOf(a) < 0 && pr.call(e, a) && (r[a] = e[a]);
76
76
  return r;
77
77
  };
78
- function li(e) {
78
+ function si(e) {
79
79
  return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
80
80
  }
81
- function si(e) {
81
+ function di(e) {
82
82
  return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
83
83
  }
84
84
  function ur(e) {
85
- if (![...sa, "pivot", "pivot2"].includes(e))
85
+ if (![...da, "pivot", "pivot2"].includes(e))
86
86
  throw new De("errors.chartTypeNotSupported", {
87
87
  chartType: e
88
88
  });
89
89
  }
90
- function di(e) {
90
+ function ci(e) {
91
91
  return "widgetType" in e && e.widgetType === "pivot";
92
92
  }
93
93
  function me(e) {
@@ -96,12 +96,12 @@ function me(e) {
96
96
  }
97
97
  function At(e) {
98
98
  const t = "measures" in e && K(e.measures) || "values" in e && K(e.values);
99
- return di(e) ? "values" in e.dataOptions && K(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && K(e.dataOptions.value) || "secondary" in e.dataOptions && K(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !K(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => me(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && me(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && me(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && me(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && me(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && me(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && K(e.dataOptions.geo) && "color" in e.dataOptions && K(e.dataOptions.color) : "value" in e.dataOptions && K(e.dataOptions.value) : t;
99
+ return ci(e) ? "values" in e.dataOptions && K(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && K(e.dataOptions.value) || "secondary" in e.dataOptions && K(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !K(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => me(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && me(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && me(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && me(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && me(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && me(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && K(e.dataOptions.geo) && "color" in e.dataOptions && K(e.dataOptions.color) : "value" in e.dataOptions && K(e.dataOptions.value) : t;
100
100
  }
101
101
  function K(e) {
102
102
  return Array.isArray(e) && e.length > 0;
103
103
  }
104
- function ci(e) {
104
+ function pi(e) {
105
105
  const t = e.split(`
106
106
  `);
107
107
  for (let r = 0; r < t.length - 1; r++)
@@ -115,7 +115,7 @@ function ci(e) {
115
115
  return t.join(`
116
116
  `);
117
117
  }
118
- function pi(e) {
118
+ function ui(e) {
119
119
  const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
120
120
  if ("composeCode" in e)
121
121
  return e;
@@ -126,7 +126,7 @@ function pi(e) {
126
126
  }
127
127
  return r;
128
128
  }
129
- const ui = {
129
+ const gi = {
130
130
  react: {
131
131
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
132
132
  {{extraImportsString}}
@@ -307,13 +307,9 @@ export default function CodeExample() {
307
307
  title: '{{titleString}}',
308
308
  widgets,
309
309
  filters,
310
- config: {
311
- toolbar: { isVisible: true },
312
- filtersPanel: { isVisible: true },
313
- },
310
+ config: {{configString}},
314
311
  widgetsOptions: {{widgetsOptionsString}},
315
312
  layoutOptions: {{layoutOptionsString}},
316
- tabbersOptions: {{tabbersOptionsString}},
317
313
  styleOptions: {{styleOptionsString}},
318
314
  };
319
315
  }, []);
@@ -585,10 +581,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
585
581
  </template>`,
586
582
  dashboardTmpl: "/** COMING SOON */"
587
583
  }
588
- }, gr = (e, t) => ui[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => gr(`${a}Tmpl`, t)), gi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), nt = (e, t, r = "react") => {
584
+ }, gr = (e, t) => gi[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => gr(`${a}Tmpl`, t)), hi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), nt = (e, t, r = "react") => {
589
585
  const a = gr(e, r);
590
- return ci(gi(a, t));
591
- }, hi = () => Object.values(ha).map((e) => Jt.aggregationToJAQL(e)).join("|"), hr = (e) => {
586
+ return pi(hi(a, t));
587
+ }, mi = () => Object.values(ma).map((e) => Jt.aggregationToJAQL(e)).join("|"), hr = (e) => {
592
588
  const {
593
589
  formula: t,
594
590
  context: r,
@@ -602,15 +598,15 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
602
598
  const l = i[0];
603
599
  if (typeof l != "string")
604
600
  return e;
605
- const s = r[`${l}`], u = hi(), c = new RegExp(`^\\s*(${u})\\(\\[\\w+\\]\\)$`), g = t.match(c);
601
+ const s = r[`${l}`], u = mi(), c = new RegExp(`^\\s*(${u})\\(\\[\\w+\\]\\)$`), g = t.match(c);
606
602
  if (g && t.includes(l)) {
607
- const f = g[1];
603
+ const b = g[1];
608
604
  return O({
609
605
  dim: s.dim,
610
606
  table: s.table,
611
607
  column: s.column,
612
608
  datatype: s.datatype,
613
- agg: f,
609
+ agg: b,
614
610
  title: e.title
615
611
  }, a ? {
616
612
  filter: O({}, a)
@@ -626,7 +622,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
626
622
  }), t.context = r;
627
623
  }
628
624
  return t;
629
- }, mi = (e) => {
625
+ }, fi = (e) => {
630
626
  var t;
631
627
  const r = e;
632
628
  if (r.panel !== "scope")
@@ -639,7 +635,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
639
635
  });
640
636
  }, bi = (e) => {
641
637
  let t = e;
642
- t = mi(t);
638
+ t = fi(t);
643
639
  const {
644
640
  jaql: r,
645
641
  measure: a,
@@ -653,7 +649,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
653
649
  measure: We(a)
654
650
  } : {});
655
651
  }, qe = 6;
656
- function fi(e) {
652
+ function xi(e) {
657
653
  switch (e) {
658
654
  case "line":
659
655
  case "area":
@@ -703,7 +699,7 @@ function fi(e) {
703
699
  return {};
704
700
  }
705
701
  }
706
- const xi = {
702
+ const ki = {
707
703
  subtype: "indicator/numeric",
708
704
  numericSubtype: "numericSimple",
709
705
  skin: "vertical",
@@ -722,7 +718,7 @@ const xi = {
722
718
  shouldBeShown: !1
723
719
  }
724
720
  }
725
- }, ki = {
721
+ }, yi = {
726
722
  legend: {
727
723
  enabled: !0,
728
724
  position: "bottom"
@@ -788,7 +784,7 @@ const xi = {
788
784
  navigator: {
789
785
  enabled: !0
790
786
  }
791
- }, yi = {
787
+ }, wi = {
792
788
  subtype: "line/basic",
793
789
  lineWidth: {
794
790
  width: "bold"
@@ -798,7 +794,7 @@ const xi = {
798
794
  size: "small",
799
795
  fill: "filled"
800
796
  }
801
- }, wi = {
797
+ }, Ci = {
802
798
  subtype: "area/basic",
803
799
  lineWidth: {
804
800
  width: "bold"
@@ -808,11 +804,11 @@ const xi = {
808
804
  size: "small",
809
805
  fill: "filled"
810
806
  }
811
- }, Ci = {
812
- subtype: "bar/classic"
813
807
  }, _i = {
814
- subtype: "column/classic"
808
+ subtype: "bar/classic"
815
809
  }, vi = {
810
+ subtype: "column/classic"
811
+ }, Si = {
816
812
  subtype: "polar/column",
817
813
  yAxis: {
818
814
  enabled: !0,
@@ -835,9 +831,9 @@ const xi = {
835
831
  }
836
832
  };
837
833
  function _e(e) {
838
- return ma({}, ki, e);
834
+ return fa({}, yi, e);
839
835
  }
840
- const Si = {
836
+ const Mi = {
841
837
  subtype: "pie/classic",
842
838
  legend: {
843
839
  enabled: !1,
@@ -860,7 +856,7 @@ const Si = {
860
856
  minimalIndependentSlicePercentage: 3,
861
857
  selectedConvolutionType: "byPercentage"
862
858
  }
863
- }, Mi = {
859
+ }, Ii = {
864
860
  legend: {
865
861
  enabled: !1,
866
862
  position: "left"
@@ -875,7 +871,7 @@ const Si = {
875
871
  funnelSize: "regular",
876
872
  funnelType: "regular",
877
873
  funnelDirection: "regular"
878
- }, Ii = {
874
+ }, Di = {
879
875
  rowsPerPage: 25,
880
876
  isAutoHeight: !0,
881
877
  rowHeight: null,
@@ -884,7 +880,7 @@ const Si = {
884
880
  headersColor: !1,
885
881
  membersColor: !1,
886
882
  totalsColor: !1
887
- }, Di = {
883
+ }, Ai = {
888
884
  labels: {
889
885
  category: [{
890
886
  enabled: !0
@@ -897,7 +893,7 @@ const Si = {
897
893
  tooltip: {
898
894
  mode: "value"
899
895
  }
900
- }, Ai = {
896
+ }, Li = {
901
897
  viewType: "month",
902
898
  startOfWeek: "sunday",
903
899
  cellLabels: {
@@ -914,7 +910,7 @@ const Si = {
914
910
  cellColor: "#e6e6e6",
915
911
  hideValues: !0
916
912
  }
917
- }, Li = {
913
+ }, Ti = {
918
914
  legend: {
919
915
  enabled: !0,
920
916
  position: "bottom"
@@ -922,7 +918,7 @@ const Si = {
922
918
  tooltip: {
923
919
  mode: "value"
924
920
  }
925
- }, Ti = {
921
+ }, Ni = {
926
922
  legend: {
927
923
  enabled: !0,
928
924
  position: "bottom"
@@ -974,7 +970,7 @@ const Si = {
974
970
  scatterBubbleMinSize: 10,
975
971
  scatterBubbleMaxSize: 10
976
972
  }
977
- }, Ni = {
973
+ }, ji = {
978
974
  header: {
979
975
  color: {
980
976
  enabled: !1
@@ -990,7 +986,7 @@ const Si = {
990
986
  enabled: !1
991
987
  }
992
988
  }
993
- }, ji = {
989
+ }, Oi = {
994
990
  subtype: "scattermap",
995
991
  markers: {
996
992
  fill: "filled",
@@ -1000,9 +996,9 @@ const Si = {
1000
996
  maxSize: 24
1001
997
  }
1002
998
  }
1003
- }, Oi = {
1004
- mapType: "world"
1005
999
  }, Ei = {
1000
+ mapType: "world"
1001
+ }, zi = {
1006
1002
  subtype: "boxplot/full",
1007
1003
  legend: {
1008
1004
  enabled: !0,
@@ -1054,42 +1050,42 @@ const Si = {
1054
1050
  enabled: !0
1055
1051
  }
1056
1052
  };
1057
- function zi(e) {
1053
+ function Ri(e) {
1058
1054
  switch (e) {
1059
1055
  case "indicator":
1060
- return G(xi);
1056
+ return G(ki);
1061
1057
  case "line":
1062
- return _e(yi);
1063
- case "area":
1064
1058
  return _e(wi);
1065
- case "bar":
1059
+ case "area":
1066
1060
  return _e(Ci);
1067
- case "column":
1061
+ case "bar":
1068
1062
  return _e(_i);
1069
- case "polar":
1063
+ case "column":
1070
1064
  return _e(vi);
1065
+ case "polar":
1066
+ return _e(Si);
1071
1067
  case "pie":
1072
- return G(Si);
1073
- case "funnel":
1074
1068
  return G(Mi);
1069
+ case "funnel":
1070
+ return G(Ii);
1075
1071
  case "treemap":
1076
- return G(Di);
1077
- case "calendar-heatmap":
1078
1072
  return G(Ai);
1079
- case "sunburst":
1073
+ case "calendar-heatmap":
1080
1074
  return G(Li);
1081
- case "scatter":
1075
+ case "sunburst":
1082
1076
  return G(Ti);
1077
+ case "scatter":
1078
+ return G(Ni);
1083
1079
  case "scattermap":
1084
- return G(ji);
1085
- case "areamap":
1086
1080
  return G(Oi);
1087
- case "boxplot":
1081
+ case "areamap":
1088
1082
  return G(Ei);
1083
+ case "boxplot":
1084
+ return G(zi);
1089
1085
  case "table":
1090
- return G(Ni);
1086
+ return G(ji);
1091
1087
  case "pivot":
1092
- return G(Ii);
1088
+ return G(Di);
1093
1089
  case "pivot2":
1094
1090
  return {};
1095
1091
  case "image":
@@ -1099,7 +1095,7 @@ function zi(e) {
1099
1095
  }
1100
1096
  }
1101
1097
  const ze = `
1102
- `, lt = "UNKNOWN", Ri = (e, t) => {
1098
+ `, lt = "UNKNOWN", Zi = (e, t) => {
1103
1099
  let r = "";
1104
1100
  return r += `measureFactory.customFormula(
1105
1101
  `, r += " ".repeat(t), r += ` '${Ie(e.title)}',
@@ -1111,7 +1107,7 @@ const ze = `
1111
1107
  `;
1112
1108
  }), r += " ".repeat(t), r += ` }
1113
1109
  `, r += " ".repeat(t), r += ")", r;
1114
- }, Zi = (e) => {
1110
+ }, Wi = (e) => {
1115
1111
  const {
1116
1112
  level: t,
1117
1113
  table: r,
@@ -1121,16 +1117,16 @@ const ze = `
1121
1117
  } = e;
1122
1118
  let s;
1123
1119
  return r && a && (s = Xt(r, a, t, "DM")), i && r && a && l && (s = `measureFactory.${Jt.aggregationFromJAQL(i)}(${s}, '${Ie(l)}')`), s || lt;
1124
- }, Wi = (e, t) => {
1120
+ }, qi = (e, t) => {
1125
1121
  const r = e.jaql(!1).jaql;
1126
- return "formula" in r ? Ri(r, t) : Zi(r);
1122
+ return "formula" in r ? Zi(r, t) : Wi(r);
1127
1123
  }, ae = (e, t = 0, r = !1) => {
1128
1124
  if (!e)
1129
1125
  return "";
1130
1126
  if (typeof e == "string")
1131
1127
  return `'${Ie(e)}'`;
1132
1128
  if (e instanceof sr)
1133
- return Wi(e, t);
1129
+ return qi(e, t);
1134
1130
  if (e instanceof Vt)
1135
1131
  return e.composeCode || "";
1136
1132
  let a = "";
@@ -1138,7 +1134,7 @@ const ze = `
1138
1134
  if (r && typeof i == "string" && (i = `'${Ie(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
1139
1135
  a += `${i}: [${l.map((s) => ae(s, t + 4, r))}${l.length ? ze + " ".repeat(t + 2) : ""}]`;
1140
1136
  else if (typeof l == "object" && l !== null) {
1141
- const s = Array.isArray(l) ? l : pi(l);
1137
+ const s = Array.isArray(l) ? l : ui(l);
1142
1138
  a += `${i}: ${ae(s, t + 2, r)}`;
1143
1139
  } else
1144
1140
  ["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${Ie(l)}'` : a += `${i}: ${l}`;
@@ -1163,45 +1159,45 @@ function mt(e, t) {
1163
1159
  function Lt(e, t) {
1164
1160
  if (!e || Object.keys(e).length === 0)
1165
1161
  return {};
1166
- const r = zi(t);
1162
+ const r = Ri(t);
1167
1163
  if (ut(e, r))
1168
1164
  return {};
1169
1165
  const a = mt(e, r);
1170
1166
  return a ?? {};
1171
1167
  }
1172
1168
  function Tt(e, t) {
1173
- const r = fi(t);
1169
+ const r = xi(t);
1174
1170
  if (ut(e, r))
1175
1171
  return e;
1176
1172
  const a = mt(e, r);
1177
1173
  return a ?? {};
1178
1174
  }
1179
- function qi(e) {
1175
+ function Pi(e) {
1180
1176
  return ae(e, qe);
1181
1177
  }
1182
1178
  function Nt(e, t = "data-source-placeholder") {
1183
1179
  if (!e)
1184
1180
  return t;
1185
1181
  const r = typeof e == "object" && "title" in e ? e.title : e;
1186
- return li(r);
1182
+ return si(r);
1187
1183
  }
1188
1184
  function jt(e, t = !0) {
1189
1185
  const r = [];
1190
1186
  return t && r.push("measureFactory"), K(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
1191
1187
  }
1192
1188
  const Ot = `
1193
- `, Pi = (e, t) => {
1189
+ `, Gi = (e, t) => {
1194
1190
  if (e.composeCode)
1195
1191
  return `${Ot}${" ".repeat(t)}${e.composeCode}`;
1196
1192
  const r = e.jaql().jaql;
1197
1193
  return `${Ot}${" ".repeat(t)}filterFactory.customFilter(${ae(r, t, !0)})`;
1198
- }, Gi = (e, t = 0) => {
1194
+ }, Bi = (e, t = 0) => {
1199
1195
  if (!e)
1200
1196
  return "";
1201
1197
  let r = "";
1202
- return r += `[${e.map((a) => Pi(a, t + 2))}${e.length ? `
1198
+ return r += `[${e.map((a) => Gi(a, t + 2))}${e.length ? `
1203
1199
  ` + " ".repeat(t + 2) : ""}]`, r;
1204
- }, Et = (e) => e ? Array.isArray(e) ? Gi(e, 6) : "/** Filter relations not supported yet */" : "[]", Bi = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Hi = "chartWidgetTmpl", Yi = "pivotTableWidgetTmpl", $i = (e) => e, Qi = ({
1200
+ }, Et = (e) => e ? Array.isArray(e) ? Bi(e, 6) : "/** Filter relations not supported yet */" : "[]", Hi = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Yi = "chartWidgetTmpl", $i = "pivotTableWidgetTmpl", Qi = (e) => e, Ui = ({
1205
1201
  dashboardOid: e,
1206
1202
  widgetOid: t,
1207
1203
  uiFramework: r = "react",
@@ -1212,9 +1208,9 @@ const Ot = `
1212
1208
  const l = {
1213
1209
  dashboardOid: e,
1214
1210
  widgetOid: t
1215
- }, s = Bi[Number(i)];
1211
+ }, s = Hi[Number(i)];
1216
1212
  return nt(s, l, r);
1217
- }, Ui = (e, t, r, a) => {
1213
+ }, Fi = (e, t, r, a) => {
1218
1214
  if (Ge(e)) {
1219
1215
  ur(e.chartType);
1220
1216
  const i = At(e), l = {
@@ -1222,8 +1218,8 @@ const Ot = `
1222
1218
  widgetTypeString: "chart",
1223
1219
  titleString: e.title,
1224
1220
  dataSourceString: Nt(e.dataSource),
1225
- chartTypeString: $i(e.chartType),
1226
- dataOptionsString: qi(a ? Tt(e.dataOptions, e.chartType) : e.dataOptions),
1221
+ chartTypeString: Qi(e.chartType),
1222
+ dataOptionsString: Pi(a ? Tt(e.dataOptions, e.chartType) : e.dataOptions),
1227
1223
  filtersString: Et(e.filters),
1228
1224
  componentString: "ChartWidget",
1229
1225
  extraImportsString: jt(e.filters || [], i),
@@ -1232,7 +1228,7 @@ const Ot = `
1232
1228
  };
1233
1229
  return nt(r.chart, l, t);
1234
1230
  }
1235
- if (da(e)) {
1231
+ if (ca(e)) {
1236
1232
  const i = At(e), l = {
1237
1233
  idString: e.id,
1238
1234
  widgetTypeString: "pivot",
@@ -1246,32 +1242,32 @@ const Ot = `
1246
1242
  };
1247
1243
  return nt(r.pivot, l, t);
1248
1244
  }
1249
- if (ca(e))
1245
+ if (pa(e))
1250
1246
  return "/** Custom widget code not supported yet */";
1251
1247
  throw new De("errors.otherWidgetTypesNotSupported");
1252
- }, Fi = ({
1248
+ }, Vi = ({
1253
1249
  widgetProps: e,
1254
1250
  uiFramework: t = "react",
1255
1251
  removeDefaultProps: r = !1
1256
- }) => Ui(e, t, {
1257
- chart: Hi,
1258
- pivot: Yi
1252
+ }) => Fi(e, t, {
1253
+ chart: Yi,
1254
+ pivot: $i
1259
1255
  }, r);
1260
- function Vi(e) {
1256
+ function Ji(e) {
1261
1257
  return !!(e && (e.top !== void 0 || e.bottom !== void 0));
1262
1258
  }
1263
- const Ji = (e) => {
1259
+ const Xi = (e) => {
1264
1260
  const t = e.find((r) => r.panel === "rows");
1265
1261
  return t ? e.map((r) => {
1266
1262
  const a = r.jaql.filter;
1267
- if (!(r.panel === "scope" && Vi(a) && a.by === void 0))
1263
+ if (!(r.panel === "scope" && Ji(a) && a.by === void 0))
1268
1264
  return r;
1269
1265
  const i = r.jaql, {
1270
1266
  type: l,
1271
1267
  context: s,
1272
1268
  formula: u,
1273
1269
  filter: c
1274
- } = i, g = ni(i, ["type", "context", "formula", "filter"]);
1270
+ } = i, g = li(i, ["type", "context", "formula", "filter"]);
1275
1271
  return ee(O({}, r), {
1276
1272
  jaql: O({
1277
1273
  // Copy dimension properties from rows dimension
@@ -1290,11 +1286,11 @@ const Ji = (e) => {
1290
1286
  }, g)
1291
1287
  });
1292
1288
  }) : e;
1293
- }, Xi = (e) => ({
1289
+ }, Ki = (e) => ({
1294
1290
  dataOptions: {
1295
1291
  columns: e.map(dr)
1296
1292
  }
1297
- }), Ki = Object.freeze({
1293
+ }), eo = Object.freeze({
1298
1294
  convolution: {
1299
1295
  enabled: !0,
1300
1296
  selectedConvolutionType: "bySlicesCount",
@@ -1320,11 +1316,11 @@ const Ji = (e) => {
1320
1316
  pie: "pie/donut",
1321
1317
  bar: "bar/stacked",
1322
1318
  column: "column/stackedcolumn"
1323
- }), eo = (e, t, r) => {
1319
+ }), to = (e, t, r) => {
1324
1320
  const a = e.reduce((l, s) => (l[s.jaql.title] = s, l), {}), i = Object.entries(r).reduce((l, s) => {
1325
1321
  const [u, c] = s;
1326
1322
  return l[`${u}`] = Array.isArray(c) ? c.map((g) => {
1327
- var f, x;
1323
+ var b, x;
1328
1324
  const o = ot(g);
1329
1325
  delete o.enabled;
1330
1326
  const p = a[o.column.name];
@@ -1340,8 +1336,8 @@ const Ji = (e) => {
1340
1336
  return ee(O({}, o), {
1341
1337
  column: d
1342
1338
  });
1343
- if (ua(d.type)) {
1344
- const m = (x = (f = p.format) == null ? void 0 : f.mask) == null ? void 0 : x[p.jaql.level];
1339
+ if (ga(d.type)) {
1340
+ const m = (x = (b = p.format) == null ? void 0 : b.mask) == null ? void 0 : x[p.jaql.level];
1345
1341
  if (m)
1346
1342
  return ee(O({}, o), {
1347
1343
  column: d,
@@ -1374,7 +1370,7 @@ const Ji = (e) => {
1374
1370
  l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
1375
1371
  }), i;
1376
1372
  case "table":
1377
- return Object.keys(i).length === 0 ? Xi(e).dataOptions : i;
1373
+ return Object.keys(i).length === 0 ? Ki(e).dataOptions : i;
1378
1374
  case "boxplot":
1379
1375
  case "areamap":
1380
1376
  case "indicator":
@@ -1384,9 +1380,9 @@ const Ji = (e) => {
1384
1380
  }, Rt = (e, t) => {
1385
1381
  var r, a, i, l;
1386
1382
  return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => ot(s).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((s) => ot(s).column.name).join(", ");
1387
- }, to = (e, t, r, a) => {
1383
+ }, ro = (e, t, r, a) => {
1388
1384
  let i;
1389
- return a && e in zt ? i = Ze(Ze(Ki, {
1385
+ return a && e in zt ? i = Ze(Ze(eo, {
1390
1386
  subtype: zt[`${e}`]
1391
1387
  }), {
1392
1388
  legend: {
@@ -1405,23 +1401,23 @@ const Ji = (e) => {
1405
1401
  text: Rt(t, "x")
1406
1402
  }
1407
1403
  }
1408
- }, r) : i = Ze(ga(), r), i;
1409
- }, ro = (e, t, r = !0) => {
1404
+ }, r) : i = Ze(ha(), r), i;
1405
+ }, ao = (e, t, r = !0) => {
1410
1406
  const {
1411
1407
  chartFamily: a,
1412
1408
  chartType: i,
1413
1409
  axesMapping: l = {},
1414
1410
  styleOptions: s = {}
1415
- } = t, u = eo(e, a, l), c = to(i, l, s, r);
1411
+ } = t, u = to(e, a, l), c = ro(i, l, s, r);
1416
1412
  return {
1417
1413
  dataOptions: u,
1418
1414
  chartStyleOptions: c
1419
1415
  };
1420
- }, ao = (e) => "chartType" in e ? e : {
1416
+ }, io = (e) => "chartType" in e ? e : {
1421
1417
  chartType: "table",
1422
1418
  chartFamily: "table",
1423
1419
  axesMapping: {}
1424
- }, io = (e) => e.map((t) => pa(t.jaql)), oo = (e) => e.reduce((t, r) => {
1420
+ }, oo = (e) => e.map((t) => ua(t.jaql)), no = (e) => e.reduce((t, r) => {
1425
1421
  if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(G(r)), r.panel !== "scope") {
1426
1422
  const a = G(r);
1427
1423
  delete a.jaql.filter, t.metadataColumns.push(a);
@@ -1430,8 +1426,8 @@ const Ji = (e) => {
1430
1426
  }, {
1431
1427
  metadataColumns: [],
1432
1428
  metadataFilters: []
1433
- }), no = (e, t) => {
1434
- if (!si(e))
1429
+ }), lo = (e, t) => {
1430
+ if (!di(e))
1435
1431
  try {
1436
1432
  const {
1437
1433
  useCustomizedStyleOptions: r = !1
@@ -1444,11 +1440,11 @@ const Ji = (e) => {
1444
1440
  datasource: u
1445
1441
  } = a, c = ee(O({}, u), {
1446
1442
  type: u.type || "elasticube"
1447
- }), g = la(c), f = Ji(s).map((I) => bi(I)).map((I) => ee(O({}, I), {
1443
+ }), g = sa(c), b = Xi(s).map((I) => bi(I)).map((I) => ee(O({}, I), {
1448
1444
  jaql: ee(O({}, I.jaql), {
1449
1445
  datasource: g
1450
1446
  })
1451
- })), x = ao(i), o = x.chartType.toLowerCase(), p = {
1447
+ })), x = io(i), o = x.chartType.toLowerCase(), p = {
1452
1448
  cornerRadius: "Small",
1453
1449
  header: {
1454
1450
  // remove info button and render empty toolbar instead
@@ -1457,10 +1453,10 @@ const Ji = (e) => {
1457
1453
  }, {
1458
1454
  metadataColumns: d,
1459
1455
  metadataFilters: m
1460
- } = oo(f), h = io(m), {
1456
+ } = no(b), h = oo(m), {
1461
1457
  dataOptions: w,
1462
1458
  chartStyleOptions: _
1463
- } = ro(d, x, r), y = O(O({}, _), p);
1459
+ } = ao(d, x, r), y = O(O({}, _), p);
1464
1460
  return {
1465
1461
  widgetType: "chart",
1466
1462
  id: l,
@@ -1475,14 +1471,14 @@ const Ji = (e) => {
1475
1471
  console.error(r);
1476
1472
  return;
1477
1473
  }
1478
- }, Te = (e, t) => no(e, t), lo = (e) => ri(e) ? Qi(e) : Fi(e), Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1474
+ }, Te = (e, t) => lo(e, t), so = (e) => ai(e) ? Ui(e) : Vi(e), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1479
1475
  __proto__: null,
1480
- toWidgetCode: lo,
1476
+ toWidgetCode: so,
1481
1477
  toWidgetProps: Te
1482
1478
  }, Symbol.toStringTag, {
1483
1479
  value: "Module"
1484
1480
  }));
1485
- var so = Object.defineProperty, co = Object.defineProperties, po = Object.getOwnPropertyDescriptors, Ye = Object.getOwnPropertySymbols, mr = Object.prototype.hasOwnProperty, br = Object.prototype.propertyIsEnumerable, Zt = (e, t, r) => t in e ? so(e, t, {
1481
+ var co = Object.defineProperty, po = Object.defineProperties, uo = Object.getOwnPropertyDescriptors, Ye = Object.getOwnPropertySymbols, mr = Object.prototype.hasOwnProperty, fr = Object.prototype.propertyIsEnumerable, Zt = (e, t, r) => t in e ? co(e, t, {
1486
1482
  enumerable: !0,
1487
1483
  configurable: !0,
1488
1484
  writable: !0,
@@ -1492,17 +1488,17 @@ var so = Object.defineProperty, co = Object.defineProperties, po = Object.getOwn
1492
1488
  mr.call(t, r) && Zt(e, r, t[r]);
1493
1489
  if (Ye)
1494
1490
  for (var r of Ye(t))
1495
- br.call(t, r) && Zt(e, r, t[r]);
1491
+ fr.call(t, r) && Zt(e, r, t[r]);
1496
1492
  return e;
1497
- }, T = (e, t) => co(e, po(t)), fr = (e, t) => {
1493
+ }, T = (e, t) => po(e, uo(t)), br = (e, t) => {
1498
1494
  var r = {};
1499
1495
  for (var a in e)
1500
1496
  mr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
1501
1497
  if (e != null && Ye)
1502
1498
  for (var a of Ye(e))
1503
- t.indexOf(a) < 0 && br.call(e, a) && (r[a] = e[a]);
1499
+ t.indexOf(a) < 0 && fr.call(e, a) && (r[a] = e[a]);
1504
1500
  return r;
1505
- }, pe = (e, t, r) => new Promise((a, i) => {
1501
+ }, le = (e, t, r) => new Promise((a, i) => {
1506
1502
  var l = (c) => {
1507
1503
  try {
1508
1504
  u(r.next(c));
@@ -1518,7 +1514,7 @@ var so = Object.defineProperty, co = Object.defineProperties, po = Object.getOwn
1518
1514
  }, u = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(l, s);
1519
1515
  u((r = r.apply(e, t)).next());
1520
1516
  });
1521
- class uo extends Ra {
1517
+ class go extends Za {
1522
1518
  constructor(t, r) {
1523
1519
  super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
1524
1520
  }
@@ -1528,7 +1524,7 @@ class uo extends Ra {
1528
1524
  setOptions(t) {
1529
1525
  var r;
1530
1526
  const a = this.options;
1531
- this.options = this.client.defaultMutationOptions(t), Za(a, this.options) || this.client.getMutationCache().notify({
1527
+ this.options = this.client.defaultMutationOptions(t), Wa(a, this.options) || this.client.getMutationCache().notify({
1532
1528
  type: "observerOptionsUpdated",
1533
1529
  mutation: this.currentMutation,
1534
1530
  observer: this
@@ -1561,7 +1557,7 @@ class uo extends Ra {
1561
1557
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
1562
1558
  }
1563
1559
  updateResult() {
1564
- const t = this.currentMutation ? this.currentMutation.state : Wa(), r = t.status === "loading", a = T(M({}, t), {
1560
+ const t = this.currentMutation ? this.currentMutation.state : qa(), r = t.status === "loading", a = T(M({}, t), {
1565
1561
  isLoading: r,
1566
1562
  isPending: r,
1567
1563
  isSuccess: t.status === "success",
@@ -1584,33 +1580,33 @@ class uo extends Ra {
1584
1580
  }
1585
1581
  }
1586
1582
  t.listeners && this.listeners.forEach(({
1587
- listener: f
1583
+ listener: b
1588
1584
  }) => {
1589
- f(this.currentResult);
1585
+ b(this.currentResult);
1590
1586
  });
1591
1587
  });
1592
1588
  }
1593
1589
  }
1594
- function bt(e, t, r) {
1595
- const a = Ta(e, t), i = Le({
1590
+ function ft(e, t, r) {
1591
+ const a = Na(e, t), i = Le({
1596
1592
  context: a.context
1597
- }), [l] = R(() => new uo(i, a));
1593
+ }), [l] = R(() => new go(i, a));
1598
1594
  ke(() => {
1599
1595
  l.setOptions(a);
1600
1596
  }, [l, a]);
1601
- const s = Na(j((c) => l.subscribe(ir.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), u = j((c, g) => {
1602
- l.mutate(c, g).catch(go);
1597
+ const s = ja(j((c) => l.subscribe(ir.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), u = j((c, g) => {
1598
+ l.mutate(c, g).catch(ho);
1603
1599
  }, [l]);
1604
- if (s.error && ja(l.options.useErrorBoundary, [s.error]))
1600
+ if (s.error && Oa(l.options.useErrorBoundary, [s.error]))
1605
1601
  throw s.error;
1606
1602
  return T(M({}, s), {
1607
1603
  mutate: u,
1608
1604
  mutateAsync: s.mutate
1609
1605
  });
1610
1606
  }
1611
- function go() {
1607
+ function ho() {
1612
1608
  }
1613
- const xr = /* @__PURE__ */ Qe({}), ho = () => ht(xr), kr = ({
1609
+ const xr = /* @__PURE__ */ Qe({}), mo = () => ht(xr), kr = ({
1614
1610
  children: e
1615
1611
  }) => {
1616
1612
  const [t, r] = R({}), a = j((s, u) => {
@@ -1629,13 +1625,13 @@ const xr = /* @__PURE__ */ Qe({}), ho = () => ht(xr), kr = ({
1629
1625
  children: e
1630
1626
  });
1631
1627
  };
1632
- class mo {
1628
+ class fo {
1633
1629
  constructor(t, r = !1) {
1634
- this.volatile = r, this.getChatContexts = () => pe(this, null, function* () {
1630
+ this.volatile = r, this.getChatContexts = () => le(this, null, function* () {
1635
1631
  return (yield this.httpClient.get("api/datasources//")) || [];
1636
1632
  }), this.getNlgInsights = (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a), this.getQueryRecommendations = (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`), this.getNlqResult = (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i), this.setLlmConfig = (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
1637
1633
  console.error("Unable to set llm config", i);
1638
- }), this.getAllChats = () => pe(this, null, function* () {
1634
+ }), this.getAllChats = () => le(this, null, function* () {
1639
1635
  return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
1640
1636
  }), this.getChatById = (a) => this.httpClient.get(`api/v2/ai/chats/${a}`), this.createChat = (a, i) => this.httpClient.post("api/v2/ai/chats", {
1641
1637
  sourceId: a,
@@ -1664,14 +1660,14 @@ const bo = new Kt({
1664
1660
  refetchOnMount: !1
1665
1661
  }
1666
1662
  }
1667
- }), ft = /* @__PURE__ */ Qe(void 0), te = () => ht(ft), fo = ({
1663
+ }), bt = /* @__PURE__ */ Qe(void 0), te = () => ht(bt), xo = ({
1668
1664
  children: e,
1669
1665
  volatile: t
1670
1666
  }) => {
1671
1667
  const {
1672
1668
  app: r
1673
- } = Aa(), a = P(() => r ? new mo(r.httpClient, t) : void 0, [r, t]);
1674
- return /* @__PURE__ */ n(ft.Provider, {
1669
+ } = La(), a = P(() => r ? new fo(r.httpClient, t) : void 0, [r, t]);
1670
+ return /* @__PURE__ */ n(bt.Provider, {
1675
1671
  value: a,
1676
1672
  children: /* @__PURE__ */ n(ar, {
1677
1673
  client: bo,
@@ -1679,29 +1675,29 @@ const bo = new Kt({
1679
1675
  })
1680
1676
  });
1681
1677
  };
1682
- function Bs({
1678
+ function Hs({
1683
1679
  children: e,
1684
1680
  volatile: t
1685
1681
  }) {
1686
1682
  return /* @__PURE__ */ n(kr, {
1687
- children: /* @__PURE__ */ n(fo, {
1683
+ children: /* @__PURE__ */ n(xo, {
1688
1684
  volatile: t,
1689
1685
  children: e
1690
1686
  })
1691
1687
  });
1692
1688
  }
1693
- function xo(e) {
1689
+ function ko(e) {
1694
1690
  var t, r;
1695
1691
  if ("jaql" in e)
1696
1692
  return e;
1697
1693
  {
1698
- const a = ya(e.dataSource), {
1694
+ const a = wa(e.dataSource), {
1699
1695
  filters: i = [],
1700
1696
  relations: l
1701
- } = wa(e.filters), {
1697
+ } = Ca(e.filters), {
1702
1698
  metadata: s,
1703
1699
  filterRelations: u
1704
- } = Ca({
1700
+ } = _a({
1705
1701
  dataSource: e.dataSource,
1706
1702
  attributes: (t = e.dimensions) != null ? t : [],
1707
1703
  measures: (r = e.measures) != null ? r : [],
@@ -1719,7 +1715,7 @@ function xo(e) {
1719
1715
  }
1720
1716
  }
1721
1717
  const Fe = (e, t = !0) => {
1722
- const r = P(() => xo(e), [e]), a = te(), {
1718
+ const r = P(() => ko(e), [e]), a = te(), {
1723
1719
  data: i,
1724
1720
  error: l,
1725
1721
  isError: s,
@@ -1729,9 +1725,9 @@ const Fe = (e, t = !0) => {
1729
1725
  } = xe({
1730
1726
  queryKey: ["getNlgInsights", r, a],
1731
1727
  queryFn: () => a == null ? void 0 : a.ai.getNlgInsights(r),
1732
- select: (f) => {
1728
+ select: (b) => {
1733
1729
  var x;
1734
- return (x = f == null ? void 0 : f.data) == null ? void 0 : x.answer;
1730
+ return (x = b == null ? void 0 : b.data) == null ? void 0 : x.answer;
1735
1731
  },
1736
1732
  enabled: !!a && t
1737
1733
  });
@@ -1745,13 +1741,13 @@ const Fe = (e, t = !0) => {
1745
1741
  g();
1746
1742
  }, [g])
1747
1743
  };
1748
- }, ko = (e) => {
1744
+ }, yo = (e) => {
1749
1745
  const t = e, {
1750
1746
  enabled: r
1751
- } = t, a = fr(t, ["enabled"]);
1747
+ } = t, a = br(t, ["enabled"]);
1752
1748
  return Fe(a, r);
1753
- }, Hs = gt("useGetNlgInsights")(ko), yo = ["indicator", "column", "line", "table", "pie", "bar"];
1754
- function wo(e) {
1749
+ }, Ys = gt("useGetNlgInsights")(yo), wo = ["indicator", "column", "line", "table", "pie", "bar"];
1750
+ function yr(e) {
1755
1751
  const {
1756
1752
  dataSource: t,
1757
1753
  query: r,
@@ -1763,48 +1759,60 @@ function wo(e) {
1763
1759
  text: r,
1764
1760
  // Timezone is not used by AI API, but it is currently required by the endpoint
1765
1761
  timezone: "UTC",
1766
- chartTypes: a ?? [...yo]
1762
+ chartTypes: a ?? [...wo]
1767
1763
  }
1768
1764
  };
1769
1765
  }
1770
- const Co = (e) => {
1766
+ function Co(e, t) {
1767
+ return le(this, null, function* () {
1768
+ const {
1769
+ contextTitle: r,
1770
+ request: a
1771
+ } = yr(e), i = yield t.ai.getNlqResult(r, a);
1772
+ return {
1773
+ widgetProps: i ? Te(i, {
1774
+ useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
1775
+ }) : void 0,
1776
+ nlqResult: i
1777
+ };
1778
+ });
1779
+ }
1780
+ const _o = (e) => {
1771
1781
  const {
1772
1782
  contextTitle: t,
1773
1783
  request: r
1774
- } = wo(e), a = te(), {
1775
- isLoading: i,
1776
- isError: l,
1777
- isSuccess: s,
1778
- data: u,
1779
- error: c,
1780
- refetch: g
1784
+ } = yr(e), a = te(), i = ["getNlqResult", t, r, a], {
1785
+ isLoading: l,
1786
+ isError: s,
1787
+ isSuccess: u,
1788
+ data: c,
1789
+ error: g,
1790
+ refetch: b
1781
1791
  } = xe({
1782
- queryKey: ["getNlqResult", t, r, a],
1783
- queryFn: () => a == null ? void 0 : a.ai.getNlqResult(t, r),
1792
+ queryKey: i,
1793
+ queryFn: () => a ? Co(e, a).then((x) => x.widgetProps) : Promise.reject("No API available"),
1784
1794
  enabled: !!a && e.enabled
1785
- }), f = u ? Te(u, {
1786
- useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
1787
- }) : void 0;
1795
+ });
1788
1796
  return {
1789
- isLoading: i,
1790
- isError: l,
1791
- isSuccess: s,
1792
- data: f,
1793
- error: c,
1797
+ isLoading: l,
1798
+ isError: s,
1799
+ isSuccess: u,
1800
+ data: c,
1801
+ error: g,
1794
1802
  refetch: j(() => {
1795
- g();
1796
- }, [g])
1803
+ b();
1804
+ }, [b])
1797
1805
  };
1798
- }, Ys = gt("useGetNlqResult")(Co), _o = 4, yr = (e) => {
1806
+ }, $s = gt("useGetNlqResult")(_o), vo = 4, wr = (e) => {
1799
1807
  const {
1800
1808
  contextTitle: t,
1801
1809
  count: r,
1802
1810
  enableAxisTitlesInWidgetProps: a,
1803
1811
  enabled: i,
1804
1812
  customPrompt: l
1805
- } = e, s = te(), u = r ?? _o, c = (i === void 0 || i === !0) && u > 0, {
1813
+ } = e, s = te(), u = r ?? vo, c = (i === void 0 || i === !0) && u > 0, {
1806
1814
  isLoading: g,
1807
- isError: f,
1815
+ isError: b,
1808
1816
  isSuccess: x,
1809
1817
  data: o,
1810
1818
  error: p,
@@ -1824,7 +1832,7 @@ const Co = (e) => {
1824
1832
  })), [o, a]);
1825
1833
  return {
1826
1834
  isLoading: c ? g : !1,
1827
- isError: f,
1835
+ isError: b,
1828
1836
  isSuccess: x,
1829
1837
  data: m ?? void 0,
1830
1838
  error: p,
@@ -1832,34 +1840,34 @@ const Co = (e) => {
1832
1840
  d();
1833
1841
  }, [d])
1834
1842
  };
1835
- }, $s = gt("useGetQueryRecommendations")(yr), wr = Object.freeze({
1843
+ }, Qs = gt("useGetQueryRecommendations")(wr), Cr = Object.freeze({
1836
1844
  enableFollowupQuestions: !1,
1837
1845
  enableHeader: !0,
1838
1846
  enableInsights: !0,
1839
1847
  numOfRecommendations: 4,
1840
1848
  numOfRecentPrompts: 5
1841
- }), Cr = /* @__PURE__ */ Qe(M({}, wr)), ie = () => ht(Cr), vo = ({
1849
+ }), _r = /* @__PURE__ */ Qe(M({}, Cr)), ie = () => ht(_r), So = ({
1842
1850
  children: e,
1843
1851
  value: t
1844
1852
  }) => {
1845
1853
  const {
1846
1854
  t: r
1847
- } = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), T(M({}, wr), {
1855
+ } = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), T(M({}, Cr), {
1848
1856
  inputPromptText: r("ai.config.inputPromptText"),
1849
1857
  welcomeText: r("ai.config.welcomeText"),
1850
1858
  suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
1851
1859
  }));
1852
- return /* @__PURE__ */ n(Cr.Provider, {
1860
+ return /* @__PURE__ */ n(_r.Provider, {
1853
1861
  value: a,
1854
1862
  children: e
1855
1863
  });
1856
- }, xt = "chatHistory", So = (e) => {
1864
+ }, xt = "chatHistory", Mo = (e) => {
1857
1865
  const t = te(), {
1858
1866
  hideHistory: r
1859
1867
  } = ie();
1860
1868
  return xe({
1861
1869
  queryKey: [xt, e, t],
1862
- queryFn: () => pe(void 0, null, function* () {
1870
+ queryFn: () => le(void 0, null, function* () {
1863
1871
  if (!t || !e)
1864
1872
  return;
1865
1873
  if (r)
@@ -1869,10 +1877,10 @@ const Co = (e) => {
1869
1877
  }),
1870
1878
  enabled: !!t && !!e
1871
1879
  });
1872
- }, _r = (e) => {
1880
+ }, vr = (e) => {
1873
1881
  const t = te(), r = Le();
1874
- return bt({
1875
- mutationFn: () => pe(void 0, null, function* () {
1882
+ return ft({
1883
+ mutationFn: () => le(void 0, null, function* () {
1876
1884
  if (!(!t || !e))
1877
1885
  return t.ai.chat.clearHistory(e);
1878
1886
  }),
@@ -1888,9 +1896,9 @@ const Co = (e) => {
1888
1896
  data: t,
1889
1897
  isLoading: r,
1890
1898
  isError: a
1891
- } = So(e), {
1899
+ } = Mo(e), {
1892
1900
  mutate: i
1893
- } = _r(e);
1901
+ } = vr(e);
1894
1902
  return ke(() => {
1895
1903
  a && i();
1896
1904
  }, [a, i]), {
@@ -1898,14 +1906,14 @@ const Co = (e) => {
1898
1906
  isLoading: r,
1899
1907
  isError: a
1900
1908
  };
1901
- }, Mo = () => {
1909
+ }, Io = () => {
1902
1910
  const e = te(), {
1903
1911
  data: t,
1904
1912
  isLoading: r,
1905
1913
  fetchStatus: a
1906
1914
  } = xe({
1907
1915
  queryKey: ["getDataTopics", e],
1908
- queryFn: () => pe(void 0, null, function* () {
1916
+ queryFn: () => le(void 0, null, function* () {
1909
1917
  if (e)
1910
1918
  return e.getChatContexts();
1911
1919
  }),
@@ -1916,7 +1924,7 @@ const Co = (e) => {
1916
1924
  isLoading: r,
1917
1925
  fetchStatus: a
1918
1926
  };
1919
- }, Io = () => {
1927
+ }, Do = () => {
1920
1928
  const e = te(), {
1921
1929
  data: t,
1922
1930
  isLoading: r
@@ -1929,9 +1937,9 @@ const Co = (e) => {
1929
1937
  data: t ?? [],
1930
1938
  isLoading: r
1931
1939
  };
1932
- }, Do = (e, t, r) => {
1933
- const a = Le(), i = te(), l = bt({
1934
- mutationFn: () => pe(void 0, null, function* () {
1940
+ }, Ao = (e, t, r) => {
1941
+ const a = Le(), i = te(), l = ft({
1942
+ mutationFn: () => le(void 0, null, function* () {
1935
1943
  if (!(!i || !e))
1936
1944
  return i.ai.chat.create(e, r);
1937
1945
  }),
@@ -1940,7 +1948,7 @@ const Co = (e) => {
1940
1948
  return ke(() => {
1941
1949
  t && l.isIdle && l.mutate();
1942
1950
  }, [t, l]), l;
1943
- }, Ao = (e, t) => {
1951
+ }, Lo = (e, t) => {
1944
1952
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
1945
1953
  case "nlq":
1946
1954
  return {
@@ -1957,7 +1965,7 @@ const Co = (e) => {
1957
1965
  default:
1958
1966
  throw Error(`${t}${JSON.stringify(e)}`);
1959
1967
  }
1960
- }, Lo = (e, t) => {
1968
+ }, To = (e, t) => {
1961
1969
  const r = Le(), a = j((c) => {
1962
1970
  e && r.setQueriesData([xt, e], (g) => g && [...g, c]);
1963
1971
  }, [r, e]), {
@@ -1965,8 +1973,8 @@ const Co = (e) => {
1965
1973
  } = E(), l = te(), {
1966
1974
  mutate: s,
1967
1975
  isLoading: u
1968
- } = bt({
1969
- mutationFn: (c) => pe(void 0, null, function* () {
1976
+ } = ft({
1977
+ mutationFn: (c) => le(void 0, null, function* () {
1970
1978
  if (!(!l || !e))
1971
1979
  return l.ai.chat.post(e, {
1972
1980
  text: c,
@@ -1993,7 +2001,7 @@ const Co = (e) => {
1993
2001
  if (!c)
1994
2002
  return;
1995
2003
  const g = i("ai.errors.unknownResponse");
1996
- a(Ao(c, g));
2004
+ a(Lo(c, g));
1997
2005
  }
1998
2006
  });
1999
2007
  return {
@@ -2005,29 +2013,29 @@ const Co = (e) => {
2005
2013
  const {
2006
2014
  data: i,
2007
2015
  isLoading: l
2008
- } = Io(), s = ho(), u = s.getChatId(e, t) || ((a = i.find((x) => {
2016
+ } = Do(), s = mo(), u = s.getChatId(e, t) || ((a = i.find((x) => {
2009
2017
  var o;
2010
2018
  return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
2011
2019
  })) == null ? void 0 : a.chatId), {
2012
2020
  isError: c,
2013
2021
  data: g,
2014
- isSuccess: f
2015
- } = Do(e, r && !l && !u, t);
2022
+ isSuccess: b
2023
+ } = Ao(e, r && !l && !u, t);
2016
2024
  return ke(() => {
2017
- f && g && !u && s.saveChatId(g.chatId, e, t);
2018
- }, [g, f, e, t, u, s]), {
2025
+ b && g && !u && s.saveChatId(g.chatId, e, t);
2026
+ }, [g, b, e, t, u, s]), {
2019
2027
  chatId: u,
2020
2028
  isLoading: l,
2021
2029
  isError: c
2022
2030
  };
2023
- }, vr = (e) => P(() => {
2031
+ }, Sr = (e) => P(() => {
2024
2032
  if (e != null && e.length) {
2025
2033
  const t = e[e.length - 1];
2026
2034
  if (wt(t))
2027
2035
  return JSON.parse(t.content);
2028
2036
  }
2029
2037
  return null;
2030
- }, [e]), wt = (e) => !!e && "type" in e && e.type === "nlq", To = (e) => !!e && "type" in e && e.type === "text", No = (e, t) => {
2038
+ }, [e]), wt = (e) => !!e && "type" in e && e.type === "nlq", No = (e) => !!e && "type" in e && e.type === "text", jo = (e, t) => {
2031
2039
  const {
2032
2040
  t: r
2033
2041
  } = E(), {
@@ -2038,15 +2046,15 @@ const Co = (e) => {
2038
2046
  } = yt(e, t, !0), [s, u] = R(null), {
2039
2047
  history: c,
2040
2048
  isLoading: g,
2041
- isError: f
2049
+ isError: b
2042
2050
  } = kt(i);
2043
2051
  ke(() => {
2044
- l ? u(new De("ai.errors.chatUnavailable")) : f && u(new De("ai.errors.fetchHistory"));
2045
- }, [l, f, r]);
2052
+ l ? u(new De("ai.errors.chatUnavailable")) : b && u(new De("ai.errors.fetchHistory"));
2053
+ }, [l, b, r]);
2046
2054
  const {
2047
2055
  mutate: x,
2048
2056
  isLoading: o
2049
- } = Lo(i, a), p = vr(c);
2057
+ } = To(i, a), p = Sr(c);
2050
2058
  return {
2051
2059
  chatId: i,
2052
2060
  history: c ?? [],
@@ -2056,7 +2064,7 @@ const Co = (e) => {
2056
2064
  isLoading: g,
2057
2065
  lastError: s
2058
2066
  };
2059
- }, Qs = ({
2067
+ }, Us = ({
2060
2068
  contextTitle: e,
2061
2069
  contextDetails: t
2062
2070
  }) => {
@@ -2065,8 +2073,8 @@ const Co = (e) => {
2065
2073
  } = yt(e, t), {
2066
2074
  history: a
2067
2075
  } = kt(r);
2068
- return vr(a);
2069
- }, Us = ({
2076
+ return Sr(a);
2077
+ }, Fs = ({
2070
2078
  contextTitle: e,
2071
2079
  contextDetails: t
2072
2080
  }) => {
@@ -2083,18 +2091,18 @@ const Co = (e) => {
2083
2091
  }
2084
2092
  return null;
2085
2093
  }, [a]);
2086
- }, jo = 500, Oo = 500, Eo = 500, zo = 900, Ro = /* @__PURE__ */ C("div", {
2094
+ }, Oo = 500, Eo = 500, zo = 500, Ro = 900, Zo = /* @__PURE__ */ C("div", {
2087
2095
  target: "e1toc89x0",
2088
2096
  label: "ChatFrame"
2089
2097
  })("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
2090
2098
  theme: e
2091
2099
  }) => e.aiChat.borderRadius, ";background-color:", ({
2092
2100
  theme: e
2093
- }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", jo, "px;min-height:", Oo, "px;width:", ({
2101
+ }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", Oo, "px;min-height:", Eo, "px;width:", ({
2094
2102
  width: e
2095
- }) => e ? Wt(e) : `${Eo}px`, ";height:", ({
2103
+ }) => e ? Wt(e) : `${zo}px`, ";height:", ({
2096
2104
  height: e
2097
- }) => e ? Wt(e) : `${zo}px`, ";", ({
2105
+ }) => e ? Wt(e) : `${Ro}px`, ";", ({
2098
2106
  theme: e
2099
2107
  }) => q`
2100
2108
  font-size: ${e.aiChat.primaryFontSize[0]};
@@ -2105,7 +2113,7 @@ const Co = (e) => {
2105
2113
  function Wt(e) {
2106
2114
  return typeof e == "number" ? `${e}px` : e;
2107
2115
  }
2108
- function Zo({
2116
+ function Wo({
2109
2117
  spin: e
2110
2118
  }) {
2111
2119
  return /* @__PURE__ */ v("svg", {
@@ -2133,24 +2141,24 @@ function Ve() {
2133
2141
  return /* @__PURE__ */ n("div", {
2134
2142
  className: "csdk-m-auto",
2135
2143
  "aria-label": "loading spinner",
2136
- children: /* @__PURE__ */ n(Zo, {
2144
+ children: /* @__PURE__ */ n(Wo, {
2137
2145
  spin: !0
2138
2146
  })
2139
2147
  });
2140
2148
  }
2141
- const Wo = /* @__PURE__ */ C("div", {
2149
+ const qo = /* @__PURE__ */ C("div", {
2142
2150
  target: "e176zu9j0",
2143
2151
  label: "AiDisclaimerContainer"
2144
2152
  })("text-align:center;font-size:11px;line-height:18px;white-space:pre-wrap;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;color:", ({
2145
2153
  theme: e
2146
2154
  }) => e.aiChat.secondaryTextColor, ";");
2147
- function qo({
2155
+ function Po({
2148
2156
  theme: e
2149
2157
  }) {
2150
2158
  const {
2151
2159
  t
2152
2160
  } = E();
2153
- return /* @__PURE__ */ v(Wo, {
2161
+ return /* @__PURE__ */ v(qo, {
2154
2162
  theme: e,
2155
2163
  children: [/* @__PURE__ */ n("div", {
2156
2164
  children: t("ai.disclaimer.poweredByAi")
@@ -2159,17 +2167,17 @@ function qo({
2159
2167
  })]
2160
2168
  });
2161
2169
  }
2162
- const Po = /* @__PURE__ */ C("div", {
2170
+ const Go = /* @__PURE__ */ C("div", {
2163
2171
  target: "e1vujcck0",
2164
2172
  label: "Section"
2165
- })("display:flex;flex-direction:column;row-gap:4px;"), Go = /* @__PURE__ */ C("div", {
2173
+ })("display:flex;flex-direction:column;row-gap:4px;"), Bo = /* @__PURE__ */ C("div", {
2166
2174
  target: "e1vujcck1",
2167
2175
  label: "SectionHeader"
2168
2176
  })("font-size:11px;line-height:18px;font-weight:300;color:", ({
2169
2177
  theme: e
2170
2178
  }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
2171
2179
  theme: e
2172
- }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), Bo = /* @__PURE__ */ C("div", {
2180
+ }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), Ho = /* @__PURE__ */ C("div", {
2173
2181
  target: "e1vujcck2",
2174
2182
  label: "DropupItem"
2175
2183
  })("font-size:", ({
@@ -2181,7 +2189,7 @@ const Po = /* @__PURE__ */ C("div", {
2181
2189
  }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
2182
2190
  theme: e
2183
2191
  }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
2184
- function Ho({
2192
+ function Yo({
2185
2193
  title: e,
2186
2194
  items: t,
2187
2195
  onSelect: r,
@@ -2190,19 +2198,19 @@ function Ho({
2190
2198
  const [i, l] = R(!1), {
2191
2199
  themeSettings: s
2192
2200
  } = D();
2193
- return /* @__PURE__ */ v(Po, {
2194
- children: [/* @__PURE__ */ n(Go, {
2201
+ return /* @__PURE__ */ v(Go, {
2202
+ children: [/* @__PURE__ */ n(Bo, {
2195
2203
  onClick: () => l((u) => !u),
2196
2204
  theme: s,
2197
2205
  children: e.toUpperCase()
2198
- }), (i || a) && t.map((u, c) => /* @__PURE__ */ n(Bo, {
2206
+ }), (i || a) && t.map((u, c) => /* @__PURE__ */ n(Ho, {
2199
2207
  onClick: () => r(u),
2200
2208
  theme: s,
2201
2209
  children: u
2202
2210
  }, c))]
2203
2211
  });
2204
2212
  }
2205
- const Yo = /* @__PURE__ */ C("div", {
2213
+ const $o = /* @__PURE__ */ C("div", {
2206
2214
  target: "e1nxw6f60",
2207
2215
  label: "PopupContent"
2208
2216
  })("font-family:", ({
@@ -2217,7 +2225,7 @@ const Yo = /* @__PURE__ */ C("div", {
2217
2225
  theme: e
2218
2226
  }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
2219
2227
  theme: e
2220
- }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), $o = /* @__PURE__ */ C("div", {
2228
+ }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), Qo = /* @__PURE__ */ C("div", {
2221
2229
  target: "e1nxw6f61",
2222
2230
  label: "ErrorMessage"
2223
2231
  })("font-size:", ({
@@ -2227,7 +2235,7 @@ const Yo = /* @__PURE__ */ C("div", {
2227
2235
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
2228
2236
  theme: e
2229
2237
  }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), st = (e) => e.startsWith("/");
2230
- function Qo({
2238
+ function Uo({
2231
2239
  recentPrompts: e,
2232
2240
  suggestions: t,
2233
2241
  isLoading: r,
@@ -2248,7 +2256,7 @@ function Qo({
2248
2256
  themeSettings: c
2249
2257
  } = D(), {
2250
2258
  t: g
2251
- } = E(), f = u.length === 1;
2259
+ } = E(), b = u.length === 1;
2252
2260
  return /* @__PURE__ */ n(or, {
2253
2261
  open: st(l) && u.length > 0,
2254
2262
  anchorEl: i,
@@ -2262,21 +2270,21 @@ function Qo({
2262
2270
  sx: {
2263
2271
  zIndex: 3
2264
2272
  },
2265
- children: /* @__PURE__ */ v(Yo, {
2273
+ children: /* @__PURE__ */ v($o, {
2266
2274
  style: {
2267
2275
  width: i == null ? void 0 : i.offsetWidth
2268
2276
  },
2269
2277
  theme: c,
2270
- children: [r && /* @__PURE__ */ n(Ve, {}), !r && !s && u.map((x) => /* @__PURE__ */ n(Ho, T(M({}, x), {
2271
- alwaysExpanded: f
2272
- }), x.title)), s && /* @__PURE__ */ n($o, {
2278
+ children: [r && /* @__PURE__ */ n(Ve, {}), !r && !s && u.map((x) => /* @__PURE__ */ n(Yo, T(M({}, x), {
2279
+ alwaysExpanded: b
2280
+ }), x.title)), s && /* @__PURE__ */ n(Qo, {
2273
2281
  theme: c,
2274
2282
  children: g("ai.errors.recommendationsNotAvailable")
2275
2283
  })]
2276
2284
  })
2277
2285
  });
2278
2286
  }
2279
- const Uo = 500;
2287
+ const Fo = 500;
2280
2288
  function Ne({
2281
2289
  title: e,
2282
2290
  placement: t = "top",
@@ -2285,7 +2293,7 @@ function Ne({
2285
2293
  const {
2286
2294
  themeSettings: a
2287
2295
  } = D();
2288
- return /* @__PURE__ */ n(Ha, {
2296
+ return /* @__PURE__ */ n(Ya, {
2289
2297
  title: e,
2290
2298
  placement: t,
2291
2299
  disableInteractive: !0,
@@ -2313,7 +2321,7 @@ function Ne({
2313
2321
  children: r
2314
2322
  });
2315
2323
  }
2316
- function Fo({
2324
+ function Vo({
2317
2325
  theme: e
2318
2326
  }) {
2319
2327
  const t = e.aiChat.icons.color;
@@ -2335,7 +2343,7 @@ function Fo({
2335
2343
  })]
2336
2344
  });
2337
2345
  }
2338
- function Vo({
2346
+ function Jo({
2339
2347
  theme: e
2340
2348
  }) {
2341
2349
  return /* @__PURE__ */ n("svg", {
@@ -2350,15 +2358,15 @@ function Vo({
2350
2358
  })
2351
2359
  });
2352
2360
  }
2353
- const Jo = /* @__PURE__ */ C("div", {
2361
+ const Xo = /* @__PURE__ */ C("div", {
2354
2362
  target: "e1ssacaw0",
2355
2363
  label: "ChatInputContainer"
2356
2364
  })("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
2357
2365
  theme: e
2358
- }) => e.aiChat.backgroundColor, ";"), Xo = /* @__PURE__ */ C("button", {
2366
+ }) => e.aiChat.backgroundColor, ";"), Ko = /* @__PURE__ */ C("button", {
2359
2367
  target: "e1ssacaw1",
2360
2368
  label: "ClearHistoryButton"
2361
- })("height:34px;background-color:inherit;cursor:pointer;border:none;"), Ko = /* @__PURE__ */ C("textarea", {
2369
+ })("height:34px;background-color:inherit;cursor:pointer;border:none;"), en = /* @__PURE__ */ C("textarea", {
2362
2370
  target: "e1ssacaw2",
2363
2371
  label: "TextInput"
2364
2372
  })("font-size:inherit;line-height:inherit;resize:none;overflow-y:auto;box-sizing:border-box;max-height:88px;width:100%;padding-top:7px;padding-bottom:7px;padding-left:16px;padding-right:16px;margin-left:10px;margin-right:10px;border-width:1px;border-color:rgb(38 46 61 / 0.15);border-radius:0.5rem;&:focus{outline:1px solid ", ({
@@ -2367,7 +2375,7 @@ const Jo = /* @__PURE__ */ C("div", {
2367
2375
  theme: e
2368
2376
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
2369
2377
  theme: e
2370
- }) => e.aiChat.input.backgroundColor, ";"), en = /* @__PURE__ */ C("button", {
2378
+ }) => e.aiChat.input.backgroundColor, ";"), tn = /* @__PURE__ */ C("button", {
2371
2379
  target: "e1ssacaw3",
2372
2380
  label: "SendMessageButton"
2373
2381
  })("height:34px;background-color:inherit;border-style:none;color:", ({
@@ -2380,8 +2388,8 @@ const Jo = /* @__PURE__ */ C("div", {
2380
2388
  ` : q`
2381
2389
  opacity: 1;
2382
2390
  cursor: pointer;
2383
- `), tn = 34;
2384
- function rn({
2391
+ `), rn = 34;
2392
+ function an({
2385
2393
  onSendMessage: e,
2386
2394
  onClearHistoryClick: t,
2387
2395
  disabled: r,
@@ -2392,7 +2400,7 @@ function rn({
2392
2400
  onChange: u
2393
2401
  }) {
2394
2402
  const [c, g] = R(""), {
2395
- inputPromptText: f
2403
+ inputPromptText: b
2396
2404
  } = ie(), x = j(() => {
2397
2405
  if (r)
2398
2406
  return;
@@ -2408,9 +2416,9 @@ function rn({
2408
2416
  y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && st(c) && g("");
2409
2417
  }, [x, c]), d = j((y) => {
2410
2418
  u == null || u(y.target.value), g(y.target.value);
2411
- }, [u]), m = ce(null);
2419
+ }, [u]), m = pe(null);
2412
2420
  Be(() => {
2413
- m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(m.current.scrollHeight + 2, tn)}px`);
2421
+ m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(m.current.scrollHeight + 2, rn)}px`);
2414
2422
  }, [c]), Be(() => {
2415
2423
  m.current && m.current.focus({
2416
2424
  preventScroll: !0
@@ -2432,9 +2440,9 @@ function rn({
2432
2440
  document.addEventListener("mouseup", A), document.addEventListener("keyup", A);
2433
2441
  }
2434
2442
  }, []);
2435
- return /* @__PURE__ */ v(Jo, {
2443
+ return /* @__PURE__ */ v(Xo, {
2436
2444
  theme: h,
2437
- children: [/* @__PURE__ */ n(Qo, {
2445
+ children: [/* @__PURE__ */ n(Uo, {
2438
2446
  recentPrompts: a,
2439
2447
  suggestions: i,
2440
2448
  isLoading: l,
@@ -2445,88 +2453,88 @@ function rn({
2445
2453
  }), t && /* @__PURE__ */ n(Ne, {
2446
2454
  title: w("ai.buttons.clearChat"),
2447
2455
  placement: "bottom-start",
2448
- children: /* @__PURE__ */ n(Xo, {
2456
+ children: /* @__PURE__ */ n(Ko, {
2449
2457
  "aria-label": "clear history",
2450
2458
  onClick: t,
2451
- children: /* @__PURE__ */ n(Fo, {
2459
+ children: /* @__PURE__ */ n(Vo, {
2452
2460
  theme: h
2453
2461
  })
2454
2462
  })
2455
- }), /* @__PURE__ */ n(Ko, {
2463
+ }), /* @__PURE__ */ n(en, {
2456
2464
  "aria-label": "chat input",
2457
2465
  onBlur: _,
2458
- maxLength: Uo,
2466
+ maxLength: Fo,
2459
2467
  ref: m,
2460
2468
  rows: 1,
2461
2469
  onChange: d,
2462
2470
  spellCheck: "true",
2463
- placeholder: f,
2471
+ placeholder: b,
2464
2472
  value: c,
2465
2473
  onKeyDown: p,
2466
2474
  theme: h
2467
- }), /* @__PURE__ */ n(en, {
2475
+ }), /* @__PURE__ */ n(tn, {
2468
2476
  "aria-label": "send chat message",
2469
2477
  disabled: r || c.length === 0,
2470
2478
  onClick: x,
2471
2479
  theme: h,
2472
2480
  children: /* @__PURE__ */ n("span", {
2473
2481
  "data-state": "closed",
2474
- children: /* @__PURE__ */ n(Vo, {
2482
+ children: /* @__PURE__ */ n(Jo, {
2475
2483
  theme: h
2476
2484
  })
2477
2485
  })
2478
2486
  })]
2479
2487
  });
2480
2488
  }
2481
- const an = /* @__PURE__ */ C("div", {
2489
+ const on = /* @__PURE__ */ C("div", {
2482
2490
  target: "en1tixw0",
2483
2491
  label: "Container"
2484
- })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), on = /* @__PURE__ */ C("div", {
2492
+ })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), nn = /* @__PURE__ */ C("div", {
2485
2493
  target: "en1tixw1",
2486
2494
  label: "Title"
2487
2495
  })("color:", ({
2488
2496
  theme: e
2489
- }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), nn = /* @__PURE__ */ C("div", {
2497
+ }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), ln = /* @__PURE__ */ C("div", {
2490
2498
  target: "en1tixw2",
2491
2499
  label: "ActionButton"
2492
2500
  })("color:rgba(54,163,217,1);cursor:pointer;");
2493
- function Sr({
2501
+ function Mr({
2494
2502
  text: e,
2495
2503
  action: t
2496
2504
  }) {
2497
2505
  const {
2498
2506
  themeSettings: r
2499
2507
  } = D();
2500
- return /* @__PURE__ */ v(an, {
2501
- children: [/* @__PURE__ */ n(on, {
2508
+ return /* @__PURE__ */ v(on, {
2509
+ children: [/* @__PURE__ */ n(nn, {
2502
2510
  theme: r,
2503
2511
  children: e
2504
- }), /* @__PURE__ */ n(Oa, {}), t && /* @__PURE__ */ n(nn, {
2512
+ }), /* @__PURE__ */ n(Ea, {}), t && /* @__PURE__ */ n(ln, {
2505
2513
  onClick: t.onClick,
2506
2514
  children: t.text
2507
2515
  })]
2508
2516
  });
2509
2517
  }
2510
- const ln = /* @__PURE__ */ C("div", {
2518
+ const sn = /* @__PURE__ */ C("div", {
2511
2519
  target: "e14i1z190",
2512
2520
  label: "ToolbarContainer"
2513
2521
  })("flex:0 0 80px;padding-left:14px;padding-right:14px;display:flex;align-items:center;position:relative;background-color:", ({
2514
2522
  style: e
2515
- }) => e.backgroundColor, ";"), sn = /* @__PURE__ */ C("div", {
2523
+ }) => e.backgroundColor, ";"), dn = /* @__PURE__ */ C("div", {
2516
2524
  target: "e14i1z191",
2517
2525
  label: "ToolbarTitle"
2518
2526
  })("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
2519
2527
  style: e
2520
- }) => e.textColor, ";"), Mr = /* @__PURE__ */ rr(function({
2528
+ }) => e.textColor, ";"), Ir = /* @__PURE__ */ rr(function({
2521
2529
  title: e,
2522
2530
  leftNav: t,
2523
2531
  rightNav: r,
2524
2532
  style: a
2525
2533
  }, i) {
2526
- return /* @__PURE__ */ v(ln, {
2534
+ return /* @__PURE__ */ v(sn, {
2527
2535
  ref: i,
2528
2536
  style: a,
2529
- children: [t, /* @__PURE__ */ n(sn, {
2537
+ children: [t, /* @__PURE__ */ n(dn, {
2530
2538
  style: a,
2531
2539
  children: e
2532
2540
  }), r && /* @__PURE__ */ n("div", {
@@ -2556,17 +2564,17 @@ function Ct() {
2556
2564
  })]
2557
2565
  });
2558
2566
  }
2559
- function de() {
2560
- return de = Object.assign ? Object.assign.bind() : function(e) {
2567
+ function ce() {
2568
+ return ce = Object.assign ? Object.assign.bind() : function(e) {
2561
2569
  for (var t = 1; t < arguments.length; t++) {
2562
2570
  var r = arguments[t];
2563
2571
  for (var a in r)
2564
2572
  Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
2565
2573
  }
2566
2574
  return e;
2567
- }, de.apply(this, arguments);
2575
+ }, ce.apply(this, arguments);
2568
2576
  }
2569
- const dn = ["children", "options"], k = {
2577
+ const cn = ["children", "options"], k = {
2570
2578
  blockQuote: "0",
2571
2579
  breakLine: "1",
2572
2580
  breakThematic: "2",
@@ -2616,39 +2624,39 @@ const Pt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
2616
2624
  lt: "<",
2617
2625
  nbsp: " ",
2618
2626
  quot: "“"
2619
- }, cn = ["style", "script"], pn = ["src", "href", "data", "formAction", "srcDoc", "action"], un = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, gn = /mailto:/i, hn = /\n{2,}$/, Ir = /^(\s*>[\s\S]*?)(?=\n\n|$)/, mn = /^ *> ?/gm, bn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, fn = /^ {2,}\n/, xn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Dr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Ar = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, kn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, yn = /^(?:\n *)*\n/, wn = /\r\n?/g, Cn = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, _n = /^\[\^([^\]]+)]/, vn = /\f/g, Sn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Mn = /^\s*?\[(x|\s)\]/, Lr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Tr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Nr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, dt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, In = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, jr = /^<!--[\s\S]*?(?:-->)/, Dn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ct = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, An = /^\{.*\}$/, Ln = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Tn = /^<([^ >]+@[^ >]+)>/, Nn = /^<([^ >]+:\/[^ >]+)>/, jn = /-([a-z])?/gi, Or = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, On = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, En = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, zn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Rn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Zn = /\t/g, Wn = /(^ *\||\| *$)/g, qn = /^ *:-+: *$/, Pn = /^ *:-+ *$/, Gn = /^ *-+: *$/, Je = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Bn = new RegExp(`^([*_])\\1${Je}\\1\\1(?!\\1)`), Hn = new RegExp(`^([*_])${Je}\\1(?!\\1)`), Yn = new RegExp(`^(==)${Je}\\1`), $n = new RegExp(`^(~~)${Je}\\1`), Qn = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, Un = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Fn = /^\n+/, Vn = /^([ \t]*)/, Jn = /\\([^\\])/g, Xn = /(?:^|\n)( *)$/, _t = "(?:\\d+\\.)", vt = "(?:[*+-])";
2620
- function Er(e) {
2627
+ }, pn = ["style", "script"], un = ["src", "href", "data", "formAction", "srcDoc", "action"], gn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, hn = /mailto:/i, mn = /\n{2,}$/, Dr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, fn = /^ *> ?/gm, bn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, xn = /^ {2,}\n/, kn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Ar = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Lr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, yn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, wn = /^(?:\n *)*\n/, Cn = /\r\n?/g, _n = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, vn = /^\[\^([^\]]+)]/, Sn = /\f/g, Mn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, In = /^\s*?\[(x|\s)\]/, Tr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Nr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, jr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, dt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Dn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Or = /^<!--[\s\S]*?(?:-->)/, An = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ct = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Ln = /^\{.*\}$/, Tn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Nn = /^<([^ >]+@[^ >]+)>/, jn = /^<([^ >]+:\/[^ >]+)>/, On = /-([a-z])?/gi, Er = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, En = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, zn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Rn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Zn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Wn = /\t/g, qn = /(^ *\||\| *$)/g, Pn = /^ *:-+: *$/, Gn = /^ *:-+ *$/, Bn = /^ *-+: *$/, Je = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", Hn = new RegExp(`^([*_])\\1${Je}\\1\\1(?!\\1)`), Yn = new RegExp(`^([*_])${Je}\\1(?!\\1)`), $n = new RegExp(`^(==)${Je}\\1`), Qn = new RegExp(`^(~~)${Je}\\1`), Un = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, Fn = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Vn = /^\n+/, Jn = /^([ \t]*)/, Xn = /\\([^\\])/g, Kn = /(?:^|\n)( *)$/, _t = "(?:\\d+\\.)", vt = "(?:[*+-])";
2628
+ function zr(e) {
2621
2629
  return "( *)(" + (e === 1 ? _t : vt) + ") +";
2622
2630
  }
2623
- const zr = Er(1), Rr = Er(2);
2624
- function Zr(e) {
2625
- return new RegExp("^" + (e === 1 ? zr : Rr));
2626
- }
2627
- const Kn = Zr(1), el = Zr(2);
2631
+ const Rr = zr(1), Zr = zr(2);
2628
2632
  function Wr(e) {
2629
- return new RegExp("^" + (e === 1 ? zr : Rr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? _t : vt) + " )[^\\n]*)*(\\n|$)", "gm");
2633
+ return new RegExp("^" + (e === 1 ? Rr : Zr));
2630
2634
  }
2631
- const tl = Wr(1), rl = Wr(2);
2635
+ const el = Wr(1), tl = Wr(2);
2632
2636
  function qr(e) {
2637
+ return new RegExp("^" + (e === 1 ? Rr : Zr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? _t : vt) + " )[^\\n]*)*(\\n|$)", "gm");
2638
+ }
2639
+ const rl = qr(1), al = qr(2);
2640
+ function Pr(e) {
2633
2641
  const t = e === 1 ? _t : vt;
2634
2642
  return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
2635
2643
  }
2636
- const Pr = qr(1), Gr = qr(2);
2644
+ const Gr = Pr(1), Br = Pr(2);
2637
2645
  function Ht(e, t) {
2638
- const r = t === 1, a = r ? Pr : Gr, i = r ? tl : rl, l = r ? Kn : el;
2646
+ const r = t === 1, a = r ? Gr : Br, i = r ? rl : al, l = r ? el : tl;
2639
2647
  return {
2640
- match: fe(function(s, u) {
2641
- const c = Xn.exec(u.prevCapture);
2648
+ match: be(function(s, u) {
2649
+ const c = Kn.exec(u.prevCapture);
2642
2650
  return c && (u.list || !u.inline && !u.simple) ? a.exec(s = c[1] + s) : null;
2643
2651
  }),
2644
2652
  order: 1,
2645
2653
  parse(s, u, c) {
2646
- const g = r ? +s[2] : void 0, f = s[0].replace(hn, `
2654
+ const g = r ? +s[2] : void 0, b = s[0].replace(mn, `
2647
2655
  `).match(i);
2648
2656
  let x = !1;
2649
2657
  return {
2650
- items: f.map(function(o, p) {
2651
- const d = l.exec(o)[0].length, m = new RegExp("^ {1," + d + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = p === f.length - 1, _ = h.indexOf(`
2658
+ items: b.map(function(o, p) {
2659
+ const d = l.exec(o)[0].length, m = new RegExp("^ {1," + d + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = p === b.length - 1, _ = h.indexOf(`
2652
2660
 
2653
2661
  `) !== -1 || w && x;
2654
2662
  x = _;
@@ -2667,14 +2675,14 @@ function Ht(e, t) {
2667
2675
  render: (s, u, c) => e(s.ordered ? "ol" : "ul", {
2668
2676
  key: c.key,
2669
2677
  start: s.type === k.orderedList ? s.start : void 0
2670
- }, s.items.map(function(g, f) {
2678
+ }, s.items.map(function(g, b) {
2671
2679
  return e("li", {
2672
- key: f
2680
+ key: b
2673
2681
  }, u(g, c));
2674
2682
  }))
2675
2683
  };
2676
2684
  }
2677
- const al = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), il = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Br = [Ir, Dr, Ar, Lr, Nr, Tr, Or, Pr, Gr], ol = [...Br, /^[^\n]+(?: \n|\n{2,})/, dt, jr, ct];
2685
+ const il = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), ol = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Hr = [Dr, Ar, Lr, Tr, jr, Nr, Er, Gr, Br], nl = [...Hr, /^[^\n]+(?: \n|\n{2,})/, dt, Or, ct];
2678
2686
  function Ae(e) {
2679
2687
  let t = e.length;
2680
2688
  for (; t > 0 && e[t - 1] <= " "; )
@@ -2684,8 +2692,8 @@ function Ae(e) {
2684
2692
  function ve(e) {
2685
2693
  return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
2686
2694
  }
2687
- function nl(e) {
2688
- return Gn.test(e) ? "right" : qn.test(e) ? "center" : Pn.test(e) ? "left" : null;
2695
+ function ll(e) {
2696
+ return Bn.test(e) ? "right" : Pn.test(e) ? "center" : Gn.test(e) ? "left" : null;
2689
2697
  }
2690
2698
  function Yt(e, t, r, a) {
2691
2699
  const i = r.inTable;
@@ -2697,13 +2705,13 @@ function Yt(e, t, r, a) {
2697
2705
  const c = l[l.length - 1];
2698
2706
  c.push.apply(c, t(s, r)), s = "";
2699
2707
  }
2700
- return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c, g, f) => {
2701
- c.trim() === "|" && (u(), a) ? g !== 0 && g !== f.length - 1 && l.push([]) : s += c;
2708
+ return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c, g, b) => {
2709
+ c.trim() === "|" && (u(), a) ? g !== 0 && g !== b.length - 1 && l.push([]) : s += c;
2702
2710
  }), u(), r.inTable = i, l;
2703
2711
  }
2704
- function ll(e, t, r) {
2712
+ function sl(e, t, r) {
2705
2713
  r.inline = !0;
2706
- const a = e[2] ? e[2].replace(Wn, "").split("|").map(nl) : [], i = e[3] ? function(s, u, c) {
2714
+ const a = e[2] ? e[2].replace(qn, "").split("|").map(ll) : [], i = e[3] ? function(s, u, c) {
2707
2715
  return s.trim().split(`
2708
2716
  `).map(function(g) {
2709
2717
  return Yt(g, u, c, !0);
@@ -2724,16 +2732,16 @@ function $t(e, t) {
2724
2732
  textAlign: e.align[t]
2725
2733
  };
2726
2734
  }
2727
- function fe(e) {
2735
+ function be(e) {
2728
2736
  return e.inline = 1, e;
2729
2737
  }
2730
2738
  function oe(e) {
2731
- return fe(function(t, r) {
2739
+ return be(function(t, r) {
2732
2740
  return r.inline ? e.exec(t) : null;
2733
2741
  });
2734
2742
  }
2735
2743
  function ne(e) {
2736
- return fe(function(t, r) {
2744
+ return be(function(t, r) {
2737
2745
  return r.inline || r.simple ? e.exec(t) : null;
2738
2746
  });
2739
2747
  }
@@ -2743,25 +2751,25 @@ function re(e) {
2743
2751
  };
2744
2752
  }
2745
2753
  function Se(e) {
2746
- return fe(function(t) {
2754
+ return be(function(t) {
2747
2755
  return e.exec(t);
2748
2756
  });
2749
2757
  }
2750
- function sl(e, t) {
2758
+ function dl(e, t) {
2751
2759
  if (t.inline || t.simple)
2752
2760
  return null;
2753
2761
  let r = "";
2754
2762
  e.split(`
2755
2763
  `).every((i) => (i += `
2756
- `, !Br.some((l) => l.test(i)) && (r += i, !!i.trim())));
2764
+ `, !Hr.some((l) => l.test(i)) && (r += i, !!i.trim())));
2757
2765
  const a = Ae(r);
2758
2766
  return a == "" ? null : [r, , a];
2759
2767
  }
2760
- const dl = /(javascript|vbscript|data(?!:image)):/i;
2761
- function cl(e) {
2768
+ const cl = /(javascript|vbscript|data(?!:image)):/i;
2769
+ function pl(e) {
2762
2770
  try {
2763
2771
  const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
2764
- if (dl.test(t))
2772
+ if (cl.test(t))
2765
2773
  return null;
2766
2774
  } catch {
2767
2775
  return null;
@@ -2769,7 +2777,7 @@ function cl(e) {
2769
2777
  return e;
2770
2778
  }
2771
2779
  function Qt(e) {
2772
- return e.replace(Jn, "$1");
2780
+ return e.replace(Xn, "$1");
2773
2781
  }
2774
2782
  function Pe(e, t, r) {
2775
2783
  const a = r.inline || !1, i = r.simple || !1;
@@ -2777,13 +2785,13 @@ function Pe(e, t, r) {
2777
2785
  const l = e(t, r);
2778
2786
  return r.inline = a, r.simple = i, l;
2779
2787
  }
2780
- function pl(e, t, r) {
2788
+ function ul(e, t, r) {
2781
2789
  const a = r.inline || !1, i = r.simple || !1;
2782
2790
  r.inline = !1, r.simple = !0;
2783
2791
  const l = e(t, r);
2784
2792
  return r.inline = a, r.simple = i, l;
2785
2793
  }
2786
- function ul(e, t, r) {
2794
+ function gl(e, t, r) {
2787
2795
  const a = r.inline || !1;
2788
2796
  r.inline = !1;
2789
2797
  const i = e(t, r);
@@ -2798,7 +2806,7 @@ function tt() {
2798
2806
  function rt() {
2799
2807
  return null;
2800
2808
  }
2801
- function gl(...e) {
2809
+ function hl(...e) {
2802
2810
  return e.filter(Boolean).join(" ");
2803
2811
  }
2804
2812
  function at(e, t, r) {
@@ -2808,21 +2816,21 @@ function at(e, t, r) {
2808
2816
  i.shift();
2809
2817
  return a || r;
2810
2818
  }
2811
- function hl(e = "", t = {}) {
2819
+ function ml(e = "", t = {}) {
2812
2820
  function r(o, p, ...d) {
2813
2821
  const m = at(t.overrides, `${o}.props`, {});
2814
2822
  return t.createElement(function(h, w) {
2815
2823
  const _ = at(w, h);
2816
2824
  return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : at(w, `${h}.component`, h) : h;
2817
- }(o, t.overrides), de({}, p, m, {
2818
- className: gl(p == null ? void 0 : p.className, m.className) || void 0
2825
+ }(o, t.overrides), ce({}, p, m, {
2826
+ className: hl(p == null ? void 0 : p.className, m.className) || void 0
2819
2827
  }), ...d);
2820
2828
  }
2821
2829
  function a(o) {
2822
- o = o.replace(Sn, "");
2830
+ o = o.replace(Mn, "");
2823
2831
  let p = !1;
2824
- t.forceInline ? p = !0 : t.forceBlock || (p = Rn.test(o) === !1);
2825
- const d = g(c(p ? o : `${Ae(o).replace(Fn, "")}
2832
+ t.forceInline ? p = !0 : t.forceBlock || (p = Zn.test(o) === !1);
2833
+ const d = g(c(p ? o : `${Ae(o).replace(Vn, "")}
2826
2834
 
2827
2835
  `, {
2828
2836
  inline: p
@@ -2847,12 +2855,12 @@ function hl(e = "", t = {}) {
2847
2855
  }, h);
2848
2856
  }
2849
2857
  function i(o, p) {
2850
- const d = p.match(un);
2858
+ const d = p.match(gn);
2851
2859
  return d ? d.reduce(function(m, h) {
2852
2860
  const w = h.indexOf("=");
2853
2861
  if (w !== -1) {
2854
2862
  const _ = function(S) {
2855
- return S.indexOf("-") !== -1 && S.match(Dn) === null && (S = S.replace(jn, function(L, Z) {
2863
+ return S.indexOf("-") !== -1 && S.match(An) === null && (S = S.replace(On, function(L, Z) {
2856
2864
  return Z.toUpperCase();
2857
2865
  })), S;
2858
2866
  }(h.slice(0, w)).trim(), y = function(S) {
@@ -2874,9 +2882,9 @@ function hl(e = "", t = {}) {
2874
2882
  else {
2875
2883
  const Q = $.trim();
2876
2884
  if (Q) {
2877
- const se = Q.indexOf(":");
2878
- if (se > 0) {
2879
- const ge = Q.slice(0, se).trim(), ye = Q.slice(se + 1).trim();
2885
+ const de = Q.indexOf(":");
2886
+ if (de > 0) {
2887
+ const ge = Q.slice(0, de).trim(), ye = Q.slice(de + 1).trim();
2880
2888
  B.push([ge, ye]);
2881
2889
  }
2882
2890
  }
@@ -2894,7 +2902,7 @@ function hl(e = "", t = {}) {
2894
2902
  return B;
2895
2903
  }(Z).reduce(function(U, [B, $]) {
2896
2904
  return U[B.replace(/(-[a-z])/g, (F) => F[1].toUpperCase())] = ue($, S, B), U;
2897
- }, {}) : pn.indexOf(L) !== -1 ? ue(Z, S, L) : (Z.match(An) && (Z = Z.slice(1, Z.length - 1)), Z === "true" || Z !== "false" && Z);
2905
+ }, {}) : un.indexOf(L) !== -1 ? ue(Z, S, L) : (Z.match(Ln) && (Z = Z.slice(1, Z.length - 1)), Z === "true" || Z !== "false" && Z);
2898
2906
  }(o, _, y, t.sanitizer);
2899
2907
  typeof A == "string" && (dt.test(A) || ct.test(A)) && (m[I] = a(A.trim()));
2900
2908
  } else
@@ -2902,13 +2910,13 @@ function hl(e = "", t = {}) {
2902
2910
  return m;
2903
2911
  }, {}) : null;
2904
2912
  }
2905
- t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || cl, t.slugify = t.slugify || ve, t.namedCodesToUnicode = t.namedCodesToUnicode ? de({}, Gt, t.namedCodesToUnicode) : Gt, t.createElement = t.createElement || Qa;
2913
+ t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || pl, t.slugify = t.slugify || ve, t.namedCodesToUnicode = t.namedCodesToUnicode ? ce({}, Gt, t.namedCodesToUnicode) : Gt, t.createElement = t.createElement || Ua;
2906
2914
  const l = [], s = {}, u = {
2907
2915
  [k.blockQuote]: {
2908
- match: re(Ir),
2916
+ match: re(Dr),
2909
2917
  order: 1,
2910
2918
  parse(o, p, d) {
2911
- const [, m, h] = o[0].replace(mn, "").match(bn);
2919
+ const [, m, h] = o[0].replace(fn, "").match(bn);
2912
2920
  return {
2913
2921
  alert: m,
2914
2922
  children: p(h, d)
@@ -2931,7 +2939,7 @@ function hl(e = "", t = {}) {
2931
2939
  }
2932
2940
  },
2933
2941
  [k.breakLine]: {
2934
- match: Se(fn),
2942
+ match: Se(xn),
2935
2943
  order: 1,
2936
2944
  parse: tt,
2937
2945
  render: (o, p, d) => r("br", {
@@ -2939,7 +2947,7 @@ function hl(e = "", t = {}) {
2939
2947
  })
2940
2948
  },
2941
2949
  [k.breakThematic]: {
2942
- match: re(xn),
2950
+ match: re(kn),
2943
2951
  order: 1,
2944
2952
  parse: tt,
2945
2953
  render: (o, p, d) => r("hr", {
@@ -2947,7 +2955,7 @@ function hl(e = "", t = {}) {
2947
2955
  })
2948
2956
  },
2949
2957
  [k.codeBlock]: {
2950
- match: re(Ar),
2958
+ match: re(Lr),
2951
2959
  order: 0,
2952
2960
  parse: (o) => ({
2953
2961
  lang: void 0,
@@ -2955,12 +2963,12 @@ function hl(e = "", t = {}) {
2955
2963
  }),
2956
2964
  render: (o, p, d) => r("pre", {
2957
2965
  key: d.key
2958
- }, r("code", de({}, o.attrs, {
2966
+ }, r("code", ce({}, o.attrs, {
2959
2967
  className: o.lang ? `lang-${o.lang}` : ""
2960
2968
  }), o.text))
2961
2969
  },
2962
2970
  [k.codeFenced]: {
2963
- match: re(Dr),
2971
+ match: re(Ar),
2964
2972
  order: 0,
2965
2973
  parse: (o) => ({
2966
2974
  attrs: i("code", o[3] || ""),
@@ -2970,7 +2978,7 @@ function hl(e = "", t = {}) {
2970
2978
  })
2971
2979
  },
2972
2980
  [k.codeInline]: {
2973
- match: ne(kn),
2981
+ match: ne(yn),
2974
2982
  order: 3,
2975
2983
  parse: (o) => ({
2976
2984
  text: o[2].replace(Bt, "$1")
@@ -2980,7 +2988,7 @@ function hl(e = "", t = {}) {
2980
2988
  }, o.text)
2981
2989
  },
2982
2990
  [k.footnote]: {
2983
- match: re(Cn),
2991
+ match: re(_n),
2984
2992
  order: 0,
2985
2993
  parse: (o) => (l.push({
2986
2994
  footnote: o[2],
@@ -2989,7 +2997,7 @@ function hl(e = "", t = {}) {
2989
2997
  render: rt
2990
2998
  },
2991
2999
  [k.footnoteReference]: {
2992
- match: oe(_n),
3000
+ match: oe(vn),
2993
3001
  order: 1,
2994
3002
  parse: (o) => ({
2995
3003
  target: `#${t.slugify(o[1], ve)}`,
@@ -3003,7 +3011,7 @@ function hl(e = "", t = {}) {
3003
3011
  }, o.text))
3004
3012
  },
3005
3013
  [k.gfmTask]: {
3006
- match: oe(Mn),
3014
+ match: oe(In),
3007
3015
  order: 1,
3008
3016
  parse: (o) => ({
3009
3017
  completed: o[1].toLowerCase() === "x"
@@ -3016,7 +3024,7 @@ function hl(e = "", t = {}) {
3016
3024
  })
3017
3025
  },
3018
3026
  [k.heading]: {
3019
- match: re(t.enforceAtxHeadings ? Tr : Lr),
3027
+ match: re(t.enforceAtxHeadings ? Nr : Tr),
3020
3028
  order: 1,
3021
3029
  parse: (o, p, d) => ({
3022
3030
  children: Pe(p, o[2], d),
@@ -3029,7 +3037,7 @@ function hl(e = "", t = {}) {
3029
3037
  }, p(o.children, d))
3030
3038
  },
3031
3039
  [k.headingSetext]: {
3032
- match: re(Nr),
3040
+ match: re(jr),
3033
3041
  order: 0,
3034
3042
  parse: (o, p, d) => ({
3035
3043
  children: Pe(p, o[1], d),
@@ -3041,16 +3049,16 @@ function hl(e = "", t = {}) {
3041
3049
  match: Se(dt),
3042
3050
  order: 1,
3043
3051
  parse(o, p, d) {
3044
- const [, m] = o[3].match(Vn), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), _ = (y = w, ol.some((Z) => Z.test(y)) ? ul : Pe);
3052
+ const [, m] = o[3].match(Jn), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), _ = (y = w, nl.some((Z) => Z.test(y)) ? gl : Pe);
3045
3053
  var y;
3046
- const I = o[1].toLowerCase(), A = cn.indexOf(I) !== -1, S = (A ? I : o[1]).trim(), L = {
3054
+ const I = o[1].toLowerCase(), A = pn.indexOf(I) !== -1, S = (A ? I : o[1]).trim(), L = {
3047
3055
  attrs: i(S, o[2]),
3048
3056
  noInnerParse: A,
3049
3057
  tag: S
3050
3058
  };
3051
3059
  return d.inAnchor = d.inAnchor || I === "a", A ? L.text = o[3] : L.children = _(p, w, d), d.inAnchor = !1, L;
3052
3060
  },
3053
- render: (o, p, d) => r(o.tag, de({
3061
+ render: (o, p, d) => r(o.tag, ce({
3054
3062
  key: d.key
3055
3063
  }, o.attrs), o.text || (o.children ? p(o.children, d) : ""))
3056
3064
  },
@@ -3064,18 +3072,18 @@ function hl(e = "", t = {}) {
3064
3072
  tag: p
3065
3073
  };
3066
3074
  },
3067
- render: (o, p, d) => r(o.tag, de({}, o.attrs, {
3075
+ render: (o, p, d) => r(o.tag, ce({}, o.attrs, {
3068
3076
  key: d.key
3069
3077
  }))
3070
3078
  },
3071
3079
  [k.htmlComment]: {
3072
- match: Se(jr),
3080
+ match: Se(Or),
3073
3081
  order: 1,
3074
3082
  parse: () => ({}),
3075
3083
  render: rt
3076
3084
  },
3077
3085
  [k.image]: {
3078
- match: ne(il),
3086
+ match: ne(ol),
3079
3087
  order: 1,
3080
3088
  parse: (o) => ({
3081
3089
  alt: o[1],
@@ -3090,10 +3098,10 @@ function hl(e = "", t = {}) {
3090
3098
  })
3091
3099
  },
3092
3100
  [k.link]: {
3093
- match: oe(al),
3101
+ match: oe(il),
3094
3102
  order: 3,
3095
3103
  parse: (o, p, d) => ({
3096
- children: pl(p, o[1], d),
3104
+ children: ul(p, o[1], d),
3097
3105
  target: Qt(o[2]),
3098
3106
  title: o[3]
3099
3107
  }),
@@ -3104,7 +3112,7 @@ function hl(e = "", t = {}) {
3104
3112
  }, p(o.children, d))
3105
3113
  },
3106
3114
  [k.linkAngleBraceStyleDetector]: {
3107
- match: oe(Nn),
3115
+ match: oe(jn),
3108
3116
  order: 0,
3109
3117
  parse: (o) => ({
3110
3118
  children: [{
@@ -3116,7 +3124,7 @@ function hl(e = "", t = {}) {
3116
3124
  })
3117
3125
  },
3118
3126
  [k.linkBareUrlDetector]: {
3119
- match: fe((o, p) => p.inAnchor || t.disableAutoLink ? null : oe(Ln)(o, p)),
3127
+ match: be((o, p) => p.inAnchor || t.disableAutoLink ? null : oe(Tn)(o, p)),
3120
3128
  order: 0,
3121
3129
  parse: (o) => ({
3122
3130
  children: [{
@@ -3129,11 +3137,11 @@ function hl(e = "", t = {}) {
3129
3137
  })
3130
3138
  },
3131
3139
  [k.linkMailtoDetector]: {
3132
- match: oe(Tn),
3140
+ match: oe(Nn),
3133
3141
  order: 0,
3134
3142
  parse(o) {
3135
3143
  let p = o[1], d = o[1];
3136
- return gn.test(d) || (d = "mailto:" + d), {
3144
+ return hn.test(d) || (d = "mailto:" + d), {
3137
3145
  children: [{
3138
3146
  text: p.replace("mailto:", ""),
3139
3147
  type: k.text
@@ -3146,14 +3154,14 @@ function hl(e = "", t = {}) {
3146
3154
  [k.orderedList]: Ht(r, 1),
3147
3155
  [k.unorderedList]: Ht(r, 2),
3148
3156
  [k.newlineCoalescer]: {
3149
- match: re(yn),
3157
+ match: re(wn),
3150
3158
  order: 3,
3151
3159
  parse: tt,
3152
3160
  render: () => `
3153
3161
  `
3154
3162
  },
3155
3163
  [k.paragraph]: {
3156
- match: fe(sl),
3164
+ match: be(dl),
3157
3165
  order: 3,
3158
3166
  parse: et,
3159
3167
  render: (o, p, d) => r("p", {
@@ -3161,7 +3169,7 @@ function hl(e = "", t = {}) {
3161
3169
  }, p(o.children, d))
3162
3170
  },
3163
3171
  [k.ref]: {
3164
- match: oe(On),
3172
+ match: oe(En),
3165
3173
  order: 0,
3166
3174
  parse: (o) => (s[o[1]] = {
3167
3175
  target: o[2],
@@ -3170,7 +3178,7 @@ function hl(e = "", t = {}) {
3170
3178
  render: rt
3171
3179
  },
3172
3180
  [k.refImage]: {
3173
- match: ne(En),
3181
+ match: ne(zn),
3174
3182
  order: 0,
3175
3183
  parse: (o) => ({
3176
3184
  alt: o[1] || void 0,
@@ -3184,7 +3192,7 @@ function hl(e = "", t = {}) {
3184
3192
  }) : null
3185
3193
  },
3186
3194
  [k.refLink]: {
3187
- match: oe(zn),
3195
+ match: oe(Rn),
3188
3196
  order: 0,
3189
3197
  parse: (o, p, d) => ({
3190
3198
  children: p(o[1], d),
@@ -3200,9 +3208,9 @@ function hl(e = "", t = {}) {
3200
3208
  }, o.fallbackChildren)
3201
3209
  },
3202
3210
  [k.table]: {
3203
- match: re(Or),
3211
+ match: re(Er),
3204
3212
  order: 1,
3205
- parse: ll,
3213
+ parse: sl,
3206
3214
  render(o, p, d) {
3207
3215
  const m = o;
3208
3216
  return r("table", {
@@ -3225,15 +3233,15 @@ function hl(e = "", t = {}) {
3225
3233
  }
3226
3234
  },
3227
3235
  [k.text]: {
3228
- match: Se(Un),
3236
+ match: Se(Fn),
3229
3237
  order: 4,
3230
3238
  parse: (o) => ({
3231
- text: o[0].replace(In, (p, d) => t.namedCodesToUnicode[d] ? t.namedCodesToUnicode[d] : p)
3239
+ text: o[0].replace(Dn, (p, d) => t.namedCodesToUnicode[d] ? t.namedCodesToUnicode[d] : p)
3232
3240
  }),
3233
3241
  render: (o) => o.text
3234
3242
  },
3235
3243
  [k.textBolded]: {
3236
- match: ne(Bn),
3244
+ match: ne(Hn),
3237
3245
  order: 2,
3238
3246
  parse: (o, p, d) => ({
3239
3247
  children: p(o[2], d)
@@ -3243,7 +3251,7 @@ function hl(e = "", t = {}) {
3243
3251
  }, p(o.children, d))
3244
3252
  },
3245
3253
  [k.textEmphasized]: {
3246
- match: ne(Hn),
3254
+ match: ne(Yn),
3247
3255
  order: 3,
3248
3256
  parse: (o, p, d) => ({
3249
3257
  children: p(o[2], d)
@@ -3253,7 +3261,7 @@ function hl(e = "", t = {}) {
3253
3261
  }, p(o.children, d))
3254
3262
  },
3255
3263
  [k.textEscaped]: {
3256
- match: ne(Qn),
3264
+ match: ne(Un),
3257
3265
  order: 1,
3258
3266
  parse: (o) => ({
3259
3267
  text: o[1],
@@ -3261,7 +3269,7 @@ function hl(e = "", t = {}) {
3261
3269
  })
3262
3270
  },
3263
3271
  [k.textMarked]: {
3264
- match: ne(Yn),
3272
+ match: ne($n),
3265
3273
  order: 3,
3266
3274
  parse: et,
3267
3275
  render: (o, p, d) => r("mark", {
@@ -3269,7 +3277,7 @@ function hl(e = "", t = {}) {
3269
3277
  }, p(o.children, d))
3270
3278
  },
3271
3279
  [k.textStrikethroughed]: {
3272
- match: ne($n),
3280
+ match: ne(Qn),
3273
3281
  order: 3,
3274
3282
  parse: et,
3275
3283
  render: (o, p, d) => r("del", {
@@ -3304,11 +3312,11 @@ function hl(e = "", t = {}) {
3304
3312
  return w !== _ ? w - _ : m < h ? -1 : 1;
3305
3313
  }), function(m, h) {
3306
3314
  return d(function(w) {
3307
- return w.replace(wn, `
3308
- `).replace(vn, "").replace(Zn, " ");
3315
+ return w.replace(Cn, `
3316
+ `).replace(Sn, "").replace(Wn, " ");
3309
3317
  }(m), h);
3310
3318
  };
3311
- }(u), g = (f = /* @__PURE__ */ function(o, p) {
3319
+ }(u), g = (b = /* @__PURE__ */ function(o, p) {
3312
3320
  return function(d, m, h) {
3313
3321
  const w = o[d.type].render;
3314
3322
  return p ? p(() => w(d, m, h), d, m, h) : w(d, m, h);
@@ -3324,9 +3332,9 @@ function hl(e = "", t = {}) {
3324
3332
  }
3325
3333
  return d.key = m, h;
3326
3334
  }
3327
- return f(p, o, d);
3335
+ return b(p, o, d);
3328
3336
  });
3329
- var f;
3337
+ var b;
3330
3338
  const x = a(e);
3331
3339
  return l.length ? r("div", null, x, r("footer", {
3332
3340
  key: "footer"
@@ -3339,7 +3347,7 @@ function hl(e = "", t = {}) {
3339
3347
  })));
3340
3348
  }))) : x;
3341
3349
  }
3342
- const ml = (e) => {
3350
+ const fl = (e) => {
3343
3351
  let {
3344
3352
  children: t = "",
3345
3353
  options: r
@@ -3350,8 +3358,8 @@ const ml = (e) => {
3350
3358
  for (u = 0; u < g.length; u++)
3351
3359
  l.indexOf(s = g[u]) >= 0 || (c[s] = i[s]);
3352
3360
  return c;
3353
- }(e, dn);
3354
- return Ya(hl(t, r), a);
3361
+ }(e, cn);
3362
+ return $a(ml(t, r), a);
3355
3363
  }, bl = /* @__PURE__ */ C("div", {
3356
3364
  target: "e197bd6i0",
3357
3365
  label: "FlexContainer"
@@ -3361,7 +3369,7 @@ const ml = (e) => {
3361
3369
  justify-content: flex-end;
3362
3370
  ` : q`
3363
3371
  justify-content: flex-start;
3364
- `), Hr = /* @__PURE__ */ C("div", {
3372
+ `), Yr = /* @__PURE__ */ C("div", {
3365
3373
  target: "e197bd6i1",
3366
3374
  label: "MessageContainer"
3367
3375
  })("font-size:inherit;line-height:inherit;padding-top:8.5px;padding-bottom:8.5px;padding-left:0.5rem;padding-right:0.5rem;white-space:pre-wrap;overflow-wrap:break-word;box-sizing:border-box;", ({
@@ -3381,7 +3389,7 @@ const ml = (e) => {
3381
3389
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
3382
3390
  theme: e,
3383
3391
  align: t
3384
- }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), le = ({
3392
+ }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor, ";"), se = ({
3385
3393
  align: e,
3386
3394
  children: t
3387
3395
  }) => {
@@ -3391,25 +3399,25 @@ const ml = (e) => {
3391
3399
  return /* @__PURE__ */ n(bl, {
3392
3400
  theme: r,
3393
3401
  align: e,
3394
- children: /* @__PURE__ */ n(Hr, {
3402
+ children: /* @__PURE__ */ n(Yr, {
3395
3403
  theme: r,
3396
3404
  align: e,
3397
- children: typeof t == "string" ? /* @__PURE__ */ n(ml, {
3405
+ children: typeof t == "string" ? /* @__PURE__ */ n(fl, {
3398
3406
  children: t
3399
3407
  }) : t
3400
3408
  })
3401
3409
  });
3402
3410
  };
3403
- function fl() {
3411
+ function xl() {
3404
3412
  const {
3405
3413
  welcomeText: e
3406
3414
  } = ie();
3407
- return e === !1 ? null : /* @__PURE__ */ n(le, {
3415
+ return e === !1 ? null : /* @__PURE__ */ n(se, {
3408
3416
  align: "left",
3409
3417
  children: e
3410
3418
  });
3411
3419
  }
3412
- const xl = /* @__PURE__ */ C("div", {
3420
+ const kl = /* @__PURE__ */ C("div", {
3413
3421
  target: "ewt6vnj0",
3414
3422
  label: "FlexContainer"
3415
3423
  })("display:flex;", ({
@@ -3418,7 +3426,7 @@ const xl = /* @__PURE__ */ C("div", {
3418
3426
  justify-content: flex-end;
3419
3427
  ` : q`
3420
3428
  justify-content: flex-start;
3421
- `), kl = /* @__PURE__ */ C("button", {
3429
+ `), yl = /* @__PURE__ */ C("button", {
3422
3430
  target: "ewt6vnj1",
3423
3431
  label: "MessageButton"
3424
3432
  })("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
@@ -3483,9 +3491,9 @@ function $e({
3483
3491
  const {
3484
3492
  themeSettings: s
3485
3493
  } = D();
3486
- return /* @__PURE__ */ n(xl, {
3494
+ return /* @__PURE__ */ n(kl, {
3487
3495
  align: t,
3488
- children: /* @__PURE__ */ n(kl, {
3496
+ children: /* @__PURE__ */ n(yl, {
3489
3497
  "aria-label": l,
3490
3498
  theme: s,
3491
3499
  onClick: r,
@@ -3496,7 +3504,7 @@ function $e({
3496
3504
  })
3497
3505
  });
3498
3506
  }
3499
- function yl({
3507
+ function wl({
3500
3508
  onCancel: e,
3501
3509
  onConfirm: t
3502
3510
  }) {
@@ -3504,7 +3512,7 @@ function yl({
3504
3512
  t: r
3505
3513
  } = E();
3506
3514
  return /* @__PURE__ */ v(Y, {
3507
- children: [/* @__PURE__ */ n(le, {
3515
+ children: [/* @__PURE__ */ n(se, {
3508
3516
  align: "left",
3509
3517
  children: r("ai.clearHistoryPrompt")
3510
3518
  }), /* @__PURE__ */ v("div", {
@@ -3529,8 +3537,8 @@ function yl({
3529
3537
  })]
3530
3538
  });
3531
3539
  }
3532
- var wl = Fa("toLowerCase");
3533
- function Cl() {
3540
+ var Cl = Va("toLowerCase");
3541
+ function _l() {
3534
3542
  const {
3535
3543
  themeSettings: e
3536
3544
  } = D();
@@ -3548,7 +3556,7 @@ function Cl() {
3548
3556
  })
3549
3557
  });
3550
3558
  }
3551
- function _l({
3559
+ function vl({
3552
3560
  onClick: e
3553
3561
  }) {
3554
3562
  const {
@@ -3559,23 +3567,23 @@ function _l({
3559
3567
  onClick: e,
3560
3568
  children: /* @__PURE__ */ v("div", {
3561
3569
  className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
3562
- children: [/* @__PURE__ */ n(Cl, {}), t("ai.buttons.insights")]
3570
+ children: [/* @__PURE__ */ n(_l, {}), t("ai.buttons.insights")]
3563
3571
  })
3564
3572
  });
3565
3573
  }
3566
- function vl(e) {
3567
- return qa("MuiDialog", e);
3574
+ function Sl(e) {
3575
+ return Pa("MuiDialog", e);
3568
3576
  }
3569
- const it = ba("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Yr = /* @__PURE__ */ Qe({});
3570
- process.env.NODE_ENV !== "production" && (Yr.displayName = "DialogContext");
3571
- const Sl = Ue(fa, {
3577
+ const it = ba("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), $r = /* @__PURE__ */ Qe({});
3578
+ process.env.NODE_ENV !== "production" && ($r.displayName = "DialogContext");
3579
+ const Ml = Ue(xa, {
3572
3580
  name: "MuiDialog",
3573
3581
  slot: "Backdrop",
3574
3582
  overrides: (e, t) => t.backdrop
3575
3583
  })({
3576
3584
  // Improve scrollable dialog support.
3577
3585
  zIndex: -1
3578
- }), Ml = (e) => {
3586
+ }), Il = (e) => {
3579
3587
  const {
3580
3588
  classes: t,
3581
3589
  scroll: r,
@@ -3584,11 +3592,11 @@ const Sl = Ue(fa, {
3584
3592
  fullScreen: l
3585
3593
  } = e, s = {
3586
3594
  root: ["root"],
3587
- container: ["container", `scroll${be(r)}`],
3588
- paper: ["paper", `paperScroll${be(r)}`, `paperWidth${be(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
3595
+ container: ["container", `scroll${fe(r)}`],
3596
+ paper: ["paper", `paperScroll${fe(r)}`, `paperWidth${fe(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
3589
3597
  };
3590
- return La(s, vl, t);
3591
- }, Il = Ue(xa, {
3598
+ return Ta(s, Sl, t);
3599
+ }, Dl = Ue(ka, {
3592
3600
  name: "MuiDialog",
3593
3601
  slot: "Root",
3594
3602
  overridesResolver: (e, t) => t.root
@@ -3597,14 +3605,14 @@ const Sl = Ue(fa, {
3597
3605
  // Use !important to override the Modal inline-style.
3598
3606
  position: "absolute !important"
3599
3607
  }
3600
- }), Dl = Ue("div", {
3608
+ }), Al = Ue("div", {
3601
3609
  name: "MuiDialog",
3602
3610
  slot: "Container",
3603
3611
  overridesResolver: (e, t) => {
3604
3612
  const {
3605
3613
  ownerState: r
3606
3614
  } = e;
3607
- return [t.container, t[`scroll${be(r.scroll)}`]];
3615
+ return [t.container, t[`scroll${fe(r.scroll)}`]];
3608
3616
  }
3609
3617
  })({
3610
3618
  height: "100%",
@@ -3639,16 +3647,16 @@ const Sl = Ue(fa, {
3639
3647
  }
3640
3648
  }
3641
3649
  }]
3642
- }), Al = Ue(er, {
3650
+ }), Ll = Ue(er, {
3643
3651
  name: "MuiDialog",
3644
3652
  slot: "Paper",
3645
3653
  overridesResolver: (e, t) => {
3646
3654
  const {
3647
3655
  ownerState: r
3648
3656
  } = e;
3649
- return [t.paper, t[`scrollPaper${be(r.scroll)}`], t[`paperWidth${be(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
3657
+ return [t.paper, t[`scrollPaper${fe(r.scroll)}`], t[`paperWidth${fe(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
3650
3658
  }
3651
- })(ka(({
3659
+ })(ya(({
3652
3660
  theme: e
3653
3661
  }) => ({
3654
3662
  margin: 32,
@@ -3731,11 +3739,11 @@ const Sl = Ue(fa, {
3731
3739
  }
3732
3740
  }
3733
3741
  }]
3734
- }))), $r = /* @__PURE__ */ rr(function(e, t) {
3735
- const r = _a({
3742
+ }))), Qr = /* @__PURE__ */ rr(function(e, t) {
3743
+ const r = va({
3736
3744
  props: e,
3737
3745
  name: "MuiDialog"
3738
- }), a = va(), i = {
3746
+ }), a = Sa(), i = {
3739
3747
  enter: a.transitions.duration.enteringScreen,
3740
3748
  exit: a.transitions.duration.leavingScreen
3741
3749
  }, l = r, {
@@ -3743,7 +3751,7 @@ const Sl = Ue(fa, {
3743
3751
  "aria-labelledby": u,
3744
3752
  "aria-modal": c = !0,
3745
3753
  BackdropComponent: g,
3746
- BackdropProps: f,
3754
+ BackdropProps: b,
3747
3755
  children: x,
3748
3756
  className: o,
3749
3757
  disableEscapeKeyDown: p = !1,
@@ -3762,51 +3770,51 @@ const Sl = Ue(fa, {
3762
3770
  TransitionComponent: U = It,
3763
3771
  transitionDuration: B = i,
3764
3772
  TransitionProps: $
3765
- } = l, F = fr(l, ["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"]), H = T(M({}, r), {
3773
+ } = l, F = br(l, ["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"]), H = T(M({}, r), {
3766
3774
  disableEscapeKeyDown: p,
3767
3775
  fullScreen: d,
3768
3776
  fullWidth: m,
3769
3777
  maxWidth: h,
3770
3778
  scroll: L
3771
- }), V = Ml(H), J = ce(), z = (he) => {
3779
+ }), V = Il(H), J = pe(), z = (he) => {
3772
3780
  J.current = he.target === he.currentTarget;
3773
3781
  }, W = (he) => {
3774
3782
  _ && _(he), J.current && (J.current = null, w && w(he), y && y(he, "backdropClick"));
3775
- }, Q = Sa(u), se = P(() => ({
3783
+ }, Q = Ma(u), de = P(() => ({
3776
3784
  titleId: Q
3777
3785
  }), [Q]), ge = M({
3778
3786
  transition: U
3779
3787
  }, Z), ye = M({
3780
3788
  transition: $,
3781
3789
  paper: S,
3782
- backdrop: f
3790
+ backdrop: b
3783
3791
  }, ue), N = {
3784
3792
  slots: ge,
3785
3793
  slotProps: ye
3786
3794
  }, [X, Oe] = we("root", {
3787
- elementType: Il,
3795
+ elementType: Dl,
3788
3796
  shouldForwardComponentProp: !0,
3789
3797
  externalForwardedProps: N,
3790
3798
  ownerState: H,
3791
3799
  className: Ke(V.root, o),
3792
3800
  ref: t
3793
- }), [Ee, Fr] = we("backdrop", {
3794
- elementType: Sl,
3801
+ }), [Ee, Vr] = we("backdrop", {
3802
+ elementType: Ml,
3795
3803
  shouldForwardComponentProp: !0,
3796
3804
  externalForwardedProps: N,
3797
3805
  ownerState: H
3798
- }), [Vr, Jr] = we("paper", {
3799
- elementType: Al,
3806
+ }), [Jr, Xr] = we("paper", {
3807
+ elementType: Ll,
3800
3808
  shouldForwardComponentProp: !0,
3801
3809
  externalForwardedProps: N,
3802
3810
  ownerState: H,
3803
3811
  className: Ke(V.paper, S.className)
3804
- }), [Xr, Kr] = we("container", {
3805
- elementType: Dl,
3812
+ }), [Kr, ea] = we("container", {
3813
+ elementType: Al,
3806
3814
  externalForwardedProps: N,
3807
3815
  ownerState: H,
3808
3816
  className: Ke(V.container)
3809
- }), [ea, ta] = we("transition", {
3817
+ }), [ta, ra] = we("transition", {
3810
3818
  elementType: It,
3811
3819
  externalForwardedProps: N,
3812
3820
  ownerState: H,
@@ -3826,27 +3834,27 @@ const Sl = Ue(fa, {
3826
3834
  backdrop: M({
3827
3835
  transitionDuration: B,
3828
3836
  as: g
3829
- }, Fr)
3837
+ }, Vr)
3830
3838
  },
3831
3839
  disableEscapeKeyDown: p,
3832
3840
  onClose: y,
3833
3841
  open: I,
3834
3842
  onClick: W
3835
3843
  }, Oe), F), {
3836
- children: /* @__PURE__ */ Ce(ea, T(M({}, ta), {
3837
- children: /* @__PURE__ */ Ce(Xr, T(M({
3844
+ children: /* @__PURE__ */ Ce(ta, T(M({}, ra), {
3845
+ children: /* @__PURE__ */ Ce(Kr, T(M({
3838
3846
  onMouseDown: z
3839
- }, Kr), {
3840
- children: /* @__PURE__ */ Ce(Vr, T(M({
3847
+ }, ea), {
3848
+ children: /* @__PURE__ */ Ce(Jr, T(M({
3841
3849
  as: A,
3842
3850
  elevation: 24,
3843
3851
  role: "dialog",
3844
3852
  "aria-describedby": s,
3845
3853
  "aria-labelledby": Q,
3846
3854
  "aria-modal": c
3847
- }, Jr), {
3848
- children: /* @__PURE__ */ Ce(Yr.Provider, {
3849
- value: se,
3855
+ }, Xr), {
3856
+ children: /* @__PURE__ */ Ce($r.Provider, {
3857
+ value: de,
3850
3858
  children: x
3851
3859
  })
3852
3860
  }))
@@ -3854,7 +3862,7 @@ const Sl = Ue(fa, {
3854
3862
  }))
3855
3863
  }));
3856
3864
  });
3857
- process.env.NODE_ENV !== "production" && ($r.propTypes = {
3865
+ process.env.NODE_ENV !== "production" && (Qr.propTypes = {
3858
3866
  // ┌────────────────────────────── Warning ──────────────────────────────┐
3859
3867
  // │ These PropTypes are generated from the TypeScript type definitions. │
3860
3868
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -3862,17 +3870,17 @@ process.env.NODE_ENV !== "production" && ($r.propTypes = {
3862
3870
  /**
3863
3871
  * The id(s) of the element(s) that describe the dialog.
3864
3872
  */
3865
- "aria-describedby": b.string,
3873
+ "aria-describedby": f.string,
3866
3874
  /**
3867
3875
  * The id(s) of the element(s) that label the dialog.
3868
3876
  */
3869
- "aria-labelledby": b.string,
3877
+ "aria-labelledby": f.string,
3870
3878
  /**
3871
3879
  * Informs assistive technologies that the element is modal.
3872
3880
  * It's added on the element with role="dialog".
3873
3881
  * @default true
3874
3882
  */
3875
- "aria-modal": b.oneOfType([b.oneOf(["false", "true"]), b.bool]),
3883
+ "aria-modal": f.oneOfType([f.oneOf(["false", "true"]), f.bool]),
3876
3884
  /**
3877
3885
  * A backdrop component. This prop enables custom backdrop rendering.
3878
3886
  * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
@@ -3887,116 +3895,116 @@ process.env.NODE_ENV !== "production" && ($r.propTypes = {
3887
3895
  * zIndex: -1,
3888
3896
  * })
3889
3897
  */
3890
- BackdropComponent: b.elementType,
3898
+ BackdropComponent: f.elementType,
3891
3899
  /**
3892
3900
  * @ignore
3893
3901
  */
3894
- BackdropProps: b.object,
3902
+ BackdropProps: f.object,
3895
3903
  /**
3896
3904
  * Dialog children, usually the included sub-components.
3897
3905
  */
3898
- children: b.node,
3906
+ children: f.node,
3899
3907
  /**
3900
3908
  * Override or extend the styles applied to the component.
3901
3909
  */
3902
- classes: b.object,
3910
+ classes: f.object,
3903
3911
  /**
3904
3912
  * @ignore
3905
3913
  */
3906
- className: b.string,
3914
+ className: f.string,
3907
3915
  /**
3908
3916
  * If `true`, hitting escape will not fire the `onClose` callback.
3909
3917
  * @default false
3910
3918
  */
3911
- disableEscapeKeyDown: b.bool,
3919
+ disableEscapeKeyDown: f.bool,
3912
3920
  /**
3913
3921
  * If `true`, the dialog is full-screen.
3914
3922
  * @default false
3915
3923
  */
3916
- fullScreen: b.bool,
3924
+ fullScreen: f.bool,
3917
3925
  /**
3918
3926
  * If `true`, the dialog stretches to `maxWidth`.
3919
3927
  *
3920
3928
  * Notice that the dialog width grow is limited by the default margin.
3921
3929
  * @default false
3922
3930
  */
3923
- fullWidth: b.bool,
3931
+ fullWidth: f.bool,
3924
3932
  /**
3925
3933
  * Determine the max-width of the dialog.
3926
3934
  * The dialog width grows with the size of the screen.
3927
3935
  * Set to `false` to disable `maxWidth`.
3928
3936
  * @default 'sm'
3929
3937
  */
3930
- maxWidth: b.oneOfType([b.oneOf(["xs", "sm", "md", "lg", "xl", !1]), b.string]),
3938
+ maxWidth: f.oneOfType([f.oneOf(["xs", "sm", "md", "lg", "xl", !1]), f.string]),
3931
3939
  /**
3932
3940
  * Callback fired when the backdrop is clicked.
3933
3941
  * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
3934
3942
  */
3935
- onBackdropClick: b.func,
3943
+ onBackdropClick: f.func,
3936
3944
  /**
3937
3945
  * @ignore
3938
3946
  */
3939
- onClick: b.func,
3947
+ onClick: f.func,
3940
3948
  /**
3941
3949
  * Callback fired when the component requests to be closed.
3942
3950
  *
3943
3951
  * @param {object} event The event source of the callback.
3944
3952
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
3945
3953
  */
3946
- onClose: b.func,
3954
+ onClose: f.func,
3947
3955
  /**
3948
3956
  * If `true`, the component is shown.
3949
3957
  */
3950
- open: b.bool.isRequired,
3958
+ open: f.bool.isRequired,
3951
3959
  /**
3952
3960
  * The component used to render the body of the dialog.
3953
3961
  * @default Paper
3954
3962
  */
3955
- PaperComponent: b.elementType,
3963
+ PaperComponent: f.elementType,
3956
3964
  /**
3957
3965
  * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
3958
3966
  * @default {}
3959
3967
  * @deprecated Use `slotProps.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
3960
3968
  */
3961
- PaperProps: b.object,
3969
+ PaperProps: f.object,
3962
3970
  /**
3963
3971
  * Determine the container for scrolling the dialog.
3964
3972
  * @default 'paper'
3965
3973
  */
3966
- scroll: b.oneOf(["body", "paper"]),
3974
+ scroll: f.oneOf(["body", "paper"]),
3967
3975
  /**
3968
3976
  * The props used for each slot inside.
3969
3977
  * @default {}
3970
3978
  */
3971
- slotProps: b.shape({
3972
- backdrop: b.oneOfType([b.func, b.object]),
3973
- container: b.oneOfType([b.func, b.object]),
3974
- paper: b.oneOfType([b.func, b.object]),
3975
- root: b.oneOfType([b.func, b.object]),
3976
- transition: b.oneOfType([b.func, b.object])
3979
+ slotProps: f.shape({
3980
+ backdrop: f.oneOfType([f.func, f.object]),
3981
+ container: f.oneOfType([f.func, f.object]),
3982
+ paper: f.oneOfType([f.func, f.object]),
3983
+ root: f.oneOfType([f.func, f.object]),
3984
+ transition: f.oneOfType([f.func, f.object])
3977
3985
  }),
3978
3986
  /**
3979
3987
  * The components used for each slot inside.
3980
3988
  * @default {}
3981
3989
  */
3982
- slots: b.shape({
3983
- backdrop: b.elementType,
3984
- container: b.elementType,
3985
- paper: b.elementType,
3986
- root: b.elementType,
3987
- transition: b.elementType
3990
+ slots: f.shape({
3991
+ backdrop: f.elementType,
3992
+ container: f.elementType,
3993
+ paper: f.elementType,
3994
+ root: f.elementType,
3995
+ transition: f.elementType
3988
3996
  }),
3989
3997
  /**
3990
3998
  * The system prop that allows defining system overrides as well as additional CSS styles.
3991
3999
  */
3992
- sx: b.oneOfType([b.arrayOf(b.oneOfType([b.func, b.object, b.bool])), b.func, b.object]),
4000
+ sx: f.oneOfType([f.arrayOf(f.oneOfType([f.func, f.object, f.bool])), f.func, f.object]),
3993
4001
  /**
3994
4002
  * The component used for the transition.
3995
4003
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
3996
4004
  * @default Fade
3997
4005
  * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
3998
4006
  */
3999
- TransitionComponent: b.elementType,
4007
+ TransitionComponent: f.elementType,
4000
4008
  /**
4001
4009
  * The duration for the transition, in milliseconds.
4002
4010
  * You may specify a single timeout for all transitions, or individually with an object.
@@ -4005,19 +4013,19 @@ process.env.NODE_ENV !== "production" && ($r.propTypes = {
4005
4013
  * exit: theme.transitions.duration.leavingScreen,
4006
4014
  * }
4007
4015
  */
4008
- transitionDuration: b.oneOfType([b.number, b.shape({
4009
- appear: b.number,
4010
- enter: b.number,
4011
- exit: b.number
4016
+ transitionDuration: f.oneOfType([f.number, f.shape({
4017
+ appear: f.number,
4018
+ enter: f.number,
4019
+ exit: f.number
4012
4020
  })]),
4013
4021
  /**
4014
4022
  * Props applied to the transition element.
4015
4023
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
4016
4024
  * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
4017
4025
  */
4018
- TransitionProps: b.object
4026
+ TransitionProps: f.object
4019
4027
  });
4020
- function Ll({
4028
+ function Tl({
4021
4029
  fillColor: e = "#262E3D"
4022
4030
  }) {
4023
4031
  return /* @__PURE__ */ v("svg", {
@@ -4041,7 +4049,7 @@ function Ll({
4041
4049
  })]
4042
4050
  });
4043
4051
  }
4044
- const Qr = {
4052
+ const Ur = {
4045
4053
  row: {
4046
4054
  hover: "rgba(224, 224, 224, 0.3)"
4047
4055
  },
@@ -4126,9 +4134,9 @@ const Qr = {
4126
4134
  errorBG: "rgba(231, 71, 39, 0.1)"
4127
4135
  }
4128
4136
  }
4129
- }, Tl = {
4137
+ }, Nl = {
4130
4138
  shouldForwardProp: (e) => !e.startsWith("$")
4131
- }, je = /* @__PURE__ */ C(lr, Tl, {
4139
+ }, je = /* @__PURE__ */ C(lr, Nl, {
4132
4140
  target: "e869yoj0",
4133
4141
  label: "IconButton"
4134
4142
  })(({
@@ -4136,10 +4144,10 @@ const Qr = {
4136
4144
  }) => ({
4137
4145
  padding: 2,
4138
4146
  "&.MuiIconButton-root:hover": {
4139
- backgroundColor: e ?? Qr.interaction.defaultHover
4147
+ backgroundColor: e ?? Ur.interaction.defaultHover
4140
4148
  }
4141
4149
  }));
4142
- function Nl({
4150
+ function jl({
4143
4151
  fill: e = "rgba(38, 46, 61, 0.67)"
4144
4152
  }) {
4145
4153
  return /* @__PURE__ */ n("svg", {
@@ -4156,7 +4164,7 @@ function Nl({
4156
4164
  })
4157
4165
  });
4158
4166
  }
4159
- function jl({
4167
+ function Ol({
4160
4168
  fill: e = "rgba(38, 46, 61, 0.67)"
4161
4169
  }) {
4162
4170
  return /* @__PURE__ */ n("svg", {
@@ -4173,7 +4181,7 @@ function jl({
4173
4181
  })
4174
4182
  });
4175
4183
  }
4176
- function Ol() {
4184
+ function El() {
4177
4185
  return /* @__PURE__ */ n("svg", {
4178
4186
  xmlns: "http://www.w3.org/2000/svg",
4179
4187
  width: "24",
@@ -4189,7 +4197,7 @@ function Ol() {
4189
4197
  })
4190
4198
  });
4191
4199
  }
4192
- const St = (e) => nr(e.chart.backgroundColor), El = ({
4200
+ const St = (e) => nr(e.chart.backgroundColor), zl = ({
4193
4201
  title: e
4194
4202
  }) => {
4195
4203
  const {
@@ -4200,12 +4208,12 @@ const St = (e) => nr(e.chart.backgroundColor), El = ({
4200
4208
  children: /* @__PURE__ */ n(je, {
4201
4209
  disableTouchRipple: !0,
4202
4210
  $hoverColor: St(t),
4203
- children: /* @__PURE__ */ n(jl, {
4211
+ children: /* @__PURE__ */ n(Ol, {
4204
4212
  fill: t.chart.textColor
4205
4213
  })
4206
4214
  })
4207
4215
  });
4208
- }, zl = ({
4216
+ }, Rl = ({
4209
4217
  items: e
4210
4218
  }) => {
4211
4219
  const [t, r] = R(null), a = (s) => {
@@ -4220,10 +4228,10 @@ const St = (e) => nr(e.chart.backgroundColor), El = ({
4220
4228
  onClick: a,
4221
4229
  $hoverColor: St(l),
4222
4230
  "aria-label": "three dots button",
4223
- children: /* @__PURE__ */ n(Ja, {
4231
+ children: /* @__PURE__ */ n(Xa, {
4224
4232
  fill: l.chart.textColor
4225
4233
  })
4226
- }), /* @__PURE__ */ n(Ka, {
4234
+ }), /* @__PURE__ */ n(ei, {
4227
4235
  anchorEl: t,
4228
4236
  anchorOrigin: {
4229
4237
  vertical: "bottom",
@@ -4235,14 +4243,14 @@ const St = (e) => nr(e.chart.backgroundColor), El = ({
4235
4243
  },
4236
4244
  open: !!t,
4237
4245
  onClose: i,
4238
- children: e.map((s) => /* @__PURE__ */ v(Xa, {
4246
+ children: e.map((s) => /* @__PURE__ */ v(Ka, {
4239
4247
  onClick: () => {
4240
4248
  s.onClick(), i();
4241
4249
  },
4242
4250
  sx: {
4243
4251
  fontSize: "13px",
4244
4252
  fontFamily: l.typography.fontFamily,
4245
- color: Qr.text.content
4253
+ color: Ur.text.content
4246
4254
  },
4247
4255
  disableRipple: !0,
4248
4256
  children: [s.icon, /* @__PURE__ */ n("div", {
@@ -4252,7 +4260,7 @@ const St = (e) => nr(e.chart.backgroundColor), El = ({
4252
4260
  }, s.title))
4253
4261
  })]
4254
4262
  });
4255
- }, Rl = ({
4263
+ }, Zl = ({
4256
4264
  onClick: e
4257
4265
  }) => {
4258
4266
  const {
@@ -4265,16 +4273,16 @@ const St = (e) => nr(e.chart.backgroundColor), El = ({
4265
4273
  children: /* @__PURE__ */ n(je, {
4266
4274
  onClick: e,
4267
4275
  $hoverColor: St(t),
4268
- children: /* @__PURE__ */ n(Nl, {
4276
+ children: /* @__PURE__ */ n(jl, {
4269
4277
  fill: t.chart.textColor
4270
4278
  })
4271
4279
  })
4272
4280
  });
4273
- }, Zl = /* @__PURE__ */ C("div", {
4281
+ }, Wl = /* @__PURE__ */ C("div", {
4274
4282
  target: "esuuigp0",
4275
4283
  label: "ToolbarContainer"
4276
4284
  })("display:flex;padding-top:6px;padding-bottom:6px;");
4277
- function Wl({
4285
+ function ql({
4278
4286
  infoTooltipText: e,
4279
4287
  onRefresh: t,
4280
4288
  onExpand: r
@@ -4282,20 +4290,20 @@ function Wl({
4282
4290
  const a = P(() => [{
4283
4291
  title: "Refresh",
4284
4292
  onClick: t,
4285
- icon: /* @__PURE__ */ n(Ol, {})
4293
+ icon: /* @__PURE__ */ n(El, {})
4286
4294
  }], [t]);
4287
- return /* @__PURE__ */ v(Zl, {
4295
+ return /* @__PURE__ */ v(Wl, {
4288
4296
  "aria-label": "chatbot chart toolbar",
4289
- children: [/* @__PURE__ */ n(El, {
4297
+ children: [/* @__PURE__ */ n(zl, {
4290
4298
  title: e ?? ""
4291
- }), /* @__PURE__ */ n(zl, {
4292
- items: a
4293
4299
  }), /* @__PURE__ */ n(Rl, {
4300
+ items: a
4301
+ }), /* @__PURE__ */ n(Zl, {
4294
4302
  onClick: r
4295
4303
  })]
4296
4304
  });
4297
4305
  }
4298
- function ql({
4306
+ function Pl({
4299
4307
  content: e
4300
4308
  }) {
4301
4309
  const [t, r] = R(!1), {
@@ -4316,16 +4324,16 @@ function ql({
4316
4324
  } = s, g = {
4317
4325
  cornerRadius: "Small",
4318
4326
  header: {
4319
- renderToolbar: (o) => /* @__PURE__ */ n(Wl, {
4327
+ renderToolbar: (o) => /* @__PURE__ */ n(ql, {
4320
4328
  infoTooltipText: u,
4321
4329
  onRefresh: o,
4322
4330
  onExpand: () => r(!0)
4323
4331
  })
4324
4332
  }
4325
4333
  };
4326
- let f, x;
4327
- if (Va(s.chartType))
4328
- f = /* @__PURE__ */ n("div", {
4334
+ let b, x;
4335
+ if (Ja(s.chartType))
4336
+ b = /* @__PURE__ */ n("div", {
4329
4337
  className: "csdk-h-[245px]",
4330
4338
  children: /* @__PURE__ */ n(Me, T(M({}, s), {
4331
4339
  styleOptions: g
@@ -4347,7 +4355,7 @@ function ql({
4347
4355
  xAxis: void 0,
4348
4356
  yAxis: void 0
4349
4357
  }), g);
4350
- delete p.legend, delete p.xAxis, delete p.yAxis, f = /* @__PURE__ */ n("div", {
4358
+ delete p.legend, delete p.xAxis, delete p.yAxis, b = /* @__PURE__ */ n("div", {
4351
4359
  children: /* @__PURE__ */ n(Me, T(M({}, s), {
4352
4360
  styleOptions: p
4353
4361
  }))
@@ -4358,12 +4366,12 @@ function ql({
4358
4366
  }));
4359
4367
  }
4360
4368
  return {
4361
- inlineElement: f,
4369
+ inlineElement: b,
4362
4370
  expandedElement: x
4363
4371
  };
4364
4372
  }, [e]);
4365
4373
  return /* @__PURE__ */ v(Y, {
4366
- children: [i, /* @__PURE__ */ v($r, {
4374
+ children: [i, /* @__PURE__ */ v(Qr, {
4367
4375
  open: t,
4368
4376
  onClose: () => r(!1),
4369
4377
  maxWidth: "xl",
@@ -4382,7 +4390,7 @@ function ql({
4382
4390
  }), /* @__PURE__ */ n(lr, {
4383
4391
  onClick: () => r(!1),
4384
4392
  "aria-label": "close expanded chart",
4385
- children: /* @__PURE__ */ n(Ll, {
4393
+ children: /* @__PURE__ */ n(Tl, {
4386
4394
  fillColor: a.aiChat.primaryTextColor
4387
4395
  })
4388
4396
  })]
@@ -4393,7 +4401,7 @@ function ql({
4393
4401
  })]
4394
4402
  });
4395
4403
  }
4396
- function Pl({
4404
+ function Gl({
4397
4405
  theme: e
4398
4406
  }) {
4399
4407
  return /* @__PURE__ */ n("svg", {
@@ -4410,7 +4418,7 @@ function Pl({
4410
4418
  })
4411
4419
  });
4412
4420
  }
4413
- function Gl({
4421
+ function Bl({
4414
4422
  onClick: e,
4415
4423
  disabled: t
4416
4424
  }) {
@@ -4426,13 +4434,13 @@ function Gl({
4426
4434
  onClick: e,
4427
4435
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
4428
4436
  disabled: t,
4429
- children: /* @__PURE__ */ n(Pl, {
4437
+ children: /* @__PURE__ */ n(Gl, {
4430
4438
  theme: r
4431
4439
  })
4432
4440
  })
4433
4441
  });
4434
4442
  }
4435
- function Bl({
4443
+ function Hl({
4436
4444
  theme: e
4437
4445
  }) {
4438
4446
  return /* @__PURE__ */ n("svg", {
@@ -4449,7 +4457,7 @@ function Bl({
4449
4457
  })
4450
4458
  });
4451
4459
  }
4452
- function Hl({
4460
+ function Yl({
4453
4461
  onClick: e,
4454
4462
  disabled: t
4455
4463
  }) {
@@ -4465,14 +4473,14 @@ function Hl({
4465
4473
  onClick: e,
4466
4474
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
4467
4475
  disabled: t,
4468
- children: /* @__PURE__ */ n(Bl, {
4476
+ children: /* @__PURE__ */ n(Hl, {
4469
4477
  theme: r
4470
4478
  })
4471
4479
  })
4472
4480
  });
4473
4481
  }
4474
- const Yl = () => {
4475
- const [e, t] = R(!1), r = ce(null), a = j(() => {
4482
+ const $l = () => {
4483
+ const [e, t] = R(!1), r = pe(null), a = j(() => {
4476
4484
  t(!0);
4477
4485
  }, []), i = j(() => {
4478
4486
  t(!1);
@@ -4481,13 +4489,13 @@ const Yl = () => {
4481
4489
  var s;
4482
4490
  ((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (l == null ? void 0 : l.nodeType) === Node.ELEMENT_NODE && (l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", i)), r.current = l;
4483
4491
  }, [a, i]), e];
4484
- }, $l = /* @__PURE__ */ C("div", {
4492
+ }, Ql = /* @__PURE__ */ C("div", {
4485
4493
  target: "esagoru0",
4486
4494
  label: "Container"
4487
4495
  })("display:flex;flex-direction:column;row-gap:", ({
4488
4496
  theme: e
4489
4497
  }) => e.aiChat.body.gapBetweenMessages, ";");
4490
- function Ql({
4498
+ function Ul({
4491
4499
  visible: e,
4492
4500
  onSend: t
4493
4501
  }) {
@@ -4496,10 +4504,10 @@ function Ql({
4496
4504
  }, [t]);
4497
4505
  return e ? /* @__PURE__ */ v("div", {
4498
4506
  className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
4499
- children: [/* @__PURE__ */ n(Hl, {
4507
+ children: [/* @__PURE__ */ n(Yl, {
4500
4508
  onClick: () => i("up"),
4501
4509
  disabled: r
4502
- }), /* @__PURE__ */ n(Gl, {
4510
+ }), /* @__PURE__ */ n(Bl, {
4503
4511
  onClick: () => i("down"),
4504
4512
  disabled: r
4505
4513
  })]
@@ -4512,34 +4520,34 @@ function pt({
4512
4520
  buttonVisibility: a = "onHover",
4513
4521
  renderContent: i
4514
4522
  }) {
4515
- const l = te(), s = Pa(j((x) => {
4523
+ const l = te(), s = Ga(j((x) => {
4516
4524
  l && l.ai.sendFeedback({
4517
4525
  sourceId: e,
4518
4526
  type: r,
4519
4527
  data: t,
4520
4528
  rating: x
4521
4529
  });
4522
- }, [l, e, t, r]), 200), [u, c] = Yl(), g = P(() => a === "onHover" ? c : a !== "never", [c, a]), {
4523
- themeSettings: f
4530
+ }, [l, e, t, r]), 200), [u, c] = $l(), g = P(() => a === "onHover" ? c : a !== "never", [c, a]), {
4531
+ themeSettings: b
4524
4532
  } = D();
4525
- return /* @__PURE__ */ n($l, {
4533
+ return /* @__PURE__ */ n(Ql, {
4526
4534
  ref: u,
4527
- theme: f,
4528
- children: i(/* @__PURE__ */ n(Ql, {
4535
+ theme: b,
4536
+ children: i(/* @__PURE__ */ n(Ul, {
4529
4537
  onSend: s,
4530
4538
  visible: g
4531
4539
  }))
4532
4540
  });
4533
4541
  }
4534
- const Ul = 18 * 5;
4542
+ const Fl = 18 * 5;
4535
4543
  function Mt({
4536
4544
  text: e
4537
4545
  }) {
4538
4546
  const [t, r] = R(!0), [a, i] = R(!1), {
4539
4547
  t: l
4540
- } = E(), s = ce(null);
4548
+ } = E(), s = pe(null);
4541
4549
  return Be(() => {
4542
- s.current && s.current.scrollHeight > Ul && i(!0);
4550
+ s.current && s.current.scrollHeight > Fl && i(!0);
4543
4551
  }, [e]), /* @__PURE__ */ v("div", {
4544
4552
  children: [/* @__PURE__ */ n("div", {
4545
4553
  ref: s,
@@ -4555,7 +4563,7 @@ function Mt({
4555
4563
  })]
4556
4564
  });
4557
4565
  }
4558
- function Fl({
4566
+ function Vl({
4559
4567
  nlgRequest: e
4560
4568
  }) {
4561
4569
  const {
@@ -4565,10 +4573,10 @@ function Fl({
4565
4573
  } = Fe(e), {
4566
4574
  t: i
4567
4575
  } = E();
4568
- return r ? /* @__PURE__ */ n(Ct, {}) : a ? /* @__PURE__ */ n(le, {
4576
+ return r ? /* @__PURE__ */ n(Ct, {}) : a ? /* @__PURE__ */ n(se, {
4569
4577
  align: "left",
4570
4578
  children: i("ai.errors.unexpected")
4571
- }) : /* @__PURE__ */ n(le, {
4579
+ }) : /* @__PURE__ */ n(se, {
4572
4580
  align: "full",
4573
4581
  children: /* @__PURE__ */ n(Mt, {
4574
4582
  text: t ?? i("ai.errors.insightsNotAvailable")
@@ -4578,8 +4586,8 @@ function Fl({
4578
4586
  const Ut = /* @__PURE__ */ C("div", {
4579
4587
  target: "e1kvvygt0",
4580
4588
  label: "FlexRow"
4581
- })("display:flex;align-items:center;column-gap:10px;"), Vl = (e) => !!e && "aeiou".includes(e[0]);
4582
- function Jl({
4589
+ })("display:flex;align-items:center;column-gap:10px;"), Jl = (e) => !!e && "aeiou".includes(e[0]);
4590
+ function Xl({
4583
4591
  data: e,
4584
4592
  alwaysShowFeedback: t
4585
4593
  }) {
@@ -4596,9 +4604,9 @@ function Jl({
4596
4604
  clarification: g = ""
4597
4605
  } = e;
4598
4606
  console.debug(`JAQL for ${l}`, u), console.debug(`chart recommendations for ${l}`, s);
4599
- const f = "chartType" in s ? s.chartType : "table";
4607
+ const b = "chartType" in s ? s.chartType : "table";
4600
4608
  let x;
4601
- Vl(f) ? x = `an ${f}` : x = `a ${f}`, f !== "table" && (x += " chart");
4609
+ Jl(b) ? x = `an ${b}` : x = `a ${b}`, b !== "table" && (x += " chart");
4602
4610
  const o = u.datasource.title, [p, d] = R(!1), m = j(() => {
4603
4611
  d((y) => !y);
4604
4612
  }, []), h = {
@@ -4616,12 +4624,12 @@ function Jl({
4616
4624
  buttonVisibility: t ? "always" : "onHover",
4617
4625
  renderContent: (y) => /* @__PURE__ */ v(Y, {
4618
4626
  children: [/* @__PURE__ */ v(Ut, {
4619
- children: [/* @__PURE__ */ n(Hr, {
4627
+ children: [/* @__PURE__ */ n(Yr, {
4620
4628
  align: "left",
4621
4629
  theme: i,
4622
- children: _ || `Here's ${x} showing ${wl(l)}.`
4630
+ children: _ || `Here's ${x} showing ${Cl(l)}.`
4623
4631
  }), y]
4624
- }), w && /* @__PURE__ */ n(ql, {
4632
+ }), w && /* @__PURE__ */ n(Pl, {
4625
4633
  content: e
4626
4634
  })]
4627
4635
  })
@@ -4632,59 +4640,59 @@ function Jl({
4632
4640
  buttonVisibility: p ? "onHover" : "never",
4633
4641
  renderContent: (y) => /* @__PURE__ */ v(Y, {
4634
4642
  children: [/* @__PURE__ */ v(Ut, {
4635
- children: [/* @__PURE__ */ n(_l, {
4643
+ children: [/* @__PURE__ */ n(vl, {
4636
4644
  onClick: m
4637
4645
  }), y]
4638
- }), p && /* @__PURE__ */ n(Fl, {
4646
+ }), p && /* @__PURE__ */ n(Vl, {
4639
4647
  nlgRequest: h
4640
4648
  })]
4641
4649
  })
4642
4650
  })]
4643
4651
  });
4644
4652
  }
4645
- function Xl({
4653
+ function Kl({
4646
4654
  message: e,
4647
4655
  isLastMessage: t
4648
4656
  }) {
4649
4657
  if (wt(e)) {
4650
4658
  const a = JSON.parse(e.content);
4651
- return /* @__PURE__ */ n(Jl, {
4659
+ return /* @__PURE__ */ n(Xl, {
4652
4660
  data: a,
4653
4661
  alwaysShowFeedback: t
4654
4662
  });
4655
4663
  }
4656
- const r = To(e) ? JSON.parse(e.content).answer : e.content;
4657
- return /* @__PURE__ */ n(le, {
4664
+ const r = No(e) ? JSON.parse(e.content).answer : e.content;
4665
+ return /* @__PURE__ */ n(se, {
4658
4666
  align: e.role === "user" ? "right" : "left",
4659
4667
  children: r
4660
4668
  });
4661
4669
  }
4662
- const Kl = /* @__PURE__ */ $a(Xl), es = ({
4670
+ const es = /* @__PURE__ */ Qa(Kl), ts = ({
4663
4671
  error: e,
4664
4672
  displayMessage: t
4665
- }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(le, {
4673
+ }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(se, {
4666
4674
  align: "left",
4667
4675
  children: t
4668
4676
  }));
4669
- function ts({
4677
+ function rs({
4670
4678
  messages: e
4671
4679
  }) {
4672
4680
  const {
4673
4681
  t
4674
4682
  } = E();
4675
4683
  return /* @__PURE__ */ n(Y, {
4676
- children: e.map((r, a) => /* @__PURE__ */ n(Ga, {
4677
- fallbackRender: (i) => es(T(M({}, i), {
4684
+ children: e.map((r, a) => /* @__PURE__ */ n(Ba, {
4685
+ fallbackRender: (i) => ts(T(M({}, i), {
4678
4686
  displayMessage: t("ai.errors.unexpected")
4679
4687
  })),
4680
- children: /* @__PURE__ */ n(Kl, {
4688
+ children: /* @__PURE__ */ n(es, {
4681
4689
  message: r,
4682
4690
  isLastMessage: a === e.length - 1
4683
4691
  }, a)
4684
4692
  }, a))
4685
4693
  });
4686
4694
  }
4687
- function Ur({
4695
+ function Fr({
4688
4696
  color: e
4689
4697
  }) {
4690
4698
  return /* @__PURE__ */ n("svg", {
@@ -4699,7 +4707,7 @@ function Ur({
4699
4707
  })
4700
4708
  });
4701
4709
  }
4702
- function rs({
4710
+ function as({
4703
4711
  onClick: e,
4704
4712
  color: t
4705
4713
  }) {
@@ -4707,12 +4715,12 @@ function rs({
4707
4715
  "aria-label": "go back",
4708
4716
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
4709
4717
  onClick: e,
4710
- children: /* @__PURE__ */ n(Ur, {
4718
+ children: /* @__PURE__ */ n(Fr, {
4711
4719
  color: t
4712
4720
  })
4713
4721
  });
4714
4722
  }
4715
- function as() {
4723
+ function is() {
4716
4724
  const {
4717
4725
  themeSettings: e
4718
4726
  } = D();
@@ -4730,15 +4738,15 @@ function as() {
4730
4738
  })
4731
4739
  });
4732
4740
  }
4733
- const is = (e, t) => {
4734
- const r = new Ua(e);
4741
+ const os = (e, t) => {
4742
+ const r = new Fa(e);
4735
4743
  return r.alpha = t, r;
4736
- }, os = /* @__PURE__ */ C("div", {
4744
+ }, ns = /* @__PURE__ */ C("div", {
4737
4745
  target: "ehfkql80",
4738
4746
  label: "Container"
4739
4747
  })("font-size:inherit;line-height:inherit;padding-left:8px;padding-right:8px;padding-top:4px;border-radius:16px;margin-bottom:4px;box-shadow:", ({
4740
4748
  theme: e
4741
- }) => `0 4px 8px 0 ${is(e.aiChat.primaryTextColor, 0.2)}`, ";cursor:pointer;color:", ({
4749
+ }) => `0 4px 8px 0 ${os(e.aiChat.primaryTextColor, 0.2)}`, ";cursor:pointer;color:", ({
4742
4750
  theme: e
4743
4751
  }) => e.aiChat.clickableMessages.textColor, ";background-color:", ({
4744
4752
  theme: e
@@ -4746,18 +4754,18 @@ const is = (e, t) => {
4746
4754
  theme: e
4747
4755
  }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({
4748
4756
  theme: e
4749
- }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), ns = ({
4757
+ }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), ls = ({
4750
4758
  onClick: e
4751
4759
  }) => {
4752
4760
  const {
4753
4761
  themeSettings: t
4754
4762
  } = D();
4755
- return /* @__PURE__ */ n(os, {
4763
+ return /* @__PURE__ */ n(ns, {
4756
4764
  theme: t,
4757
4765
  onClick: e,
4758
- children: /* @__PURE__ */ n(as, {})
4766
+ children: /* @__PURE__ */ n(is, {})
4759
4767
  });
4760
- }, ls = ({
4768
+ }, ss = ({
4761
4769
  isVisible: e,
4762
4770
  onClick: t,
4763
4771
  anchorElement: r
@@ -4768,10 +4776,10 @@ const is = (e, t) => {
4768
4776
  sx: {
4769
4777
  zIndex: 2
4770
4778
  },
4771
- children: /* @__PURE__ */ n(ns, {
4779
+ children: /* @__PURE__ */ n(ls, {
4772
4780
  onClick: t
4773
4781
  })
4774
- }), ss = /* @__PURE__ */ C("button", {
4782
+ }), ds = /* @__PURE__ */ C("button", {
4775
4783
  target: "e9ck5hw0",
4776
4784
  label: "Button"
4777
4785
  })("font-size:inherit;line-height:inherit;box-sizing:border-box;border-width:1px;padding-left:1rem;padding-right:1rem;padding-top:0.5rem;padding-bottom:0.5rem;cursor:pointer;text-align:left;max-width:85%;font-family:", ({
@@ -4826,19 +4834,19 @@ function Ft({
4826
4834
  const {
4827
4835
  themeSettings: r
4828
4836
  } = D();
4829
- return /* @__PURE__ */ n(ss, {
4837
+ return /* @__PURE__ */ n(ds, {
4830
4838
  onClick: t,
4831
4839
  theme: r,
4832
4840
  children: e
4833
4841
  });
4834
4842
  }
4835
- const ds = /* @__PURE__ */ C("div", {
4843
+ const cs = /* @__PURE__ */ C("div", {
4836
4844
  target: "e1wvyac80",
4837
4845
  label: "ListContainer"
4838
4846
  })("display:flex;flex-direction:column;align-items:flex-start;row-gap:", ({
4839
4847
  theme: e
4840
4848
  }) => e.aiChat.suggestions.gap, ";");
4841
- function cs({
4849
+ function ps({
4842
4850
  questions: e,
4843
4851
  onSelection: t
4844
4852
  }) {
@@ -4847,7 +4855,7 @@ function cs({
4847
4855
  } = E(), [a, i] = R(!0), l = P(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
4848
4856
  themeSettings: s
4849
4857
  } = D();
4850
- return /* @__PURE__ */ v(ds, {
4858
+ return /* @__PURE__ */ v(cs, {
4851
4859
  "aria-label": "list of suggested questions",
4852
4860
  theme: s,
4853
4861
  children: [l.map((u) => /* @__PURE__ */ n(Ft, {
@@ -4859,7 +4867,7 @@ function cs({
4859
4867
  })]
4860
4868
  });
4861
4869
  }
4862
- const ps = /* @__PURE__ */ C("div", {
4870
+ const us = /* @__PURE__ */ C("div", {
4863
4871
  target: "e1v0x5940",
4864
4872
  label: "Row"
4865
4873
  })("width:283px;height:32px;border-radius:10px;background:", ({
@@ -4872,23 +4880,23 @@ const ps = /* @__PURE__ */ C("div", {
4872
4880
  ${r} 50%,
4873
4881
  ${t} 100%
4874
4882
  )`;
4875
- }, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), us = /* @__PURE__ */ C("div", {
4883
+ }, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), gs = /* @__PURE__ */ C("div", {
4876
4884
  target: "e1v0x5941",
4877
4885
  label: "SkeletonContainer"
4878
4886
  })("display:flex;flex-direction:column;row-gap:1rem;");
4879
- function gs() {
4887
+ function hs() {
4880
4888
  const {
4881
4889
  themeSettings: e
4882
4890
  } = D();
4883
- return /* @__PURE__ */ n(us, {
4891
+ return /* @__PURE__ */ n(gs, {
4884
4892
  children: Array.from({
4885
4893
  length: 3
4886
- }, (t, r) => /* @__PURE__ */ n(ps, {
4894
+ }, (t, r) => /* @__PURE__ */ n(us, {
4887
4895
  theme: e
4888
4896
  }, r))
4889
4897
  });
4890
4898
  }
4891
- function hs({
4899
+ function ms({
4892
4900
  questions: e,
4893
4901
  isLoading: t,
4894
4902
  onSelection: r
@@ -4896,17 +4904,17 @@ function hs({
4896
4904
  const a = e.length > 0, {
4897
4905
  suggestionsWelcomeText: i
4898
4906
  } = ie();
4899
- return t ? /* @__PURE__ */ n(gs, {}) : a ? /* @__PURE__ */ v(Y, {
4900
- children: [i && /* @__PURE__ */ n(le, {
4907
+ return t ? /* @__PURE__ */ n(hs, {}) : a ? /* @__PURE__ */ v(Y, {
4908
+ children: [i && /* @__PURE__ */ n(se, {
4901
4909
  align: "left",
4902
4910
  children: i
4903
- }), /* @__PURE__ */ n(cs, {
4911
+ }), /* @__PURE__ */ n(ps, {
4904
4912
  onSelection: r,
4905
4913
  questions: e
4906
4914
  })]
4907
4915
  }) : null;
4908
4916
  }
4909
- const ms = /* @__PURE__ */ C("div", {
4917
+ const fs = /* @__PURE__ */ C("div", {
4910
4918
  target: "eqnclj50",
4911
4919
  label: "ChatBody"
4912
4920
  })("display:flex;flex-direction:column;row-gap:", ({
@@ -4930,13 +4938,13 @@ const ms = /* @__PURE__ */ C("div", {
4930
4938
  theme: e
4931
4939
  }) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({
4932
4940
  theme: e
4933
- }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), fs = /* @__PURE__ */ C("div", {
4941
+ }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), xs = /* @__PURE__ */ C("div", {
4934
4942
  target: "eqnclj52",
4935
4943
  label: "FollowupQuestionsContainer"
4936
4944
  })("display:flex;flex-direction:column;row-gap:", ({
4937
4945
  theme: e
4938
4946
  }) => e.aiChat.suggestions.gap, ";");
4939
- function xs({
4947
+ function ks({
4940
4948
  contextTitle: e,
4941
4949
  onGoBack: t,
4942
4950
  contextDetails: r
@@ -4948,7 +4956,7 @@ function xs({
4948
4956
  enableFollowupQuestions: u,
4949
4957
  enableHeader: c,
4950
4958
  numOfRecentPrompts: g,
4951
- numOfRecommendations: f,
4959
+ numOfRecommendations: b,
4952
4960
  customPrompt: x
4953
4961
  } = ie(), {
4954
4962
  themeSettings: o
@@ -4956,9 +4964,9 @@ function xs({
4956
4964
  data: p,
4957
4965
  isLoading: d,
4958
4966
  isError: m
4959
- } = yr({
4967
+ } = wr({
4960
4968
  contextTitle: e,
4961
- count: f,
4969
+ count: b,
4962
4970
  customPrompt: x
4963
4971
  }), h = P(() => p == null ? void 0 : p.map((N) => N.nlqPrompt), [p]), {
4964
4972
  history: w,
@@ -4968,12 +4976,12 @@ function xs({
4968
4976
  isLoading: A,
4969
4977
  chatId: S,
4970
4978
  lastError: L
4971
- } = No(e, r), {
4979
+ } = jo(e, r), {
4972
4980
  mutate: Z,
4973
4981
  isLoading: ue
4974
- } = _r(S), [U, B] = R(!1), [$, F] = R(!1), H = () => B(!0), V = () => B(!1), J = () => {
4982
+ } = vr(S), [U, B] = R(!1), [$, F] = R(!1), H = () => B(!0), V = () => B(!1), J = () => {
4975
4983
  Z(), V();
4976
- }, z = ce(null), W = ce(null), Q = () => {
4984
+ }, z = pe(null), W = pe(null), Q = () => {
4977
4985
  if (!(z != null && z.current))
4978
4986
  return;
4979
4987
  const {
@@ -4989,25 +4997,25 @@ function xs({
4989
4997
  Be(() => {
4990
4998
  z.current && (z.current.scrollTop = z.current.scrollHeight);
4991
4999
  }, [w, U, y]);
4992
- const se = ce(null), ge = c ? /* @__PURE__ */ n(Mr, {
4993
- ref: se,
5000
+ const de = pe(null), ge = c ? /* @__PURE__ */ n(Ir, {
5001
+ ref: de,
4994
5002
  title: e,
4995
- leftNav: t && /* @__PURE__ */ n(rs, {
5003
+ leftNav: t && /* @__PURE__ */ n(as, {
4996
5004
  onClick: t,
4997
5005
  color: o.aiChat.header.textColor
4998
5006
  }),
4999
5007
  style: o.aiChat.header
5000
5008
  }) : null, ye = P(() => [...new Set(w.filter((N) => N.role === "user").filter((N) => !(h != null && h.includes(N.content))).map((N) => N.content).reverse())].slice(0, g), [w, g, h]);
5001
5009
  return (L == null ? void 0 : L.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Y, {
5002
- children: [c && ge, /* @__PURE__ */ n(Sr, {
5010
+ children: [c && ge, /* @__PURE__ */ n(Mr, {
5003
5011
  text: L.message
5004
5012
  })]
5005
5013
  }) : /* @__PURE__ */ v(Y, {
5006
- children: [ge, /* @__PURE__ */ v(ms, {
5014
+ children: [ge, /* @__PURE__ */ v(fs, {
5007
5015
  ref: z,
5008
5016
  theme: o,
5009
5017
  onScroll: Q,
5010
- children: [/* @__PURE__ */ n(ls, {
5018
+ children: [/* @__PURE__ */ n(ss, {
5011
5019
  isVisible: $,
5012
5020
  anchorElement: W.current,
5013
5021
  onClick: () => {
@@ -5017,16 +5025,16 @@ function xs({
5017
5025
  behavior: "smooth"
5018
5026
  });
5019
5027
  }
5020
- }), /* @__PURE__ */ n(fl, {}), /* @__PURE__ */ n(hs, {
5028
+ }), /* @__PURE__ */ n(xl, {}), /* @__PURE__ */ n(ms, {
5021
5029
  questions: h || [],
5022
5030
  isLoading: d,
5023
5031
  onSelection: I
5024
- }), L && /* @__PURE__ */ n(le, {
5032
+ }), L && /* @__PURE__ */ n(se, {
5025
5033
  align: "left",
5026
5034
  children: L.message
5027
- }), A ? /* @__PURE__ */ n(Ve, {}) : /* @__PURE__ */ n(ts, {
5035
+ }), A ? /* @__PURE__ */ n(Ve, {}) : /* @__PURE__ */ n(rs, {
5028
5036
  messages: w
5029
- }), u && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(fs, {
5037
+ }), u && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(xs, {
5030
5038
  theme: o,
5031
5039
  children: (l = _.followupQuestions) == null ? void 0 : l.slice(0, 2).map((N, X) => /* @__PURE__ */ n($e, {
5032
5040
  align: "left",
@@ -5038,14 +5046,14 @@ function xs({
5038
5046
  children: N
5039
5047
  })
5040
5048
  }, X))
5041
- }), (y || ue) && /* @__PURE__ */ n(Ct, {}), U && /* @__PURE__ */ n(yl, {
5049
+ }), (y || ue) && /* @__PURE__ */ n(Ct, {}), U && /* @__PURE__ */ n(wl, {
5042
5050
  onCancel: V,
5043
5051
  onConfirm: J
5044
5052
  })]
5045
5053
  }), /* @__PURE__ */ v(bs, {
5046
5054
  ref: W,
5047
5055
  theme: o,
5048
- children: [/* @__PURE__ */ n(rn, {
5056
+ children: [/* @__PURE__ */ n(an, {
5049
5057
  onSendMessage: I,
5050
5058
  disabled: y || A,
5051
5059
  onClearHistoryClick: H,
@@ -5054,25 +5062,25 @@ function xs({
5054
5062
  isLoading: d || A,
5055
5063
  recommendationsError: m,
5056
5064
  onChange: V
5057
- }), /* @__PURE__ */ n(qo, {
5065
+ }), /* @__PURE__ */ n(Po, {
5058
5066
  theme: o
5059
5067
  })]
5060
5068
  })]
5061
5069
  });
5062
5070
  }
5063
- const ks = /* @__PURE__ */ C("button", {
5071
+ const ys = /* @__PURE__ */ C("button", {
5064
5072
  target: "eaokl8t0",
5065
5073
  label: "Container"
5066
5074
  })("font-family:", ({
5067
5075
  theme: e
5068
5076
  }) => e.typography.fontFamily, ";padding:20px;border:none;display:flex;align-items:center;justify-content:space-between;text-align:left;border-radius:15px;box-shadow:0px 1px 2px rgba(9,9,10,0.1),0px 2px 4px rgba(9,9,10,0.1);cursor:pointer;background-color:", ({
5069
5077
  theme: e
5070
- }) => e.aiChat.dataTopics.items.backgroundColor, ";"), ys = /* @__PURE__ */ C("div", {
5078
+ }) => e.aiChat.dataTopics.items.backgroundColor, ";"), ws = /* @__PURE__ */ C("div", {
5071
5079
  target: "eaokl8t1",
5072
5080
  label: "Title"
5073
5081
  })("font-size:1.05rem;line-height:28px;color:", ({
5074
5082
  theme: e
5075
- }) => e.aiChat.dataTopics.items.textColor, ";"), ws = /* @__PURE__ */ C("div", {
5083
+ }) => e.aiChat.dataTopics.items.textColor, ";"), Cs = /* @__PURE__ */ C("div", {
5076
5084
  target: "eaokl8t2",
5077
5085
  label: "Description"
5078
5086
  })("font-size:", ({
@@ -5081,11 +5089,11 @@ const ks = /* @__PURE__ */ C("button", {
5081
5089
  theme: e
5082
5090
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
5083
5091
  theme: e
5084
- }) => nr(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), Cs = /* @__PURE__ */ C("div", {
5092
+ }) => nr(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), _s = /* @__PURE__ */ C("div", {
5085
5093
  target: "eaokl8t3",
5086
5094
  label: "IconContainer"
5087
5095
  })("width:16px;height:16px;transform:rotate(180deg);");
5088
- function _s(e) {
5096
+ function vs(e) {
5089
5097
  const {
5090
5098
  title: t,
5091
5099
  description: r,
@@ -5093,39 +5101,39 @@ function _s(e) {
5093
5101
  } = e, {
5094
5102
  themeSettings: i
5095
5103
  } = D();
5096
- return /* @__PURE__ */ v(ks, {
5104
+ return /* @__PURE__ */ v(ys, {
5097
5105
  onClick: a,
5098
5106
  theme: i,
5099
5107
  children: [/* @__PURE__ */ v("div", {
5100
- children: [/* @__PURE__ */ n(ys, {
5108
+ children: [/* @__PURE__ */ n(ws, {
5101
5109
  theme: i,
5102
5110
  children: t
5103
- }), /* @__PURE__ */ n(ws, {
5111
+ }), /* @__PURE__ */ n(Cs, {
5104
5112
  theme: i,
5105
5113
  children: r
5106
5114
  })]
5107
- }), /* @__PURE__ */ n(Cs, {
5108
- children: /* @__PURE__ */ n(Ur, {
5115
+ }), /* @__PURE__ */ n(_s, {
5116
+ children: /* @__PURE__ */ n(Fr, {
5109
5117
  color: i.aiChat.icons.color
5110
5118
  })
5111
5119
  })]
5112
5120
  });
5113
5121
  }
5114
- const vs = /* @__PURE__ */ C("div", {
5122
+ const Ss = /* @__PURE__ */ C("div", {
5115
5123
  target: "evdxtuj0",
5116
5124
  label: "FlexContainer"
5117
- })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), Ss = /* @__PURE__ */ C("div", {
5125
+ })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), Ms = /* @__PURE__ */ C("div", {
5118
5126
  target: "evdxtuj1",
5119
5127
  label: "Title"
5120
5128
  })("font-size:24px;line-height:32px;font-weight:600;text-align:center;padding-bottom:4px;color:", ({
5121
5129
  theme: e
5122
- }) => e.aiChat.primaryTextColor, ";"), Ms = /* @__PURE__ */ C("div", {
5130
+ }) => e.aiChat.primaryTextColor, ";"), Is = /* @__PURE__ */ C("div", {
5123
5131
  target: "evdxtuj2",
5124
5132
  label: "Subtitle"
5125
5133
  })("font-size:15px;line-height:22px;color:", ({
5126
5134
  theme: e
5127
5135
  }) => e.aiChat.primaryTextColor, ";");
5128
- function Is(e) {
5136
+ function Ds(e) {
5129
5137
  const {
5130
5138
  dataTopics: t
5131
5139
  } = e, {
@@ -5133,23 +5141,23 @@ function Is(e) {
5133
5141
  } = D(), {
5134
5142
  t: a
5135
5143
  } = E();
5136
- return /* @__PURE__ */ v(vs, {
5137
- children: [/* @__PURE__ */ n(Ss, {
5144
+ return /* @__PURE__ */ v(Ss, {
5145
+ children: [/* @__PURE__ */ n(Ms, {
5138
5146
  theme: r,
5139
5147
  children: a("ai.dataTopics")
5140
- }), /* @__PURE__ */ v(Ms, {
5148
+ }), /* @__PURE__ */ v(Is, {
5141
5149
  theme: r,
5142
5150
  children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
5143
- }), t.map((i) => /* @__PURE__ */ Ba(_s, T(M({}, i), {
5151
+ }), t.map((i) => /* @__PURE__ */ Ha(vs, T(M({}, i), {
5144
5152
  key: i.title
5145
5153
  })))]
5146
5154
  });
5147
5155
  }
5148
- const Ds = "#000000", As = "#FFFFFF";
5149
- function Ls({
5156
+ const As = "#000000", Ls = "#FFFFFF";
5157
+ function Ts({
5150
5158
  isDarkBackground: e = !1
5151
5159
  }) {
5152
- const t = e ? As : Ds;
5160
+ const t = e ? Ls : As;
5153
5161
  return /* @__PURE__ */ v("svg", {
5154
5162
  width: "32",
5155
5163
  height: "32",
@@ -5207,16 +5215,16 @@ function Ls({
5207
5215
  })]
5208
5216
  });
5209
5217
  }
5210
- const Ts = /* @__PURE__ */ C("div", {
5218
+ const Ns = /* @__PURE__ */ C("div", {
5211
5219
  target: "eqdfbpm0",
5212
5220
  label: "LogoContainer"
5213
- })("margin-left:14px;margin-top:3px;"), Ns = /* @__PURE__ */ C("div", {
5221
+ })("margin-left:14px;margin-top:3px;"), js = /* @__PURE__ */ C("div", {
5214
5222
  target: "eqdfbpm1",
5215
5223
  label: "DataTopicsContainer"
5216
5224
  })("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({
5217
5225
  theme: e
5218
5226
  }) => e.aiChat.dataTopics.backgroundColor, ";");
5219
- function js({
5227
+ function Os({
5220
5228
  dataTopicsList: e,
5221
5229
  onDataTopicClick: t
5222
5230
  }) {
@@ -5229,60 +5237,60 @@ function js({
5229
5237
  } = E(), l = P(() => e == null ? void 0 : e.map((u) => ({
5230
5238
  title: u,
5231
5239
  onClick: () => t(u)
5232
- })), [e, t]), s = Ea(za(a.aiChat.header.backgroundColor)) > 0.5;
5240
+ })), [e, t]), s = za(Ra(a.aiChat.header.backgroundColor)) > 0.5;
5233
5241
  return /* @__PURE__ */ v(Y, {
5234
- children: [r ? /* @__PURE__ */ n(Mr, {
5242
+ children: [r ? /* @__PURE__ */ n(Ir, {
5235
5243
  title: i("ai.analyticsChatbot"),
5236
- leftNav: /* @__PURE__ */ n(Ts, {
5237
- children: /* @__PURE__ */ n(Ls, {
5244
+ leftNav: /* @__PURE__ */ n(Ns, {
5245
+ children: /* @__PURE__ */ n(Ts, {
5238
5246
  isDarkBackground: s
5239
5247
  })
5240
5248
  }),
5241
5249
  style: a.aiChat.header
5242
- }) : null, /* @__PURE__ */ v(Ns, {
5250
+ }) : null, /* @__PURE__ */ v(js, {
5243
5251
  theme: a,
5244
- children: [!l && /* @__PURE__ */ n(Ve, {}), l && /* @__PURE__ */ n(Is, {
5252
+ children: [!l && /* @__PURE__ */ n(Ve, {}), l && /* @__PURE__ */ n(Ds, {
5245
5253
  dataTopics: l
5246
5254
  })]
5247
5255
  })]
5248
5256
  });
5249
5257
  }
5250
- function Os() {
5258
+ function Es() {
5251
5259
  const [e, t] = R(), [r, a] = R(), {
5252
5260
  data: i,
5253
5261
  fetchStatus: l
5254
- } = Mo(), {
5262
+ } = Io(), {
5255
5263
  dataTopicsList: s,
5256
5264
  contextDetails: u
5257
5265
  } = ie(), {
5258
5266
  t: c
5259
- } = E(), g = c("ai.errors.noAvailableDataTopics"), f = j((d) => {
5267
+ } = E(), g = c("ai.errors.noAvailableDataTopics"), b = j((d) => {
5260
5268
  d.length ? d.length === 1 && (a(void 0), t(d[0])) : a(g);
5261
5269
  }, [g]), x = P(() => {
5262
5270
  if (i && l === "idle") {
5263
5271
  const d = (s != null && s.length ? i == null ? void 0 : i.filter((m) => s == null ? void 0 : s.includes(m.title)) : i).map((m) => m.title);
5264
- return f(d), d;
5272
+ return b(d), d;
5265
5273
  }
5266
5274
  return [];
5267
- }, [i, l, s, f]), o = Le(), p = j(() => {
5275
+ }, [i, l, s, b]), o = Le(), p = j(() => {
5268
5276
  a(void 0), o.invalidateQueries(["getDataTopics"]);
5269
5277
  }, [o]);
5270
- return r ? /* @__PURE__ */ n(Sr, {
5278
+ return r ? /* @__PURE__ */ n(Mr, {
5271
5279
  text: r,
5272
5280
  action: {
5273
5281
  text: c("ai.buttons.refresh"),
5274
5282
  onClick: p
5275
5283
  }
5276
- }) : x.length === 1 && !e ? /* @__PURE__ */ n(Ve, {}) : e ? /* @__PURE__ */ n(xs, {
5284
+ }) : x.length === 1 && !e ? /* @__PURE__ */ n(Ve, {}) : e ? /* @__PURE__ */ n(ks, {
5277
5285
  contextTitle: e,
5278
5286
  contextDetails: u,
5279
5287
  onGoBack: x.length === 1 ? void 0 : () => t(void 0)
5280
- }) : /* @__PURE__ */ n(js, {
5288
+ }) : /* @__PURE__ */ n(Os, {
5281
5289
  dataTopicsList: x,
5282
5290
  onDataTopicClick: (d) => t(d)
5283
5291
  });
5284
5292
  }
5285
- const Fs = tr({
5293
+ const Vs = tr({
5286
5294
  componentName: "Chatbot"
5287
5295
  })((e) => {
5288
5296
  const {
@@ -5292,18 +5300,18 @@ const Fs = tr({
5292
5300
  } = e, {
5293
5301
  themeSettings: i
5294
5302
  } = D();
5295
- return /* @__PURE__ */ n(vo, {
5303
+ return /* @__PURE__ */ n(So, {
5296
5304
  value: a ?? {},
5297
- children: /* @__PURE__ */ n(Ro, {
5305
+ children: /* @__PURE__ */ n(Zo, {
5298
5306
  id: "csdk-chatbot-frame",
5299
5307
  width: t,
5300
5308
  height: r,
5301
5309
  theme: i,
5302
5310
  tabIndex: 0,
5303
- children: /* @__PURE__ */ n(Os, {})
5311
+ children: /* @__PURE__ */ n(Es, {})
5304
5312
  })
5305
5313
  });
5306
- }), Vs = tr({
5314
+ }), Js = tr({
5307
5315
  componentName: "GetNlgInsights"
5308
5316
  })(function(e) {
5309
5317
  const {
@@ -5322,7 +5330,7 @@ const Fs = tr({
5322
5330
  text: r ? "Loading..." : l
5323
5331
  });
5324
5332
  });
5325
- function Es({
5333
+ function zs({
5326
5334
  theme: e
5327
5335
  }) {
5328
5336
  const t = e.general.brandColor;
@@ -5350,17 +5358,17 @@ function Es({
5350
5358
  })]
5351
5359
  });
5352
5360
  }
5353
- const zs = /* @__PURE__ */ C("div", {
5361
+ const Rs = /* @__PURE__ */ C("div", {
5354
5362
  target: "e272c6x0",
5355
5363
  label: "FlexDiv"
5356
5364
  })("display:flex;flex-direction:row;align-items:center;gap:10px;margin:24px 0;max-width:640px;color:", ({
5357
5365
  theme: e
5358
5366
  }) => e.chart.textColor, ";background-color:", ({
5359
5367
  theme: e
5360
- }) => e.chart.backgroundColor, ";"), Rs = /* @__PURE__ */ C("div", {
5368
+ }) => e.chart.backgroundColor, ";"), Zs = /* @__PURE__ */ C("div", {
5361
5369
  target: "e272c6x1",
5362
5370
  label: "IconDiv"
5363
- })("align-self:flex-start;"), Zs = ({
5371
+ })("align-self:flex-start;"), Ws = ({
5364
5372
  summary: e,
5365
5373
  nlgRequest: t
5366
5374
  }) => {
@@ -5372,11 +5380,11 @@ const zs = /* @__PURE__ */ C("div", {
5372
5380
  data: t,
5373
5381
  type: "chart/insights",
5374
5382
  buttonVisibility: "always",
5375
- renderContent: (a) => /* @__PURE__ */ v(zs, {
5383
+ renderContent: (a) => /* @__PURE__ */ v(Rs, {
5376
5384
  theme: r,
5377
- children: [/* @__PURE__ */ n(Rs, {
5385
+ children: [/* @__PURE__ */ n(Zs, {
5378
5386
  theme: r,
5379
- children: /* @__PURE__ */ n(Es, {
5387
+ children: /* @__PURE__ */ n(zs, {
5380
5388
  theme: r
5381
5389
  })
5382
5390
  }), /* @__PURE__ */ n(Mt, {
@@ -5384,17 +5392,17 @@ const zs = /* @__PURE__ */ C("div", {
5384
5392
  }), a]
5385
5393
  })
5386
5394
  });
5387
- }, Js = ({
5395
+ }, Xs = ({
5388
5396
  nlqResponse: e,
5389
5397
  onDataReady: t,
5390
5398
  styleOptions: r,
5391
5399
  widgetProps: a,
5392
5400
  filters: i = []
5393
5401
  }) => {
5394
- e.queryTitle = Ma(e.queryTitle);
5402
+ e.queryTitle = Ia(e.queryTitle);
5395
5403
  const {
5396
5404
  connectToWidgetProps: l
5397
- } = Ia({
5405
+ } = Da({
5398
5406
  initialFilters: i
5399
5407
  }), [s, u] = R(null);
5400
5408
  ke(() => {
@@ -5413,7 +5421,7 @@ const zs = /* @__PURE__ */ C("div", {
5413
5421
  }
5414
5422
  }, [e, l, r]);
5415
5423
  const c = P(() => {
5416
- const p = s && Ge(s) ? Da(s == null ? void 0 : s.filters) : [], d = e.jaql.metadata.filter((m) => !m.jaql.filter).concat(p.filter((m) => !m.config.disabled).map((m) => m.jaql()));
5424
+ const p = s && Ge(s) ? Aa(s == null ? void 0 : s.filters) : [], d = e.jaql.metadata.filter((m) => !m.jaql.filter).concat(p.filter((m) => !m.config.disabled).map((m) => m.jaql()));
5417
5425
  return T(M({}, e), {
5418
5426
  jaql: T(M({}, e.jaql), {
5419
5427
  metadata: d
@@ -5422,10 +5430,10 @@ const zs = /* @__PURE__ */ C("div", {
5422
5430
  });
5423
5431
  }, [e, s]), {
5424
5432
  data: g,
5425
- isLoading: f,
5433
+ isLoading: b,
5426
5434
  isError: x
5427
5435
  } = Fe(c);
5428
- if (f || !s)
5436
+ if (b || !s)
5429
5437
  return /* @__PURE__ */ n(Ct, {});
5430
5438
  if (!Ge(s))
5431
5439
  return /* @__PURE__ */ n(Y, {});
@@ -5435,12 +5443,12 @@ const zs = /* @__PURE__ */ C("div", {
5435
5443
  });
5436
5444
  return /* @__PURE__ */ n(Me, T(M({}, o), {
5437
5445
  highlightSelectionDisabled: !0,
5438
- topSlot: g && !x && /* @__PURE__ */ n(Zs, {
5446
+ topSlot: g && !x && /* @__PURE__ */ n(Ws, {
5439
5447
  nlgRequest: c,
5440
5448
  summary: g
5441
5449
  })
5442
5450
  }));
5443
- }, Ws = new Kt({
5451
+ }, qs = new Kt({
5444
5452
  defaultOptions: {
5445
5453
  queries: {
5446
5454
  refetchOnWindowFocus: !1,
@@ -5448,15 +5456,15 @@ const zs = /* @__PURE__ */ C("div", {
5448
5456
  }
5449
5457
  }
5450
5458
  });
5451
- function Xs({
5459
+ function Ks({
5452
5460
  children: e,
5453
5461
  context: t
5454
5462
  }) {
5455
5463
  return /* @__PURE__ */ n(kr, {
5456
- children: /* @__PURE__ */ n(ft.Provider, {
5464
+ children: /* @__PURE__ */ n(bt.Provider, {
5457
5465
  value: t == null ? void 0 : t.api,
5458
5466
  children: /* @__PURE__ */ n(ar, {
5459
- client: Ws,
5467
+ client: qs,
5460
5468
  children: e
5461
5469
  })
5462
5470
  })
@@ -5474,21 +5482,22 @@ function Xs({
5474
5482
  }
5475
5483
  })();
5476
5484
  export {
5477
- Bs as AiContextProvider,
5478
- mo as ChatRestApi,
5479
- Fs as Chatbot,
5480
- Xs as CustomAiContextProvider,
5481
- _o as DEFAULT_RECOMMENDATIONS_COUNT,
5482
- Vs as GetNlgInsights,
5483
- yo as NLQ_RESULT_CHART_TYPES,
5484
- Js as NlqChartWidget,
5485
- xo as prepareGetNlgInsightsPayload,
5486
- wo as prepareGetNlqResultPayload,
5487
- No as useChatSession,
5488
- Us as useFinalNlqResponse,
5489
- Hs as useGetNlgInsights,
5490
- Ys as useGetNlqResult,
5491
- $s as useGetQueryRecommendations,
5492
- Qs as useLastNlqResponse,
5493
- Gs as widgetComposer
5485
+ Hs as AiContextProvider,
5486
+ fo as ChatRestApi,
5487
+ Vs as Chatbot,
5488
+ Ks as CustomAiContextProvider,
5489
+ vo as DEFAULT_RECOMMENDATIONS_COUNT,
5490
+ Js as GetNlgInsights,
5491
+ wo as NLQ_RESULT_CHART_TYPES,
5492
+ Xs as NlqChartWidget,
5493
+ Co as executeGetNlqResult,
5494
+ ko as prepareGetNlgInsightsPayload,
5495
+ yr as prepareGetNlqResultPayload,
5496
+ jo as useChatSession,
5497
+ Fs as useFinalNlqResponse,
5498
+ Ys as useGetNlgInsights,
5499
+ $s as useGetNlqResult,
5500
+ Qs as useGetQueryRecommendations,
5501
+ Us as useLastNlqResponse,
5502
+ Bs as widgetComposer
5494
5503
  };