@sisense/sdk-ui-vue 2.14.0 → 2.16.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 +424 -34
- package/dist/ai.js +1345 -1070
- package/dist/index.cjs +1 -1
- package/dist/index.js +839 -659
- package/dist/packages/sdk-ui-vue/src/components/charts/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/components/charts/pivot-table.d.ts +1 -1
- package/dist/packages/sdk-ui-vue/src/components/charts/streamgraph-chart.d.ts +182 -0
- package/dist/packages/sdk-ui-vue/src/components/widgets/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/components/widgets/pivot-table-widget.d.ts +208 -0
- package/dist/packages/sdk-ui-vue/src/composables/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/composables/use-execute-pivot-query.d.ts +43 -0
- package/dist/packages/sdk-ui-vue/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/use-tracking-2e23927e.cjs +3089 -0
- package/dist/{use-tracking-6619ee21.js → use-tracking-becee384.js} +67778 -58508
- package/package.json +2 -2
- package/dist/use-tracking-217b1709.cjs +0 -1078
package/dist/ai.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { inject as
|
|
3
|
-
let
|
|
1
|
+
import { aG as Ye, aH as Kt, aI as _, aJ as P, aK as er, aL as ma, aM as Ue, aN as ba, aO as fa, aP as fe, aQ as tr, aR as xa, aS as b, aT as rr, aU as ka, aV as ar, aW as ir, aX as L, aY as n, aZ as E, a_ as U, a$ as Q, b0 as Ae, b1 as N, b2 as v, b3 as ya, b4 as wa, b5 as pe, b6 as _a, b7 as we, b8 as Je, b9 as _e, ba as Ca, bb as Xe, bc as gt, bd as va, be as Sa, bf as Ma, bg as Ia, bh as At, bi as Z, bj as qe, bk as Le, bl as Da, bm as Aa, bn as La, bo as Ta, bp as Te, bq as Ie, br as Na, bs as ja, bt as Oa, bu as or, bv as Ea, ar as ze, bw as za, bx as Ra, by as nr, bz as Za, bA as Wa, bB as Pa, bC as Ga, bD as lr, bE as qa, bF as $a, bG as Ha, bH as Ba, bI as Ya, bJ as Ua, bK as Qa, bL as G, bM as Fa, bN as Va, bO as Ja, bP as Me, bQ as sr, bR as ht, bS as ot, bT as Xa, bU as Ke, bV as Ka, bW as ei, bX as ti, bY as ri, bZ as ai, b_ as ii, b$ as oi, c0 as ni, c1 as li, c2 as si, c3 as cr, c4 as ci, c5 as di, c6 as dr, G as pi, c7 as ui, a as pr, c8 as ur, J as mt, D as bt, K as ft, M as xe, a7 as xt } from "./use-tracking-becee384.js";
|
|
2
|
+
import { inject as gi, ref as gr, defineComponent as kt, watchEffect as hr, provide as hi, watch as yt, toRefs as wt } from "vue";
|
|
3
|
+
let mr = class extends sr {
|
|
4
4
|
constructor(e, t) {
|
|
5
5
|
var r;
|
|
6
|
-
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType =
|
|
6
|
+
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = e.jaql.dim || e.jaql.formula, this.metadataItem = e, e.jaql.agg ? this.aggregation = e.jaql.agg : delete this.aggregation, e.jaql.formula ? this.formula = e.jaql.formula : delete this.formula, e.jaql.sort ? this.sortType = ai(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
|
7
7
|
}
|
|
8
8
|
get id() {
|
|
9
9
|
return this.expression;
|
|
@@ -19,23 +19,23 @@ let hr = class extends nr {
|
|
|
19
19
|
return e.metadataItem = this.metadataItem, e.type = this.type, e;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
text:
|
|
24
|
-
numeric:
|
|
25
|
-
datetime:
|
|
22
|
+
const mi = {
|
|
23
|
+
text: Xe.TextAttribute,
|
|
24
|
+
numeric: Xe.NumericAttribute,
|
|
25
|
+
datetime: Xe.DateLevel
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function bi(e) {
|
|
28
28
|
var t;
|
|
29
|
-
return new
|
|
29
|
+
return new mr(e, (t = mi[e.jaql.datatype]) !== null && t !== void 0 ? t : "numeric");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function br(e) {
|
|
32
32
|
const {
|
|
33
33
|
jaql: t
|
|
34
34
|
} = e;
|
|
35
35
|
if (t.formula)
|
|
36
|
-
return
|
|
37
|
-
const r =
|
|
38
|
-
return "agg" in t && t.dim && t.datatype ?
|
|
36
|
+
return ii(t);
|
|
37
|
+
const r = oi(t);
|
|
38
|
+
return "agg" in t && t.dim && t.datatype ? ni({
|
|
39
39
|
expression: t.dim,
|
|
40
40
|
dataType: t.datatype,
|
|
41
41
|
agg: t.agg || "",
|
|
@@ -44,7 +44,7 @@ function mr(e) {
|
|
|
44
44
|
sort: t.sort,
|
|
45
45
|
title: t.title,
|
|
46
46
|
dataSource: t.datasource
|
|
47
|
-
}) : t.dim && t.datatype ?
|
|
47
|
+
}) : t.dim && t.datatype ? li({
|
|
48
48
|
expression: t.dim,
|
|
49
49
|
dataType: t.datatype,
|
|
50
50
|
granularity: r,
|
|
@@ -52,57 +52,57 @@ function mr(e) {
|
|
|
52
52
|
title: t.title,
|
|
53
53
|
panel: e.panel,
|
|
54
54
|
dataSource: t.datasource
|
|
55
|
-
}) :
|
|
55
|
+
}) : bi(e);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
var
|
|
57
|
+
const fi = (e) => "dashboardOid" in e && "widgetOid" in e;
|
|
58
|
+
var xi = Object.defineProperty, ki = Object.defineProperties, yi = Object.getOwnPropertyDescriptors, $e = Object.getOwnPropertySymbols, fr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable, Lt = (e, t, r) => t in e ? xi(e, t, {
|
|
59
59
|
enumerable: !0,
|
|
60
60
|
configurable: !0,
|
|
61
61
|
writable: !0,
|
|
62
62
|
value: r
|
|
63
63
|
}) : e[t] = r, O = (e, t) => {
|
|
64
64
|
for (var r in t || (t = {}))
|
|
65
|
-
|
|
66
|
-
if (
|
|
67
|
-
for (var r of
|
|
68
|
-
|
|
65
|
+
fr.call(t, r) && Lt(e, r, t[r]);
|
|
66
|
+
if ($e)
|
|
67
|
+
for (var r of $e(t))
|
|
68
|
+
xr.call(t, r) && Lt(e, r, t[r]);
|
|
69
69
|
return e;
|
|
70
|
-
},
|
|
70
|
+
}, te = (e, t) => ki(e, yi(t)), wi = (e, t) => {
|
|
71
71
|
var r = {};
|
|
72
72
|
for (var a in e)
|
|
73
|
-
|
|
74
|
-
if (e != null &&
|
|
75
|
-
for (var a of
|
|
76
|
-
t.indexOf(a) < 0 &&
|
|
73
|
+
fr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
|
74
|
+
if (e != null && $e)
|
|
75
|
+
for (var a of $e(e))
|
|
76
|
+
t.indexOf(a) < 0 && xr.call(e, a) && (r[a] = e[a]);
|
|
77
77
|
return r;
|
|
78
78
|
};
|
|
79
|
-
function
|
|
79
|
+
function _i(e) {
|
|
80
80
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ci(e) {
|
|
83
83
|
return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
if (![...
|
|
87
|
-
throw new
|
|
85
|
+
function kr(e) {
|
|
86
|
+
if (![...Ba, "pivot", "pivot2"].includes(e))
|
|
87
|
+
throw new Ie("errors.chartTypeNotSupported", {
|
|
88
88
|
chartType: e
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function vi(e) {
|
|
92
92
|
return "widgetType" in e && e.widgetType === "pivot";
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function be(e) {
|
|
95
95
|
var t;
|
|
96
96
|
return "column" in e && ((t = e.column) == null ? void 0 : t.expression) && /\(.*\)/.test(e.column.expression);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
const t = "measures" in e &&
|
|
100
|
-
return
|
|
98
|
+
function Tt(e) {
|
|
99
|
+
const t = "measures" in e && ee(e.measures) || "values" in e && ee(e.values);
|
|
100
|
+
return vi(e) ? "values" in e.dataOptions && ee(e.dataOptions.values) : "chartType" in e ? e.chartType === "indicator" ? "value" in e.dataOptions && ee(e.dataOptions.value) || "secondary" in e.dataOptions && ee(e.dataOptions.secondary) : e.chartType === "table" ? !("columns" in e.dataOptions) || !ee(e.dataOptions.columns) ? !1 : e.dataOptions.columns.some((r) => be(r)) : e.chartType === "boxplot" ? !1 : e.chartType === "scatter" ? "x" in e.dataOptions && e.dataOptions.x !== void 0 && be(e.dataOptions.x) || "y" in e.dataOptions && e.dataOptions.y !== void 0 && be(e.dataOptions.y) || "size" in e.dataOptions && e.dataOptions.size !== void 0 : e.chartType === "scattermap" ? "colorBy" in e.dataOptions && e.dataOptions.colorBy !== void 0 && be(e.dataOptions.colorBy) || "details" in e.dataOptions && e.dataOptions.details !== void 0 && be(e.dataOptions.details) || "size" in e.dataOptions && e.dataOptions.size !== void 0 && be(e.dataOptions.size) : e.chartType === "areamap" ? "geo" in e.dataOptions && ee(e.dataOptions.geo) && "color" in e.dataOptions && ee(e.dataOptions.color) : "value" in e.dataOptions && ee(e.dataOptions.value) : t;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function ee(e) {
|
|
103
103
|
return Array.isArray(e) && e.length > 0;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Si(e) {
|
|
106
106
|
const t = e.split(`
|
|
107
107
|
`);
|
|
108
108
|
for (let r = 0; r < t.length - 1; r++)
|
|
@@ -116,7 +116,7 @@ function vi(e) {
|
|
|
116
116
|
return t.join(`
|
|
117
117
|
`);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Mi(e) {
|
|
120
120
|
const t = (a) => /^[$A-Z_][0-9A-Z_$]*$/i.test(a);
|
|
121
121
|
if ("composeCode" in e)
|
|
122
122
|
return e;
|
|
@@ -127,7 +127,7 @@ function Si(e) {
|
|
|
127
127
|
}
|
|
128
128
|
return r;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const Ii = {
|
|
131
131
|
react: {
|
|
132
132
|
baseChartTmpl: `import { {{componentString}} } from '@sisense/sdk-ui';
|
|
133
133
|
{{extraImportsString}}
|
|
@@ -582,10 +582,10 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
582
582
|
</template>`,
|
|
583
583
|
dashboardTmpl: "/** COMING SOON */"
|
|
584
584
|
}
|
|
585
|
-
},
|
|
586
|
-
const a =
|
|
587
|
-
return
|
|
588
|
-
},
|
|
585
|
+
}, yr = (e, t) => Ii[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => yr(`${a}Tmpl`, t)), Di = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), nt = (e, t, r = "react") => {
|
|
586
|
+
const a = yr(e, r);
|
|
587
|
+
return Si(Di(a, t));
|
|
588
|
+
}, Ai = () => Object.values(si).map((e) => cr.aggregationToJAQL(e)).join("|"), wr = (e) => {
|
|
589
589
|
const {
|
|
590
590
|
formula: t,
|
|
591
591
|
context: r,
|
|
@@ -599,7 +599,7 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
599
599
|
const l = i[0];
|
|
600
600
|
if (typeof l != "string")
|
|
601
601
|
return e;
|
|
602
|
-
const s = r[`${l}`], p =
|
|
602
|
+
const s = r[`${l}`], p = Ai(), d = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(d);
|
|
603
603
|
if (g && t.includes(l)) {
|
|
604
604
|
const f = g[1];
|
|
605
605
|
return O({
|
|
@@ -614,16 +614,16 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
614
614
|
} : {});
|
|
615
615
|
}
|
|
616
616
|
return e;
|
|
617
|
-
},
|
|
617
|
+
}, We = (e) => {
|
|
618
618
|
let t = e;
|
|
619
|
-
if ("formula" in e && (t =
|
|
619
|
+
if ("formula" in e && (t = wr(e)), "context" in t) {
|
|
620
620
|
const r = O({}, t.context);
|
|
621
621
|
Object.keys(r).forEach((a) => {
|
|
622
|
-
r[`${a}`] =
|
|
622
|
+
r[`${a}`] = We(r[`${a}`]);
|
|
623
623
|
}), t.context = r;
|
|
624
624
|
}
|
|
625
625
|
return t;
|
|
626
|
-
},
|
|
626
|
+
}, Li = (e) => {
|
|
627
627
|
var t;
|
|
628
628
|
const r = e;
|
|
629
629
|
if (r.panel !== "scope")
|
|
@@ -631,26 +631,26 @@ import { DashboardById } from '@sisense/sdk-ui-vue';
|
|
|
631
631
|
const {
|
|
632
632
|
jaql: a
|
|
633
633
|
} = r;
|
|
634
|
-
return (t = a.filter) != null && t.by && (a.filter.by =
|
|
634
|
+
return (t = a.filter) != null && t.by && (a.filter.by = wr(a.filter.by)), te(O({}, r), {
|
|
635
635
|
jaql: a
|
|
636
636
|
});
|
|
637
|
-
},
|
|
637
|
+
}, Ti = (e) => {
|
|
638
638
|
let t = e;
|
|
639
|
-
t =
|
|
639
|
+
t = Li(t);
|
|
640
640
|
const {
|
|
641
641
|
jaql: r,
|
|
642
642
|
measure: a,
|
|
643
643
|
by: i
|
|
644
644
|
} = t;
|
|
645
|
-
return O(O(
|
|
646
|
-
jaql:
|
|
645
|
+
return O(O(te(O({}, t), {
|
|
646
|
+
jaql: We(r)
|
|
647
647
|
}), i ? {
|
|
648
|
-
by:
|
|
648
|
+
by: We(i)
|
|
649
649
|
} : {}), a ? {
|
|
650
|
-
measure:
|
|
650
|
+
measure: We(a)
|
|
651
651
|
} : {});
|
|
652
|
-
},
|
|
653
|
-
function
|
|
652
|
+
}, Pe = 6;
|
|
653
|
+
function Ni(e) {
|
|
654
654
|
switch (e) {
|
|
655
655
|
case "line":
|
|
656
656
|
case "area":
|
|
@@ -700,7 +700,7 @@ function Ti(e) {
|
|
|
700
700
|
return {};
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
const
|
|
703
|
+
const ji = {
|
|
704
704
|
subtype: "indicator/numeric",
|
|
705
705
|
numericSubtype: "numericSimple",
|
|
706
706
|
skin: "vertical",
|
|
@@ -719,7 +719,7 @@ const Ni = {
|
|
|
719
719
|
shouldBeShown: !1
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
},
|
|
722
|
+
}, Oi = {
|
|
723
723
|
legend: {
|
|
724
724
|
enabled: !0,
|
|
725
725
|
position: "bottom"
|
|
@@ -785,7 +785,7 @@ const Ni = {
|
|
|
785
785
|
navigator: {
|
|
786
786
|
enabled: !0
|
|
787
787
|
}
|
|
788
|
-
},
|
|
788
|
+
}, Ei = {
|
|
789
789
|
subtype: "line/basic",
|
|
790
790
|
lineWidth: {
|
|
791
791
|
width: "bold"
|
|
@@ -795,7 +795,7 @@ const Ni = {
|
|
|
795
795
|
size: "small",
|
|
796
796
|
fill: "filled"
|
|
797
797
|
}
|
|
798
|
-
},
|
|
798
|
+
}, zi = {
|
|
799
799
|
subtype: "area/basic",
|
|
800
800
|
lineWidth: {
|
|
801
801
|
width: "bold"
|
|
@@ -805,11 +805,11 @@ const Ni = {
|
|
|
805
805
|
size: "small",
|
|
806
806
|
fill: "filled"
|
|
807
807
|
}
|
|
808
|
-
}, zi = {
|
|
809
|
-
subtype: "bar/classic"
|
|
810
808
|
}, Ri = {
|
|
811
|
-
subtype: "
|
|
809
|
+
subtype: "bar/classic"
|
|
812
810
|
}, Zi = {
|
|
811
|
+
subtype: "column/classic"
|
|
812
|
+
}, Wi = {
|
|
813
813
|
subtype: "polar/column",
|
|
814
814
|
yAxis: {
|
|
815
815
|
enabled: !0,
|
|
@@ -831,10 +831,10 @@ const Ni = {
|
|
|
831
831
|
categoriesCapacity: 200
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
|
-
function
|
|
835
|
-
return
|
|
834
|
+
function Ce(e) {
|
|
835
|
+
return ci({}, Oi, e);
|
|
836
836
|
}
|
|
837
|
-
const
|
|
837
|
+
const Pi = {
|
|
838
838
|
subtype: "pie/classic",
|
|
839
839
|
legend: {
|
|
840
840
|
enabled: !1,
|
|
@@ -857,7 +857,7 @@ const Wi = {
|
|
|
857
857
|
minimalIndependentSlicePercentage: 3,
|
|
858
858
|
selectedConvolutionType: "byPercentage"
|
|
859
859
|
}
|
|
860
|
-
},
|
|
860
|
+
}, Gi = {
|
|
861
861
|
legend: {
|
|
862
862
|
enabled: !1,
|
|
863
863
|
position: "left"
|
|
@@ -881,7 +881,7 @@ const Wi = {
|
|
|
881
881
|
headersColor: !1,
|
|
882
882
|
membersColor: !1,
|
|
883
883
|
totalsColor: !1
|
|
884
|
-
},
|
|
884
|
+
}, $i = {
|
|
885
885
|
labels: {
|
|
886
886
|
category: [{
|
|
887
887
|
enabled: !0
|
|
@@ -894,8 +894,8 @@ const Wi = {
|
|
|
894
894
|
tooltip: {
|
|
895
895
|
mode: "value"
|
|
896
896
|
}
|
|
897
|
-
},
|
|
898
|
-
subtype:
|
|
897
|
+
}, Hi = {
|
|
898
|
+
subtype: di.SUBTYPE,
|
|
899
899
|
viewType: "month",
|
|
900
900
|
startOfWeek: "sunday",
|
|
901
901
|
cellLabels: {
|
|
@@ -912,7 +912,7 @@ const Wi = {
|
|
|
912
912
|
cellColor: "#e6e6e6",
|
|
913
913
|
hideValues: !0
|
|
914
914
|
}
|
|
915
|
-
},
|
|
915
|
+
}, Bi = {
|
|
916
916
|
legend: {
|
|
917
917
|
enabled: !0,
|
|
918
918
|
position: "bottom"
|
|
@@ -1052,42 +1052,42 @@ const Wi = {
|
|
|
1052
1052
|
enabled: !0
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
|
-
function
|
|
1055
|
+
function Ji(e) {
|
|
1056
1056
|
switch (e) {
|
|
1057
1057
|
case "indicator":
|
|
1058
|
-
return
|
|
1058
|
+
return G(ji);
|
|
1059
1059
|
case "line":
|
|
1060
|
-
return
|
|
1060
|
+
return Ce(Ei);
|
|
1061
1061
|
case "area":
|
|
1062
|
-
return
|
|
1062
|
+
return Ce(zi);
|
|
1063
1063
|
case "bar":
|
|
1064
|
-
return
|
|
1064
|
+
return Ce(Ri);
|
|
1065
1065
|
case "column":
|
|
1066
|
-
return
|
|
1066
|
+
return Ce(Zi);
|
|
1067
1067
|
case "polar":
|
|
1068
|
-
return
|
|
1068
|
+
return Ce(Wi);
|
|
1069
1069
|
case "pie":
|
|
1070
|
-
return
|
|
1070
|
+
return G(Pi);
|
|
1071
1071
|
case "funnel":
|
|
1072
|
-
return
|
|
1072
|
+
return G(Gi);
|
|
1073
1073
|
case "treemap":
|
|
1074
|
-
return
|
|
1074
|
+
return G($i);
|
|
1075
1075
|
case "calendar-heatmap":
|
|
1076
|
-
return
|
|
1076
|
+
return G(Hi);
|
|
1077
1077
|
case "sunburst":
|
|
1078
|
-
return
|
|
1078
|
+
return G(Bi);
|
|
1079
1079
|
case "scatter":
|
|
1080
|
-
return
|
|
1080
|
+
return G(Yi);
|
|
1081
1081
|
case "scattermap":
|
|
1082
|
-
return
|
|
1082
|
+
return G(Qi);
|
|
1083
1083
|
case "areamap":
|
|
1084
|
-
return
|
|
1084
|
+
return G(Fi);
|
|
1085
1085
|
case "boxplot":
|
|
1086
|
-
return
|
|
1086
|
+
return G(Vi);
|
|
1087
1087
|
case "table":
|
|
1088
|
-
return
|
|
1088
|
+
return G(Ui);
|
|
1089
1089
|
case "pivot":
|
|
1090
|
-
return
|
|
1090
|
+
return G(qi);
|
|
1091
1091
|
case "pivot2":
|
|
1092
1092
|
return {};
|
|
1093
1093
|
case "image":
|
|
@@ -1096,20 +1096,20 @@ function $i(e) {
|
|
|
1096
1096
|
return {};
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1100
|
-
`,
|
|
1099
|
+
const Re = `
|
|
1100
|
+
`, lt = "UNKNOWN", Xi = (e, t) => {
|
|
1101
1101
|
let r = "";
|
|
1102
1102
|
return r += `measureFactory.customFormula(
|
|
1103
|
-
`, r += " ".repeat(t), r += ` '${
|
|
1103
|
+
`, r += " ".repeat(t), r += ` '${Me(e.title)}',
|
|
1104
1104
|
`, r += " ".repeat(t), r += ` '${e.formula}',
|
|
1105
1105
|
`, r += " ".repeat(t), r += ` {
|
|
1106
1106
|
`, Object.entries(e.context).forEach(([a, i]) => {
|
|
1107
|
-
const l =
|
|
1107
|
+
const l = dr(i.table || lt, i.column || lt, void 0, "DM");
|
|
1108
1108
|
r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${l},
|
|
1109
1109
|
`;
|
|
1110
1110
|
}), r += " ".repeat(t), r += ` }
|
|
1111
1111
|
`, r += " ".repeat(t), r += ")", r;
|
|
1112
|
-
},
|
|
1112
|
+
}, Ki = (e) => {
|
|
1113
1113
|
const {
|
|
1114
1114
|
level: t,
|
|
1115
1115
|
table: r,
|
|
@@ -1118,39 +1118,39 @@ const ze = `
|
|
|
1118
1118
|
title: l
|
|
1119
1119
|
} = e;
|
|
1120
1120
|
let s;
|
|
1121
|
-
return r && a && (s =
|
|
1122
|
-
},
|
|
1121
|
+
return r && a && (s = dr(r, a, t, "DM")), i && r && a && l && (s = `measureFactory.${cr.aggregationFromJAQL(i)}(${s}, '${Me(l)}')`), s || lt;
|
|
1122
|
+
}, eo = (e, t) => {
|
|
1123
1123
|
const r = e.jaql(!1).jaql;
|
|
1124
|
-
return "formula" in r ?
|
|
1125
|
-
},
|
|
1124
|
+
return "formula" in r ? Xi(r, t) : Ki(r);
|
|
1125
|
+
}, ae = (e, t = 0, r = !1) => {
|
|
1126
1126
|
if (!e)
|
|
1127
1127
|
return "";
|
|
1128
1128
|
if (typeof e == "string")
|
|
1129
|
-
return `'${
|
|
1130
|
-
if (e instanceof
|
|
1131
|
-
return
|
|
1132
|
-
if (e instanceof
|
|
1129
|
+
return `'${Me(e)}'`;
|
|
1130
|
+
if (e instanceof mr)
|
|
1131
|
+
return eo(e, t);
|
|
1132
|
+
if (e instanceof sr)
|
|
1133
1133
|
return e.composeCode || "";
|
|
1134
1134
|
let a = "";
|
|
1135
|
-
return Array.isArray(e) ? a += `[${e.map((i) =>
|
|
1136
|
-
if (r && typeof i == "string" && (i = `'${
|
|
1137
|
-
a += `${i}: [${l.map((s) =>
|
|
1135
|
+
return Array.isArray(e) ? a += `[${e.map((i) => ae(i, t + 2))}${e.length ? Re + " ".repeat(t + 2) : ""}]` : (a += `{${Re}`, Object.entries(e).forEach(([i, l]) => {
|
|
1136
|
+
if (r && typeof i == "string" && (i = `'${Me(i)}'`), a += " ".repeat(t + 2), Array.isArray(l))
|
|
1137
|
+
a += `${i}: [${l.map((s) => ae(s, t + 4, r))}${l.length ? Re + " ".repeat(t + 2) : ""}]`;
|
|
1138
1138
|
else if (typeof l == "object" && l !== null) {
|
|
1139
|
-
const s = Array.isArray(l) ? l :
|
|
1140
|
-
a += `${i}: ${
|
|
1139
|
+
const s = Array.isArray(l) ? l : Mi(l);
|
|
1140
|
+
a += `${i}: ${ae(s, t + 2, r)}`;
|
|
1141
1141
|
} else
|
|
1142
|
-
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${
|
|
1143
|
-
a += `,${
|
|
1142
|
+
["number", "boolean", "undefined"].includes(typeof l) || l === null ? a += `${i}: ${l}` : typeof l == "string" ? a += `${i}: '${Me(l)}'` : a += `${i}: ${l}`;
|
|
1143
|
+
a += `,${Re}`;
|
|
1144
1144
|
}), a += " ".repeat(t), a += "}"), a;
|
|
1145
1145
|
};
|
|
1146
|
-
function
|
|
1146
|
+
function _t(e, t) {
|
|
1147
1147
|
if (t === void 0 || t && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0)
|
|
1148
1148
|
return e;
|
|
1149
|
-
if (!
|
|
1149
|
+
if (!ht(e, t)) {
|
|
1150
1150
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1151
1151
|
const r = {};
|
|
1152
1152
|
for (const a of Object.keys(e)) {
|
|
1153
|
-
const i =
|
|
1153
|
+
const i = _t(e[a], t == null ? void 0 : t[a]), l = t && Object.prototype.hasOwnProperty.call(t, a), s = l ? t[a] : void 0;
|
|
1154
1154
|
(i !== void 0 || !l || e[a] === void 0 && s !== void 0) && (r[a] = i);
|
|
1155
1155
|
}
|
|
1156
1156
|
return Object.keys(r).length ? r : void 0;
|
|
@@ -1158,113 +1158,113 @@ function yt(e, t) {
|
|
|
1158
1158
|
return e;
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function Nt(e, t) {
|
|
1162
1162
|
if (!e || Object.keys(e).length === 0)
|
|
1163
1163
|
return {};
|
|
1164
|
-
const r =
|
|
1165
|
-
return
|
|
1164
|
+
const r = Ji(t);
|
|
1165
|
+
return ht(e, r) ? {} : _t(e, r) ?? {};
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const r =
|
|
1169
|
-
return
|
|
1167
|
+
function jt(e, t) {
|
|
1168
|
+
const r = Ni(t);
|
|
1169
|
+
return ht(e, r) ? e : _t(e, r) ?? {};
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1171
|
+
function to(e) {
|
|
1172
|
+
return ae(e, Pe);
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Ot(e, t = "data-source-placeholder") {
|
|
1175
1175
|
if (!e)
|
|
1176
1176
|
return t;
|
|
1177
1177
|
const r = typeof e == "object" && "title" in e ? e.title : e;
|
|
1178
|
-
return
|
|
1178
|
+
return _i(r);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Et(e, t = !0) {
|
|
1181
1181
|
const r = [];
|
|
1182
|
-
return t && r.push("measureFactory"),
|
|
1182
|
+
return t && r.push("measureFactory"), ee(e) && r.push("filterFactory"), r.length > 0 ? `import { ${r.join(", ")} } from '@sisense/sdk-data';` : "";
|
|
1183
1183
|
}
|
|
1184
|
-
const
|
|
1185
|
-
`,
|
|
1184
|
+
const zt = `
|
|
1185
|
+
`, ro = (e, t) => {
|
|
1186
1186
|
if (e.composeCode)
|
|
1187
|
-
return `${
|
|
1187
|
+
return `${zt}${" ".repeat(t)}${e.composeCode}`;
|
|
1188
1188
|
const r = e.jaql().jaql;
|
|
1189
|
-
return `${
|
|
1190
|
-
},
|
|
1189
|
+
return `${zt}${" ".repeat(t)}filterFactory.customFilter(${ae(r, t, !0)})`;
|
|
1190
|
+
}, ao = (e, t = 0) => {
|
|
1191
1191
|
if (!e)
|
|
1192
1192
|
return "";
|
|
1193
1193
|
let r = "";
|
|
1194
|
-
return r += `[${e.map((a) =>
|
|
1194
|
+
return r += `[${e.map((a) => ro(a, t + 2))}${e.length ? `
|
|
1195
1195
|
` + " ".repeat(t + 2) : ""}]`, r;
|
|
1196
|
-
},
|
|
1196
|
+
}, Rt = (e) => e ? Array.isArray(e) ? ao(e, 6) : "/** Filter relations not supported yet */" : "[]", io = ["executeQueryByWidgetIdTmpl", "widgetByIdTmpl"], oo = "chartWidgetTmpl", no = "pivotTableWidgetTmpl", lo = (e) => e, so = ({
|
|
1197
1197
|
dashboardOid: e,
|
|
1198
1198
|
widgetOid: t,
|
|
1199
1199
|
uiFramework: r = "react",
|
|
1200
1200
|
chartType: a = "table",
|
|
1201
1201
|
includeChart: i = !0
|
|
1202
1202
|
}) => {
|
|
1203
|
-
|
|
1203
|
+
kr(a);
|
|
1204
1204
|
const l = {
|
|
1205
1205
|
dashboardOid: e,
|
|
1206
1206
|
widgetOid: t
|
|
1207
|
-
}, s =
|
|
1208
|
-
return
|
|
1209
|
-
},
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
1212
|
-
const i =
|
|
1207
|
+
}, s = io[Number(i)];
|
|
1208
|
+
return nt(s, l, r);
|
|
1209
|
+
}, co = (e, t, r, a) => {
|
|
1210
|
+
if (or(e)) {
|
|
1211
|
+
kr(e.chartType);
|
|
1212
|
+
const i = Tt(e), l = {
|
|
1213
1213
|
idString: e.id,
|
|
1214
1214
|
widgetTypeString: "chart",
|
|
1215
1215
|
titleString: e.title,
|
|
1216
|
-
dataSourceString:
|
|
1217
|
-
chartTypeString:
|
|
1218
|
-
dataOptionsString:
|
|
1219
|
-
filtersString:
|
|
1216
|
+
dataSourceString: Ot(e.dataSource),
|
|
1217
|
+
chartTypeString: lo(e.chartType),
|
|
1218
|
+
dataOptionsString: to(a ? jt(e.dataOptions, e.chartType) : e.dataOptions),
|
|
1219
|
+
filtersString: Rt(e.filters),
|
|
1220
1220
|
componentString: "ChartWidget",
|
|
1221
|
-
extraImportsString:
|
|
1222
|
-
styleOptionsString:
|
|
1223
|
-
drilldownOptionsString:
|
|
1221
|
+
extraImportsString: Et(e.filters || [], i),
|
|
1222
|
+
styleOptionsString: ae(a ? Nt(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, Pe),
|
|
1223
|
+
drilldownOptionsString: ae(e.drilldownOptions || {}, Pe)
|
|
1224
1224
|
};
|
|
1225
|
-
return
|
|
1225
|
+
return nt(r.chart, l, t);
|
|
1226
1226
|
}
|
|
1227
|
-
if (
|
|
1228
|
-
const i =
|
|
1227
|
+
if (Ya(e)) {
|
|
1228
|
+
const i = Tt(e), l = {
|
|
1229
1229
|
idString: e.id,
|
|
1230
1230
|
widgetTypeString: "pivot",
|
|
1231
1231
|
titleString: e.title,
|
|
1232
|
-
dataSourceString:
|
|
1233
|
-
dataOptionsString:
|
|
1234
|
-
filtersString:
|
|
1232
|
+
dataSourceString: Ot(e.dataSource),
|
|
1233
|
+
dataOptionsString: ae(a ? jt(e.dataOptions, e.widgetType) : e.dataOptions),
|
|
1234
|
+
filtersString: Rt(e.filters),
|
|
1235
1235
|
componentString: "PivotTableWidget",
|
|
1236
|
-
extraImportsString:
|
|
1237
|
-
styleOptionsString:
|
|
1236
|
+
extraImportsString: Et(e.filters || [], i),
|
|
1237
|
+
styleOptionsString: ae(a ? Nt(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, Pe)
|
|
1238
1238
|
};
|
|
1239
|
-
return
|
|
1239
|
+
return nt(r.pivot, l, t);
|
|
1240
1240
|
}
|
|
1241
|
-
if (
|
|
1241
|
+
if (Ua(e))
|
|
1242
1242
|
return "/** Custom widget code not supported yet */";
|
|
1243
|
-
throw new
|
|
1244
|
-
},
|
|
1243
|
+
throw new Ie("errors.otherWidgetTypesNotSupported");
|
|
1244
|
+
}, po = ({
|
|
1245
1245
|
widgetProps: e,
|
|
1246
1246
|
uiFramework: t = "react",
|
|
1247
1247
|
removeDefaultProps: r = !1
|
|
1248
|
-
}) =>
|
|
1249
|
-
chart:
|
|
1250
|
-
pivot:
|
|
1248
|
+
}) => co(e, t, {
|
|
1249
|
+
chart: oo,
|
|
1250
|
+
pivot: no
|
|
1251
1251
|
}, r);
|
|
1252
|
-
function
|
|
1252
|
+
function uo(e) {
|
|
1253
1253
|
return !!(e && (e.top !== void 0 || e.bottom !== void 0));
|
|
1254
1254
|
}
|
|
1255
|
-
const
|
|
1255
|
+
const go = (e) => {
|
|
1256
1256
|
const t = e.find((r) => r.panel === "rows");
|
|
1257
1257
|
return t ? e.map((r) => {
|
|
1258
1258
|
const a = r.jaql.filter;
|
|
1259
|
-
if (!(r.panel === "scope" &&
|
|
1259
|
+
if (!(r.panel === "scope" && uo(a) && a.by === void 0))
|
|
1260
1260
|
return r;
|
|
1261
1261
|
const i = r.jaql, {
|
|
1262
1262
|
type: l,
|
|
1263
1263
|
context: s,
|
|
1264
1264
|
formula: p,
|
|
1265
1265
|
filter: d
|
|
1266
|
-
} = i, g =
|
|
1267
|
-
return
|
|
1266
|
+
} = i, g = wi(i, ["type", "context", "formula", "filter"]);
|
|
1267
|
+
return te(O({}, r), {
|
|
1268
1268
|
jaql: O({
|
|
1269
1269
|
// Copy dimension properties from rows dimension
|
|
1270
1270
|
dim: t.jaql.dim,
|
|
@@ -1272,7 +1272,7 @@ const uo = (e) => {
|
|
|
1272
1272
|
column: t.jaql.column,
|
|
1273
1273
|
datatype: t.jaql.datatype,
|
|
1274
1274
|
// Keep the filter but add the by clause
|
|
1275
|
-
filter:
|
|
1275
|
+
filter: te(O({}, d), {
|
|
1276
1276
|
by: {
|
|
1277
1277
|
type: l,
|
|
1278
1278
|
context: s,
|
|
@@ -1282,11 +1282,11 @@ const uo = (e) => {
|
|
|
1282
1282
|
}, g)
|
|
1283
1283
|
});
|
|
1284
1284
|
}) : e;
|
|
1285
|
-
},
|
|
1285
|
+
}, ho = (e) => ({
|
|
1286
1286
|
dataOptions: {
|
|
1287
|
-
columns: e.map(
|
|
1287
|
+
columns: e.map(br)
|
|
1288
1288
|
}
|
|
1289
|
-
}),
|
|
1289
|
+
}), mo = Object.freeze({
|
|
1290
1290
|
convolution: {
|
|
1291
1291
|
enabled: !0,
|
|
1292
1292
|
selectedConvolutionType: "bySlicesCount",
|
|
@@ -1307,17 +1307,17 @@ const uo = (e) => {
|
|
|
1307
1307
|
xAxis: {
|
|
1308
1308
|
gridLines: !1
|
|
1309
1309
|
}
|
|
1310
|
-
}),
|
|
1310
|
+
}), Zt = Object.freeze({
|
|
1311
1311
|
line: "line/spline",
|
|
1312
1312
|
pie: "pie/donut",
|
|
1313
1313
|
bar: "bar/stacked",
|
|
1314
1314
|
column: "column/stackedcolumn"
|
|
1315
|
-
}),
|
|
1315
|
+
}), bo = (e, t, r) => {
|
|
1316
1316
|
const a = e.reduce((l, s) => (l[s.jaql.title] = s, l), {}), i = Object.entries(r).reduce((l, s) => {
|
|
1317
1317
|
const [p, d] = s;
|
|
1318
1318
|
return l[`${p}`] = Array.isArray(d) ? d.map((g) => {
|
|
1319
1319
|
var f, x;
|
|
1320
|
-
const o =
|
|
1320
|
+
const o = ot(g);
|
|
1321
1321
|
delete o.enabled;
|
|
1322
1322
|
const u = a[o.column.name];
|
|
1323
1323
|
if (!u)
|
|
@@ -1327,20 +1327,20 @@ const uo = (e) => {
|
|
|
1327
1327
|
name: o.column.name
|
|
1328
1328
|
}
|
|
1329
1329
|
};
|
|
1330
|
-
const c =
|
|
1330
|
+
const c = br(u);
|
|
1331
1331
|
if (u.panel === "measures")
|
|
1332
|
-
return
|
|
1332
|
+
return te(O({}, o), {
|
|
1333
1333
|
column: c
|
|
1334
1334
|
});
|
|
1335
|
-
if (
|
|
1335
|
+
if (Xa(c.type)) {
|
|
1336
1336
|
const m = (x = (f = u.format) == null ? void 0 : f.mask) == null ? void 0 : x[u.jaql.level];
|
|
1337
1337
|
if (m)
|
|
1338
|
-
return
|
|
1338
|
+
return te(O({}, o), {
|
|
1339
1339
|
column: c,
|
|
1340
1340
|
dateFormat: m
|
|
1341
1341
|
});
|
|
1342
1342
|
}
|
|
1343
|
-
return
|
|
1343
|
+
return te(O({}, o), {
|
|
1344
1344
|
column: c
|
|
1345
1345
|
});
|
|
1346
1346
|
}) : d, l;
|
|
@@ -1366,20 +1366,20 @@ const uo = (e) => {
|
|
|
1366
1366
|
l !== "geo" && (i[`${l}`] = i[`${l}`][0]);
|
|
1367
1367
|
}), i;
|
|
1368
1368
|
case "table":
|
|
1369
|
-
return Object.keys(i).length === 0 ?
|
|
1369
|
+
return Object.keys(i).length === 0 ? ho(e).dataOptions : i;
|
|
1370
1370
|
case "boxplot":
|
|
1371
1371
|
case "areamap":
|
|
1372
1372
|
case "indicator":
|
|
1373
1373
|
default:
|
|
1374
1374
|
return i;
|
|
1375
1375
|
}
|
|
1376
|
-
},
|
|
1376
|
+
}, Wt = (e, t) => {
|
|
1377
1377
|
var r, a, i, l;
|
|
1378
|
-
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) =>
|
|
1379
|
-
},
|
|
1378
|
+
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => ot(s).column.name).join(", ") : (l = (i = e.value) != null ? i : e.y) == null ? void 0 : l.map((s) => ot(s).column.name).join(", ");
|
|
1379
|
+
}, fo = (e, t, r, a) => {
|
|
1380
1380
|
let i;
|
|
1381
|
-
return a && e in
|
|
1382
|
-
subtype:
|
|
1381
|
+
return a && e in Zt ? i = Ke(Ke(mo, {
|
|
1382
|
+
subtype: Zt[`${e}`]
|
|
1383
1383
|
}), {
|
|
1384
1384
|
legend: {
|
|
1385
1385
|
enabled: !0,
|
|
@@ -1388,42 +1388,42 @@ const uo = (e) => {
|
|
|
1388
1388
|
yAxis: {
|
|
1389
1389
|
title: {
|
|
1390
1390
|
enabled: !0,
|
|
1391
|
-
text:
|
|
1391
|
+
text: Wt(t, "y")
|
|
1392
1392
|
}
|
|
1393
1393
|
},
|
|
1394
1394
|
xAxis: {
|
|
1395
1395
|
title: {
|
|
1396
1396
|
enabled: !0,
|
|
1397
|
-
text:
|
|
1397
|
+
text: Wt(t, "x")
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
}, r) : i =
|
|
1401
|
-
},
|
|
1400
|
+
}, r) : i = Ke(Ka(), r), i;
|
|
1401
|
+
}, xo = (e, t, r = !0) => {
|
|
1402
1402
|
const {
|
|
1403
1403
|
chartFamily: a,
|
|
1404
1404
|
chartType: i,
|
|
1405
1405
|
axesMapping: l = {},
|
|
1406
1406
|
styleOptions: s = {}
|
|
1407
|
-
} = t, p =
|
|
1407
|
+
} = t, p = bo(e, a, l), d = fo(i, l, s, r);
|
|
1408
1408
|
return {
|
|
1409
1409
|
dataOptions: p,
|
|
1410
1410
|
chartStyleOptions: d
|
|
1411
1411
|
};
|
|
1412
|
-
},
|
|
1412
|
+
}, ko = (e) => "chartType" in e ? e : {
|
|
1413
1413
|
chartType: "table",
|
|
1414
1414
|
chartFamily: "table",
|
|
1415
1415
|
axesMapping: {}
|
|
1416
|
-
},
|
|
1417
|
-
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(
|
|
1418
|
-
const a =
|
|
1416
|
+
}, yo = (e) => e.map((t) => Qa(t.jaql)), wo = (e) => e.reduce((t, r) => {
|
|
1417
|
+
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(G(r)), r.panel !== "scope") {
|
|
1418
|
+
const a = G(r);
|
|
1419
1419
|
delete a.jaql.filter, t.metadataColumns.push(a);
|
|
1420
1420
|
}
|
|
1421
1421
|
return t;
|
|
1422
1422
|
}, {
|
|
1423
1423
|
metadataColumns: [],
|
|
1424
1424
|
metadataFilters: []
|
|
1425
|
-
}),
|
|
1426
|
-
if (!
|
|
1425
|
+
}), _o = (e, t) => {
|
|
1426
|
+
if (!Ci(e))
|
|
1427
1427
|
try {
|
|
1428
1428
|
const {
|
|
1429
1429
|
useCustomizedStyleOptions: r = !1
|
|
@@ -1434,13 +1434,13 @@ const uo = (e) => {
|
|
|
1434
1434
|
} = e, {
|
|
1435
1435
|
metadata: s,
|
|
1436
1436
|
datasource: p
|
|
1437
|
-
} = a, d =
|
|
1437
|
+
} = a, d = te(O({}, p), {
|
|
1438
1438
|
type: p.type || "elasticube"
|
|
1439
|
-
}), g =
|
|
1440
|
-
jaql:
|
|
1439
|
+
}), g = Wa(d), f = go(s).map((M) => Ti(M)).map((M) => te(O({}, M), {
|
|
1440
|
+
jaql: te(O({}, M.jaql), {
|
|
1441
1441
|
datasource: g
|
|
1442
1442
|
})
|
|
1443
|
-
})), x =
|
|
1443
|
+
})), x = ko(i), o = x.chartType.toLowerCase(), u = {
|
|
1444
1444
|
cornerRadius: "Small",
|
|
1445
1445
|
header: {
|
|
1446
1446
|
// remove info button and render empty toolbar instead
|
|
@@ -1449,10 +1449,10 @@ const uo = (e) => {
|
|
|
1449
1449
|
}, {
|
|
1450
1450
|
metadataColumns: c,
|
|
1451
1451
|
metadataFilters: m
|
|
1452
|
-
} =
|
|
1452
|
+
} = wo(f), h = yo(m), {
|
|
1453
1453
|
dataOptions: w,
|
|
1454
|
-
chartStyleOptions:
|
|
1455
|
-
} =
|
|
1454
|
+
chartStyleOptions: C
|
|
1455
|
+
} = xo(c, x, r), y = O(O({}, C), u);
|
|
1456
1456
|
return {
|
|
1457
1457
|
widgetType: "chart",
|
|
1458
1458
|
id: l,
|
|
@@ -1467,34 +1467,34 @@ const uo = (e) => {
|
|
|
1467
1467
|
console.error(r);
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
1470
|
-
},
|
|
1470
|
+
}, Ct = (e, t) => _o(e, t), Co = (e) => fi(e) ? so(e) : po(e), _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1471
1471
|
__proto__: null,
|
|
1472
|
-
toWidgetCode:
|
|
1473
|
-
toWidgetProps:
|
|
1472
|
+
toWidgetCode: Co,
|
|
1473
|
+
toWidgetProps: Ct
|
|
1474
1474
|
}, Symbol.toStringTag, {
|
|
1475
1475
|
value: "Module"
|
|
1476
1476
|
}));
|
|
1477
|
-
var
|
|
1477
|
+
var vo = Object.defineProperty, So = Object.defineProperties, Mo = Object.getOwnPropertyDescriptors, He = Object.getOwnPropertySymbols, Cr = Object.prototype.hasOwnProperty, vr = Object.prototype.propertyIsEnumerable, st = (e, t, r) => t in e ? vo(e, t, {
|
|
1478
1478
|
enumerable: !0,
|
|
1479
1479
|
configurable: !0,
|
|
1480
1480
|
writable: !0,
|
|
1481
1481
|
value: r
|
|
1482
1482
|
}) : e[t] = r, I = (e, t) => {
|
|
1483
1483
|
for (var r in t || (t = {}))
|
|
1484
|
-
|
|
1485
|
-
if (
|
|
1486
|
-
for (var r of
|
|
1487
|
-
|
|
1484
|
+
Cr.call(t, r) && st(e, r, t[r]);
|
|
1485
|
+
if (He)
|
|
1486
|
+
for (var r of He(t))
|
|
1487
|
+
vr.call(t, r) && st(e, r, t[r]);
|
|
1488
1488
|
return e;
|
|
1489
|
-
}, j = (e, t) =>
|
|
1489
|
+
}, j = (e, t) => So(e, Mo(t)), Io = (e, t) => {
|
|
1490
1490
|
var r = {};
|
|
1491
1491
|
for (var a in e)
|
|
1492
|
-
|
|
1493
|
-
if (e != null &&
|
|
1494
|
-
for (var a of
|
|
1495
|
-
t.indexOf(a) < 0 &&
|
|
1492
|
+
Cr.call(e, a) && t.indexOf(a) < 0 && (r[a] = e[a]);
|
|
1493
|
+
if (e != null && He)
|
|
1494
|
+
for (var a of He(e))
|
|
1495
|
+
t.indexOf(a) < 0 && vr.call(e, a) && (r[a] = e[a]);
|
|
1496
1496
|
return r;
|
|
1497
|
-
},
|
|
1497
|
+
}, H = (e, t, r) => st(e, typeof t != "symbol" ? t + "" : t, r), ue = (e, t, r) => new Promise((a, i) => {
|
|
1498
1498
|
var l = (d) => {
|
|
1499
1499
|
try {
|
|
1500
1500
|
p(r.next(d));
|
|
@@ -1510,7 +1510,7 @@ var Co = Object.defineProperty, vo = Object.defineProperties, So = Object.getOwn
|
|
|
1510
1510
|
}, p = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(l, s);
|
|
1511
1511
|
p((r = r.apply(e, t)).next());
|
|
1512
1512
|
});
|
|
1513
|
-
class
|
|
1513
|
+
class Do extends Fa {
|
|
1514
1514
|
constructor(t, r) {
|
|
1515
1515
|
super(), this.client = t, this.setOptions(r), this.bindMethods(), this.updateResult();
|
|
1516
1516
|
}
|
|
@@ -1520,7 +1520,7 @@ class Io extends Ba {
|
|
|
1520
1520
|
setOptions(t) {
|
|
1521
1521
|
var r;
|
|
1522
1522
|
const a = this.options;
|
|
1523
|
-
this.options = this.client.defaultMutationOptions(t),
|
|
1523
|
+
this.options = this.client.defaultMutationOptions(t), Va(a, this.options) || this.client.getMutationCache().notify({
|
|
1524
1524
|
type: "observerOptionsUpdated",
|
|
1525
1525
|
mutation: this.currentMutation,
|
|
1526
1526
|
observer: this
|
|
@@ -1553,7 +1553,7 @@ class Io extends Ba {
|
|
|
1553
1553
|
})), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
1554
1554
|
}
|
|
1555
1555
|
updateResult() {
|
|
1556
|
-
const t = this.currentMutation ? this.currentMutation.state :
|
|
1556
|
+
const t = this.currentMutation ? this.currentMutation.state : Ja(), r = t.status === "loading", a = j(I({}, t), {
|
|
1557
1557
|
isLoading: r,
|
|
1558
1558
|
isPending: r,
|
|
1559
1559
|
isSuccess: t.status === "success",
|
|
@@ -1565,7 +1565,7 @@ class Io extends Ba {
|
|
|
1565
1565
|
this.currentResult = a;
|
|
1566
1566
|
}
|
|
1567
1567
|
notify(t) {
|
|
1568
|
-
|
|
1568
|
+
lr.batch(() => {
|
|
1569
1569
|
if (this.mutateOptions && this.hasListeners()) {
|
|
1570
1570
|
if (t.onSuccess) {
|
|
1571
1571
|
var r, a, i, l;
|
|
@@ -1583,26 +1583,26 @@ class Io extends Ba {
|
|
|
1583
1583
|
});
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1587
|
-
const a =
|
|
1586
|
+
function vt(e, t, r) {
|
|
1587
|
+
const a = Pa(e, t), i = Le({
|
|
1588
1588
|
context: a.context
|
|
1589
|
-
}), [l] = Z(() => new
|
|
1590
|
-
|
|
1589
|
+
}), [l] = Z(() => new Do(i, a));
|
|
1590
|
+
Te(() => {
|
|
1591
1591
|
l.setOptions(a);
|
|
1592
1592
|
}, [l, a]);
|
|
1593
|
-
const s =
|
|
1594
|
-
l.mutate(d, g).catch(
|
|
1593
|
+
const s = Ga(N((d) => l.subscribe(lr.batchCalls(d)), [l]), () => l.getCurrentResult(), () => l.getCurrentResult()), p = N((d, g) => {
|
|
1594
|
+
l.mutate(d, g).catch(Ao);
|
|
1595
1595
|
}, [l]);
|
|
1596
|
-
if (s.error &&
|
|
1596
|
+
if (s.error && qa(l.options.useErrorBoundary, [s.error]))
|
|
1597
1597
|
throw s.error;
|
|
1598
1598
|
return j(I({}, s), {
|
|
1599
1599
|
mutate: p,
|
|
1600
1600
|
mutateAsync: s.mutate
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function Ao() {
|
|
1604
1604
|
}
|
|
1605
|
-
const
|
|
1605
|
+
const Sr = Ye({}), Lo = () => gt(Sr), To = ({
|
|
1606
1606
|
children: e
|
|
1607
1607
|
}) => {
|
|
1608
1608
|
const [t, r] = Z({}), a = N((s, p) => {
|
|
@@ -1613,7 +1613,7 @@ const vr = /* @__PURE__ */ Ye({}), Ao = () => pt(vr), Lo = ({
|
|
|
1613
1613
|
[a(p, d)]: s
|
|
1614
1614
|
}));
|
|
1615
1615
|
}, [a]), l = N((s, p) => t[a(s, p)], [t, a]);
|
|
1616
|
-
return /* @__PURE__ */ n(
|
|
1616
|
+
return /* @__PURE__ */ n(Sr.Provider, {
|
|
1617
1617
|
value: {
|
|
1618
1618
|
saveChatId: i,
|
|
1619
1619
|
getChatId: l
|
|
@@ -1621,19 +1621,19 @@ const vr = /* @__PURE__ */ Ye({}), Ao = () => pt(vr), Lo = ({
|
|
|
1621
1621
|
children: e
|
|
1622
1622
|
});
|
|
1623
1623
|
};
|
|
1624
|
-
class
|
|
1624
|
+
class Pt {
|
|
1625
1625
|
constructor(t, r = !1) {
|
|
1626
|
-
this
|
|
1626
|
+
H(this, "httpClient"), H(this, "getChatContexts", () => ue(this, null, function* () {
|
|
1627
1627
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
|
1628
|
-
}), this
|
|
1628
|
+
})), H(this, "getNlgInsights", (a) => this.httpClient.post("api/v2/ai/nlg/queryResult", a)), H(this, "getQueryRecommendations", (a, i) => this.httpClient.get(`api/v2/ai/recommendations/query/${a}/${i.numOfRecommendations}${i.userPrompt ? "?userPrompt=" + encodeURIComponent(i.userPrompt) : ""}`)), H(this, "getNlqResult", (a, i) => this.httpClient.post(`api/v2/ai/nlq/query/${a}`, i)), H(this, "setLlmConfig", (a) => this.httpClient.post("api/v2/settings/ai/llmProvider", a).catch((i) => {
|
|
1629
1629
|
console.error("Unable to set llm config", i);
|
|
1630
|
-
}), this
|
|
1630
|
+
})), H(this, "getAllChats", () => ue(this, null, function* () {
|
|
1631
1631
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
|
1632
|
-
}), this
|
|
1632
|
+
})), H(this, "getChatById", (a) => this.httpClient.get(`api/v2/ai/chats/${a}`)), H(this, "createChat", (a, i) => this.httpClient.post("api/v2/ai/chats", {
|
|
1633
1633
|
sourceId: a,
|
|
1634
1634
|
volatile: this.volatile,
|
|
1635
1635
|
contextDetails: i
|
|
1636
|
-
}), this
|
|
1636
|
+
})), H(this, "postChat", (a, i) => this.httpClient.post(`api/v2/ai/chats/${a}`, i)), H(this, "deleteChatHistory", (a) => this.httpClient.delete(`api/v2/ai/chats/${a}/history`)), H(this, "sendFeedback", (a) => this.httpClient.post("api/v2/ai/feedback", a)), H(this, "ai", {
|
|
1637
1637
|
getNlgInsights: this.getNlgInsights,
|
|
1638
1638
|
getNlqResult: this.getNlqResult,
|
|
1639
1639
|
getQueryRecommendations: this.getQueryRecommendations,
|
|
@@ -1646,10 +1646,10 @@ class Wt {
|
|
|
1646
1646
|
post: this.postChat,
|
|
1647
1647
|
clearHistory: this.deleteChatHistory
|
|
1648
1648
|
}
|
|
1649
|
-
}, this.httpClient = t;
|
|
1649
|
+
}), this.volatile = r, this.httpClient = t;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
new
|
|
1652
|
+
new Kt({
|
|
1653
1653
|
defaultOptions: {
|
|
1654
1654
|
queries: {
|
|
1655
1655
|
refetchOnWindowFocus: !1,
|
|
@@ -1657,19 +1657,19 @@ new Xt({
|
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
1659
|
});
|
|
1660
|
-
const
|
|
1661
|
-
function
|
|
1660
|
+
const Mr = Ye(void 0), ie = () => gt(Mr);
|
|
1661
|
+
function Ir(e) {
|
|
1662
1662
|
var t, r;
|
|
1663
1663
|
if ("jaql" in e)
|
|
1664
1664
|
return e;
|
|
1665
1665
|
{
|
|
1666
|
-
const a =
|
|
1666
|
+
const a = va(e.dataSource), {
|
|
1667
1667
|
filters: i = [],
|
|
1668
1668
|
relations: l
|
|
1669
|
-
} =
|
|
1669
|
+
} = Sa(e.filters), {
|
|
1670
1670
|
metadata: s,
|
|
1671
1671
|
filterRelations: p
|
|
1672
|
-
} =
|
|
1672
|
+
} = Ma({
|
|
1673
1673
|
dataSource: e.dataSource,
|
|
1674
1674
|
attributes: (t = e.dimensions) != null ? t : [],
|
|
1675
1675
|
measures: (r = e.measures) != null ? r : [],
|
|
@@ -1686,15 +1686,15 @@ function Mr(e) {
|
|
|
1686
1686
|
return e.verbosity && (d.verbosity = e.verbosity), d;
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
|
-
const
|
|
1690
|
-
const r = Q(() =>
|
|
1689
|
+
const Dr = (e, t = !0) => {
|
|
1690
|
+
const r = Q(() => Ir(e), [e]), a = ie(), {
|
|
1691
1691
|
data: i,
|
|
1692
1692
|
error: l,
|
|
1693
1693
|
isError: s,
|
|
1694
1694
|
isLoading: p,
|
|
1695
1695
|
isSuccess: d,
|
|
1696
1696
|
refetch: g
|
|
1697
|
-
} =
|
|
1697
|
+
} = Ae({
|
|
1698
1698
|
queryKey: ["getNlgInsights", r, a],
|
|
1699
1699
|
queryFn: () => a == null ? void 0 : a.ai.getNlgInsights(r),
|
|
1700
1700
|
select: (f) => {
|
|
@@ -1713,8 +1713,8 @@ const Ir = (e, t = !0) => {
|
|
|
1713
1713
|
g();
|
|
1714
1714
|
}, [g])
|
|
1715
1715
|
};
|
|
1716
|
-
},
|
|
1717
|
-
function
|
|
1716
|
+
}, No = ["indicator", "column", "line", "table", "pie", "bar"];
|
|
1717
|
+
function jo(e) {
|
|
1718
1718
|
const {
|
|
1719
1719
|
dataSource: t,
|
|
1720
1720
|
query: r,
|
|
@@ -1726,25 +1726,25 @@ function No(e) {
|
|
|
1726
1726
|
text: r,
|
|
1727
1727
|
// Timezone is not used by AI API, but it is currently required by the endpoint
|
|
1728
1728
|
timezone: "UTC",
|
|
1729
|
-
chartTypes: a ?? [...
|
|
1729
|
+
chartTypes: a ?? [...No]
|
|
1730
1730
|
}
|
|
1731
1731
|
};
|
|
1732
1732
|
}
|
|
1733
|
-
const
|
|
1733
|
+
const ct = 4, Oo = (e) => {
|
|
1734
1734
|
const {
|
|
1735
1735
|
contextTitle: t,
|
|
1736
1736
|
count: r,
|
|
1737
1737
|
enableAxisTitlesInWidgetProps: a,
|
|
1738
1738
|
enabled: i,
|
|
1739
1739
|
customPrompt: l
|
|
1740
|
-
} = e, s =
|
|
1740
|
+
} = e, s = ie(), p = r ?? ct, d = (i === void 0 || i === !0) && p > 0, {
|
|
1741
1741
|
isLoading: g,
|
|
1742
1742
|
isError: f,
|
|
1743
1743
|
isSuccess: x,
|
|
1744
1744
|
data: o,
|
|
1745
1745
|
error: u,
|
|
1746
1746
|
refetch: c
|
|
1747
|
-
} =
|
|
1747
|
+
} = Ae({
|
|
1748
1748
|
queryKey: ["getQueryRecommendations", t, p, s],
|
|
1749
1749
|
queryFn: () => s == null ? void 0 : s.ai.getQueryRecommendations(t, I({
|
|
1750
1750
|
numOfRecommendations: p
|
|
@@ -1753,7 +1753,7 @@ const lt = 4, jo = (e) => {
|
|
|
1753
1753
|
} : null)),
|
|
1754
1754
|
enabled: !!s && d
|
|
1755
1755
|
}), m = Q(() => o == null ? void 0 : o.map((h) => j(I({}, h), {
|
|
1756
|
-
widgetProps: h.jaql ?
|
|
1756
|
+
widgetProps: h.jaql ? Ct(h, {
|
|
1757
1757
|
useCustomizedStyleOptions: a
|
|
1758
1758
|
}) : void 0
|
|
1759
1759
|
})), [o, a]);
|
|
@@ -1767,34 +1767,34 @@ const lt = 4, jo = (e) => {
|
|
|
1767
1767
|
c();
|
|
1768
1768
|
}, [c])
|
|
1769
1769
|
};
|
|
1770
|
-
},
|
|
1770
|
+
}, Ar = Object.freeze({
|
|
1771
1771
|
enableFollowupQuestions: !1,
|
|
1772
1772
|
enableHeader: !0,
|
|
1773
1773
|
enableInsights: !0,
|
|
1774
1774
|
numOfRecommendations: 4,
|
|
1775
1775
|
numOfRecentPrompts: 5
|
|
1776
|
-
}),
|
|
1776
|
+
}), Lr = Ye(I({}, Ar)), oe = () => gt(Lr), Eo = ({
|
|
1777
1777
|
children: e,
|
|
1778
1778
|
value: t
|
|
1779
1779
|
}) => {
|
|
1780
1780
|
const {
|
|
1781
1781
|
t: r
|
|
1782
|
-
} = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), j(I({},
|
|
1782
|
+
} = E(), a = Object.entries(t).reduce((i, [l, s]) => (s !== void 0 && (i[l] = s), i), j(I({}, Ar), {
|
|
1783
1783
|
inputPromptText: r("ai.config.inputPromptText"),
|
|
1784
1784
|
welcomeText: r("ai.config.welcomeText"),
|
|
1785
1785
|
suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
|
|
1786
1786
|
}));
|
|
1787
|
-
return /* @__PURE__ */ n(
|
|
1787
|
+
return /* @__PURE__ */ n(Lr.Provider, {
|
|
1788
1788
|
value: a,
|
|
1789
1789
|
children: e
|
|
1790
1790
|
});
|
|
1791
|
-
},
|
|
1792
|
-
const t =
|
|
1791
|
+
}, St = "chatHistory", zo = (e) => {
|
|
1792
|
+
const t = ie(), {
|
|
1793
1793
|
hideHistory: r
|
|
1794
|
-
} =
|
|
1795
|
-
return
|
|
1796
|
-
queryKey: [
|
|
1797
|
-
queryFn: () =>
|
|
1794
|
+
} = oe();
|
|
1795
|
+
return Ae({
|
|
1796
|
+
queryKey: [St, e, t],
|
|
1797
|
+
queryFn: () => ue(void 0, null, function* () {
|
|
1798
1798
|
if (!t || !e)
|
|
1799
1799
|
return;
|
|
1800
1800
|
if (r)
|
|
@@ -1804,10 +1804,10 @@ const lt = 4, jo = (e) => {
|
|
|
1804
1804
|
}),
|
|
1805
1805
|
enabled: !!t && !!e
|
|
1806
1806
|
});
|
|
1807
|
-
},
|
|
1808
|
-
const t =
|
|
1809
|
-
return
|
|
1810
|
-
mutationFn: () =>
|
|
1807
|
+
}, Tr = (e) => {
|
|
1808
|
+
const t = ie(), r = Le();
|
|
1809
|
+
return vt({
|
|
1810
|
+
mutationFn: () => ue(void 0, null, function* () {
|
|
1811
1811
|
if (!(!t || !e))
|
|
1812
1812
|
return t.ai.chat.clearHistory(e);
|
|
1813
1813
|
}),
|
|
@@ -1815,32 +1815,32 @@ const lt = 4, jo = (e) => {
|
|
|
1815
1815
|
console.error("Error when clearing history:", a);
|
|
1816
1816
|
},
|
|
1817
1817
|
onSettled: () => {
|
|
1818
|
-
e && r.setQueriesData([
|
|
1818
|
+
e && r.setQueriesData([St, e], []);
|
|
1819
1819
|
}
|
|
1820
1820
|
});
|
|
1821
|
-
},
|
|
1821
|
+
}, Ro = (e) => {
|
|
1822
1822
|
const {
|
|
1823
1823
|
data: t,
|
|
1824
1824
|
isLoading: r,
|
|
1825
1825
|
isError: a
|
|
1826
|
-
} =
|
|
1826
|
+
} = zo(e), {
|
|
1827
1827
|
mutate: i
|
|
1828
|
-
} =
|
|
1829
|
-
return
|
|
1828
|
+
} = Tr(e);
|
|
1829
|
+
return Te(() => {
|
|
1830
1830
|
a && i();
|
|
1831
1831
|
}, [a, i]), {
|
|
1832
1832
|
history: t,
|
|
1833
1833
|
isLoading: r,
|
|
1834
1834
|
isError: a
|
|
1835
1835
|
};
|
|
1836
|
-
},
|
|
1837
|
-
const e =
|
|
1836
|
+
}, Zo = () => {
|
|
1837
|
+
const e = ie(), {
|
|
1838
1838
|
data: t,
|
|
1839
1839
|
isLoading: r,
|
|
1840
1840
|
fetchStatus: a
|
|
1841
|
-
} =
|
|
1841
|
+
} = Ae({
|
|
1842
1842
|
queryKey: ["getDataTopics", e],
|
|
1843
|
-
queryFn: () =>
|
|
1843
|
+
queryFn: () => ue(void 0, null, function* () {
|
|
1844
1844
|
if (e)
|
|
1845
1845
|
return e.getChatContexts();
|
|
1846
1846
|
}),
|
|
@@ -1851,11 +1851,11 @@ const lt = 4, jo = (e) => {
|
|
|
1851
1851
|
isLoading: r,
|
|
1852
1852
|
fetchStatus: a
|
|
1853
1853
|
};
|
|
1854
|
-
},
|
|
1855
|
-
const e =
|
|
1854
|
+
}, Wo = () => {
|
|
1855
|
+
const e = ie(), {
|
|
1856
1856
|
data: t,
|
|
1857
1857
|
isLoading: r
|
|
1858
|
-
} =
|
|
1858
|
+
} = Ae({
|
|
1859
1859
|
queryKey: ["getAllChats", e],
|
|
1860
1860
|
queryFn: () => e == null ? void 0 : e.ai.chat.getAll(),
|
|
1861
1861
|
enabled: !!e
|
|
@@ -1864,18 +1864,18 @@ const lt = 4, jo = (e) => {
|
|
|
1864
1864
|
data: t ?? [],
|
|
1865
1865
|
isLoading: r
|
|
1866
1866
|
};
|
|
1867
|
-
},
|
|
1868
|
-
const a =
|
|
1869
|
-
mutationFn: () =>
|
|
1867
|
+
}, Po = (e, t, r) => {
|
|
1868
|
+
const a = Le(), i = ie(), l = vt({
|
|
1869
|
+
mutationFn: () => ue(void 0, null, function* () {
|
|
1870
1870
|
if (!(!i || !e))
|
|
1871
1871
|
return i.ai.chat.create(e, r);
|
|
1872
1872
|
}),
|
|
1873
1873
|
onSuccess: () => a.invalidateQueries(["getAllChats"])
|
|
1874
1874
|
});
|
|
1875
|
-
return
|
|
1875
|
+
return Te(() => {
|
|
1876
1876
|
t && l.isIdle && l.mutate();
|
|
1877
1877
|
}, [t, l]), l;
|
|
1878
|
-
},
|
|
1878
|
+
}, Go = (e, t) => {
|
|
1879
1879
|
switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
|
|
1880
1880
|
case "nlq":
|
|
1881
1881
|
return {
|
|
@@ -1893,15 +1893,15 @@ const lt = 4, jo = (e) => {
|
|
|
1893
1893
|
throw Error(`${t}${JSON.stringify(e)}`);
|
|
1894
1894
|
}
|
|
1895
1895
|
}, qo = (e, t) => {
|
|
1896
|
-
const r =
|
|
1897
|
-
e && r.setQueriesData([
|
|
1896
|
+
const r = Le(), a = N((d) => {
|
|
1897
|
+
e && r.setQueriesData([St, e], (g) => g && [...g, d]);
|
|
1898
1898
|
}, [r, e]), {
|
|
1899
1899
|
t: i
|
|
1900
|
-
} = E(), l =
|
|
1900
|
+
} = E(), l = ie(), {
|
|
1901
1901
|
mutate: s,
|
|
1902
1902
|
isLoading: p
|
|
1903
|
-
} =
|
|
1904
|
-
mutationFn: (d) =>
|
|
1903
|
+
} = vt({
|
|
1904
|
+
mutationFn: (d) => ue(void 0, null, function* () {
|
|
1905
1905
|
if (!(!l || !e))
|
|
1906
1906
|
return l.ai.chat.post(e, {
|
|
1907
1907
|
text: d,
|
|
@@ -1928,60 +1928,60 @@ const lt = 4, jo = (e) => {
|
|
|
1928
1928
|
if (!d)
|
|
1929
1929
|
return;
|
|
1930
1930
|
const g = i("ai.errors.unknownResponse");
|
|
1931
|
-
a(
|
|
1931
|
+
a(Go(d, g));
|
|
1932
1932
|
}
|
|
1933
1933
|
});
|
|
1934
1934
|
return {
|
|
1935
1935
|
mutate: s,
|
|
1936
1936
|
isLoading: p
|
|
1937
1937
|
};
|
|
1938
|
-
},
|
|
1938
|
+
}, $o = (e, t, r = !1) => {
|
|
1939
1939
|
var a;
|
|
1940
1940
|
const {
|
|
1941
1941
|
data: i,
|
|
1942
1942
|
isLoading: l
|
|
1943
|
-
} =
|
|
1943
|
+
} = Wo(), s = Lo(), p = s.getChatId(e, t) || ((a = i.find((x) => {
|
|
1944
1944
|
var o;
|
|
1945
1945
|
return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
|
1946
1946
|
})) == null ? void 0 : a.chatId), {
|
|
1947
1947
|
isError: d,
|
|
1948
1948
|
data: g,
|
|
1949
1949
|
isSuccess: f
|
|
1950
|
-
} =
|
|
1951
|
-
return
|
|
1950
|
+
} = Po(e, r && !l && !p, t);
|
|
1951
|
+
return Te(() => {
|
|
1952
1952
|
f && g && !p && s.saveChatId(g.chatId, e, t);
|
|
1953
1953
|
}, [g, f, e, t, p, s]), {
|
|
1954
1954
|
chatId: p,
|
|
1955
1955
|
isLoading: l,
|
|
1956
1956
|
isError: d
|
|
1957
1957
|
};
|
|
1958
|
-
},
|
|
1958
|
+
}, Ho = (e) => Q(() => {
|
|
1959
1959
|
if (e != null && e.length) {
|
|
1960
1960
|
const t = e[e.length - 1];
|
|
1961
|
-
if (
|
|
1961
|
+
if (Nr(t))
|
|
1962
1962
|
return JSON.parse(t.content);
|
|
1963
1963
|
}
|
|
1964
1964
|
return null;
|
|
1965
|
-
}, [e]),
|
|
1965
|
+
}, [e]), Nr = (e) => !!e && "type" in e && e.type === "nlq", Bo = (e) => !!e && "type" in e && e.type === "text", Yo = (e, t) => {
|
|
1966
1966
|
const {
|
|
1967
1967
|
t: r
|
|
1968
1968
|
} = E(), {
|
|
1969
1969
|
enableFollowupQuestions: a
|
|
1970
|
-
} =
|
|
1970
|
+
} = oe(), {
|
|
1971
1971
|
chatId: i,
|
|
1972
1972
|
isError: l
|
|
1973
|
-
} =
|
|
1973
|
+
} = $o(e, t, !0), [s, p] = Z(null), {
|
|
1974
1974
|
history: d,
|
|
1975
1975
|
isLoading: g,
|
|
1976
1976
|
isError: f
|
|
1977
|
-
} =
|
|
1978
|
-
|
|
1979
|
-
l ? p(new
|
|
1977
|
+
} = Ro(i);
|
|
1978
|
+
Te(() => {
|
|
1979
|
+
l ? p(new Ie("ai.errors.chatUnavailable")) : f && p(new Ie("ai.errors.fetchHistory"));
|
|
1980
1980
|
}, [l, f, r]);
|
|
1981
1981
|
const {
|
|
1982
1982
|
mutate: x,
|
|
1983
1983
|
isLoading: o
|
|
1984
|
-
} = qo(i, a), u =
|
|
1984
|
+
} = qo(i, a), u = Ho(d);
|
|
1985
1985
|
return {
|
|
1986
1986
|
chatId: i,
|
|
1987
1987
|
history: d ?? [],
|
|
@@ -1991,29 +1991,43 @@ const lt = 4, jo = (e) => {
|
|
|
1991
1991
|
isLoading: g,
|
|
1992
1992
|
lastError: s
|
|
1993
1993
|
};
|
|
1994
|
-
}, Uo = 500, Qo = 500, Fo = 500, Vo = 900,
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1994
|
+
}, Uo = 500, Qo = 500, Fo = 500, Vo = 900, Jo = _.div`
|
|
1995
|
+
box-sizing: border-box;
|
|
1996
|
+
position: relative;
|
|
1997
|
+
display: flex;
|
|
1998
|
+
flex-direction: column;
|
|
1999
|
+
border: 1px solid #c6c9ce;
|
|
2000
|
+
border-radius: ${({
|
|
1998
2001
|
theme: e
|
|
1999
|
-
}) => e.aiChat.borderRadius
|
|
2002
|
+
}) => e.aiChat.borderRadius};
|
|
2003
|
+
background-color: ${({
|
|
2000
2004
|
theme: e
|
|
2001
|
-
}) => e.aiChat.backgroundColor
|
|
2005
|
+
}) => e.aiChat.backgroundColor};
|
|
2006
|
+
overflow: hidden;
|
|
2007
|
+
|
|
2008
|
+
min-width: ${Uo}px;
|
|
2009
|
+
min-height: ${Qo}px;
|
|
2010
|
+
width: ${({
|
|
2002
2011
|
width: e
|
|
2003
|
-
}) => e ?
|
|
2012
|
+
}) => e ? Gt(e) : `${Fo}px`};
|
|
2013
|
+
height: ${({
|
|
2004
2014
|
height: e
|
|
2005
|
-
}) => e ?
|
|
2015
|
+
}) => e ? Gt(e) : `${Vo}px`};
|
|
2016
|
+
|
|
2017
|
+
${({
|
|
2006
2018
|
theme: e
|
|
2007
2019
|
}) => P`
|
|
2008
2020
|
font-size: ${e.aiChat.primaryFontSize[0]};
|
|
2009
2021
|
line-height: ${e.aiChat.primaryFontSize[1]};
|
|
2010
|
-
|
|
2022
|
+
`}
|
|
2023
|
+
border: ${({
|
|
2011
2024
|
theme: e
|
|
2012
|
-
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border
|
|
2013
|
-
|
|
2025
|
+
}) => e.aiChat.border === !1 ? "none" : e.aiChat.border};
|
|
2026
|
+
`;
|
|
2027
|
+
function Gt(e) {
|
|
2014
2028
|
return typeof e == "number" ? `${e}px` : e;
|
|
2015
2029
|
}
|
|
2016
|
-
function
|
|
2030
|
+
function Xo({
|
|
2017
2031
|
spin: e
|
|
2018
2032
|
}) {
|
|
2019
2033
|
return /* @__PURE__ */ v("svg", {
|
|
@@ -2041,24 +2055,34 @@ function Qe() {
|
|
|
2041
2055
|
return /* @__PURE__ */ n("div", {
|
|
2042
2056
|
className: "csdk-m-auto",
|
|
2043
2057
|
"aria-label": "loading spinner",
|
|
2044
|
-
children: /* @__PURE__ */ n(
|
|
2058
|
+
children: /* @__PURE__ */ n(Xo, {
|
|
2045
2059
|
spin: !0
|
|
2046
2060
|
})
|
|
2047
2061
|
});
|
|
2048
2062
|
}
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2063
|
+
const Ko = _.div`
|
|
2064
|
+
text-align: center;
|
|
2065
|
+
font-size: 11px;
|
|
2066
|
+
line-height: 18px;
|
|
2067
|
+
white-space: pre-wrap;
|
|
2068
|
+
|
|
2069
|
+
display: flex;
|
|
2070
|
+
flex-wrap: wrap;
|
|
2071
|
+
align-items: center;
|
|
2072
|
+
justify-content: center;
|
|
2073
|
+
box-sizing: border-box;
|
|
2074
|
+
|
|
2075
|
+
color: ${({
|
|
2053
2076
|
theme: e
|
|
2054
|
-
}) => e.aiChat.secondaryTextColor
|
|
2055
|
-
|
|
2077
|
+
}) => e.aiChat.secondaryTextColor};
|
|
2078
|
+
`;
|
|
2079
|
+
function en({
|
|
2056
2080
|
theme: e
|
|
2057
2081
|
}) {
|
|
2058
2082
|
const {
|
|
2059
2083
|
t
|
|
2060
2084
|
} = E();
|
|
2061
|
-
return /* @__PURE__ */ v(
|
|
2085
|
+
return /* @__PURE__ */ v(Ko, {
|
|
2062
2086
|
theme: e,
|
|
2063
2087
|
children: [/* @__PURE__ */ n("div", {
|
|
2064
2088
|
children: t("ai.disclaimer.poweredByAi")
|
|
@@ -2067,29 +2091,43 @@ function Ko({
|
|
|
2067
2091
|
})]
|
|
2068
2092
|
});
|
|
2069
2093
|
}
|
|
2070
|
-
const
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2094
|
+
const tn = _.div`
|
|
2095
|
+
display: flex;
|
|
2096
|
+
flex-direction: column;
|
|
2097
|
+
row-gap: 4px;
|
|
2098
|
+
`, rn = _.div`
|
|
2099
|
+
font-size: 11px;
|
|
2100
|
+
line-height: 18px;
|
|
2101
|
+
font-weight: 300;
|
|
2102
|
+
color: ${({
|
|
2077
2103
|
theme: e
|
|
2078
|
-
}) => e.aiChat.dropup.headers.textColor
|
|
2104
|
+
}) => e.aiChat.dropup.headers.textColor};
|
|
2105
|
+
cursor: pointer;
|
|
2106
|
+
padding: 4px 12px;
|
|
2107
|
+
&:hover {
|
|
2108
|
+
background-color: ${({
|
|
2079
2109
|
theme: e
|
|
2080
|
-
}) => e.aiChat.dropup.headers.hover.backgroundColor
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2110
|
+
}) => e.aiChat.dropup.headers.hover.backgroundColor};
|
|
2111
|
+
}
|
|
2112
|
+
`, an = _.div`
|
|
2113
|
+
font-size: ${({
|
|
2084
2114
|
theme: e
|
|
2085
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2115
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2116
|
+
line-height: ${({
|
|
2086
2117
|
theme: e
|
|
2087
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2118
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2119
|
+
color: ${({
|
|
2088
2120
|
theme: e
|
|
2089
|
-
}) => e.aiChat.dropup.items.textColor
|
|
2121
|
+
}) => e.aiChat.dropup.items.textColor};
|
|
2122
|
+
cursor: pointer;
|
|
2123
|
+
padding: 4px 12px;
|
|
2124
|
+
&:hover {
|
|
2125
|
+
background-color: ${({
|
|
2090
2126
|
theme: e
|
|
2091
|
-
}) => e.aiChat.dropup.items.hover.backgroundColor
|
|
2092
|
-
|
|
2127
|
+
}) => e.aiChat.dropup.items.hover.backgroundColor};
|
|
2128
|
+
}
|
|
2129
|
+
`;
|
|
2130
|
+
function on({
|
|
2093
2131
|
title: e,
|
|
2094
2132
|
items: t,
|
|
2095
2133
|
onSelect: r,
|
|
@@ -2098,44 +2136,55 @@ function an({
|
|
|
2098
2136
|
const [i, l] = Z(!1), {
|
|
2099
2137
|
themeSettings: s
|
|
2100
2138
|
} = L();
|
|
2101
|
-
return /* @__PURE__ */ v(
|
|
2102
|
-
children: [/* @__PURE__ */ n(
|
|
2139
|
+
return /* @__PURE__ */ v(tn, {
|
|
2140
|
+
children: [/* @__PURE__ */ n(rn, {
|
|
2103
2141
|
onClick: () => l((p) => !p),
|
|
2104
2142
|
theme: s,
|
|
2105
2143
|
children: e.toUpperCase()
|
|
2106
|
-
}), (i || a) && t.map((p, d) => /* @__PURE__ */ n(
|
|
2144
|
+
}), (i || a) && t.map((p, d) => /* @__PURE__ */ n(an, {
|
|
2107
2145
|
onClick: () => r(p),
|
|
2108
2146
|
theme: s,
|
|
2109
2147
|
children: p
|
|
2110
2148
|
}, d))]
|
|
2111
2149
|
});
|
|
2112
2150
|
}
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
label: "PopupContent"
|
|
2116
|
-
})("font-family:", ({
|
|
2151
|
+
const nn = _.div`
|
|
2152
|
+
font-family: ${({
|
|
2117
2153
|
theme: e
|
|
2118
|
-
}) => e.typography.fontFamily
|
|
2154
|
+
}) => e.typography.fontFamily};
|
|
2155
|
+
font-size: ${({
|
|
2119
2156
|
theme: e
|
|
2120
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2157
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2158
|
+
line-height: ${({
|
|
2121
2159
|
theme: e
|
|
2122
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2160
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2161
|
+
background-color: ${({
|
|
2123
2162
|
theme: e
|
|
2124
|
-
}) => e.aiChat.dropup.backgroundColor
|
|
2163
|
+
}) => e.aiChat.dropup.backgroundColor};
|
|
2164
|
+
border-radius: ${({
|
|
2125
2165
|
theme: e
|
|
2126
|
-
}) => e.aiChat.dropup.borderRadius
|
|
2166
|
+
}) => e.aiChat.dropup.borderRadius};
|
|
2167
|
+
box-shadow: ${({
|
|
2127
2168
|
theme: e
|
|
2128
|
-
}) => e.aiChat.dropup.boxShadow
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2169
|
+
}) => e.aiChat.dropup.boxShadow};
|
|
2170
|
+
padding-top: 8px;
|
|
2171
|
+
padding-bottom: 8px;
|
|
2172
|
+
display: flex;
|
|
2173
|
+
flex-direction: column;
|
|
2174
|
+
row-gap: 4px;
|
|
2175
|
+
`, ln = _.div`
|
|
2176
|
+
font-size: ${({
|
|
2132
2177
|
theme: e
|
|
2133
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
2178
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
2179
|
+
line-height: ${({
|
|
2134
2180
|
theme: e
|
|
2135
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
2181
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
2182
|
+
color: ${({
|
|
2136
2183
|
theme: e
|
|
2137
|
-
}) => e.aiChat.dropup.items.textColor
|
|
2138
|
-
|
|
2184
|
+
}) => e.aiChat.dropup.items.textColor};
|
|
2185
|
+
padding: 4px 12px;
|
|
2186
|
+
`, dt = (e) => e.startsWith("/");
|
|
2187
|
+
function sn({
|
|
2139
2188
|
recentPrompts: e,
|
|
2140
2189
|
suggestions: t,
|
|
2141
2190
|
isLoading: r,
|
|
@@ -2157,8 +2206,8 @@ function ln({
|
|
|
2157
2206
|
} = L(), {
|
|
2158
2207
|
t: g
|
|
2159
2208
|
} = E(), f = p.length === 1;
|
|
2160
|
-
return /* @__PURE__ */ n(
|
|
2161
|
-
open:
|
|
2209
|
+
return /* @__PURE__ */ n(nr, {
|
|
2210
|
+
open: dt(l) && p.length > 0,
|
|
2162
2211
|
anchorEl: i,
|
|
2163
2212
|
placement: "top-start",
|
|
2164
2213
|
modifiers: [{
|
|
@@ -2170,22 +2219,22 @@ function ln({
|
|
|
2170
2219
|
sx: {
|
|
2171
2220
|
zIndex: 3
|
|
2172
2221
|
},
|
|
2173
|
-
children: /* @__PURE__ */ v(
|
|
2222
|
+
children: /* @__PURE__ */ v(nn, {
|
|
2174
2223
|
style: {
|
|
2175
2224
|
width: i == null ? void 0 : i.offsetWidth
|
|
2176
2225
|
},
|
|
2177
2226
|
theme: d,
|
|
2178
|
-
children: [r && /* @__PURE__ */ n(Qe, {}), !r && !s && p.map((x) => /* @__PURE__ */ n(
|
|
2227
|
+
children: [r && /* @__PURE__ */ n(Qe, {}), !r && !s && p.map((x) => /* @__PURE__ */ n(on, j(I({}, x), {
|
|
2179
2228
|
alwaysExpanded: f
|
|
2180
|
-
}), x.title)), s && /* @__PURE__ */ n(
|
|
2229
|
+
}), x.title)), s && /* @__PURE__ */ n(ln, {
|
|
2181
2230
|
theme: d,
|
|
2182
2231
|
children: g("ai.errors.recommendationsNotAvailable")
|
|
2183
2232
|
})]
|
|
2184
2233
|
})
|
|
2185
2234
|
});
|
|
2186
2235
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2236
|
+
const cn = 500;
|
|
2237
|
+
function Ne({
|
|
2189
2238
|
title: e,
|
|
2190
2239
|
placement: t = "top",
|
|
2191
2240
|
children: r
|
|
@@ -2193,7 +2242,7 @@ function Te({
|
|
|
2193
2242
|
const {
|
|
2194
2243
|
themeSettings: a
|
|
2195
2244
|
} = L();
|
|
2196
|
-
return /* @__PURE__ */ n(
|
|
2245
|
+
return /* @__PURE__ */ n($a, {
|
|
2197
2246
|
title: e,
|
|
2198
2247
|
placement: t,
|
|
2199
2248
|
disableInteractive: !0,
|
|
@@ -2221,7 +2270,7 @@ function Te({
|
|
|
2221
2270
|
children: r
|
|
2222
2271
|
});
|
|
2223
2272
|
}
|
|
2224
|
-
function
|
|
2273
|
+
function dn({
|
|
2225
2274
|
theme: e
|
|
2226
2275
|
}) {
|
|
2227
2276
|
const t = e.aiChat.icons.color;
|
|
@@ -2243,7 +2292,7 @@ function cn({
|
|
|
2243
2292
|
})]
|
|
2244
2293
|
});
|
|
2245
2294
|
}
|
|
2246
|
-
function
|
|
2295
|
+
function pn({
|
|
2247
2296
|
theme: e
|
|
2248
2297
|
}) {
|
|
2249
2298
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -2258,29 +2307,64 @@ function dn({
|
|
|
2258
2307
|
})
|
|
2259
2308
|
});
|
|
2260
2309
|
}
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2310
|
+
const un = _.div`
|
|
2311
|
+
display: flex;
|
|
2312
|
+
flex-direction: row;
|
|
2313
|
+
align-items: flex-end;
|
|
2314
|
+
justify-content: space-between;
|
|
2315
|
+
|
|
2316
|
+
background-color: ${({
|
|
2265
2317
|
theme: e
|
|
2266
|
-
}) => e.aiChat.backgroundColor
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2318
|
+
}) => e.aiChat.backgroundColor};
|
|
2319
|
+
`, gn = _.button`
|
|
2320
|
+
height: 34px;
|
|
2321
|
+
background-color: inherit;
|
|
2322
|
+
cursor: pointer;
|
|
2323
|
+
border: none;
|
|
2324
|
+
`, hn = _.textarea`
|
|
2325
|
+
font-size: inherit;
|
|
2326
|
+
line-height: inherit;
|
|
2327
|
+
resize: none;
|
|
2328
|
+
overflow-y: auto;
|
|
2329
|
+
box-sizing: border-box;
|
|
2330
|
+
// size style
|
|
2331
|
+
max-height: 88px;
|
|
2332
|
+
width: 100%;
|
|
2333
|
+
// spacing style
|
|
2334
|
+
padding-top: 7px;
|
|
2335
|
+
padding-bottom: 7px;
|
|
2336
|
+
padding-left: 16px;
|
|
2337
|
+
padding-right: 16px;
|
|
2338
|
+
margin-left: 10px;
|
|
2339
|
+
margin-right: 10px;
|
|
2340
|
+
// border style
|
|
2341
|
+
border-width: 1px;
|
|
2342
|
+
border-color: rgb(38 46 61 / 0.15);
|
|
2343
|
+
border-radius: 0.5rem;
|
|
2344
|
+
&:focus {
|
|
2345
|
+
outline: 1px solid ${({
|
|
2273
2346
|
theme: e
|
|
2274
|
-
}) => e.aiChat.input.focus.outlineColor
|
|
2347
|
+
}) => e.aiChat.input.focus.outlineColor};
|
|
2348
|
+
}
|
|
2349
|
+
font-family: inherit;
|
|
2350
|
+
|
|
2351
|
+
color: ${({
|
|
2275
2352
|
theme: e
|
|
2276
|
-
}) => e.aiChat.primaryTextColor
|
|
2353
|
+
}) => e.aiChat.primaryTextColor};
|
|
2354
|
+
|
|
2355
|
+
background-color: ${({
|
|
2277
2356
|
theme: e
|
|
2278
|
-
}) => e.aiChat.input.backgroundColor
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2357
|
+
}) => e.aiChat.input.backgroundColor};
|
|
2358
|
+
`, mn = _.button`
|
|
2359
|
+
height: 34px;
|
|
2360
|
+
background-color: inherit;
|
|
2361
|
+
border-style: none;
|
|
2362
|
+
|
|
2363
|
+
color: ${({
|
|
2282
2364
|
theme: e
|
|
2283
|
-
}) => e.aiChat.primaryTextColor
|
|
2365
|
+
}) => e.aiChat.primaryTextColor};
|
|
2366
|
+
|
|
2367
|
+
${({
|
|
2284
2368
|
disabled: e
|
|
2285
2369
|
}) => e ? P`
|
|
2286
2370
|
opacity: 0.3;
|
|
@@ -2288,8 +2372,9 @@ const pn = /* @__PURE__ */ C("div", {
|
|
|
2288
2372
|
` : P`
|
|
2289
2373
|
opacity: 1;
|
|
2290
2374
|
cursor: pointer;
|
|
2291
|
-
`
|
|
2292
|
-
|
|
2375
|
+
`}
|
|
2376
|
+
`, bn = 34;
|
|
2377
|
+
function fn({
|
|
2293
2378
|
onSendMessage: e,
|
|
2294
2379
|
onClearHistoryClick: t,
|
|
2295
2380
|
disabled: r,
|
|
@@ -2301,10 +2386,10 @@ function bn({
|
|
|
2301
2386
|
}) {
|
|
2302
2387
|
const [d, g] = Z(""), {
|
|
2303
2388
|
inputPromptText: f
|
|
2304
|
-
} =
|
|
2389
|
+
} = oe(), x = N(() => {
|
|
2305
2390
|
if (r)
|
|
2306
2391
|
return;
|
|
2307
|
-
if (
|
|
2392
|
+
if (dt(d)) {
|
|
2308
2393
|
g("");
|
|
2309
2394
|
return;
|
|
2310
2395
|
}
|
|
@@ -2313,12 +2398,16 @@ function bn({
|
|
|
2313
2398
|
}, [r, e, d]), o = N((y) => {
|
|
2314
2399
|
e(y), g("");
|
|
2315
2400
|
}, [e]), u = N((y) => {
|
|
2316
|
-
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" &&
|
|
2401
|
+
y.key === "Enter" ? (y.preventDefault(), x()) : y.key === "Escape" && dt(d) && g("");
|
|
2317
2402
|
}, [x, d]), c = N((y) => {
|
|
2318
2403
|
p == null || p(y.target.value), g(y.target.value);
|
|
2319
|
-
}, [p]), m =
|
|
2404
|
+
}, [p]), m = pe(null);
|
|
2320
2405
|
qe(() => {
|
|
2321
|
-
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
|
|
2406
|
+
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
|
|
2407
|
+
m.current.scrollHeight + 2,
|
|
2408
|
+
// account for 1px top/bottom border
|
|
2409
|
+
bn
|
|
2410
|
+
)}px`);
|
|
2322
2411
|
}, [d]), qe(() => {
|
|
2323
2412
|
m.current && m.current.focus({
|
|
2324
2413
|
preventScroll: !0
|
|
@@ -2328,7 +2417,7 @@ function bn({
|
|
|
2328
2417
|
themeSettings: h
|
|
2329
2418
|
} = L(), {
|
|
2330
2419
|
t: w
|
|
2331
|
-
} = E(),
|
|
2420
|
+
} = E(), C = N((y) => {
|
|
2332
2421
|
var M;
|
|
2333
2422
|
if ((M = document.getElementById("csdk-chatbot-frame")) != null && M.contains(y.relatedTarget)) {
|
|
2334
2423
|
const D = (S) => {
|
|
@@ -2340,9 +2429,9 @@ function bn({
|
|
|
2340
2429
|
document.addEventListener("mouseup", D), document.addEventListener("keyup", D);
|
|
2341
2430
|
}
|
|
2342
2431
|
}, []);
|
|
2343
|
-
return /* @__PURE__ */ v(
|
|
2432
|
+
return /* @__PURE__ */ v(un, {
|
|
2344
2433
|
theme: h,
|
|
2345
|
-
children: [/* @__PURE__ */ n(
|
|
2434
|
+
children: [/* @__PURE__ */ n(sn, {
|
|
2346
2435
|
recentPrompts: a,
|
|
2347
2436
|
suggestions: i,
|
|
2348
2437
|
isLoading: l,
|
|
@@ -2350,20 +2439,20 @@ function bn({
|
|
|
2350
2439
|
anchorEl: m.current,
|
|
2351
2440
|
text: d,
|
|
2352
2441
|
recommendationsError: s
|
|
2353
|
-
}), t && /* @__PURE__ */ n(
|
|
2442
|
+
}), t && /* @__PURE__ */ n(Ne, {
|
|
2354
2443
|
title: w("ai.buttons.clearChat"),
|
|
2355
2444
|
placement: "bottom-start",
|
|
2356
|
-
children: /* @__PURE__ */ n(
|
|
2445
|
+
children: /* @__PURE__ */ n(gn, {
|
|
2357
2446
|
"aria-label": "clear history",
|
|
2358
2447
|
onClick: t,
|
|
2359
|
-
children: /* @__PURE__ */ n(
|
|
2448
|
+
children: /* @__PURE__ */ n(dn, {
|
|
2360
2449
|
theme: h
|
|
2361
2450
|
})
|
|
2362
2451
|
})
|
|
2363
|
-
}), /* @__PURE__ */ n(
|
|
2452
|
+
}), /* @__PURE__ */ n(hn, {
|
|
2364
2453
|
"aria-label": "chat input",
|
|
2365
|
-
onBlur:
|
|
2366
|
-
maxLength:
|
|
2454
|
+
onBlur: C,
|
|
2455
|
+
maxLength: cn,
|
|
2367
2456
|
ref: m,
|
|
2368
2457
|
rows: 1,
|
|
2369
2458
|
onChange: c,
|
|
@@ -2372,69 +2461,83 @@ function bn({
|
|
|
2372
2461
|
value: d,
|
|
2373
2462
|
onKeyDown: u,
|
|
2374
2463
|
theme: h
|
|
2375
|
-
}), /* @__PURE__ */ n(
|
|
2464
|
+
}), /* @__PURE__ */ n(mn, {
|
|
2376
2465
|
"aria-label": "send chat message",
|
|
2377
2466
|
disabled: r || d.length === 0,
|
|
2378
2467
|
onClick: x,
|
|
2379
2468
|
theme: h,
|
|
2380
2469
|
children: /* @__PURE__ */ n("span", {
|
|
2381
2470
|
"data-state": "closed",
|
|
2382
|
-
children: /* @__PURE__ */ n(
|
|
2471
|
+
children: /* @__PURE__ */ n(pn, {
|
|
2383
2472
|
theme: h
|
|
2384
2473
|
})
|
|
2385
2474
|
})
|
|
2386
2475
|
})]
|
|
2387
2476
|
});
|
|
2388
2477
|
}
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2478
|
+
const xn = _.div`
|
|
2479
|
+
margin: auto;
|
|
2480
|
+
display: flex;
|
|
2481
|
+
flex-direction: column;
|
|
2482
|
+
align-items: center;
|
|
2483
|
+
row-gap: 21px;
|
|
2484
|
+
`, kn = _.div`
|
|
2485
|
+
color: ${({
|
|
2396
2486
|
theme: e
|
|
2397
|
-
}) => e.aiChat.primaryTextColor
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2487
|
+
}) => e.aiChat.primaryTextColor};
|
|
2488
|
+
text-align: center;
|
|
2489
|
+
font-weight: 600;
|
|
2490
|
+
`, yn = _.div`
|
|
2491
|
+
color: rgba(54, 163, 217, 1);
|
|
2492
|
+
cursor: pointer;
|
|
2493
|
+
`;
|
|
2494
|
+
function jr({
|
|
2402
2495
|
text: e,
|
|
2403
2496
|
action: t
|
|
2404
2497
|
}) {
|
|
2405
2498
|
const {
|
|
2406
2499
|
themeSettings: r
|
|
2407
2500
|
} = L();
|
|
2408
|
-
return /* @__PURE__ */ v(
|
|
2409
|
-
children: [/* @__PURE__ */ n(
|
|
2501
|
+
return /* @__PURE__ */ v(xn, {
|
|
2502
|
+
children: [/* @__PURE__ */ n(kn, {
|
|
2410
2503
|
theme: r,
|
|
2411
2504
|
children: e
|
|
2412
|
-
}), /* @__PURE__ */ n(
|
|
2505
|
+
}), /* @__PURE__ */ n(Aa, {}), t && /* @__PURE__ */ n(yn, {
|
|
2413
2506
|
onClick: t.onClick,
|
|
2414
2507
|
children: t.text
|
|
2415
2508
|
})]
|
|
2416
2509
|
});
|
|
2417
2510
|
}
|
|
2418
|
-
const
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2511
|
+
const wn = _.div`
|
|
2512
|
+
flex: 0 0 80px;
|
|
2513
|
+
padding-left: 14px;
|
|
2514
|
+
padding-right: 14px;
|
|
2515
|
+
display: flex;
|
|
2516
|
+
align-items: center;
|
|
2517
|
+
position: relative;
|
|
2518
|
+
|
|
2519
|
+
background-color: ${({
|
|
2422
2520
|
style: e
|
|
2423
|
-
}) => e.backgroundColor
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2521
|
+
}) => e.backgroundColor};
|
|
2522
|
+
`, _n = _.div`
|
|
2523
|
+
font-size: 18px;
|
|
2524
|
+
line-height: 22px;
|
|
2525
|
+
font-weight: 600;
|
|
2526
|
+
margin-left: 20px;
|
|
2527
|
+
|
|
2528
|
+
color: ${({
|
|
2427
2529
|
style: e
|
|
2428
|
-
}) => e.textColor
|
|
2530
|
+
}) => e.textColor};
|
|
2531
|
+
`, Or = er(function({
|
|
2429
2532
|
title: e,
|
|
2430
2533
|
leftNav: t,
|
|
2431
2534
|
rightNav: r,
|
|
2432
2535
|
style: a
|
|
2433
2536
|
}, i) {
|
|
2434
|
-
return /* @__PURE__ */ v(
|
|
2537
|
+
return /* @__PURE__ */ v(wn, {
|
|
2435
2538
|
ref: i,
|
|
2436
2539
|
style: a,
|
|
2437
|
-
children: [t, /* @__PURE__ */ n(
|
|
2540
|
+
children: [t, /* @__PURE__ */ n(_n, {
|
|
2438
2541
|
style: a,
|
|
2439
2542
|
children: e
|
|
2440
2543
|
}), r && /* @__PURE__ */ n("div", {
|
|
@@ -2442,39 +2545,64 @@ const yn = /* @__PURE__ */ C("div", {
|
|
|
2442
2545
|
children: r
|
|
2443
2546
|
})]
|
|
2444
2547
|
});
|
|
2445
|
-
}),
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2548
|
+
}), Ze = _.div`
|
|
2549
|
+
width: 5px;
|
|
2550
|
+
height: 5px;
|
|
2551
|
+
border-radius: 50%;
|
|
2552
|
+
background-color: ${(e) => e.color};
|
|
2553
|
+
animation: hop 0.9s ease-out infinite;
|
|
2554
|
+
|
|
2555
|
+
&:nth-of-type(2) {
|
|
2556
|
+
animation-delay: 0.1s;
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
&:nth-of-type(3) {
|
|
2560
|
+
animation-delay: 0.2s;
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
&:nth-of-type(4) {
|
|
2564
|
+
animation-delay: 0.3s;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
@keyframes hop {
|
|
2568
|
+
0%,
|
|
2569
|
+
40% {
|
|
2570
|
+
transform: translateY(0);
|
|
2571
|
+
}
|
|
2572
|
+
20% {
|
|
2573
|
+
transform: translateY(-100%);
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
`;
|
|
2577
|
+
function Er() {
|
|
2450
2578
|
const {
|
|
2451
2579
|
themeSettings: e
|
|
2452
2580
|
} = L(), t = e.aiChat.icons.color;
|
|
2453
2581
|
return /* @__PURE__ */ v("div", {
|
|
2454
2582
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
|
2455
2583
|
"aria-label": "loading dots",
|
|
2456
|
-
children: [/* @__PURE__ */ n(
|
|
2584
|
+
children: [/* @__PURE__ */ n(Ze, {
|
|
2457
2585
|
color: t
|
|
2458
|
-
}), /* @__PURE__ */ n(
|
|
2586
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2459
2587
|
color: t
|
|
2460
|
-
}), /* @__PURE__ */ n(
|
|
2588
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2461
2589
|
color: t
|
|
2462
|
-
}), /* @__PURE__ */ n(
|
|
2590
|
+
}), /* @__PURE__ */ n(Ze, {
|
|
2463
2591
|
color: t
|
|
2464
2592
|
})]
|
|
2465
2593
|
});
|
|
2466
2594
|
}
|
|
2467
|
-
function
|
|
2468
|
-
return
|
|
2595
|
+
function de() {
|
|
2596
|
+
return de = Object.assign ? Object.assign.bind() : function(e) {
|
|
2469
2597
|
for (var t = 1; t < arguments.length; t++) {
|
|
2470
2598
|
var r = arguments[t];
|
|
2471
2599
|
for (var a in r)
|
|
2472
2600
|
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
|
2473
2601
|
}
|
|
2474
2602
|
return e;
|
|
2475
|
-
},
|
|
2603
|
+
}, de.apply(this, arguments);
|
|
2476
2604
|
}
|
|
2477
|
-
const
|
|
2605
|
+
const Cn = ["children", "options"], k = {
|
|
2478
2606
|
blockQuote: "0",
|
|
2479
2607
|
breakLine: "1",
|
|
2480
2608
|
breakThematic: "2",
|
|
@@ -2514,57 +2642,57 @@ var qt;
|
|
|
2514
2642
|
(function(e) {
|
|
2515
2643
|
e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
|
|
2516
2644
|
})(qt || (qt = {}));
|
|
2517
|
-
const
|
|
2645
|
+
const $t = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), {
|
|
2518
2646
|
class: "className",
|
|
2519
2647
|
for: "htmlFor"
|
|
2520
|
-
}),
|
|
2648
|
+
}), Ht = {
|
|
2521
2649
|
amp: "&",
|
|
2522
2650
|
apos: "'",
|
|
2523
2651
|
gt: ">",
|
|
2524
2652
|
lt: "<",
|
|
2525
2653
|
nbsp: " ",
|
|
2526
2654
|
quot: "“"
|
|
2527
|
-
},
|
|
2528
|
-
function
|
|
2529
|
-
return "( *)(" + (e === 1 ?
|
|
2655
|
+
}, vn = ["style", "script"], Sn = ["src", "href", "data", "formAction", "srcDoc", "action"], Mn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, In = /mailto:/i, Dn = /\n{2,}$/, zr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, An = /^ *> ?/gm, Ln = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Tn = /^ {2,}\n/, Nn = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Rr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Zr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, jn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, On = /^(?:\n *)*\n/, En = /\r\n?/g, zn = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Rn = /^\[\^([^\]]+)]/, Zn = /\f/g, Wn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Pn = /^\s*?\[(x|\s)\]/, Wr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Gr = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, pt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Gn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, qr = /^<!--[\s\S]*?(?:-->)/, qn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ut = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, $n = /^\{.*\}$/, Hn = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Bn = /^<([^ >]+@[^ >]+)>/, Yn = /^<([^ >]+:\/[^ >]+)>/, Un = /-([a-z])?/gi, $r = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Qn = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Fn = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Vn = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Jn = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Xn = /\t/g, Kn = /(^ *\||\| *$)/g, el = /^ *:-+: *$/, tl = /^ *:-+ *$/, rl = /^ *-+: *$/, Fe = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", al = new RegExp(`^([*_])\\1${Fe}\\1\\1(?!\\1)`), il = new RegExp(`^([*_])${Fe}\\1(?!\\1)`), ol = new RegExp(`^(==)${Fe}\\1`), nl = new RegExp(`^(~~)${Fe}\\1`), ll = /^\\([^0-9A-Za-z\s])/, Bt = /\\([^0-9A-Za-z\s])/g, sl = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, cl = /^\n+/, dl = /^([ \t]*)/, pl = /\\([^\\])/g, ul = /(?:^|\n)( *)$/, Mt = "(?:\\d+\\.)", It = "(?:[*+-])";
|
|
2656
|
+
function Hr(e) {
|
|
2657
|
+
return "( *)(" + (e === 1 ? Mt : It) + ") +";
|
|
2530
2658
|
}
|
|
2531
|
-
const
|
|
2659
|
+
const Br = Hr(1), Yr = Hr(2);
|
|
2532
2660
|
function Ur(e) {
|
|
2533
|
-
return new RegExp("^" + (e === 1 ?
|
|
2661
|
+
return new RegExp("^" + (e === 1 ? Br : Yr));
|
|
2534
2662
|
}
|
|
2535
|
-
const
|
|
2663
|
+
const gl = Ur(1), hl = Ur(2);
|
|
2536
2664
|
function Qr(e) {
|
|
2537
|
-
return new RegExp("^" + (e === 1 ?
|
|
2665
|
+
return new RegExp("^" + (e === 1 ? Br : Yr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Mt : It) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
2538
2666
|
}
|
|
2539
|
-
const
|
|
2667
|
+
const ml = Qr(1), bl = Qr(2);
|
|
2540
2668
|
function Fr(e) {
|
|
2541
|
-
const t = e === 1 ?
|
|
2669
|
+
const t = e === 1 ? Mt : It;
|
|
2542
2670
|
return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
2543
2671
|
}
|
|
2544
|
-
const Vr = Fr(1),
|
|
2672
|
+
const Vr = Fr(1), Jr = Fr(2);
|
|
2545
2673
|
function Yt(e, t) {
|
|
2546
|
-
const r = t === 1, a = r ? Vr :
|
|
2674
|
+
const r = t === 1, a = r ? Vr : Jr, i = r ? ml : bl, l = r ? gl : hl;
|
|
2547
2675
|
return {
|
|
2548
|
-
match:
|
|
2549
|
-
const d =
|
|
2676
|
+
match: ke(function(s, p) {
|
|
2677
|
+
const d = ul.exec(p.prevCapture);
|
|
2550
2678
|
return d && (p.list || !p.inline && !p.simple) ? a.exec(s = d[1] + s) : null;
|
|
2551
2679
|
}),
|
|
2552
2680
|
order: 1,
|
|
2553
2681
|
parse(s, p, d) {
|
|
2554
|
-
const g = r ? +s[2] : void 0, f = s[0].replace(
|
|
2682
|
+
const g = r ? +s[2] : void 0, f = s[0].replace(Dn, `
|
|
2555
2683
|
`).match(i);
|
|
2556
2684
|
let x = !1;
|
|
2557
2685
|
return {
|
|
2558
2686
|
items: f.map(function(o, u) {
|
|
2559
|
-
const c = l.exec(o)[0].length, m = new RegExp("^ {1," + c + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = u === f.length - 1,
|
|
2687
|
+
const c = l.exec(o)[0].length, m = new RegExp("^ {1," + c + "}", "gm"), h = o.replace(m, "").replace(l, ""), w = u === f.length - 1, C = h.indexOf(`
|
|
2560
2688
|
|
|
2561
2689
|
`) !== -1 || w && x;
|
|
2562
|
-
x =
|
|
2690
|
+
x = C;
|
|
2563
2691
|
const y = d.inline, M = d.list;
|
|
2564
2692
|
let D;
|
|
2565
|
-
d.list = !0,
|
|
2693
|
+
d.list = !0, C ? (d.inline = !1, D = De(h) + `
|
|
2566
2694
|
|
|
2567
|
-
`) : (d.inline = !0, D =
|
|
2695
|
+
`) : (d.inline = !0, D = De(h));
|
|
2568
2696
|
const S = p(D, d);
|
|
2569
2697
|
return d.inline = y, d.list = M, S;
|
|
2570
2698
|
}),
|
|
@@ -2582,18 +2710,18 @@ function Yt(e, t) {
|
|
|
2582
2710
|
}))
|
|
2583
2711
|
};
|
|
2584
2712
|
}
|
|
2585
|
-
const
|
|
2586
|
-
function
|
|
2713
|
+
const fl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), xl = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Xr = [zr, Rr, Zr, Wr, Gr, Pr, $r, Vr, Jr], kl = [...Xr, /^[^\n]+(?: \n|\n{2,})/, pt, qr, ut];
|
|
2714
|
+
function De(e) {
|
|
2587
2715
|
let t = e.length;
|
|
2588
2716
|
for (; t > 0 && e[t - 1] <= " "; )
|
|
2589
2717
|
t--;
|
|
2590
2718
|
return e.slice(0, t);
|
|
2591
2719
|
}
|
|
2592
|
-
function
|
|
2720
|
+
function ve(e) {
|
|
2593
2721
|
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();
|
|
2594
2722
|
}
|
|
2595
|
-
function
|
|
2596
|
-
return
|
|
2723
|
+
function yl(e) {
|
|
2724
|
+
return rl.test(e) ? "right" : el.test(e) ? "center" : tl.test(e) ? "left" : null;
|
|
2597
2725
|
}
|
|
2598
2726
|
function Ut(e, t, r, a) {
|
|
2599
2727
|
const i = r.inTable;
|
|
@@ -2609,9 +2737,9 @@ function Ut(e, t, r, a) {
|
|
|
2609
2737
|
d.trim() === "|" && (p(), a) ? g !== 0 && g !== f.length - 1 && l.push([]) : s += d;
|
|
2610
2738
|
}), p(), r.inTable = i, l;
|
|
2611
2739
|
}
|
|
2612
|
-
function
|
|
2740
|
+
function wl(e, t, r) {
|
|
2613
2741
|
r.inline = !0;
|
|
2614
|
-
const a = e[2] ? e[2].replace(
|
|
2742
|
+
const a = e[2] ? e[2].replace(Kn, "").split("|").map(yl) : [], i = e[3] ? function(s, p, d) {
|
|
2615
2743
|
return s.trim().split(`
|
|
2616
2744
|
`).map(function(g) {
|
|
2617
2745
|
return Ut(g, p, d, !0);
|
|
@@ -2632,44 +2760,44 @@ function Qt(e, t) {
|
|
|
2632
2760
|
textAlign: e.align[t]
|
|
2633
2761
|
};
|
|
2634
2762
|
}
|
|
2635
|
-
function
|
|
2763
|
+
function ke(e) {
|
|
2636
2764
|
return e.inline = 1, e;
|
|
2637
2765
|
}
|
|
2638
|
-
function
|
|
2639
|
-
return
|
|
2766
|
+
function ne(e) {
|
|
2767
|
+
return ke(function(t, r) {
|
|
2640
2768
|
return r.inline ? e.exec(t) : null;
|
|
2641
2769
|
});
|
|
2642
2770
|
}
|
|
2643
|
-
function
|
|
2644
|
-
return
|
|
2771
|
+
function le(e) {
|
|
2772
|
+
return ke(function(t, r) {
|
|
2645
2773
|
return r.inline || r.simple ? e.exec(t) : null;
|
|
2646
2774
|
});
|
|
2647
2775
|
}
|
|
2648
|
-
function
|
|
2776
|
+
function re(e) {
|
|
2649
2777
|
return function(t, r) {
|
|
2650
2778
|
return r.inline || r.simple ? null : e.exec(t);
|
|
2651
2779
|
};
|
|
2652
2780
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2781
|
+
function Se(e) {
|
|
2782
|
+
return ke(function(t) {
|
|
2655
2783
|
return e.exec(t);
|
|
2656
2784
|
});
|
|
2657
2785
|
}
|
|
2658
|
-
function
|
|
2786
|
+
function _l(e, t) {
|
|
2659
2787
|
if (t.inline || t.simple)
|
|
2660
2788
|
return null;
|
|
2661
2789
|
let r = "";
|
|
2662
2790
|
e.split(`
|
|
2663
2791
|
`).every((i) => (i += `
|
|
2664
|
-
`, !
|
|
2665
|
-
const a =
|
|
2792
|
+
`, !Xr.some((l) => l.test(i)) && (r += i, !!i.trim())));
|
|
2793
|
+
const a = De(r);
|
|
2666
2794
|
return a == "" ? null : [r, , a];
|
|
2667
2795
|
}
|
|
2668
|
-
const
|
|
2669
|
-
function
|
|
2796
|
+
const Cl = /(javascript|vbscript|data(?!:image)):/i;
|
|
2797
|
+
function vl(e) {
|
|
2670
2798
|
try {
|
|
2671
2799
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
2672
|
-
if (
|
|
2800
|
+
if (Cl.test(t))
|
|
2673
2801
|
return null;
|
|
2674
2802
|
} catch {
|
|
2675
2803
|
return null;
|
|
@@ -2677,60 +2805,60 @@ function Cl(e) {
|
|
|
2677
2805
|
return e;
|
|
2678
2806
|
}
|
|
2679
2807
|
function Ft(e) {
|
|
2680
|
-
return e.replace(
|
|
2808
|
+
return e.replace(pl, "$1");
|
|
2681
2809
|
}
|
|
2682
|
-
function
|
|
2810
|
+
function Ge(e, t, r) {
|
|
2683
2811
|
const a = r.inline || !1, i = r.simple || !1;
|
|
2684
2812
|
r.inline = !0, r.simple = !0;
|
|
2685
2813
|
const l = e(t, r);
|
|
2686
2814
|
return r.inline = a, r.simple = i, l;
|
|
2687
2815
|
}
|
|
2688
|
-
function
|
|
2816
|
+
function Sl(e, t, r) {
|
|
2689
2817
|
const a = r.inline || !1, i = r.simple || !1;
|
|
2690
2818
|
r.inline = !1, r.simple = !0;
|
|
2691
2819
|
const l = e(t, r);
|
|
2692
2820
|
return r.inline = a, r.simple = i, l;
|
|
2693
2821
|
}
|
|
2694
|
-
function
|
|
2822
|
+
function Ml(e, t, r) {
|
|
2695
2823
|
const a = r.inline || !1;
|
|
2696
2824
|
r.inline = !1;
|
|
2697
2825
|
const i = e(t, r);
|
|
2698
2826
|
return r.inline = a, i;
|
|
2699
2827
|
}
|
|
2700
|
-
const
|
|
2701
|
-
children:
|
|
2828
|
+
const et = (e, t, r) => ({
|
|
2829
|
+
children: Ge(t, e[2], r)
|
|
2702
2830
|
});
|
|
2703
|
-
function
|
|
2831
|
+
function tt() {
|
|
2704
2832
|
return {};
|
|
2705
2833
|
}
|
|
2706
|
-
function
|
|
2834
|
+
function rt() {
|
|
2707
2835
|
return null;
|
|
2708
2836
|
}
|
|
2709
|
-
function
|
|
2837
|
+
function Il(...e) {
|
|
2710
2838
|
return e.filter(Boolean).join(" ");
|
|
2711
2839
|
}
|
|
2712
|
-
function
|
|
2840
|
+
function at(e, t, r) {
|
|
2713
2841
|
let a = e;
|
|
2714
2842
|
const i = t.split(".");
|
|
2715
2843
|
for (; i.length && (a = a[i[0]], a !== void 0); )
|
|
2716
2844
|
i.shift();
|
|
2717
2845
|
return a || r;
|
|
2718
2846
|
}
|
|
2719
|
-
function
|
|
2847
|
+
function Dl(e = "", t = {}) {
|
|
2720
2848
|
function r(o, u, ...c) {
|
|
2721
|
-
const m =
|
|
2849
|
+
const m = at(t.overrides, `${o}.props`, {});
|
|
2722
2850
|
return t.createElement(function(h, w) {
|
|
2723
|
-
const
|
|
2724
|
-
return
|
|
2725
|
-
}(o, t.overrides),
|
|
2726
|
-
className:
|
|
2851
|
+
const C = at(w, h);
|
|
2852
|
+
return C ? typeof C == "function" || typeof C == "object" && "render" in C ? C : at(w, `${h}.component`, h) : h;
|
|
2853
|
+
}(o, t.overrides), de({}, u, m, {
|
|
2854
|
+
className: Il(u == null ? void 0 : u.className, m.className) || void 0
|
|
2727
2855
|
}), ...c);
|
|
2728
2856
|
}
|
|
2729
2857
|
function a(o) {
|
|
2730
|
-
o = o.replace(
|
|
2858
|
+
o = o.replace(Wn, "");
|
|
2731
2859
|
let u = !1;
|
|
2732
|
-
t.forceInline ? u = !0 : t.forceBlock || (u =
|
|
2733
|
-
const c = g(d(u ? o : `${
|
|
2860
|
+
t.forceInline ? u = !0 : t.forceBlock || (u = Jn.test(o) === !1);
|
|
2861
|
+
const c = g(d(u ? o : `${De(o).replace(cl, "")}
|
|
2734
2862
|
|
|
2735
2863
|
`, {
|
|
2736
2864
|
inline: u
|
|
@@ -2755,68 +2883,68 @@ function Il(e = "", t = {}) {
|
|
|
2755
2883
|
}, h);
|
|
2756
2884
|
}
|
|
2757
2885
|
function i(o, u) {
|
|
2758
|
-
const c = u.match(
|
|
2886
|
+
const c = u.match(Mn);
|
|
2759
2887
|
return c ? c.reduce(function(m, h) {
|
|
2760
2888
|
const w = h.indexOf("=");
|
|
2761
2889
|
if (w !== -1) {
|
|
2762
|
-
const
|
|
2890
|
+
const C = function(S) {
|
|
2763
2891
|
return S.indexOf("-") !== -1 && S.match(qn) === null && (S = S.replace(Un, function(A, R) {
|
|
2764
2892
|
return R.toUpperCase();
|
|
2765
2893
|
})), S;
|
|
2766
2894
|
}(h.slice(0, w)).trim(), y = function(S) {
|
|
2767
2895
|
const A = S[0];
|
|
2768
2896
|
return (A === '"' || A === "'") && S.length >= 2 && S[S.length - 1] === A ? S.slice(1, -1) : S;
|
|
2769
|
-
}(h.slice(w + 1).trim()), M =
|
|
2897
|
+
}(h.slice(w + 1).trim()), M = $t[C] || C;
|
|
2770
2898
|
if (M === "ref")
|
|
2771
2899
|
return m;
|
|
2772
|
-
const D = m[M] = function(S, A, R,
|
|
2900
|
+
const D = m[M] = function(S, A, R, ge) {
|
|
2773
2901
|
return A === "style" ? function(F) {
|
|
2774
|
-
const
|
|
2775
|
-
let
|
|
2902
|
+
const q = [];
|
|
2903
|
+
let B = "", V = !1, $ = !1, J = "";
|
|
2776
2904
|
if (!F)
|
|
2777
|
-
return
|
|
2905
|
+
return q;
|
|
2778
2906
|
for (let z = 0; z < F.length; z++) {
|
|
2779
2907
|
const W = F[z];
|
|
2780
|
-
if (W !== '"' && W !== "'" || V || (
|
|
2781
|
-
|
|
2908
|
+
if (W !== '"' && W !== "'" || V || ($ ? W === J && ($ = !1, J = "") : ($ = !0, J = W)), W === "(" && B.endsWith("url") ? V = !0 : W === ")" && V && (V = !1), W !== ";" || $ || V)
|
|
2909
|
+
B += W;
|
|
2782
2910
|
else {
|
|
2783
|
-
const Y =
|
|
2911
|
+
const Y = B.trim();
|
|
2784
2912
|
if (Y) {
|
|
2785
|
-
const
|
|
2786
|
-
if (
|
|
2787
|
-
const
|
|
2788
|
-
|
|
2913
|
+
const ce = Y.indexOf(":");
|
|
2914
|
+
if (ce > 0) {
|
|
2915
|
+
const he = Y.slice(0, ce).trim(), ye = Y.slice(ce + 1).trim();
|
|
2916
|
+
q.push([he, ye]);
|
|
2789
2917
|
}
|
|
2790
2918
|
}
|
|
2791
|
-
|
|
2919
|
+
B = "";
|
|
2792
2920
|
}
|
|
2793
2921
|
}
|
|
2794
|
-
const
|
|
2795
|
-
if (
|
|
2796
|
-
const z =
|
|
2922
|
+
const X = B.trim();
|
|
2923
|
+
if (X) {
|
|
2924
|
+
const z = X.indexOf(":");
|
|
2797
2925
|
if (z > 0) {
|
|
2798
|
-
const W =
|
|
2799
|
-
|
|
2926
|
+
const W = X.slice(0, z).trim(), Y = X.slice(z + 1).trim();
|
|
2927
|
+
q.push([W, Y]);
|
|
2800
2928
|
}
|
|
2801
2929
|
}
|
|
2802
|
-
return
|
|
2803
|
-
}(R).reduce(function(F, [
|
|
2804
|
-
return F[
|
|
2805
|
-
}, {}) :
|
|
2806
|
-
}(o,
|
|
2807
|
-
typeof D == "string" && (
|
|
2930
|
+
return q;
|
|
2931
|
+
}(R).reduce(function(F, [q, B]) {
|
|
2932
|
+
return F[q.replace(/(-[a-z])/g, (V) => V[1].toUpperCase())] = ge(B, S, q), F;
|
|
2933
|
+
}, {}) : Sn.indexOf(A) !== -1 ? ge(R, S, A) : (R.match($n) && (R = R.slice(1, R.length - 1)), R === "true" || R !== "false" && R);
|
|
2934
|
+
}(o, C, y, t.sanitizer);
|
|
2935
|
+
typeof D == "string" && (pt.test(D) || ut.test(D)) && (m[M] = a(D.trim()));
|
|
2808
2936
|
} else
|
|
2809
|
-
h !== "style" && (m[
|
|
2937
|
+
h !== "style" && (m[$t[h] || h] = !0);
|
|
2810
2938
|
return m;
|
|
2811
2939
|
}, {}) : null;
|
|
2812
2940
|
}
|
|
2813
|
-
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer ||
|
|
2941
|
+
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || vl, t.slugify = t.slugify || ve, t.namedCodesToUnicode = t.namedCodesToUnicode ? de({}, Ht, t.namedCodesToUnicode) : Ht, t.createElement = t.createElement || Ha;
|
|
2814
2942
|
const l = [], s = {}, p = {
|
|
2815
2943
|
[k.blockQuote]: {
|
|
2816
|
-
match:
|
|
2944
|
+
match: re(zr),
|
|
2817
2945
|
order: 1,
|
|
2818
2946
|
parse(o, u, c) {
|
|
2819
|
-
const [, m, h] = o[0].replace(
|
|
2947
|
+
const [, m, h] = o[0].replace(An, "").match(Ln);
|
|
2820
2948
|
return {
|
|
2821
2949
|
alert: m,
|
|
2822
2950
|
children: u(h, c)
|
|
@@ -2826,7 +2954,7 @@ function Il(e = "", t = {}) {
|
|
|
2826
2954
|
const m = {
|
|
2827
2955
|
key: c.key
|
|
2828
2956
|
};
|
|
2829
|
-
return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(),
|
|
2957
|
+
return o.alert && (m.className = "markdown-alert-" + t.slugify(o.alert.toLowerCase(), ve), o.children.unshift({
|
|
2830
2958
|
attrs: {},
|
|
2831
2959
|
children: [{
|
|
2832
2960
|
type: k.text,
|
|
@@ -2839,36 +2967,36 @@ function Il(e = "", t = {}) {
|
|
|
2839
2967
|
}
|
|
2840
2968
|
},
|
|
2841
2969
|
[k.breakLine]: {
|
|
2842
|
-
match:
|
|
2970
|
+
match: Se(Tn),
|
|
2843
2971
|
order: 1,
|
|
2844
|
-
parse:
|
|
2972
|
+
parse: tt,
|
|
2845
2973
|
render: (o, u, c) => r("br", {
|
|
2846
2974
|
key: c.key
|
|
2847
2975
|
})
|
|
2848
2976
|
},
|
|
2849
2977
|
[k.breakThematic]: {
|
|
2850
|
-
match:
|
|
2978
|
+
match: re(Nn),
|
|
2851
2979
|
order: 1,
|
|
2852
|
-
parse:
|
|
2980
|
+
parse: tt,
|
|
2853
2981
|
render: (o, u, c) => r("hr", {
|
|
2854
2982
|
key: c.key
|
|
2855
2983
|
})
|
|
2856
2984
|
},
|
|
2857
2985
|
[k.codeBlock]: {
|
|
2858
|
-
match:
|
|
2986
|
+
match: re(Zr),
|
|
2859
2987
|
order: 0,
|
|
2860
2988
|
parse: (o) => ({
|
|
2861
2989
|
lang: void 0,
|
|
2862
|
-
text:
|
|
2990
|
+
text: De(o[0].replace(/^ {4}/gm, "")).replace(Bt, "$1")
|
|
2863
2991
|
}),
|
|
2864
2992
|
render: (o, u, c) => r("pre", {
|
|
2865
2993
|
key: c.key
|
|
2866
|
-
}, r("code",
|
|
2994
|
+
}, r("code", de({}, o.attrs, {
|
|
2867
2995
|
className: o.lang ? `lang-${o.lang}` : ""
|
|
2868
2996
|
}), o.text))
|
|
2869
2997
|
},
|
|
2870
2998
|
[k.codeFenced]: {
|
|
2871
|
-
match:
|
|
2999
|
+
match: re(Rr),
|
|
2872
3000
|
order: 0,
|
|
2873
3001
|
parse: (o) => ({
|
|
2874
3002
|
attrs: i("code", o[3] || ""),
|
|
@@ -2878,29 +3006,29 @@ function Il(e = "", t = {}) {
|
|
|
2878
3006
|
})
|
|
2879
3007
|
},
|
|
2880
3008
|
[k.codeInline]: {
|
|
2881
|
-
match:
|
|
3009
|
+
match: le(jn),
|
|
2882
3010
|
order: 3,
|
|
2883
3011
|
parse: (o) => ({
|
|
2884
|
-
text: o[2].replace(
|
|
3012
|
+
text: o[2].replace(Bt, "$1")
|
|
2885
3013
|
}),
|
|
2886
3014
|
render: (o, u, c) => r("code", {
|
|
2887
3015
|
key: c.key
|
|
2888
3016
|
}, o.text)
|
|
2889
3017
|
},
|
|
2890
3018
|
[k.footnote]: {
|
|
2891
|
-
match:
|
|
3019
|
+
match: re(zn),
|
|
2892
3020
|
order: 0,
|
|
2893
3021
|
parse: (o) => (l.push({
|
|
2894
3022
|
footnote: o[2],
|
|
2895
3023
|
identifier: o[1]
|
|
2896
3024
|
}), {}),
|
|
2897
|
-
render:
|
|
3025
|
+
render: rt
|
|
2898
3026
|
},
|
|
2899
3027
|
[k.footnoteReference]: {
|
|
2900
|
-
match:
|
|
3028
|
+
match: ne(Rn),
|
|
2901
3029
|
order: 1,
|
|
2902
3030
|
parse: (o) => ({
|
|
2903
|
-
target: `#${t.slugify(o[1],
|
|
3031
|
+
target: `#${t.slugify(o[1], ve)}`,
|
|
2904
3032
|
text: o[1]
|
|
2905
3033
|
}),
|
|
2906
3034
|
render: (o, u, c) => r("a", {
|
|
@@ -2911,7 +3039,7 @@ function Il(e = "", t = {}) {
|
|
|
2911
3039
|
}, o.text))
|
|
2912
3040
|
},
|
|
2913
3041
|
[k.gfmTask]: {
|
|
2914
|
-
match:
|
|
3042
|
+
match: ne(Pn),
|
|
2915
3043
|
order: 1,
|
|
2916
3044
|
parse: (o) => ({
|
|
2917
3045
|
completed: o[1].toLowerCase() === "x"
|
|
@@ -2924,11 +3052,11 @@ function Il(e = "", t = {}) {
|
|
|
2924
3052
|
})
|
|
2925
3053
|
},
|
|
2926
3054
|
[k.heading]: {
|
|
2927
|
-
match:
|
|
3055
|
+
match: re(t.enforceAtxHeadings ? Pr : Wr),
|
|
2928
3056
|
order: 1,
|
|
2929
3057
|
parse: (o, u, c) => ({
|
|
2930
|
-
children:
|
|
2931
|
-
id: t.slugify(o[2],
|
|
3058
|
+
children: Ge(u, o[2], c),
|
|
3059
|
+
id: t.slugify(o[2], ve),
|
|
2932
3060
|
level: o[1].length
|
|
2933
3061
|
}),
|
|
2934
3062
|
render: (o, u, c) => r(`h${o.level}`, {
|
|
@@ -2937,33 +3065,33 @@ function Il(e = "", t = {}) {
|
|
|
2937
3065
|
}, u(o.children, c))
|
|
2938
3066
|
},
|
|
2939
3067
|
[k.headingSetext]: {
|
|
2940
|
-
match:
|
|
3068
|
+
match: re(Gr),
|
|
2941
3069
|
order: 0,
|
|
2942
3070
|
parse: (o, u, c) => ({
|
|
2943
|
-
children:
|
|
3071
|
+
children: Ge(u, o[1], c),
|
|
2944
3072
|
level: o[2] === "=" ? 1 : 2,
|
|
2945
3073
|
type: k.heading
|
|
2946
3074
|
})
|
|
2947
3075
|
},
|
|
2948
3076
|
[k.htmlBlock]: {
|
|
2949
|
-
match:
|
|
3077
|
+
match: Se(pt),
|
|
2950
3078
|
order: 1,
|
|
2951
3079
|
parse(o, u, c) {
|
|
2952
|
-
const [, m] = o[3].match(
|
|
3080
|
+
const [, m] = o[3].match(dl), h = new RegExp(`^${m}`, "gm"), w = o[3].replace(h, ""), C = (y = w, kl.some((R) => R.test(y)) ? Ml : Ge);
|
|
2953
3081
|
var y;
|
|
2954
|
-
const M = o[1].toLowerCase(), D =
|
|
3082
|
+
const M = o[1].toLowerCase(), D = vn.indexOf(M) !== -1, S = (D ? M : o[1]).trim(), A = {
|
|
2955
3083
|
attrs: i(S, o[2]),
|
|
2956
3084
|
noInnerParse: D,
|
|
2957
3085
|
tag: S
|
|
2958
3086
|
};
|
|
2959
|
-
return c.inAnchor = c.inAnchor || M === "a", D ? A.text = o[3] : A.children =
|
|
3087
|
+
return c.inAnchor = c.inAnchor || M === "a", D ? A.text = o[3] : A.children = C(u, w, c), c.inAnchor = !1, A;
|
|
2960
3088
|
},
|
|
2961
|
-
render: (o, u, c) => r(o.tag,
|
|
3089
|
+
render: (o, u, c) => r(o.tag, de({
|
|
2962
3090
|
key: c.key
|
|
2963
3091
|
}, o.attrs), o.text || (o.children ? u(o.children, c) : ""))
|
|
2964
3092
|
},
|
|
2965
3093
|
[k.htmlSelfClosing]: {
|
|
2966
|
-
match:
|
|
3094
|
+
match: Se(ut),
|
|
2967
3095
|
order: 1,
|
|
2968
3096
|
parse(o) {
|
|
2969
3097
|
const u = o[1].trim();
|
|
@@ -2972,18 +3100,18 @@ function Il(e = "", t = {}) {
|
|
|
2972
3100
|
tag: u
|
|
2973
3101
|
};
|
|
2974
3102
|
},
|
|
2975
|
-
render: (o, u, c) => r(o.tag,
|
|
3103
|
+
render: (o, u, c) => r(o.tag, de({}, o.attrs, {
|
|
2976
3104
|
key: c.key
|
|
2977
3105
|
}))
|
|
2978
3106
|
},
|
|
2979
3107
|
[k.htmlComment]: {
|
|
2980
|
-
match:
|
|
3108
|
+
match: Se(qr),
|
|
2981
3109
|
order: 1,
|
|
2982
3110
|
parse: () => ({}),
|
|
2983
|
-
render:
|
|
3111
|
+
render: rt
|
|
2984
3112
|
},
|
|
2985
3113
|
[k.image]: {
|
|
2986
|
-
match:
|
|
3114
|
+
match: le(xl),
|
|
2987
3115
|
order: 1,
|
|
2988
3116
|
parse: (o) => ({
|
|
2989
3117
|
alt: o[1],
|
|
@@ -2998,10 +3126,10 @@ function Il(e = "", t = {}) {
|
|
|
2998
3126
|
})
|
|
2999
3127
|
},
|
|
3000
3128
|
[k.link]: {
|
|
3001
|
-
match:
|
|
3129
|
+
match: ne(fl),
|
|
3002
3130
|
order: 3,
|
|
3003
3131
|
parse: (o, u, c) => ({
|
|
3004
|
-
children:
|
|
3132
|
+
children: Sl(u, o[1], c),
|
|
3005
3133
|
target: Ft(o[2]),
|
|
3006
3134
|
title: o[3]
|
|
3007
3135
|
}),
|
|
@@ -3012,7 +3140,7 @@ function Il(e = "", t = {}) {
|
|
|
3012
3140
|
}, u(o.children, c))
|
|
3013
3141
|
},
|
|
3014
3142
|
[k.linkAngleBraceStyleDetector]: {
|
|
3015
|
-
match:
|
|
3143
|
+
match: ne(Yn),
|
|
3016
3144
|
order: 0,
|
|
3017
3145
|
parse: (o) => ({
|
|
3018
3146
|
children: [{
|
|
@@ -3024,7 +3152,7 @@ function Il(e = "", t = {}) {
|
|
|
3024
3152
|
})
|
|
3025
3153
|
},
|
|
3026
3154
|
[k.linkBareUrlDetector]: {
|
|
3027
|
-
match:
|
|
3155
|
+
match: ke((o, u) => u.inAnchor || t.disableAutoLink ? null : ne(Hn)(o, u)),
|
|
3028
3156
|
order: 0,
|
|
3029
3157
|
parse: (o) => ({
|
|
3030
3158
|
children: [{
|
|
@@ -3037,11 +3165,11 @@ function Il(e = "", t = {}) {
|
|
|
3037
3165
|
})
|
|
3038
3166
|
},
|
|
3039
3167
|
[k.linkMailtoDetector]: {
|
|
3040
|
-
match:
|
|
3168
|
+
match: ne(Bn),
|
|
3041
3169
|
order: 0,
|
|
3042
3170
|
parse(o) {
|
|
3043
3171
|
let u = o[1], c = o[1];
|
|
3044
|
-
return
|
|
3172
|
+
return In.test(c) || (c = "mailto:" + c), {
|
|
3045
3173
|
children: [{
|
|
3046
3174
|
text: u.replace("mailto:", ""),
|
|
3047
3175
|
type: k.text
|
|
@@ -3054,31 +3182,31 @@ function Il(e = "", t = {}) {
|
|
|
3054
3182
|
[k.orderedList]: Yt(r, 1),
|
|
3055
3183
|
[k.unorderedList]: Yt(r, 2),
|
|
3056
3184
|
[k.newlineCoalescer]: {
|
|
3057
|
-
match:
|
|
3185
|
+
match: re(On),
|
|
3058
3186
|
order: 3,
|
|
3059
|
-
parse:
|
|
3187
|
+
parse: tt,
|
|
3060
3188
|
render: () => `
|
|
3061
3189
|
`
|
|
3062
3190
|
},
|
|
3063
3191
|
[k.paragraph]: {
|
|
3064
|
-
match:
|
|
3192
|
+
match: ke(_l),
|
|
3065
3193
|
order: 3,
|
|
3066
|
-
parse:
|
|
3194
|
+
parse: et,
|
|
3067
3195
|
render: (o, u, c) => r("p", {
|
|
3068
3196
|
key: c.key
|
|
3069
3197
|
}, u(o.children, c))
|
|
3070
3198
|
},
|
|
3071
3199
|
[k.ref]: {
|
|
3072
|
-
match:
|
|
3200
|
+
match: ne(Qn),
|
|
3073
3201
|
order: 0,
|
|
3074
3202
|
parse: (o) => (s[o[1]] = {
|
|
3075
3203
|
target: o[2],
|
|
3076
3204
|
title: o[4]
|
|
3077
3205
|
}, {}),
|
|
3078
|
-
render:
|
|
3206
|
+
render: rt
|
|
3079
3207
|
},
|
|
3080
3208
|
[k.refImage]: {
|
|
3081
|
-
match:
|
|
3209
|
+
match: le(Fn),
|
|
3082
3210
|
order: 0,
|
|
3083
3211
|
parse: (o) => ({
|
|
3084
3212
|
alt: o[1] || void 0,
|
|
@@ -3092,7 +3220,7 @@ function Il(e = "", t = {}) {
|
|
|
3092
3220
|
}) : null
|
|
3093
3221
|
},
|
|
3094
3222
|
[k.refLink]: {
|
|
3095
|
-
match:
|
|
3223
|
+
match: ne(Vn),
|
|
3096
3224
|
order: 0,
|
|
3097
3225
|
parse: (o, u, c) => ({
|
|
3098
3226
|
children: u(o[1], c),
|
|
@@ -3108,9 +3236,9 @@ function Il(e = "", t = {}) {
|
|
|
3108
3236
|
}, o.fallbackChildren)
|
|
3109
3237
|
},
|
|
3110
3238
|
[k.table]: {
|
|
3111
|
-
match:
|
|
3239
|
+
match: re($r),
|
|
3112
3240
|
order: 1,
|
|
3113
|
-
parse:
|
|
3241
|
+
parse: wl,
|
|
3114
3242
|
render(o, u, c) {
|
|
3115
3243
|
const m = o;
|
|
3116
3244
|
return r("table", {
|
|
@@ -3123,25 +3251,25 @@ function Il(e = "", t = {}) {
|
|
|
3123
3251
|
}))), r("tbody", null, m.cells.map(function(h, w) {
|
|
3124
3252
|
return r("tr", {
|
|
3125
3253
|
key: w
|
|
3126
|
-
}, h.map(function(
|
|
3254
|
+
}, h.map(function(C, y) {
|
|
3127
3255
|
return r("td", {
|
|
3128
3256
|
key: y,
|
|
3129
3257
|
style: Qt(m, y)
|
|
3130
|
-
}, u(
|
|
3258
|
+
}, u(C, c));
|
|
3131
3259
|
}));
|
|
3132
3260
|
})));
|
|
3133
3261
|
}
|
|
3134
3262
|
},
|
|
3135
3263
|
[k.text]: {
|
|
3136
|
-
match:
|
|
3264
|
+
match: Se(sl),
|
|
3137
3265
|
order: 4,
|
|
3138
3266
|
parse: (o) => ({
|
|
3139
|
-
text: o[0].replace(
|
|
3267
|
+
text: o[0].replace(Gn, (u, c) => t.namedCodesToUnicode[c] ? t.namedCodesToUnicode[c] : u)
|
|
3140
3268
|
}),
|
|
3141
3269
|
render: (o) => o.text
|
|
3142
3270
|
},
|
|
3143
3271
|
[k.textBolded]: {
|
|
3144
|
-
match:
|
|
3272
|
+
match: le(al),
|
|
3145
3273
|
order: 2,
|
|
3146
3274
|
parse: (o, u, c) => ({
|
|
3147
3275
|
children: u(o[2], c)
|
|
@@ -3151,7 +3279,7 @@ function Il(e = "", t = {}) {
|
|
|
3151
3279
|
}, u(o.children, c))
|
|
3152
3280
|
},
|
|
3153
3281
|
[k.textEmphasized]: {
|
|
3154
|
-
match:
|
|
3282
|
+
match: le(il),
|
|
3155
3283
|
order: 3,
|
|
3156
3284
|
parse: (o, u, c) => ({
|
|
3157
3285
|
children: u(o[2], c)
|
|
@@ -3161,7 +3289,7 @@ function Il(e = "", t = {}) {
|
|
|
3161
3289
|
}, u(o.children, c))
|
|
3162
3290
|
},
|
|
3163
3291
|
[k.textEscaped]: {
|
|
3164
|
-
match:
|
|
3292
|
+
match: le(ll),
|
|
3165
3293
|
order: 1,
|
|
3166
3294
|
parse: (o) => ({
|
|
3167
3295
|
text: o[1],
|
|
@@ -3169,17 +3297,17 @@ function Il(e = "", t = {}) {
|
|
|
3169
3297
|
})
|
|
3170
3298
|
},
|
|
3171
3299
|
[k.textMarked]: {
|
|
3172
|
-
match:
|
|
3300
|
+
match: le(ol),
|
|
3173
3301
|
order: 3,
|
|
3174
|
-
parse:
|
|
3302
|
+
parse: et,
|
|
3175
3303
|
render: (o, u, c) => r("mark", {
|
|
3176
3304
|
key: c.key
|
|
3177
3305
|
}, u(o.children, c))
|
|
3178
3306
|
},
|
|
3179
3307
|
[k.textStrikethroughed]: {
|
|
3180
|
-
match:
|
|
3308
|
+
match: le(nl),
|
|
3181
3309
|
order: 3,
|
|
3182
|
-
parse:
|
|
3310
|
+
parse: et,
|
|
3183
3311
|
render: (o, u, c) => r("del", {
|
|
3184
3312
|
key: c.key
|
|
3185
3313
|
}, u(o.children, c))
|
|
@@ -3189,7 +3317,7 @@ function Il(e = "", t = {}) {
|
|
|
3189
3317
|
const d = function(o) {
|
|
3190
3318
|
let u = Object.keys(o);
|
|
3191
3319
|
function c(m, h) {
|
|
3192
|
-
let w,
|
|
3320
|
+
let w, C, y = [], M = "", D = "";
|
|
3193
3321
|
for (h.prevCapture = h.prevCapture || ""; m; ) {
|
|
3194
3322
|
let S = 0;
|
|
3195
3323
|
for (; S < u.length; ) {
|
|
@@ -3199,7 +3327,7 @@ function Il(e = "", t = {}) {
|
|
|
3199
3327
|
}
|
|
3200
3328
|
const A = w.match(m, h);
|
|
3201
3329
|
if (A) {
|
|
3202
|
-
D = A[0], h.prevCapture += D, m = m.substring(D.length),
|
|
3330
|
+
D = A[0], h.prevCapture += D, m = m.substring(D.length), C = w.parse(A, c, h), C.type == null && (C.type = M), y.push(C);
|
|
3203
3331
|
break;
|
|
3204
3332
|
}
|
|
3205
3333
|
S++;
|
|
@@ -3208,12 +3336,12 @@ function Il(e = "", t = {}) {
|
|
|
3208
3336
|
return h.prevCapture = "", y;
|
|
3209
3337
|
}
|
|
3210
3338
|
return u.sort(function(m, h) {
|
|
3211
|
-
let w = o[m].order,
|
|
3212
|
-
return w !==
|
|
3339
|
+
let w = o[m].order, C = o[h].order;
|
|
3340
|
+
return w !== C ? w - C : m < h ? -1 : 1;
|
|
3213
3341
|
}), function(m, h) {
|
|
3214
3342
|
return c(function(w) {
|
|
3215
|
-
return w.replace(
|
|
3216
|
-
`).replace(
|
|
3343
|
+
return w.replace(En, `
|
|
3344
|
+
`).replace(Zn, "").replace(Xn, " ");
|
|
3217
3345
|
}(m), h);
|
|
3218
3346
|
};
|
|
3219
3347
|
}(p), g = (f = /* @__PURE__ */ function(o, u) {
|
|
@@ -3225,9 +3353,9 @@ function Il(e = "", t = {}) {
|
|
|
3225
3353
|
if (Array.isArray(u)) {
|
|
3226
3354
|
const m = c.key, h = [];
|
|
3227
3355
|
let w = !1;
|
|
3228
|
-
for (let
|
|
3229
|
-
c.key =
|
|
3230
|
-
const y = o(u[
|
|
3356
|
+
for (let C = 0; C < u.length; C++) {
|
|
3357
|
+
c.key = C;
|
|
3358
|
+
const y = o(u[C], c), M = typeof y == "string";
|
|
3231
3359
|
M && w ? h[h.length - 1] += y : y !== null && h.push(y), w = M;
|
|
3232
3360
|
}
|
|
3233
3361
|
return c.key = m, h;
|
|
@@ -3240,14 +3368,14 @@ function Il(e = "", t = {}) {
|
|
|
3240
3368
|
key: "footer"
|
|
3241
3369
|
}, l.map(function(o) {
|
|
3242
3370
|
return r("div", {
|
|
3243
|
-
id: t.slugify(o.identifier,
|
|
3371
|
+
id: t.slugify(o.identifier, ve),
|
|
3244
3372
|
key: o.identifier
|
|
3245
3373
|
}, o.identifier, g(d(o.footnote, {
|
|
3246
3374
|
inline: !0
|
|
3247
3375
|
})));
|
|
3248
3376
|
}))) : x;
|
|
3249
3377
|
}
|
|
3250
|
-
const
|
|
3378
|
+
const Al = (e) => {
|
|
3251
3379
|
let {
|
|
3252
3380
|
children: t = "",
|
|
3253
3381
|
options: r
|
|
@@ -3258,21 +3386,30 @@ const Dl = (e) => {
|
|
|
3258
3386
|
for (p = 0; p < g.length; p++)
|
|
3259
3387
|
l.indexOf(s = g[p]) >= 0 || (d[s] = i[s]);
|
|
3260
3388
|
return d;
|
|
3261
|
-
}(e,
|
|
3262
|
-
return
|
|
3263
|
-
},
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3389
|
+
}(e, Cn);
|
|
3390
|
+
return Na(Dl(t, r), a);
|
|
3391
|
+
}, Ll = _.div`
|
|
3392
|
+
display: flex;
|
|
3393
|
+
|
|
3394
|
+
${({
|
|
3267
3395
|
align: e
|
|
3268
3396
|
}) => e === "right" ? P`
|
|
3269
3397
|
justify-content: flex-end;
|
|
3270
3398
|
` : P`
|
|
3271
3399
|
justify-content: flex-start;
|
|
3272
|
-
`
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3400
|
+
`}
|
|
3401
|
+
`, Kr = _.div`
|
|
3402
|
+
font-size: inherit;
|
|
3403
|
+
line-height: inherit;
|
|
3404
|
+
padding-top: 8.5px;
|
|
3405
|
+
padding-bottom: 8.5px;
|
|
3406
|
+
padding-left: 0.5rem;
|
|
3407
|
+
padding-right: 0.5rem;
|
|
3408
|
+
white-space: pre-wrap;
|
|
3409
|
+
overflow-wrap: break-word;
|
|
3410
|
+
box-sizing: border-box;
|
|
3411
|
+
|
|
3412
|
+
${({
|
|
3276
3413
|
align: e
|
|
3277
3414
|
}) => e === "right" ? P`
|
|
3278
3415
|
text-align: right;
|
|
@@ -3280,76 +3417,100 @@ const Dl = (e) => {
|
|
|
3280
3417
|
` : P`
|
|
3281
3418
|
text-align: left;
|
|
3282
3419
|
border-radius: 10px 10px 10px 0px;
|
|
3283
|
-
|
|
3420
|
+
`}
|
|
3421
|
+
|
|
3422
|
+
${({
|
|
3284
3423
|
align: e
|
|
3285
3424
|
}) => e !== "full" ? P`
|
|
3286
3425
|
max-width: 85%;
|
|
3287
|
-
` : ""
|
|
3426
|
+
` : ""}
|
|
3427
|
+
|
|
3428
|
+
color: ${({
|
|
3288
3429
|
theme: e
|
|
3289
|
-
}) => e.aiChat.primaryTextColor
|
|
3430
|
+
}) => e.aiChat.primaryTextColor};
|
|
3431
|
+
background-color: ${({
|
|
3290
3432
|
theme: e,
|
|
3291
3433
|
align: t
|
|
3292
|
-
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor
|
|
3434
|
+
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor};
|
|
3435
|
+
`, se = ({
|
|
3293
3436
|
align: e,
|
|
3294
3437
|
children: t
|
|
3295
3438
|
}) => {
|
|
3296
3439
|
const {
|
|
3297
3440
|
themeSettings: r
|
|
3298
3441
|
} = L();
|
|
3299
|
-
return /* @__PURE__ */ n(
|
|
3442
|
+
return /* @__PURE__ */ n(Ll, {
|
|
3300
3443
|
theme: r,
|
|
3301
3444
|
align: e,
|
|
3302
|
-
children: /* @__PURE__ */ n(
|
|
3445
|
+
children: /* @__PURE__ */ n(Kr, {
|
|
3303
3446
|
theme: r,
|
|
3304
3447
|
align: e,
|
|
3305
|
-
children: typeof t == "string" ? /* @__PURE__ */ n(
|
|
3448
|
+
children: typeof t == "string" ? /* @__PURE__ */ n(Al, {
|
|
3306
3449
|
children: t
|
|
3307
3450
|
}) : t
|
|
3308
3451
|
})
|
|
3309
3452
|
});
|
|
3310
3453
|
};
|
|
3311
|
-
function
|
|
3454
|
+
function Tl() {
|
|
3312
3455
|
const {
|
|
3313
3456
|
welcomeText: e
|
|
3314
|
-
} =
|
|
3315
|
-
return e === !1 ? null : /* @__PURE__ */ n(
|
|
3457
|
+
} = oe();
|
|
3458
|
+
return e === !1 ? null : /* @__PURE__ */ n(se, {
|
|
3316
3459
|
align: "left",
|
|
3317
3460
|
children: e
|
|
3318
3461
|
});
|
|
3319
3462
|
}
|
|
3320
|
-
const
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3463
|
+
const Nl = _.div`
|
|
3464
|
+
display: flex;
|
|
3465
|
+
|
|
3466
|
+
${({
|
|
3324
3467
|
align: e
|
|
3325
3468
|
}) => e === "right" ? P`
|
|
3326
3469
|
justify-content: flex-end;
|
|
3327
3470
|
` : P`
|
|
3328
3471
|
justify-content: flex-start;
|
|
3329
|
-
`
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3472
|
+
`}
|
|
3473
|
+
`, jl = _.button`
|
|
3474
|
+
font-family: inherit;
|
|
3475
|
+
font-size: inherit;
|
|
3476
|
+
line-height: inherit;
|
|
3477
|
+
border: ${({
|
|
3333
3478
|
theme: e
|
|
3334
|
-
}) => e.aiChat.clickableMessages.border
|
|
3479
|
+
}) => e.aiChat.clickableMessages.border};
|
|
3480
|
+
padding: 0;
|
|
3481
|
+
cursor: pointer;
|
|
3482
|
+
|
|
3483
|
+
color: ${({
|
|
3335
3484
|
theme: e
|
|
3336
|
-
}) => e.aiChat.clickableMessages.textColor
|
|
3485
|
+
}) => e.aiChat.clickableMessages.textColor};
|
|
3486
|
+
background-color: ${({
|
|
3337
3487
|
theme: e
|
|
3338
|
-
}) => e.aiChat.clickableMessages.backgroundColor
|
|
3488
|
+
}) => e.aiChat.clickableMessages.backgroundColor};
|
|
3489
|
+
&:hover {
|
|
3490
|
+
color: ${({
|
|
3339
3491
|
theme: e
|
|
3340
|
-
}) => e.aiChat.clickableMessages.hover.textColor
|
|
3492
|
+
}) => e.aiChat.clickableMessages.hover.textColor};
|
|
3493
|
+
background-color: ${({
|
|
3341
3494
|
theme: e
|
|
3342
|
-
}) => e.aiChat.clickableMessages.hover.backgroundColor
|
|
3495
|
+
}) => e.aiChat.clickableMessages.hover.backgroundColor};
|
|
3496
|
+
}
|
|
3497
|
+
border-radius: 20px;
|
|
3498
|
+
|
|
3499
|
+
${({
|
|
3343
3500
|
align: e
|
|
3344
3501
|
}) => e === "right" ? P`
|
|
3345
3502
|
text-align: right;
|
|
3346
3503
|
` : P`
|
|
3347
3504
|
text-align: left;
|
|
3348
|
-
|
|
3505
|
+
`}
|
|
3506
|
+
|
|
3507
|
+
${({
|
|
3349
3508
|
align: e
|
|
3350
3509
|
}) => e !== "full" ? P`
|
|
3351
3510
|
max-width: 382px;
|
|
3352
|
-
` : ""
|
|
3511
|
+
` : ""}
|
|
3512
|
+
|
|
3513
|
+
${({
|
|
3353
3514
|
theme: e
|
|
3354
3515
|
}) => {
|
|
3355
3516
|
const {
|
|
@@ -3379,8 +3540,9 @@ const Tl = /* @__PURE__ */ C("div", {
|
|
|
3379
3540
|
`;
|
|
3380
3541
|
}
|
|
3381
3542
|
return "";
|
|
3382
|
-
}
|
|
3383
|
-
|
|
3543
|
+
}}
|
|
3544
|
+
`;
|
|
3545
|
+
function Be({
|
|
3384
3546
|
children: e,
|
|
3385
3547
|
align: t,
|
|
3386
3548
|
onClick: r,
|
|
@@ -3391,9 +3553,9 @@ function He({
|
|
|
3391
3553
|
const {
|
|
3392
3554
|
themeSettings: s
|
|
3393
3555
|
} = L();
|
|
3394
|
-
return /* @__PURE__ */ n(
|
|
3556
|
+
return /* @__PURE__ */ n(Nl, {
|
|
3395
3557
|
align: t,
|
|
3396
|
-
children: /* @__PURE__ */ n(
|
|
3558
|
+
children: /* @__PURE__ */ n(jl, {
|
|
3397
3559
|
"aria-label": l,
|
|
3398
3560
|
theme: s,
|
|
3399
3561
|
onClick: r,
|
|
@@ -3404,7 +3566,7 @@ function He({
|
|
|
3404
3566
|
})
|
|
3405
3567
|
});
|
|
3406
3568
|
}
|
|
3407
|
-
function
|
|
3569
|
+
function Ol({
|
|
3408
3570
|
onCancel: e,
|
|
3409
3571
|
onConfirm: t
|
|
3410
3572
|
}) {
|
|
@@ -3412,12 +3574,12 @@ function jl({
|
|
|
3412
3574
|
t: r
|
|
3413
3575
|
} = E();
|
|
3414
3576
|
return /* @__PURE__ */ v(U, {
|
|
3415
|
-
children: [/* @__PURE__ */ n(
|
|
3577
|
+
children: [/* @__PURE__ */ n(se, {
|
|
3416
3578
|
align: "left",
|
|
3417
3579
|
children: r("ai.clearHistoryPrompt")
|
|
3418
3580
|
}), /* @__PURE__ */ v("div", {
|
|
3419
3581
|
className: "csdk-flex csdk-gap-x-2",
|
|
3420
|
-
children: [/* @__PURE__ */ n(
|
|
3582
|
+
children: [/* @__PURE__ */ n(Be, {
|
|
3421
3583
|
align: "right",
|
|
3422
3584
|
onClick: t,
|
|
3423
3585
|
accessibleName: "confirm clear chat",
|
|
@@ -3425,7 +3587,7 @@ function jl({
|
|
|
3425
3587
|
className: "csdk-py-[6px] csdk-px-[20px]",
|
|
3426
3588
|
children: r("ai.buttons.yes")
|
|
3427
3589
|
})
|
|
3428
|
-
}), /* @__PURE__ */ n(
|
|
3590
|
+
}), /* @__PURE__ */ n(Be, {
|
|
3429
3591
|
align: "right",
|
|
3430
3592
|
onClick: e,
|
|
3431
3593
|
accessibleName: "cancel clear chat",
|
|
@@ -3437,8 +3599,8 @@ function jl({
|
|
|
3437
3599
|
})]
|
|
3438
3600
|
});
|
|
3439
3601
|
}
|
|
3440
|
-
var
|
|
3441
|
-
function
|
|
3602
|
+
var El = ja("toLowerCase");
|
|
3603
|
+
function zl() {
|
|
3442
3604
|
const {
|
|
3443
3605
|
themeSettings: e
|
|
3444
3606
|
} = L();
|
|
@@ -3456,34 +3618,34 @@ function El() {
|
|
|
3456
3618
|
})
|
|
3457
3619
|
});
|
|
3458
3620
|
}
|
|
3459
|
-
function
|
|
3621
|
+
function Rl({
|
|
3460
3622
|
onClick: e
|
|
3461
3623
|
}) {
|
|
3462
3624
|
const {
|
|
3463
3625
|
t
|
|
3464
3626
|
} = E();
|
|
3465
|
-
return /* @__PURE__ */ n(
|
|
3627
|
+
return /* @__PURE__ */ n(Be, {
|
|
3466
3628
|
align: "left",
|
|
3467
3629
|
onClick: e,
|
|
3468
3630
|
children: /* @__PURE__ */ v("div", {
|
|
3469
3631
|
className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
|
|
3470
|
-
children: [/* @__PURE__ */ n(
|
|
3632
|
+
children: [/* @__PURE__ */ n(zl, {}), t("ai.buttons.insights")]
|
|
3471
3633
|
})
|
|
3472
3634
|
});
|
|
3473
3635
|
}
|
|
3474
|
-
function
|
|
3475
|
-
return
|
|
3636
|
+
function Zl(e) {
|
|
3637
|
+
return Oa("MuiDialog", e);
|
|
3476
3638
|
}
|
|
3477
|
-
const
|
|
3478
|
-
process.env.NODE_ENV !== "production" && (
|
|
3479
|
-
const
|
|
3639
|
+
const it = ma("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), ea = /* @__PURE__ */ Ye({});
|
|
3640
|
+
process.env.NODE_ENV !== "production" && (ea.displayName = "DialogContext");
|
|
3641
|
+
const Wl = Ue(ba, {
|
|
3480
3642
|
name: "MuiDialog",
|
|
3481
3643
|
slot: "Backdrop",
|
|
3482
3644
|
overrides: (e, t) => t.backdrop
|
|
3483
3645
|
})({
|
|
3484
3646
|
// Improve scrollable dialog support.
|
|
3485
3647
|
zIndex: -1
|
|
3486
|
-
}),
|
|
3648
|
+
}), Pl = (e) => {
|
|
3487
3649
|
const {
|
|
3488
3650
|
classes: t,
|
|
3489
3651
|
scroll: r,
|
|
@@ -3492,11 +3654,11 @@ const Zl = Ue(ma, {
|
|
|
3492
3654
|
fullScreen: l
|
|
3493
3655
|
} = e, s = {
|
|
3494
3656
|
root: ["root"],
|
|
3495
|
-
container: ["container", `scroll${
|
|
3496
|
-
paper: ["paper", `paperScroll${
|
|
3657
|
+
container: ["container", `scroll${fe(r)}`],
|
|
3658
|
+
paper: ["paper", `paperScroll${fe(r)}`, `paperWidth${fe(String(a))}`, i && "paperFullWidth", l && "paperFullScreen"]
|
|
3497
3659
|
};
|
|
3498
|
-
return
|
|
3499
|
-
},
|
|
3660
|
+
return Ia(s, Zl, t);
|
|
3661
|
+
}, Gl = Ue(fa, {
|
|
3500
3662
|
name: "MuiDialog",
|
|
3501
3663
|
slot: "Root",
|
|
3502
3664
|
overridesResolver: (e, t) => t.root
|
|
@@ -3512,7 +3674,7 @@ const Zl = Ue(ma, {
|
|
|
3512
3674
|
const {
|
|
3513
3675
|
ownerState: r
|
|
3514
3676
|
} = e;
|
|
3515
|
-
return [t.container, t[`scroll${
|
|
3677
|
+
return [t.container, t[`scroll${fe(r.scroll)}`]];
|
|
3516
3678
|
}
|
|
3517
3679
|
})({
|
|
3518
3680
|
height: "100%",
|
|
@@ -3547,16 +3709,16 @@ const Zl = Ue(ma, {
|
|
|
3547
3709
|
}
|
|
3548
3710
|
}
|
|
3549
3711
|
}]
|
|
3550
|
-
}),
|
|
3712
|
+
}), $l = Ue(tr, {
|
|
3551
3713
|
name: "MuiDialog",
|
|
3552
3714
|
slot: "Paper",
|
|
3553
3715
|
overridesResolver: (e, t) => {
|
|
3554
3716
|
const {
|
|
3555
3717
|
ownerState: r
|
|
3556
3718
|
} = e;
|
|
3557
|
-
return [t.paper, t[`scrollPaper${
|
|
3719
|
+
return [t.paper, t[`scrollPaper${fe(r.scroll)}`], t[`paperWidth${fe(String(r.maxWidth))}`], r.fullWidth && t.paperFullWidth, r.fullScreen && t.paperFullScreen];
|
|
3558
3720
|
}
|
|
3559
|
-
})(
|
|
3721
|
+
})(xa(({
|
|
3560
3722
|
theme: e
|
|
3561
3723
|
}) => ({
|
|
3562
3724
|
margin: 32,
|
|
@@ -3597,7 +3759,7 @@ const Zl = Ue(ma, {
|
|
|
3597
3759
|
},
|
|
3598
3760
|
style: {
|
|
3599
3761
|
maxWidth: e.breakpoints.unit === "px" ? Math.max(e.breakpoints.values.xs, 444) : `max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,
|
|
3600
|
-
[`&.${
|
|
3762
|
+
[`&.${it.paperScrollBody}`]: {
|
|
3601
3763
|
[e.breakpoints.down(Math.max(e.breakpoints.values.xs, 444) + 32 * 2)]: {
|
|
3602
3764
|
maxWidth: "calc(100% - 64px)"
|
|
3603
3765
|
}
|
|
@@ -3609,7 +3771,7 @@ const Zl = Ue(ma, {
|
|
|
3609
3771
|
},
|
|
3610
3772
|
style: {
|
|
3611
3773
|
maxWidth: `${e.breakpoints.values[t]}${e.breakpoints.unit}`,
|
|
3612
|
-
[`&.${
|
|
3774
|
+
[`&.${it.paperScrollBody}`]: {
|
|
3613
3775
|
[e.breakpoints.down(e.breakpoints.values[t] + 32 * 2)]: {
|
|
3614
3776
|
maxWidth: "calc(100% - 64px)"
|
|
3615
3777
|
}
|
|
@@ -3633,17 +3795,17 @@ const Zl = Ue(ma, {
|
|
|
3633
3795
|
height: "100%",
|
|
3634
3796
|
maxHeight: "none",
|
|
3635
3797
|
borderRadius: 0,
|
|
3636
|
-
[`&.${
|
|
3798
|
+
[`&.${it.paperScrollBody}`]: {
|
|
3637
3799
|
margin: 0,
|
|
3638
3800
|
maxWidth: "100%"
|
|
3639
3801
|
}
|
|
3640
3802
|
}
|
|
3641
3803
|
}]
|
|
3642
|
-
}))),
|
|
3643
|
-
const r =
|
|
3804
|
+
}))), ta = /* @__PURE__ */ er(function(e, t) {
|
|
3805
|
+
const r = ya({
|
|
3644
3806
|
props: e,
|
|
3645
3807
|
name: "MuiDialog"
|
|
3646
|
-
}), a =
|
|
3808
|
+
}), a = wa(), i = {
|
|
3647
3809
|
enter: a.transitions.duration.enteringScreen,
|
|
3648
3810
|
exit: a.transitions.duration.leavingScreen
|
|
3649
3811
|
}, l = r, {
|
|
@@ -3659,102 +3821,102 @@ const Zl = Ue(ma, {
|
|
|
3659
3821
|
fullWidth: m = !1,
|
|
3660
3822
|
maxWidth: h = "sm",
|
|
3661
3823
|
onBackdropClick: w,
|
|
3662
|
-
onClick:
|
|
3824
|
+
onClick: C,
|
|
3663
3825
|
onClose: y,
|
|
3664
3826
|
open: M,
|
|
3665
|
-
PaperComponent: D =
|
|
3827
|
+
PaperComponent: D = tr,
|
|
3666
3828
|
PaperProps: S = {},
|
|
3667
3829
|
scroll: A = "paper",
|
|
3668
3830
|
slots: R = {},
|
|
3669
|
-
slotProps:
|
|
3670
|
-
TransitionComponent: F =
|
|
3671
|
-
transitionDuration:
|
|
3672
|
-
TransitionProps:
|
|
3673
|
-
} = l, V =
|
|
3831
|
+
slotProps: ge = {},
|
|
3832
|
+
TransitionComponent: F = At,
|
|
3833
|
+
transitionDuration: q = i,
|
|
3834
|
+
TransitionProps: B
|
|
3835
|
+
} = l, V = Io(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"]), $ = j(I({}, r), {
|
|
3674
3836
|
disableEscapeKeyDown: u,
|
|
3675
3837
|
fullScreen: c,
|
|
3676
3838
|
fullWidth: m,
|
|
3677
3839
|
maxWidth: h,
|
|
3678
3840
|
scroll: A
|
|
3679
|
-
}),
|
|
3680
|
-
|
|
3681
|
-
}, W = (
|
|
3682
|
-
|
|
3683
|
-
}, Y =
|
|
3841
|
+
}), J = Pl($), X = pe(), z = (me) => {
|
|
3842
|
+
X.current = me.target === me.currentTarget;
|
|
3843
|
+
}, W = (me) => {
|
|
3844
|
+
C && C(me), X.current && (X.current = null, w && w(me), y && y(me, "backdropClick"));
|
|
3845
|
+
}, Y = _a(p), ce = Q(() => ({
|
|
3684
3846
|
titleId: Y
|
|
3685
|
-
}), [Y]),
|
|
3847
|
+
}), [Y]), he = I({
|
|
3686
3848
|
transition: F
|
|
3687
|
-
}, R),
|
|
3688
|
-
transition:
|
|
3849
|
+
}, R), ye = I({
|
|
3850
|
+
transition: B,
|
|
3689
3851
|
paper: S,
|
|
3690
3852
|
backdrop: f
|
|
3691
|
-
},
|
|
3692
|
-
slots:
|
|
3693
|
-
slotProps:
|
|
3694
|
-
}, [
|
|
3695
|
-
elementType:
|
|
3853
|
+
}, ge), T = {
|
|
3854
|
+
slots: he,
|
|
3855
|
+
slotProps: ye
|
|
3856
|
+
}, [K, Oe] = we("root", {
|
|
3857
|
+
elementType: Gl,
|
|
3696
3858
|
shouldForwardComponentProp: !0,
|
|
3697
3859
|
externalForwardedProps: T,
|
|
3698
|
-
ownerState:
|
|
3699
|
-
className: Je(
|
|
3860
|
+
ownerState: $,
|
|
3861
|
+
className: Je(J.root, o),
|
|
3700
3862
|
ref: t
|
|
3701
|
-
}), [
|
|
3702
|
-
elementType:
|
|
3863
|
+
}), [Ee, sa] = we("backdrop", {
|
|
3864
|
+
elementType: Wl,
|
|
3703
3865
|
shouldForwardComponentProp: !0,
|
|
3704
3866
|
externalForwardedProps: T,
|
|
3705
|
-
ownerState:
|
|
3706
|
-
}), [
|
|
3707
|
-
elementType:
|
|
3867
|
+
ownerState: $
|
|
3868
|
+
}), [ca, da] = we("paper", {
|
|
3869
|
+
elementType: $l,
|
|
3708
3870
|
shouldForwardComponentProp: !0,
|
|
3709
3871
|
externalForwardedProps: T,
|
|
3710
|
-
ownerState:
|
|
3711
|
-
className: Je(
|
|
3712
|
-
}), [
|
|
3872
|
+
ownerState: $,
|
|
3873
|
+
className: Je(J.paper, S.className)
|
|
3874
|
+
}), [pa, ua] = we("container", {
|
|
3713
3875
|
elementType: ql,
|
|
3714
3876
|
externalForwardedProps: T,
|
|
3715
|
-
ownerState:
|
|
3716
|
-
className: Je(
|
|
3717
|
-
}), [
|
|
3718
|
-
elementType:
|
|
3877
|
+
ownerState: $,
|
|
3878
|
+
className: Je(J.container)
|
|
3879
|
+
}), [ga, ha] = we("transition", {
|
|
3880
|
+
elementType: At,
|
|
3719
3881
|
externalForwardedProps: T,
|
|
3720
|
-
ownerState:
|
|
3882
|
+
ownerState: $,
|
|
3721
3883
|
additionalProps: {
|
|
3722
3884
|
appear: !0,
|
|
3723
3885
|
in: M,
|
|
3724
|
-
timeout:
|
|
3886
|
+
timeout: q,
|
|
3725
3887
|
role: "presentation"
|
|
3726
3888
|
}
|
|
3727
3889
|
});
|
|
3728
|
-
return /* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ _e(K, j(I(I({
|
|
3729
3891
|
closeAfterTransition: !0,
|
|
3730
3892
|
slots: {
|
|
3731
|
-
backdrop:
|
|
3893
|
+
backdrop: Ee
|
|
3732
3894
|
},
|
|
3733
3895
|
slotProps: {
|
|
3734
3896
|
backdrop: I({
|
|
3735
|
-
transitionDuration:
|
|
3897
|
+
transitionDuration: q,
|
|
3736
3898
|
as: g
|
|
3737
|
-
},
|
|
3899
|
+
}, sa)
|
|
3738
3900
|
},
|
|
3739
3901
|
disableEscapeKeyDown: u,
|
|
3740
3902
|
onClose: y,
|
|
3741
3903
|
open: M,
|
|
3742
3904
|
onClick: W
|
|
3743
|
-
},
|
|
3744
|
-
children: /* @__PURE__ */
|
|
3745
|
-
children: /* @__PURE__ */
|
|
3905
|
+
}, Oe), V), {
|
|
3906
|
+
children: /* @__PURE__ */ _e(ga, j(I({}, ha), {
|
|
3907
|
+
children: /* @__PURE__ */ _e(pa, j(I({
|
|
3746
3908
|
onMouseDown: z
|
|
3747
|
-
},
|
|
3748
|
-
children: /* @__PURE__ */
|
|
3909
|
+
}, ua), {
|
|
3910
|
+
children: /* @__PURE__ */ _e(ca, j(I({
|
|
3749
3911
|
as: D,
|
|
3750
3912
|
elevation: 24,
|
|
3751
3913
|
role: "dialog",
|
|
3752
3914
|
"aria-describedby": s,
|
|
3753
3915
|
"aria-labelledby": Y,
|
|
3754
3916
|
"aria-modal": d
|
|
3755
|
-
},
|
|
3756
|
-
children: /* @__PURE__ */
|
|
3757
|
-
value:
|
|
3917
|
+
}, da), {
|
|
3918
|
+
children: /* @__PURE__ */ _e(ea.Provider, {
|
|
3919
|
+
value: ce,
|
|
3758
3920
|
children: x
|
|
3759
3921
|
})
|
|
3760
3922
|
}))
|
|
@@ -3762,7 +3924,7 @@ const Zl = Ue(ma, {
|
|
|
3762
3924
|
}))
|
|
3763
3925
|
}));
|
|
3764
3926
|
});
|
|
3765
|
-
process.env.NODE_ENV !== "production" && (
|
|
3927
|
+
process.env.NODE_ENV !== "production" && (ta.propTypes = {
|
|
3766
3928
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
3767
3929
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
3768
3930
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -3925,7 +4087,7 @@ process.env.NODE_ENV !== "production" && (ea.propTypes = {
|
|
|
3925
4087
|
*/
|
|
3926
4088
|
TransitionProps: b.object
|
|
3927
4089
|
});
|
|
3928
|
-
function
|
|
4090
|
+
function Hl({
|
|
3929
4091
|
fillColor: e = "#262E3D"
|
|
3930
4092
|
}) {
|
|
3931
4093
|
return /* @__PURE__ */ v("svg", {
|
|
@@ -3949,7 +4111,7 @@ function Bl({
|
|
|
3949
4111
|
})]
|
|
3950
4112
|
});
|
|
3951
4113
|
}
|
|
3952
|
-
const
|
|
4114
|
+
const ra = {
|
|
3953
4115
|
row: {
|
|
3954
4116
|
hover: "rgba(224, 224, 224, 0.3)"
|
|
3955
4117
|
},
|
|
@@ -4034,17 +4196,14 @@ const ta = {
|
|
|
4034
4196
|
errorBG: "rgba(231, 71, 39, 0.1)"
|
|
4035
4197
|
}
|
|
4036
4198
|
}
|
|
4037
|
-
},
|
|
4199
|
+
}, Bl = {
|
|
4038
4200
|
shouldForwardProp: (e) => !e.startsWith("$")
|
|
4039
|
-
},
|
|
4040
|
-
target: "e869yoj0",
|
|
4041
|
-
label: "IconButton"
|
|
4042
|
-
})(({
|
|
4201
|
+
}, je = _(rr, Bl)(({
|
|
4043
4202
|
$hoverColor: e
|
|
4044
4203
|
}) => ({
|
|
4045
4204
|
padding: 2,
|
|
4046
4205
|
"&.MuiIconButton-root:hover": {
|
|
4047
|
-
backgroundColor: e ??
|
|
4206
|
+
backgroundColor: e ?? ra.interaction.defaultHover
|
|
4048
4207
|
}
|
|
4049
4208
|
}));
|
|
4050
4209
|
function Yl({
|
|
@@ -4097,17 +4256,17 @@ function Ql() {
|
|
|
4097
4256
|
})
|
|
4098
4257
|
});
|
|
4099
4258
|
}
|
|
4100
|
-
const
|
|
4259
|
+
const Dt = (e) => ar(e.chart.backgroundColor), Fl = ({
|
|
4101
4260
|
title: e
|
|
4102
4261
|
}) => {
|
|
4103
4262
|
const {
|
|
4104
4263
|
themeSettings: t
|
|
4105
4264
|
} = L();
|
|
4106
|
-
return /* @__PURE__ */ n(
|
|
4265
|
+
return /* @__PURE__ */ n(Ne, {
|
|
4107
4266
|
title: e,
|
|
4108
|
-
children: /* @__PURE__ */ n(
|
|
4267
|
+
children: /* @__PURE__ */ n(je, {
|
|
4109
4268
|
disableTouchRipple: !0,
|
|
4110
|
-
$hoverColor:
|
|
4269
|
+
$hoverColor: Dt(t),
|
|
4111
4270
|
children: /* @__PURE__ */ n(Ul, {
|
|
4112
4271
|
fill: t.chart.textColor
|
|
4113
4272
|
})
|
|
@@ -4124,14 +4283,14 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
|
|
|
4124
4283
|
themeSettings: l
|
|
4125
4284
|
} = L();
|
|
4126
4285
|
return /* @__PURE__ */ v(U, {
|
|
4127
|
-
children: [/* @__PURE__ */ n(
|
|
4286
|
+
children: [/* @__PURE__ */ n(je, {
|
|
4128
4287
|
onClick: a,
|
|
4129
|
-
$hoverColor:
|
|
4288
|
+
$hoverColor: Dt(l),
|
|
4130
4289
|
"aria-label": "three dots button",
|
|
4131
|
-
children: /* @__PURE__ */ n(
|
|
4290
|
+
children: /* @__PURE__ */ n(ei, {
|
|
4132
4291
|
fill: l.chart.textColor
|
|
4133
4292
|
})
|
|
4134
|
-
}), /* @__PURE__ */ n(
|
|
4293
|
+
}), /* @__PURE__ */ n(ri, {
|
|
4135
4294
|
anchorEl: t,
|
|
4136
4295
|
anchorOrigin: {
|
|
4137
4296
|
vertical: "bottom",
|
|
@@ -4143,14 +4302,14 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
|
|
|
4143
4302
|
},
|
|
4144
4303
|
open: !!t,
|
|
4145
4304
|
onClose: i,
|
|
4146
|
-
children: e.map((s) => /* @__PURE__ */ v(
|
|
4305
|
+
children: e.map((s) => /* @__PURE__ */ v(ti, {
|
|
4147
4306
|
onClick: () => {
|
|
4148
4307
|
s.onClick(), i();
|
|
4149
4308
|
},
|
|
4150
4309
|
sx: {
|
|
4151
4310
|
fontSize: "13px",
|
|
4152
4311
|
fontFamily: l.typography.fontFamily,
|
|
4153
|
-
color:
|
|
4312
|
+
color: ra.text.content
|
|
4154
4313
|
},
|
|
4155
4314
|
disableRipple: !0,
|
|
4156
4315
|
children: [s.icon, /* @__PURE__ */ n("div", {
|
|
@@ -4160,7 +4319,7 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
|
|
|
4160
4319
|
}, s.title))
|
|
4161
4320
|
})]
|
|
4162
4321
|
});
|
|
4163
|
-
},
|
|
4322
|
+
}, Jl = ({
|
|
4164
4323
|
onClick: e
|
|
4165
4324
|
}) => {
|
|
4166
4325
|
const {
|
|
@@ -4168,21 +4327,22 @@ const Mt = (e) => or(e.chart.backgroundColor), Fl = ({
|
|
|
4168
4327
|
} = L(), {
|
|
4169
4328
|
t: r
|
|
4170
4329
|
} = E();
|
|
4171
|
-
return /* @__PURE__ */ n(
|
|
4330
|
+
return /* @__PURE__ */ n(Ne, {
|
|
4172
4331
|
title: r("ai.preview"),
|
|
4173
|
-
children: /* @__PURE__ */ n(
|
|
4332
|
+
children: /* @__PURE__ */ n(je, {
|
|
4174
4333
|
onClick: e,
|
|
4175
|
-
$hoverColor:
|
|
4334
|
+
$hoverColor: Dt(t),
|
|
4176
4335
|
children: /* @__PURE__ */ n(Yl, {
|
|
4177
4336
|
fill: t.chart.textColor
|
|
4178
4337
|
})
|
|
4179
4338
|
})
|
|
4180
4339
|
});
|
|
4181
|
-
},
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4340
|
+
}, Xl = _.div`
|
|
4341
|
+
display: flex;
|
|
4342
|
+
padding-top: 6px;
|
|
4343
|
+
padding-bottom: 6px;
|
|
4344
|
+
`;
|
|
4345
|
+
function Kl({
|
|
4186
4346
|
infoTooltipText: e,
|
|
4187
4347
|
onRefresh: t,
|
|
4188
4348
|
onExpand: r
|
|
@@ -4192,18 +4352,18 @@ function Xl({
|
|
|
4192
4352
|
onClick: t,
|
|
4193
4353
|
icon: /* @__PURE__ */ n(Ql, {})
|
|
4194
4354
|
}], [t]);
|
|
4195
|
-
return /* @__PURE__ */ v(
|
|
4355
|
+
return /* @__PURE__ */ v(Xl, {
|
|
4196
4356
|
"aria-label": "chatbot chart toolbar",
|
|
4197
4357
|
children: [/* @__PURE__ */ n(Fl, {
|
|
4198
4358
|
title: e ?? ""
|
|
4199
4359
|
}), /* @__PURE__ */ n(Vl, {
|
|
4200
4360
|
items: a
|
|
4201
|
-
}), /* @__PURE__ */ n(
|
|
4361
|
+
}), /* @__PURE__ */ n(Jl, {
|
|
4202
4362
|
onClick: r
|
|
4203
4363
|
})]
|
|
4204
4364
|
});
|
|
4205
4365
|
}
|
|
4206
|
-
function
|
|
4366
|
+
function es({
|
|
4207
4367
|
content: e
|
|
4208
4368
|
}) {
|
|
4209
4369
|
const [t, r] = Z(!1), {
|
|
@@ -4212,11 +4372,11 @@ function Kl({
|
|
|
4212
4372
|
inlineElement: i,
|
|
4213
4373
|
expandedElement: l
|
|
4214
4374
|
} = Q(() => {
|
|
4215
|
-
const s =
|
|
4375
|
+
const s = Ct(e, {
|
|
4216
4376
|
useCustomizedStyleOptions: !0
|
|
4217
4377
|
});
|
|
4218
|
-
if (s === void 0 || !
|
|
4219
|
-
throw new
|
|
4378
|
+
if (s === void 0 || !or(s))
|
|
4379
|
+
throw new Ie("errors.otherWidgetTypesNotSupported");
|
|
4220
4380
|
const {
|
|
4221
4381
|
detailedDescription: p
|
|
4222
4382
|
} = e, {
|
|
@@ -4224,7 +4384,7 @@ function Kl({
|
|
|
4224
4384
|
} = s, g = {
|
|
4225
4385
|
cornerRadius: "Small",
|
|
4226
4386
|
header: {
|
|
4227
|
-
renderToolbar: (o) => /* @__PURE__ */ n(
|
|
4387
|
+
renderToolbar: (o) => /* @__PURE__ */ n(Kl, {
|
|
4228
4388
|
infoTooltipText: p,
|
|
4229
4389
|
onRefresh: o,
|
|
4230
4390
|
onExpand: () => r(!0)
|
|
@@ -4232,13 +4392,13 @@ function Kl({
|
|
|
4232
4392
|
}
|
|
4233
4393
|
};
|
|
4234
4394
|
let f, x;
|
|
4235
|
-
if (
|
|
4395
|
+
if (Ea(s.chartType))
|
|
4236
4396
|
f = /* @__PURE__ */ n("div", {
|
|
4237
4397
|
className: "csdk-h-[245px]",
|
|
4238
|
-
children: /* @__PURE__ */ n(
|
|
4398
|
+
children: /* @__PURE__ */ n(ze, j(I({}, s), {
|
|
4239
4399
|
styleOptions: g
|
|
4240
4400
|
}))
|
|
4241
|
-
}), x = /* @__PURE__ */ n(
|
|
4401
|
+
}), x = /* @__PURE__ */ n(ze, j(I({}, s), {
|
|
4242
4402
|
styleOptions: {
|
|
4243
4403
|
header: {
|
|
4244
4404
|
hidden: !0
|
|
@@ -4256,10 +4416,10 @@ function Kl({
|
|
|
4256
4416
|
yAxis: void 0
|
|
4257
4417
|
}), g);
|
|
4258
4418
|
delete u.legend, delete u.xAxis, delete u.yAxis, f = /* @__PURE__ */ n("div", {
|
|
4259
|
-
children: /* @__PURE__ */ n(
|
|
4419
|
+
children: /* @__PURE__ */ n(ze, j(I({}, s), {
|
|
4260
4420
|
styleOptions: u
|
|
4261
4421
|
}))
|
|
4262
|
-
}), x = /* @__PURE__ */ n(
|
|
4422
|
+
}), x = /* @__PURE__ */ n(ze, j(I({}, s), {
|
|
4263
4423
|
styleOptions: I({
|
|
4264
4424
|
cornerRadius: "None"
|
|
4265
4425
|
}, o)
|
|
@@ -4271,7 +4431,7 @@ function Kl({
|
|
|
4271
4431
|
};
|
|
4272
4432
|
}, [e]);
|
|
4273
4433
|
return /* @__PURE__ */ v(U, {
|
|
4274
|
-
children: [i, /* @__PURE__ */ v(
|
|
4434
|
+
children: [i, /* @__PURE__ */ v(ta, {
|
|
4275
4435
|
open: t,
|
|
4276
4436
|
onClose: () => r(!1),
|
|
4277
4437
|
maxWidth: "xl",
|
|
@@ -4287,10 +4447,10 @@ function Kl({
|
|
|
4287
4447
|
children: [/* @__PURE__ */ n("div", {
|
|
4288
4448
|
className: "csdk-text-ai-lg csdk-semibold",
|
|
4289
4449
|
children: e.queryTitle
|
|
4290
|
-
}), /* @__PURE__ */ n(
|
|
4450
|
+
}), /* @__PURE__ */ n(rr, {
|
|
4291
4451
|
onClick: () => r(!1),
|
|
4292
4452
|
"aria-label": "close expanded chart",
|
|
4293
|
-
children: /* @__PURE__ */ n(
|
|
4453
|
+
children: /* @__PURE__ */ n(Hl, {
|
|
4294
4454
|
fillColor: a.aiChat.primaryTextColor
|
|
4295
4455
|
})
|
|
4296
4456
|
})]
|
|
@@ -4301,7 +4461,7 @@ function Kl({
|
|
|
4301
4461
|
})]
|
|
4302
4462
|
});
|
|
4303
4463
|
}
|
|
4304
|
-
function
|
|
4464
|
+
function ts({
|
|
4305
4465
|
theme: e
|
|
4306
4466
|
}) {
|
|
4307
4467
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4318,7 +4478,7 @@ function es({
|
|
|
4318
4478
|
})
|
|
4319
4479
|
});
|
|
4320
4480
|
}
|
|
4321
|
-
function
|
|
4481
|
+
function rs({
|
|
4322
4482
|
onClick: e,
|
|
4323
4483
|
disabled: t
|
|
4324
4484
|
}) {
|
|
@@ -4327,20 +4487,20 @@ function ts({
|
|
|
4327
4487
|
} = L(), {
|
|
4328
4488
|
t: a
|
|
4329
4489
|
} = E();
|
|
4330
|
-
return /* @__PURE__ */ n(
|
|
4490
|
+
return /* @__PURE__ */ n(Ne, {
|
|
4331
4491
|
title: a("ai.buttons.incorrectResponse"),
|
|
4332
|
-
children: /* @__PURE__ */ n(
|
|
4492
|
+
children: /* @__PURE__ */ n(je, {
|
|
4333
4493
|
"aria-label": "thumbs-down",
|
|
4334
4494
|
onClick: e,
|
|
4335
4495
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
4336
4496
|
disabled: t,
|
|
4337
|
-
children: /* @__PURE__ */ n(
|
|
4497
|
+
children: /* @__PURE__ */ n(ts, {
|
|
4338
4498
|
theme: r
|
|
4339
4499
|
})
|
|
4340
4500
|
})
|
|
4341
4501
|
});
|
|
4342
4502
|
}
|
|
4343
|
-
function
|
|
4503
|
+
function as({
|
|
4344
4504
|
theme: e
|
|
4345
4505
|
}) {
|
|
4346
4506
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4357,7 +4517,7 @@ function rs({
|
|
|
4357
4517
|
})
|
|
4358
4518
|
});
|
|
4359
4519
|
}
|
|
4360
|
-
function
|
|
4520
|
+
function is({
|
|
4361
4521
|
onClick: e,
|
|
4362
4522
|
disabled: t
|
|
4363
4523
|
}) {
|
|
@@ -4366,21 +4526,21 @@ function as({
|
|
|
4366
4526
|
} = L(), {
|
|
4367
4527
|
t: a
|
|
4368
4528
|
} = E();
|
|
4369
|
-
return /* @__PURE__ */ n(
|
|
4529
|
+
return /* @__PURE__ */ n(Ne, {
|
|
4370
4530
|
title: a("ai.buttons.correctResponse"),
|
|
4371
|
-
children: /* @__PURE__ */ n(
|
|
4531
|
+
children: /* @__PURE__ */ n(je, {
|
|
4372
4532
|
"aria-label": "thumbs-up",
|
|
4373
4533
|
onClick: e,
|
|
4374
4534
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
4375
4535
|
disabled: t,
|
|
4376
|
-
children: /* @__PURE__ */ n(
|
|
4536
|
+
children: /* @__PURE__ */ n(as, {
|
|
4377
4537
|
theme: r
|
|
4378
4538
|
})
|
|
4379
4539
|
})
|
|
4380
4540
|
});
|
|
4381
4541
|
}
|
|
4382
|
-
const
|
|
4383
|
-
const [e, t] = Z(!1), r =
|
|
4542
|
+
const os = () => {
|
|
4543
|
+
const [e, t] = Z(!1), r = pe(null), a = N(() => {
|
|
4384
4544
|
t(!0);
|
|
4385
4545
|
}, []), i = N(() => {
|
|
4386
4546
|
t(!1);
|
|
@@ -4389,13 +4549,14 @@ const is = () => {
|
|
|
4389
4549
|
var s;
|
|
4390
4550
|
((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (l == null ? void 0 : l.nodeType) === Node.ELEMENT_NODE && (l.addEventListener("mouseenter", a), l.addEventListener("mouseleave", i)), r.current = l;
|
|
4391
4551
|
}, [a, i]), e];
|
|
4392
|
-
},
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4552
|
+
}, ns = _.div`
|
|
4553
|
+
display: flex;
|
|
4554
|
+
flex-direction: column;
|
|
4555
|
+
row-gap: ${({
|
|
4396
4556
|
theme: e
|
|
4397
|
-
}) => e.aiChat.body.gapBetweenMessages
|
|
4398
|
-
|
|
4557
|
+
}) => e.aiChat.body.gapBetweenMessages};
|
|
4558
|
+
`;
|
|
4559
|
+
function ls({
|
|
4399
4560
|
visible: e,
|
|
4400
4561
|
onSend: t
|
|
4401
4562
|
}) {
|
|
@@ -4404,10 +4565,10 @@ function ns({
|
|
|
4404
4565
|
}, [t]);
|
|
4405
4566
|
return e ? /* @__PURE__ */ v("div", {
|
|
4406
4567
|
className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
|
|
4407
|
-
children: [/* @__PURE__ */ n(
|
|
4568
|
+
children: [/* @__PURE__ */ n(is, {
|
|
4408
4569
|
onClick: () => i("up"),
|
|
4409
4570
|
disabled: r
|
|
4410
|
-
}), /* @__PURE__ */ n(
|
|
4571
|
+
}), /* @__PURE__ */ n(rs, {
|
|
4411
4572
|
onClick: () => i("down"),
|
|
4412
4573
|
disabled: r
|
|
4413
4574
|
})]
|
|
@@ -4420,34 +4581,34 @@ function Vt({
|
|
|
4420
4581
|
buttonVisibility: a = "onHover",
|
|
4421
4582
|
renderContent: i
|
|
4422
4583
|
}) {
|
|
4423
|
-
const l =
|
|
4584
|
+
const l = ie(), s = za(N((x) => {
|
|
4424
4585
|
l && l.ai.sendFeedback({
|
|
4425
4586
|
sourceId: e,
|
|
4426
4587
|
type: r,
|
|
4427
4588
|
data: t,
|
|
4428
4589
|
rating: x
|
|
4429
4590
|
});
|
|
4430
|
-
}, [l, e, t, r]), 200), [p, d] =
|
|
4591
|
+
}, [l, e, t, r]), 200), [p, d] = os(), g = Q(() => a === "onHover" ? d : a !== "never", [d, a]), {
|
|
4431
4592
|
themeSettings: f
|
|
4432
4593
|
} = L();
|
|
4433
|
-
return /* @__PURE__ */ n(
|
|
4594
|
+
return /* @__PURE__ */ n(ns, {
|
|
4434
4595
|
ref: p,
|
|
4435
4596
|
theme: f,
|
|
4436
|
-
children: i(/* @__PURE__ */ n(
|
|
4597
|
+
children: i(/* @__PURE__ */ n(ls, {
|
|
4437
4598
|
onSend: s,
|
|
4438
4599
|
visible: g
|
|
4439
4600
|
}))
|
|
4440
4601
|
});
|
|
4441
4602
|
}
|
|
4442
|
-
const
|
|
4443
|
-
function
|
|
4603
|
+
const ss = 18 * 5;
|
|
4604
|
+
function aa({
|
|
4444
4605
|
text: e
|
|
4445
4606
|
}) {
|
|
4446
4607
|
const [t, r] = Z(!0), [a, i] = Z(!1), {
|
|
4447
4608
|
t: l
|
|
4448
|
-
} = E(), s =
|
|
4609
|
+
} = E(), s = pe(null);
|
|
4449
4610
|
return qe(() => {
|
|
4450
|
-
s.current && s.current.scrollHeight >
|
|
4611
|
+
s.current && s.current.scrollHeight > ss && i(!0);
|
|
4451
4612
|
}, [e]), /* @__PURE__ */ v("div", {
|
|
4452
4613
|
children: [/* @__PURE__ */ n("div", {
|
|
4453
4614
|
ref: s,
|
|
@@ -4463,38 +4624,39 @@ function ra({
|
|
|
4463
4624
|
})]
|
|
4464
4625
|
});
|
|
4465
4626
|
}
|
|
4466
|
-
function
|
|
4627
|
+
function cs({
|
|
4467
4628
|
nlgRequest: e
|
|
4468
4629
|
}) {
|
|
4469
4630
|
const {
|
|
4470
4631
|
data: t,
|
|
4471
4632
|
isLoading: r,
|
|
4472
4633
|
isError: a
|
|
4473
|
-
} =
|
|
4634
|
+
} = Dr(e), {
|
|
4474
4635
|
t: i
|
|
4475
4636
|
} = E();
|
|
4476
|
-
return r ? /* @__PURE__ */ n(
|
|
4637
|
+
return r ? /* @__PURE__ */ n(Er, {}) : a ? /* @__PURE__ */ n(se, {
|
|
4477
4638
|
align: "left",
|
|
4478
4639
|
children: i("ai.errors.unexpected")
|
|
4479
|
-
}) : /* @__PURE__ */ n(
|
|
4640
|
+
}) : /* @__PURE__ */ n(se, {
|
|
4480
4641
|
align: "full",
|
|
4481
|
-
children: /* @__PURE__ */ n(
|
|
4642
|
+
children: /* @__PURE__ */ n(aa, {
|
|
4482
4643
|
text: t ?? i("ai.errors.insightsNotAvailable")
|
|
4483
4644
|
})
|
|
4484
4645
|
});
|
|
4485
4646
|
}
|
|
4486
|
-
const
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4647
|
+
const Jt = _.div`
|
|
4648
|
+
display: flex;
|
|
4649
|
+
align-items: center;
|
|
4650
|
+
column-gap: 10px;
|
|
4651
|
+
`, ds = (e) => !!e && "aeiou".includes(e[0]);
|
|
4652
|
+
function ps({
|
|
4491
4653
|
data: e,
|
|
4492
4654
|
alwaysShowFeedback: t
|
|
4493
4655
|
}) {
|
|
4494
4656
|
const {
|
|
4495
4657
|
chatMode: r = "analyze",
|
|
4496
4658
|
enableInsights: a
|
|
4497
|
-
} =
|
|
4659
|
+
} = oe(), {
|
|
4498
4660
|
themeSettings: i
|
|
4499
4661
|
} = L(), {
|
|
4500
4662
|
queryTitle: l,
|
|
@@ -4506,7 +4668,7 @@ function ds({
|
|
|
4506
4668
|
console.debug(`JAQL for ${l}`, p), console.debug(`chart recommendations for ${l}`, s);
|
|
4507
4669
|
const f = "chartType" in s ? s.chartType : "table";
|
|
4508
4670
|
let x;
|
|
4509
|
-
|
|
4671
|
+
ds(f) ? x = `an ${f}` : x = `a ${f}`, f !== "table" && (x += " chart");
|
|
4510
4672
|
const o = p.datasource.title, [u, c] = Z(!1), m = N(() => {
|
|
4511
4673
|
c((y) => !y);
|
|
4512
4674
|
}, []), h = {
|
|
@@ -4514,7 +4676,7 @@ function ds({
|
|
|
4514
4676
|
datasource: p.datasource,
|
|
4515
4677
|
metadata: p.metadata
|
|
4516
4678
|
}
|
|
4517
|
-
}, w = r === "analyze",
|
|
4679
|
+
}, w = r === "analyze", C = `${d}${d && g ? `
|
|
4518
4680
|
` : ""}${g}`;
|
|
4519
4681
|
return /* @__PURE__ */ v(U, {
|
|
4520
4682
|
children: [/* @__PURE__ */ n(Vt, {
|
|
@@ -4523,13 +4685,13 @@ function ds({
|
|
|
4523
4685
|
type: "chats/nlq",
|
|
4524
4686
|
buttonVisibility: t ? "always" : "onHover",
|
|
4525
4687
|
renderContent: (y) => /* @__PURE__ */ v(U, {
|
|
4526
|
-
children: [/* @__PURE__ */ v(
|
|
4527
|
-
children: [/* @__PURE__ */ n(
|
|
4688
|
+
children: [/* @__PURE__ */ v(Jt, {
|
|
4689
|
+
children: [/* @__PURE__ */ n(Kr, {
|
|
4528
4690
|
align: "left",
|
|
4529
4691
|
theme: i,
|
|
4530
|
-
children:
|
|
4692
|
+
children: C || `Here's ${x} showing ${El(l)}.`
|
|
4531
4693
|
}), y]
|
|
4532
|
-
}), w && /* @__PURE__ */ n(
|
|
4694
|
+
}), w && /* @__PURE__ */ n(es, {
|
|
4533
4695
|
content: e
|
|
4534
4696
|
})]
|
|
4535
4697
|
})
|
|
@@ -4539,60 +4701,60 @@ function ds({
|
|
|
4539
4701
|
type: "nlg/queryResult",
|
|
4540
4702
|
buttonVisibility: u ? "onHover" : "never",
|
|
4541
4703
|
renderContent: (y) => /* @__PURE__ */ v(U, {
|
|
4542
|
-
children: [/* @__PURE__ */ v(
|
|
4543
|
-
children: [/* @__PURE__ */ n(
|
|
4704
|
+
children: [/* @__PURE__ */ v(Jt, {
|
|
4705
|
+
children: [/* @__PURE__ */ n(Rl, {
|
|
4544
4706
|
onClick: m
|
|
4545
4707
|
}), y]
|
|
4546
|
-
}), u && /* @__PURE__ */ n(
|
|
4708
|
+
}), u && /* @__PURE__ */ n(cs, {
|
|
4547
4709
|
nlgRequest: h
|
|
4548
4710
|
})]
|
|
4549
4711
|
})
|
|
4550
4712
|
})]
|
|
4551
4713
|
});
|
|
4552
4714
|
}
|
|
4553
|
-
function
|
|
4715
|
+
function us({
|
|
4554
4716
|
message: e,
|
|
4555
4717
|
isLastMessage: t
|
|
4556
4718
|
}) {
|
|
4557
|
-
if (
|
|
4719
|
+
if (Nr(e)) {
|
|
4558
4720
|
const a = JSON.parse(e.content);
|
|
4559
|
-
return /* @__PURE__ */ n(
|
|
4721
|
+
return /* @__PURE__ */ n(ps, {
|
|
4560
4722
|
data: a,
|
|
4561
4723
|
alwaysShowFeedback: t
|
|
4562
4724
|
});
|
|
4563
4725
|
}
|
|
4564
|
-
const r =
|
|
4565
|
-
return /* @__PURE__ */ n(
|
|
4726
|
+
const r = Bo(e) ? JSON.parse(e.content).answer : e.content;
|
|
4727
|
+
return /* @__PURE__ */ n(se, {
|
|
4566
4728
|
align: e.role === "user" ? "right" : "left",
|
|
4567
4729
|
children: r
|
|
4568
4730
|
});
|
|
4569
4731
|
}
|
|
4570
|
-
const
|
|
4732
|
+
const gs = ka(us), hs = ({
|
|
4571
4733
|
error: e,
|
|
4572
4734
|
displayMessage: t
|
|
4573
|
-
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(
|
|
4735
|
+
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ n(se, {
|
|
4574
4736
|
align: "left",
|
|
4575
4737
|
children: t
|
|
4576
4738
|
}));
|
|
4577
|
-
function
|
|
4739
|
+
function ms({
|
|
4578
4740
|
messages: e
|
|
4579
4741
|
}) {
|
|
4580
4742
|
const {
|
|
4581
4743
|
t
|
|
4582
4744
|
} = E();
|
|
4583
4745
|
return /* @__PURE__ */ n(U, {
|
|
4584
|
-
children: e.map((r, a) => /* @__PURE__ */ n(
|
|
4585
|
-
fallbackRender: (i) =>
|
|
4746
|
+
children: e.map((r, a) => /* @__PURE__ */ n(Ra, {
|
|
4747
|
+
fallbackRender: (i) => hs(j(I({}, i), {
|
|
4586
4748
|
displayMessage: t("ai.errors.unexpected")
|
|
4587
4749
|
})),
|
|
4588
|
-
children: /* @__PURE__ */ n(
|
|
4750
|
+
children: /* @__PURE__ */ n(gs, {
|
|
4589
4751
|
message: r,
|
|
4590
4752
|
isLastMessage: a === e.length - 1
|
|
4591
4753
|
}, a)
|
|
4592
4754
|
}, a))
|
|
4593
4755
|
});
|
|
4594
4756
|
}
|
|
4595
|
-
function
|
|
4757
|
+
function ia({
|
|
4596
4758
|
color: e
|
|
4597
4759
|
}) {
|
|
4598
4760
|
return /* @__PURE__ */ n("svg", {
|
|
@@ -4607,7 +4769,7 @@ function aa({
|
|
|
4607
4769
|
})
|
|
4608
4770
|
});
|
|
4609
4771
|
}
|
|
4610
|
-
function
|
|
4772
|
+
function bs({
|
|
4611
4773
|
onClick: e,
|
|
4612
4774
|
color: t
|
|
4613
4775
|
}) {
|
|
@@ -4615,12 +4777,12 @@ function ms({
|
|
|
4615
4777
|
"aria-label": "go back",
|
|
4616
4778
|
className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
|
|
4617
4779
|
onClick: e,
|
|
4618
|
-
children: /* @__PURE__ */ n(
|
|
4780
|
+
children: /* @__PURE__ */ n(ia, {
|
|
4619
4781
|
color: t
|
|
4620
4782
|
})
|
|
4621
4783
|
});
|
|
4622
4784
|
}
|
|
4623
|
-
function
|
|
4785
|
+
function fs() {
|
|
4624
4786
|
const {
|
|
4625
4787
|
themeSettings: e
|
|
4626
4788
|
} = L();
|
|
@@ -4638,65 +4800,99 @@ function bs() {
|
|
|
4638
4800
|
})
|
|
4639
4801
|
});
|
|
4640
4802
|
}
|
|
4641
|
-
const
|
|
4642
|
-
const r = new
|
|
4803
|
+
const xs = (e, t) => {
|
|
4804
|
+
const r = new Ca(e);
|
|
4643
4805
|
return r.alpha = t, r;
|
|
4644
|
-
},
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4806
|
+
}, ks = _.div`
|
|
4807
|
+
font-size: inherit;
|
|
4808
|
+
line-height: inherit;
|
|
4809
|
+
padding-left: 8px;
|
|
4810
|
+
padding-right: 8px;
|
|
4811
|
+
padding-top: 4px;
|
|
4812
|
+
border-radius: 16px;
|
|
4813
|
+
margin-bottom: 4px;
|
|
4814
|
+
box-shadow: ${({
|
|
4648
4815
|
theme: e
|
|
4649
|
-
}) => `0 4px 8px 0 ${
|
|
4816
|
+
}) => `0 4px 8px 0 ${xs(e.aiChat.primaryTextColor, 0.2)}`};
|
|
4817
|
+
cursor: pointer;
|
|
4818
|
+
color: ${({
|
|
4650
4819
|
theme: e
|
|
4651
|
-
}) => e.aiChat.clickableMessages.textColor
|
|
4820
|
+
}) => e.aiChat.clickableMessages.textColor};
|
|
4821
|
+
background-color: ${({
|
|
4652
4822
|
theme: e
|
|
4653
|
-
}) => e.aiChat.clickableMessages.backgroundColor
|
|
4823
|
+
}) => e.aiChat.clickableMessages.backgroundColor};
|
|
4824
|
+
|
|
4825
|
+
&:hover {
|
|
4826
|
+
color: ${({
|
|
4654
4827
|
theme: e
|
|
4655
|
-
}) => e.aiChat.clickableMessages.hover.textColor
|
|
4828
|
+
}) => e.aiChat.clickableMessages.hover.textColor};
|
|
4829
|
+
background-color: ${({
|
|
4656
4830
|
theme: e
|
|
4657
|
-
}) => e.aiChat.clickableMessages.hover.backgroundColor
|
|
4831
|
+
}) => e.aiChat.clickableMessages.hover.backgroundColor};
|
|
4832
|
+
box-shadow: none;
|
|
4833
|
+
`, ys = ({
|
|
4658
4834
|
onClick: e
|
|
4659
4835
|
}) => {
|
|
4660
4836
|
const {
|
|
4661
4837
|
themeSettings: t
|
|
4662
4838
|
} = L();
|
|
4663
|
-
return /* @__PURE__ */ n(
|
|
4839
|
+
return /* @__PURE__ */ n(ks, {
|
|
4664
4840
|
theme: t,
|
|
4665
4841
|
onClick: e,
|
|
4666
|
-
children: /* @__PURE__ */ n(
|
|
4842
|
+
children: /* @__PURE__ */ n(fs, {})
|
|
4667
4843
|
});
|
|
4668
|
-
},
|
|
4844
|
+
}, ws = ({
|
|
4669
4845
|
isVisible: e,
|
|
4670
4846
|
onClick: t,
|
|
4671
4847
|
anchorElement: r
|
|
4672
|
-
}) => /* @__PURE__ */ n(
|
|
4848
|
+
}) => /* @__PURE__ */ n(nr, {
|
|
4673
4849
|
anchorEl: r,
|
|
4674
4850
|
open: e,
|
|
4675
4851
|
placement: "top",
|
|
4676
4852
|
sx: {
|
|
4677
4853
|
zIndex: 2
|
|
4678
4854
|
},
|
|
4679
|
-
children: /* @__PURE__ */ n(
|
|
4855
|
+
children: /* @__PURE__ */ n(ys, {
|
|
4680
4856
|
onClick: t
|
|
4681
4857
|
})
|
|
4682
|
-
}),
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4858
|
+
}), _s = _.button`
|
|
4859
|
+
font-size: inherit;
|
|
4860
|
+
line-height: inherit;
|
|
4861
|
+
box-sizing: border-box;
|
|
4862
|
+
border-width: 1px;
|
|
4863
|
+
padding-left: 1rem;
|
|
4864
|
+
padding-right: 1rem;
|
|
4865
|
+
padding-top: 0.5rem;
|
|
4866
|
+
padding-bottom: 0.5rem;
|
|
4867
|
+
cursor: pointer;
|
|
4868
|
+
text-align: left;
|
|
4869
|
+
max-width: 85%;
|
|
4870
|
+
|
|
4871
|
+
font-family: ${({
|
|
4686
4872
|
theme: e
|
|
4687
|
-
}) => e.typography.fontFamily
|
|
4873
|
+
}) => e.typography.fontFamily};
|
|
4874
|
+
color: ${({
|
|
4688
4875
|
theme: e
|
|
4689
|
-
}) => e.aiChat.suggestions.textColor
|
|
4876
|
+
}) => e.aiChat.suggestions.textColor};
|
|
4877
|
+
background-color: ${({
|
|
4690
4878
|
theme: e
|
|
4691
|
-
}) => e.aiChat.suggestions.backgroundColor
|
|
4879
|
+
}) => e.aiChat.suggestions.backgroundColor};
|
|
4880
|
+
border: ${({
|
|
4692
4881
|
theme: e
|
|
4693
|
-
}) => e.aiChat.suggestions.border
|
|
4882
|
+
}) => e.aiChat.suggestions.border};
|
|
4883
|
+
border-radius: ${({
|
|
4694
4884
|
theme: e
|
|
4695
|
-
}) => e.aiChat.suggestions.borderRadius
|
|
4885
|
+
}) => e.aiChat.suggestions.borderRadius};
|
|
4886
|
+
&:hover {
|
|
4887
|
+
background-color: ${({
|
|
4696
4888
|
theme: e
|
|
4697
|
-
}) => e.aiChat.suggestions.hover.backgroundColor
|
|
4889
|
+
}) => e.aiChat.suggestions.hover.backgroundColor};
|
|
4890
|
+
color: ${({
|
|
4698
4891
|
theme: e
|
|
4699
|
-
}) => e.aiChat.suggestions.hover.textColor
|
|
4892
|
+
}) => e.aiChat.suggestions.hover.textColor};
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
${({
|
|
4700
4896
|
theme: e
|
|
4701
4897
|
}) => {
|
|
4702
4898
|
const {
|
|
@@ -4726,27 +4922,30 @@ const fs = (e, t) => {
|
|
|
4726
4922
|
`;
|
|
4727
4923
|
}
|
|
4728
4924
|
return "";
|
|
4729
|
-
}
|
|
4730
|
-
|
|
4925
|
+
}}
|
|
4926
|
+
`;
|
|
4927
|
+
function Xt({
|
|
4731
4928
|
question: e,
|
|
4732
4929
|
onClick: t
|
|
4733
4930
|
}) {
|
|
4734
4931
|
const {
|
|
4735
4932
|
themeSettings: r
|
|
4736
4933
|
} = L();
|
|
4737
|
-
return /* @__PURE__ */ n(
|
|
4934
|
+
return /* @__PURE__ */ n(_s, {
|
|
4738
4935
|
onClick: t,
|
|
4739
4936
|
theme: r,
|
|
4740
4937
|
children: e
|
|
4741
4938
|
});
|
|
4742
4939
|
}
|
|
4743
|
-
const
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4940
|
+
const Cs = _.div`
|
|
4941
|
+
display: flex;
|
|
4942
|
+
flex-direction: column;
|
|
4943
|
+
align-items: flex-start;
|
|
4944
|
+
row-gap: ${({
|
|
4747
4945
|
theme: e
|
|
4748
|
-
}) => e.aiChat.suggestions.gap
|
|
4749
|
-
|
|
4946
|
+
}) => e.aiChat.suggestions.gap};
|
|
4947
|
+
`;
|
|
4948
|
+
function vs({
|
|
4750
4949
|
questions: e,
|
|
4751
4950
|
onSelection: t
|
|
4752
4951
|
}) {
|
|
@@ -4755,22 +4954,23 @@ function Cs({
|
|
|
4755
4954
|
} = E(), [a, i] = Z(!0), l = Q(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
|
|
4756
4955
|
themeSettings: s
|
|
4757
4956
|
} = L();
|
|
4758
|
-
return /* @__PURE__ */ v(
|
|
4957
|
+
return /* @__PURE__ */ v(Cs, {
|
|
4759
4958
|
"aria-label": "list of suggested questions",
|
|
4760
4959
|
theme: s,
|
|
4761
|
-
children: [l.map((p) => /* @__PURE__ */ n(
|
|
4960
|
+
children: [l.map((p) => /* @__PURE__ */ n(Xt, {
|
|
4762
4961
|
question: p,
|
|
4763
4962
|
onClick: () => t(p)
|
|
4764
|
-
}, p)), l.length < e.length && /* @__PURE__ */ n(
|
|
4963
|
+
}, p)), l.length < e.length && /* @__PURE__ */ n(Xt, {
|
|
4765
4964
|
question: r("ai.buttons.seeMore"),
|
|
4766
4965
|
onClick: () => i(!1)
|
|
4767
4966
|
})]
|
|
4768
4967
|
});
|
|
4769
4968
|
}
|
|
4770
|
-
const
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4969
|
+
const Ss = _.div`
|
|
4970
|
+
width: 283px;
|
|
4971
|
+
height: 32px;
|
|
4972
|
+
border-radius: 10px;
|
|
4973
|
+
background: ${({
|
|
4774
4974
|
theme: e
|
|
4775
4975
|
}) => {
|
|
4776
4976
|
const [t, r] = e.aiChat.suggestions.loadingGradient;
|
|
@@ -4780,71 +4980,98 @@ const vs = /* @__PURE__ */ C("div", {
|
|
|
4780
4980
|
${r} 50%,
|
|
4781
4981
|
${t} 100%
|
|
4782
4982
|
)`;
|
|
4783
|
-
}
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4983
|
+
}};
|
|
4984
|
+
background-size: 200% auto;
|
|
4985
|
+
animation: gradient 2s linear infinite;
|
|
4986
|
+
|
|
4987
|
+
@keyframes gradient {
|
|
4988
|
+
0% {
|
|
4989
|
+
background-position: 0 0;
|
|
4990
|
+
}
|
|
4991
|
+
100% {
|
|
4992
|
+
background-position: -200% 0;
|
|
4993
|
+
}
|
|
4994
|
+
}
|
|
4995
|
+
`, Ms = _.div`
|
|
4996
|
+
display: flex;
|
|
4997
|
+
flex-direction: column;
|
|
4998
|
+
row-gap: 1rem;
|
|
4999
|
+
`;
|
|
5000
|
+
function Is() {
|
|
4788
5001
|
const {
|
|
4789
5002
|
themeSettings: e
|
|
4790
5003
|
} = L();
|
|
4791
|
-
return /* @__PURE__ */ n(
|
|
5004
|
+
return /* @__PURE__ */ n(Ms, {
|
|
4792
5005
|
children: Array.from({
|
|
4793
5006
|
length: 3
|
|
4794
|
-
}, (t, r) => /* @__PURE__ */ n(
|
|
5007
|
+
}, (t, r) => /* @__PURE__ */ n(Ss, {
|
|
4795
5008
|
theme: e
|
|
4796
5009
|
}, r))
|
|
4797
5010
|
});
|
|
4798
5011
|
}
|
|
4799
|
-
function
|
|
5012
|
+
function Ds({
|
|
4800
5013
|
questions: e,
|
|
4801
5014
|
isLoading: t,
|
|
4802
5015
|
onSelection: r
|
|
4803
5016
|
}) {
|
|
4804
5017
|
const a = e.length > 0, {
|
|
4805
5018
|
suggestionsWelcomeText: i
|
|
4806
|
-
} =
|
|
4807
|
-
return t ? /* @__PURE__ */ n(
|
|
4808
|
-
children: [i && /* @__PURE__ */ n(
|
|
5019
|
+
} = oe();
|
|
5020
|
+
return t ? /* @__PURE__ */ n(Is, {}) : a ? /* @__PURE__ */ v(U, {
|
|
5021
|
+
children: [i && /* @__PURE__ */ n(se, {
|
|
4809
5022
|
align: "left",
|
|
4810
5023
|
children: i
|
|
4811
|
-
}), /* @__PURE__ */ n(
|
|
5024
|
+
}), /* @__PURE__ */ n(vs, {
|
|
4812
5025
|
onSelection: r,
|
|
4813
5026
|
questions: e
|
|
4814
5027
|
})]
|
|
4815
5028
|
}) : null;
|
|
4816
5029
|
}
|
|
4817
|
-
const
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
5030
|
+
const As = _.div`
|
|
5031
|
+
display: flex;
|
|
5032
|
+
flex-direction: column;
|
|
5033
|
+
row-gap: ${({
|
|
4821
5034
|
theme: e
|
|
4822
|
-
}) => e.aiChat.body.gapBetweenMessages
|
|
5035
|
+
}) => e.aiChat.body.gapBetweenMessages};
|
|
5036
|
+
overflow-y: scroll;
|
|
5037
|
+
padding-left: ${({
|
|
4823
5038
|
theme: e
|
|
4824
|
-
}) => e.aiChat.body.paddingLeft
|
|
5039
|
+
}) => e.aiChat.body.paddingLeft};
|
|
5040
|
+
padding-right: ${({
|
|
4825
5041
|
theme: e
|
|
4826
|
-
}) => e.aiChat.body.paddingRight
|
|
5042
|
+
}) => e.aiChat.body.paddingRight};
|
|
5043
|
+
padding-top: ${({
|
|
4827
5044
|
theme: e
|
|
4828
|
-
}) => e.aiChat.body.paddingTop
|
|
5045
|
+
}) => e.aiChat.body.paddingTop};
|
|
5046
|
+
padding-bottom: ${({
|
|
4829
5047
|
theme: e
|
|
4830
|
-
}) => e.aiChat.body.paddingBottom
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
5048
|
+
}) => e.aiChat.body.paddingBottom};
|
|
5049
|
+
flex: initial;
|
|
5050
|
+
height: 100%;
|
|
5051
|
+
`, Ls = _.div`
|
|
5052
|
+
padding-left: ${({
|
|
4834
5053
|
theme: e
|
|
4835
|
-
}) => e.aiChat.footer.paddingLeft
|
|
5054
|
+
}) => e.aiChat.footer.paddingLeft};
|
|
5055
|
+
padding-right: ${({
|
|
4836
5056
|
theme: e
|
|
4837
|
-
}) => e.aiChat.footer.paddingRight
|
|
5057
|
+
}) => e.aiChat.footer.paddingRight};
|
|
5058
|
+
padding-top: ${({
|
|
4838
5059
|
theme: e
|
|
4839
|
-
}) => e.aiChat.footer.paddingTop
|
|
5060
|
+
}) => e.aiChat.footer.paddingTop};
|
|
5061
|
+
padding-bottom: ${({
|
|
4840
5062
|
theme: e
|
|
4841
|
-
}) => e.aiChat.footer.paddingBottom
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
5063
|
+
}) => e.aiChat.footer.paddingBottom};
|
|
5064
|
+
display: flex;
|
|
5065
|
+
flex-direction: column;
|
|
5066
|
+
row-gap: 6px;
|
|
5067
|
+
`, Ts = _.div`
|
|
5068
|
+
display: flex;
|
|
5069
|
+
flex-direction: column;
|
|
5070
|
+
row-gap: ${({
|
|
4845
5071
|
theme: e
|
|
4846
|
-
}) => e.aiChat.suggestions.gap
|
|
4847
|
-
|
|
5072
|
+
}) => e.aiChat.suggestions.gap};
|
|
5073
|
+
`;
|
|
5074
|
+
function Ns({
|
|
4848
5075
|
contextTitle: e,
|
|
4849
5076
|
onGoBack: t,
|
|
4850
5077
|
contextDetails: r
|
|
@@ -4858,19 +5085,19 @@ function Ts({
|
|
|
4858
5085
|
numOfRecentPrompts: g,
|
|
4859
5086
|
numOfRecommendations: f,
|
|
4860
5087
|
customPrompt: x
|
|
4861
|
-
} =
|
|
5088
|
+
} = oe(), {
|
|
4862
5089
|
themeSettings: o
|
|
4863
5090
|
} = L(), {
|
|
4864
5091
|
data: u,
|
|
4865
5092
|
isLoading: c,
|
|
4866
5093
|
isError: m
|
|
4867
|
-
} =
|
|
5094
|
+
} = Oo({
|
|
4868
5095
|
contextTitle: e,
|
|
4869
5096
|
count: f,
|
|
4870
5097
|
customPrompt: x
|
|
4871
5098
|
}), h = Q(() => u == null ? void 0 : u.map((T) => T.nlqPrompt), [u]), {
|
|
4872
5099
|
history: w,
|
|
4873
|
-
lastNlqResponse:
|
|
5100
|
+
lastNlqResponse: C,
|
|
4874
5101
|
isAwaitingResponse: y,
|
|
4875
5102
|
sendMessage: M,
|
|
4876
5103
|
isLoading: D,
|
|
@@ -4878,65 +5105,65 @@ function Ts({
|
|
|
4878
5105
|
lastError: A
|
|
4879
5106
|
} = Yo(e, r), {
|
|
4880
5107
|
mutate: R,
|
|
4881
|
-
isLoading:
|
|
4882
|
-
} =
|
|
4883
|
-
R(),
|
|
4884
|
-
}, z =
|
|
5108
|
+
isLoading: ge
|
|
5109
|
+
} = Tr(S), [F, q] = Z(!1), [B, V] = Z(!1), $ = () => q(!0), J = () => q(!1), X = () => {
|
|
5110
|
+
R(), J();
|
|
5111
|
+
}, z = pe(null), W = pe(null), Y = () => {
|
|
4885
5112
|
if (!(z != null && z.current))
|
|
4886
5113
|
return;
|
|
4887
5114
|
const {
|
|
4888
5115
|
scrollTop: T,
|
|
4889
|
-
clientHeight:
|
|
4890
|
-
scrollHeight:
|
|
5116
|
+
clientHeight: K,
|
|
5117
|
+
scrollHeight: Oe
|
|
4891
5118
|
} = z.current;
|
|
4892
|
-
if (T === void 0 ||
|
|
5119
|
+
if (T === void 0 || K === void 0 || Oe === void 0)
|
|
4893
5120
|
return;
|
|
4894
|
-
const
|
|
4895
|
-
|
|
5121
|
+
const Ee = Oe - T - K > K / 2;
|
|
5122
|
+
B !== Ee && V(Ee);
|
|
4896
5123
|
};
|
|
4897
5124
|
qe(() => {
|
|
4898
5125
|
z.current && (z.current.scrollTop = z.current.scrollHeight);
|
|
4899
5126
|
}, [w, F, y]);
|
|
4900
|
-
const
|
|
4901
|
-
ref:
|
|
5127
|
+
const ce = pe(null), he = d ? /* @__PURE__ */ n(Or, {
|
|
5128
|
+
ref: ce,
|
|
4902
5129
|
title: e,
|
|
4903
|
-
leftNav: t && /* @__PURE__ */ n(
|
|
5130
|
+
leftNav: t && /* @__PURE__ */ n(bs, {
|
|
4904
5131
|
onClick: t,
|
|
4905
5132
|
color: o.aiChat.header.textColor
|
|
4906
5133
|
}),
|
|
4907
5134
|
style: o.aiChat.header
|
|
4908
|
-
}) : null,
|
|
5135
|
+
}) : null, ye = Q(() => [...new Set(w.filter((T) => T.role === "user").filter((T) => !(h != null && h.includes(T.content))).map((T) => T.content).reverse())].slice(0, g), [w, g, h]);
|
|
4909
5136
|
return (A == null ? void 0 : A.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(U, {
|
|
4910
|
-
children: [d &&
|
|
5137
|
+
children: [d && he, /* @__PURE__ */ n(jr, {
|
|
4911
5138
|
text: A.message
|
|
4912
5139
|
})]
|
|
4913
5140
|
}) : /* @__PURE__ */ v(U, {
|
|
4914
|
-
children: [
|
|
5141
|
+
children: [he, /* @__PURE__ */ v(As, {
|
|
4915
5142
|
ref: z,
|
|
4916
5143
|
theme: o,
|
|
4917
5144
|
onScroll: Y,
|
|
4918
|
-
children: [/* @__PURE__ */ n(
|
|
4919
|
-
isVisible:
|
|
5145
|
+
children: [/* @__PURE__ */ n(ws, {
|
|
5146
|
+
isVisible: B,
|
|
4920
5147
|
anchorElement: W.current,
|
|
4921
5148
|
onClick: () => {
|
|
4922
|
-
var T,
|
|
4923
|
-
(
|
|
5149
|
+
var T, K;
|
|
5150
|
+
(K = z.current) == null || K.scroll({
|
|
4924
5151
|
top: (T = z.current) == null ? void 0 : T.scrollHeight,
|
|
4925
5152
|
behavior: "smooth"
|
|
4926
5153
|
});
|
|
4927
5154
|
}
|
|
4928
|
-
}), /* @__PURE__ */ n(
|
|
5155
|
+
}), /* @__PURE__ */ n(Tl, {}), /* @__PURE__ */ n(Ds, {
|
|
4929
5156
|
questions: h || [],
|
|
4930
5157
|
isLoading: c,
|
|
4931
5158
|
onSelection: M
|
|
4932
|
-
}), A && /* @__PURE__ */ n(
|
|
5159
|
+
}), A && /* @__PURE__ */ n(se, {
|
|
4933
5160
|
align: "left",
|
|
4934
5161
|
children: A.message
|
|
4935
|
-
}), D ? /* @__PURE__ */ n(Qe, {}) : /* @__PURE__ */ n(
|
|
5162
|
+
}), D ? /* @__PURE__ */ n(Qe, {}) : /* @__PURE__ */ n(ms, {
|
|
4936
5163
|
messages: w
|
|
4937
|
-
}), p &&
|
|
5164
|
+
}), p && C && ((i = (a = C.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ n(Ts, {
|
|
4938
5165
|
theme: o,
|
|
4939
|
-
children: (l =
|
|
5166
|
+
children: (l = C.followupQuestions) == null ? void 0 : l.slice(0, 2).map((T, K) => /* @__PURE__ */ n(Be, {
|
|
4940
5167
|
align: "left",
|
|
4941
5168
|
onClick: () => {
|
|
4942
5169
|
M(T);
|
|
@@ -4945,55 +5172,70 @@ function Ts({
|
|
|
4945
5172
|
className: "csdk-py-[7px] csdk-px-4",
|
|
4946
5173
|
children: T
|
|
4947
5174
|
})
|
|
4948
|
-
},
|
|
4949
|
-
}), (y ||
|
|
4950
|
-
onCancel:
|
|
4951
|
-
onConfirm:
|
|
5175
|
+
}, K))
|
|
5176
|
+
}), (y || ge) && /* @__PURE__ */ n(Er, {}), F && /* @__PURE__ */ n(Ol, {
|
|
5177
|
+
onCancel: J,
|
|
5178
|
+
onConfirm: X
|
|
4952
5179
|
})]
|
|
4953
|
-
}), /* @__PURE__ */ v(
|
|
5180
|
+
}), /* @__PURE__ */ v(Ls, {
|
|
4954
5181
|
ref: W,
|
|
4955
5182
|
theme: o,
|
|
4956
|
-
children: [/* @__PURE__ */ n(
|
|
5183
|
+
children: [/* @__PURE__ */ n(fn, {
|
|
4957
5184
|
onSendMessage: M,
|
|
4958
5185
|
disabled: y || D,
|
|
4959
|
-
onClearHistoryClick:
|
|
5186
|
+
onClearHistoryClick: $,
|
|
4960
5187
|
suggestions: h || [],
|
|
4961
|
-
recentPrompts:
|
|
5188
|
+
recentPrompts: ye,
|
|
4962
5189
|
isLoading: c || D,
|
|
4963
5190
|
recommendationsError: m,
|
|
4964
|
-
onChange:
|
|
4965
|
-
}), /* @__PURE__ */ n(
|
|
5191
|
+
onChange: J
|
|
5192
|
+
}), /* @__PURE__ */ n(en, {
|
|
4966
5193
|
theme: o
|
|
4967
5194
|
})]
|
|
4968
5195
|
})]
|
|
4969
5196
|
});
|
|
4970
5197
|
}
|
|
4971
|
-
const
|
|
4972
|
-
|
|
4973
|
-
label: "Container"
|
|
4974
|
-
})("font-family:", ({
|
|
5198
|
+
const js = _.button`
|
|
5199
|
+
font-family: ${({
|
|
4975
5200
|
theme: e
|
|
4976
|
-
}) => e.typography.fontFamily
|
|
5201
|
+
}) => e.typography.fontFamily};
|
|
5202
|
+
padding: 20px;
|
|
5203
|
+
border: none;
|
|
5204
|
+
display: flex;
|
|
5205
|
+
align-items: center;
|
|
5206
|
+
justify-content: space-between;
|
|
5207
|
+
text-align: left;
|
|
5208
|
+
border-radius: 15px;
|
|
5209
|
+
box-shadow: 0px 1px 2px rgba(9, 9, 10, 0.1), 0px 2px 4px rgba(9, 9, 10, 0.1);
|
|
5210
|
+
cursor: pointer;
|
|
5211
|
+
|
|
5212
|
+
background-color: ${({
|
|
4977
5213
|
theme: e
|
|
4978
|
-
}) => e.aiChat.dataTopics.items.backgroundColor
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
5214
|
+
}) => e.aiChat.dataTopics.items.backgroundColor};
|
|
5215
|
+
`, Os = _.div`
|
|
5216
|
+
font-size: 1.05rem;
|
|
5217
|
+
line-height: 28px;
|
|
5218
|
+
|
|
5219
|
+
color: ${({
|
|
4982
5220
|
theme: e
|
|
4983
|
-
}) => e.aiChat.dataTopics.items.textColor
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
})("font-size:", ({
|
|
5221
|
+
}) => e.aiChat.dataTopics.items.textColor};
|
|
5222
|
+
`, Es = _.div`
|
|
5223
|
+
font-size: ${({
|
|
4987
5224
|
theme: e
|
|
4988
|
-
}) => e.aiChat.primaryFontSize[0]
|
|
5225
|
+
}) => e.aiChat.primaryFontSize[0]};
|
|
5226
|
+
line-height: ${({
|
|
4989
5227
|
theme: e
|
|
4990
|
-
}) => e.aiChat.primaryFontSize[1]
|
|
5228
|
+
}) => e.aiChat.primaryFontSize[1]};
|
|
5229
|
+
|
|
5230
|
+
color: ${({
|
|
4991
5231
|
theme: e
|
|
4992
|
-
}) =>
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
5232
|
+
}) => ar(e.aiChat.dataTopics.items.textColor, 0, 0.5)};
|
|
5233
|
+
`, zs = _.div`
|
|
5234
|
+
width: 16px;
|
|
5235
|
+
height: 16px;
|
|
5236
|
+
transform: rotate(180deg);
|
|
5237
|
+
`;
|
|
5238
|
+
function Rs(e) {
|
|
4997
5239
|
const {
|
|
4998
5240
|
title: t,
|
|
4999
5241
|
description: r,
|
|
@@ -5001,39 +5243,49 @@ function zs(e) {
|
|
|
5001
5243
|
} = e, {
|
|
5002
5244
|
themeSettings: i
|
|
5003
5245
|
} = L();
|
|
5004
|
-
return /* @__PURE__ */ v(
|
|
5246
|
+
return /* @__PURE__ */ v(js, {
|
|
5005
5247
|
onClick: a,
|
|
5006
5248
|
theme: i,
|
|
5007
5249
|
children: [/* @__PURE__ */ v("div", {
|
|
5008
|
-
children: [/* @__PURE__ */ n(
|
|
5250
|
+
children: [/* @__PURE__ */ n(Os, {
|
|
5009
5251
|
theme: i,
|
|
5010
5252
|
children: t
|
|
5011
|
-
}), /* @__PURE__ */ n(
|
|
5253
|
+
}), /* @__PURE__ */ n(Es, {
|
|
5012
5254
|
theme: i,
|
|
5013
5255
|
children: r
|
|
5014
5256
|
})]
|
|
5015
|
-
}), /* @__PURE__ */ n(
|
|
5016
|
-
children: /* @__PURE__ */ n(
|
|
5257
|
+
}), /* @__PURE__ */ n(zs, {
|
|
5258
|
+
children: /* @__PURE__ */ n(ia, {
|
|
5017
5259
|
color: i.aiChat.icons.color
|
|
5018
5260
|
})
|
|
5019
5261
|
})]
|
|
5020
5262
|
});
|
|
5021
5263
|
}
|
|
5022
|
-
const
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5264
|
+
const Zs = _.div`
|
|
5265
|
+
padding: 20px;
|
|
5266
|
+
display: flex;
|
|
5267
|
+
flex-direction: column;
|
|
5268
|
+
gap: 20px;
|
|
5269
|
+
overflow: auto;
|
|
5270
|
+
`, Ws = _.div`
|
|
5271
|
+
font-size: 24px;
|
|
5272
|
+
line-height: 32px;
|
|
5273
|
+
font-weight: 600;
|
|
5274
|
+
text-align: center;
|
|
5275
|
+
padding-bottom: 4px;
|
|
5276
|
+
|
|
5277
|
+
color: ${({
|
|
5029
5278
|
theme: e
|
|
5030
|
-
}) => e.aiChat.primaryTextColor
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5279
|
+
}) => e.aiChat.primaryTextColor};
|
|
5280
|
+
`, Ps = _.div`
|
|
5281
|
+
font-size: 15px;
|
|
5282
|
+
line-height: 22px;
|
|
5283
|
+
|
|
5284
|
+
color: ${({
|
|
5034
5285
|
theme: e
|
|
5035
|
-
}) => e.aiChat.primaryTextColor
|
|
5036
|
-
|
|
5286
|
+
}) => e.aiChat.primaryTextColor};
|
|
5287
|
+
`;
|
|
5288
|
+
function Gs(e) {
|
|
5037
5289
|
const {
|
|
5038
5290
|
dataTopics: t
|
|
5039
5291
|
} = e, {
|
|
@@ -5041,23 +5293,23 @@ function Ps(e) {
|
|
|
5041
5293
|
} = L(), {
|
|
5042
5294
|
t: a
|
|
5043
5295
|
} = E();
|
|
5044
|
-
return /* @__PURE__ */ v(
|
|
5045
|
-
children: [/* @__PURE__ */ n(
|
|
5296
|
+
return /* @__PURE__ */ v(Zs, {
|
|
5297
|
+
children: [/* @__PURE__ */ n(Ws, {
|
|
5046
5298
|
theme: r,
|
|
5047
5299
|
children: a("ai.dataTopics")
|
|
5048
|
-
}), /* @__PURE__ */ v(
|
|
5300
|
+
}), /* @__PURE__ */ v(Ps, {
|
|
5049
5301
|
theme: r,
|
|
5050
5302
|
children: [a("ai.chatbotDescription"), /* @__PURE__ */ n("br", {}), /* @__PURE__ */ n("br", {}), a("ai.topicSelectPrompt")]
|
|
5051
|
-
}), t.map((i) => /* @__PURE__ */
|
|
5303
|
+
}), t.map((i) => /* @__PURE__ */ Za(Rs, j(I({}, i), {
|
|
5052
5304
|
key: i.title
|
|
5053
5305
|
})))]
|
|
5054
5306
|
});
|
|
5055
5307
|
}
|
|
5056
|
-
const qs = "#000000",
|
|
5057
|
-
function
|
|
5308
|
+
const qs = "#000000", $s = "#FFFFFF";
|
|
5309
|
+
function Hs({
|
|
5058
5310
|
isDarkBackground: e = !1
|
|
5059
5311
|
}) {
|
|
5060
|
-
const t = e ?
|
|
5312
|
+
const t = e ? $s : qs;
|
|
5061
5313
|
return /* @__PURE__ */ v("svg", {
|
|
5062
5314
|
width: "32",
|
|
5063
5315
|
height: "32",
|
|
@@ -5115,41 +5367,46 @@ function Bs({
|
|
|
5115
5367
|
})]
|
|
5116
5368
|
});
|
|
5117
5369
|
}
|
|
5118
|
-
const
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5370
|
+
const Bs = _.div`
|
|
5371
|
+
margin-left: 14px;
|
|
5372
|
+
margin-top: 3px;
|
|
5373
|
+
`, Ys = _.div`
|
|
5374
|
+
display: flex;
|
|
5375
|
+
flex-direction: column;
|
|
5376
|
+
justify-content: top;
|
|
5377
|
+
overflow: hidden;
|
|
5378
|
+
height: 100%;
|
|
5379
|
+
|
|
5380
|
+
background-color: ${({
|
|
5125
5381
|
theme: e
|
|
5126
|
-
}) => e.aiChat.dataTopics.backgroundColor
|
|
5382
|
+
}) => e.aiChat.dataTopics.backgroundColor};
|
|
5383
|
+
`;
|
|
5127
5384
|
function Us({
|
|
5128
5385
|
dataTopicsList: e,
|
|
5129
5386
|
onDataTopicClick: t
|
|
5130
5387
|
}) {
|
|
5131
5388
|
const {
|
|
5132
5389
|
enableHeader: r
|
|
5133
|
-
} =
|
|
5390
|
+
} = oe(), {
|
|
5134
5391
|
themeSettings: a
|
|
5135
5392
|
} = L(), {
|
|
5136
5393
|
t: i
|
|
5137
5394
|
} = E(), l = Q(() => e == null ? void 0 : e.map((p) => ({
|
|
5138
5395
|
title: p,
|
|
5139
5396
|
onClick: () => t(p)
|
|
5140
|
-
})), [e, t]), s =
|
|
5397
|
+
})), [e, t]), s = La(Ta(a.aiChat.header.backgroundColor)) > 0.5;
|
|
5141
5398
|
return /* @__PURE__ */ v(U, {
|
|
5142
|
-
children: [r ? /* @__PURE__ */ n(
|
|
5399
|
+
children: [r ? /* @__PURE__ */ n(Or, {
|
|
5143
5400
|
title: i("ai.analyticsChatbot"),
|
|
5144
|
-
leftNav: /* @__PURE__ */ n(
|
|
5145
|
-
children: /* @__PURE__ */ n(
|
|
5401
|
+
leftNav: /* @__PURE__ */ n(Bs, {
|
|
5402
|
+
children: /* @__PURE__ */ n(Hs, {
|
|
5146
5403
|
isDarkBackground: s
|
|
5147
5404
|
})
|
|
5148
5405
|
}),
|
|
5149
5406
|
style: a.aiChat.header
|
|
5150
5407
|
}) : null, /* @__PURE__ */ v(Ys, {
|
|
5151
5408
|
theme: a,
|
|
5152
|
-
children: [!l && /* @__PURE__ */ n(Qe, {}), l && /* @__PURE__ */ n(
|
|
5409
|
+
children: [!l && /* @__PURE__ */ n(Qe, {}), l && /* @__PURE__ */ n(Gs, {
|
|
5153
5410
|
dataTopics: l
|
|
5154
5411
|
})]
|
|
5155
5412
|
})]
|
|
@@ -5159,10 +5416,10 @@ function Qs() {
|
|
|
5159
5416
|
const [e, t] = Z(), [r, a] = Z(), {
|
|
5160
5417
|
data: i,
|
|
5161
5418
|
fetchStatus: l
|
|
5162
|
-
} =
|
|
5419
|
+
} = Zo(), {
|
|
5163
5420
|
dataTopicsList: s,
|
|
5164
5421
|
contextDetails: p
|
|
5165
|
-
} =
|
|
5422
|
+
} = oe(), {
|
|
5166
5423
|
t: d
|
|
5167
5424
|
} = E(), g = d("ai.errors.noAvailableDataTopics"), f = N((c) => {
|
|
5168
5425
|
c.length ? c.length === 1 && (a(void 0), t(c[0])) : a(g);
|
|
@@ -5172,16 +5429,16 @@ function Qs() {
|
|
|
5172
5429
|
return f(c), c;
|
|
5173
5430
|
}
|
|
5174
5431
|
return [];
|
|
5175
|
-
}, [i, l, s, f]), o =
|
|
5432
|
+
}, [i, l, s, f]), o = Le(), u = N(() => {
|
|
5176
5433
|
a(void 0), o.invalidateQueries(["getDataTopics"]);
|
|
5177
5434
|
}, [o]);
|
|
5178
|
-
return r ? /* @__PURE__ */ n(
|
|
5435
|
+
return r ? /* @__PURE__ */ n(jr, {
|
|
5179
5436
|
text: r,
|
|
5180
5437
|
action: {
|
|
5181
5438
|
text: d("ai.buttons.refresh"),
|
|
5182
5439
|
onClick: u
|
|
5183
5440
|
}
|
|
5184
|
-
}) : x.length === 1 && !e ? /* @__PURE__ */ n(Qe, {}) : e ? /* @__PURE__ */ n(
|
|
5441
|
+
}) : x.length === 1 && !e ? /* @__PURE__ */ n(Qe, {}) : e ? /* @__PURE__ */ n(Ns, {
|
|
5185
5442
|
contextTitle: e,
|
|
5186
5443
|
contextDetails: p,
|
|
5187
5444
|
onGoBack: x.length === 1 ? void 0 : () => t(void 0)
|
|
@@ -5190,7 +5447,7 @@ function Qs() {
|
|
|
5190
5447
|
onDataTopicClick: (c) => t(c)
|
|
5191
5448
|
});
|
|
5192
5449
|
}
|
|
5193
|
-
const Fs =
|
|
5450
|
+
const Fs = ir({
|
|
5194
5451
|
componentName: "Chatbot"
|
|
5195
5452
|
})((e) => {
|
|
5196
5453
|
const {
|
|
@@ -5200,9 +5457,9 @@ const Fs = er({
|
|
|
5200
5457
|
} = e, {
|
|
5201
5458
|
themeSettings: i
|
|
5202
5459
|
} = L();
|
|
5203
|
-
return /* @__PURE__ */ n(
|
|
5460
|
+
return /* @__PURE__ */ n(Eo, {
|
|
5204
5461
|
value: a ?? {},
|
|
5205
|
-
children: /* @__PURE__ */ n(
|
|
5462
|
+
children: /* @__PURE__ */ n(Jo, {
|
|
5206
5463
|
id: "csdk-chatbot-frame",
|
|
5207
5464
|
width: t,
|
|
5208
5465
|
height: r,
|
|
@@ -5211,14 +5468,14 @@ const Fs = er({
|
|
|
5211
5468
|
children: /* @__PURE__ */ n(Qs, {})
|
|
5212
5469
|
})
|
|
5213
5470
|
});
|
|
5214
|
-
}), Vs =
|
|
5471
|
+
}), Vs = ir({
|
|
5215
5472
|
componentName: "GetNlgInsights"
|
|
5216
5473
|
})(function(e) {
|
|
5217
5474
|
const {
|
|
5218
5475
|
data: t,
|
|
5219
5476
|
isLoading: r,
|
|
5220
5477
|
isError: a
|
|
5221
|
-
} =
|
|
5478
|
+
} = Dr(e), {
|
|
5222
5479
|
t: i
|
|
5223
5480
|
} = E();
|
|
5224
5481
|
if (a)
|
|
@@ -5226,10 +5483,28 @@ const Fs = er({
|
|
|
5226
5483
|
children: i("ai.errors.unexpected")
|
|
5227
5484
|
});
|
|
5228
5485
|
const l = t ?? i("ai.errors.insightsNotAvailable");
|
|
5229
|
-
return /* @__PURE__ */ n(
|
|
5486
|
+
return /* @__PURE__ */ n(aa, {
|
|
5230
5487
|
text: r ? "Loading..." : l
|
|
5231
5488
|
});
|
|
5232
|
-
})
|
|
5489
|
+
});
|
|
5490
|
+
_.div`
|
|
5491
|
+
display: flex;
|
|
5492
|
+
flex-direction: row;
|
|
5493
|
+
align-items: center;
|
|
5494
|
+
gap: 10px;
|
|
5495
|
+
margin: 24px 0;
|
|
5496
|
+
max-width: 640px;
|
|
5497
|
+
color: ${({
|
|
5498
|
+
theme: e
|
|
5499
|
+
}) => e.chart.textColor};
|
|
5500
|
+
background-color: ${({
|
|
5501
|
+
theme: e
|
|
5502
|
+
}) => e.chart.backgroundColor};
|
|
5503
|
+
`;
|
|
5504
|
+
_.div`
|
|
5505
|
+
align-self: flex-start;
|
|
5506
|
+
`;
|
|
5507
|
+
const Js = new Kt({
|
|
5233
5508
|
defaultOptions: {
|
|
5234
5509
|
queries: {
|
|
5235
5510
|
refetchOnWindowFocus: !1,
|
|
@@ -5237,15 +5512,15 @@ const Fs = er({
|
|
|
5237
5512
|
}
|
|
5238
5513
|
}
|
|
5239
5514
|
});
|
|
5240
|
-
function
|
|
5515
|
+
function Xs({
|
|
5241
5516
|
children: e,
|
|
5242
5517
|
context: t
|
|
5243
5518
|
}) {
|
|
5244
|
-
return /* @__PURE__ */ n(
|
|
5245
|
-
children: /* @__PURE__ */ n(
|
|
5519
|
+
return /* @__PURE__ */ n(To, {
|
|
5520
|
+
children: /* @__PURE__ */ n(Mr.Provider, {
|
|
5246
5521
|
value: t == null ? void 0 : t.api,
|
|
5247
|
-
children: /* @__PURE__ */ n(
|
|
5248
|
-
client:
|
|
5522
|
+
children: /* @__PURE__ */ n(Da, {
|
|
5523
|
+
client: Js,
|
|
5249
5524
|
children: e
|
|
5250
5525
|
})
|
|
5251
5526
|
})
|
|
@@ -5262,13 +5537,13 @@ function Js({
|
|
|
5262
5537
|
console.error("vite-plugin-css-injected-by-js", r);
|
|
5263
5538
|
}
|
|
5264
5539
|
})();
|
|
5265
|
-
const
|
|
5540
|
+
const oa = {
|
|
5266
5541
|
api: void 0
|
|
5267
|
-
},
|
|
5268
|
-
|
|
5269
|
-
() =>
|
|
5542
|
+
}, na = Symbol("aiContextKey"), Ve = () => gi(
|
|
5543
|
+
na,
|
|
5544
|
+
() => gr(oa),
|
|
5270
5545
|
!0
|
|
5271
|
-
),
|
|
5546
|
+
), tc = kt({
|
|
5272
5547
|
props: {
|
|
5273
5548
|
/**
|
|
5274
5549
|
* {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
|
|
@@ -5276,32 +5551,32 @@ const ia = {
|
|
|
5276
5551
|
volatile: Boolean
|
|
5277
5552
|
},
|
|
5278
5553
|
setup(e, { slots: t }) {
|
|
5279
|
-
const r =
|
|
5554
|
+
const r = pi(), a = gr(oa), { app: i } = r.value;
|
|
5280
5555
|
return i && (a.value = {
|
|
5281
|
-
api: new
|
|
5282
|
-
}),
|
|
5556
|
+
api: new Pt(i.httpClient, e.volatile)
|
|
5557
|
+
}), hr(async () => {
|
|
5283
5558
|
const { app: l } = r.value;
|
|
5284
5559
|
l && (a.value = {
|
|
5285
|
-
api: new
|
|
5560
|
+
api: new Pt(l.httpClient, e.volatile)
|
|
5286
5561
|
});
|
|
5287
|
-
}),
|
|
5562
|
+
}), hi(na, a), () => {
|
|
5288
5563
|
var l;
|
|
5289
5564
|
return (l = t.default) == null ? void 0 : l.call(t);
|
|
5290
5565
|
};
|
|
5291
5566
|
}
|
|
5292
|
-
}),
|
|
5293
|
-
const e = Ve(), t = new
|
|
5567
|
+
}), la = () => {
|
|
5568
|
+
const e = Ve(), t = new ui({
|
|
5294
5569
|
context: e.value
|
|
5295
5570
|
});
|
|
5296
|
-
return
|
|
5571
|
+
return hr(() => {
|
|
5297
5572
|
t.setValue({
|
|
5298
5573
|
context: e.value
|
|
5299
5574
|
});
|
|
5300
5575
|
}), {
|
|
5301
5576
|
propsObserver: t,
|
|
5302
|
-
providerComponent:
|
|
5577
|
+
providerComponent: Xs
|
|
5303
5578
|
};
|
|
5304
|
-
},
|
|
5579
|
+
}, rc = kt({
|
|
5305
5580
|
props: {
|
|
5306
5581
|
/**
|
|
5307
5582
|
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
|
|
@@ -5316,11 +5591,11 @@ const ia = {
|
|
|
5316
5591
|
*/
|
|
5317
5592
|
config: Object
|
|
5318
5593
|
},
|
|
5319
|
-
setup: (e) =>
|
|
5320
|
-
...
|
|
5321
|
-
|
|
5594
|
+
setup: (e) => pr(Fs, e, [
|
|
5595
|
+
...ur(),
|
|
5596
|
+
la()
|
|
5322
5597
|
])
|
|
5323
|
-
}),
|
|
5598
|
+
}), ac = kt({
|
|
5324
5599
|
props: {
|
|
5325
5600
|
/**
|
|
5326
5601
|
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
|
|
@@ -5346,13 +5621,13 @@ const ia = {
|
|
|
5346
5621
|
*/
|
|
5347
5622
|
verbosity: String
|
|
5348
5623
|
},
|
|
5349
|
-
setup: (e) =>
|
|
5350
|
-
...
|
|
5351
|
-
|
|
5624
|
+
setup: (e) => pr(Vs, e, [
|
|
5625
|
+
...ur(),
|
|
5626
|
+
la()
|
|
5352
5627
|
])
|
|
5353
|
-
}),
|
|
5354
|
-
|
|
5355
|
-
const [t, r] =
|
|
5628
|
+
}), ic = (e) => {
|
|
5629
|
+
mt("useGetNlgInsights");
|
|
5630
|
+
const [t, r] = bt(xt, {
|
|
5356
5631
|
isLoading: !0,
|
|
5357
5632
|
isError: !1,
|
|
5358
5633
|
isSuccess: !1,
|
|
@@ -5363,16 +5638,16 @@ const ia = {
|
|
|
5363
5638
|
var p;
|
|
5364
5639
|
try {
|
|
5365
5640
|
r({ type: "loading" });
|
|
5366
|
-
const d =
|
|
5641
|
+
const d = Ir(xe(e)), g = await (s == null ? void 0 : s.ai.getNlgInsights(d));
|
|
5367
5642
|
r({ type: "success", data: (p = g == null ? void 0 : g.data) == null ? void 0 : p.answer });
|
|
5368
5643
|
} catch (d) {
|
|
5369
5644
|
r({ type: "error", error: d });
|
|
5370
5645
|
}
|
|
5371
5646
|
};
|
|
5372
|
-
|
|
5373
|
-
[...
|
|
5647
|
+
yt(
|
|
5648
|
+
[...ft(e), a],
|
|
5374
5649
|
() => {
|
|
5375
|
-
const { api: s } = a.value, { enabled: p } =
|
|
5650
|
+
const { api: s } = a.value, { enabled: p } = xe(e);
|
|
5376
5651
|
!s || !(p === void 0 || p === !0) || i(s);
|
|
5377
5652
|
},
|
|
5378
5653
|
{ immediate: !0 }
|
|
@@ -5381,12 +5656,12 @@ const ia = {
|
|
|
5381
5656
|
a.value.api && i(a.value.api);
|
|
5382
5657
|
};
|
|
5383
5658
|
return {
|
|
5384
|
-
...
|
|
5659
|
+
...wt(t.value),
|
|
5385
5660
|
refetch: l
|
|
5386
5661
|
};
|
|
5387
|
-
},
|
|
5388
|
-
|
|
5389
|
-
const [t, r] =
|
|
5662
|
+
}, oc = (e) => {
|
|
5663
|
+
mt("useGetQueryRecommendations");
|
|
5664
|
+
const [t, r] = bt(xt, {
|
|
5390
5665
|
isLoading: !0,
|
|
5391
5666
|
isError: !1,
|
|
5392
5667
|
isSuccess: !1,
|
|
@@ -5396,12 +5671,12 @@ const ia = {
|
|
|
5396
5671
|
}), a = Ve(), i = async (s) => {
|
|
5397
5672
|
try {
|
|
5398
5673
|
r({ type: "loading" });
|
|
5399
|
-
const { contextTitle: p, count: d, enableAxisTitlesInWidgetProps: g, customPrompt: f } =
|
|
5674
|
+
const { contextTitle: p, count: d, enableAxisTitlesInWidgetProps: g, customPrompt: f } = xe(e), x = d ?? ct, o = await (s == null ? void 0 : s.ai.getQueryRecommendations(p, {
|
|
5400
5675
|
numOfRecommendations: x,
|
|
5401
5676
|
...f ? { userPrompt: f } : void 0
|
|
5402
5677
|
})), u = (o == null ? void 0 : o.map((c) => ({
|
|
5403
5678
|
...c,
|
|
5404
|
-
widgetProps:
|
|
5679
|
+
widgetProps: _r.toWidgetProps(c, {
|
|
5405
5680
|
useCustomizedStyleOptions: g
|
|
5406
5681
|
})
|
|
5407
5682
|
}))) || [];
|
|
@@ -5410,10 +5685,10 @@ const ia = {
|
|
|
5410
5685
|
r({ type: "error", error: p });
|
|
5411
5686
|
}
|
|
5412
5687
|
};
|
|
5413
|
-
|
|
5414
|
-
[...
|
|
5688
|
+
yt(
|
|
5689
|
+
[...ft(e), a],
|
|
5415
5690
|
() => {
|
|
5416
|
-
const { api: s } = a.value, { enabled: p, count: d } =
|
|
5691
|
+
const { api: s } = a.value, { enabled: p, count: d } = xe(e), f = (p === void 0 || p === !0) && (d ?? ct) > 0;
|
|
5417
5692
|
!s || !f || i(s);
|
|
5418
5693
|
},
|
|
5419
5694
|
{ immediate: !0 }
|
|
@@ -5422,12 +5697,12 @@ const ia = {
|
|
|
5422
5697
|
a.value.api && i(a.value.api);
|
|
5423
5698
|
};
|
|
5424
5699
|
return {
|
|
5425
|
-
...
|
|
5700
|
+
...wt(t.value),
|
|
5426
5701
|
refetch: l
|
|
5427
5702
|
};
|
|
5428
|
-
},
|
|
5429
|
-
|
|
5430
|
-
const [t, r] =
|
|
5703
|
+
}, nc = (e) => {
|
|
5704
|
+
mt("useGetNlqResult");
|
|
5705
|
+
const [t, r] = bt(xt, {
|
|
5431
5706
|
isLoading: !0,
|
|
5432
5707
|
isError: !1,
|
|
5433
5708
|
isSuccess: !1,
|
|
@@ -5437,7 +5712,7 @@ const ia = {
|
|
|
5437
5712
|
}), a = Ve(), i = async (s) => {
|
|
5438
5713
|
try {
|
|
5439
5714
|
r({ type: "loading" });
|
|
5440
|
-
const p =
|
|
5715
|
+
const p = xe(e), { enableAxisTitlesInWidgetProps: d } = p, { contextTitle: g, request: f } = jo(p), x = await (s == null ? void 0 : s.ai.getNlqResult(g, f)), o = x ? _r.toWidgetProps(x, {
|
|
5441
5716
|
useCustomizedStyleOptions: d || !1
|
|
5442
5717
|
}) : void 0;
|
|
5443
5718
|
r({ type: "success", data: o });
|
|
@@ -5445,10 +5720,10 @@ const ia = {
|
|
|
5445
5720
|
r({ type: "error", error: p });
|
|
5446
5721
|
}
|
|
5447
5722
|
};
|
|
5448
|
-
|
|
5449
|
-
[...
|
|
5723
|
+
yt(
|
|
5724
|
+
[...ft(e), a],
|
|
5450
5725
|
() => {
|
|
5451
|
-
const { api: s } = a.value, { enabled: p } =
|
|
5726
|
+
const { api: s } = a.value, { enabled: p } = xe(e);
|
|
5452
5727
|
!s || !(p === void 0 || p === !0) || i(s);
|
|
5453
5728
|
},
|
|
5454
5729
|
{ immediate: !0 }
|
|
@@ -5457,15 +5732,15 @@ const ia = {
|
|
|
5457
5732
|
a.value.api && i(a.value.api);
|
|
5458
5733
|
};
|
|
5459
5734
|
return {
|
|
5460
|
-
...
|
|
5735
|
+
...wt(t.value),
|
|
5461
5736
|
refetch: l
|
|
5462
5737
|
};
|
|
5463
5738
|
};
|
|
5464
5739
|
export {
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5740
|
+
tc as AiContextProvider,
|
|
5741
|
+
rc as Chatbot,
|
|
5742
|
+
ac as GetNlgInsights,
|
|
5743
|
+
ic as useGetNlgInsights,
|
|
5744
|
+
nc as useGetNlqResult,
|
|
5745
|
+
oc as useGetQueryRecommendations
|
|
5471
5746
|
};
|