@sisense/sdk-ui-vue 2.4.1 → 2.6.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,5 +1,5 @@
1
- import { inject as la, ref as Ut, defineComponent as lt, watchEffect as Ft, provide as da, watch as dt, toRefs as st } from "vue";
2
- import { aC as Qt, aD as Pe, aE as sa, aF as qe, aG as ca, aH as pa, aI as he, aJ as Vt, aK as ua, aL as f, aM as $t, aN as D, aO as n, aP as O, aQ as U, aR as Ue, aS as F, aT as Se, aU as T, aV as Jt, aW as ga, aX as ha, aY as ce, aZ as ma, a_ as xe, a$ as Fe, b0 as ke, b1 as ct, b2 as ba, b3 as fa, b4 as xa, b5 as C, b6 as G, b7 as ka, b8 as wt, b9 as R, ba as Re, bb as v, bc as Me, bd as ya, be as wa, bf as _a, bg as Ca, bh as Ie, bi as Ce, bj as va, bk as Sa, bl as Xt, bm as Ma, bn as Ia, bo as Da, bp as Aa, bq as Kt, br as La, bs as Ta, bt as Na, bu as ja, bv as Oa, bw as er, bx as Ea, by as za, bz as Za, bA as _t, bB as Ra, bC as Wa, bD as Ga, bE as Pa, bF as tr, bG as _e, bH as rr, bI as et, bJ as qa, bK as Qe, bL as Ha, bM as Ba, bN as Ya, bO as Ua, bP as Fa, bQ as Qa, bR as Va, bS as $a, ao as Ne, bT as ar, bU as Ja, bV as Xa, bW as Ka, bX as ir, bY as or, bZ as ei, b_ as ti, b$ as ri, D as ai, c0 as ii, a as nr, c1 as lr, G as pt, C as ut, J as gt, K as me, a4 as ht } from "./use-tracking-3eba129a.js";
1
+ import { inject as la, ref as Qt, defineComponent as lt, watchEffect as Ut, provide as da, watch as dt, toRefs as st } from "vue";
2
+ import { aC as Ft, aD as Ge, aE as sa, aF as qe, aG as ca, aH as pa, aI as he, aJ as Vt, aK as ua, aL as f, aM as $t, aN as D, aO as n, aP as O, aQ as Q, aR as Qe, aS as U, aT as Se, aU as T, aV as Xt, aW as ga, aX as ha, aY as ce, aZ as ma, a_ as xe, a$ as Ue, b0 as ke, b1 as ct, b2 as ba, b3 as fa, b4 as xa, b5 as C, b6 as P, b7 as ka, b8 as wt, b9 as R, ba as Re, bb as v, bc as Me, bd as ya, be as wa, bf as _a, bg as Ca, bh as Ie, bi as Ce, bj as va, bk as Sa, bl as Jt, bm as Ma, bn as Ia, bo as Da, bp as Aa, bq as Kt, br as La, bs as Ta, bt as Na, bu as ja, bv as Oa, bw as er, bx as Ea, by as za, bz as Za, bA as _t, bB as Ra, bC as Wa, bD as Pa, bE as Ga, bF as tr, bG as _e, bH as rr, bI as et, bJ as qa, bK as Fe, bL as Ha, bM as Ba, bN as Ya, bO as Qa, bP as Ua, bQ as Fa, bR as Va, bS as $a, ao as Ne, bT as ar, bU as Xa, bV as Ja, bW as Ka, bX as ir, bY as or, bZ as ei, b_ as ti, b$ as ri, L as ai, c0 as ii, a as nr, c1 as lr, M as pt, K as ut, N as gt, P as me, a4 as ht } from "./use-tracking-354e67c5.js";
3
3
  var oi = Object.defineProperty, ni = Object.defineProperties, li = Object.getOwnPropertyDescriptors, Ct = Object.getOwnPropertySymbols, di = Object.prototype.hasOwnProperty, si = Object.prototype.propertyIsEnumerable, vt = (e, t, r) => t in e ? oi(e, t, {
4
4
  enumerable: !0,
5
5
  configurable: !0,
@@ -16,7 +16,7 @@ var oi = Object.defineProperty, ni = Object.defineProperties, li = Object.getOwn
16
16
  let dr = class extends rr {
17
17
  constructor(e, t) {
18
18
  var r;
19
- super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = Ya(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
19
+ super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = Ya(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
20
20
  }
21
21
  get id() {
22
22
  return this.expression;
@@ -29,13 +29,13 @@ let dr = class extends rr {
29
29
  */
30
30
  serialize() {
31
31
  const e = super.serialize();
32
- return e.__serializable = "JaqlElement", e.metadataItem = this.metadataItem, e.type = this.type, e;
32
+ return e.metadataItem = this.metadataItem, e.type = this.type, e;
33
33
  }
34
34
  };
35
35
  const ci = {
36
- text: Ue.TextAttribute,
37
- numeric: Ue.NumericAttribute,
38
- datetime: Ue.DateLevel
36
+ text: Qe.TextAttribute,
37
+ numeric: Qe.NumericAttribute,
38
+ datetime: Qe.DateLevel
39
39
  };
40
40
  function pi(e) {
41
41
  var t;
@@ -46,9 +46,9 @@ function sr(e) {
46
46
  jaql: t
47
47
  } = e;
48
48
  if (t.formula)
49
- return Ua(t);
50
- const r = Fa.translateJaqlToGranularity(t);
51
- return "agg" in t && t.dim && t.datatype ? Qa({
49
+ return Qa(t);
50
+ const r = Ua.translateJaqlToGranularity(t);
51
+ return "agg" in t && t.dim && t.datatype ? Fa({
52
52
  expression: t.dim,
53
53
  dataType: t.datatype,
54
54
  agg: t.agg || "",
@@ -88,10 +88,10 @@ function ge(e) {
88
88
  return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
89
89
  }
90
90
  function St(e) {
91
- const t = "measures" in e && J(e.measures) || "values" in e && J(e.values);
92
- return mi(e) ? "values" in e.dataOptions && J(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && J(e.dataOptions.value) || "secondary" in e.dataOptions && J(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !J(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => ge(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && ge(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && ge(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && ge(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && ge(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && ge(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && J(e.dataOptions.geo) && "color" in e.dataOptions && J(e.dataOptions.color) : "value" in e.dataOptions && J(e.dataOptions.value) : t;
91
+ const t = "measures" in e && X(e.measures) || "values" in e && X(e.values);
92
+ return mi(e) ? "values" in e.dataOptions && X(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && X(e.dataOptions.value) || "secondary" in e.dataOptions && X(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !X(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => ge(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && ge(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && ge(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && ge(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && ge(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && ge(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && X(e.dataOptions.geo) && "color" in e.dataOptions && X(e.dataOptions.color) : "value" in e.dataOptions && X(e.dataOptions.value) : t;
93
93
  }
94
- function J(e) {
94
+ function X(e) {
95
95
  return Array.isArray(e) && e.length > 0;
96
96
  }
97
97
  function bi(e) {
@@ -108,7 +108,18 @@ function bi(e) {
108
108
  return t.join(`
109
109
  `);
110
110
  }
111
- const fi = {
111
+ function fi(e) {
112
+ const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
113
+ if ("composeCode" in e)
114
+ return e;
115
+ const r = {};
116
+ for (const [a, i] of Object.entries(e)) {
117
+ const l = t(a) ? a : `"${a}"`;
118
+ r[l] = i;
119
+ }
120
+ return r;
121
+ }
122
+ const xi = {
112
123
  react: {
113
124
  baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
114
125
  {{extraImportsString}}
@@ -567,10 +578,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
567
578
  </template>`,
568
579
  dashboardTmpl: "/** COMING SOON */"
569
580
  }
570
- }, pr = (e, t) => fi[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => pr(`${a}Tmpl`, t)), xi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), tt = (e, t, r = "react") => {
581
+ }, pr = (e, t) => xi[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => pr(`${a}Tmpl`, t)), ki = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), tt = (e, t, r = "react") => {
571
582
  const a = pr(e, r);
572
- return bi(xi(a, t));
573
- }, ki = () => Object.values(Ka).map((e) => ir.aggregationToJAQL(e)).join("|"), ur = (e) => {
583
+ return bi(ki(a, t));
584
+ }, yi = () => Object.values(Ka).map((e) => ir.aggregationToJAQL(e)).join("|"), ur = (e) => {
574
585
  const {
575
586
  formula: t,
576
587
  context: r,
@@ -584,7 +595,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
584
595
  const l = i[0];
585
596
  if (typeof l != "string")
586
597
  return e;
587
- const d = r[`${l}`], p = ki(), c = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(c);
598
+ const d = r[`${l}`], p = yi(), c = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(c);
588
599
  if (g && t.includes(l)) {
589
600
  const x = g[1];
590
601
  return Z({
@@ -608,7 +619,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
608
619
  }), t.context = r;
609
620
  }
610
621
  return t;
611
- }, yi = (e) => {
622
+ }, wi = (e) => {
612
623
  var t;
613
624
  const r = e;
614
625
  if (r.panel !== "scope")
@@ -619,9 +630,9 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
619
630
  return (t = a.filter) != null && t.by && (a.filter.by = ur(a.filter.by)), ne(Z({}, r), {
620
631
  jaql: a
621
632
  });
622
- }, wi = (e) => {
633
+ }, _i = (e) => {
623
634
  let t = e;
624
- t = yi(t);
635
+ t = wi(t);
625
636
  const {
626
637
  jaql: r,
627
638
  measure: a,
@@ -635,7 +646,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
635
646
  measure: Ee(a)
636
647
  } : {});
637
648
  }, ze = 6, je = `
638
- `, rt = "UNKNOWN", _i = (e, t) => {
649
+ `, rt = "UNKNOWN", Ci = (e, t) => {
639
650
  let r = "";
640
651
  return r += `measureFactory.customFormula(
641
652
  `, r += " ".repeat(t), r += ` '${_e(e.title)}',
@@ -647,7 +658,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
647
658
  `;
648
659
  }), r += " ".repeat(t), r += ` }
649
660
  `, r += " ".repeat(t), r += ")", r;
650
- }, Ci = (e) => {
661
+ }, vi = (e) => {
651
662
  const {
652
663
  level: t,
653
664
  table: r,
@@ -657,24 +668,31 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
657
668
  } = e;
658
669
  let d;
659
670
  return r && a && (d = or(r, a, t, "DM")), i && r && a && l && (d = `measureFactory.${ir.aggregationFromJAQL(i)}(${d}, '${_e(l)}')`), d || rt;
660
- }, vi = (e, t) => {
671
+ }, Si = (e, t) => {
661
672
  const r = e.jaql(!1).jaql;
662
- return "formula" in r ? _i(r, t) : Ci(r);
673
+ return "formula" in r ? Ci(r, t) : vi(r);
663
674
  }, ee = (e, t = 0, r = !1) => {
664
675
  if (!e)
665
676
  return "";
666
677
  if (typeof e == "string")
667
678
  return `'${_e(e)}'`;
668
679
  if (e instanceof dr)
669
- return vi(e, t);
680
+ return Si(e, t);
670
681
  if (e instanceof rr)
671
682
  return e.composeCode || "";
672
683
  let a = "";
673
684
  return Array.isArray(e) ? a += `[${e.map((i) => ee(i, t + 2))}${e.length ? je + " ".repeat(t + 2) : ""}]` : (a += `{${je}`, Object.entries(e).forEach(([i, l]) => {
674
- r && typeof i == "string" && (i = `'${_e(i)}'`), a += " ".repeat(t + 2), Array.isArray(l) ? a += `${i}: [${l.map((d) => ee(d, t + 4, r))}${l.length ? je + " ".repeat(t + 2) : ""}]` : typeof l == "object" && l !== null ? a += `${i}: ${ee(l, t + 2, r)}` : ["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${_e(l)}'` : a += `${i}: ${l}`, a += `,${je}`;
685
+ if (r && typeof i == "string" && (i = `'${_e(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
686
+ a += `${i}: [${l.map((d) => ee(d, t + 4, r))}${l.length ? je + " ".repeat(t + 2) : ""}]`;
687
+ else if (typeof l == "object" && l !== null) {
688
+ const d = Array.isArray(l) ? l : fi(l);
689
+ a += `${i}: ${ee(d, t + 2, r)}`;
690
+ } else
691
+ ["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${_e(l)}'` : a += `${i}: ${l}`;
692
+ a += `,${je}`;
675
693
  }), a += " ".repeat(t), a += "}"), a;
676
694
  };
677
- function Si(e) {
695
+ function Mi(e) {
678
696
  return ee(e, ze);
679
697
  }
680
698
  function Mt(e, t = "data-source-placeholder") {
@@ -685,21 +703,21 @@ function Mt(e, t = "data-source-placeholder") {
685
703
  }
686
704
  function It(e, t = !0) {
687
705
  const r = [];
688
- return t && r.push("measureFactory"), J(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
706
+ return t && r.push("measureFactory"), X(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
689
707
  }
690
708
  const Dt = `
691
- `, Mi = (e, t) => {
709
+ `, Ii = (e, t) => {
692
710
  if (e.composeCode)
693
711
  return `${Dt}${" ".repeat(t)}${e.composeCode}`;
694
712
  const r = e.jaql().jaql;
695
713
  return `${Dt}${" ".repeat(t)}filterFactory.customFilter(${ee(r, t, !0)})`;
696
- }, Ii = (e, t = 0) => {
714
+ }, Di = (e, t = 0) => {
697
715
  if (!e)
698
716
  return "";
699
717
  let r = "";
700
- return r += `[${e.map((a) => Mi(a, t + 2))}${e.length ? `
718
+ return r += `[${e.map((a) => Ii(a, t + 2))}${e.length ? `
701
719
  ` + " ".repeat(t + 2) : ""}]`, r;
702
- }, At = (e) => e ? Array.isArray(e) ? Ii(e, 6) : "/** Filter relations not supported yet */" : "[]", Di = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Ai = "chartWidgetTmpl", Li = "pivotTableWidgetTmpl", Ti = (e) => e, Ni = ({
720
+ }, At = (e) => e ? Array.isArray(e) ? Di(e, 6) : "/** Filter relations not supported yet */" : "[]", Ai = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], Li = "chartWidgetTmpl", Ti = "pivotTableWidgetTmpl", Ni = (e) => e, ji = ({
703
721
  dashboardOid: e,
704
722
  widgetOid: t,
705
723
  uiFramework: r = "react",
@@ -710,9 +728,9 @@ const Dt = `
710
728
  const l = {
711
729
  dashboardOid: e,
712
730
  widgetOid: t
713
- }, d = Di[Number(i)];
731
+ }, d = Ai[Number(i)];
714
732
  return tt(d, l, r);
715
- }, ji = (e, t, r) => {
733
+ }, Oi = (e, t, r) => {
716
734
  if (er(e)) {
717
735
  cr(e.chartType);
718
736
  const a = St(e), i = {
@@ -720,8 +738,8 @@ const Dt = `
720
738
  widgetTypeString: "chart",
721
739
  titleString: e.title,
722
740
  dataSourceString: Mt(e.dataSource),
723
- chartTypeString: Ti(e.chartType),
724
- dataOptionsString: Si(e.dataOptions),
741
+ chartTypeString: Ni(e.chartType),
742
+ dataOptionsString: Mi(e.dataOptions),
725
743
  filtersString: At(e.filters),
726
744
  componentString: "ChartWidget",
727
745
  extraImportsString: It(e.filters || [], a),
@@ -747,17 +765,17 @@ const Dt = `
747
765
  if (za(e))
748
766
  return "/** Custom widget code not supported yet */";
749
767
  throw new Ce("errors.otherWidgetTypesNotSupported");
750
- }, Oi = ({
768
+ }, Ei = ({
751
769
  widgetProps: e,
752
770
  uiFramework: t = "react"
753
- }) => ji(e, t, {
754
- chart: Ai,
755
- pivot: Li
756
- }), Ei = (e) => ({
771
+ }) => Oi(e, t, {
772
+ chart: Li,
773
+ pivot: Ti
774
+ }), zi = (e) => ({
757
775
  dataOptions: {
758
776
  columns: e.map(sr)
759
777
  }
760
- }), zi = Object.freeze({
778
+ }), Zi = Object.freeze({
761
779
  convolution: {
762
780
  enabled: !0,
763
781
  selectedConvolutionType: "bySlicesCount",
@@ -783,7 +801,7 @@ const Dt = `
783
801
  pie: "pie/donut",
784
802
  bar: "bar/stacked",
785
803
  column: "column/stackedcolumn"
786
- }), Zi = (e, t, r) => {
804
+ }), Ri = (e, t, r) => {
787
805
  const a = e.reduce((l, d) => (l[d.jaql.title] = d, l), {}), i = Object.entries(r).reduce((l, d) => {
788
806
  const [p, c] = d;
789
807
  return l[`${p}`] = Array.isArray(c) ? c.map((g) => {
@@ -837,7 +855,7 @@ const Dt = `
837
855
  l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
838
856
  }), i;
839
857
  case "table":
840
- return Object.keys(i).length === 0 ? Ei(e).dataOptions : i;
858
+ return Object.keys(i).length === 0 ? zi(e).dataOptions : i;
841
859
  case "boxplot":
842
860
  case "areamap":
843
861
  case "indicator":
@@ -847,9 +865,9 @@ const Dt = `
847
865
  }, Tt = (e, t) => {
848
866
  var r, a, i, l;
849
867
  return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((d) => et(d).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((d) => et(d).column.name).join(", ");
850
- }, Ri = (e, t, r, a) => {
868
+ }, Wi = (e, t, r, a) => {
851
869
  let i;
852
- return a && e in Lt ? i = Qe(Qe(zi, {
870
+ return a && e in Lt ? i = Fe(Fe(Zi, {
853
871
  subtype: Lt[`${e}`]
854
872
  }), {
855
873
  legend: {
@@ -868,14 +886,14 @@ const Dt = `
868
886
  text: Tt(t, "x")
869
887
  }
870
888
  }
871
- }, r) : i = Qe(Ha(), r), i;
872
- }, Wi = (e, t, r = !0) => {
889
+ }, r) : i = Fe(Ha(), r), i;
890
+ }, Pi = (e, t, r = !0) => {
873
891
  const {
874
892
  chartFamily: a,
875
893
  chartType: i,
876
894
  axesMapping: l = {},
877
895
  styleOptions: d = {}
878
- } = t, p = Zi(e, a, l), c = Ri(i, l, d, r);
896
+ } = t, p = Ri(e, a, l), c = Wi(i, l, d, r);
879
897
  return {
880
898
  dataOptions: p,
881
899
  chartStyleOptions: c
@@ -884,7 +902,7 @@ const Dt = `
884
902
  chartType: "table",
885
903
  chartFamily: "table",
886
904
  axesMapping: {}
887
- }, Pi = (e) => e.map((t) => Za(t.jaql)), qi = (e) => e.reduce((t, r) => {
905
+ }, qi = (e) => e.map((t) => Za(t.jaql)), Hi = (e) => e.reduce((t, r) => {
888
906
  if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(_t(r)), r.panel !== "scope") {
889
907
  const a = _t(r);
890
908
  delete a.jaql.filter, t.metadataColumns.push(a);
@@ -893,7 +911,7 @@ const Dt = `
893
911
  }, {
894
912
  metadataColumns: [],
895
913
  metadataFilters: []
896
- }), Hi = (e, t) => {
914
+ }), Bi = (e, t) => {
897
915
  if (!hi(e))
898
916
  try {
899
917
  const {
@@ -907,7 +925,7 @@ const Dt = `
907
925
  datasource: p
908
926
  } = a, c = ne(Z({}, p), {
909
927
  type: p.type || "elasticube"
910
- }), g = Ia(c), x = d.map((M) => wi(M)).map((M) => ne(Z({}, M), {
928
+ }), g = Ia(c), x = d.map((M) => _i(M)).map((M) => ne(Z({}, M), {
911
929
  jaql: ne(Z({}, M.jaql), {
912
930
  datasource: g
913
931
  })
@@ -920,10 +938,10 @@ const Dt = `
920
938
  }, {
921
939
  metadataColumns: s,
922
940
  metadataFilters: h
923
- } = qi(x), m = Pi(h), {
941
+ } = Hi(x), m = qi(h), {
924
942
  dataOptions: w,
925
943
  chartStyleOptions: _
926
- } = Wi(s, b, r), y = Z(Z({}, _), u);
944
+ } = Pi(s, b, r), y = Z(Z({}, _), u);
927
945
  return {
928
946
  widgetType: "chart",
929
947
  id: l,
@@ -938,14 +956,14 @@ const Dt = `
938
956
  console.error(r);
939
957
  return;
940
958
  }
941
- }, mt = (e, t) => Hi(e, t), Bi = (e) => ui(e) ? Ni(e) : Oi(e), gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
959
+ }, mt = (e, t) => Bi(e, t), Yi = (e) => ui(e) ? ji(e) : Ei(e), gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
942
960
  __proto__: null,
943
- toWidgetCode: Bi,
961
+ toWidgetCode: Yi,
944
962
  toWidgetProps: mt
945
963
  }, Symbol.toStringTag, {
946
964
  value: "Module"
947
965
  }));
948
- var Yi = Object.defineProperty, Ui = Object.defineProperties, Fi = Object.getOwnPropertyDescriptors, We = Object.getOwnPropertySymbols, hr = Object.prototype.hasOwnProperty, mr = Object.prototype.propertyIsEnumerable, Nt = (e, t, r) => t in e ? Yi(e, t, {
966
+ var Qi = Object.defineProperty, Ui = Object.defineProperties, Fi = Object.getOwnPropertyDescriptors, We = Object.getOwnPropertySymbols, hr = Object.prototype.hasOwnProperty, mr = Object.prototype.propertyIsEnumerable, Nt = (e, t, r) => t in e ? Qi(e, t, {
949
967
  enumerable: !0,
950
968
  configurable: !0,
951
969
  writable: !0,
@@ -957,7 +975,7 @@ var Yi = Object.defineProperty, Ui = Object.defineProperties, Fi = Object.getOwn
957
975
  for (var r of We(t))
958
976
  mr.call(t, r) && Nt(e, r, t[r]);
959
977
  return e;
960
- }, j = (e, t) => Ui(e, Fi(t)), Qi = (e, t) => {
978
+ }, j = (e, t) => Ui(e, Fi(t)), Vi = (e, t) => {
961
979
  var r = {};
962
980
  for (var a in e)
963
981
  hr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
@@ -981,7 +999,7 @@ var Yi = Object.defineProperty, Ui = Object.defineProperties, Fi = Object.getOwn
981
999
  }, p = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(l, d);
982
1000
  p((r = r.apply(e, t)).next());
983
1001
  });
984
- class Vi extends Ra {
1002
+ class $i extends Ra {
985
1003
  constructor(t, r) {
986
1004
  super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
987
1005
  }
@@ -1024,7 +1042,7 @@ class Vi extends Ra {
1024
1042
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
1025
1043
  }
1026
1044
  updateResult() {
1027
- const t = this.currentMutation ? this.currentMutation.state : Ga(), r = j(I({}, t), {
1045
+ const t = this.currentMutation ? this.currentMutation.state : Pa(), r = j(I({}, t), {
1028
1046
  isLoading: t.status === "loading",
1029
1047
  isSuccess: t.status === "success",
1030
1048
  isError: t.status === "error",
@@ -1056,12 +1074,12 @@ class Vi extends Ra {
1056
1074
  function bt(e, t, r) {
1057
1075
  const a = Da(e, t), i = Me({
1058
1076
  context: a.context
1059
- }), [l] = R(() => new Vi(i, a));
1077
+ }), [l] = R(() => new $i(i, a));
1060
1078
  Ie(() => {
1061
1079
  l.setOptions(a);
1062
1080
  }, [l, a]);
1063
1081
  const d = Aa(T((c) => l.subscribe(Kt.batchCalls(c)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), p = T((c, g) => {
1064
- l.mutate(c, g).catch($i);
1082
+ l.mutate(c, g).catch(Xi);
1065
1083
  }, [l]);
1066
1084
  if (d.error && La(l.options.useErrorBoundary, [d.error]))
1067
1085
  throw d.error;
@@ -1070,7 +1088,7 @@ function bt(e, t, r) {
1070
1088
  mutateAsync: d.mutate
1071
1089
  });
1072
1090
  }
1073
- function $i() {
1091
+ function Xi() {
1074
1092
  }
1075
1093
  class jt {
1076
1094
  constructor(t, r = !1) {
@@ -1100,7 +1118,7 @@ class jt {
1100
1118
  }, this.httpClient = t;
1101
1119
  }
1102
1120
  }
1103
- new Qt({
1121
+ new Ft({
1104
1122
  defaultOptions: {
1105
1123
  queries: {
1106
1124
  refetchOnWindowFocus: !1,
@@ -1108,7 +1126,7 @@ new Qt({
1108
1126
  }
1109
1127
  }
1110
1128
  });
1111
- const br = /* @__PURE__ */ Pe(void 0), te = () => ct(br), fr = /* @__PURE__ */ Pe({}), Ji = () => ct(fr), Xi = ({
1129
+ const br = /* @__PURE__ */ Ge(void 0), te = () => ct(br), fr = /* @__PURE__ */ Ge({}), Ji = () => ct(fr), Ki = ({
1112
1130
  children: e
1113
1131
  }) => {
1114
1132
  const [t, r] = R({}), a = T((d, p) => {
@@ -1156,7 +1174,7 @@ function xr(e) {
1156
1174
  }
1157
1175
  }
1158
1176
  const kr = (e, t = !0) => {
1159
- const r = F(() => xr(e), [e]), a = te(), {
1177
+ const r = U(() => xr(e), [e]), a = te(), {
1160
1178
  data: i,
1161
1179
  error: l,
1162
1180
  isError: d,
@@ -1182,8 +1200,8 @@ const kr = (e, t = !0) => {
1182
1200
  g();
1183
1201
  }, [g])
1184
1202
  };
1185
- }, Ki = ["indicator", "column", "line", "table", "pie", "bar"];
1186
- function eo(e) {
1203
+ }, eo = ["indicator", "column", "line", "table", "pie", "bar"];
1204
+ function to(e) {
1187
1205
  const {
1188
1206
  dataSource: t,
1189
1207
  query: r,
@@ -1195,11 +1213,11 @@ function eo(e) {
1195
1213
  text: r,
1196
1214
  // Timezone is not used by AI API, but it is currently required by the endpoint
1197
1215
  timezone: "UTC",
1198
- chartTypes: a ?? [...Ki]
1216
+ chartTypes: a ?? [...eo]
1199
1217
  }
1200
1218
  };
1201
1219
  }
1202
- const at = 4, to = (e) => {
1220
+ const at = 4, ro = (e) => {
1203
1221
  const {
1204
1222
  contextTitle: t,
1205
1223
  count: r,
@@ -1218,7 +1236,7 @@ const at = 4, to = (e) => {
1218
1236
  numOfRecommendations: d
1219
1237
  }),
1220
1238
  enabled: !!l && p
1221
- }), s = F(() => b == null ? void 0 : b.map((h) => j(I({}, h), {
1239
+ }), s = U(() => b == null ? void 0 : b.map((h) => j(I({}, h), {
1222
1240
  widgetProps: h.jaql ? mt(h, {
1223
1241
  useCustomizedStyleOptions: a
1224
1242
  }) : void 0
@@ -1239,7 +1257,7 @@ const at = 4, to = (e) => {
1239
1257
  enableInsights: !0,
1240
1258
  numOfRecommendations: 4,
1241
1259
  numOfRecentPrompts: 5
1242
- }), wr = /* @__PURE__ */ Pe(I({}, yr)), re = () => ct(wr), ro = ({
1260
+ }), wr = /* @__PURE__ */ Ge(I({}, yr)), re = () => ct(wr), ao = ({
1243
1261
  children: e,
1244
1262
  value: t
1245
1263
  }) => {
@@ -1254,7 +1272,7 @@ const at = 4, to = (e) => {
1254
1272
  value: a,
1255
1273
  children: e
1256
1274
  });
1257
- }, ft = "chatHistory", ao = (e) => {
1275
+ }, ft = "chatHistory", io = (e) => {
1258
1276
  const t = te(), {
1259
1277
  hideHistory: r
1260
1278
  } = re();
@@ -1284,12 +1302,12 @@ const at = 4, to = (e) => {
1284
1302
  e && r.setQueriesData([ft, e], []);
1285
1303
  }
1286
1304
  });
1287
- }, io = (e) => {
1305
+ }, oo = (e) => {
1288
1306
  const {
1289
1307
  data: t,
1290
1308
  isLoading: r,
1291
1309
  isError: a
1292
- } = ao(e), {
1310
+ } = io(e), {
1293
1311
  mutate: i
1294
1312
  } = _r(e);
1295
1313
  return Ie(() => {
@@ -1299,7 +1317,7 @@ const at = 4, to = (e) => {
1299
1317
  isLoading: r,
1300
1318
  isError: a
1301
1319
  };
1302
- }, oo = () => {
1320
+ }, no = () => {
1303
1321
  const e = te(), {
1304
1322
  data: t,
1305
1323
  isLoading: r,
@@ -1317,7 +1335,7 @@ const at = 4, to = (e) => {
1317
1335
  isLoading: r,
1318
1336
  fetchStatus: a
1319
1337
  };
1320
- }, no = () => {
1338
+ }, lo = () => {
1321
1339
  const e = te(), {
1322
1340
  data: t,
1323
1341
  isLoading: r
@@ -1330,7 +1348,7 @@ const at = 4, to = (e) => {
1330
1348
  data: t ?? [],
1331
1349
  isLoading: r
1332
1350
  };
1333
- }, lo = (e, t, r) => {
1351
+ }, so = (e, t, r) => {
1334
1352
  const a = Me(), i = te(), l = bt({
1335
1353
  mutationFn: () => pe(void 0, null, function* () {
1336
1354
  if (!(!i || !e))
@@ -1341,7 +1359,7 @@ const at = 4, to = (e) => {
1341
1359
  return Ie(() => {
1342
1360
  t && l.isIdle && l.mutate();
1343
1361
  }, [t, l]), l;
1344
- }, so = (e, t) => {
1362
+ }, co = (e, t) => {
1345
1363
  switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
1346
1364
  case "nlq":
1347
1365
  return {
@@ -1358,7 +1376,7 @@ const at = 4, to = (e) => {
1358
1376
  default:
1359
1377
  throw Error(`${t}${JSON.stringify(e)}`);
1360
1378
  }
1361
- }, co = (e, t) => {
1379
+ }, po = (e, t) => {
1362
1380
  const r = Me(), a = T((c) => {
1363
1381
  e && r.setQueriesData([ft, e], (g) => g && [...g, c]);
1364
1382
  }, [r, e]), {
@@ -1394,26 +1412,26 @@ const at = 4, to = (e) => {
1394
1412
  if (!c)
1395
1413
  return;
1396
1414
  const g = i("ai.errors.unknownResponse");
1397
- a(so(c, g));
1415
+ a(co(c, g));
1398
1416
  }
1399
1417
  });
1400
1418
  return {
1401
1419
  mutate: d,
1402
1420
  isLoading: p
1403
1421
  };
1404
- }, po = (e, t, r = !1) => {
1422
+ }, uo = (e, t, r = !1) => {
1405
1423
  var a;
1406
1424
  const {
1407
1425
  data: i,
1408
1426
  isLoading: l
1409
- } = no(), d = Ji(), p = d.getChatId(e, t) || ((a = i.find((b) => {
1427
+ } = lo(), d = Ji(), p = d.getChatId(e, t) || ((a = i.find((b) => {
1410
1428
  var o;
1411
1429
  return b.contextTitle === e && ((o = b.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
1412
1430
  })) == null ? void 0 : a.chatId), {
1413
1431
  isError: c,
1414
1432
  data: g,
1415
1433
  isSuccess: x
1416
- } = lo(e, r && !l && !p, t);
1434
+ } = so(e, r && !l && !p, t);
1417
1435
  return Ie(() => {
1418
1436
  x && g && !p && d.saveChatId(g.chatId, e, t);
1419
1437
  }, [g, x, e, t, p, d]), {
@@ -1421,14 +1439,14 @@ const at = 4, to = (e) => {
1421
1439
  isLoading: l,
1422
1440
  isError: c
1423
1441
  };
1424
- }, uo = (e) => F(() => {
1442
+ }, go = (e) => U(() => {
1425
1443
  if (e != null && e.length) {
1426
1444
  const t = e[e.length - 1];
1427
1445
  if (Cr(t))
1428
1446
  return JSON.parse(t.content);
1429
1447
  }
1430
1448
  return null;
1431
- }, [e]), Cr = (e) => !!e && "type" in e && e.type === "nlq", go = (e) => !!e && "type" in e && e.type === "text", ho = (e, t) => {
1449
+ }, [e]), Cr = (e) => !!e && "type" in e && e.type === "nlq", ho = (e) => !!e && "type" in e && e.type === "text", mo = (e, t) => {
1432
1450
  const {
1433
1451
  t: r
1434
1452
  } = O(), {
@@ -1436,18 +1454,18 @@ const at = 4, to = (e) => {
1436
1454
  } = re(), {
1437
1455
  chatId: i,
1438
1456
  isError: l
1439
- } = po(e, t, !0), [d, p] = R(null), {
1457
+ } = uo(e, t, !0), [d, p] = R(null), {
1440
1458
  history: c,
1441
1459
  isLoading: g,
1442
1460
  isError: x
1443
- } = io(i);
1461
+ } = oo(i);
1444
1462
  Ie(() => {
1445
1463
  l ? p(new Ce("ai.errors.chatUnavailable")) : x && p(new Ce("ai.errors.fetchHistory"));
1446
1464
  }, [l, x, r]);
1447
1465
  const {
1448
1466
  mutate: b,
1449
1467
  isLoading: o
1450
- } = co(i, a), u = uo(c);
1468
+ } = po(i, a), u = go(c);
1451
1469
  return {
1452
1470
  chatId: i,
1453
1471
  history: c ?? [],
@@ -1457,20 +1475,20 @@ const at = 4, to = (e) => {
1457
1475
  isLoading: g,
1458
1476
  lastError: d
1459
1477
  };
1460
- }, mo = 500, bo = 500, fo = 500, xo = 900, ko = /* @__PURE__ */ C("div", {
1478
+ }, bo = 500, fo = 500, xo = 500, ko = 900, yo = /* @__PURE__ */ C("div", {
1461
1479
  target: "e1ldv6710",
1462
1480
  label: "ChatFrame"
1463
1481
  })("box-sizing:border-box;position:relative;display:flex;flex-direction:column;border:1px solid #c6c9ce;border-radius:", ({
1464
1482
  theme: e
1465
1483
  }) => e.aiChat.borderRadius, ";background-color:", ({
1466
1484
  theme: e
1467
- }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", mo, "px;min-height:", bo, "px;width:", ({
1485
+ }) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", bo, "px;min-height:", fo, "px;width:", ({
1468
1486
  width: e
1469
- }) => e ? Ot(e) : `${fo}px`, ";height:", ({
1487
+ }) => e ? Ot(e) : `${xo}px`, ";height:", ({
1470
1488
  height: e
1471
- }) => e ? Ot(e) : `${xo}px`, ";", ({
1489
+ }) => e ? Ot(e) : `${ko}px`, ";", ({
1472
1490
  theme: e
1473
- }) => G`
1491
+ }) => P`
1474
1492
  font-size: ${e.aiChat.primaryFontSize[0]};
1475
1493
  line-height: ${e.aiChat.primaryFontSize[1]};
1476
1494
  `, " border:", ({
@@ -1479,7 +1497,7 @@ const at = 4, to = (e) => {
1479
1497
  function Ot(e) {
1480
1498
  return typeof e == "number" ? `${e}px` : e;
1481
1499
  }
1482
- function yo({
1500
+ function wo({
1483
1501
  spin: e
1484
1502
  }) {
1485
1503
  return /* @__PURE__ */ v("svg", {
@@ -1507,12 +1525,12 @@ function He() {
1507
1525
  return /* @__PURE__ */ n("div", {
1508
1526
  className: "csdk-m-auto",
1509
1527
  "aria-label": "loading spinner",
1510
- children: /* @__PURE__ */ n(yo, {
1528
+ children: /* @__PURE__ */ n(wo, {
1511
1529
  spin: !0
1512
1530
  })
1513
1531
  });
1514
1532
  }
1515
- function wo({
1533
+ function _o({
1516
1534
  theme: e
1517
1535
  }) {
1518
1536
  return /* @__PURE__ */ n("svg", {
@@ -1527,7 +1545,7 @@ function wo({
1527
1545
  })
1528
1546
  });
1529
1547
  }
1530
- function _o({
1548
+ function Co({
1531
1549
  theme: e
1532
1550
  }) {
1533
1551
  const t = e.aiChat.icons.color;
@@ -1549,17 +1567,17 @@ function _o({
1549
1567
  })]
1550
1568
  });
1551
1569
  }
1552
- const Co = /* @__PURE__ */ C("div", {
1570
+ const vo = /* @__PURE__ */ C("div", {
1553
1571
  target: "e1q6h1ze0",
1554
1572
  label: "Section"
1555
- })("display:flex;flex-direction:column;row-gap:4px;"), vo = /* @__PURE__ */ C("div", {
1573
+ })("display:flex;flex-direction:column;row-gap:4px;"), So = /* @__PURE__ */ C("div", {
1556
1574
  target: "e1q6h1ze1",
1557
1575
  label: "SectionHeader"
1558
1576
  })("font-size:11px;line-height:18px;font-weight:300;color:", ({
1559
1577
  theme: e
1560
1578
  }) => e.aiChat.dropup.headers.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1561
1579
  theme: e
1562
- }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), So = /* @__PURE__ */ C("div", {
1580
+ }) => e.aiChat.dropup.headers.hover.backgroundColor, ";}"), Mo = /* @__PURE__ */ C("div", {
1563
1581
  target: "e1q6h1ze2",
1564
1582
  label: "DropupItem"
1565
1583
  })("font-size:", ({
@@ -1571,7 +1589,7 @@ const Co = /* @__PURE__ */ C("div", {
1571
1589
  }) => e.aiChat.dropup.items.textColor, ";cursor:pointer;padding:4px 12px;&:hover{background-color:", ({
1572
1590
  theme: e
1573
1591
  }) => e.aiChat.dropup.items.hover.backgroundColor, ";}");
1574
- function Mo({
1592
+ function Io({
1575
1593
  title: e,
1576
1594
  items: t,
1577
1595
  onSelect: r,
@@ -1580,19 +1598,19 @@ function Mo({
1580
1598
  const [i, l] = R(!1), {
1581
1599
  themeSettings: d
1582
1600
  } = D();
1583
- return /* @__PURE__ */ v(Co, {
1584
- children: [/* @__PURE__ */ n(vo, {
1601
+ return /* @__PURE__ */ v(vo, {
1602
+ children: [/* @__PURE__ */ n(So, {
1585
1603
  onClick: () => l((p) => !p),
1586
1604
  theme: d,
1587
1605
  children: e.toUpperCase()
1588
- }), (i || a) && t.map((p, c) => /* @__PURE__ */ n(So, {
1606
+ }), (i || a) && t.map((p, c) => /* @__PURE__ */ n(Mo, {
1589
1607
  onClick: () => r(p),
1590
1608
  theme: d,
1591
1609
  children: p
1592
1610
  }, c))]
1593
1611
  });
1594
1612
  }
1595
- const Io = /* @__PURE__ */ C("div", {
1613
+ const Do = /* @__PURE__ */ C("div", {
1596
1614
  target: "e10x5x4a0",
1597
1615
  label: "PopupContent"
1598
1616
  })("font-family:", ({
@@ -1607,7 +1625,7 @@ const Io = /* @__PURE__ */ C("div", {
1607
1625
  theme: e
1608
1626
  }) => e.aiChat.dropup.borderRadius, ";box-shadow:", ({
1609
1627
  theme: e
1610
- }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), Do = /* @__PURE__ */ C("div", {
1628
+ }) => e.aiChat.dropup.boxShadow, ";padding-top:8px;padding-bottom:8px;display:flex;flex-direction:column;row-gap:4px;"), Ao = /* @__PURE__ */ C("div", {
1611
1629
  target: "e10x5x4a1",
1612
1630
  label: "ErrorMessage"
1613
1631
  })("font-size:", ({
@@ -1617,7 +1635,7 @@ const Io = /* @__PURE__ */ C("div", {
1617
1635
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
1618
1636
  theme: e
1619
1637
  }) => e.aiChat.dropup.items.textColor, ";padding:4px 12px;"), it = (e) => e.startsWith("/");
1620
- function Ao({
1638
+ function Lo({
1621
1639
  recentPrompts: e,
1622
1640
  suggestions: t,
1623
1641
  isLoading: r,
@@ -1639,7 +1657,7 @@ function Ao({
1639
1657
  } = D(), {
1640
1658
  t: g
1641
1659
  } = O(), x = p.length === 1;
1642
- return /* @__PURE__ */ n(Xt, {
1660
+ return /* @__PURE__ */ n(Jt, {
1643
1661
  open: it(l) && p.length > 0,
1644
1662
  anchorEl: i,
1645
1663
  placement: "top-start",
@@ -1652,14 +1670,14 @@ function Ao({
1652
1670
  sx: {
1653
1671
  zIndex: 3
1654
1672
  },
1655
- children: /* @__PURE__ */ v(Io, {
1673
+ children: /* @__PURE__ */ v(Do, {
1656
1674
  style: {
1657
1675
  width: i == null ? void 0 : i.offsetWidth
1658
1676
  },
1659
1677
  theme: c,
1660
- children: [r && /* @__PURE__ */ n(He, {}), !r && !d && p.map((b) => /* @__PURE__ */ n(Mo, j(I({}, b), {
1678
+ children: [r && /* @__PURE__ */ n(He, {}), !r && !d && p.map((b) => /* @__PURE__ */ n(Io, j(I({}, b), {
1661
1679
  alwaysExpanded: x
1662
- }), b.title)), d && /* @__PURE__ */ n(Do, {
1680
+ }), b.title)), d && /* @__PURE__ */ n(Ao, {
1663
1681
  theme: c,
1664
1682
  children: g("ai.errors.recommendationsNotAvailable")
1665
1683
  })]
@@ -1702,15 +1720,15 @@ function De({
1702
1720
  children: r
1703
1721
  });
1704
1722
  }
1705
- const Lo = 500, To = /* @__PURE__ */ C("div", {
1723
+ const To = 500, No = /* @__PURE__ */ C("div", {
1706
1724
  target: "e6iwkw10",
1707
1725
  label: "ChatInputContainer"
1708
1726
  })("display:flex;flex-direction:row;align-items:flex-end;justify-content:space-between;background-color:", ({
1709
1727
  theme: e
1710
- }) => e.aiChat.backgroundColor, ";"), No = /* @__PURE__ */ C("button", {
1728
+ }) => e.aiChat.backgroundColor, ";"), jo = /* @__PURE__ */ C("button", {
1711
1729
  target: "e6iwkw11",
1712
1730
  label: "ClearHistoryButton"
1713
- })("height:34px;background-color:inherit;cursor:pointer;border:none;"), jo = /* @__PURE__ */ C("textarea", {
1731
+ })("height:34px;background-color:inherit;cursor:pointer;border:none;"), Oo = /* @__PURE__ */ C("textarea", {
1714
1732
  target: "e6iwkw12",
1715
1733
  label: "TextInput"
1716
1734
  })("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 ", ({
@@ -1719,21 +1737,21 @@ const Lo = 500, To = /* @__PURE__ */ C("div", {
1719
1737
  theme: e
1720
1738
  }) => e.aiChat.primaryTextColor, ";background-color:", ({
1721
1739
  theme: e
1722
- }) => e.aiChat.input.backgroundColor, ";"), Oo = /* @__PURE__ */ C("button", {
1740
+ }) => e.aiChat.input.backgroundColor, ";"), Eo = /* @__PURE__ */ C("button", {
1723
1741
  target: "e6iwkw13",
1724
1742
  label: "SendMessageButton"
1725
1743
  })("height:34px;background-color:inherit;border-style:none;color:", ({
1726
1744
  theme: e
1727
1745
  }) => e.aiChat.primaryTextColor, ";", ({
1728
1746
  disabled: e
1729
- }) => e ? G`
1747
+ }) => e ? P`
1730
1748
  opacity: 0.3;
1731
1749
  cursor: not-allowed;
1732
- ` : G`
1750
+ ` : P`
1733
1751
  opacity: 1;
1734
1752
  cursor: pointer;
1735
- `), Eo = 34;
1736
- function zo({
1753
+ `), zo = 34;
1754
+ function Zo({
1737
1755
  onSendMessage: e,
1738
1756
  onClearHistoryClick: t,
1739
1757
  disabled: r,
@@ -1762,7 +1780,7 @@ function zo({
1762
1780
  p == null || p(y.target.value), g(y.target.value);
1763
1781
  }, [p]), h = ce(null);
1764
1782
  Re(() => {
1765
- h.current && (h.current.style.height = "inherit", h.current.style.height = `${Math.max(h.current.scrollHeight + 2, Eo)}px`);
1783
+ h.current && (h.current.style.height = "inherit", h.current.style.height = `${Math.max(h.current.scrollHeight + 2, zo)}px`);
1766
1784
  }, [c]), Re(() => {
1767
1785
  h.current && h.current.focus({
1768
1786
  preventScroll: !0
@@ -1784,9 +1802,9 @@ function zo({
1784
1802
  document.addEventListener("mouseup", A), document.addEventListener("keyup", A);
1785
1803
  }
1786
1804
  }, []);
1787
- return /* @__PURE__ */ v(To, {
1805
+ return /* @__PURE__ */ v(No, {
1788
1806
  theme: m,
1789
- children: [/* @__PURE__ */ n(Ao, {
1807
+ children: [/* @__PURE__ */ n(Lo, {
1790
1808
  recentPrompts: a,
1791
1809
  suggestions: i,
1792
1810
  isLoading: l,
@@ -1797,17 +1815,17 @@ function zo({
1797
1815
  }), t && /* @__PURE__ */ n(De, {
1798
1816
  title: w("ai.buttons.clearChat"),
1799
1817
  placement: "bottom-start",
1800
- children: /* @__PURE__ */ n(No, {
1818
+ children: /* @__PURE__ */ n(jo, {
1801
1819
  "aria-label": "clear history",
1802
1820
  onClick: t,
1803
- children: /* @__PURE__ */ n(_o, {
1821
+ children: /* @__PURE__ */ n(Co, {
1804
1822
  theme: m
1805
1823
  })
1806
1824
  })
1807
- }), /* @__PURE__ */ n(jo, {
1825
+ }), /* @__PURE__ */ n(Oo, {
1808
1826
  "aria-label": "chat input",
1809
1827
  onBlur: _,
1810
- maxLength: Lo,
1828
+ maxLength: To,
1811
1829
  ref: h,
1812
1830
  rows: 1,
1813
1831
  onChange: s,
@@ -1816,14 +1834,14 @@ function zo({
1816
1834
  value: c,
1817
1835
  onKeyDown: u,
1818
1836
  theme: m
1819
- }), /* @__PURE__ */ n(Oo, {
1837
+ }), /* @__PURE__ */ n(Eo, {
1820
1838
  "aria-label": "send chat message",
1821
1839
  disabled: r || c.length === 0,
1822
1840
  onClick: b,
1823
1841
  theme: m,
1824
1842
  children: /* @__PURE__ */ n("span", {
1825
1843
  "data-state": "closed",
1826
- children: /* @__PURE__ */ n(wo, {
1844
+ children: /* @__PURE__ */ n(_o, {
1827
1845
  theme: m
1828
1846
  })
1829
1847
  })
@@ -1840,7 +1858,7 @@ function se() {
1840
1858
  return e;
1841
1859
  }, se.apply(this, arguments);
1842
1860
  }
1843
- const Zo = ["children", "options"], k = {
1861
+ const Ro = ["children", "options"], k = {
1844
1862
  blockQuote: "0",
1845
1863
  breakLine: "1",
1846
1864
  breakThematic: "2",
@@ -1890,7 +1908,7 @@ const zt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
1890
1908
  lt: "<",
1891
1909
  nbsp: " ",
1892
1910
  quot: "“"
1893
- }, Ro = ["style", "script"], Wo = ["src", "href", "data", "formAction", "srcDoc", "action"], Go = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Po = /mailto:/i, qo = /\n{2,}$/, vr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Ho = /^ *> ?/gm, Bo = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Yo = /^ {2,}\n/, Uo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Sr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Mr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Fo = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Qo = /^(?:\n *)*\n/, Vo = /\r\n?/g, $o = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Jo = /^\[\^([^\]]+)]/, Xo = /\f/g, Ko = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, en = /^\s*?\[(x|\s)\]/, Ir = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Dr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ar = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ot = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, tn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Lr = /^<!--[\s\S]*?(?:-->)/, rn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, nt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, an = /^\{.*\}$/, on = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, nn = /^<([^ >]+@[^ >]+)>/, ln = /^<([^ >]+:\/[^ >]+)>/, dn = /-([a-z])?/gi, Tr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, sn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, cn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, pn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, un = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, gn = /\t/g, hn = /(^ *\||\| *$)/g, mn = /^ *:-+: *$/, bn = /^ *:-+ *$/, fn = /^ *-+: *$/, Be = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", xn = new RegExp(`^([*_])\\1${Be}\\1\\1(?!\\1)`), kn = new RegExp(`^([*_])${Be}\\1(?!\\1)`), yn = new RegExp(`^(==)${Be}\\1`), wn = new RegExp(`^(~~)${Be}\\1`), _n = /^\\([^0-9A-Za-z\s])/, Rt = /\\([^0-9A-Za-z\s])/g, Cn = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, vn = /^\n+/, Sn = /^([ \t]*)/, Mn = /\\([^\\])/g, In = /(?:^|\n)( *)$/, xt = "(?:\\d+\\.)", kt = "(?:[*+-])";
1911
+ }, Wo = ["style", "script"], Po = ["src", "href", "data", "formAction", "srcDoc", "action"], Go = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, qo = /mailto:/i, Ho = /\n{2,}$/, vr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Bo = /^ *> ?/gm, Yo = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Qo = /^ {2,}\n/, Uo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Sr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Mr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Fo = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Vo = /^(?:\n *)*\n/, $o = /\r\n?/g, Xo = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Jo = /^\[\^([^\]]+)]/, Ko = /\f/g, en = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, tn = /^\s*?\[(x|\s)\]/, Ir = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Dr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Ar = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ot = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, rn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Lr = /^<!--[\s\S]*?(?:-->)/, an = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, nt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, on = /^\{.*\}$/, nn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, ln = /^<([^ >]+@[^ >]+)>/, dn = /^<([^ >]+:\/[^ >]+)>/, sn = /-([a-z])?/gi, Tr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, cn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, pn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, un = /^\[([^\]]*)\] ?\[([^\]]*)\]/, gn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, hn = /\t/g, mn = /(^ *\||\| *$)/g, bn = /^ *:-+: *$/, fn = /^ *:-+ *$/, xn = /^ *-+: *$/, Be = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", kn = new RegExp(`^([*_])\\1${Be}\\1\\1(?!\\1)`), yn = new RegExp(`^([*_])${Be}\\1(?!\\1)`), wn = new RegExp(`^(==)${Be}\\1`), _n = new RegExp(`^(~~)${Be}\\1`), Cn = /^\\([^0-9A-Za-z\s])/, Rt = /\\([^0-9A-Za-z\s])/g, vn = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Sn = /^\n+/, Mn = /^([ \t]*)/, In = /\\([^\\])/g, Dn = /(?:^|\n)( *)$/, xt = "(?:\\d+\\.)", kt = "(?:[*+-])";
1894
1912
  function Nr(e) {
1895
1913
  return "( *)(" + (e === 1 ? xt : kt) + ") +";
1896
1914
  }
@@ -1898,26 +1916,26 @@ const jr = Nr(1), Or = Nr(2);
1898
1916
  function Er(e) {
1899
1917
  return new RegExp("^" + (e === 1 ? jr : Or));
1900
1918
  }
1901
- const Dn = Er(1), An = Er(2);
1919
+ const An = Er(1), Ln = Er(2);
1902
1920
  function zr(e) {
1903
1921
  return new RegExp("^" + (e === 1 ? jr : Or) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? xt : kt) + " )[^\\n]*)*(\\n|$)", "gm");
1904
1922
  }
1905
- const Ln = zr(1), Tn = zr(2);
1923
+ const Tn = zr(1), Nn = zr(2);
1906
1924
  function Zr(e) {
1907
1925
  const t = e === 1 ? xt : kt;
1908
1926
  return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
1909
1927
  }
1910
1928
  const Rr = Zr(1), Wr = Zr(2);
1911
1929
  function Wt(e, t) {
1912
- const r = t === 1, a = r ? Rr : Wr, i = r ? Ln : Tn, l = r ? Dn : An;
1930
+ const r = t === 1, a = r ? Rr : Wr, i = r ? Tn : Nn, l = r ? An : Ln;
1913
1931
  return {
1914
1932
  match: be(function(d, p) {
1915
- const c = In.exec(p.prevCapture);
1933
+ const c = Dn.exec(p.prevCapture);
1916
1934
  return c && (p.list || !p.inline && !p.simple) ? a.exec(d = c[1] + d) : null;
1917
1935
  }),
1918
1936
  order: 1,
1919
1937
  parse(d, p, c) {
1920
- const g = r ? +d[2] : void 0, x = d[0].replace(qo, `
1938
+ const g = r ? +d[2] : void 0, x = d[0].replace(Ho, `
1921
1939
  `).match(i);
1922
1940
  let b = !1;
1923
1941
  return {
@@ -1948,7 +1966,7 @@ function Wt(e, t) {
1948
1966
  }))
1949
1967
  };
1950
1968
  }
1951
- const Nn = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), jn = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Gr = [vr, Sr, Mr, Ir, Ar, Dr, Tr, Rr, Wr], On = [...Gr, /^[^\n]+(?: \n|\n{2,})/, ot, Lr, nt];
1969
+ const jn = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), On = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Pr = [vr, Sr, Mr, Ir, Ar, Dr, Tr, Rr, Wr], En = [...Pr, /^[^\n]+(?: \n|\n{2,})/, ot, Lr, nt];
1952
1970
  function ve(e) {
1953
1971
  let t = e.length;
1954
1972
  for (; t > 0 && e[t - 1] <= " "; )
@@ -1958,10 +1976,10 @@ function ve(e) {
1958
1976
  function ye(e) {
1959
1977
  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();
1960
1978
  }
1961
- function En(e) {
1962
- return fn.test(e) ? "right" : mn.test(e) ? "center" : bn.test(e) ? "left" : null;
1979
+ function zn(e) {
1980
+ return xn.test(e) ? "right" : bn.test(e) ? "center" : fn.test(e) ? "left" : null;
1963
1981
  }
1964
- function Gt(e, t, r, a) {
1982
+ function Pt(e, t, r, a) {
1965
1983
  const i = r.inTable;
1966
1984
  r.inTable = !0;
1967
1985
  let l = [[]], d = "";
@@ -1975,14 +1993,14 @@ function Gt(e, t, r, a) {
1975
1993
  c.trim() === "|" && (p(), a) ? g !== 0 && g !== x.length - 1 && l.push([]) : d += c;
1976
1994
  }), p(), r.inTable = i, l;
1977
1995
  }
1978
- function zn(e, t, r) {
1996
+ function Zn(e, t, r) {
1979
1997
  r.inline = !0;
1980
- const a = e[2] ? e[2].replace(hn, "").split("|").map(En) : [], i = e[3] ? function(d, p, c) {
1998
+ const a = e[2] ? e[2].replace(mn, "").split("|").map(zn) : [], i = e[3] ? function(d, p, c) {
1981
1999
  return d.trim().split(`
1982
2000
  `).map(function(g) {
1983
- return Gt(g, p, c, !0);
2001
+ return Pt(g, p, c, !0);
1984
2002
  });
1985
- }(e[3], t, r) : [], l = Gt(e[1], t, r, !!i.length);
2003
+ }(e[3], t, r) : [], l = Pt(e[1], t, r, !!i.length);
1986
2004
  return r.inline = !1, i.length ? {
1987
2005
  align: a,
1988
2006
  cells: i,
@@ -1993,7 +2011,7 @@ function zn(e, t, r) {
1993
2011
  type: k.paragraph
1994
2012
  };
1995
2013
  }
1996
- function Pt(e, t) {
2014
+ function Gt(e, t) {
1997
2015
  return e.align[t] == null ? {} : {
1998
2016
  textAlign: e.align[t]
1999
2017
  };
@@ -2021,21 +2039,21 @@ function we(e) {
2021
2039
  return e.exec(t);
2022
2040
  });
2023
2041
  }
2024
- function Zn(e, t) {
2042
+ function Rn(e, t) {
2025
2043
  if (t.inline || t.simple)
2026
2044
  return null;
2027
2045
  let r = "";
2028
2046
  e.split(`
2029
2047
  `).every((i) => (i += `
2030
- `, !Gr.some((l) => l.test(i)) && (r += i, !!i.trim())));
2048
+ `, !Pr.some((l) => l.test(i)) && (r += i, !!i.trim())));
2031
2049
  const a = ve(r);
2032
2050
  return a == "" ? null : [r, , a];
2033
2051
  }
2034
- const Rn = /(javascript|vbscript|data(?!:image)):/i;
2035
- function Wn(e) {
2052
+ const Wn = /(javascript|vbscript|data(?!:image)):/i;
2053
+ function Pn(e) {
2036
2054
  try {
2037
2055
  const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
2038
- if (Rn.test(t))
2056
+ if (Wn.test(t))
2039
2057
  return null;
2040
2058
  } catch {
2041
2059
  return null;
@@ -2043,7 +2061,7 @@ function Wn(e) {
2043
2061
  return e;
2044
2062
  }
2045
2063
  function qt(e) {
2046
- return e.replace(Mn, "$1");
2064
+ return e.replace(In, "$1");
2047
2065
  }
2048
2066
  function Ze(e, t, r) {
2049
2067
  const a = r.inline || !1, i = r.simple || !1;
@@ -2057,7 +2075,7 @@ function Gn(e, t, r) {
2057
2075
  const l = e(t, r);
2058
2076
  return r.inline = a, r.simple = i, l;
2059
2077
  }
2060
- function Pn(e, t, r) {
2078
+ function qn(e, t, r) {
2061
2079
  const a = r.inline || !1;
2062
2080
  r.inline = !1;
2063
2081
  const i = e(t, r);
@@ -2069,34 +2087,34 @@ const Ve = (e, t, r) => ({
2069
2087
  function $e() {
2070
2088
  return {};
2071
2089
  }
2072
- function Je() {
2090
+ function Xe() {
2073
2091
  return null;
2074
2092
  }
2075
- function qn(...e) {
2093
+ function Hn(...e) {
2076
2094
  return e.filter(Boolean).join(" ");
2077
2095
  }
2078
- function Xe(e, t, r) {
2096
+ function Je(e, t, r) {
2079
2097
  let a = e;
2080
2098
  const i = t.split(".");
2081
2099
  for (; i.length && (a = a[i[0]], a !== void 0); )
2082
2100
  i.shift();
2083
2101
  return a || r;
2084
2102
  }
2085
- function Hn(e = "", t = {}) {
2103
+ function Bn(e = "", t = {}) {
2086
2104
  function r(o, u, ...s) {
2087
- const h = Xe(t.overrides, `${o}.props`, {});
2105
+ const h = Je(t.overrides, `${o}.props`, {});
2088
2106
  return t.createElement(function(m, w) {
2089
- const _ = Xe(w, m);
2090
- return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : Xe(w, `${m}.component`, m) : m;
2107
+ const _ = Je(w, m);
2108
+ return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : Je(w, `${m}.component`, m) : m;
2091
2109
  }(o, t.overrides), se({}, u, h, {
2092
- className: qn(u == null ? void 0 : u.className, h.className) || void 0
2110
+ className: Hn(u == null ? void 0 : u.className, h.className) || void 0
2093
2111
  }), ...s);
2094
2112
  }
2095
2113
  function a(o) {
2096
- o = o.replace(Ko, "");
2114
+ o = o.replace(en, "");
2097
2115
  let u = !1;
2098
- t.forceInline ? u = !0 : t.forceBlock || (u = un.test(o) === !1);
2099
- const s = g(c(u ? o : `${ve(o).replace(vn, "")}
2116
+ t.forceInline ? u = !0 : t.forceBlock || (u = gn.test(o) === !1);
2117
+ const s = g(c(u ? o : `${ve(o).replace(Sn, "")}
2100
2118
 
2101
2119
  `, {
2102
2120
  inline: u
@@ -2126,7 +2144,7 @@ function Hn(e = "", t = {}) {
2126
2144
  const w = m.indexOf("=");
2127
2145
  if (w !== -1) {
2128
2146
  const _ = function(S) {
2129
- return S.indexOf("-") !== -1 && S.match(rn) === null && (S = S.replace(dn, function(L, z) {
2147
+ return S.indexOf("-") !== -1 && S.match(an) === null && (S = S.replace(sn, function(L, z) {
2130
2148
  return z.toUpperCase();
2131
2149
  })), S;
2132
2150
  }(m.slice(0, w)).trim(), y = function(S) {
@@ -2136,15 +2154,15 @@ function Hn(e = "", t = {}) {
2136
2154
  if (M === "ref")
2137
2155
  return h;
2138
2156
  const A = h[M] = function(S, L, z, de) {
2139
- return L === "style" ? function(Q) {
2157
+ return L === "style" ? function(F) {
2140
2158
  const H = [];
2141
- let V = "", $ = !1, W = !1, X = "";
2142
- if (!Q)
2159
+ let V = "", $ = !1, W = !1, J = "";
2160
+ if (!F)
2143
2161
  return H;
2144
- for (let B = 0; B < Q.length; B++) {
2145
- const P = Q[B];
2146
- if (P !== '"' && P !== "'" || $ || (W ? P === X && (W = !1, X = "") : (W = !0, X = P)), P === "(" && V.endsWith("url") ? $ = !0 : P === ")" && $ && ($ = !1), P !== ";" || W || $)
2147
- V += P;
2162
+ for (let B = 0; B < F.length; B++) {
2163
+ const G = F[B];
2164
+ if (G !== '"' && G !== "'" || $ || (W ? G === J && (W = !1, J = "") : (W = !0, J = G)), G === "(" && V.endsWith("url") ? $ = !0 : G === ")" && $ && ($ = !1), G !== ";" || W || $)
2165
+ V += G;
2148
2166
  else {
2149
2167
  const Y = V.trim();
2150
2168
  if (Y) {
@@ -2161,14 +2179,14 @@ function Hn(e = "", t = {}) {
2161
2179
  if (E) {
2162
2180
  const B = E.indexOf(":");
2163
2181
  if (B > 0) {
2164
- const P = E.slice(0, B).trim(), Y = E.slice(B + 1).trim();
2165
- H.push([P, Y]);
2182
+ const G = E.slice(0, B).trim(), Y = E.slice(B + 1).trim();
2183
+ H.push([G, Y]);
2166
2184
  }
2167
2185
  }
2168
2186
  return H;
2169
- }(z).reduce(function(Q, [H, V]) {
2170
- return Q[H.replace(/(-[a-z])/g, ($) => $[1].toUpperCase())] = de(V, S, H), Q;
2171
- }, {}) : Wo.indexOf(L) !== -1 ? de(z, S, L) : (z.match(an) && (z = z.slice(1, z.length - 1)), z === "true" || z !== "false" && z);
2187
+ }(z).reduce(function(F, [H, V]) {
2188
+ return F[H.replace(/(-[a-z])/g, ($) => $[1].toUpperCase())] = de(V, S, H), F;
2189
+ }, {}) : Po.indexOf(L) !== -1 ? de(z, S, L) : (z.match(on) && (z = z.slice(1, z.length - 1)), z === "true" || z !== "false" && z);
2172
2190
  }(o, _, y, t.sanitizer);
2173
2191
  typeof A == "string" && (ot.test(A) || nt.test(A)) && (h[M] = a(A.trim()));
2174
2192
  } else
@@ -2176,13 +2194,13 @@ function Hn(e = "", t = {}) {
2176
2194
  return h;
2177
2195
  }, {}) : null;
2178
2196
  }
2179
- t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Wn, t.slugify = t.slugify || ye, t.namedCodesToUnicode = t.namedCodesToUnicode ? se({}, Zt, t.namedCodesToUnicode) : Zt, t.createElement = t.createElement || Pa;
2197
+ t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || Pn, t.slugify = t.slugify || ye, t.namedCodesToUnicode = t.namedCodesToUnicode ? se({}, Zt, t.namedCodesToUnicode) : Zt, t.createElement = t.createElement || Ga;
2180
2198
  const l = [], d = {}, p = {
2181
2199
  [k.blockQuote]: {
2182
2200
  match: K(vr),
2183
2201
  order: 1,
2184
2202
  parse(o, u, s) {
2185
- const [, h, m] = o[0].replace(Ho, "").match(Bo);
2203
+ const [, h, m] = o[0].replace(Bo, "").match(Yo);
2186
2204
  return {
2187
2205
  alert: h,
2188
2206
  children: u(m, s)
@@ -2205,7 +2223,7 @@ function Hn(e = "", t = {}) {
2205
2223
  }
2206
2224
  },
2207
2225
  [k.breakLine]: {
2208
- match: we(Yo),
2226
+ match: we(Qo),
2209
2227
  order: 1,
2210
2228
  parse: $e,
2211
2229
  render: (o, u, s) => r("br", {
@@ -2254,13 +2272,13 @@ function Hn(e = "", t = {}) {
2254
2272
  }, o.text)
2255
2273
  },
2256
2274
  [k.footnote]: {
2257
- match: K($o),
2275
+ match: K(Xo),
2258
2276
  order: 0,
2259
2277
  parse: (o) => (l.push({
2260
2278
  footnote: o[2],
2261
2279
  identifier: o[1]
2262
2280
  }), {}),
2263
- render: Je
2281
+ render: Xe
2264
2282
  },
2265
2283
  [k.footnoteReference]: {
2266
2284
  match: ie(Jo),
@@ -2277,7 +2295,7 @@ function Hn(e = "", t = {}) {
2277
2295
  }, o.text))
2278
2296
  },
2279
2297
  [k.gfmTask]: {
2280
- match: ie(en),
2298
+ match: ie(tn),
2281
2299
  order: 1,
2282
2300
  parse: (o) => ({
2283
2301
  completed: o[1].toLowerCase() === "x"
@@ -2315,9 +2333,9 @@ function Hn(e = "", t = {}) {
2315
2333
  match: we(ot),
2316
2334
  order: 1,
2317
2335
  parse(o, u, s) {
2318
- const [, h] = o[3].match(Sn), m = new RegExp(`^${h}`, "gm"), w = o[3].replace(m, ""), _ = (y = w, On.some((z) => z.test(y)) ? Pn : Ze);
2336
+ const [, h] = o[3].match(Mn), m = new RegExp(`^${h}`, "gm"), w = o[3].replace(m, ""), _ = (y = w, En.some((z) => z.test(y)) ? qn : Ze);
2319
2337
  var y;
2320
- const M = o[1].toLowerCase(), A = Ro.indexOf(M) !== -1, S = (A ? M : o[1]).trim(), L = {
2338
+ const M = o[1].toLowerCase(), A = Wo.indexOf(M) !== -1, S = (A ? M : o[1]).trim(), L = {
2321
2339
  attrs: i(S, o[2]),
2322
2340
  noInnerParse: A,
2323
2341
  tag: S
@@ -2346,10 +2364,10 @@ function Hn(e = "", t = {}) {
2346
2364
  match: we(Lr),
2347
2365
  order: 1,
2348
2366
  parse: () => ({}),
2349
- render: Je
2367
+ render: Xe
2350
2368
  },
2351
2369
  [k.image]: {
2352
- match: oe(jn),
2370
+ match: oe(On),
2353
2371
  order: 1,
2354
2372
  parse: (o) => ({
2355
2373
  alt: o[1],
@@ -2364,7 +2382,7 @@ function Hn(e = "", t = {}) {
2364
2382
  })
2365
2383
  },
2366
2384
  [k.link]: {
2367
- match: ie(Nn),
2385
+ match: ie(jn),
2368
2386
  order: 3,
2369
2387
  parse: (o, u, s) => ({
2370
2388
  children: Gn(u, o[1], s),
@@ -2378,7 +2396,7 @@ function Hn(e = "", t = {}) {
2378
2396
  }, u(o.children, s))
2379
2397
  },
2380
2398
  [k.linkAngleBraceStyleDetector]: {
2381
- match: ie(ln),
2399
+ match: ie(dn),
2382
2400
  order: 0,
2383
2401
  parse: (o) => ({
2384
2402
  children: [{
@@ -2390,7 +2408,7 @@ function Hn(e = "", t = {}) {
2390
2408
  })
2391
2409
  },
2392
2410
  [k.linkBareUrlDetector]: {
2393
- match: be((o, u) => u.inAnchor || t.disableAutoLink ? null : ie(on)(o, u)),
2411
+ match: be((o, u) => u.inAnchor || t.disableAutoLink ? null : ie(nn)(o, u)),
2394
2412
  order: 0,
2395
2413
  parse: (o) => ({
2396
2414
  children: [{
@@ -2403,11 +2421,11 @@ function Hn(e = "", t = {}) {
2403
2421
  })
2404
2422
  },
2405
2423
  [k.linkMailtoDetector]: {
2406
- match: ie(nn),
2424
+ match: ie(ln),
2407
2425
  order: 0,
2408
2426
  parse(o) {
2409
2427
  let u = o[1], s = o[1];
2410
- return Po.test(s) || (s = "mailto:" + s), {
2428
+ return qo.test(s) || (s = "mailto:" + s), {
2411
2429
  children: [{
2412
2430
  text: u.replace("mailto:", ""),
2413
2431
  type: k.text
@@ -2420,14 +2438,14 @@ function Hn(e = "", t = {}) {
2420
2438
  [k.orderedList]: Wt(r, 1),
2421
2439
  [k.unorderedList]: Wt(r, 2),
2422
2440
  [k.newlineCoalescer]: {
2423
- match: K(Qo),
2441
+ match: K(Vo),
2424
2442
  order: 3,
2425
2443
  parse: $e,
2426
2444
  render: () => `
2427
2445
  `
2428
2446
  },
2429
2447
  [k.paragraph]: {
2430
- match: be(Zn),
2448
+ match: be(Rn),
2431
2449
  order: 3,
2432
2450
  parse: Ve,
2433
2451
  render: (o, u, s) => r("p", {
@@ -2435,16 +2453,16 @@ function Hn(e = "", t = {}) {
2435
2453
  }, u(o.children, s))
2436
2454
  },
2437
2455
  [k.ref]: {
2438
- match: ie(sn),
2456
+ match: ie(cn),
2439
2457
  order: 0,
2440
2458
  parse: (o) => (d[o[1]] = {
2441
2459
  target: o[2],
2442
2460
  title: o[4]
2443
2461
  }, {}),
2444
- render: Je
2462
+ render: Xe
2445
2463
  },
2446
2464
  [k.refImage]: {
2447
- match: oe(cn),
2465
+ match: oe(pn),
2448
2466
  order: 0,
2449
2467
  parse: (o) => ({
2450
2468
  alt: o[1] || void 0,
@@ -2458,7 +2476,7 @@ function Hn(e = "", t = {}) {
2458
2476
  }) : null
2459
2477
  },
2460
2478
  [k.refLink]: {
2461
- match: ie(pn),
2479
+ match: ie(un),
2462
2480
  order: 0,
2463
2481
  parse: (o, u, s) => ({
2464
2482
  children: u(o[1], s),
@@ -2476,7 +2494,7 @@ function Hn(e = "", t = {}) {
2476
2494
  [k.table]: {
2477
2495
  match: K(Tr),
2478
2496
  order: 1,
2479
- parse: zn,
2497
+ parse: Zn,
2480
2498
  render(o, u, s) {
2481
2499
  const h = o;
2482
2500
  return r("table", {
@@ -2484,7 +2502,7 @@ function Hn(e = "", t = {}) {
2484
2502
  }, r("thead", null, r("tr", null, h.header.map(function(m, w) {
2485
2503
  return r("th", {
2486
2504
  key: w,
2487
- style: Pt(h, w)
2505
+ style: Gt(h, w)
2488
2506
  }, u(m, s));
2489
2507
  }))), r("tbody", null, h.cells.map(function(m, w) {
2490
2508
  return r("tr", {
@@ -2492,22 +2510,22 @@ function Hn(e = "", t = {}) {
2492
2510
  }, m.map(function(_, y) {
2493
2511
  return r("td", {
2494
2512
  key: y,
2495
- style: Pt(h, y)
2513
+ style: Gt(h, y)
2496
2514
  }, u(_, s));
2497
2515
  }));
2498
2516
  })));
2499
2517
  }
2500
2518
  },
2501
2519
  [k.text]: {
2502
- match: we(Cn),
2520
+ match: we(vn),
2503
2521
  order: 4,
2504
2522
  parse: (o) => ({
2505
- text: o[0].replace(tn, (u, s) => t.namedCodesToUnicode[s] ? t.namedCodesToUnicode[s] : u)
2523
+ text: o[0].replace(rn, (u, s) => t.namedCodesToUnicode[s] ? t.namedCodesToUnicode[s] : u)
2506
2524
  }),
2507
2525
  render: (o) => o.text
2508
2526
  },
2509
2527
  [k.textBolded]: {
2510
- match: oe(xn),
2528
+ match: oe(kn),
2511
2529
  order: 2,
2512
2530
  parse: (o, u, s) => ({
2513
2531
  children: u(o[2], s)
@@ -2517,7 +2535,7 @@ function Hn(e = "", t = {}) {
2517
2535
  }, u(o.children, s))
2518
2536
  },
2519
2537
  [k.textEmphasized]: {
2520
- match: oe(kn),
2538
+ match: oe(yn),
2521
2539
  order: 3,
2522
2540
  parse: (o, u, s) => ({
2523
2541
  children: u(o[2], s)
@@ -2527,7 +2545,7 @@ function Hn(e = "", t = {}) {
2527
2545
  }, u(o.children, s))
2528
2546
  },
2529
2547
  [k.textEscaped]: {
2530
- match: oe(_n),
2548
+ match: oe(Cn),
2531
2549
  order: 1,
2532
2550
  parse: (o) => ({
2533
2551
  text: o[1],
@@ -2535,7 +2553,7 @@ function Hn(e = "", t = {}) {
2535
2553
  })
2536
2554
  },
2537
2555
  [k.textMarked]: {
2538
- match: oe(yn),
2556
+ match: oe(wn),
2539
2557
  order: 3,
2540
2558
  parse: Ve,
2541
2559
  render: (o, u, s) => r("mark", {
@@ -2543,7 +2561,7 @@ function Hn(e = "", t = {}) {
2543
2561
  }, u(o.children, s))
2544
2562
  },
2545
2563
  [k.textStrikethroughed]: {
2546
- match: oe(wn),
2564
+ match: oe(_n),
2547
2565
  order: 3,
2548
2566
  parse: Ve,
2549
2567
  render: (o, u, s) => r("del", {
@@ -2578,8 +2596,8 @@ function Hn(e = "", t = {}) {
2578
2596
  return w !== _ ? w - _ : h < m ? -1 : 1;
2579
2597
  }), function(h, m) {
2580
2598
  return s(function(w) {
2581
- return w.replace(Vo, `
2582
- `).replace(Xo, "").replace(gn, " ");
2599
+ return w.replace($o, `
2600
+ `).replace(Ko, "").replace(hn, " ");
2583
2601
  }(h), m);
2584
2602
  };
2585
2603
  }(p), g = (x = /* @__PURE__ */ function(o, u) {
@@ -2613,7 +2631,7 @@ function Hn(e = "", t = {}) {
2613
2631
  })));
2614
2632
  }))) : b;
2615
2633
  }
2616
- const Bn = (e) => {
2634
+ const Yn = (e) => {
2617
2635
  let {
2618
2636
  children: t = "",
2619
2637
  options: r
@@ -2624,31 +2642,31 @@ const Bn = (e) => {
2624
2642
  for (p = 0; p < g.length; p++)
2625
2643
  l.indexOf(d = g[p]) >= 0 || (c[d] = i[d]);
2626
2644
  return c;
2627
- }(e, Zo);
2628
- return Na(Hn(t, r), a);
2629
- }, Yn = /* @__PURE__ */ C("div", {
2645
+ }(e, Ro);
2646
+ return Na(Bn(t, r), a);
2647
+ }, Qn = /* @__PURE__ */ C("div", {
2630
2648
  target: "e1vkf9b40",
2631
2649
  label: "FlexContainer"
2632
2650
  })("display:flex;", ({
2633
2651
  align: e
2634
- }) => e === "right" ? G`
2652
+ }) => e === "right" ? P`
2635
2653
  justify-content: flex-end;
2636
- ` : G`
2654
+ ` : P`
2637
2655
  justify-content: flex-start;
2638
- `), Pr = /* @__PURE__ */ C("div", {
2656
+ `), Gr = /* @__PURE__ */ C("div", {
2639
2657
  target: "e1vkf9b41",
2640
2658
  label: "MessageContainer"
2641
2659
  })("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;", ({
2642
2660
  align: e
2643
- }) => e === "right" ? G`
2661
+ }) => e === "right" ? P`
2644
2662
  text-align: right;
2645
2663
  border-radius: 10px 10px 0px 10px;
2646
- ` : G`
2664
+ ` : P`
2647
2665
  text-align: left;
2648
2666
  border-radius: 10px 10px 10px 0px;
2649
2667
  `, " ", ({
2650
2668
  align: e
2651
- }) => e !== "full" ? G`
2669
+ }) => e !== "full" ? P`
2652
2670
  max-width: 85%;
2653
2671
  ` : "", " color:", ({
2654
2672
  theme: e
@@ -2662,13 +2680,13 @@ const Bn = (e) => {
2662
2680
  const {
2663
2681
  themeSettings: r
2664
2682
  } = D();
2665
- return /* @__PURE__ */ n(Yn, {
2683
+ return /* @__PURE__ */ n(Qn, {
2666
2684
  theme: r,
2667
2685
  align: e,
2668
- children: /* @__PURE__ */ n(Pr, {
2686
+ children: /* @__PURE__ */ n(Gr, {
2669
2687
  theme: r,
2670
2688
  align: e,
2671
- children: typeof t == "string" ? /* @__PURE__ */ n(Bn, {
2689
+ children: typeof t == "string" ? /* @__PURE__ */ n(Yn, {
2672
2690
  children: t
2673
2691
  }) : t
2674
2692
  })
@@ -2686,12 +2704,12 @@ function Un() {
2686
2704
  const Fn = /* @__PURE__ */ C("div", {
2687
2705
  target: "e1r5p4wy0",
2688
2706
  label: "Container"
2689
- })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Qn = /* @__PURE__ */ C("div", {
2707
+ })("margin:auto;display:flex;flex-direction:column;align-items:center;row-gap:21px;"), Vn = /* @__PURE__ */ C("div", {
2690
2708
  target: "e1r5p4wy1",
2691
2709
  label: "Title"
2692
2710
  })("color:", ({
2693
2711
  theme: e
2694
- }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), Vn = /* @__PURE__ */ C("div", {
2712
+ }) => e.aiChat.primaryTextColor, ";text-align:center;font-weight:600;"), $n = /* @__PURE__ */ C("div", {
2695
2713
  target: "e1r5p4wy2",
2696
2714
  label: "ActionButton"
2697
2715
  })("color:rgba(54,163,217,1);cursor:pointer;");
@@ -2703,10 +2721,10 @@ function qr({
2703
2721
  themeSettings: r
2704
2722
  } = D();
2705
2723
  return /* @__PURE__ */ v(Fn, {
2706
- children: [/* @__PURE__ */ n(Qn, {
2724
+ children: [/* @__PURE__ */ n(Vn, {
2707
2725
  theme: r,
2708
2726
  children: e
2709
- }), /* @__PURE__ */ n(wa, {}), t && /* @__PURE__ */ n(Vn, {
2727
+ }), /* @__PURE__ */ n(wa, {}), t && /* @__PURE__ */ n($n, {
2710
2728
  onClick: t.onClick,
2711
2729
  children: t.text
2712
2730
  })]
@@ -2734,14 +2752,14 @@ function Hr() {
2734
2752
  })]
2735
2753
  });
2736
2754
  }
2737
- const $n = /* @__PURE__ */ C("div", {
2755
+ const Xn = /* @__PURE__ */ C("div", {
2738
2756
  target: "ed5z2fc0",
2739
2757
  label: "FlexContainer"
2740
2758
  })("display:flex;", ({
2741
2759
  align: e
2742
- }) => e === "right" ? G`
2760
+ }) => e === "right" ? P`
2743
2761
  justify-content: flex-end;
2744
- ` : G`
2762
+ ` : P`
2745
2763
  justify-content: flex-start;
2746
2764
  `), Jn = /* @__PURE__ */ C("button", {
2747
2765
  target: "ed5z2fc1",
@@ -2758,13 +2776,13 @@ const $n = /* @__PURE__ */ C("div", {
2758
2776
  theme: e
2759
2777
  }) => e.aiChat.clickableMessages.hover.backgroundColor, ";}border-radius:20px;", ({
2760
2778
  align: e
2761
- }) => e === "right" ? G`
2779
+ }) => e === "right" ? P`
2762
2780
  text-align: right;
2763
- ` : G`
2781
+ ` : P`
2764
2782
  text-align: left;
2765
2783
  `, " ", ({
2766
2784
  align: e
2767
- }) => e !== "full" ? G`
2785
+ }) => e !== "full" ? P`
2768
2786
  max-width: 382px;
2769
2787
  ` : "", " ", ({
2770
2788
  theme: e
@@ -2775,7 +2793,7 @@ const $n = /* @__PURE__ */ C("div", {
2775
2793
  } = e.aiChat.suggestions;
2776
2794
  if (t) {
2777
2795
  const [a, i] = t;
2778
- return G`
2796
+ return P`
2779
2797
  border: none;
2780
2798
  position: relative;
2781
2799
  border-radius: ${r};
@@ -2797,7 +2815,7 @@ const $n = /* @__PURE__ */ C("div", {
2797
2815
  }
2798
2816
  return "";
2799
2817
  });
2800
- function Ge({
2818
+ function Pe({
2801
2819
  children: e,
2802
2820
  align: t,
2803
2821
  onClick: r,
@@ -2808,7 +2826,7 @@ function Ge({
2808
2826
  const {
2809
2827
  themeSettings: d
2810
2828
  } = D();
2811
- return /* @__PURE__ */ n($n, {
2829
+ return /* @__PURE__ */ n(Xn, {
2812
2830
  align: t,
2813
2831
  children: /* @__PURE__ */ n(Jn, {
2814
2832
  "aria-label": l,
@@ -2821,20 +2839,20 @@ function Ge({
2821
2839
  })
2822
2840
  });
2823
2841
  }
2824
- function Xn({
2842
+ function Kn({
2825
2843
  onCancel: e,
2826
2844
  onConfirm: t
2827
2845
  }) {
2828
2846
  const {
2829
2847
  t: r
2830
2848
  } = O();
2831
- return /* @__PURE__ */ v(U, {
2849
+ return /* @__PURE__ */ v(Q, {
2832
2850
  children: [/* @__PURE__ */ n(le, {
2833
2851
  align: "left",
2834
2852
  children: r("ai.clearHistoryPrompt")
2835
2853
  }), /* @__PURE__ */ v("div", {
2836
2854
  className: "csdk-flex csdk-gap-x-2",
2837
- children: [/* @__PURE__ */ n(Ge, {
2855
+ children: [/* @__PURE__ */ n(Pe, {
2838
2856
  align: "right",
2839
2857
  onClick: t,
2840
2858
  accessibleName: "confirm clear chat",
@@ -2842,7 +2860,7 @@ function Xn({
2842
2860
  className: "csdk-py-[6px] csdk-px-[20px]",
2843
2861
  children: r("ai.buttons.yes")
2844
2862
  })
2845
- }), /* @__PURE__ */ n(Ge, {
2863
+ }), /* @__PURE__ */ n(Pe, {
2846
2864
  align: "right",
2847
2865
  onClick: e,
2848
2866
  accessibleName: "cancel clear chat",
@@ -2854,19 +2872,19 @@ function Xn({
2854
2872
  })]
2855
2873
  });
2856
2874
  }
2857
- function Kn(e) {
2875
+ function el(e) {
2858
2876
  return va("MuiDialog", e);
2859
2877
  }
2860
- const Ke = sa("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Br = /* @__PURE__ */ Pe({});
2878
+ const Ke = sa("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), Br = /* @__PURE__ */ Ge({});
2861
2879
  process.env.NODE_ENV !== "production" && (Br.displayName = "DialogContext");
2862
- const el = qe(ca, {
2880
+ const tl = qe(ca, {
2863
2881
  name: "MuiDialog",
2864
2882
  slot: "Backdrop",
2865
2883
  overrides: (e, t) => t.backdrop
2866
2884
  })({
2867
2885
  // Improve scrollable dialog support.
2868
2886
  zIndex: -1
2869
- }), tl = (e) => {
2887
+ }), rl = (e) => {
2870
2888
  const {
2871
2889
  classes: t,
2872
2890
  scroll: r,
@@ -2878,8 +2896,8 @@ const el = qe(ca, {
2878
2896
  container: ["container", `scroll${he(r)}`],
2879
2897
  paper: ["paper", `paperScroll${he(r)}`, `paperWidth${he(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
2880
2898
  };
2881
- return ka(d, Kn, t);
2882
- }, rl = qe(pa, {
2899
+ return ka(d, el, t);
2900
+ }, al = qe(pa, {
2883
2901
  name: "MuiDialog",
2884
2902
  slot: "Root",
2885
2903
  overridesResolver: (e, t) => t.root
@@ -2888,7 +2906,7 @@ const el = qe(ca, {
2888
2906
  // Use !important to override the Modal inline-style.
2889
2907
  position: "absolute !important"
2890
2908
  }
2891
- }), al = qe("div", {
2909
+ }), il = qe("div", {
2892
2910
  name: "MuiDialog",
2893
2911
  slot: "Container",
2894
2912
  overridesResolver: (e, t) => {
@@ -2930,7 +2948,7 @@ const el = qe(ca, {
2930
2948
  }
2931
2949
  }
2932
2950
  }]
2933
- }), il = qe(Vt, {
2951
+ }), ol = qe(Vt, {
2934
2952
  name: "MuiDialog",
2935
2953
  slot: "Paper",
2936
2954
  overridesResolver: (e, t) => {
@@ -3022,7 +3040,7 @@ const el = qe(ca, {
3022
3040
  }
3023
3041
  }
3024
3042
  }]
3025
- }))), Yr = /* @__PURE__ */ Jt(function(e, t) {
3043
+ }))), Yr = /* @__PURE__ */ Xt(function(e, t) {
3026
3044
  const r = ga({
3027
3045
  props: e,
3028
3046
  name: "MuiDialog"
@@ -3050,23 +3068,23 @@ const el = qe(ca, {
3050
3068
  scroll: L = "paper",
3051
3069
  slots: z = {},
3052
3070
  slotProps: de = {},
3053
- TransitionComponent: Q = wt,
3071
+ TransitionComponent: F = wt,
3054
3072
  transitionDuration: H = i,
3055
3073
  TransitionProps: V
3056
- } = l, $ = Qi(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"]), W = j(I({}, r), {
3074
+ } = l, $ = Vi(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"]), W = j(I({}, r), {
3057
3075
  disableEscapeKeyDown: u,
3058
3076
  fullScreen: s,
3059
3077
  fullWidth: h,
3060
3078
  maxWidth: m,
3061
3079
  scroll: L
3062
- }), X = tl(W), E = ce(), B = (ue) => {
3080
+ }), J = rl(W), E = ce(), B = (ue) => {
3063
3081
  E.current = ue.target === ue.currentTarget;
3064
- }, P = (ue) => {
3082
+ }, G = (ue) => {
3065
3083
  _ && _(ue), E.current && (E.current = null, w && w(ue), y && y(ue, "backdropClick"));
3066
- }, Y = ma(p), ae = F(() => ({
3084
+ }, Y = ma(p), ae = U(() => ({
3067
3085
  titleId: Y
3068
3086
  }), [Y]), fe = I({
3069
- transition: Q
3087
+ transition: F
3070
3088
  }, z), N = I({
3071
3089
  transition: V,
3072
3090
  paper: S,
@@ -3075,28 +3093,28 @@ const el = qe(ca, {
3075
3093
  slots: fe,
3076
3094
  slotProps: N
3077
3095
  }, [Le, Te] = xe("root", {
3078
- elementType: rl,
3096
+ elementType: al,
3079
3097
  shouldForwardComponentProp: !0,
3080
3098
  externalForwardedProps: q,
3081
3099
  ownerState: W,
3082
- className: Fe(X.root, o),
3100
+ className: Ue(J.root, o),
3083
3101
  ref: t
3084
3102
  }), [Kr, ea] = xe("backdrop", {
3085
- elementType: el,
3103
+ elementType: tl,
3086
3104
  shouldForwardComponentProp: !0,
3087
3105
  externalForwardedProps: q,
3088
3106
  ownerState: W
3089
3107
  }), [ta, ra] = xe("paper", {
3090
- elementType: il,
3108
+ elementType: ol,
3091
3109
  shouldForwardComponentProp: !0,
3092
3110
  externalForwardedProps: q,
3093
3111
  ownerState: W,
3094
- className: Fe(X.paper, S.className)
3112
+ className: Ue(J.paper, S.className)
3095
3113
  }), [aa, ia] = xe("container", {
3096
- elementType: al,
3114
+ elementType: il,
3097
3115
  externalForwardedProps: q,
3098
3116
  ownerState: W,
3099
- className: Fe(X.container)
3117
+ className: Ue(J.container)
3100
3118
  }), [oa, na] = xe("transition", {
3101
3119
  elementType: wt,
3102
3120
  externalForwardedProps: q,
@@ -3122,7 +3140,7 @@ const el = qe(ca, {
3122
3140
  disableEscapeKeyDown: u,
3123
3141
  onClose: y,
3124
3142
  open: M,
3125
- onClick: P
3143
+ onClick: G
3126
3144
  }, Te), $), {
3127
3145
  children: /* @__PURE__ */ ke(oa, j(I({}, na), {
3128
3146
  children: /* @__PURE__ */ ke(aa, j(I({
@@ -3308,7 +3326,7 @@ process.env.NODE_ENV !== "production" && (Yr.propTypes = {
3308
3326
  */
3309
3327
  TransitionProps: f.object
3310
3328
  });
3311
- function ol({
3329
+ function nl({
3312
3330
  fillColor: e = "#262E3D"
3313
3331
  }) {
3314
3332
  return /* @__PURE__ */ v("svg", {
@@ -3332,7 +3350,7 @@ function ol({
3332
3350
  })]
3333
3351
  });
3334
3352
  }
3335
- const Ur = {
3353
+ const Qr = {
3336
3354
  row: {
3337
3355
  hover: "rgba(224, 224, 224, 0.3)"
3338
3356
  },
@@ -3417,9 +3435,9 @@ const Ur = {
3417
3435
  errorBG: "rgba(231, 71, 39, 0.1)"
3418
3436
  }
3419
3437
  }
3420
- }, nl = {
3438
+ }, ll = {
3421
3439
  shouldForwardProp: (e) => !e.startsWith("$")
3422
- }, Ae = /* @__PURE__ */ C(ar, nl, {
3440
+ }, Ae = /* @__PURE__ */ C(ar, ll, {
3423
3441
  target: "e869yoj0",
3424
3442
  label: "IconButton"
3425
3443
  })(({
@@ -3427,10 +3445,10 @@ const Ur = {
3427
3445
  }) => ({
3428
3446
  padding: 2,
3429
3447
  "&.MuiIconButton-root:hover": {
3430
- backgroundColor: e ?? Ur.interaction.defaultHover
3448
+ backgroundColor: e ?? Qr.interaction.defaultHover
3431
3449
  }
3432
3450
  }));
3433
- function ll({
3451
+ function dl({
3434
3452
  fill: e = "rgba(38, 46, 61, 0.67)"
3435
3453
  }) {
3436
3454
  return /* @__PURE__ */ n("svg", {
@@ -3447,7 +3465,7 @@ function ll({
3447
3465
  })
3448
3466
  });
3449
3467
  }
3450
- function dl({
3468
+ function sl({
3451
3469
  fill: e = "rgba(38, 46, 61, 0.67)"
3452
3470
  }) {
3453
3471
  return /* @__PURE__ */ n("svg", {
@@ -3464,7 +3482,7 @@ function dl({
3464
3482
  })
3465
3483
  });
3466
3484
  }
3467
- function sl() {
3485
+ function cl() {
3468
3486
  return /* @__PURE__ */ n("svg", {
3469
3487
  xmlns: "http://www.w3.org/2000/svg",
3470
3488
  width: "24",
@@ -3480,7 +3498,7 @@ function sl() {
3480
3498
  })
3481
3499
  });
3482
3500
  }
3483
- const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3501
+ const yt = (e) => tr(e.chart.backgroundColor), pl = ({
3484
3502
  title: e
3485
3503
  }) => {
3486
3504
  const {
@@ -3491,12 +3509,12 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3491
3509
  children: /* @__PURE__ */ n(Ae, {
3492
3510
  disableTouchRipple: !0,
3493
3511
  $hoverColor: yt(t),
3494
- children: /* @__PURE__ */ n(dl, {
3512
+ children: /* @__PURE__ */ n(sl, {
3495
3513
  fill: t.chart.textColor
3496
3514
  })
3497
3515
  })
3498
3516
  });
3499
- }, pl = ({
3517
+ }, ul = ({
3500
3518
  items: e
3501
3519
  }) => {
3502
3520
  const [t, r] = R(null), a = (d) => {
@@ -3506,7 +3524,7 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3506
3524
  }, {
3507
3525
  themeSettings: l
3508
3526
  } = D();
3509
- return /* @__PURE__ */ v(U, {
3527
+ return /* @__PURE__ */ v(Q, {
3510
3528
  children: [/* @__PURE__ */ n(Ae, {
3511
3529
  onClick: a,
3512
3530
  $hoverColor: yt(l),
@@ -3533,7 +3551,7 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3533
3551
  sx: {
3534
3552
  fontSize: "13px",
3535
3553
  fontFamily: l.typography.fontFamily,
3536
- color: Ur.text.content
3554
+ color: Qr.text.content
3537
3555
  },
3538
3556
  disableRipple: !0,
3539
3557
  children: [d.icon, /* @__PURE__ */ n("div", {
@@ -3543,7 +3561,7 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3543
3561
  }, d.title))
3544
3562
  })]
3545
3563
  });
3546
- }, ul = ({
3564
+ }, gl = ({
3547
3565
  onClick: e
3548
3566
  }) => {
3549
3567
  const {
@@ -3556,37 +3574,37 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
3556
3574
  children: /* @__PURE__ */ n(Ae, {
3557
3575
  onClick: e,
3558
3576
  $hoverColor: yt(t),
3559
- children: /* @__PURE__ */ n(ll, {
3577
+ children: /* @__PURE__ */ n(dl, {
3560
3578
  fill: t.chart.textColor
3561
3579
  })
3562
3580
  })
3563
3581
  });
3564
- }, gl = /* @__PURE__ */ C("div", {
3582
+ }, hl = /* @__PURE__ */ C("div", {
3565
3583
  target: "e1cseu7j0",
3566
3584
  label: "ToolbarContainer"
3567
3585
  })("display:flex;padding-top:6px;padding-bottom:6px;");
3568
- function hl({
3586
+ function ml({
3569
3587
  infoTooltipText: e,
3570
3588
  onRefresh: t,
3571
3589
  onExpand: r
3572
3590
  }) {
3573
- const a = F(() => [{
3591
+ const a = U(() => [{
3574
3592
  title: "Refresh",
3575
3593
  onClick: t,
3576
- icon: /* @__PURE__ */ n(sl, {})
3594
+ icon: /* @__PURE__ */ n(cl, {})
3577
3595
  }], [t]);
3578
- return /* @__PURE__ */ v(gl, {
3596
+ return /* @__PURE__ */ v(hl, {
3579
3597
  "aria-label": "chatbot chart toolbar",
3580
- children: [/* @__PURE__ */ n(cl, {
3598
+ children: [/* @__PURE__ */ n(pl, {
3581
3599
  title: e ?? ""
3582
- }), /* @__PURE__ */ n(pl, {
3583
- items: a
3584
3600
  }), /* @__PURE__ */ n(ul, {
3601
+ items: a
3602
+ }), /* @__PURE__ */ n(gl, {
3585
3603
  onClick: r
3586
3604
  })]
3587
3605
  });
3588
3606
  }
3589
- function ml({
3607
+ function bl({
3590
3608
  content: e
3591
3609
  }) {
3592
3610
  const [t, r] = R(!1), {
@@ -3594,7 +3612,7 @@ function ml({
3594
3612
  } = D(), {
3595
3613
  inlineElement: i,
3596
3614
  expandedElement: l
3597
- } = F(() => {
3615
+ } = U(() => {
3598
3616
  const d = mt(e, {
3599
3617
  useCustomizedStyleOptions: !0
3600
3618
  });
@@ -3607,7 +3625,7 @@ function ml({
3607
3625
  } = d, g = {
3608
3626
  cornerRadius: "Small",
3609
3627
  header: {
3610
- renderToolbar: (o) => /* @__PURE__ */ n(hl, {
3628
+ renderToolbar: (o) => /* @__PURE__ */ n(ml, {
3611
3629
  infoTooltipText: p,
3612
3630
  onRefresh: o,
3613
3631
  onExpand: () => r(!0)
@@ -3653,7 +3671,7 @@ function ml({
3653
3671
  expandedElement: b
3654
3672
  };
3655
3673
  }, [e]);
3656
- return /* @__PURE__ */ v(U, {
3674
+ return /* @__PURE__ */ v(Q, {
3657
3675
  children: [i, /* @__PURE__ */ v(Yr, {
3658
3676
  open: t,
3659
3677
  onClose: () => r(!1),
@@ -3673,7 +3691,7 @@ function ml({
3673
3691
  }), /* @__PURE__ */ n(ar, {
3674
3692
  onClick: () => r(!1),
3675
3693
  "aria-label": "close expanded chart",
3676
- children: /* @__PURE__ */ n(ol, {
3694
+ children: /* @__PURE__ */ n(nl, {
3677
3695
  fillColor: a.aiChat.primaryTextColor
3678
3696
  })
3679
3697
  })]
@@ -3684,7 +3702,7 @@ function ml({
3684
3702
  })]
3685
3703
  });
3686
3704
  }
3687
- function bl({
3705
+ function fl({
3688
3706
  theme: e
3689
3707
  }) {
3690
3708
  return /* @__PURE__ */ n("svg", {
@@ -3701,7 +3719,7 @@ function bl({
3701
3719
  })
3702
3720
  });
3703
3721
  }
3704
- function fl({
3722
+ function xl({
3705
3723
  onClick: e,
3706
3724
  disabled: t
3707
3725
  }) {
@@ -3717,13 +3735,13 @@ function fl({
3717
3735
  onClick: e,
3718
3736
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
3719
3737
  disabled: t,
3720
- children: /* @__PURE__ */ n(bl, {
3738
+ children: /* @__PURE__ */ n(fl, {
3721
3739
  theme: r
3722
3740
  })
3723
3741
  })
3724
3742
  });
3725
3743
  }
3726
- function xl({
3744
+ function kl({
3727
3745
  theme: e
3728
3746
  }) {
3729
3747
  return /* @__PURE__ */ n("svg", {
@@ -3740,7 +3758,7 @@ function xl({
3740
3758
  })
3741
3759
  });
3742
3760
  }
3743
- function kl({
3761
+ function yl({
3744
3762
  onClick: e,
3745
3763
  disabled: t
3746
3764
  }) {
@@ -3756,13 +3774,13 @@ function kl({
3756
3774
  onClick: e,
3757
3775
  $hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
3758
3776
  disabled: t,
3759
- children: /* @__PURE__ */ n(xl, {
3777
+ children: /* @__PURE__ */ n(kl, {
3760
3778
  theme: r
3761
3779
  })
3762
3780
  })
3763
3781
  });
3764
3782
  }
3765
- const yl = () => {
3783
+ const wl = () => {
3766
3784
  const [e, t] = R(!1), r = ce(null), a = T(() => {
3767
3785
  t(!0);
3768
3786
  }, []), i = T(() => {
@@ -3772,13 +3790,13 @@ const yl = () => {
3772
3790
  var d;
3773
3791
  ((d = r.current) == null ? void 0 : d.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;
3774
3792
  }, [a, i]), e];
3775
- }, wl = /* @__PURE__ */ C("div", {
3793
+ }, _l = /* @__PURE__ */ C("div", {
3776
3794
  target: "e2xyvaw0",
3777
3795
  label: "Container"
3778
3796
  })("display:flex;flex-direction:column;row-gap:", ({
3779
3797
  theme: e
3780
3798
  }) => e.aiChat.body.gapBetweenMessages, ";");
3781
- function _l({
3799
+ function Cl({
3782
3800
  visible: e,
3783
3801
  onSend: t
3784
3802
  }) {
@@ -3787,10 +3805,10 @@ function _l({
3787
3805
  }, [t]);
3788
3806
  return e ? /* @__PURE__ */ v("div", {
3789
3807
  className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
3790
- children: [/* @__PURE__ */ n(kl, {
3808
+ children: [/* @__PURE__ */ n(yl, {
3791
3809
  onClick: () => i("up"),
3792
3810
  disabled: r
3793
- }), /* @__PURE__ */ n(fl, {
3811
+ }), /* @__PURE__ */ n(xl, {
3794
3812
  onClick: () => i("down"),
3795
3813
  disabled: r
3796
3814
  })]
@@ -3803,34 +3821,34 @@ function Ht({
3803
3821
  buttonVisibility: a = "onHover",
3804
3822
  renderContent: i
3805
3823
  }) {
3806
- const l = te(), d = Ja(T((b) => {
3824
+ const l = te(), d = Xa(T((b) => {
3807
3825
  l && l.ai.sendFeedback({
3808
3826
  sourceId: e,
3809
3827
  type: r,
3810
3828
  data: t,
3811
3829
  rating: b
3812
3830
  });
3813
- }, [l, e, t, r]), 200), [p, c] = yl(), g = F(() => a === "onHover" ? c : a !== "never", [c, a]), {
3831
+ }, [l, e, t, r]), 200), [p, c] = wl(), g = U(() => a === "onHover" ? c : a !== "never", [c, a]), {
3814
3832
  themeSettings: x
3815
3833
  } = D();
3816
- return /* @__PURE__ */ n(wl, {
3834
+ return /* @__PURE__ */ n(_l, {
3817
3835
  ref: p,
3818
3836
  theme: x,
3819
- children: i(/* @__PURE__ */ n(_l, {
3837
+ children: i(/* @__PURE__ */ n(Cl, {
3820
3838
  onSend: d,
3821
3839
  visible: g
3822
3840
  }))
3823
3841
  });
3824
3842
  }
3825
- const Cl = 18 * 5;
3826
- function Fr({
3843
+ const vl = 18 * 5;
3844
+ function Ur({
3827
3845
  text: e
3828
3846
  }) {
3829
3847
  const [t, r] = R(!0), [a, i] = R(!1), {
3830
3848
  t: l
3831
3849
  } = O(), d = ce(null);
3832
3850
  return Re(() => {
3833
- d.current && d.current.scrollHeight > Cl && i(!0);
3851
+ d.current && d.current.scrollHeight > vl && i(!0);
3834
3852
  }, [e]), /* @__PURE__ */ v("div", {
3835
3853
  children: [/* @__PURE__ */ n("div", {
3836
3854
  ref: d,
@@ -3846,7 +3864,7 @@ function Fr({
3846
3864
  })]
3847
3865
  });
3848
3866
  }
3849
- function vl({
3867
+ function Sl({
3850
3868
  nlgRequest: e
3851
3869
  }) {
3852
3870
  const {
@@ -3861,12 +3879,12 @@ function vl({
3861
3879
  children: i("ai.errors.unexpected")
3862
3880
  }) : /* @__PURE__ */ n(le, {
3863
3881
  align: "full",
3864
- children: /* @__PURE__ */ n(Fr, {
3882
+ children: /* @__PURE__ */ n(Ur, {
3865
3883
  text: t ?? i("ai.errors.insightsNotAvailable")
3866
3884
  })
3867
3885
  });
3868
3886
  }
3869
- function Sl() {
3887
+ function Ml() {
3870
3888
  const {
3871
3889
  themeSettings: e
3872
3890
  } = D();
@@ -3884,27 +3902,27 @@ function Sl() {
3884
3902
  })
3885
3903
  });
3886
3904
  }
3887
- function Ml({
3905
+ function Il({
3888
3906
  onClick: e
3889
3907
  }) {
3890
3908
  const {
3891
3909
  t
3892
3910
  } = O();
3893
- return /* @__PURE__ */ n(Ge, {
3911
+ return /* @__PURE__ */ n(Pe, {
3894
3912
  align: "left",
3895
3913
  onClick: e,
3896
3914
  children: /* @__PURE__ */ v("div", {
3897
3915
  className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
3898
- children: [/* @__PURE__ */ n(Sl, {}), t("ai.buttons.insights")]
3916
+ children: [/* @__PURE__ */ n(Ml, {}), t("ai.buttons.insights")]
3899
3917
  })
3900
3918
  });
3901
3919
  }
3902
- var Il = Xa("toLowerCase");
3920
+ var Dl = Ja("toLowerCase");
3903
3921
  const Bt = /* @__PURE__ */ C("div", {
3904
3922
  target: "etljahs0",
3905
3923
  label: "FlexRow"
3906
- })("display:flex;align-items:center;column-gap:10px;"), Dl = (e) => !!e && "aeiou".includes(e[0]);
3907
- function Al({
3924
+ })("display:flex;align-items:center;column-gap:10px;"), Al = (e) => !!e && "aeiou".includes(e[0]);
3925
+ function Ll({
3908
3926
  data: e,
3909
3927
  alwaysShowFeedback: t
3910
3928
  }) {
@@ -3923,7 +3941,7 @@ function Al({
3923
3941
  console.debug(`JAQL for ${l}`, p), console.debug(`chart recommendations for ${l}`, d);
3924
3942
  const x = "chartType" in d ? d.chartType : "table";
3925
3943
  let b;
3926
- Dl(x) ? b = `an ${x}` : b = `a ${x}`, x !== "table" && (b += " chart");
3944
+ Al(x) ? b = `an ${x}` : b = `a ${x}`, x !== "table" && (b += " chart");
3927
3945
  const o = p.datasource.title, [u, s] = R(!1), h = T(() => {
3928
3946
  s((y) => !y);
3929
3947
  }, []), m = {
@@ -3933,20 +3951,20 @@ function Al({
3933
3951
  }
3934
3952
  }, w = r === "analyze", _ = `${c}${c && g ? `
3935
3953
  ` : ""}${g}`;
3936
- return /* @__PURE__ */ v(U, {
3954
+ return /* @__PURE__ */ v(Q, {
3937
3955
  children: [/* @__PURE__ */ n(Ht, {
3938
3956
  sourceId: o,
3939
3957
  data: e,
3940
3958
  type: "chats/nlq",
3941
3959
  buttonVisibility: t ? "always" : "onHover",
3942
- renderContent: (y) => /* @__PURE__ */ v(U, {
3960
+ renderContent: (y) => /* @__PURE__ */ v(Q, {
3943
3961
  children: [/* @__PURE__ */ v(Bt, {
3944
- children: [/* @__PURE__ */ n(Pr, {
3962
+ children: [/* @__PURE__ */ n(Gr, {
3945
3963
  align: "left",
3946
3964
  theme: i,
3947
- children: _ || `Here's ${b} showing ${Il(l)}.`
3965
+ children: _ || `Here's ${b} showing ${Dl(l)}.`
3948
3966
  }), y]
3949
- }), w && /* @__PURE__ */ n(ml, {
3967
+ }), w && /* @__PURE__ */ n(bl, {
3950
3968
  content: e
3951
3969
  })]
3952
3970
  })
@@ -3955,61 +3973,61 @@ function Al({
3955
3973
  data: m,
3956
3974
  type: "nlg/queryResult",
3957
3975
  buttonVisibility: u ? "onHover" : "never",
3958
- renderContent: (y) => /* @__PURE__ */ v(U, {
3976
+ renderContent: (y) => /* @__PURE__ */ v(Q, {
3959
3977
  children: [/* @__PURE__ */ v(Bt, {
3960
- children: [/* @__PURE__ */ n(Ml, {
3978
+ children: [/* @__PURE__ */ n(Il, {
3961
3979
  onClick: h
3962
3980
  }), y]
3963
- }), u && /* @__PURE__ */ n(vl, {
3981
+ }), u && /* @__PURE__ */ n(Sl, {
3964
3982
  nlgRequest: m
3965
3983
  })]
3966
3984
  })
3967
3985
  })]
3968
3986
  });
3969
3987
  }
3970
- function Ll({
3988
+ function Tl({
3971
3989
  message: e,
3972
3990
  isLastMessage: t
3973
3991
  }) {
3974
3992
  if (Cr(e)) {
3975
3993
  const a = JSON.parse(e.content);
3976
- return /* @__PURE__ */ n(Al, {
3994
+ return /* @__PURE__ */ n(Ll, {
3977
3995
  data: a,
3978
3996
  alwaysShowFeedback: t
3979
3997
  });
3980
3998
  }
3981
- const r = go(e) ? JSON.parse(e.content).answer : e.content;
3999
+ const r = ho(e) ? JSON.parse(e.content).answer : e.content;
3982
4000
  return /* @__PURE__ */ n(le, {
3983
4001
  align: e.role === "user" ? "right" : "left",
3984
4002
  children: r
3985
4003
  });
3986
4004
  }
3987
- const Tl = /* @__PURE__ */ ja(Ll), Nl = ({
4005
+ const Nl = /* @__PURE__ */ ja(Tl), jl = ({
3988
4006
  error: e,
3989
4007
  displayMessage: t
3990
4008
  }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(le, {
3991
4009
  align: "left",
3992
4010
  children: t
3993
4011
  }));
3994
- function jl({
4012
+ function Ol({
3995
4013
  messages: e
3996
4014
  }) {
3997
4015
  const {
3998
4016
  t
3999
4017
  } = O();
4000
- return /* @__PURE__ */ n(U, {
4018
+ return /* @__PURE__ */ n(Q, {
4001
4019
  children: e.map((r, a) => /* @__PURE__ */ n(Sa, {
4002
- fallbackRender: (i) => Nl(j(I({}, i), {
4020
+ fallbackRender: (i) => jl(j(I({}, i), {
4003
4021
  displayMessage: t("ai.errors.unexpected")
4004
4022
  })),
4005
- children: /* @__PURE__ */ n(Tl, {
4023
+ children: /* @__PURE__ */ n(Nl, {
4006
4024
  message: r,
4007
4025
  isLastMessage: a === e.length - 1
4008
4026
  }, a)
4009
4027
  }, a))
4010
4028
  });
4011
4029
  }
4012
- function Qr({
4030
+ function Fr({
4013
4031
  color: e
4014
4032
  }) {
4015
4033
  return /* @__PURE__ */ n("svg", {
@@ -4024,7 +4042,7 @@ function Qr({
4024
4042
  })
4025
4043
  });
4026
4044
  }
4027
- function Ol({
4045
+ function El({
4028
4046
  onClick: e,
4029
4047
  color: t
4030
4048
  }) {
@@ -4032,12 +4050,12 @@ function Ol({
4032
4050
  "aria-label": "go back",
4033
4051
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
4034
4052
  onClick: e,
4035
- children: /* @__PURE__ */ n(Qr, {
4053
+ children: /* @__PURE__ */ n(Fr, {
4036
4054
  color: t
4037
4055
  })
4038
4056
  });
4039
4057
  }
4040
- const El = /* @__PURE__ */ C("button", {
4058
+ const zl = /* @__PURE__ */ C("button", {
4041
4059
  target: "e1p0q0z20",
4042
4060
  label: "Button"
4043
4061
  })("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:", ({
@@ -4063,7 +4081,7 @@ const El = /* @__PURE__ */ C("button", {
4063
4081
  } = e.aiChat.suggestions;
4064
4082
  if (t) {
4065
4083
  const [a, i] = t;
4066
- return G`
4084
+ return P`
4067
4085
  border: none;
4068
4086
  position: relative;
4069
4087
  border-radius: ${r};
@@ -4092,28 +4110,28 @@ function Yt({
4092
4110
  const {
4093
4111
  themeSettings: r
4094
4112
  } = D();
4095
- return /* @__PURE__ */ n(El, {
4113
+ return /* @__PURE__ */ n(zl, {
4096
4114
  onClick: t,
4097
4115
  theme: r,
4098
4116
  children: e
4099
4117
  });
4100
4118
  }
4101
- const zl = /* @__PURE__ */ C("div", {
4119
+ const Zl = /* @__PURE__ */ C("div", {
4102
4120
  target: "eu11cc50",
4103
4121
  label: "ListContainer"
4104
4122
  })("display:flex;flex-direction:column;align-items:flex-start;row-gap:", ({
4105
4123
  theme: e
4106
4124
  }) => e.aiChat.suggestions.gap, ";");
4107
- function Zl({
4125
+ function Rl({
4108
4126
  questions: e,
4109
4127
  onSelection: t
4110
4128
  }) {
4111
4129
  const {
4112
4130
  t: r
4113
- } = O(), [a, i] = R(!0), l = F(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
4131
+ } = O(), [a, i] = R(!0), l = U(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
4114
4132
  themeSettings: d
4115
4133
  } = D();
4116
- return /* @__PURE__ */ v(zl, {
4134
+ return /* @__PURE__ */ v(Zl, {
4117
4135
  "aria-label": "list of suggested questions",
4118
4136
  theme: d,
4119
4137
  children: [l.map((p) => /* @__PURE__ */ n(Yt, {
@@ -4125,7 +4143,7 @@ function Zl({
4125
4143
  })]
4126
4144
  });
4127
4145
  }
4128
- const Rl = /* @__PURE__ */ C("div", {
4146
+ const Wl = /* @__PURE__ */ C("div", {
4129
4147
  target: "ebwb3nc0",
4130
4148
  label: "Row"
4131
4149
  })("width:283px;height:32px;border-radius:10px;background:", ({
@@ -4138,7 +4156,7 @@ const Rl = /* @__PURE__ */ C("div", {
4138
4156
  ${r} 50%,
4139
4157
  ${t} 100%
4140
4158
  )`;
4141
- }, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), Wl = /* @__PURE__ */ C("div", {
4159
+ }, ";background-size:200% auto;animation:gradient 2s linear infinite;@keyframes gradient{0%{background-position:0 0;}100%{background-position:-200% 0;}}"), Pl = /* @__PURE__ */ C("div", {
4142
4160
  target: "ebwb3nc1",
4143
4161
  label: "SkeletonContainer"
4144
4162
  })("display:flex;flex-direction:column;row-gap:1rem;");
@@ -4146,15 +4164,15 @@ function Gl() {
4146
4164
  const {
4147
4165
  themeSettings: e
4148
4166
  } = D();
4149
- return /* @__PURE__ */ n(Wl, {
4167
+ return /* @__PURE__ */ n(Pl, {
4150
4168
  children: Array.from({
4151
4169
  length: 3
4152
- }, (t, r) => /* @__PURE__ */ n(Rl, {
4170
+ }, (t, r) => /* @__PURE__ */ n(Wl, {
4153
4171
  theme: e
4154
4172
  }, r))
4155
4173
  });
4156
4174
  }
4157
- function Pl({
4175
+ function ql({
4158
4176
  questions: e,
4159
4177
  isLoading: t,
4160
4178
  onSelection: r
@@ -4162,36 +4180,36 @@ function Pl({
4162
4180
  const a = e.length > 0, {
4163
4181
  suggestionsWelcomeText: i
4164
4182
  } = re();
4165
- return t ? /* @__PURE__ */ n(Gl, {}) : a ? /* @__PURE__ */ v(U, {
4183
+ return t ? /* @__PURE__ */ n(Gl, {}) : a ? /* @__PURE__ */ v(Q, {
4166
4184
  children: [i && /* @__PURE__ */ n(le, {
4167
4185
  align: "left",
4168
4186
  children: i
4169
- }), /* @__PURE__ */ n(Zl, {
4187
+ }), /* @__PURE__ */ n(Rl, {
4170
4188
  onSelection: r,
4171
4189
  questions: e
4172
4190
  })]
4173
4191
  }) : null;
4174
4192
  }
4175
- const ql = /* @__PURE__ */ C("div", {
4193
+ const Hl = /* @__PURE__ */ C("div", {
4176
4194
  target: "ew7avl30",
4177
4195
  label: "ToolbarContainer"
4178
4196
  })("flex:0 0 80px;padding-left:14px;padding-right:14px;display:flex;align-items:center;position:relative;background-color:", ({
4179
4197
  style: e
4180
- }) => e.backgroundColor, ";"), Hl = /* @__PURE__ */ C("div", {
4198
+ }) => e.backgroundColor, ";"), Bl = /* @__PURE__ */ C("div", {
4181
4199
  target: "ew7avl31",
4182
4200
  label: "ToolbarTitle"
4183
4201
  })("font-size:18px;line-height:22px;font-weight:600;margin-left:20px;color:", ({
4184
4202
  style: e
4185
- }) => e.textColor, ";"), Vr = /* @__PURE__ */ Jt(function({
4203
+ }) => e.textColor, ";"), Vr = /* @__PURE__ */ Xt(function({
4186
4204
  title: e,
4187
4205
  leftNav: t,
4188
4206
  rightNav: r,
4189
4207
  style: a
4190
4208
  }, i) {
4191
- return /* @__PURE__ */ v(ql, {
4209
+ return /* @__PURE__ */ v(Hl, {
4192
4210
  ref: i,
4193
4211
  style: a,
4194
- children: [t, /* @__PURE__ */ n(Hl, {
4212
+ children: [t, /* @__PURE__ */ n(Bl, {
4195
4213
  style: a,
4196
4214
  children: e
4197
4215
  }), r && /* @__PURE__ */ n("div", {
@@ -4199,19 +4217,19 @@ const ql = /* @__PURE__ */ C("div", {
4199
4217
  children: r
4200
4218
  })]
4201
4219
  });
4202
- }), Bl = /* @__PURE__ */ C("div", {
4220
+ }), Yl = /* @__PURE__ */ C("div", {
4203
4221
  target: "e14yc7id0",
4204
4222
  label: "AiDisclaimerContainer"
4205
4223
  })("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:", ({
4206
4224
  theme: e
4207
4225
  }) => e.aiChat.secondaryTextColor, ";");
4208
- function Yl({
4226
+ function Ql({
4209
4227
  theme: e
4210
4228
  }) {
4211
4229
  const {
4212
4230
  t
4213
4231
  } = O();
4214
- return /* @__PURE__ */ v(Bl, {
4232
+ return /* @__PURE__ */ v(Yl, {
4215
4233
  theme: e,
4216
4234
  children: [/* @__PURE__ */ n("div", {
4217
4235
  children: t("ai.disclaimer.poweredByAi")
@@ -4241,7 +4259,7 @@ function Ul() {
4241
4259
  const Fl = (e, t) => {
4242
4260
  const r = new Ba(e);
4243
4261
  return r.alpha = t, r;
4244
- }, Ql = /* @__PURE__ */ C("div", {
4262
+ }, Vl = /* @__PURE__ */ C("div", {
4245
4263
  target: "e1rxvpki0",
4246
4264
  label: "Container"
4247
4265
  })("font-size:inherit;line-height:inherit;padding-left:8px;padding-right:8px;padding-top:4px;border-radius:16px;margin-bottom:4px;box-shadow:", ({
@@ -4254,29 +4272,29 @@ const Fl = (e, t) => {
4254
4272
  theme: e
4255
4273
  }) => e.aiChat.clickableMessages.hover.textColor, ";background-color:", ({
4256
4274
  theme: e
4257
- }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), Vl = ({
4275
+ }) => e.aiChat.clickableMessages.hover.backgroundColor, ";box-shadow:none;"), $l = ({
4258
4276
  onClick: e
4259
4277
  }) => {
4260
4278
  const {
4261
4279
  themeSettings: t
4262
4280
  } = D();
4263
- return /* @__PURE__ */ n(Ql, {
4281
+ return /* @__PURE__ */ n(Vl, {
4264
4282
  theme: t,
4265
4283
  onClick: e,
4266
4284
  children: /* @__PURE__ */ n(Ul, {})
4267
4285
  });
4268
- }, $l = ({
4286
+ }, Xl = ({
4269
4287
  isVisible: e,
4270
4288
  onClick: t,
4271
4289
  anchorElement: r
4272
- }) => /* @__PURE__ */ n(Xt, {
4290
+ }) => /* @__PURE__ */ n(Jt, {
4273
4291
  anchorEl: r,
4274
4292
  open: e,
4275
4293
  placement: "top",
4276
4294
  sx: {
4277
4295
  zIndex: 2
4278
4296
  },
4279
- children: /* @__PURE__ */ n(Vl, {
4297
+ children: /* @__PURE__ */ n($l, {
4280
4298
  onClick: t
4281
4299
  })
4282
4300
  }), Jl = /* @__PURE__ */ C("div", {
@@ -4292,7 +4310,7 @@ const Fl = (e, t) => {
4292
4310
  theme: e
4293
4311
  }) => e.aiChat.body.paddingTop, ";padding-bottom:", ({
4294
4312
  theme: e
4295
- }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), Xl = /* @__PURE__ */ C("div", {
4313
+ }) => e.aiChat.body.paddingBottom, ";flex:initial;height:100%;"), Kl = /* @__PURE__ */ C("div", {
4296
4314
  target: "ednrf321",
4297
4315
  label: "ChatFooter"
4298
4316
  })("padding-left:", ({
@@ -4303,13 +4321,13 @@ const Fl = (e, t) => {
4303
4321
  theme: e
4304
4322
  }) => e.aiChat.footer.paddingTop, ";padding-bottom:", ({
4305
4323
  theme: e
4306
- }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), Kl = /* @__PURE__ */ C("div", {
4324
+ }) => e.aiChat.footer.paddingBottom, ";display:flex;flex-direction:column;row-gap:6px;"), ed = /* @__PURE__ */ C("div", {
4307
4325
  target: "ednrf322",
4308
4326
  label: "FollowupQuestionsContainer"
4309
4327
  })("display:flex;flex-direction:column;row-gap:", ({
4310
4328
  theme: e
4311
4329
  }) => e.aiChat.suggestions.gap, ";");
4312
- function ed({
4330
+ function td({
4313
4331
  contextTitle: e,
4314
4332
  onGoBack: t,
4315
4333
  contextDetails: r
@@ -4328,10 +4346,10 @@ function ed({
4328
4346
  data: o,
4329
4347
  isLoading: u,
4330
4348
  isError: s
4331
- } = to({
4349
+ } = ro({
4332
4350
  contextTitle: e,
4333
4351
  count: x
4334
- }), h = F(() => o == null ? void 0 : o.map((N) => N.nlqPrompt), [o]), {
4352
+ }), h = U(() => o == null ? void 0 : o.map((N) => N.nlqPrompt), [o]), {
4335
4353
  history: m,
4336
4354
  lastNlqResponse: w,
4337
4355
  isAwaitingResponse: _,
@@ -4339,12 +4357,12 @@ function ed({
4339
4357
  isLoading: M,
4340
4358
  chatId: A,
4341
4359
  lastError: S
4342
- } = ho(e, r), {
4360
+ } = mo(e, r), {
4343
4361
  mutate: L,
4344
4362
  isLoading: z
4345
- } = _r(A), [de, Q] = R(!1), [H, V] = R(!1), $ = () => Q(!0), W = () => Q(!1), X = () => {
4363
+ } = _r(A), [de, F] = R(!1), [H, V] = R(!1), $ = () => F(!0), W = () => F(!1), J = () => {
4346
4364
  L(), W();
4347
- }, E = ce(null), B = ce(null), P = () => {
4365
+ }, E = ce(null), B = ce(null), G = () => {
4348
4366
  if (!(E != null && E.current))
4349
4367
  return;
4350
4368
  const {
@@ -4363,22 +4381,22 @@ function ed({
4363
4381
  const Y = ce(null), ae = c ? /* @__PURE__ */ n(Vr, {
4364
4382
  ref: Y,
4365
4383
  title: e,
4366
- leftNav: t && /* @__PURE__ */ n(Ol, {
4384
+ leftNav: t && /* @__PURE__ */ n(El, {
4367
4385
  onClick: t,
4368
4386
  color: b.aiChat.header.textColor
4369
4387
  }),
4370
4388
  style: b.aiChat.header
4371
- }) : null, fe = F(() => [...new Set(m.filter((N) => N.role === "user").filter((N) => !(h != null && h.includes(N.content))).map((N) => N.content).reverse())].slice(0, g), [m, g, h]);
4372
- return (S == null ? void 0 : S.message) === d("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(U, {
4389
+ }) : null, fe = U(() => [...new Set(m.filter((N) => N.role === "user").filter((N) => !(h != null && h.includes(N.content))).map((N) => N.content).reverse())].slice(0, g), [m, g, h]);
4390
+ return (S == null ? void 0 : S.message) === d("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Q, {
4373
4391
  children: [c && ae, /* @__PURE__ */ n(qr, {
4374
4392
  text: S.message
4375
4393
  })]
4376
- }) : /* @__PURE__ */ v(U, {
4394
+ }) : /* @__PURE__ */ v(Q, {
4377
4395
  children: [ae, /* @__PURE__ */ v(Jl, {
4378
4396
  ref: E,
4379
4397
  theme: b,
4380
- onScroll: P,
4381
- children: [/* @__PURE__ */ n($l, {
4398
+ onScroll: G,
4399
+ children: [/* @__PURE__ */ n(Xl, {
4382
4400
  isVisible: H,
4383
4401
  anchorElement: B.current,
4384
4402
  onClick: () => {
@@ -4388,18 +4406,18 @@ function ed({
4388
4406
  behavior: "smooth"
4389
4407
  });
4390
4408
  }
4391
- }), /* @__PURE__ */ n(Un, {}), /* @__PURE__ */ n(Pl, {
4409
+ }), /* @__PURE__ */ n(Un, {}), /* @__PURE__ */ n(ql, {
4392
4410
  questions: h || [],
4393
4411
  isLoading: u,
4394
4412
  onSelection: y
4395
4413
  }), S && /* @__PURE__ */ n(le, {
4396
4414
  align: "left",
4397
4415
  children: S.message
4398
- }), M ? /* @__PURE__ */ n(He, {}) : /* @__PURE__ */ n(jl, {
4416
+ }), M ? /* @__PURE__ */ n(He, {}) : /* @__PURE__ */ n(Ol, {
4399
4417
  messages: m
4400
- }), p && w && ((i = (a = w.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(Kl, {
4418
+ }), p && w && ((i = (a = w.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(ed, {
4401
4419
  theme: b,
4402
- children: (l = w.followupQuestions) == null ? void 0 : l.slice(0, 2).map((N, q) => /* @__PURE__ */ n(Ge, {
4420
+ children: (l = w.followupQuestions) == null ? void 0 : l.slice(0, 2).map((N, q) => /* @__PURE__ */ n(Pe, {
4403
4421
  align: "left",
4404
4422
  onClick: () => {
4405
4423
  y(N);
@@ -4409,14 +4427,14 @@ function ed({
4409
4427
  children: N
4410
4428
  })
4411
4429
  }, q))
4412
- }), (_ || z) && /* @__PURE__ */ n(Hr, {}), de && /* @__PURE__ */ n(Xn, {
4430
+ }), (_ || z) && /* @__PURE__ */ n(Hr, {}), de && /* @__PURE__ */ n(Kn, {
4413
4431
  onCancel: W,
4414
- onConfirm: X
4432
+ onConfirm: J
4415
4433
  })]
4416
- }), /* @__PURE__ */ v(Xl, {
4434
+ }), /* @__PURE__ */ v(Kl, {
4417
4435
  ref: B,
4418
4436
  theme: b,
4419
- children: [/* @__PURE__ */ n(zo, {
4437
+ children: [/* @__PURE__ */ n(Zo, {
4420
4438
  onSendMessage: y,
4421
4439
  disabled: _ || M,
4422
4440
  onClearHistoryClick: $,
@@ -4425,25 +4443,25 @@ function ed({
4425
4443
  isLoading: u || M,
4426
4444
  recommendationsError: s,
4427
4445
  onChange: W
4428
- }), /* @__PURE__ */ n(Yl, {
4446
+ }), /* @__PURE__ */ n(Ql, {
4429
4447
  theme: b
4430
4448
  })]
4431
4449
  })]
4432
4450
  });
4433
4451
  }
4434
- const td = /* @__PURE__ */ C("button", {
4452
+ const rd = /* @__PURE__ */ C("button", {
4435
4453
  target: "e5a38pw0",
4436
4454
  label: "Container"
4437
4455
  })("font-family:", ({
4438
4456
  theme: e
4439
4457
  }) => 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:", ({
4440
4458
  theme: e
4441
- }) => e.aiChat.dataTopics.items.backgroundColor, ";"), rd = /* @__PURE__ */ C("div", {
4459
+ }) => e.aiChat.dataTopics.items.backgroundColor, ";"), ad = /* @__PURE__ */ C("div", {
4442
4460
  target: "e5a38pw1",
4443
4461
  label: "Title"
4444
4462
  })("font-size:1.05rem;line-height:28px;color:", ({
4445
4463
  theme: e
4446
- }) => e.aiChat.dataTopics.items.textColor, ";"), ad = /* @__PURE__ */ C("div", {
4464
+ }) => e.aiChat.dataTopics.items.textColor, ";"), id = /* @__PURE__ */ C("div", {
4447
4465
  target: "e5a38pw2",
4448
4466
  label: "Description"
4449
4467
  })("font-size:", ({
@@ -4452,11 +4470,11 @@ const td = /* @__PURE__ */ C("button", {
4452
4470
  theme: e
4453
4471
  }) => e.aiChat.primaryFontSize[1], ";color:", ({
4454
4472
  theme: e
4455
- }) => tr(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), id = /* @__PURE__ */ C("div", {
4473
+ }) => tr(e.aiChat.dataTopics.items.textColor, 0, 0.5), ";"), od = /* @__PURE__ */ C("div", {
4456
4474
  target: "e5a38pw3",
4457
4475
  label: "IconContainer"
4458
4476
  })("width:16px;height:16px;transform:rotate(180deg);");
4459
- function od(e) {
4477
+ function nd(e) {
4460
4478
  const {
4461
4479
  title: t,
4462
4480
  description: r,
@@ -4464,39 +4482,39 @@ function od(e) {
4464
4482
  } = e, {
4465
4483
  themeSettings: i
4466
4484
  } = D();
4467
- return /* @__PURE__ */ v(td, {
4485
+ return /* @__PURE__ */ v(rd, {
4468
4486
  onClick: a,
4469
4487
  theme: i,
4470
4488
  children: [/* @__PURE__ */ v("div", {
4471
- children: [/* @__PURE__ */ n(rd, {
4489
+ children: [/* @__PURE__ */ n(ad, {
4472
4490
  theme: i,
4473
4491
  children: t
4474
- }), /* @__PURE__ */ n(ad, {
4492
+ }), /* @__PURE__ */ n(id, {
4475
4493
  theme: i,
4476
4494
  children: r
4477
4495
  })]
4478
- }), /* @__PURE__ */ n(id, {
4479
- children: /* @__PURE__ */ n(Qr, {
4496
+ }), /* @__PURE__ */ n(od, {
4497
+ children: /* @__PURE__ */ n(Fr, {
4480
4498
  color: i.aiChat.icons.color
4481
4499
  })
4482
4500
  })]
4483
4501
  });
4484
4502
  }
4485
- const nd = /* @__PURE__ */ C("div", {
4503
+ const ld = /* @__PURE__ */ C("div", {
4486
4504
  target: "emrh5y30",
4487
4505
  label: "FlexContainer"
4488
- })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), ld = /* @__PURE__ */ C("div", {
4506
+ })("padding:20px;display:flex;flex-direction:column;gap:20px;overflow:auto;"), dd = /* @__PURE__ */ C("div", {
4489
4507
  target: "emrh5y31",
4490
4508
  label: "Title"
4491
4509
  })("font-size:24px;line-height:32px;font-weight:600;text-align:center;padding-bottom:4px;color:", ({
4492
4510
  theme: e
4493
- }) => e.aiChat.primaryTextColor, ";"), dd = /* @__PURE__ */ C("div", {
4511
+ }) => e.aiChat.primaryTextColor, ";"), sd = /* @__PURE__ */ C("div", {
4494
4512
  target: "emrh5y32",
4495
4513
  label: "Subtitle"
4496
4514
  })("font-size:15px;line-height:22px;color:", ({
4497
4515
  theme: e
4498
4516
  }) => e.aiChat.primaryTextColor, ";");
4499
- function sd(e) {
4517
+ function cd(e) {
4500
4518
  const {
4501
4519
  dataTopics: t
4502
4520
  } = e, {
@@ -4504,23 +4522,23 @@ function sd(e) {
4504
4522
  } = D(), {
4505
4523
  t: a
4506
4524
  } = O();
4507
- return /* @__PURE__ */ v(nd, {
4508
- children: [/* @__PURE__ */ n(ld, {
4525
+ return /* @__PURE__ */ v(ld, {
4526
+ children: [/* @__PURE__ */ n(dd, {
4509
4527
  theme: r,
4510
4528
  children: a("ai.dataTopics")
4511
- }), /* @__PURE__ */ v(dd, {
4529
+ }), /* @__PURE__ */ v(sd, {
4512
4530
  theme: r,
4513
4531
  children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
4514
- }), t.map((i) => /* @__PURE__ */ Ma(od, j(I({}, i), {
4532
+ }), t.map((i) => /* @__PURE__ */ Ma(nd, j(I({}, i), {
4515
4533
  key: i.title
4516
4534
  })))]
4517
4535
  });
4518
4536
  }
4519
- const cd = "#000000", pd = "#FFFFFF";
4520
- function ud({
4537
+ const pd = "#000000", ud = "#FFFFFF";
4538
+ function gd({
4521
4539
  isDarkBackground: e = !1
4522
4540
  }) {
4523
- const t = e ? pd : cd;
4541
+ const t = e ? ud : pd;
4524
4542
  return /* @__PURE__ */ v("svg", {
4525
4543
  width: "32",
4526
4544
  height: "32",
@@ -4578,16 +4596,16 @@ function ud({
4578
4596
  })]
4579
4597
  });
4580
4598
  }
4581
- const gd = /* @__PURE__ */ C("div", {
4599
+ const hd = /* @__PURE__ */ C("div", {
4582
4600
  target: "ealudtn0",
4583
4601
  label: "LogoContainer"
4584
- })("margin-left:14px;margin-top:3px;"), hd = /* @__PURE__ */ C("div", {
4602
+ })("margin-left:14px;margin-top:3px;"), md = /* @__PURE__ */ C("div", {
4585
4603
  target: "ealudtn1",
4586
4604
  label: "DataTopicsContainer"
4587
4605
  })("display:flex;flex-direction:column;justify-content:top;overflow:hidden;height:100%;background-color:", ({
4588
4606
  theme: e
4589
4607
  }) => e.aiChat.dataTopics.backgroundColor, ";");
4590
- function md({
4608
+ function bd({
4591
4609
  dataTopicsList: e,
4592
4610
  onDataTopicClick: t
4593
4611
  }) {
@@ -4597,39 +4615,39 @@ function md({
4597
4615
  themeSettings: a
4598
4616
  } = D(), {
4599
4617
  t: i
4600
- } = O(), l = F(() => e == null ? void 0 : e.map((p) => ({
4618
+ } = O(), l = U(() => e == null ? void 0 : e.map((p) => ({
4601
4619
  title: p,
4602
4620
  onClick: () => t(p)
4603
4621
  })), [e, t]), d = _a(Ca(a.aiChat.header.backgroundColor)) > 0.5;
4604
- return /* @__PURE__ */ v(U, {
4622
+ return /* @__PURE__ */ v(Q, {
4605
4623
  children: [r ? /* @__PURE__ */ n(Vr, {
4606
4624
  title: i("ai.analyticsChatbot"),
4607
- leftNav: /* @__PURE__ */ n(gd, {
4608
- children: /* @__PURE__ */ n(ud, {
4625
+ leftNav: /* @__PURE__ */ n(hd, {
4626
+ children: /* @__PURE__ */ n(gd, {
4609
4627
  isDarkBackground: d
4610
4628
  })
4611
4629
  }),
4612
4630
  style: a.aiChat.header
4613
- }) : null, /* @__PURE__ */ v(hd, {
4631
+ }) : null, /* @__PURE__ */ v(md, {
4614
4632
  theme: a,
4615
- children: [!l && /* @__PURE__ */ n(He, {}), l && /* @__PURE__ */ n(sd, {
4633
+ children: [!l && /* @__PURE__ */ n(He, {}), l && /* @__PURE__ */ n(cd, {
4616
4634
  dataTopics: l
4617
4635
  })]
4618
4636
  })]
4619
4637
  });
4620
4638
  }
4621
- function bd() {
4639
+ function fd() {
4622
4640
  const [e, t] = R(), [r, a] = R(), {
4623
4641
  data: i,
4624
4642
  fetchStatus: l
4625
- } = oo(), {
4643
+ } = no(), {
4626
4644
  dataTopicsList: d,
4627
4645
  contextDetails: p
4628
4646
  } = re(), {
4629
4647
  t: c
4630
4648
  } = O(), g = c("ai.errors.noAvailableDataTopics"), x = T((s) => {
4631
4649
  s.length ? s.length === 1 && (a(void 0), t(s[0])) : a(g);
4632
- }, [g]), b = F(() => {
4650
+ }, [g]), b = U(() => {
4633
4651
  if (i && l === "idle") {
4634
4652
  const s = (d != null && d.length ? i == null ? void 0 : i.filter((h) => d == null ? void 0 : d.includes(h.title)) : i).map((h) => h.title);
4635
4653
  return x(s), s;
@@ -4644,16 +4662,16 @@ function bd() {
4644
4662
  text: c("ai.buttons.refresh"),
4645
4663
  onClick: u
4646
4664
  }
4647
- }) : b.length === 1 && !e ? /* @__PURE__ */ n(He, {}) : e ? /* @__PURE__ */ n(ed, {
4665
+ }) : b.length === 1 && !e ? /* @__PURE__ */ n(He, {}) : e ? /* @__PURE__ */ n(td, {
4648
4666
  contextTitle: e,
4649
4667
  contextDetails: p,
4650
4668
  onGoBack: b.length === 1 ? void 0 : () => t(void 0)
4651
- }) : /* @__PURE__ */ n(md, {
4669
+ }) : /* @__PURE__ */ n(bd, {
4652
4670
  dataTopicsList: b,
4653
4671
  onDataTopicClick: (s) => t(s)
4654
4672
  });
4655
4673
  }
4656
- const fd = $t({
4674
+ const xd = $t({
4657
4675
  componentName: "Chatbot"
4658
4676
  })((e) => {
4659
4677
  const {
@@ -4663,18 +4681,18 @@ const fd = $t({
4663
4681
  } = e, {
4664
4682
  themeSettings: i
4665
4683
  } = D();
4666
- return /* @__PURE__ */ n(ro, {
4684
+ return /* @__PURE__ */ n(ao, {
4667
4685
  value: a ?? {},
4668
- children: /* @__PURE__ */ n(ko, {
4686
+ children: /* @__PURE__ */ n(yo, {
4669
4687
  id: "csdk-chatbot-frame",
4670
4688
  width: t,
4671
4689
  height: r,
4672
4690
  theme: i,
4673
4691
  tabIndex: 0,
4674
- children: /* @__PURE__ */ n(bd, {})
4692
+ children: /* @__PURE__ */ n(fd, {})
4675
4693
  })
4676
4694
  });
4677
- }), xd = $t({
4695
+ }), kd = $t({
4678
4696
  componentName: "GetNlgInsights"
4679
4697
  })(function(e) {
4680
4698
  const {
@@ -4685,14 +4703,14 @@ const fd = $t({
4685
4703
  t: i
4686
4704
  } = O();
4687
4705
  if (a)
4688
- return /* @__PURE__ */ n(U, {
4706
+ return /* @__PURE__ */ n(Q, {
4689
4707
  children: i("ai.errors.unexpected")
4690
4708
  });
4691
4709
  const l = t ?? i("ai.errors.insightsNotAvailable");
4692
- return /* @__PURE__ */ n(Fr, {
4710
+ return /* @__PURE__ */ n(Ur, {
4693
4711
  text: r ? "Loading..." : l
4694
4712
  });
4695
- }), kd = new Qt({
4713
+ }), yd = new Ft({
4696
4714
  defaultOptions: {
4697
4715
  queries: {
4698
4716
  refetchOnWindowFocus: !1,
@@ -4700,15 +4718,15 @@ const fd = $t({
4700
4718
  }
4701
4719
  }
4702
4720
  });
4703
- function yd({
4721
+ function wd({
4704
4722
  children: e,
4705
4723
  context: t
4706
4724
  }) {
4707
- return /* @__PURE__ */ n(Xi, {
4725
+ return /* @__PURE__ */ n(Ki, {
4708
4726
  children: /* @__PURE__ */ n(br.Provider, {
4709
4727
  value: t == null ? void 0 : t.api,
4710
4728
  children: /* @__PURE__ */ n(ya, {
4711
- client: kd,
4729
+ client: yd,
4712
4730
  children: e
4713
4731
  })
4714
4732
  })
@@ -4727,11 +4745,11 @@ function yd({
4727
4745
  })();
4728
4746
  const $r = {
4729
4747
  api: void 0
4730
- }, Jr = Symbol("aiContextKey"), Ye = () => la(
4731
- Jr,
4732
- () => Ut($r),
4748
+ }, Xr = Symbol("aiContextKey"), Ye = () => la(
4749
+ Xr,
4750
+ () => Qt($r),
4733
4751
  !0
4734
- ), Cd = lt({
4752
+ ), vd = lt({
4735
4753
  props: {
4736
4754
  /**
4737
4755
  * {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
@@ -4739,32 +4757,32 @@ const $r = {
4739
4757
  volatile: Boolean
4740
4758
  },
4741
4759
  setup(e, { slots: t }) {
4742
- const r = ai(), a = Ut($r), { app: i } = r.value;
4760
+ const r = ai(), a = Qt($r), { app: i } = r.value;
4743
4761
  return i && (a.value = {
4744
4762
  api: new jt(i.httpClient, e.volatile)
4745
- }), Ft(async () => {
4763
+ }), Ut(async () => {
4746
4764
  const { app: l } = r.value;
4747
4765
  l && (a.value = {
4748
4766
  api: new jt(l.httpClient, e.volatile)
4749
4767
  });
4750
- }), da(Jr, a), () => {
4768
+ }), da(Xr, a), () => {
4751
4769
  var l;
4752
4770
  return (l = t.default) == null ? void 0 : l.call(t);
4753
4771
  };
4754
4772
  }
4755
- }), Xr = () => {
4773
+ }), Jr = () => {
4756
4774
  const e = Ye(), t = new ii({
4757
4775
  context: e.value
4758
4776
  });
4759
- return Ft(() => {
4777
+ return Ut(() => {
4760
4778
  t.setValue({
4761
4779
  context: e.value
4762
4780
  });
4763
4781
  }), {
4764
4782
  propsObserver: t,
4765
- providerComponent: yd
4783
+ providerComponent: wd
4766
4784
  };
4767
- }, vd = lt({
4785
+ }, Sd = lt({
4768
4786
  props: {
4769
4787
  /**
4770
4788
  * {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
@@ -4779,11 +4797,11 @@ const $r = {
4779
4797
  */
4780
4798
  config: Object
4781
4799
  },
4782
- setup: (e) => nr(fd, e, [
4800
+ setup: (e) => nr(xd, e, [
4783
4801
  ...lr(),
4784
- Xr()
4802
+ Jr()
4785
4803
  ])
4786
- }), Sd = lt({
4804
+ }), Md = lt({
4787
4805
  props: {
4788
4806
  /**
4789
4807
  * {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
@@ -4809,11 +4827,11 @@ const $r = {
4809
4827
  */
4810
4828
  verbosity: String
4811
4829
  },
4812
- setup: (e) => nr(xd, e, [
4830
+ setup: (e) => nr(kd, e, [
4813
4831
  ...lr(),
4814
- Xr()
4832
+ Jr()
4815
4833
  ])
4816
- }), Md = (e) => {
4834
+ }), Id = (e) => {
4817
4835
  pt("useGetNlgInsights");
4818
4836
  const [t, r] = ut(ht, {
4819
4837
  isLoading: !0,
@@ -4847,7 +4865,7 @@ const $r = {
4847
4865
  ...st(t.value),
4848
4866
  refetch: l
4849
4867
  };
4850
- }, Id = (e) => {
4868
+ }, Dd = (e) => {
4851
4869
  pt("useGetQueryRecommendations");
4852
4870
  const [t, r] = ut(ht, {
4853
4871
  isLoading: !0,
@@ -4887,7 +4905,7 @@ const $r = {
4887
4905
  ...st(t.value),
4888
4906
  refetch: l
4889
4907
  };
4890
- }, Dd = (e) => {
4908
+ }, Ad = (e) => {
4891
4909
  pt("useGetNlqResult");
4892
4910
  const [t, r] = ut(ht, {
4893
4911
  isLoading: !0,
@@ -4899,7 +4917,7 @@ const $r = {
4899
4917
  }), a = Ye(), i = async (d) => {
4900
4918
  try {
4901
4919
  r({ type: "loading" });
4902
- const p = me(e), { enableAxisTitlesInWidgetProps: c } = p, { contextTitle: g, request: x } = eo(p), b = await (d == null ? void 0 : d.ai.getNlqResult(g, x)), o = b ? gr.toWidgetProps(b, {
4920
+ const p = me(e), { enableAxisTitlesInWidgetProps: c } = p, { contextTitle: g, request: x } = to(p), b = await (d == null ? void 0 : d.ai.getNlqResult(g, x)), o = b ? gr.toWidgetProps(b, {
4903
4921
  useCustomizedStyleOptions: c || !1
4904
4922
  }) : void 0;
4905
4923
  r({ type: "success", data: o });
@@ -4924,10 +4942,10 @@ const $r = {
4924
4942
  };
4925
4943
  };
4926
4944
  export {
4927
- Cd as AiContextProvider,
4928
- vd as Chatbot,
4929
- Sd as GetNlgInsights,
4930
- Md as useGetNlgInsights,
4931
- Dd as useGetNlqResult,
4932
- Id as useGetQueryRecommendations
4945
+ vd as AiContextProvider,
4946
+ Sd as Chatbot,
4947
+ Md as GetNlgInsights,
4948
+ Id as useGetNlgInsights,
4949
+ Ad as useGetNlqResult,
4950
+ Dd as useGetQueryRecommendations
4933
4951
  };