@kong-ui-public/i18n 2.0.0 → 2.0.2-pr.1012.1ad4ee19.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/README.md +14 -0
- package/dist/i18n.es.js +547 -468
- package/dist/i18n.umd.js +10 -10
- package/dist/types/i18n.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/i18n.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Ue, h as Ve } from "vue";
|
|
2
2
|
var z = function(e, t) {
|
|
3
3
|
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
4
4
|
n.__proto__ = r;
|
|
@@ -7,7 +7,7 @@ var z = function(e, t) {
|
|
|
7
7
|
Object.prototype.hasOwnProperty.call(r, a) && (n[a] = r[a]);
|
|
8
8
|
}, z(e, t);
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function N(e, t) {
|
|
11
11
|
if (typeof t != "function" && t !== null)
|
|
12
12
|
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
13
13
|
z(e, t);
|
|
@@ -41,55 +41,55 @@ function P(e, t, n) {
|
|
|
41
41
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
42
42
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
43
43
|
}
|
|
44
|
-
var
|
|
44
|
+
var p;
|
|
45
45
|
(function(e) {
|
|
46
46
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
|
|
47
|
-
})(
|
|
48
|
-
var
|
|
47
|
+
})(p || (p = {}));
|
|
48
|
+
var d;
|
|
49
49
|
(function(e) {
|
|
50
50
|
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
|
|
51
|
-
})(
|
|
51
|
+
})(d || (d = {}));
|
|
52
52
|
var D;
|
|
53
53
|
(function(e) {
|
|
54
54
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
55
55
|
})(D || (D = {}));
|
|
56
56
|
function ae(e) {
|
|
57
|
-
return e.type ===
|
|
58
|
-
}
|
|
59
|
-
function Ve(e) {
|
|
60
|
-
return e.type === b.argument;
|
|
57
|
+
return e.type === d.literal;
|
|
61
58
|
}
|
|
62
|
-
function
|
|
63
|
-
return e.type ===
|
|
59
|
+
function je(e) {
|
|
60
|
+
return e.type === d.argument;
|
|
64
61
|
}
|
|
65
62
|
function be(e) {
|
|
66
|
-
return e.type ===
|
|
63
|
+
return e.type === d.number;
|
|
67
64
|
}
|
|
68
65
|
function de(e) {
|
|
69
|
-
return e.type ===
|
|
66
|
+
return e.type === d.date;
|
|
70
67
|
}
|
|
71
68
|
function xe(e) {
|
|
72
|
-
return e.type ===
|
|
69
|
+
return e.type === d.time;
|
|
73
70
|
}
|
|
74
71
|
function ye(e) {
|
|
75
|
-
return e.type ===
|
|
76
|
-
}
|
|
77
|
-
function je(e) {
|
|
78
|
-
return e.type === b.pound;
|
|
72
|
+
return e.type === d.select;
|
|
79
73
|
}
|
|
80
74
|
function Te(e) {
|
|
81
|
-
return e.type ===
|
|
75
|
+
return e.type === d.plural;
|
|
76
|
+
}
|
|
77
|
+
function Xe(e) {
|
|
78
|
+
return e.type === d.pound;
|
|
82
79
|
}
|
|
83
80
|
function Se(e) {
|
|
81
|
+
return e.type === d.tag;
|
|
82
|
+
}
|
|
83
|
+
function He(e) {
|
|
84
84
|
return !!(e && typeof e == "object" && e.type === D.number);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function J(e) {
|
|
87
87
|
return !!(e && typeof e == "object" && e.type === D.dateTime);
|
|
88
88
|
}
|
|
89
|
-
var Ie = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,
|
|
89
|
+
var Ie = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, We = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
90
90
|
function Ze(e) {
|
|
91
91
|
var t = {};
|
|
92
|
-
return e.replace(
|
|
92
|
+
return e.replace(We, function(n) {
|
|
93
93
|
var r = n.length;
|
|
94
94
|
switch (n[0]) {
|
|
95
95
|
case "G":
|
|
@@ -121,7 +121,7 @@ function Ze(e) {
|
|
|
121
121
|
case "g":
|
|
122
122
|
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
123
123
|
case "E":
|
|
124
|
-
t.weekday = r === 4 ? "
|
|
124
|
+
t.weekday = r === 4 ? "long" : r === 5 ? "narrow" : "short";
|
|
125
125
|
break;
|
|
126
126
|
case "e":
|
|
127
127
|
if (r < 4)
|
|
@@ -178,36 +178,36 @@ function Ze(e) {
|
|
|
178
178
|
return "";
|
|
179
179
|
}), t;
|
|
180
180
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
181
|
+
var ze = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
182
|
+
function Je(e) {
|
|
183
183
|
if (e.length === 0)
|
|
184
184
|
throw new Error("Number skeleton cannot be empty");
|
|
185
|
-
for (var t = e.split(
|
|
186
|
-
return
|
|
185
|
+
for (var t = e.split(ze).filter(function(c) {
|
|
186
|
+
return c.length > 0;
|
|
187
187
|
}), n = [], r = 0, a = t; r < a.length; r++) {
|
|
188
188
|
var i = a[r], o = i.split("/");
|
|
189
189
|
if (o.length === 0)
|
|
190
190
|
throw new Error("Invalid number skeleton");
|
|
191
|
-
for (var s = o[0],
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
191
|
+
for (var s = o[0], h = o.slice(1), l = 0, u = h; l < u.length; l++) {
|
|
192
|
+
var m = u[l];
|
|
193
|
+
if (m.length === 0)
|
|
194
194
|
throw new Error("Invalid number skeleton");
|
|
195
195
|
}
|
|
196
|
-
n.push({ stem: s, options:
|
|
196
|
+
n.push({ stem: s, options: h });
|
|
197
197
|
}
|
|
198
198
|
return n;
|
|
199
199
|
}
|
|
200
200
|
function qe(e) {
|
|
201
201
|
return e.replace(/^(.*?)-/, "");
|
|
202
202
|
}
|
|
203
|
-
var ie = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,
|
|
203
|
+
var ie = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ne = /^(@+)?(\+|#+)?[rs]?$/g, Qe = /(\*)(0+)|(#+)(0+)|(0+)/g, Ae = /^(0+)$/;
|
|
204
204
|
function oe(e) {
|
|
205
205
|
var t = {};
|
|
206
|
-
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(
|
|
206
|
+
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Ne, function(n, r, a) {
|
|
207
207
|
return typeof a != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : a === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof a == "string" ? a.length : 0)), "";
|
|
208
208
|
}), t;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Be(e) {
|
|
211
211
|
switch (e) {
|
|
212
212
|
case "sign-auto":
|
|
213
213
|
return {
|
|
@@ -247,7 +247,7 @@ function Ne(e) {
|
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function Ye(e) {
|
|
251
251
|
var t;
|
|
252
252
|
if (e[0] === "E" && e[1] === "E" ? (t = {
|
|
253
253
|
notation: "engineering"
|
|
@@ -262,10 +262,10 @@ function Qe(e) {
|
|
|
262
262
|
return t;
|
|
263
263
|
}
|
|
264
264
|
function se(e) {
|
|
265
|
-
var t = {}, n =
|
|
265
|
+
var t = {}, n = Be(e);
|
|
266
266
|
return n || t;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function $e(e) {
|
|
269
269
|
for (var t = {}, n = 0, r = e; n < r.length; n++) {
|
|
270
270
|
var a = r[n];
|
|
271
271
|
switch (a.stem) {
|
|
@@ -300,13 +300,13 @@ function Ye(e) {
|
|
|
300
300
|
t.notation = "compact", t.compactDisplay = "long";
|
|
301
301
|
continue;
|
|
302
302
|
case "scientific":
|
|
303
|
-
t = f(f(f({}, t), { notation: "scientific" }), a.options.reduce(function(
|
|
304
|
-
return f(f({},
|
|
303
|
+
t = f(f(f({}, t), { notation: "scientific" }), a.options.reduce(function(h, l) {
|
|
304
|
+
return f(f({}, h), se(l));
|
|
305
305
|
}, {}));
|
|
306
306
|
continue;
|
|
307
307
|
case "engineering":
|
|
308
|
-
t = f(f(f({}, t), { notation: "engineering" }), a.options.reduce(function(
|
|
309
|
-
return f(f({},
|
|
308
|
+
t = f(f(f({}, t), { notation: "engineering" }), a.options.reduce(function(h, l) {
|
|
309
|
+
return f(f({}, h), se(l));
|
|
310
310
|
}, {}));
|
|
311
311
|
continue;
|
|
312
312
|
case "notation-simple":
|
|
@@ -330,13 +330,13 @@ function Ye(e) {
|
|
|
330
330
|
case "integer-width":
|
|
331
331
|
if (a.options.length > 1)
|
|
332
332
|
throw new RangeError("integer-width stems only accept a single optional option");
|
|
333
|
-
a.options[0].replace(
|
|
333
|
+
a.options[0].replace(Qe, function(h, l, u, m, c, E) {
|
|
334
334
|
if (l)
|
|
335
|
-
t.minimumIntegerDigits =
|
|
335
|
+
t.minimumIntegerDigits = u.length;
|
|
336
336
|
else {
|
|
337
|
-
if (
|
|
337
|
+
if (m && c)
|
|
338
338
|
throw new Error("We currently do not support maximum integer digits");
|
|
339
|
-
if (
|
|
339
|
+
if (E)
|
|
340
340
|
throw new Error("We currently do not support exact integer digits");
|
|
341
341
|
}
|
|
342
342
|
return "";
|
|
@@ -350,20 +350,20 @@ function Ye(e) {
|
|
|
350
350
|
if (ie.test(a.stem)) {
|
|
351
351
|
if (a.options.length > 1)
|
|
352
352
|
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
353
|
-
a.stem.replace(ie, function(
|
|
354
|
-
return
|
|
353
|
+
a.stem.replace(ie, function(h, l, u, m, c, E) {
|
|
354
|
+
return u === "*" ? t.minimumFractionDigits = l.length : m && m[0] === "#" ? t.maximumFractionDigits = m.length : c && E ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + E.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
|
|
355
355
|
});
|
|
356
356
|
var i = a.options[0];
|
|
357
357
|
i === "w" ? t = f(f({}, t), { trailingZeroDisplay: "stripIfInteger" }) : i && (t = f(f({}, t), oe(i)));
|
|
358
358
|
continue;
|
|
359
359
|
}
|
|
360
|
-
if (
|
|
360
|
+
if (Ne.test(a.stem)) {
|
|
361
361
|
t = f(f({}, t), oe(a.stem));
|
|
362
362
|
continue;
|
|
363
363
|
}
|
|
364
|
-
var o =
|
|
364
|
+
var o = Be(a.stem);
|
|
365
365
|
o && (t = f(f({}, t), o));
|
|
366
|
-
var s =
|
|
366
|
+
var s = Ye(a.stem);
|
|
367
367
|
s && (t = f(f({}, t), s));
|
|
368
368
|
}
|
|
369
369
|
return t;
|
|
@@ -487,6 +487,10 @@ var U = {
|
|
|
487
487
|
"hb",
|
|
488
488
|
"H"
|
|
489
489
|
],
|
|
490
|
+
BI: [
|
|
491
|
+
"H",
|
|
492
|
+
"h"
|
|
493
|
+
],
|
|
490
494
|
BJ: [
|
|
491
495
|
"H",
|
|
492
496
|
"hB"
|
|
@@ -536,6 +540,10 @@ var U = {
|
|
|
536
540
|
"hb",
|
|
537
541
|
"hB"
|
|
538
542
|
],
|
|
543
|
+
BY: [
|
|
544
|
+
"H",
|
|
545
|
+
"h"
|
|
546
|
+
],
|
|
539
547
|
BZ: [
|
|
540
548
|
"H",
|
|
541
549
|
"h",
|
|
@@ -624,6 +632,10 @@ var U = {
|
|
|
624
632
|
"H",
|
|
625
633
|
"hB"
|
|
626
634
|
],
|
|
635
|
+
CW: [
|
|
636
|
+
"H",
|
|
637
|
+
"hB"
|
|
638
|
+
],
|
|
627
639
|
CX: [
|
|
628
640
|
"H",
|
|
629
641
|
"h",
|
|
@@ -739,6 +751,10 @@ var U = {
|
|
|
739
751
|
"H",
|
|
740
752
|
"hB"
|
|
741
753
|
],
|
|
754
|
+
FO: [
|
|
755
|
+
"H",
|
|
756
|
+
"h"
|
|
757
|
+
],
|
|
742
758
|
FR: [
|
|
743
759
|
"H",
|
|
744
760
|
"hB"
|
|
@@ -784,6 +800,10 @@ var U = {
|
|
|
784
800
|
"hb",
|
|
785
801
|
"hB"
|
|
786
802
|
],
|
|
803
|
+
GL: [
|
|
804
|
+
"H",
|
|
805
|
+
"h"
|
|
806
|
+
],
|
|
787
807
|
GM: [
|
|
788
808
|
"h",
|
|
789
809
|
"hb",
|
|
@@ -848,6 +868,10 @@ var U = {
|
|
|
848
868
|
"H",
|
|
849
869
|
"hB"
|
|
850
870
|
],
|
|
871
|
+
HU: [
|
|
872
|
+
"H",
|
|
873
|
+
"h"
|
|
874
|
+
],
|
|
851
875
|
IC: [
|
|
852
876
|
"H",
|
|
853
877
|
"h",
|
|
@@ -920,8 +944,8 @@ var U = {
|
|
|
920
944
|
],
|
|
921
945
|
JP: [
|
|
922
946
|
"H",
|
|
923
|
-
"
|
|
924
|
-
"
|
|
947
|
+
"K",
|
|
948
|
+
"h"
|
|
925
949
|
],
|
|
926
950
|
KE: [
|
|
927
951
|
"hB",
|
|
@@ -1072,6 +1096,10 @@ var U = {
|
|
|
1072
1096
|
"H",
|
|
1073
1097
|
"hB"
|
|
1074
1098
|
],
|
|
1099
|
+
MG: [
|
|
1100
|
+
"H",
|
|
1101
|
+
"h"
|
|
1102
|
+
],
|
|
1075
1103
|
MH: [
|
|
1076
1104
|
"h",
|
|
1077
1105
|
"hb",
|
|
@@ -1127,6 +1155,18 @@ var U = {
|
|
|
1127
1155
|
"hb",
|
|
1128
1156
|
"hB"
|
|
1129
1157
|
],
|
|
1158
|
+
MT: [
|
|
1159
|
+
"H",
|
|
1160
|
+
"h"
|
|
1161
|
+
],
|
|
1162
|
+
MU: [
|
|
1163
|
+
"H",
|
|
1164
|
+
"h"
|
|
1165
|
+
],
|
|
1166
|
+
MV: [
|
|
1167
|
+
"H",
|
|
1168
|
+
"h"
|
|
1169
|
+
],
|
|
1130
1170
|
MW: [
|
|
1131
1171
|
"h",
|
|
1132
1172
|
"hb",
|
|
@@ -1184,6 +1224,10 @@ var U = {
|
|
|
1184
1224
|
"H",
|
|
1185
1225
|
"hB"
|
|
1186
1226
|
],
|
|
1227
|
+
NO: [
|
|
1228
|
+
"H",
|
|
1229
|
+
"h"
|
|
1230
|
+
],
|
|
1187
1231
|
NP: [
|
|
1188
1232
|
"H",
|
|
1189
1233
|
"h",
|
|
@@ -1245,6 +1289,10 @@ var U = {
|
|
|
1245
1289
|
"hB",
|
|
1246
1290
|
"H"
|
|
1247
1291
|
],
|
|
1292
|
+
PL: [
|
|
1293
|
+
"H",
|
|
1294
|
+
"h"
|
|
1295
|
+
],
|
|
1248
1296
|
PM: [
|
|
1249
1297
|
"H",
|
|
1250
1298
|
"hB"
|
|
@@ -1303,6 +1351,10 @@ var U = {
|
|
|
1303
1351
|
RU: [
|
|
1304
1352
|
"H"
|
|
1305
1353
|
],
|
|
1354
|
+
RW: [
|
|
1355
|
+
"H",
|
|
1356
|
+
"h"
|
|
1357
|
+
],
|
|
1306
1358
|
SA: [
|
|
1307
1359
|
"h",
|
|
1308
1360
|
"hB",
|
|
@@ -1435,12 +1487,24 @@ var U = {
|
|
|
1435
1487
|
"H",
|
|
1436
1488
|
"hB"
|
|
1437
1489
|
],
|
|
1490
|
+
TH: [
|
|
1491
|
+
"H",
|
|
1492
|
+
"h"
|
|
1493
|
+
],
|
|
1494
|
+
TJ: [
|
|
1495
|
+
"H",
|
|
1496
|
+
"h"
|
|
1497
|
+
],
|
|
1438
1498
|
TL: [
|
|
1439
1499
|
"H",
|
|
1440
1500
|
"hB",
|
|
1441
1501
|
"hb",
|
|
1442
1502
|
"h"
|
|
1443
1503
|
],
|
|
1504
|
+
TM: [
|
|
1505
|
+
"H",
|
|
1506
|
+
"h"
|
|
1507
|
+
],
|
|
1444
1508
|
TN: [
|
|
1445
1509
|
"h",
|
|
1446
1510
|
"hB",
|
|
@@ -1536,6 +1600,10 @@ var U = {
|
|
|
1536
1600
|
"H",
|
|
1537
1601
|
"hB"
|
|
1538
1602
|
],
|
|
1603
|
+
VN: [
|
|
1604
|
+
"H",
|
|
1605
|
+
"h"
|
|
1606
|
+
],
|
|
1539
1607
|
VU: [
|
|
1540
1608
|
"h",
|
|
1541
1609
|
"H"
|
|
@@ -1575,6 +1643,10 @@ var U = {
|
|
|
1575
1643
|
"H",
|
|
1576
1644
|
"hB"
|
|
1577
1645
|
],
|
|
1646
|
+
ZW: [
|
|
1647
|
+
"H",
|
|
1648
|
+
"h"
|
|
1649
|
+
],
|
|
1578
1650
|
"af-ZA": [
|
|
1579
1651
|
"H",
|
|
1580
1652
|
"h",
|
|
@@ -1705,15 +1777,15 @@ var U = {
|
|
|
1705
1777
|
"h"
|
|
1706
1778
|
]
|
|
1707
1779
|
};
|
|
1708
|
-
function
|
|
1780
|
+
function Ke(e, t) {
|
|
1709
1781
|
for (var n = "", r = 0; r < e.length; r++) {
|
|
1710
1782
|
var a = e.charAt(r);
|
|
1711
1783
|
if (a === "j") {
|
|
1712
1784
|
for (var i = 0; r + 1 < e.length && e.charAt(r + 1) === a; )
|
|
1713
1785
|
i++, r++;
|
|
1714
|
-
var o = 1 + (i & 1), s = i < 2 ? 1 : 3 + (i >> 1),
|
|
1786
|
+
var o = 1 + (i & 1), s = i < 2 ? 1 : 3 + (i >> 1), h = "a", l = et(t);
|
|
1715
1787
|
for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
|
|
1716
|
-
n +=
|
|
1788
|
+
n += h;
|
|
1717
1789
|
for (; o-- > 0; )
|
|
1718
1790
|
n = l + n;
|
|
1719
1791
|
} else
|
|
@@ -1721,7 +1793,7 @@ function $e(e, t) {
|
|
|
1721
1793
|
}
|
|
1722
1794
|
return n;
|
|
1723
1795
|
}
|
|
1724
|
-
function
|
|
1796
|
+
function et(e) {
|
|
1725
1797
|
var t = e.hourCycle;
|
|
1726
1798
|
if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
|
|
1727
1799
|
e.hourCycles && // @ts-ignore
|
|
@@ -1743,20 +1815,20 @@ function Ke(e) {
|
|
|
1743
1815
|
var a = U[r || ""] || U[n || ""] || U["".concat(n, "-001")] || U["001"];
|
|
1744
1816
|
return a[0];
|
|
1745
1817
|
}
|
|
1746
|
-
var X,
|
|
1818
|
+
var X, tt = new RegExp("^".concat(Ie.source, "*")), rt = new RegExp("".concat(Ie.source, "*$"));
|
|
1747
1819
|
function v(e, t) {
|
|
1748
1820
|
return { start: e, end: t };
|
|
1749
1821
|
}
|
|
1750
|
-
var
|
|
1822
|
+
var nt = !!String.prototype.startsWith && "_a".startsWith("a", 1), at = !!String.fromCodePoint, it = !!Object.fromEntries, ot = !!String.prototype.codePointAt, st = !!String.prototype.trimStart, ht = !!String.prototype.trimEnd, ut = !!Number.isSafeInteger, lt = ut ? Number.isSafeInteger : function(e) {
|
|
1751
1823
|
return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
|
|
1752
|
-
},
|
|
1824
|
+
}, q = !0;
|
|
1753
1825
|
try {
|
|
1754
|
-
var
|
|
1755
|
-
|
|
1826
|
+
var ft = Pe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1827
|
+
q = ((X = ft.exec("a")) === null || X === void 0 ? void 0 : X[0]) === "a";
|
|
1756
1828
|
} catch {
|
|
1757
|
-
|
|
1829
|
+
q = !1;
|
|
1758
1830
|
}
|
|
1759
|
-
var
|
|
1831
|
+
var he = nt ? (
|
|
1760
1832
|
// Native
|
|
1761
1833
|
function(t, n, r) {
|
|
1762
1834
|
return t.startsWith(n, r);
|
|
@@ -1766,7 +1838,7 @@ var ue = rt ? (
|
|
|
1766
1838
|
function(t, n, r) {
|
|
1767
1839
|
return t.slice(r, r + n.length) === n;
|
|
1768
1840
|
}
|
|
1769
|
-
), Q =
|
|
1841
|
+
), Q = at ? String.fromCodePoint : (
|
|
1770
1842
|
// IE11
|
|
1771
1843
|
function() {
|
|
1772
1844
|
for (var t = [], n = 0; n < arguments.length; n++)
|
|
@@ -1778,9 +1850,9 @@ var ue = rt ? (
|
|
|
1778
1850
|
}
|
|
1779
1851
|
return r;
|
|
1780
1852
|
}
|
|
1781
|
-
),
|
|
1853
|
+
), ue = (
|
|
1782
1854
|
// native
|
|
1783
|
-
|
|
1855
|
+
it ? Object.fromEntries : (
|
|
1784
1856
|
// Ponyfill
|
|
1785
1857
|
function(t) {
|
|
1786
1858
|
for (var n = {}, r = 0, a = t; r < a.length; r++) {
|
|
@@ -1790,7 +1862,7 @@ var ue = rt ? (
|
|
|
1790
1862
|
return n;
|
|
1791
1863
|
}
|
|
1792
1864
|
)
|
|
1793
|
-
),
|
|
1865
|
+
), _e = ot ? (
|
|
1794
1866
|
// Native
|
|
1795
1867
|
function(t, n) {
|
|
1796
1868
|
return t.codePointAt(n);
|
|
@@ -1804,7 +1876,7 @@ var ue = rt ? (
|
|
|
1804
1876
|
return a < 55296 || a > 56319 || n + 1 === r || (i = t.charCodeAt(n + 1)) < 56320 || i > 57343 ? a : (a - 55296 << 10) + (i - 56320) + 65536;
|
|
1805
1877
|
}
|
|
1806
1878
|
}
|
|
1807
|
-
),
|
|
1879
|
+
), mt = st ? (
|
|
1808
1880
|
// Native
|
|
1809
1881
|
function(t) {
|
|
1810
1882
|
return t.trimStart();
|
|
@@ -1812,9 +1884,9 @@ var ue = rt ? (
|
|
|
1812
1884
|
) : (
|
|
1813
1885
|
// Ponyfill
|
|
1814
1886
|
function(t) {
|
|
1815
|
-
return t.replace(
|
|
1887
|
+
return t.replace(tt, "");
|
|
1816
1888
|
}
|
|
1817
|
-
),
|
|
1889
|
+
), ct = ht ? (
|
|
1818
1890
|
// Native
|
|
1819
1891
|
function(t) {
|
|
1820
1892
|
return t.trimEnd();
|
|
@@ -1822,15 +1894,15 @@ var ue = rt ? (
|
|
|
1822
1894
|
) : (
|
|
1823
1895
|
// Ponyfill
|
|
1824
1896
|
function(t) {
|
|
1825
|
-
return t.replace(
|
|
1897
|
+
return t.replace(rt, "");
|
|
1826
1898
|
}
|
|
1827
1899
|
);
|
|
1828
|
-
function
|
|
1900
|
+
function Pe(e, t) {
|
|
1829
1901
|
return new RegExp(e, t);
|
|
1830
1902
|
}
|
|
1831
1903
|
var Y;
|
|
1832
|
-
if (
|
|
1833
|
-
var le =
|
|
1904
|
+
if (q) {
|
|
1905
|
+
var le = Pe("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1834
1906
|
Y = function(t, n) {
|
|
1835
1907
|
var r;
|
|
1836
1908
|
le.lastIndex = n;
|
|
@@ -1840,14 +1912,14 @@ if (J) {
|
|
|
1840
1912
|
} else
|
|
1841
1913
|
Y = function(t, n) {
|
|
1842
1914
|
for (var r = []; ; ) {
|
|
1843
|
-
var a =
|
|
1844
|
-
if (a === void 0 ||
|
|
1915
|
+
var a = _e(t, n);
|
|
1916
|
+
if (a === void 0 || Re(a) || Et(a))
|
|
1845
1917
|
break;
|
|
1846
1918
|
r.push(a), n += a >= 65536 ? 2 : 1;
|
|
1847
1919
|
}
|
|
1848
1920
|
return Q.apply(void 0, r);
|
|
1849
1921
|
};
|
|
1850
|
-
var
|
|
1922
|
+
var pt = (
|
|
1851
1923
|
/** @class */
|
|
1852
1924
|
function() {
|
|
1853
1925
|
function e(t, n) {
|
|
@@ -1871,13 +1943,13 @@ var ct = (
|
|
|
1871
1943
|
if (i === 35 && (n === "plural" || n === "selectordinal")) {
|
|
1872
1944
|
var s = this.clonePosition();
|
|
1873
1945
|
this.bump(), a.push({
|
|
1874
|
-
type:
|
|
1946
|
+
type: d.pound,
|
|
1875
1947
|
location: v(s, this.clonePosition())
|
|
1876
1948
|
});
|
|
1877
1949
|
} else if (i === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
1878
1950
|
if (r)
|
|
1879
1951
|
break;
|
|
1880
|
-
return this.error(
|
|
1952
|
+
return this.error(p.UNMATCHED_CLOSING_TAG, v(this.clonePosition(), this.clonePosition()));
|
|
1881
1953
|
} else if (i === 60 && !this.ignoreTag && $(this.peek() || 0)) {
|
|
1882
1954
|
var o = this.parseTag(t, n);
|
|
1883
1955
|
if (o.err)
|
|
@@ -1899,7 +1971,7 @@ var ct = (
|
|
|
1899
1971
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
1900
1972
|
return {
|
|
1901
1973
|
val: {
|
|
1902
|
-
type:
|
|
1974
|
+
type: d.literal,
|
|
1903
1975
|
value: "<".concat(a, "/>"),
|
|
1904
1976
|
location: v(r, this.clonePosition())
|
|
1905
1977
|
},
|
|
@@ -1912,24 +1984,24 @@ var ct = (
|
|
|
1912
1984
|
var o = i.val, s = this.clonePosition();
|
|
1913
1985
|
if (this.bumpIf("</")) {
|
|
1914
1986
|
if (this.isEOF() || !$(this.char()))
|
|
1915
|
-
return this.error(
|
|
1916
|
-
var
|
|
1917
|
-
return a !== l ? this.error(
|
|
1987
|
+
return this.error(p.INVALID_TAG, v(s, this.clonePosition()));
|
|
1988
|
+
var h = this.clonePosition(), l = this.parseTagName();
|
|
1989
|
+
return a !== l ? this.error(p.UNMATCHED_CLOSING_TAG, v(h, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
1918
1990
|
val: {
|
|
1919
|
-
type:
|
|
1991
|
+
type: d.tag,
|
|
1920
1992
|
value: a,
|
|
1921
1993
|
children: o,
|
|
1922
1994
|
location: v(r, this.clonePosition())
|
|
1923
1995
|
},
|
|
1924
1996
|
err: null
|
|
1925
|
-
} : this.error(
|
|
1997
|
+
} : this.error(p.INVALID_TAG, v(s, this.clonePosition())));
|
|
1926
1998
|
} else
|
|
1927
|
-
return this.error(
|
|
1999
|
+
return this.error(p.UNCLOSED_TAG, v(r, this.clonePosition()));
|
|
1928
2000
|
} else
|
|
1929
|
-
return this.error(
|
|
2001
|
+
return this.error(p.INVALID_TAG, v(r, this.clonePosition()));
|
|
1930
2002
|
}, e.prototype.parseTagName = function() {
|
|
1931
2003
|
var t = this.offset();
|
|
1932
|
-
for (this.bump(); !this.isEOF() &&
|
|
2004
|
+
for (this.bump(); !this.isEOF() && vt(this.char()); )
|
|
1933
2005
|
this.bump();
|
|
1934
2006
|
return this.message.slice(t, this.offset());
|
|
1935
2007
|
}, e.prototype.parseLiteral = function(t, n) {
|
|
@@ -1951,14 +2023,14 @@ var ct = (
|
|
|
1951
2023
|
}
|
|
1952
2024
|
break;
|
|
1953
2025
|
}
|
|
1954
|
-
var
|
|
2026
|
+
var h = v(r, this.clonePosition());
|
|
1955
2027
|
return {
|
|
1956
|
-
val: { type:
|
|
2028
|
+
val: { type: d.literal, value: a, location: h },
|
|
1957
2029
|
err: null
|
|
1958
2030
|
};
|
|
1959
2031
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
1960
2032
|
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
1961
|
-
!
|
|
2033
|
+
!gt(this.peek() || 0)) ? (this.bump(), "<") : null;
|
|
1962
2034
|
}, e.prototype.tryParseQuote = function(t) {
|
|
1963
2035
|
if (this.isEOF() || this.char() !== 39)
|
|
1964
2036
|
return null;
|
|
@@ -2001,19 +2073,19 @@ var ct = (
|
|
|
2001
2073
|
}, e.prototype.parseArgument = function(t, n) {
|
|
2002
2074
|
var r = this.clonePosition();
|
|
2003
2075
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
2004
|
-
return this.error(
|
|
2076
|
+
return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
|
|
2005
2077
|
if (this.char() === 125)
|
|
2006
|
-
return this.bump(), this.error(
|
|
2078
|
+
return this.bump(), this.error(p.EMPTY_ARGUMENT, v(r, this.clonePosition()));
|
|
2007
2079
|
var a = this.parseIdentifierIfPossible().value;
|
|
2008
2080
|
if (!a)
|
|
2009
|
-
return this.error(
|
|
2081
|
+
return this.error(p.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
|
|
2010
2082
|
if (this.bumpSpace(), this.isEOF())
|
|
2011
|
-
return this.error(
|
|
2083
|
+
return this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
|
|
2012
2084
|
switch (this.char()) {
|
|
2013
2085
|
case 125:
|
|
2014
2086
|
return this.bump(), {
|
|
2015
2087
|
val: {
|
|
2016
|
-
type:
|
|
2088
|
+
type: d.argument,
|
|
2017
2089
|
// value does not include the opening and closing braces.
|
|
2018
2090
|
value: a,
|
|
2019
2091
|
location: v(r, this.clonePosition())
|
|
@@ -2021,9 +2093,9 @@ var ct = (
|
|
|
2021
2093
|
err: null
|
|
2022
2094
|
};
|
|
2023
2095
|
case 44:
|
|
2024
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(
|
|
2096
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition())) : this.parseArgumentOptions(t, n, a, r);
|
|
2025
2097
|
default:
|
|
2026
|
-
return this.error(
|
|
2098
|
+
return this.error(p.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
|
|
2027
2099
|
}
|
|
2028
2100
|
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
2029
2101
|
var t = this.clonePosition(), n = this.offset(), r = Y(this.message, n), a = n + r.length;
|
|
@@ -2031,10 +2103,10 @@ var ct = (
|
|
|
2031
2103
|
var i = this.clonePosition(), o = v(t, i);
|
|
2032
2104
|
return { value: r, location: o };
|
|
2033
2105
|
}, e.prototype.parseArgumentOptions = function(t, n, r, a) {
|
|
2034
|
-
var i, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value,
|
|
2106
|
+
var i, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value, h = this.clonePosition();
|
|
2035
2107
|
switch (s) {
|
|
2036
2108
|
case "":
|
|
2037
|
-
return this.error(
|
|
2109
|
+
return this.error(p.EXPECT_ARGUMENT_TYPE, v(o, h));
|
|
2038
2110
|
case "number":
|
|
2039
2111
|
case "date":
|
|
2040
2112
|
case "time": {
|
|
@@ -2042,49 +2114,49 @@ var ct = (
|
|
|
2042
2114
|
var l = null;
|
|
2043
2115
|
if (this.bumpIf(",")) {
|
|
2044
2116
|
this.bumpSpace();
|
|
2045
|
-
var
|
|
2046
|
-
if (
|
|
2047
|
-
return
|
|
2048
|
-
var
|
|
2049
|
-
if (
|
|
2050
|
-
return this.error(
|
|
2051
|
-
var
|
|
2052
|
-
l = { style:
|
|
2117
|
+
var u = this.clonePosition(), m = this.parseSimpleArgStyleIfPossible();
|
|
2118
|
+
if (m.err)
|
|
2119
|
+
return m;
|
|
2120
|
+
var c = ct(m.val);
|
|
2121
|
+
if (c.length === 0)
|
|
2122
|
+
return this.error(p.EXPECT_ARGUMENT_STYLE, v(this.clonePosition(), this.clonePosition()));
|
|
2123
|
+
var E = v(u, this.clonePosition());
|
|
2124
|
+
l = { style: c, styleLocation: E };
|
|
2053
2125
|
}
|
|
2054
|
-
var
|
|
2055
|
-
if (
|
|
2056
|
-
return
|
|
2057
|
-
var
|
|
2058
|
-
if (l &&
|
|
2059
|
-
var
|
|
2126
|
+
var y = this.tryParseArgumentClose(a);
|
|
2127
|
+
if (y.err)
|
|
2128
|
+
return y;
|
|
2129
|
+
var g = v(a, this.clonePosition());
|
|
2130
|
+
if (l && he(l == null ? void 0 : l.style, "::", 0)) {
|
|
2131
|
+
var b = mt(l.style.slice(2));
|
|
2060
2132
|
if (s === "number") {
|
|
2061
|
-
var
|
|
2062
|
-
return
|
|
2063
|
-
val: { type:
|
|
2133
|
+
var m = this.parseNumberSkeletonFromString(b, l.styleLocation);
|
|
2134
|
+
return m.err ? m : {
|
|
2135
|
+
val: { type: d.number, value: r, location: g, style: m.val },
|
|
2064
2136
|
err: null
|
|
2065
2137
|
};
|
|
2066
2138
|
} else {
|
|
2067
|
-
if (
|
|
2068
|
-
return this.error(
|
|
2069
|
-
var
|
|
2070
|
-
this.locale && (
|
|
2071
|
-
var
|
|
2139
|
+
if (b.length === 0)
|
|
2140
|
+
return this.error(p.EXPECT_DATE_TIME_SKELETON, g);
|
|
2141
|
+
var x = b;
|
|
2142
|
+
this.locale && (x = Ke(b, this.locale));
|
|
2143
|
+
var c = {
|
|
2072
2144
|
type: D.dateTime,
|
|
2073
|
-
pattern:
|
|
2145
|
+
pattern: x,
|
|
2074
2146
|
location: l.styleLocation,
|
|
2075
|
-
parsedOptions: this.shouldParseSkeletons ? Ze(
|
|
2076
|
-
},
|
|
2147
|
+
parsedOptions: this.shouldParseSkeletons ? Ze(x) : {}
|
|
2148
|
+
}, H = s === "date" ? d.date : d.time;
|
|
2077
2149
|
return {
|
|
2078
|
-
val: { type:
|
|
2150
|
+
val: { type: H, value: r, location: g, style: c },
|
|
2079
2151
|
err: null
|
|
2080
2152
|
};
|
|
2081
2153
|
}
|
|
2082
2154
|
}
|
|
2083
2155
|
return {
|
|
2084
2156
|
val: {
|
|
2085
|
-
type: s === "number" ?
|
|
2157
|
+
type: s === "number" ? d.number : s === "date" ? d.date : d.time,
|
|
2086
2158
|
value: r,
|
|
2087
|
-
location:
|
|
2159
|
+
location: g,
|
|
2088
2160
|
style: (i = l == null ? void 0 : l.style) !== null && i !== void 0 ? i : null
|
|
2089
2161
|
},
|
|
2090
2162
|
err: null
|
|
@@ -2095,38 +2167,38 @@ var ct = (
|
|
|
2095
2167
|
case "select": {
|
|
2096
2168
|
var T = this.clonePosition();
|
|
2097
2169
|
if (this.bumpSpace(), !this.bumpIf(","))
|
|
2098
|
-
return this.error(
|
|
2170
|
+
return this.error(p.EXPECT_SELECT_ARGUMENT_OPTIONS, v(T, f({}, T)));
|
|
2099
2171
|
this.bumpSpace();
|
|
2100
2172
|
var w = this.parseIdentifierIfPossible(), L = 0;
|
|
2101
2173
|
if (s !== "select" && w.value === "offset") {
|
|
2102
2174
|
if (!this.bumpIf(":"))
|
|
2103
|
-
return this.error(
|
|
2175
|
+
return this.error(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, v(this.clonePosition(), this.clonePosition()));
|
|
2104
2176
|
this.bumpSpace();
|
|
2105
|
-
var
|
|
2106
|
-
if (
|
|
2107
|
-
return
|
|
2108
|
-
this.bumpSpace(), w = this.parseIdentifierIfPossible(), L =
|
|
2177
|
+
var m = this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, p.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
2178
|
+
if (m.err)
|
|
2179
|
+
return m;
|
|
2180
|
+
this.bumpSpace(), w = this.parseIdentifierIfPossible(), L = m.val;
|
|
2109
2181
|
}
|
|
2110
2182
|
var G = this.tryParsePluralOrSelectOptions(t, s, n, w);
|
|
2111
2183
|
if (G.err)
|
|
2112
2184
|
return G;
|
|
2113
|
-
var
|
|
2114
|
-
if (
|
|
2115
|
-
return
|
|
2185
|
+
var y = this.tryParseArgumentClose(a);
|
|
2186
|
+
if (y.err)
|
|
2187
|
+
return y;
|
|
2116
2188
|
var ne = v(a, this.clonePosition());
|
|
2117
2189
|
return s === "select" ? {
|
|
2118
2190
|
val: {
|
|
2119
|
-
type:
|
|
2191
|
+
type: d.select,
|
|
2120
2192
|
value: r,
|
|
2121
|
-
options:
|
|
2193
|
+
options: ue(G.val),
|
|
2122
2194
|
location: ne
|
|
2123
2195
|
},
|
|
2124
2196
|
err: null
|
|
2125
2197
|
} : {
|
|
2126
2198
|
val: {
|
|
2127
|
-
type:
|
|
2199
|
+
type: d.plural,
|
|
2128
2200
|
value: r,
|
|
2129
|
-
options:
|
|
2201
|
+
options: ue(G.val),
|
|
2130
2202
|
offset: L,
|
|
2131
2203
|
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
2132
2204
|
location: ne
|
|
@@ -2135,10 +2207,10 @@ var ct = (
|
|
|
2135
2207
|
};
|
|
2136
2208
|
}
|
|
2137
2209
|
default:
|
|
2138
|
-
return this.error(
|
|
2210
|
+
return this.error(p.INVALID_ARGUMENT_TYPE, v(o, h));
|
|
2139
2211
|
}
|
|
2140
2212
|
}, e.prototype.tryParseArgumentClose = function(t) {
|
|
2141
|
-
return this.isEOF() || this.char() !== 125 ? this.error(
|
|
2213
|
+
return this.isEOF() || this.char() !== 125 ? this.error(p.EXPECT_ARGUMENT_CLOSING_BRACE, v(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
|
|
2142
2214
|
}, e.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2143
2215
|
for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) {
|
|
2144
2216
|
var r = this.char();
|
|
@@ -2147,7 +2219,7 @@ var ct = (
|
|
|
2147
2219
|
this.bump();
|
|
2148
2220
|
var a = this.clonePosition();
|
|
2149
2221
|
if (!this.bumpUntil("'"))
|
|
2150
|
-
return this.error(
|
|
2222
|
+
return this.error(p.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, v(a, this.clonePosition()));
|
|
2151
2223
|
this.bump();
|
|
2152
2224
|
break;
|
|
2153
2225
|
}
|
|
@@ -2177,52 +2249,52 @@ var ct = (
|
|
|
2177
2249
|
}, e.prototype.parseNumberSkeletonFromString = function(t, n) {
|
|
2178
2250
|
var r = [];
|
|
2179
2251
|
try {
|
|
2180
|
-
r =
|
|
2252
|
+
r = Je(t);
|
|
2181
2253
|
} catch {
|
|
2182
|
-
return this.error(
|
|
2254
|
+
return this.error(p.INVALID_NUMBER_SKELETON, n);
|
|
2183
2255
|
}
|
|
2184
2256
|
return {
|
|
2185
2257
|
val: {
|
|
2186
2258
|
type: D.number,
|
|
2187
2259
|
tokens: r,
|
|
2188
2260
|
location: n,
|
|
2189
|
-
parsedOptions: this.shouldParseSkeletons ?
|
|
2261
|
+
parsedOptions: this.shouldParseSkeletons ? $e(r) : {}
|
|
2190
2262
|
},
|
|
2191
2263
|
err: null
|
|
2192
2264
|
};
|
|
2193
2265
|
}, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, a) {
|
|
2194
|
-
for (var i, o = !1, s = [],
|
|
2266
|
+
for (var i, o = !1, s = [], h = /* @__PURE__ */ new Set(), l = a.value, u = a.location; ; ) {
|
|
2195
2267
|
if (l.length === 0) {
|
|
2196
|
-
var
|
|
2268
|
+
var m = this.clonePosition();
|
|
2197
2269
|
if (n !== "select" && this.bumpIf("=")) {
|
|
2198
|
-
var
|
|
2199
|
-
if (
|
|
2200
|
-
return
|
|
2201
|
-
|
|
2270
|
+
var c = this.tryParseDecimalInteger(p.EXPECT_PLURAL_ARGUMENT_SELECTOR, p.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
2271
|
+
if (c.err)
|
|
2272
|
+
return c;
|
|
2273
|
+
u = v(m, this.clonePosition()), l = this.message.slice(m.offset, this.offset());
|
|
2202
2274
|
} else
|
|
2203
2275
|
break;
|
|
2204
2276
|
}
|
|
2205
|
-
if (
|
|
2206
|
-
return this.error(n === "select" ?
|
|
2277
|
+
if (h.has(l))
|
|
2278
|
+
return this.error(n === "select" ? p.DUPLICATE_SELECT_ARGUMENT_SELECTOR : p.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, u);
|
|
2207
2279
|
l === "other" && (o = !0), this.bumpSpace();
|
|
2208
|
-
var
|
|
2280
|
+
var E = this.clonePosition();
|
|
2209
2281
|
if (!this.bumpIf("{"))
|
|
2210
|
-
return this.error(n === "select" ?
|
|
2211
|
-
var
|
|
2212
|
-
if (
|
|
2213
|
-
return
|
|
2214
|
-
var
|
|
2215
|
-
if (
|
|
2216
|
-
return
|
|
2282
|
+
return this.error(n === "select" ? p.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : p.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, v(this.clonePosition(), this.clonePosition()));
|
|
2283
|
+
var y = this.parseMessage(t + 1, n, r);
|
|
2284
|
+
if (y.err)
|
|
2285
|
+
return y;
|
|
2286
|
+
var g = this.tryParseArgumentClose(E);
|
|
2287
|
+
if (g.err)
|
|
2288
|
+
return g;
|
|
2217
2289
|
s.push([
|
|
2218
2290
|
l,
|
|
2219
2291
|
{
|
|
2220
|
-
value:
|
|
2221
|
-
location: v(
|
|
2292
|
+
value: y.val,
|
|
2293
|
+
location: v(E, this.clonePosition())
|
|
2222
2294
|
}
|
|
2223
|
-
]),
|
|
2295
|
+
]), h.add(l), this.bumpSpace(), i = this.parseIdentifierIfPossible(), l = i.value, u = i.location;
|
|
2224
2296
|
}
|
|
2225
|
-
return s.length === 0 ? this.error(n === "select" ?
|
|
2297
|
+
return s.length === 0 ? this.error(n === "select" ? p.EXPECT_SELECT_ARGUMENT_SELECTOR : p.EXPECT_PLURAL_ARGUMENT_SELECTOR, v(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(p.MISSING_OTHER_CLAUSE, v(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
|
|
2226
2298
|
}, e.prototype.tryParseDecimalInteger = function(t, n) {
|
|
2227
2299
|
var r = 1, a = this.clonePosition();
|
|
2228
2300
|
this.bumpIf("+") || this.bumpIf("-") && (r = -1);
|
|
@@ -2233,8 +2305,8 @@ var ct = (
|
|
|
2233
2305
|
else
|
|
2234
2306
|
break;
|
|
2235
2307
|
}
|
|
2236
|
-
var
|
|
2237
|
-
return i ? (o *= r,
|
|
2308
|
+
var h = v(a, this.clonePosition());
|
|
2309
|
+
return i ? (o *= r, lt(o) ? { val: o, err: null } : this.error(n, h)) : this.error(t, h);
|
|
2238
2310
|
}, e.prototype.offset = function() {
|
|
2239
2311
|
return this.position.offset;
|
|
2240
2312
|
}, e.prototype.isEOF = function() {
|
|
@@ -2249,7 +2321,7 @@ var ct = (
|
|
|
2249
2321
|
var t = this.position.offset;
|
|
2250
2322
|
if (t >= this.message.length)
|
|
2251
2323
|
throw Error("out of bound");
|
|
2252
|
-
var n =
|
|
2324
|
+
var n = _e(this.message, t);
|
|
2253
2325
|
if (n === void 0)
|
|
2254
2326
|
throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2255
2327
|
return n;
|
|
@@ -2268,7 +2340,7 @@ var ct = (
|
|
|
2268
2340
|
t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2);
|
|
2269
2341
|
}
|
|
2270
2342
|
}, e.prototype.bumpIf = function(t) {
|
|
2271
|
-
if (
|
|
2343
|
+
if (he(this.message, t, this.offset())) {
|
|
2272
2344
|
for (var n = 0; n < t.length; n++)
|
|
2273
2345
|
this.bump();
|
|
2274
2346
|
return !0;
|
|
@@ -2290,7 +2362,7 @@ var ct = (
|
|
|
2290
2362
|
break;
|
|
2291
2363
|
}
|
|
2292
2364
|
}, e.prototype.bumpSpace = function() {
|
|
2293
|
-
for (; !this.isEOF() &&
|
|
2365
|
+
for (; !this.isEOF() && Re(this.char()); )
|
|
2294
2366
|
this.bump();
|
|
2295
2367
|
}, e.prototype.peek = function() {
|
|
2296
2368
|
if (this.isEOF())
|
|
@@ -2303,68 +2375,68 @@ var ct = (
|
|
|
2303
2375
|
function $(e) {
|
|
2304
2376
|
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
2305
2377
|
}
|
|
2306
|
-
function
|
|
2378
|
+
function gt(e) {
|
|
2307
2379
|
return $(e) || e === 47;
|
|
2308
2380
|
}
|
|
2309
|
-
function
|
|
2381
|
+
function vt(e) {
|
|
2310
2382
|
return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
|
|
2311
2383
|
}
|
|
2312
|
-
function
|
|
2384
|
+
function Re(e) {
|
|
2313
2385
|
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
|
|
2314
2386
|
}
|
|
2315
|
-
function
|
|
2387
|
+
function Et(e) {
|
|
2316
2388
|
return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
|
|
2317
2389
|
}
|
|
2318
2390
|
function K(e) {
|
|
2319
2391
|
e.forEach(function(t) {
|
|
2320
|
-
if (delete t.location,
|
|
2392
|
+
if (delete t.location, ye(t) || Te(t))
|
|
2321
2393
|
for (var n in t.options)
|
|
2322
2394
|
delete t.options[n].location, K(t.options[n].value);
|
|
2323
2395
|
else
|
|
2324
|
-
|
|
2396
|
+
be(t) && He(t.style) || (de(t) || xe(t)) && J(t.style) ? delete t.style.location : Se(t) && K(t.children);
|
|
2325
2397
|
});
|
|
2326
2398
|
}
|
|
2327
|
-
function
|
|
2399
|
+
function bt(e, t) {
|
|
2328
2400
|
t === void 0 && (t = {}), t = f({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
2329
|
-
var n = new
|
|
2401
|
+
var n = new pt(e, t).parse();
|
|
2330
2402
|
if (n.err) {
|
|
2331
|
-
var r = SyntaxError(
|
|
2403
|
+
var r = SyntaxError(p[n.err.kind]);
|
|
2332
2404
|
throw r.location = n.err.location, r.originalMessage = n.err.message, r;
|
|
2333
2405
|
}
|
|
2334
2406
|
return t != null && t.captureLocation || K(n.val), n.val;
|
|
2335
2407
|
}
|
|
2336
|
-
function
|
|
2337
|
-
var n = t && t.cache ? t.cache :
|
|
2408
|
+
function A(e, t) {
|
|
2409
|
+
var n = t && t.cache ? t.cache : Ht, r = t && t.serializer ? t.serializer : St, a = t && t.strategy ? t.strategy : xt;
|
|
2338
2410
|
return a(e, {
|
|
2339
2411
|
cache: n,
|
|
2340
2412
|
serializer: r
|
|
2341
2413
|
});
|
|
2342
2414
|
}
|
|
2343
|
-
function
|
|
2415
|
+
function dt(e) {
|
|
2344
2416
|
return e == null || typeof e == "number" || typeof e == "boolean";
|
|
2345
2417
|
}
|
|
2346
|
-
function
|
|
2347
|
-
var a =
|
|
2418
|
+
function Le(e, t, n, r) {
|
|
2419
|
+
var a = dt(r) ? r : n(r), i = t.get(a);
|
|
2348
2420
|
return typeof i > "u" && (i = e.call(this, r), t.set(a, i)), i;
|
|
2349
2421
|
}
|
|
2350
|
-
function
|
|
2422
|
+
function Oe(e, t, n) {
|
|
2351
2423
|
var r = Array.prototype.slice.call(arguments, 3), a = n(r), i = t.get(a);
|
|
2352
2424
|
return typeof i > "u" && (i = e.apply(this, r), t.set(a, i)), i;
|
|
2353
2425
|
}
|
|
2354
2426
|
function ee(e, t, n, r, a) {
|
|
2355
2427
|
return n.bind(t, e, r, a);
|
|
2356
2428
|
}
|
|
2357
|
-
function dt(e, t) {
|
|
2358
|
-
var n = e.length === 1 ? Re : Le;
|
|
2359
|
-
return ee(e, this, n, t.cache.create(), t.serializer);
|
|
2360
|
-
}
|
|
2361
2429
|
function xt(e, t) {
|
|
2362
|
-
|
|
2430
|
+
var n = e.length === 1 ? Le : Oe;
|
|
2431
|
+
return ee(e, this, n, t.cache.create(), t.serializer);
|
|
2363
2432
|
}
|
|
2364
2433
|
function yt(e, t) {
|
|
2365
|
-
return ee(e, this,
|
|
2434
|
+
return ee(e, this, Oe, t.cache.create(), t.serializer);
|
|
2435
|
+
}
|
|
2436
|
+
function Tt(e, t) {
|
|
2437
|
+
return ee(e, this, Le, t.cache.create(), t.serializer);
|
|
2366
2438
|
}
|
|
2367
|
-
var
|
|
2439
|
+
var St = function() {
|
|
2368
2440
|
return JSON.stringify(arguments);
|
|
2369
2441
|
};
|
|
2370
2442
|
function te() {
|
|
@@ -2376,13 +2448,13 @@ te.prototype.get = function(e) {
|
|
|
2376
2448
|
te.prototype.set = function(e, t) {
|
|
2377
2449
|
this.cache[e] = t;
|
|
2378
2450
|
};
|
|
2379
|
-
var
|
|
2451
|
+
var Ht = {
|
|
2380
2452
|
create: function() {
|
|
2381
2453
|
return new te();
|
|
2382
2454
|
}
|
|
2383
2455
|
}, B = {
|
|
2384
|
-
variadic:
|
|
2385
|
-
monadic:
|
|
2456
|
+
variadic: yt,
|
|
2457
|
+
monadic: Tt
|
|
2386
2458
|
}, _;
|
|
2387
2459
|
(function(e) {
|
|
2388
2460
|
e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
|
|
@@ -2390,7 +2462,7 @@ var St = {
|
|
|
2390
2462
|
var R = (
|
|
2391
2463
|
/** @class */
|
|
2392
2464
|
function(e) {
|
|
2393
|
-
|
|
2465
|
+
N(t, e);
|
|
2394
2466
|
function t(n, r, a) {
|
|
2395
2467
|
var i = e.call(this, n) || this;
|
|
2396
2468
|
return i.code = r, i.originalMessage = a, i;
|
|
@@ -2402,7 +2474,7 @@ var R = (
|
|
|
2402
2474
|
), fe = (
|
|
2403
2475
|
/** @class */
|
|
2404
2476
|
function(e) {
|
|
2405
|
-
|
|
2477
|
+
N(t, e);
|
|
2406
2478
|
function t(n, r, a, i) {
|
|
2407
2479
|
return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(a).join('", "'), '"'), _.INVALID_VALUE, i) || this;
|
|
2408
2480
|
}
|
|
@@ -2411,16 +2483,16 @@ var R = (
|
|
|
2411
2483
|
), It = (
|
|
2412
2484
|
/** @class */
|
|
2413
2485
|
function(e) {
|
|
2414
|
-
|
|
2486
|
+
N(t, e);
|
|
2415
2487
|
function t(n, r, a) {
|
|
2416
2488
|
return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), _.INVALID_VALUE, a) || this;
|
|
2417
2489
|
}
|
|
2418
2490
|
return t;
|
|
2419
2491
|
}(R)
|
|
2420
|
-
),
|
|
2492
|
+
), Nt = (
|
|
2421
2493
|
/** @class */
|
|
2422
2494
|
function(e) {
|
|
2423
|
-
|
|
2495
|
+
N(t, e);
|
|
2424
2496
|
function t(n, r) {
|
|
2425
2497
|
return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), _.MISSING_VALUE, r) || this;
|
|
2426
2498
|
}
|
|
@@ -2436,10 +2508,10 @@ function At(e) {
|
|
|
2436
2508
|
return !r || r.type !== S.literal || n.type !== S.literal ? t.push(n) : r.value += n.value, t;
|
|
2437
2509
|
}, []);
|
|
2438
2510
|
}
|
|
2439
|
-
function
|
|
2511
|
+
function Bt(e) {
|
|
2440
2512
|
return typeof e == "function";
|
|
2441
2513
|
}
|
|
2442
|
-
function
|
|
2514
|
+
function k(e, t, n, r, a, i, o) {
|
|
2443
2515
|
if (e.length === 1 && ae(e[0]))
|
|
2444
2516
|
return [
|
|
2445
2517
|
{
|
|
@@ -2447,107 +2519,107 @@ function V(e, t, n, r, a, i, o) {
|
|
|
2447
2519
|
value: e[0].value
|
|
2448
2520
|
}
|
|
2449
2521
|
];
|
|
2450
|
-
for (var s = [],
|
|
2451
|
-
var
|
|
2452
|
-
if (ae(
|
|
2522
|
+
for (var s = [], h = 0, l = e; h < l.length; h++) {
|
|
2523
|
+
var u = l[h];
|
|
2524
|
+
if (ae(u)) {
|
|
2453
2525
|
s.push({
|
|
2454
2526
|
type: S.literal,
|
|
2455
|
-
value:
|
|
2527
|
+
value: u.value
|
|
2456
2528
|
});
|
|
2457
2529
|
continue;
|
|
2458
2530
|
}
|
|
2459
|
-
if (
|
|
2531
|
+
if (Xe(u)) {
|
|
2460
2532
|
typeof i == "number" && s.push({
|
|
2461
2533
|
type: S.literal,
|
|
2462
2534
|
value: n.getNumberFormat(t).format(i)
|
|
2463
2535
|
});
|
|
2464
2536
|
continue;
|
|
2465
2537
|
}
|
|
2466
|
-
var
|
|
2467
|
-
if (!(a &&
|
|
2468
|
-
throw new
|
|
2469
|
-
var
|
|
2470
|
-
if (
|
|
2471
|
-
(!
|
|
2472
|
-
type: typeof
|
|
2473
|
-
value:
|
|
2538
|
+
var m = u.value;
|
|
2539
|
+
if (!(a && m in a))
|
|
2540
|
+
throw new Nt(m, o);
|
|
2541
|
+
var c = a[m];
|
|
2542
|
+
if (je(u)) {
|
|
2543
|
+
(!c || typeof c == "string" || typeof c == "number") && (c = typeof c == "string" || typeof c == "number" ? String(c) : ""), s.push({
|
|
2544
|
+
type: typeof c == "string" ? S.literal : S.object,
|
|
2545
|
+
value: c
|
|
2474
2546
|
});
|
|
2475
2547
|
continue;
|
|
2476
2548
|
}
|
|
2477
|
-
if (
|
|
2478
|
-
var
|
|
2549
|
+
if (de(u)) {
|
|
2550
|
+
var E = typeof u.style == "string" ? r.date[u.style] : J(u.style) ? u.style.parsedOptions : void 0;
|
|
2479
2551
|
s.push({
|
|
2480
2552
|
type: S.literal,
|
|
2481
|
-
value: n.getDateTimeFormat(t,
|
|
2553
|
+
value: n.getDateTimeFormat(t, E).format(c)
|
|
2482
2554
|
});
|
|
2483
2555
|
continue;
|
|
2484
2556
|
}
|
|
2485
|
-
if (
|
|
2486
|
-
var
|
|
2557
|
+
if (xe(u)) {
|
|
2558
|
+
var E = typeof u.style == "string" ? r.time[u.style] : J(u.style) ? u.style.parsedOptions : r.time.medium;
|
|
2487
2559
|
s.push({
|
|
2488
2560
|
type: S.literal,
|
|
2489
|
-
value: n.getDateTimeFormat(t,
|
|
2561
|
+
value: n.getDateTimeFormat(t, E).format(c)
|
|
2490
2562
|
});
|
|
2491
2563
|
continue;
|
|
2492
2564
|
}
|
|
2493
|
-
if (
|
|
2494
|
-
var
|
|
2495
|
-
|
|
2565
|
+
if (be(u)) {
|
|
2566
|
+
var E = typeof u.style == "string" ? r.number[u.style] : He(u.style) ? u.style.parsedOptions : void 0;
|
|
2567
|
+
E && E.scale && (c = c * (E.scale || 1)), s.push({
|
|
2496
2568
|
type: S.literal,
|
|
2497
|
-
value: n.getNumberFormat(t,
|
|
2569
|
+
value: n.getNumberFormat(t, E).format(c)
|
|
2498
2570
|
});
|
|
2499
2571
|
continue;
|
|
2500
2572
|
}
|
|
2501
|
-
if (
|
|
2502
|
-
var
|
|
2503
|
-
if (!
|
|
2504
|
-
throw new It(
|
|
2505
|
-
var
|
|
2573
|
+
if (Se(u)) {
|
|
2574
|
+
var y = u.children, g = u.value, b = a[g];
|
|
2575
|
+
if (!Bt(b))
|
|
2576
|
+
throw new It(g, "function", o);
|
|
2577
|
+
var x = k(y, t, n, r, a, i), H = b(x.map(function(L) {
|
|
2506
2578
|
return L.value;
|
|
2507
2579
|
}));
|
|
2508
|
-
Array.isArray(
|
|
2580
|
+
Array.isArray(H) || (H = [H]), s.push.apply(s, H.map(function(L) {
|
|
2509
2581
|
return {
|
|
2510
2582
|
type: typeof L == "string" ? S.literal : S.object,
|
|
2511
2583
|
value: L
|
|
2512
2584
|
};
|
|
2513
2585
|
}));
|
|
2514
2586
|
}
|
|
2515
|
-
if (
|
|
2516
|
-
var T =
|
|
2587
|
+
if (ye(u)) {
|
|
2588
|
+
var T = u.options[c] || u.options.other;
|
|
2517
2589
|
if (!T)
|
|
2518
|
-
throw new fe(
|
|
2519
|
-
s.push.apply(s,
|
|
2590
|
+
throw new fe(u.value, c, Object.keys(u.options), o);
|
|
2591
|
+
s.push.apply(s, k(T.value, t, n, r, a));
|
|
2520
2592
|
continue;
|
|
2521
2593
|
}
|
|
2522
|
-
if (
|
|
2523
|
-
var T =
|
|
2594
|
+
if (Te(u)) {
|
|
2595
|
+
var T = u.options["=".concat(c)];
|
|
2524
2596
|
if (!T) {
|
|
2525
2597
|
if (!Intl.PluralRules)
|
|
2526
2598
|
throw new R(`Intl.PluralRules is not available in this environment.
|
|
2527
2599
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
2528
2600
|
`, _.MISSING_INTL_API, o);
|
|
2529
|
-
var w = n.getPluralRules(t, { type:
|
|
2530
|
-
T =
|
|
2601
|
+
var w = n.getPluralRules(t, { type: u.pluralType }).select(c - (u.offset || 0));
|
|
2602
|
+
T = u.options[w] || u.options.other;
|
|
2531
2603
|
}
|
|
2532
2604
|
if (!T)
|
|
2533
|
-
throw new fe(
|
|
2534
|
-
s.push.apply(s,
|
|
2605
|
+
throw new fe(u.value, c, Object.keys(u.options), o);
|
|
2606
|
+
s.push.apply(s, k(T.value, t, n, r, a, c - (u.offset || 0)));
|
|
2535
2607
|
continue;
|
|
2536
2608
|
}
|
|
2537
2609
|
}
|
|
2538
2610
|
return At(s);
|
|
2539
2611
|
}
|
|
2540
|
-
function
|
|
2612
|
+
function _t(e, t) {
|
|
2541
2613
|
return t ? f(f(f({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
|
|
2542
2614
|
return n[r] = f(f({}, e[r]), t[r] || {}), n;
|
|
2543
2615
|
}, {})) : e;
|
|
2544
2616
|
}
|
|
2545
|
-
function
|
|
2617
|
+
function Pt(e, t) {
|
|
2546
2618
|
return t ? Object.keys(e).reduce(function(n, r) {
|
|
2547
|
-
return n[r] =
|
|
2619
|
+
return n[r] = _t(e[r], t[r]), n;
|
|
2548
2620
|
}, f({}, e)) : e;
|
|
2549
2621
|
}
|
|
2550
|
-
function
|
|
2622
|
+
function W(e) {
|
|
2551
2623
|
return {
|
|
2552
2624
|
create: function() {
|
|
2553
2625
|
return {
|
|
@@ -2561,62 +2633,61 @@ function Z(e) {
|
|
|
2561
2633
|
}
|
|
2562
2634
|
};
|
|
2563
2635
|
}
|
|
2564
|
-
function
|
|
2636
|
+
function Rt(e) {
|
|
2565
2637
|
return e === void 0 && (e = {
|
|
2566
2638
|
number: {},
|
|
2567
2639
|
dateTime: {},
|
|
2568
2640
|
pluralRules: {}
|
|
2569
2641
|
}), {
|
|
2570
|
-
getNumberFormat:
|
|
2642
|
+
getNumberFormat: A(function() {
|
|
2571
2643
|
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2572
2644
|
n[r] = arguments[r];
|
|
2573
2645
|
return new ((t = Intl.NumberFormat).bind.apply(t, P([void 0], n, !1)))();
|
|
2574
2646
|
}, {
|
|
2575
|
-
cache:
|
|
2647
|
+
cache: W(e.number),
|
|
2576
2648
|
strategy: B.variadic
|
|
2577
2649
|
}),
|
|
2578
|
-
getDateTimeFormat:
|
|
2650
|
+
getDateTimeFormat: A(function() {
|
|
2579
2651
|
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2580
2652
|
n[r] = arguments[r];
|
|
2581
2653
|
return new ((t = Intl.DateTimeFormat).bind.apply(t, P([void 0], n, !1)))();
|
|
2582
2654
|
}, {
|
|
2583
|
-
cache:
|
|
2655
|
+
cache: W(e.dateTime),
|
|
2584
2656
|
strategy: B.variadic
|
|
2585
2657
|
}),
|
|
2586
|
-
getPluralRules:
|
|
2658
|
+
getPluralRules: A(function() {
|
|
2587
2659
|
for (var t, n = [], r = 0; r < arguments.length; r++)
|
|
2588
2660
|
n[r] = arguments[r];
|
|
2589
2661
|
return new ((t = Intl.PluralRules).bind.apply(t, P([void 0], n, !1)))();
|
|
2590
2662
|
}, {
|
|
2591
|
-
cache:
|
|
2663
|
+
cache: W(e.pluralRules),
|
|
2592
2664
|
strategy: B.variadic
|
|
2593
2665
|
})
|
|
2594
2666
|
};
|
|
2595
2667
|
}
|
|
2596
|
-
var
|
|
2668
|
+
var Me = (
|
|
2597
2669
|
/** @class */
|
|
2598
2670
|
function() {
|
|
2599
2671
|
function e(t, n, r, a) {
|
|
2600
|
-
n === void 0 && (n = e.defaultLocale);
|
|
2601
2672
|
var i = this;
|
|
2602
|
-
if (this.formatterCache = {
|
|
2673
|
+
if (n === void 0 && (n = e.defaultLocale), this.formatterCache = {
|
|
2603
2674
|
number: {},
|
|
2604
2675
|
dateTime: {},
|
|
2605
2676
|
pluralRules: {}
|
|
2606
|
-
}, this.format = function(
|
|
2607
|
-
var l = i.formatToParts(
|
|
2677
|
+
}, this.format = function(h) {
|
|
2678
|
+
var l = i.formatToParts(h);
|
|
2608
2679
|
if (l.length === 1)
|
|
2609
2680
|
return l[0].value;
|
|
2610
|
-
var
|
|
2611
|
-
return !
|
|
2681
|
+
var u = l.reduce(function(m, c) {
|
|
2682
|
+
return !m.length || c.type !== S.literal || typeof m[m.length - 1] != "string" ? m.push(c.value) : m[m.length - 1] += c.value, m;
|
|
2612
2683
|
}, []);
|
|
2613
|
-
return
|
|
2614
|
-
}, this.formatToParts = function(
|
|
2615
|
-
return
|
|
2684
|
+
return u.length <= 1 ? u[0] || "" : u;
|
|
2685
|
+
}, this.formatToParts = function(h) {
|
|
2686
|
+
return k(i.ast, i.locales, i.formatters, i.formats, h, void 0, i.message);
|
|
2616
2687
|
}, this.resolvedOptions = function() {
|
|
2617
|
-
var
|
|
2688
|
+
var h;
|
|
2618
2689
|
return {
|
|
2619
|
-
locale: ((
|
|
2690
|
+
locale: ((h = i.resolvedLocale) === null || h === void 0 ? void 0 : h.toString()) || Intl.NumberFormat.supportedLocalesOf(i.locales)[0]
|
|
2620
2691
|
};
|
|
2621
2692
|
}, this.getAst = function() {
|
|
2622
2693
|
return i.ast;
|
|
@@ -2631,7 +2702,7 @@ var Oe = (
|
|
|
2631
2702
|
this.ast = t;
|
|
2632
2703
|
if (!Array.isArray(this.ast))
|
|
2633
2704
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
2634
|
-
this.formats =
|
|
2705
|
+
this.formats = Pt(e.formats, r), this.formatters = a && a.formatters || Rt(this.formatterCache);
|
|
2635
2706
|
}
|
|
2636
2707
|
return Object.defineProperty(e, "defaultLocale", {
|
|
2637
2708
|
get: function() {
|
|
@@ -2644,7 +2715,7 @@ var Oe = (
|
|
|
2644
2715
|
var n = Intl.NumberFormat.supportedLocalesOf(t);
|
|
2645
2716
|
return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
|
|
2646
2717
|
}
|
|
2647
|
-
}, e.__parse =
|
|
2718
|
+
}, e.__parse = bt, e.formats = {
|
|
2648
2719
|
number: {
|
|
2649
2720
|
integer: {
|
|
2650
2721
|
maximumFractionDigits: 0
|
|
@@ -2711,7 +2782,7 @@ var Oe = (
|
|
|
2711
2782
|
var F = (
|
|
2712
2783
|
/** @class */
|
|
2713
2784
|
function(e) {
|
|
2714
|
-
|
|
2785
|
+
N(t, e);
|
|
2715
2786
|
function t(n, r, a) {
|
|
2716
2787
|
var i = this, o = a ? a instanceof Error ? a : new Error(String(a)) : void 0;
|
|
2717
2788
|
return i = e.call(this, "[@formatjs/intl Error ".concat(n, "] ").concat(r, `
|
|
@@ -2721,19 +2792,19 @@ var F = (
|
|
|
2721
2792
|
}
|
|
2722
2793
|
return t;
|
|
2723
2794
|
}(Error)
|
|
2724
|
-
),
|
|
2795
|
+
), Lt = (
|
|
2725
2796
|
/** @class */
|
|
2726
2797
|
function(e) {
|
|
2727
|
-
|
|
2798
|
+
N(t, e);
|
|
2728
2799
|
function t(n, r) {
|
|
2729
2800
|
return e.call(this, M.UNSUPPORTED_FORMATTER, n, r) || this;
|
|
2730
2801
|
}
|
|
2731
2802
|
return t;
|
|
2732
2803
|
}(F)
|
|
2733
|
-
),
|
|
2804
|
+
), Ot = (
|
|
2734
2805
|
/** @class */
|
|
2735
2806
|
function(e) {
|
|
2736
|
-
|
|
2807
|
+
N(t, e);
|
|
2737
2808
|
function t(n, r) {
|
|
2738
2809
|
return e.call(this, M.INVALID_CONFIG, n, r) || this;
|
|
2739
2810
|
}
|
|
@@ -2742,16 +2813,16 @@ var F = (
|
|
|
2742
2813
|
), me = (
|
|
2743
2814
|
/** @class */
|
|
2744
2815
|
function(e) {
|
|
2745
|
-
|
|
2816
|
+
N(t, e);
|
|
2746
2817
|
function t(n, r) {
|
|
2747
2818
|
return e.call(this, M.MISSING_DATA, n, r) || this;
|
|
2748
2819
|
}
|
|
2749
2820
|
return t;
|
|
2750
2821
|
}(F)
|
|
2751
|
-
),
|
|
2822
|
+
), I = (
|
|
2752
2823
|
/** @class */
|
|
2753
2824
|
function(e) {
|
|
2754
|
-
|
|
2825
|
+
N(t, e);
|
|
2755
2826
|
function t(n, r, a) {
|
|
2756
2827
|
var i = e.call(this, M.FORMAT_ERROR, "".concat(n, `
|
|
2757
2828
|
Locale: `).concat(r, `
|
|
@@ -2760,10 +2831,10 @@ Locale: `).concat(r, `
|
|
|
2760
2831
|
}
|
|
2761
2832
|
return t;
|
|
2762
2833
|
}(F)
|
|
2763
|
-
),
|
|
2834
|
+
), Z = (
|
|
2764
2835
|
/** @class */
|
|
2765
2836
|
function(e) {
|
|
2766
|
-
|
|
2837
|
+
N(t, e);
|
|
2767
2838
|
function t(n, r, a, i) {
|
|
2768
2839
|
var o = e.call(this, "".concat(n, `
|
|
2769
2840
|
MessageID: `).concat(a == null ? void 0 : a.id, `
|
|
@@ -2773,11 +2844,11 @@ Description: `).concat(a == null ? void 0 : a.description, `
|
|
|
2773
2844
|
return o.descriptor = a, o.locale = r, o;
|
|
2774
2845
|
}
|
|
2775
2846
|
return t;
|
|
2776
|
-
}(
|
|
2777
|
-
),
|
|
2847
|
+
}(I)
|
|
2848
|
+
), Mt = (
|
|
2778
2849
|
/** @class */
|
|
2779
2850
|
function(e) {
|
|
2780
|
-
|
|
2851
|
+
N(t, e);
|
|
2781
2852
|
function t(n, r) {
|
|
2782
2853
|
var a = e.call(this, M.MISSING_TRANSLATION, 'Missing message: "'.concat(n.id, '" for locale "').concat(r, '", using ').concat(n.defaultMessage ? "default message (".concat(typeof n.defaultMessage == "string" ? n.defaultMessage : n.defaultMessage.map(function(i) {
|
|
2783
2854
|
var o;
|
|
@@ -2793,21 +2864,21 @@ function C(e, t, n) {
|
|
|
2793
2864
|
return a in e ? r[a] = e[a] : a in n && (r[a] = n[a]), r;
|
|
2794
2865
|
}, {});
|
|
2795
2866
|
}
|
|
2796
|
-
var
|
|
2867
|
+
var Ct = function(e) {
|
|
2797
2868
|
process.env.NODE_ENV !== "production" && console.error(e);
|
|
2798
|
-
},
|
|
2869
|
+
}, Dt = function(e) {
|
|
2799
2870
|
process.env.NODE_ENV !== "production" && console.warn(e);
|
|
2800
|
-
},
|
|
2871
|
+
}, wt = {
|
|
2801
2872
|
formats: {},
|
|
2802
2873
|
messages: {},
|
|
2803
2874
|
timeZone: void 0,
|
|
2804
2875
|
defaultLocale: "en",
|
|
2805
2876
|
defaultFormats: {},
|
|
2806
2877
|
fallbackOnEmptyString: !0,
|
|
2807
|
-
onError:
|
|
2808
|
-
onWarn:
|
|
2878
|
+
onError: Ct,
|
|
2879
|
+
onWarn: Dt
|
|
2809
2880
|
};
|
|
2810
|
-
function
|
|
2881
|
+
function Ce() {
|
|
2811
2882
|
return {
|
|
2812
2883
|
dateTime: {},
|
|
2813
2884
|
number: {},
|
|
@@ -2832,26 +2903,26 @@ function O(e) {
|
|
|
2832
2903
|
}
|
|
2833
2904
|
};
|
|
2834
2905
|
}
|
|
2835
|
-
function
|
|
2836
|
-
e === void 0 && (e =
|
|
2837
|
-
var t = Intl.RelativeTimeFormat, n = Intl.ListFormat, r = Intl.DisplayNames, a =
|
|
2838
|
-
for (var s,
|
|
2839
|
-
|
|
2840
|
-
return new ((s = Intl.DateTimeFormat).bind.apply(s, P([void 0],
|
|
2906
|
+
function Ft(e) {
|
|
2907
|
+
e === void 0 && (e = Ce());
|
|
2908
|
+
var t = Intl.RelativeTimeFormat, n = Intl.ListFormat, r = Intl.DisplayNames, a = A(function() {
|
|
2909
|
+
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2910
|
+
h[l] = arguments[l];
|
|
2911
|
+
return new ((s = Intl.DateTimeFormat).bind.apply(s, P([void 0], h, !1)))();
|
|
2841
2912
|
}, {
|
|
2842
2913
|
cache: O(e.dateTime),
|
|
2843
2914
|
strategy: B.variadic
|
|
2844
|
-
}), i =
|
|
2845
|
-
for (var s,
|
|
2846
|
-
|
|
2847
|
-
return new ((s = Intl.NumberFormat).bind.apply(s, P([void 0],
|
|
2915
|
+
}), i = A(function() {
|
|
2916
|
+
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2917
|
+
h[l] = arguments[l];
|
|
2918
|
+
return new ((s = Intl.NumberFormat).bind.apply(s, P([void 0], h, !1)))();
|
|
2848
2919
|
}, {
|
|
2849
2920
|
cache: O(e.number),
|
|
2850
2921
|
strategy: B.variadic
|
|
2851
|
-
}), o =
|
|
2852
|
-
for (var s,
|
|
2853
|
-
|
|
2854
|
-
return new ((s = Intl.PluralRules).bind.apply(s, P([void 0],
|
|
2922
|
+
}), o = A(function() {
|
|
2923
|
+
for (var s, h = [], l = 0; l < arguments.length; l++)
|
|
2924
|
+
h[l] = arguments[l];
|
|
2925
|
+
return new ((s = Intl.PluralRules).bind.apply(s, P([void 0], h, !1)))();
|
|
2855
2926
|
}, {
|
|
2856
2927
|
cache: O(e.pluralRules),
|
|
2857
2928
|
strategy: B.variadic
|
|
@@ -2859,36 +2930,36 @@ function wt(e) {
|
|
|
2859
2930
|
return {
|
|
2860
2931
|
getDateTimeFormat: a,
|
|
2861
2932
|
getNumberFormat: i,
|
|
2862
|
-
getMessageFormat:
|
|
2863
|
-
return new
|
|
2933
|
+
getMessageFormat: A(function(s, h, l, u) {
|
|
2934
|
+
return new Me(s, h, l, f({ formatters: {
|
|
2864
2935
|
getNumberFormat: i,
|
|
2865
2936
|
getDateTimeFormat: a,
|
|
2866
2937
|
getPluralRules: o
|
|
2867
|
-
} },
|
|
2938
|
+
} }, u || {}));
|
|
2868
2939
|
}, {
|
|
2869
2940
|
cache: O(e.message),
|
|
2870
2941
|
strategy: B.variadic
|
|
2871
2942
|
}),
|
|
2872
|
-
getRelativeTimeFormat:
|
|
2873
|
-
for (var s = [],
|
|
2874
|
-
s[
|
|
2943
|
+
getRelativeTimeFormat: A(function() {
|
|
2944
|
+
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2945
|
+
s[h] = arguments[h];
|
|
2875
2946
|
return new (t.bind.apply(t, P([void 0], s, !1)))();
|
|
2876
2947
|
}, {
|
|
2877
2948
|
cache: O(e.relativeTime),
|
|
2878
2949
|
strategy: B.variadic
|
|
2879
2950
|
}),
|
|
2880
2951
|
getPluralRules: o,
|
|
2881
|
-
getListFormat:
|
|
2882
|
-
for (var s = [],
|
|
2883
|
-
s[
|
|
2952
|
+
getListFormat: A(function() {
|
|
2953
|
+
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2954
|
+
s[h] = arguments[h];
|
|
2884
2955
|
return new (n.bind.apply(n, P([void 0], s, !1)))();
|
|
2885
2956
|
}, {
|
|
2886
2957
|
cache: O(e.list),
|
|
2887
2958
|
strategy: B.variadic
|
|
2888
2959
|
}),
|
|
2889
|
-
getDisplayNames:
|
|
2890
|
-
for (var s = [],
|
|
2891
|
-
s[
|
|
2960
|
+
getDisplayNames: A(function() {
|
|
2961
|
+
for (var s = [], h = 0; h < arguments.length; h++)
|
|
2962
|
+
s[h] = arguments[h];
|
|
2892
2963
|
return new (r.bind.apply(r, P([void 0], s, !1)))();
|
|
2893
2964
|
}, {
|
|
2894
2965
|
cache: O(e.displayNames),
|
|
@@ -2900,13 +2971,13 @@ function re(e, t, n, r) {
|
|
|
2900
2971
|
var a = e && e[t], i;
|
|
2901
2972
|
if (a && (i = a[n]), i)
|
|
2902
2973
|
return i;
|
|
2903
|
-
r(new
|
|
2974
|
+
r(new Lt("No ".concat(t, " format named: ").concat(n)));
|
|
2904
2975
|
}
|
|
2905
|
-
function
|
|
2976
|
+
function Gt(e, t, n) {
|
|
2906
2977
|
if (n === void 0 && (n = Error), !e)
|
|
2907
2978
|
throw new n(t);
|
|
2908
2979
|
}
|
|
2909
|
-
function
|
|
2980
|
+
function V(e, t) {
|
|
2910
2981
|
return Object.keys(e).reduce(function(n, r) {
|
|
2911
2982
|
return n[r] = f({ timeZone: t }, e[r]), n;
|
|
2912
2983
|
}, {});
|
|
@@ -2920,51 +2991,51 @@ function ce(e, t) {
|
|
|
2920
2991
|
function pe(e, t) {
|
|
2921
2992
|
if (!t)
|
|
2922
2993
|
return e;
|
|
2923
|
-
var n =
|
|
2924
|
-
return f(f(f({}, n), e), { date: ce(
|
|
2994
|
+
var n = Me.formats;
|
|
2995
|
+
return f(f(f({}, n), e), { date: ce(V(n.date, t), V(e.date || {}, t)), time: ce(V(n.time, t), V(e.time || {}, t)) });
|
|
2925
2996
|
}
|
|
2926
2997
|
var ge = function(e, t, n, r, a) {
|
|
2927
|
-
var i = e.locale, o = e.formats, s = e.messages,
|
|
2998
|
+
var i = e.locale, o = e.formats, s = e.messages, h = e.defaultLocale, l = e.defaultFormats, u = e.fallbackOnEmptyString, m = e.onError, c = e.timeZone, E = e.defaultRichTextElements;
|
|
2928
2999
|
n === void 0 && (n = { id: "" });
|
|
2929
|
-
var
|
|
2930
|
-
|
|
2931
|
-
var
|
|
3000
|
+
var y = n.id, g = n.defaultMessage;
|
|
3001
|
+
Gt(!!y, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
|
|
3002
|
+
var b = String(y), x = (
|
|
2932
3003
|
// In case messages is Object.create(null)
|
|
2933
3004
|
// e.g import('foo.json') from webpack)
|
|
2934
3005
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
2935
|
-
s && Object.prototype.hasOwnProperty.call(s,
|
|
3006
|
+
s && Object.prototype.hasOwnProperty.call(s, b) && s[b]
|
|
2936
3007
|
);
|
|
2937
|
-
if (Array.isArray(
|
|
2938
|
-
return
|
|
2939
|
-
if (!r &&
|
|
2940
|
-
return
|
|
2941
|
-
if (r = f(f({},
|
|
2942
|
-
if (
|
|
2943
|
-
return
|
|
2944
|
-
if ((!
|
|
3008
|
+
if (Array.isArray(x) && x.length === 1 && x[0].type === d.literal)
|
|
3009
|
+
return x[0].value;
|
|
3010
|
+
if (!r && x && typeof x == "string" && !E)
|
|
3011
|
+
return x.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
3012
|
+
if (r = f(f({}, E), r || {}), o = pe(o, c), l = pe(l, c), !x) {
|
|
3013
|
+
if (u === !1 && x === "")
|
|
3014
|
+
return x;
|
|
3015
|
+
if ((!g || i && i.toLowerCase() !== h.toLowerCase()) && m(new Mt(n, i)), g)
|
|
2945
3016
|
try {
|
|
2946
|
-
var
|
|
2947
|
-
return
|
|
3017
|
+
var H = t.getMessageFormat(g, h, l, a);
|
|
3018
|
+
return H.format(r);
|
|
2948
3019
|
} catch (T) {
|
|
2949
|
-
return
|
|
3020
|
+
return m(new Z('Error formatting default message for: "'.concat(b, '", rendering default message verbatim'), i, n, T)), typeof g == "string" ? g : b;
|
|
2950
3021
|
}
|
|
2951
|
-
return
|
|
3022
|
+
return b;
|
|
2952
3023
|
}
|
|
2953
3024
|
try {
|
|
2954
|
-
var
|
|
2955
|
-
return
|
|
3025
|
+
var H = t.getMessageFormat(x, i, o, f({ formatters: t }, a || {}));
|
|
3026
|
+
return H.format(r);
|
|
2956
3027
|
} catch (T) {
|
|
2957
|
-
|
|
3028
|
+
m(new Z('Error formatting message: "'.concat(b, '", using ').concat(g ? "default message" : "id", " as fallback."), i, n, T));
|
|
2958
3029
|
}
|
|
2959
|
-
if (
|
|
3030
|
+
if (g)
|
|
2960
3031
|
try {
|
|
2961
|
-
var
|
|
2962
|
-
return
|
|
3032
|
+
var H = t.getMessageFormat(g, h, l, a);
|
|
3033
|
+
return H.format(r);
|
|
2963
3034
|
} catch (T) {
|
|
2964
|
-
|
|
3035
|
+
m(new Z('Error formatting the default message for: "'.concat(b, '", rendering message verbatim'), i, n, T));
|
|
2965
3036
|
}
|
|
2966
|
-
return typeof
|
|
2967
|
-
},
|
|
3037
|
+
return typeof x == "string" ? x : typeof g == "string" ? g : b;
|
|
3038
|
+
}, De = [
|
|
2968
3039
|
"formatMatcher",
|
|
2969
3040
|
"timeZone",
|
|
2970
3041
|
"hour12",
|
|
@@ -2988,65 +3059,65 @@ var ge = function(e, t, n, r, a) {
|
|
|
2988
3059
|
function j(e, t, n, r) {
|
|
2989
3060
|
var a = e.locale, i = e.formats, o = e.onError, s = e.timeZone;
|
|
2990
3061
|
r === void 0 && (r = {});
|
|
2991
|
-
var
|
|
2992
|
-
return t === "time" && !
|
|
3062
|
+
var h = r.format, l = f(f({}, s && { timeZone: s }), h && re(i, t, h, o)), u = C(r, De, l);
|
|
3063
|
+
return t === "time" && !u.hour && !u.minute && !u.second && !u.timeStyle && !u.dateStyle && (u = f(f({}, u), { hour: "numeric", minute: "numeric" })), n(a, u);
|
|
2993
3064
|
}
|
|
2994
|
-
function
|
|
3065
|
+
function Ut(e, t) {
|
|
2995
3066
|
for (var n = [], r = 2; r < arguments.length; r++)
|
|
2996
3067
|
n[r - 2] = arguments[r];
|
|
2997
3068
|
var a = n[0], i = n[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
2998
3069
|
try {
|
|
2999
3070
|
return j(e, "date", t, o).format(s);
|
|
3000
|
-
} catch (
|
|
3001
|
-
e.onError(new
|
|
3071
|
+
} catch (h) {
|
|
3072
|
+
e.onError(new I("Error formatting date.", e.locale, h));
|
|
3002
3073
|
}
|
|
3003
3074
|
return String(s);
|
|
3004
3075
|
}
|
|
3005
|
-
function
|
|
3076
|
+
function Vt(e, t) {
|
|
3006
3077
|
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3007
3078
|
n[r - 2] = arguments[r];
|
|
3008
3079
|
var a = n[0], i = n[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3009
3080
|
try {
|
|
3010
3081
|
return j(e, "time", t, o).format(s);
|
|
3011
|
-
} catch (
|
|
3012
|
-
e.onError(new
|
|
3082
|
+
} catch (h) {
|
|
3083
|
+
e.onError(new I("Error formatting time.", e.locale, h));
|
|
3013
3084
|
}
|
|
3014
3085
|
return String(s);
|
|
3015
3086
|
}
|
|
3016
3087
|
function kt(e, t) {
|
|
3017
3088
|
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3018
3089
|
n[r - 2] = arguments[r];
|
|
3019
|
-
var a = n[0], i = n[1], o = n[2], s = o === void 0 ? {} : o,
|
|
3090
|
+
var a = n[0], i = n[1], o = n[2], s = o === void 0 ? {} : o, h = e.timeZone, l = e.locale, u = e.onError, m = C(s, De, h ? { timeZone: h } : {});
|
|
3020
3091
|
try {
|
|
3021
|
-
return t(l,
|
|
3022
|
-
} catch (
|
|
3023
|
-
|
|
3092
|
+
return t(l, m).formatRange(a, i);
|
|
3093
|
+
} catch (c) {
|
|
3094
|
+
u(new I("Error formatting date time range.", e.locale, c));
|
|
3024
3095
|
}
|
|
3025
3096
|
return String(a);
|
|
3026
3097
|
}
|
|
3027
|
-
function
|
|
3098
|
+
function jt(e, t) {
|
|
3028
3099
|
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3029
3100
|
n[r - 2] = arguments[r];
|
|
3030
3101
|
var a = n[0], i = n[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3031
3102
|
try {
|
|
3032
3103
|
return j(e, "date", t, o).formatToParts(s);
|
|
3033
|
-
} catch (
|
|
3034
|
-
e.onError(new
|
|
3104
|
+
} catch (h) {
|
|
3105
|
+
e.onError(new I("Error formatting date.", e.locale, h));
|
|
3035
3106
|
}
|
|
3036
3107
|
return [];
|
|
3037
3108
|
}
|
|
3038
|
-
function
|
|
3109
|
+
function Xt(e, t) {
|
|
3039
3110
|
for (var n = [], r = 2; r < arguments.length; r++)
|
|
3040
3111
|
n[r - 2] = arguments[r];
|
|
3041
3112
|
var a = n[0], i = n[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3042
3113
|
try {
|
|
3043
3114
|
return j(e, "time", t, o).formatToParts(s);
|
|
3044
|
-
} catch (
|
|
3045
|
-
e.onError(new
|
|
3115
|
+
} catch (h) {
|
|
3116
|
+
e.onError(new I("Error formatting time.", e.locale, h));
|
|
3046
3117
|
}
|
|
3047
3118
|
return [];
|
|
3048
3119
|
}
|
|
3049
|
-
var
|
|
3120
|
+
var Wt = [
|
|
3050
3121
|
"style",
|
|
3051
3122
|
"type",
|
|
3052
3123
|
"fallback",
|
|
@@ -3057,87 +3128,87 @@ function Zt(e, t, n, r) {
|
|
|
3057
3128
|
o || i(new R(`Intl.DisplayNames is not available in this environment.
|
|
3058
3129
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3059
3130
|
`, _.MISSING_INTL_API));
|
|
3060
|
-
var s = C(r,
|
|
3131
|
+
var s = C(r, Wt);
|
|
3061
3132
|
try {
|
|
3062
3133
|
return t(a, s).of(n);
|
|
3063
|
-
} catch (
|
|
3064
|
-
i(new
|
|
3134
|
+
} catch (h) {
|
|
3135
|
+
i(new I("Error formatting display name.", a, h));
|
|
3065
3136
|
}
|
|
3066
3137
|
}
|
|
3067
|
-
var
|
|
3138
|
+
var zt = [
|
|
3068
3139
|
"type",
|
|
3069
3140
|
"style"
|
|
3070
3141
|
], ve = Date.now();
|
|
3071
|
-
function
|
|
3142
|
+
function Jt(e) {
|
|
3072
3143
|
return "".concat(ve, "_").concat(e, "_").concat(ve);
|
|
3073
3144
|
}
|
|
3074
3145
|
function qt(e, t, n, r) {
|
|
3075
3146
|
r === void 0 && (r = {});
|
|
3076
|
-
var a =
|
|
3147
|
+
var a = we(e, t, n, r).reduce(function(i, o) {
|
|
3077
3148
|
var s = o.value;
|
|
3078
3149
|
return typeof s != "string" ? i.push(s) : typeof i[i.length - 1] == "string" ? i[i.length - 1] += s : i.push(s), i;
|
|
3079
3150
|
}, []);
|
|
3080
3151
|
return a.length === 1 ? a[0] : a.length === 0 ? "" : a;
|
|
3081
3152
|
}
|
|
3082
|
-
function
|
|
3153
|
+
function we(e, t, n, r) {
|
|
3083
3154
|
var a = e.locale, i = e.onError;
|
|
3084
3155
|
r === void 0 && (r = {});
|
|
3085
3156
|
var o = Intl.ListFormat;
|
|
3086
3157
|
o || i(new R(`Intl.ListFormat is not available in this environment.
|
|
3087
3158
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3088
3159
|
`, _.MISSING_INTL_API));
|
|
3089
|
-
var s = C(r,
|
|
3160
|
+
var s = C(r, zt);
|
|
3090
3161
|
try {
|
|
3091
|
-
var
|
|
3092
|
-
if (typeof
|
|
3093
|
-
var
|
|
3094
|
-
return
|
|
3162
|
+
var h = {}, l = n.map(function(u, m) {
|
|
3163
|
+
if (typeof u == "object") {
|
|
3164
|
+
var c = Jt(m);
|
|
3165
|
+
return h[c] = u, c;
|
|
3095
3166
|
}
|
|
3096
|
-
return String(
|
|
3167
|
+
return String(u);
|
|
3097
3168
|
});
|
|
3098
|
-
return t(a, s).formatToParts(l).map(function(
|
|
3099
|
-
return
|
|
3169
|
+
return t(a, s).formatToParts(l).map(function(u) {
|
|
3170
|
+
return u.type === "literal" ? u : f(f({}, u), { value: h[u.value] || u.value });
|
|
3100
3171
|
});
|
|
3101
|
-
} catch (
|
|
3102
|
-
i(new
|
|
3172
|
+
} catch (u) {
|
|
3173
|
+
i(new I("Error formatting list.", a, u));
|
|
3103
3174
|
}
|
|
3104
3175
|
return n;
|
|
3105
3176
|
}
|
|
3106
|
-
var
|
|
3107
|
-
function
|
|
3177
|
+
var Qt = ["type"];
|
|
3178
|
+
function Yt(e, t, n, r) {
|
|
3108
3179
|
var a = e.locale, i = e.onError;
|
|
3109
3180
|
r === void 0 && (r = {}), Intl.PluralRules || i(new R(`Intl.PluralRules is not available in this environment.
|
|
3110
3181
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3111
3182
|
`, _.MISSING_INTL_API));
|
|
3112
|
-
var o = C(r,
|
|
3183
|
+
var o = C(r, Qt);
|
|
3113
3184
|
try {
|
|
3114
3185
|
return t(a, o).select(n);
|
|
3115
3186
|
} catch (s) {
|
|
3116
|
-
i(new
|
|
3187
|
+
i(new I("Error formatting plural.", a, s));
|
|
3117
3188
|
}
|
|
3118
3189
|
return "other";
|
|
3119
3190
|
}
|
|
3120
|
-
var
|
|
3121
|
-
function
|
|
3191
|
+
var $t = ["numeric", "style"];
|
|
3192
|
+
function Kt(e, t, n) {
|
|
3122
3193
|
var r = e.locale, a = e.formats, i = e.onError;
|
|
3123
3194
|
n === void 0 && (n = {});
|
|
3124
|
-
var o = n.format, s = !!o && re(a, "relative", o, i) || {},
|
|
3125
|
-
return t(r,
|
|
3195
|
+
var o = n.format, s = !!o && re(a, "relative", o, i) || {}, h = C(n, $t, s);
|
|
3196
|
+
return t(r, h);
|
|
3126
3197
|
}
|
|
3127
|
-
function
|
|
3198
|
+
function er(e, t, n, r, a) {
|
|
3128
3199
|
a === void 0 && (a = {}), r || (r = "second");
|
|
3129
3200
|
var i = Intl.RelativeTimeFormat;
|
|
3130
3201
|
i || e.onError(new R(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3131
3202
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3132
3203
|
`, _.MISSING_INTL_API));
|
|
3133
3204
|
try {
|
|
3134
|
-
return
|
|
3205
|
+
return Kt(e, t, a).format(n, r);
|
|
3135
3206
|
} catch (o) {
|
|
3136
|
-
e.onError(new
|
|
3207
|
+
e.onError(new I("Error formatting relative time.", e.locale, o));
|
|
3137
3208
|
}
|
|
3138
3209
|
return String(n);
|
|
3139
3210
|
}
|
|
3140
|
-
var
|
|
3211
|
+
var tr = [
|
|
3141
3212
|
"style",
|
|
3142
3213
|
"currency",
|
|
3143
3214
|
"currencyDisplay",
|
|
@@ -3159,127 +3230,135 @@ var er = [
|
|
|
3159
3230
|
"unitDisplay",
|
|
3160
3231
|
"numberingSystem"
|
|
3161
3232
|
];
|
|
3162
|
-
function
|
|
3233
|
+
function Fe(e, t, n) {
|
|
3163
3234
|
var r = e.locale, a = e.formats, i = e.onError;
|
|
3164
3235
|
n === void 0 && (n = {});
|
|
3165
|
-
var o = n.format, s = o && re(a, "number", o, i) || {},
|
|
3166
|
-
return t(r,
|
|
3236
|
+
var o = n.format, s = o && re(a, "number", o, i) || {}, h = C(n, tr, s);
|
|
3237
|
+
return t(r, h);
|
|
3167
3238
|
}
|
|
3168
|
-
function
|
|
3239
|
+
function rr(e, t, n, r) {
|
|
3169
3240
|
r === void 0 && (r = {});
|
|
3170
3241
|
try {
|
|
3171
|
-
return
|
|
3242
|
+
return Fe(e, t, r).format(n);
|
|
3172
3243
|
} catch (a) {
|
|
3173
|
-
e.onError(new
|
|
3244
|
+
e.onError(new I("Error formatting number.", e.locale, a));
|
|
3174
3245
|
}
|
|
3175
3246
|
return String(n);
|
|
3176
3247
|
}
|
|
3177
|
-
function
|
|
3248
|
+
function nr(e, t, n, r) {
|
|
3178
3249
|
r === void 0 && (r = {});
|
|
3179
3250
|
try {
|
|
3180
|
-
return
|
|
3251
|
+
return Fe(e, t, r).formatToParts(n);
|
|
3181
3252
|
} catch (a) {
|
|
3182
|
-
e.onError(new
|
|
3253
|
+
e.onError(new I("Error formatting number.", e.locale, a));
|
|
3183
3254
|
}
|
|
3184
3255
|
return [];
|
|
3185
3256
|
}
|
|
3186
|
-
function
|
|
3257
|
+
function ar(e) {
|
|
3187
3258
|
var t = e ? e[Object.keys(e)[0]] : void 0;
|
|
3188
3259
|
return typeof t == "string";
|
|
3189
3260
|
}
|
|
3190
|
-
function
|
|
3191
|
-
e.onWarn && e.defaultRichTextElements &&
|
|
3261
|
+
function ir(e) {
|
|
3262
|
+
e.onWarn && e.defaultRichTextElements && ar(e.messages || {}) && e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
3192
3263
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
3193
3264
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3194
3265
|
}
|
|
3195
|
-
function
|
|
3196
|
-
var n =
|
|
3197
|
-
return a ? !Intl.NumberFormat.supportedLocalesOf(a).length && o ? o(new me('Missing locale data for locale: "'.concat(a, '" in Intl.NumberFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(a).length && o && o(new me('Missing locale data for locale: "'.concat(a, '" in Intl.DateTimeFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (o && o(new
|
|
3266
|
+
function or(e, t) {
|
|
3267
|
+
var n = Ft(t), r = f(f({}, wt), e), a = r.locale, i = r.defaultLocale, o = r.onError;
|
|
3268
|
+
return a ? !Intl.NumberFormat.supportedLocalesOf(a).length && o ? o(new me('Missing locale data for locale: "'.concat(a, '" in Intl.NumberFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(a).length && o && o(new me('Missing locale data for locale: "'.concat(a, '" in Intl.DateTimeFormat. Using default locale: "').concat(i, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (o && o(new Ot('"locale" was not configured, using "'.concat(i, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), r.locale = r.defaultLocale || "en"), ir(r), f(f({}, r), {
|
|
3198
3269
|
formatters: n,
|
|
3199
|
-
formatNumber:
|
|
3200
|
-
formatNumberToParts:
|
|
3201
|
-
formatRelativeTime:
|
|
3202
|
-
formatDate:
|
|
3203
|
-
formatDateToParts:
|
|
3204
|
-
formatTime:
|
|
3270
|
+
formatNumber: rr.bind(null, r, n.getNumberFormat),
|
|
3271
|
+
formatNumberToParts: nr.bind(null, r, n.getNumberFormat),
|
|
3272
|
+
formatRelativeTime: er.bind(null, r, n.getRelativeTimeFormat),
|
|
3273
|
+
formatDate: Ut.bind(null, r, n.getDateTimeFormat),
|
|
3274
|
+
formatDateToParts: jt.bind(null, r, n.getDateTimeFormat),
|
|
3275
|
+
formatTime: Vt.bind(null, r, n.getDateTimeFormat),
|
|
3205
3276
|
formatDateTimeRange: kt.bind(null, r, n.getDateTimeFormat),
|
|
3206
|
-
formatTimeToParts:
|
|
3207
|
-
formatPlural:
|
|
3277
|
+
formatTimeToParts: Xt.bind(null, r, n.getDateTimeFormat),
|
|
3278
|
+
formatPlural: Yt.bind(null, r, n.getPluralRules),
|
|
3208
3279
|
// @ts-expect-error TODO: will get to this later
|
|
3209
3280
|
formatMessage: ge.bind(null, r, n),
|
|
3210
3281
|
// @ts-expect-error TODO: will get to this later
|
|
3211
3282
|
$t: ge.bind(null, r, n),
|
|
3212
3283
|
formatList: qt.bind(null, r, n.getListFormat),
|
|
3213
|
-
formatListToParts:
|
|
3284
|
+
formatListToParts: we.bind(null, r, n.getListFormat),
|
|
3214
3285
|
formatDisplayName: Zt.bind(null, r, n.getDisplayNames)
|
|
3215
3286
|
});
|
|
3216
3287
|
}
|
|
3217
|
-
function
|
|
3288
|
+
function sr(e) {
|
|
3218
3289
|
return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
3219
3290
|
}
|
|
3220
|
-
function
|
|
3291
|
+
function hr(e) {
|
|
3221
3292
|
return e;
|
|
3222
3293
|
}
|
|
3223
3294
|
function ur(e, t) {
|
|
3224
3295
|
t = t || {};
|
|
3225
|
-
const n = t.delimiter || ".", r = t.maxDepth, a = t.transformKey ||
|
|
3226
|
-
function o(s,
|
|
3227
|
-
l = l || 1, Object.keys(s).forEach(function(
|
|
3228
|
-
const
|
|
3229
|
-
if (!
|
|
3230
|
-
return o(
|
|
3231
|
-
i[
|
|
3296
|
+
const n = t.delimiter || ".", r = t.maxDepth, a = t.transformKey || hr, i = {};
|
|
3297
|
+
function o(s, h, l) {
|
|
3298
|
+
l = l || 1, Object.keys(s).forEach(function(u) {
|
|
3299
|
+
const m = s[u], c = t.safe && Array.isArray(m), E = Object.prototype.toString.call(m), y = sr(m), g = E === "[object Object]" || E === "[object Array]", b = h ? h + n + a(u) : a(u);
|
|
3300
|
+
if (!c && !y && g && Object.keys(m).length && (!t.maxDepth || l < r))
|
|
3301
|
+
return o(m, b, l + 1);
|
|
3302
|
+
i[b] = m;
|
|
3232
3303
|
});
|
|
3233
3304
|
}
|
|
3234
3305
|
return o(e), i;
|
|
3235
3306
|
}
|
|
3236
|
-
const
|
|
3237
|
-
let
|
|
3238
|
-
const
|
|
3239
|
-
|
|
3307
|
+
const lr = Ce();
|
|
3308
|
+
let Ge;
|
|
3309
|
+
const Ee = {
|
|
3310
|
+
year: "numeric",
|
|
3311
|
+
month: "short",
|
|
3312
|
+
day: "numeric",
|
|
3313
|
+
hour: "numeric",
|
|
3314
|
+
minute: "numeric"
|
|
3315
|
+
}, cr = (e, t, n = !1) => {
|
|
3316
|
+
var y;
|
|
3317
|
+
const r = typeof n == "boolean", a = or(
|
|
3240
3318
|
{
|
|
3241
|
-
...
|
|
3319
|
+
...r ? null : n,
|
|
3242
3320
|
locale: e,
|
|
3243
3321
|
messages: ur(t, {
|
|
3244
3322
|
safe: !0
|
|
3245
3323
|
// Preserve arrays
|
|
3246
|
-
})
|
|
3324
|
+
}),
|
|
3325
|
+
formats: {
|
|
3326
|
+
...r ? null : n.formats,
|
|
3327
|
+
date: {
|
|
3328
|
+
...r ? null : (y = n.formats) == null ? void 0 : y.date,
|
|
3329
|
+
datetime: Ee
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3247
3332
|
},
|
|
3248
|
-
|
|
3249
|
-
), { $t:
|
|
3250
|
-
const
|
|
3251
|
-
if (!
|
|
3252
|
-
return
|
|
3333
|
+
lr
|
|
3334
|
+
), { $t: i, ...o } = a, s = o, h = (g) => {
|
|
3335
|
+
const b = "Invalid Date";
|
|
3336
|
+
if (!g)
|
|
3337
|
+
return b;
|
|
3253
3338
|
try {
|
|
3254
|
-
const
|
|
3255
|
-
return
|
|
3256
|
-
year: "numeric",
|
|
3257
|
-
month: "short",
|
|
3258
|
-
day: "numeric",
|
|
3259
|
-
hour: "numeric",
|
|
3260
|
-
minute: "numeric"
|
|
3261
|
-
});
|
|
3339
|
+
const x = new Date(g * 1e3);
|
|
3340
|
+
return s.formatDate(x, Ee);
|
|
3262
3341
|
} catch {
|
|
3263
|
-
return
|
|
3342
|
+
return b;
|
|
3264
3343
|
}
|
|
3265
|
-
},
|
|
3266
|
-
formatUnixTimeStamp:
|
|
3267
|
-
formatIsoDate: (
|
|
3268
|
-
const
|
|
3269
|
-
return
|
|
3344
|
+
}, E = {
|
|
3345
|
+
formatUnixTimeStamp: h,
|
|
3346
|
+
formatIsoDate: (g) => {
|
|
3347
|
+
const b = Date.parse(g) / 1e3;
|
|
3348
|
+
return h(b);
|
|
3270
3349
|
},
|
|
3271
|
-
t: (
|
|
3272
|
-
te: (
|
|
3273
|
-
tm: (
|
|
3274
|
-
...
|
|
3350
|
+
t: (g, b, x) => s.formatMessage({ id: g }, b, x),
|
|
3351
|
+
te: (g) => !!s.messages[g],
|
|
3352
|
+
tm: (g) => s.messages[g] || [],
|
|
3353
|
+
...s,
|
|
3275
3354
|
source: t
|
|
3276
3355
|
};
|
|
3277
|
-
return (typeof n == "boolean" && n === !0 || typeof n != "boolean" && n.isGlobal === !0) && (
|
|
3356
|
+
return (typeof n == "boolean" && n === !0 || typeof n != "boolean" && n.isGlobal === !0) && (Ge = E), E;
|
|
3278
3357
|
};
|
|
3279
|
-
function
|
|
3280
|
-
return
|
|
3358
|
+
function pr() {
|
|
3359
|
+
return Ge;
|
|
3281
3360
|
}
|
|
3282
|
-
const
|
|
3361
|
+
const fr = (e = null) => Ue({
|
|
3283
3362
|
name: "I18nT",
|
|
3284
3363
|
props: {
|
|
3285
3364
|
i18n: {
|
|
@@ -3306,23 +3385,23 @@ const lr = (e = null) => Ge({
|
|
|
3306
3385
|
return () => {
|
|
3307
3386
|
const a = Object.keys(n).filter((s) => s !== "_"), i = (e || t.i18n).messages[t.keypath].toString();
|
|
3308
3387
|
let o = r(i);
|
|
3309
|
-
return o = o.filter((s) => s !== ""), o.forEach((s,
|
|
3388
|
+
return o = o.filter((s) => s !== ""), o.forEach((s, h) => {
|
|
3310
3389
|
if (!s.startsWith("{") && !s.endsWith("}"))
|
|
3311
3390
|
return;
|
|
3312
3391
|
const l = s.replace(/[\{\}]/g, "");
|
|
3313
|
-
l === "0" && n.default ? o[
|
|
3314
|
-
}),
|
|
3392
|
+
l === "0" && n.default ? o[h] = n.default() : a.includes(l) && n[l] && (o[h] = n[l]());
|
|
3393
|
+
}), Ve(t.tag, t, o);
|
|
3315
3394
|
};
|
|
3316
3395
|
}
|
|
3317
|
-
}),
|
|
3396
|
+
}), gr = {
|
|
3318
3397
|
install(e, t) {
|
|
3319
3398
|
const { i18n: n } = t;
|
|
3320
|
-
e.component("I18nT",
|
|
3399
|
+
e.component("I18nT", fr(n));
|
|
3321
3400
|
}
|
|
3322
3401
|
};
|
|
3323
3402
|
export {
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3403
|
+
gr as Translation,
|
|
3404
|
+
cr as createI18n,
|
|
3405
|
+
fr as i18nTComponent,
|
|
3406
|
+
pr as useI18n
|
|
3328
3407
|
};
|