@embeddable.com/remarkable-pro 0.1.4 → 0.1.6
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/BarChartDefaultHorizontalPro.js +4 -4
- package/dist/BarChartDefaultPro.js +4 -4
- package/dist/BarChartGroupedHorizontalPro.js +4 -4
- package/dist/BarChartGroupedPro.js +4 -4
- package/dist/BarChartStackedHorizontalPro.js +4 -4
- package/dist/BarChartStackedPro.js +4 -4
- package/dist/{ChartCard-Be7mHyBp.js → ChartCard-BE_Kz3jK.js} +3 -3
- package/dist/{ChartCard-Be7mHyBp.js.map → ChartCard-BE_Kz3jK.js.map} +1 -1
- package/dist/{ChartGranularitySelectField-D-H0yKZH.js → ChartGranularitySelectField-C4oTWMDg.js} +3 -3
- package/dist/{ChartGranularitySelectField-D-H0yKZH.js.map → ChartGranularitySelectField-C4oTWMDg.js.map} +1 -1
- package/dist/{Color.type.emb-CGyFSpIN.js → Color.type.emb-DIW_7wKP.js} +215 -223
- package/dist/{Color.type.emb-CGyFSpIN.js.map → Color.type.emb-DIW_7wKP.js.map} +1 -1
- package/dist/ColorEditor.js +1 -1
- package/dist/ComparisonPeriodSelectFieldPro.js +3 -3
- package/dist/DateRangePickerCustomPro.js +4 -4
- package/dist/DateRangeSelectFieldPro.js +3 -3
- package/dist/{DimensionAndMeasureSingleSelectField-BOWAqIok.js → DimensionAndMeasureSingleSelectField-Brm3ckSN.js} +3 -3
- package/dist/{DimensionAndMeasureSingleSelectField-BOWAqIok.js.map → DimensionAndMeasureSingleSelectField-Brm3ckSN.js.map} +1 -1
- package/dist/DimensionSingleSelectFieldPro.js +5 -5
- package/dist/DonutChartPro.js +4 -4
- package/dist/DonutLabelChartPro.js +4 -4
- package/dist/{EditorCard-C8PKNLWT.js → EditorCard-bUK0G4W-.js} +3 -3
- package/dist/{EditorCard-C8PKNLWT.js.map → EditorCard-bUK0G4W-.js.map} +1 -1
- package/dist/{GranularitySelectField-DUbr0dRq.js → GranularitySelectField-CSeNBHaM.js} +3 -3
- package/dist/{GranularitySelectField-DUbr0dRq.js.map → GranularitySelectField-CSeNBHaM.js.map} +1 -1
- package/dist/GranularitySelectFieldPro.js +4 -4
- package/dist/HeatMapPro.js +4 -4
- package/dist/{IconCalendarFilled-BOHNn82C.js → IconCalendarFilled-DOfzKqWp.js} +2 -2
- package/dist/{IconCalendarFilled-BOHNn82C.js.map → IconCalendarFilled-DOfzKqWp.js.map} +1 -1
- package/dist/KpiChartNumberComparisonPro.js +30 -29
- package/dist/KpiChartNumberComparisonPro.js.map +1 -1
- package/dist/KpiChartNumberPro.js +9 -8
- package/dist/KpiChartNumberPro.js.map +1 -1
- package/dist/LineChartComparisonDefaultPro.js +4 -4
- package/dist/LineChartDefaultPro.js +4 -4
- package/dist/LineChartGroupedPro.js +4 -4
- package/dist/MeasureSingleSelectFieldPro.js +5 -5
- package/dist/MultiSelectFieldPro.js +4 -4
- package/dist/PieChartPro.js +4 -4
- package/dist/PivotTablePro.js +4 -4
- package/dist/SingleSelectFieldPro.js +4 -4
- package/dist/TableChartPaginated.js +4 -4
- package/dist/TableScrollable.js +5 -5
- package/dist/{bars.utils-Ccwx-tAf.js → bars.utils-BkjTtlIv.js} +4 -4
- package/dist/{bars.utils-Ccwx-tAf.js.map → bars.utils-BkjTtlIv.js.map} +1 -1
- package/dist/{charts.utils-ypZsf-22.js → charts.utils-B4kq1sTA.js} +8 -8
- package/dist/charts.utils-B4kq1sTA.js.map +1 -0
- package/dist/{component.inputs.constants-MAjey7Me.js → component.inputs.constants-C-pP69Lh.js} +408 -402
- package/dist/component.inputs.constants-C-pP69Lh.js.map +1 -0
- package/dist/components/charts/kpis/KpiChartNumberComparisonPro/index.d.ts +1 -0
- package/dist/components/charts/kpis/KpiChartNumberComparisonPro/index.d.ts.map +1 -1
- package/dist/components/charts/kpis/KpiChartNumberPro/index.d.ts +1 -0
- package/dist/components/charts/kpis/KpiChartNumberPro/index.d.ts.map +1 -1
- package/dist/components/charts/kpis/kpis.utils.d.ts +3 -0
- package/dist/components/charts/kpis/kpis.utils.d.ts.map +1 -0
- package/dist/embeddable-components.json +30 -30
- package/dist/embeddable-theme-0137e.js +895 -889
- package/dist/{formatter.utils-BeLScsYW.js → formatter.utils-C9mQTOD-.js} +2 -2
- package/dist/{formatter.utils-BeLScsYW.js.map → formatter.utils-C9mQTOD-.js.map} +1 -1
- package/dist/{index-D4RtNAm0.js → index-BbQatMvx.js} +4 -4
- package/dist/{index-D4RtNAm0.js.map → index-BbQatMvx.js.map} +1 -1
- package/dist/{index-BlaQtlpt.js → index-Bgwr2wTg.js} +5 -5
- package/dist/{index-BlaQtlpt.js.map → index-Bgwr2wTg.js.map} +1 -1
- package/dist/{index-SaoYT_gT.js → index-Bymbf9B1.js} +6 -6
- package/dist/{index-SaoYT_gT.js.map → index-Bymbf9B1.js.map} +1 -1
- package/dist/{index-eVkC4ywY.js → index-CNJWgFBo.js} +6 -6
- package/dist/{index-eVkC4ywY.js.map → index-CNJWgFBo.js.map} +1 -1
- package/dist/index-CfUcEenL.js +41 -0
- package/dist/index-CfUcEenL.js.map +1 -0
- package/dist/{index-DiU1B7O9.js → index-CgSYpdx0.js} +6 -6
- package/dist/{index-DiU1B7O9.js.map → index-CgSYpdx0.js.map} +1 -1
- package/dist/{index-DH1xtNOE.js → index-CjKyNYo-.js} +5 -5
- package/dist/{index-DH1xtNOE.js.map → index-CjKyNYo-.js.map} +1 -1
- package/dist/{index-bJoBwWW3.js → index-D9q70zqJ.js} +6 -6
- package/dist/{index-bJoBwWW3.js.map → index-D9q70zqJ.js.map} +1 -1
- package/dist/{index-DHWLaRmn.js → index-DGeDkRqz.js} +5 -5
- package/dist/{index-DHWLaRmn.js.map → index-DGeDkRqz.js.map} +1 -1
- package/dist/{index-g8MvTSdJ.js → index-DIAGQuHl.js} +6 -6
- package/dist/{index-g8MvTSdJ.js.map → index-DIAGQuHl.js.map} +1 -1
- package/dist/{index-B4AV2TSq.js → index-DJ_AKb9m.js} +7 -7
- package/dist/{index-B4AV2TSq.js.map → index-DJ_AKb9m.js.map} +1 -1
- package/dist/index-DObNJhT7.js +90 -0
- package/dist/index-DObNJhT7.js.map +1 -0
- package/dist/{index-y6eDhxWa.js → index-DXKn9iJW.js} +5 -5
- package/dist/{index-y6eDhxWa.js.map → index-DXKn9iJW.js.map} +1 -1
- package/dist/{index-CRxhm_xI.js → index-DfiG6Fph.js} +5 -5
- package/dist/{index-CRxhm_xI.js.map → index-DfiG6Fph.js.map} +1 -1
- package/dist/{index-Bg7ZniJ2.js → index-DpyP7BhA.js} +5 -5
- package/dist/{index-Bg7ZniJ2.js.map → index-DpyP7BhA.js.map} +1 -1
- package/dist/{index-BWJHhuBQ.js → index-DsWAqQ07.js} +6 -6
- package/dist/{index-BWJHhuBQ.js.map → index-DsWAqQ07.js.map} +1 -1
- package/dist/{index-CzJiHUjz.js → index-Dvl51Whs.js} +6 -6
- package/dist/{index-CzJiHUjz.js.map → index-Dvl51Whs.js.map} +1 -1
- package/dist/{index-DPF51yD5.js → index-N-gqdjk3.js} +5 -5
- package/dist/{index-DPF51yD5.js.map → index-N-gqdjk3.js.map} +1 -1
- package/dist/{index-BZ2MzjOb.js → index-QExGNX-O.js} +6 -6
- package/dist/{index-BZ2MzjOb.js.map → index-QExGNX-O.js.map} +1 -1
- package/dist/{index-DjdyOpZx.js → index-ip8hWzE9.js} +5 -5
- package/dist/{index-DjdyOpZx.js.map → index-ip8hWzE9.js.map} +1 -1
- package/dist/{index-rMR9Yklq.js → index-tEOuqC2k.js} +6 -6
- package/dist/{index-rMR9Yklq.js.map → index-tEOuqC2k.js.map} +1 -1
- package/dist/index.js +29 -29
- package/dist/kpis.utils-DsZ2GzuB.js +5 -0
- package/dist/kpis.utils-DsZ2GzuB.js.map +1 -0
- package/dist/{pies.utils-5-O3kg-9.js → pies.utils-BuoF2iP8.js} +5 -5
- package/dist/{pies.utils-5-O3kg-9.js.map → pies.utils-BuoF2iP8.js.map} +1 -1
- package/dist/{preview.data.constants-Cdk-GUa5.js → preview.data.constants-C-K-9fN3.js} +2 -2
- package/dist/{preview.data.constants-Cdk-GUa5.js.map → preview.data.constants-C-K-9fN3.js.map} +1 -1
- package/dist/remarkable-pro.css +1 -1
- package/dist/{tables.utils-CG1MXpGj.js → tables.utils-CiiwEo1e.js} +4 -4
- package/dist/{tables.utils-CG1MXpGj.js.map → tables.utils-CiiwEo1e.js.map} +1 -1
- package/dist/{timeRange.utils-Rkw2u-vc.js → timeRange.utils-DZL3BrUv.js} +2 -2
- package/dist/{timeRange.utils-Rkw2u-vc.js.map → timeRange.utils-DZL3BrUv.js.map} +1 -1
- package/package.json +2 -2
- package/dist/charts.utils-ypZsf-22.js.map +0 -1
- package/dist/component.inputs.constants-MAjey7Me.js.map +0 -1
- package/dist/index-DHVSgVH0.js +0 -32
- package/dist/index-DHVSgVH0.js.map +0 -1
- package/dist/index-KyBmwDIm.js +0 -88
- package/dist/index-KyBmwDIm.js.map +0 -1
package/dist/{component.inputs.constants-MAjey7Me.js → component.inputs.constants-C-pP69Lh.js}
RENAMED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { i as qe, Y as X, Z as w, w as Ae } from "./Color.type.emb-
|
|
2
|
-
const
|
|
3
|
-
let
|
|
1
|
+
import { i as qe, Y as X, Z as w, w as Ae } from "./Color.type.emb-DIW_7wKP.js";
|
|
2
|
+
const g = (a) => typeof a == "string", U = () => {
|
|
3
|
+
let a, e;
|
|
4
4
|
const t = new Promise((i, s) => {
|
|
5
|
-
|
|
5
|
+
a = i, e = s;
|
|
6
6
|
});
|
|
7
|
-
return t.resolve =
|
|
8
|
-
}, Oe = (
|
|
9
|
-
|
|
7
|
+
return t.resolve = a, t.reject = e, t;
|
|
8
|
+
}, Oe = (a) => a == null ? "" : "" + a, We = (a, e, t) => {
|
|
9
|
+
a.forEach((i) => {
|
|
10
10
|
e[i] && (t[i] = e[i]);
|
|
11
11
|
});
|
|
12
|
-
}, Ye = /###/g, Le = (
|
|
13
|
-
const i =
|
|
12
|
+
}, Ye = /###/g, Le = (a) => a && a.indexOf("###") > -1 ? a.replace(Ye, ".") : a, Ce = (a) => !a || g(a), z = (a, e, t) => {
|
|
13
|
+
const i = g(e) ? e.split(".") : e;
|
|
14
14
|
let s = 0;
|
|
15
15
|
for (; s < i.length - 1; ) {
|
|
16
|
-
if (Ce(
|
|
16
|
+
if (Ce(a)) return {};
|
|
17
17
|
const n = Le(i[s]);
|
|
18
|
-
!
|
|
18
|
+
!a[n] && t && (a[n] = new t()), Object.prototype.hasOwnProperty.call(a, n) ? a = a[n] : a = {}, ++s;
|
|
19
19
|
}
|
|
20
|
-
return Ce(
|
|
21
|
-
obj:
|
|
20
|
+
return Ce(a) ? {} : {
|
|
21
|
+
obj: a,
|
|
22
22
|
k: Le(i[s])
|
|
23
23
|
};
|
|
24
|
-
}, we = (
|
|
24
|
+
}, we = (a, e, t) => {
|
|
25
25
|
const {
|
|
26
26
|
obj: i,
|
|
27
27
|
k: s
|
|
28
|
-
} =
|
|
28
|
+
} = z(a, e, Object);
|
|
29
29
|
if (i !== void 0 || e.length === 1) {
|
|
30
30
|
i[s] = t;
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
let n = e[e.length - 1],
|
|
34
|
-
for (; o.obj === void 0 &&
|
|
35
|
-
n = `${
|
|
33
|
+
let n = e[e.length - 1], r = e.slice(0, e.length - 1), o = z(a, r, Object);
|
|
34
|
+
for (; o.obj === void 0 && r.length; )
|
|
35
|
+
n = `${r[r.length - 1]}.${n}`, r = r.slice(0, r.length - 1), o = z(a, r, Object), o != null && o.obj && typeof o.obj[`${o.k}.${n}`] < "u" && (o.obj = void 0);
|
|
36
36
|
o.obj[`${o.k}.${n}`] = t;
|
|
37
|
-
}, _e = (
|
|
37
|
+
}, _e = (a, e, t, i) => {
|
|
38
38
|
const {
|
|
39
39
|
obj: s,
|
|
40
40
|
k: n
|
|
41
|
-
} =
|
|
41
|
+
} = z(a, e, Object);
|
|
42
42
|
s[n] = s[n] || [], s[n].push(t);
|
|
43
|
-
}, Y = (
|
|
43
|
+
}, Y = (a, e) => {
|
|
44
44
|
const {
|
|
45
45
|
obj: t,
|
|
46
46
|
k: i
|
|
47
|
-
} =
|
|
47
|
+
} = z(a, e);
|
|
48
48
|
if (t && Object.prototype.hasOwnProperty.call(t, i))
|
|
49
49
|
return t[i];
|
|
50
|
-
}, Qe = (
|
|
51
|
-
const i = Y(
|
|
50
|
+
}, Qe = (a, e, t) => {
|
|
51
|
+
const i = Y(a, t);
|
|
52
52
|
return i !== void 0 ? i : Y(e, t);
|
|
53
|
-
}, je = (
|
|
53
|
+
}, je = (a, e, t) => {
|
|
54
54
|
for (const i in e)
|
|
55
|
-
i !== "__proto__" && i !== "constructor" && (i in
|
|
56
|
-
return
|
|
57
|
-
}, I = (
|
|
55
|
+
i !== "__proto__" && i !== "constructor" && (i in a ? g(a[i]) || a[i] instanceof String || g(e[i]) || e[i] instanceof String ? t && (a[i] = e[i]) : je(a[i], e[i], t) : a[i] = e[i]);
|
|
56
|
+
return a;
|
|
57
|
+
}, I = (a) => a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
58
58
|
var Xe = {
|
|
59
59
|
"&": "&",
|
|
60
60
|
"<": "<",
|
|
@@ -63,7 +63,7 @@ var Xe = {
|
|
|
63
63
|
"'": "'",
|
|
64
64
|
"/": "/"
|
|
65
65
|
};
|
|
66
|
-
const Ze = (
|
|
66
|
+
const Ze = (a) => g(a) ? a.replace(/[&<>"'\/]/g, (e) => Xe[e]) : a;
|
|
67
67
|
class et {
|
|
68
68
|
constructor(e) {
|
|
69
69
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -76,51 +76,51 @@ class et {
|
|
|
76
76
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, i), this.regExpQueue.push(e), i;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
const tt = [" ", ",", "?", "!", ";"], st = new et(20), it = (
|
|
79
|
+
const tt = [" ", ",", "?", "!", ";"], st = new et(20), it = (a, e, t) => {
|
|
80
80
|
e = e || "", t = t || "";
|
|
81
|
-
const i = tt.filter((
|
|
81
|
+
const i = tt.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
|
|
82
82
|
if (i.length === 0) return !0;
|
|
83
|
-
const s = st.getRegExp(`(${i.map((
|
|
84
|
-
let n = !s.test(
|
|
83
|
+
const s = st.getRegExp(`(${i.map((r) => r === "?" ? "\\?" : r).join("|")})`);
|
|
84
|
+
let n = !s.test(a);
|
|
85
85
|
if (!n) {
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const r = a.indexOf(t);
|
|
87
|
+
r > 0 && !s.test(a.substring(0, r)) && (n = !0);
|
|
88
88
|
}
|
|
89
89
|
return n;
|
|
90
|
-
}, de = (
|
|
91
|
-
if (!
|
|
92
|
-
if (
|
|
93
|
-
return Object.prototype.hasOwnProperty.call(
|
|
90
|
+
}, de = (a, e, t = ".") => {
|
|
91
|
+
if (!a) return;
|
|
92
|
+
if (a[e])
|
|
93
|
+
return Object.prototype.hasOwnProperty.call(a, e) ? a[e] : void 0;
|
|
94
94
|
const i = e.split(t);
|
|
95
|
-
let s =
|
|
95
|
+
let s = a;
|
|
96
96
|
for (let n = 0; n < i.length; ) {
|
|
97
97
|
if (!s || typeof s != "object")
|
|
98
98
|
return;
|
|
99
|
-
let
|
|
99
|
+
let r, o = "";
|
|
100
100
|
for (let u = n; u < i.length; ++u)
|
|
101
|
-
if (u !== n && (o += t), o += i[u],
|
|
102
|
-
if (["string", "number", "boolean"].indexOf(typeof
|
|
101
|
+
if (u !== n && (o += t), o += i[u], r = s[o], r !== void 0) {
|
|
102
|
+
if (["string", "number", "boolean"].indexOf(typeof r) > -1 && u < i.length - 1)
|
|
103
103
|
continue;
|
|
104
104
|
n += u - n + 1;
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
|
-
s =
|
|
107
|
+
s = r;
|
|
108
108
|
}
|
|
109
109
|
return s;
|
|
110
|
-
}, J = (
|
|
110
|
+
}, J = (a) => a == null ? void 0 : a.replace("_", "-"), nt = {
|
|
111
111
|
type: "logger",
|
|
112
|
-
log(
|
|
113
|
-
this.output("log",
|
|
112
|
+
log(a) {
|
|
113
|
+
this.output("log", a);
|
|
114
114
|
},
|
|
115
|
-
warn(
|
|
116
|
-
this.output("warn",
|
|
115
|
+
warn(a) {
|
|
116
|
+
this.output("warn", a);
|
|
117
117
|
},
|
|
118
|
-
error(
|
|
119
|
-
this.output("error",
|
|
118
|
+
error(a) {
|
|
119
|
+
this.output("error", a);
|
|
120
120
|
},
|
|
121
|
-
output(
|
|
121
|
+
output(a, e) {
|
|
122
122
|
var t, i;
|
|
123
|
-
(i = (t = console == null ? void 0 : console[
|
|
123
|
+
(i = (t = console == null ? void 0 : console[a]) == null ? void 0 : t.apply) == null || i.call(t, console, e);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
class _ {
|
|
@@ -143,7 +143,7 @@ class _ {
|
|
|
143
143
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
144
144
|
}
|
|
145
145
|
forward(e, t, i, s) {
|
|
146
|
-
return s && !this.debug ? null : (
|
|
146
|
+
return s && !this.debug ? null : (g(e[0]) && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
147
147
|
}
|
|
148
148
|
create(e) {
|
|
149
149
|
return new _(this.logger, {
|
|
@@ -155,7 +155,7 @@ class _ {
|
|
|
155
155
|
return e = e || this.options, e.prefix = e.prefix || this.prefix, new _(this.logger, e);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var k = new _();
|
|
159
159
|
class Z {
|
|
160
160
|
constructor() {
|
|
161
161
|
this.observers = {};
|
|
@@ -178,10 +178,10 @@ class Z {
|
|
|
178
178
|
}
|
|
179
179
|
emit(e, ...t) {
|
|
180
180
|
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, n]) => {
|
|
181
|
-
for (let
|
|
181
|
+
for (let r = 0; r < n; r++)
|
|
182
182
|
s(...t);
|
|
183
183
|
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, n]) => {
|
|
184
|
-
for (let
|
|
184
|
+
for (let r = 0; r < n; r++)
|
|
185
185
|
s.apply(s, [e, ...t]);
|
|
186
186
|
});
|
|
187
187
|
}
|
|
@@ -202,39 +202,39 @@ class ve extends Z {
|
|
|
202
202
|
}
|
|
203
203
|
getResource(e, t, i, s = {}) {
|
|
204
204
|
var l, f;
|
|
205
|
-
const n = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator,
|
|
205
|
+
const n = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, r = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
206
206
|
let o;
|
|
207
|
-
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], i && (Array.isArray(i) ? o.push(...i) :
|
|
207
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], i && (Array.isArray(i) ? o.push(...i) : g(i) && n ? o.push(...i.split(n)) : o.push(i)));
|
|
208
208
|
const u = Y(this.data, o);
|
|
209
|
-
return !u && !t && !i && e.indexOf(".") > -1 && (e = o[0], t = o[1], i = o.slice(2).join(".")), u || !
|
|
209
|
+
return !u && !t && !i && e.indexOf(".") > -1 && (e = o[0], t = o[1], i = o.slice(2).join(".")), u || !r || !g(i) ? u : de((f = (l = this.data) == null ? void 0 : l[e]) == null ? void 0 : f[t], i, n);
|
|
210
210
|
}
|
|
211
211
|
addResource(e, t, i, s, n = {
|
|
212
212
|
silent: !1
|
|
213
213
|
}) {
|
|
214
|
-
const
|
|
214
|
+
const r = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
215
215
|
let o = [e, t];
|
|
216
|
-
i && (o = o.concat(
|
|
216
|
+
i && (o = o.concat(r ? i.split(r) : i)), e.indexOf(".") > -1 && (o = e.split("."), s = t, t = o[1]), this.addNamespaces(t), we(this.data, o, s), n.silent || this.emit("added", e, t, i, s);
|
|
217
217
|
}
|
|
218
218
|
addResources(e, t, i, s = {
|
|
219
219
|
silent: !1
|
|
220
220
|
}) {
|
|
221
221
|
for (const n in i)
|
|
222
|
-
(
|
|
222
|
+
(g(i[n]) || Array.isArray(i[n])) && this.addResource(e, t, n, i[n], {
|
|
223
223
|
silent: !0
|
|
224
224
|
});
|
|
225
225
|
s.silent || this.emit("added", e, t, i);
|
|
226
226
|
}
|
|
227
|
-
addResourceBundle(e, t, i, s, n,
|
|
227
|
+
addResourceBundle(e, t, i, s, n, r = {
|
|
228
228
|
silent: !1,
|
|
229
229
|
skipCopy: !1
|
|
230
230
|
}) {
|
|
231
231
|
let o = [e, t];
|
|
232
232
|
e.indexOf(".") > -1 && (o = e.split("."), s = i, i = t, t = o[1]), this.addNamespaces(t);
|
|
233
233
|
let u = Y(this.data, o) || {};
|
|
234
|
-
|
|
234
|
+
r.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? je(u, i, n) : u = {
|
|
235
235
|
...u,
|
|
236
236
|
...i
|
|
237
|
-
}, we(this.data, o, u),
|
|
237
|
+
}, we(this.data, o, u), r.silent || this.emit("added", e, t, i);
|
|
238
238
|
}
|
|
239
239
|
removeResourceBundle(e, t) {
|
|
240
240
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -258,35 +258,35 @@ class ve extends Z {
|
|
|
258
258
|
}
|
|
259
259
|
var Ie = {
|
|
260
260
|
processors: {},
|
|
261
|
-
addPostProcessor(
|
|
262
|
-
this.processors[
|
|
261
|
+
addPostProcessor(a) {
|
|
262
|
+
this.processors[a.name] = a;
|
|
263
263
|
},
|
|
264
|
-
handle(
|
|
265
|
-
return
|
|
266
|
-
var
|
|
267
|
-
e = ((
|
|
264
|
+
handle(a, e, t, i, s) {
|
|
265
|
+
return a.forEach((n) => {
|
|
266
|
+
var r;
|
|
267
|
+
e = ((r = this.processors[n]) == null ? void 0 : r.process(e, t, i, s)) ?? e;
|
|
268
268
|
}), e;
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
271
|
const Ee = Symbol("i18next/PATH_KEY");
|
|
272
272
|
function at() {
|
|
273
|
-
const
|
|
273
|
+
const a = [], e = /* @__PURE__ */ Object.create(null);
|
|
274
274
|
let t;
|
|
275
275
|
return e.get = (i, s) => {
|
|
276
276
|
var n;
|
|
277
|
-
return (n = t == null ? void 0 : t.revoke) == null || n.call(t), s === Ee ?
|
|
277
|
+
return (n = t == null ? void 0 : t.revoke) == null || n.call(t), s === Ee ? a : (a.push(s), t = Proxy.revocable(i, e), t.proxy);
|
|
278
278
|
}, Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
279
279
|
}
|
|
280
|
-
function he(
|
|
280
|
+
function he(a, e) {
|
|
281
281
|
const {
|
|
282
282
|
[Ee]: t
|
|
283
|
-
} =
|
|
283
|
+
} = a(at());
|
|
284
284
|
return t.join((e == null ? void 0 : e.keySeparator) ?? ".");
|
|
285
285
|
}
|
|
286
|
-
const Re = {}, ue = (
|
|
286
|
+
const Re = {}, ue = (a) => !g(a) && typeof a != "boolean" && typeof a != "number";
|
|
287
287
|
class Q extends Z {
|
|
288
288
|
constructor(e, t = {}) {
|
|
289
|
-
super(), We(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger =
|
|
289
|
+
super(), We(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = k.create("translator");
|
|
290
290
|
}
|
|
291
291
|
changeLanguage(e) {
|
|
292
292
|
e && (this.language = e);
|
|
@@ -308,20 +308,20 @@ class Q extends Z {
|
|
|
308
308
|
i === void 0 && (i = ":");
|
|
309
309
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
310
310
|
let n = t.ns || this.options.defaultNS || [];
|
|
311
|
-
const
|
|
312
|
-
if (
|
|
311
|
+
const r = i && e.indexOf(i) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !it(e, i, s);
|
|
312
|
+
if (r && !o) {
|
|
313
313
|
const u = e.match(this.interpolator.nestingRegexp);
|
|
314
314
|
if (u && u.length > 0)
|
|
315
315
|
return {
|
|
316
316
|
key: e,
|
|
317
|
-
namespaces:
|
|
317
|
+
namespaces: g(n) ? [n] : n
|
|
318
318
|
};
|
|
319
319
|
const l = e.split(i);
|
|
320
320
|
(i !== s || i === s && this.options.ns.indexOf(l[0]) > -1) && (n = l.shift()), e = l.join(s);
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
323
323
|
key: e,
|
|
324
|
-
namespaces:
|
|
324
|
+
namespaces: g(n) ? [n] : n
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
327
|
translate(e, t, i) {
|
|
@@ -335,15 +335,15 @@ class Q extends Z {
|
|
|
335
335
|
...this.options,
|
|
336
336
|
...s
|
|
337
337
|
})), Array.isArray(e) || (e = [String(e)]);
|
|
338
|
-
const n = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails,
|
|
338
|
+
const n = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
339
339
|
key: o,
|
|
340
340
|
namespaces: u
|
|
341
341
|
} = this.extractFromKey(e[e.length - 1], s), l = u[u.length - 1];
|
|
342
342
|
let f = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
343
343
|
f === void 0 && (f = ":");
|
|
344
|
-
const c = s.lng || this.language,
|
|
344
|
+
const c = s.lng || this.language, p = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
345
345
|
if ((c == null ? void 0 : c.toLowerCase()) === "cimode")
|
|
346
|
-
return
|
|
346
|
+
return p ? n ? {
|
|
347
347
|
res: `${l}${f}${o}`,
|
|
348
348
|
usedKey: o,
|
|
349
349
|
exactUsedKey: o,
|
|
@@ -360,13 +360,13 @@ class Q extends Z {
|
|
|
360
360
|
} : o;
|
|
361
361
|
const h = this.resolve(e, s);
|
|
362
362
|
let d = h == null ? void 0 : h.res;
|
|
363
|
-
const m = (h == null ? void 0 : h.usedKey) || o, x = (h == null ? void 0 : h.exactUsedKey) || o, R = ["[object Number]", "[object Function]", "[object RegExp]"], v = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, A = !this.i18nFormat || this.i18nFormat.handleAsObject, O = s.count !== void 0 && !
|
|
363
|
+
const m = (h == null ? void 0 : h.usedKey) || o, x = (h == null ? void 0 : h.exactUsedKey) || o, R = ["[object Number]", "[object Function]", "[object RegExp]"], v = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, A = !this.i18nFormat || this.i18nFormat.handleAsObject, O = s.count !== void 0 && !g(s.count), D = Q.hasDefaultValue(s), G = O ? this.pluralResolver.getSuffix(c, s.count, s) : "", F = s.ordinal && O ? this.pluralResolver.getSuffix(c, s.count, {
|
|
364
364
|
ordinal: !1
|
|
365
365
|
}) : "", M = O && !s.ordinal && s.count === 0, L = M && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${G}`] || s[`defaultValue${F}`] || s.defaultValue;
|
|
366
366
|
let S = d;
|
|
367
|
-
A && !d &&
|
|
367
|
+
A && !d && D && (S = L);
|
|
368
368
|
const Je = ue(S), Ge = Object.prototype.toString.apply(S);
|
|
369
|
-
if (A && S && Je && R.indexOf(Ge) < 0 && !(
|
|
369
|
+
if (A && S && Je && R.indexOf(Ge) < 0 && !(g(v) && Array.isArray(S))) {
|
|
370
370
|
if (!s.returnObjects && !this.options.returnObjects) {
|
|
371
371
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
372
372
|
const $ = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, S, {
|
|
@@ -375,12 +375,12 @@ class Q extends Z {
|
|
|
375
375
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
376
376
|
return n ? (h.res = $, h.usedParams = this.getUsedParamsDetails(s), h) : $;
|
|
377
377
|
}
|
|
378
|
-
if (
|
|
378
|
+
if (r) {
|
|
379
379
|
const $ = Array.isArray(S), P = $ ? [] : {}, ye = $ ? x : m;
|
|
380
380
|
for (const N in S)
|
|
381
381
|
if (Object.prototype.hasOwnProperty.call(S, N)) {
|
|
382
|
-
const T = `${ye}${
|
|
383
|
-
|
|
382
|
+
const T = `${ye}${r}${N}`;
|
|
383
|
+
D && !d ? P[N] = this.translate(T, {
|
|
384
384
|
...s,
|
|
385
385
|
defaultValue: ue(L) ? L[N] : void 0,
|
|
386
386
|
joinArrays: !1,
|
|
@@ -393,14 +393,14 @@ class Q extends Z {
|
|
|
393
393
|
}
|
|
394
394
|
d = P;
|
|
395
395
|
}
|
|
396
|
-
} else if (A &&
|
|
396
|
+
} else if (A && g(v) && Array.isArray(d))
|
|
397
397
|
d = d.join(v), d && (d = this.extendTranslation(d, e, s, i));
|
|
398
398
|
else {
|
|
399
399
|
let $ = !1, P = !1;
|
|
400
|
-
!this.isValidLookup(d) &&
|
|
401
|
-
const N = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && P ? void 0 : d, T =
|
|
400
|
+
!this.isValidLookup(d) && D && ($ = !0, d = L), this.isValidLookup(d) || (P = !0, d = o);
|
|
401
|
+
const N = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && P ? void 0 : d, T = D && L !== d && this.options.updateMissing;
|
|
402
402
|
if (P || $ || T) {
|
|
403
|
-
if (this.logger.log(T ? "updateKey" : "missingKey", c, l, o, T ? L : d),
|
|
403
|
+
if (this.logger.log(T ? "updateKey" : "missingKey", c, l, o, T ? L : d), r) {
|
|
404
404
|
const C = this.resolve(o, {
|
|
405
405
|
...s,
|
|
406
406
|
keySeparator: !1
|
|
@@ -415,7 +415,7 @@ class Q extends Z {
|
|
|
415
415
|
else this.options.saveMissingTo === "all" ? K = this.languageUtils.toResolveHierarchy(s.lng || this.language) : K.push(s.lng || this.language);
|
|
416
416
|
const be = (C, j, H) => {
|
|
417
417
|
var Se;
|
|
418
|
-
const xe =
|
|
418
|
+
const xe = D && H !== d ? H : N;
|
|
419
419
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(C, l, j, xe, T, s) : (Se = this.backendConnector) != null && Se.saveMissing && this.backendConnector.saveMissing(C, l, j, xe, T, s), this.emit("missingKey", C, l, j, d);
|
|
420
420
|
};
|
|
421
421
|
this.options.saveMissing && (this.options.saveMissingPlurals && O ? K.forEach((C) => {
|
|
@@ -446,23 +446,23 @@ class Q extends Z {
|
|
|
446
446
|
...i.interpolation
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
|
-
const f =
|
|
449
|
+
const f = g(e) && (((l = i == null ? void 0 : i.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
450
450
|
let c;
|
|
451
451
|
if (f) {
|
|
452
452
|
const h = e.match(this.interpolator.nestingRegexp);
|
|
453
453
|
c = h && h.length;
|
|
454
454
|
}
|
|
455
|
-
let
|
|
456
|
-
if (this.options.interpolation.defaultVariables && (
|
|
455
|
+
let p = i.replace && !g(i.replace) ? i.replace : i;
|
|
456
|
+
if (this.options.interpolation.defaultVariables && (p = {
|
|
457
457
|
...this.options.interpolation.defaultVariables,
|
|
458
|
-
...
|
|
459
|
-
}), e = this.interpolator.interpolate(e,
|
|
458
|
+
...p
|
|
459
|
+
}), e = this.interpolator.interpolate(e, p, i.lng || this.language || s.usedLng, i), f) {
|
|
460
460
|
const h = e.match(this.interpolator.nestingRegexp), d = h && h.length;
|
|
461
461
|
c < d && (i.nest = !1);
|
|
462
462
|
}
|
|
463
463
|
!i.lng && s && s.res && (i.lng = this.language || s.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, (...h) => (n == null ? void 0 : n[0]) === h[0] && !i.context ? (this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`), null) : this.translate(...h, t), i)), i.interpolation && this.interpolator.reset();
|
|
464
464
|
}
|
|
465
|
-
const
|
|
465
|
+
const r = i.postProcess || this.options.postProcess, o = g(r) ? [r] : r;
|
|
466
466
|
return e != null && (o != null && o.length) && i.applyPostProcessor !== !1 && (e = Ie.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
467
467
|
i18nResolved: {
|
|
468
468
|
...s,
|
|
@@ -472,42 +472,42 @@ class Q extends Z {
|
|
|
472
472
|
} : i, this)), e;
|
|
473
473
|
}
|
|
474
474
|
resolve(e, t = {}) {
|
|
475
|
-
let i, s, n,
|
|
476
|
-
return
|
|
475
|
+
let i, s, n, r, o;
|
|
476
|
+
return g(e) && (e = [e]), e.forEach((u) => {
|
|
477
477
|
if (this.isValidLookup(i)) return;
|
|
478
478
|
const l = this.extractFromKey(u, t), f = l.key;
|
|
479
479
|
s = f;
|
|
480
480
|
let c = l.namespaces;
|
|
481
481
|
this.options.fallbackNS && (c = c.concat(this.options.fallbackNS));
|
|
482
|
-
const
|
|
482
|
+
const p = t.count !== void 0 && !g(t.count), h = p && !t.ordinal && t.count === 0, d = t.context !== void 0 && (g(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
483
483
|
c.forEach((x) => {
|
|
484
484
|
var R, v;
|
|
485
485
|
this.isValidLookup(i) || (o = x, !Re[`${m[0]}-${x}`] && ((R = this.utils) != null && R.hasLoadedNamespace) && !((v = this.utils) != null && v.hasLoadedNamespace(o)) && (Re[`${m[0]}-${x}`] = !0, this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((A) => {
|
|
486
486
|
var G;
|
|
487
487
|
if (this.isValidLookup(i)) return;
|
|
488
|
-
|
|
488
|
+
r = A;
|
|
489
489
|
const O = [f];
|
|
490
490
|
if ((G = this.i18nFormat) != null && G.addLookupKeys)
|
|
491
491
|
this.i18nFormat.addLookupKeys(O, f, A, x, t);
|
|
492
492
|
else {
|
|
493
493
|
let F;
|
|
494
|
-
|
|
494
|
+
p && (F = this.pluralResolver.getSuffix(A, t.count, t));
|
|
495
495
|
const M = `${this.options.pluralSeparator}zero`, L = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
496
|
-
if (
|
|
496
|
+
if (p && (t.ordinal && F.indexOf(L) === 0 && O.push(f + F.replace(L, this.options.pluralSeparator)), O.push(f + F), h && O.push(f + M)), d) {
|
|
497
497
|
const S = `${f}${this.options.contextSeparator || "_"}${t.context}`;
|
|
498
|
-
O.push(S),
|
|
498
|
+
O.push(S), p && (t.ordinal && F.indexOf(L) === 0 && O.push(S + F.replace(L, this.options.pluralSeparator)), O.push(S + F), h && O.push(S + M));
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
let
|
|
502
|
-
for (;
|
|
503
|
-
this.isValidLookup(i) || (n =
|
|
501
|
+
let D;
|
|
502
|
+
for (; D = O.pop(); )
|
|
503
|
+
this.isValidLookup(i) || (n = D, i = this.getResource(A, x, D, t));
|
|
504
504
|
}));
|
|
505
505
|
});
|
|
506
506
|
}), {
|
|
507
507
|
res: i,
|
|
508
508
|
usedKey: s,
|
|
509
509
|
exactUsedKey: n,
|
|
510
|
-
usedLng:
|
|
510
|
+
usedLng: r,
|
|
511
511
|
usedNS: o
|
|
512
512
|
};
|
|
513
513
|
}
|
|
@@ -519,7 +519,7 @@ class Q extends Z {
|
|
|
519
519
|
return (n = this.i18nFormat) != null && n.getResource ? this.i18nFormat.getResource(e, t, i, s) : this.resourceStore.getResource(e, t, i, s);
|
|
520
520
|
}
|
|
521
521
|
getUsedParamsDetails(e = {}) {
|
|
522
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && !
|
|
522
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && !g(e.replace);
|
|
523
523
|
let s = i ? e.replace : e;
|
|
524
524
|
if (i && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
525
525
|
...this.options.interpolation.defaultVariables,
|
|
@@ -543,7 +543,7 @@ class Q extends Z {
|
|
|
543
543
|
}
|
|
544
544
|
class Pe {
|
|
545
545
|
constructor(e) {
|
|
546
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
546
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
|
|
547
547
|
}
|
|
548
548
|
getScriptPartFromCode(e) {
|
|
549
549
|
if (e = J(e), !e || e.indexOf("-") < 0) return null;
|
|
@@ -556,7 +556,7 @@ class Pe {
|
|
|
556
556
|
return this.formatLanguageCode(t[0]);
|
|
557
557
|
}
|
|
558
558
|
formatLanguageCode(e) {
|
|
559
|
-
if (
|
|
559
|
+
if (g(e) && e.indexOf("-") > -1) {
|
|
560
560
|
let t;
|
|
561
561
|
try {
|
|
562
562
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -582,26 +582,26 @@ class Pe {
|
|
|
582
582
|
if (this.isSupportedCode(s)) return t = s;
|
|
583
583
|
const n = this.getLanguagePartFromCode(i);
|
|
584
584
|
if (this.isSupportedCode(n)) return t = n;
|
|
585
|
-
t = this.options.supportedLngs.find((
|
|
586
|
-
if (
|
|
587
|
-
if (!(
|
|
588
|
-
return
|
|
585
|
+
t = this.options.supportedLngs.find((r) => {
|
|
586
|
+
if (r === n) return r;
|
|
587
|
+
if (!(r.indexOf("-") < 0 && n.indexOf("-") < 0) && (r.indexOf("-") > 0 && n.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === n || r.indexOf(n) === 0 && n.length > 1))
|
|
588
|
+
return r;
|
|
589
589
|
});
|
|
590
590
|
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
591
591
|
}
|
|
592
592
|
getFallbackCodes(e, t) {
|
|
593
593
|
if (!e) return [];
|
|
594
|
-
if (typeof e == "function" && (e = e(t)),
|
|
594
|
+
if (typeof e == "function" && (e = e(t)), g(e) && (e = [e]), Array.isArray(e)) return e;
|
|
595
595
|
if (!t) return e.default || [];
|
|
596
596
|
let i = e[t];
|
|
597
597
|
return i || (i = e[this.getScriptPartFromCode(t)]), i || (i = e[this.formatLanguageCode(t)]), i || (i = e[this.getLanguagePartFromCode(t)]), i || (i = e.default), i || [];
|
|
598
598
|
}
|
|
599
599
|
toResolveHierarchy(e, t) {
|
|
600
|
-
const i = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], n = (
|
|
601
|
-
|
|
600
|
+
const i = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], n = (r) => {
|
|
601
|
+
r && (this.isSupportedCode(r) ? s.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
|
|
602
602
|
};
|
|
603
|
-
return
|
|
604
|
-
s.indexOf(
|
|
603
|
+
return g(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && n(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && n(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && n(this.getLanguagePartFromCode(e))) : g(e) && n(this.formatLanguageCode(e)), i.forEach((r) => {
|
|
604
|
+
s.indexOf(r) < 0 && n(this.formatLanguageCode(r));
|
|
605
605
|
}), s;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
@@ -613,14 +613,14 @@ const $e = {
|
|
|
613
613
|
many: 4,
|
|
614
614
|
other: 5
|
|
615
615
|
}, Ne = {
|
|
616
|
-
select: (
|
|
616
|
+
select: (a) => a === 1 ? "one" : "other",
|
|
617
617
|
resolvedOptions: () => ({
|
|
618
618
|
pluralCategories: ["one", "other"]
|
|
619
619
|
})
|
|
620
620
|
};
|
|
621
621
|
class rt {
|
|
622
622
|
constructor(e, t = {}) {
|
|
623
|
-
this.languageUtils = e, this.options = t, this.logger =
|
|
623
|
+
this.languageUtils = e, this.options = t, this.logger = k.create("pluralResolver"), this.pluralRulesCache = {};
|
|
624
624
|
}
|
|
625
625
|
clearCache() {
|
|
626
626
|
this.pluralRulesCache = {};
|
|
@@ -632,9 +632,9 @@ class rt {
|
|
|
632
632
|
});
|
|
633
633
|
if (n in this.pluralRulesCache)
|
|
634
634
|
return this.pluralRulesCache[n];
|
|
635
|
-
let
|
|
635
|
+
let r;
|
|
636
636
|
try {
|
|
637
|
-
|
|
637
|
+
r = new Intl.PluralRules(i, {
|
|
638
638
|
type: s
|
|
639
639
|
});
|
|
640
640
|
} catch {
|
|
@@ -642,9 +642,9 @@ class rt {
|
|
|
642
642
|
return this.logger.error("No Intl support, please use an Intl polyfill!"), Ne;
|
|
643
643
|
if (!e.match(/-|_/)) return Ne;
|
|
644
644
|
const u = this.languageUtils.getLanguagePartFromCode(e);
|
|
645
|
-
|
|
645
|
+
r = this.getRule(u, t);
|
|
646
646
|
}
|
|
647
|
-
return this.pluralRulesCache[n] =
|
|
647
|
+
return this.pluralRulesCache[n] = r, r;
|
|
648
648
|
}
|
|
649
649
|
needsPlural(e, t = {}) {
|
|
650
650
|
let i = this.getRule(e, t);
|
|
@@ -662,14 +662,14 @@ class rt {
|
|
|
662
662
|
return s ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, i));
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
const
|
|
666
|
-
let n = Qe(
|
|
667
|
-
return !n && s &&
|
|
668
|
-
}, ce = (
|
|
669
|
-
class
|
|
665
|
+
const ke = (a, e, t, i = ".", s = !0) => {
|
|
666
|
+
let n = Qe(a, e, t);
|
|
667
|
+
return !n && s && g(t) && (n = de(a, t, i), n === void 0 && (n = de(e, t, i))), n;
|
|
668
|
+
}, ce = (a) => a.replace(/\$/g, "$$$$");
|
|
669
|
+
class De {
|
|
670
670
|
constructor(e = {}) {
|
|
671
671
|
var t;
|
|
672
|
-
this.logger =
|
|
672
|
+
this.logger = k.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((i) => i), this.init(e);
|
|
673
673
|
}
|
|
674
674
|
init(e = {}) {
|
|
675
675
|
e.interpolation || (e.interpolation = {
|
|
@@ -680,13 +680,13 @@ class ke {
|
|
|
680
680
|
escapeValue: i,
|
|
681
681
|
useRawValueToEscape: s,
|
|
682
682
|
prefix: n,
|
|
683
|
-
prefixEscaped:
|
|
683
|
+
prefixEscaped: r,
|
|
684
684
|
suffix: o,
|
|
685
685
|
suffixEscaped: u,
|
|
686
686
|
formatSeparator: l,
|
|
687
687
|
unescapeSuffix: f,
|
|
688
688
|
unescapePrefix: c,
|
|
689
|
-
nestingPrefix:
|
|
689
|
+
nestingPrefix: p,
|
|
690
690
|
nestingPrefixEscaped: h,
|
|
691
691
|
nestingSuffix: d,
|
|
692
692
|
nestingSuffixEscaped: m,
|
|
@@ -694,7 +694,7 @@ class ke {
|
|
|
694
694
|
maxReplaces: R,
|
|
695
695
|
alwaysFormat: v
|
|
696
696
|
} = e.interpolation;
|
|
697
|
-
this.escape = t !== void 0 ? t : Ze, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = n ? I(n) :
|
|
697
|
+
this.escape = t !== void 0 ? t : Ze, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = n ? I(n) : r || "{{", this.suffix = o ? I(o) : u || "}}", this.formatSeparator = l || ",", this.unescapePrefix = f ? "" : c || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = p ? I(p) : h || I("$t("), this.nestingSuffix = d ? I(d) : m || I(")"), this.nestingOptionsSeparator = x || ",", this.maxReplaces = R || 1e3, this.alwaysFormat = v !== void 0 ? v : !1, this.resetRegExp();
|
|
698
698
|
}
|
|
699
699
|
reset() {
|
|
700
700
|
this.options && this.init(this.options);
|
|
@@ -705,10 +705,10 @@ class ke {
|
|
|
705
705
|
}
|
|
706
706
|
interpolate(e, t, i, s) {
|
|
707
707
|
var h;
|
|
708
|
-
let n,
|
|
708
|
+
let n, r, o;
|
|
709
709
|
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (d) => {
|
|
710
710
|
if (d.indexOf(this.formatSeparator) < 0) {
|
|
711
|
-
const v =
|
|
711
|
+
const v = ke(t, u, d, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
712
712
|
return this.alwaysFormat ? this.format(v, void 0, i, {
|
|
713
713
|
...s,
|
|
714
714
|
...t,
|
|
@@ -716,7 +716,7 @@ class ke {
|
|
|
716
716
|
}) : v;
|
|
717
717
|
}
|
|
718
718
|
const m = d.split(this.formatSeparator), x = m.shift().trim(), R = m.join(this.formatSeparator).trim();
|
|
719
|
-
return this.format(
|
|
719
|
+
return this.format(ke(t, u, x, this.options.keySeparator, this.options.ignoreJSONStructure), R, i, {
|
|
720
720
|
...s,
|
|
721
721
|
...t,
|
|
722
722
|
interpolationkey: x
|
|
@@ -733,52 +733,52 @@ class ke {
|
|
|
733
733
|
}].forEach((d) => {
|
|
734
734
|
for (o = 0; n = d.regex.exec(e); ) {
|
|
735
735
|
const m = n[1].trim();
|
|
736
|
-
if (
|
|
736
|
+
if (r = l(m), r === void 0)
|
|
737
737
|
if (typeof f == "function") {
|
|
738
738
|
const R = f(e, n, s);
|
|
739
|
-
|
|
739
|
+
r = g(R) ? R : "";
|
|
740
740
|
} else if (s && Object.prototype.hasOwnProperty.call(s, m))
|
|
741
|
-
|
|
741
|
+
r = "";
|
|
742
742
|
else if (c) {
|
|
743
|
-
|
|
743
|
+
r = n[0];
|
|
744
744
|
continue;
|
|
745
745
|
} else
|
|
746
|
-
this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),
|
|
747
|
-
else !
|
|
748
|
-
const x = d.safeValue(
|
|
749
|
-
if (e = e.replace(n[0], x), c ? (d.regex.lastIndex +=
|
|
746
|
+
this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`), r = "";
|
|
747
|
+
else !g(r) && !this.useRawValueToEscape && (r = Oe(r));
|
|
748
|
+
const x = d.safeValue(r);
|
|
749
|
+
if (e = e.replace(n[0], x), c ? (d.regex.lastIndex += r.length, d.regex.lastIndex -= n[0].length) : d.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
752
|
}), e;
|
|
753
753
|
}
|
|
754
754
|
nest(e, t, i = {}) {
|
|
755
|
-
let s, n,
|
|
755
|
+
let s, n, r;
|
|
756
756
|
const o = (u, l) => {
|
|
757
757
|
const f = this.nestingOptionsSeparator;
|
|
758
758
|
if (u.indexOf(f) < 0) return u;
|
|
759
759
|
const c = u.split(new RegExp(`${f}[ ]*{`));
|
|
760
|
-
let
|
|
761
|
-
u = c[0],
|
|
762
|
-
const h =
|
|
763
|
-
(((h == null ? void 0 : h.length) ?? 0) % 2 === 0 && !d || d.length % 2 !== 0) && (
|
|
760
|
+
let p = `{${c[1]}`;
|
|
761
|
+
u = c[0], p = this.interpolate(p, r);
|
|
762
|
+
const h = p.match(/'/g), d = p.match(/"/g);
|
|
763
|
+
(((h == null ? void 0 : h.length) ?? 0) % 2 === 0 && !d || d.length % 2 !== 0) && (p = p.replace(/'/g, '"'));
|
|
764
764
|
try {
|
|
765
|
-
|
|
765
|
+
r = JSON.parse(p), l && (r = {
|
|
766
766
|
...l,
|
|
767
|
-
...
|
|
767
|
+
...r
|
|
768
768
|
});
|
|
769
769
|
} catch (m) {
|
|
770
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${u}`, m), `${u}${f}${
|
|
770
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${u}`, m), `${u}${f}${p}`;
|
|
771
771
|
}
|
|
772
|
-
return
|
|
772
|
+
return r.defaultValue && r.defaultValue.indexOf(this.prefix) > -1 && delete r.defaultValue, u;
|
|
773
773
|
};
|
|
774
774
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
775
775
|
let u = [];
|
|
776
|
-
|
|
776
|
+
r = {
|
|
777
777
|
...i
|
|
778
|
-
},
|
|
778
|
+
}, r = r.replace && !g(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
779
779
|
const l = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator);
|
|
780
|
-
if (l !== -1 && (u = s[1].slice(l).split(this.formatSeparator).map((f) => f.trim()).filter(Boolean), s[1] = s[1].slice(0, l)), n = t(o.call(this, s[1].trim(),
|
|
781
|
-
|
|
780
|
+
if (l !== -1 && (u = s[1].slice(l).split(this.formatSeparator).map((f) => f.trim()).filter(Boolean), s[1] = s[1].slice(0, l)), n = t(o.call(this, s[1].trim(), r), r), n && s[0] === e && !g(n)) return n;
|
|
781
|
+
g(n) || (n = Oe(n)), n || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), n = ""), u.length && (n = u.reduce((f, c) => this.format(f, c, i.lng, {
|
|
782
782
|
...i,
|
|
783
783
|
interpolationkey: s[1].trim()
|
|
784
784
|
}), n.trim())), e = e.replace(s[0], n), this.regexp.lastIndex = 0;
|
|
@@ -786,16 +786,16 @@ class ke {
|
|
|
786
786
|
return e;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
const ot = (
|
|
790
|
-
let e =
|
|
789
|
+
const ot = (a) => {
|
|
790
|
+
let e = a.toLowerCase().trim();
|
|
791
791
|
const t = {};
|
|
792
|
-
if (
|
|
793
|
-
const i =
|
|
792
|
+
if (a.indexOf("(") > -1) {
|
|
793
|
+
const i = a.split("(");
|
|
794
794
|
e = i[0].toLowerCase().trim();
|
|
795
795
|
const s = i[1].substring(0, i[1].length - 1);
|
|
796
|
-
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((
|
|
797
|
-
if (
|
|
798
|
-
const [o, ...u] =
|
|
796
|
+
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((r) => {
|
|
797
|
+
if (r) {
|
|
798
|
+
const [o, ...u] = r.split(":"), l = u.join(":").trim().replace(/^'+|'+$/g, ""), f = o.trim();
|
|
799
799
|
t[f] || (t[f] = l), l === "false" && (t[f] = !1), l === "true" && (t[f] = !0), isNaN(l) || (t[f] = parseInt(l, 10));
|
|
800
800
|
}
|
|
801
801
|
});
|
|
@@ -804,7 +804,7 @@ const ot = (r) => {
|
|
|
804
804
|
formatName: e,
|
|
805
805
|
formatOptions: t
|
|
806
806
|
};
|
|
807
|
-
}, Fe = (
|
|
807
|
+
}, Fe = (a) => {
|
|
808
808
|
const e = {};
|
|
809
809
|
return (t, i, s) => {
|
|
810
810
|
let n = s;
|
|
@@ -812,14 +812,14 @@ const ot = (r) => {
|
|
|
812
812
|
...n,
|
|
813
813
|
[s.interpolationkey]: void 0
|
|
814
814
|
});
|
|
815
|
-
const
|
|
816
|
-
let o = e[
|
|
817
|
-
return o || (o =
|
|
815
|
+
const r = i + JSON.stringify(n);
|
|
816
|
+
let o = e[r];
|
|
817
|
+
return o || (o = a(J(i), s), e[r] = o), o(t);
|
|
818
818
|
};
|
|
819
|
-
}, lt = (
|
|
819
|
+
}, lt = (a) => (e, t, i) => a(J(t), i)(e);
|
|
820
820
|
class ut {
|
|
821
821
|
constructor(e = {}) {
|
|
822
|
-
this.logger =
|
|
822
|
+
this.logger = k.create("formatter"), this.options = e, this.init(e);
|
|
823
823
|
}
|
|
824
824
|
init(e, t = {
|
|
825
825
|
interpolation: {}
|
|
@@ -828,35 +828,35 @@ class ut {
|
|
|
828
828
|
const i = t.cacheInBuiltFormats ? Fe : lt;
|
|
829
829
|
this.formats = {
|
|
830
830
|
number: i((s, n) => {
|
|
831
|
-
const
|
|
831
|
+
const r = new Intl.NumberFormat(s, {
|
|
832
832
|
...n
|
|
833
833
|
});
|
|
834
|
-
return (o) =>
|
|
834
|
+
return (o) => r.format(o);
|
|
835
835
|
}),
|
|
836
836
|
currency: i((s, n) => {
|
|
837
|
-
const
|
|
837
|
+
const r = new Intl.NumberFormat(s, {
|
|
838
838
|
...n,
|
|
839
839
|
style: "currency"
|
|
840
840
|
});
|
|
841
|
-
return (o) =>
|
|
841
|
+
return (o) => r.format(o);
|
|
842
842
|
}),
|
|
843
843
|
datetime: i((s, n) => {
|
|
844
|
-
const
|
|
844
|
+
const r = new Intl.DateTimeFormat(s, {
|
|
845
845
|
...n
|
|
846
846
|
});
|
|
847
|
-
return (o) =>
|
|
847
|
+
return (o) => r.format(o);
|
|
848
848
|
}),
|
|
849
849
|
relativetime: i((s, n) => {
|
|
850
|
-
const
|
|
850
|
+
const r = new Intl.RelativeTimeFormat(s, {
|
|
851
851
|
...n
|
|
852
852
|
});
|
|
853
|
-
return (o) =>
|
|
853
|
+
return (o) => r.format(o, n.range || "day");
|
|
854
854
|
}),
|
|
855
855
|
list: i((s, n) => {
|
|
856
|
-
const
|
|
856
|
+
const r = new Intl.ListFormat(s, {
|
|
857
857
|
...n
|
|
858
858
|
});
|
|
859
|
-
return (o) =>
|
|
859
|
+
return (o) => r.format(o);
|
|
860
860
|
})
|
|
861
861
|
};
|
|
862
862
|
}
|
|
@@ -879,10 +879,10 @@ class ut {
|
|
|
879
879
|
formatOptions: f
|
|
880
880
|
} = ot(u);
|
|
881
881
|
if (this.formats[l]) {
|
|
882
|
-
let
|
|
882
|
+
let p = o;
|
|
883
883
|
try {
|
|
884
884
|
const h = ((c = s == null ? void 0 : s.formatParams) == null ? void 0 : c[s.interpolationkey]) || {}, d = h.locale || h.lng || s.locale || s.lng || i;
|
|
885
|
-
|
|
885
|
+
p = this.formats[l](o, d, {
|
|
886
886
|
...f,
|
|
887
887
|
...s,
|
|
888
888
|
...h
|
|
@@ -890,50 +890,50 @@ class ut {
|
|
|
890
890
|
} catch (h) {
|
|
891
891
|
this.logger.warn(h);
|
|
892
892
|
}
|
|
893
|
-
return
|
|
893
|
+
return p;
|
|
894
894
|
} else
|
|
895
895
|
this.logger.warn(`there was no format function for ${l}`);
|
|
896
896
|
return o;
|
|
897
897
|
}, e);
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
const ct = (
|
|
901
|
-
|
|
900
|
+
const ct = (a, e) => {
|
|
901
|
+
a.pending[e] !== void 0 && (delete a.pending[e], a.pendingCount--);
|
|
902
902
|
};
|
|
903
903
|
class ft extends Z {
|
|
904
904
|
constructor(e, t, i, s = {}) {
|
|
905
|
-
var n,
|
|
906
|
-
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger =
|
|
905
|
+
var n, r;
|
|
906
|
+
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger = k.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], (r = (n = this.backend) == null ? void 0 : n.init) == null || r.call(n, i, s.backend, s);
|
|
907
907
|
}
|
|
908
908
|
queueLoad(e, t, i, s) {
|
|
909
|
-
const n = {},
|
|
909
|
+
const n = {}, r = {}, o = {}, u = {};
|
|
910
910
|
return e.forEach((l) => {
|
|
911
911
|
let f = !0;
|
|
912
912
|
t.forEach((c) => {
|
|
913
|
-
const
|
|
914
|
-
!i.reload && this.store.hasResourceBundle(l, c) ? this.state[
|
|
913
|
+
const p = `${l}|${c}`;
|
|
914
|
+
!i.reload && this.store.hasResourceBundle(l, c) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ? r[p] === void 0 && (r[p] = !0) : (this.state[p] = 1, f = !1, r[p] === void 0 && (r[p] = !0), n[p] === void 0 && (n[p] = !0), u[c] === void 0 && (u[c] = !0)));
|
|
915
915
|
}), f || (o[l] = !0);
|
|
916
|
-
}), (Object.keys(n).length || Object.keys(
|
|
917
|
-
pending:
|
|
918
|
-
pendingCount: Object.keys(
|
|
916
|
+
}), (Object.keys(n).length || Object.keys(r).length) && this.queue.push({
|
|
917
|
+
pending: r,
|
|
918
|
+
pendingCount: Object.keys(r).length,
|
|
919
919
|
loaded: {},
|
|
920
920
|
errors: [],
|
|
921
921
|
callback: s
|
|
922
922
|
}), {
|
|
923
923
|
toLoad: Object.keys(n),
|
|
924
|
-
pending: Object.keys(
|
|
924
|
+
pending: Object.keys(r),
|
|
925
925
|
toLoadLanguages: Object.keys(o),
|
|
926
926
|
toLoadNamespaces: Object.keys(u)
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
929
|
loaded(e, t, i) {
|
|
930
|
-
const s = e.split("|"), n = s[0],
|
|
931
|
-
t && this.emit("failedLoading", n,
|
|
930
|
+
const s = e.split("|"), n = s[0], r = s[1];
|
|
931
|
+
t && this.emit("failedLoading", n, r, t), !t && i && this.store.addResourceBundle(n, r, i, void 0, void 0, {
|
|
932
932
|
skipCopy: !0
|
|
933
933
|
}), this.state[e] = t ? -1 : 2, t && i && (this.state[e] = 0);
|
|
934
934
|
const o = {};
|
|
935
935
|
this.queue.forEach((u) => {
|
|
936
|
-
_e(u.loaded, [n],
|
|
936
|
+
_e(u.loaded, [n], r), ct(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((l) => {
|
|
937
937
|
o[l] || (o[l] = {});
|
|
938
938
|
const f = u.loaded[l];
|
|
939
939
|
f.length && f.forEach((c) => {
|
|
@@ -942,8 +942,8 @@ class ft extends Z {
|
|
|
942
942
|
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
|
943
943
|
}), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
|
|
944
944
|
}
|
|
945
|
-
read(e, t, i, s = 0, n = this.retryTimeout,
|
|
946
|
-
if (!e.length) return
|
|
945
|
+
read(e, t, i, s = 0, n = this.retryTimeout, r) {
|
|
946
|
+
if (!e.length) return r(null, {});
|
|
947
947
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
948
948
|
this.waitingReads.push({
|
|
949
949
|
lng: e,
|
|
@@ -951,7 +951,7 @@ class ft extends Z {
|
|
|
951
951
|
fcName: i,
|
|
952
952
|
tried: s,
|
|
953
953
|
wait: n,
|
|
954
|
-
callback:
|
|
954
|
+
callback: r
|
|
955
955
|
});
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
@@ -963,11 +963,11 @@ class ft extends Z {
|
|
|
963
963
|
}
|
|
964
964
|
if (l && f && s < this.maxRetries) {
|
|
965
965
|
setTimeout(() => {
|
|
966
|
-
this.read.call(this, e, t, i, s + 1, n * 2,
|
|
966
|
+
this.read.call(this, e, t, i, s + 1, n * 2, r);
|
|
967
967
|
}, n);
|
|
968
968
|
return;
|
|
969
969
|
}
|
|
970
|
-
|
|
970
|
+
r(l, f);
|
|
971
971
|
}, u = this.backend[i].bind(this.backend);
|
|
972
972
|
if (u.length === 2) {
|
|
973
973
|
try {
|
|
@@ -983,12 +983,12 @@ class ft extends Z {
|
|
|
983
983
|
prepareLoading(e, t, i = {}, s) {
|
|
984
984
|
if (!this.backend)
|
|
985
985
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
986
|
-
|
|
986
|
+
g(e) && (e = this.languageUtils.toResolveHierarchy(e)), g(t) && (t = [t]);
|
|
987
987
|
const n = this.queueLoad(e, t, i, s);
|
|
988
988
|
if (!n.toLoad.length)
|
|
989
989
|
return n.pending.length || s(), null;
|
|
990
|
-
n.toLoad.forEach((
|
|
991
|
-
this.loadOne(
|
|
990
|
+
n.toLoad.forEach((r) => {
|
|
991
|
+
this.loadOne(r);
|
|
992
992
|
});
|
|
993
993
|
}
|
|
994
994
|
load(e, t, i) {
|
|
@@ -1001,21 +1001,21 @@ class ft extends Z {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
loadOne(e, t = "") {
|
|
1003
1003
|
const i = e.split("|"), s = i[0], n = i[1];
|
|
1004
|
-
this.read(s, n, "read", void 0, void 0, (
|
|
1005
|
-
|
|
1004
|
+
this.read(s, n, "read", void 0, void 0, (r, o) => {
|
|
1005
|
+
r && this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${n} for language ${s}`, o), this.loaded(e, r, o);
|
|
1006
1006
|
});
|
|
1007
1007
|
}
|
|
1008
|
-
saveMissing(e, t, i, s, n,
|
|
1008
|
+
saveMissing(e, t, i, s, n, r = {}, o = () => {
|
|
1009
1009
|
}) {
|
|
1010
|
-
var u, l, f, c,
|
|
1010
|
+
var u, l, f, c, p;
|
|
1011
1011
|
if ((l = (u = this.services) == null ? void 0 : u.utils) != null && l.hasLoadedNamespace && !((c = (f = this.services) == null ? void 0 : f.utils) != null && c.hasLoadedNamespace(t))) {
|
|
1012
1012
|
this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
1013
1013
|
return;
|
|
1014
1014
|
}
|
|
1015
1015
|
if (!(i == null || i === "")) {
|
|
1016
|
-
if ((
|
|
1016
|
+
if ((p = this.backend) != null && p.create) {
|
|
1017
1017
|
const h = {
|
|
1018
|
-
...
|
|
1018
|
+
...r,
|
|
1019
1019
|
isUpdate: n
|
|
1020
1020
|
}, d = this.backend.create.bind(this.backend);
|
|
1021
1021
|
if (d.length < 6)
|
|
@@ -1065,10 +1065,10 @@ const fe = () => ({
|
|
|
1065
1065
|
parseMissingKeyHandler: !1,
|
|
1066
1066
|
appendNamespaceToMissingKey: !1,
|
|
1067
1067
|
appendNamespaceToCIMode: !1,
|
|
1068
|
-
overloadTranslationOptionHandler: (
|
|
1068
|
+
overloadTranslationOptionHandler: (a) => {
|
|
1069
1069
|
let e = {};
|
|
1070
|
-
if (typeof
|
|
1071
|
-
const t =
|
|
1070
|
+
if (typeof a[1] == "object" && (e = a[1]), g(a[1]) && (e.defaultValue = a[1]), g(a[2]) && (e.tDescription = a[2]), typeof a[2] == "object" || typeof a[3] == "object") {
|
|
1071
|
+
const t = a[3] || a[2];
|
|
1072
1072
|
Object.keys(t).forEach((i) => {
|
|
1073
1073
|
e[i] = t[i];
|
|
1074
1074
|
});
|
|
@@ -1077,7 +1077,7 @@ const fe = () => ({
|
|
|
1077
1077
|
},
|
|
1078
1078
|
interpolation: {
|
|
1079
1079
|
escapeValue: !0,
|
|
1080
|
-
format: (
|
|
1080
|
+
format: (a) => a,
|
|
1081
1081
|
prefix: "{{",
|
|
1082
1082
|
suffix: "}}",
|
|
1083
1083
|
formatSeparator: ",",
|
|
@@ -1089,18 +1089,24 @@ const fe = () => ({
|
|
|
1089
1089
|
skipOnVariables: !0
|
|
1090
1090
|
},
|
|
1091
1091
|
cacheInBuiltFormats: !0
|
|
1092
|
-
}), Te = (
|
|
1092
|
+
}), Te = (a) => {
|
|
1093
1093
|
var e, t;
|
|
1094
|
-
return
|
|
1094
|
+
return g(a.ns) && (a.ns = [a.ns]), g(a.fallbackLng) && (a.fallbackLng = [a.fallbackLng]), g(a.fallbackNS) && (a.fallbackNS = [a.fallbackNS]), ((t = (e = a.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (a.supportedLngs = a.supportedLngs.concat(["cimode"])), typeof a.initImmediate == "boolean" && (a.initAsync = a.initImmediate), a;
|
|
1095
1095
|
}, W = () => {
|
|
1096
|
-
}, dt = (
|
|
1097
|
-
Object.getOwnPropertyNames(Object.getPrototypeOf(
|
|
1098
|
-
typeof
|
|
1096
|
+
}, dt = (a) => {
|
|
1097
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach((t) => {
|
|
1098
|
+
typeof a[t] == "function" && (a[t] = a[t].bind(a));
|
|
1099
1099
|
});
|
|
1100
|
+
}, ht = (a) => {
|
|
1101
|
+
var e, t, i, s, n, r, o, u, l;
|
|
1102
|
+
return !!(((i = (t = (e = a == null ? void 0 : a.modules) == null ? void 0 : e.backend) == null ? void 0 : t.name) == null ? void 0 : i.indexOf("Locize")) > 0 || ((o = (r = (n = (s = a == null ? void 0 : a.modules) == null ? void 0 : s.backend) == null ? void 0 : n.constructor) == null ? void 0 : r.name) == null ? void 0 : o.indexOf("Locize")) > 0 || (l = (u = a == null ? void 0 : a.options) == null ? void 0 : u.backend) != null && l.backends && a.options.backend.backends.some((f) => {
|
|
1103
|
+
var c, p, h;
|
|
1104
|
+
return ((c = f == null ? void 0 : f.name) == null ? void 0 : c.indexOf("Locize")) > 0 || ((h = (p = f == null ? void 0 : f.constructor) == null ? void 0 : p.name) == null ? void 0 : h.indexOf("Locize")) > 0;
|
|
1105
|
+
}));
|
|
1100
1106
|
};
|
|
1101
|
-
class
|
|
1107
|
+
class B extends Z {
|
|
1102
1108
|
constructor(e = {}, t) {
|
|
1103
|
-
if (super(), this.options = Te(e), this.services = {}, this.logger =
|
|
1109
|
+
if (super(), this.options = Te(e), this.services = {}, this.logger = k, this.modules = {
|
|
1104
1110
|
external: []
|
|
1105
1111
|
}, dt(this), t && !this.isInitialized && !e.isClone) {
|
|
1106
1112
|
if (!this.options.initAsync)
|
|
@@ -1111,7 +1117,7 @@ class z extends Z {
|
|
|
1111
1117
|
}
|
|
1112
1118
|
}
|
|
1113
1119
|
init(e = {}, t) {
|
|
1114
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
1120
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (g(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1115
1121
|
const i = fe();
|
|
1116
1122
|
this.options = {
|
|
1117
1123
|
...i,
|
|
@@ -1120,19 +1126,19 @@ class z extends Z {
|
|
|
1120
1126
|
}, this.options.interpolation = {
|
|
1121
1127
|
...i.interpolation,
|
|
1122
1128
|
...this.options.interpolation
|
|
1123
|
-
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = i.overloadTranslationOptionHandler), this.options.
|
|
1129
|
+
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = i.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !ht(this) && typeof console < "u" && typeof console.info < "u" && console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");
|
|
1124
1130
|
const s = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1125
1131
|
if (!this.options.isClone) {
|
|
1126
|
-
this.modules.logger ?
|
|
1132
|
+
this.modules.logger ? k.init(s(this.modules.logger), this.options) : k.init(null, this.options);
|
|
1127
1133
|
let l;
|
|
1128
1134
|
this.modules.formatter ? l = this.modules.formatter : l = ut;
|
|
1129
1135
|
const f = new Pe(this.options);
|
|
1130
1136
|
this.store = new ve(this.options.resources, this.options);
|
|
1131
1137
|
const c = this.services;
|
|
1132
|
-
c.logger =
|
|
1138
|
+
c.logger = k, c.resourceStore = this.store, c.languageUtils = f, c.pluralResolver = new rt(f, {
|
|
1133
1139
|
prepend: this.options.pluralSeparator,
|
|
1134
1140
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1135
|
-
}), this.options.interpolation.format && this.options.interpolation.format !== i.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = s(l), c.formatter.init && c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new
|
|
1141
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== i.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = s(l), c.formatter.init && c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new De(this.options), c.utils = {
|
|
1136
1142
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1137
1143
|
}, c.backendConnector = new ft(s(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", (h, ...d) => {
|
|
1138
1144
|
this.emit(h, ...d);
|
|
@@ -1161,9 +1167,9 @@ class z extends Z {
|
|
|
1161
1167
|
return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), o;
|
|
1162
1168
|
}
|
|
1163
1169
|
loadResources(e, t = W) {
|
|
1164
|
-
var n,
|
|
1170
|
+
var n, r;
|
|
1165
1171
|
let i = t;
|
|
1166
|
-
const s =
|
|
1172
|
+
const s = g(e) ? e : this.language;
|
|
1167
1173
|
if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1168
1174
|
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
|
|
1169
1175
|
const o = [], u = (l) => {
|
|
@@ -1172,7 +1178,7 @@ class z extends Z {
|
|
|
1172
1178
|
c !== "cimode" && o.indexOf(c) < 0 && o.push(c);
|
|
1173
1179
|
});
|
|
1174
1180
|
};
|
|
1175
|
-
s ? u(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => u(f)), (
|
|
1181
|
+
s ? u(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => u(f)), (r = (n = this.options.preload) == null ? void 0 : n.forEach) == null || r.call(n, (l) => u(l)), this.services.backendConnector.load(o, this.options.ns, (l) => {
|
|
1176
1182
|
!l && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(l);
|
|
1177
1183
|
});
|
|
1178
1184
|
} else
|
|
@@ -1209,33 +1215,33 @@ class z extends Z {
|
|
|
1209
1215
|
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
1210
1216
|
}, n = (o, u) => {
|
|
1211
1217
|
u ? this.isLanguageChangingTo === e && (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve((...l) => this.t(...l)), t && t(o, (...l) => this.t(...l));
|
|
1212
|
-
},
|
|
1218
|
+
}, r = (o) => {
|
|
1213
1219
|
var f, c;
|
|
1214
1220
|
!e && !o && this.services.languageDetector && (o = []);
|
|
1215
|
-
const u =
|
|
1216
|
-
l && (this.language || s(l), this.translator.language || this.translator.changeLanguage(l), (c = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || c.call(f, l)), this.loadResources(l, (
|
|
1217
|
-
n(
|
|
1221
|
+
const u = g(o) ? o : o && o[0], l = this.store.hasLanguageSomeTranslations(u) ? u : this.services.languageUtils.getBestMatchFromCodes(g(o) ? [o] : o);
|
|
1222
|
+
l && (this.language || s(l), this.translator.language || this.translator.changeLanguage(l), (c = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || c.call(f, l)), this.loadResources(l, (p) => {
|
|
1223
|
+
n(p, l);
|
|
1218
1224
|
});
|
|
1219
1225
|
};
|
|
1220
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
1226
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), i;
|
|
1221
1227
|
}
|
|
1222
1228
|
getFixedT(e, t, i) {
|
|
1223
|
-
const s = (n,
|
|
1229
|
+
const s = (n, r, ...o) => {
|
|
1224
1230
|
let u;
|
|
1225
|
-
typeof
|
|
1226
|
-
...
|
|
1231
|
+
typeof r != "object" ? u = this.options.overloadTranslationOptionHandler([n, r].concat(o)) : u = {
|
|
1232
|
+
...r
|
|
1227
1233
|
}, u.lng = u.lng || s.lng, u.lngs = u.lngs || s.lngs, u.ns = u.ns || s.ns, u.keyPrefix !== "" && (u.keyPrefix = u.keyPrefix || i || s.keyPrefix);
|
|
1228
1234
|
const l = this.options.keySeparator || ".";
|
|
1229
1235
|
let f;
|
|
1230
1236
|
return u.keyPrefix && Array.isArray(n) ? f = n.map((c) => (typeof c == "function" && (c = he(c, {
|
|
1231
1237
|
...this.options,
|
|
1232
|
-
...
|
|
1238
|
+
...r
|
|
1233
1239
|
})), `${u.keyPrefix}${l}${c}`)) : (typeof n == "function" && (n = he(n, {
|
|
1234
1240
|
...this.options,
|
|
1235
|
-
...
|
|
1241
|
+
...r
|
|
1236
1242
|
})), f = u.keyPrefix ? `${u.keyPrefix}${l}${n}` : n), this.t(f, u);
|
|
1237
1243
|
};
|
|
1238
|
-
return
|
|
1244
|
+
return g(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = i, s;
|
|
1239
1245
|
}
|
|
1240
1246
|
t(...e) {
|
|
1241
1247
|
var t;
|
|
@@ -1255,19 +1261,19 @@ class z extends Z {
|
|
|
1255
1261
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1256
1262
|
const i = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
|
|
1257
1263
|
if (i.toLowerCase() === "cimode") return !0;
|
|
1258
|
-
const
|
|
1264
|
+
const r = (o, u) => {
|
|
1259
1265
|
const l = this.services.backendConnector.state[`${o}|${u}`];
|
|
1260
1266
|
return l === -1 || l === 0 || l === 2;
|
|
1261
1267
|
};
|
|
1262
1268
|
if (t.precheck) {
|
|
1263
|
-
const o = t.precheck(this,
|
|
1269
|
+
const o = t.precheck(this, r);
|
|
1264
1270
|
if (o !== void 0) return o;
|
|
1265
1271
|
}
|
|
1266
|
-
return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages ||
|
|
1272
|
+
return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(i, e) && (!s || r(n, e)));
|
|
1267
1273
|
}
|
|
1268
1274
|
loadNamespaces(e, t) {
|
|
1269
1275
|
const i = U();
|
|
1270
|
-
return this.options.ns ? (
|
|
1276
|
+
return this.options.ns ? (g(e) && (e = [e]), e.forEach((s) => {
|
|
1271
1277
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
1272
1278
|
}), this.loadResources((s) => {
|
|
1273
1279
|
i.resolve(), t && t(s);
|
|
@@ -1275,19 +1281,19 @@ class z extends Z {
|
|
|
1275
1281
|
}
|
|
1276
1282
|
loadLanguages(e, t) {
|
|
1277
1283
|
const i = U();
|
|
1278
|
-
|
|
1279
|
-
const s = this.options.preload || [], n = e.filter((
|
|
1280
|
-
return n.length ? (this.options.preload = s.concat(n), this.loadResources((
|
|
1281
|
-
i.resolve(), t && t(
|
|
1284
|
+
g(e) && (e = [e]);
|
|
1285
|
+
const s = this.options.preload || [], n = e.filter((r) => s.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r));
|
|
1286
|
+
return n.length ? (this.options.preload = s.concat(n), this.loadResources((r) => {
|
|
1287
|
+
i.resolve(), t && t(r);
|
|
1282
1288
|
}), i) : (t && t(), Promise.resolve());
|
|
1283
1289
|
}
|
|
1284
1290
|
dir(e) {
|
|
1285
1291
|
var s, n;
|
|
1286
1292
|
if (e || (e = this.resolvedLanguage || (((s = this.languages) == null ? void 0 : s.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
1287
1293
|
try {
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
const o =
|
|
1294
|
+
const r = new Intl.Locale(e);
|
|
1295
|
+
if (r && r.getTextInfo) {
|
|
1296
|
+
const o = r.getTextInfo();
|
|
1291
1297
|
if (o && o.direction) return o.direction;
|
|
1292
1298
|
}
|
|
1293
1299
|
} catch {
|
|
@@ -1296,8 +1302,8 @@ class z extends Z {
|
|
|
1296
1302
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1297
1303
|
}
|
|
1298
1304
|
static createInstance(e = {}, t) {
|
|
1299
|
-
const i = new
|
|
1300
|
-
return i.createInstance =
|
|
1305
|
+
const i = new B(e, t);
|
|
1306
|
+
return i.createInstance = B.createInstance, i;
|
|
1301
1307
|
}
|
|
1302
1308
|
cloneInstance(e = {}, t = W) {
|
|
1303
1309
|
const i = e.forkResourceStore;
|
|
@@ -1306,7 +1312,7 @@ class z extends Z {
|
|
|
1306
1312
|
...this.options,
|
|
1307
1313
|
...e,
|
|
1308
1314
|
isClone: !0
|
|
1309
|
-
}, n = new
|
|
1315
|
+
}, n = new B(s);
|
|
1310
1316
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
|
|
1311
1317
|
n[o] = this[o];
|
|
1312
1318
|
}), n.services = {
|
|
@@ -1330,7 +1336,7 @@ class z extends Z {
|
|
|
1330
1336
|
...s,
|
|
1331
1337
|
interpolation: u
|
|
1332
1338
|
};
|
|
1333
|
-
n.services.interpolator = new
|
|
1339
|
+
n.services.interpolator = new De(l);
|
|
1334
1340
|
}
|
|
1335
1341
|
return n.translator = new Q(n.services, s), n.translator.on("*", (o, ...u) => {
|
|
1336
1342
|
n.emit(o, ...u);
|
|
@@ -1348,7 +1354,7 @@ class z extends Z {
|
|
|
1348
1354
|
};
|
|
1349
1355
|
}
|
|
1350
1356
|
}
|
|
1351
|
-
const b =
|
|
1357
|
+
const b = B.createInstance();
|
|
1352
1358
|
b.createInstance;
|
|
1353
1359
|
b.dir;
|
|
1354
1360
|
b.init;
|
|
@@ -1363,12 +1369,12 @@ b.setDefaultNamespace;
|
|
|
1363
1369
|
b.hasLoadedNamespace;
|
|
1364
1370
|
b.loadNamespaces;
|
|
1365
1371
|
b.loadLanguages;
|
|
1366
|
-
const
|
|
1372
|
+
const bs = (a) => {
|
|
1367
1373
|
var e, t;
|
|
1368
|
-
!((e =
|
|
1369
|
-
lng:
|
|
1374
|
+
!((e = a == null ? void 0 : a.i18n) != null && e.language) || !((t = a == null ? void 0 : a.i18n) != null && t.translations) || b.language === a.i18n.language && b.isInitialized || b.init({
|
|
1375
|
+
lng: a.i18n.language,
|
|
1370
1376
|
fallbackLng: "en",
|
|
1371
|
-
resources:
|
|
1377
|
+
resources: a.i18n.translations,
|
|
1372
1378
|
interpolation: {
|
|
1373
1379
|
escapeValue: !1
|
|
1374
1380
|
}
|
|
@@ -1380,25 +1386,25 @@ const ys = (r) => {
|
|
|
1380
1386
|
* This source code is licensed under the MIT license.
|
|
1381
1387
|
* See the LICENSE file in the root directory of this source tree.
|
|
1382
1388
|
*/
|
|
1383
|
-
const
|
|
1384
|
-
if (!
|
|
1385
|
-
const [t, i] =
|
|
1389
|
+
const pt = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 8v4", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], xs = qe("outline", "alert-circle", "AlertCircle", pt), gt = (a, e) => {
|
|
1390
|
+
if (!a || !a.includes("|")) return b.t(a, e);
|
|
1391
|
+
const [t, i] = a.split("|", 2).map((s) => s.trim());
|
|
1386
1392
|
return b.t(
|
|
1387
1393
|
[t, i].filter((s) => !!s),
|
|
1388
1394
|
e
|
|
1389
1395
|
);
|
|
1390
|
-
},
|
|
1396
|
+
}, Ss = (a) => {
|
|
1391
1397
|
const e = {};
|
|
1392
|
-
return Object.keys(
|
|
1393
|
-
const i =
|
|
1394
|
-
e[t] = typeof i == "string" ?
|
|
1398
|
+
return Object.keys(a).forEach((t) => {
|
|
1399
|
+
const i = a[t];
|
|
1400
|
+
e[t] = typeof i == "string" ? gt(i) : i;
|
|
1395
1401
|
}), e;
|
|
1396
1402
|
}, Ve = {
|
|
1397
1403
|
MARKDOWN: "Markdown",
|
|
1398
1404
|
JSON: "Json"
|
|
1399
1405
|
}, pe = X("DisplayFormat", {
|
|
1400
1406
|
label: "Display format",
|
|
1401
|
-
optionLabel: (
|
|
1407
|
+
optionLabel: (a) => a
|
|
1402
1408
|
});
|
|
1403
1409
|
w(pe, Ve.MARKDOWN);
|
|
1404
1410
|
w(pe, Ve.JSON);
|
|
@@ -1411,7 +1417,7 @@ const y = {
|
|
|
1411
1417
|
month: "month",
|
|
1412
1418
|
quarter: "quarter",
|
|
1413
1419
|
year: "year"
|
|
1414
|
-
},
|
|
1420
|
+
}, Os = [
|
|
1415
1421
|
{ value: y.second, label: "defaults.granularityOptions.second|Second" },
|
|
1416
1422
|
{ value: y.minute, label: "defaults.granularityOptions.minute|Minute" },
|
|
1417
1423
|
{ value: y.hour, label: "defaults.granularityOptions.hour|Hour" },
|
|
@@ -1422,40 +1428,40 @@ const y = {
|
|
|
1422
1428
|
{ value: y.year, label: "defaults.granularityOptions.year|Year" }
|
|
1423
1429
|
], ee = X("align", {
|
|
1424
1430
|
label: "Alignment",
|
|
1425
|
-
optionLabel: (
|
|
1431
|
+
optionLabel: (a) => a
|
|
1426
1432
|
});
|
|
1427
1433
|
w(ee, "left");
|
|
1428
1434
|
w(ee, "center");
|
|
1429
1435
|
w(ee, "right");
|
|
1430
1436
|
const te = X("tableCellStyle", {
|
|
1431
1437
|
label: "Table cell style",
|
|
1432
|
-
optionLabel: (
|
|
1438
|
+
optionLabel: (a) => a
|
|
1433
1439
|
});
|
|
1434
1440
|
w(te, "Bold");
|
|
1435
1441
|
w(te, "Italic");
|
|
1436
1442
|
w(te, "Positive vs Negative");
|
|
1437
|
-
const
|
|
1443
|
+
const mt = {
|
|
1438
1444
|
name: "number",
|
|
1439
1445
|
type: "number",
|
|
1440
1446
|
label: "Number"
|
|
1441
|
-
},
|
|
1447
|
+
}, yt = {
|
|
1442
1448
|
name: "string",
|
|
1443
1449
|
type: "string",
|
|
1444
1450
|
label: "String"
|
|
1445
|
-
},
|
|
1451
|
+
}, bt = {
|
|
1446
1452
|
name: "boolean",
|
|
1447
1453
|
type: "boolean",
|
|
1448
1454
|
label: "Boolean"
|
|
1449
|
-
},
|
|
1455
|
+
}, xt = {
|
|
1450
1456
|
name: "timeRange",
|
|
1451
1457
|
type: "timeRange",
|
|
1452
1458
|
label: "Time range"
|
|
1453
|
-
},
|
|
1459
|
+
}, St = {
|
|
1454
1460
|
name: "width",
|
|
1455
1461
|
type: "number",
|
|
1456
1462
|
label: "Width",
|
|
1457
1463
|
description: "You can input a number in pixels e.g. 400"
|
|
1458
|
-
},
|
|
1464
|
+
}, Ot = { name: "align", type: ee, label: "Align" }, se = { name: "prefix", type: "string", label: "Prefix" }, ie = { name: "suffix", type: "string", label: "Suffix" }, ne = {
|
|
1459
1465
|
name: "displayName",
|
|
1460
1466
|
type: "string",
|
|
1461
1467
|
label: "Display name"
|
|
@@ -1493,11 +1499,11 @@ const gt = {
|
|
|
1493
1499
|
label: "Granularity",
|
|
1494
1500
|
supportedTypes: ["time"],
|
|
1495
1501
|
defaultValue: y.day
|
|
1496
|
-
},
|
|
1502
|
+
}, Lt = {
|
|
1497
1503
|
type: Ae,
|
|
1498
1504
|
name: "color",
|
|
1499
1505
|
label: "Color"
|
|
1500
|
-
},
|
|
1506
|
+
}, Ct = {
|
|
1501
1507
|
name: "granularities",
|
|
1502
1508
|
type: "granularity",
|
|
1503
1509
|
label: "Granularities",
|
|
@@ -1512,11 +1518,11 @@ const gt = {
|
|
|
1512
1518
|
y.quarter,
|
|
1513
1519
|
y.year
|
|
1514
1520
|
]
|
|
1515
|
-
},
|
|
1521
|
+
}, wt = {
|
|
1516
1522
|
type: pe,
|
|
1517
1523
|
name: "displayFormat",
|
|
1518
1524
|
label: "Display format"
|
|
1519
|
-
},
|
|
1525
|
+
}, vt = {
|
|
1520
1526
|
type: te,
|
|
1521
1527
|
name: "tableCellStyle",
|
|
1522
1528
|
label: "Table cell style"
|
|
@@ -1535,7 +1541,7 @@ const gt = {
|
|
|
1535
1541
|
re,
|
|
1536
1542
|
oe,
|
|
1537
1543
|
le
|
|
1538
|
-
],
|
|
1544
|
+
], Rt = [
|
|
1539
1545
|
se,
|
|
1540
1546
|
ie,
|
|
1541
1547
|
ne,
|
|
@@ -1545,7 +1551,7 @@ const gt = {
|
|
|
1545
1551
|
le,
|
|
1546
1552
|
me,
|
|
1547
1553
|
ge
|
|
1548
|
-
],
|
|
1554
|
+
], Pt = [
|
|
1549
1555
|
se,
|
|
1550
1556
|
ie,
|
|
1551
1557
|
ne,
|
|
@@ -1562,12 +1568,12 @@ const gt = {
|
|
|
1562
1568
|
description: "Set a date range or connect your primary date-range variable to define the x-axis min and max. If “Show granularity dropdown” is enabled, this also enables auto-selection of the most appropriate granularity"
|
|
1563
1569
|
}
|
|
1564
1570
|
], Ke = {
|
|
1565
|
-
boolean:
|
|
1566
|
-
timeRange:
|
|
1567
|
-
number:
|
|
1568
|
-
string:
|
|
1569
|
-
width:
|
|
1570
|
-
align:
|
|
1571
|
+
boolean: bt,
|
|
1572
|
+
timeRange: xt,
|
|
1573
|
+
number: mt,
|
|
1574
|
+
string: yt,
|
|
1575
|
+
width: St,
|
|
1576
|
+
align: Ot,
|
|
1571
1577
|
prefix: se,
|
|
1572
1578
|
suffix: ie,
|
|
1573
1579
|
displayName: ne,
|
|
@@ -1577,29 +1583,29 @@ const gt = {
|
|
|
1577
1583
|
abbreviateLargeNumber: le,
|
|
1578
1584
|
dateBounds: ge,
|
|
1579
1585
|
granularity: me,
|
|
1580
|
-
granularities:
|
|
1581
|
-
color:
|
|
1582
|
-
displayFormat:
|
|
1583
|
-
tableCellStyle:
|
|
1586
|
+
granularities: Ct,
|
|
1587
|
+
color: Lt,
|
|
1588
|
+
displayFormat: wt,
|
|
1589
|
+
tableCellStyle: vt,
|
|
1584
1590
|
showGranularityDropdown: Me
|
|
1585
1591
|
}, V = X("comparisonPeriod", {
|
|
1586
1592
|
label: "Comparison period",
|
|
1587
|
-
optionLabel: (
|
|
1593
|
+
optionLabel: (a) => a
|
|
1588
1594
|
});
|
|
1589
1595
|
w(V, "Previous period");
|
|
1590
1596
|
w(V, "Previous week");
|
|
1591
1597
|
w(V, "Previous month");
|
|
1592
1598
|
w(V, "Previous quarter");
|
|
1593
1599
|
w(V, "Previous year");
|
|
1594
|
-
const
|
|
1600
|
+
const $t = {
|
|
1595
1601
|
name: "boolean",
|
|
1596
1602
|
type: "boolean",
|
|
1597
1603
|
label: "Boolean"
|
|
1598
|
-
},
|
|
1604
|
+
}, Nt = {
|
|
1599
1605
|
name: "timeRange",
|
|
1600
1606
|
type: "timeRange",
|
|
1601
1607
|
label: "Time range"
|
|
1602
|
-
},
|
|
1608
|
+
}, kt = {
|
|
1603
1609
|
name: "number",
|
|
1604
1610
|
type: "number",
|
|
1605
1611
|
label: "Number"
|
|
@@ -1612,23 +1618,23 @@ const Pt = {
|
|
|
1612
1618
|
type: "string",
|
|
1613
1619
|
label: "Title",
|
|
1614
1620
|
category: "Component Header"
|
|
1615
|
-
},
|
|
1621
|
+
}, Ft = {
|
|
1616
1622
|
name: "description",
|
|
1617
1623
|
type: "string",
|
|
1618
1624
|
label: "Description",
|
|
1619
1625
|
category: "Component Header"
|
|
1620
|
-
},
|
|
1626
|
+
}, Tt = {
|
|
1621
1627
|
name: "tooltip",
|
|
1622
1628
|
type: "string",
|
|
1623
1629
|
label: "Tooltip",
|
|
1624
1630
|
category: "Component Header"
|
|
1625
|
-
},
|
|
1631
|
+
}, At = {
|
|
1626
1632
|
name: "dataset",
|
|
1627
1633
|
type: "dataset",
|
|
1628
1634
|
label: "Dataset",
|
|
1629
1635
|
required: !0,
|
|
1630
1636
|
category: "Component Data"
|
|
1631
|
-
},
|
|
1637
|
+
}, jt = {
|
|
1632
1638
|
name: "maxLegendItems",
|
|
1633
1639
|
type: "number",
|
|
1634
1640
|
label: "Max legend items",
|
|
@@ -1644,15 +1650,15 @@ const Pt = {
|
|
|
1644
1650
|
required: !0,
|
|
1645
1651
|
category: "Component Data",
|
|
1646
1652
|
inputs: E
|
|
1647
|
-
},
|
|
1653
|
+
}, It = {
|
|
1648
1654
|
...Ue,
|
|
1649
1655
|
name: "groupBy",
|
|
1650
1656
|
label: "Group by"
|
|
1651
|
-
},
|
|
1657
|
+
}, Et = {
|
|
1652
1658
|
name: "granularity",
|
|
1653
1659
|
type: "granularity",
|
|
1654
1660
|
label: "Granularity"
|
|
1655
|
-
},
|
|
1661
|
+
}, Vt = {
|
|
1656
1662
|
name: "granularities",
|
|
1657
1663
|
type: "granularity",
|
|
1658
1664
|
label: "Granularities",
|
|
@@ -1666,7 +1672,7 @@ const Pt = {
|
|
|
1666
1672
|
y.quarter,
|
|
1667
1673
|
y.year
|
|
1668
1674
|
]
|
|
1669
|
-
},
|
|
1675
|
+
}, Mt = {
|
|
1670
1676
|
name: "dimensionSimple",
|
|
1671
1677
|
type: "dimension",
|
|
1672
1678
|
label: "Dimension",
|
|
@@ -1676,7 +1682,7 @@ const Pt = {
|
|
|
1676
1682
|
},
|
|
1677
1683
|
required: !0,
|
|
1678
1684
|
category: "Component Data"
|
|
1679
|
-
},
|
|
1685
|
+
}, Kt = {
|
|
1680
1686
|
name: "dimensionTime",
|
|
1681
1687
|
type: "dimension",
|
|
1682
1688
|
label: "Dimension time",
|
|
@@ -1687,7 +1693,7 @@ const Pt = {
|
|
|
1687
1693
|
},
|
|
1688
1694
|
required: !0,
|
|
1689
1695
|
category: "Component Data"
|
|
1690
|
-
},
|
|
1696
|
+
}, Ht = {
|
|
1691
1697
|
name: "dimension",
|
|
1692
1698
|
type: "dimension",
|
|
1693
1699
|
label: "Dimension",
|
|
@@ -1696,8 +1702,8 @@ const Pt = {
|
|
|
1696
1702
|
},
|
|
1697
1703
|
required: !0,
|
|
1698
1704
|
category: "Component Data",
|
|
1699
|
-
inputs:
|
|
1700
|
-
},
|
|
1705
|
+
inputs: Rt
|
|
1706
|
+
}, Ut = {
|
|
1701
1707
|
name: "dimension",
|
|
1702
1708
|
type: "dimension",
|
|
1703
1709
|
label: "Dimension",
|
|
@@ -1706,8 +1712,8 @@ const Pt = {
|
|
|
1706
1712
|
},
|
|
1707
1713
|
required: !0,
|
|
1708
1714
|
category: "Component Data",
|
|
1709
|
-
inputs:
|
|
1710
|
-
},
|
|
1715
|
+
inputs: Pt
|
|
1716
|
+
}, ze = {
|
|
1711
1717
|
name: "dimensions",
|
|
1712
1718
|
type: "dimension",
|
|
1713
1719
|
label: "Dimensions",
|
|
@@ -1718,7 +1724,7 @@ const Pt = {
|
|
|
1718
1724
|
required: !0,
|
|
1719
1725
|
category: "Component Data",
|
|
1720
1726
|
inputs: E
|
|
1721
|
-
},
|
|
1727
|
+
}, zt = {
|
|
1722
1728
|
name: "dimensionOrMeasure",
|
|
1723
1729
|
type: "dimensionOrMeasure",
|
|
1724
1730
|
label: "Dimension or measure",
|
|
@@ -1738,7 +1744,7 @@ const Pt = {
|
|
|
1738
1744
|
},
|
|
1739
1745
|
category: "Component Data",
|
|
1740
1746
|
inputs: E
|
|
1741
|
-
},
|
|
1747
|
+
}, Jt = {
|
|
1742
1748
|
name: "measure",
|
|
1743
1749
|
type: "measure",
|
|
1744
1750
|
label: "Measure",
|
|
@@ -1748,7 +1754,7 @@ const Pt = {
|
|
|
1748
1754
|
required: !0,
|
|
1749
1755
|
category: "Component Data",
|
|
1750
1756
|
inputs: E
|
|
1751
|
-
},
|
|
1757
|
+
}, Be = {
|
|
1752
1758
|
name: "measures",
|
|
1753
1759
|
type: "measure",
|
|
1754
1760
|
label: "Measures",
|
|
@@ -1759,204 +1765,204 @@ const Pt = {
|
|
|
1759
1765
|
required: !0,
|
|
1760
1766
|
category: "Component Data",
|
|
1761
1767
|
inputs: E
|
|
1762
|
-
},
|
|
1763
|
-
...
|
|
1768
|
+
}, Gt = {
|
|
1769
|
+
...Be,
|
|
1764
1770
|
name: "measureOptions",
|
|
1765
1771
|
label: "Measure options",
|
|
1766
1772
|
inputs: [Ke.displayName]
|
|
1767
|
-
},
|
|
1768
|
-
...
|
|
1773
|
+
}, qt = {
|
|
1774
|
+
...ze,
|
|
1769
1775
|
name: "dimensionOptions",
|
|
1770
1776
|
label: "Dimension options",
|
|
1771
1777
|
inputs: [Ke.displayName]
|
|
1772
|
-
},
|
|
1778
|
+
}, Wt = {
|
|
1773
1779
|
name: "comparisonPeriod",
|
|
1774
1780
|
type: V,
|
|
1775
1781
|
label: "Comparison period",
|
|
1776
1782
|
category: "Component data"
|
|
1777
|
-
},
|
|
1783
|
+
}, Yt = {
|
|
1778
1784
|
name: "maxResults",
|
|
1779
1785
|
type: "number",
|
|
1780
1786
|
label: "Max results",
|
|
1781
1787
|
category: "Component Settings",
|
|
1782
1788
|
defaultValue: 1e3
|
|
1783
|
-
},
|
|
1789
|
+
}, _t = {
|
|
1784
1790
|
name: "placeholder",
|
|
1785
1791
|
type: "string",
|
|
1786
1792
|
label: "Placeholder",
|
|
1787
1793
|
category: "Component Settings"
|
|
1788
|
-
},
|
|
1794
|
+
}, Qt = {
|
|
1789
1795
|
name: "showLegend",
|
|
1790
1796
|
type: "boolean",
|
|
1791
1797
|
label: "Show legend",
|
|
1792
1798
|
defaultValue: !0,
|
|
1793
1799
|
category: "Component Settings"
|
|
1794
|
-
},
|
|
1800
|
+
}, Xt = {
|
|
1795
1801
|
name: "showTooltips",
|
|
1796
1802
|
type: "boolean",
|
|
1797
1803
|
label: "Show tooltips",
|
|
1798
1804
|
defaultValue: !0,
|
|
1799
1805
|
category: "Component Settings"
|
|
1800
|
-
},
|
|
1806
|
+
}, Zt = {
|
|
1801
1807
|
name: "showValueLabels",
|
|
1802
1808
|
type: "boolean",
|
|
1803
1809
|
label: "Show value labels",
|
|
1804
1810
|
defaultValue: !0,
|
|
1805
1811
|
category: "Component Settings"
|
|
1806
|
-
},
|
|
1812
|
+
}, es = {
|
|
1807
1813
|
name: "showTotalLabels",
|
|
1808
1814
|
type: "boolean",
|
|
1809
1815
|
label: "Show total labels",
|
|
1810
1816
|
defaultValue: !1,
|
|
1811
1817
|
category: "Component Settings"
|
|
1812
|
-
},
|
|
1818
|
+
}, ts = {
|
|
1813
1819
|
name: "showLogarithmicScale",
|
|
1814
1820
|
type: "boolean",
|
|
1815
1821
|
label: "Show logarithmic scale",
|
|
1816
1822
|
defaultValue: !1,
|
|
1817
1823
|
category: "Component Settings"
|
|
1818
|
-
},
|
|
1824
|
+
}, ss = {
|
|
1819
1825
|
name: "displayPercentages",
|
|
1820
1826
|
type: "boolean",
|
|
1821
1827
|
label: "Display percentages",
|
|
1822
1828
|
defaultValue: !1,
|
|
1823
1829
|
category: "Component Settings"
|
|
1824
|
-
},
|
|
1830
|
+
}, is = {
|
|
1825
1831
|
type: Ae,
|
|
1826
1832
|
name: "color",
|
|
1827
1833
|
label: "Color",
|
|
1828
1834
|
category: "Component Settings"
|
|
1829
|
-
},
|
|
1835
|
+
}, ns = {
|
|
1830
1836
|
type: "number",
|
|
1831
1837
|
name: "fontSize",
|
|
1832
1838
|
label: "Font size",
|
|
1833
1839
|
category: "Component Settings"
|
|
1834
|
-
},
|
|
1840
|
+
}, as = {
|
|
1835
1841
|
type: "boolean",
|
|
1836
1842
|
name: "clearable",
|
|
1837
1843
|
label: "Can be cleared",
|
|
1838
1844
|
defaultValue: !0,
|
|
1839
1845
|
category: "Component Settings"
|
|
1840
|
-
},
|
|
1846
|
+
}, rs = {
|
|
1841
1847
|
...He,
|
|
1842
1848
|
name: "displayNullAs",
|
|
1843
1849
|
label: "Display null as",
|
|
1844
1850
|
category: "Component Settings"
|
|
1845
|
-
},
|
|
1851
|
+
}, os = {
|
|
1846
1852
|
name: "xAxisLabel",
|
|
1847
1853
|
type: "string",
|
|
1848
1854
|
label: "X-axis Label",
|
|
1849
1855
|
category: "Axes Settings"
|
|
1850
|
-
},
|
|
1856
|
+
}, ls = {
|
|
1851
1857
|
name: "yAxisLabel",
|
|
1852
1858
|
type: "string",
|
|
1853
1859
|
label: "Y-axis label",
|
|
1854
1860
|
category: "Axes Settings"
|
|
1855
|
-
},
|
|
1861
|
+
}, us = {
|
|
1856
1862
|
name: "reverseXAxis",
|
|
1857
1863
|
type: "boolean",
|
|
1858
1864
|
label: "Reverse x-axis",
|
|
1859
1865
|
defaultValue: !1,
|
|
1860
1866
|
category: "Axes Settings"
|
|
1861
|
-
},
|
|
1867
|
+
}, cs = {
|
|
1862
1868
|
name: "reverseYAxis",
|
|
1863
1869
|
type: "boolean",
|
|
1864
1870
|
label: "Reverse y-axis",
|
|
1865
1871
|
defaultValue: !1,
|
|
1866
1872
|
category: "Axes Settings"
|
|
1867
|
-
},
|
|
1873
|
+
}, fs = {
|
|
1868
1874
|
name: "yAxisRangeMin",
|
|
1869
1875
|
type: "number",
|
|
1870
1876
|
label: "Y-axis range min",
|
|
1871
1877
|
category: "Axes Settings"
|
|
1872
|
-
},
|
|
1878
|
+
}, ds = {
|
|
1873
1879
|
name: "yAxisRangeMax",
|
|
1874
1880
|
type: "number",
|
|
1875
1881
|
label: "Y-axis range max",
|
|
1876
1882
|
category: "Axes Settings"
|
|
1877
|
-
},
|
|
1883
|
+
}, hs = {
|
|
1878
1884
|
name: "xAxisRangeMin",
|
|
1879
1885
|
type: "number",
|
|
1880
1886
|
label: "X-axis range min",
|
|
1881
1887
|
category: "Axes Settings"
|
|
1882
|
-
},
|
|
1888
|
+
}, ps = {
|
|
1883
1889
|
name: "xAxisRangeMax",
|
|
1884
1890
|
type: "number",
|
|
1885
1891
|
label: "X-axis range max",
|
|
1886
1892
|
category: "Axes Settings"
|
|
1887
|
-
},
|
|
1893
|
+
}, gs = {
|
|
1888
1894
|
name: "xAxisMaxItems",
|
|
1889
1895
|
type: "number",
|
|
1890
1896
|
label: "Max x-axis items",
|
|
1891
1897
|
category: "Axes Settings"
|
|
1892
|
-
},
|
|
1898
|
+
}, ms = {
|
|
1893
1899
|
name: "yAxisMaxItems",
|
|
1894
1900
|
type: "number",
|
|
1895
1901
|
label: "Max y-axis items",
|
|
1896
1902
|
category: "Axes Settings"
|
|
1897
|
-
},
|
|
1898
|
-
boolean:
|
|
1899
|
-
timeRange:
|
|
1900
|
-
number:
|
|
1903
|
+
}, Ls = {
|
|
1904
|
+
boolean: $t,
|
|
1905
|
+
timeRange: Nt,
|
|
1906
|
+
number: kt,
|
|
1901
1907
|
string: He,
|
|
1902
1908
|
title: Dt,
|
|
1903
|
-
description:
|
|
1904
|
-
tooltip:
|
|
1905
|
-
dataset:
|
|
1906
|
-
maxLegendItems:
|
|
1909
|
+
description: Ft,
|
|
1910
|
+
tooltip: Tt,
|
|
1911
|
+
dataset: At,
|
|
1912
|
+
maxLegendItems: jt,
|
|
1907
1913
|
dimension: Ue,
|
|
1908
|
-
groupBy:
|
|
1909
|
-
dimensionSimple:
|
|
1910
|
-
dimensionTime:
|
|
1911
|
-
dimensionWithDateBounds:
|
|
1912
|
-
dimensionWithGranularitySelectField:
|
|
1913
|
-
dimensions:
|
|
1914
|
-
dimensionOrMeasure:
|
|
1914
|
+
groupBy: It,
|
|
1915
|
+
dimensionSimple: Mt,
|
|
1916
|
+
dimensionTime: Kt,
|
|
1917
|
+
dimensionWithDateBounds: Ht,
|
|
1918
|
+
dimensionWithGranularitySelectField: Ut,
|
|
1919
|
+
dimensions: ze,
|
|
1920
|
+
dimensionOrMeasure: zt,
|
|
1915
1921
|
dimensionsAndMeasures: Bt,
|
|
1916
|
-
measure:
|
|
1917
|
-
measures:
|
|
1918
|
-
measureOptions:
|
|
1919
|
-
dimensionOptions:
|
|
1920
|
-
comparisonPeriod:
|
|
1921
|
-
maxResults:
|
|
1922
|
-
placeholder:
|
|
1923
|
-
showLegend:
|
|
1924
|
-
showTooltips:
|
|
1925
|
-
showValueLabels:
|
|
1926
|
-
showTotalLabels:
|
|
1927
|
-
showLogarithmicScale:
|
|
1928
|
-
displayPercentages:
|
|
1929
|
-
color:
|
|
1930
|
-
fontSize:
|
|
1931
|
-
clearable:
|
|
1932
|
-
displayNullAs:
|
|
1933
|
-
xAxisLabel:
|
|
1934
|
-
yAxisLabel:
|
|
1935
|
-
reverseXAxis:
|
|
1936
|
-
reverseYAxis:
|
|
1937
|
-
yAxisRangeMin:
|
|
1938
|
-
yAxisRangeMax:
|
|
1939
|
-
xAxisRangeMin:
|
|
1940
|
-
xAxisRangeMax:
|
|
1941
|
-
xAxisMaxItems:
|
|
1942
|
-
yAxisMaxItems:
|
|
1943
|
-
granularity:
|
|
1944
|
-
granularities:
|
|
1922
|
+
measure: Jt,
|
|
1923
|
+
measures: Be,
|
|
1924
|
+
measureOptions: Gt,
|
|
1925
|
+
dimensionOptions: qt,
|
|
1926
|
+
comparisonPeriod: Wt,
|
|
1927
|
+
maxResults: Yt,
|
|
1928
|
+
placeholder: _t,
|
|
1929
|
+
showLegend: Qt,
|
|
1930
|
+
showTooltips: Xt,
|
|
1931
|
+
showValueLabels: Zt,
|
|
1932
|
+
showTotalLabels: es,
|
|
1933
|
+
showLogarithmicScale: ts,
|
|
1934
|
+
displayPercentages: ss,
|
|
1935
|
+
color: is,
|
|
1936
|
+
fontSize: ns,
|
|
1937
|
+
clearable: as,
|
|
1938
|
+
displayNullAs: rs,
|
|
1939
|
+
xAxisLabel: os,
|
|
1940
|
+
yAxisLabel: ls,
|
|
1941
|
+
reverseXAxis: us,
|
|
1942
|
+
reverseYAxis: cs,
|
|
1943
|
+
yAxisRangeMin: fs,
|
|
1944
|
+
yAxisRangeMax: ds,
|
|
1945
|
+
xAxisRangeMin: hs,
|
|
1946
|
+
xAxisRangeMax: ps,
|
|
1947
|
+
xAxisMaxItems: gs,
|
|
1948
|
+
yAxisMaxItems: ms,
|
|
1949
|
+
granularity: Et,
|
|
1950
|
+
granularities: Vt
|
|
1945
1951
|
};
|
|
1946
1952
|
export {
|
|
1947
1953
|
V as C,
|
|
1948
1954
|
Ve as D,
|
|
1949
1955
|
y as G,
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1956
|
+
xs as I,
|
|
1957
|
+
bs as a,
|
|
1958
|
+
Ls as b,
|
|
1959
|
+
Pt as c,
|
|
1954
1960
|
E as d,
|
|
1955
|
-
|
|
1956
|
-
|
|
1961
|
+
gt as e,
|
|
1962
|
+
Os as f,
|
|
1957
1963
|
b as i,
|
|
1958
|
-
|
|
1964
|
+
Ss as r,
|
|
1959
1965
|
Ke as s,
|
|
1960
|
-
|
|
1966
|
+
Rt as t
|
|
1961
1967
|
};
|
|
1962
|
-
//# sourceMappingURL=component.inputs.constants-
|
|
1968
|
+
//# sourceMappingURL=component.inputs.constants-C-pP69Lh.js.map
|