@sisense/sdk-ui-vue 1.33.0 → 1.34.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 +13 -13
- package/dist/ai.js +133 -125
- package/dist/index.cjs +1 -1
- package/dist/index.js +972 -951
- package/dist/packages/sdk-ui-vue/src/ai/helpers/context-connectors/ai-context-connector.d.ts +7 -0
- package/dist/packages/sdk-ui-vue/src/ai/helpers/context-connectors/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/ai/providers/{ai-context-provider.d.ts → ai-context-provider/ai-context-provider.d.ts} +1 -15
- package/dist/packages/sdk-ui-vue/src/ai/providers/ai-context-provider/ai-context.d.ts +9 -0
- package/dist/packages/sdk-ui-vue/src/ai/providers/ai-context-provider/index.d.ts +2 -0
- package/dist/packages/sdk-ui-vue/src/components/charts/scattermap-chart.d.ts +2 -2
- package/dist/packages/sdk-ui-vue/src/components/filters/relative-date-filter-tile.d.ts +2 -2
- package/dist/packages/sdk-ui-vue/src/composables/index.d.ts +1 -0
- package/dist/packages/sdk-ui-vue/src/composables/use-execute-csv-query.d.ts +43 -0
- package/dist/packages/sdk-ui-vue/src/composables/use-plugins.d.ts +1 -5
- package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/index.d.ts +3 -0
- package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/plugins-context-connector.d.ts +8 -0
- package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/sisense-context-connector.d.ts +6 -0
- package/dist/packages/sdk-ui-vue/src/helpers/context-connectors/theme-context-connector.d.ts +6 -0
- package/dist/packages/sdk-ui-vue/src/helpers/setup-helper.d.ts +21 -0
- package/dist/packages/sdk-ui-vue/src/helpers/use-reducer.d.ts +1 -1
- package/dist/packages/sdk-ui-vue/src/helpers/use-ref-state.d.ts +5 -0
- package/dist/packages/sdk-ui-vue/src/lib.d.ts +1 -1
- package/dist/packages/sdk-ui-vue/src/providers/index.d.ts +3 -3
- package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/index.d.ts +2 -0
- package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/plugins-context.d.ts +10 -0
- package/dist/packages/sdk-ui-vue/src/providers/plugins-provider/plugins-provider.d.ts +11 -0
- package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/index.d.ts +2 -0
- package/dist/packages/sdk-ui-vue/src/providers/{sisense-context-provider.d.ts → sisense-context-provider/sisense-context-provider.d.ts} +3 -16
- package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/sisense-context.d.ts +9 -0
- package/dist/packages/sdk-ui-vue/src/providers/theme-provider/index.d.ts +2 -0
- package/dist/packages/sdk-ui-vue/src/providers/theme-provider/theme-context.d.ts +7 -0
- package/dist/packages/sdk-ui-vue/src/providers/{theme-provider.d.ts → theme-provider/theme-provider.d.ts} +4 -13
- package/dist/{use-tracking-2d715e05.js → use-tracking-0536543b.js} +37321 -37192
- package/dist/use-tracking-07070102.cjs +1075 -0
- package/package.json +6 -4
- package/dist/packages/sdk-ui-vue/src/providers/plugins-provider.d.ts +0 -37
- package/dist/packages/sdk-ui-vue/src/setup-helper.d.ts +0 -31
- package/dist/use-tracking-bc424435.cjs +0 -1066
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { defineComponent as b, watch as
|
2
|
-
import { s as Nt,
|
3
|
-
import {
|
4
|
-
const
|
1
|
+
import { defineComponent as b, watch as M, toRefs as E, ref as _, onBeforeUnmount as nn, computed as Oe, openBlock as sn, createElementBlock as rn, renderSlot as Ne, createVNode as tt, unref as N, createElementVNode as an } from "vue";
|
2
|
+
import { s as Nt, Y as on, a as O, F as un, z as ln, R as cn, H as fn, P as dn, j as pn, B as gn, K as hn, b as mn, $ as bn, U as yn, W as On, c as Sn, _ as vn, V as xn, G as wn, q as Cn, Q as jn, p as Dn, x as Pn, d as Ln, g as Fn, r as k, i as De, e as En, k as We, f as At, h as Nn, l as An, o as Tn, m as Tt, n as Rt, S as nt, t as Mt, u as Se, v as It, w as Rn, y as B, A as U, C as V, D as I, E as C, X as $t, I as Mn, J as ze, L as In, M as $n, N as _n, O as kn, T as Bn, Z as Un, a0 as ee, a1 as Vn, a2 as Hn, a3 as Kn, a4 as Wn, a5 as zn, a6 as Gn, a7 as Jn, a8 as qn, a9 as Qn, aa as Yn, ab as Xn, ac as st, ad as Zn, ae as es, af as ts, ag as ns, ah as ss, ai as rs, aj as is, ak as as, al as os, am as us, an as ls, ao as G, ap as H } from "./use-tracking-0536543b.js";
|
3
|
+
import { as as qo, aq as Qo, ar as Yo, at as Xo } from "./use-tracking-0536543b.js";
|
4
|
+
const cs = b({
|
5
5
|
props: {
|
6
6
|
/**
|
7
7
|
* {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
|
@@ -28,8 +28,13 @@ const ir = b({
|
|
28
28
|
*/
|
29
29
|
filtersDisplayValues: Object
|
30
30
|
},
|
31
|
-
setup: (e, { slots: t }) => Nt(
|
32
|
-
|
31
|
+
setup: (e, { slots: t }) => Nt(
|
32
|
+
on,
|
33
|
+
e,
|
34
|
+
t,
|
35
|
+
[]
|
36
|
+
)
|
37
|
+
}), ro = b({
|
33
38
|
props: {
|
34
39
|
/**
|
35
40
|
* {@inheritDoc @sisense/sdk-ui!AreaChartProps.dataOptions}
|
@@ -93,8 +98,8 @@ const ir = b({
|
|
93
98
|
*/
|
94
99
|
onDataPointsSelected: Function
|
95
100
|
},
|
96
|
-
setup: (e) => O(
|
97
|
-
}),
|
101
|
+
setup: (e) => O(un, e)
|
102
|
+
}), io = b({
|
98
103
|
props: {
|
99
104
|
/**
|
100
105
|
* {@inheritDoc @sisense/sdk-ui!BarChartProps.dataOptions}
|
@@ -158,8 +163,8 @@ const ir = b({
|
|
158
163
|
*/
|
159
164
|
styleOptions: Object
|
160
165
|
},
|
161
|
-
setup: (e) => O(
|
162
|
-
}),
|
166
|
+
setup: (e) => O(ln, e)
|
167
|
+
}), ao = b({
|
163
168
|
props: {
|
164
169
|
/**
|
165
170
|
* {@inheritDoc @sisense/sdk-ui!ColumnChartProps.dataOptions}
|
@@ -223,8 +228,8 @@ const ir = b({
|
|
223
228
|
*/
|
224
229
|
styleOptions: Object
|
225
230
|
},
|
226
|
-
setup: (e) => O(
|
227
|
-
}),
|
231
|
+
setup: (e) => O(cn, e)
|
232
|
+
}), oo = b({
|
228
233
|
props: {
|
229
234
|
/**
|
230
235
|
* {@inheritDoc @sisense/sdk-ui!FunnelChartProps.dataOptions}
|
@@ -288,8 +293,8 @@ const ir = b({
|
|
288
293
|
*/
|
289
294
|
styleOptions: Object
|
290
295
|
},
|
291
|
-
setup: (e) => O(
|
292
|
-
}),
|
296
|
+
setup: (e) => O(fn, e)
|
297
|
+
}), uo = b({
|
293
298
|
props: {
|
294
299
|
/**
|
295
300
|
* {@inheritDoc @sisense/sdk-ui!LineChartProps.dataOptions}
|
@@ -353,8 +358,8 @@ const ir = b({
|
|
353
358
|
*/
|
354
359
|
styleOptions: Object
|
355
360
|
},
|
356
|
-
setup: (e) => O(
|
357
|
-
}),
|
361
|
+
setup: (e) => O(dn, e)
|
362
|
+
}), lo = b({
|
358
363
|
props: {
|
359
364
|
/**
|
360
365
|
* {@inheritDoc @sisense/sdk-ui!PieChartProps.dataOptions}
|
@@ -418,8 +423,8 @@ const ir = b({
|
|
418
423
|
*/
|
419
424
|
styleOptions: Object
|
420
425
|
},
|
421
|
-
setup: (e) => O(
|
422
|
-
}),
|
426
|
+
setup: (e) => O(pn, e)
|
427
|
+
}), co = b({
|
423
428
|
props: {
|
424
429
|
/**
|
425
430
|
* {@inheritDoc @sisense/sdk-ui!ScatterChartProps.dataOptions}
|
@@ -483,8 +488,8 @@ const ir = b({
|
|
483
488
|
*/
|
484
489
|
styleOptions: Object
|
485
490
|
},
|
486
|
-
setup: (e) => O(
|
487
|
-
}),
|
491
|
+
setup: (e) => O(gn, e)
|
492
|
+
}), fo = b({
|
488
493
|
props: {
|
489
494
|
/**
|
490
495
|
* {@inheritDoc @sisense/sdk-ui!TableProps.dataOptions}
|
@@ -513,8 +518,8 @@ const ir = b({
|
|
513
518
|
*/
|
514
519
|
styleOptions: Object
|
515
520
|
},
|
516
|
-
setup: (e) => O(
|
517
|
-
}),
|
521
|
+
setup: (e) => O(hn, e)
|
522
|
+
}), po = b({
|
518
523
|
props: {
|
519
524
|
/**
|
520
525
|
* {@inheritDoc @sisense/sdk-ui!PivotTableProps.dataOptions}
|
@@ -549,8 +554,8 @@ const ir = b({
|
|
549
554
|
*/
|
550
555
|
styleOptions: Object
|
551
556
|
},
|
552
|
-
setup: (e) => O(
|
553
|
-
}),
|
557
|
+
setup: (e) => O(mn, e)
|
558
|
+
}), go = b({
|
554
559
|
props: {
|
555
560
|
/**
|
556
561
|
* {@inheritDoc @sisense/sdk-ui!TreemapChartProps.dataOptions}
|
@@ -614,8 +619,8 @@ const ir = b({
|
|
614
619
|
*/
|
615
620
|
styleOptions: Object
|
616
621
|
},
|
617
|
-
setup: (e) => O(
|
618
|
-
}),
|
622
|
+
setup: (e) => O(bn, e)
|
623
|
+
}), ho = b({
|
619
624
|
props: {
|
620
625
|
/**
|
621
626
|
* {@inheritDoc @sisense/sdk-ui!SunburstChartProps.dataOptions}
|
@@ -679,8 +684,8 @@ const ir = b({
|
|
679
684
|
*/
|
680
685
|
styleOptions: Object
|
681
686
|
},
|
682
|
-
setup: (e) => O(
|
683
|
-
}),
|
687
|
+
setup: (e) => O(yn, e)
|
688
|
+
}), mo = b({
|
684
689
|
props: {
|
685
690
|
/**
|
686
691
|
* {@inheritDoc @sisense/sdk-ui!PolarChartProps.dataOptions}
|
@@ -744,8 +749,8 @@ const ir = b({
|
|
744
749
|
*/
|
745
750
|
styleOptions: Object
|
746
751
|
},
|
747
|
-
setup: (e) => O(
|
748
|
-
}),
|
752
|
+
setup: (e) => O(On, e)
|
753
|
+
}), bo = b({
|
749
754
|
props: {
|
750
755
|
/**
|
751
756
|
* {@inheritDoc @sisense/sdk-ui!IndicatorChartProps.dataOptions}
|
@@ -791,8 +796,8 @@ const ir = b({
|
|
791
796
|
*/
|
792
797
|
onDataReady: Function
|
793
798
|
},
|
794
|
-
setup: (e) => O(
|
795
|
-
}),
|
799
|
+
setup: (e) => O(Sn, e)
|
800
|
+
}), yo = b({
|
796
801
|
props: {
|
797
802
|
/**
|
798
803
|
* {@inheritDoc @sisense/sdk-ui!ChartProps.chartType}
|
@@ -866,8 +871,8 @@ const ir = b({
|
|
866
871
|
*/
|
867
872
|
refreshCounter: Number
|
868
873
|
},
|
869
|
-
setup: (e) => O(
|
870
|
-
}),
|
874
|
+
setup: (e) => O(vn, e)
|
875
|
+
}), Oo = b({
|
871
876
|
props: {
|
872
877
|
/**
|
873
878
|
* {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.dataOptions}
|
@@ -931,8 +936,8 @@ const ir = b({
|
|
931
936
|
*/
|
932
937
|
onDataPointsSelected: Function
|
933
938
|
},
|
934
|
-
setup: (e) => O(
|
935
|
-
}),
|
939
|
+
setup: (e) => O(xn, e)
|
940
|
+
}), So = b({
|
936
941
|
props: {
|
937
942
|
/**
|
938
943
|
* {@inheritDoc @sisense/sdk-ui!AreamapChartProps.dataOptions}
|
@@ -978,8 +983,8 @@ const ir = b({
|
|
978
983
|
*/
|
979
984
|
onDataPointClick: Function
|
980
985
|
},
|
981
|
-
setup: (e) => O(
|
982
|
-
}),
|
986
|
+
setup: (e) => O(wn, e)
|
987
|
+
}), vo = b({
|
983
988
|
props: {
|
984
989
|
/**
|
985
990
|
* {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.dataOptions}
|
@@ -1025,8 +1030,8 @@ const ir = b({
|
|
1025
1030
|
*/
|
1026
1031
|
onDataPointClick: Object
|
1027
1032
|
},
|
1028
|
-
setup: (e) => O(
|
1029
|
-
}),
|
1033
|
+
setup: (e) => O(Cn, e)
|
1034
|
+
}), xo = b({
|
1030
1035
|
props: {
|
1031
1036
|
/**
|
1032
1037
|
* {@inheritDoc @sisense/sdk-ui!AreaRangeChartProps.dataOptions}
|
@@ -1090,8 +1095,8 @@ const ir = b({
|
|
1090
1095
|
*/
|
1091
1096
|
styleOptions: Object
|
1092
1097
|
},
|
1093
|
-
setup: (e) => O(
|
1094
|
-
}),
|
1098
|
+
setup: (e) => O(jn, e)
|
1099
|
+
}), wo = b({
|
1095
1100
|
props: {
|
1096
1101
|
/**
|
1097
1102
|
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.attribute}
|
@@ -1139,8 +1144,8 @@ const ir = b({
|
|
1139
1144
|
*/
|
1140
1145
|
onEdit: Function
|
1141
1146
|
},
|
1142
|
-
setup: (e) => O(
|
1143
|
-
}),
|
1147
|
+
setup: (e) => O(Dn, e)
|
1148
|
+
}), Co = b({
|
1144
1149
|
props: {
|
1145
1150
|
/**
|
1146
1151
|
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.attribute}
|
@@ -1175,8 +1180,8 @@ const ir = b({
|
|
1175
1180
|
*/
|
1176
1181
|
onEdit: Function
|
1177
1182
|
},
|
1178
|
-
setup: (e) => O(
|
1179
|
-
}),
|
1183
|
+
setup: (e) => O(Pn, e)
|
1184
|
+
}), jo = b({
|
1180
1185
|
props: {
|
1181
1186
|
/**
|
1182
1187
|
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.arrangement}
|
@@ -1207,8 +1212,8 @@ const ir = b({
|
|
1207
1212
|
*/
|
1208
1213
|
onEdit: Function
|
1209
1214
|
},
|
1210
|
-
setup: (e) => O(
|
1211
|
-
}),
|
1215
|
+
setup: (e) => O(Ln, e)
|
1216
|
+
}), Do = b({
|
1212
1217
|
props: {
|
1213
1218
|
/**
|
1214
1219
|
* {@inheritDoc @sisense/sdk-ui!RelativeDateFilterTileProps.title}
|
@@ -1244,8 +1249,8 @@ const ir = b({
|
|
1244
1249
|
*/
|
1245
1250
|
onEdit: Function
|
1246
1251
|
},
|
1247
|
-
setup: (e) => O(
|
1248
|
-
}),
|
1252
|
+
setup: (e) => O(Fn, e)
|
1253
|
+
}), fs = {
|
1249
1254
|
type: "logger",
|
1250
1255
|
log(e) {
|
1251
1256
|
this.output("log", e);
|
@@ -1267,30 +1272,30 @@ class ve {
|
|
1267
1272
|
}
|
1268
1273
|
init(t) {
|
1269
1274
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
1270
|
-
this.prefix = n.prefix || "i18next:", this.logger = t ||
|
1275
|
+
this.prefix = n.prefix || "i18next:", this.logger = t || fs, this.options = n, this.debug = n.debug;
|
1271
1276
|
}
|
1272
1277
|
log() {
|
1273
|
-
for (var t = arguments.length, n = new Array(t),
|
1274
|
-
n[
|
1278
|
+
for (var t = arguments.length, n = new Array(t), s = 0; s < t; s++)
|
1279
|
+
n[s] = arguments[s];
|
1275
1280
|
return this.forward(n, "log", "", !0);
|
1276
1281
|
}
|
1277
1282
|
warn() {
|
1278
|
-
for (var t = arguments.length, n = new Array(t),
|
1279
|
-
n[
|
1283
|
+
for (var t = arguments.length, n = new Array(t), s = 0; s < t; s++)
|
1284
|
+
n[s] = arguments[s];
|
1280
1285
|
return this.forward(n, "warn", "", !0);
|
1281
1286
|
}
|
1282
1287
|
error() {
|
1283
|
-
for (var t = arguments.length, n = new Array(t),
|
1284
|
-
n[
|
1288
|
+
for (var t = arguments.length, n = new Array(t), s = 0; s < t; s++)
|
1289
|
+
n[s] = arguments[s];
|
1285
1290
|
return this.forward(n, "error", "");
|
1286
1291
|
}
|
1287
1292
|
deprecate() {
|
1288
|
-
for (var t = arguments.length, n = new Array(t),
|
1289
|
-
n[
|
1293
|
+
for (var t = arguments.length, n = new Array(t), s = 0; s < t; s++)
|
1294
|
+
n[s] = arguments[s];
|
1290
1295
|
return this.forward(n, "warn", "WARNING DEPRECATED: ", !0);
|
1291
1296
|
}
|
1292
|
-
forward(t, n,
|
1293
|
-
return
|
1297
|
+
forward(t, n, s, r) {
|
1298
|
+
return r && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${s}${this.prefix} ${t[0]}`), this.logger[n](t));
|
1294
1299
|
}
|
1295
1300
|
create(t) {
|
1296
1301
|
return new ve(this.logger, {
|
@@ -1308,8 +1313,8 @@ class Pe {
|
|
1308
1313
|
this.observers = {};
|
1309
1314
|
}
|
1310
1315
|
on(t, n) {
|
1311
|
-
return t.split(" ").forEach((
|
1312
|
-
this.observers[
|
1316
|
+
return t.split(" ").forEach((s) => {
|
1317
|
+
this.observers[s] = this.observers[s] || [], this.observers[s].push(n);
|
1313
1318
|
}), this;
|
1314
1319
|
}
|
1315
1320
|
off(t, n) {
|
@@ -1318,88 +1323,88 @@ class Pe {
|
|
1318
1323
|
delete this.observers[t];
|
1319
1324
|
return;
|
1320
1325
|
}
|
1321
|
-
this.observers[t] = this.observers[t].filter((
|
1326
|
+
this.observers[t] = this.observers[t].filter((s) => s !== n);
|
1322
1327
|
}
|
1323
1328
|
}
|
1324
1329
|
emit(t) {
|
1325
|
-
for (var n = arguments.length,
|
1326
|
-
r
|
1330
|
+
for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
|
1331
|
+
s[r - 1] = arguments[r];
|
1327
1332
|
this.observers[t] && [].concat(this.observers[t]).forEach((a) => {
|
1328
|
-
a(...
|
1333
|
+
a(...s);
|
1329
1334
|
}), this.observers["*"] && [].concat(this.observers["*"]).forEach((a) => {
|
1330
|
-
a.apply(a, [t, ...
|
1335
|
+
a.apply(a, [t, ...s]);
|
1331
1336
|
});
|
1332
1337
|
}
|
1333
1338
|
}
|
1334
1339
|
function ae() {
|
1335
1340
|
let e, t;
|
1336
|
-
const n = new Promise((
|
1337
|
-
e =
|
1341
|
+
const n = new Promise((s, r) => {
|
1342
|
+
e = s, t = r;
|
1338
1343
|
});
|
1339
1344
|
return n.resolve = e, n.reject = t, n;
|
1340
1345
|
}
|
1341
|
-
function
|
1346
|
+
function rt(e) {
|
1342
1347
|
return e == null ? "" : "" + e;
|
1343
1348
|
}
|
1344
|
-
function
|
1345
|
-
e.forEach((
|
1346
|
-
t[
|
1349
|
+
function ds(e, t, n) {
|
1350
|
+
e.forEach((s) => {
|
1351
|
+
t[s] && (n[s] = t[s]);
|
1347
1352
|
});
|
1348
1353
|
}
|
1349
|
-
function
|
1350
|
-
function
|
1354
|
+
function Ge(e, t, n) {
|
1355
|
+
function s(a) {
|
1351
1356
|
return a && a.indexOf("###") > -1 ? a.replace(/###/g, ".") : a;
|
1352
1357
|
}
|
1353
|
-
function
|
1358
|
+
function r() {
|
1354
1359
|
return !e || typeof e == "string";
|
1355
1360
|
}
|
1356
1361
|
const i = typeof t != "string" ? [].concat(t) : t.split(".");
|
1357
1362
|
for (; i.length > 1; ) {
|
1358
|
-
if (
|
1363
|
+
if (r())
|
1359
1364
|
return {};
|
1360
|
-
const a =
|
1365
|
+
const a = s(i.shift());
|
1361
1366
|
!e[a] && n && (e[a] = new n()), Object.prototype.hasOwnProperty.call(e, a) ? e = e[a] : e = {};
|
1362
1367
|
}
|
1363
|
-
return
|
1368
|
+
return r() ? {} : {
|
1364
1369
|
obj: e,
|
1365
|
-
k:
|
1370
|
+
k: s(i.shift())
|
1366
1371
|
};
|
1367
1372
|
}
|
1368
1373
|
function it(e, t, n) {
|
1369
1374
|
const {
|
1370
|
-
obj:
|
1371
|
-
k:
|
1372
|
-
} =
|
1373
|
-
r
|
1375
|
+
obj: s,
|
1376
|
+
k: r
|
1377
|
+
} = Ge(e, t, Object);
|
1378
|
+
s[r] = n;
|
1374
1379
|
}
|
1375
|
-
function
|
1380
|
+
function ps(e, t, n, s) {
|
1376
1381
|
const {
|
1377
|
-
obj:
|
1382
|
+
obj: r,
|
1378
1383
|
k: i
|
1379
|
-
} =
|
1380
|
-
|
1384
|
+
} = Ge(e, t, Object);
|
1385
|
+
r[i] = r[i] || [], s && (r[i] = r[i].concat(n)), s || r[i].push(n);
|
1381
1386
|
}
|
1382
1387
|
function xe(e, t) {
|
1383
1388
|
const {
|
1384
1389
|
obj: n,
|
1385
|
-
k:
|
1386
|
-
} =
|
1390
|
+
k: s
|
1391
|
+
} = Ge(e, t);
|
1387
1392
|
if (n)
|
1388
|
-
return n[
|
1393
|
+
return n[s];
|
1389
1394
|
}
|
1390
|
-
function
|
1391
|
-
const
|
1392
|
-
return
|
1395
|
+
function gs(e, t, n) {
|
1396
|
+
const s = xe(e, n);
|
1397
|
+
return s !== void 0 ? s : xe(t, n);
|
1393
1398
|
}
|
1394
1399
|
function _t(e, t, n) {
|
1395
|
-
for (const
|
1396
|
-
|
1400
|
+
for (const s in t)
|
1401
|
+
s !== "__proto__" && s !== "constructor" && (s in e ? typeof e[s] == "string" || e[s] instanceof String || typeof t[s] == "string" || t[s] instanceof String ? n && (e[s] = t[s]) : _t(e[s], t[s], n) : e[s] = t[s]);
|
1397
1402
|
return e;
|
1398
1403
|
}
|
1399
1404
|
function X(e) {
|
1400
1405
|
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
1401
1406
|
}
|
1402
|
-
var
|
1407
|
+
var hs = {
|
1403
1408
|
"&": "&",
|
1404
1409
|
"<": "<",
|
1405
1410
|
">": ">",
|
@@ -1407,20 +1412,20 @@ var cr = {
|
|
1407
1412
|
"'": "'",
|
1408
1413
|
"/": "/"
|
1409
1414
|
};
|
1410
|
-
function
|
1411
|
-
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) =>
|
1415
|
+
function ms(e) {
|
1416
|
+
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) => hs[t]) : e;
|
1412
1417
|
}
|
1413
|
-
const
|
1414
|
-
function
|
1418
|
+
const bs = [" ", ",", "?", "!", ";"];
|
1419
|
+
function ys(e, t, n) {
|
1415
1420
|
t = t || "", n = n || "";
|
1416
|
-
const
|
1417
|
-
if (
|
1421
|
+
const s = bs.filter((a) => t.indexOf(a) < 0 && n.indexOf(a) < 0);
|
1422
|
+
if (s.length === 0)
|
1418
1423
|
return !0;
|
1419
|
-
const
|
1420
|
-
let i = !
|
1424
|
+
const r = new RegExp(`(${s.map((a) => a === "?" ? "\\?" : a).join("|")})`);
|
1425
|
+
let i = !r.test(e);
|
1421
1426
|
if (!i) {
|
1422
1427
|
const a = e.indexOf(n);
|
1423
|
-
a > 0 && !
|
1428
|
+
a > 0 && !r.test(e.substring(0, a)) && (i = !0);
|
1424
1429
|
}
|
1425
1430
|
return i;
|
1426
1431
|
}
|
@@ -1430,15 +1435,15 @@ function we(e, t) {
|
|
1430
1435
|
return;
|
1431
1436
|
if (e[t])
|
1432
1437
|
return e[t];
|
1433
|
-
const
|
1434
|
-
let
|
1435
|
-
for (let i = 0; i <
|
1436
|
-
if (!
|
1438
|
+
const s = t.split(n);
|
1439
|
+
let r = e;
|
1440
|
+
for (let i = 0; i < s.length; ++i) {
|
1441
|
+
if (!r || typeof r[s[i]] == "string" && i + 1 < s.length)
|
1437
1442
|
return;
|
1438
|
-
if (s[
|
1439
|
-
let a = 2, o =
|
1440
|
-
for (; u === void 0 &&
|
1441
|
-
a++, o =
|
1443
|
+
if (r[s[i]] === void 0) {
|
1444
|
+
let a = 2, o = s.slice(i, i + a).join(n), u = r[o];
|
1445
|
+
for (; u === void 0 && s.length > i + a; )
|
1446
|
+
a++, o = s.slice(i, i + a).join(n), u = r[o];
|
1442
1447
|
if (u === void 0)
|
1443
1448
|
return;
|
1444
1449
|
if (u === null)
|
@@ -1449,12 +1454,12 @@ function we(e, t) {
|
|
1449
1454
|
if (o && typeof u[o] == "string")
|
1450
1455
|
return u[o];
|
1451
1456
|
}
|
1452
|
-
const c =
|
1457
|
+
const c = s.slice(i + a).join(n);
|
1453
1458
|
return c ? we(u, c, n) : void 0;
|
1454
1459
|
}
|
1455
|
-
|
1460
|
+
r = r[s[i]];
|
1456
1461
|
}
|
1457
|
-
return
|
1462
|
+
return r;
|
1458
1463
|
}
|
1459
1464
|
function Ce(e) {
|
1460
1465
|
return e && e.indexOf("_") > 0 ? e.replace("_", "-") : e;
|
@@ -1474,42 +1479,42 @@ class at extends Pe {
|
|
1474
1479
|
const n = this.options.ns.indexOf(t);
|
1475
1480
|
n > -1 && this.options.ns.splice(n, 1);
|
1476
1481
|
}
|
1477
|
-
getResource(t, n,
|
1478
|
-
let
|
1479
|
-
const i =
|
1482
|
+
getResource(t, n, s) {
|
1483
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
1484
|
+
const i = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator, a = r.ignoreJSONStructure !== void 0 ? r.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
1480
1485
|
let o = [t, n];
|
1481
|
-
|
1486
|
+
s && typeof s != "string" && (o = o.concat(s)), s && typeof s == "string" && (o = o.concat(i ? s.split(i) : s)), t.indexOf(".") > -1 && (o = t.split("."));
|
1482
1487
|
const u = xe(this.data, o);
|
1483
|
-
return u || !a || typeof
|
1488
|
+
return u || !a || typeof s != "string" ? u : we(this.data && this.data[t] && this.data[t][n], s, i);
|
1484
1489
|
}
|
1485
|
-
addResource(t, n,
|
1490
|
+
addResource(t, n, s, r) {
|
1486
1491
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
1487
1492
|
silent: !1
|
1488
1493
|
};
|
1489
1494
|
const a = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator;
|
1490
1495
|
let o = [t, n];
|
1491
|
-
|
1496
|
+
s && (o = o.concat(a ? s.split(a) : s)), t.indexOf(".") > -1 && (o = t.split("."), r = n, n = o[1]), this.addNamespaces(n), it(this.data, o, r), i.silent || this.emit("added", t, n, s, r);
|
1492
1497
|
}
|
1493
|
-
addResources(t, n,
|
1494
|
-
let
|
1498
|
+
addResources(t, n, s) {
|
1499
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
|
1495
1500
|
silent: !1
|
1496
1501
|
};
|
1497
|
-
for (const i in
|
1498
|
-
(typeof
|
1502
|
+
for (const i in s)
|
1503
|
+
(typeof s[i] == "string" || Object.prototype.toString.apply(s[i]) === "[object Array]") && this.addResource(t, n, i, s[i], {
|
1499
1504
|
silent: !0
|
1500
1505
|
});
|
1501
|
-
|
1506
|
+
r.silent || this.emit("added", t, n, s);
|
1502
1507
|
}
|
1503
|
-
addResourceBundle(t, n,
|
1508
|
+
addResourceBundle(t, n, s, r, i) {
|
1504
1509
|
let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
|
1505
1510
|
silent: !1
|
1506
1511
|
}, o = [t, n];
|
1507
|
-
t.indexOf(".") > -1 && (o = t.split("."),
|
1512
|
+
t.indexOf(".") > -1 && (o = t.split("."), r = s, s = n, n = o[1]), this.addNamespaces(n);
|
1508
1513
|
let u = xe(this.data, o) || {};
|
1509
|
-
|
1514
|
+
r ? _t(u, s, i) : u = {
|
1510
1515
|
...u,
|
1511
|
-
...
|
1512
|
-
}, it(this.data, o, u), a.silent || this.emit("added", t, n,
|
1516
|
+
...s
|
1517
|
+
}, it(this.data, o, u), a.silent || this.emit("added", t, n, s);
|
1513
1518
|
}
|
1514
1519
|
removeResourceBundle(t, n) {
|
1515
1520
|
this.hasResourceBundle(t, n) && delete this.data[t][n], this.removeNamespaces(n), this.emit("removed", t, n);
|
@@ -1527,7 +1532,7 @@ class at extends Pe {
|
|
1527
1532
|
}
|
1528
1533
|
hasLanguageSomeTranslations(t) {
|
1529
1534
|
const n = this.getDataByLanguage(t);
|
1530
|
-
return !!(n && Object.keys(n) || []).find((
|
1535
|
+
return !!(n && Object.keys(n) || []).find((r) => n[r] && Object.keys(n[r]).length > 0);
|
1531
1536
|
}
|
1532
1537
|
toJSON() {
|
1533
1538
|
return this.data;
|
@@ -1538,9 +1543,9 @@ var kt = {
|
|
1538
1543
|
addPostProcessor(e) {
|
1539
1544
|
this.processors[e.name] = e;
|
1540
1545
|
},
|
1541
|
-
handle(e, t, n,
|
1546
|
+
handle(e, t, n, s, r) {
|
1542
1547
|
return e.forEach((i) => {
|
1543
|
-
this.processors[i] && (t = this.processors[i].process(t, n,
|
1548
|
+
this.processors[i] && (t = this.processors[i].process(t, n, s, r));
|
1544
1549
|
}), t;
|
1545
1550
|
}
|
1546
1551
|
};
|
@@ -1548,7 +1553,7 @@ const ot = {};
|
|
1548
1553
|
class je extends Pe {
|
1549
1554
|
constructor(t) {
|
1550
1555
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
1551
|
-
super(),
|
1556
|
+
super(), ds(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = R.create("translator");
|
1552
1557
|
}
|
1553
1558
|
changeLanguage(t) {
|
1554
1559
|
t && (this.language = t);
|
@@ -1559,15 +1564,15 @@ class je extends Pe {
|
|
1559
1564
|
};
|
1560
1565
|
if (t == null)
|
1561
1566
|
return !1;
|
1562
|
-
const
|
1563
|
-
return
|
1567
|
+
const s = this.resolve(t, n);
|
1568
|
+
return s && s.res !== void 0;
|
1564
1569
|
}
|
1565
1570
|
extractFromKey(t, n) {
|
1566
|
-
let
|
1567
|
-
|
1568
|
-
const
|
1571
|
+
let s = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator;
|
1572
|
+
s === void 0 && (s = ":");
|
1573
|
+
const r = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
1569
1574
|
let i = n.ns || this.options.defaultNS || [];
|
1570
|
-
const a =
|
1575
|
+
const a = s && t.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !ys(t, s, r);
|
1571
1576
|
if (a && !o) {
|
1572
1577
|
const u = t.match(this.interpolator.nestingRegexp);
|
1573
1578
|
if (u && u.length > 0)
|
@@ -1575,28 +1580,28 @@ class je extends Pe {
|
|
1575
1580
|
key: t,
|
1576
1581
|
namespaces: i
|
1577
1582
|
};
|
1578
|
-
const c = t.split(
|
1579
|
-
(
|
1583
|
+
const c = t.split(s);
|
1584
|
+
(s !== r || s === r && this.options.ns.indexOf(c[0]) > -1) && (i = c.shift()), t = c.join(r);
|
1580
1585
|
}
|
1581
1586
|
return typeof i == "string" && (i = [i]), {
|
1582
1587
|
key: t,
|
1583
1588
|
namespaces: i
|
1584
1589
|
};
|
1585
1590
|
}
|
1586
|
-
translate(t, n,
|
1591
|
+
translate(t, n, s) {
|
1587
1592
|
if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), typeof n == "object" && (n = {
|
1588
1593
|
...n
|
1589
1594
|
}), n || (n = {}), t == null)
|
1590
1595
|
return "";
|
1591
1596
|
Array.isArray(t) || (t = [String(t)]);
|
1592
|
-
const
|
1597
|
+
const r = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails, i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, {
|
1593
1598
|
key: a,
|
1594
1599
|
namespaces: o
|
1595
1600
|
} = this.extractFromKey(t[t.length - 1], n), u = o[o.length - 1], c = n.lng || this.language, f = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
1596
1601
|
if (c && c.toLowerCase() === "cimode") {
|
1597
1602
|
if (f) {
|
1598
1603
|
const w = n.nsSeparator || this.options.nsSeparator;
|
1599
|
-
return
|
1604
|
+
return r ? {
|
1600
1605
|
res: `${u}${w}${a}`,
|
1601
1606
|
usedKey: a,
|
1602
1607
|
exactUsedKey: a,
|
@@ -1604,7 +1609,7 @@ class je extends Pe {
|
|
1604
1609
|
usedNS: u
|
1605
1610
|
} : `${u}${w}${a}`;
|
1606
1611
|
}
|
1607
|
-
return
|
1612
|
+
return r ? {
|
1608
1613
|
res: a,
|
1609
1614
|
usedKey: a,
|
1610
1615
|
exactUsedKey: a,
|
@@ -1622,7 +1627,7 @@ class je extends Pe {
|
|
1622
1627
|
...n,
|
1623
1628
|
ns: o
|
1624
1629
|
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
1625
|
-
return
|
1630
|
+
return r ? (d.res = w, d) : w;
|
1626
1631
|
}
|
1627
1632
|
if (i) {
|
1628
1633
|
const w = m === "[object Array]", v = w ? [] : {}, L = w ? p : g;
|
@@ -1638,16 +1643,16 @@ class je extends Pe {
|
|
1638
1643
|
l = v;
|
1639
1644
|
}
|
1640
1645
|
} else if (j && typeof x == "string" && m === "[object Array]")
|
1641
|
-
l = l.join(x), l && (l = this.extendTranslation(l, t, n,
|
1646
|
+
l = l.join(x), l && (l = this.extendTranslation(l, t, n, s));
|
1642
1647
|
else {
|
1643
1648
|
let w = !1, v = !1;
|
1644
1649
|
const L = n.count !== void 0 && typeof n.count != "string", P = je.hasDefaultValue(n), ce = L ? this.pluralResolver.getSuffix(c, n.count, n) : "", en = n.ordinal && L ? this.pluralResolver.getSuffix(c, n.count, {
|
1645
1650
|
ordinal: !1
|
1646
|
-
}) : "",
|
1647
|
-
!this.isValidLookup(l) && P && (w = !0, l =
|
1648
|
-
const tn = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && v ? void 0 : l,
|
1649
|
-
if (v || w ||
|
1650
|
-
if (this.logger.log(
|
1651
|
+
}) : "", se = n[`defaultValue${ce}`] || n[`defaultValue${en}`] || n.defaultValue;
|
1652
|
+
!this.isValidLookup(l) && P && (w = !0, l = se), this.isValidLookup(l) || (v = !0, l = a);
|
1653
|
+
const tn = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && v ? void 0 : l, re = P && se !== l && this.options.updateMissing;
|
1654
|
+
if (v || w || re) {
|
1655
|
+
if (this.logger.log(re ? "updateKey" : "missingKey", c, u, a, re ? se : l), i) {
|
1651
1656
|
const F = this.resolve(a, {
|
1652
1657
|
...n,
|
1653
1658
|
keySeparator: !1
|
@@ -1663,74 +1668,74 @@ class je extends Pe {
|
|
1663
1668
|
this.options.saveMissingTo === "all" ? ie = this.languageUtils.toResolveHierarchy(n.lng || this.language) : ie.push(n.lng || this.language);
|
1664
1669
|
const Xe = (F, Y, Ze) => {
|
1665
1670
|
const et = P && Ze !== l ? Ze : tn;
|
1666
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(F, u, Y, et,
|
1671
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(F, u, Y, et, re, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(F, u, Y, et, re, n), this.emit("missingKey", F, u, Y, l);
|
1667
1672
|
};
|
1668
1673
|
this.options.saveMissing && (this.options.saveMissingPlurals && L ? ie.forEach((F) => {
|
1669
1674
|
this.pluralResolver.getSuffixes(F, n).forEach((Y) => {
|
1670
|
-
Xe([F], a + Y, n[`defaultValue${Y}`] ||
|
1675
|
+
Xe([F], a + Y, n[`defaultValue${Y}`] || se);
|
1671
1676
|
});
|
1672
|
-
}) : Xe(ie, a,
|
1677
|
+
}) : Xe(ie, a, se));
|
1673
1678
|
}
|
1674
|
-
l = this.extendTranslation(l, t, n, d,
|
1679
|
+
l = this.extendTranslation(l, t, n, d, s), v && l === a && this.options.appendNamespaceToMissingKey && (l = `${u}:${a}`), (v || w) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? l = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${a}` : a, w ? l : void 0) : l = this.options.parseMissingKeyHandler(l));
|
1675
1680
|
}
|
1676
|
-
return
|
1681
|
+
return r ? (d.res = l, d) : l;
|
1677
1682
|
}
|
1678
|
-
extendTranslation(t, n,
|
1683
|
+
extendTranslation(t, n, s, r, i) {
|
1679
1684
|
var a = this;
|
1680
1685
|
if (this.i18nFormat && this.i18nFormat.parse)
|
1681
1686
|
t = this.i18nFormat.parse(t, {
|
1682
1687
|
...this.options.interpolation.defaultVariables,
|
1683
|
-
...
|
1684
|
-
},
|
1685
|
-
resolved:
|
1688
|
+
...s
|
1689
|
+
}, r.usedLng, r.usedNS, r.usedKey, {
|
1690
|
+
resolved: r
|
1686
1691
|
});
|
1687
|
-
else if (!
|
1688
|
-
|
1689
|
-
...
|
1692
|
+
else if (!s.skipInterpolation) {
|
1693
|
+
s.interpolation && this.interpolator.init({
|
1694
|
+
...s,
|
1690
1695
|
interpolation: {
|
1691
1696
|
...this.options.interpolation,
|
1692
|
-
...
|
1697
|
+
...s.interpolation
|
1693
1698
|
}
|
1694
1699
|
});
|
1695
|
-
const c = typeof t == "string" && (
|
1700
|
+
const c = typeof t == "string" && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
1696
1701
|
let f;
|
1697
1702
|
if (c) {
|
1698
1703
|
const l = t.match(this.interpolator.nestingRegexp);
|
1699
1704
|
f = l && l.length;
|
1700
1705
|
}
|
1701
|
-
let d =
|
1706
|
+
let d = s.replace && typeof s.replace != "string" ? s.replace : s;
|
1702
1707
|
if (this.options.interpolation.defaultVariables && (d = {
|
1703
1708
|
...this.options.interpolation.defaultVariables,
|
1704
1709
|
...d
|
1705
|
-
}), t = this.interpolator.interpolate(t, d,
|
1710
|
+
}), t = this.interpolator.interpolate(t, d, s.lng || this.language, s), c) {
|
1706
1711
|
const l = t.match(this.interpolator.nestingRegexp), g = l && l.length;
|
1707
|
-
f < g && (
|
1712
|
+
f < g && (s.nest = !1);
|
1708
1713
|
}
|
1709
|
-
!
|
1714
|
+
!s.lng && this.options.compatibilityAPI !== "v1" && r && r.res && (s.lng = r.usedLng), s.nest !== !1 && (t = this.interpolator.nest(t, function() {
|
1710
1715
|
for (var l = arguments.length, g = new Array(l), p = 0; p < l; p++)
|
1711
1716
|
g[p] = arguments[p];
|
1712
|
-
return i && i[0] === g[0] && !
|
1713
|
-
},
|
1717
|
+
return i && i[0] === g[0] && !s.context ? (a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`), null) : a.translate(...g, n);
|
1718
|
+
}, s)), s.interpolation && this.interpolator.reset();
|
1714
1719
|
}
|
1715
|
-
const o =
|
1716
|
-
return t != null && u && u.length &&
|
1717
|
-
i18nResolved:
|
1718
|
-
...
|
1719
|
-
} :
|
1720
|
+
const o = s.postProcess || this.options.postProcess, u = typeof o == "string" ? [o] : o;
|
1721
|
+
return t != null && u && u.length && s.applyPostProcessor !== !1 && (t = kt.handle(u, t, n, this.options && this.options.postProcessPassResolved ? {
|
1722
|
+
i18nResolved: r,
|
1723
|
+
...s
|
1724
|
+
} : s, this)), t;
|
1720
1725
|
}
|
1721
1726
|
resolve(t) {
|
1722
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
1727
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, r, i, a, o;
|
1723
1728
|
return typeof t == "string" && (t = [t]), t.forEach((u) => {
|
1724
|
-
if (this.isValidLookup(
|
1729
|
+
if (this.isValidLookup(s))
|
1725
1730
|
return;
|
1726
1731
|
const c = this.extractFromKey(u, n), f = c.key;
|
1727
|
-
|
1732
|
+
r = f;
|
1728
1733
|
let d = c.namespaces;
|
1729
1734
|
this.options.fallbackNS && (d = d.concat(this.options.fallbackNS));
|
1730
1735
|
const l = n.count !== void 0 && typeof n.count != "string", g = l && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), p = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== "", m = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
|
1731
1736
|
d.forEach((h) => {
|
1732
|
-
this.isValidLookup(
|
1733
|
-
if (this.isValidLookup(
|
1737
|
+
this.isValidLookup(s) || (o = h, !ot[`${m[0]}-${h}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(o) && (ot[`${m[0]}-${h}`] = !0, this.logger.warn(`key "${r}" 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((x) => {
|
1738
|
+
if (this.isValidLookup(s))
|
1734
1739
|
return;
|
1735
1740
|
a = x;
|
1736
1741
|
const j = [f];
|
@@ -1747,12 +1752,12 @@ class je extends Pe {
|
|
1747
1752
|
}
|
1748
1753
|
let Q;
|
1749
1754
|
for (; Q = j.pop(); )
|
1750
|
-
this.isValidLookup(
|
1755
|
+
this.isValidLookup(s) || (i = Q, s = this.getResource(x, h, Q, n));
|
1751
1756
|
}));
|
1752
1757
|
});
|
1753
1758
|
}), {
|
1754
|
-
res:
|
1755
|
-
usedKey:
|
1759
|
+
res: s,
|
1760
|
+
usedKey: r,
|
1756
1761
|
exactUsedKey: i,
|
1757
1762
|
usedLng: a,
|
1758
1763
|
usedNS: o
|
@@ -1761,14 +1766,14 @@ class je extends Pe {
|
|
1761
1766
|
isValidLookup(t) {
|
1762
1767
|
return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === "");
|
1763
1768
|
}
|
1764
|
-
getResource(t, n,
|
1765
|
-
let
|
1766
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n,
|
1769
|
+
getResource(t, n, s) {
|
1770
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
1771
|
+
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, s, r) : this.resourceStore.getResource(t, n, s, r);
|
1767
1772
|
}
|
1768
1773
|
static hasDefaultValue(t) {
|
1769
1774
|
const n = "defaultValue";
|
1770
|
-
for (const
|
1771
|
-
if (Object.prototype.hasOwnProperty.call(t,
|
1775
|
+
for (const s in t)
|
1776
|
+
if (Object.prototype.hasOwnProperty.call(t, s) && n === s.substring(0, n.length) && t[s] !== void 0)
|
1772
1777
|
return !0;
|
1773
1778
|
return !1;
|
1774
1779
|
}
|
@@ -1795,8 +1800,8 @@ class ut {
|
|
1795
1800
|
formatLanguageCode(t) {
|
1796
1801
|
if (typeof t == "string" && t.indexOf("-") > -1) {
|
1797
1802
|
const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
|
1798
|
-
let
|
1799
|
-
return this.options.lowerCaseLng ?
|
1803
|
+
let s = t.split("-");
|
1804
|
+
return this.options.lowerCaseLng ? s = s.map((r) => r.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), n.indexOf(s[1].toLowerCase()) > -1 && (s[1] = Ae(s[1].toLowerCase()))) : s.length === 3 && (s[0] = s[0].toLowerCase(), s[1].length === 2 && (s[1] = s[1].toUpperCase()), s[0] !== "sgn" && s[2].length === 2 && (s[2] = s[2].toUpperCase()), n.indexOf(s[1].toLowerCase()) > -1 && (s[1] = Ae(s[1].toLowerCase())), n.indexOf(s[2].toLowerCase()) > -1 && (s[2] = Ae(s[2].toLowerCase()))), s.join("-");
|
1800
1805
|
}
|
1801
1806
|
return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t;
|
1802
1807
|
}
|
@@ -1807,21 +1812,21 @@ class ut {
|
|
1807
1812
|
if (!t)
|
1808
1813
|
return null;
|
1809
1814
|
let n;
|
1810
|
-
return t.forEach((
|
1815
|
+
return t.forEach((s) => {
|
1811
1816
|
if (n)
|
1812
1817
|
return;
|
1813
|
-
const
|
1814
|
-
(!this.options.supportedLngs || this.isSupportedCode(
|
1815
|
-
}), !n && this.options.supportedLngs && t.forEach((
|
1818
|
+
const r = this.formatLanguageCode(s);
|
1819
|
+
(!this.options.supportedLngs || this.isSupportedCode(r)) && (n = r);
|
1820
|
+
}), !n && this.options.supportedLngs && t.forEach((s) => {
|
1816
1821
|
if (n)
|
1817
1822
|
return;
|
1818
|
-
const
|
1819
|
-
if (this.isSupportedCode(
|
1820
|
-
return n =
|
1823
|
+
const r = this.getLanguagePartFromCode(s);
|
1824
|
+
if (this.isSupportedCode(r))
|
1825
|
+
return n = r;
|
1821
1826
|
n = this.options.supportedLngs.find((i) => {
|
1822
|
-
if (i ===
|
1827
|
+
if (i === r)
|
1823
1828
|
return i;
|
1824
|
-
if (!(i.indexOf("-") < 0 &&
|
1829
|
+
if (!(i.indexOf("-") < 0 && r.indexOf("-") < 0) && i.indexOf(r) === 0)
|
1825
1830
|
return i;
|
1826
1831
|
});
|
1827
1832
|
}), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n;
|
@@ -1833,19 +1838,19 @@ class ut {
|
|
1833
1838
|
return t;
|
1834
1839
|
if (!n)
|
1835
1840
|
return t.default || [];
|
1836
|
-
let
|
1837
|
-
return
|
1841
|
+
let s = t[n];
|
1842
|
+
return s || (s = t[this.getScriptPartFromCode(n)]), s || (s = t[this.formatLanguageCode(n)]), s || (s = t[this.getLanguagePartFromCode(n)]), s || (s = t.default), s || [];
|
1838
1843
|
}
|
1839
1844
|
toResolveHierarchy(t, n) {
|
1840
|
-
const
|
1841
|
-
a && (this.isSupportedCode(a) ?
|
1845
|
+
const s = this.getFallbackCodes(n || this.options.fallbackLng || [], t), r = [], i = (a) => {
|
1846
|
+
a && (this.isSupportedCode(a) ? r.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
|
1842
1847
|
};
|
1843
|
-
return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(t))) : typeof t == "string" && i(this.formatLanguageCode(t)),
|
1844
|
-
|
1845
|
-
}),
|
1848
|
+
return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(t))) : typeof t == "string" && i(this.formatLanguageCode(t)), s.forEach((a) => {
|
1849
|
+
r.indexOf(a) < 0 && i(this.formatLanguageCode(a));
|
1850
|
+
}), r;
|
1846
1851
|
}
|
1847
1852
|
}
|
1848
|
-
let
|
1853
|
+
let Os = [{
|
1849
1854
|
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
1850
1855
|
nr: [1, 2],
|
1851
1856
|
fc: 1
|
@@ -1937,7 +1942,7 @@ let gr = [{
|
|
1937
1942
|
lngs: ["he", "iw"],
|
1938
1943
|
nr: [1, 2, 20, 21],
|
1939
1944
|
fc: 22
|
1940
|
-
}],
|
1945
|
+
}], Ss = {
|
1941
1946
|
1: function(e) {
|
1942
1947
|
return +(e > 1);
|
1943
1948
|
},
|
@@ -2005,7 +2010,7 @@ let gr = [{
|
|
2005
2010
|
return e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3;
|
2006
2011
|
}
|
2007
2012
|
};
|
2008
|
-
const
|
2013
|
+
const vs = ["v1", "v2", "v3"], xs = ["v4"], lt = {
|
2009
2014
|
zero: 0,
|
2010
2015
|
one: 1,
|
2011
2016
|
two: 2,
|
@@ -2013,21 +2018,21 @@ const mr = ["v1", "v2", "v3"], br = ["v4"], lt = {
|
|
2013
2018
|
many: 4,
|
2014
2019
|
other: 5
|
2015
2020
|
};
|
2016
|
-
function
|
2021
|
+
function ws() {
|
2017
2022
|
const e = {};
|
2018
|
-
return
|
2023
|
+
return Os.forEach((t) => {
|
2019
2024
|
t.lngs.forEach((n) => {
|
2020
2025
|
e[n] = {
|
2021
2026
|
numbers: t.nr,
|
2022
|
-
plurals:
|
2027
|
+
plurals: Ss[t.fc]
|
2023
2028
|
};
|
2024
2029
|
});
|
2025
2030
|
}), e;
|
2026
2031
|
}
|
2027
|
-
class
|
2032
|
+
class Cs {
|
2028
2033
|
constructor(t) {
|
2029
2034
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
2030
|
-
this.languageUtils = t, this.options = n, this.logger = R.create("pluralResolver"), (!this.options.compatibilityJSON ||
|
2035
|
+
this.languageUtils = t, this.options = n, this.logger = R.create("pluralResolver"), (!this.options.compatibilityJSON || xs.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = ws();
|
2031
2036
|
}
|
2032
2037
|
addRule(t, n) {
|
2033
2038
|
this.rules[t] = n;
|
@@ -2046,39 +2051,39 @@ class Or {
|
|
2046
2051
|
}
|
2047
2052
|
needsPlural(t) {
|
2048
2053
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
2049
|
-
const
|
2050
|
-
return this.shouldUseIntlApi() ?
|
2054
|
+
const s = this.getRule(t, n);
|
2055
|
+
return this.shouldUseIntlApi() ? s && s.resolvedOptions().pluralCategories.length > 1 : s && s.numbers.length > 1;
|
2051
2056
|
}
|
2052
2057
|
getPluralFormsOfKey(t, n) {
|
2053
|
-
let
|
2054
|
-
return this.getSuffixes(t,
|
2058
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
2059
|
+
return this.getSuffixes(t, s).map((r) => `${n}${r}`);
|
2055
2060
|
}
|
2056
2061
|
getSuffixes(t) {
|
2057
2062
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
2058
|
-
const
|
2059
|
-
return
|
2063
|
+
const s = this.getRule(t, n);
|
2064
|
+
return s ? this.shouldUseIntlApi() ? s.resolvedOptions().pluralCategories.sort((r, i) => lt[r] - lt[i]).map((r) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r}`) : s.numbers.map((r) => this.getSuffix(t, r, n)) : [];
|
2060
2065
|
}
|
2061
2066
|
getSuffix(t, n) {
|
2062
|
-
let
|
2063
|
-
const
|
2064
|
-
return
|
2067
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
2068
|
+
const r = this.getRule(t, s);
|
2069
|
+
return r ? this.shouldUseIntlApi() ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(n)}` : this.getSuffixRetroCompatible(r, n) : (this.logger.warn(`no plural rule found for: ${t}`), "");
|
2065
2070
|
}
|
2066
2071
|
getSuffixRetroCompatible(t, n) {
|
2067
|
-
const
|
2068
|
-
let
|
2069
|
-
this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (
|
2070
|
-
const i = () => this.options.prepend &&
|
2071
|
-
return this.options.compatibilityJSON === "v1" ?
|
2072
|
+
const s = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n));
|
2073
|
+
let r = t.numbers[s];
|
2074
|
+
this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (r === 2 ? r = "plural" : r === 1 && (r = ""));
|
2075
|
+
const i = () => this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString();
|
2076
|
+
return this.options.compatibilityJSON === "v1" ? r === 1 ? "" : typeof r == "number" ? `_plural_${r.toString()}` : i() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? i() : this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
|
2072
2077
|
}
|
2073
2078
|
shouldUseIntlApi() {
|
2074
|
-
return !
|
2079
|
+
return !vs.includes(this.options.compatibilityJSON);
|
2075
2080
|
}
|
2076
2081
|
}
|
2077
2082
|
function ct(e, t, n) {
|
2078
|
-
let
|
2079
|
-
return !i &&
|
2083
|
+
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = gs(e, t, n);
|
2084
|
+
return !i && r && typeof n == "string" && (i = we(e, n, s), i === void 0 && (i = we(t, n, s))), i;
|
2080
2085
|
}
|
2081
|
-
class
|
2086
|
+
class js {
|
2082
2087
|
constructor() {
|
2083
2088
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2084
2089
|
this.logger = R.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || ((n) => n), this.init(t);
|
@@ -2089,7 +2094,7 @@ class Sr {
|
|
2089
2094
|
escapeValue: !0
|
2090
2095
|
});
|
2091
2096
|
const n = t.interpolation;
|
2092
|
-
this.escape = n.escape !== void 0 ? n.escape :
|
2097
|
+
this.escape = n.escape !== void 0 ? n.escape : ms, this.escapeValue = n.escapeValue !== void 0 ? n.escapeValue : !0, this.useRawValueToEscape = n.useRawValueToEscape !== void 0 ? n.useRawValueToEscape : !1, this.prefix = n.prefix ? X(n.prefix) : n.prefixEscaped || "{{", this.suffix = n.suffix ? X(n.suffix) : n.suffixEscaped || "}}", this.formatSeparator = n.formatSeparator ? n.formatSeparator : n.formatSeparator || ",", this.unescapePrefix = n.unescapeSuffix ? "" : n.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : n.unescapeSuffix || "", this.nestingPrefix = n.nestingPrefix ? X(n.nestingPrefix) : n.nestingPrefixEscaped || X("$t("), this.nestingSuffix = n.nestingSuffix ? X(n.nestingSuffix) : n.nestingSuffixEscaped || X(")"), this.nestingOptionsSeparator = n.nestingOptionsSeparator ? n.nestingOptionsSeparator : n.nestingOptionsSeparator || ",", this.maxReplaces = n.maxReplaces ? n.maxReplaces : 1e3, this.alwaysFormat = n.alwaysFormat !== void 0 ? n.alwaysFormat : !1, this.resetRegExp();
|
2093
2098
|
}
|
2094
2099
|
reset() {
|
2095
2100
|
this.options && this.init(this.options);
|
@@ -2099,10 +2104,10 @@ class Sr {
|
|
2099
2104
|
this.regexp = new RegExp(t, "g");
|
2100
2105
|
const n = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
|
2101
2106
|
this.regexpUnescape = new RegExp(n, "g");
|
2102
|
-
const
|
2103
|
-
this.nestingRegexp = new RegExp(
|
2107
|
+
const s = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
|
2108
|
+
this.nestingRegexp = new RegExp(s, "g");
|
2104
2109
|
}
|
2105
|
-
interpolate(t, n,
|
2110
|
+
interpolate(t, n, s, r) {
|
2106
2111
|
let i, a, o;
|
2107
2112
|
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
2108
2113
|
function c(p) {
|
@@ -2111,21 +2116,21 @@ class Sr {
|
|
2111
2116
|
const f = (p) => {
|
2112
2117
|
if (p.indexOf(this.formatSeparator) < 0) {
|
2113
2118
|
const j = ct(n, u, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
2114
|
-
return this.alwaysFormat ? this.format(j, void 0,
|
2115
|
-
...
|
2119
|
+
return this.alwaysFormat ? this.format(j, void 0, s, {
|
2120
|
+
...r,
|
2116
2121
|
...n,
|
2117
2122
|
interpolationkey: p
|
2118
2123
|
}) : j;
|
2119
2124
|
}
|
2120
2125
|
const m = p.split(this.formatSeparator), h = m.shift().trim(), x = m.join(this.formatSeparator).trim();
|
2121
|
-
return this.format(ct(n, u, h, this.options.keySeparator, this.options.ignoreJSONStructure), x,
|
2122
|
-
...
|
2126
|
+
return this.format(ct(n, u, h, this.options.keySeparator, this.options.ignoreJSONStructure), x, s, {
|
2127
|
+
...r,
|
2123
2128
|
...n,
|
2124
2129
|
interpolationkey: h
|
2125
2130
|
});
|
2126
2131
|
};
|
2127
2132
|
this.resetRegExp();
|
2128
|
-
const d =
|
2133
|
+
const d = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, l = r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
2129
2134
|
return [{
|
2130
2135
|
regex: this.regexpUnescape,
|
2131
2136
|
safeValue: (p) => c(p)
|
@@ -2137,9 +2142,9 @@ class Sr {
|
|
2137
2142
|
const m = i[1].trim();
|
2138
2143
|
if (a = f(m), a === void 0)
|
2139
2144
|
if (typeof d == "function") {
|
2140
|
-
const x = d(t, i,
|
2145
|
+
const x = d(t, i, r);
|
2141
2146
|
a = typeof x == "string" ? x : "";
|
2142
|
-
} else if (
|
2147
|
+
} else if (r && Object.prototype.hasOwnProperty.call(r, m))
|
2143
2148
|
a = "";
|
2144
2149
|
else if (l) {
|
2145
2150
|
a = i[0];
|
@@ -2147,7 +2152,7 @@ class Sr {
|
|
2147
2152
|
} else
|
2148
2153
|
this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`), a = "";
|
2149
2154
|
else
|
2150
|
-
typeof a != "string" && !this.useRawValueToEscape && (a =
|
2155
|
+
typeof a != "string" && !this.useRawValueToEscape && (a = rt(a));
|
2151
2156
|
const h = p.safeValue(a);
|
2152
2157
|
if (t = t.replace(i[0], h), l ? (p.regex.lastIndex += a.length, p.regex.lastIndex -= i[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
2153
2158
|
break;
|
@@ -2155,7 +2160,7 @@ class Sr {
|
|
2155
2160
|
}), t;
|
2156
2161
|
}
|
2157
2162
|
nest(t, n) {
|
2158
|
-
let
|
2163
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r, i, a;
|
2159
2164
|
function o(u, c) {
|
2160
2165
|
const f = this.nestingOptionsSeparator;
|
2161
2166
|
if (u.indexOf(f) < 0)
|
@@ -2175,34 +2180,34 @@ class Sr {
|
|
2175
2180
|
}
|
2176
2181
|
return delete a.defaultValue, u;
|
2177
2182
|
}
|
2178
|
-
for (;
|
2183
|
+
for (; r = this.nestingRegexp.exec(t); ) {
|
2179
2184
|
let u = [];
|
2180
2185
|
a = {
|
2181
|
-
...
|
2186
|
+
...s
|
2182
2187
|
}, a = a.replace && typeof a.replace != "string" ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
2183
2188
|
let c = !1;
|
2184
|
-
if (
|
2185
|
-
const f =
|
2186
|
-
|
2189
|
+
if (r[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(r[1])) {
|
2190
|
+
const f = r[1].split(this.formatSeparator).map((d) => d.trim());
|
2191
|
+
r[1] = f.shift(), u = f, c = !0;
|
2187
2192
|
}
|
2188
|
-
if (i = n(o.call(this,
|
2193
|
+
if (i = n(o.call(this, r[1].trim(), a), a), i && r[0] === t && typeof i != "string")
|
2189
2194
|
return i;
|
2190
|
-
typeof i != "string" && (i =
|
2191
|
-
...
|
2192
|
-
interpolationkey:
|
2193
|
-
}), i.trim())), t = t.replace(
|
2195
|
+
typeof i != "string" && (i = rt(i)), i || (this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`), i = ""), c && (i = u.reduce((f, d) => this.format(f, d, s.lng, {
|
2196
|
+
...s,
|
2197
|
+
interpolationkey: r[1].trim()
|
2198
|
+
}), i.trim())), t = t.replace(r[0], i), this.regexp.lastIndex = 0;
|
2194
2199
|
}
|
2195
2200
|
return t;
|
2196
2201
|
}
|
2197
2202
|
}
|
2198
|
-
function
|
2203
|
+
function Ds(e) {
|
2199
2204
|
let t = e.toLowerCase().trim();
|
2200
2205
|
const n = {};
|
2201
2206
|
if (e.indexOf("(") > -1) {
|
2202
|
-
const
|
2203
|
-
t =
|
2204
|
-
const
|
2205
|
-
t === "currency" &&
|
2207
|
+
const s = e.split("(");
|
2208
|
+
t = s[0].toLowerCase().trim();
|
2209
|
+
const r = s[1].substring(0, s[1].length - 1);
|
2210
|
+
t === "currency" && r.indexOf(":") < 0 ? n.currency || (n.currency = r.trim()) : t === "relativetime" && r.indexOf(":") < 0 ? n.range || (n.range = r.trim()) : r.split(";").forEach((a) => {
|
2206
2211
|
if (!a)
|
2207
2212
|
return;
|
2208
2213
|
const [o, ...u] = a.split(":"), c = u.join(":").trim().replace(/^'+|'+$/g, "");
|
@@ -2216,54 +2221,54 @@ function vr(e) {
|
|
2216
2221
|
}
|
2217
2222
|
function Z(e) {
|
2218
2223
|
const t = {};
|
2219
|
-
return function(
|
2220
|
-
const a =
|
2224
|
+
return function(s, r, i) {
|
2225
|
+
const a = r + JSON.stringify(i);
|
2221
2226
|
let o = t[a];
|
2222
|
-
return o || (o = e(Ce(
|
2227
|
+
return o || (o = e(Ce(r), i), t[a] = o), o(s);
|
2223
2228
|
};
|
2224
2229
|
}
|
2225
|
-
class
|
2230
|
+
class Ps {
|
2226
2231
|
constructor() {
|
2227
2232
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
2228
2233
|
this.logger = R.create("formatter"), this.options = t, this.formats = {
|
2229
|
-
number: Z((n,
|
2230
|
-
const
|
2231
|
-
...
|
2234
|
+
number: Z((n, s) => {
|
2235
|
+
const r = new Intl.NumberFormat(n, {
|
2236
|
+
...s
|
2232
2237
|
});
|
2233
|
-
return (i) =>
|
2238
|
+
return (i) => r.format(i);
|
2234
2239
|
}),
|
2235
|
-
currency: Z((n,
|
2236
|
-
const
|
2237
|
-
...
|
2240
|
+
currency: Z((n, s) => {
|
2241
|
+
const r = new Intl.NumberFormat(n, {
|
2242
|
+
...s,
|
2238
2243
|
style: "currency"
|
2239
2244
|
});
|
2240
|
-
return (i) =>
|
2245
|
+
return (i) => r.format(i);
|
2241
2246
|
}),
|
2242
|
-
datetime: Z((n,
|
2243
|
-
const
|
2244
|
-
...
|
2247
|
+
datetime: Z((n, s) => {
|
2248
|
+
const r = new Intl.DateTimeFormat(n, {
|
2249
|
+
...s
|
2245
2250
|
});
|
2246
|
-
return (i) =>
|
2251
|
+
return (i) => r.format(i);
|
2247
2252
|
}),
|
2248
|
-
relativetime: Z((n,
|
2249
|
-
const
|
2250
|
-
...
|
2253
|
+
relativetime: Z((n, s) => {
|
2254
|
+
const r = new Intl.RelativeTimeFormat(n, {
|
2255
|
+
...s
|
2251
2256
|
});
|
2252
|
-
return (i) =>
|
2257
|
+
return (i) => r.format(i, s.range || "day");
|
2253
2258
|
}),
|
2254
|
-
list: Z((n,
|
2255
|
-
const
|
2256
|
-
...
|
2259
|
+
list: Z((n, s) => {
|
2260
|
+
const r = new Intl.ListFormat(n, {
|
2261
|
+
...s
|
2257
2262
|
});
|
2258
|
-
return (i) =>
|
2263
|
+
return (i) => r.format(i);
|
2259
2264
|
})
|
2260
2265
|
}, this.init(t);
|
2261
2266
|
}
|
2262
2267
|
init(t) {
|
2263
|
-
const
|
2268
|
+
const s = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
2264
2269
|
interpolation: {}
|
2265
2270
|
}).interpolation;
|
2266
|
-
this.formatSeparator =
|
2271
|
+
this.formatSeparator = s.formatSeparator ? s.formatSeparator : s.formatSeparator || ",";
|
2267
2272
|
}
|
2268
2273
|
add(t, n) {
|
2269
2274
|
this.formats[t.toLowerCase().trim()] = n;
|
@@ -2271,20 +2276,20 @@ class xr {
|
|
2271
2276
|
addCached(t, n) {
|
2272
2277
|
this.formats[t.toLowerCase().trim()] = Z(n);
|
2273
2278
|
}
|
2274
|
-
format(t, n,
|
2275
|
-
let
|
2279
|
+
format(t, n, s) {
|
2280
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
2276
2281
|
return n.split(this.formatSeparator).reduce((o, u) => {
|
2277
2282
|
const {
|
2278
2283
|
formatName: c,
|
2279
2284
|
formatOptions: f
|
2280
|
-
} =
|
2285
|
+
} = Ds(u);
|
2281
2286
|
if (this.formats[c]) {
|
2282
2287
|
let d = o;
|
2283
2288
|
try {
|
2284
|
-
const l =
|
2289
|
+
const l = r && r.formatParams && r.formatParams[r.interpolationkey] || {}, g = l.locale || l.lng || r.locale || r.lng || s;
|
2285
2290
|
d = this.formats[c](o, g, {
|
2286
2291
|
...f,
|
2287
|
-
...
|
2292
|
+
...r,
|
2288
2293
|
...l
|
2289
2294
|
});
|
2290
2295
|
} catch (l) {
|
@@ -2297,28 +2302,28 @@ class xr {
|
|
2297
2302
|
}, t);
|
2298
2303
|
}
|
2299
2304
|
}
|
2300
|
-
function
|
2305
|
+
function Ls(e, t) {
|
2301
2306
|
e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
|
2302
2307
|
}
|
2303
|
-
class
|
2304
|
-
constructor(t, n,
|
2305
|
-
let
|
2306
|
-
super(), this.backend = t, this.store = n, this.services =
|
2308
|
+
class Fs extends Pe {
|
2309
|
+
constructor(t, n, s) {
|
2310
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
2311
|
+
super(), this.backend = t, this.store = n, this.services = s, this.languageUtils = s.languageUtils, this.options = r, this.logger = R.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, r.backend, r);
|
2307
2312
|
}
|
2308
|
-
queueLoad(t, n,
|
2313
|
+
queueLoad(t, n, s, r) {
|
2309
2314
|
const i = {}, a = {}, o = {}, u = {};
|
2310
2315
|
return t.forEach((c) => {
|
2311
2316
|
let f = !0;
|
2312
2317
|
n.forEach((d) => {
|
2313
2318
|
const l = `${c}|${d}`;
|
2314
|
-
!
|
2319
|
+
!s.reload && this.store.hasResourceBundle(c, d) ? this.state[l] = 2 : this.state[l] < 0 || (this.state[l] === 1 ? a[l] === void 0 && (a[l] = !0) : (this.state[l] = 1, f = !1, a[l] === void 0 && (a[l] = !0), i[l] === void 0 && (i[l] = !0), u[d] === void 0 && (u[d] = !0)));
|
2315
2320
|
}), f || (o[c] = !0);
|
2316
2321
|
}), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
|
2317
2322
|
pending: a,
|
2318
2323
|
pendingCount: Object.keys(a).length,
|
2319
2324
|
loaded: {},
|
2320
2325
|
errors: [],
|
2321
|
-
callback:
|
2326
|
+
callback: r
|
2322
2327
|
}), {
|
2323
2328
|
toLoad: Object.keys(i),
|
2324
2329
|
pending: Object.keys(a),
|
@@ -2326,12 +2331,12 @@ class Cr extends Pe {
|
|
2326
2331
|
toLoadNamespaces: Object.keys(u)
|
2327
2332
|
};
|
2328
2333
|
}
|
2329
|
-
loaded(t, n,
|
2330
|
-
const
|
2331
|
-
n && this.emit("failedLoading", i, a, n),
|
2334
|
+
loaded(t, n, s) {
|
2335
|
+
const r = t.split("|"), i = r[0], a = r[1];
|
2336
|
+
n && this.emit("failedLoading", i, a, n), s && this.store.addResourceBundle(i, a, s), this.state[t] = n ? -1 : 2;
|
2332
2337
|
const o = {};
|
2333
2338
|
this.queue.forEach((u) => {
|
2334
|
-
|
2339
|
+
ps(u.loaded, [i], a), Ls(u, t), n && u.errors.push(n), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
|
2335
2340
|
o[c] || (o[c] = {});
|
2336
2341
|
const f = u.loaded[c];
|
2337
2342
|
f.length && f.forEach((d) => {
|
@@ -2340,16 +2345,16 @@ class Cr extends Pe {
|
|
2340
2345
|
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
2341
2346
|
}), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
|
2342
2347
|
}
|
2343
|
-
read(t, n,
|
2344
|
-
let
|
2348
|
+
read(t, n, s) {
|
2349
|
+
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
|
2345
2350
|
if (!t.length)
|
2346
2351
|
return a(null, {});
|
2347
2352
|
if (this.readingCalls >= this.maxParallelReads) {
|
2348
2353
|
this.waitingReads.push({
|
2349
2354
|
lng: t,
|
2350
2355
|
ns: n,
|
2351
|
-
fcName:
|
2352
|
-
tried:
|
2356
|
+
fcName: s,
|
2357
|
+
tried: r,
|
2353
2358
|
wait: i,
|
2354
2359
|
callback: a
|
2355
2360
|
});
|
@@ -2361,14 +2366,14 @@ class Cr extends Pe {
|
|
2361
2366
|
const d = this.waitingReads.shift();
|
2362
2367
|
this.read(d.lng, d.ns, d.fcName, d.tried, d.wait, d.callback);
|
2363
2368
|
}
|
2364
|
-
if (c && f &&
|
2369
|
+
if (c && f && r < this.maxRetries) {
|
2365
2370
|
setTimeout(() => {
|
2366
|
-
this.read.call(this, t, n,
|
2371
|
+
this.read.call(this, t, n, s, r + 1, i * 2, a);
|
2367
2372
|
}, i);
|
2368
2373
|
return;
|
2369
2374
|
}
|
2370
2375
|
a(c, f);
|
2371
|
-
}, u = this.backend[
|
2376
|
+
}, u = this.backend[s].bind(this.backend);
|
2372
2377
|
if (u.length === 2) {
|
2373
2378
|
try {
|
2374
2379
|
const c = u(t, n);
|
@@ -2381,40 +2386,40 @@ class Cr extends Pe {
|
|
2381
2386
|
return u(t, n, o);
|
2382
2387
|
}
|
2383
2388
|
prepareLoading(t, n) {
|
2384
|
-
let
|
2389
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = arguments.length > 3 ? arguments[3] : void 0;
|
2385
2390
|
if (!this.backend)
|
2386
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
|
2391
|
+
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
|
2387
2392
|
typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)), typeof n == "string" && (n = [n]);
|
2388
|
-
const i = this.queueLoad(t, n,
|
2393
|
+
const i = this.queueLoad(t, n, s, r);
|
2389
2394
|
if (!i.toLoad.length)
|
2390
|
-
return i.pending.length ||
|
2395
|
+
return i.pending.length || r(), null;
|
2391
2396
|
i.toLoad.forEach((a) => {
|
2392
2397
|
this.loadOne(a);
|
2393
2398
|
});
|
2394
2399
|
}
|
2395
|
-
load(t, n,
|
2396
|
-
this.prepareLoading(t, n, {},
|
2400
|
+
load(t, n, s) {
|
2401
|
+
this.prepareLoading(t, n, {}, s);
|
2397
2402
|
}
|
2398
|
-
reload(t, n,
|
2403
|
+
reload(t, n, s) {
|
2399
2404
|
this.prepareLoading(t, n, {
|
2400
2405
|
reload: !0
|
2401
|
-
},
|
2406
|
+
}, s);
|
2402
2407
|
}
|
2403
2408
|
loadOne(t) {
|
2404
2409
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
2405
|
-
const
|
2406
|
-
this.read(
|
2407
|
-
a && this.logger.warn(`${n}loading namespace ${i} for language ${
|
2410
|
+
const s = t.split("|"), r = s[0], i = s[1];
|
2411
|
+
this.read(r, i, "read", void 0, void 0, (a, o) => {
|
2412
|
+
a && this.logger.warn(`${n}loading namespace ${i} for language ${r} failed`, a), !a && o && this.logger.log(`${n}loaded namespace ${i} for language ${r}`, o), this.loaded(t, a, o);
|
2408
2413
|
});
|
2409
2414
|
}
|
2410
|
-
saveMissing(t, n,
|
2415
|
+
saveMissing(t, n, s, r, i) {
|
2411
2416
|
let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
|
2412
2417
|
};
|
2413
2418
|
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) {
|
2414
|
-
this.logger.warn(`did not save key "${
|
2419
|
+
this.logger.warn(`did not save key "${s}" as the namespace "${n}" 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!!!");
|
2415
2420
|
return;
|
2416
2421
|
}
|
2417
|
-
if (!(
|
2422
|
+
if (!(s == null || s === "")) {
|
2418
2423
|
if (this.backend && this.backend.create) {
|
2419
2424
|
const u = {
|
2420
2425
|
...a,
|
@@ -2423,14 +2428,14 @@ class Cr extends Pe {
|
|
2423
2428
|
if (c.length < 6)
|
2424
2429
|
try {
|
2425
2430
|
let f;
|
2426
|
-
c.length === 5 ? f = c(t, n,
|
2431
|
+
c.length === 5 ? f = c(t, n, s, r, u) : f = c(t, n, s, r), f && typeof f.then == "function" ? f.then((d) => o(null, d)).catch(o) : o(null, f);
|
2427
2432
|
} catch (f) {
|
2428
2433
|
o(f);
|
2429
2434
|
}
|
2430
2435
|
else
|
2431
|
-
c(t, n,
|
2436
|
+
c(t, n, s, r, o, u);
|
2432
2437
|
}
|
2433
|
-
!t || !t[0] || this.store.addResource(t[0], n,
|
2438
|
+
!t || !t[0] || this.store.addResource(t[0], n, s, r);
|
2434
2439
|
}
|
2435
2440
|
}
|
2436
2441
|
}
|
@@ -2471,16 +2476,16 @@ function ft() {
|
|
2471
2476
|
overloadTranslationOptionHandler: function(t) {
|
2472
2477
|
let n = {};
|
2473
2478
|
if (typeof t[1] == "object" && (n = t[1]), typeof t[1] == "string" && (n.defaultValue = t[1]), typeof t[2] == "string" && (n.tDescription = t[2]), typeof t[2] == "object" || typeof t[3] == "object") {
|
2474
|
-
const
|
2475
|
-
Object.keys(
|
2476
|
-
n[
|
2479
|
+
const s = t[3] || t[2];
|
2480
|
+
Object.keys(s).forEach((r) => {
|
2481
|
+
n[r] = s[r];
|
2477
2482
|
});
|
2478
2483
|
}
|
2479
2484
|
return n;
|
2480
2485
|
},
|
2481
2486
|
interpolation: {
|
2482
2487
|
escapeValue: !0,
|
2483
|
-
format: (e, t, n,
|
2488
|
+
format: (e, t, n, s) => e,
|
2484
2489
|
prefix: "{{",
|
2485
2490
|
suffix: "}}",
|
2486
2491
|
formatSeparator: ",",
|
@@ -2498,7 +2503,7 @@ function dt(e) {
|
|
2498
2503
|
}
|
2499
2504
|
function de() {
|
2500
2505
|
}
|
2501
|
-
function
|
2506
|
+
function Es(e) {
|
2502
2507
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => {
|
2503
2508
|
typeof e[n] == "function" && (e[n] = e[n].bind(e));
|
2504
2509
|
});
|
@@ -2508,7 +2513,7 @@ class oe extends Pe {
|
|
2508
2513
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
2509
2514
|
if (super(), this.options = dt(t), this.services = {}, this.logger = R, this.modules = {
|
2510
2515
|
external: []
|
2511
|
-
},
|
2516
|
+
}, Es(this), n && !this.isInitialized && !t.isClone) {
|
2512
2517
|
if (!this.options.initImmediate)
|
2513
2518
|
return this.init(t, n), this;
|
2514
2519
|
setTimeout(() => {
|
@@ -2518,15 +2523,15 @@ class oe extends Pe {
|
|
2518
2523
|
}
|
2519
2524
|
init() {
|
2520
2525
|
var t = this;
|
2521
|
-
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
2522
|
-
typeof n == "function" && (
|
2523
|
-
const
|
2526
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
|
2527
|
+
typeof n == "function" && (s = n, n = {}), !n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0]));
|
2528
|
+
const r = ft();
|
2524
2529
|
this.options = {
|
2525
|
-
...
|
2530
|
+
...r,
|
2526
2531
|
...this.options,
|
2527
2532
|
...dt(n)
|
2528
2533
|
}, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
|
2529
|
-
...
|
2534
|
+
...r.interpolation,
|
2530
2535
|
...this.options.interpolation
|
2531
2536
|
}), n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator);
|
2532
2537
|
function i(f) {
|
@@ -2535,17 +2540,17 @@ class oe extends Pe {
|
|
2535
2540
|
if (!this.options.isClone) {
|
2536
2541
|
this.modules.logger ? R.init(i(this.modules.logger), this.options) : R.init(null, this.options);
|
2537
2542
|
let f;
|
2538
|
-
this.modules.formatter ? f = this.modules.formatter : typeof Intl < "u" && (f =
|
2543
|
+
this.modules.formatter ? f = this.modules.formatter : typeof Intl < "u" && (f = Ps);
|
2539
2544
|
const d = new ut(this.options);
|
2540
2545
|
this.store = new at(this.options.resources, this.options);
|
2541
2546
|
const l = this.services;
|
2542
|
-
l.logger = R, l.resourceStore = this.store, l.languageUtils = d, l.pluralResolver = new
|
2547
|
+
l.logger = R, l.resourceStore = this.store, l.languageUtils = d, l.pluralResolver = new Cs(d, {
|
2543
2548
|
prepend: this.options.pluralSeparator,
|
2544
2549
|
compatibilityJSON: this.options.compatibilityJSON,
|
2545
2550
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
2546
|
-
}), f && (!this.options.interpolation.format || this.options.interpolation.format ===
|
2551
|
+
}), f && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (l.formatter = i(f), l.formatter.init(l, this.options), this.options.interpolation.format = l.formatter.format.bind(l.formatter)), l.interpolator = new js(this.options), l.utils = {
|
2547
2552
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
2548
|
-
}, l.backendConnector = new
|
2553
|
+
}, l.backendConnector = new Fs(i(this.modules.backend), l.resourceStore, l, this.options), l.backendConnector.on("*", function(g) {
|
2549
2554
|
for (var p = arguments.length, m = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++)
|
2550
2555
|
m[h - 1] = arguments[h];
|
2551
2556
|
t.emit(g, ...m);
|
@@ -2557,7 +2562,7 @@ class oe extends Pe {
|
|
2557
2562
|
g.init && g.init(this);
|
2558
2563
|
});
|
2559
2564
|
}
|
2560
|
-
if (this.format = this.options.interpolation.format,
|
2565
|
+
if (this.format = this.options.interpolation.format, s || (s = de), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
2561
2566
|
const f = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
2562
2567
|
f.length > 0 && f[0] !== "dev" && (this.options.lng = f[0]);
|
2563
2568
|
}
|
@@ -2572,7 +2577,7 @@ class oe extends Pe {
|
|
2572
2577
|
});
|
2573
2578
|
const u = ae(), c = () => {
|
2574
2579
|
const f = (d, l) => {
|
2575
|
-
this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), u.resolve(l),
|
2580
|
+
this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), u.resolve(l), s(d, l);
|
2576
2581
|
};
|
2577
2582
|
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
|
2578
2583
|
return f(null, this.t.bind(this));
|
@@ -2581,11 +2586,11 @@ class oe extends Pe {
|
|
2581
2586
|
return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), u;
|
2582
2587
|
}
|
2583
2588
|
loadResources(t) {
|
2584
|
-
let
|
2585
|
-
const
|
2586
|
-
if (typeof t == "function" && (
|
2587
|
-
if (
|
2588
|
-
return
|
2589
|
+
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : de;
|
2590
|
+
const r = typeof t == "string" ? t : this.language;
|
2591
|
+
if (typeof t == "function" && (s = t), !this.options.resources || this.options.partialBundledLanguages) {
|
2592
|
+
if (r && r.toLowerCase() === "cimode")
|
2593
|
+
return s();
|
2589
2594
|
const i = [], a = (o) => {
|
2590
2595
|
if (!o)
|
2591
2596
|
return;
|
@@ -2593,17 +2598,17 @@ class oe extends Pe {
|
|
2593
2598
|
i.indexOf(c) < 0 && i.push(c);
|
2594
2599
|
});
|
2595
2600
|
};
|
2596
|
-
|
2597
|
-
!o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
|
2601
|
+
r ? a(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => a(u)), this.options.preload && this.options.preload.forEach((o) => a(o)), this.services.backendConnector.load(i, this.options.ns, (o) => {
|
2602
|
+
!o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(o);
|
2598
2603
|
});
|
2599
2604
|
} else
|
2600
|
-
|
2605
|
+
s(null);
|
2601
2606
|
}
|
2602
|
-
reloadResources(t, n,
|
2603
|
-
const
|
2604
|
-
return t || (t = this.languages), n || (n = this.options.ns),
|
2605
|
-
|
2606
|
-
}),
|
2607
|
+
reloadResources(t, n, s) {
|
2608
|
+
const r = ae();
|
2609
|
+
return t || (t = this.languages), n || (n = this.options.ns), s || (s = de), this.services.backendConnector.reload(t, n, (i) => {
|
2610
|
+
r.resolve(), s(i);
|
2611
|
+
}), r;
|
2607
2612
|
}
|
2608
2613
|
use(t) {
|
2609
2614
|
if (!t)
|
@@ -2615,25 +2620,25 @@ class oe extends Pe {
|
|
2615
2620
|
setResolvedLanguage(t) {
|
2616
2621
|
if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
|
2617
2622
|
for (let n = 0; n < this.languages.length; n++) {
|
2618
|
-
const
|
2619
|
-
if (!(["cimode", "dev"].indexOf(
|
2620
|
-
this.resolvedLanguage =
|
2623
|
+
const s = this.languages[n];
|
2624
|
+
if (!(["cimode", "dev"].indexOf(s) > -1) && this.store.hasLanguageSomeTranslations(s)) {
|
2625
|
+
this.resolvedLanguage = s;
|
2621
2626
|
break;
|
2622
2627
|
}
|
2623
2628
|
}
|
2624
2629
|
}
|
2625
2630
|
changeLanguage(t, n) {
|
2626
|
-
var
|
2631
|
+
var s = this;
|
2627
2632
|
this.isLanguageChangingTo = t;
|
2628
|
-
const
|
2633
|
+
const r = ae();
|
2629
2634
|
this.emit("languageChanging", t);
|
2630
2635
|
const i = (u) => {
|
2631
2636
|
this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
|
2632
2637
|
}, a = (u, c) => {
|
2633
|
-
c ? (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0,
|
2634
|
-
return
|
2638
|
+
c ? (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, r.resolve(function() {
|
2639
|
+
return s.t(...arguments);
|
2635
2640
|
}), n && n(u, function() {
|
2636
|
-
return
|
2641
|
+
return s.t(...arguments);
|
2637
2642
|
});
|
2638
2643
|
}, o = (u) => {
|
2639
2644
|
!t && !u && this.services.languageDetector && (u = []);
|
@@ -2642,26 +2647,26 @@ class oe extends Pe {
|
|
2642
2647
|
a(f, c);
|
2643
2648
|
});
|
2644
2649
|
};
|
2645
|
-
return !t && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(t),
|
2650
|
+
return !t && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(t), r;
|
2646
2651
|
}
|
2647
|
-
getFixedT(t, n,
|
2648
|
-
var
|
2652
|
+
getFixedT(t, n, s) {
|
2653
|
+
var r = this;
|
2649
2654
|
const i = function(a, o) {
|
2650
2655
|
let u;
|
2651
2656
|
if (typeof o != "object") {
|
2652
2657
|
for (var c = arguments.length, f = new Array(c > 2 ? c - 2 : 0), d = 2; d < c; d++)
|
2653
2658
|
f[d - 2] = arguments[d];
|
2654
|
-
u =
|
2659
|
+
u = r.options.overloadTranslationOptionHandler([a, o].concat(f));
|
2655
2660
|
} else
|
2656
2661
|
u = {
|
2657
2662
|
...o
|
2658
2663
|
};
|
2659
|
-
u.lng = u.lng || i.lng, u.lngs = u.lngs || i.lngs, u.ns = u.ns || i.ns, u.keyPrefix = u.keyPrefix ||
|
2660
|
-
const l =
|
2664
|
+
u.lng = u.lng || i.lng, u.lngs = u.lngs || i.lngs, u.ns = u.ns || i.ns, u.keyPrefix = u.keyPrefix || s || i.keyPrefix;
|
2665
|
+
const l = r.options.keySeparator || ".";
|
2661
2666
|
let g;
|
2662
|
-
return u.keyPrefix && Array.isArray(a) ? g = a.map((p) => `${u.keyPrefix}${l}${p}`) : g = u.keyPrefix ? `${u.keyPrefix}${l}${a}` : a,
|
2667
|
+
return u.keyPrefix && Array.isArray(a) ? g = a.map((p) => `${u.keyPrefix}${l}${p}`) : g = u.keyPrefix ? `${u.keyPrefix}${l}${a}` : a, r.t(g, u);
|
2663
2668
|
};
|
2664
|
-
return typeof t == "string" ? i.lng = t : i.lngs = t, i.ns = n, i.keyPrefix =
|
2669
|
+
return typeof t == "string" ? i.lng = t : i.lngs = t, i.ns = n, i.keyPrefix = s, i;
|
2665
2670
|
}
|
2666
2671
|
t() {
|
2667
2672
|
return this.translator && this.translator.translate(...arguments);
|
@@ -2678,8 +2683,8 @@ class oe extends Pe {
|
|
2678
2683
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
2679
2684
|
if (!this.languages || !this.languages.length)
|
2680
2685
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
2681
|
-
const
|
2682
|
-
if (
|
2686
|
+
const s = n.lng || this.resolvedLanguage || this.languages[0], r = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
|
2687
|
+
if (s.toLowerCase() === "cimode")
|
2683
2688
|
return !0;
|
2684
2689
|
const a = (o, u) => {
|
2685
2690
|
const c = this.services.backendConnector.state[`${o}|${u}`];
|
@@ -2690,29 +2695,29 @@ class oe extends Pe {
|
|
2690
2695
|
if (o !== void 0)
|
2691
2696
|
return o;
|
2692
2697
|
}
|
2693
|
-
return !!(this.hasResourceBundle(
|
2698
|
+
return !!(this.hasResourceBundle(s, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(s, t) && (!r || a(i, t)));
|
2694
2699
|
}
|
2695
2700
|
loadNamespaces(t, n) {
|
2696
|
-
const
|
2697
|
-
return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((
|
2698
|
-
this.options.ns.indexOf(
|
2699
|
-
}), this.loadResources((
|
2700
|
-
|
2701
|
-
}),
|
2701
|
+
const s = ae();
|
2702
|
+
return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((r) => {
|
2703
|
+
this.options.ns.indexOf(r) < 0 && this.options.ns.push(r);
|
2704
|
+
}), this.loadResources((r) => {
|
2705
|
+
s.resolve(), n && n(r);
|
2706
|
+
}), s) : (n && n(), Promise.resolve());
|
2702
2707
|
}
|
2703
2708
|
loadLanguages(t, n) {
|
2704
|
-
const
|
2709
|
+
const s = ae();
|
2705
2710
|
typeof t == "string" && (t = [t]);
|
2706
|
-
const
|
2707
|
-
return i.length ? (this.options.preload =
|
2708
|
-
|
2709
|
-
}),
|
2711
|
+
const r = this.options.preload || [], i = t.filter((a) => r.indexOf(a) < 0);
|
2712
|
+
return i.length ? (this.options.preload = r.concat(i), this.loadResources((a) => {
|
2713
|
+
s.resolve(), n && n(a);
|
2714
|
+
}), s) : (n && n(), Promise.resolve());
|
2710
2715
|
}
|
2711
2716
|
dir(t) {
|
2712
2717
|
if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !t)
|
2713
2718
|
return "rtl";
|
2714
|
-
const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"],
|
2715
|
-
return n.indexOf(
|
2719
|
+
const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = this.services && this.services.languageUtils || new ut(ft());
|
2720
|
+
return n.indexOf(s.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
2716
2721
|
}
|
2717
2722
|
static createInstance() {
|
2718
2723
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
@@ -2720,24 +2725,24 @@ class oe extends Pe {
|
|
2720
2725
|
}
|
2721
2726
|
cloneInstance() {
|
2722
2727
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : de;
|
2723
|
-
const
|
2724
|
-
|
2725
|
-
const
|
2728
|
+
const s = t.forkResourceStore;
|
2729
|
+
s && delete t.forkResourceStore;
|
2730
|
+
const r = {
|
2726
2731
|
...this.options,
|
2727
2732
|
...t,
|
2728
2733
|
isClone: !0
|
2729
|
-
}, i = new oe(
|
2734
|
+
}, i = new oe(r);
|
2730
2735
|
return (t.debug !== void 0 || t.prefix !== void 0) && (i.logger = i.logger.clone(t)), ["store", "services", "language"].forEach((o) => {
|
2731
2736
|
i[o] = this[o];
|
2732
2737
|
}), i.services = {
|
2733
2738
|
...this.services
|
2734
2739
|
}, i.services.utils = {
|
2735
2740
|
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
|
2736
|
-
},
|
2741
|
+
}, s && (i.store = new at(this.store.data, r), i.services.resourceStore = i.store), i.translator = new je(i.services, r), i.translator.on("*", function(o) {
|
2737
2742
|
for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), f = 1; f < u; f++)
|
2738
2743
|
c[f - 1] = arguments[f];
|
2739
2744
|
i.emit(o, ...c);
|
2740
|
-
}), i.init(
|
2745
|
+
}), i.init(r, n), i.translator.options = r, i.translator.backendConnector.services.utils = {
|
2741
2746
|
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
|
2742
2747
|
}, i;
|
2743
2748
|
}
|
@@ -2767,16 +2772,16 @@ D.setDefaultNamespace;
|
|
2767
2772
|
D.hasLoadedNamespace;
|
2768
2773
|
D.loadNamespaces;
|
2769
2774
|
D.loadLanguages;
|
2770
|
-
const
|
2775
|
+
const Ns = {
|
2771
2776
|
error: "Error"
|
2772
|
-
},
|
2777
|
+
}, As = {
|
2773
2778
|
error: "Помилка"
|
2774
|
-
}, pt = "common",
|
2775
|
-
en:
|
2776
|
-
uk:
|
2779
|
+
}, pt = "common", Ts = {
|
2780
|
+
en: Ns,
|
2781
|
+
uk: As
|
2777
2782
|
}, T = D.createInstance({
|
2778
2783
|
defaultNS: pt,
|
2779
|
-
resources:
|
2784
|
+
resources: Ms(Ts, pt),
|
2780
2785
|
lng: "en",
|
2781
2786
|
fallbackLng: "en"
|
2782
2787
|
}), Bt = {
|
@@ -2784,7 +2789,7 @@ const Dr = {
|
|
2784
2789
|
initPromise: T.init().then(() => T)
|
2785
2790
|
}, pe = /* @__PURE__ */ new Map();
|
2786
2791
|
pe.set("common", Bt);
|
2787
|
-
const
|
2792
|
+
const Rs = (e) => {
|
2788
2793
|
if (pe.has(e.namespace))
|
2789
2794
|
return pe.get(e.namespace);
|
2790
2795
|
if (e.plugins)
|
@@ -2802,17 +2807,17 @@ const Fr = (e) => {
|
|
2802
2807
|
}), T.on("languageChanged", (i) => {
|
2803
2808
|
t.language !== i && t.changeLanguage(i);
|
2804
2809
|
});
|
2805
|
-
const
|
2806
|
-
T.language !==
|
2807
|
-
const
|
2808
|
-
return pe.set(e.namespace,
|
2810
|
+
const s = e.language || "en";
|
2811
|
+
T.language !== s && (n = n.then(() => t.changeLanguage(s)).then(() => t));
|
2812
|
+
const r = { initPromise: n, i18nextInstance: t };
|
2813
|
+
return pe.set(e.namespace, r), r;
|
2809
2814
|
};
|
2810
|
-
function
|
2811
|
-
return Object.keys(e).reduce((n,
|
2812
|
-
[t]: e[
|
2815
|
+
function Ms(e, t) {
|
2816
|
+
return Object.keys(e).reduce((n, s) => (n[s] = {
|
2817
|
+
[t]: e[s]
|
2813
2818
|
}, n), {});
|
2814
2819
|
}
|
2815
|
-
const
|
2820
|
+
const Is = {
|
2816
2821
|
errors: {
|
2817
2822
|
measure: {
|
2818
2823
|
unsupportedType: "Unsupported measure type",
|
@@ -2838,7 +2843,7 @@ const Nr = {
|
|
2838
2843
|
},
|
2839
2844
|
unsupportedDimensionalElement: "Unsupported dimensional element type"
|
2840
2845
|
}
|
2841
|
-
},
|
2846
|
+
}, $s = {
|
2842
2847
|
errors: {
|
2843
2848
|
measure: {
|
2844
2849
|
unsupportedType: "Непідтримуваний тип measure",
|
@@ -2864,18 +2869,18 @@ const Nr = {
|
|
2864
2869
|
},
|
2865
2870
|
unsupportedDimensionalElement: "Непідтримуваний тип елемента"
|
2866
2871
|
}
|
2867
|
-
},
|
2868
|
-
en:
|
2869
|
-
uk:
|
2872
|
+
}, _s = "sdkData", ks = {
|
2873
|
+
en: Is,
|
2874
|
+
uk: $s
|
2870
2875
|
};
|
2871
|
-
function
|
2872
|
-
return
|
2873
|
-
resource:
|
2876
|
+
function Bs() {
|
2877
|
+
return Rs({
|
2878
|
+
resource: ks,
|
2874
2879
|
language: "en",
|
2875
|
-
namespace:
|
2880
|
+
namespace: _s
|
2876
2881
|
});
|
2877
2882
|
}
|
2878
|
-
|
2883
|
+
Bs();
|
2879
2884
|
var Te;
|
2880
2885
|
(function(e) {
|
2881
2886
|
e[e.None = 0] = "None", e[e.Ascending = 1] = "Ascending", e[e.Descending = 2] = "Descending";
|
@@ -3026,7 +3031,7 @@ var Ie;
|
|
3026
3031
|
(function(e) {
|
3027
3032
|
e.PRE = "pre", e.POST = "post";
|
3028
3033
|
})(Ie = Ie || (Ie = {}));
|
3029
|
-
function
|
3034
|
+
function Us() {
|
3030
3035
|
this.__data__ = [], this.size = 0;
|
3031
3036
|
}
|
3032
3037
|
function Ut(e, t) {
|
@@ -3038,64 +3043,64 @@ function Le(e, t) {
|
|
3038
3043
|
return n;
|
3039
3044
|
return -1;
|
3040
3045
|
}
|
3041
|
-
var
|
3042
|
-
function
|
3046
|
+
var Vs = Array.prototype, Hs = Vs.splice;
|
3047
|
+
function Ks(e) {
|
3043
3048
|
var t = this.__data__, n = Le(t, e);
|
3044
3049
|
if (n < 0)
|
3045
3050
|
return !1;
|
3046
|
-
var
|
3047
|
-
return n ==
|
3051
|
+
var s = t.length - 1;
|
3052
|
+
return n == s ? t.pop() : Hs.call(t, n, 1), --this.size, !0;
|
3048
3053
|
}
|
3049
|
-
function
|
3054
|
+
function Ws(e) {
|
3050
3055
|
var t = this.__data__, n = Le(t, e);
|
3051
3056
|
return n < 0 ? void 0 : t[n][1];
|
3052
3057
|
}
|
3053
|
-
function
|
3058
|
+
function zs(e) {
|
3054
3059
|
return Le(this.__data__, e) > -1;
|
3055
3060
|
}
|
3056
|
-
function
|
3057
|
-
var n = this.__data__,
|
3058
|
-
return
|
3061
|
+
function Gs(e, t) {
|
3062
|
+
var n = this.__data__, s = Le(n, e);
|
3063
|
+
return s < 0 ? (++this.size, n.push([e, t])) : n[s][1] = t, this;
|
3059
3064
|
}
|
3060
|
-
function
|
3065
|
+
function $(e) {
|
3061
3066
|
var t = -1, n = e == null ? 0 : e.length;
|
3062
3067
|
for (this.clear(); ++t < n; ) {
|
3063
|
-
var
|
3064
|
-
this.set(
|
3068
|
+
var s = e[t];
|
3069
|
+
this.set(s[0], s[1]);
|
3065
3070
|
}
|
3066
3071
|
}
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
|
3072
|
-
function
|
3073
|
-
this.__data__ = new
|
3072
|
+
$.prototype.clear = Us;
|
3073
|
+
$.prototype.delete = Ks;
|
3074
|
+
$.prototype.get = Ws;
|
3075
|
+
$.prototype.has = zs;
|
3076
|
+
$.prototype.set = Gs;
|
3077
|
+
function Js() {
|
3078
|
+
this.__data__ = new $(), this.size = 0;
|
3074
3079
|
}
|
3075
|
-
function
|
3080
|
+
function qs(e) {
|
3076
3081
|
var t = this.__data__, n = t.delete(e);
|
3077
3082
|
return this.size = t.size, n;
|
3078
3083
|
}
|
3079
|
-
function
|
3084
|
+
function Qs(e) {
|
3080
3085
|
return this.__data__.get(e);
|
3081
3086
|
}
|
3082
|
-
function
|
3087
|
+
function Ys(e) {
|
3083
3088
|
return this.__data__.has(e);
|
3084
3089
|
}
|
3085
|
-
var
|
3086
|
-
const $e =
|
3090
|
+
var Xs = k["__core-js_shared__"];
|
3091
|
+
const $e = Xs;
|
3087
3092
|
var gt = function() {
|
3088
3093
|
var e = /[^.]+$/.exec($e && $e.keys && $e.keys.IE_PROTO || "");
|
3089
3094
|
return e ? "Symbol(src)_1." + e : "";
|
3090
3095
|
}();
|
3091
|
-
function
|
3096
|
+
function Zs(e) {
|
3092
3097
|
return !!gt && gt in e;
|
3093
3098
|
}
|
3094
|
-
var
|
3099
|
+
var er = Function.prototype, tr = er.toString;
|
3095
3100
|
function J(e) {
|
3096
3101
|
if (e != null) {
|
3097
3102
|
try {
|
3098
|
-
return
|
3103
|
+
return tr.call(e);
|
3099
3104
|
} catch {
|
3100
3105
|
}
|
3101
3106
|
try {
|
@@ -3105,138 +3110,138 @@ function J(e) {
|
|
3105
3110
|
}
|
3106
3111
|
return "";
|
3107
3112
|
}
|
3108
|
-
var
|
3109
|
-
"^" +
|
3113
|
+
var nr = /[\\^$.*+?()[\]{}|]/g, sr = /^\[object .+?Constructor\]$/, rr = Function.prototype, ir = Object.prototype, ar = rr.toString, or = ir.hasOwnProperty, ur = RegExp(
|
3114
|
+
"^" + ar.call(or).replace(nr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
3110
3115
|
);
|
3111
|
-
function
|
3112
|
-
if (!De(e) ||
|
3116
|
+
function lr(e) {
|
3117
|
+
if (!De(e) || Zs(e))
|
3113
3118
|
return !1;
|
3114
|
-
var t =
|
3119
|
+
var t = En(e) ? ur : sr;
|
3115
3120
|
return t.test(J(e));
|
3116
3121
|
}
|
3117
|
-
function
|
3122
|
+
function cr(e, t) {
|
3118
3123
|
return e == null ? void 0 : e[t];
|
3119
3124
|
}
|
3120
3125
|
function q(e, t) {
|
3121
|
-
var n =
|
3122
|
-
return
|
3126
|
+
var n = cr(e, t);
|
3127
|
+
return lr(n) ? n : void 0;
|
3123
3128
|
}
|
3124
|
-
var
|
3125
|
-
const ue =
|
3126
|
-
var
|
3127
|
-
const le =
|
3128
|
-
function
|
3129
|
+
var fr = q(k, "Map");
|
3130
|
+
const ue = fr;
|
3131
|
+
var dr = q(Object, "create");
|
3132
|
+
const le = dr;
|
3133
|
+
function pr() {
|
3129
3134
|
this.__data__ = le ? le(null) : {}, this.size = 0;
|
3130
3135
|
}
|
3131
|
-
function
|
3136
|
+
function gr(e) {
|
3132
3137
|
var t = this.has(e) && delete this.__data__[e];
|
3133
3138
|
return this.size -= t ? 1 : 0, t;
|
3134
3139
|
}
|
3135
|
-
var
|
3136
|
-
function
|
3140
|
+
var hr = "__lodash_hash_undefined__", mr = Object.prototype, br = mr.hasOwnProperty;
|
3141
|
+
function yr(e) {
|
3137
3142
|
var t = this.__data__;
|
3138
3143
|
if (le) {
|
3139
3144
|
var n = t[e];
|
3140
|
-
return n ===
|
3145
|
+
return n === hr ? void 0 : n;
|
3141
3146
|
}
|
3142
|
-
return
|
3147
|
+
return br.call(t, e) ? t[e] : void 0;
|
3143
3148
|
}
|
3144
|
-
var
|
3145
|
-
function
|
3149
|
+
var Or = Object.prototype, Sr = Or.hasOwnProperty;
|
3150
|
+
function vr(e) {
|
3146
3151
|
var t = this.__data__;
|
3147
|
-
return le ? t[e] !== void 0 :
|
3152
|
+
return le ? t[e] !== void 0 : Sr.call(t, e);
|
3148
3153
|
}
|
3149
|
-
var
|
3150
|
-
function
|
3154
|
+
var xr = "__lodash_hash_undefined__";
|
3155
|
+
function wr(e, t) {
|
3151
3156
|
var n = this.__data__;
|
3152
|
-
return this.size += this.has(e) ? 0 : 1, n[e] = le && t === void 0 ?
|
3157
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = le && t === void 0 ? xr : t, this;
|
3153
3158
|
}
|
3154
|
-
function
|
3159
|
+
function z(e) {
|
3155
3160
|
var t = -1, n = e == null ? 0 : e.length;
|
3156
3161
|
for (this.clear(); ++t < n; ) {
|
3157
|
-
var
|
3158
|
-
this.set(
|
3162
|
+
var s = e[t];
|
3163
|
+
this.set(s[0], s[1]);
|
3159
3164
|
}
|
3160
3165
|
}
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
function
|
3166
|
+
z.prototype.clear = pr;
|
3167
|
+
z.prototype.delete = gr;
|
3168
|
+
z.prototype.get = yr;
|
3169
|
+
z.prototype.has = vr;
|
3170
|
+
z.prototype.set = wr;
|
3171
|
+
function Cr() {
|
3167
3172
|
this.size = 0, this.__data__ = {
|
3168
|
-
hash: new
|
3169
|
-
map: new (ue ||
|
3170
|
-
string: new
|
3173
|
+
hash: new z(),
|
3174
|
+
map: new (ue || $)(),
|
3175
|
+
string: new z()
|
3171
3176
|
};
|
3172
3177
|
}
|
3173
|
-
function
|
3178
|
+
function jr(e) {
|
3174
3179
|
var t = typeof e;
|
3175
3180
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
3176
3181
|
}
|
3177
3182
|
function Fe(e, t) {
|
3178
3183
|
var n = e.__data__;
|
3179
|
-
return
|
3184
|
+
return jr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
3180
3185
|
}
|
3181
|
-
function
|
3186
|
+
function Dr(e) {
|
3182
3187
|
var t = Fe(this, e).delete(e);
|
3183
3188
|
return this.size -= t ? 1 : 0, t;
|
3184
3189
|
}
|
3185
|
-
function
|
3190
|
+
function Pr(e) {
|
3186
3191
|
return Fe(this, e).get(e);
|
3187
3192
|
}
|
3188
|
-
function
|
3193
|
+
function Lr(e) {
|
3189
3194
|
return Fe(this, e).has(e);
|
3190
3195
|
}
|
3191
|
-
function
|
3192
|
-
var n = Fe(this, e),
|
3193
|
-
return n.set(e, t), this.size += n.size ==
|
3196
|
+
function Fr(e, t) {
|
3197
|
+
var n = Fe(this, e), s = n.size;
|
3198
|
+
return n.set(e, t), this.size += n.size == s ? 0 : 1, this;
|
3194
3199
|
}
|
3195
3200
|
function te(e) {
|
3196
3201
|
var t = -1, n = e == null ? 0 : e.length;
|
3197
3202
|
for (this.clear(); ++t < n; ) {
|
3198
|
-
var
|
3199
|
-
this.set(
|
3203
|
+
var s = e[t];
|
3204
|
+
this.set(s[0], s[1]);
|
3200
3205
|
}
|
3201
3206
|
}
|
3202
|
-
te.prototype.clear =
|
3203
|
-
te.prototype.delete =
|
3204
|
-
te.prototype.get =
|
3205
|
-
te.prototype.has =
|
3206
|
-
te.prototype.set =
|
3207
|
-
var
|
3208
|
-
function
|
3207
|
+
te.prototype.clear = Cr;
|
3208
|
+
te.prototype.delete = Dr;
|
3209
|
+
te.prototype.get = Pr;
|
3210
|
+
te.prototype.has = Lr;
|
3211
|
+
te.prototype.set = Fr;
|
3212
|
+
var Er = 200;
|
3213
|
+
function Nr(e, t) {
|
3209
3214
|
var n = this.__data__;
|
3210
|
-
if (n instanceof
|
3211
|
-
var
|
3212
|
-
if (!ue ||
|
3213
|
-
return
|
3214
|
-
n = this.__data__ = new te(
|
3215
|
+
if (n instanceof $) {
|
3216
|
+
var s = n.__data__;
|
3217
|
+
if (!ue || s.length < Er - 1)
|
3218
|
+
return s.push([e, t]), this.size = ++n.size, this;
|
3219
|
+
n = this.__data__ = new te(s);
|
3215
3220
|
}
|
3216
3221
|
return n.set(e, t), this.size = n.size, this;
|
3217
3222
|
}
|
3218
3223
|
function ne(e) {
|
3219
|
-
var t = this.__data__ = new
|
3224
|
+
var t = this.__data__ = new $(e);
|
3220
3225
|
this.size = t.size;
|
3221
3226
|
}
|
3222
|
-
ne.prototype.clear =
|
3223
|
-
ne.prototype.delete =
|
3224
|
-
ne.prototype.get =
|
3225
|
-
ne.prototype.has =
|
3226
|
-
ne.prototype.set =
|
3227
|
-
function
|
3228
|
-
for (var n = -1,
|
3227
|
+
ne.prototype.clear = Js;
|
3228
|
+
ne.prototype.delete = qs;
|
3229
|
+
ne.prototype.get = Qs;
|
3230
|
+
ne.prototype.has = Ys;
|
3231
|
+
ne.prototype.set = Nr;
|
3232
|
+
function Ar(e, t) {
|
3233
|
+
for (var n = -1, s = e == null ? 0 : e.length; ++n < s && t(e[n], n, e) !== !1; )
|
3229
3234
|
;
|
3230
3235
|
return e;
|
3231
3236
|
}
|
3232
|
-
var
|
3237
|
+
var Tr = function() {
|
3233
3238
|
try {
|
3234
3239
|
var e = q(Object, "defineProperty");
|
3235
3240
|
return e({}, "", {}), e;
|
3236
3241
|
} catch {
|
3237
3242
|
}
|
3238
3243
|
}();
|
3239
|
-
const ht =
|
3244
|
+
const ht = Tr;
|
3240
3245
|
function Vt(e, t, n) {
|
3241
3246
|
t == "__proto__" && ht ? ht(e, t, {
|
3242
3247
|
configurable: !0,
|
@@ -3245,193 +3250,193 @@ function Vt(e, t, n) {
|
|
3245
3250
|
writable: !0
|
3246
3251
|
}) : e[t] = n;
|
3247
3252
|
}
|
3248
|
-
var
|
3253
|
+
var Rr = Object.prototype, Mr = Rr.hasOwnProperty;
|
3249
3254
|
function Ht(e, t, n) {
|
3250
|
-
var
|
3251
|
-
(!(
|
3255
|
+
var s = e[t];
|
3256
|
+
(!(Mr.call(e, t) && Ut(s, n)) || n === void 0 && !(t in e)) && Vt(e, t, n);
|
3252
3257
|
}
|
3253
|
-
function Ee(e, t, n,
|
3254
|
-
var
|
3258
|
+
function Ee(e, t, n, s) {
|
3259
|
+
var r = !n;
|
3255
3260
|
n || (n = {});
|
3256
3261
|
for (var i = -1, a = t.length; ++i < a; ) {
|
3257
|
-
var o = t[i], u =
|
3258
|
-
u === void 0 && (u = e[o]),
|
3262
|
+
var o = t[i], u = s ? s(n[o], e[o], o, n, e) : void 0;
|
3263
|
+
u === void 0 && (u = e[o]), r ? Vt(n, o, u) : Ht(n, o, u);
|
3259
3264
|
}
|
3260
3265
|
return n;
|
3261
3266
|
}
|
3262
|
-
function
|
3267
|
+
function Ir(e, t) {
|
3263
3268
|
return e && Ee(t, We(t), e);
|
3264
3269
|
}
|
3265
|
-
function
|
3270
|
+
function $r(e) {
|
3266
3271
|
var t = [];
|
3267
3272
|
if (e != null)
|
3268
3273
|
for (var n in Object(e))
|
3269
3274
|
t.push(n);
|
3270
3275
|
return t;
|
3271
3276
|
}
|
3272
|
-
var
|
3273
|
-
function
|
3277
|
+
var _r = Object.prototype, kr = _r.hasOwnProperty;
|
3278
|
+
function Br(e) {
|
3274
3279
|
if (!De(e))
|
3275
|
-
return
|
3280
|
+
return $r(e);
|
3276
3281
|
var t = At(e), n = [];
|
3277
|
-
for (var
|
3278
|
-
|
3282
|
+
for (var s in e)
|
3283
|
+
s == "constructor" && (t || !kr.call(e, s)) || n.push(s);
|
3279
3284
|
return n;
|
3280
3285
|
}
|
3281
3286
|
function Je(e) {
|
3282
|
-
return
|
3287
|
+
return Nn(e) ? An(e, !0) : Br(e);
|
3283
3288
|
}
|
3284
|
-
function
|
3289
|
+
function Ur(e, t) {
|
3285
3290
|
return e && Ee(t, Je(t), e);
|
3286
3291
|
}
|
3287
|
-
var Kt = typeof exports == "object" && exports && !exports.nodeType && exports, mt = Kt && typeof module == "object" && module && !module.nodeType && module,
|
3288
|
-
function
|
3292
|
+
var Kt = typeof exports == "object" && exports && !exports.nodeType && exports, mt = Kt && typeof module == "object" && module && !module.nodeType && module, Vr = mt && mt.exports === Kt, bt = Vr ? k.Buffer : void 0, yt = bt ? bt.allocUnsafe : void 0;
|
3293
|
+
function Hr(e, t) {
|
3289
3294
|
if (t)
|
3290
3295
|
return e.slice();
|
3291
|
-
var n = e.length,
|
3292
|
-
return e.copy(
|
3296
|
+
var n = e.length, s = yt ? yt(n) : new e.constructor(n);
|
3297
|
+
return e.copy(s), s;
|
3293
3298
|
}
|
3294
|
-
function
|
3295
|
-
var n = -1,
|
3296
|
-
for (t || (t = Array(
|
3299
|
+
function Kr(e, t) {
|
3300
|
+
var n = -1, s = e.length;
|
3301
|
+
for (t || (t = Array(s)); ++n < s; )
|
3297
3302
|
t[n] = e[n];
|
3298
3303
|
return t;
|
3299
3304
|
}
|
3300
|
-
function
|
3301
|
-
for (var n = -1,
|
3305
|
+
function Wr(e, t) {
|
3306
|
+
for (var n = -1, s = e == null ? 0 : e.length, r = 0, i = []; ++n < s; ) {
|
3302
3307
|
var a = e[n];
|
3303
|
-
t(a, n, e) && (i[
|
3308
|
+
t(a, n, e) && (i[r++] = a);
|
3304
3309
|
}
|
3305
3310
|
return i;
|
3306
3311
|
}
|
3307
3312
|
function Wt() {
|
3308
3313
|
return [];
|
3309
3314
|
}
|
3310
|
-
var
|
3311
|
-
return e == null ? [] : (e = Object(e),
|
3312
|
-
return
|
3315
|
+
var zr = Object.prototype, Gr = zr.propertyIsEnumerable, Ot = Object.getOwnPropertySymbols, Jr = Ot ? function(e) {
|
3316
|
+
return e == null ? [] : (e = Object(e), Wr(Ot(e), function(t) {
|
3317
|
+
return Gr.call(e, t);
|
3313
3318
|
}));
|
3314
3319
|
} : Wt;
|
3315
|
-
const qe =
|
3316
|
-
function
|
3320
|
+
const qe = Jr;
|
3321
|
+
function qr(e, t) {
|
3317
3322
|
return Ee(e, qe(e), t);
|
3318
3323
|
}
|
3319
|
-
function
|
3320
|
-
for (var n = -1,
|
3321
|
-
e[
|
3324
|
+
function zt(e, t) {
|
3325
|
+
for (var n = -1, s = t.length, r = e.length; ++n < s; )
|
3326
|
+
e[r + n] = t[n];
|
3322
3327
|
return e;
|
3323
3328
|
}
|
3324
|
-
var
|
3325
|
-
const
|
3326
|
-
var
|
3329
|
+
var Qr = Tn(Object.getPrototypeOf, Object);
|
3330
|
+
const Gt = Qr;
|
3331
|
+
var Yr = Object.getOwnPropertySymbols, Xr = Yr ? function(e) {
|
3327
3332
|
for (var t = []; e; )
|
3328
|
-
|
3333
|
+
zt(t, qe(e)), e = Gt(e);
|
3329
3334
|
return t;
|
3330
3335
|
} : Wt;
|
3331
|
-
const Jt =
|
3332
|
-
function
|
3336
|
+
const Jt = Xr;
|
3337
|
+
function Zr(e, t) {
|
3333
3338
|
return Ee(e, Jt(e), t);
|
3334
3339
|
}
|
3335
3340
|
function qt(e, t, n) {
|
3336
|
-
var
|
3337
|
-
return Tt(e) ?
|
3341
|
+
var s = t(e);
|
3342
|
+
return Tt(e) ? s : zt(s, n(e));
|
3338
3343
|
}
|
3339
|
-
function
|
3344
|
+
function ei(e) {
|
3340
3345
|
return qt(e, We, qe);
|
3341
3346
|
}
|
3342
|
-
function
|
3347
|
+
function ti(e) {
|
3343
3348
|
return qt(e, Je, Jt);
|
3344
3349
|
}
|
3345
|
-
var
|
3346
|
-
const Ue =
|
3347
|
-
var
|
3348
|
-
const Ve =
|
3349
|
-
var
|
3350
|
-
const He =
|
3351
|
-
var
|
3352
|
-
const Ke =
|
3353
|
-
var St = "[object Map]",
|
3354
|
-
(Ue &&
|
3355
|
-
var t = Rt(e), n = t ==
|
3356
|
-
if (
|
3357
|
-
switch (
|
3358
|
-
case
|
3350
|
+
var ni = q(k, "DataView");
|
3351
|
+
const Ue = ni;
|
3352
|
+
var si = q(k, "Promise");
|
3353
|
+
const Ve = si;
|
3354
|
+
var ri = q(k, "Set");
|
3355
|
+
const He = ri;
|
3356
|
+
var ii = q(k, "WeakMap");
|
3357
|
+
const Ke = ii;
|
3358
|
+
var St = "[object Map]", ai = "[object Object]", vt = "[object Promise]", xt = "[object Set]", wt = "[object WeakMap]", Ct = "[object DataView]", oi = J(Ue), ui = J(ue), li = J(Ve), ci = J(He), fi = J(Ke), K = Rt;
|
3359
|
+
(Ue && K(new Ue(new ArrayBuffer(1))) != Ct || ue && K(new ue()) != St || Ve && K(Ve.resolve()) != vt || He && K(new He()) != xt || Ke && K(new Ke()) != wt) && (K = function(e) {
|
3360
|
+
var t = Rt(e), n = t == ai ? e.constructor : void 0, s = n ? J(n) : "";
|
3361
|
+
if (s)
|
3362
|
+
switch (s) {
|
3363
|
+
case oi:
|
3359
3364
|
return Ct;
|
3360
|
-
case
|
3365
|
+
case ui:
|
3361
3366
|
return St;
|
3362
|
-
case
|
3367
|
+
case li:
|
3363
3368
|
return vt;
|
3364
|
-
case
|
3369
|
+
case ci:
|
3365
3370
|
return xt;
|
3366
|
-
case
|
3371
|
+
case fi:
|
3367
3372
|
return wt;
|
3368
3373
|
}
|
3369
3374
|
return t;
|
3370
3375
|
});
|
3371
|
-
const Qe =
|
3372
|
-
var
|
3373
|
-
function
|
3376
|
+
const Qe = K;
|
3377
|
+
var di = Object.prototype, pi = di.hasOwnProperty;
|
3378
|
+
function gi(e) {
|
3374
3379
|
var t = e.length, n = new e.constructor(t);
|
3375
|
-
return t && typeof e[0] == "string" &&
|
3380
|
+
return t && typeof e[0] == "string" && pi.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
3376
3381
|
}
|
3377
|
-
var
|
3378
|
-
const jt =
|
3382
|
+
var hi = k.Uint8Array;
|
3383
|
+
const jt = hi;
|
3379
3384
|
function Ye(e) {
|
3380
3385
|
var t = new e.constructor(e.byteLength);
|
3381
3386
|
return new jt(t).set(new jt(e)), t;
|
3382
3387
|
}
|
3383
|
-
function
|
3388
|
+
function mi(e, t) {
|
3384
3389
|
var n = t ? Ye(e.buffer) : e.buffer;
|
3385
3390
|
return new e.constructor(n, e.byteOffset, e.byteLength);
|
3386
3391
|
}
|
3387
|
-
var
|
3388
|
-
function
|
3389
|
-
var t = new e.constructor(e.source,
|
3392
|
+
var bi = /\w*$/;
|
3393
|
+
function yi(e) {
|
3394
|
+
var t = new e.constructor(e.source, bi.exec(e));
|
3390
3395
|
return t.lastIndex = e.lastIndex, t;
|
3391
3396
|
}
|
3392
3397
|
var Dt = nt ? nt.prototype : void 0, Pt = Dt ? Dt.valueOf : void 0;
|
3393
|
-
function
|
3398
|
+
function Oi(e) {
|
3394
3399
|
return Pt ? Object(Pt.call(e)) : {};
|
3395
3400
|
}
|
3396
|
-
function
|
3401
|
+
function Si(e, t) {
|
3397
3402
|
var n = t ? Ye(e.buffer) : e.buffer;
|
3398
3403
|
return new e.constructor(n, e.byteOffset, e.length);
|
3399
3404
|
}
|
3400
|
-
var
|
3401
|
-
function
|
3402
|
-
var
|
3405
|
+
var vi = "[object Boolean]", xi = "[object Date]", wi = "[object Map]", Ci = "[object Number]", ji = "[object RegExp]", Di = "[object Set]", Pi = "[object String]", Li = "[object Symbol]", Fi = "[object ArrayBuffer]", Ei = "[object DataView]", Ni = "[object Float32Array]", Ai = "[object Float64Array]", Ti = "[object Int8Array]", Ri = "[object Int16Array]", Mi = "[object Int32Array]", Ii = "[object Uint8Array]", $i = "[object Uint8ClampedArray]", _i = "[object Uint16Array]", ki = "[object Uint32Array]";
|
3406
|
+
function Bi(e, t, n) {
|
3407
|
+
var s = e.constructor;
|
3403
3408
|
switch (t) {
|
3404
|
-
case Ci:
|
3405
|
-
return Ye(e);
|
3406
|
-
case mi:
|
3407
|
-
case bi:
|
3408
|
-
return new r(+e);
|
3409
|
-
case ji:
|
3410
|
-
return fi(e, n);
|
3411
|
-
case Di:
|
3412
|
-
case Pi:
|
3413
|
-
case Li:
|
3414
3409
|
case Fi:
|
3410
|
+
return Ye(e);
|
3411
|
+
case vi:
|
3412
|
+
case xi:
|
3413
|
+
return new s(+e);
|
3415
3414
|
case Ei:
|
3415
|
+
return mi(e, n);
|
3416
3416
|
case Ni:
|
3417
3417
|
case Ai:
|
3418
3418
|
case Ti:
|
3419
3419
|
case Ri:
|
3420
|
-
|
3421
|
-
case
|
3422
|
-
|
3423
|
-
case
|
3424
|
-
case
|
3425
|
-
return
|
3426
|
-
case Si:
|
3427
|
-
return pi(e);
|
3428
|
-
case vi:
|
3429
|
-
return new r();
|
3420
|
+
case Mi:
|
3421
|
+
case Ii:
|
3422
|
+
case $i:
|
3423
|
+
case _i:
|
3424
|
+
case ki:
|
3425
|
+
return Si(e, n);
|
3430
3426
|
case wi:
|
3431
|
-
return
|
3427
|
+
return new s();
|
3428
|
+
case Ci:
|
3429
|
+
case Pi:
|
3430
|
+
return new s(e);
|
3431
|
+
case ji:
|
3432
|
+
return yi(e);
|
3433
|
+
case Di:
|
3434
|
+
return new s();
|
3435
|
+
case Li:
|
3436
|
+
return Oi(e);
|
3432
3437
|
}
|
3433
3438
|
}
|
3434
|
-
var Lt = Object.create,
|
3439
|
+
var Lt = Object.create, Ui = function() {
|
3435
3440
|
function e() {
|
3436
3441
|
}
|
3437
3442
|
return function(t) {
|
@@ -3444,66 +3449,115 @@ var Lt = Object.create, Ii = function() {
|
|
3444
3449
|
return e.prototype = void 0, n;
|
3445
3450
|
};
|
3446
3451
|
}();
|
3447
|
-
const
|
3448
|
-
function
|
3449
|
-
return typeof e.constructor == "function" && !At(e) ?
|
3452
|
+
const Vi = Ui;
|
3453
|
+
function Hi(e) {
|
3454
|
+
return typeof e.constructor == "function" && !At(e) ? Vi(Gt(e)) : {};
|
3450
3455
|
}
|
3451
|
-
var
|
3452
|
-
function
|
3453
|
-
return Mt(e) && Qe(e) ==
|
3456
|
+
var Ki = "[object Map]";
|
3457
|
+
function Wi(e) {
|
3458
|
+
return Mt(e) && Qe(e) == Ki;
|
3454
3459
|
}
|
3455
|
-
var Ft = Se && Se.isMap,
|
3456
|
-
const
|
3457
|
-
var
|
3458
|
-
function
|
3459
|
-
return Mt(e) && Qe(e) ==
|
3460
|
+
var Ft = Se && Se.isMap, zi = Ft ? It(Ft) : Wi;
|
3461
|
+
const Gi = zi;
|
3462
|
+
var Ji = "[object Set]";
|
3463
|
+
function qi(e) {
|
3464
|
+
return Mt(e) && Qe(e) == Ji;
|
3460
3465
|
}
|
3461
|
-
var Et = Se && Se.isSet,
|
3462
|
-
const
|
3463
|
-
var
|
3464
|
-
S[Qt] = S[
|
3465
|
-
S[
|
3466
|
-
function ge(e, t, n,
|
3467
|
-
var a, o = t &
|
3468
|
-
if (n && (a =
|
3466
|
+
var Et = Se && Se.isSet, Qi = Et ? It(Et) : qi;
|
3467
|
+
const Yi = Qi;
|
3468
|
+
var Xi = 1, Zi = 2, ea = 4, Qt = "[object Arguments]", ta = "[object Array]", na = "[object Boolean]", sa = "[object Date]", ra = "[object Error]", Yt = "[object Function]", ia = "[object GeneratorFunction]", aa = "[object Map]", oa = "[object Number]", Xt = "[object Object]", ua = "[object RegExp]", la = "[object Set]", ca = "[object String]", fa = "[object Symbol]", da = "[object WeakMap]", pa = "[object ArrayBuffer]", ga = "[object DataView]", ha = "[object Float32Array]", ma = "[object Float64Array]", ba = "[object Int8Array]", ya = "[object Int16Array]", Oa = "[object Int32Array]", Sa = "[object Uint8Array]", va = "[object Uint8ClampedArray]", xa = "[object Uint16Array]", wa = "[object Uint32Array]", S = {};
|
3469
|
+
S[Qt] = S[ta] = S[pa] = S[ga] = S[na] = S[sa] = S[ha] = S[ma] = S[ba] = S[ya] = S[Oa] = S[aa] = S[oa] = S[Xt] = S[ua] = S[la] = S[ca] = S[fa] = S[Sa] = S[va] = S[xa] = S[wa] = !0;
|
3470
|
+
S[ra] = S[Yt] = S[da] = !1;
|
3471
|
+
function ge(e, t, n, s, r, i) {
|
3472
|
+
var a, o = t & Xi, u = t & Zi, c = t & ea;
|
3473
|
+
if (n && (a = r ? n(e, s, r, i) : n(e)), a !== void 0)
|
3469
3474
|
return a;
|
3470
3475
|
if (!De(e))
|
3471
3476
|
return e;
|
3472
3477
|
var f = Tt(e);
|
3473
3478
|
if (f) {
|
3474
|
-
if (a =
|
3475
|
-
return
|
3479
|
+
if (a = gi(e), !o)
|
3480
|
+
return Kr(e, a);
|
3476
3481
|
} else {
|
3477
|
-
var d = Qe(e), l = d == Yt || d ==
|
3478
|
-
if (
|
3479
|
-
return
|
3480
|
-
if (d == Xt || d == Qt || l && !
|
3481
|
-
if (a = u || l ? {} :
|
3482
|
-
return u ?
|
3482
|
+
var d = Qe(e), l = d == Yt || d == ia;
|
3483
|
+
if (Rn(e))
|
3484
|
+
return Hr(e, o);
|
3485
|
+
if (d == Xt || d == Qt || l && !r) {
|
3486
|
+
if (a = u || l ? {} : Hi(e), !o)
|
3487
|
+
return u ? Zr(e, Ur(a, e)) : qr(e, Ir(a, e));
|
3483
3488
|
} else {
|
3484
3489
|
if (!S[d])
|
3485
|
-
return
|
3486
|
-
a =
|
3490
|
+
return r ? e : {};
|
3491
|
+
a = Bi(e, d, o);
|
3487
3492
|
}
|
3488
3493
|
}
|
3489
3494
|
i || (i = new ne());
|
3490
3495
|
var g = i.get(e);
|
3491
3496
|
if (g)
|
3492
3497
|
return g;
|
3493
|
-
i.set(e, a),
|
3498
|
+
i.set(e, a), Yi(e) ? e.forEach(function(h) {
|
3494
3499
|
a.add(ge(h, t, n, h, e, i));
|
3495
|
-
}) :
|
3500
|
+
}) : Gi(e) && e.forEach(function(h, x) {
|
3496
3501
|
a.set(x, ge(h, t, n, x, e, i));
|
3497
3502
|
});
|
3498
|
-
var p = c ? u ?
|
3499
|
-
return
|
3503
|
+
var p = c ? u ? ti : ei : u ? Je : We, m = f ? void 0 : p(e);
|
3504
|
+
return Ar(m || e, function(h, x) {
|
3500
3505
|
m && (x = h, h = e[x]), Ht(a, x, ge(h, t, n, x, e, i));
|
3501
3506
|
}), a;
|
3502
3507
|
}
|
3503
|
-
var
|
3504
|
-
function
|
3505
|
-
return ge(e,
|
3508
|
+
var Ca = 1, ja = 4;
|
3509
|
+
function Da(e) {
|
3510
|
+
return ge(e, Ca | ja);
|
3511
|
+
}
|
3512
|
+
function Pa(e) {
|
3513
|
+
return Buffer.from(e).toString("utf8");
|
3514
|
+
}
|
3515
|
+
function La(e) {
|
3516
|
+
return String.fromCharCode.apply(null, new Uint16Array(e));
|
3517
|
+
}
|
3518
|
+
function Fa() {
|
3519
|
+
return "UNSUPPORTED";
|
3506
3520
|
}
|
3521
|
+
typeof Buffer < "u" && Buffer.from;
|
3522
|
+
const Ea = {
|
3523
|
+
logicalAttribute: "logicalAttribute",
|
3524
|
+
members: "members",
|
3525
|
+
exclude: "exclude",
|
3526
|
+
measure: "measure",
|
3527
|
+
ranking: "ranking",
|
3528
|
+
text: "text",
|
3529
|
+
numeric: "numeric",
|
3530
|
+
dateRange: "dateRange",
|
3531
|
+
relativeDate: "relativeDate",
|
3532
|
+
cascading: "cascading",
|
3533
|
+
advanced: "advanced"
|
3534
|
+
};
|
3535
|
+
function Na(e) {
|
3536
|
+
return "filterType" in e && e.filterType === Ea.cascading;
|
3537
|
+
}
|
3538
|
+
const W = (e) => {
|
3539
|
+
if (Array.isArray(e)) {
|
3540
|
+
const [t, ...n] = e;
|
3541
|
+
return n.length === 0 ? W(t) : {
|
3542
|
+
operator: "AND",
|
3543
|
+
left: W(t),
|
3544
|
+
right: W(n)
|
3545
|
+
};
|
3546
|
+
}
|
3547
|
+
return e;
|
3548
|
+
};
|
3549
|
+
var _e;
|
3550
|
+
(function(e) {
|
3551
|
+
e.and = (t, n) => ({
|
3552
|
+
operator: "AND",
|
3553
|
+
left: W(t),
|
3554
|
+
right: W(n)
|
3555
|
+
}), e.or = (t, n) => ({
|
3556
|
+
operator: "OR",
|
3557
|
+
left: W(t),
|
3558
|
+
right: W(n)
|
3559
|
+
});
|
3560
|
+
})(_e = _e || (_e = {}));
|
3507
3561
|
var he;
|
3508
3562
|
(function(e) {
|
3509
3563
|
e.INCLUDE_ALL = "INCLUDE_ALL", e.ADVANCED = "ADVANCED", e.INVALID = "INVALID", e.CONDITION = "CONDITION", e.SPECIFIC_ITEMS = "SPECIFIC_ITEMS";
|
@@ -3520,92 +3574,43 @@ var ye;
|
|
3520
3574
|
(function(e) {
|
3521
3575
|
e.YEARS = "years", e.QUARTERS = "quarters", e.MONTHS = "months", e.WEEKS = "weeks", e.DAYS = "days", e.HOURS = "hours", e.MINUTES = "minutes";
|
3522
3576
|
})(ye = ye || (ye = {}));
|
3523
|
-
var
|
3577
|
+
var ke;
|
3524
3578
|
(function(e) {
|
3525
3579
|
e.DATE_TIME = "datetime", e.NUMERIC = "numeric", e.TEXT = "text";
|
3526
|
-
})(
|
3527
|
-
const
|
3528
|
-
[
|
3580
|
+
})(ke = ke || (ke = {}));
|
3581
|
+
const A = Object.assign(Object.assign(Object.assign({}, he), me), be), Aa = {
|
3582
|
+
[A.INCLUDE_ALL]: {
|
3529
3583
|
all: !0,
|
3530
|
-
filterType:
|
3584
|
+
filterType: A.INCLUDE_ALL
|
3531
3585
|
},
|
3532
|
-
[
|
3586
|
+
[A.PERIOD]: {
|
3533
3587
|
last: { count: 1, offset: 1 },
|
3534
3588
|
isNotCurrentPeriod: !0,
|
3535
|
-
filterType:
|
3589
|
+
filterType: A.PERIOD
|
3536
3590
|
},
|
3537
|
-
[
|
3538
|
-
filterType:
|
3591
|
+
[A.DATE_RANGE]: {
|
3592
|
+
filterType: A.DATE_RANGE
|
3539
3593
|
},
|
3540
|
-
[
|
3541
|
-
filterType:
|
3594
|
+
[A.NUMERIC_RANGE]: {
|
3595
|
+
filterType: A.NUMERIC_RANGE
|
3542
3596
|
},
|
3543
|
-
[
|
3597
|
+
[A.CONDITION]: {
|
3544
3598
|
explicit: !1,
|
3545
3599
|
multiSelection: !0,
|
3546
3600
|
exclude: { members: [] },
|
3547
|
-
filterType:
|
3601
|
+
filterType: A.CONDITION
|
3548
3602
|
},
|
3549
|
-
[
|
3603
|
+
[A.SPECIFIC_ITEMS]: {
|
3550
3604
|
explicit: !0,
|
3551
3605
|
multiSelection: !0,
|
3552
3606
|
members: [],
|
3553
|
-
filterType:
|
3607
|
+
filterType: A.SPECIFIC_ITEMS
|
3554
3608
|
}
|
3555
3609
|
};
|
3556
|
-
|
3557
|
-
var ke;
|
3558
|
-
(function(e) {
|
3559
|
-
e.IS = "members", e.IS_NOT = "exclude", e.IS_WITHIN = "isWithin", e.TOP = "top", e.BOTTOM = "bottom", e.AFTER = "after", e.BEFORE = "before", e.STARTS_WITH = "startsWith", e.DOESNT_START_WITH = "doesntStartWith", e.ENDS_WITH = "endsWith", e.DOESNT_END_WITH = "doesntEndWith", e.CONTAINS = "contains", e.DOESNT_CONTAIN = "doesntContain", e.EQUALS = "equals", e.DOESNT_EQUAL = "doesntEqual", e.IS_EMPTY = "isEmpty", e.IS_NOT_EMPTY = "isNotEmpty", e.GREATER_THAN = "fromNotEqual", e.GREATER_THAN_OR_EQUAL = "from", e.LESS_THAN = "toNotEqual", e.LESS_THAN_OR_EQUAL = "to", e.BETWEEN = "between", e.IS_NOT_BETWEEN = "isNotBetween", e.MULTIPLE_CONDITION = "multipleCondition", e.NONE = "none";
|
3560
|
-
})(ke = ke || (ke = {}));
|
3561
|
-
function wa(e) {
|
3562
|
-
return Buffer.from(e).toString("utf8");
|
3563
|
-
}
|
3564
|
-
function Ca(e) {
|
3565
|
-
return String.fromCharCode.apply(null, new Uint16Array(e));
|
3566
|
-
}
|
3567
|
-
function ja() {
|
3568
|
-
return "UNSUPPORTED";
|
3569
|
-
}
|
3570
|
-
typeof Buffer < "u" && Buffer.from;
|
3571
|
-
const Da = {
|
3572
|
-
logicalAttribute: "logicalAttribute",
|
3573
|
-
members: "members",
|
3574
|
-
exclude: "exclude",
|
3575
|
-
measure: "measure",
|
3576
|
-
ranking: "ranking",
|
3577
|
-
text: "text",
|
3578
|
-
numeric: "numeric",
|
3579
|
-
dateRange: "dateRange",
|
3580
|
-
relativeDate: "relativeDate",
|
3581
|
-
cascading: "cascading",
|
3582
|
-
advanced: "advanced"
|
3583
|
-
};
|
3584
|
-
function Pa(e) {
|
3585
|
-
return "filterType" in e && e.filterType === Da.cascading;
|
3586
|
-
}
|
3587
|
-
const K = (e) => {
|
3588
|
-
if (Array.isArray(e)) {
|
3589
|
-
const [t, ...n] = e;
|
3590
|
-
return n.length === 0 ? K(t) : {
|
3591
|
-
operator: "AND",
|
3592
|
-
left: K(t),
|
3593
|
-
right: K(n)
|
3594
|
-
};
|
3595
|
-
}
|
3596
|
-
return e;
|
3597
|
-
};
|
3610
|
+
Aa.INCLUDE_ALL, ye.YEARS;
|
3598
3611
|
var Be;
|
3599
3612
|
(function(e) {
|
3600
|
-
e.
|
3601
|
-
operator: "AND",
|
3602
|
-
left: K(t),
|
3603
|
-
right: K(n)
|
3604
|
-
}), e.or = (t, n) => ({
|
3605
|
-
operator: "OR",
|
3606
|
-
left: K(t),
|
3607
|
-
right: K(n)
|
3608
|
-
});
|
3613
|
+
e.IS = "members", e.IS_NOT = "exclude", e.IS_WITHIN = "isWithin", e.TOP = "top", e.BOTTOM = "bottom", e.AFTER = "after", e.BEFORE = "before", e.STARTS_WITH = "startsWith", e.DOESNT_START_WITH = "doesntStartWith", e.ENDS_WITH = "endsWith", e.DOESNT_END_WITH = "doesntEndWith", e.CONTAINS = "contains", e.DOESNT_CONTAIN = "doesntContain", e.EQUALS = "equals", e.DOESNT_EQUAL = "doesntEqual", e.IS_EMPTY = "isEmpty", e.IS_NOT_EMPTY = "isNotEmpty", e.GREATER_THAN = "fromNotEqual", e.GREATER_THAN_OR_EQUAL = "from", e.LESS_THAN = "toNotEqual", e.LESS_THAN_OR_EQUAL = "to", e.BETWEEN = "between", e.IS_NOT_BETWEEN = "isNotBetween", e.MULTIPLE_CONDITION = "multipleCondition", e.NONE = "none";
|
3609
3614
|
})(Be = Be || (Be = {}));
|
3610
3615
|
const Zt = (e) => {
|
3611
3616
|
if (!e)
|
@@ -3616,31 +3621,31 @@ const Zt = (e) => {
|
|
3616
3621
|
function n(a) {
|
3617
3622
|
const [o, ...u] = a;
|
3618
3623
|
if (t.add(o), !u.length)
|
3619
|
-
return
|
3620
|
-
const c =
|
3624
|
+
return s({ instanceid: o.config.guid });
|
3625
|
+
const c = s(o), f = n(u);
|
3621
3626
|
return { left: c, right: f, operator: "AND" };
|
3622
3627
|
}
|
3623
|
-
function
|
3624
|
-
return a && (
|
3628
|
+
function s(a) {
|
3629
|
+
return a && (Ta(a) ? Na(a) ? n(a.filters) : (t.add(a), { instanceid: a.config.guid }) : ("left" in a && (a.left = s(a.left)), "right" in a && (a.right = s(a.right)), a));
|
3625
3630
|
}
|
3626
|
-
const
|
3631
|
+
const r = Da(e), i = s(r);
|
3627
3632
|
return { filters: Array.from(t), relations: i };
|
3628
3633
|
};
|
3629
|
-
function
|
3634
|
+
function Ta(e) {
|
3630
3635
|
return "config" in e && "guid" in e.config;
|
3631
3636
|
}
|
3632
3637
|
y.TextAttribute, y.NumericAttribute, y.DateLevel;
|
3633
|
-
const
|
3634
|
-
const [t, n] =
|
3638
|
+
const Po = (e) => {
|
3639
|
+
const [t, n] = B($t, {
|
3635
3640
|
isLoading: !0,
|
3636
3641
|
isError: !1,
|
3637
3642
|
isSuccess: !1,
|
3638
3643
|
status: "loading",
|
3639
3644
|
error: void 0,
|
3640
3645
|
data: void 0
|
3641
|
-
}),
|
3642
|
-
|
3643
|
-
const
|
3646
|
+
}), s = U();
|
3647
|
+
V("useExecuteQuery");
|
3648
|
+
const r = async (i) => {
|
3644
3649
|
try {
|
3645
3650
|
const {
|
3646
3651
|
dataSource: a,
|
@@ -3653,7 +3658,7 @@ const xo = (e) => {
|
|
3653
3658
|
onBeforeQuery: g
|
3654
3659
|
} = C(e), { filters: p, relations: m } = Zt(c);
|
3655
3660
|
n({ type: "loading" });
|
3656
|
-
const h = await
|
3661
|
+
const h = await Mn(
|
3657
3662
|
{
|
3658
3663
|
dataSource: a,
|
3659
3664
|
dimensions: o,
|
@@ -3665,73 +3670,92 @@ const xo = (e) => {
|
|
3665
3670
|
offset: l
|
3666
3671
|
},
|
3667
3672
|
i,
|
3668
|
-
{ onBeforeQuery:
|
3673
|
+
{ onBeforeQuery: ze(g) }
|
3669
3674
|
);
|
3670
3675
|
n({ type: "success", data: h });
|
3671
3676
|
} catch (a) {
|
3672
3677
|
n({ type: "error", error: a });
|
3673
3678
|
}
|
3674
3679
|
};
|
3675
|
-
return
|
3676
|
-
[...
|
3680
|
+
return M(
|
3681
|
+
[...I(e), s],
|
3677
3682
|
() => {
|
3678
|
-
const { app: i } =
|
3679
|
-
!i || !(a === void 0 || a === !0) ||
|
3683
|
+
const { app: i } = s.value, { enabled: a } = C(e);
|
3684
|
+
!i || !(a === void 0 || a === !0) || r(i);
|
3680
3685
|
},
|
3681
3686
|
{ immediate: !0 }
|
3682
|
-
),
|
3683
|
-
},
|
3684
|
-
const t =
|
3685
|
-
|
3686
|
-
const [
|
3687
|
+
), E(t.value);
|
3688
|
+
}, Lo = (e) => {
|
3689
|
+
const t = _(void 0), n = _(void 0);
|
3690
|
+
V("useExecuteQueryByWidgetId");
|
3691
|
+
const [s, r] = B($t, {
|
3687
3692
|
isLoading: !0,
|
3688
3693
|
isError: !1,
|
3689
3694
|
isSuccess: !1,
|
3690
3695
|
status: "loading",
|
3691
3696
|
error: void 0,
|
3692
3697
|
data: void 0
|
3693
|
-
}), i =
|
3698
|
+
}), i = U(), a = async (o) => {
|
3694
3699
|
try {
|
3695
|
-
|
3696
|
-
const { filters: u, ...c } = C(e), { filters: f } = Zt(
|
3700
|
+
r({ type: "loading" });
|
3701
|
+
const { filters: u, ...c } = C(e), { filters: f } = Zt(ze(u)), {
|
3697
3702
|
data: d,
|
3698
3703
|
query: l,
|
3699
3704
|
pivotQuery: g
|
3700
|
-
} = await
|
3705
|
+
} = await In({
|
3701
3706
|
...c,
|
3702
3707
|
filters: f,
|
3703
3708
|
app: o
|
3704
3709
|
});
|
3705
|
-
|
3710
|
+
r({ type: "success", data: d }), t.value = l, n.value = g;
|
3706
3711
|
} catch (u) {
|
3707
|
-
|
3712
|
+
r({ type: "error", error: u });
|
3708
3713
|
}
|
3709
3714
|
};
|
3710
|
-
return
|
3711
|
-
[...
|
3715
|
+
return M(
|
3716
|
+
[...I(e), i],
|
3712
3717
|
() => {
|
3713
3718
|
const { app: o } = i.value, { enabled: u } = C(e);
|
3714
3719
|
!o || !(u === void 0 || u === !0) || a(o);
|
3715
3720
|
},
|
3716
3721
|
{ immediate: !0 }
|
3717
3722
|
), {
|
3718
|
-
...
|
3723
|
+
...E(s.value),
|
3719
3724
|
query: t,
|
3720
3725
|
pivotQuery: n
|
3721
3726
|
};
|
3722
|
-
},
|
3723
|
-
|
3724
|
-
const
|
3727
|
+
}, Fo = (e) => {
|
3728
|
+
V("useExecuteCsvQuery");
|
3729
|
+
const t = new $n(_n, [
|
3730
|
+
kn()
|
3731
|
+
]), [n, s] = Bn({
|
3732
|
+
isLoading: !0,
|
3733
|
+
isError: !1,
|
3734
|
+
isSuccess: !1,
|
3735
|
+
status: "loading",
|
3736
|
+
error: void 0,
|
3737
|
+
data: void 0
|
3738
|
+
});
|
3739
|
+
return t.subscribe((r) => {
|
3740
|
+
s(r);
|
3741
|
+
}), t.run(C(e)), M([...I(e)], () => {
|
3742
|
+
t.run(C(e));
|
3743
|
+
}), nn(() => {
|
3744
|
+
t.destroy();
|
3745
|
+
}), E(n.value);
|
3746
|
+
}, Eo = (e) => {
|
3747
|
+
V("useGetDashboardModel");
|
3748
|
+
const [t, n] = B(ee, {
|
3725
3749
|
isLoading: !0,
|
3726
3750
|
isError: !1,
|
3727
3751
|
isSuccess: !1,
|
3728
3752
|
status: "loading",
|
3729
3753
|
error: void 0,
|
3730
3754
|
data: void 0
|
3731
|
-
}),
|
3755
|
+
}), s = U(), r = async (a) => {
|
3732
3756
|
try {
|
3733
3757
|
n({ type: "loading" });
|
3734
|
-
const { dashboardOid: o, includeWidgets: u, includeFilters: c } = C(e), f = await
|
3758
|
+
const { dashboardOid: o, includeWidgets: u, includeFilters: c } = C(e), f = await Vn(a.httpClient, o, {
|
3735
3759
|
includeWidgets: u,
|
3736
3760
|
includeFilters: c
|
3737
3761
|
});
|
@@ -3740,139 +3764,139 @@ const xo = (e) => {
|
|
3740
3764
|
n({ type: "error", error: o });
|
3741
3765
|
}
|
3742
3766
|
};
|
3743
|
-
|
3744
|
-
[...
|
3767
|
+
M(
|
3768
|
+
[...I(e), s],
|
3745
3769
|
() => {
|
3746
|
-
const { app: a } =
|
3747
|
-
!a || !(o === void 0 || o === !0) ||
|
3770
|
+
const { app: a } = s.value, { enabled: o } = C(e);
|
3771
|
+
!a || !(o === void 0 || o === !0) || r(a);
|
3748
3772
|
},
|
3749
3773
|
{ immediate: !0 }
|
3750
3774
|
);
|
3751
|
-
const i =
|
3752
|
-
return
|
3753
|
-
},
|
3754
|
-
|
3755
|
-
const [t, n] =
|
3775
|
+
const i = E(t.value);
|
3776
|
+
return E(Un(i));
|
3777
|
+
}, No = (e) => {
|
3778
|
+
V("useGetDashboardModels");
|
3779
|
+
const [t, n] = B(ee, {
|
3756
3780
|
isLoading: !0,
|
3757
3781
|
isError: !1,
|
3758
3782
|
isSuccess: !1,
|
3759
3783
|
status: "loading",
|
3760
3784
|
error: void 0,
|
3761
3785
|
data: void 0
|
3762
|
-
}),
|
3786
|
+
}), s = U(), r = async (a) => {
|
3763
3787
|
try {
|
3764
3788
|
n({ type: "loading" });
|
3765
|
-
const o = C(e), u = await
|
3789
|
+
const o = C(e), u = await Kn(a.httpClient, o);
|
3766
3790
|
n({ type: "success", data: u });
|
3767
3791
|
} catch (o) {
|
3768
3792
|
n({ type: "error", error: o });
|
3769
3793
|
}
|
3770
3794
|
};
|
3771
|
-
|
3772
|
-
[...
|
3795
|
+
M(
|
3796
|
+
[...I(e), s],
|
3773
3797
|
() => {
|
3774
|
-
const { app: a } =
|
3775
|
-
!a || !(o === void 0 || o === !0) ||
|
3798
|
+
const { app: a } = s.value, { enabled: o } = C(e);
|
3799
|
+
!a || !(o === void 0 || o === !0) || r(a);
|
3776
3800
|
},
|
3777
3801
|
{ immediate: !0 }
|
3778
3802
|
);
|
3779
|
-
const i =
|
3780
|
-
return
|
3781
|
-
},
|
3782
|
-
|
3783
|
-
const [t, n] =
|
3803
|
+
const i = E(t.value);
|
3804
|
+
return E(Hn(i));
|
3805
|
+
}, Ao = (e) => {
|
3806
|
+
V("useGetSharedFormula");
|
3807
|
+
const [t, n] = B(ee, {
|
3784
3808
|
isLoading: !0,
|
3785
3809
|
isError: !1,
|
3786
3810
|
isSuccess: !1,
|
3787
3811
|
status: "loading",
|
3788
3812
|
error: void 0,
|
3789
3813
|
data: void 0
|
3790
|
-
}),
|
3814
|
+
}), s = U(), r = (a) => {
|
3791
3815
|
n({ type: "loading" });
|
3792
3816
|
const { dataSource: o, name: u, oid: c } = C(e);
|
3793
3817
|
let f = Promise.resolve(null);
|
3794
|
-
c ? f =
|
3818
|
+
c ? f = zn(c, a) : u && o && (f = Gn(u, o, a)), f.then((d) => {
|
3795
3819
|
n({ type: "success", data: d });
|
3796
3820
|
}).catch((d) => {
|
3797
3821
|
n({ type: "error", error: d });
|
3798
3822
|
});
|
3799
3823
|
};
|
3800
|
-
|
3801
|
-
[...
|
3824
|
+
M(
|
3825
|
+
[...I(e), s],
|
3802
3826
|
() => {
|
3803
|
-
const { app: a } =
|
3804
|
-
!a || !(o === void 0 || o === !0) ||
|
3827
|
+
const { app: a } = s.value, { enabled: o } = C(e);
|
3828
|
+
!a || !(o === void 0 || o === !0) || r(a);
|
3805
3829
|
},
|
3806
3830
|
{ immediate: !0 }
|
3807
3831
|
);
|
3808
|
-
const i =
|
3809
|
-
return
|
3810
|
-
|
3832
|
+
const i = E(t.value);
|
3833
|
+
return E(
|
3834
|
+
Wn(i)
|
3811
3835
|
);
|
3812
|
-
},
|
3813
|
-
|
3814
|
-
const [t, n] =
|
3836
|
+
}, To = (e) => {
|
3837
|
+
V("useGetWidgetModel");
|
3838
|
+
const [t, n] = B(ee, {
|
3815
3839
|
isLoading: !0,
|
3816
3840
|
isError: !1,
|
3817
3841
|
isSuccess: !1,
|
3818
3842
|
status: "loading",
|
3819
3843
|
error: void 0,
|
3820
3844
|
data: void 0
|
3821
|
-
}),
|
3845
|
+
}), s = U(), r = async (i) => {
|
3822
3846
|
try {
|
3823
3847
|
n({ type: "loading" });
|
3824
|
-
const { dashboardOid: a, widgetOid: o } = C(e), u = await
|
3848
|
+
const { dashboardOid: a, widgetOid: o } = C(e), u = await Jn(i.httpClient, a, o);
|
3825
3849
|
n({ type: "success", data: u });
|
3826
3850
|
} catch (a) {
|
3827
3851
|
n({ type: "error", error: a });
|
3828
3852
|
}
|
3829
3853
|
};
|
3830
|
-
return
|
3831
|
-
[...
|
3854
|
+
return M(
|
3855
|
+
[...I(e), s],
|
3832
3856
|
() => {
|
3833
|
-
const { app: i } =
|
3834
|
-
!i || !(a === void 0 || a === !0) ||
|
3857
|
+
const { app: i } = s.value, { enabled: a } = C(e);
|
3858
|
+
!i || !(a === void 0 || a === !0) || r(i);
|
3835
3859
|
},
|
3836
3860
|
{ immediate: !0 }
|
3837
|
-
),
|
3838
|
-
},
|
3839
|
-
|
3840
|
-
const [t, n] =
|
3861
|
+
), E(t.value);
|
3862
|
+
}, Ro = (e) => {
|
3863
|
+
V("useGetHierarchyModels");
|
3864
|
+
const [t, n] = B(ee, {
|
3841
3865
|
isLoading: !0,
|
3842
3866
|
isError: !1,
|
3843
3867
|
isSuccess: !1,
|
3844
3868
|
status: "loading",
|
3845
3869
|
error: void 0,
|
3846
3870
|
data: void 0
|
3847
|
-
}),
|
3871
|
+
}), s = U(), r = async (i) => {
|
3848
3872
|
try {
|
3849
3873
|
n({ type: "loading" });
|
3850
|
-
const a = await
|
3874
|
+
const a = await qn(i.httpClient, C(e));
|
3851
3875
|
n({ type: "success", data: a });
|
3852
3876
|
} catch (a) {
|
3853
3877
|
n({ type: "error", error: a });
|
3854
3878
|
}
|
3855
3879
|
};
|
3856
|
-
return
|
3857
|
-
[...
|
3880
|
+
return M(
|
3881
|
+
[...I(e), s],
|
3858
3882
|
() => {
|
3859
|
-
const { app: i } =
|
3860
|
-
!i || !(a === void 0 || a === !0) ||
|
3883
|
+
const { app: i } = s.value, { enabled: a } = C(e);
|
3884
|
+
!i || !(a === void 0 || a === !0) || r(i);
|
3861
3885
|
},
|
3862
3886
|
{ immediate: !0 }
|
3863
|
-
),
|
3864
|
-
},
|
3865
|
-
const [
|
3887
|
+
), E(t.value);
|
3888
|
+
}, Mo = (e, t, n) => {
|
3889
|
+
const [s, r] = B(ee, {
|
3866
3890
|
isLoading: !0,
|
3867
3891
|
isError: !1,
|
3868
3892
|
isSuccess: !1,
|
3869
3893
|
status: "loading",
|
3870
3894
|
error: void 0,
|
3871
3895
|
data: void 0
|
3872
|
-
}), i =
|
3896
|
+
}), i = U(), a = async (o) => {
|
3873
3897
|
try {
|
3874
|
-
|
3875
|
-
const u =
|
3898
|
+
r({ type: "loading" });
|
3899
|
+
const u = ze(e), c = t ? C(t) : {}, f = n ? C(n) : {}, d = {
|
3876
3900
|
requestConfig: f.requestConfig ? C(f.requestConfig) : {},
|
3877
3901
|
skipTrackingParam: !0
|
3878
3902
|
}, l = await o.call(
|
@@ -3880,20 +3904,20 @@ const xo = (e) => {
|
|
3880
3904
|
c,
|
3881
3905
|
d
|
3882
3906
|
);
|
3883
|
-
|
3907
|
+
r({ type: "success", data: l });
|
3884
3908
|
} catch (u) {
|
3885
|
-
|
3909
|
+
r({ type: "error", error: u });
|
3886
3910
|
}
|
3887
3911
|
};
|
3888
|
-
return
|
3889
|
-
[...
|
3912
|
+
return M(
|
3913
|
+
[...I(e, t, n), i],
|
3890
3914
|
() => {
|
3891
3915
|
const { app: o } = i.value, u = C(n || {}).enabled;
|
3892
3916
|
!o || !(u === void 0 || u === !0) || a(o.httpClient);
|
3893
3917
|
},
|
3894
3918
|
{ immediate: !0 }
|
3895
|
-
),
|
3896
|
-
},
|
3919
|
+
), E(s.value);
|
3920
|
+
}, Io = () => Qn().value, Ra = b({
|
3897
3921
|
props: {
|
3898
3922
|
/**
|
3899
3923
|
* {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
|
@@ -3908,8 +3932,8 @@ const xo = (e) => {
|
|
3908
3932
|
*/
|
3909
3933
|
position: Object
|
3910
3934
|
},
|
3911
|
-
setup: (e, { slots: t }) => Nt(
|
3912
|
-
}),
|
3935
|
+
setup: (e, { slots: t }) => Nt(Yn, e, t, [])
|
3936
|
+
}), Ma = ({
|
3913
3937
|
drilldownPaths: e,
|
3914
3938
|
initialDimension: t
|
3915
3939
|
}) => {
|
@@ -3917,24 +3941,24 @@ const xo = (e) => {
|
|
3917
3941
|
throw new Error(
|
3918
3942
|
"Initial dimension has to be specified to use drilldown with custom components"
|
3919
3943
|
);
|
3920
|
-
const n =
|
3921
|
-
|
3944
|
+
const n = _([]), s = _(), r = _([]), i = _([]), a = Oe(() => [
|
3945
|
+
Xn(t),
|
3922
3946
|
...n.value.map(({ nextDimension: l }) => l)
|
3923
3947
|
]), o = Oe(
|
3924
3948
|
() => e.value.filter((l) => {
|
3925
3949
|
if (y.isAttribute(l)) {
|
3926
3950
|
const m = l;
|
3927
3951
|
return a.value.every(
|
3928
|
-
(h) => !
|
3952
|
+
(h) => !st(h, m)
|
3929
3953
|
);
|
3930
3954
|
}
|
3931
3955
|
const p = l;
|
3932
3956
|
return a.value.every(
|
3933
|
-
(m, h) =>
|
3957
|
+
(m, h) => st(m, p.levels[h])
|
3934
3958
|
);
|
3935
3959
|
})
|
3936
3960
|
), u = (l, g, p) => {
|
3937
|
-
n.value =
|
3961
|
+
n.value = Zn(
|
3938
3962
|
n.value,
|
3939
3963
|
l,
|
3940
3964
|
g,
|
@@ -3945,24 +3969,24 @@ const xo = (e) => {
|
|
3945
3969
|
}, f = () => {
|
3946
3970
|
n.value = [], d();
|
3947
3971
|
}, d = () => {
|
3948
|
-
const l = (p) => p === "drilldown.breadcrumbsAllSuffix" ? "All" : p, g =
|
3972
|
+
const l = (p) => p === "drilldown.breadcrumbsAllSuffix" ? "All" : p, g = es(
|
3949
3973
|
n.value,
|
3950
3974
|
t,
|
3951
3975
|
l
|
3952
3976
|
);
|
3953
|
-
|
3977
|
+
s.value = g.drilldownDimension, r.value = g.drilldownFilters, i.value = g.drilldownFiltersDisplayValues;
|
3954
3978
|
};
|
3955
3979
|
return d(), {
|
3956
3980
|
drilldownSelections: n,
|
3957
3981
|
availableDrilldownPaths: o,
|
3958
|
-
drilldownDimension:
|
3959
|
-
drilldownFilters:
|
3982
|
+
drilldownDimension: s,
|
3983
|
+
drilldownFilters: r,
|
3960
3984
|
drilldownFiltersDisplayValues: i,
|
3961
3985
|
selectDrilldown: u,
|
3962
3986
|
sliceDrilldownSelections: c,
|
3963
3987
|
clearDrilldownSelections: f
|
3964
3988
|
};
|
3965
|
-
},
|
3989
|
+
}, Ia = b({
|
3966
3990
|
props: {
|
3967
3991
|
/**
|
3968
3992
|
* {@inheritDoc @sisense/sdk-ui!DrilldownWidgetProps.config}
|
@@ -4010,12 +4034,12 @@ const xo = (e) => {
|
|
4010
4034
|
},
|
4011
4035
|
setup: () => {
|
4012
4036
|
}
|
4013
|
-
}),
|
4037
|
+
}), $a = { style: { display: "flex", "flex-direction": "column", height: "100%" } }, _a = { style: { "flex-grow": "1", "min-wdith": "0", "min-height": "0" } }, $o = /* @__PURE__ */ b({
|
4014
4038
|
__name: "drilldown-widget",
|
4015
|
-
props:
|
4039
|
+
props: Ia.props,
|
4016
4040
|
setup(e) {
|
4017
|
-
const t = e, { drilldownDimensions: n, drilldownPaths:
|
4018
|
-
() => [...
|
4041
|
+
const t = e, { drilldownDimensions: n, drilldownPaths: s, initialDimension: r, config: i } = E(t), a = _(null), o = _([]), u = Oe(
|
4042
|
+
() => [...s.value, ...n.value]
|
4019
4043
|
), {
|
4020
4044
|
drilldownFilters: c,
|
4021
4045
|
// computed
|
@@ -4028,16 +4052,16 @@ const xo = (e) => {
|
|
4028
4052
|
selectDrilldown: g,
|
4029
4053
|
sliceDrilldownSelections: p,
|
4030
4054
|
clearDrilldownSelections: m
|
4031
|
-
} =
|
4055
|
+
} = Ma({
|
4032
4056
|
drilldownPaths: u,
|
4033
|
-
initialDimension:
|
4057
|
+
initialDimension: r.value
|
4034
4058
|
}), h = (v) => {
|
4035
4059
|
g(o.value, v);
|
4036
4060
|
}, x = Oe(() => {
|
4037
4061
|
const v = (L) => L === "drilldown.drillMenuItem" ? "Drill" : L;
|
4038
4062
|
return [
|
4039
|
-
|
4040
|
-
|
4063
|
+
ts(o.value, f.value),
|
4064
|
+
ns(
|
4041
4065
|
l.value,
|
4042
4066
|
f.value,
|
4043
4067
|
h,
|
@@ -4051,11 +4075,11 @@ const xo = (e) => {
|
|
4051
4075
|
}, w = () => {
|
4052
4076
|
a.value = null;
|
4053
4077
|
};
|
4054
|
-
return (v, L) => (
|
4078
|
+
return (v, L) => (sn(), rn("div", $a, [
|
4055
4079
|
Ne(v.$slots, "contextMenu", {
|
4056
4080
|
contextMenuProps: { position: a.value, itemSections: x.value, closeContextMenu: w }
|
4057
4081
|
}, () => [
|
4058
|
-
tt(
|
4082
|
+
tt(N(Ra), {
|
4059
4083
|
position: a.value,
|
4060
4084
|
itemSections: x.value,
|
4061
4085
|
closeContextMenu: w
|
@@ -4063,30 +4087,30 @@ const xo = (e) => {
|
|
4063
4087
|
]),
|
4064
4088
|
Ne(v.$slots, "breadcrumbs", {
|
4065
4089
|
drilldownBreadcrumbsProps: {
|
4066
|
-
clearDrilldownSelections:
|
4067
|
-
sliceDrilldownSelections:
|
4068
|
-
drilldownFiltersDisplayValues:
|
4069
|
-
drilldownDimension:
|
4090
|
+
clearDrilldownSelections: N(m),
|
4091
|
+
sliceDrilldownSelections: N(p),
|
4092
|
+
drilldownFiltersDisplayValues: N(d),
|
4093
|
+
drilldownDimension: N(f)
|
4070
4094
|
}
|
4071
4095
|
}, () => [
|
4072
|
-
tt(
|
4073
|
-
"clear-drilldown-selections":
|
4074
|
-
"slice-drilldown-selections":
|
4075
|
-
"filters-display-values":
|
4076
|
-
"current-dimension":
|
4096
|
+
tt(N(cs), {
|
4097
|
+
"clear-drilldown-selections": N(m),
|
4098
|
+
"slice-drilldown-selections": N(p),
|
4099
|
+
"filters-display-values": N(d),
|
4100
|
+
"current-dimension": N(f)
|
4077
4101
|
}, null, 8, ["clear-drilldown-selections", "slice-drilldown-selections", "filters-display-values", "current-dimension"])
|
4078
4102
|
]),
|
4079
|
-
|
4103
|
+
an("div", _a, [
|
4080
4104
|
Ne(v.$slots, "chart", {
|
4081
|
-
drilldownFilters:
|
4082
|
-
drilldownDimension:
|
4105
|
+
drilldownFilters: N(c),
|
4106
|
+
drilldownDimension: N(f),
|
4083
4107
|
onDataPointsSelected: Q,
|
4084
4108
|
onContextMenu: j
|
4085
4109
|
})
|
4086
4110
|
])
|
4087
4111
|
]));
|
4088
4112
|
}
|
4089
|
-
}),
|
4113
|
+
}), _o = b({
|
4090
4114
|
props: {
|
4091
4115
|
/**
|
4092
4116
|
* {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.bottomSlot}
|
@@ -4209,8 +4233,8 @@ const xo = (e) => {
|
|
4209
4233
|
*/
|
4210
4234
|
widgetStyleOptions: Object
|
4211
4235
|
},
|
4212
|
-
setup: (e) => O(
|
4213
|
-
}),
|
4236
|
+
setup: (e) => O(ss, e)
|
4237
|
+
}), ko = b({
|
4214
4238
|
props: {
|
4215
4239
|
/** @internal */
|
4216
4240
|
bottomSlot: Object,
|
@@ -4309,8 +4333,8 @@ const xo = (e) => {
|
|
4309
4333
|
/** @internal */
|
4310
4334
|
widgetStyleOptions: Object
|
4311
4335
|
},
|
4312
|
-
setup: (e) => O(
|
4313
|
-
}),
|
4336
|
+
setup: (e) => O(rs, e)
|
4337
|
+
}), Bo = b({
|
4314
4338
|
props: {
|
4315
4339
|
/** @internal */
|
4316
4340
|
bottomSlot: Object,
|
@@ -4409,8 +4433,8 @@ const xo = (e) => {
|
|
4409
4433
|
/** @internal */
|
4410
4434
|
widgetStyleOptions: Object
|
4411
4435
|
},
|
4412
|
-
setup: (e) => O(
|
4413
|
-
}),
|
4436
|
+
setup: (e) => O(is, e)
|
4437
|
+
}), Uo = b({
|
4414
4438
|
props: {
|
4415
4439
|
bottomSlot: Object,
|
4416
4440
|
dataOptions: Object,
|
@@ -4422,8 +4446,8 @@ const xo = (e) => {
|
|
4422
4446
|
topSlot: Object,
|
4423
4447
|
widgetStyleOptions: Object
|
4424
4448
|
},
|
4425
|
-
setup: (e) => O(
|
4426
|
-
}),
|
4449
|
+
setup: (e) => O(as, e)
|
4450
|
+
}), Vo = b({
|
4427
4451
|
props: {
|
4428
4452
|
/**
|
4429
4453
|
* {@inheritDoc @sisense/sdk-ui!DashboardByIdProps.dashboardOid}
|
@@ -4434,8 +4458,8 @@ const xo = (e) => {
|
|
4434
4458
|
*/
|
4435
4459
|
config: Boolean
|
4436
4460
|
},
|
4437
|
-
setup: (e) => O(
|
4438
|
-
}),
|
4461
|
+
setup: (e) => O(os, e)
|
4462
|
+
}), Ho = b({
|
4439
4463
|
props: {
|
4440
4464
|
/**
|
4441
4465
|
* {@inheritDoc @sisense/sdk-ui!DashboardProps.title}
|
@@ -4470,103 +4494,100 @@ const xo = (e) => {
|
|
4470
4494
|
*/
|
4471
4495
|
styleOptions: Object
|
4472
4496
|
},
|
4473
|
-
setup: (e) => O(
|
4497
|
+
setup: (e) => O(us, e)
|
4474
4498
|
});
|
4475
|
-
function
|
4476
|
-
return
|
4499
|
+
function ka(e) {
|
4500
|
+
return ls.toDashboardProps(e);
|
4477
4501
|
}
|
4478
|
-
const
|
4502
|
+
const Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
4479
4503
|
__proto__: null,
|
4480
|
-
toDashboardProps:
|
4481
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
4504
|
+
toDashboardProps: ka
|
4505
|
+
}, Symbol.toStringTag, { value: "Module" })), Ba = (e, t) => G.replaceFilters(e, t), Ua = (e, t) => G.addFilter(e, t), Va = (e, t) => G.addFilters(e, t), Ha = (e, t, n) => G.replaceFilter(e, t, n), Ka = (e, t, n) => G.modifyFilter(e, t, n), Wa = (e, t) => G.removeFilter(e, t), za = (e, t) => G.removeFilters(e, t), Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
4482
4506
|
__proto__: null,
|
4483
|
-
addFilter:
|
4484
|
-
addFilters:
|
4485
|
-
modifyFilter:
|
4486
|
-
removeFilter:
|
4487
|
-
removeFilters:
|
4488
|
-
replaceFilter:
|
4489
|
-
replaceFilters:
|
4490
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
4491
|
-
function
|
4492
|
-
return
|
4507
|
+
addFilter: Ua,
|
4508
|
+
addFilters: Va,
|
4509
|
+
modifyFilter: Ka,
|
4510
|
+
removeFilter: Wa,
|
4511
|
+
removeFilters: za,
|
4512
|
+
replaceFilter: Ha,
|
4513
|
+
replaceFilters: Ba
|
4514
|
+
}, Symbol.toStringTag, { value: "Module" })), Ga = (e) => H.toExecuteQueryParams(e), Ja = (e) => H.toExecutePivotQueryParams(e);
|
4515
|
+
function qa(e) {
|
4516
|
+
return H.toChartProps(e);
|
4493
4517
|
}
|
4494
|
-
function
|
4495
|
-
return
|
4518
|
+
function Qa(e) {
|
4519
|
+
return H.toTableProps(e);
|
4496
4520
|
}
|
4497
|
-
function
|
4498
|
-
return
|
4521
|
+
function Ya(e) {
|
4522
|
+
return H.toPivotTableProps(e);
|
4499
4523
|
}
|
4500
|
-
function
|
4501
|
-
return
|
4524
|
+
function Xa(e) {
|
4525
|
+
return H.toChartWidgetProps(e);
|
4502
4526
|
}
|
4503
|
-
function
|
4504
|
-
return
|
4527
|
+
function Za(e) {
|
4528
|
+
return H.toPivotTableWidgetProps(e);
|
4505
4529
|
}
|
4506
|
-
function
|
4507
|
-
return
|
4530
|
+
function eo(e) {
|
4531
|
+
return H.toTextWidgetProps(e);
|
4508
4532
|
}
|
4509
|
-
const
|
4533
|
+
const zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
4510
4534
|
__proto__: null,
|
4511
|
-
toChartProps:
|
4512
|
-
toChartWidgetProps:
|
4513
|
-
toExecutePivotQueryParams:
|
4514
|
-
toExecuteQueryParams:
|
4515
|
-
toPivotTableProps:
|
4516
|
-
toPivotTableWidgetProps:
|
4517
|
-
toTableProps:
|
4518
|
-
toTextWidgetProps:
|
4535
|
+
toChartProps: qa,
|
4536
|
+
toChartWidgetProps: Xa,
|
4537
|
+
toExecutePivotQueryParams: Ja,
|
4538
|
+
toExecuteQueryParams: Ga,
|
4539
|
+
toPivotTableProps: Ya,
|
4540
|
+
toPivotTableWidgetProps: Za,
|
4541
|
+
toTableProps: Qa,
|
4542
|
+
toTextWidgetProps: eo
|
4519
4543
|
}, Symbol.toStringTag, { value: "Module" }));
|
4520
4544
|
export {
|
4521
|
-
|
4522
|
-
|
4523
|
-
|
4524
|
-
|
4525
|
-
|
4526
|
-
|
4527
|
-
|
4528
|
-
|
4529
|
-
|
4530
|
-
|
4531
|
-
|
4532
|
-
|
4533
|
-
|
4534
|
-
|
4535
|
-
|
4536
|
-
|
4537
|
-
|
4538
|
-
|
4539
|
-
|
4540
|
-
|
4541
|
-
|
4542
|
-
|
4543
|
-
|
4544
|
-
|
4545
|
-
|
4546
|
-
|
4547
|
-
|
4548
|
-
|
4549
|
-
|
4550
|
-
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4554
|
-
|
4555
|
-
|
4556
|
-
|
4557
|
-
|
4558
|
-
|
4559
|
-
|
4560
|
-
|
4561
|
-
|
4562
|
-
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
|
4567
|
-
|
4568
|
-
|
4569
|
-
Po as useGetWidgetModel,
|
4570
|
-
Eo as usePlugins,
|
4571
|
-
Bo as widgetModelTranslator
|
4545
|
+
ro as AreaChart,
|
4546
|
+
xo as AreaRangeChart,
|
4547
|
+
So as AreamapChart,
|
4548
|
+
io as BarChart,
|
4549
|
+
Oo as BoxplotChart,
|
4550
|
+
yo as Chart,
|
4551
|
+
_o as ChartWidget,
|
4552
|
+
ao as ColumnChart,
|
4553
|
+
Ra as ContextMenu,
|
4554
|
+
jo as CriteriaFilterTile,
|
4555
|
+
Ho as Dashboard,
|
4556
|
+
Vo as DashboardById,
|
4557
|
+
ko as DashboardWidget,
|
4558
|
+
wo as DateRangeFilterTile,
|
4559
|
+
cs as DrilldownBreadcrumbs,
|
4560
|
+
$o as DrilldownWidget,
|
4561
|
+
oo as FunnelChart,
|
4562
|
+
bo as IndicatorChart,
|
4563
|
+
uo as LineChart,
|
4564
|
+
Co as MemberFilterTile,
|
4565
|
+
lo as PieChart,
|
4566
|
+
po as PivotTable,
|
4567
|
+
qo as PluginsProvider,
|
4568
|
+
mo as PolarChart,
|
4569
|
+
Do as RelativeDateFilterTile,
|
4570
|
+
co as ScatterChart,
|
4571
|
+
vo as ScattermapChart,
|
4572
|
+
Qo as SisenseContextProvider,
|
4573
|
+
ho as SunburstChart,
|
4574
|
+
fo as Table,
|
4575
|
+
Uo as TableWidget,
|
4576
|
+
Yo as ThemeProvider,
|
4577
|
+
go as TreemapChart,
|
4578
|
+
Bo as WidgetById,
|
4579
|
+
Xo as boxWhiskerProcessResult,
|
4580
|
+
Wo as dashboardHelpers,
|
4581
|
+
Ko as dashboardModelTranslator,
|
4582
|
+
Fo as useExecuteCsvQuery,
|
4583
|
+
Po as useExecuteQuery,
|
4584
|
+
Lo as useExecuteQueryByWidgetId,
|
4585
|
+
Mo as useFetch,
|
4586
|
+
Eo as useGetDashboardModel,
|
4587
|
+
No as useGetDashboardModels,
|
4588
|
+
Ro as useGetHierarchyModels,
|
4589
|
+
Ao as useGetSharedFormula,
|
4590
|
+
To as useGetWidgetModel,
|
4591
|
+
Io as usePlugins,
|
4592
|
+
zo as widgetModelTranslator
|
4572
4593
|
};
|