@sisense/sdk-ui-vue 2.20.0 → 2.21.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 +78 -78
- package/dist/ai.js +758 -738
- package/dist/index.cjs +1 -1
- package/dist/index.js +761 -739
- package/dist/packages/sdk-ui-vue/src/components/widgets/chart-widget.d.ts +0 -28
- package/dist/packages/sdk-ui-vue/src/components/widgets/widget-by-id.d.ts +0 -8
- package/dist/packages/sdk-ui-vue/src/components/widgets/widget.d.ts +6 -6
- package/dist/packages/sdk-ui-vue/src/composables/use-custom-widgets.d.ts +1 -1
- package/dist/packages/sdk-ui-vue/src/helpers/vue-component-adapter.d.ts +54 -0
- package/dist/{use-tracking-5246ab32.js → use-tracking-4a4b3434.js} +43266 -42862
- package/dist/{use-tracking-5885abd6.cjs → use-tracking-801c9eeb.cjs} +652 -587
- package/package.json +13 -3
- package/dist/packages/sdk-ui-vue/src/components/filters/relative-date-filter-tile.d.ts +0 -140
- package/dist/packages/sdk-ui-vue/src/components/widgets/pivot-table-widget.d.ts +0 -245
- package/dist/packages/sdk-ui-vue/src/helpers/dynamic-renderer.d.ts +0 -16
- package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/sisense-context.d.ts +0 -9
package/dist/ai.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aN as Fe, aO as or, aP as C, aQ as P, aR as nr, aS as xa, aT as Ve, aU as ka, aV as ya, aW as fe, aX as lr, aY as wa, aZ as f, a_ as sr, a$ as cr, b0 as dr, b1 as pr, b2 as D, b3 as l, b4 as E, b5 as Y, b6 as $, b7 as Ne, b8 as j, b9 as v, ba as Ca, bb as _a, bc as ue, bd as va, be as Ce, bf as tt, bg as _e, bh as Sa, bi as Ma, bj as Ia, bk as R, bl as ye, bm as Ie, bn as $e, bo as Da, ay as De, bp as rt, bq as bt, br as Aa, bs as La, bt as Ta, bu as Na, bv as Ot, bw as He, bx as je, by as ja, bz as Oa, bA as Ea, bB as za, bC as Ra, bD as Za, bE as G, bF as Le, bG as Wa, bH as Pa, bI as qa, bJ as Ga, bK as $a, bL as Ha, bM as ur, bN as Ba, bO as Be, bP as Ya, bQ as Et, bR as Ua, bS as Qa, bT as gr, bU as Fa, bV as Va, bW as Ja, bX as Xa, bY as Ka, bZ as ei, b_ as ti, b$ as ri, c0 as ai, c1 as ii, c2 as oi, c3 as ni, c4 as li, c5 as si, c6 as ci, c7 as hr, c8 as Ae, c9 as mr, ca as ft, cb as di, cc as pi, cd as ui, ce as gi, cf as hi, cg as mi, ch as br, G as bi, ci as fi, a as fr, cj as xr, J as xt, F as kt, K as yt, Q as xe, a7 as wt } from "./use-tracking-4a4b3434.js";
|
|
2
2
|
import { inject as xi, ref as kr, defineComponent as Ct, watchEffect as yr, provide as ki, watch as _t, toRefs as vt } from "vue";
|
|
3
3
|
import "./index-Ck90GjPy-96e79d43-96e79d43.js";
|
|
4
4
|
let wr = class extends mr {
|
|
@@ -77,10 +77,10 @@ var _i = Object.defineProperty, vi = Object.defineProperties, Si = Object.getOwn
|
|
|
77
77
|
t.indexOf(a) < 0 && vr.call(e, a) && (r[a] = e[a]);
|
|
78
78
|
return r;
|
|
79
79
|
};
|
|
80
|
-
function
|
|
80
|
+
function Ii(e) {
|
|
81
81
|
return e.replace(/\s+/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Di(e) {
|
|
84
84
|
return !e || !e.jaql.datasource.title || !e.jaql.metadata.length;
|
|
85
85
|
}
|
|
86
86
|
function Sr(e) {
|
|
@@ -123,8 +123,8 @@ function Ti(e) {
|
|
|
123
123
|
return e;
|
|
124
124
|
const r = {};
|
|
125
125
|
for (const [a, i] of Object.entries(e)) {
|
|
126
|
-
const
|
|
127
|
-
r[
|
|
126
|
+
const n = t(a) ? a : `"${a}"`;
|
|
127
|
+
r[n] = i;
|
|
128
128
|
}
|
|
129
129
|
return r;
|
|
130
130
|
}
|
|
@@ -597,7 +597,7 @@ function ji(e) {
|
|
|
597
597
|
const Mr = (e, t) => Ni[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => Mr(`${a}Tmpl`, t)), Oi = (e, t) => e.replace(/{{(.*?)}}/g, (r, a) => a in t ? t[a] : (console.warn(`Placeholder ${a} not found in data`), r)), st = (e, t, r = "react") => {
|
|
598
598
|
const a = Mr(e, r), i = Oi(a, t);
|
|
599
599
|
return Li(ji(i));
|
|
600
|
-
}, Ei = () => Object.values(ci).map((e) => hr.aggregationToJAQL(e)).join("|"),
|
|
600
|
+
}, Ei = () => Object.values(ci).map((e) => hr.aggregationToJAQL(e)).join("|"), Ir = (e) => {
|
|
601
601
|
const {
|
|
602
602
|
formula: t,
|
|
603
603
|
context: r,
|
|
@@ -608,11 +608,11 @@ const Mr = (e, t) => Ni[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => Mr(`${a}Tmpl`,
|
|
|
608
608
|
const i = Object.keys(r);
|
|
609
609
|
if (i.length !== 1)
|
|
610
610
|
return e;
|
|
611
|
-
const
|
|
612
|
-
if (typeof
|
|
611
|
+
const n = i[0];
|
|
612
|
+
if (typeof n != "string")
|
|
613
613
|
return e;
|
|
614
|
-
const s = r[`${
|
|
615
|
-
if (g && t.includes(
|
|
614
|
+
const s = r[`${n}`], p = Ei(), d = new RegExp(`^\\s*(${p})\\(\\[\\w+\\]\\)$`), g = t.match(d);
|
|
615
|
+
if (g && t.includes(n)) {
|
|
616
616
|
const b = g[1];
|
|
617
617
|
return O({
|
|
618
618
|
dim: s.dim,
|
|
@@ -628,7 +628,7 @@ const Mr = (e, t) => Ni[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => Mr(`${a}Tmpl`,
|
|
|
628
628
|
return e;
|
|
629
629
|
}, Pe = (e) => {
|
|
630
630
|
let t = e;
|
|
631
|
-
if ("formula" in e && (t =
|
|
631
|
+
if ("formula" in e && (t = Ir(e)), "context" in t) {
|
|
632
632
|
const r = O({}, t.context);
|
|
633
633
|
Object.keys(r).forEach((a) => {
|
|
634
634
|
r[`${a}`] = Pe(r[`${a}`]);
|
|
@@ -643,7 +643,7 @@ const Mr = (e, t) => Ni[t][e].replace(/{{(.*?)Tmpl}}/g, (r, a) => Mr(`${a}Tmpl`,
|
|
|
643
643
|
const {
|
|
644
644
|
jaql: a
|
|
645
645
|
} = r;
|
|
646
|
-
return (t = a.filter) != null && t.by && (a.filter.by =
|
|
646
|
+
return (t = a.filter) != null && t.by && (a.filter.by = Ir(a.filter.by)), te(O({}, r), {
|
|
647
647
|
jaql: a
|
|
648
648
|
});
|
|
649
649
|
}, Ri = (e) => {
|
|
@@ -1067,7 +1067,7 @@ const Yi = {
|
|
|
1067
1067
|
function ao(e) {
|
|
1068
1068
|
switch (e) {
|
|
1069
1069
|
case "indicator":
|
|
1070
|
-
return
|
|
1070
|
+
return G(Wi);
|
|
1071
1071
|
case "line":
|
|
1072
1072
|
return ve(qi);
|
|
1073
1073
|
case "area":
|
|
@@ -1079,27 +1079,27 @@ function ao(e) {
|
|
|
1079
1079
|
case "polar":
|
|
1080
1080
|
return ve(Bi);
|
|
1081
1081
|
case "pie":
|
|
1082
|
-
return
|
|
1082
|
+
return G(Yi);
|
|
1083
1083
|
case "funnel":
|
|
1084
|
-
return
|
|
1084
|
+
return G(Ui);
|
|
1085
1085
|
case "treemap":
|
|
1086
|
-
return
|
|
1086
|
+
return G(Fi);
|
|
1087
1087
|
case "calendar-heatmap":
|
|
1088
|
-
return
|
|
1088
|
+
return G(Vi);
|
|
1089
1089
|
case "sunburst":
|
|
1090
|
-
return
|
|
1090
|
+
return G(Ji);
|
|
1091
1091
|
case "scatter":
|
|
1092
|
-
return
|
|
1092
|
+
return G(Xi);
|
|
1093
1093
|
case "scattermap":
|
|
1094
|
-
return
|
|
1094
|
+
return G(eo);
|
|
1095
1095
|
case "areamap":
|
|
1096
|
-
return
|
|
1096
|
+
return G(to);
|
|
1097
1097
|
case "boxplot":
|
|
1098
|
-
return
|
|
1098
|
+
return G(ro);
|
|
1099
1099
|
case "table":
|
|
1100
|
-
return
|
|
1100
|
+
return G(Ki);
|
|
1101
1101
|
case "pivot":
|
|
1102
|
-
return
|
|
1102
|
+
return G(Qi);
|
|
1103
1103
|
case "pivot2":
|
|
1104
1104
|
return {};
|
|
1105
1105
|
case "image":
|
|
@@ -1116,8 +1116,8 @@ const Ze = `
|
|
|
1116
1116
|
`, r += " ".repeat(t), r += ` '${e.formula}',
|
|
1117
1117
|
`, r += " ".repeat(t), r += ` {
|
|
1118
1118
|
`, Object.entries(e.context).forEach(([a, i]) => {
|
|
1119
|
-
const
|
|
1120
|
-
r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${
|
|
1119
|
+
const n = br(i.table || ct, i.column || ct, void 0, "DM");
|
|
1120
|
+
r += " ".repeat(t), r += ` '${a.slice(1, -1)}': ${n},
|
|
1121
1121
|
`;
|
|
1122
1122
|
}), r += " ".repeat(t), r += ` }
|
|
1123
1123
|
`, r += " ".repeat(t), r += ")", r;
|
|
@@ -1127,10 +1127,10 @@ const Ze = `
|
|
|
1127
1127
|
table: r,
|
|
1128
1128
|
column: a,
|
|
1129
1129
|
agg: i,
|
|
1130
|
-
title:
|
|
1130
|
+
title: n
|
|
1131
1131
|
} = e;
|
|
1132
1132
|
let s;
|
|
1133
|
-
return r && a && (s = br(r, a, t, "DM")), i && r && a &&
|
|
1133
|
+
return r && a && (s = br(r, a, t, "DM")), i && r && a && n && (s = `measureFactory.${hr.aggregationFromJAQL(i)}(${s}, '${Ae(n)}')`), s || ct;
|
|
1134
1134
|
}, no = (e, t) => {
|
|
1135
1135
|
const r = e.jaql(!1).jaql;
|
|
1136
1136
|
return "formula" in r ? io(r, t) : oo(r);
|
|
@@ -1144,14 +1144,14 @@ const Ze = `
|
|
|
1144
1144
|
if (e instanceof mr)
|
|
1145
1145
|
return e.composeCode || "";
|
|
1146
1146
|
let a = "";
|
|
1147
|
-
return Array.isArray(e) ? a += `[${e.map((i) => ae(i, t + 2))}${e.length ? Ze + " ".repeat(t + 2) : ""}]` : (a += `{${Ze}`, Object.entries(e).forEach(([i,
|
|
1148
|
-
if (r && typeof i == "string" && (i = `'${Ae(i)}'`), a += " ".repeat(t + 2), Array.isArray(
|
|
1149
|
-
a += `${i}: [${
|
|
1150
|
-
else if (typeof
|
|
1151
|
-
const s = Array.isArray(
|
|
1147
|
+
return Array.isArray(e) ? a += `[${e.map((i) => ae(i, t + 2))}${e.length ? Ze + " ".repeat(t + 2) : ""}]` : (a += `{${Ze}`, Object.entries(e).forEach(([i, n]) => {
|
|
1148
|
+
if (r && typeof i == "string" && (i = `'${Ae(i)}'`), a += " ".repeat(t + 2), Array.isArray(n))
|
|
1149
|
+
a += `${i}: [${n.map((s) => ae(s, t + 4, r))}${n.length ? Ze + " ".repeat(t + 2) : ""}]`;
|
|
1150
|
+
else if (typeof n == "object" && n !== null) {
|
|
1151
|
+
const s = Array.isArray(n) ? n : Ti(n);
|
|
1152
1152
|
a += `${i}: ${ae(s, t + 2, r)}`;
|
|
1153
1153
|
} else
|
|
1154
|
-
["number", "boolean", "undefined"].includes(typeof
|
|
1154
|
+
["number", "boolean", "undefined"].includes(typeof n) || n === null ? a += `${i}: ${n}` : typeof n == "string" ? a += `${i}: '${Ae(n)}'` : a += `${i}: ${n}`;
|
|
1155
1155
|
a += `,${Ze}`;
|
|
1156
1156
|
}), a += " ".repeat(t), a += "}"), a;
|
|
1157
1157
|
};
|
|
@@ -1162,8 +1162,8 @@ function St(e, t) {
|
|
|
1162
1162
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
1163
1163
|
const r = {};
|
|
1164
1164
|
for (const a of Object.keys(e)) {
|
|
1165
|
-
const i = St(e[a], t == null ? void 0 : t[a]),
|
|
1166
|
-
(i !== void 0 || !
|
|
1165
|
+
const i = St(e[a], t == null ? void 0 : t[a]), n = t && Object.prototype.hasOwnProperty.call(t, a), s = n ? t[a] : void 0;
|
|
1166
|
+
(i !== void 0 || !n || e[a] === void 0 && s !== void 0) && (r[a] = i);
|
|
1167
1167
|
}
|
|
1168
1168
|
return Object.keys(r).length ? r : void 0;
|
|
1169
1169
|
}
|
|
@@ -1187,7 +1187,7 @@ function Pt(e, t = "data-source-placeholder") {
|
|
|
1187
1187
|
if (!e)
|
|
1188
1188
|
return t;
|
|
1189
1189
|
const r = typeof e == "object" && "title" in e ? e.title : e;
|
|
1190
|
-
return
|
|
1190
|
+
return Ii(r);
|
|
1191
1191
|
}
|
|
1192
1192
|
function qt(e, t = !0) {
|
|
1193
1193
|
const r = [];
|
|
@@ -1213,15 +1213,15 @@ const Gt = `
|
|
|
1213
1213
|
includeChart: i = !0
|
|
1214
1214
|
}) => {
|
|
1215
1215
|
Sr(a);
|
|
1216
|
-
const
|
|
1216
|
+
const n = {
|
|
1217
1217
|
dashboardOid: e,
|
|
1218
1218
|
widgetOid: t
|
|
1219
1219
|
}, s = po[Number(i)];
|
|
1220
|
-
return st(s,
|
|
1220
|
+
return st(s, n, r);
|
|
1221
1221
|
}, bo = (e, t, r, a) => {
|
|
1222
1222
|
if ($e(e)) {
|
|
1223
1223
|
Sr(e.chartType);
|
|
1224
|
-
const i = Rt(e),
|
|
1224
|
+
const i = Rt(e), n = {
|
|
1225
1225
|
idString: e.id,
|
|
1226
1226
|
widgetTypeString: "chart",
|
|
1227
1227
|
titleString: e.title,
|
|
@@ -1234,10 +1234,10 @@ const Gt = `
|
|
|
1234
1234
|
styleOptionsString: ae(a ? Zt(e.styleOptions || {}, e.chartType) : e.styleOptions || {}, qe),
|
|
1235
1235
|
drilldownOptionsString: ae(e.drilldownOptions || {}, qe)
|
|
1236
1236
|
};
|
|
1237
|
-
return st(r.chart,
|
|
1237
|
+
return st(r.chart, n, t);
|
|
1238
1238
|
}
|
|
1239
1239
|
if (ai(e)) {
|
|
1240
|
-
const i = Rt(e),
|
|
1240
|
+
const i = Rt(e), n = {
|
|
1241
1241
|
idString: e.id,
|
|
1242
1242
|
widgetTypeString: "pivot",
|
|
1243
1243
|
titleString: e.title,
|
|
@@ -1248,7 +1248,7 @@ const Gt = `
|
|
|
1248
1248
|
extraImportsString: qt(e.filters || [], i),
|
|
1249
1249
|
styleOptionsString: ae(a ? Zt(e.styleOptions || {}, e.widgetType) : e.styleOptions || {}, qe)
|
|
1250
1250
|
};
|
|
1251
|
-
return st(r.pivot,
|
|
1251
|
+
return st(r.pivot, n, t);
|
|
1252
1252
|
}
|
|
1253
1253
|
if (ii(e))
|
|
1254
1254
|
return "/** Custom widget code not supported yet */";
|
|
@@ -1271,7 +1271,7 @@ const ko = (e) => {
|
|
|
1271
1271
|
if (!(r.panel === "scope" && xo(a) && a.by === void 0))
|
|
1272
1272
|
return r;
|
|
1273
1273
|
const i = r.jaql, {
|
|
1274
|
-
type:
|
|
1274
|
+
type: n,
|
|
1275
1275
|
context: s,
|
|
1276
1276
|
formula: p,
|
|
1277
1277
|
filter: d
|
|
@@ -1286,7 +1286,7 @@ const ko = (e) => {
|
|
|
1286
1286
|
// Keep the filter but add the by clause
|
|
1287
1287
|
filter: te(O({}, d), {
|
|
1288
1288
|
by: {
|
|
1289
|
-
type:
|
|
1289
|
+
type: n,
|
|
1290
1290
|
context: s,
|
|
1291
1291
|
formula: p
|
|
1292
1292
|
}
|
|
@@ -1325,9 +1325,9 @@ const ko = (e) => {
|
|
|
1325
1325
|
bar: "bar/stacked",
|
|
1326
1326
|
column: "column/stackedcolumn"
|
|
1327
1327
|
}), Co = (e, t, r) => {
|
|
1328
|
-
const a = e.reduce((
|
|
1328
|
+
const a = e.reduce((n, s) => (n[s.jaql.title] = s, n), {}), i = Object.entries(r).reduce((n, s) => {
|
|
1329
1329
|
const [p, d] = s;
|
|
1330
|
-
return
|
|
1330
|
+
return n[`${p}`] = Array.isArray(d) ? d.map((g) => {
|
|
1331
1331
|
var b, x;
|
|
1332
1332
|
const o = Be(g);
|
|
1333
1333
|
delete o.enabled;
|
|
@@ -1355,7 +1355,7 @@ const ko = (e) => {
|
|
|
1355
1355
|
return te(O({}, o), {
|
|
1356
1356
|
column: c
|
|
1357
1357
|
});
|
|
1358
|
-
}) : d,
|
|
1358
|
+
}) : d, n;
|
|
1359
1359
|
}, {});
|
|
1360
1360
|
switch (t) {
|
|
1361
1361
|
case "cartesian":
|
|
@@ -1370,12 +1370,12 @@ const ko = (e) => {
|
|
|
1370
1370
|
value: []
|
|
1371
1371
|
}, i);
|
|
1372
1372
|
case "scatter":
|
|
1373
|
-
return Object.keys(i).forEach((
|
|
1374
|
-
i[`${
|
|
1373
|
+
return Object.keys(i).forEach((n) => {
|
|
1374
|
+
i[`${n}`] = i[`${n}`][0];
|
|
1375
1375
|
}), i;
|
|
1376
1376
|
case "scattermap":
|
|
1377
|
-
return Object.keys(i).forEach((
|
|
1378
|
-
|
|
1377
|
+
return Object.keys(i).forEach((n) => {
|
|
1378
|
+
n !== "geo" && (i[`${n}`] = i[`${n}`][0]);
|
|
1379
1379
|
}), i;
|
|
1380
1380
|
case "table":
|
|
1381
1381
|
return Object.keys(i).length === 0 ? yo(e).dataOptions : i;
|
|
@@ -1386,15 +1386,15 @@ const ko = (e) => {
|
|
|
1386
1386
|
return i;
|
|
1387
1387
|
}
|
|
1388
1388
|
}, Bt = (e, t) => {
|
|
1389
|
-
var r, a, i,
|
|
1390
|
-
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => Be(s).column.name).join(", ") : (
|
|
1389
|
+
var r, a, i, n;
|
|
1390
|
+
return t === "x" ? (a = (r = e.category) != null ? r : e.x) == null ? void 0 : a.map((s) => Be(s).column.name).join(", ") : (n = (i = e.value) != null ? i : e.y) == null ? void 0 : n.map((s) => Be(s).column.name).join(", ");
|
|
1391
1391
|
}, Yt = (e, t) => {
|
|
1392
1392
|
var r;
|
|
1393
1393
|
return (r = e[t]) == null ? void 0 : r.map((a) => Be(a).column.name).join(", ");
|
|
1394
1394
|
}, _o = (e, t, r, a) => {
|
|
1395
1395
|
let i;
|
|
1396
1396
|
if (a && e in Ht)
|
|
1397
|
-
i =
|
|
1397
|
+
i = Ie(Ie(wo, {
|
|
1398
1398
|
subtype: Ht[`${e}`]
|
|
1399
1399
|
}), {
|
|
1400
1400
|
legend: {
|
|
@@ -1415,7 +1415,7 @@ const ko = (e) => {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
}, r);
|
|
1417
1417
|
else if (a && e === "indicator") {
|
|
1418
|
-
const
|
|
1418
|
+
const n = {
|
|
1419
1419
|
indicatorComponents: {
|
|
1420
1420
|
title: {
|
|
1421
1421
|
shouldBeShown: !0,
|
|
@@ -1423,19 +1423,19 @@ const ko = (e) => {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}, s = Yt(t, "secondary");
|
|
1426
|
-
s &&
|
|
1426
|
+
s && n != null && n.indicatorComponents && (n.indicatorComponents.secondaryTitle = {
|
|
1427
1427
|
text: s
|
|
1428
|
-
}), i =
|
|
1428
|
+
}), i = Ie(Et(), n, r);
|
|
1429
1429
|
} else
|
|
1430
|
-
i =
|
|
1430
|
+
i = Ie(Et(), r);
|
|
1431
1431
|
return i;
|
|
1432
1432
|
}, vo = (e, t, r = !0) => {
|
|
1433
1433
|
const {
|
|
1434
1434
|
chartFamily: a,
|
|
1435
1435
|
chartType: i,
|
|
1436
|
-
axesMapping:
|
|
1436
|
+
axesMapping: n = {},
|
|
1437
1437
|
styleOptions: s = {}
|
|
1438
|
-
} = t, p = Co(e, a,
|
|
1438
|
+
} = t, p = Co(e, a, n), d = _o(i, n, s, r);
|
|
1439
1439
|
return {
|
|
1440
1440
|
dataOptions: p,
|
|
1441
1441
|
chartStyleOptions: d
|
|
@@ -1444,31 +1444,31 @@ const ko = (e) => {
|
|
|
1444
1444
|
chartType: "table",
|
|
1445
1445
|
chartFamily: "table",
|
|
1446
1446
|
axesMapping: {}
|
|
1447
|
-
}, Mo = (e) => e.map((t) => Za(t.jaql)),
|
|
1448
|
-
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(
|
|
1449
|
-
const a =
|
|
1447
|
+
}, Mo = (e) => e.map((t) => Za(t.jaql)), Io = (e) => e.reduce((t, r) => {
|
|
1448
|
+
if ((r.panel === "scope" || r.jaql.filter) && t.metadataFilters.push(G(r)), r.panel !== "scope") {
|
|
1449
|
+
const a = G(r);
|
|
1450
1450
|
delete a.jaql.filter, t.metadataColumns.push(a);
|
|
1451
1451
|
}
|
|
1452
1452
|
return t;
|
|
1453
1453
|
}, {
|
|
1454
1454
|
metadataColumns: [],
|
|
1455
1455
|
metadataFilters: []
|
|
1456
|
-
}),
|
|
1457
|
-
if (!
|
|
1456
|
+
}), Do = (e, t) => {
|
|
1457
|
+
if (!Di(e))
|
|
1458
1458
|
try {
|
|
1459
1459
|
const {
|
|
1460
1460
|
useCustomizedStyleOptions: r = !1
|
|
1461
1461
|
} = t || {}, {
|
|
1462
1462
|
jaql: a,
|
|
1463
1463
|
chartRecommendations: i,
|
|
1464
|
-
queryTitle:
|
|
1464
|
+
queryTitle: n
|
|
1465
1465
|
} = e, {
|
|
1466
1466
|
metadata: s,
|
|
1467
1467
|
datasource: p
|
|
1468
1468
|
} = a, d = te(O({}, p), {
|
|
1469
1469
|
type: p.type || "elasticube"
|
|
1470
|
-
}), g = Oa(d), b = ko(s).map((
|
|
1471
|
-
jaql: te(O({},
|
|
1470
|
+
}), g = Oa(d), b = ko(s).map((I) => Ri(I)).map((I) => te(O({}, I), {
|
|
1471
|
+
jaql: te(O({}, I.jaql), {
|
|
1472
1472
|
datasource: g
|
|
1473
1473
|
})
|
|
1474
1474
|
})), x = So(i), o = x.chartType.toLowerCase(), u = {
|
|
@@ -1480,14 +1480,14 @@ const ko = (e) => {
|
|
|
1480
1480
|
}, {
|
|
1481
1481
|
metadataColumns: c,
|
|
1482
1482
|
metadataFilters: m
|
|
1483
|
-
} =
|
|
1483
|
+
} = Io(b), h = Mo(m), {
|
|
1484
1484
|
dataOptions: k,
|
|
1485
1485
|
chartStyleOptions: _
|
|
1486
1486
|
} = vo(c, x, r), w = O(O({}, _), u);
|
|
1487
1487
|
return {
|
|
1488
1488
|
widgetType: "chart",
|
|
1489
|
-
id:
|
|
1490
|
-
title:
|
|
1489
|
+
id: n,
|
|
1490
|
+
title: n,
|
|
1491
1491
|
chartType: o,
|
|
1492
1492
|
dataSource: d,
|
|
1493
1493
|
dataOptions: k,
|
|
@@ -1498,7 +1498,7 @@ const ko = (e) => {
|
|
|
1498
1498
|
console.error(r);
|
|
1499
1499
|
return;
|
|
1500
1500
|
}
|
|
1501
|
-
}, Je = (e, t) =>
|
|
1501
|
+
}, Je = (e, t) => Do(e, t), Ao = (e) => Ci(e) ? mo(e) : fo(e), Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1502
1502
|
__proto__: null,
|
|
1503
1503
|
toWidgetCode: Ao,
|
|
1504
1504
|
toWidgetProps: Je
|
|
@@ -1525,8 +1525,8 @@ var Lo = Object.defineProperty, To = Object.defineProperties, No = Object.getOwn
|
|
|
1525
1525
|
for (var a of Ue(e))
|
|
1526
1526
|
t.indexOf(a) < 0 && Lr.call(e, a) && (r[a] = e[a]);
|
|
1527
1527
|
return r;
|
|
1528
|
-
},
|
|
1529
|
-
var
|
|
1528
|
+
}, q = (e, t, r) => dt(e, typeof t != "symbol" ? t + "" : t, r), se = (e, t, r) => new Promise((a, i) => {
|
|
1529
|
+
var n = (d) => {
|
|
1530
1530
|
try {
|
|
1531
1531
|
p(r.next(d));
|
|
1532
1532
|
} catch (g) {
|
|
@@ -1538,7 +1538,7 @@ var Lo = Object.defineProperty, To = Object.defineProperties, No = Object.getOwn
|
|
|
1538
1538
|
} catch (g) {
|
|
1539
1539
|
i(g);
|
|
1540
1540
|
}
|
|
1541
|
-
}, p = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(
|
|
1541
|
+
}, p = (d) => d.done ? a(d.value) : Promise.resolve(d.value).then(n, s);
|
|
1542
1542
|
p((r = r.apply(e, t)).next());
|
|
1543
1543
|
});
|
|
1544
1544
|
class Oo extends oi {
|
|
@@ -1599,8 +1599,8 @@ class Oo extends oi {
|
|
|
1599
1599
|
gr.batch(() => {
|
|
1600
1600
|
if (this.mutateOptions && this.hasListeners()) {
|
|
1601
1601
|
if (t.onSuccess) {
|
|
1602
|
-
var r, a, i,
|
|
1603
|
-
(r = (a = this.mutateOptions).onSuccess) == null || r.call(a, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (i = (
|
|
1602
|
+
var r, a, i, n;
|
|
1603
|
+
(r = (a = this.mutateOptions).onSuccess) == null || r.call(a, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (i = (n = this.mutateOptions).onSettled) == null || i.call(n, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
|
|
1604
1604
|
} else if (t.onError) {
|
|
1605
1605
|
var s, p, d, g;
|
|
1606
1606
|
(s = (p = this.mutateOptions).onError) == null || s.call(p, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (d = (g = this.mutateOptions).onSettled) == null || d.call(g, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
|
|
@@ -1617,14 +1617,14 @@ class Oo extends oi {
|
|
|
1617
1617
|
function Mt(e, t, r) {
|
|
1618
1618
|
const a = Ua(e, t), i = je({
|
|
1619
1619
|
context: a.context
|
|
1620
|
-
}), [
|
|
1620
|
+
}), [n] = R(() => new Oo(i, a));
|
|
1621
1621
|
ye(() => {
|
|
1622
|
-
|
|
1623
|
-
}, [
|
|
1624
|
-
const s = Qa(j((d) =>
|
|
1625
|
-
|
|
1626
|
-
}, [
|
|
1627
|
-
if (s.error && Fa(
|
|
1622
|
+
n.setOptions(a);
|
|
1623
|
+
}, [n, a]);
|
|
1624
|
+
const s = Qa(j((d) => n.subscribe(gr.batchCalls(d)), [n]), () => n.getCurrentResult(), () => n.getCurrentResult()), p = j((d, g) => {
|
|
1625
|
+
n.mutate(d, g).catch(Eo);
|
|
1626
|
+
}, [n]);
|
|
1627
|
+
if (s.error && Fa(n.options.useErrorBoundary, [s.error]))
|
|
1628
1628
|
throw s.error;
|
|
1629
1629
|
return T(S({}, s), {
|
|
1630
1630
|
mutate: p,
|
|
@@ -1643,28 +1643,48 @@ const Tr = Fe({}), zo = () => bt(Tr), Ro = ({
|
|
|
1643
1643
|
r((g) => T(S({}, g), {
|
|
1644
1644
|
[a(p, d)]: s
|
|
1645
1645
|
}));
|
|
1646
|
-
}, [a]),
|
|
1647
|
-
return /* @__PURE__ */
|
|
1646
|
+
}, [a]), n = j((s, p) => t[a(s, p)], [t, a]);
|
|
1647
|
+
return /* @__PURE__ */ l(Tr.Provider, {
|
|
1648
1648
|
value: {
|
|
1649
1649
|
saveChatId: i,
|
|
1650
|
-
getChatId:
|
|
1650
|
+
getChatId: n
|
|
1651
1651
|
},
|
|
1652
1652
|
children: e
|
|
1653
1653
|
});
|
|
1654
|
-
};
|
|
1654
|
+
}, Zo = "api/v2/ai/widget/narrative", Wo = "api/v2/ai/nlg/queryResult";
|
|
1655
|
+
function Po(e) {
|
|
1656
|
+
return "status" in e;
|
|
1657
|
+
}
|
|
1658
|
+
function qo(e) {
|
|
1659
|
+
return typeof e != "object" || e === null ? !1 : Po(e) && e.status === "404";
|
|
1660
|
+
}
|
|
1661
|
+
function Go(e, t, r) {
|
|
1662
|
+
return se(this, null, function* () {
|
|
1663
|
+
if ((r == null ? void 0 : r.isUnifiedNarrationEnabled) !== !1)
|
|
1664
|
+
try {
|
|
1665
|
+
return yield e.post(Zo, t);
|
|
1666
|
+
} catch (a) {
|
|
1667
|
+
if (!qo(a))
|
|
1668
|
+
throw a;
|
|
1669
|
+
}
|
|
1670
|
+
return yield e.post(Wo, t);
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1655
1673
|
class Ut {
|
|
1656
|
-
constructor(t, r = !1) {
|
|
1657
|
-
|
|
1674
|
+
constructor(t, r = !1, a) {
|
|
1675
|
+
q(this, "httpClient"), q(this, "isUnifiedNarrationEnabled"), q(this, "getChatContexts", () => se(this, null, function* () {
|
|
1658
1676
|
return (yield this.httpClient.get("api/datasources//")) || [];
|
|
1659
|
-
})),
|
|
1660
|
-
|
|
1661
|
-
})),
|
|
1677
|
+
})), q(this, "getNlgInsights", (i) => Go(this.httpClient, i, {
|
|
1678
|
+
isUnifiedNarrationEnabled: this.isUnifiedNarrationEnabled
|
|
1679
|
+
})), q(this, "getQueryRecommendations", (i, n) => this.httpClient.get(`api/v2/ai/recommendations/query/${i}/${n.numOfRecommendations}${n.userPrompt ? "?userPrompt=" + encodeURIComponent(n.userPrompt) : ""}`)), q(this, "getNlqResult", (i, n) => this.httpClient.post(`api/v2/ai/nlq/query/${i}`, n)), q(this, "setLlmConfig", (i) => this.httpClient.post("api/v2/settings/ai/llmProvider", i).catch((n) => {
|
|
1680
|
+
console.error("Unable to set llm config", n);
|
|
1681
|
+
})), q(this, "getAllChats", () => se(this, null, function* () {
|
|
1662
1682
|
return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
|
|
1663
|
-
})),
|
|
1664
|
-
sourceId:
|
|
1683
|
+
})), q(this, "getChatById", (i) => this.httpClient.get(`api/v2/ai/chats/${i}`)), q(this, "createChat", (i, n) => this.httpClient.post("api/v2/ai/chats", {
|
|
1684
|
+
sourceId: i,
|
|
1665
1685
|
volatile: this.volatile,
|
|
1666
|
-
contextDetails:
|
|
1667
|
-
})),
|
|
1686
|
+
contextDetails: n
|
|
1687
|
+
})), q(this, "postChat", (i, n) => this.httpClient.post(`api/v2/ai/chats/${i}`, n)), q(this, "deleteChatHistory", (i) => this.httpClient.delete(`api/v2/ai/chats/${i}/history`)), q(this, "sendFeedback", (i) => this.httpClient.post("api/v2/ai/feedback", i)), q(this, "ai", {
|
|
1668
1688
|
getNlgInsights: this.getNlgInsights,
|
|
1669
1689
|
getNlqResult: this.getNlqResult,
|
|
1670
1690
|
getQueryRecommendations: this.getQueryRecommendations,
|
|
@@ -1677,7 +1697,7 @@ class Ut {
|
|
|
1677
1697
|
post: this.postChat,
|
|
1678
1698
|
clearHistory: this.deleteChatHistory
|
|
1679
1699
|
}
|
|
1680
|
-
}), this.volatile = r, this.httpClient = t;
|
|
1700
|
+
}), this.volatile = r, this.httpClient = t, this.isUnifiedNarrationEnabled = a;
|
|
1681
1701
|
}
|
|
1682
1702
|
}
|
|
1683
1703
|
new or({
|
|
@@ -1696,7 +1716,7 @@ function jr(e) {
|
|
|
1696
1716
|
{
|
|
1697
1717
|
const a = Aa(e.dataSource), {
|
|
1698
1718
|
filters: i = [],
|
|
1699
|
-
relations:
|
|
1719
|
+
relations: n
|
|
1700
1720
|
} = La(e.filters), {
|
|
1701
1721
|
metadata: s,
|
|
1702
1722
|
filterRelations: p
|
|
@@ -1705,7 +1725,7 @@ function jr(e) {
|
|
|
1705
1725
|
attributes: (t = e.dimensions) != null ? t : [],
|
|
1706
1726
|
measures: (r = e.measures) != null ? r : [],
|
|
1707
1727
|
filters: i,
|
|
1708
|
-
filterRelations:
|
|
1728
|
+
filterRelations: n,
|
|
1709
1729
|
highlights: []
|
|
1710
1730
|
}, !0), d = {
|
|
1711
1731
|
jaql: {
|
|
@@ -1717,10 +1737,10 @@ function jr(e) {
|
|
|
1717
1737
|
return e.verbosity && (d.verbosity = e.verbosity), d;
|
|
1718
1738
|
}
|
|
1719
1739
|
}
|
|
1720
|
-
const
|
|
1721
|
-
const r =
|
|
1740
|
+
const It = (e, t = !0) => {
|
|
1741
|
+
const r = $(() => jr(e), [e]), a = ie(), {
|
|
1722
1742
|
data: i,
|
|
1723
|
-
error:
|
|
1743
|
+
error: n,
|
|
1724
1744
|
isError: s,
|
|
1725
1745
|
isLoading: p,
|
|
1726
1746
|
isSuccess: d,
|
|
@@ -1739,13 +1759,13 @@ const Dt = (e, t = !0) => {
|
|
|
1739
1759
|
isError: s,
|
|
1740
1760
|
isSuccess: d,
|
|
1741
1761
|
data: i,
|
|
1742
|
-
error:
|
|
1762
|
+
error: n,
|
|
1743
1763
|
refetch: j(() => {
|
|
1744
1764
|
g();
|
|
1745
1765
|
}, [g])
|
|
1746
1766
|
};
|
|
1747
|
-
},
|
|
1748
|
-
function
|
|
1767
|
+
}, $o = ["indicator", "column", "line", "table", "pie", "bar"];
|
|
1768
|
+
function Ho(e) {
|
|
1749
1769
|
const {
|
|
1750
1770
|
dataSource: t,
|
|
1751
1771
|
query: r,
|
|
@@ -1757,17 +1777,17 @@ function Wo(e) {
|
|
|
1757
1777
|
text: r,
|
|
1758
1778
|
// Timezone is not used by AI API, but it is currently required by the endpoint
|
|
1759
1779
|
timezone: "UTC",
|
|
1760
|
-
chartTypes: a ?? [
|
|
1780
|
+
chartTypes: a ?? [...$o]
|
|
1761
1781
|
}
|
|
1762
1782
|
};
|
|
1763
1783
|
}
|
|
1764
|
-
const pt = 4,
|
|
1784
|
+
const pt = 4, Bo = (e) => {
|
|
1765
1785
|
const {
|
|
1766
1786
|
contextTitle: t,
|
|
1767
1787
|
count: r,
|
|
1768
1788
|
enableAxisTitlesInWidgetProps: a,
|
|
1769
1789
|
enabled: i,
|
|
1770
|
-
customPrompt:
|
|
1790
|
+
customPrompt: n
|
|
1771
1791
|
} = e, s = ie(), p = r ?? pt, d = (i === void 0 || i === !0) && p > 0, {
|
|
1772
1792
|
isLoading: g,
|
|
1773
1793
|
isError: b,
|
|
@@ -1779,11 +1799,11 @@ const pt = 4, Po = (e) => {
|
|
|
1779
1799
|
queryKey: ["getQueryRecommendations", t, p, s],
|
|
1780
1800
|
queryFn: () => s == null ? void 0 : s.ai.getQueryRecommendations(t, S({
|
|
1781
1801
|
numOfRecommendations: p
|
|
1782
|
-
},
|
|
1783
|
-
userPrompt:
|
|
1802
|
+
}, n ? {
|
|
1803
|
+
userPrompt: n
|
|
1784
1804
|
} : null)),
|
|
1785
1805
|
enabled: !!s && d
|
|
1786
|
-
}), m =
|
|
1806
|
+
}), m = $(() => o == null ? void 0 : o.map((h) => T(S({}, h), {
|
|
1787
1807
|
widgetProps: h.jaql ? Je(h, {
|
|
1788
1808
|
useCustomizedStyleOptions: a
|
|
1789
1809
|
}) : void 0
|
|
@@ -1804,28 +1824,28 @@ const pt = 4, Po = (e) => {
|
|
|
1804
1824
|
enableInsights: !0,
|
|
1805
1825
|
numOfRecommendations: 4,
|
|
1806
1826
|
numOfRecentPrompts: 5
|
|
1807
|
-
}), Er = Fe(S({}, Or)), oe = () => bt(Er),
|
|
1827
|
+
}), Er = Fe(S({}, Or)), oe = () => bt(Er), Yo = ({
|
|
1808
1828
|
children: e,
|
|
1809
1829
|
value: t
|
|
1810
1830
|
}) => {
|
|
1811
1831
|
const {
|
|
1812
1832
|
t: r
|
|
1813
|
-
} = E(), a = Object.entries(t).reduce((i, [
|
|
1833
|
+
} = E(), a = Object.entries(t).reduce((i, [n, s]) => (s !== void 0 && (i[n] = s), i), T(S({}, Or), {
|
|
1814
1834
|
inputPromptText: r("ai.config.inputPromptText"),
|
|
1815
1835
|
welcomeText: r("ai.config.welcomeText"),
|
|
1816
1836
|
suggestionsWelcomeText: r("ai.config.suggestionsWelcomeText")
|
|
1817
1837
|
}));
|
|
1818
|
-
return /* @__PURE__ */
|
|
1838
|
+
return /* @__PURE__ */ l(Er.Provider, {
|
|
1819
1839
|
value: a,
|
|
1820
1840
|
children: e
|
|
1821
1841
|
});
|
|
1822
|
-
},
|
|
1842
|
+
}, Dt = "chatHistory", Uo = (e) => {
|
|
1823
1843
|
const t = ie(), {
|
|
1824
1844
|
hideHistory: r
|
|
1825
1845
|
} = oe();
|
|
1826
1846
|
return Ne({
|
|
1827
|
-
queryKey: [
|
|
1828
|
-
queryFn: () =>
|
|
1847
|
+
queryKey: [Dt, e, t],
|
|
1848
|
+
queryFn: () => se(void 0, null, function* () {
|
|
1829
1849
|
if (!t || !e)
|
|
1830
1850
|
return;
|
|
1831
1851
|
if (r)
|
|
@@ -1838,7 +1858,7 @@ const pt = 4, Po = (e) => {
|
|
|
1838
1858
|
}, zr = (e) => {
|
|
1839
1859
|
const t = ie(), r = je();
|
|
1840
1860
|
return Mt({
|
|
1841
|
-
mutationFn: () =>
|
|
1861
|
+
mutationFn: () => se(void 0, null, function* () {
|
|
1842
1862
|
if (!(!t || !e))
|
|
1843
1863
|
return t.ai.chat.clearHistory(e);
|
|
1844
1864
|
}),
|
|
@@ -1846,15 +1866,15 @@ const pt = 4, Po = (e) => {
|
|
|
1846
1866
|
console.error("Error when clearing history:", a);
|
|
1847
1867
|
},
|
|
1848
1868
|
onSettled: () => {
|
|
1849
|
-
e && r.setQueriesData([
|
|
1869
|
+
e && r.setQueriesData([Dt, e], []);
|
|
1850
1870
|
}
|
|
1851
1871
|
});
|
|
1852
|
-
},
|
|
1872
|
+
}, Qo = (e) => {
|
|
1853
1873
|
const {
|
|
1854
1874
|
data: t,
|
|
1855
1875
|
isLoading: r,
|
|
1856
1876
|
isError: a
|
|
1857
|
-
} =
|
|
1877
|
+
} = Uo(e), {
|
|
1858
1878
|
mutate: i
|
|
1859
1879
|
} = zr(e);
|
|
1860
1880
|
return ye(() => {
|
|
@@ -1864,14 +1884,14 @@ const pt = 4, Po = (e) => {
|
|
|
1864
1884
|
isLoading: r,
|
|
1865
1885
|
isError: a
|
|
1866
1886
|
};
|
|
1867
|
-
},
|
|
1887
|
+
}, Fo = () => {
|
|
1868
1888
|
const e = ie(), {
|
|
1869
1889
|
data: t,
|
|
1870
1890
|
isLoading: r,
|
|
1871
1891
|
fetchStatus: a
|
|
1872
1892
|
} = Ne({
|
|
1873
1893
|
queryKey: ["getDataTopics", e],
|
|
1874
|
-
queryFn: () =>
|
|
1894
|
+
queryFn: () => se(void 0, null, function* () {
|
|
1875
1895
|
if (e)
|
|
1876
1896
|
return e.getChatContexts();
|
|
1877
1897
|
}),
|
|
@@ -1882,7 +1902,7 @@ const pt = 4, Po = (e) => {
|
|
|
1882
1902
|
isLoading: r,
|
|
1883
1903
|
fetchStatus: a
|
|
1884
1904
|
};
|
|
1885
|
-
},
|
|
1905
|
+
}, Vo = () => {
|
|
1886
1906
|
const e = ie(), {
|
|
1887
1907
|
data: t,
|
|
1888
1908
|
isLoading: r
|
|
@@ -1895,18 +1915,18 @@ const pt = 4, Po = (e) => {
|
|
|
1895
1915
|
data: t ?? [],
|
|
1896
1916
|
isLoading: r
|
|
1897
1917
|
};
|
|
1898
|
-
},
|
|
1899
|
-
const a = je(), i = ie(),
|
|
1900
|
-
mutationFn: () =>
|
|
1918
|
+
}, Jo = (e, t, r) => {
|
|
1919
|
+
const a = je(), i = ie(), n = Mt({
|
|
1920
|
+
mutationFn: () => se(void 0, null, function* () {
|
|
1901
1921
|
if (!(!i || !e))
|
|
1902
1922
|
return i.ai.chat.create(e, r);
|
|
1903
1923
|
}),
|
|
1904
1924
|
onSuccess: () => a.invalidateQueries(["getAllChats"])
|
|
1905
1925
|
});
|
|
1906
1926
|
return ye(() => {
|
|
1907
|
-
t &&
|
|
1908
|
-
}, [t,
|
|
1909
|
-
},
|
|
1927
|
+
t && n.isIdle && n.mutate();
|
|
1928
|
+
}, [t, n]), n;
|
|
1929
|
+
}, Xo = (e, t) => {
|
|
1910
1930
|
switch (e.responseType = e.responseType.toLowerCase(), e.responseType) {
|
|
1911
1931
|
case "nlq":
|
|
1912
1932
|
return {
|
|
@@ -1923,18 +1943,18 @@ const pt = 4, Po = (e) => {
|
|
|
1923
1943
|
default:
|
|
1924
1944
|
throw Error(`${t}${JSON.stringify(e)}`);
|
|
1925
1945
|
}
|
|
1926
|
-
},
|
|
1946
|
+
}, Ko = (e, t) => {
|
|
1927
1947
|
const r = je(), a = j((d) => {
|
|
1928
|
-
e && r.setQueriesData([
|
|
1948
|
+
e && r.setQueriesData([Dt, e], (g) => g && [...g, d]);
|
|
1929
1949
|
}, [r, e]), {
|
|
1930
1950
|
t: i
|
|
1931
|
-
} = E(),
|
|
1951
|
+
} = E(), n = ie(), {
|
|
1932
1952
|
mutate: s,
|
|
1933
1953
|
isLoading: p
|
|
1934
1954
|
} = Mt({
|
|
1935
|
-
mutationFn: (d) =>
|
|
1936
|
-
if (!(!
|
|
1937
|
-
return
|
|
1955
|
+
mutationFn: (d) => se(void 0, null, function* () {
|
|
1956
|
+
if (!(!n || !e))
|
|
1957
|
+
return n.ai.chat.post(e, {
|
|
1938
1958
|
text: d,
|
|
1939
1959
|
options: {
|
|
1940
1960
|
enableFollowup: t
|
|
@@ -1959,60 +1979,60 @@ const pt = 4, Po = (e) => {
|
|
|
1959
1979
|
if (!d)
|
|
1960
1980
|
return;
|
|
1961
1981
|
const g = i("ai.errors.unknownResponse");
|
|
1962
|
-
a(
|
|
1982
|
+
a(Xo(d, g));
|
|
1963
1983
|
}
|
|
1964
1984
|
});
|
|
1965
1985
|
return {
|
|
1966
1986
|
mutate: s,
|
|
1967
1987
|
isLoading: p
|
|
1968
1988
|
};
|
|
1969
|
-
},
|
|
1989
|
+
}, en = (e, t, r = !1) => {
|
|
1970
1990
|
var a;
|
|
1971
1991
|
const {
|
|
1972
1992
|
data: i,
|
|
1973
|
-
isLoading:
|
|
1974
|
-
} =
|
|
1993
|
+
isLoading: n
|
|
1994
|
+
} = Vo(), s = zo(), p = s.getChatId(e, t) || ((a = i.find((x) => {
|
|
1975
1995
|
var o;
|
|
1976
1996
|
return x.contextTitle === e && ((o = x.contextDetails) == null ? void 0 : o.dashboardId) === (t == null ? void 0 : t.dashboardId);
|
|
1977
1997
|
})) == null ? void 0 : a.chatId), {
|
|
1978
1998
|
isError: d,
|
|
1979
1999
|
data: g,
|
|
1980
2000
|
isSuccess: b
|
|
1981
|
-
} =
|
|
2001
|
+
} = Jo(e, r && !n && !p, t);
|
|
1982
2002
|
return ye(() => {
|
|
1983
2003
|
b && g && !p && s.saveChatId(g.chatId, e, t);
|
|
1984
2004
|
}, [g, b, e, t, p, s]), {
|
|
1985
2005
|
chatId: p,
|
|
1986
|
-
isLoading:
|
|
2006
|
+
isLoading: n,
|
|
1987
2007
|
isError: d
|
|
1988
2008
|
};
|
|
1989
|
-
},
|
|
2009
|
+
}, tn = (e) => $(() => {
|
|
1990
2010
|
if (e != null && e.length) {
|
|
1991
2011
|
const t = e[e.length - 1];
|
|
1992
2012
|
if (Rr(t))
|
|
1993
2013
|
return JSON.parse(t.content);
|
|
1994
2014
|
}
|
|
1995
2015
|
return null;
|
|
1996
|
-
}, [e]), Rr = (e) => !!e && "type" in e && e.type === "nlq",
|
|
2016
|
+
}, [e]), Rr = (e) => !!e && "type" in e && e.type === "nlq", rn = (e) => !!e && "type" in e && e.type === "text", an = (e, t) => {
|
|
1997
2017
|
const {
|
|
1998
2018
|
t: r
|
|
1999
2019
|
} = E(), {
|
|
2000
2020
|
enableFollowupQuestions: a
|
|
2001
2021
|
} = oe(), {
|
|
2002
2022
|
chatId: i,
|
|
2003
|
-
isError:
|
|
2004
|
-
} =
|
|
2023
|
+
isError: n
|
|
2024
|
+
} = en(e, t, !0), [s, p] = R(null), {
|
|
2005
2025
|
history: d,
|
|
2006
2026
|
isLoading: g,
|
|
2007
2027
|
isError: b
|
|
2008
|
-
} =
|
|
2028
|
+
} = Qo(i);
|
|
2009
2029
|
ye(() => {
|
|
2010
|
-
|
|
2011
|
-
}, [
|
|
2030
|
+
n ? p(new Le("ai.errors.chatUnavailable")) : b && p(new Le("ai.errors.fetchHistory"));
|
|
2031
|
+
}, [n, b, r]);
|
|
2012
2032
|
const {
|
|
2013
2033
|
mutate: x,
|
|
2014
2034
|
isLoading: o
|
|
2015
|
-
} =
|
|
2035
|
+
} = Ko(i, a), u = tn(d);
|
|
2016
2036
|
return {
|
|
2017
2037
|
chatId: i,
|
|
2018
2038
|
history: d ?? [],
|
|
@@ -2022,7 +2042,7 @@ const pt = 4, Po = (e) => {
|
|
|
2022
2042
|
isLoading: g,
|
|
2023
2043
|
lastError: s
|
|
2024
2044
|
};
|
|
2025
|
-
},
|
|
2045
|
+
}, on = 500, nn = 500, ln = 500, sn = 900, cn = C.div`
|
|
2026
2046
|
box-sizing: border-box;
|
|
2027
2047
|
position: relative;
|
|
2028
2048
|
display: flex;
|
|
@@ -2036,14 +2056,14 @@ const pt = 4, Po = (e) => {
|
|
|
2036
2056
|
}) => e.aiChat.backgroundColor};
|
|
2037
2057
|
overflow: hidden;
|
|
2038
2058
|
|
|
2039
|
-
min-width: ${
|
|
2040
|
-
min-height: ${
|
|
2059
|
+
min-width: ${on}px;
|
|
2060
|
+
min-height: ${nn}px;
|
|
2041
2061
|
width: ${({
|
|
2042
2062
|
width: e
|
|
2043
|
-
}) => e ? Qt(e) : `${
|
|
2063
|
+
}) => e ? Qt(e) : `${ln}px`};
|
|
2044
2064
|
height: ${({
|
|
2045
2065
|
height: e
|
|
2046
|
-
}) => e ? Qt(e) : `${
|
|
2066
|
+
}) => e ? Qt(e) : `${sn}px`};
|
|
2047
2067
|
|
|
2048
2068
|
${({
|
|
2049
2069
|
theme: e
|
|
@@ -2058,7 +2078,7 @@ const pt = 4, Po = (e) => {
|
|
|
2058
2078
|
function Qt(e) {
|
|
2059
2079
|
return typeof e == "number" ? `${e}px` : e;
|
|
2060
2080
|
}
|
|
2061
|
-
function
|
|
2081
|
+
function dn({
|
|
2062
2082
|
spin: e
|
|
2063
2083
|
}) {
|
|
2064
2084
|
return /* @__PURE__ */ v("svg", {
|
|
@@ -2068,13 +2088,13 @@ function on({
|
|
|
2068
2088
|
viewBox: "0 0 24 24",
|
|
2069
2089
|
fill: "none",
|
|
2070
2090
|
className: `${e ? "csdk-animate-spin" : ""}`,
|
|
2071
|
-
children: [/* @__PURE__ */
|
|
2091
|
+
children: [/* @__PURE__ */ l("path", {
|
|
2072
2092
|
fillRule: "evenodd",
|
|
2073
2093
|
clipRule: "evenodd",
|
|
2074
2094
|
d: "M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",
|
|
2075
2095
|
fill: "#262E3D",
|
|
2076
2096
|
fillOpacity: "0.3"
|
|
2077
|
-
}), /* @__PURE__ */
|
|
2097
|
+
}), /* @__PURE__ */ l("path", {
|
|
2078
2098
|
fillRule: "evenodd",
|
|
2079
2099
|
clipRule: "evenodd",
|
|
2080
2100
|
d: "M20 12C20 16.4183 16.4183 20 12 20C11.2844 20 10.5908 19.906 9.93078 19.7298C9.96227 19.5889 9.97888 19.4423 9.97888 19.2918C9.97888 18.1873 9.08345 17.2918 7.97888 17.2918C6.87431 17.2918 5.97888 18.1873 5.97888 19.2918C5.97888 20.3964 6.87431 21.2918 7.97888 21.2918C8.56576 21.2918 9.0936 21.0391 9.45946 20.6364C10.2652 20.8731 11.1178 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3V4C16.4183 4 20 7.58172 20 12Z",
|
|
@@ -2083,15 +2103,15 @@ function on({
|
|
|
2083
2103
|
});
|
|
2084
2104
|
}
|
|
2085
2105
|
function Xe() {
|
|
2086
|
-
return /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ l("div", {
|
|
2087
2107
|
className: "csdk-m-auto",
|
|
2088
2108
|
"aria-label": "loading spinner",
|
|
2089
|
-
children: /* @__PURE__ */
|
|
2109
|
+
children: /* @__PURE__ */ l(dn, {
|
|
2090
2110
|
spin: !0
|
|
2091
2111
|
})
|
|
2092
2112
|
});
|
|
2093
2113
|
}
|
|
2094
|
-
const
|
|
2114
|
+
const pn = C.div`
|
|
2095
2115
|
text-align: center;
|
|
2096
2116
|
font-size: 11px;
|
|
2097
2117
|
line-height: 18px;
|
|
@@ -2107,26 +2127,26 @@ const nn = C.div`
|
|
|
2107
2127
|
theme: e
|
|
2108
2128
|
}) => e.aiChat.secondaryTextColor};
|
|
2109
2129
|
`;
|
|
2110
|
-
function
|
|
2130
|
+
function un({
|
|
2111
2131
|
theme: e
|
|
2112
2132
|
}) {
|
|
2113
2133
|
const {
|
|
2114
2134
|
t
|
|
2115
2135
|
} = E();
|
|
2116
|
-
return /* @__PURE__ */ v(
|
|
2136
|
+
return /* @__PURE__ */ v(pn, {
|
|
2117
2137
|
theme: e,
|
|
2118
|
-
children: [/* @__PURE__ */
|
|
2138
|
+
children: [/* @__PURE__ */ l("div", {
|
|
2119
2139
|
children: t("ai.disclaimer.poweredByAi")
|
|
2120
2140
|
}), /* @__PURE__ */ v("div", {
|
|
2121
2141
|
children: [" ", t("ai.disclaimer.rateRequest")]
|
|
2122
2142
|
})]
|
|
2123
2143
|
});
|
|
2124
2144
|
}
|
|
2125
|
-
const
|
|
2145
|
+
const gn = C.div`
|
|
2126
2146
|
display: flex;
|
|
2127
2147
|
flex-direction: column;
|
|
2128
2148
|
row-gap: 4px;
|
|
2129
|
-
`,
|
|
2149
|
+
`, hn = C.div`
|
|
2130
2150
|
font-size: 11px;
|
|
2131
2151
|
line-height: 18px;
|
|
2132
2152
|
font-weight: 300;
|
|
@@ -2140,7 +2160,7 @@ const sn = C.div`
|
|
|
2140
2160
|
theme: e
|
|
2141
2161
|
}) => e.aiChat.dropup.headers.hover.backgroundColor};
|
|
2142
2162
|
}
|
|
2143
|
-
`,
|
|
2163
|
+
`, mn = C.div`
|
|
2144
2164
|
font-size: ${({
|
|
2145
2165
|
theme: e
|
|
2146
2166
|
}) => e.aiChat.primaryFontSize[0]};
|
|
@@ -2158,28 +2178,28 @@ const sn = C.div`
|
|
|
2158
2178
|
}) => e.aiChat.dropup.items.hover.backgroundColor};
|
|
2159
2179
|
}
|
|
2160
2180
|
`;
|
|
2161
|
-
function
|
|
2181
|
+
function bn({
|
|
2162
2182
|
title: e,
|
|
2163
2183
|
items: t,
|
|
2164
2184
|
onSelect: r,
|
|
2165
2185
|
alwaysExpanded: a = !1
|
|
2166
2186
|
}) {
|
|
2167
|
-
const [i,
|
|
2187
|
+
const [i, n] = R(!1), {
|
|
2168
2188
|
themeSettings: s
|
|
2169
|
-
} =
|
|
2170
|
-
return /* @__PURE__ */ v(
|
|
2171
|
-
children: [/* @__PURE__ */
|
|
2172
|
-
onClick: () =>
|
|
2189
|
+
} = D();
|
|
2190
|
+
return /* @__PURE__ */ v(gn, {
|
|
2191
|
+
children: [/* @__PURE__ */ l(hn, {
|
|
2192
|
+
onClick: () => n((p) => !p),
|
|
2173
2193
|
theme: s,
|
|
2174
2194
|
children: e.toUpperCase()
|
|
2175
|
-
}), (i || a) && t.map((p, d) => /* @__PURE__ */
|
|
2195
|
+
}), (i || a) && t.map((p, d) => /* @__PURE__ */ l(mn, {
|
|
2176
2196
|
onClick: () => r(p),
|
|
2177
2197
|
theme: s,
|
|
2178
2198
|
children: p
|
|
2179
2199
|
}, d))]
|
|
2180
2200
|
});
|
|
2181
2201
|
}
|
|
2182
|
-
const
|
|
2202
|
+
const fn = C.div`
|
|
2183
2203
|
font-family: ${({
|
|
2184
2204
|
theme: e
|
|
2185
2205
|
}) => e.typography.fontFamily};
|
|
@@ -2203,7 +2223,7 @@ const un = C.div`
|
|
|
2203
2223
|
display: flex;
|
|
2204
2224
|
flex-direction: column;
|
|
2205
2225
|
row-gap: 4px;
|
|
2206
|
-
`,
|
|
2226
|
+
`, xn = C.div`
|
|
2207
2227
|
font-size: ${({
|
|
2208
2228
|
theme: e
|
|
2209
2229
|
}) => e.aiChat.primaryFontSize[0]};
|
|
@@ -2215,13 +2235,13 @@ const un = C.div`
|
|
|
2215
2235
|
}) => e.aiChat.dropup.items.textColor};
|
|
2216
2236
|
padding: 4px 12px;
|
|
2217
2237
|
`, ut = (e) => e.startsWith("/");
|
|
2218
|
-
function
|
|
2238
|
+
function kn({
|
|
2219
2239
|
recentPrompts: e,
|
|
2220
2240
|
suggestions: t,
|
|
2221
2241
|
isLoading: r,
|
|
2222
2242
|
onSelection: a,
|
|
2223
2243
|
anchorEl: i,
|
|
2224
|
-
text:
|
|
2244
|
+
text: n,
|
|
2225
2245
|
recommendationsError: s
|
|
2226
2246
|
}) {
|
|
2227
2247
|
const p = [{
|
|
@@ -2232,13 +2252,13 @@ function hn({
|
|
|
2232
2252
|
title: "/ai recommendations",
|
|
2233
2253
|
items: t,
|
|
2234
2254
|
onSelect: a
|
|
2235
|
-
}].filter((x) => x.title.slice(0,
|
|
2255
|
+
}].filter((x) => x.title.slice(0, n.length) === n), {
|
|
2236
2256
|
themeSettings: d
|
|
2237
|
-
} =
|
|
2257
|
+
} = D(), {
|
|
2238
2258
|
t: g
|
|
2239
2259
|
} = E(), b = p.length === 1;
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
open: ut(
|
|
2260
|
+
return /* @__PURE__ */ l(ur, {
|
|
2261
|
+
open: ut(n) && p.length > 0,
|
|
2242
2262
|
anchorEl: i,
|
|
2243
2263
|
placement: "top-start",
|
|
2244
2264
|
modifiers: [{
|
|
@@ -2250,21 +2270,21 @@ function hn({
|
|
|
2250
2270
|
sx: {
|
|
2251
2271
|
zIndex: 3
|
|
2252
2272
|
},
|
|
2253
|
-
children: /* @__PURE__ */ v(
|
|
2273
|
+
children: /* @__PURE__ */ v(fn, {
|
|
2254
2274
|
style: {
|
|
2255
2275
|
width: i == null ? void 0 : i.offsetWidth
|
|
2256
2276
|
},
|
|
2257
2277
|
theme: d,
|
|
2258
|
-
children: [r && /* @__PURE__ */
|
|
2278
|
+
children: [r && /* @__PURE__ */ l(Xe, {}), !r && !s && p.map((x) => /* @__PURE__ */ l(bn, T(S({}, x), {
|
|
2259
2279
|
alwaysExpanded: b
|
|
2260
|
-
}), x.title)), s && /* @__PURE__ */
|
|
2280
|
+
}), x.title)), s && /* @__PURE__ */ l(xn, {
|
|
2261
2281
|
theme: d,
|
|
2262
2282
|
children: g("ai.errors.recommendationsNotAvailable")
|
|
2263
2283
|
})]
|
|
2264
2284
|
})
|
|
2265
2285
|
});
|
|
2266
2286
|
}
|
|
2267
|
-
const
|
|
2287
|
+
const yn = 500;
|
|
2268
2288
|
function Oe({
|
|
2269
2289
|
title: e,
|
|
2270
2290
|
placement: t = "top",
|
|
@@ -2272,8 +2292,8 @@ function Oe({
|
|
|
2272
2292
|
}) {
|
|
2273
2293
|
const {
|
|
2274
2294
|
themeSettings: a
|
|
2275
|
-
} =
|
|
2276
|
-
return /* @__PURE__ */
|
|
2295
|
+
} = D();
|
|
2296
|
+
return /* @__PURE__ */ l(Va, {
|
|
2277
2297
|
title: e,
|
|
2278
2298
|
placement: t,
|
|
2279
2299
|
disableInteractive: !0,
|
|
@@ -2301,7 +2321,7 @@ function Oe({
|
|
|
2301
2321
|
children: r
|
|
2302
2322
|
});
|
|
2303
2323
|
}
|
|
2304
|
-
function
|
|
2324
|
+
function wn({
|
|
2305
2325
|
theme: e
|
|
2306
2326
|
}) {
|
|
2307
2327
|
const t = e.aiChat.icons.color;
|
|
@@ -2311,34 +2331,34 @@ function bn({
|
|
|
2311
2331
|
height: "25",
|
|
2312
2332
|
viewBox: "0 0 25 25",
|
|
2313
2333
|
fill: "none",
|
|
2314
|
-
children: [/* @__PURE__ */
|
|
2334
|
+
children: [/* @__PURE__ */ l("path", {
|
|
2315
2335
|
d: "M21.4095 11.1195L12.5644 6.0459C12.3247 5.90841 12.0189 5.99143 11.8816 6.23128L10.764 8.18434C10.6275 8.42284 10.709 8.72678 10.9466 8.86491L19.7108 13.9614C19.9464 14.0984 20.2483 14.0215 20.3897 13.7884L21.5883 11.8125C21.734 11.5723 21.6532 11.2592 21.4095 11.1195Z",
|
|
2316
2336
|
fill: t
|
|
2317
|
-
}), /* @__PURE__ */
|
|
2337
|
+
}), /* @__PURE__ */ l("path", {
|
|
2318
2338
|
d: "M18.7329 8.60735L16.1048 7.07819L19.6668 0.928042C19.8041 0.6909 20.1068 0.608502 20.3454 0.743288L22.156 1.7661C22.3992 1.90347 22.4827 2.21344 22.3414 2.45438L18.7329 8.60735Z",
|
|
2319
2339
|
fill: t
|
|
2320
|
-
}), /* @__PURE__ */
|
|
2340
|
+
}), /* @__PURE__ */ l("path", {
|
|
2321
2341
|
d: "M19.8544 14.9048L10.3563 9.43067C10.2184 9.35116 10.0413 9.39515 9.95275 9.52746C7.03423 13.8862 4.07448 15.2337 3.18167 16.0938C3.09276 16.1794 3.08414 16.3141 3.1538 16.416C3.74961 17.2879 5.10497 18.4425 6.05628 19.2048C6.17328 19.2985 6.34145 19.2903 6.44961 19.1865L9.97994 15.7973L7.69329 20.1066C7.61954 20.2456 7.66674 20.4186 7.80041 20.5017C11.6152 22.8708 14.2978 24.0437 16.9604 24.4472C17.1542 24.4766 17.3191 24.3106 17.3033 24.1152C17.007 20.469 19.0807 16.6112 19.8544 14.9048Z",
|
|
2322
2342
|
fill: t
|
|
2323
2343
|
})]
|
|
2324
2344
|
});
|
|
2325
2345
|
}
|
|
2326
|
-
function
|
|
2346
|
+
function Cn({
|
|
2327
2347
|
theme: e
|
|
2328
2348
|
}) {
|
|
2329
|
-
return /* @__PURE__ */
|
|
2349
|
+
return /* @__PURE__ */ l("svg", {
|
|
2330
2350
|
width: "24",
|
|
2331
2351
|
height: "24",
|
|
2332
2352
|
viewBox: "0 0 24 24",
|
|
2333
2353
|
fill: "none",
|
|
2334
2354
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2335
|
-
children: /* @__PURE__ */
|
|
2355
|
+
children: /* @__PURE__ */ l("path", {
|
|
2336
2356
|
d: "M4 14L0 10L24 0L14 24L10 20L8.47667 16.9533L19 6.4L20 4.00001L17.6099 5L7.04354 15.5218L4 14Z",
|
|
2337
2357
|
fill: e.aiChat.icons.color
|
|
2338
2358
|
})
|
|
2339
2359
|
});
|
|
2340
2360
|
}
|
|
2341
|
-
const
|
|
2361
|
+
const _n = C.div`
|
|
2342
2362
|
display: flex;
|
|
2343
2363
|
flex-direction: row;
|
|
2344
2364
|
align-items: flex-end;
|
|
@@ -2347,12 +2367,12 @@ const xn = C.div`
|
|
|
2347
2367
|
background-color: ${({
|
|
2348
2368
|
theme: e
|
|
2349
2369
|
}) => e.aiChat.backgroundColor};
|
|
2350
|
-
`,
|
|
2370
|
+
`, vn = C.button`
|
|
2351
2371
|
height: 34px;
|
|
2352
2372
|
background-color: inherit;
|
|
2353
2373
|
cursor: pointer;
|
|
2354
2374
|
border: none;
|
|
2355
|
-
`,
|
|
2375
|
+
`, Sn = C.textarea`
|
|
2356
2376
|
font-size: inherit;
|
|
2357
2377
|
line-height: inherit;
|
|
2358
2378
|
resize: none;
|
|
@@ -2386,7 +2406,7 @@ const xn = C.div`
|
|
|
2386
2406
|
background-color: ${({
|
|
2387
2407
|
theme: e
|
|
2388
2408
|
}) => e.aiChat.input.backgroundColor};
|
|
2389
|
-
`,
|
|
2409
|
+
`, Mn = C.button`
|
|
2390
2410
|
height: 34px;
|
|
2391
2411
|
background-color: inherit;
|
|
2392
2412
|
border-style: none;
|
|
@@ -2404,14 +2424,14 @@ const xn = C.div`
|
|
|
2404
2424
|
opacity: 1;
|
|
2405
2425
|
cursor: pointer;
|
|
2406
2426
|
`}
|
|
2407
|
-
`,
|
|
2408
|
-
function
|
|
2427
|
+
`, In = 34;
|
|
2428
|
+
function Dn({
|
|
2409
2429
|
onSendMessage: e,
|
|
2410
2430
|
onClearHistoryClick: t,
|
|
2411
2431
|
disabled: r,
|
|
2412
2432
|
recentPrompts: a,
|
|
2413
2433
|
suggestions: i,
|
|
2414
|
-
isLoading:
|
|
2434
|
+
isLoading: n,
|
|
2415
2435
|
recommendationsError: s,
|
|
2416
2436
|
onChange: p
|
|
2417
2437
|
}) {
|
|
@@ -2432,12 +2452,12 @@ function _n({
|
|
|
2432
2452
|
w.key === "Enter" ? (w.preventDefault(), x()) : w.key === "Escape" && ut(d) && g("");
|
|
2433
2453
|
}, [x, d]), c = j((w) => {
|
|
2434
2454
|
p == null || p(w.target.value), g(w.target.value);
|
|
2435
|
-
}, [p]), m =
|
|
2455
|
+
}, [p]), m = ue(null);
|
|
2436
2456
|
He(() => {
|
|
2437
2457
|
m.current && (m.current.style.height = "inherit", m.current.style.height = `${Math.max(
|
|
2438
2458
|
m.current.scrollHeight + 2,
|
|
2439
2459
|
// account for 1px top/bottom border
|
|
2440
|
-
|
|
2460
|
+
In
|
|
2441
2461
|
)}px`);
|
|
2442
2462
|
}, [d]), He(() => {
|
|
2443
2463
|
m.current && m.current.focus({
|
|
@@ -2446,11 +2466,11 @@ function _n({
|
|
|
2446
2466
|
}, []);
|
|
2447
2467
|
const {
|
|
2448
2468
|
themeSettings: h
|
|
2449
|
-
} =
|
|
2469
|
+
} = D(), {
|
|
2450
2470
|
t: k
|
|
2451
2471
|
} = E(), _ = j((w) => {
|
|
2452
|
-
var
|
|
2453
|
-
if ((
|
|
2472
|
+
var I;
|
|
2473
|
+
if ((I = document.getElementById("csdk-chatbot-frame")) != null && I.contains(w.relatedTarget)) {
|
|
2454
2474
|
const A = (M) => {
|
|
2455
2475
|
var L;
|
|
2456
2476
|
document.removeEventListener("mouseup", A), document.removeEventListener("keyup", A), M.type === "mouseup" && ((L = document.getSelection()) == null ? void 0 : L.type) !== "Range" && w.target.focus({
|
|
@@ -2460,30 +2480,30 @@ function _n({
|
|
|
2460
2480
|
document.addEventListener("mouseup", A), document.addEventListener("keyup", A);
|
|
2461
2481
|
}
|
|
2462
2482
|
}, []);
|
|
2463
|
-
return /* @__PURE__ */ v(
|
|
2483
|
+
return /* @__PURE__ */ v(_n, {
|
|
2464
2484
|
theme: h,
|
|
2465
|
-
children: [/* @__PURE__ */
|
|
2485
|
+
children: [/* @__PURE__ */ l(kn, {
|
|
2466
2486
|
recentPrompts: a,
|
|
2467
2487
|
suggestions: i,
|
|
2468
|
-
isLoading:
|
|
2488
|
+
isLoading: n,
|
|
2469
2489
|
onSelection: o,
|
|
2470
2490
|
anchorEl: m.current,
|
|
2471
2491
|
text: d,
|
|
2472
2492
|
recommendationsError: s
|
|
2473
|
-
}), t && /* @__PURE__ */
|
|
2493
|
+
}), t && /* @__PURE__ */ l(Oe, {
|
|
2474
2494
|
title: k("ai.buttons.clearChat"),
|
|
2475
2495
|
placement: "bottom-start",
|
|
2476
|
-
children: /* @__PURE__ */
|
|
2496
|
+
children: /* @__PURE__ */ l(vn, {
|
|
2477
2497
|
"aria-label": "clear history",
|
|
2478
2498
|
onClick: t,
|
|
2479
|
-
children: /* @__PURE__ */
|
|
2499
|
+
children: /* @__PURE__ */ l(wn, {
|
|
2480
2500
|
theme: h
|
|
2481
2501
|
})
|
|
2482
2502
|
})
|
|
2483
|
-
}), /* @__PURE__ */
|
|
2503
|
+
}), /* @__PURE__ */ l(Sn, {
|
|
2484
2504
|
"aria-label": "chat input",
|
|
2485
2505
|
onBlur: _,
|
|
2486
|
-
maxLength:
|
|
2506
|
+
maxLength: yn,
|
|
2487
2507
|
ref: m,
|
|
2488
2508
|
rows: 1,
|
|
2489
2509
|
onChange: c,
|
|
@@ -2492,33 +2512,33 @@ function _n({
|
|
|
2492
2512
|
value: d,
|
|
2493
2513
|
onKeyDown: u,
|
|
2494
2514
|
theme: h
|
|
2495
|
-
}), /* @__PURE__ */
|
|
2515
|
+
}), /* @__PURE__ */ l(Mn, {
|
|
2496
2516
|
"aria-label": "send chat message",
|
|
2497
2517
|
disabled: r || d.length === 0,
|
|
2498
2518
|
onClick: x,
|
|
2499
2519
|
theme: h,
|
|
2500
|
-
children: /* @__PURE__ */
|
|
2520
|
+
children: /* @__PURE__ */ l("span", {
|
|
2501
2521
|
"data-state": "closed",
|
|
2502
|
-
children: /* @__PURE__ */
|
|
2522
|
+
children: /* @__PURE__ */ l(Cn, {
|
|
2503
2523
|
theme: h
|
|
2504
2524
|
})
|
|
2505
2525
|
})
|
|
2506
2526
|
})]
|
|
2507
2527
|
});
|
|
2508
2528
|
}
|
|
2509
|
-
const
|
|
2529
|
+
const An = C.div`
|
|
2510
2530
|
margin: auto;
|
|
2511
2531
|
display: flex;
|
|
2512
2532
|
flex-direction: column;
|
|
2513
2533
|
align-items: center;
|
|
2514
2534
|
row-gap: 21px;
|
|
2515
|
-
`,
|
|
2535
|
+
`, Ln = C.div`
|
|
2516
2536
|
color: ${({
|
|
2517
2537
|
theme: e
|
|
2518
2538
|
}) => e.aiChat.primaryTextColor};
|
|
2519
2539
|
text-align: center;
|
|
2520
2540
|
font-weight: 600;
|
|
2521
|
-
`,
|
|
2541
|
+
`, Tn = C.div`
|
|
2522
2542
|
color: rgba(54, 163, 217, 1);
|
|
2523
2543
|
cursor: pointer;
|
|
2524
2544
|
`;
|
|
@@ -2528,18 +2548,18 @@ function Zr({
|
|
|
2528
2548
|
}) {
|
|
2529
2549
|
const {
|
|
2530
2550
|
themeSettings: r
|
|
2531
|
-
} =
|
|
2532
|
-
return /* @__PURE__ */ v(
|
|
2533
|
-
children: [/* @__PURE__ */
|
|
2551
|
+
} = D();
|
|
2552
|
+
return /* @__PURE__ */ v(An, {
|
|
2553
|
+
children: [/* @__PURE__ */ l(Ln, {
|
|
2534
2554
|
theme: r,
|
|
2535
2555
|
children: e
|
|
2536
|
-
}), /* @__PURE__ */
|
|
2556
|
+
}), /* @__PURE__ */ l(Ea, {}), t && /* @__PURE__ */ l(Tn, {
|
|
2537
2557
|
onClick: t.onClick,
|
|
2538
2558
|
children: t.text
|
|
2539
2559
|
})]
|
|
2540
2560
|
});
|
|
2541
2561
|
}
|
|
2542
|
-
const
|
|
2562
|
+
const Nn = C.div`
|
|
2543
2563
|
flex: 0 0 80px;
|
|
2544
2564
|
padding-left: 14px;
|
|
2545
2565
|
padding-right: 14px;
|
|
@@ -2550,7 +2570,7 @@ const Dn = C.div`
|
|
|
2550
2570
|
background-color: ${({
|
|
2551
2571
|
style: e
|
|
2552
2572
|
}) => e.backgroundColor};
|
|
2553
|
-
`,
|
|
2573
|
+
`, jn = C.div`
|
|
2554
2574
|
font-size: 18px;
|
|
2555
2575
|
line-height: 22px;
|
|
2556
2576
|
font-weight: 600;
|
|
@@ -2565,13 +2585,13 @@ const Dn = C.div`
|
|
|
2565
2585
|
rightNav: r,
|
|
2566
2586
|
style: a
|
|
2567
2587
|
}, i) {
|
|
2568
|
-
return /* @__PURE__ */ v(
|
|
2588
|
+
return /* @__PURE__ */ v(Nn, {
|
|
2569
2589
|
ref: i,
|
|
2570
2590
|
style: a,
|
|
2571
|
-
children: [t, /* @__PURE__ */
|
|
2591
|
+
children: [t, /* @__PURE__ */ l(jn, {
|
|
2572
2592
|
style: a,
|
|
2573
2593
|
children: e
|
|
2574
|
-
}), r && /* @__PURE__ */
|
|
2594
|
+
}), r && /* @__PURE__ */ l("div", {
|
|
2575
2595
|
className: "csdk-ml-auto",
|
|
2576
2596
|
children: r
|
|
2577
2597
|
})]
|
|
@@ -2608,32 +2628,32 @@ const Dn = C.div`
|
|
|
2608
2628
|
function At() {
|
|
2609
2629
|
const {
|
|
2610
2630
|
themeSettings: e
|
|
2611
|
-
} =
|
|
2631
|
+
} = D(), t = e.aiChat.icons.color;
|
|
2612
2632
|
return /* @__PURE__ */ v("div", {
|
|
2613
2633
|
className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
|
|
2614
2634
|
"aria-label": "loading dots",
|
|
2615
|
-
children: [/* @__PURE__ */
|
|
2635
|
+
children: [/* @__PURE__ */ l(We, {
|
|
2616
2636
|
color: t
|
|
2617
|
-
}), /* @__PURE__ */
|
|
2637
|
+
}), /* @__PURE__ */ l(We, {
|
|
2618
2638
|
color: t
|
|
2619
|
-
}), /* @__PURE__ */
|
|
2639
|
+
}), /* @__PURE__ */ l(We, {
|
|
2620
2640
|
color: t
|
|
2621
|
-
}), /* @__PURE__ */
|
|
2641
|
+
}), /* @__PURE__ */ l(We, {
|
|
2622
2642
|
color: t
|
|
2623
2643
|
})]
|
|
2624
2644
|
});
|
|
2625
2645
|
}
|
|
2626
|
-
function
|
|
2627
|
-
return
|
|
2646
|
+
function pe() {
|
|
2647
|
+
return pe = Object.assign ? Object.assign.bind() : function(e) {
|
|
2628
2648
|
for (var t = 1; t < arguments.length; t++) {
|
|
2629
2649
|
var r = arguments[t];
|
|
2630
2650
|
for (var a in r)
|
|
2631
2651
|
Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
|
|
2632
2652
|
}
|
|
2633
2653
|
return e;
|
|
2634
|
-
},
|
|
2654
|
+
}, pe.apply(this, arguments);
|
|
2635
2655
|
}
|
|
2636
|
-
const
|
|
2656
|
+
const On = ["children", "options"], y = {
|
|
2637
2657
|
blockQuote: "0",
|
|
2638
2658
|
breakLine: "1",
|
|
2639
2659
|
breakThematic: "2",
|
|
@@ -2683,7 +2703,7 @@ const Vt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus",
|
|
|
2683
2703
|
lt: "<",
|
|
2684
2704
|
nbsp: " ",
|
|
2685
2705
|
quot: "“"
|
|
2686
|
-
},
|
|
2706
|
+
}, En = ["style", "script"], zn = ["src", "href", "data", "formAction", "srcDoc", "action"], Rn = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Zn = /mailto:/i, Wn = /\n{2,}$/, Pr = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Pn = /^ *> ?/gm, qn = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Gn = /^ {2,}\n/, $n = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, qr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Gr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, Hn = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Bn = /^(?:\n *)*\n/, Yn = /\r\n?/g, Un = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Qn = /^\[\^([^\]]+)]/, Fn = /\f/g, Vn = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Jn = /^\s*?\[(x|\s)\]/, $r = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Hr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Br = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, gt = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Xn = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Yr = /^<!--[\s\S]*?(?:-->)/, Kn = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, ht = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, el = /^\{.*\}$/, tl = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, rl = /^<([^ >]+@[^ >]+)>/, al = /^<([^ >]+:\/[^ >]+)>/, il = /-([a-z])?/gi, Ur = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, ol = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, nl = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, ll = /^\[([^\]]*)\] ?\[([^\]]*)\]/, sl = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, cl = /\t/g, dl = /(^ *\||\| *$)/g, pl = /^ *:-+: *$/, ul = /^ *:-+ *$/, gl = /^ *-+: *$/, Ke = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", hl = new RegExp(`^([*_])\\1${Ke}\\1\\1(?!\\1)`), ml = new RegExp(`^([*_])${Ke}\\1(?!\\1)`), bl = new RegExp(`^(==)${Ke}\\1`), fl = new RegExp(`^(~~)${Ke}\\1`), xl = /^\\([^0-9A-Za-z\s])/, Xt = /\\([^0-9A-Za-z\s])/g, kl = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, yl = /^\n+/, wl = /^([ \t]*)/, Cl = /\\([^\\])/g, _l = /(?:^|\n)( *)$/, Lt = "(?:\\d+\\.)", Tt = "(?:[*+-])";
|
|
2687
2707
|
function Qr(e) {
|
|
2688
2708
|
return "( *)(" + (e === 1 ? Lt : Tt) + ") +";
|
|
2689
2709
|
}
|
|
@@ -2691,41 +2711,41 @@ const Fr = Qr(1), Vr = Qr(2);
|
|
|
2691
2711
|
function Jr(e) {
|
|
2692
2712
|
return new RegExp("^" + (e === 1 ? Fr : Vr));
|
|
2693
2713
|
}
|
|
2694
|
-
const
|
|
2714
|
+
const vl = Jr(1), Sl = Jr(2);
|
|
2695
2715
|
function Xr(e) {
|
|
2696
2716
|
return new RegExp("^" + (e === 1 ? Fr : Vr) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Lt : Tt) + " )[^\\n]*)*(\\n|$)", "gm");
|
|
2697
2717
|
}
|
|
2698
|
-
const
|
|
2718
|
+
const Ml = Xr(1), Il = Xr(2);
|
|
2699
2719
|
function Kr(e) {
|
|
2700
2720
|
const t = e === 1 ? Lt : Tt;
|
|
2701
2721
|
return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
|
|
2702
2722
|
}
|
|
2703
2723
|
const ea = Kr(1), ta = Kr(2);
|
|
2704
2724
|
function Kt(e, t) {
|
|
2705
|
-
const r = t === 1, a = r ? ea : ta, i = r ?
|
|
2725
|
+
const r = t === 1, a = r ? ea : ta, i = r ? Ml : Il, n = r ? vl : Sl;
|
|
2706
2726
|
return {
|
|
2707
2727
|
match: ke(function(s, p) {
|
|
2708
|
-
const d =
|
|
2728
|
+
const d = _l.exec(p.prevCapture);
|
|
2709
2729
|
return d && (p.list || !p.inline && !p.simple) ? a.exec(s = d[1] + s) : null;
|
|
2710
2730
|
}),
|
|
2711
2731
|
order: 1,
|
|
2712
2732
|
parse(s, p, d) {
|
|
2713
|
-
const g = r ? +s[2] : void 0, b = s[0].replace(
|
|
2733
|
+
const g = r ? +s[2] : void 0, b = s[0].replace(Wn, `
|
|
2714
2734
|
`).match(i);
|
|
2715
2735
|
let x = !1;
|
|
2716
2736
|
return {
|
|
2717
2737
|
items: b.map(function(o, u) {
|
|
2718
|
-
const c =
|
|
2738
|
+
const c = n.exec(o)[0].length, m = new RegExp("^ {1," + c + "}", "gm"), h = o.replace(m, "").replace(n, ""), k = u === b.length - 1, _ = h.indexOf(`
|
|
2719
2739
|
|
|
2720
2740
|
`) !== -1 || k && x;
|
|
2721
2741
|
x = _;
|
|
2722
|
-
const w = d.inline,
|
|
2742
|
+
const w = d.inline, I = d.list;
|
|
2723
2743
|
let A;
|
|
2724
2744
|
d.list = !0, _ ? (d.inline = !1, A = Te(h) + `
|
|
2725
2745
|
|
|
2726
2746
|
`) : (d.inline = !0, A = Te(h));
|
|
2727
2747
|
const M = p(A, d);
|
|
2728
|
-
return d.inline = w, d.list =
|
|
2748
|
+
return d.inline = w, d.list = I, M;
|
|
2729
2749
|
}),
|
|
2730
2750
|
ordered: r,
|
|
2731
2751
|
start: g
|
|
@@ -2741,7 +2761,7 @@ function Kt(e, t) {
|
|
|
2741
2761
|
}))
|
|
2742
2762
|
};
|
|
2743
2763
|
}
|
|
2744
|
-
const
|
|
2764
|
+
const Dl = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Al = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, ra = [Pr, qr, Gr, $r, Br, Hr, Ur, ea, ta], Ll = [...ra, /^[^\n]+(?: \n|\n{2,})/, gt, Yr, ht];
|
|
2745
2765
|
function Te(e) {
|
|
2746
2766
|
let t = e.length;
|
|
2747
2767
|
for (; t > 0 && e[t - 1] <= " "; )
|
|
@@ -2751,38 +2771,38 @@ function Te(e) {
|
|
|
2751
2771
|
function Se(e) {
|
|
2752
2772
|
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();
|
|
2753
2773
|
}
|
|
2754
|
-
function
|
|
2755
|
-
return
|
|
2774
|
+
function Tl(e) {
|
|
2775
|
+
return gl.test(e) ? "right" : pl.test(e) ? "center" : ul.test(e) ? "left" : null;
|
|
2756
2776
|
}
|
|
2757
2777
|
function er(e, t, r, a) {
|
|
2758
2778
|
const i = r.inTable;
|
|
2759
2779
|
r.inTable = !0;
|
|
2760
|
-
let
|
|
2780
|
+
let n = [[]], s = "";
|
|
2761
2781
|
function p() {
|
|
2762
2782
|
if (!s)
|
|
2763
2783
|
return;
|
|
2764
|
-
const d =
|
|
2784
|
+
const d = n[n.length - 1];
|
|
2765
2785
|
d.push.apply(d, t(s, r)), s = "";
|
|
2766
2786
|
}
|
|
2767
2787
|
return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d, g, b) => {
|
|
2768
|
-
d.trim() === "|" && (p(), a) ? g !== 0 && g !== b.length - 1 &&
|
|
2769
|
-
}), p(), r.inTable = i,
|
|
2788
|
+
d.trim() === "|" && (p(), a) ? g !== 0 && g !== b.length - 1 && n.push([]) : s += d;
|
|
2789
|
+
}), p(), r.inTable = i, n;
|
|
2770
2790
|
}
|
|
2771
|
-
function
|
|
2791
|
+
function Nl(e, t, r) {
|
|
2772
2792
|
r.inline = !0;
|
|
2773
|
-
const a = e[2] ? e[2].replace(
|
|
2793
|
+
const a = e[2] ? e[2].replace(dl, "").split("|").map(Tl) : [], i = e[3] ? function(s, p, d) {
|
|
2774
2794
|
return s.trim().split(`
|
|
2775
2795
|
`).map(function(g) {
|
|
2776
2796
|
return er(g, p, d, !0);
|
|
2777
2797
|
});
|
|
2778
|
-
}(e[3], t, r) : [],
|
|
2798
|
+
}(e[3], t, r) : [], n = er(e[1], t, r, !!i.length);
|
|
2779
2799
|
return r.inline = !1, i.length ? {
|
|
2780
2800
|
align: a,
|
|
2781
2801
|
cells: i,
|
|
2782
|
-
header:
|
|
2802
|
+
header: n,
|
|
2783
2803
|
type: y.table
|
|
2784
2804
|
} : {
|
|
2785
|
-
children:
|
|
2805
|
+
children: n,
|
|
2786
2806
|
type: y.paragraph
|
|
2787
2807
|
};
|
|
2788
2808
|
}
|
|
@@ -2814,21 +2834,21 @@ function Me(e) {
|
|
|
2814
2834
|
return e.exec(t);
|
|
2815
2835
|
});
|
|
2816
2836
|
}
|
|
2817
|
-
function
|
|
2837
|
+
function jl(e, t) {
|
|
2818
2838
|
if (t.inline || t.simple)
|
|
2819
2839
|
return null;
|
|
2820
2840
|
let r = "";
|
|
2821
2841
|
e.split(`
|
|
2822
2842
|
`).every((i) => (i += `
|
|
2823
|
-
`, !ra.some((
|
|
2843
|
+
`, !ra.some((n) => n.test(i)) && (r += i, !!i.trim())));
|
|
2824
2844
|
const a = Te(r);
|
|
2825
2845
|
return a == "" ? null : [r, , a];
|
|
2826
2846
|
}
|
|
2827
|
-
const
|
|
2828
|
-
function
|
|
2847
|
+
const Ol = /(javascript|vbscript|data(?!:image)):/i;
|
|
2848
|
+
function El(e) {
|
|
2829
2849
|
try {
|
|
2830
2850
|
const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
2831
|
-
if (
|
|
2851
|
+
if (Ol.test(t))
|
|
2832
2852
|
return null;
|
|
2833
2853
|
} catch {
|
|
2834
2854
|
return null;
|
|
@@ -2836,21 +2856,21 @@ function Ll(e) {
|
|
|
2836
2856
|
return e;
|
|
2837
2857
|
}
|
|
2838
2858
|
function rr(e) {
|
|
2839
|
-
return e.replace(
|
|
2859
|
+
return e.replace(Cl, "$1");
|
|
2840
2860
|
}
|
|
2841
2861
|
function Ge(e, t, r) {
|
|
2842
2862
|
const a = r.inline || !1, i = r.simple || !1;
|
|
2843
2863
|
r.inline = !0, r.simple = !0;
|
|
2844
|
-
const
|
|
2845
|
-
return r.inline = a, r.simple = i,
|
|
2864
|
+
const n = e(t, r);
|
|
2865
|
+
return r.inline = a, r.simple = i, n;
|
|
2846
2866
|
}
|
|
2847
|
-
function
|
|
2867
|
+
function zl(e, t, r) {
|
|
2848
2868
|
const a = r.inline || !1, i = r.simple || !1;
|
|
2849
2869
|
r.inline = !1, r.simple = !0;
|
|
2850
|
-
const
|
|
2851
|
-
return r.inline = a, r.simple = i,
|
|
2870
|
+
const n = e(t, r);
|
|
2871
|
+
return r.inline = a, r.simple = i, n;
|
|
2852
2872
|
}
|
|
2853
|
-
function
|
|
2873
|
+
function Rl(e, t, r) {
|
|
2854
2874
|
const a = r.inline || !1;
|
|
2855
2875
|
r.inline = !1;
|
|
2856
2876
|
const i = e(t, r);
|
|
@@ -2865,7 +2885,7 @@ function it() {
|
|
|
2865
2885
|
function ot() {
|
|
2866
2886
|
return null;
|
|
2867
2887
|
}
|
|
2868
|
-
function
|
|
2888
|
+
function Zl(...e) {
|
|
2869
2889
|
return e.filter(Boolean).join(" ");
|
|
2870
2890
|
}
|
|
2871
2891
|
function nt(e, t, r) {
|
|
@@ -2875,21 +2895,21 @@ function nt(e, t, r) {
|
|
|
2875
2895
|
i.shift();
|
|
2876
2896
|
return a || r;
|
|
2877
2897
|
}
|
|
2878
|
-
function
|
|
2898
|
+
function Wl(e = "", t = {}) {
|
|
2879
2899
|
function r(o, u, ...c) {
|
|
2880
2900
|
const m = nt(t.overrides, `${o}.props`, {});
|
|
2881
2901
|
return t.createElement(function(h, k) {
|
|
2882
2902
|
const _ = nt(k, h);
|
|
2883
2903
|
return _ ? typeof _ == "function" || typeof _ == "object" && "render" in _ ? _ : nt(k, `${h}.component`, h) : h;
|
|
2884
|
-
}(o, t.overrides),
|
|
2885
|
-
className:
|
|
2904
|
+
}(o, t.overrides), pe({}, u, m, {
|
|
2905
|
+
className: Zl(u == null ? void 0 : u.className, m.className) || void 0
|
|
2886
2906
|
}), ...c);
|
|
2887
2907
|
}
|
|
2888
2908
|
function a(o) {
|
|
2889
|
-
o = o.replace(
|
|
2909
|
+
o = o.replace(Vn, "");
|
|
2890
2910
|
let u = !1;
|
|
2891
|
-
t.forceInline ? u = !0 : t.forceBlock || (u =
|
|
2892
|
-
const c = g(d(u ? o : `${Te(o).replace(
|
|
2911
|
+
t.forceInline ? u = !0 : t.forceBlock || (u = sl.test(o) === !1);
|
|
2912
|
+
const c = g(d(u ? o : `${Te(o).replace(yl, "")}
|
|
2893
2913
|
|
|
2894
2914
|
`, {
|
|
2895
2915
|
inline: u
|
|
@@ -2914,37 +2934,37 @@ function Ol(e = "", t = {}) {
|
|
|
2914
2934
|
}, h);
|
|
2915
2935
|
}
|
|
2916
2936
|
function i(o, u) {
|
|
2917
|
-
const c = u.match(
|
|
2937
|
+
const c = u.match(Rn);
|
|
2918
2938
|
return c ? c.reduce(function(m, h) {
|
|
2919
2939
|
const k = h.indexOf("=");
|
|
2920
2940
|
if (k !== -1) {
|
|
2921
2941
|
const _ = function(M) {
|
|
2922
|
-
return M.indexOf("-") !== -1 && M.match(
|
|
2942
|
+
return M.indexOf("-") !== -1 && M.match(Kn) === null && (M = M.replace(il, function(L, Z) {
|
|
2923
2943
|
return Z.toUpperCase();
|
|
2924
2944
|
})), M;
|
|
2925
2945
|
}(h.slice(0, k)).trim(), w = function(M) {
|
|
2926
2946
|
const L = M[0];
|
|
2927
2947
|
return (L === '"' || L === "'") && M.length >= 2 && M[M.length - 1] === L ? M.slice(1, -1) : M;
|
|
2928
|
-
}(h.slice(k + 1).trim()),
|
|
2929
|
-
if (
|
|
2948
|
+
}(h.slice(k + 1).trim()), I = Vt[_] || _;
|
|
2949
|
+
if (I === "ref")
|
|
2930
2950
|
return m;
|
|
2931
|
-
const A = m[
|
|
2951
|
+
const A = m[I] = function(M, L, Z, ge) {
|
|
2932
2952
|
return L === "style" ? function(F) {
|
|
2933
|
-
const
|
|
2934
|
-
let U = "", V = !1,
|
|
2953
|
+
const H = [];
|
|
2954
|
+
let U = "", V = !1, B = !1, J = "";
|
|
2935
2955
|
if (!F)
|
|
2936
|
-
return
|
|
2956
|
+
return H;
|
|
2937
2957
|
for (let z = 0; z < F.length; z++) {
|
|
2938
2958
|
const W = F[z];
|
|
2939
|
-
if (W !== '"' && W !== "'" || V || (
|
|
2959
|
+
if (W !== '"' && W !== "'" || V || (B ? W === J && (B = !1, J = "") : (B = !0, J = W)), W === "(" && U.endsWith("url") ? V = !0 : W === ")" && V && (V = !1), W !== ";" || B || V)
|
|
2940
2960
|
U += W;
|
|
2941
2961
|
else {
|
|
2942
2962
|
const Q = U.trim();
|
|
2943
2963
|
if (Q) {
|
|
2944
|
-
const
|
|
2945
|
-
if (
|
|
2946
|
-
const he = Q.slice(0,
|
|
2947
|
-
|
|
2964
|
+
const de = Q.indexOf(":");
|
|
2965
|
+
if (de > 0) {
|
|
2966
|
+
const he = Q.slice(0, de).trim(), we = Q.slice(de + 1).trim();
|
|
2967
|
+
H.push([he, we]);
|
|
2948
2968
|
}
|
|
2949
2969
|
}
|
|
2950
2970
|
U = "";
|
|
@@ -2955,27 +2975,27 @@ function Ol(e = "", t = {}) {
|
|
|
2955
2975
|
const z = X.indexOf(":");
|
|
2956
2976
|
if (z > 0) {
|
|
2957
2977
|
const W = X.slice(0, z).trim(), Q = X.slice(z + 1).trim();
|
|
2958
|
-
|
|
2978
|
+
H.push([W, Q]);
|
|
2959
2979
|
}
|
|
2960
2980
|
}
|
|
2961
|
-
return
|
|
2962
|
-
}(Z).reduce(function(F, [
|
|
2963
|
-
return F[
|
|
2964
|
-
}, {}) :
|
|
2981
|
+
return H;
|
|
2982
|
+
}(Z).reduce(function(F, [H, U]) {
|
|
2983
|
+
return F[H.replace(/(-[a-z])/g, (V) => V[1].toUpperCase())] = ge(U, M, H), F;
|
|
2984
|
+
}, {}) : zn.indexOf(L) !== -1 ? ge(Z, M, L) : (Z.match(el) && (Z = Z.slice(1, Z.length - 1)), Z === "true" || Z !== "false" && Z);
|
|
2965
2985
|
}(o, _, w, t.sanitizer);
|
|
2966
|
-
typeof A == "string" && (gt.test(A) || ht.test(A)) && (m[
|
|
2986
|
+
typeof A == "string" && (gt.test(A) || ht.test(A)) && (m[I] = a(A.trim()));
|
|
2967
2987
|
} else
|
|
2968
2988
|
h !== "style" && (m[Vt[h] || h] = !0);
|
|
2969
2989
|
return m;
|
|
2970
2990
|
}, {}) : null;
|
|
2971
2991
|
}
|
|
2972
|
-
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer ||
|
|
2973
|
-
const
|
|
2992
|
+
t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || El, t.slugify = t.slugify || Se, t.namedCodesToUnicode = t.namedCodesToUnicode ? pe({}, Jt, t.namedCodesToUnicode) : Jt, t.createElement = t.createElement || Ja;
|
|
2993
|
+
const n = [], s = {}, p = {
|
|
2974
2994
|
[y.blockQuote]: {
|
|
2975
2995
|
match: re(Pr),
|
|
2976
2996
|
order: 1,
|
|
2977
2997
|
parse(o, u, c) {
|
|
2978
|
-
const [, m, h] = o[0].replace(
|
|
2998
|
+
const [, m, h] = o[0].replace(Pn, "").match(qn);
|
|
2979
2999
|
return {
|
|
2980
3000
|
alert: m,
|
|
2981
3001
|
children: u(h, c)
|
|
@@ -2998,7 +3018,7 @@ function Ol(e = "", t = {}) {
|
|
|
2998
3018
|
}
|
|
2999
3019
|
},
|
|
3000
3020
|
[y.breakLine]: {
|
|
3001
|
-
match: Me(
|
|
3021
|
+
match: Me(Gn),
|
|
3002
3022
|
order: 1,
|
|
3003
3023
|
parse: it,
|
|
3004
3024
|
render: (o, u, c) => r("br", {
|
|
@@ -3006,7 +3026,7 @@ function Ol(e = "", t = {}) {
|
|
|
3006
3026
|
})
|
|
3007
3027
|
},
|
|
3008
3028
|
[y.breakThematic]: {
|
|
3009
|
-
match: re(
|
|
3029
|
+
match: re($n),
|
|
3010
3030
|
order: 1,
|
|
3011
3031
|
parse: it,
|
|
3012
3032
|
render: (o, u, c) => r("hr", {
|
|
@@ -3022,7 +3042,7 @@ function Ol(e = "", t = {}) {
|
|
|
3022
3042
|
}),
|
|
3023
3043
|
render: (o, u, c) => r("pre", {
|
|
3024
3044
|
key: c.key
|
|
3025
|
-
}, r("code",
|
|
3045
|
+
}, r("code", pe({}, o.attrs, {
|
|
3026
3046
|
className: o.lang ? `lang-${o.lang}` : ""
|
|
3027
3047
|
}), o.text))
|
|
3028
3048
|
},
|
|
@@ -3037,7 +3057,7 @@ function Ol(e = "", t = {}) {
|
|
|
3037
3057
|
})
|
|
3038
3058
|
},
|
|
3039
3059
|
[y.codeInline]: {
|
|
3040
|
-
match: le(
|
|
3060
|
+
match: le(Hn),
|
|
3041
3061
|
order: 3,
|
|
3042
3062
|
parse: (o) => ({
|
|
3043
3063
|
text: o[2].replace(Xt, "$1")
|
|
@@ -3047,16 +3067,16 @@ function Ol(e = "", t = {}) {
|
|
|
3047
3067
|
}, o.text)
|
|
3048
3068
|
},
|
|
3049
3069
|
[y.footnote]: {
|
|
3050
|
-
match: re(
|
|
3070
|
+
match: re(Un),
|
|
3051
3071
|
order: 0,
|
|
3052
|
-
parse: (o) => (
|
|
3072
|
+
parse: (o) => (n.push({
|
|
3053
3073
|
footnote: o[2],
|
|
3054
3074
|
identifier: o[1]
|
|
3055
3075
|
}), {}),
|
|
3056
3076
|
render: ot
|
|
3057
3077
|
},
|
|
3058
3078
|
[y.footnoteReference]: {
|
|
3059
|
-
match: ne(
|
|
3079
|
+
match: ne(Qn),
|
|
3060
3080
|
order: 1,
|
|
3061
3081
|
parse: (o) => ({
|
|
3062
3082
|
target: `#${t.slugify(o[1], Se)}`,
|
|
@@ -3070,7 +3090,7 @@ function Ol(e = "", t = {}) {
|
|
|
3070
3090
|
}, o.text))
|
|
3071
3091
|
},
|
|
3072
3092
|
[y.gfmTask]: {
|
|
3073
|
-
match: ne(
|
|
3093
|
+
match: ne(Jn),
|
|
3074
3094
|
order: 1,
|
|
3075
3095
|
parse: (o) => ({
|
|
3076
3096
|
completed: o[1].toLowerCase() === "x"
|
|
@@ -3108,16 +3128,16 @@ function Ol(e = "", t = {}) {
|
|
|
3108
3128
|
match: Me(gt),
|
|
3109
3129
|
order: 1,
|
|
3110
3130
|
parse(o, u, c) {
|
|
3111
|
-
const [, m] = o[3].match(
|
|
3131
|
+
const [, m] = o[3].match(wl), h = new RegExp(`^${m}`, "gm"), k = o[3].replace(h, ""), _ = (w = k, Ll.some((Z) => Z.test(w)) ? Rl : Ge);
|
|
3112
3132
|
var w;
|
|
3113
|
-
const
|
|
3133
|
+
const I = o[1].toLowerCase(), A = En.indexOf(I) !== -1, M = (A ? I : o[1]).trim(), L = {
|
|
3114
3134
|
attrs: i(M, o[2]),
|
|
3115
3135
|
noInnerParse: A,
|
|
3116
3136
|
tag: M
|
|
3117
3137
|
};
|
|
3118
|
-
return c.inAnchor = c.inAnchor ||
|
|
3138
|
+
return c.inAnchor = c.inAnchor || I === "a", A ? L.text = o[3] : L.children = _(u, k, c), c.inAnchor = !1, L;
|
|
3119
3139
|
},
|
|
3120
|
-
render: (o, u, c) => r(o.tag,
|
|
3140
|
+
render: (o, u, c) => r(o.tag, pe({
|
|
3121
3141
|
key: c.key
|
|
3122
3142
|
}, o.attrs), o.text || (o.children ? u(o.children, c) : ""))
|
|
3123
3143
|
},
|
|
@@ -3131,7 +3151,7 @@ function Ol(e = "", t = {}) {
|
|
|
3131
3151
|
tag: u
|
|
3132
3152
|
};
|
|
3133
3153
|
},
|
|
3134
|
-
render: (o, u, c) => r(o.tag,
|
|
3154
|
+
render: (o, u, c) => r(o.tag, pe({}, o.attrs, {
|
|
3135
3155
|
key: c.key
|
|
3136
3156
|
}))
|
|
3137
3157
|
},
|
|
@@ -3142,7 +3162,7 @@ function Ol(e = "", t = {}) {
|
|
|
3142
3162
|
render: ot
|
|
3143
3163
|
},
|
|
3144
3164
|
[y.image]: {
|
|
3145
|
-
match: le(
|
|
3165
|
+
match: le(Al),
|
|
3146
3166
|
order: 1,
|
|
3147
3167
|
parse: (o) => ({
|
|
3148
3168
|
alt: o[1],
|
|
@@ -3157,10 +3177,10 @@ function Ol(e = "", t = {}) {
|
|
|
3157
3177
|
})
|
|
3158
3178
|
},
|
|
3159
3179
|
[y.link]: {
|
|
3160
|
-
match: ne(
|
|
3180
|
+
match: ne(Dl),
|
|
3161
3181
|
order: 3,
|
|
3162
3182
|
parse: (o, u, c) => ({
|
|
3163
|
-
children:
|
|
3183
|
+
children: zl(u, o[1], c),
|
|
3164
3184
|
target: rr(o[2]),
|
|
3165
3185
|
title: o[3]
|
|
3166
3186
|
}),
|
|
@@ -3171,7 +3191,7 @@ function Ol(e = "", t = {}) {
|
|
|
3171
3191
|
}, u(o.children, c))
|
|
3172
3192
|
},
|
|
3173
3193
|
[y.linkAngleBraceStyleDetector]: {
|
|
3174
|
-
match: ne(
|
|
3194
|
+
match: ne(al),
|
|
3175
3195
|
order: 0,
|
|
3176
3196
|
parse: (o) => ({
|
|
3177
3197
|
children: [{
|
|
@@ -3183,7 +3203,7 @@ function Ol(e = "", t = {}) {
|
|
|
3183
3203
|
})
|
|
3184
3204
|
},
|
|
3185
3205
|
[y.linkBareUrlDetector]: {
|
|
3186
|
-
match: ke((o, u) => u.inAnchor || t.disableAutoLink ? null : ne(
|
|
3206
|
+
match: ke((o, u) => u.inAnchor || t.disableAutoLink ? null : ne(tl)(o, u)),
|
|
3187
3207
|
order: 0,
|
|
3188
3208
|
parse: (o) => ({
|
|
3189
3209
|
children: [{
|
|
@@ -3196,11 +3216,11 @@ function Ol(e = "", t = {}) {
|
|
|
3196
3216
|
})
|
|
3197
3217
|
},
|
|
3198
3218
|
[y.linkMailtoDetector]: {
|
|
3199
|
-
match: ne(
|
|
3219
|
+
match: ne(rl),
|
|
3200
3220
|
order: 0,
|
|
3201
3221
|
parse(o) {
|
|
3202
3222
|
let u = o[1], c = o[1];
|
|
3203
|
-
return
|
|
3223
|
+
return Zn.test(c) || (c = "mailto:" + c), {
|
|
3204
3224
|
children: [{
|
|
3205
3225
|
text: u.replace("mailto:", ""),
|
|
3206
3226
|
type: y.text
|
|
@@ -3213,14 +3233,14 @@ function Ol(e = "", t = {}) {
|
|
|
3213
3233
|
[y.orderedList]: Kt(r, 1),
|
|
3214
3234
|
[y.unorderedList]: Kt(r, 2),
|
|
3215
3235
|
[y.newlineCoalescer]: {
|
|
3216
|
-
match: re(
|
|
3236
|
+
match: re(Bn),
|
|
3217
3237
|
order: 3,
|
|
3218
3238
|
parse: it,
|
|
3219
3239
|
render: () => `
|
|
3220
3240
|
`
|
|
3221
3241
|
},
|
|
3222
3242
|
[y.paragraph]: {
|
|
3223
|
-
match: ke(
|
|
3243
|
+
match: ke(jl),
|
|
3224
3244
|
order: 3,
|
|
3225
3245
|
parse: at,
|
|
3226
3246
|
render: (o, u, c) => r("p", {
|
|
@@ -3228,7 +3248,7 @@ function Ol(e = "", t = {}) {
|
|
|
3228
3248
|
}, u(o.children, c))
|
|
3229
3249
|
},
|
|
3230
3250
|
[y.ref]: {
|
|
3231
|
-
match: ne(
|
|
3251
|
+
match: ne(ol),
|
|
3232
3252
|
order: 0,
|
|
3233
3253
|
parse: (o) => (s[o[1]] = {
|
|
3234
3254
|
target: o[2],
|
|
@@ -3237,7 +3257,7 @@ function Ol(e = "", t = {}) {
|
|
|
3237
3257
|
render: ot
|
|
3238
3258
|
},
|
|
3239
3259
|
[y.refImage]: {
|
|
3240
|
-
match: le(
|
|
3260
|
+
match: le(nl),
|
|
3241
3261
|
order: 0,
|
|
3242
3262
|
parse: (o) => ({
|
|
3243
3263
|
alt: o[1] || void 0,
|
|
@@ -3251,7 +3271,7 @@ function Ol(e = "", t = {}) {
|
|
|
3251
3271
|
}) : null
|
|
3252
3272
|
},
|
|
3253
3273
|
[y.refLink]: {
|
|
3254
|
-
match: ne(
|
|
3274
|
+
match: ne(ll),
|
|
3255
3275
|
order: 0,
|
|
3256
3276
|
parse: (o, u, c) => ({
|
|
3257
3277
|
children: u(o[1], c),
|
|
@@ -3269,7 +3289,7 @@ function Ol(e = "", t = {}) {
|
|
|
3269
3289
|
[y.table]: {
|
|
3270
3290
|
match: re(Ur),
|
|
3271
3291
|
order: 1,
|
|
3272
|
-
parse:
|
|
3292
|
+
parse: Nl,
|
|
3273
3293
|
render(o, u, c) {
|
|
3274
3294
|
const m = o;
|
|
3275
3295
|
return r("table", {
|
|
@@ -3292,15 +3312,15 @@ function Ol(e = "", t = {}) {
|
|
|
3292
3312
|
}
|
|
3293
3313
|
},
|
|
3294
3314
|
[y.text]: {
|
|
3295
|
-
match: Me(
|
|
3315
|
+
match: Me(kl),
|
|
3296
3316
|
order: 4,
|
|
3297
3317
|
parse: (o) => ({
|
|
3298
|
-
text: o[0].replace(
|
|
3318
|
+
text: o[0].replace(Xn, (u, c) => t.namedCodesToUnicode[c] ? t.namedCodesToUnicode[c] : u)
|
|
3299
3319
|
}),
|
|
3300
3320
|
render: (o) => o.text
|
|
3301
3321
|
},
|
|
3302
3322
|
[y.textBolded]: {
|
|
3303
|
-
match: le(
|
|
3323
|
+
match: le(hl),
|
|
3304
3324
|
order: 2,
|
|
3305
3325
|
parse: (o, u, c) => ({
|
|
3306
3326
|
children: u(o[2], c)
|
|
@@ -3310,7 +3330,7 @@ function Ol(e = "", t = {}) {
|
|
|
3310
3330
|
}, u(o.children, c))
|
|
3311
3331
|
},
|
|
3312
3332
|
[y.textEmphasized]: {
|
|
3313
|
-
match: le(
|
|
3333
|
+
match: le(ml),
|
|
3314
3334
|
order: 3,
|
|
3315
3335
|
parse: (o, u, c) => ({
|
|
3316
3336
|
children: u(o[2], c)
|
|
@@ -3320,7 +3340,7 @@ function Ol(e = "", t = {}) {
|
|
|
3320
3340
|
}, u(o.children, c))
|
|
3321
3341
|
},
|
|
3322
3342
|
[y.textEscaped]: {
|
|
3323
|
-
match: le(
|
|
3343
|
+
match: le(xl),
|
|
3324
3344
|
order: 1,
|
|
3325
3345
|
parse: (o) => ({
|
|
3326
3346
|
text: o[1],
|
|
@@ -3328,7 +3348,7 @@ function Ol(e = "", t = {}) {
|
|
|
3328
3348
|
})
|
|
3329
3349
|
},
|
|
3330
3350
|
[y.textMarked]: {
|
|
3331
|
-
match: le(
|
|
3351
|
+
match: le(bl),
|
|
3332
3352
|
order: 3,
|
|
3333
3353
|
parse: at,
|
|
3334
3354
|
render: (o, u, c) => r("mark", {
|
|
@@ -3336,7 +3356,7 @@ function Ol(e = "", t = {}) {
|
|
|
3336
3356
|
}, u(o.children, c))
|
|
3337
3357
|
},
|
|
3338
3358
|
[y.textStrikethroughed]: {
|
|
3339
|
-
match: le(
|
|
3359
|
+
match: le(fl),
|
|
3340
3360
|
order: 3,
|
|
3341
3361
|
parse: at,
|
|
3342
3362
|
render: (o, u, c) => r("del", {
|
|
@@ -3348,17 +3368,17 @@ function Ol(e = "", t = {}) {
|
|
|
3348
3368
|
const d = function(o) {
|
|
3349
3369
|
let u = Object.keys(o);
|
|
3350
3370
|
function c(m, h) {
|
|
3351
|
-
let k, _, w = [],
|
|
3371
|
+
let k, _, w = [], I = "", A = "";
|
|
3352
3372
|
for (h.prevCapture = h.prevCapture || ""; m; ) {
|
|
3353
3373
|
let M = 0;
|
|
3354
3374
|
for (; M < u.length; ) {
|
|
3355
|
-
if (
|
|
3375
|
+
if (I = u[M], k = o[I], h.inline && !k.match.inline) {
|
|
3356
3376
|
M++;
|
|
3357
3377
|
continue;
|
|
3358
3378
|
}
|
|
3359
3379
|
const L = k.match(m, h);
|
|
3360
3380
|
if (L) {
|
|
3361
|
-
A = L[0], h.prevCapture += A, m = m.substring(A.length), _ = k.parse(L, c, h), _.type == null && (_.type =
|
|
3381
|
+
A = L[0], h.prevCapture += A, m = m.substring(A.length), _ = k.parse(L, c, h), _.type == null && (_.type = I), w.push(_);
|
|
3362
3382
|
break;
|
|
3363
3383
|
}
|
|
3364
3384
|
M++;
|
|
@@ -3371,8 +3391,8 @@ function Ol(e = "", t = {}) {
|
|
|
3371
3391
|
return k !== _ ? k - _ : m < h ? -1 : 1;
|
|
3372
3392
|
}), function(m, h) {
|
|
3373
3393
|
return c(function(k) {
|
|
3374
|
-
return k.replace(
|
|
3375
|
-
`).replace(
|
|
3394
|
+
return k.replace(Yn, `
|
|
3395
|
+
`).replace(Fn, "").replace(cl, " ");
|
|
3376
3396
|
}(m), h);
|
|
3377
3397
|
};
|
|
3378
3398
|
}(p), g = (b = /* @__PURE__ */ function(o, u) {
|
|
@@ -3386,8 +3406,8 @@ function Ol(e = "", t = {}) {
|
|
|
3386
3406
|
let k = !1;
|
|
3387
3407
|
for (let _ = 0; _ < u.length; _++) {
|
|
3388
3408
|
c.key = _;
|
|
3389
|
-
const w = o(u[_], c),
|
|
3390
|
-
|
|
3409
|
+
const w = o(u[_], c), I = typeof w == "string";
|
|
3410
|
+
I && k ? h[h.length - 1] += w : w !== null && h.push(w), k = I;
|
|
3391
3411
|
}
|
|
3392
3412
|
return c.key = m, h;
|
|
3393
3413
|
}
|
|
@@ -3395,9 +3415,9 @@ function Ol(e = "", t = {}) {
|
|
|
3395
3415
|
});
|
|
3396
3416
|
var b;
|
|
3397
3417
|
const x = a(e);
|
|
3398
|
-
return
|
|
3418
|
+
return n.length ? r("div", null, x, r("footer", {
|
|
3399
3419
|
key: "footer"
|
|
3400
|
-
},
|
|
3420
|
+
}, n.map(function(o) {
|
|
3401
3421
|
return r("div", {
|
|
3402
3422
|
id: t.slugify(o.identifier, Se),
|
|
3403
3423
|
key: o.identifier
|
|
@@ -3406,20 +3426,20 @@ function Ol(e = "", t = {}) {
|
|
|
3406
3426
|
})));
|
|
3407
3427
|
}))) : x;
|
|
3408
3428
|
}
|
|
3409
|
-
const
|
|
3429
|
+
const Pl = (e) => {
|
|
3410
3430
|
let {
|
|
3411
3431
|
children: t = "",
|
|
3412
3432
|
options: r
|
|
3413
|
-
} = e, a = function(i,
|
|
3433
|
+
} = e, a = function(i, n) {
|
|
3414
3434
|
if (i == null)
|
|
3415
3435
|
return {};
|
|
3416
3436
|
var s, p, d = {}, g = Object.keys(i);
|
|
3417
3437
|
for (p = 0; p < g.length; p++)
|
|
3418
|
-
|
|
3438
|
+
n.indexOf(s = g[p]) >= 0 || (d[s] = i[s]);
|
|
3419
3439
|
return d;
|
|
3420
|
-
}(e,
|
|
3421
|
-
return Wa(
|
|
3422
|
-
},
|
|
3440
|
+
}(e, On);
|
|
3441
|
+
return Wa(Wl(t, r), a);
|
|
3442
|
+
}, ql = C.div`
|
|
3423
3443
|
display: flex;
|
|
3424
3444
|
|
|
3425
3445
|
${({
|
|
@@ -3463,35 +3483,35 @@ const El = (e) => {
|
|
|
3463
3483
|
theme: e,
|
|
3464
3484
|
align: t
|
|
3465
3485
|
}) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor};
|
|
3466
|
-
`,
|
|
3486
|
+
`, ce = ({
|
|
3467
3487
|
align: e,
|
|
3468
3488
|
children: t
|
|
3469
3489
|
}) => {
|
|
3470
3490
|
const {
|
|
3471
3491
|
themeSettings: r
|
|
3472
|
-
} =
|
|
3473
|
-
return /* @__PURE__ */
|
|
3492
|
+
} = D();
|
|
3493
|
+
return /* @__PURE__ */ l(ql, {
|
|
3474
3494
|
theme: r,
|
|
3475
3495
|
align: e,
|
|
3476
|
-
children: /* @__PURE__ */
|
|
3496
|
+
children: /* @__PURE__ */ l(aa, {
|
|
3477
3497
|
theme: r,
|
|
3478
3498
|
align: e,
|
|
3479
|
-
children: typeof t == "string" ? /* @__PURE__ */
|
|
3499
|
+
children: typeof t == "string" ? /* @__PURE__ */ l(Pl, {
|
|
3480
3500
|
children: t
|
|
3481
3501
|
}) : t
|
|
3482
3502
|
})
|
|
3483
3503
|
});
|
|
3484
3504
|
};
|
|
3485
|
-
function
|
|
3505
|
+
function Gl() {
|
|
3486
3506
|
const {
|
|
3487
3507
|
welcomeText: e
|
|
3488
3508
|
} = oe();
|
|
3489
|
-
return e === !1 ? null : /* @__PURE__ */
|
|
3509
|
+
return e === !1 ? null : /* @__PURE__ */ l(ce, {
|
|
3490
3510
|
align: "left",
|
|
3491
3511
|
children: e
|
|
3492
3512
|
});
|
|
3493
3513
|
}
|
|
3494
|
-
const
|
|
3514
|
+
const $l = C.div`
|
|
3495
3515
|
display: flex;
|
|
3496
3516
|
|
|
3497
3517
|
${({
|
|
@@ -3501,7 +3521,7 @@ const Zl = C.div`
|
|
|
3501
3521
|
` : P`
|
|
3502
3522
|
justify-content: flex-start;
|
|
3503
3523
|
`}
|
|
3504
|
-
`,
|
|
3524
|
+
`, Hl = C.button`
|
|
3505
3525
|
font-family: inherit;
|
|
3506
3526
|
font-size: inherit;
|
|
3507
3527
|
line-height: inherit;
|
|
@@ -3579,15 +3599,15 @@ function Qe({
|
|
|
3579
3599
|
onClick: r,
|
|
3580
3600
|
onMouseEnter: a,
|
|
3581
3601
|
onMouseLeave: i,
|
|
3582
|
-
accessibleName:
|
|
3602
|
+
accessibleName: n
|
|
3583
3603
|
}) {
|
|
3584
3604
|
const {
|
|
3585
3605
|
themeSettings: s
|
|
3586
|
-
} =
|
|
3587
|
-
return /* @__PURE__ */
|
|
3606
|
+
} = D();
|
|
3607
|
+
return /* @__PURE__ */ l($l, {
|
|
3588
3608
|
align: t,
|
|
3589
|
-
children: /* @__PURE__ */
|
|
3590
|
-
"aria-label":
|
|
3609
|
+
children: /* @__PURE__ */ l(Hl, {
|
|
3610
|
+
"aria-label": n,
|
|
3591
3611
|
theme: s,
|
|
3592
3612
|
onClick: r,
|
|
3593
3613
|
align: t,
|
|
@@ -3597,7 +3617,7 @@ function Qe({
|
|
|
3597
3617
|
})
|
|
3598
3618
|
});
|
|
3599
3619
|
}
|
|
3600
|
-
function
|
|
3620
|
+
function Bl({
|
|
3601
3621
|
onCancel: e,
|
|
3602
3622
|
onConfirm: t
|
|
3603
3623
|
}) {
|
|
@@ -3605,24 +3625,24 @@ function Pl({
|
|
|
3605
3625
|
t: r
|
|
3606
3626
|
} = E();
|
|
3607
3627
|
return /* @__PURE__ */ v(Y, {
|
|
3608
|
-
children: [/* @__PURE__ */
|
|
3628
|
+
children: [/* @__PURE__ */ l(ce, {
|
|
3609
3629
|
align: "left",
|
|
3610
3630
|
children: r("ai.clearHistoryPrompt")
|
|
3611
3631
|
}), /* @__PURE__ */ v("div", {
|
|
3612
3632
|
className: "csdk-flex csdk-gap-x-2",
|
|
3613
|
-
children: [/* @__PURE__ */
|
|
3633
|
+
children: [/* @__PURE__ */ l(Qe, {
|
|
3614
3634
|
align: "right",
|
|
3615
3635
|
onClick: t,
|
|
3616
3636
|
accessibleName: "confirm clear chat",
|
|
3617
|
-
children: /* @__PURE__ */
|
|
3637
|
+
children: /* @__PURE__ */ l("div", {
|
|
3618
3638
|
className: "csdk-py-[6px] csdk-px-[20px]",
|
|
3619
3639
|
children: r("ai.buttons.yes")
|
|
3620
3640
|
})
|
|
3621
|
-
}), /* @__PURE__ */
|
|
3641
|
+
}), /* @__PURE__ */ l(Qe, {
|
|
3622
3642
|
align: "right",
|
|
3623
3643
|
onClick: e,
|
|
3624
3644
|
accessibleName: "cancel clear chat",
|
|
3625
|
-
children: /* @__PURE__ */
|
|
3645
|
+
children: /* @__PURE__ */ l("div", {
|
|
3626
3646
|
className: "csdk-py-[6px] csdk-px-[20px]",
|
|
3627
3647
|
children: r("ai.buttons.no")
|
|
3628
3648
|
})
|
|
@@ -3630,18 +3650,18 @@ function Pl({
|
|
|
3630
3650
|
})]
|
|
3631
3651
|
});
|
|
3632
3652
|
}
|
|
3633
|
-
var
|
|
3634
|
-
function
|
|
3653
|
+
var Yl = Pa("toLowerCase");
|
|
3654
|
+
function Ul() {
|
|
3635
3655
|
const {
|
|
3636
3656
|
themeSettings: e
|
|
3637
|
-
} =
|
|
3638
|
-
return /* @__PURE__ */
|
|
3657
|
+
} = D();
|
|
3658
|
+
return /* @__PURE__ */ l("svg", {
|
|
3639
3659
|
width: "24",
|
|
3640
3660
|
height: "25",
|
|
3641
3661
|
viewBox: "0 0 24 25",
|
|
3642
3662
|
fill: "none",
|
|
3643
3663
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3644
|
-
children: /* @__PURE__ */
|
|
3664
|
+
children: /* @__PURE__ */ l("path", {
|
|
3645
3665
|
fillRule: "evenodd",
|
|
3646
3666
|
clipRule: "evenodd",
|
|
3647
3667
|
d: "M11.5 3.5C11.2239 3.5 11 3.72386 11 4V5C11 5.27614 11.2239 5.5 11.5 5.5C11.7761 5.5 12 5.27614 12 5V4C12 3.72386 11.7761 3.5 11.5 3.5ZM20 11C20 10.7239 19.7761 10.5 19.5 10.5H18.5C18.2239 10.5 18 10.7239 18 11C18 11.2761 18.2239 11.5 18.5 11.5H19.5C19.7761 11.5 20 11.2761 20 11ZM6.06066 5.35355C5.8654 5.15829 5.54882 5.15829 5.35355 5.35355C5.15829 5.54882 5.15829 5.8654 5.35355 6.06066L6.06066 6.76777C6.25592 6.96303 6.5725 6.96303 6.76777 6.76777C6.96303 6.5725 6.96303 6.25592 6.76777 6.06066L6.06066 5.35355ZM5 11C5 10.7239 4.77614 10.5 4.5 10.5H3.5C3.22386 10.5 3 10.7239 3 11C3 11.2761 3.22386 11.5 3.5 11.5H4.5C4.77614 11.5 5 11.2761 5 11ZM17.7678 6.06066C17.963 5.8654 17.963 5.54882 17.7678 5.35355C17.5725 5.15829 17.2559 5.15829 17.0607 5.35355L16.3536 6.06066C16.1583 6.25592 16.1583 6.5725 16.3536 6.76777C16.5488 6.96303 16.8654 6.96303 17.0607 6.76777L17.7678 6.06066ZM12.1443 6.53487C14.6635 6.81824 16.6511 8.67684 16.9597 11.0379C17.1678 12.6385 16.5623 14.2379 15.3244 15.3575C14.5049 16.1022 14.0038 17.2023 14 18.2722V19.5H9V18.2753C8.98626 17.1847 8.46545 16.0683 7.62521 15.3139C6.04513 13.8436 5.56667 11.6251 6.41329 9.69484C7.25992 7.76454 9.26456 6.50321 11.4909 6.5C11.7093 6.50004 11.9274 6.51167 12.1443 6.53487ZM11.4927 7.5C9.675 7.50258 8.03521 8.51877 7.34062 10.0785C6.64391 11.643 7.03778 13.4417 8.32278 14.6196C9.36662 15.5426 9.98356 16.8913 10.0003 18.2029V18.5H13.0001L13.0001 18.1969C13.0048 16.9143 13.6014 15.5805 14.6246 14.6649C15.6402 13.7602 16.1379 12.4652 15.9669 11.1689C15.7132 9.25779 14.0849 7.75729 12.0264 7.52799C11.8487 7.50938 11.67 7.50004 11.4927 7.5ZM14.1068 12.5099H13.1068C13.1068 10.7222 12.3371 9.95246 10.6235 10.0096L10.5901 9.01014C12.8765 8.93393 14.1068 10.1642 14.1068 12.5099ZM13 21.5V20.5H10V21.5H13Z",
|
|
@@ -3649,47 +3669,47 @@ function Gl() {
|
|
|
3649
3669
|
})
|
|
3650
3670
|
});
|
|
3651
3671
|
}
|
|
3652
|
-
function
|
|
3672
|
+
function Ql({
|
|
3653
3673
|
onClick: e
|
|
3654
3674
|
}) {
|
|
3655
3675
|
const {
|
|
3656
3676
|
t
|
|
3657
3677
|
} = E();
|
|
3658
|
-
return /* @__PURE__ */
|
|
3678
|
+
return /* @__PURE__ */ l(Qe, {
|
|
3659
3679
|
align: "left",
|
|
3660
3680
|
onClick: e,
|
|
3661
3681
|
children: /* @__PURE__ */ v("div", {
|
|
3662
3682
|
className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
|
|
3663
|
-
children: [/* @__PURE__ */
|
|
3683
|
+
children: [/* @__PURE__ */ l(Ul, {}), t("ai.buttons.insights")]
|
|
3664
3684
|
})
|
|
3665
3685
|
});
|
|
3666
3686
|
}
|
|
3667
|
-
function
|
|
3687
|
+
function Fl(e) {
|
|
3668
3688
|
return qa("MuiDialog", e);
|
|
3669
3689
|
}
|
|
3670
3690
|
const lt = xa("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), ia = /* @__PURE__ */ Fe({});
|
|
3671
3691
|
process.env.NODE_ENV !== "production" && (ia.displayName = "DialogContext");
|
|
3672
|
-
const
|
|
3692
|
+
const Vl = Ve(ka, {
|
|
3673
3693
|
name: "MuiDialog",
|
|
3674
3694
|
slot: "Backdrop",
|
|
3675
3695
|
overrides: (e, t) => t.backdrop
|
|
3676
3696
|
})({
|
|
3677
3697
|
// Improve scrollable dialog support.
|
|
3678
3698
|
zIndex: -1
|
|
3679
|
-
}),
|
|
3699
|
+
}), Jl = (e) => {
|
|
3680
3700
|
const {
|
|
3681
3701
|
classes: t,
|
|
3682
3702
|
scroll: r,
|
|
3683
3703
|
maxWidth: a,
|
|
3684
3704
|
fullWidth: i,
|
|
3685
|
-
fullScreen:
|
|
3705
|
+
fullScreen: n
|
|
3686
3706
|
} = e, s = {
|
|
3687
3707
|
root: ["root"],
|
|
3688
3708
|
container: ["container", `scroll${fe(r)}`],
|
|
3689
|
-
paper: ["paper", `paperScroll${fe(r)}`, `paperWidth${fe(String(a))}`, i && "paperFullWidth",
|
|
3709
|
+
paper: ["paper", `paperScroll${fe(r)}`, `paperWidth${fe(String(a))}`, i && "paperFullWidth", n && "paperFullScreen"]
|
|
3690
3710
|
};
|
|
3691
|
-
return Na(s,
|
|
3692
|
-
},
|
|
3711
|
+
return Na(s, Fl, t);
|
|
3712
|
+
}, Xl = Ve(ya, {
|
|
3693
3713
|
name: "MuiDialog",
|
|
3694
3714
|
slot: "Root",
|
|
3695
3715
|
overridesResolver: (e, t) => t.root
|
|
@@ -3698,7 +3718,7 @@ const Bl = Ve(ka, {
|
|
|
3698
3718
|
// Use !important to override the Modal inline-style.
|
|
3699
3719
|
position: "absolute !important"
|
|
3700
3720
|
}
|
|
3701
|
-
}),
|
|
3721
|
+
}), Kl = Ve("div", {
|
|
3702
3722
|
name: "MuiDialog",
|
|
3703
3723
|
slot: "Container",
|
|
3704
3724
|
overridesResolver: (e, t) => {
|
|
@@ -3740,7 +3760,7 @@ const Bl = Ve(ka, {
|
|
|
3740
3760
|
}
|
|
3741
3761
|
}
|
|
3742
3762
|
}]
|
|
3743
|
-
}),
|
|
3763
|
+
}), es = Ve(lr, {
|
|
3744
3764
|
name: "MuiDialog",
|
|
3745
3765
|
slot: "Paper",
|
|
3746
3766
|
overridesResolver: (e, t) => {
|
|
@@ -3839,7 +3859,7 @@ const Bl = Ve(ka, {
|
|
|
3839
3859
|
}), a = _a(), i = {
|
|
3840
3860
|
enter: a.transitions.duration.enteringScreen,
|
|
3841
3861
|
exit: a.transitions.duration.leavingScreen
|
|
3842
|
-
},
|
|
3862
|
+
}, n = r, {
|
|
3843
3863
|
"aria-describedby": s,
|
|
3844
3864
|
"aria-labelledby": p,
|
|
3845
3865
|
"aria-modal": d = !0,
|
|
@@ -3854,26 +3874,26 @@ const Bl = Ve(ka, {
|
|
|
3854
3874
|
onBackdropClick: k,
|
|
3855
3875
|
onClick: _,
|
|
3856
3876
|
onClose: w,
|
|
3857
|
-
open:
|
|
3877
|
+
open: I,
|
|
3858
3878
|
PaperComponent: A = lr,
|
|
3859
3879
|
PaperProps: M = {},
|
|
3860
3880
|
scroll: L = "paper",
|
|
3861
3881
|
slots: Z = {},
|
|
3862
3882
|
slotProps: ge = {},
|
|
3863
3883
|
TransitionComponent: F = Ot,
|
|
3864
|
-
transitionDuration:
|
|
3884
|
+
transitionDuration: H = i,
|
|
3865
3885
|
TransitionProps: U
|
|
3866
|
-
} =
|
|
3886
|
+
} = n, V = jo(n, ["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"]), B = T(S({}, r), {
|
|
3867
3887
|
disableEscapeKeyDown: u,
|
|
3868
3888
|
fullScreen: c,
|
|
3869
3889
|
fullWidth: m,
|
|
3870
3890
|
maxWidth: h,
|
|
3871
3891
|
scroll: L
|
|
3872
|
-
}), J =
|
|
3892
|
+
}), J = Jl(B), X = ue(), z = (me) => {
|
|
3873
3893
|
X.current = me.target === me.currentTarget;
|
|
3874
3894
|
}, W = (me) => {
|
|
3875
3895
|
_ && _(me), X.current && (X.current = null, k && k(me), w && w(me, "backdropClick"));
|
|
3876
|
-
}, Q = va(p),
|
|
3896
|
+
}, Q = va(p), de = $(() => ({
|
|
3877
3897
|
titleId: Q
|
|
3878
3898
|
}), [Q]), he = S({
|
|
3879
3899
|
transition: F
|
|
@@ -3885,36 +3905,36 @@ const Bl = Ve(ka, {
|
|
|
3885
3905
|
slots: he,
|
|
3886
3906
|
slotProps: we
|
|
3887
3907
|
}, [K, ze] = Ce("root", {
|
|
3888
|
-
elementType:
|
|
3908
|
+
elementType: Xl,
|
|
3889
3909
|
shouldForwardComponentProp: !0,
|
|
3890
3910
|
externalForwardedProps: N,
|
|
3891
|
-
ownerState:
|
|
3911
|
+
ownerState: B,
|
|
3892
3912
|
className: tt(J.root, o),
|
|
3893
3913
|
ref: t
|
|
3894
3914
|
}), [Re, pa] = Ce("backdrop", {
|
|
3895
|
-
elementType:
|
|
3915
|
+
elementType: Vl,
|
|
3896
3916
|
shouldForwardComponentProp: !0,
|
|
3897
3917
|
externalForwardedProps: N,
|
|
3898
|
-
ownerState:
|
|
3918
|
+
ownerState: B
|
|
3899
3919
|
}), [ua, ga] = Ce("paper", {
|
|
3900
|
-
elementType:
|
|
3920
|
+
elementType: es,
|
|
3901
3921
|
shouldForwardComponentProp: !0,
|
|
3902
3922
|
externalForwardedProps: N,
|
|
3903
|
-
ownerState:
|
|
3923
|
+
ownerState: B,
|
|
3904
3924
|
className: tt(J.paper, M.className)
|
|
3905
3925
|
}), [ha, ma] = Ce("container", {
|
|
3906
|
-
elementType:
|
|
3926
|
+
elementType: Kl,
|
|
3907
3927
|
externalForwardedProps: N,
|
|
3908
|
-
ownerState:
|
|
3928
|
+
ownerState: B,
|
|
3909
3929
|
className: tt(J.container)
|
|
3910
3930
|
}), [ba, fa] = Ce("transition", {
|
|
3911
3931
|
elementType: Ot,
|
|
3912
3932
|
externalForwardedProps: N,
|
|
3913
|
-
ownerState:
|
|
3933
|
+
ownerState: B,
|
|
3914
3934
|
additionalProps: {
|
|
3915
3935
|
appear: !0,
|
|
3916
|
-
in:
|
|
3917
|
-
timeout:
|
|
3936
|
+
in: I,
|
|
3937
|
+
timeout: H,
|
|
3918
3938
|
role: "presentation"
|
|
3919
3939
|
}
|
|
3920
3940
|
});
|
|
@@ -3925,13 +3945,13 @@ const Bl = Ve(ka, {
|
|
|
3925
3945
|
},
|
|
3926
3946
|
slotProps: {
|
|
3927
3947
|
backdrop: S({
|
|
3928
|
-
transitionDuration:
|
|
3948
|
+
transitionDuration: H,
|
|
3929
3949
|
as: g
|
|
3930
3950
|
}, pa)
|
|
3931
3951
|
},
|
|
3932
3952
|
disableEscapeKeyDown: u,
|
|
3933
3953
|
onClose: w,
|
|
3934
|
-
open:
|
|
3954
|
+
open: I,
|
|
3935
3955
|
onClick: W
|
|
3936
3956
|
}, ze), V), {
|
|
3937
3957
|
children: /* @__PURE__ */ _e(ba, T(S({}, fa), {
|
|
@@ -3947,7 +3967,7 @@ const Bl = Ve(ka, {
|
|
|
3947
3967
|
"aria-modal": d
|
|
3948
3968
|
}, ga), {
|
|
3949
3969
|
children: /* @__PURE__ */ _e(ia.Provider, {
|
|
3950
|
-
value:
|
|
3970
|
+
value: de,
|
|
3951
3971
|
children: x
|
|
3952
3972
|
})
|
|
3953
3973
|
}))
|
|
@@ -4118,7 +4138,7 @@ process.env.NODE_ENV !== "production" && (oa.propTypes = {
|
|
|
4118
4138
|
*/
|
|
4119
4139
|
TransitionProps: f.object
|
|
4120
4140
|
});
|
|
4121
|
-
function
|
|
4141
|
+
function ts({
|
|
4122
4142
|
fillColor: e = "#262E3D"
|
|
4123
4143
|
}) {
|
|
4124
4144
|
return /* @__PURE__ */ v("svg", {
|
|
@@ -4127,14 +4147,14 @@ function Vl({
|
|
|
4127
4147
|
height: "30",
|
|
4128
4148
|
viewBox: "0 0 30 30",
|
|
4129
4149
|
fill: "none",
|
|
4130
|
-
children: [/* @__PURE__ */
|
|
4150
|
+
children: [/* @__PURE__ */ l("rect", {
|
|
4131
4151
|
x: "1",
|
|
4132
4152
|
y: "1",
|
|
4133
4153
|
width: "28",
|
|
4134
4154
|
height: "28",
|
|
4135
4155
|
rx: "14",
|
|
4136
4156
|
stroke: "#9EA2AB"
|
|
4137
|
-
}), /* @__PURE__ */
|
|
4157
|
+
}), /* @__PURE__ */ l("path", {
|
|
4138
4158
|
fillRule: "evenodd",
|
|
4139
4159
|
clipRule: "evenodd",
|
|
4140
4160
|
d: "M14.2929 15L9.14645 9.85355C8.95118 9.65829 8.95118 9.34171 9.14645 9.14645C9.34171 8.95118 9.65829 8.95118 9.85355 9.14645L15 14.2929L20.1464 9.14645C20.3417 8.95118 20.6583 8.95118 20.8536 9.14645C21.0488 9.34171 21.0488 9.65829 20.8536 9.85355L15.7071 15L20.8536 20.1464C21.0488 20.3417 21.0488 20.6583 20.8536 20.8536C20.6583 21.0488 20.3417 21.0488 20.1464 20.8536L15 15.7071L9.85355 20.8536C9.65829 21.0488 9.34171 21.0488 9.14645 20.8536C8.95118 20.6583 8.95118 20.3417 9.14645 20.1464L14.2929 15Z",
|
|
@@ -4227,9 +4247,9 @@ const na = {
|
|
|
4227
4247
|
errorBG: "rgba(231, 71, 39, 0.1)"
|
|
4228
4248
|
}
|
|
4229
4249
|
}
|
|
4230
|
-
},
|
|
4250
|
+
}, rs = {
|
|
4231
4251
|
shouldForwardProp: (e) => !e.startsWith("$")
|
|
4232
|
-
}, Ee = C(sr,
|
|
4252
|
+
}, Ee = C(sr, rs)(({
|
|
4233
4253
|
$hoverColor: e
|
|
4234
4254
|
}) => ({
|
|
4235
4255
|
padding: 2,
|
|
@@ -4237,16 +4257,16 @@ const na = {
|
|
|
4237
4257
|
backgroundColor: e ?? na.interaction.defaultHover
|
|
4238
4258
|
}
|
|
4239
4259
|
}));
|
|
4240
|
-
function
|
|
4260
|
+
function as({
|
|
4241
4261
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
|
4242
4262
|
}) {
|
|
4243
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ l("svg", {
|
|
4244
4264
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4245
4265
|
width: "24",
|
|
4246
4266
|
height: "24",
|
|
4247
4267
|
viewBox: "0 0 24 24",
|
|
4248
4268
|
fill: "none",
|
|
4249
|
-
children: /* @__PURE__ */
|
|
4269
|
+
children: /* @__PURE__ */ l("path", {
|
|
4250
4270
|
fillRule: "evenodd",
|
|
4251
4271
|
clipRule: "evenodd",
|
|
4252
4272
|
d: "M13.0503 10.2426L17.2929 6H14.5C14.2239 6 14 5.77614 14 5.5C14 5.22386 14.2239 5 14.5 5H18.5C18.7761 5 19 5.22386 19 5.5V9.5C19 9.77614 18.7761 10 18.5 10C18.2239 10 18 9.77614 18 9.5V6.70711L13.7574 10.9497C13.5621 11.145 13.2455 11.145 13.0503 10.9497C12.855 10.7545 12.855 10.4379 13.0503 10.2426ZM10.1464 13.1464L6 17.2929V14.5C6 14.2239 5.77614 14 5.5 14C5.22386 14 5 14.2239 5 14.5V18.5C5 18.7761 5.22386 19 5.5 19H9.5C9.77614 19 10 18.7761 10 18.5C10 18.2239 9.77614 18 9.5 18H6.70711L10.8536 13.8536C11.0488 13.6583 11.0488 13.3417 10.8536 13.1464C10.6583 12.9512 10.3417 12.9512 10.1464 13.1464Z",
|
|
@@ -4254,16 +4274,16 @@ function Xl({
|
|
|
4254
4274
|
})
|
|
4255
4275
|
});
|
|
4256
4276
|
}
|
|
4257
|
-
function
|
|
4277
|
+
function is({
|
|
4258
4278
|
fill: e = "rgba(38, 46, 61, 0.67)"
|
|
4259
4279
|
}) {
|
|
4260
|
-
return /* @__PURE__ */
|
|
4280
|
+
return /* @__PURE__ */ l("svg", {
|
|
4261
4281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4262
4282
|
width: "24",
|
|
4263
4283
|
height: "24",
|
|
4264
4284
|
viewBox: "0 0 24 24",
|
|
4265
4285
|
fill: "none",
|
|
4266
|
-
children: /* @__PURE__ */
|
|
4286
|
+
children: /* @__PURE__ */ l("path", {
|
|
4267
4287
|
fillRule: "evenodd",
|
|
4268
4288
|
clipRule: "evenodd",
|
|
4269
4289
|
d: "M17.25 12C17.25 14.8995 14.8995 17.25 12 17.25C9.10051 17.25 6.75 14.8995 6.75 12C6.75 9.10051 9.10051 6.75 12 6.75C14.8995 6.75 17.25 9.10051 17.25 12ZM18 12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12ZM11.625 9.375V10.1239H12.375V9.375H11.625ZM12.375 14.6239V10.8739H11.625V14.6239H12.375Z",
|
|
@@ -4271,14 +4291,14 @@ function Kl({
|
|
|
4271
4291
|
})
|
|
4272
4292
|
});
|
|
4273
4293
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return /* @__PURE__ */
|
|
4294
|
+
function os() {
|
|
4295
|
+
return /* @__PURE__ */ l("svg", {
|
|
4276
4296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4277
4297
|
width: "24",
|
|
4278
4298
|
height: "24",
|
|
4279
4299
|
viewBox: "0 0 24 24",
|
|
4280
4300
|
fill: "none",
|
|
4281
|
-
children: /* @__PURE__ */
|
|
4301
|
+
children: /* @__PURE__ */ l("path", {
|
|
4282
4302
|
fillRule: "evenodd",
|
|
4283
4303
|
clipRule: "evenodd",
|
|
4284
4304
|
d: "M4.64372 12C4.64372 15.3137 7.33002 18 10.6437 18C12.6857 18 14.4894 16.9799 15.5731 15.4216C15.7307 15.195 16.0347 15.1118 16.2737 15.2498C16.5131 15.3879 16.5964 15.6953 16.4413 15.924C15.1825 17.7803 13.0555 19 10.6437 19C6.77773 19 3.64372 15.866 3.64372 12C3.64372 8.13401 6.77773 5 10.6437 5C13.8766 5 16.5977 7.19162 17.4021 10.1702L18.0347 8.56524C18.1359 8.30833 18.4263 8.18215 18.6832 8.2834C18.9401 8.38466 19.0663 8.67501 18.965 8.93192L17.865 11.723C17.7638 11.9799 17.4734 12.1061 17.2165 12.0048L14.4255 10.9048C14.1685 10.8035 14.0424 10.5132 14.1436 10.2563C14.2449 9.99935 14.5352 9.87317 14.7921 9.97442L16.4897 10.6435C15.8749 7.98316 13.4909 6 10.6437 6C7.33002 6 4.64372 8.68629 4.64372 12Z",
|
|
@@ -4287,23 +4307,23 @@ function es() {
|
|
|
4287
4307
|
})
|
|
4288
4308
|
});
|
|
4289
4309
|
}
|
|
4290
|
-
const Nt = (e) => dr(e.chart.backgroundColor),
|
|
4310
|
+
const Nt = (e) => dr(e.chart.backgroundColor), ns = ({
|
|
4291
4311
|
title: e
|
|
4292
4312
|
}) => {
|
|
4293
4313
|
const {
|
|
4294
4314
|
themeSettings: t
|
|
4295
|
-
} =
|
|
4296
|
-
return /* @__PURE__ */
|
|
4315
|
+
} = D();
|
|
4316
|
+
return /* @__PURE__ */ l(Oe, {
|
|
4297
4317
|
title: e,
|
|
4298
|
-
children: /* @__PURE__ */
|
|
4318
|
+
children: /* @__PURE__ */ l(Ee, {
|
|
4299
4319
|
disableTouchRipple: !0,
|
|
4300
4320
|
$hoverColor: Nt(t),
|
|
4301
|
-
children: /* @__PURE__ */
|
|
4321
|
+
children: /* @__PURE__ */ l(is, {
|
|
4302
4322
|
fill: t.chart.textColor
|
|
4303
4323
|
})
|
|
4304
4324
|
})
|
|
4305
4325
|
});
|
|
4306
|
-
},
|
|
4326
|
+
}, ls = ({
|
|
4307
4327
|
items: e
|
|
4308
4328
|
}) => {
|
|
4309
4329
|
const [t, r] = R(null), a = (s) => {
|
|
@@ -4311,17 +4331,17 @@ const Nt = (e) => dr(e.chart.backgroundColor), ts = ({
|
|
|
4311
4331
|
}, i = () => {
|
|
4312
4332
|
r(null);
|
|
4313
4333
|
}, {
|
|
4314
|
-
themeSettings:
|
|
4315
|
-
} =
|
|
4334
|
+
themeSettings: n
|
|
4335
|
+
} = D();
|
|
4316
4336
|
return /* @__PURE__ */ v(Y, {
|
|
4317
|
-
children: [/* @__PURE__ */
|
|
4337
|
+
children: [/* @__PURE__ */ l(Ee, {
|
|
4318
4338
|
onClick: a,
|
|
4319
|
-
$hoverColor: Nt(
|
|
4339
|
+
$hoverColor: Nt(n),
|
|
4320
4340
|
"aria-label": "three dots button",
|
|
4321
|
-
children: /* @__PURE__ */
|
|
4322
|
-
fill:
|
|
4341
|
+
children: /* @__PURE__ */ l(di, {
|
|
4342
|
+
fill: n.chart.textColor
|
|
4323
4343
|
})
|
|
4324
|
-
}), /* @__PURE__ */
|
|
4344
|
+
}), /* @__PURE__ */ l(ui, {
|
|
4325
4345
|
anchorEl: t,
|
|
4326
4346
|
anchorOrigin: {
|
|
4327
4347
|
vertical: "bottom",
|
|
@@ -4339,70 +4359,70 @@ const Nt = (e) => dr(e.chart.backgroundColor), ts = ({
|
|
|
4339
4359
|
},
|
|
4340
4360
|
sx: {
|
|
4341
4361
|
fontSize: "13px",
|
|
4342
|
-
fontFamily:
|
|
4362
|
+
fontFamily: n.typography.fontFamily,
|
|
4343
4363
|
color: na.text.content
|
|
4344
4364
|
},
|
|
4345
4365
|
disableRipple: !0,
|
|
4346
|
-
children: [s.icon, /* @__PURE__ */
|
|
4366
|
+
children: [s.icon, /* @__PURE__ */ l("div", {
|
|
4347
4367
|
className: "csdk-ml-1",
|
|
4348
4368
|
children: s.title
|
|
4349
4369
|
})]
|
|
4350
4370
|
}, s.title))
|
|
4351
4371
|
})]
|
|
4352
4372
|
});
|
|
4353
|
-
},
|
|
4373
|
+
}, ss = ({
|
|
4354
4374
|
onClick: e
|
|
4355
4375
|
}) => {
|
|
4356
4376
|
const {
|
|
4357
4377
|
themeSettings: t
|
|
4358
|
-
} =
|
|
4378
|
+
} = D(), {
|
|
4359
4379
|
t: r
|
|
4360
4380
|
} = E();
|
|
4361
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ l(Oe, {
|
|
4362
4382
|
title: r("ai.preview"),
|
|
4363
|
-
children: /* @__PURE__ */
|
|
4383
|
+
children: /* @__PURE__ */ l(Ee, {
|
|
4364
4384
|
onClick: e,
|
|
4365
4385
|
$hoverColor: Nt(t),
|
|
4366
|
-
children: /* @__PURE__ */
|
|
4386
|
+
children: /* @__PURE__ */ l(as, {
|
|
4367
4387
|
fill: t.chart.textColor
|
|
4368
4388
|
})
|
|
4369
4389
|
})
|
|
4370
4390
|
});
|
|
4371
|
-
},
|
|
4391
|
+
}, cs = C.div`
|
|
4372
4392
|
display: flex;
|
|
4373
4393
|
padding-top: 6px;
|
|
4374
4394
|
padding-bottom: 6px;
|
|
4375
4395
|
`;
|
|
4376
|
-
function
|
|
4396
|
+
function ds({
|
|
4377
4397
|
infoTooltipText: e,
|
|
4378
4398
|
onRefresh: t,
|
|
4379
4399
|
onExpand: r
|
|
4380
4400
|
}) {
|
|
4381
|
-
const a =
|
|
4401
|
+
const a = $(() => [{
|
|
4382
4402
|
title: "Refresh",
|
|
4383
4403
|
onClick: t,
|
|
4384
|
-
icon: /* @__PURE__ */
|
|
4404
|
+
icon: /* @__PURE__ */ l(os, {})
|
|
4385
4405
|
}], [t]);
|
|
4386
|
-
return /* @__PURE__ */ v(
|
|
4406
|
+
return /* @__PURE__ */ v(cs, {
|
|
4387
4407
|
"aria-label": "chatbot chart toolbar",
|
|
4388
|
-
children: [/* @__PURE__ */
|
|
4408
|
+
children: [/* @__PURE__ */ l(ns, {
|
|
4389
4409
|
title: e ?? ""
|
|
4390
|
-
}), /* @__PURE__ */
|
|
4410
|
+
}), /* @__PURE__ */ l(ls, {
|
|
4391
4411
|
items: a
|
|
4392
|
-
}), /* @__PURE__ */
|
|
4412
|
+
}), /* @__PURE__ */ l(ss, {
|
|
4393
4413
|
onClick: r
|
|
4394
4414
|
})]
|
|
4395
4415
|
});
|
|
4396
4416
|
}
|
|
4397
|
-
function
|
|
4417
|
+
function ps({
|
|
4398
4418
|
content: e
|
|
4399
4419
|
}) {
|
|
4400
4420
|
const [t, r] = R(!1), {
|
|
4401
4421
|
themeSettings: a
|
|
4402
|
-
} =
|
|
4422
|
+
} = D(), {
|
|
4403
4423
|
inlineElement: i,
|
|
4404
|
-
expandedElement:
|
|
4405
|
-
} =
|
|
4424
|
+
expandedElement: n
|
|
4425
|
+
} = $(() => {
|
|
4406
4426
|
const s = Je(e, {
|
|
4407
4427
|
useCustomizedStyleOptions: !0
|
|
4408
4428
|
});
|
|
@@ -4415,7 +4435,7 @@ function ns({
|
|
|
4415
4435
|
} = s, g = {
|
|
4416
4436
|
cornerRadius: "Small",
|
|
4417
4437
|
header: {
|
|
4418
|
-
renderToolbar: (o) => /* @__PURE__ */
|
|
4438
|
+
renderToolbar: (o) => /* @__PURE__ */ l(ds, {
|
|
4419
4439
|
infoTooltipText: p,
|
|
4420
4440
|
onRefresh: o,
|
|
4421
4441
|
onExpand: () => r(!0)
|
|
@@ -4424,12 +4444,12 @@ function ns({
|
|
|
4424
4444
|
};
|
|
4425
4445
|
let b, x;
|
|
4426
4446
|
if (Ga(s.chartType))
|
|
4427
|
-
b = /* @__PURE__ */
|
|
4447
|
+
b = /* @__PURE__ */ l("div", {
|
|
4428
4448
|
className: "csdk-h-[245px]",
|
|
4429
|
-
children: /* @__PURE__ */
|
|
4449
|
+
children: /* @__PURE__ */ l(De, T(S({}, s), {
|
|
4430
4450
|
styleOptions: g
|
|
4431
4451
|
}))
|
|
4432
|
-
}), x = /* @__PURE__ */
|
|
4452
|
+
}), x = /* @__PURE__ */ l(De, T(S({}, s), {
|
|
4433
4453
|
styleOptions: {
|
|
4434
4454
|
header: {
|
|
4435
4455
|
hidden: !0
|
|
@@ -4446,11 +4466,11 @@ function ns({
|
|
|
4446
4466
|
xAxis: void 0,
|
|
4447
4467
|
yAxis: void 0
|
|
4448
4468
|
}), g);
|
|
4449
|
-
delete u.legend, delete u.xAxis, delete u.yAxis, b = /* @__PURE__ */
|
|
4450
|
-
children: /* @__PURE__ */
|
|
4469
|
+
delete u.legend, delete u.xAxis, delete u.yAxis, b = /* @__PURE__ */ l("div", {
|
|
4470
|
+
children: /* @__PURE__ */ l(De, T(S({}, s), {
|
|
4451
4471
|
styleOptions: u
|
|
4452
4472
|
}))
|
|
4453
|
-
}), x = /* @__PURE__ */
|
|
4473
|
+
}), x = /* @__PURE__ */ l(De, T(S({}, s), {
|
|
4454
4474
|
styleOptions: S({
|
|
4455
4475
|
cornerRadius: "None"
|
|
4456
4476
|
}, o)
|
|
@@ -4475,33 +4495,33 @@ function ns({
|
|
|
4475
4495
|
},
|
|
4476
4496
|
children: [/* @__PURE__ */ v("div", {
|
|
4477
4497
|
className: "csdk-flex csdk-items-center csdk-justify-between csdk-mt-[16px] csdk-mx-[16px] csdk-pl-[20px]",
|
|
4478
|
-
children: [/* @__PURE__ */
|
|
4498
|
+
children: [/* @__PURE__ */ l("div", {
|
|
4479
4499
|
className: "csdk-text-ai-lg csdk-semibold",
|
|
4480
4500
|
children: e.queryTitle
|
|
4481
|
-
}), /* @__PURE__ */
|
|
4501
|
+
}), /* @__PURE__ */ l(sr, {
|
|
4482
4502
|
onClick: () => r(!1),
|
|
4483
4503
|
"aria-label": "close expanded chart",
|
|
4484
|
-
children: /* @__PURE__ */
|
|
4504
|
+
children: /* @__PURE__ */ l(ts, {
|
|
4485
4505
|
fillColor: a.aiChat.primaryTextColor
|
|
4486
4506
|
})
|
|
4487
4507
|
})]
|
|
4488
|
-
}), /* @__PURE__ */
|
|
4508
|
+
}), /* @__PURE__ */ l("div", {
|
|
4489
4509
|
className: "csdk-h-screen csdk-mt-[8px] csdk-mb-[24px] csdk-mx-[16px]",
|
|
4490
|
-
children:
|
|
4510
|
+
children: n
|
|
4491
4511
|
})]
|
|
4492
4512
|
})]
|
|
4493
4513
|
});
|
|
4494
4514
|
}
|
|
4495
|
-
function
|
|
4515
|
+
function us({
|
|
4496
4516
|
theme: e
|
|
4497
4517
|
}) {
|
|
4498
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ l("svg", {
|
|
4499
4519
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4500
4520
|
width: "24",
|
|
4501
4521
|
height: "24",
|
|
4502
4522
|
viewBox: "0 0 24 24",
|
|
4503
4523
|
fill: "none",
|
|
4504
|
-
children: /* @__PURE__ */
|
|
4524
|
+
children: /* @__PURE__ */ l("path", {
|
|
4505
4525
|
fillRule: "evenodd",
|
|
4506
4526
|
clipRule: "evenodd",
|
|
4507
4527
|
d: "M18.5798 9.61098C18.8749 9.98744 19.0165 10.391 18.9985 10.8066C18.9804 11.2643 18.7757 11.6227 18.607 11.8426C18.8027 12.3305 18.878 13.0984 18.2245 13.6947C17.7456 14.1315 16.9325 14.3273 15.806 14.2732C15.014 14.237 14.3513 14.0893 14.3243 14.0833H14.3213C14.1708 14.0562 14.011 14.0231 13.8484 13.9869C13.8363 14.1797 13.8696 14.6585 14.2249 15.7367C14.6465 17.0196 14.6225 18.0016 14.1466 18.6581C13.6466 19.3478 12.8485 19.4019 12.6136 19.4019C12.3877 19.4019 12.1799 19.3086 12.0324 19.137C11.6981 18.7484 11.7373 18.0317 11.7793 17.7004C11.3818 16.6342 10.2676 14.02 9.32479 13.2943C9.30668 13.2822 9.2917 13.2671 9.27671 13.2521C8.99949 12.9599 8.81287 12.6437 8.68642 12.3667C8.50861 12.463 8.30687 12.5173 8.08995 12.5173H6.25291C5.56014 12.5173 5 11.954 5 11.2643L5 6.37029C5 5.67764 5.56323 5.11738 6.25291 5.11738H8.08995C8.35803 5.11738 8.60804 5.20179 8.81287 5.34635L9.52051 5.26191C9.62905 5.24692 11.5565 5.00297 13.5352 5.04209C13.8935 5.01502 14.2309 5 14.5441 5C15.0832 5 15.5531 5.04209 15.9445 5.12649C16.8661 5.32222 17.4957 5.71366 17.8148 6.28898C18.0588 6.72865 18.0588 7.16543 18.0197 7.44247C18.6191 7.98454 18.7244 8.58394 18.7033 9.00555C18.6913 9.2495 18.637 9.4573 18.5798 9.61098ZM6.25291 5.93058C6.00896 5.93058 5.81324 6.12939 5.81324 6.37029V11.2674C5.81324 11.5112 6.0119 11.7071 6.25291 11.7071H8.08995C8.33393 11.7071 8.52981 11.5083 8.52981 11.2674V6.37338C8.52981 6.12939 8.33096 5.93352 8.08995 5.93352H6.25291V5.93058ZM17.8088 9.96331C17.6823 9.83083 17.6582 9.6289 17.7547 9.47229C17.7547 9.46935 17.878 9.25849 17.8932 8.96937C17.9142 8.5748 17.7245 8.22555 17.327 7.92731C17.1854 7.81893 17.1282 7.63217 17.1885 7.46351C17.1885 7.46057 17.3179 7.06291 17.1072 6.68645C16.9052 6.32516 16.4566 6.06619 15.7759 5.92162C15.2309 5.80413 14.4899 5.78293 13.5805 5.85529H13.5383C11.6017 5.81309 9.64403 6.06619 9.62302 6.06912H9.61994L9.31583 6.1053C9.3339 6.18955 9.34286 6.27998 9.34286 6.37029V11.2674C9.34286 11.3968 9.32185 11.5233 9.28567 11.6408C9.33992 11.8425 9.49051 12.2914 9.84582 12.6739C11.1982 13.7461 12.5203 17.3631 12.5775 17.5197C12.6017 17.583 12.6075 17.6521 12.5956 17.7214C12.5443 18.0587 12.5624 18.4715 12.6347 18.5949C12.7943 18.5919 13.225 18.5467 13.484 18.1883C13.7912 17.7636 13.7791 17.0046 13.4478 15.9988C12.9419 14.4657 12.8997 13.6587 13.3003 13.3033C13.4991 13.1256 13.7641 13.1165 13.9569 13.1858C14.1406 13.228 14.3153 13.2641 14.4809 13.2912C14.4929 13.2943 14.508 13.2973 14.52 13.3003C15.4447 13.5021 17.1011 13.6255 17.6763 13.1015C18.1642 12.6558 17.8179 12.0655 17.7788 12.0022C17.6673 11.8336 17.7004 11.6137 17.851 11.4782C17.854 11.4752 18.1702 11.177 18.1852 10.7764C18.1973 10.5085 18.0708 10.2343 17.8088 9.96331Z",
|
|
@@ -4509,38 +4529,38 @@ function ls({
|
|
|
4509
4529
|
})
|
|
4510
4530
|
});
|
|
4511
4531
|
}
|
|
4512
|
-
function
|
|
4532
|
+
function gs({
|
|
4513
4533
|
onClick: e,
|
|
4514
4534
|
disabled: t
|
|
4515
4535
|
}) {
|
|
4516
4536
|
const {
|
|
4517
4537
|
themeSettings: r
|
|
4518
|
-
} =
|
|
4538
|
+
} = D(), {
|
|
4519
4539
|
t: a
|
|
4520
4540
|
} = E();
|
|
4521
|
-
return /* @__PURE__ */
|
|
4541
|
+
return /* @__PURE__ */ l(Oe, {
|
|
4522
4542
|
title: a("ai.buttons.incorrectResponse"),
|
|
4523
|
-
children: /* @__PURE__ */
|
|
4543
|
+
children: /* @__PURE__ */ l(Ee, {
|
|
4524
4544
|
"aria-label": "thumbs-down",
|
|
4525
4545
|
onClick: e,
|
|
4526
4546
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
4527
4547
|
disabled: t,
|
|
4528
|
-
children: /* @__PURE__ */
|
|
4548
|
+
children: /* @__PURE__ */ l(us, {
|
|
4529
4549
|
theme: r
|
|
4530
4550
|
})
|
|
4531
4551
|
})
|
|
4532
4552
|
});
|
|
4533
4553
|
}
|
|
4534
|
-
function
|
|
4554
|
+
function hs({
|
|
4535
4555
|
theme: e
|
|
4536
4556
|
}) {
|
|
4537
|
-
return /* @__PURE__ */
|
|
4557
|
+
return /* @__PURE__ */ l("svg", {
|
|
4538
4558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4539
4559
|
width: "24",
|
|
4540
4560
|
height: "24",
|
|
4541
4561
|
viewBox: "0 0 24 24",
|
|
4542
4562
|
fill: "none",
|
|
4543
|
-
children: /* @__PURE__ */
|
|
4563
|
+
children: /* @__PURE__ */ l("path", {
|
|
4544
4564
|
fillRule: "evenodd",
|
|
4545
4565
|
clipRule: "evenodd",
|
|
4546
4566
|
d: "M18.5798 14.7911C18.8749 14.4146 19.0165 14.011 18.9985 13.5954C18.9804 13.1377 18.7757 12.7793 18.607 12.5595C18.8027 12.0715 18.878 11.3036 18.2245 10.7073C17.7456 10.2705 16.9325 10.0748 15.806 10.1289C15.014 10.1651 14.3513 10.3127 14.3243 10.3187H14.3213C14.1708 10.3458 14.011 10.3789 13.8484 10.4151C13.8363 10.2223 13.8696 9.74345 14.2248 8.66522C14.6465 7.38231 14.6225 6.40041 14.1466 5.74397C13.6466 5.05425 12.8485 5 12.6136 5C12.3877 5 12.1799 5.09336 12.0324 5.26499C11.6981 5.6535 11.7373 6.37026 11.7793 6.70158C11.3818 7.76777 10.2676 10.382 9.32479 11.1077C9.30668 11.1198 9.2917 11.1349 9.27671 11.1499C8.99949 11.4421 8.81287 11.7583 8.68642 12.0353C8.50861 11.939 8.30687 11.8848 8.08995 11.8848H6.25291C5.56014 11.8848 5 12.448 5 13.1377V18.0318C5 18.7244 5.56323 19.2847 6.25291 19.2847H8.08995C8.35803 19.2847 8.60804 19.2003 8.81287 19.0557L9.52051 19.1401C9.62905 19.1551 11.5565 19.3991 13.5352 19.36C13.8935 19.387 14.2309 19.402 14.5441 19.402C15.0832 19.402 15.5531 19.36 15.9445 19.2756C16.8661 19.0798 17.4957 18.6884 17.8148 18.1131C18.0588 17.6734 18.0588 17.2366 18.0197 16.9596C18.6191 16.4175 18.7244 15.8181 18.7033 15.3965C18.6913 15.1525 18.637 14.9447 18.5798 14.7911ZM6.25291 18.4715C6.00896 18.4715 5.81324 18.2727 5.81324 18.0318V13.1346C5.81324 12.8908 6.0119 12.6949 6.25291 12.6949H8.08995C8.33393 12.6949 8.52981 12.8937 8.52981 13.1346V18.0287C8.52981 18.2727 8.33096 18.4685 8.08995 18.4685H6.25291V18.4715ZM17.8088 14.4387C17.6823 14.5712 17.6582 14.7731 17.7547 14.9298C17.7547 14.9327 17.878 15.1436 17.8932 15.4327C17.9142 15.8272 17.7245 16.1765 17.327 16.4747C17.1854 16.5831 17.1282 16.7699 17.1885 16.9385C17.1885 16.9415 17.3179 17.3391 17.1072 17.7156C16.9052 18.0769 16.4566 18.3359 15.7759 18.4804C15.2309 18.5979 14.4898 18.6191 13.5805 18.5468H13.5383C11.6017 18.589 9.64403 18.3359 9.62302 18.3329H9.61994L9.31583 18.2967C9.3339 18.2125 9.34286 18.1221 9.34286 18.0318V13.1346C9.34286 13.0052 9.32185 12.8787 9.28567 12.7612C9.33992 12.5595 9.49051 12.1106 9.84582 11.7281C11.1981 10.6559 12.5203 7.03893 12.5775 6.88232C12.6016 6.81908 12.6075 6.74981 12.5956 6.68058C12.5443 6.34323 12.5624 5.93058 12.6347 5.80718C12.7943 5.81015 13.225 5.85529 13.484 6.21365C13.7912 6.63837 13.7791 7.39733 13.4478 8.40316C12.9419 9.93624 12.8997 10.7433 13.3003 11.0987C13.4991 11.2764 13.7641 11.2855 13.9569 11.2162C14.1406 11.174 14.3153 11.1378 14.4809 11.1108C14.4929 11.1077 14.508 11.1048 14.52 11.1017C15.4447 10.8999 17.1011 10.7765 17.6763 11.3005C18.1642 11.7462 17.8179 12.3365 17.7788 12.3998C17.6673 12.5684 17.7004 12.7883 17.851 12.9238C17.854 12.9268 18.1702 13.225 18.1852 13.6256C18.1973 13.8935 18.0708 14.1677 17.8088 14.4387Z",
|
|
@@ -4548,58 +4568,58 @@ function cs({
|
|
|
4548
4568
|
})
|
|
4549
4569
|
});
|
|
4550
4570
|
}
|
|
4551
|
-
function
|
|
4571
|
+
function ms({
|
|
4552
4572
|
onClick: e,
|
|
4553
4573
|
disabled: t
|
|
4554
4574
|
}) {
|
|
4555
4575
|
const {
|
|
4556
4576
|
themeSettings: r
|
|
4557
|
-
} =
|
|
4577
|
+
} = D(), {
|
|
4558
4578
|
t: a
|
|
4559
4579
|
} = E();
|
|
4560
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ l(Oe, {
|
|
4561
4581
|
title: a("ai.buttons.correctResponse"),
|
|
4562
|
-
children: /* @__PURE__ */
|
|
4582
|
+
children: /* @__PURE__ */ l(Ee, {
|
|
4563
4583
|
"aria-label": "thumbs-up",
|
|
4564
4584
|
onClick: e,
|
|
4565
4585
|
$hoverColor: r.aiChat.icons.feedbackIcons.hoverColor,
|
|
4566
4586
|
disabled: t,
|
|
4567
|
-
children: /* @__PURE__ */
|
|
4587
|
+
children: /* @__PURE__ */ l(hs, {
|
|
4568
4588
|
theme: r
|
|
4569
4589
|
})
|
|
4570
4590
|
})
|
|
4571
4591
|
});
|
|
4572
4592
|
}
|
|
4573
|
-
const
|
|
4574
|
-
const [e, t] = R(!1), r =
|
|
4593
|
+
const bs = () => {
|
|
4594
|
+
const [e, t] = R(!1), r = ue(null), a = j(() => {
|
|
4575
4595
|
t(!0);
|
|
4576
4596
|
}, []), i = j(() => {
|
|
4577
4597
|
t(!1);
|
|
4578
4598
|
}, []);
|
|
4579
|
-
return [j((
|
|
4599
|
+
return [j((n) => {
|
|
4580
4600
|
var s;
|
|
4581
|
-
((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (
|
|
4601
|
+
((s = r.current) == null ? void 0 : s.nodeType) === Node.ELEMENT_NODE && (r.current.removeEventListener("mouseenter", a), r.current.removeEventListener("mouseleave", i)), (n == null ? void 0 : n.nodeType) === Node.ELEMENT_NODE && (n.addEventListener("mouseenter", a), n.addEventListener("mouseleave", i)), r.current = n;
|
|
4582
4602
|
}, [a, i]), e];
|
|
4583
|
-
},
|
|
4603
|
+
}, fs = C.div`
|
|
4584
4604
|
display: flex;
|
|
4585
4605
|
flex-direction: column;
|
|
4586
4606
|
row-gap: ${({
|
|
4587
4607
|
theme: e
|
|
4588
4608
|
}) => e.aiChat.body.gapBetweenMessages};
|
|
4589
4609
|
`;
|
|
4590
|
-
function
|
|
4610
|
+
function xs({
|
|
4591
4611
|
visible: e,
|
|
4592
4612
|
onSend: t
|
|
4593
4613
|
}) {
|
|
4594
|
-
const [r, a] = R(!1), i = j((
|
|
4595
|
-
a(!0), t(
|
|
4614
|
+
const [r, a] = R(!1), i = j((n) => {
|
|
4615
|
+
a(!0), t(n === "up" ? 1 : -1);
|
|
4596
4616
|
}, [t]);
|
|
4597
4617
|
return e ? /* @__PURE__ */ v("div", {
|
|
4598
4618
|
className: `csdk-flex csdk-items-center ${`csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${r ? "csdk-opacity-0" : "csdk-opacity-100"}`}`,
|
|
4599
|
-
children: [/* @__PURE__ */
|
|
4619
|
+
children: [/* @__PURE__ */ l(ms, {
|
|
4600
4620
|
onClick: () => i("up"),
|
|
4601
4621
|
disabled: r
|
|
4602
|
-
}), /* @__PURE__ */
|
|
4622
|
+
}), /* @__PURE__ */ l(gs, {
|
|
4603
4623
|
onClick: () => i("down"),
|
|
4604
4624
|
disabled: r
|
|
4605
4625
|
})]
|
|
@@ -4612,65 +4632,65 @@ function mt({
|
|
|
4612
4632
|
buttonVisibility: a = "onHover",
|
|
4613
4633
|
renderContent: i
|
|
4614
4634
|
}) {
|
|
4615
|
-
const
|
|
4616
|
-
|
|
4635
|
+
const n = ie(), s = $a(j((x) => {
|
|
4636
|
+
n && n.ai.sendFeedback({
|
|
4617
4637
|
sourceId: e,
|
|
4618
4638
|
type: r,
|
|
4619
4639
|
data: t,
|
|
4620
4640
|
rating: x
|
|
4621
4641
|
});
|
|
4622
|
-
}, [
|
|
4642
|
+
}, [n, e, t, r]), 200), [p, d] = bs(), g = $(() => a === "onHover" ? d : a !== "never", [d, a]), {
|
|
4623
4643
|
themeSettings: b
|
|
4624
|
-
} =
|
|
4625
|
-
return /* @__PURE__ */
|
|
4644
|
+
} = D();
|
|
4645
|
+
return /* @__PURE__ */ l(fs, {
|
|
4626
4646
|
ref: p,
|
|
4627
4647
|
theme: b,
|
|
4628
|
-
children: i(/* @__PURE__ */
|
|
4648
|
+
children: i(/* @__PURE__ */ l(xs, {
|
|
4629
4649
|
onSend: s,
|
|
4630
4650
|
visible: g
|
|
4631
4651
|
}))
|
|
4632
4652
|
});
|
|
4633
4653
|
}
|
|
4634
|
-
const
|
|
4654
|
+
const ks = 18 * 5;
|
|
4635
4655
|
function jt({
|
|
4636
4656
|
text: e
|
|
4637
4657
|
}) {
|
|
4638
4658
|
const [t, r] = R(!0), [a, i] = R(!1), {
|
|
4639
|
-
t:
|
|
4640
|
-
} = E(), s =
|
|
4659
|
+
t: n
|
|
4660
|
+
} = E(), s = ue(null);
|
|
4641
4661
|
return He(() => {
|
|
4642
|
-
s.current && s.current.scrollHeight >
|
|
4662
|
+
s.current && s.current.scrollHeight > ks && i(!0);
|
|
4643
4663
|
}, [e]), /* @__PURE__ */ v("div", {
|
|
4644
|
-
children: [/* @__PURE__ */
|
|
4664
|
+
children: [/* @__PURE__ */ l("div", {
|
|
4645
4665
|
ref: s,
|
|
4646
4666
|
className: `${t ? "csdk-line-clamp-5" : ""} csdk-whitespace-pre-wrap`,
|
|
4647
4667
|
children: e
|
|
4648
|
-
}), a && /* @__PURE__ */
|
|
4668
|
+
}), a && /* @__PURE__ */ l("div", {
|
|
4649
4669
|
className: "csdk-mt-3 csdk-flex csdk-justify-end",
|
|
4650
|
-
children: /* @__PURE__ */
|
|
4670
|
+
children: /* @__PURE__ */ l("div", {
|
|
4651
4671
|
className: "csdk-text-ai-xs csdk-text-text-link csdk-cursor-pointer",
|
|
4652
4672
|
onClick: () => r((p) => !p),
|
|
4653
|
-
children:
|
|
4673
|
+
children: n(t ? "ai.buttons.readMore" : "ai.buttons.collapse")
|
|
4654
4674
|
})
|
|
4655
4675
|
})]
|
|
4656
4676
|
});
|
|
4657
4677
|
}
|
|
4658
|
-
function
|
|
4678
|
+
function ys({
|
|
4659
4679
|
nlgRequest: e
|
|
4660
4680
|
}) {
|
|
4661
4681
|
const {
|
|
4662
4682
|
data: t,
|
|
4663
4683
|
isLoading: r,
|
|
4664
4684
|
isError: a
|
|
4665
|
-
} =
|
|
4685
|
+
} = It(e), {
|
|
4666
4686
|
t: i
|
|
4667
4687
|
} = E();
|
|
4668
|
-
return r ? /* @__PURE__ */
|
|
4688
|
+
return r ? /* @__PURE__ */ l(At, {}) : a ? /* @__PURE__ */ l(ce, {
|
|
4669
4689
|
align: "left",
|
|
4670
4690
|
children: i("ai.errors.unexpected")
|
|
4671
|
-
}) : /* @__PURE__ */
|
|
4691
|
+
}) : /* @__PURE__ */ l(ce, {
|
|
4672
4692
|
align: "full",
|
|
4673
|
-
children: /* @__PURE__ */
|
|
4693
|
+
children: /* @__PURE__ */ l(jt, {
|
|
4674
4694
|
text: t ?? i("ai.errors.insightsNotAvailable")
|
|
4675
4695
|
})
|
|
4676
4696
|
});
|
|
@@ -4679,8 +4699,8 @@ const ar = C.div`
|
|
|
4679
4699
|
display: flex;
|
|
4680
4700
|
align-items: center;
|
|
4681
4701
|
column-gap: 10px;
|
|
4682
|
-
`,
|
|
4683
|
-
function
|
|
4702
|
+
`, ws = (e) => !!e && "aeiou".includes(e[0]);
|
|
4703
|
+
function Cs({
|
|
4684
4704
|
data: e,
|
|
4685
4705
|
alwaysShowFeedback: t
|
|
4686
4706
|
}) {
|
|
@@ -4689,17 +4709,17 @@ function fs({
|
|
|
4689
4709
|
enableInsights: a
|
|
4690
4710
|
} = oe(), {
|
|
4691
4711
|
themeSettings: i
|
|
4692
|
-
} =
|
|
4693
|
-
queryTitle:
|
|
4712
|
+
} = D(), {
|
|
4713
|
+
queryTitle: n,
|
|
4694
4714
|
chartRecommendations: s,
|
|
4695
4715
|
jaql: p,
|
|
4696
4716
|
userMsg: d,
|
|
4697
4717
|
clarification: g = ""
|
|
4698
4718
|
} = e;
|
|
4699
|
-
console.debug(`JAQL for ${
|
|
4719
|
+
console.debug(`JAQL for ${n}`, p), console.debug(`chart recommendations for ${n}`, s);
|
|
4700
4720
|
const b = "chartType" in s ? s.chartType : "table";
|
|
4701
4721
|
let x;
|
|
4702
|
-
|
|
4722
|
+
ws(b) ? x = `an ${b}` : x = `a ${b}`, b !== "table" && (x += " chart");
|
|
4703
4723
|
const o = p.datasource.title, [u, c] = R(!1), m = j(() => {
|
|
4704
4724
|
c((w) => !w);
|
|
4705
4725
|
}, []), h = {
|
|
@@ -4710,75 +4730,75 @@ function fs({
|
|
|
4710
4730
|
}, k = r === "analyze", _ = `${d}${d && g ? `
|
|
4711
4731
|
` : ""}${g}`;
|
|
4712
4732
|
return /* @__PURE__ */ v(Y, {
|
|
4713
|
-
children: [/* @__PURE__ */
|
|
4733
|
+
children: [/* @__PURE__ */ l(mt, {
|
|
4714
4734
|
sourceId: o,
|
|
4715
4735
|
data: e,
|
|
4716
4736
|
type: "chats/nlq",
|
|
4717
4737
|
buttonVisibility: t ? "always" : "onHover",
|
|
4718
4738
|
renderContent: (w) => /* @__PURE__ */ v(Y, {
|
|
4719
4739
|
children: [/* @__PURE__ */ v(ar, {
|
|
4720
|
-
children: [/* @__PURE__ */
|
|
4740
|
+
children: [/* @__PURE__ */ l(aa, {
|
|
4721
4741
|
align: "left",
|
|
4722
4742
|
theme: i,
|
|
4723
|
-
children: _ || `Here's ${x} showing ${
|
|
4743
|
+
children: _ || `Here's ${x} showing ${Yl(n)}.`
|
|
4724
4744
|
}), w]
|
|
4725
|
-
}), k && /* @__PURE__ */
|
|
4745
|
+
}), k && /* @__PURE__ */ l(ps, {
|
|
4726
4746
|
content: e
|
|
4727
4747
|
})]
|
|
4728
4748
|
})
|
|
4729
|
-
}), a && /* @__PURE__ */
|
|
4749
|
+
}), a && /* @__PURE__ */ l(mt, {
|
|
4730
4750
|
sourceId: o,
|
|
4731
4751
|
data: h,
|
|
4732
4752
|
type: "nlg/queryResult",
|
|
4733
4753
|
buttonVisibility: u ? "onHover" : "never",
|
|
4734
4754
|
renderContent: (w) => /* @__PURE__ */ v(Y, {
|
|
4735
4755
|
children: [/* @__PURE__ */ v(ar, {
|
|
4736
|
-
children: [/* @__PURE__ */
|
|
4756
|
+
children: [/* @__PURE__ */ l(Ql, {
|
|
4737
4757
|
onClick: m
|
|
4738
4758
|
}), w]
|
|
4739
|
-
}), u && /* @__PURE__ */
|
|
4759
|
+
}), u && /* @__PURE__ */ l(ys, {
|
|
4740
4760
|
nlgRequest: h
|
|
4741
4761
|
})]
|
|
4742
4762
|
})
|
|
4743
4763
|
})]
|
|
4744
4764
|
});
|
|
4745
4765
|
}
|
|
4746
|
-
function
|
|
4766
|
+
function _s({
|
|
4747
4767
|
message: e,
|
|
4748
4768
|
isLastMessage: t
|
|
4749
4769
|
}) {
|
|
4750
4770
|
if (Rr(e)) {
|
|
4751
4771
|
const a = JSON.parse(e.content);
|
|
4752
|
-
return /* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ l(Cs, {
|
|
4753
4773
|
data: a,
|
|
4754
4774
|
alwaysShowFeedback: t
|
|
4755
4775
|
});
|
|
4756
4776
|
}
|
|
4757
|
-
const r =
|
|
4758
|
-
return /* @__PURE__ */
|
|
4777
|
+
const r = rn(e) ? JSON.parse(e.content).answer : e.content;
|
|
4778
|
+
return /* @__PURE__ */ l(ce, {
|
|
4759
4779
|
align: e.role === "user" ? "right" : "left",
|
|
4760
4780
|
children: r
|
|
4761
4781
|
});
|
|
4762
4782
|
}
|
|
4763
|
-
const
|
|
4783
|
+
const vs = cr(_s), Ss = ({
|
|
4764
4784
|
error: e,
|
|
4765
4785
|
displayMessage: t
|
|
4766
|
-
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */
|
|
4786
|
+
}) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ l(ce, {
|
|
4767
4787
|
align: "left",
|
|
4768
4788
|
children: t
|
|
4769
4789
|
}));
|
|
4770
|
-
function
|
|
4790
|
+
function Ms({
|
|
4771
4791
|
messages: e
|
|
4772
4792
|
}) {
|
|
4773
4793
|
const {
|
|
4774
4794
|
t
|
|
4775
4795
|
} = E();
|
|
4776
|
-
return /* @__PURE__ */
|
|
4777
|
-
children: e.map((r, a) => /* @__PURE__ */
|
|
4778
|
-
fallbackRender: (i) =>
|
|
4796
|
+
return /* @__PURE__ */ l(Y, {
|
|
4797
|
+
children: e.map((r, a) => /* @__PURE__ */ l(Ha, {
|
|
4798
|
+
fallbackRender: (i) => Ss(T(S({}, i), {
|
|
4779
4799
|
displayMessage: t("ai.errors.unexpected")
|
|
4780
4800
|
})),
|
|
4781
|
-
children: /* @__PURE__ */
|
|
4801
|
+
children: /* @__PURE__ */ l(vs, {
|
|
4782
4802
|
message: r,
|
|
4783
4803
|
isLastMessage: a === e.length - 1
|
|
4784
4804
|
}, a)
|
|
@@ -4788,42 +4808,42 @@ function ws({
|
|
|
4788
4808
|
function la({
|
|
4789
4809
|
color: e
|
|
4790
4810
|
}) {
|
|
4791
|
-
return /* @__PURE__ */
|
|
4811
|
+
return /* @__PURE__ */ l("svg", {
|
|
4792
4812
|
width: "100%",
|
|
4793
4813
|
height: "100%",
|
|
4794
4814
|
viewBox: "0 0 4 8",
|
|
4795
4815
|
fill: "none",
|
|
4796
4816
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4797
|
-
children: /* @__PURE__ */
|
|
4817
|
+
children: /* @__PURE__ */ l("path", {
|
|
4798
4818
|
d: "M3.87815 0.825307C4.05781 0.615598 4.03345 0.299954 3.82374 0.120297C3.61403 -0.05936 3.29838 -0.034998 3.11873 0.174711L0.120288 3.67471C-0.040096 3.86192 -0.040096 4.1381 0.120288 4.32531L3.11873 7.82531C3.29838 8.03502 3.61403 8.05938 3.82374 7.87972C4.03345 7.70006 4.05781 7.38442 3.87815 7.17471L1.15839 4.00001L3.87815 0.825307Z",
|
|
4799
4819
|
fill: e
|
|
4800
4820
|
})
|
|
4801
4821
|
});
|
|
4802
4822
|
}
|
|
4803
|
-
function
|
|
4823
|
+
function Is({
|
|
4804
4824
|
onClick: e,
|
|
4805
4825
|
color: t
|
|
4806
4826
|
}) {
|
|
4807
|
-
return /* @__PURE__ */
|
|
4827
|
+
return /* @__PURE__ */ l("div", {
|
|
4808
4828
|
"aria-label": "go back",
|
|
4809
4829
|
className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
|
|
4810
4830
|
onClick: e,
|
|
4811
|
-
children: /* @__PURE__ */
|
|
4831
|
+
children: /* @__PURE__ */ l(la, {
|
|
4812
4832
|
color: t
|
|
4813
4833
|
})
|
|
4814
4834
|
});
|
|
4815
4835
|
}
|
|
4816
|
-
function
|
|
4836
|
+
function Ds() {
|
|
4817
4837
|
const {
|
|
4818
4838
|
themeSettings: e
|
|
4819
|
-
} =
|
|
4820
|
-
return /* @__PURE__ */
|
|
4839
|
+
} = D();
|
|
4840
|
+
return /* @__PURE__ */ l("svg", {
|
|
4821
4841
|
width: "24",
|
|
4822
4842
|
height: "24",
|
|
4823
4843
|
viewBox: "0 0 24 24",
|
|
4824
4844
|
fill: "none",
|
|
4825
4845
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4826
|
-
children: /* @__PURE__ */
|
|
4846
|
+
children: /* @__PURE__ */ l("path", {
|
|
4827
4847
|
fillRule: "evenodd",
|
|
4828
4848
|
clipRule: "evenodd",
|
|
4829
4849
|
d: "M15.1747 9.1203L12 11.8401L8.82529 9.1203C8.61558 8.94064 8.29994 8.965 8.12028 9.17471C7.94062 9.38442 7.96498 9.70006 8.17469 9.87972L11.6747 12.8782C11.8619 13.0385 12.1381 13.0385 12.3253 12.8782L15.8253 9.87972C16.035 9.70006 16.0594 9.38442 15.8797 9.17471C15.7 8.965 15.3844 8.94064 15.1747 9.1203ZM15.8797 12.1731C15.7 11.9634 15.3844 11.9391 15.1747 12.1187L12 14.8385L8.82529 12.1187C8.61558 11.9391 8.29994 11.9634 8.12028 12.1731C7.94062 12.3829 7.96498 12.6985 8.17469 12.8782L11.6747 15.8766C11.8619 16.037 12.1381 16.037 12.3253 15.8766L15.8253 12.8782C16.035 12.6985 16.0594 12.3829 15.8797 12.1731Z",
|
|
@@ -4831,10 +4851,10 @@ function _s() {
|
|
|
4831
4851
|
})
|
|
4832
4852
|
});
|
|
4833
4853
|
}
|
|
4834
|
-
const
|
|
4854
|
+
const As = (e, t) => {
|
|
4835
4855
|
const r = new Sa(e);
|
|
4836
4856
|
return r.alpha = t, r;
|
|
4837
|
-
},
|
|
4857
|
+
}, Ls = C.div`
|
|
4838
4858
|
font-size: inherit;
|
|
4839
4859
|
line-height: inherit;
|
|
4840
4860
|
padding-left: 8px;
|
|
@@ -4844,7 +4864,7 @@ const vs = (e, t) => {
|
|
|
4844
4864
|
margin-bottom: 4px;
|
|
4845
4865
|
box-shadow: ${({
|
|
4846
4866
|
theme: e
|
|
4847
|
-
}) => `0 4px 8px 0 ${
|
|
4867
|
+
}) => `0 4px 8px 0 ${As(e.aiChat.primaryTextColor, 0.2)}`};
|
|
4848
4868
|
cursor: pointer;
|
|
4849
4869
|
color: ${({
|
|
4850
4870
|
theme: e
|
|
@@ -4861,32 +4881,32 @@ const vs = (e, t) => {
|
|
|
4861
4881
|
theme: e
|
|
4862
4882
|
}) => e.aiChat.clickableMessages.hover.backgroundColor};
|
|
4863
4883
|
box-shadow: none;
|
|
4864
|
-
`,
|
|
4884
|
+
`, Ts = ({
|
|
4865
4885
|
onClick: e
|
|
4866
4886
|
}) => {
|
|
4867
4887
|
const {
|
|
4868
4888
|
themeSettings: t
|
|
4869
|
-
} =
|
|
4870
|
-
return /* @__PURE__ */
|
|
4889
|
+
} = D();
|
|
4890
|
+
return /* @__PURE__ */ l(Ls, {
|
|
4871
4891
|
theme: t,
|
|
4872
4892
|
onClick: e,
|
|
4873
|
-
children: /* @__PURE__ */
|
|
4893
|
+
children: /* @__PURE__ */ l(Ds, {})
|
|
4874
4894
|
});
|
|
4875
|
-
},
|
|
4895
|
+
}, Ns = ({
|
|
4876
4896
|
isVisible: e,
|
|
4877
4897
|
onClick: t,
|
|
4878
4898
|
anchorElement: r
|
|
4879
|
-
}) => /* @__PURE__ */
|
|
4899
|
+
}) => /* @__PURE__ */ l(ur, {
|
|
4880
4900
|
anchorEl: r,
|
|
4881
4901
|
open: e,
|
|
4882
4902
|
placement: "top",
|
|
4883
4903
|
sx: {
|
|
4884
4904
|
zIndex: 2
|
|
4885
4905
|
},
|
|
4886
|
-
children: /* @__PURE__ */
|
|
4906
|
+
children: /* @__PURE__ */ l(Ts, {
|
|
4887
4907
|
onClick: t
|
|
4888
4908
|
})
|
|
4889
|
-
}),
|
|
4909
|
+
}), js = C.button`
|
|
4890
4910
|
font-size: inherit;
|
|
4891
4911
|
line-height: inherit;
|
|
4892
4912
|
box-sizing: border-box;
|
|
@@ -4961,14 +4981,14 @@ function ir({
|
|
|
4961
4981
|
}) {
|
|
4962
4982
|
const {
|
|
4963
4983
|
themeSettings: r
|
|
4964
|
-
} =
|
|
4965
|
-
return /* @__PURE__ */
|
|
4984
|
+
} = D();
|
|
4985
|
+
return /* @__PURE__ */ l(js, {
|
|
4966
4986
|
onClick: t,
|
|
4967
4987
|
theme: r,
|
|
4968
4988
|
children: e
|
|
4969
4989
|
});
|
|
4970
4990
|
}
|
|
4971
|
-
const
|
|
4991
|
+
const Os = C.div`
|
|
4972
4992
|
display: flex;
|
|
4973
4993
|
flex-direction: column;
|
|
4974
4994
|
align-items: flex-start;
|
|
@@ -4976,28 +4996,28 @@ const As = C.div`
|
|
|
4976
4996
|
theme: e
|
|
4977
4997
|
}) => e.aiChat.suggestions.gap};
|
|
4978
4998
|
`;
|
|
4979
|
-
function
|
|
4999
|
+
function Es({
|
|
4980
5000
|
questions: e,
|
|
4981
5001
|
onSelection: t
|
|
4982
5002
|
}) {
|
|
4983
5003
|
const {
|
|
4984
5004
|
t: r
|
|
4985
|
-
} = E(), [a, i] = R(!0),
|
|
5005
|
+
} = E(), [a, i] = R(!0), n = $(() => a && e.length > 5 ? e.slice(0, 4) : e, [e, a]), {
|
|
4986
5006
|
themeSettings: s
|
|
4987
|
-
} =
|
|
4988
|
-
return /* @__PURE__ */ v(
|
|
5007
|
+
} = D();
|
|
5008
|
+
return /* @__PURE__ */ v(Os, {
|
|
4989
5009
|
"aria-label": "list of suggested questions",
|
|
4990
5010
|
theme: s,
|
|
4991
|
-
children: [
|
|
5011
|
+
children: [n.map((p) => /* @__PURE__ */ l(ir, {
|
|
4992
5012
|
question: p,
|
|
4993
5013
|
onClick: () => t(p)
|
|
4994
|
-
}, p)),
|
|
5014
|
+
}, p)), n.length < e.length && /* @__PURE__ */ l(ir, {
|
|
4995
5015
|
question: r("ai.buttons.seeMore"),
|
|
4996
5016
|
onClick: () => i(!1)
|
|
4997
5017
|
})]
|
|
4998
5018
|
});
|
|
4999
5019
|
}
|
|
5000
|
-
const
|
|
5020
|
+
const zs = C.div`
|
|
5001
5021
|
width: 283px;
|
|
5002
5022
|
height: 32px;
|
|
5003
5023
|
border-radius: 10px;
|
|
@@ -5023,24 +5043,24 @@ const Ts = C.div`
|
|
|
5023
5043
|
background-position: -200% 0;
|
|
5024
5044
|
}
|
|
5025
5045
|
}
|
|
5026
|
-
`,
|
|
5046
|
+
`, Rs = C.div`
|
|
5027
5047
|
display: flex;
|
|
5028
5048
|
flex-direction: column;
|
|
5029
5049
|
row-gap: 1rem;
|
|
5030
5050
|
`;
|
|
5031
|
-
function
|
|
5051
|
+
function Zs() {
|
|
5032
5052
|
const {
|
|
5033
5053
|
themeSettings: e
|
|
5034
|
-
} =
|
|
5035
|
-
return /* @__PURE__ */
|
|
5054
|
+
} = D();
|
|
5055
|
+
return /* @__PURE__ */ l(Rs, {
|
|
5036
5056
|
children: Array.from({
|
|
5037
5057
|
length: 3
|
|
5038
|
-
}, (t, r) => /* @__PURE__ */
|
|
5058
|
+
}, (t, r) => /* @__PURE__ */ l(zs, {
|
|
5039
5059
|
theme: e
|
|
5040
5060
|
}, r))
|
|
5041
5061
|
});
|
|
5042
5062
|
}
|
|
5043
|
-
function
|
|
5063
|
+
function Ws({
|
|
5044
5064
|
questions: e,
|
|
5045
5065
|
isLoading: t,
|
|
5046
5066
|
onSelection: r
|
|
@@ -5048,17 +5068,17 @@ function Os({
|
|
|
5048
5068
|
const a = e.length > 0, {
|
|
5049
5069
|
suggestionsWelcomeText: i
|
|
5050
5070
|
} = oe();
|
|
5051
|
-
return t ? /* @__PURE__ */
|
|
5052
|
-
children: [i && /* @__PURE__ */
|
|
5071
|
+
return t ? /* @__PURE__ */ l(Zs, {}) : a ? /* @__PURE__ */ v(Y, {
|
|
5072
|
+
children: [i && /* @__PURE__ */ l(ce, {
|
|
5053
5073
|
align: "left",
|
|
5054
5074
|
children: i
|
|
5055
|
-
}), /* @__PURE__ */
|
|
5075
|
+
}), /* @__PURE__ */ l(Es, {
|
|
5056
5076
|
onSelection: r,
|
|
5057
5077
|
questions: e
|
|
5058
5078
|
})]
|
|
5059
5079
|
}) : null;
|
|
5060
5080
|
}
|
|
5061
|
-
const
|
|
5081
|
+
const Ps = C.div`
|
|
5062
5082
|
display: flex;
|
|
5063
5083
|
flex-direction: column;
|
|
5064
5084
|
row-gap: ${({
|
|
@@ -5079,7 +5099,7 @@ const Es = C.div`
|
|
|
5079
5099
|
}) => e.aiChat.body.paddingBottom};
|
|
5080
5100
|
flex: initial;
|
|
5081
5101
|
height: 100%;
|
|
5082
|
-
`,
|
|
5102
|
+
`, qs = C.div`
|
|
5083
5103
|
padding-left: ${({
|
|
5084
5104
|
theme: e
|
|
5085
5105
|
}) => e.aiChat.footer.paddingLeft};
|
|
@@ -5095,19 +5115,19 @@ const Es = C.div`
|
|
|
5095
5115
|
display: flex;
|
|
5096
5116
|
flex-direction: column;
|
|
5097
5117
|
row-gap: 6px;
|
|
5098
|
-
`,
|
|
5118
|
+
`, Gs = C.div`
|
|
5099
5119
|
display: flex;
|
|
5100
5120
|
flex-direction: column;
|
|
5101
5121
|
row-gap: ${({
|
|
5102
5122
|
theme: e
|
|
5103
5123
|
}) => e.aiChat.suggestions.gap};
|
|
5104
5124
|
`;
|
|
5105
|
-
function
|
|
5125
|
+
function $s({
|
|
5106
5126
|
contextTitle: e,
|
|
5107
5127
|
onGoBack: t,
|
|
5108
5128
|
contextDetails: r
|
|
5109
5129
|
}) {
|
|
5110
|
-
var a, i,
|
|
5130
|
+
var a, i, n;
|
|
5111
5131
|
const {
|
|
5112
5132
|
t: s
|
|
5113
5133
|
} = E(), {
|
|
@@ -5118,28 +5138,28 @@ function Zs({
|
|
|
5118
5138
|
customPrompt: x
|
|
5119
5139
|
} = oe(), {
|
|
5120
5140
|
themeSettings: o
|
|
5121
|
-
} =
|
|
5141
|
+
} = D(), {
|
|
5122
5142
|
data: u,
|
|
5123
5143
|
isLoading: c,
|
|
5124
5144
|
isError: m
|
|
5125
|
-
} =
|
|
5145
|
+
} = Bo({
|
|
5126
5146
|
contextTitle: e,
|
|
5127
5147
|
count: b,
|
|
5128
5148
|
customPrompt: x
|
|
5129
|
-
}), h =
|
|
5149
|
+
}), h = $(() => u == null ? void 0 : u.map((N) => N.nlqPrompt), [u]), {
|
|
5130
5150
|
history: k,
|
|
5131
5151
|
lastNlqResponse: _,
|
|
5132
5152
|
isAwaitingResponse: w,
|
|
5133
|
-
sendMessage:
|
|
5153
|
+
sendMessage: I,
|
|
5134
5154
|
isLoading: A,
|
|
5135
5155
|
chatId: M,
|
|
5136
5156
|
lastError: L
|
|
5137
|
-
} =
|
|
5157
|
+
} = an(e, r), {
|
|
5138
5158
|
mutate: Z,
|
|
5139
5159
|
isLoading: ge
|
|
5140
|
-
} = zr(M), [F,
|
|
5160
|
+
} = zr(M), [F, H] = R(!1), [U, V] = R(!1), B = () => H(!0), J = () => H(!1), X = () => {
|
|
5141
5161
|
Z(), J();
|
|
5142
|
-
}, z =
|
|
5162
|
+
}, z = ue(null), W = ue(null), Q = () => {
|
|
5143
5163
|
if (!(z != null && z.current))
|
|
5144
5164
|
return;
|
|
5145
5165
|
const {
|
|
@@ -5155,25 +5175,25 @@ function Zs({
|
|
|
5155
5175
|
He(() => {
|
|
5156
5176
|
z.current && (z.current.scrollTop = z.current.scrollHeight);
|
|
5157
5177
|
}, [k, F, w]);
|
|
5158
|
-
const
|
|
5159
|
-
ref:
|
|
5178
|
+
const de = ue(null), he = d ? /* @__PURE__ */ l(Wr, {
|
|
5179
|
+
ref: de,
|
|
5160
5180
|
title: e,
|
|
5161
|
-
leftNav: t && /* @__PURE__ */
|
|
5181
|
+
leftNav: t && /* @__PURE__ */ l(Is, {
|
|
5162
5182
|
onClick: t,
|
|
5163
5183
|
color: o.aiChat.header.textColor
|
|
5164
5184
|
}),
|
|
5165
5185
|
style: o.aiChat.header
|
|
5166
|
-
}) : null, we =
|
|
5186
|
+
}) : null, we = $(() => [...new Set(k.filter((N) => N.role === "user").filter((N) => !(h != null && h.includes(N.content))).map((N) => N.content).reverse())].slice(0, g), [k, g, h]);
|
|
5167
5187
|
return (L == null ? void 0 : L.message) === s("ai.errors.chatUnavailable") ? /* @__PURE__ */ v(Y, {
|
|
5168
|
-
children: [d && he, /* @__PURE__ */
|
|
5188
|
+
children: [d && he, /* @__PURE__ */ l(Zr, {
|
|
5169
5189
|
text: L.message
|
|
5170
5190
|
})]
|
|
5171
5191
|
}) : /* @__PURE__ */ v(Y, {
|
|
5172
|
-
children: [he, /* @__PURE__ */ v(
|
|
5192
|
+
children: [he, /* @__PURE__ */ v(Ps, {
|
|
5173
5193
|
ref: z,
|
|
5174
5194
|
theme: o,
|
|
5175
5195
|
onScroll: Q,
|
|
5176
|
-
children: [/* @__PURE__ */
|
|
5196
|
+
children: [/* @__PURE__ */ l(Ns, {
|
|
5177
5197
|
isVisible: U,
|
|
5178
5198
|
anchorElement: W.current,
|
|
5179
5199
|
onClick: () => {
|
|
@@ -5183,50 +5203,50 @@ function Zs({
|
|
|
5183
5203
|
behavior: "smooth"
|
|
5184
5204
|
});
|
|
5185
5205
|
}
|
|
5186
|
-
}), /* @__PURE__ */
|
|
5206
|
+
}), /* @__PURE__ */ l(Gl, {}), /* @__PURE__ */ l(Ws, {
|
|
5187
5207
|
questions: h || [],
|
|
5188
5208
|
isLoading: c,
|
|
5189
|
-
onSelection:
|
|
5190
|
-
}), L && /* @__PURE__ */
|
|
5209
|
+
onSelection: I
|
|
5210
|
+
}), L && /* @__PURE__ */ l(ce, {
|
|
5191
5211
|
align: "left",
|
|
5192
5212
|
children: L.message
|
|
5193
|
-
}), A ? /* @__PURE__ */
|
|
5213
|
+
}), A ? /* @__PURE__ */ l(Xe, {}) : /* @__PURE__ */ l(Ms, {
|
|
5194
5214
|
messages: k
|
|
5195
|
-
}), p && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */
|
|
5215
|
+
}), p && _ && ((i = (a = _.followupQuestions) == null ? void 0 : a.length) != null ? i : 0) > 0 && /* @__PURE__ */ l(Gs, {
|
|
5196
5216
|
theme: o,
|
|
5197
|
-
children: (
|
|
5217
|
+
children: (n = _.followupQuestions) == null ? void 0 : n.slice(0, 2).map((N, K) => /* @__PURE__ */ l(Qe, {
|
|
5198
5218
|
align: "left",
|
|
5199
5219
|
onClick: () => {
|
|
5200
|
-
|
|
5220
|
+
I(N);
|
|
5201
5221
|
},
|
|
5202
|
-
children: /* @__PURE__ */
|
|
5222
|
+
children: /* @__PURE__ */ l("div", {
|
|
5203
5223
|
className: "csdk-py-[7px] csdk-px-4",
|
|
5204
5224
|
children: N
|
|
5205
5225
|
})
|
|
5206
5226
|
}, K))
|
|
5207
|
-
}), (w || ge) && /* @__PURE__ */
|
|
5227
|
+
}), (w || ge) && /* @__PURE__ */ l(At, {}), F && /* @__PURE__ */ l(Bl, {
|
|
5208
5228
|
onCancel: J,
|
|
5209
5229
|
onConfirm: X
|
|
5210
5230
|
})]
|
|
5211
|
-
}), /* @__PURE__ */ v(
|
|
5231
|
+
}), /* @__PURE__ */ v(qs, {
|
|
5212
5232
|
ref: W,
|
|
5213
5233
|
theme: o,
|
|
5214
|
-
children: [/* @__PURE__ */
|
|
5215
|
-
onSendMessage:
|
|
5234
|
+
children: [/* @__PURE__ */ l(Dn, {
|
|
5235
|
+
onSendMessage: I,
|
|
5216
5236
|
disabled: w || A,
|
|
5217
|
-
onClearHistoryClick:
|
|
5237
|
+
onClearHistoryClick: B,
|
|
5218
5238
|
suggestions: h || [],
|
|
5219
5239
|
recentPrompts: we,
|
|
5220
5240
|
isLoading: c || A,
|
|
5221
5241
|
recommendationsError: m,
|
|
5222
5242
|
onChange: J
|
|
5223
|
-
}), /* @__PURE__ */
|
|
5243
|
+
}), /* @__PURE__ */ l(un, {
|
|
5224
5244
|
theme: o
|
|
5225
5245
|
})]
|
|
5226
5246
|
})]
|
|
5227
5247
|
});
|
|
5228
5248
|
}
|
|
5229
|
-
const
|
|
5249
|
+
const Hs = C.button`
|
|
5230
5250
|
font-family: ${({
|
|
5231
5251
|
theme: e
|
|
5232
5252
|
}) => e.typography.fontFamily};
|
|
@@ -5243,14 +5263,14 @@ const Ws = C.button`
|
|
|
5243
5263
|
background-color: ${({
|
|
5244
5264
|
theme: e
|
|
5245
5265
|
}) => e.aiChat.dataTopics.items.backgroundColor};
|
|
5246
|
-
`,
|
|
5266
|
+
`, Bs = C.div`
|
|
5247
5267
|
font-size: 1.05rem;
|
|
5248
5268
|
line-height: 28px;
|
|
5249
5269
|
|
|
5250
5270
|
color: ${({
|
|
5251
5271
|
theme: e
|
|
5252
5272
|
}) => e.aiChat.dataTopics.items.textColor};
|
|
5253
|
-
`,
|
|
5273
|
+
`, Ys = C.div`
|
|
5254
5274
|
font-size: ${({
|
|
5255
5275
|
theme: e
|
|
5256
5276
|
}) => e.aiChat.primaryFontSize[0]};
|
|
@@ -5261,44 +5281,44 @@ const Ws = C.button`
|
|
|
5261
5281
|
color: ${({
|
|
5262
5282
|
theme: e
|
|
5263
5283
|
}) => dr(e.aiChat.dataTopics.items.textColor, 0, 0.5)};
|
|
5264
|
-
`,
|
|
5284
|
+
`, Us = C.div`
|
|
5265
5285
|
width: 16px;
|
|
5266
5286
|
height: 16px;
|
|
5267
5287
|
transform: rotate(180deg);
|
|
5268
5288
|
`;
|
|
5269
|
-
function
|
|
5289
|
+
function Qs(e) {
|
|
5270
5290
|
const {
|
|
5271
5291
|
title: t,
|
|
5272
5292
|
description: r,
|
|
5273
5293
|
onClick: a
|
|
5274
5294
|
} = e, {
|
|
5275
5295
|
themeSettings: i
|
|
5276
|
-
} =
|
|
5277
|
-
return /* @__PURE__ */ v(
|
|
5296
|
+
} = D();
|
|
5297
|
+
return /* @__PURE__ */ v(Hs, {
|
|
5278
5298
|
onClick: a,
|
|
5279
5299
|
theme: i,
|
|
5280
5300
|
children: [/* @__PURE__ */ v("div", {
|
|
5281
|
-
children: [/* @__PURE__ */
|
|
5301
|
+
children: [/* @__PURE__ */ l(Bs, {
|
|
5282
5302
|
theme: i,
|
|
5283
5303
|
children: t
|
|
5284
|
-
}), /* @__PURE__ */
|
|
5304
|
+
}), /* @__PURE__ */ l(Ys, {
|
|
5285
5305
|
theme: i,
|
|
5286
5306
|
children: r
|
|
5287
5307
|
})]
|
|
5288
|
-
}), /* @__PURE__ */
|
|
5289
|
-
children: /* @__PURE__ */
|
|
5308
|
+
}), /* @__PURE__ */ l(Us, {
|
|
5309
|
+
children: /* @__PURE__ */ l(la, {
|
|
5290
5310
|
color: i.aiChat.icons.color
|
|
5291
5311
|
})
|
|
5292
5312
|
})]
|
|
5293
5313
|
});
|
|
5294
5314
|
}
|
|
5295
|
-
const
|
|
5315
|
+
const Fs = C.div`
|
|
5296
5316
|
padding: 20px;
|
|
5297
5317
|
display: flex;
|
|
5298
5318
|
flex-direction: column;
|
|
5299
5319
|
gap: 20px;
|
|
5300
5320
|
overflow: auto;
|
|
5301
|
-
`,
|
|
5321
|
+
`, Vs = C.div`
|
|
5302
5322
|
font-size: 24px;
|
|
5303
5323
|
line-height: 32px;
|
|
5304
5324
|
font-weight: 600;
|
|
@@ -5308,7 +5328,7 @@ const Hs = C.div`
|
|
|
5308
5328
|
color: ${({
|
|
5309
5329
|
theme: e
|
|
5310
5330
|
}) => e.aiChat.primaryTextColor};
|
|
5311
|
-
`,
|
|
5331
|
+
`, Js = C.div`
|
|
5312
5332
|
font-size: 15px;
|
|
5313
5333
|
line-height: 22px;
|
|
5314
5334
|
|
|
@@ -5316,92 +5336,92 @@ const Hs = C.div`
|
|
|
5316
5336
|
theme: e
|
|
5317
5337
|
}) => e.aiChat.primaryTextColor};
|
|
5318
5338
|
`;
|
|
5319
|
-
function
|
|
5339
|
+
function Xs(e) {
|
|
5320
5340
|
const {
|
|
5321
5341
|
dataTopics: t
|
|
5322
5342
|
} = e, {
|
|
5323
5343
|
themeSettings: r
|
|
5324
|
-
} =
|
|
5344
|
+
} = D(), {
|
|
5325
5345
|
t: a
|
|
5326
5346
|
} = E();
|
|
5327
|
-
return /* @__PURE__ */ v(
|
|
5328
|
-
children: [/* @__PURE__ */
|
|
5347
|
+
return /* @__PURE__ */ v(Fs, {
|
|
5348
|
+
children: [/* @__PURE__ */ l(Vs, {
|
|
5329
5349
|
theme: r,
|
|
5330
5350
|
children: a("ai.dataTopics")
|
|
5331
|
-
}), /* @__PURE__ */ v(
|
|
5351
|
+
}), /* @__PURE__ */ v(Js, {
|
|
5332
5352
|
theme: r,
|
|
5333
|
-
children: [a("ai.chatbotDescription"), /* @__PURE__ */
|
|
5334
|
-
}), t.map((i) => /* @__PURE__ */ Ba(
|
|
5353
|
+
children: [a("ai.chatbotDescription"), /* @__PURE__ */ l("br", {}), /* @__PURE__ */ l("br", {}), a("ai.topicSelectPrompt")]
|
|
5354
|
+
}), t.map((i) => /* @__PURE__ */ Ba(Qs, T(S({}, i), {
|
|
5335
5355
|
key: i.title
|
|
5336
5356
|
})))]
|
|
5337
5357
|
});
|
|
5338
5358
|
}
|
|
5339
|
-
const
|
|
5340
|
-
function
|
|
5359
|
+
const Ks = "#000000", ec = "#FFFFFF";
|
|
5360
|
+
function tc({
|
|
5341
5361
|
isDarkBackground: e = !1
|
|
5342
5362
|
}) {
|
|
5343
|
-
const t = e ?
|
|
5363
|
+
const t = e ? ec : Ks;
|
|
5344
5364
|
return /* @__PURE__ */ v("svg", {
|
|
5345
5365
|
width: "32",
|
|
5346
5366
|
height: "32",
|
|
5347
5367
|
viewBox: "0 0 500 504",
|
|
5348
5368
|
fill: "none",
|
|
5349
5369
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5350
|
-
children: [/* @__PURE__ */
|
|
5370
|
+
children: [/* @__PURE__ */ l("path", {
|
|
5351
5371
|
d: "M365.111 69.5654C350.571 69.5654 338.747 81.3237 338.747 95.7826C338.747 110.241 350.571 122 365.111 122C379.651 122 391.476 110.241 391.476 95.7826C391.476 81.3237 379.651 69.5654 365.111 69.5654Z",
|
|
5352
5372
|
fill: t
|
|
5353
|
-
}), /* @__PURE__ */
|
|
5373
|
+
}), /* @__PURE__ */ l("path", {
|
|
5354
5374
|
d: "M135.365 147.679C120.824 147.679 109 159.437 109 173.896C109 188.355 120.824 200.113 135.365 200.113C149.905 200.113 161.715 188.355 161.715 173.896C161.715 159.437 149.891 147.679 135.365 147.679Z",
|
|
5355
5375
|
fill: t
|
|
5356
|
-
}), /* @__PURE__ */
|
|
5376
|
+
}), /* @__PURE__ */ l("path", {
|
|
5357
5377
|
d: "M135.365 225.789C120.824 225.789 109 237.547 109 252.006C109 266.465 120.824 278.21 135.365 278.21C149.905 278.21 161.715 266.451 161.715 252.006C161.715 237.561 149.891 225.789 135.365 225.789Z",
|
|
5358
5378
|
fill: t
|
|
5359
|
-
}), /* @__PURE__ */
|
|
5379
|
+
}), /* @__PURE__ */ l("path", {
|
|
5360
5380
|
d: "M364.401 225.789C349.861 225.789 338.037 237.547 338.037 252.006C338.037 266.465 349.861 278.21 364.401 278.21C378.941 278.21 390.766 266.451 390.766 252.006C390.766 237.561 378.941 225.789 364.401 225.789Z",
|
|
5361
5381
|
fill: t
|
|
5362
|
-
}), /* @__PURE__ */
|
|
5382
|
+
}), /* @__PURE__ */ l("path", {
|
|
5363
5383
|
d: "M365.111 303.899C350.571 303.899 338.747 315.658 338.747 330.117C338.747 344.575 350.571 356.334 365.111 356.334C379.651 356.334 391.476 344.575 391.476 330.117C391.476 315.658 379.651 303.899 365.111 303.899Z",
|
|
5364
5384
|
fill: t
|
|
5365
|
-
}), /* @__PURE__ */
|
|
5385
|
+
}), /* @__PURE__ */ l("path", {
|
|
5366
5386
|
d: "M135.365 382.013C120.824 382.013 109 393.771 109 408.23C109 422.689 120.824 434.447 135.365 434.447C149.905 434.447 161.715 422.689 161.715 408.23C161.715 393.771 149.891 382.013 135.365 382.013Z",
|
|
5367
5387
|
fill: t
|
|
5368
|
-
}), /* @__PURE__ */
|
|
5388
|
+
}), /* @__PURE__ */ l("path", {
|
|
5369
5389
|
d: "M289.516 142.11C271.898 142.11 257.567 156.362 257.567 173.895C257.567 191.429 271.898 205.666 289.516 205.666C307.135 205.666 321.466 191.415 321.466 173.895C321.466 156.375 307.135 142.11 289.516 142.11Z",
|
|
5370
5390
|
fill: t
|
|
5371
|
-
}), /* @__PURE__ */
|
|
5391
|
+
}), /* @__PURE__ */ l("path", {
|
|
5372
5392
|
d: "M210.96 142.11C193.342 142.11 179.01 156.362 179.01 173.895C179.01 191.429 193.342 205.666 210.96 205.666C228.578 205.666 242.909 191.415 242.909 173.895C242.909 156.375 228.578 142.11 210.96 142.11Z",
|
|
5373
5393
|
fill: t
|
|
5374
|
-
}), /* @__PURE__ */
|
|
5394
|
+
}), /* @__PURE__ */ l("path", {
|
|
5375
5395
|
d: "M289.516 220.224C271.898 220.224 257.567 234.475 257.567 252.008C257.567 269.542 271.898 283.779 289.516 283.779C307.135 283.779 321.466 269.528 321.466 252.008C321.466 234.489 307.135 220.224 289.516 220.224Z",
|
|
5376
5396
|
fill: t
|
|
5377
|
-
}), /* @__PURE__ */
|
|
5397
|
+
}), /* @__PURE__ */ l("path", {
|
|
5378
5398
|
d: "M210.96 220.224C193.342 220.224 179.01 234.475 179.01 252.008C179.01 269.542 193.342 283.779 210.96 283.779C228.578 283.779 242.909 269.528 242.909 252.008C242.909 234.489 228.578 220.224 210.96 220.224Z",
|
|
5379
5399
|
fill: t
|
|
5380
|
-
}), /* @__PURE__ */
|
|
5400
|
+
}), /* @__PURE__ */ l("path", {
|
|
5381
5401
|
d: "M289.516 298.334C271.898 298.334 257.567 312.585 257.567 330.105C257.567 347.624 271.898 361.889 289.516 361.889C307.135 361.889 321.466 347.638 321.466 330.105C321.466 312.571 307.135 298.334 289.516 298.334Z",
|
|
5382
5402
|
fill: t
|
|
5383
|
-
}), /* @__PURE__ */
|
|
5403
|
+
}), /* @__PURE__ */ l("path", {
|
|
5384
5404
|
d: "M210.96 298.334C193.342 298.334 179.01 312.585 179.01 330.105C179.01 347.624 193.342 361.889 210.96 361.889C228.578 361.889 242.909 347.638 242.909 330.105C242.909 312.571 228.578 298.334 210.96 298.334Z",
|
|
5385
5405
|
fill: t
|
|
5386
|
-
}), /* @__PURE__ */
|
|
5406
|
+
}), /* @__PURE__ */ l("path", {
|
|
5387
5407
|
d: "M289.516 64C271.898 64 257.567 78.2512 257.567 95.7847C257.567 113.318 271.898 127.555 289.516 127.555C307.135 127.555 321.466 113.304 321.466 95.7847C321.466 78.265 307.135 64 289.516 64Z",
|
|
5388
5408
|
fill: t
|
|
5389
|
-
}), /* @__PURE__ */
|
|
5409
|
+
}), /* @__PURE__ */ l("path", {
|
|
5390
5410
|
d: "M210.96 64C193.342 64 179.01 78.2512 179.01 95.7847C179.01 113.318 193.342 127.555 210.96 127.555C228.578 127.555 242.909 113.304 242.909 95.7847C242.909 78.265 228.578 64 210.96 64Z",
|
|
5391
5411
|
fill: t
|
|
5392
|
-
}), /* @__PURE__ */
|
|
5412
|
+
}), /* @__PURE__ */ l("path", {
|
|
5393
5413
|
d: "M289.516 376.442C271.898 376.442 257.567 390.694 257.567 408.213C257.567 425.733 271.898 439.998 289.516 439.998C307.135 439.998 321.466 425.747 321.466 408.213C321.466 390.68 307.135 376.442 289.516 376.442Z",
|
|
5394
5414
|
fill: t
|
|
5395
|
-
}), /* @__PURE__ */
|
|
5415
|
+
}), /* @__PURE__ */ l("path", {
|
|
5396
5416
|
d: "M210.96 376.442C193.342 376.442 179.01 390.694 179.01 408.213C179.01 425.733 193.342 439.998 210.96 439.998C228.578 439.998 242.909 425.747 242.909 408.213C242.909 390.68 228.578 376.442 210.96 376.442Z",
|
|
5397
5417
|
fill: t
|
|
5398
5418
|
})]
|
|
5399
5419
|
});
|
|
5400
5420
|
}
|
|
5401
|
-
const
|
|
5421
|
+
const rc = C.div`
|
|
5402
5422
|
margin-left: 14px;
|
|
5403
5423
|
margin-top: 3px;
|
|
5404
|
-
`,
|
|
5424
|
+
`, ac = C.div`
|
|
5405
5425
|
display: flex;
|
|
5406
5426
|
flex-direction: column;
|
|
5407
5427
|
justify-content: top;
|
|
@@ -5412,7 +5432,7 @@ const Js = C.div`
|
|
|
5412
5432
|
theme: e
|
|
5413
5433
|
}) => e.aiChat.dataTopics.backgroundColor};
|
|
5414
5434
|
`;
|
|
5415
|
-
function
|
|
5435
|
+
function ic({
|
|
5416
5436
|
dataTopicsList: e,
|
|
5417
5437
|
onDataTopicClick: t
|
|
5418
5438
|
}) {
|
|
@@ -5420,65 +5440,65 @@ function Ks({
|
|
|
5420
5440
|
enableHeader: r
|
|
5421
5441
|
} = oe(), {
|
|
5422
5442
|
themeSettings: a
|
|
5423
|
-
} =
|
|
5443
|
+
} = D(), {
|
|
5424
5444
|
t: i
|
|
5425
|
-
} = E(),
|
|
5445
|
+
} = E(), n = $(() => e == null ? void 0 : e.map((p) => ({
|
|
5426
5446
|
title: p,
|
|
5427
5447
|
onClick: () => t(p)
|
|
5428
5448
|
})), [e, t]), s = za(Ra(a.aiChat.header.backgroundColor)) > 0.5;
|
|
5429
5449
|
return /* @__PURE__ */ v(Y, {
|
|
5430
|
-
children: [r ? /* @__PURE__ */
|
|
5450
|
+
children: [r ? /* @__PURE__ */ l(Wr, {
|
|
5431
5451
|
title: i("ai.analyticsChatbot"),
|
|
5432
|
-
leftNav: /* @__PURE__ */
|
|
5433
|
-
children: /* @__PURE__ */
|
|
5452
|
+
leftNav: /* @__PURE__ */ l(rc, {
|
|
5453
|
+
children: /* @__PURE__ */ l(tc, {
|
|
5434
5454
|
isDarkBackground: s
|
|
5435
5455
|
})
|
|
5436
5456
|
}),
|
|
5437
5457
|
style: a.aiChat.header
|
|
5438
|
-
}) : null, /* @__PURE__ */ v(
|
|
5458
|
+
}) : null, /* @__PURE__ */ v(ac, {
|
|
5439
5459
|
theme: a,
|
|
5440
|
-
children: [!
|
|
5441
|
-
dataTopics:
|
|
5460
|
+
children: [!n && /* @__PURE__ */ l(Xe, {}), n && /* @__PURE__ */ l(Xs, {
|
|
5461
|
+
dataTopics: n
|
|
5442
5462
|
})]
|
|
5443
5463
|
})]
|
|
5444
5464
|
});
|
|
5445
5465
|
}
|
|
5446
|
-
function
|
|
5466
|
+
function oc() {
|
|
5447
5467
|
const [e, t] = R(), [r, a] = R(), {
|
|
5448
5468
|
data: i,
|
|
5449
|
-
fetchStatus:
|
|
5450
|
-
} =
|
|
5469
|
+
fetchStatus: n
|
|
5470
|
+
} = Fo(), {
|
|
5451
5471
|
dataTopicsList: s,
|
|
5452
5472
|
contextDetails: p
|
|
5453
5473
|
} = oe(), {
|
|
5454
5474
|
t: d
|
|
5455
5475
|
} = E(), g = d("ai.errors.noAvailableDataTopics"), b = j((c) => {
|
|
5456
5476
|
c.length ? c.length === 1 && (a(void 0), t(c[0])) : a(g);
|
|
5457
|
-
}, [g]), x =
|
|
5458
|
-
if (i &&
|
|
5477
|
+
}, [g]), x = $(() => {
|
|
5478
|
+
if (i && n === "idle") {
|
|
5459
5479
|
const c = (s != null && s.length ? i == null ? void 0 : i.filter((m) => s == null ? void 0 : s.includes(m.title)) : i).map((m) => m.title);
|
|
5460
5480
|
return b(c), c;
|
|
5461
5481
|
}
|
|
5462
5482
|
return [];
|
|
5463
|
-
}, [i,
|
|
5483
|
+
}, [i, n, s, b]), o = je(), u = j(() => {
|
|
5464
5484
|
a(void 0), o.invalidateQueries(["getDataTopics"]);
|
|
5465
5485
|
}, [o]);
|
|
5466
|
-
return r ? /* @__PURE__ */
|
|
5486
|
+
return r ? /* @__PURE__ */ l(Zr, {
|
|
5467
5487
|
text: r,
|
|
5468
5488
|
action: {
|
|
5469
5489
|
text: d("ai.buttons.refresh"),
|
|
5470
5490
|
onClick: u
|
|
5471
5491
|
}
|
|
5472
|
-
}) : x.length === 1 && !e ? /* @__PURE__ */
|
|
5492
|
+
}) : x.length === 1 && !e ? /* @__PURE__ */ l(Xe, {}) : e ? /* @__PURE__ */ l($s, {
|
|
5473
5493
|
contextTitle: e,
|
|
5474
5494
|
contextDetails: p,
|
|
5475
5495
|
onGoBack: x.length === 1 ? void 0 : () => t(void 0)
|
|
5476
|
-
}) : /* @__PURE__ */
|
|
5496
|
+
}) : /* @__PURE__ */ l(ic, {
|
|
5477
5497
|
dataTopicsList: x,
|
|
5478
5498
|
onDataTopicClick: (c) => t(c)
|
|
5479
5499
|
});
|
|
5480
5500
|
}
|
|
5481
|
-
const
|
|
5501
|
+
const nc = pr({
|
|
5482
5502
|
componentName: "Chatbot"
|
|
5483
5503
|
})((e) => {
|
|
5484
5504
|
const {
|
|
@@ -5487,38 +5507,38 @@ const tc = pr({
|
|
|
5487
5507
|
config: a
|
|
5488
5508
|
} = e, {
|
|
5489
5509
|
themeSettings: i
|
|
5490
|
-
} =
|
|
5491
|
-
return /* @__PURE__ */
|
|
5510
|
+
} = D();
|
|
5511
|
+
return /* @__PURE__ */ l(Yo, {
|
|
5492
5512
|
value: a ?? {},
|
|
5493
|
-
children: /* @__PURE__ */
|
|
5513
|
+
children: /* @__PURE__ */ l(cn, {
|
|
5494
5514
|
id: "csdk-chatbot-frame",
|
|
5495
5515
|
width: t,
|
|
5496
5516
|
height: r,
|
|
5497
5517
|
theme: i,
|
|
5498
5518
|
tabIndex: 0,
|
|
5499
|
-
children: /* @__PURE__ */
|
|
5519
|
+
children: /* @__PURE__ */ l(oc, {})
|
|
5500
5520
|
})
|
|
5501
5521
|
});
|
|
5502
|
-
}),
|
|
5522
|
+
}), lc = pr({
|
|
5503
5523
|
componentName: "GetNlgInsights"
|
|
5504
5524
|
})(function(e) {
|
|
5505
5525
|
const {
|
|
5506
5526
|
data: t,
|
|
5507
5527
|
isLoading: r,
|
|
5508
5528
|
isError: a
|
|
5509
|
-
} =
|
|
5529
|
+
} = It(e), {
|
|
5510
5530
|
t: i
|
|
5511
5531
|
} = E();
|
|
5512
5532
|
if (a)
|
|
5513
|
-
return /* @__PURE__ */
|
|
5533
|
+
return /* @__PURE__ */ l(Y, {
|
|
5514
5534
|
children: i("ai.errors.unexpected")
|
|
5515
5535
|
});
|
|
5516
|
-
const
|
|
5517
|
-
return /* @__PURE__ */
|
|
5518
|
-
text: r ? "Loading..." :
|
|
5536
|
+
const n = t ?? i("ai.errors.insightsNotAvailable");
|
|
5537
|
+
return /* @__PURE__ */ l(jt, {
|
|
5538
|
+
text: r ? "Loading..." : n
|
|
5519
5539
|
});
|
|
5520
5540
|
});
|
|
5521
|
-
function
|
|
5541
|
+
function sc({
|
|
5522
5542
|
theme: e
|
|
5523
5543
|
}) {
|
|
5524
5544
|
const t = e.general.brandColor;
|
|
@@ -5528,17 +5548,17 @@ function ac({
|
|
|
5528
5548
|
height: "24",
|
|
5529
5549
|
viewBox: "-2 -3 24 24",
|
|
5530
5550
|
fill: "none",
|
|
5531
|
-
children: [/* @__PURE__ */
|
|
5551
|
+
children: [/* @__PURE__ */ l("path", {
|
|
5532
5552
|
fillRule: "evenodd",
|
|
5533
5553
|
clipRule: "evenodd",
|
|
5534
5554
|
d: "M12.0533 3.62671e-06C12.0557 -9.45649e-05 12.0577 0.00181346 12.0578 0.00422597C12.1926 3.98958 15.4422 7.18501 19.4491 7.23273C19.4494 7.23273 19.4496 7.23296 19.4496 7.23325C19.4496 7.23356 19.4494 7.23381 19.4491 7.23382C15.3869 7.2822 12.1029 10.5659 12.054 14.628C12.054 14.6283 12.0538 14.6285 12.0535 14.6285C12.0532 14.6285 12.0529 14.6283 12.0529 14.628C12.0047 10.6218 8.80995 7.37281 4.8253 7.23765C4.82287 7.23757 4.82095 7.23552 4.82105 7.2331C4.82114 7.23081 4.82301 7.22897 4.8253 7.2289C8.75488 7.0956 11.9163 3.93392 12.0491 0.004224C12.0492 0.00194873 12.051 9.62326e-05 12.0533 3.62671e-06Z",
|
|
5535
5555
|
fill: t
|
|
5536
|
-
}), /* @__PURE__ */
|
|
5556
|
+
}), /* @__PURE__ */ l("path", {
|
|
5537
5557
|
fillRule: "evenodd",
|
|
5538
5558
|
clipRule: "evenodd",
|
|
5539
5559
|
d: "M9.0973 12.7759C7.1172 12.7236 5.51984 11.1352 5.45331 9.1587C5.45326 9.1573 5.45209 9.1562 5.4507 9.15625C5.44938 9.1563 5.44832 9.15738 5.44828 9.15869C5.38204 11.1266 3.79825 12.7098 1.83009 12.7751C1.82969 12.7752 1.82936 12.7755 1.82935 12.7759C1.82933 12.7763 1.82967 12.7767 1.83009 12.7767C3.8264 12.8429 5.42727 14.4708 5.45019 16.4778C5.45019 16.4781 5.45045 16.4784 5.45077 16.4784C5.45111 16.4784 5.4514 16.4781 5.4514 16.4778C5.47442 14.4622 7.089 12.8289 9.0973 12.7759Z",
|
|
5540
5560
|
fill: t
|
|
5541
|
-
}), /* @__PURE__ */
|
|
5561
|
+
}), /* @__PURE__ */ l("path", {
|
|
5542
5562
|
fillRule: "evenodd",
|
|
5543
5563
|
clipRule: "evenodd",
|
|
5544
5564
|
d: "M2.8778 2.15728C2.87779 2.15701 2.8779 2.15674 2.8781 2.15655C2.87874 2.15591 2.87983 2.15638 2.87981 2.15728C2.87934 2.17566 2.87911 2.1941 2.87911 2.21259C2.87911 3.36434 3.78842 4.30371 4.92829 4.35195C3.78842 4.40019 2.87911 5.33955 2.87911 6.4913C2.87911 6.56284 2.88262 6.63356 2.88947 6.7033C2.89045 6.7133 2.8783 6.71912 2.87119 6.71202C2.86894 6.70976 2.86781 6.70662 2.86813 6.70344C2.87499 6.63366 2.8785 6.56289 2.8785 6.4913C2.8785 5.33956 1.96921 4.40021 0.829346 4.35195C1.96921 4.30369 2.8785 3.36433 2.8785 2.21259C2.8785 2.1941 2.87827 2.17566 2.8778 2.15728ZM5.16566 4.35485C5.16834 4.35503 5.16981 4.35179 5.16791 4.34989C5.16732 4.3493 5.1665 4.34899 5.16567 4.34905C5.14802 4.35023 5.13031 4.3512 5.11255 4.35195C5.13031 4.3527 5.14801 4.35367 5.16566 4.35485Z",
|
|
@@ -5546,7 +5566,7 @@ function ac({
|
|
|
5546
5566
|
})]
|
|
5547
5567
|
});
|
|
5548
5568
|
}
|
|
5549
|
-
const
|
|
5569
|
+
const cc = C.div`
|
|
5550
5570
|
display: flex;
|
|
5551
5571
|
flex-direction: row;
|
|
5552
5572
|
align-items: center;
|
|
@@ -5559,33 +5579,33 @@ const ic = C.div`
|
|
|
5559
5579
|
background-color: ${({
|
|
5560
5580
|
theme: e
|
|
5561
5581
|
}) => e.chart.backgroundColor};
|
|
5562
|
-
`,
|
|
5582
|
+
`, dc = C.div`
|
|
5563
5583
|
align-self: flex-start;
|
|
5564
|
-
`,
|
|
5584
|
+
`, pc = ({
|
|
5565
5585
|
summary: e,
|
|
5566
5586
|
nlgRequest: t
|
|
5567
5587
|
}) => {
|
|
5568
5588
|
const {
|
|
5569
5589
|
themeSettings: r
|
|
5570
|
-
} =
|
|
5571
|
-
return /* @__PURE__ */
|
|
5590
|
+
} = D();
|
|
5591
|
+
return /* @__PURE__ */ l(mt, {
|
|
5572
5592
|
sourceId: t.jaql.datasource.title,
|
|
5573
5593
|
data: t,
|
|
5574
5594
|
type: "chart/insights",
|
|
5575
5595
|
buttonVisibility: "always",
|
|
5576
|
-
renderContent: (a) => /* @__PURE__ */ v(
|
|
5596
|
+
renderContent: (a) => /* @__PURE__ */ v(cc, {
|
|
5577
5597
|
theme: r,
|
|
5578
|
-
children: [/* @__PURE__ */
|
|
5598
|
+
children: [/* @__PURE__ */ l(dc, {
|
|
5579
5599
|
theme: r,
|
|
5580
|
-
children: /* @__PURE__ */
|
|
5600
|
+
children: /* @__PURE__ */ l(sc, {
|
|
5581
5601
|
theme: r
|
|
5582
5602
|
})
|
|
5583
|
-
}), /* @__PURE__ */
|
|
5603
|
+
}), /* @__PURE__ */ l(jt, {
|
|
5584
5604
|
text: e
|
|
5585
5605
|
}), a]
|
|
5586
5606
|
})
|
|
5587
5607
|
});
|
|
5588
|
-
},
|
|
5608
|
+
}, uc = (e, t) => e.nlqResponse.timestamp === t.nlqResponse.timestamp;
|
|
5589
5609
|
cr(function({
|
|
5590
5610
|
nlqResponse: e,
|
|
5591
5611
|
onDataReady: t,
|
|
@@ -5593,16 +5613,16 @@ cr(function({
|
|
|
5593
5613
|
widgetProps: a,
|
|
5594
5614
|
filters: i = []
|
|
5595
5615
|
}) {
|
|
5596
|
-
const
|
|
5616
|
+
const n = e.timestamp, s = $(
|
|
5597
5617
|
() => T(S({}, e), {
|
|
5598
5618
|
queryTitle: Ma(e.queryTitle)
|
|
5599
5619
|
}),
|
|
5600
5620
|
// Memoize based on timestamp to prevent unnecessary recomputations
|
|
5601
5621
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5602
|
-
[
|
|
5622
|
+
[n]
|
|
5603
5623
|
), {
|
|
5604
5624
|
connectToWidgetProps: p
|
|
5605
|
-
} =
|
|
5625
|
+
} = Ia({
|
|
5606
5626
|
initialFilters: i
|
|
5607
5627
|
}), [d, g] = R(null);
|
|
5608
5628
|
ye(() => {
|
|
@@ -5612,7 +5632,7 @@ cr(function({
|
|
|
5612
5632
|
if (!m)
|
|
5613
5633
|
g(null);
|
|
5614
5634
|
else {
|
|
5615
|
-
r && m.styleOptions && (m.styleOptions =
|
|
5635
|
+
r && m.styleOptions && (m.styleOptions = Ie(m.styleOptions, r));
|
|
5616
5636
|
const h = p(m, {
|
|
5617
5637
|
shouldAffectFilters: !1,
|
|
5618
5638
|
applyMode: "filter"
|
|
@@ -5620,8 +5640,8 @@ cr(function({
|
|
|
5620
5640
|
g(h);
|
|
5621
5641
|
}
|
|
5622
5642
|
}, [s, p, r]);
|
|
5623
|
-
const b =
|
|
5624
|
-
const m = d && $e(d) ?
|
|
5643
|
+
const b = $(() => {
|
|
5644
|
+
const m = d && $e(d) ? Da(d == null ? void 0 : d.filters) : [], h = s.jaql.metadata.filter((k) => !k.jaql.filter).concat(m.filter((k) => !k.config.disabled).map((k) => k.jaql()));
|
|
5625
5645
|
return T(S({}, s), {
|
|
5626
5646
|
jaql: T(S({}, s.jaql), {
|
|
5627
5647
|
metadata: h
|
|
@@ -5632,24 +5652,24 @@ cr(function({
|
|
|
5632
5652
|
data: x,
|
|
5633
5653
|
isLoading: o,
|
|
5634
5654
|
isError: u
|
|
5635
|
-
} =
|
|
5655
|
+
} = It(b);
|
|
5636
5656
|
if (o || !d)
|
|
5637
|
-
return /* @__PURE__ */
|
|
5657
|
+
return /* @__PURE__ */ l(At, {});
|
|
5638
5658
|
if (!$e(d))
|
|
5639
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ l(Y, {});
|
|
5640
5660
|
const c = a || T(S({}, d), {
|
|
5641
5661
|
styleOptions: r,
|
|
5642
5662
|
onDataReady: t
|
|
5643
5663
|
});
|
|
5644
|
-
return /* @__PURE__ */
|
|
5664
|
+
return /* @__PURE__ */ l(De, T(S({}, c), {
|
|
5645
5665
|
highlightSelectionDisabled: !0,
|
|
5646
|
-
topSlot: x && !u && /* @__PURE__ */
|
|
5666
|
+
topSlot: x && !u && /* @__PURE__ */ l(pc, {
|
|
5647
5667
|
nlgRequest: b,
|
|
5648
5668
|
summary: x
|
|
5649
5669
|
})
|
|
5650
5670
|
}));
|
|
5651
|
-
},
|
|
5652
|
-
const
|
|
5671
|
+
}, uc);
|
|
5672
|
+
const gc = new or({
|
|
5653
5673
|
defaultOptions: {
|
|
5654
5674
|
queries: {
|
|
5655
5675
|
refetchOnWindowFocus: !1,
|
|
@@ -5657,15 +5677,15 @@ const sc = new or({
|
|
|
5657
5677
|
}
|
|
5658
5678
|
}
|
|
5659
5679
|
});
|
|
5660
|
-
function
|
|
5680
|
+
function hc({
|
|
5661
5681
|
children: e,
|
|
5662
5682
|
context: t
|
|
5663
5683
|
}) {
|
|
5664
|
-
return /* @__PURE__ */
|
|
5665
|
-
children: /* @__PURE__ */
|
|
5684
|
+
return /* @__PURE__ */ l(Ro, {
|
|
5685
|
+
children: /* @__PURE__ */ l(Nr.Provider, {
|
|
5666
5686
|
value: t == null ? void 0 : t.api,
|
|
5667
|
-
children: /* @__PURE__ */
|
|
5668
|
-
client:
|
|
5687
|
+
children: /* @__PURE__ */ l(ja, {
|
|
5688
|
+
client: gc,
|
|
5669
5689
|
children: e
|
|
5670
5690
|
})
|
|
5671
5691
|
})
|
|
@@ -5688,7 +5708,7 @@ const sa = {
|
|
|
5688
5708
|
ca,
|
|
5689
5709
|
() => kr(sa),
|
|
5690
5710
|
!0
|
|
5691
|
-
),
|
|
5711
|
+
), xc = Ct({
|
|
5692
5712
|
props: {
|
|
5693
5713
|
/**
|
|
5694
5714
|
* {@inheritDoc @sisense/sdk-ui!AiContextProviderProps.volatile}
|
|
@@ -5700,13 +5720,13 @@ const sa = {
|
|
|
5700
5720
|
return i && (a.value = {
|
|
5701
5721
|
api: new Ut(i.httpClient, e.volatile)
|
|
5702
5722
|
}), yr(async () => {
|
|
5703
|
-
const { app:
|
|
5704
|
-
|
|
5705
|
-
api: new Ut(
|
|
5723
|
+
const { app: n } = r.value;
|
|
5724
|
+
n && (a.value = {
|
|
5725
|
+
api: new Ut(n.httpClient, e.volatile)
|
|
5706
5726
|
});
|
|
5707
5727
|
}), ki(ca, a), () => {
|
|
5708
|
-
var
|
|
5709
|
-
return (
|
|
5728
|
+
var n;
|
|
5729
|
+
return (n = t.default) == null ? void 0 : n.call(t);
|
|
5710
5730
|
};
|
|
5711
5731
|
}
|
|
5712
5732
|
}), da = () => {
|
|
@@ -5719,9 +5739,9 @@ const sa = {
|
|
|
5719
5739
|
});
|
|
5720
5740
|
}), {
|
|
5721
5741
|
propsObserver: t,
|
|
5722
|
-
providerComponent:
|
|
5742
|
+
providerComponent: hc
|
|
5723
5743
|
};
|
|
5724
|
-
},
|
|
5744
|
+
}, kc = Ct({
|
|
5725
5745
|
props: {
|
|
5726
5746
|
/**
|
|
5727
5747
|
* {@inheritDoc @sisense/sdk-ui!ChatbotProps.width}
|
|
@@ -5736,11 +5756,11 @@ const sa = {
|
|
|
5736
5756
|
*/
|
|
5737
5757
|
config: Object
|
|
5738
5758
|
},
|
|
5739
|
-
setup: (e) => fr(
|
|
5759
|
+
setup: (e) => fr(nc, e, [
|
|
5740
5760
|
...xr(),
|
|
5741
5761
|
da()
|
|
5742
5762
|
])
|
|
5743
|
-
}),
|
|
5763
|
+
}), yc = Ct({
|
|
5744
5764
|
props: {
|
|
5745
5765
|
/**
|
|
5746
5766
|
* {@inheritDoc @sisense/sdk-ui!GetNlgInsightsProps.dataSource}
|
|
@@ -5766,11 +5786,11 @@ const sa = {
|
|
|
5766
5786
|
*/
|
|
5767
5787
|
verbosity: String
|
|
5768
5788
|
},
|
|
5769
|
-
setup: (e) => fr(
|
|
5789
|
+
setup: (e) => fr(lc, e, [
|
|
5770
5790
|
...xr(),
|
|
5771
5791
|
da()
|
|
5772
5792
|
])
|
|
5773
|
-
}),
|
|
5793
|
+
}), wc = (e) => {
|
|
5774
5794
|
xt("useGetNlgInsights");
|
|
5775
5795
|
const [t, r] = kt(wt, {
|
|
5776
5796
|
isLoading: !0,
|
|
@@ -5797,14 +5817,14 @@ const sa = {
|
|
|
5797
5817
|
},
|
|
5798
5818
|
{ immediate: !0 }
|
|
5799
5819
|
);
|
|
5800
|
-
const
|
|
5820
|
+
const n = () => {
|
|
5801
5821
|
a.value.api && i(a.value.api);
|
|
5802
5822
|
};
|
|
5803
5823
|
return {
|
|
5804
5824
|
...vt(t.value),
|
|
5805
|
-
refetch:
|
|
5825
|
+
refetch: n
|
|
5806
5826
|
};
|
|
5807
|
-
},
|
|
5827
|
+
}, Cc = (e) => {
|
|
5808
5828
|
xt("useGetQueryRecommendations");
|
|
5809
5829
|
const [t, r] = kt(wt, {
|
|
5810
5830
|
isLoading: !0,
|
|
@@ -5821,7 +5841,7 @@ const sa = {
|
|
|
5821
5841
|
...b ? { userPrompt: b } : void 0
|
|
5822
5842
|
})), u = (o == null ? void 0 : o.map((c) => ({
|
|
5823
5843
|
...c,
|
|
5824
|
-
widgetProps:
|
|
5844
|
+
widgetProps: Dr.toWidgetProps(c, {
|
|
5825
5845
|
useCustomizedStyleOptions: g
|
|
5826
5846
|
})
|
|
5827
5847
|
}))) || [];
|
|
@@ -5838,14 +5858,14 @@ const sa = {
|
|
|
5838
5858
|
},
|
|
5839
5859
|
{ immediate: !0 }
|
|
5840
5860
|
);
|
|
5841
|
-
const
|
|
5861
|
+
const n = () => {
|
|
5842
5862
|
a.value.api && i(a.value.api);
|
|
5843
5863
|
};
|
|
5844
5864
|
return {
|
|
5845
5865
|
...vt(t.value),
|
|
5846
|
-
refetch:
|
|
5866
|
+
refetch: n
|
|
5847
5867
|
};
|
|
5848
|
-
},
|
|
5868
|
+
}, _c = (e) => {
|
|
5849
5869
|
xt("useGetNlqResult");
|
|
5850
5870
|
const [t, r] = kt(wt, {
|
|
5851
5871
|
isLoading: !0,
|
|
@@ -5857,7 +5877,7 @@ const sa = {
|
|
|
5857
5877
|
}), a = et(), i = async (s) => {
|
|
5858
5878
|
try {
|
|
5859
5879
|
r({ type: "loading" });
|
|
5860
|
-
const p = xe(e), { enableAxisTitlesInWidgetProps: d } = p, { contextTitle: g, request: b } =
|
|
5880
|
+
const p = xe(e), { enableAxisTitlesInWidgetProps: d } = p, { contextTitle: g, request: b } = Ho(p), x = await (s == null ? void 0 : s.ai.getNlqResult(g, b)), o = x ? Dr.toWidgetProps(x, {
|
|
5861
5881
|
useCustomizedStyleOptions: d || !1
|
|
5862
5882
|
}) : void 0;
|
|
5863
5883
|
r({ type: "success", data: o });
|
|
@@ -5873,19 +5893,19 @@ const sa = {
|
|
|
5873
5893
|
},
|
|
5874
5894
|
{ immediate: !0 }
|
|
5875
5895
|
);
|
|
5876
|
-
const
|
|
5896
|
+
const n = () => {
|
|
5877
5897
|
a.value.api && i(a.value.api);
|
|
5878
5898
|
};
|
|
5879
5899
|
return {
|
|
5880
5900
|
...vt(t.value),
|
|
5881
|
-
refetch:
|
|
5901
|
+
refetch: n
|
|
5882
5902
|
};
|
|
5883
5903
|
};
|
|
5884
5904
|
export {
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5905
|
+
xc as AiContextProvider,
|
|
5906
|
+
kc as Chatbot,
|
|
5907
|
+
yc as GetNlgInsights,
|
|
5908
|
+
wc as useGetNlgInsights,
|
|
5909
|
+
_c as useGetNlqResult,
|
|
5910
|
+
Cc as useGetQueryRecommendations
|
|
5891
5911
|
};
|