@sisense/sdk-ui-vue 2.4.0 → 2.5.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.cjs +23 -23
- package/dist/ai.js +440 -422
- package/dist/index.cjs +1 -1
- package/dist/index.js +53 -53
- package/dist/{use-tracking-d5f179d9.js → use-tracking-22a9105d.js} +35688 -35564
- package/dist/use-tracking-93de730a.cjs +1073 -0
- package/package.json +2 -2
- package/dist/use-tracking-522444fb.cjs +0 -1073
package/dist/ai.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { inject as la, ref as Ut, defineComponent as lt, watchEffect as
|
2
|
-
import { aC as
|
1
|
+
import { inject as la, ref as Ut, defineComponent as lt, watchEffect as Qt, 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 U, aR as Ue, aS as Q, 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 Qe, 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 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 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 Ua, bP as Qa, bQ as Fa, 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, M as ai, c0 as ii, a as nr, c1 as lr, N as pt, L as ut, O as gt, R as me, a4 as ht } from "./use-tracking-22a9105d.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,
|
@@ -47,8 +47,8 @@ function sr(e) {
|
|
47
47
|
} = e;
|
48
48
|
if (t.formula)
|
49
49
|
return Ua(t);
|
50
|
-
const r =
|
51
|
-
return "agg" in t && t.dim && t.datatype ?
|
50
|
+
const r = Qa.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 || "",
|
@@ -108,7 +108,18 @@ function bi(e) {
|
|
108
108
|
return t.join(`
|
109
109
|
`);
|
110
110
|
}
|
111
|
-
|
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) =>
|
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(
|
573
|
-
},
|
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 =
|
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
|
-
},
|
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
|
-
},
|
633
|
+
}, _i = (e) => {
|
623
634
|
let t = e;
|
624
|
-
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",
|
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
|
-
},
|
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
|
-
},
|
671
|
+
}, Si = (e, t) => {
|
661
672
|
const r = e.jaql(!1).jaql;
|
662
|
-
return "formula" in 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
|
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)
|
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
|
695
|
+
function Mi(e) {
|
678
696
|
return ee(e, ze);
|
679
697
|
}
|
680
698
|
function Mt(e, t = "data-source-placeholder") {
|
@@ -688,18 +706,18 @@ function It(e, t = !0) {
|
|
688
706
|
return t && r.push("measureFactory"), J(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
|
689
707
|
}
|
690
708
|
const Dt = `
|
691
|
-
`,
|
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
|
-
},
|
714
|
+
}, Di = (e, t = 0) => {
|
697
715
|
if (!e)
|
698
716
|
return "";
|
699
717
|
let r = "";
|
700
|
-
return r += `[${e.map((a) =>
|
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) ?
|
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 =
|
731
|
+
}, d = Ai[Number(i)];
|
714
732
|
return tt(d, l, r);
|
715
|
-
},
|
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:
|
724
|
-
dataOptionsString:
|
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
|
-
},
|
768
|
+
}, Ei = ({
|
751
769
|
widgetProps: e,
|
752
770
|
uiFramework: t = "react"
|
753
|
-
}) =>
|
754
|
-
chart:
|
755
|
-
pivot:
|
756
|
-
}),
|
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
|
-
}),
|
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
|
-
}),
|
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 ?
|
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
|
-
},
|
868
|
+
}, Wi = (e, t, r, a) => {
|
851
869
|
let i;
|
852
|
-
return a && e in Lt ? i =
|
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 =
|
872
|
-
},
|
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 =
|
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
|
-
},
|
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
|
-
}),
|
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) =>
|
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
|
-
} =
|
941
|
+
} = Hi(x), m = qi(h), {
|
924
942
|
dataOptions: w,
|
925
943
|
chartStyleOptions: _
|
926
|
-
} =
|
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) =>
|
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:
|
961
|
+
toWidgetCode: Yi,
|
944
962
|
toWidgetProps: mt
|
945
963
|
}, Symbol.toStringTag, {
|
946
964
|
value: "Module"
|
947
965
|
}));
|
948
|
-
var
|
966
|
+
var Ui = Object.defineProperty, Qi = Object.defineProperties, Fi = Object.getOwnPropertyDescriptors, We = Object.getOwnPropertySymbols, hr = Object.prototype.hasOwnProperty, mr = Object.prototype.propertyIsEnumerable, Nt = (e, t, r) => t in e ? Ui(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) =>
|
978
|
+
}, j = (e, t) => Qi(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
|
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 :
|
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
|
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(
|
1082
|
+
l.mutate(c, g).catch(Ji);
|
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
|
1091
|
+
function Ji() {
|
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
|
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__ */
|
1129
|
+
const br = /* @__PURE__ */ Ge(void 0), te = () => ct(br), fr = /* @__PURE__ */ Ge({}), Xi = () => 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 =
|
1177
|
+
const r = Q(() => 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
|
-
},
|
1186
|
-
function
|
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 ?? [...
|
1216
|
+
chartTypes: a ?? [...eo]
|
1199
1217
|
}
|
1200
1218
|
};
|
1201
1219
|
}
|
1202
|
-
const at = 4,
|
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 =
|
1239
|
+
}), s = Q(() => 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__ */
|
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",
|
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
|
-
},
|
1305
|
+
}, oo = (e) => {
|
1288
1306
|
const {
|
1289
1307
|
data: t,
|
1290
1308
|
isLoading: r,
|
1291
1309
|
isError: a
|
1292
|
-
} =
|
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
|
-
},
|
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
|
-
},
|
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
|
-
},
|
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
|
-
},
|
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
|
-
},
|
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(
|
1415
|
+
a(co(c, g));
|
1398
1416
|
}
|
1399
1417
|
});
|
1400
1418
|
return {
|
1401
1419
|
mutate: d,
|
1402
1420
|
isLoading: p
|
1403
1421
|
};
|
1404
|
-
},
|
1422
|
+
}, uo = (e, t, r = !1) => {
|
1405
1423
|
var a;
|
1406
1424
|
const {
|
1407
1425
|
data: i,
|
1408
1426
|
isLoading: l
|
1409
|
-
} =
|
1427
|
+
} = lo(), d = Xi(), 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
|
-
} =
|
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
|
-
},
|
1442
|
+
}, go = (e) => Q(() => {
|
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",
|
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
|
-
} =
|
1457
|
+
} = uo(e, t, !0), [d, p] = R(null), {
|
1440
1458
|
history: c,
|
1441
1459
|
isLoading: g,
|
1442
1460
|
isError: x
|
1443
|
-
} =
|
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
|
-
} =
|
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
|
-
},
|
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:",
|
1485
|
+
}) => e.aiChat.backgroundColor, ";overflow:hidden;min-width:", bo, "px;min-height:", fo, "px;width:", ({
|
1468
1486
|
width: e
|
1469
|
-
}) => e ? Ot(e) : `${
|
1487
|
+
}) => e ? Ot(e) : `${xo}px`, ";height:", ({
|
1470
1488
|
height: e
|
1471
|
-
}) => e ? Ot(e) : `${
|
1489
|
+
}) => e ? Ot(e) : `${ko}px`, ";", ({
|
1472
1490
|
theme: e
|
1473
|
-
}) =>
|
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
|
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(
|
1528
|
+
children: /* @__PURE__ */ n(wo, {
|
1511
1529
|
spin: !0
|
1512
1530
|
})
|
1513
1531
|
});
|
1514
1532
|
}
|
1515
|
-
function
|
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
|
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
|
1570
|
+
const vo = /* @__PURE__ */ C("div", {
|
1553
1571
|
target: "e1q6h1ze0",
|
1554
1572
|
label: "Section"
|
1555
|
-
})("display:flex;flex-direction:column;row-gap:4px;"),
|
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, ";}"),
|
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
|
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(
|
1584
|
-
children: [/* @__PURE__ */ n(
|
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(
|
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
|
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;"),
|
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
|
1638
|
+
function Lo({
|
1621
1639
|
recentPrompts: e,
|
1622
1640
|
suggestions: t,
|
1623
1641
|
isLoading: r,
|
@@ -1652,14 +1670,14 @@ function Ao({
|
|
1652
1670
|
sx: {
|
1653
1671
|
zIndex: 3
|
1654
1672
|
},
|
1655
|
-
children: /* @__PURE__ */ v(
|
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(
|
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(
|
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
|
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, ";"),
|
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;"),
|
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, ";"),
|
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 ?
|
1747
|
+
}) => e ? P`
|
1730
1748
|
opacity: 0.3;
|
1731
1749
|
cursor: not-allowed;
|
1732
|
-
` :
|
1750
|
+
` : P`
|
1733
1751
|
opacity: 1;
|
1734
1752
|
cursor: pointer;
|
1735
|
-
`),
|
1736
|
-
function
|
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,
|
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(
|
1805
|
+
return /* @__PURE__ */ v(No, {
|
1788
1806
|
theme: m,
|
1789
|
-
children: [/* @__PURE__ */ n(
|
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(
|
1818
|
+
children: /* @__PURE__ */ n(jo, {
|
1801
1819
|
"aria-label": "clear history",
|
1802
1820
|
onClick: t,
|
1803
|
-
children: /* @__PURE__ */ n(
|
1821
|
+
children: /* @__PURE__ */ n(Co, {
|
1804
1822
|
theme: m
|
1805
1823
|
})
|
1806
1824
|
})
|
1807
|
-
}), /* @__PURE__ */ n(
|
1825
|
+
}), /* @__PURE__ */ n(Oo, {
|
1808
1826
|
"aria-label": "chat input",
|
1809
1827
|
onBlur: _,
|
1810
|
-
maxLength:
|
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(
|
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(
|
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
|
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
|
-
},
|
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]*)/, Uo = /^ {2,}\n/, Qo = /^(?:( *[-*_])){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, Jo = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Xo = /^\[\^([^\]]+)]/, 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
|
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
|
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 ?
|
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 =
|
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(
|
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
|
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
|
1962
|
-
return
|
1979
|
+
function zn(e) {
|
1980
|
+
return xn.test(e) ? "right" : bn.test(e) ? "center" : fn.test(e) ? "left" : null;
|
1963
1981
|
}
|
1964
|
-
function
|
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
|
1996
|
+
function Zn(e, t, r) {
|
1979
1997
|
r.inline = !0;
|
1980
|
-
const a = e[2] ? e[2].replace(
|
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
|
2001
|
+
return Pt(g, p, c, !0);
|
1984
2002
|
});
|
1985
|
-
}(e[3], t, r) : [], l =
|
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
|
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
|
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
|
-
`, !
|
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
|
2035
|
-
function
|
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 (
|
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(
|
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
|
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);
|
@@ -2072,7 +2090,7 @@ function $e() {
|
|
2072
2090
|
function Je() {
|
2073
2091
|
return null;
|
2074
2092
|
}
|
2075
|
-
function
|
2093
|
+
function Hn(...e) {
|
2076
2094
|
return e.filter(Boolean).join(" ");
|
2077
2095
|
}
|
2078
2096
|
function Xe(e, t, r) {
|
@@ -2082,21 +2100,21 @@ function Xe(e, t, r) {
|
|
2082
2100
|
i.shift();
|
2083
2101
|
return a || r;
|
2084
2102
|
}
|
2085
|
-
function
|
2103
|
+
function Bn(e = "", t = {}) {
|
2086
2104
|
function r(o, u, ...s) {
|
2087
2105
|
const h = Xe(t.overrides, `${o}.props`, {});
|
2088
2106
|
return t.createElement(function(m, w) {
|
2089
2107
|
const _ = Xe(w, m);
|
2090
2108
|
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : Xe(w, `${m}.component`, m) : m;
|
2091
2109
|
}(o, t.overrides), se({}, u, h, {
|
2092
|
-
className:
|
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(
|
2114
|
+
o = o.replace(en, "");
|
2097
2115
|
let u = !1;
|
2098
|
-
t.forceInline ? u = !0 : t.forceBlock || (u =
|
2099
|
-
const s = g(c(u ? o : `${ve(o).replace(
|
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(
|
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(
|
2157
|
+
return L === "style" ? function(F) {
|
2140
2158
|
const H = [];
|
2141
2159
|
let V = "", $ = !1, W = !1, X = "";
|
2142
|
-
if (!
|
2160
|
+
if (!F)
|
2143
2161
|
return H;
|
2144
|
-
for (let B = 0; B <
|
2145
|
-
const
|
2146
|
-
if (
|
2147
|
-
V +=
|
2162
|
+
for (let B = 0; B < F.length; B++) {
|
2163
|
+
const G = F[B];
|
2164
|
+
if (G !== '"' && G !== "'" || $ || (W ? G === X && (W = !1, X = "") : (W = !0, X = 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
|
2165
|
-
H.push([
|
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(
|
2170
|
-
return
|
2171
|
-
}, {}) :
|
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 ||
|
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(
|
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(
|
2226
|
+
match: we(Uo),
|
2209
2227
|
order: 1,
|
2210
2228
|
parse: $e,
|
2211
2229
|
render: (o, u, s) => r("br", {
|
@@ -2213,7 +2231,7 @@ function Hn(e = "", t = {}) {
|
|
2213
2231
|
})
|
2214
2232
|
},
|
2215
2233
|
[k.breakThematic]: {
|
2216
|
-
match: K(
|
2234
|
+
match: K(Qo),
|
2217
2235
|
order: 1,
|
2218
2236
|
parse: $e,
|
2219
2237
|
render: (o, u, s) => r("hr", {
|
@@ -2254,7 +2272,7 @@ function Hn(e = "", t = {}) {
|
|
2254
2272
|
}, o.text)
|
2255
2273
|
},
|
2256
2274
|
[k.footnote]: {
|
2257
|
-
match: K(
|
2275
|
+
match: K(Jo),
|
2258
2276
|
order: 0,
|
2259
2277
|
parse: (o) => (l.push({
|
2260
2278
|
footnote: o[2],
|
@@ -2263,7 +2281,7 @@ function Hn(e = "", t = {}) {
|
|
2263
2281
|
render: Je
|
2264
2282
|
},
|
2265
2283
|
[k.footnoteReference]: {
|
2266
|
-
match: ie(
|
2284
|
+
match: ie(Xo),
|
2267
2285
|
order: 1,
|
2268
2286
|
parse: (o) => ({
|
2269
2287
|
target: `#${t.slugify(o[1], ye)}`,
|
@@ -2277,7 +2295,7 @@ function Hn(e = "", t = {}) {
|
|
2277
2295
|
}, o.text))
|
2278
2296
|
},
|
2279
2297
|
[k.gfmTask]: {
|
2280
|
-
match: ie(
|
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(
|
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 =
|
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
|
@@ -2349,7 +2367,7 @@ function Hn(e = "", t = {}) {
|
|
2349
2367
|
render: Je
|
2350
2368
|
},
|
2351
2369
|
[k.image]: {
|
2352
|
-
match: oe(
|
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(
|
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(
|
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(
|
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(
|
2424
|
+
match: ie(ln),
|
2407
2425
|
order: 0,
|
2408
2426
|
parse(o) {
|
2409
2427
|
let u = o[1], s = o[1];
|
2410
|
-
return
|
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(
|
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(
|
2448
|
+
match: be(Rn),
|
2431
2449
|
order: 3,
|
2432
2450
|
parse: Ve,
|
2433
2451
|
render: (o, u, s) => r("p", {
|
@@ -2435,7 +2453,7 @@ function Hn(e = "", t = {}) {
|
|
2435
2453
|
}, u(o.children, s))
|
2436
2454
|
},
|
2437
2455
|
[k.ref]: {
|
2438
|
-
match: ie(
|
2456
|
+
match: ie(cn),
|
2439
2457
|
order: 0,
|
2440
2458
|
parse: (o) => (d[o[1]] = {
|
2441
2459
|
target: o[2],
|
@@ -2444,7 +2462,7 @@ function Hn(e = "", t = {}) {
|
|
2444
2462
|
render: Je
|
2445
2463
|
},
|
2446
2464
|
[k.refImage]: {
|
2447
|
-
match: oe(
|
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(
|
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:
|
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:
|
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:
|
2513
|
+
style: Gt(h, y)
|
2496
2514
|
}, u(_, s));
|
2497
2515
|
}));
|
2498
2516
|
})));
|
2499
2517
|
}
|
2500
2518
|
},
|
2501
2519
|
[k.text]: {
|
2502
|
-
match: we(
|
2520
|
+
match: we(vn),
|
2503
2521
|
order: 4,
|
2504
2522
|
parse: (o) => ({
|
2505
|
-
text: o[0].replace(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
2582
|
-
`).replace(
|
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
|
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,
|
2628
|
-
return Na(
|
2629
|
-
},
|
2645
|
+
}(e, Ro);
|
2646
|
+
return Na(Bn(t, r), a);
|
2647
|
+
}, Un = /* @__PURE__ */ C("div", {
|
2630
2648
|
target: "e1vkf9b40",
|
2631
2649
|
label: "FlexContainer"
|
2632
2650
|
})("display:flex;", ({
|
2633
2651
|
align: e
|
2634
|
-
}) => e === "right" ?
|
2652
|
+
}) => e === "right" ? P`
|
2635
2653
|
justify-content: flex-end;
|
2636
|
-
` :
|
2654
|
+
` : P`
|
2637
2655
|
justify-content: flex-start;
|
2638
|
-
`),
|
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" ?
|
2661
|
+
}) => e === "right" ? P`
|
2644
2662
|
text-align: right;
|
2645
2663
|
border-radius: 10px 10px 0px 10px;
|
2646
|
-
` :
|
2664
|
+
` : P`
|
2647
2665
|
text-align: left;
|
2648
2666
|
border-radius: 10px 10px 10px 0px;
|
2649
2667
|
`, " ", ({
|
2650
2668
|
align: e
|
2651
|
-
}) => e !== "full" ?
|
2669
|
+
}) => e !== "full" ? P`
|
2652
2670
|
max-width: 85%;
|
2653
2671
|
` : "", " color:", ({
|
2654
2672
|
theme: e
|
@@ -2662,19 +2680,19 @@ const Bn = (e) => {
|
|
2662
2680
|
const {
|
2663
2681
|
themeSettings: r
|
2664
2682
|
} = D();
|
2665
|
-
return /* @__PURE__ */ n(
|
2683
|
+
return /* @__PURE__ */ n(Un, {
|
2666
2684
|
theme: r,
|
2667
2685
|
align: e,
|
2668
|
-
children: /* @__PURE__ */ n(
|
2686
|
+
children: /* @__PURE__ */ n(Gr, {
|
2669
2687
|
theme: r,
|
2670
2688
|
align: e,
|
2671
|
-
children: typeof t == "string" ? /* @__PURE__ */ n(
|
2689
|
+
children: typeof t == "string" ? /* @__PURE__ */ n(Yn, {
|
2672
2690
|
children: t
|
2673
2691
|
}) : t
|
2674
2692
|
})
|
2675
2693
|
});
|
2676
2694
|
};
|
2677
|
-
function
|
2695
|
+
function Qn() {
|
2678
2696
|
const {
|
2679
2697
|
welcomeText: e
|
2680
2698
|
} = re();
|
@@ -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;"),
|
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;"),
|
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(
|
2724
|
+
children: [/* @__PURE__ */ n(Vn, {
|
2707
2725
|
theme: r,
|
2708
2726
|
children: e
|
2709
|
-
}), /* @__PURE__ */ n(wa, {}), t && /* @__PURE__ */ n(
|
2727
|
+
}), /* @__PURE__ */ n(wa, {}), t && /* @__PURE__ */ n($n, {
|
2710
2728
|
onClick: t.onClick,
|
2711
2729
|
children: t.text
|
2712
2730
|
})]
|
@@ -2734,16 +2752,16 @@ function Hr() {
|
|
2734
2752
|
})]
|
2735
2753
|
});
|
2736
2754
|
}
|
2737
|
-
const
|
2755
|
+
const Jn = /* @__PURE__ */ C("div", {
|
2738
2756
|
target: "ed5z2fc0",
|
2739
2757
|
label: "FlexContainer"
|
2740
2758
|
})("display:flex;", ({
|
2741
2759
|
align: e
|
2742
|
-
}) => e === "right" ?
|
2760
|
+
}) => e === "right" ? P`
|
2743
2761
|
justify-content: flex-end;
|
2744
|
-
` :
|
2762
|
+
` : P`
|
2745
2763
|
justify-content: flex-start;
|
2746
|
-
`),
|
2764
|
+
`), Xn = /* @__PURE__ */ C("button", {
|
2747
2765
|
target: "ed5z2fc1",
|
2748
2766
|
label: "MessageButton"
|
2749
2767
|
})("font-family:inherit;font-size:inherit;line-height:inherit;border:", ({
|
@@ -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" ?
|
2779
|
+
}) => e === "right" ? P`
|
2762
2780
|
text-align: right;
|
2763
|
-
` :
|
2781
|
+
` : P`
|
2764
2782
|
text-align: left;
|
2765
2783
|
`, " ", ({
|
2766
2784
|
align: e
|
2767
|
-
}) => e !== "full" ?
|
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
|
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
|
2818
|
+
function Pe({
|
2801
2819
|
children: e,
|
2802
2820
|
align: t,
|
2803
2821
|
onClick: r,
|
@@ -2808,9 +2826,9 @@ function Ge({
|
|
2808
2826
|
const {
|
2809
2827
|
themeSettings: d
|
2810
2828
|
} = D();
|
2811
|
-
return /* @__PURE__ */ n(
|
2829
|
+
return /* @__PURE__ */ n(Jn, {
|
2812
2830
|
align: t,
|
2813
|
-
children: /* @__PURE__ */ n(
|
2831
|
+
children: /* @__PURE__ */ n(Xn, {
|
2814
2832
|
"aria-label": l,
|
2815
2833
|
theme: d,
|
2816
2834
|
onClick: r,
|
@@ -2821,7 +2839,7 @@ function Ge({
|
|
2821
2839
|
})
|
2822
2840
|
});
|
2823
2841
|
}
|
2824
|
-
function
|
2842
|
+
function Kn({
|
2825
2843
|
onCancel: e,
|
2826
2844
|
onConfirm: t
|
2827
2845
|
}) {
|
@@ -2834,7 +2852,7 @@ function Xn({
|
|
2834
2852
|
children: r("ai.clearHistoryPrompt")
|
2835
2853
|
}), /* @__PURE__ */ v("div", {
|
2836
2854
|
className: "csdk-flex csdk-gap-x-2",
|
2837
|
-
children: [/* @__PURE__ */ n(
|
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(
|
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
|
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__ */
|
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
|
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
|
-
}),
|
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,
|
2882
|
-
},
|
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
|
-
}),
|
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
|
-
}),
|
2951
|
+
}), ol = qe(Vt, {
|
2934
2952
|
name: "MuiDialog",
|
2935
2953
|
slot: "Paper",
|
2936
2954
|
overridesResolver: (e, t) => {
|
@@ -3050,23 +3068,23 @@ const el = qe(ca, {
|
|
3050
3068
|
scroll: L = "paper",
|
3051
3069
|
slots: z = {},
|
3052
3070
|
slotProps: de = {},
|
3053
|
-
TransitionComponent:
|
3071
|
+
TransitionComponent: F = wt,
|
3054
3072
|
transitionDuration: H = i,
|
3055
3073
|
TransitionProps: V
|
3056
|
-
} = l, $ =
|
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 =
|
3080
|
+
}), X = rl(W), E = ce(), B = (ue) => {
|
3063
3081
|
E.current = ue.target === ue.currentTarget;
|
3064
|
-
},
|
3082
|
+
}, G = (ue) => {
|
3065
3083
|
_ && _(ue), E.current && (E.current = null, w && w(ue), y && y(ue, "backdropClick"));
|
3066
|
-
}, Y = ma(p), ae =
|
3084
|
+
}, Y = ma(p), ae = Q(() => ({
|
3067
3085
|
titleId: Y
|
3068
3086
|
}), [Y]), fe = I({
|
3069
|
-
transition:
|
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:
|
3096
|
+
elementType: al,
|
3079
3097
|
shouldForwardComponentProp: !0,
|
3080
3098
|
externalForwardedProps: q,
|
3081
3099
|
ownerState: W,
|
3082
|
-
className:
|
3100
|
+
className: Qe(X.root, o),
|
3083
3101
|
ref: t
|
3084
3102
|
}), [Kr, ea] = xe("backdrop", {
|
3085
|
-
elementType:
|
3103
|
+
elementType: tl,
|
3086
3104
|
shouldForwardComponentProp: !0,
|
3087
3105
|
externalForwardedProps: q,
|
3088
3106
|
ownerState: W
|
3089
3107
|
}), [ta, ra] = xe("paper", {
|
3090
|
-
elementType:
|
3108
|
+
elementType: ol,
|
3091
3109
|
shouldForwardComponentProp: !0,
|
3092
3110
|
externalForwardedProps: q,
|
3093
3111
|
ownerState: W,
|
3094
|
-
className:
|
3112
|
+
className: Qe(X.paper, S.className)
|
3095
3113
|
}), [aa, ia] = xe("container", {
|
3096
|
-
elementType:
|
3114
|
+
elementType: il,
|
3097
3115
|
externalForwardedProps: q,
|
3098
3116
|
ownerState: W,
|
3099
|
-
className:
|
3117
|
+
className: Qe(X.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:
|
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
|
3329
|
+
function nl({
|
3312
3330
|
fillColor: e = "#262E3D"
|
3313
3331
|
}) {
|
3314
3332
|
return /* @__PURE__ */ v("svg", {
|
@@ -3417,9 +3435,9 @@ const Ur = {
|
|
3417
3435
|
errorBG: "rgba(231, 71, 39, 0.1)"
|
3418
3436
|
}
|
3419
3437
|
}
|
3420
|
-
},
|
3438
|
+
}, ll = {
|
3421
3439
|
shouldForwardProp: (e) => !e.startsWith("$")
|
3422
|
-
}, Ae = /* @__PURE__ */ C(ar,
|
3440
|
+
}, Ae = /* @__PURE__ */ C(ar, ll, {
|
3423
3441
|
target: "e869yoj0",
|
3424
3442
|
label: "IconButton"
|
3425
3443
|
})(({
|
@@ -3430,7 +3448,7 @@ const Ur = {
|
|
3430
3448
|
backgroundColor: e ?? Ur.interaction.defaultHover
|
3431
3449
|
}
|
3432
3450
|
}));
|
3433
|
-
function
|
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
|
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
|
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),
|
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(
|
3512
|
+
children: /* @__PURE__ */ n(sl, {
|
3495
3513
|
fill: t.chart.textColor
|
3496
3514
|
})
|
3497
3515
|
})
|
3498
3516
|
});
|
3499
|
-
},
|
3517
|
+
}, ul = ({
|
3500
3518
|
items: e
|
3501
3519
|
}) => {
|
3502
3520
|
const [t, r] = R(null), a = (d) => {
|
@@ -3543,7 +3561,7 @@ const yt = (e) => tr(e.chart.backgroundColor), cl = ({
|
|
3543
3561
|
}, d.title))
|
3544
3562
|
})]
|
3545
3563
|
});
|
3546
|
-
},
|
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(
|
3577
|
+
children: /* @__PURE__ */ n(dl, {
|
3560
3578
|
fill: t.chart.textColor
|
3561
3579
|
})
|
3562
3580
|
})
|
3563
3581
|
});
|
3564
|
-
},
|
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
|
3586
|
+
function ml({
|
3569
3587
|
infoTooltipText: e,
|
3570
3588
|
onRefresh: t,
|
3571
3589
|
onExpand: r
|
3572
3590
|
}) {
|
3573
|
-
const a =
|
3591
|
+
const a = Q(() => [{
|
3574
3592
|
title: "Refresh",
|
3575
3593
|
onClick: t,
|
3576
|
-
icon: /* @__PURE__ */ n(
|
3594
|
+
icon: /* @__PURE__ */ n(cl, {})
|
3577
3595
|
}], [t]);
|
3578
|
-
return /* @__PURE__ */ v(
|
3596
|
+
return /* @__PURE__ */ v(hl, {
|
3579
3597
|
"aria-label": "chatbot chart toolbar",
|
3580
|
-
children: [/* @__PURE__ */ n(
|
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
|
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
|
-
} =
|
3615
|
+
} = Q(() => {
|
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(
|
3628
|
+
renderToolbar: (o) => /* @__PURE__ */ n(ml, {
|
3611
3629
|
infoTooltipText: p,
|
3612
3630
|
onRefresh: o,
|
3613
3631
|
onExpand: () => r(!0)
|
@@ -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(
|
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
|
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
|
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(
|
3738
|
+
children: /* @__PURE__ */ n(fl, {
|
3721
3739
|
theme: r
|
3722
3740
|
})
|
3723
3741
|
})
|
3724
3742
|
});
|
3725
3743
|
}
|
3726
|
-
function
|
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
|
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(
|
3777
|
+
children: /* @__PURE__ */ n(kl, {
|
3760
3778
|
theme: r
|
3761
3779
|
})
|
3762
3780
|
})
|
3763
3781
|
});
|
3764
3782
|
}
|
3765
|
-
const
|
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
|
-
},
|
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
|
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(
|
3808
|
+
children: [/* @__PURE__ */ n(yl, {
|
3791
3809
|
onClick: () => i("up"),
|
3792
3810
|
disabled: r
|
3793
|
-
}), /* @__PURE__ */ n(
|
3811
|
+
}), /* @__PURE__ */ n(xl, {
|
3794
3812
|
onClick: () => i("down"),
|
3795
3813
|
disabled: r
|
3796
3814
|
})]
|
@@ -3810,27 +3828,27 @@ function Ht({
|
|
3810
3828
|
data: t,
|
3811
3829
|
rating: b
|
3812
3830
|
});
|
3813
|
-
}, [l, e, t, r]), 200), [p, c] =
|
3831
|
+
}, [l, e, t, r]), 200), [p, c] = wl(), g = Q(() => a === "onHover" ? c : a !== "never", [c, a]), {
|
3814
3832
|
themeSettings: x
|
3815
3833
|
} = D();
|
3816
|
-
return /* @__PURE__ */ n(
|
3834
|
+
return /* @__PURE__ */ n(_l, {
|
3817
3835
|
ref: p,
|
3818
3836
|
theme: x,
|
3819
|
-
children: i(/* @__PURE__ */ n(
|
3837
|
+
children: i(/* @__PURE__ */ n(Cl, {
|
3820
3838
|
onSend: d,
|
3821
3839
|
visible: g
|
3822
3840
|
}))
|
3823
3841
|
});
|
3824
3842
|
}
|
3825
|
-
const
|
3826
|
-
function
|
3843
|
+
const vl = 18 * 5;
|
3844
|
+
function Qr({
|
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 >
|
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
|
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(
|
3882
|
+
children: /* @__PURE__ */ n(Qr, {
|
3865
3883
|
text: t ?? i("ai.errors.insightsNotAvailable")
|
3866
3884
|
})
|
3867
3885
|
});
|
3868
3886
|
}
|
3869
|
-
function
|
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
|
3905
|
+
function Il({
|
3888
3906
|
onClick: e
|
3889
3907
|
}) {
|
3890
3908
|
const {
|
3891
3909
|
t
|
3892
3910
|
} = O();
|
3893
|
-
return /* @__PURE__ */ n(
|
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(
|
3916
|
+
children: [/* @__PURE__ */ n(Ml, {}), t("ai.buttons.insights")]
|
3899
3917
|
})
|
3900
3918
|
});
|
3901
3919
|
}
|
3902
|
-
var
|
3920
|
+
var Dl = Xa("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;"),
|
3907
|
-
function
|
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
|
-
|
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 = {
|
@@ -3941,12 +3959,12 @@ function Al({
|
|
3941
3959
|
buttonVisibility: t ? "always" : "onHover",
|
3942
3960
|
renderContent: (y) => /* @__PURE__ */ v(U, {
|
3943
3961
|
children: [/* @__PURE__ */ v(Bt, {
|
3944
|
-
children: [/* @__PURE__ */ n(
|
3962
|
+
children: [/* @__PURE__ */ n(Gr, {
|
3945
3963
|
align: "left",
|
3946
3964
|
theme: i,
|
3947
|
-
children: _ || `Here's ${b} showing ${
|
3965
|
+
children: _ || `Here's ${b} showing ${Dl(l)}.`
|
3948
3966
|
}), y]
|
3949
|
-
}), w && /* @__PURE__ */ n(
|
3967
|
+
}), w && /* @__PURE__ */ n(bl, {
|
3950
3968
|
content: e
|
3951
3969
|
})]
|
3952
3970
|
})
|
@@ -3957,41 +3975,41 @@ function Al({
|
|
3957
3975
|
buttonVisibility: u ? "onHover" : "never",
|
3958
3976
|
renderContent: (y) => /* @__PURE__ */ v(U, {
|
3959
3977
|
children: [/* @__PURE__ */ v(Bt, {
|
3960
|
-
children: [/* @__PURE__ */ n(
|
3978
|
+
children: [/* @__PURE__ */ n(Il, {
|
3961
3979
|
onClick: h
|
3962
3980
|
}), y]
|
3963
|
-
}), u && /* @__PURE__ */ n(
|
3981
|
+
}), u && /* @__PURE__ */ n(Sl, {
|
3964
3982
|
nlgRequest: m
|
3965
3983
|
})]
|
3966
3984
|
})
|
3967
3985
|
})]
|
3968
3986
|
});
|
3969
3987
|
}
|
3970
|
-
function
|
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(
|
3994
|
+
return /* @__PURE__ */ n(Ll, {
|
3977
3995
|
data: a,
|
3978
3996
|
alwaysShowFeedback: t
|
3979
3997
|
});
|
3980
3998
|
}
|
3981
|
-
const r =
|
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
|
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
|
4012
|
+
function Ol({
|
3995
4013
|
messages: e
|
3996
4014
|
}) {
|
3997
4015
|
const {
|
@@ -3999,17 +4017,17 @@ function jl({
|
|
3999
4017
|
} = O();
|
4000
4018
|
return /* @__PURE__ */ n(U, {
|
4001
4019
|
children: e.map((r, a) => /* @__PURE__ */ n(Sa, {
|
4002
|
-
fallbackRender: (i) =>
|
4020
|
+
fallbackRender: (i) => jl(j(I({}, i), {
|
4003
4021
|
displayMessage: t("ai.errors.unexpected")
|
4004
4022
|
})),
|
4005
|
-
children: /* @__PURE__ */ n(
|
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
|
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
|
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(
|
4053
|
+
children: /* @__PURE__ */ n(Fr, {
|
4036
4054
|
color: t
|
4037
4055
|
})
|
4038
4056
|
});
|
4039
4057
|
}
|
4040
|
-
const
|
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
|
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(
|
4113
|
+
return /* @__PURE__ */ n(zl, {
|
4096
4114
|
onClick: t,
|
4097
4115
|
theme: r,
|
4098
4116
|
children: e
|
4099
4117
|
});
|
4100
4118
|
}
|
4101
|
-
const
|
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
|
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 =
|
4131
|
+
} = O(), [a, i] = R(!0), l = Q(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
|
4114
4132
|
themeSettings: d
|
4115
4133
|
} = D();
|
4116
|
-
return /* @__PURE__ */ v(
|
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
|
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;}}"),
|
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(
|
4167
|
+
return /* @__PURE__ */ n(Pl, {
|
4150
4168
|
children: Array.from({
|
4151
4169
|
length: 3
|
4152
|
-
}, (t, r) => /* @__PURE__ */ n(
|
4170
|
+
}, (t, r) => /* @__PURE__ */ n(Wl, {
|
4153
4171
|
theme: e
|
4154
4172
|
}, r))
|
4155
4173
|
});
|
4156
4174
|
}
|
4157
|
-
function
|
4175
|
+
function ql({
|
4158
4176
|
questions: e,
|
4159
4177
|
isLoading: t,
|
4160
4178
|
onSelection: r
|
@@ -4166,18 +4184,18 @@ function Pl({
|
|
4166
4184
|
children: [i && /* @__PURE__ */ n(le, {
|
4167
4185
|
align: "left",
|
4168
4186
|
children: i
|
4169
|
-
}), /* @__PURE__ */ n(
|
4187
|
+
}), /* @__PURE__ */ n(Rl, {
|
4170
4188
|
onSelection: r,
|
4171
4189
|
questions: e
|
4172
4190
|
})]
|
4173
4191
|
}) : null;
|
4174
4192
|
}
|
4175
|
-
const
|
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, ";"),
|
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:", ({
|
@@ -4188,10 +4206,10 @@ const ql = /* @__PURE__ */ C("div", {
|
|
4188
4206
|
rightNav: r,
|
4189
4207
|
style: a
|
4190
4208
|
}, i) {
|
4191
|
-
return /* @__PURE__ */ v(
|
4209
|
+
return /* @__PURE__ */ v(Hl, {
|
4192
4210
|
ref: i,
|
4193
4211
|
style: a,
|
4194
|
-
children: [t, /* @__PURE__ */ n(
|
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
|
-
}),
|
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
|
4226
|
+
function Ul({
|
4209
4227
|
theme: e
|
4210
4228
|
}) {
|
4211
4229
|
const {
|
4212
4230
|
t
|
4213
4231
|
} = O();
|
4214
|
-
return /* @__PURE__ */ v(
|
4232
|
+
return /* @__PURE__ */ v(Yl, {
|
4215
4233
|
theme: e,
|
4216
4234
|
children: [/* @__PURE__ */ n("div", {
|
4217
4235
|
children: t("ai.disclaimer.poweredByAi")
|
@@ -4220,7 +4238,7 @@ function Yl({
|
|
4220
4238
|
})]
|
4221
4239
|
});
|
4222
4240
|
}
|
4223
|
-
function
|
4241
|
+
function Ql() {
|
4224
4242
|
const {
|
4225
4243
|
themeSettings: e
|
4226
4244
|
} = D();
|
@@ -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
|
-
},
|
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,18 +4272,18 @@ 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;"),
|
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(
|
4281
|
+
return /* @__PURE__ */ n(Vl, {
|
4264
4282
|
theme: t,
|
4265
4283
|
onClick: e,
|
4266
|
-
children: /* @__PURE__ */ n(
|
4284
|
+
children: /* @__PURE__ */ n(Ql, {})
|
4267
4285
|
});
|
4268
|
-
},
|
4286
|
+
}, Jl = ({
|
4269
4287
|
isVisible: e,
|
4270
4288
|
onClick: t,
|
4271
4289
|
anchorElement: r
|
@@ -4276,10 +4294,10 @@ const Fl = (e, t) => {
|
|
4276
4294
|
sx: {
|
4277
4295
|
zIndex: 2
|
4278
4296
|
},
|
4279
|
-
children: /* @__PURE__ */ n(
|
4297
|
+
children: /* @__PURE__ */ n($l, {
|
4280
4298
|
onClick: t
|
4281
4299
|
})
|
4282
|
-
}),
|
4300
|
+
}), Xl = /* @__PURE__ */ C("div", {
|
4283
4301
|
target: "ednrf320",
|
4284
4302
|
label: "ChatBody"
|
4285
4303
|
})("display:flex;flex-direction:column;row-gap:", ({
|
@@ -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%;"),
|
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;"),
|
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
|
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
|
-
} =
|
4349
|
+
} = ro({
|
4332
4350
|
contextTitle: e,
|
4333
4351
|
count: x
|
4334
|
-
}), h =
|
4352
|
+
}), h = Q(() => 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
|
-
} =
|
4360
|
+
} = mo(e, r), {
|
4343
4361
|
mutate: L,
|
4344
4362
|
isLoading: z
|
4345
|
-
} = _r(A), [de,
|
4363
|
+
} = _r(A), [de, F] = R(!1), [H, V] = R(!1), $ = () => F(!0), W = () => F(!1), X = () => {
|
4346
4364
|
L(), W();
|
4347
|
-
}, E = ce(null), B = ce(null),
|
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(
|
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 =
|
4389
|
+
}) : null, fe = Q(() => [...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
4390
|
return (S == null ? void 0 : S.message) === d("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(U, {
|
4373
4391
|
children: [c && ae, /* @__PURE__ */ n(qr, {
|
4374
4392
|
text: S.message
|
4375
4393
|
})]
|
4376
4394
|
}) : /* @__PURE__ */ v(U, {
|
4377
|
-
children: [ae, /* @__PURE__ */ v(
|
4395
|
+
children: [ae, /* @__PURE__ */ v(Xl, {
|
4378
4396
|
ref: E,
|
4379
4397
|
theme: b,
|
4380
|
-
onScroll:
|
4381
|
-
children: [/* @__PURE__ */ n(
|
4398
|
+
onScroll: G,
|
4399
|
+
children: [/* @__PURE__ */ n(Jl, {
|
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(
|
4409
|
+
}), /* @__PURE__ */ n(Qn, {}), /* @__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(
|
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(
|
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(
|
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(
|
4430
|
+
}), (_ || z) && /* @__PURE__ */ n(Hr, {}), de && /* @__PURE__ */ n(Kn, {
|
4413
4431
|
onCancel: W,
|
4414
4432
|
onConfirm: X
|
4415
4433
|
})]
|
4416
|
-
}), /* @__PURE__ */ v(
|
4434
|
+
}), /* @__PURE__ */ v(Kl, {
|
4417
4435
|
ref: B,
|
4418
4436
|
theme: b,
|
4419
|
-
children: [/* @__PURE__ */ n(
|
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(
|
4446
|
+
}), /* @__PURE__ */ n(Ul, {
|
4429
4447
|
theme: b
|
4430
4448
|
})]
|
4431
4449
|
})]
|
4432
4450
|
});
|
4433
4451
|
}
|
4434
|
-
const
|
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, ";"),
|
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, ";"),
|
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), ";"),
|
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
|
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(
|
4485
|
+
return /* @__PURE__ */ v(rd, {
|
4468
4486
|
onClick: a,
|
4469
4487
|
theme: i,
|
4470
4488
|
children: [/* @__PURE__ */ v("div", {
|
4471
|
-
children: [/* @__PURE__ */ n(
|
4489
|
+
children: [/* @__PURE__ */ n(ad, {
|
4472
4490
|
theme: i,
|
4473
4491
|
children: t
|
4474
|
-
}), /* @__PURE__ */ n(
|
4492
|
+
}), /* @__PURE__ */ n(id, {
|
4475
4493
|
theme: i,
|
4476
4494
|
children: r
|
4477
4495
|
})]
|
4478
|
-
}), /* @__PURE__ */ n(
|
4479
|
-
children: /* @__PURE__ */ n(
|
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
|
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;"),
|
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, ";"),
|
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
|
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(
|
4508
|
-
children: [/* @__PURE__ */ n(
|
4525
|
+
return /* @__PURE__ */ v(ld, {
|
4526
|
+
children: [/* @__PURE__ */ n(dd, {
|
4509
4527
|
theme: r,
|
4510
4528
|
children: a("ai.dataTopics")
|
4511
|
-
}), /* @__PURE__ */ v(
|
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(
|
4532
|
+
}), t.map((i) => /* @__PURE__ */ Ma(nd, j(I({}, i), {
|
4515
4533
|
key: i.title
|
4516
4534
|
})))]
|
4517
4535
|
});
|
4518
4536
|
}
|
4519
|
-
const
|
4520
|
-
function
|
4537
|
+
const pd = "#000000", ud = "#FFFFFF";
|
4538
|
+
function gd({
|
4521
4539
|
isDarkBackground: e = !1
|
4522
4540
|
}) {
|
4523
|
-
const t = e ?
|
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
|
4599
|
+
const hd = /* @__PURE__ */ C("div", {
|
4582
4600
|
target: "ealudtn0",
|
4583
4601
|
label: "LogoContainer"
|
4584
|
-
})("margin-left:14px;margin-top:3px;"),
|
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
|
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 =
|
4618
|
+
} = O(), l = Q(() => 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
4622
|
return /* @__PURE__ */ v(U, {
|
4605
4623
|
children: [r ? /* @__PURE__ */ n(Vr, {
|
4606
4624
|
title: i("ai.analyticsChatbot"),
|
4607
|
-
leftNav: /* @__PURE__ */ n(
|
4608
|
-
children: /* @__PURE__ */ n(
|
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(
|
4631
|
+
}) : null, /* @__PURE__ */ v(md, {
|
4614
4632
|
theme: a,
|
4615
|
-
children: [!l && /* @__PURE__ */ n(He, {}), l && /* @__PURE__ */ n(
|
4633
|
+
children: [!l && /* @__PURE__ */ n(He, {}), l && /* @__PURE__ */ n(cd, {
|
4616
4634
|
dataTopics: l
|
4617
4635
|
})]
|
4618
4636
|
})]
|
4619
4637
|
});
|
4620
4638
|
}
|
4621
|
-
function
|
4639
|
+
function fd() {
|
4622
4640
|
const [e, t] = R(), [r, a] = R(), {
|
4623
4641
|
data: i,
|
4624
4642
|
fetchStatus: l
|
4625
|
-
} =
|
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 =
|
4650
|
+
}, [g]), b = Q(() => {
|
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(
|
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(
|
4669
|
+
}) : /* @__PURE__ */ n(bd, {
|
4652
4670
|
dataTopicsList: b,
|
4653
4671
|
onDataTopicClick: (s) => t(s)
|
4654
4672
|
});
|
4655
4673
|
}
|
4656
|
-
const
|
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(
|
4684
|
+
return /* @__PURE__ */ n(ao, {
|
4667
4685
|
value: a ?? {},
|
4668
|
-
children: /* @__PURE__ */ n(
|
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(
|
4692
|
+
children: /* @__PURE__ */ n(fd, {})
|
4675
4693
|
})
|
4676
4694
|
});
|
4677
|
-
}),
|
4695
|
+
}), kd = $t({
|
4678
4696
|
componentName: "GetNlgInsights"
|
4679
4697
|
})(function(e) {
|
4680
4698
|
const {
|
@@ -4689,10 +4707,10 @@ const fd = $t({
|
|
4689
4707
|
children: i("ai.errors.unexpected")
|
4690
4708
|
});
|
4691
4709
|
const l = t ?? i("ai.errors.insightsNotAvailable");
|
4692
|
-
return /* @__PURE__ */ n(
|
4710
|
+
return /* @__PURE__ */ n(Qr, {
|
4693
4711
|
text: r ? "Loading..." : l
|
4694
4712
|
});
|
4695
|
-
}),
|
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
|
4721
|
+
function wd({
|
4704
4722
|
children: e,
|
4705
4723
|
context: t
|
4706
4724
|
}) {
|
4707
|
-
return /* @__PURE__ */ n(
|
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:
|
4729
|
+
client: yd,
|
4712
4730
|
children: e
|
4713
4731
|
})
|
4714
4732
|
})
|
@@ -4731,7 +4749,7 @@ const $r = {
|
|
4731
4749
|
Jr,
|
4732
4750
|
() => Ut($r),
|
4733
4751
|
!0
|
4734
|
-
),
|
4752
|
+
), vd = lt({
|
4735
4753
|
props: {
|
4736
4754
|
/**
|
4737
4755
|
* {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
|
@@ -4742,7 +4760,7 @@ const $r = {
|
|
4742
4760
|
const r = ai(), a = Ut($r), { app: i } = r.value;
|
4743
4761
|
return i && (a.value = {
|
4744
4762
|
api: new jt(i.httpClient, e.volatile)
|
4745
|
-
}),
|
4763
|
+
}), Qt(async () => {
|
4746
4764
|
const { app: l } = r.value;
|
4747
4765
|
l && (a.value = {
|
4748
4766
|
api: new jt(l.httpClient, e.volatile)
|
@@ -4756,15 +4774,15 @@ const $r = {
|
|
4756
4774
|
const e = Ye(), t = new ii({
|
4757
4775
|
context: e.value
|
4758
4776
|
});
|
4759
|
-
return
|
4777
|
+
return Qt(() => {
|
4760
4778
|
t.setValue({
|
4761
4779
|
context: e.value
|
4762
4780
|
});
|
4763
4781
|
}), {
|
4764
4782
|
propsObserver: t,
|
4765
|
-
providerComponent:
|
4783
|
+
providerComponent: wd
|
4766
4784
|
};
|
4767
|
-
},
|
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(
|
4800
|
+
setup: (e) => nr(xd, e, [
|
4783
4801
|
...lr(),
|
4784
4802
|
Xr()
|
4785
4803
|
])
|
4786
|
-
}),
|
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(
|
4830
|
+
setup: (e) => nr(kd, e, [
|
4813
4831
|
...lr(),
|
4814
4832
|
Xr()
|
4815
4833
|
])
|
4816
|
-
}),
|
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
|
-
},
|
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
|
-
},
|
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 } =
|
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
|
-
|
4928
|
-
|
4929
|
-
|
4930
|
-
|
4931
|
-
|
4932
|
-
|
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
|
};
|