@kong-ui-public/i18n 2.4.1-pr.2030.3ee7f86d0.0 → 2.4.1
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/i18n.es.js +3465 -0
- package/dist/i18n.umd.js +22 -0
- package/dist/types/Translation.d.ts +39 -0
- package/dist/types/Translation.d.ts.map +1 -0
- package/dist/types/i18n.d.ts +13 -0
- package/dist/types/i18n.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +21 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/i18n.es.js
ADDED
|
@@ -0,0 +1,3465 @@
|
|
|
1
|
+
import { defineComponent as Ge, h as Ue } from "vue";
|
|
2
|
+
var z = function(e, t) {
|
|
3
|
+
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
|
|
4
|
+
r.__proto__ = n;
|
|
5
|
+
} || function(r, n) {
|
|
6
|
+
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (r[a] = n[a]);
|
|
7
|
+
}, z(e, t);
|
|
8
|
+
};
|
|
9
|
+
function _(e, t) {
|
|
10
|
+
if (typeof t != "function" && t !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
12
|
+
z(e, t);
|
|
13
|
+
function r() {
|
|
14
|
+
this.constructor = e;
|
|
15
|
+
}
|
|
16
|
+
e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
17
|
+
}
|
|
18
|
+
var f = function() {
|
|
19
|
+
return f = Object.assign || function(t) {
|
|
20
|
+
for (var r, n = 1, a = arguments.length; n < a; n++) {
|
|
21
|
+
r = arguments[n];
|
|
22
|
+
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
}, f.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
function Ve(e, t) {
|
|
28
|
+
var r = {};
|
|
29
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
30
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
31
|
+
for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
|
|
32
|
+
t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (r[n[a]] = e[n[a]]);
|
|
33
|
+
return r;
|
|
34
|
+
}
|
|
35
|
+
function A(e, t, r) {
|
|
36
|
+
if (r || arguments.length === 2) for (var n = 0, a = t.length, i; n < a; n++)
|
|
37
|
+
(i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
|
|
38
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
39
|
+
}
|
|
40
|
+
function I(e, t) {
|
|
41
|
+
var r = t && t.cache ? t.cache : ze, n = t && t.serializer ? t.serializer : Ze, a = t && t.strategy ? t.strategy : Xe;
|
|
42
|
+
return a(e, {
|
|
43
|
+
cache: r,
|
|
44
|
+
serializer: n
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function ke(e) {
|
|
48
|
+
return e == null || typeof e == "number" || typeof e == "boolean";
|
|
49
|
+
}
|
|
50
|
+
function je(e, t, r, n) {
|
|
51
|
+
var a = ke(n) ? n : r(n), i = t.get(a);
|
|
52
|
+
return typeof i > "u" && (i = e.call(this, n), t.set(a, i)), i;
|
|
53
|
+
}
|
|
54
|
+
function Ee(e, t, r) {
|
|
55
|
+
var n = Array.prototype.slice.call(arguments, 3), a = r(n), i = t.get(a);
|
|
56
|
+
return typeof i > "u" && (i = e.apply(this, n), t.set(a, i)), i;
|
|
57
|
+
}
|
|
58
|
+
function de(e, t, r, n, a) {
|
|
59
|
+
return r.bind(t, e, n, a);
|
|
60
|
+
}
|
|
61
|
+
function Xe(e, t) {
|
|
62
|
+
var r = e.length === 1 ? je : Ee;
|
|
63
|
+
return de(e, this, r, t.cache.create(), t.serializer);
|
|
64
|
+
}
|
|
65
|
+
function We(e, t) {
|
|
66
|
+
return de(e, this, Ee, t.cache.create(), t.serializer);
|
|
67
|
+
}
|
|
68
|
+
var Ze = function() {
|
|
69
|
+
return JSON.stringify(arguments);
|
|
70
|
+
};
|
|
71
|
+
function ee() {
|
|
72
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
73
|
+
}
|
|
74
|
+
ee.prototype.get = function(e) {
|
|
75
|
+
return this.cache[e];
|
|
76
|
+
};
|
|
77
|
+
ee.prototype.set = function(e, t) {
|
|
78
|
+
this.cache[e] = t;
|
|
79
|
+
};
|
|
80
|
+
var ze = {
|
|
81
|
+
create: function() {
|
|
82
|
+
return new ee();
|
|
83
|
+
}
|
|
84
|
+
}, N = {
|
|
85
|
+
variadic: We
|
|
86
|
+
}, g;
|
|
87
|
+
(function(e) {
|
|
88
|
+
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";
|
|
89
|
+
})(g || (g = {}));
|
|
90
|
+
var y;
|
|
91
|
+
(function(e) {
|
|
92
|
+
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";
|
|
93
|
+
})(y || (y = {}));
|
|
94
|
+
var D;
|
|
95
|
+
(function(e) {
|
|
96
|
+
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
97
|
+
})(D || (D = {}));
|
|
98
|
+
function ne(e) {
|
|
99
|
+
return e.type === y.literal;
|
|
100
|
+
}
|
|
101
|
+
function Je(e) {
|
|
102
|
+
return e.type === y.argument;
|
|
103
|
+
}
|
|
104
|
+
function be(e) {
|
|
105
|
+
return e.type === y.number;
|
|
106
|
+
}
|
|
107
|
+
function ye(e) {
|
|
108
|
+
return e.type === y.date;
|
|
109
|
+
}
|
|
110
|
+
function xe(e) {
|
|
111
|
+
return e.type === y.time;
|
|
112
|
+
}
|
|
113
|
+
function Te(e) {
|
|
114
|
+
return e.type === y.select;
|
|
115
|
+
}
|
|
116
|
+
function Se(e) {
|
|
117
|
+
return e.type === y.plural;
|
|
118
|
+
}
|
|
119
|
+
function qe(e) {
|
|
120
|
+
return e.type === y.pound;
|
|
121
|
+
}
|
|
122
|
+
function He(e) {
|
|
123
|
+
return e.type === y.tag;
|
|
124
|
+
}
|
|
125
|
+
function Ie(e) {
|
|
126
|
+
return !!(e && typeof e == "object" && e.type === D.number);
|
|
127
|
+
}
|
|
128
|
+
function J(e) {
|
|
129
|
+
return !!(e && typeof e == "object" && e.type === D.dateTime);
|
|
130
|
+
}
|
|
131
|
+
var Ne = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Qe = /(?:[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;
|
|
132
|
+
function Ye(e) {
|
|
133
|
+
var t = {};
|
|
134
|
+
return e.replace(Qe, function(r) {
|
|
135
|
+
var n = r.length;
|
|
136
|
+
switch (r[0]) {
|
|
137
|
+
case "G":
|
|
138
|
+
t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
|
|
139
|
+
break;
|
|
140
|
+
case "y":
|
|
141
|
+
t.year = n === 2 ? "2-digit" : "numeric";
|
|
142
|
+
break;
|
|
143
|
+
case "Y":
|
|
144
|
+
case "u":
|
|
145
|
+
case "U":
|
|
146
|
+
case "r":
|
|
147
|
+
throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
148
|
+
case "q":
|
|
149
|
+
case "Q":
|
|
150
|
+
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
151
|
+
case "M":
|
|
152
|
+
case "L":
|
|
153
|
+
t.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
|
|
154
|
+
break;
|
|
155
|
+
case "w":
|
|
156
|
+
case "W":
|
|
157
|
+
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
158
|
+
case "d":
|
|
159
|
+
t.day = ["numeric", "2-digit"][n - 1];
|
|
160
|
+
break;
|
|
161
|
+
case "D":
|
|
162
|
+
case "F":
|
|
163
|
+
case "g":
|
|
164
|
+
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
165
|
+
case "E":
|
|
166
|
+
t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
|
|
167
|
+
break;
|
|
168
|
+
case "e":
|
|
169
|
+
if (n < 4)
|
|
170
|
+
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
171
|
+
t.weekday = ["short", "long", "narrow", "short"][n - 4];
|
|
172
|
+
break;
|
|
173
|
+
case "c":
|
|
174
|
+
if (n < 4)
|
|
175
|
+
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
176
|
+
t.weekday = ["short", "long", "narrow", "short"][n - 4];
|
|
177
|
+
break;
|
|
178
|
+
case "a":
|
|
179
|
+
t.hour12 = !0;
|
|
180
|
+
break;
|
|
181
|
+
case "b":
|
|
182
|
+
case "B":
|
|
183
|
+
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
184
|
+
case "h":
|
|
185
|
+
t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
|
|
186
|
+
break;
|
|
187
|
+
case "H":
|
|
188
|
+
t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
|
|
189
|
+
break;
|
|
190
|
+
case "K":
|
|
191
|
+
t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
|
|
192
|
+
break;
|
|
193
|
+
case "k":
|
|
194
|
+
t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
|
|
195
|
+
break;
|
|
196
|
+
case "j":
|
|
197
|
+
case "J":
|
|
198
|
+
case "C":
|
|
199
|
+
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
200
|
+
case "m":
|
|
201
|
+
t.minute = ["numeric", "2-digit"][n - 1];
|
|
202
|
+
break;
|
|
203
|
+
case "s":
|
|
204
|
+
t.second = ["numeric", "2-digit"][n - 1];
|
|
205
|
+
break;
|
|
206
|
+
case "S":
|
|
207
|
+
case "A":
|
|
208
|
+
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
209
|
+
case "z":
|
|
210
|
+
t.timeZoneName = n < 4 ? "short" : "long";
|
|
211
|
+
break;
|
|
212
|
+
case "Z":
|
|
213
|
+
case "O":
|
|
214
|
+
case "v":
|
|
215
|
+
case "V":
|
|
216
|
+
case "X":
|
|
217
|
+
case "x":
|
|
218
|
+
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
|
|
219
|
+
}
|
|
220
|
+
return "";
|
|
221
|
+
}), t;
|
|
222
|
+
}
|
|
223
|
+
var $e = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
224
|
+
function Ke(e) {
|
|
225
|
+
if (e.length === 0)
|
|
226
|
+
throw new Error("Number skeleton cannot be empty");
|
|
227
|
+
for (var t = e.split($e).filter(function(c) {
|
|
228
|
+
return c.length > 0;
|
|
229
|
+
}), r = [], n = 0, a = t; n < a.length; n++) {
|
|
230
|
+
var i = a[n], o = i.split("/");
|
|
231
|
+
if (o.length === 0)
|
|
232
|
+
throw new Error("Invalid number skeleton");
|
|
233
|
+
for (var s = o[0], u = o.slice(1), l = 0, h = u; l < h.length; l++) {
|
|
234
|
+
var m = h[l];
|
|
235
|
+
if (m.length === 0)
|
|
236
|
+
throw new Error("Invalid number skeleton");
|
|
237
|
+
}
|
|
238
|
+
r.push({ stem: s, options: u });
|
|
239
|
+
}
|
|
240
|
+
return r;
|
|
241
|
+
}
|
|
242
|
+
function et(e) {
|
|
243
|
+
return e.replace(/^(.*?)-/, "");
|
|
244
|
+
}
|
|
245
|
+
var ae = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ae = /^(@+)?(\+|#+)?[rs]?$/g, tt = /(\*)(0+)|(#+)(0+)|(0+)/g, Be = /^(0+)$/;
|
|
246
|
+
function ie(e) {
|
|
247
|
+
var t = {};
|
|
248
|
+
return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Ae, function(r, n, a) {
|
|
249
|
+
return typeof a != "string" ? (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length) : a === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof a == "string" ? a.length : 0)), "";
|
|
250
|
+
}), t;
|
|
251
|
+
}
|
|
252
|
+
function _e(e) {
|
|
253
|
+
switch (e) {
|
|
254
|
+
case "sign-auto":
|
|
255
|
+
return {
|
|
256
|
+
signDisplay: "auto"
|
|
257
|
+
};
|
|
258
|
+
case "sign-accounting":
|
|
259
|
+
case "()":
|
|
260
|
+
return {
|
|
261
|
+
currencySign: "accounting"
|
|
262
|
+
};
|
|
263
|
+
case "sign-always":
|
|
264
|
+
case "+!":
|
|
265
|
+
return {
|
|
266
|
+
signDisplay: "always"
|
|
267
|
+
};
|
|
268
|
+
case "sign-accounting-always":
|
|
269
|
+
case "()!":
|
|
270
|
+
return {
|
|
271
|
+
signDisplay: "always",
|
|
272
|
+
currencySign: "accounting"
|
|
273
|
+
};
|
|
274
|
+
case "sign-except-zero":
|
|
275
|
+
case "+?":
|
|
276
|
+
return {
|
|
277
|
+
signDisplay: "exceptZero"
|
|
278
|
+
};
|
|
279
|
+
case "sign-accounting-except-zero":
|
|
280
|
+
case "()?":
|
|
281
|
+
return {
|
|
282
|
+
signDisplay: "exceptZero",
|
|
283
|
+
currencySign: "accounting"
|
|
284
|
+
};
|
|
285
|
+
case "sign-never":
|
|
286
|
+
case "+_":
|
|
287
|
+
return {
|
|
288
|
+
signDisplay: "never"
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function rt(e) {
|
|
293
|
+
var t;
|
|
294
|
+
if (e[0] === "E" && e[1] === "E" ? (t = {
|
|
295
|
+
notation: "engineering"
|
|
296
|
+
}, e = e.slice(2)) : e[0] === "E" && (t = {
|
|
297
|
+
notation: "scientific"
|
|
298
|
+
}, e = e.slice(1)), t) {
|
|
299
|
+
var r = e.slice(0, 2);
|
|
300
|
+
if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Be.test(e))
|
|
301
|
+
throw new Error("Malformed concise eng/scientific notation");
|
|
302
|
+
t.minimumIntegerDigits = e.length;
|
|
303
|
+
}
|
|
304
|
+
return t;
|
|
305
|
+
}
|
|
306
|
+
function oe(e) {
|
|
307
|
+
var t = {}, r = _e(e);
|
|
308
|
+
return r || t;
|
|
309
|
+
}
|
|
310
|
+
function nt(e) {
|
|
311
|
+
for (var t = {}, r = 0, n = e; r < n.length; r++) {
|
|
312
|
+
var a = n[r];
|
|
313
|
+
switch (a.stem) {
|
|
314
|
+
case "percent":
|
|
315
|
+
case "%":
|
|
316
|
+
t.style = "percent";
|
|
317
|
+
continue;
|
|
318
|
+
case "%x100":
|
|
319
|
+
t.style = "percent", t.scale = 100;
|
|
320
|
+
continue;
|
|
321
|
+
case "currency":
|
|
322
|
+
t.style = "currency", t.currency = a.options[0];
|
|
323
|
+
continue;
|
|
324
|
+
case "group-off":
|
|
325
|
+
case ",_":
|
|
326
|
+
t.useGrouping = !1;
|
|
327
|
+
continue;
|
|
328
|
+
case "precision-integer":
|
|
329
|
+
case ".":
|
|
330
|
+
t.maximumFractionDigits = 0;
|
|
331
|
+
continue;
|
|
332
|
+
case "measure-unit":
|
|
333
|
+
case "unit":
|
|
334
|
+
t.style = "unit", t.unit = et(a.options[0]);
|
|
335
|
+
continue;
|
|
336
|
+
case "compact-short":
|
|
337
|
+
case "K":
|
|
338
|
+
t.notation = "compact", t.compactDisplay = "short";
|
|
339
|
+
continue;
|
|
340
|
+
case "compact-long":
|
|
341
|
+
case "KK":
|
|
342
|
+
t.notation = "compact", t.compactDisplay = "long";
|
|
343
|
+
continue;
|
|
344
|
+
case "scientific":
|
|
345
|
+
t = f(f(f({}, t), { notation: "scientific" }), a.options.reduce(function(u, l) {
|
|
346
|
+
return f(f({}, u), oe(l));
|
|
347
|
+
}, {}));
|
|
348
|
+
continue;
|
|
349
|
+
case "engineering":
|
|
350
|
+
t = f(f(f({}, t), { notation: "engineering" }), a.options.reduce(function(u, l) {
|
|
351
|
+
return f(f({}, u), oe(l));
|
|
352
|
+
}, {}));
|
|
353
|
+
continue;
|
|
354
|
+
case "notation-simple":
|
|
355
|
+
t.notation = "standard";
|
|
356
|
+
continue;
|
|
357
|
+
case "unit-width-narrow":
|
|
358
|
+
t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
|
|
359
|
+
continue;
|
|
360
|
+
case "unit-width-short":
|
|
361
|
+
t.currencyDisplay = "code", t.unitDisplay = "short";
|
|
362
|
+
continue;
|
|
363
|
+
case "unit-width-full-name":
|
|
364
|
+
t.currencyDisplay = "name", t.unitDisplay = "long";
|
|
365
|
+
continue;
|
|
366
|
+
case "unit-width-iso-code":
|
|
367
|
+
t.currencyDisplay = "symbol";
|
|
368
|
+
continue;
|
|
369
|
+
case "scale":
|
|
370
|
+
t.scale = parseFloat(a.options[0]);
|
|
371
|
+
continue;
|
|
372
|
+
case "rounding-mode-floor":
|
|
373
|
+
t.roundingMode = "floor";
|
|
374
|
+
continue;
|
|
375
|
+
case "rounding-mode-ceiling":
|
|
376
|
+
t.roundingMode = "ceil";
|
|
377
|
+
continue;
|
|
378
|
+
case "rounding-mode-down":
|
|
379
|
+
t.roundingMode = "trunc";
|
|
380
|
+
continue;
|
|
381
|
+
case "rounding-mode-up":
|
|
382
|
+
t.roundingMode = "expand";
|
|
383
|
+
continue;
|
|
384
|
+
case "rounding-mode-half-even":
|
|
385
|
+
t.roundingMode = "halfEven";
|
|
386
|
+
continue;
|
|
387
|
+
case "rounding-mode-half-down":
|
|
388
|
+
t.roundingMode = "halfTrunc";
|
|
389
|
+
continue;
|
|
390
|
+
case "rounding-mode-half-up":
|
|
391
|
+
t.roundingMode = "halfExpand";
|
|
392
|
+
continue;
|
|
393
|
+
case "integer-width":
|
|
394
|
+
if (a.options.length > 1)
|
|
395
|
+
throw new RangeError("integer-width stems only accept a single optional option");
|
|
396
|
+
a.options[0].replace(tt, function(u, l, h, m, c, b) {
|
|
397
|
+
if (l)
|
|
398
|
+
t.minimumIntegerDigits = h.length;
|
|
399
|
+
else {
|
|
400
|
+
if (m && c)
|
|
401
|
+
throw new Error("We currently do not support maximum integer digits");
|
|
402
|
+
if (b)
|
|
403
|
+
throw new Error("We currently do not support exact integer digits");
|
|
404
|
+
}
|
|
405
|
+
return "";
|
|
406
|
+
});
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (Be.test(a.stem)) {
|
|
410
|
+
t.minimumIntegerDigits = a.stem.length;
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
if (ae.test(a.stem)) {
|
|
414
|
+
if (a.options.length > 1)
|
|
415
|
+
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
416
|
+
a.stem.replace(ae, function(u, l, h, m, c, b) {
|
|
417
|
+
return h === "*" ? t.minimumFractionDigits = l.length : m && m[0] === "#" ? t.maximumFractionDigits = m.length : c && b ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + b.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
|
|
418
|
+
});
|
|
419
|
+
var i = a.options[0];
|
|
420
|
+
i === "w" ? t = f(f({}, t), { trailingZeroDisplay: "stripIfInteger" }) : i && (t = f(f({}, t), ie(i)));
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
if (Ae.test(a.stem)) {
|
|
424
|
+
t = f(f({}, t), ie(a.stem));
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
var o = _e(a.stem);
|
|
428
|
+
o && (t = f(f({}, t), o));
|
|
429
|
+
var s = rt(a.stem);
|
|
430
|
+
s && (t = f(f({}, t), s));
|
|
431
|
+
}
|
|
432
|
+
return t;
|
|
433
|
+
}
|
|
434
|
+
var U = {
|
|
435
|
+
"001": [
|
|
436
|
+
"H",
|
|
437
|
+
"h"
|
|
438
|
+
],
|
|
439
|
+
419: [
|
|
440
|
+
"h",
|
|
441
|
+
"H",
|
|
442
|
+
"hB",
|
|
443
|
+
"hb"
|
|
444
|
+
],
|
|
445
|
+
AC: [
|
|
446
|
+
"H",
|
|
447
|
+
"h",
|
|
448
|
+
"hb",
|
|
449
|
+
"hB"
|
|
450
|
+
],
|
|
451
|
+
AD: [
|
|
452
|
+
"H",
|
|
453
|
+
"hB"
|
|
454
|
+
],
|
|
455
|
+
AE: [
|
|
456
|
+
"h",
|
|
457
|
+
"hB",
|
|
458
|
+
"hb",
|
|
459
|
+
"H"
|
|
460
|
+
],
|
|
461
|
+
AF: [
|
|
462
|
+
"H",
|
|
463
|
+
"hb",
|
|
464
|
+
"hB",
|
|
465
|
+
"h"
|
|
466
|
+
],
|
|
467
|
+
AG: [
|
|
468
|
+
"h",
|
|
469
|
+
"hb",
|
|
470
|
+
"H",
|
|
471
|
+
"hB"
|
|
472
|
+
],
|
|
473
|
+
AI: [
|
|
474
|
+
"H",
|
|
475
|
+
"h",
|
|
476
|
+
"hb",
|
|
477
|
+
"hB"
|
|
478
|
+
],
|
|
479
|
+
AL: [
|
|
480
|
+
"h",
|
|
481
|
+
"H",
|
|
482
|
+
"hB"
|
|
483
|
+
],
|
|
484
|
+
AM: [
|
|
485
|
+
"H",
|
|
486
|
+
"hB"
|
|
487
|
+
],
|
|
488
|
+
AO: [
|
|
489
|
+
"H",
|
|
490
|
+
"hB"
|
|
491
|
+
],
|
|
492
|
+
AR: [
|
|
493
|
+
"h",
|
|
494
|
+
"H",
|
|
495
|
+
"hB",
|
|
496
|
+
"hb"
|
|
497
|
+
],
|
|
498
|
+
AS: [
|
|
499
|
+
"h",
|
|
500
|
+
"H"
|
|
501
|
+
],
|
|
502
|
+
AT: [
|
|
503
|
+
"H",
|
|
504
|
+
"hB"
|
|
505
|
+
],
|
|
506
|
+
AU: [
|
|
507
|
+
"h",
|
|
508
|
+
"hb",
|
|
509
|
+
"H",
|
|
510
|
+
"hB"
|
|
511
|
+
],
|
|
512
|
+
AW: [
|
|
513
|
+
"H",
|
|
514
|
+
"hB"
|
|
515
|
+
],
|
|
516
|
+
AX: [
|
|
517
|
+
"H"
|
|
518
|
+
],
|
|
519
|
+
AZ: [
|
|
520
|
+
"H",
|
|
521
|
+
"hB",
|
|
522
|
+
"h"
|
|
523
|
+
],
|
|
524
|
+
BA: [
|
|
525
|
+
"H",
|
|
526
|
+
"hB",
|
|
527
|
+
"h"
|
|
528
|
+
],
|
|
529
|
+
BB: [
|
|
530
|
+
"h",
|
|
531
|
+
"hb",
|
|
532
|
+
"H",
|
|
533
|
+
"hB"
|
|
534
|
+
],
|
|
535
|
+
BD: [
|
|
536
|
+
"h",
|
|
537
|
+
"hB",
|
|
538
|
+
"H"
|
|
539
|
+
],
|
|
540
|
+
BE: [
|
|
541
|
+
"H",
|
|
542
|
+
"hB"
|
|
543
|
+
],
|
|
544
|
+
BF: [
|
|
545
|
+
"H",
|
|
546
|
+
"hB"
|
|
547
|
+
],
|
|
548
|
+
BG: [
|
|
549
|
+
"H",
|
|
550
|
+
"hB",
|
|
551
|
+
"h"
|
|
552
|
+
],
|
|
553
|
+
BH: [
|
|
554
|
+
"h",
|
|
555
|
+
"hB",
|
|
556
|
+
"hb",
|
|
557
|
+
"H"
|
|
558
|
+
],
|
|
559
|
+
BI: [
|
|
560
|
+
"H",
|
|
561
|
+
"h"
|
|
562
|
+
],
|
|
563
|
+
BJ: [
|
|
564
|
+
"H",
|
|
565
|
+
"hB"
|
|
566
|
+
],
|
|
567
|
+
BL: [
|
|
568
|
+
"H",
|
|
569
|
+
"hB"
|
|
570
|
+
],
|
|
571
|
+
BM: [
|
|
572
|
+
"h",
|
|
573
|
+
"hb",
|
|
574
|
+
"H",
|
|
575
|
+
"hB"
|
|
576
|
+
],
|
|
577
|
+
BN: [
|
|
578
|
+
"hb",
|
|
579
|
+
"hB",
|
|
580
|
+
"h",
|
|
581
|
+
"H"
|
|
582
|
+
],
|
|
583
|
+
BO: [
|
|
584
|
+
"h",
|
|
585
|
+
"H",
|
|
586
|
+
"hB",
|
|
587
|
+
"hb"
|
|
588
|
+
],
|
|
589
|
+
BQ: [
|
|
590
|
+
"H"
|
|
591
|
+
],
|
|
592
|
+
BR: [
|
|
593
|
+
"H",
|
|
594
|
+
"hB"
|
|
595
|
+
],
|
|
596
|
+
BS: [
|
|
597
|
+
"h",
|
|
598
|
+
"hb",
|
|
599
|
+
"H",
|
|
600
|
+
"hB"
|
|
601
|
+
],
|
|
602
|
+
BT: [
|
|
603
|
+
"h",
|
|
604
|
+
"H"
|
|
605
|
+
],
|
|
606
|
+
BW: [
|
|
607
|
+
"H",
|
|
608
|
+
"h",
|
|
609
|
+
"hb",
|
|
610
|
+
"hB"
|
|
611
|
+
],
|
|
612
|
+
BY: [
|
|
613
|
+
"H",
|
|
614
|
+
"h"
|
|
615
|
+
],
|
|
616
|
+
BZ: [
|
|
617
|
+
"H",
|
|
618
|
+
"h",
|
|
619
|
+
"hb",
|
|
620
|
+
"hB"
|
|
621
|
+
],
|
|
622
|
+
CA: [
|
|
623
|
+
"h",
|
|
624
|
+
"hb",
|
|
625
|
+
"H",
|
|
626
|
+
"hB"
|
|
627
|
+
],
|
|
628
|
+
CC: [
|
|
629
|
+
"H",
|
|
630
|
+
"h",
|
|
631
|
+
"hb",
|
|
632
|
+
"hB"
|
|
633
|
+
],
|
|
634
|
+
CD: [
|
|
635
|
+
"hB",
|
|
636
|
+
"H"
|
|
637
|
+
],
|
|
638
|
+
CF: [
|
|
639
|
+
"H",
|
|
640
|
+
"h",
|
|
641
|
+
"hB"
|
|
642
|
+
],
|
|
643
|
+
CG: [
|
|
644
|
+
"H",
|
|
645
|
+
"hB"
|
|
646
|
+
],
|
|
647
|
+
CH: [
|
|
648
|
+
"H",
|
|
649
|
+
"hB",
|
|
650
|
+
"h"
|
|
651
|
+
],
|
|
652
|
+
CI: [
|
|
653
|
+
"H",
|
|
654
|
+
"hB"
|
|
655
|
+
],
|
|
656
|
+
CK: [
|
|
657
|
+
"H",
|
|
658
|
+
"h",
|
|
659
|
+
"hb",
|
|
660
|
+
"hB"
|
|
661
|
+
],
|
|
662
|
+
CL: [
|
|
663
|
+
"h",
|
|
664
|
+
"H",
|
|
665
|
+
"hB",
|
|
666
|
+
"hb"
|
|
667
|
+
],
|
|
668
|
+
CM: [
|
|
669
|
+
"H",
|
|
670
|
+
"h",
|
|
671
|
+
"hB"
|
|
672
|
+
],
|
|
673
|
+
CN: [
|
|
674
|
+
"H",
|
|
675
|
+
"hB",
|
|
676
|
+
"hb",
|
|
677
|
+
"h"
|
|
678
|
+
],
|
|
679
|
+
CO: [
|
|
680
|
+
"h",
|
|
681
|
+
"H",
|
|
682
|
+
"hB",
|
|
683
|
+
"hb"
|
|
684
|
+
],
|
|
685
|
+
CP: [
|
|
686
|
+
"H"
|
|
687
|
+
],
|
|
688
|
+
CR: [
|
|
689
|
+
"h",
|
|
690
|
+
"H",
|
|
691
|
+
"hB",
|
|
692
|
+
"hb"
|
|
693
|
+
],
|
|
694
|
+
CU: [
|
|
695
|
+
"h",
|
|
696
|
+
"H",
|
|
697
|
+
"hB",
|
|
698
|
+
"hb"
|
|
699
|
+
],
|
|
700
|
+
CV: [
|
|
701
|
+
"H",
|
|
702
|
+
"hB"
|
|
703
|
+
],
|
|
704
|
+
CW: [
|
|
705
|
+
"H",
|
|
706
|
+
"hB"
|
|
707
|
+
],
|
|
708
|
+
CX: [
|
|
709
|
+
"H",
|
|
710
|
+
"h",
|
|
711
|
+
"hb",
|
|
712
|
+
"hB"
|
|
713
|
+
],
|
|
714
|
+
CY: [
|
|
715
|
+
"h",
|
|
716
|
+
"H",
|
|
717
|
+
"hb",
|
|
718
|
+
"hB"
|
|
719
|
+
],
|
|
720
|
+
CZ: [
|
|
721
|
+
"H"
|
|
722
|
+
],
|
|
723
|
+
DE: [
|
|
724
|
+
"H",
|
|
725
|
+
"hB"
|
|
726
|
+
],
|
|
727
|
+
DG: [
|
|
728
|
+
"H",
|
|
729
|
+
"h",
|
|
730
|
+
"hb",
|
|
731
|
+
"hB"
|
|
732
|
+
],
|
|
733
|
+
DJ: [
|
|
734
|
+
"h",
|
|
735
|
+
"H"
|
|
736
|
+
],
|
|
737
|
+
DK: [
|
|
738
|
+
"H"
|
|
739
|
+
],
|
|
740
|
+
DM: [
|
|
741
|
+
"h",
|
|
742
|
+
"hb",
|
|
743
|
+
"H",
|
|
744
|
+
"hB"
|
|
745
|
+
],
|
|
746
|
+
DO: [
|
|
747
|
+
"h",
|
|
748
|
+
"H",
|
|
749
|
+
"hB",
|
|
750
|
+
"hb"
|
|
751
|
+
],
|
|
752
|
+
DZ: [
|
|
753
|
+
"h",
|
|
754
|
+
"hB",
|
|
755
|
+
"hb",
|
|
756
|
+
"H"
|
|
757
|
+
],
|
|
758
|
+
EA: [
|
|
759
|
+
"H",
|
|
760
|
+
"h",
|
|
761
|
+
"hB",
|
|
762
|
+
"hb"
|
|
763
|
+
],
|
|
764
|
+
EC: [
|
|
765
|
+
"h",
|
|
766
|
+
"H",
|
|
767
|
+
"hB",
|
|
768
|
+
"hb"
|
|
769
|
+
],
|
|
770
|
+
EE: [
|
|
771
|
+
"H",
|
|
772
|
+
"hB"
|
|
773
|
+
],
|
|
774
|
+
EG: [
|
|
775
|
+
"h",
|
|
776
|
+
"hB",
|
|
777
|
+
"hb",
|
|
778
|
+
"H"
|
|
779
|
+
],
|
|
780
|
+
EH: [
|
|
781
|
+
"h",
|
|
782
|
+
"hB",
|
|
783
|
+
"hb",
|
|
784
|
+
"H"
|
|
785
|
+
],
|
|
786
|
+
ER: [
|
|
787
|
+
"h",
|
|
788
|
+
"H"
|
|
789
|
+
],
|
|
790
|
+
ES: [
|
|
791
|
+
"H",
|
|
792
|
+
"hB",
|
|
793
|
+
"h",
|
|
794
|
+
"hb"
|
|
795
|
+
],
|
|
796
|
+
ET: [
|
|
797
|
+
"hB",
|
|
798
|
+
"hb",
|
|
799
|
+
"h",
|
|
800
|
+
"H"
|
|
801
|
+
],
|
|
802
|
+
FI: [
|
|
803
|
+
"H"
|
|
804
|
+
],
|
|
805
|
+
FJ: [
|
|
806
|
+
"h",
|
|
807
|
+
"hb",
|
|
808
|
+
"H",
|
|
809
|
+
"hB"
|
|
810
|
+
],
|
|
811
|
+
FK: [
|
|
812
|
+
"H",
|
|
813
|
+
"h",
|
|
814
|
+
"hb",
|
|
815
|
+
"hB"
|
|
816
|
+
],
|
|
817
|
+
FM: [
|
|
818
|
+
"h",
|
|
819
|
+
"hb",
|
|
820
|
+
"H",
|
|
821
|
+
"hB"
|
|
822
|
+
],
|
|
823
|
+
FO: [
|
|
824
|
+
"H",
|
|
825
|
+
"h"
|
|
826
|
+
],
|
|
827
|
+
FR: [
|
|
828
|
+
"H",
|
|
829
|
+
"hB"
|
|
830
|
+
],
|
|
831
|
+
GA: [
|
|
832
|
+
"H",
|
|
833
|
+
"hB"
|
|
834
|
+
],
|
|
835
|
+
GB: [
|
|
836
|
+
"H",
|
|
837
|
+
"h",
|
|
838
|
+
"hb",
|
|
839
|
+
"hB"
|
|
840
|
+
],
|
|
841
|
+
GD: [
|
|
842
|
+
"h",
|
|
843
|
+
"hb",
|
|
844
|
+
"H",
|
|
845
|
+
"hB"
|
|
846
|
+
],
|
|
847
|
+
GE: [
|
|
848
|
+
"H",
|
|
849
|
+
"hB",
|
|
850
|
+
"h"
|
|
851
|
+
],
|
|
852
|
+
GF: [
|
|
853
|
+
"H",
|
|
854
|
+
"hB"
|
|
855
|
+
],
|
|
856
|
+
GG: [
|
|
857
|
+
"H",
|
|
858
|
+
"h",
|
|
859
|
+
"hb",
|
|
860
|
+
"hB"
|
|
861
|
+
],
|
|
862
|
+
GH: [
|
|
863
|
+
"h",
|
|
864
|
+
"H"
|
|
865
|
+
],
|
|
866
|
+
GI: [
|
|
867
|
+
"H",
|
|
868
|
+
"h",
|
|
869
|
+
"hb",
|
|
870
|
+
"hB"
|
|
871
|
+
],
|
|
872
|
+
GL: [
|
|
873
|
+
"H",
|
|
874
|
+
"h"
|
|
875
|
+
],
|
|
876
|
+
GM: [
|
|
877
|
+
"h",
|
|
878
|
+
"hb",
|
|
879
|
+
"H",
|
|
880
|
+
"hB"
|
|
881
|
+
],
|
|
882
|
+
GN: [
|
|
883
|
+
"H",
|
|
884
|
+
"hB"
|
|
885
|
+
],
|
|
886
|
+
GP: [
|
|
887
|
+
"H",
|
|
888
|
+
"hB"
|
|
889
|
+
],
|
|
890
|
+
GQ: [
|
|
891
|
+
"H",
|
|
892
|
+
"hB",
|
|
893
|
+
"h",
|
|
894
|
+
"hb"
|
|
895
|
+
],
|
|
896
|
+
GR: [
|
|
897
|
+
"h",
|
|
898
|
+
"H",
|
|
899
|
+
"hb",
|
|
900
|
+
"hB"
|
|
901
|
+
],
|
|
902
|
+
GT: [
|
|
903
|
+
"h",
|
|
904
|
+
"H",
|
|
905
|
+
"hB",
|
|
906
|
+
"hb"
|
|
907
|
+
],
|
|
908
|
+
GU: [
|
|
909
|
+
"h",
|
|
910
|
+
"hb",
|
|
911
|
+
"H",
|
|
912
|
+
"hB"
|
|
913
|
+
],
|
|
914
|
+
GW: [
|
|
915
|
+
"H",
|
|
916
|
+
"hB"
|
|
917
|
+
],
|
|
918
|
+
GY: [
|
|
919
|
+
"h",
|
|
920
|
+
"hb",
|
|
921
|
+
"H",
|
|
922
|
+
"hB"
|
|
923
|
+
],
|
|
924
|
+
HK: [
|
|
925
|
+
"h",
|
|
926
|
+
"hB",
|
|
927
|
+
"hb",
|
|
928
|
+
"H"
|
|
929
|
+
],
|
|
930
|
+
HN: [
|
|
931
|
+
"h",
|
|
932
|
+
"H",
|
|
933
|
+
"hB",
|
|
934
|
+
"hb"
|
|
935
|
+
],
|
|
936
|
+
HR: [
|
|
937
|
+
"H",
|
|
938
|
+
"hB"
|
|
939
|
+
],
|
|
940
|
+
HU: [
|
|
941
|
+
"H",
|
|
942
|
+
"h"
|
|
943
|
+
],
|
|
944
|
+
IC: [
|
|
945
|
+
"H",
|
|
946
|
+
"h",
|
|
947
|
+
"hB",
|
|
948
|
+
"hb"
|
|
949
|
+
],
|
|
950
|
+
ID: [
|
|
951
|
+
"H"
|
|
952
|
+
],
|
|
953
|
+
IE: [
|
|
954
|
+
"H",
|
|
955
|
+
"h",
|
|
956
|
+
"hb",
|
|
957
|
+
"hB"
|
|
958
|
+
],
|
|
959
|
+
IL: [
|
|
960
|
+
"H",
|
|
961
|
+
"hB"
|
|
962
|
+
],
|
|
963
|
+
IM: [
|
|
964
|
+
"H",
|
|
965
|
+
"h",
|
|
966
|
+
"hb",
|
|
967
|
+
"hB"
|
|
968
|
+
],
|
|
969
|
+
IN: [
|
|
970
|
+
"h",
|
|
971
|
+
"H"
|
|
972
|
+
],
|
|
973
|
+
IO: [
|
|
974
|
+
"H",
|
|
975
|
+
"h",
|
|
976
|
+
"hb",
|
|
977
|
+
"hB"
|
|
978
|
+
],
|
|
979
|
+
IQ: [
|
|
980
|
+
"h",
|
|
981
|
+
"hB",
|
|
982
|
+
"hb",
|
|
983
|
+
"H"
|
|
984
|
+
],
|
|
985
|
+
IR: [
|
|
986
|
+
"hB",
|
|
987
|
+
"H"
|
|
988
|
+
],
|
|
989
|
+
IS: [
|
|
990
|
+
"H"
|
|
991
|
+
],
|
|
992
|
+
IT: [
|
|
993
|
+
"H",
|
|
994
|
+
"hB"
|
|
995
|
+
],
|
|
996
|
+
JE: [
|
|
997
|
+
"H",
|
|
998
|
+
"h",
|
|
999
|
+
"hb",
|
|
1000
|
+
"hB"
|
|
1001
|
+
],
|
|
1002
|
+
JM: [
|
|
1003
|
+
"h",
|
|
1004
|
+
"hb",
|
|
1005
|
+
"H",
|
|
1006
|
+
"hB"
|
|
1007
|
+
],
|
|
1008
|
+
JO: [
|
|
1009
|
+
"h",
|
|
1010
|
+
"hB",
|
|
1011
|
+
"hb",
|
|
1012
|
+
"H"
|
|
1013
|
+
],
|
|
1014
|
+
JP: [
|
|
1015
|
+
"H",
|
|
1016
|
+
"K",
|
|
1017
|
+
"h"
|
|
1018
|
+
],
|
|
1019
|
+
KE: [
|
|
1020
|
+
"hB",
|
|
1021
|
+
"hb",
|
|
1022
|
+
"H",
|
|
1023
|
+
"h"
|
|
1024
|
+
],
|
|
1025
|
+
KG: [
|
|
1026
|
+
"H",
|
|
1027
|
+
"h",
|
|
1028
|
+
"hB",
|
|
1029
|
+
"hb"
|
|
1030
|
+
],
|
|
1031
|
+
KH: [
|
|
1032
|
+
"hB",
|
|
1033
|
+
"h",
|
|
1034
|
+
"H",
|
|
1035
|
+
"hb"
|
|
1036
|
+
],
|
|
1037
|
+
KI: [
|
|
1038
|
+
"h",
|
|
1039
|
+
"hb",
|
|
1040
|
+
"H",
|
|
1041
|
+
"hB"
|
|
1042
|
+
],
|
|
1043
|
+
KM: [
|
|
1044
|
+
"H",
|
|
1045
|
+
"h",
|
|
1046
|
+
"hB",
|
|
1047
|
+
"hb"
|
|
1048
|
+
],
|
|
1049
|
+
KN: [
|
|
1050
|
+
"h",
|
|
1051
|
+
"hb",
|
|
1052
|
+
"H",
|
|
1053
|
+
"hB"
|
|
1054
|
+
],
|
|
1055
|
+
KP: [
|
|
1056
|
+
"h",
|
|
1057
|
+
"H",
|
|
1058
|
+
"hB",
|
|
1059
|
+
"hb"
|
|
1060
|
+
],
|
|
1061
|
+
KR: [
|
|
1062
|
+
"h",
|
|
1063
|
+
"H",
|
|
1064
|
+
"hB",
|
|
1065
|
+
"hb"
|
|
1066
|
+
],
|
|
1067
|
+
KW: [
|
|
1068
|
+
"h",
|
|
1069
|
+
"hB",
|
|
1070
|
+
"hb",
|
|
1071
|
+
"H"
|
|
1072
|
+
],
|
|
1073
|
+
KY: [
|
|
1074
|
+
"h",
|
|
1075
|
+
"hb",
|
|
1076
|
+
"H",
|
|
1077
|
+
"hB"
|
|
1078
|
+
],
|
|
1079
|
+
KZ: [
|
|
1080
|
+
"H",
|
|
1081
|
+
"hB"
|
|
1082
|
+
],
|
|
1083
|
+
LA: [
|
|
1084
|
+
"H",
|
|
1085
|
+
"hb",
|
|
1086
|
+
"hB",
|
|
1087
|
+
"h"
|
|
1088
|
+
],
|
|
1089
|
+
LB: [
|
|
1090
|
+
"h",
|
|
1091
|
+
"hB",
|
|
1092
|
+
"hb",
|
|
1093
|
+
"H"
|
|
1094
|
+
],
|
|
1095
|
+
LC: [
|
|
1096
|
+
"h",
|
|
1097
|
+
"hb",
|
|
1098
|
+
"H",
|
|
1099
|
+
"hB"
|
|
1100
|
+
],
|
|
1101
|
+
LI: [
|
|
1102
|
+
"H",
|
|
1103
|
+
"hB",
|
|
1104
|
+
"h"
|
|
1105
|
+
],
|
|
1106
|
+
LK: [
|
|
1107
|
+
"H",
|
|
1108
|
+
"h",
|
|
1109
|
+
"hB",
|
|
1110
|
+
"hb"
|
|
1111
|
+
],
|
|
1112
|
+
LR: [
|
|
1113
|
+
"h",
|
|
1114
|
+
"hb",
|
|
1115
|
+
"H",
|
|
1116
|
+
"hB"
|
|
1117
|
+
],
|
|
1118
|
+
LS: [
|
|
1119
|
+
"h",
|
|
1120
|
+
"H"
|
|
1121
|
+
],
|
|
1122
|
+
LT: [
|
|
1123
|
+
"H",
|
|
1124
|
+
"h",
|
|
1125
|
+
"hb",
|
|
1126
|
+
"hB"
|
|
1127
|
+
],
|
|
1128
|
+
LU: [
|
|
1129
|
+
"H",
|
|
1130
|
+
"h",
|
|
1131
|
+
"hB"
|
|
1132
|
+
],
|
|
1133
|
+
LV: [
|
|
1134
|
+
"H",
|
|
1135
|
+
"hB",
|
|
1136
|
+
"hb",
|
|
1137
|
+
"h"
|
|
1138
|
+
],
|
|
1139
|
+
LY: [
|
|
1140
|
+
"h",
|
|
1141
|
+
"hB",
|
|
1142
|
+
"hb",
|
|
1143
|
+
"H"
|
|
1144
|
+
],
|
|
1145
|
+
MA: [
|
|
1146
|
+
"H",
|
|
1147
|
+
"h",
|
|
1148
|
+
"hB",
|
|
1149
|
+
"hb"
|
|
1150
|
+
],
|
|
1151
|
+
MC: [
|
|
1152
|
+
"H",
|
|
1153
|
+
"hB"
|
|
1154
|
+
],
|
|
1155
|
+
MD: [
|
|
1156
|
+
"H",
|
|
1157
|
+
"hB"
|
|
1158
|
+
],
|
|
1159
|
+
ME: [
|
|
1160
|
+
"H",
|
|
1161
|
+
"hB",
|
|
1162
|
+
"h"
|
|
1163
|
+
],
|
|
1164
|
+
MF: [
|
|
1165
|
+
"H",
|
|
1166
|
+
"hB"
|
|
1167
|
+
],
|
|
1168
|
+
MG: [
|
|
1169
|
+
"H",
|
|
1170
|
+
"h"
|
|
1171
|
+
],
|
|
1172
|
+
MH: [
|
|
1173
|
+
"h",
|
|
1174
|
+
"hb",
|
|
1175
|
+
"H",
|
|
1176
|
+
"hB"
|
|
1177
|
+
],
|
|
1178
|
+
MK: [
|
|
1179
|
+
"H",
|
|
1180
|
+
"h",
|
|
1181
|
+
"hb",
|
|
1182
|
+
"hB"
|
|
1183
|
+
],
|
|
1184
|
+
ML: [
|
|
1185
|
+
"H"
|
|
1186
|
+
],
|
|
1187
|
+
MM: [
|
|
1188
|
+
"hB",
|
|
1189
|
+
"hb",
|
|
1190
|
+
"H",
|
|
1191
|
+
"h"
|
|
1192
|
+
],
|
|
1193
|
+
MN: [
|
|
1194
|
+
"H",
|
|
1195
|
+
"h",
|
|
1196
|
+
"hb",
|
|
1197
|
+
"hB"
|
|
1198
|
+
],
|
|
1199
|
+
MO: [
|
|
1200
|
+
"h",
|
|
1201
|
+
"hB",
|
|
1202
|
+
"hb",
|
|
1203
|
+
"H"
|
|
1204
|
+
],
|
|
1205
|
+
MP: [
|
|
1206
|
+
"h",
|
|
1207
|
+
"hb",
|
|
1208
|
+
"H",
|
|
1209
|
+
"hB"
|
|
1210
|
+
],
|
|
1211
|
+
MQ: [
|
|
1212
|
+
"H",
|
|
1213
|
+
"hB"
|
|
1214
|
+
],
|
|
1215
|
+
MR: [
|
|
1216
|
+
"h",
|
|
1217
|
+
"hB",
|
|
1218
|
+
"hb",
|
|
1219
|
+
"H"
|
|
1220
|
+
],
|
|
1221
|
+
MS: [
|
|
1222
|
+
"H",
|
|
1223
|
+
"h",
|
|
1224
|
+
"hb",
|
|
1225
|
+
"hB"
|
|
1226
|
+
],
|
|
1227
|
+
MT: [
|
|
1228
|
+
"H",
|
|
1229
|
+
"h"
|
|
1230
|
+
],
|
|
1231
|
+
MU: [
|
|
1232
|
+
"H",
|
|
1233
|
+
"h"
|
|
1234
|
+
],
|
|
1235
|
+
MV: [
|
|
1236
|
+
"H",
|
|
1237
|
+
"h"
|
|
1238
|
+
],
|
|
1239
|
+
MW: [
|
|
1240
|
+
"h",
|
|
1241
|
+
"hb",
|
|
1242
|
+
"H",
|
|
1243
|
+
"hB"
|
|
1244
|
+
],
|
|
1245
|
+
MX: [
|
|
1246
|
+
"h",
|
|
1247
|
+
"H",
|
|
1248
|
+
"hB",
|
|
1249
|
+
"hb"
|
|
1250
|
+
],
|
|
1251
|
+
MY: [
|
|
1252
|
+
"hb",
|
|
1253
|
+
"hB",
|
|
1254
|
+
"h",
|
|
1255
|
+
"H"
|
|
1256
|
+
],
|
|
1257
|
+
MZ: [
|
|
1258
|
+
"H",
|
|
1259
|
+
"hB"
|
|
1260
|
+
],
|
|
1261
|
+
NA: [
|
|
1262
|
+
"h",
|
|
1263
|
+
"H",
|
|
1264
|
+
"hB",
|
|
1265
|
+
"hb"
|
|
1266
|
+
],
|
|
1267
|
+
NC: [
|
|
1268
|
+
"H",
|
|
1269
|
+
"hB"
|
|
1270
|
+
],
|
|
1271
|
+
NE: [
|
|
1272
|
+
"H"
|
|
1273
|
+
],
|
|
1274
|
+
NF: [
|
|
1275
|
+
"H",
|
|
1276
|
+
"h",
|
|
1277
|
+
"hb",
|
|
1278
|
+
"hB"
|
|
1279
|
+
],
|
|
1280
|
+
NG: [
|
|
1281
|
+
"H",
|
|
1282
|
+
"h",
|
|
1283
|
+
"hb",
|
|
1284
|
+
"hB"
|
|
1285
|
+
],
|
|
1286
|
+
NI: [
|
|
1287
|
+
"h",
|
|
1288
|
+
"H",
|
|
1289
|
+
"hB",
|
|
1290
|
+
"hb"
|
|
1291
|
+
],
|
|
1292
|
+
NL: [
|
|
1293
|
+
"H",
|
|
1294
|
+
"hB"
|
|
1295
|
+
],
|
|
1296
|
+
NO: [
|
|
1297
|
+
"H",
|
|
1298
|
+
"h"
|
|
1299
|
+
],
|
|
1300
|
+
NP: [
|
|
1301
|
+
"H",
|
|
1302
|
+
"h",
|
|
1303
|
+
"hB"
|
|
1304
|
+
],
|
|
1305
|
+
NR: [
|
|
1306
|
+
"H",
|
|
1307
|
+
"h",
|
|
1308
|
+
"hb",
|
|
1309
|
+
"hB"
|
|
1310
|
+
],
|
|
1311
|
+
NU: [
|
|
1312
|
+
"H",
|
|
1313
|
+
"h",
|
|
1314
|
+
"hb",
|
|
1315
|
+
"hB"
|
|
1316
|
+
],
|
|
1317
|
+
NZ: [
|
|
1318
|
+
"h",
|
|
1319
|
+
"hb",
|
|
1320
|
+
"H",
|
|
1321
|
+
"hB"
|
|
1322
|
+
],
|
|
1323
|
+
OM: [
|
|
1324
|
+
"h",
|
|
1325
|
+
"hB",
|
|
1326
|
+
"hb",
|
|
1327
|
+
"H"
|
|
1328
|
+
],
|
|
1329
|
+
PA: [
|
|
1330
|
+
"h",
|
|
1331
|
+
"H",
|
|
1332
|
+
"hB",
|
|
1333
|
+
"hb"
|
|
1334
|
+
],
|
|
1335
|
+
PE: [
|
|
1336
|
+
"h",
|
|
1337
|
+
"H",
|
|
1338
|
+
"hB",
|
|
1339
|
+
"hb"
|
|
1340
|
+
],
|
|
1341
|
+
PF: [
|
|
1342
|
+
"H",
|
|
1343
|
+
"h",
|
|
1344
|
+
"hB"
|
|
1345
|
+
],
|
|
1346
|
+
PG: [
|
|
1347
|
+
"h",
|
|
1348
|
+
"H"
|
|
1349
|
+
],
|
|
1350
|
+
PH: [
|
|
1351
|
+
"h",
|
|
1352
|
+
"hB",
|
|
1353
|
+
"hb",
|
|
1354
|
+
"H"
|
|
1355
|
+
],
|
|
1356
|
+
PK: [
|
|
1357
|
+
"h",
|
|
1358
|
+
"hB",
|
|
1359
|
+
"H"
|
|
1360
|
+
],
|
|
1361
|
+
PL: [
|
|
1362
|
+
"H",
|
|
1363
|
+
"h"
|
|
1364
|
+
],
|
|
1365
|
+
PM: [
|
|
1366
|
+
"H",
|
|
1367
|
+
"hB"
|
|
1368
|
+
],
|
|
1369
|
+
PN: [
|
|
1370
|
+
"H",
|
|
1371
|
+
"h",
|
|
1372
|
+
"hb",
|
|
1373
|
+
"hB"
|
|
1374
|
+
],
|
|
1375
|
+
PR: [
|
|
1376
|
+
"h",
|
|
1377
|
+
"H",
|
|
1378
|
+
"hB",
|
|
1379
|
+
"hb"
|
|
1380
|
+
],
|
|
1381
|
+
PS: [
|
|
1382
|
+
"h",
|
|
1383
|
+
"hB",
|
|
1384
|
+
"hb",
|
|
1385
|
+
"H"
|
|
1386
|
+
],
|
|
1387
|
+
PT: [
|
|
1388
|
+
"H",
|
|
1389
|
+
"hB"
|
|
1390
|
+
],
|
|
1391
|
+
PW: [
|
|
1392
|
+
"h",
|
|
1393
|
+
"H"
|
|
1394
|
+
],
|
|
1395
|
+
PY: [
|
|
1396
|
+
"h",
|
|
1397
|
+
"H",
|
|
1398
|
+
"hB",
|
|
1399
|
+
"hb"
|
|
1400
|
+
],
|
|
1401
|
+
QA: [
|
|
1402
|
+
"h",
|
|
1403
|
+
"hB",
|
|
1404
|
+
"hb",
|
|
1405
|
+
"H"
|
|
1406
|
+
],
|
|
1407
|
+
RE: [
|
|
1408
|
+
"H",
|
|
1409
|
+
"hB"
|
|
1410
|
+
],
|
|
1411
|
+
RO: [
|
|
1412
|
+
"H",
|
|
1413
|
+
"hB"
|
|
1414
|
+
],
|
|
1415
|
+
RS: [
|
|
1416
|
+
"H",
|
|
1417
|
+
"hB",
|
|
1418
|
+
"h"
|
|
1419
|
+
],
|
|
1420
|
+
RU: [
|
|
1421
|
+
"H"
|
|
1422
|
+
],
|
|
1423
|
+
RW: [
|
|
1424
|
+
"H",
|
|
1425
|
+
"h"
|
|
1426
|
+
],
|
|
1427
|
+
SA: [
|
|
1428
|
+
"h",
|
|
1429
|
+
"hB",
|
|
1430
|
+
"hb",
|
|
1431
|
+
"H"
|
|
1432
|
+
],
|
|
1433
|
+
SB: [
|
|
1434
|
+
"h",
|
|
1435
|
+
"hb",
|
|
1436
|
+
"H",
|
|
1437
|
+
"hB"
|
|
1438
|
+
],
|
|
1439
|
+
SC: [
|
|
1440
|
+
"H",
|
|
1441
|
+
"h",
|
|
1442
|
+
"hB"
|
|
1443
|
+
],
|
|
1444
|
+
SD: [
|
|
1445
|
+
"h",
|
|
1446
|
+
"hB",
|
|
1447
|
+
"hb",
|
|
1448
|
+
"H"
|
|
1449
|
+
],
|
|
1450
|
+
SE: [
|
|
1451
|
+
"H"
|
|
1452
|
+
],
|
|
1453
|
+
SG: [
|
|
1454
|
+
"h",
|
|
1455
|
+
"hb",
|
|
1456
|
+
"H",
|
|
1457
|
+
"hB"
|
|
1458
|
+
],
|
|
1459
|
+
SH: [
|
|
1460
|
+
"H",
|
|
1461
|
+
"h",
|
|
1462
|
+
"hb",
|
|
1463
|
+
"hB"
|
|
1464
|
+
],
|
|
1465
|
+
SI: [
|
|
1466
|
+
"H",
|
|
1467
|
+
"hB"
|
|
1468
|
+
],
|
|
1469
|
+
SJ: [
|
|
1470
|
+
"H"
|
|
1471
|
+
],
|
|
1472
|
+
SK: [
|
|
1473
|
+
"H"
|
|
1474
|
+
],
|
|
1475
|
+
SL: [
|
|
1476
|
+
"h",
|
|
1477
|
+
"hb",
|
|
1478
|
+
"H",
|
|
1479
|
+
"hB"
|
|
1480
|
+
],
|
|
1481
|
+
SM: [
|
|
1482
|
+
"H",
|
|
1483
|
+
"h",
|
|
1484
|
+
"hB"
|
|
1485
|
+
],
|
|
1486
|
+
SN: [
|
|
1487
|
+
"H",
|
|
1488
|
+
"h",
|
|
1489
|
+
"hB"
|
|
1490
|
+
],
|
|
1491
|
+
SO: [
|
|
1492
|
+
"h",
|
|
1493
|
+
"H"
|
|
1494
|
+
],
|
|
1495
|
+
SR: [
|
|
1496
|
+
"H",
|
|
1497
|
+
"hB"
|
|
1498
|
+
],
|
|
1499
|
+
SS: [
|
|
1500
|
+
"h",
|
|
1501
|
+
"hb",
|
|
1502
|
+
"H",
|
|
1503
|
+
"hB"
|
|
1504
|
+
],
|
|
1505
|
+
ST: [
|
|
1506
|
+
"H",
|
|
1507
|
+
"hB"
|
|
1508
|
+
],
|
|
1509
|
+
SV: [
|
|
1510
|
+
"h",
|
|
1511
|
+
"H",
|
|
1512
|
+
"hB",
|
|
1513
|
+
"hb"
|
|
1514
|
+
],
|
|
1515
|
+
SX: [
|
|
1516
|
+
"H",
|
|
1517
|
+
"h",
|
|
1518
|
+
"hb",
|
|
1519
|
+
"hB"
|
|
1520
|
+
],
|
|
1521
|
+
SY: [
|
|
1522
|
+
"h",
|
|
1523
|
+
"hB",
|
|
1524
|
+
"hb",
|
|
1525
|
+
"H"
|
|
1526
|
+
],
|
|
1527
|
+
SZ: [
|
|
1528
|
+
"h",
|
|
1529
|
+
"hb",
|
|
1530
|
+
"H",
|
|
1531
|
+
"hB"
|
|
1532
|
+
],
|
|
1533
|
+
TA: [
|
|
1534
|
+
"H",
|
|
1535
|
+
"h",
|
|
1536
|
+
"hb",
|
|
1537
|
+
"hB"
|
|
1538
|
+
],
|
|
1539
|
+
TC: [
|
|
1540
|
+
"h",
|
|
1541
|
+
"hb",
|
|
1542
|
+
"H",
|
|
1543
|
+
"hB"
|
|
1544
|
+
],
|
|
1545
|
+
TD: [
|
|
1546
|
+
"h",
|
|
1547
|
+
"H",
|
|
1548
|
+
"hB"
|
|
1549
|
+
],
|
|
1550
|
+
TF: [
|
|
1551
|
+
"H",
|
|
1552
|
+
"h",
|
|
1553
|
+
"hB"
|
|
1554
|
+
],
|
|
1555
|
+
TG: [
|
|
1556
|
+
"H",
|
|
1557
|
+
"hB"
|
|
1558
|
+
],
|
|
1559
|
+
TH: [
|
|
1560
|
+
"H",
|
|
1561
|
+
"h"
|
|
1562
|
+
],
|
|
1563
|
+
TJ: [
|
|
1564
|
+
"H",
|
|
1565
|
+
"h"
|
|
1566
|
+
],
|
|
1567
|
+
TL: [
|
|
1568
|
+
"H",
|
|
1569
|
+
"hB",
|
|
1570
|
+
"hb",
|
|
1571
|
+
"h"
|
|
1572
|
+
],
|
|
1573
|
+
TM: [
|
|
1574
|
+
"H",
|
|
1575
|
+
"h"
|
|
1576
|
+
],
|
|
1577
|
+
TN: [
|
|
1578
|
+
"h",
|
|
1579
|
+
"hB",
|
|
1580
|
+
"hb",
|
|
1581
|
+
"H"
|
|
1582
|
+
],
|
|
1583
|
+
TO: [
|
|
1584
|
+
"h",
|
|
1585
|
+
"H"
|
|
1586
|
+
],
|
|
1587
|
+
TR: [
|
|
1588
|
+
"H",
|
|
1589
|
+
"hB"
|
|
1590
|
+
],
|
|
1591
|
+
TT: [
|
|
1592
|
+
"h",
|
|
1593
|
+
"hb",
|
|
1594
|
+
"H",
|
|
1595
|
+
"hB"
|
|
1596
|
+
],
|
|
1597
|
+
TW: [
|
|
1598
|
+
"hB",
|
|
1599
|
+
"hb",
|
|
1600
|
+
"h",
|
|
1601
|
+
"H"
|
|
1602
|
+
],
|
|
1603
|
+
TZ: [
|
|
1604
|
+
"hB",
|
|
1605
|
+
"hb",
|
|
1606
|
+
"H",
|
|
1607
|
+
"h"
|
|
1608
|
+
],
|
|
1609
|
+
UA: [
|
|
1610
|
+
"H",
|
|
1611
|
+
"hB",
|
|
1612
|
+
"h"
|
|
1613
|
+
],
|
|
1614
|
+
UG: [
|
|
1615
|
+
"hB",
|
|
1616
|
+
"hb",
|
|
1617
|
+
"H",
|
|
1618
|
+
"h"
|
|
1619
|
+
],
|
|
1620
|
+
UM: [
|
|
1621
|
+
"h",
|
|
1622
|
+
"hb",
|
|
1623
|
+
"H",
|
|
1624
|
+
"hB"
|
|
1625
|
+
],
|
|
1626
|
+
US: [
|
|
1627
|
+
"h",
|
|
1628
|
+
"hb",
|
|
1629
|
+
"H",
|
|
1630
|
+
"hB"
|
|
1631
|
+
],
|
|
1632
|
+
UY: [
|
|
1633
|
+
"h",
|
|
1634
|
+
"H",
|
|
1635
|
+
"hB",
|
|
1636
|
+
"hb"
|
|
1637
|
+
],
|
|
1638
|
+
UZ: [
|
|
1639
|
+
"H",
|
|
1640
|
+
"hB",
|
|
1641
|
+
"h"
|
|
1642
|
+
],
|
|
1643
|
+
VA: [
|
|
1644
|
+
"H",
|
|
1645
|
+
"h",
|
|
1646
|
+
"hB"
|
|
1647
|
+
],
|
|
1648
|
+
VC: [
|
|
1649
|
+
"h",
|
|
1650
|
+
"hb",
|
|
1651
|
+
"H",
|
|
1652
|
+
"hB"
|
|
1653
|
+
],
|
|
1654
|
+
VE: [
|
|
1655
|
+
"h",
|
|
1656
|
+
"H",
|
|
1657
|
+
"hB",
|
|
1658
|
+
"hb"
|
|
1659
|
+
],
|
|
1660
|
+
VG: [
|
|
1661
|
+
"h",
|
|
1662
|
+
"hb",
|
|
1663
|
+
"H",
|
|
1664
|
+
"hB"
|
|
1665
|
+
],
|
|
1666
|
+
VI: [
|
|
1667
|
+
"h",
|
|
1668
|
+
"hb",
|
|
1669
|
+
"H",
|
|
1670
|
+
"hB"
|
|
1671
|
+
],
|
|
1672
|
+
VN: [
|
|
1673
|
+
"H",
|
|
1674
|
+
"h"
|
|
1675
|
+
],
|
|
1676
|
+
VU: [
|
|
1677
|
+
"h",
|
|
1678
|
+
"H"
|
|
1679
|
+
],
|
|
1680
|
+
WF: [
|
|
1681
|
+
"H",
|
|
1682
|
+
"hB"
|
|
1683
|
+
],
|
|
1684
|
+
WS: [
|
|
1685
|
+
"h",
|
|
1686
|
+
"H"
|
|
1687
|
+
],
|
|
1688
|
+
XK: [
|
|
1689
|
+
"H",
|
|
1690
|
+
"hB",
|
|
1691
|
+
"h"
|
|
1692
|
+
],
|
|
1693
|
+
YE: [
|
|
1694
|
+
"h",
|
|
1695
|
+
"hB",
|
|
1696
|
+
"hb",
|
|
1697
|
+
"H"
|
|
1698
|
+
],
|
|
1699
|
+
YT: [
|
|
1700
|
+
"H",
|
|
1701
|
+
"hB"
|
|
1702
|
+
],
|
|
1703
|
+
ZA: [
|
|
1704
|
+
"H",
|
|
1705
|
+
"h",
|
|
1706
|
+
"hb",
|
|
1707
|
+
"hB"
|
|
1708
|
+
],
|
|
1709
|
+
ZM: [
|
|
1710
|
+
"h",
|
|
1711
|
+
"hb",
|
|
1712
|
+
"H",
|
|
1713
|
+
"hB"
|
|
1714
|
+
],
|
|
1715
|
+
ZW: [
|
|
1716
|
+
"H",
|
|
1717
|
+
"h"
|
|
1718
|
+
],
|
|
1719
|
+
"af-ZA": [
|
|
1720
|
+
"H",
|
|
1721
|
+
"h",
|
|
1722
|
+
"hB",
|
|
1723
|
+
"hb"
|
|
1724
|
+
],
|
|
1725
|
+
"ar-001": [
|
|
1726
|
+
"h",
|
|
1727
|
+
"hB",
|
|
1728
|
+
"hb",
|
|
1729
|
+
"H"
|
|
1730
|
+
],
|
|
1731
|
+
"ca-ES": [
|
|
1732
|
+
"H",
|
|
1733
|
+
"h",
|
|
1734
|
+
"hB"
|
|
1735
|
+
],
|
|
1736
|
+
"en-001": [
|
|
1737
|
+
"h",
|
|
1738
|
+
"hb",
|
|
1739
|
+
"H",
|
|
1740
|
+
"hB"
|
|
1741
|
+
],
|
|
1742
|
+
"en-HK": [
|
|
1743
|
+
"h",
|
|
1744
|
+
"hb",
|
|
1745
|
+
"H",
|
|
1746
|
+
"hB"
|
|
1747
|
+
],
|
|
1748
|
+
"en-IL": [
|
|
1749
|
+
"H",
|
|
1750
|
+
"h",
|
|
1751
|
+
"hb",
|
|
1752
|
+
"hB"
|
|
1753
|
+
],
|
|
1754
|
+
"en-MY": [
|
|
1755
|
+
"h",
|
|
1756
|
+
"hb",
|
|
1757
|
+
"H",
|
|
1758
|
+
"hB"
|
|
1759
|
+
],
|
|
1760
|
+
"es-BR": [
|
|
1761
|
+
"H",
|
|
1762
|
+
"h",
|
|
1763
|
+
"hB",
|
|
1764
|
+
"hb"
|
|
1765
|
+
],
|
|
1766
|
+
"es-ES": [
|
|
1767
|
+
"H",
|
|
1768
|
+
"h",
|
|
1769
|
+
"hB",
|
|
1770
|
+
"hb"
|
|
1771
|
+
],
|
|
1772
|
+
"es-GQ": [
|
|
1773
|
+
"H",
|
|
1774
|
+
"h",
|
|
1775
|
+
"hB",
|
|
1776
|
+
"hb"
|
|
1777
|
+
],
|
|
1778
|
+
"fr-CA": [
|
|
1779
|
+
"H",
|
|
1780
|
+
"h",
|
|
1781
|
+
"hB"
|
|
1782
|
+
],
|
|
1783
|
+
"gl-ES": [
|
|
1784
|
+
"H",
|
|
1785
|
+
"h",
|
|
1786
|
+
"hB"
|
|
1787
|
+
],
|
|
1788
|
+
"gu-IN": [
|
|
1789
|
+
"hB",
|
|
1790
|
+
"hb",
|
|
1791
|
+
"h",
|
|
1792
|
+
"H"
|
|
1793
|
+
],
|
|
1794
|
+
"hi-IN": [
|
|
1795
|
+
"hB",
|
|
1796
|
+
"h",
|
|
1797
|
+
"H"
|
|
1798
|
+
],
|
|
1799
|
+
"it-CH": [
|
|
1800
|
+
"H",
|
|
1801
|
+
"h",
|
|
1802
|
+
"hB"
|
|
1803
|
+
],
|
|
1804
|
+
"it-IT": [
|
|
1805
|
+
"H",
|
|
1806
|
+
"h",
|
|
1807
|
+
"hB"
|
|
1808
|
+
],
|
|
1809
|
+
"kn-IN": [
|
|
1810
|
+
"hB",
|
|
1811
|
+
"h",
|
|
1812
|
+
"H"
|
|
1813
|
+
],
|
|
1814
|
+
"ml-IN": [
|
|
1815
|
+
"hB",
|
|
1816
|
+
"h",
|
|
1817
|
+
"H"
|
|
1818
|
+
],
|
|
1819
|
+
"mr-IN": [
|
|
1820
|
+
"hB",
|
|
1821
|
+
"hb",
|
|
1822
|
+
"h",
|
|
1823
|
+
"H"
|
|
1824
|
+
],
|
|
1825
|
+
"pa-IN": [
|
|
1826
|
+
"hB",
|
|
1827
|
+
"hb",
|
|
1828
|
+
"h",
|
|
1829
|
+
"H"
|
|
1830
|
+
],
|
|
1831
|
+
"ta-IN": [
|
|
1832
|
+
"hB",
|
|
1833
|
+
"h",
|
|
1834
|
+
"hb",
|
|
1835
|
+
"H"
|
|
1836
|
+
],
|
|
1837
|
+
"te-IN": [
|
|
1838
|
+
"hB",
|
|
1839
|
+
"h",
|
|
1840
|
+
"H"
|
|
1841
|
+
],
|
|
1842
|
+
"zu-ZA": [
|
|
1843
|
+
"H",
|
|
1844
|
+
"hB",
|
|
1845
|
+
"hb",
|
|
1846
|
+
"h"
|
|
1847
|
+
]
|
|
1848
|
+
};
|
|
1849
|
+
function at(e, t) {
|
|
1850
|
+
for (var r = "", n = 0; n < e.length; n++) {
|
|
1851
|
+
var a = e.charAt(n);
|
|
1852
|
+
if (a === "j") {
|
|
1853
|
+
for (var i = 0; n + 1 < e.length && e.charAt(n + 1) === a; )
|
|
1854
|
+
i++, n++;
|
|
1855
|
+
var o = 1 + (i & 1), s = i < 2 ? 1 : 3 + (i >> 1), u = "a", l = it(t);
|
|
1856
|
+
for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
|
|
1857
|
+
r += u;
|
|
1858
|
+
for (; o-- > 0; )
|
|
1859
|
+
r = l + r;
|
|
1860
|
+
} else a === "J" ? r += "H" : r += a;
|
|
1861
|
+
}
|
|
1862
|
+
return r;
|
|
1863
|
+
}
|
|
1864
|
+
function it(e) {
|
|
1865
|
+
var t = e.hourCycle;
|
|
1866
|
+
if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
|
|
1867
|
+
e.hourCycles && // @ts-ignore
|
|
1868
|
+
e.hourCycles.length && (t = e.hourCycles[0]), t)
|
|
1869
|
+
switch (t) {
|
|
1870
|
+
case "h24":
|
|
1871
|
+
return "k";
|
|
1872
|
+
case "h23":
|
|
1873
|
+
return "H";
|
|
1874
|
+
case "h12":
|
|
1875
|
+
return "h";
|
|
1876
|
+
case "h11":
|
|
1877
|
+
return "K";
|
|
1878
|
+
default:
|
|
1879
|
+
throw new Error("Invalid hourCycle");
|
|
1880
|
+
}
|
|
1881
|
+
var r = e.language, n;
|
|
1882
|
+
r !== "root" && (n = e.maximize().region);
|
|
1883
|
+
var a = U[n || ""] || U[r || ""] || U["".concat(r, "-001")] || U["001"];
|
|
1884
|
+
return a[0];
|
|
1885
|
+
}
|
|
1886
|
+
var X, ot = new RegExp("^".concat(Ne.source, "*")), st = new RegExp("".concat(Ne.source, "*$"));
|
|
1887
|
+
function v(e, t) {
|
|
1888
|
+
return { start: e, end: t };
|
|
1889
|
+
}
|
|
1890
|
+
var ut = !!String.prototype.startsWith && "_a".startsWith("a", 1), ht = !!String.fromCodePoint, lt = !!Object.fromEntries, ft = !!String.prototype.codePointAt, mt = !!String.prototype.trimStart, ct = !!String.prototype.trimEnd, gt = !!Number.isSafeInteger, pt = gt ? Number.isSafeInteger : function(e) {
|
|
1891
|
+
return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
|
|
1892
|
+
}, q = !0;
|
|
1893
|
+
try {
|
|
1894
|
+
var vt = Le("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1895
|
+
q = ((X = vt.exec("a")) === null || X === void 0 ? void 0 : X[0]) === "a";
|
|
1896
|
+
} catch {
|
|
1897
|
+
q = !1;
|
|
1898
|
+
}
|
|
1899
|
+
var se = ut ? (
|
|
1900
|
+
// Native
|
|
1901
|
+
function(t, r, n) {
|
|
1902
|
+
return t.startsWith(r, n);
|
|
1903
|
+
}
|
|
1904
|
+
) : (
|
|
1905
|
+
// For IE11
|
|
1906
|
+
function(t, r, n) {
|
|
1907
|
+
return t.slice(n, n + r.length) === r;
|
|
1908
|
+
}
|
|
1909
|
+
), Q = ht ? String.fromCodePoint : (
|
|
1910
|
+
// IE11
|
|
1911
|
+
function() {
|
|
1912
|
+
for (var t = [], r = 0; r < arguments.length; r++)
|
|
1913
|
+
t[r] = arguments[r];
|
|
1914
|
+
for (var n = "", a = t.length, i = 0, o; a > i; ) {
|
|
1915
|
+
if (o = t[i++], o > 1114111)
|
|
1916
|
+
throw RangeError(o + " is not a valid code point");
|
|
1917
|
+
n += o < 65536 ? String.fromCharCode(o) : String.fromCharCode(((o -= 65536) >> 10) + 55296, o % 1024 + 56320);
|
|
1918
|
+
}
|
|
1919
|
+
return n;
|
|
1920
|
+
}
|
|
1921
|
+
), ue = (
|
|
1922
|
+
// native
|
|
1923
|
+
lt ? Object.fromEntries : (
|
|
1924
|
+
// Ponyfill
|
|
1925
|
+
function(t) {
|
|
1926
|
+
for (var r = {}, n = 0, a = t; n < a.length; n++) {
|
|
1927
|
+
var i = a[n], o = i[0], s = i[1];
|
|
1928
|
+
r[o] = s;
|
|
1929
|
+
}
|
|
1930
|
+
return r;
|
|
1931
|
+
}
|
|
1932
|
+
)
|
|
1933
|
+
), Pe = ft ? (
|
|
1934
|
+
// Native
|
|
1935
|
+
function(t, r) {
|
|
1936
|
+
return t.codePointAt(r);
|
|
1937
|
+
}
|
|
1938
|
+
) : (
|
|
1939
|
+
// IE 11
|
|
1940
|
+
function(t, r) {
|
|
1941
|
+
var n = t.length;
|
|
1942
|
+
if (!(r < 0 || r >= n)) {
|
|
1943
|
+
var a = t.charCodeAt(r), i;
|
|
1944
|
+
return a < 55296 || a > 56319 || r + 1 === n || (i = t.charCodeAt(r + 1)) < 56320 || i > 57343 ? a : (a - 55296 << 10) + (i - 56320) + 65536;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
), Et = mt ? (
|
|
1948
|
+
// Native
|
|
1949
|
+
function(t) {
|
|
1950
|
+
return t.trimStart();
|
|
1951
|
+
}
|
|
1952
|
+
) : (
|
|
1953
|
+
// Ponyfill
|
|
1954
|
+
function(t) {
|
|
1955
|
+
return t.replace(ot, "");
|
|
1956
|
+
}
|
|
1957
|
+
), dt = ct ? (
|
|
1958
|
+
// Native
|
|
1959
|
+
function(t) {
|
|
1960
|
+
return t.trimEnd();
|
|
1961
|
+
}
|
|
1962
|
+
) : (
|
|
1963
|
+
// Ponyfill
|
|
1964
|
+
function(t) {
|
|
1965
|
+
return t.replace(st, "");
|
|
1966
|
+
}
|
|
1967
|
+
);
|
|
1968
|
+
function Le(e, t) {
|
|
1969
|
+
return new RegExp(e, t);
|
|
1970
|
+
}
|
|
1971
|
+
var Y;
|
|
1972
|
+
if (q) {
|
|
1973
|
+
var he = Le("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1974
|
+
Y = function(t, r) {
|
|
1975
|
+
var n;
|
|
1976
|
+
he.lastIndex = r;
|
|
1977
|
+
var a = he.exec(t);
|
|
1978
|
+
return (n = a[1]) !== null && n !== void 0 ? n : "";
|
|
1979
|
+
};
|
|
1980
|
+
} else
|
|
1981
|
+
Y = function(t, r) {
|
|
1982
|
+
for (var n = []; ; ) {
|
|
1983
|
+
var a = Pe(t, r);
|
|
1984
|
+
if (a === void 0 || Re(a) || Tt(a))
|
|
1985
|
+
break;
|
|
1986
|
+
n.push(a), r += a >= 65536 ? 2 : 1;
|
|
1987
|
+
}
|
|
1988
|
+
return Q.apply(void 0, n);
|
|
1989
|
+
};
|
|
1990
|
+
var bt = (
|
|
1991
|
+
/** @class */
|
|
1992
|
+
function() {
|
|
1993
|
+
function e(t, r) {
|
|
1994
|
+
r === void 0 && (r = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!r.ignoreTag, this.locale = r.locale, this.requiresOtherClause = !!r.requiresOtherClause, this.shouldParseSkeletons = !!r.shouldParseSkeletons;
|
|
1995
|
+
}
|
|
1996
|
+
return e.prototype.parse = function() {
|
|
1997
|
+
if (this.offset() !== 0)
|
|
1998
|
+
throw Error("parser can only be used once");
|
|
1999
|
+
return this.parseMessage(0, "", !1);
|
|
2000
|
+
}, e.prototype.parseMessage = function(t, r, n) {
|
|
2001
|
+
for (var a = []; !this.isEOF(); ) {
|
|
2002
|
+
var i = this.char();
|
|
2003
|
+
if (i === 123) {
|
|
2004
|
+
var o = this.parseArgument(t, n);
|
|
2005
|
+
if (o.err)
|
|
2006
|
+
return o;
|
|
2007
|
+
a.push(o.val);
|
|
2008
|
+
} else {
|
|
2009
|
+
if (i === 125 && t > 0)
|
|
2010
|
+
break;
|
|
2011
|
+
if (i === 35 && (r === "plural" || r === "selectordinal")) {
|
|
2012
|
+
var s = this.clonePosition();
|
|
2013
|
+
this.bump(), a.push({
|
|
2014
|
+
type: y.pound,
|
|
2015
|
+
location: v(s, this.clonePosition())
|
|
2016
|
+
});
|
|
2017
|
+
} else if (i === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2018
|
+
if (n)
|
|
2019
|
+
break;
|
|
2020
|
+
return this.error(g.UNMATCHED_CLOSING_TAG, v(this.clonePosition(), this.clonePosition()));
|
|
2021
|
+
} else if (i === 60 && !this.ignoreTag && $(this.peek() || 0)) {
|
|
2022
|
+
var o = this.parseTag(t, r);
|
|
2023
|
+
if (o.err)
|
|
2024
|
+
return o;
|
|
2025
|
+
a.push(o.val);
|
|
2026
|
+
} else {
|
|
2027
|
+
var o = this.parseLiteral(t, r);
|
|
2028
|
+
if (o.err)
|
|
2029
|
+
return o;
|
|
2030
|
+
a.push(o.val);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
return { val: a, err: null };
|
|
2035
|
+
}, e.prototype.parseTag = function(t, r) {
|
|
2036
|
+
var n = this.clonePosition();
|
|
2037
|
+
this.bump();
|
|
2038
|
+
var a = this.parseTagName();
|
|
2039
|
+
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
2040
|
+
return {
|
|
2041
|
+
val: {
|
|
2042
|
+
type: y.literal,
|
|
2043
|
+
value: "<".concat(a, "/>"),
|
|
2044
|
+
location: v(n, this.clonePosition())
|
|
2045
|
+
},
|
|
2046
|
+
err: null
|
|
2047
|
+
};
|
|
2048
|
+
if (this.bumpIf(">")) {
|
|
2049
|
+
var i = this.parseMessage(t + 1, r, !0);
|
|
2050
|
+
if (i.err)
|
|
2051
|
+
return i;
|
|
2052
|
+
var o = i.val, s = this.clonePosition();
|
|
2053
|
+
if (this.bumpIf("</")) {
|
|
2054
|
+
if (this.isEOF() || !$(this.char()))
|
|
2055
|
+
return this.error(g.INVALID_TAG, v(s, this.clonePosition()));
|
|
2056
|
+
var u = this.clonePosition(), l = this.parseTagName();
|
|
2057
|
+
return a !== l ? this.error(g.UNMATCHED_CLOSING_TAG, v(u, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
2058
|
+
val: {
|
|
2059
|
+
type: y.tag,
|
|
2060
|
+
value: a,
|
|
2061
|
+
children: o,
|
|
2062
|
+
location: v(n, this.clonePosition())
|
|
2063
|
+
},
|
|
2064
|
+
err: null
|
|
2065
|
+
} : this.error(g.INVALID_TAG, v(s, this.clonePosition())));
|
|
2066
|
+
} else
|
|
2067
|
+
return this.error(g.UNCLOSED_TAG, v(n, this.clonePosition()));
|
|
2068
|
+
} else
|
|
2069
|
+
return this.error(g.INVALID_TAG, v(n, this.clonePosition()));
|
|
2070
|
+
}, e.prototype.parseTagName = function() {
|
|
2071
|
+
var t = this.offset();
|
|
2072
|
+
for (this.bump(); !this.isEOF() && xt(this.char()); )
|
|
2073
|
+
this.bump();
|
|
2074
|
+
return this.message.slice(t, this.offset());
|
|
2075
|
+
}, e.prototype.parseLiteral = function(t, r) {
|
|
2076
|
+
for (var n = this.clonePosition(), a = ""; ; ) {
|
|
2077
|
+
var i = this.tryParseQuote(r);
|
|
2078
|
+
if (i) {
|
|
2079
|
+
a += i;
|
|
2080
|
+
continue;
|
|
2081
|
+
}
|
|
2082
|
+
var o = this.tryParseUnquoted(t, r);
|
|
2083
|
+
if (o) {
|
|
2084
|
+
a += o;
|
|
2085
|
+
continue;
|
|
2086
|
+
}
|
|
2087
|
+
var s = this.tryParseLeftAngleBracket();
|
|
2088
|
+
if (s) {
|
|
2089
|
+
a += s;
|
|
2090
|
+
continue;
|
|
2091
|
+
}
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
var u = v(n, this.clonePosition());
|
|
2095
|
+
return {
|
|
2096
|
+
val: { type: y.literal, value: a, location: u },
|
|
2097
|
+
err: null
|
|
2098
|
+
};
|
|
2099
|
+
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
2100
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
2101
|
+
!yt(this.peek() || 0)) ? (this.bump(), "<") : null;
|
|
2102
|
+
}, e.prototype.tryParseQuote = function(t) {
|
|
2103
|
+
if (this.isEOF() || this.char() !== 39)
|
|
2104
|
+
return null;
|
|
2105
|
+
switch (this.peek()) {
|
|
2106
|
+
case 39:
|
|
2107
|
+
return this.bump(), this.bump(), "'";
|
|
2108
|
+
case 123:
|
|
2109
|
+
case 60:
|
|
2110
|
+
case 62:
|
|
2111
|
+
case 125:
|
|
2112
|
+
break;
|
|
2113
|
+
case 35:
|
|
2114
|
+
if (t === "plural" || t === "selectordinal")
|
|
2115
|
+
break;
|
|
2116
|
+
return null;
|
|
2117
|
+
default:
|
|
2118
|
+
return null;
|
|
2119
|
+
}
|
|
2120
|
+
this.bump();
|
|
2121
|
+
var r = [this.char()];
|
|
2122
|
+
for (this.bump(); !this.isEOF(); ) {
|
|
2123
|
+
var n = this.char();
|
|
2124
|
+
if (n === 39)
|
|
2125
|
+
if (this.peek() === 39)
|
|
2126
|
+
r.push(39), this.bump();
|
|
2127
|
+
else {
|
|
2128
|
+
this.bump();
|
|
2129
|
+
break;
|
|
2130
|
+
}
|
|
2131
|
+
else
|
|
2132
|
+
r.push(n);
|
|
2133
|
+
this.bump();
|
|
2134
|
+
}
|
|
2135
|
+
return Q.apply(void 0, r);
|
|
2136
|
+
}, e.prototype.tryParseUnquoted = function(t, r) {
|
|
2137
|
+
if (this.isEOF())
|
|
2138
|
+
return null;
|
|
2139
|
+
var n = this.char();
|
|
2140
|
+
return n === 60 || n === 123 || n === 35 && (r === "plural" || r === "selectordinal") || n === 125 && t > 0 ? null : (this.bump(), Q(n));
|
|
2141
|
+
}, e.prototype.parseArgument = function(t, r) {
|
|
2142
|
+
var n = this.clonePosition();
|
|
2143
|
+
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
2144
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(n, this.clonePosition()));
|
|
2145
|
+
if (this.char() === 125)
|
|
2146
|
+
return this.bump(), this.error(g.EMPTY_ARGUMENT, v(n, this.clonePosition()));
|
|
2147
|
+
var a = this.parseIdentifierIfPossible().value;
|
|
2148
|
+
if (!a)
|
|
2149
|
+
return this.error(g.MALFORMED_ARGUMENT, v(n, this.clonePosition()));
|
|
2150
|
+
if (this.bumpSpace(), this.isEOF())
|
|
2151
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(n, this.clonePosition()));
|
|
2152
|
+
switch (this.char()) {
|
|
2153
|
+
case 125:
|
|
2154
|
+
return this.bump(), {
|
|
2155
|
+
val: {
|
|
2156
|
+
type: y.argument,
|
|
2157
|
+
// value does not include the opening and closing braces.
|
|
2158
|
+
value: a,
|
|
2159
|
+
location: v(n, this.clonePosition())
|
|
2160
|
+
},
|
|
2161
|
+
err: null
|
|
2162
|
+
};
|
|
2163
|
+
case 44:
|
|
2164
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(n, this.clonePosition())) : this.parseArgumentOptions(t, r, a, n);
|
|
2165
|
+
default:
|
|
2166
|
+
return this.error(g.MALFORMED_ARGUMENT, v(n, this.clonePosition()));
|
|
2167
|
+
}
|
|
2168
|
+
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
2169
|
+
var t = this.clonePosition(), r = this.offset(), n = Y(this.message, r), a = r + n.length;
|
|
2170
|
+
this.bumpTo(a);
|
|
2171
|
+
var i = this.clonePosition(), o = v(t, i);
|
|
2172
|
+
return { value: n, location: o };
|
|
2173
|
+
}, e.prototype.parseArgumentOptions = function(t, r, n, a) {
|
|
2174
|
+
var i, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value, u = this.clonePosition();
|
|
2175
|
+
switch (s) {
|
|
2176
|
+
case "":
|
|
2177
|
+
return this.error(g.EXPECT_ARGUMENT_TYPE, v(o, u));
|
|
2178
|
+
case "number":
|
|
2179
|
+
case "date":
|
|
2180
|
+
case "time": {
|
|
2181
|
+
this.bumpSpace();
|
|
2182
|
+
var l = null;
|
|
2183
|
+
if (this.bumpIf(",")) {
|
|
2184
|
+
this.bumpSpace();
|
|
2185
|
+
var h = this.clonePosition(), m = this.parseSimpleArgStyleIfPossible();
|
|
2186
|
+
if (m.err)
|
|
2187
|
+
return m;
|
|
2188
|
+
var c = dt(m.val);
|
|
2189
|
+
if (c.length === 0)
|
|
2190
|
+
return this.error(g.EXPECT_ARGUMENT_STYLE, v(this.clonePosition(), this.clonePosition()));
|
|
2191
|
+
var b = v(h, this.clonePosition());
|
|
2192
|
+
l = { style: c, styleLocation: b };
|
|
2193
|
+
}
|
|
2194
|
+
var x = this.tryParseArgumentClose(a);
|
|
2195
|
+
if (x.err)
|
|
2196
|
+
return x;
|
|
2197
|
+
var E = v(a, this.clonePosition());
|
|
2198
|
+
if (l && se(l == null ? void 0 : l.style, "::", 0)) {
|
|
2199
|
+
var p = Et(l.style.slice(2));
|
|
2200
|
+
if (s === "number") {
|
|
2201
|
+
var m = this.parseNumberSkeletonFromString(p, l.styleLocation);
|
|
2202
|
+
return m.err ? m : {
|
|
2203
|
+
val: { type: y.number, value: n, location: E, style: m.val },
|
|
2204
|
+
err: null
|
|
2205
|
+
};
|
|
2206
|
+
} else {
|
|
2207
|
+
if (p.length === 0)
|
|
2208
|
+
return this.error(g.EXPECT_DATE_TIME_SKELETON, E);
|
|
2209
|
+
var d = p;
|
|
2210
|
+
this.locale && (d = at(p, this.locale));
|
|
2211
|
+
var c = {
|
|
2212
|
+
type: D.dateTime,
|
|
2213
|
+
pattern: d,
|
|
2214
|
+
location: l.styleLocation,
|
|
2215
|
+
parsedOptions: this.shouldParseSkeletons ? Ye(d) : {}
|
|
2216
|
+
}, T = s === "date" ? y.date : y.time;
|
|
2217
|
+
return {
|
|
2218
|
+
val: { type: T, value: n, location: E, style: c },
|
|
2219
|
+
err: null
|
|
2220
|
+
};
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
return {
|
|
2224
|
+
val: {
|
|
2225
|
+
type: s === "number" ? y.number : s === "date" ? y.date : y.time,
|
|
2226
|
+
value: n,
|
|
2227
|
+
location: E,
|
|
2228
|
+
style: (i = l == null ? void 0 : l.style) !== null && i !== void 0 ? i : null
|
|
2229
|
+
},
|
|
2230
|
+
err: null
|
|
2231
|
+
};
|
|
2232
|
+
}
|
|
2233
|
+
case "plural":
|
|
2234
|
+
case "selectordinal":
|
|
2235
|
+
case "select": {
|
|
2236
|
+
var S = this.clonePosition();
|
|
2237
|
+
if (this.bumpSpace(), !this.bumpIf(","))
|
|
2238
|
+
return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS, v(S, f({}, S)));
|
|
2239
|
+
this.bumpSpace();
|
|
2240
|
+
var w = this.parseIdentifierIfPossible(), R = 0;
|
|
2241
|
+
if (s !== "select" && w.value === "offset") {
|
|
2242
|
+
if (!this.bumpIf(":"))
|
|
2243
|
+
return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, v(this.clonePosition(), this.clonePosition()));
|
|
2244
|
+
this.bumpSpace();
|
|
2245
|
+
var m = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
2246
|
+
if (m.err)
|
|
2247
|
+
return m;
|
|
2248
|
+
this.bumpSpace(), w = this.parseIdentifierIfPossible(), R = m.val;
|
|
2249
|
+
}
|
|
2250
|
+
var G = this.tryParsePluralOrSelectOptions(t, s, r, w);
|
|
2251
|
+
if (G.err)
|
|
2252
|
+
return G;
|
|
2253
|
+
var x = this.tryParseArgumentClose(a);
|
|
2254
|
+
if (x.err)
|
|
2255
|
+
return x;
|
|
2256
|
+
var re = v(a, this.clonePosition());
|
|
2257
|
+
return s === "select" ? {
|
|
2258
|
+
val: {
|
|
2259
|
+
type: y.select,
|
|
2260
|
+
value: n,
|
|
2261
|
+
options: ue(G.val),
|
|
2262
|
+
location: re
|
|
2263
|
+
},
|
|
2264
|
+
err: null
|
|
2265
|
+
} : {
|
|
2266
|
+
val: {
|
|
2267
|
+
type: y.plural,
|
|
2268
|
+
value: n,
|
|
2269
|
+
options: ue(G.val),
|
|
2270
|
+
offset: R,
|
|
2271
|
+
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
2272
|
+
location: re
|
|
2273
|
+
},
|
|
2274
|
+
err: null
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
default:
|
|
2278
|
+
return this.error(g.INVALID_ARGUMENT_TYPE, v(o, u));
|
|
2279
|
+
}
|
|
2280
|
+
}, e.prototype.tryParseArgumentClose = function(t) {
|
|
2281
|
+
return this.isEOF() || this.char() !== 125 ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
|
|
2282
|
+
}, e.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2283
|
+
for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
|
|
2284
|
+
var n = this.char();
|
|
2285
|
+
switch (n) {
|
|
2286
|
+
case 39: {
|
|
2287
|
+
this.bump();
|
|
2288
|
+
var a = this.clonePosition();
|
|
2289
|
+
if (!this.bumpUntil("'"))
|
|
2290
|
+
return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, v(a, this.clonePosition()));
|
|
2291
|
+
this.bump();
|
|
2292
|
+
break;
|
|
2293
|
+
}
|
|
2294
|
+
case 123: {
|
|
2295
|
+
t += 1, this.bump();
|
|
2296
|
+
break;
|
|
2297
|
+
}
|
|
2298
|
+
case 125: {
|
|
2299
|
+
if (t > 0)
|
|
2300
|
+
t -= 1;
|
|
2301
|
+
else
|
|
2302
|
+
return {
|
|
2303
|
+
val: this.message.slice(r.offset, this.offset()),
|
|
2304
|
+
err: null
|
|
2305
|
+
};
|
|
2306
|
+
break;
|
|
2307
|
+
}
|
|
2308
|
+
default:
|
|
2309
|
+
this.bump();
|
|
2310
|
+
break;
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
return {
|
|
2314
|
+
val: this.message.slice(r.offset, this.offset()),
|
|
2315
|
+
err: null
|
|
2316
|
+
};
|
|
2317
|
+
}, e.prototype.parseNumberSkeletonFromString = function(t, r) {
|
|
2318
|
+
var n = [];
|
|
2319
|
+
try {
|
|
2320
|
+
n = Ke(t);
|
|
2321
|
+
} catch {
|
|
2322
|
+
return this.error(g.INVALID_NUMBER_SKELETON, r);
|
|
2323
|
+
}
|
|
2324
|
+
return {
|
|
2325
|
+
val: {
|
|
2326
|
+
type: D.number,
|
|
2327
|
+
tokens: n,
|
|
2328
|
+
location: r,
|
|
2329
|
+
parsedOptions: this.shouldParseSkeletons ? nt(n) : {}
|
|
2330
|
+
},
|
|
2331
|
+
err: null
|
|
2332
|
+
};
|
|
2333
|
+
}, e.prototype.tryParsePluralOrSelectOptions = function(t, r, n, a) {
|
|
2334
|
+
for (var i, o = !1, s = [], u = /* @__PURE__ */ new Set(), l = a.value, h = a.location; ; ) {
|
|
2335
|
+
if (l.length === 0) {
|
|
2336
|
+
var m = this.clonePosition();
|
|
2337
|
+
if (r !== "select" && this.bumpIf("=")) {
|
|
2338
|
+
var c = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR, g.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
2339
|
+
if (c.err)
|
|
2340
|
+
return c;
|
|
2341
|
+
h = v(m, this.clonePosition()), l = this.message.slice(m.offset, this.offset());
|
|
2342
|
+
} else
|
|
2343
|
+
break;
|
|
2344
|
+
}
|
|
2345
|
+
if (u.has(l))
|
|
2346
|
+
return this.error(r === "select" ? g.DUPLICATE_SELECT_ARGUMENT_SELECTOR : g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, h);
|
|
2347
|
+
l === "other" && (o = !0), this.bumpSpace();
|
|
2348
|
+
var b = this.clonePosition();
|
|
2349
|
+
if (!this.bumpIf("{"))
|
|
2350
|
+
return this.error(r === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, v(this.clonePosition(), this.clonePosition()));
|
|
2351
|
+
var x = this.parseMessage(t + 1, r, n);
|
|
2352
|
+
if (x.err)
|
|
2353
|
+
return x;
|
|
2354
|
+
var E = this.tryParseArgumentClose(b);
|
|
2355
|
+
if (E.err)
|
|
2356
|
+
return E;
|
|
2357
|
+
s.push([
|
|
2358
|
+
l,
|
|
2359
|
+
{
|
|
2360
|
+
value: x.val,
|
|
2361
|
+
location: v(b, this.clonePosition())
|
|
2362
|
+
}
|
|
2363
|
+
]), u.add(l), this.bumpSpace(), i = this.parseIdentifierIfPossible(), l = i.value, h = i.location;
|
|
2364
|
+
}
|
|
2365
|
+
return s.length === 0 ? this.error(r === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR : g.EXPECT_PLURAL_ARGUMENT_SELECTOR, v(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(g.MISSING_OTHER_CLAUSE, v(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
|
|
2366
|
+
}, e.prototype.tryParseDecimalInteger = function(t, r) {
|
|
2367
|
+
var n = 1, a = this.clonePosition();
|
|
2368
|
+
this.bumpIf("+") || this.bumpIf("-") && (n = -1);
|
|
2369
|
+
for (var i = !1, o = 0; !this.isEOF(); ) {
|
|
2370
|
+
var s = this.char();
|
|
2371
|
+
if (s >= 48 && s <= 57)
|
|
2372
|
+
i = !0, o = o * 10 + (s - 48), this.bump();
|
|
2373
|
+
else
|
|
2374
|
+
break;
|
|
2375
|
+
}
|
|
2376
|
+
var u = v(a, this.clonePosition());
|
|
2377
|
+
return i ? (o *= n, pt(o) ? { val: o, err: null } : this.error(r, u)) : this.error(t, u);
|
|
2378
|
+
}, e.prototype.offset = function() {
|
|
2379
|
+
return this.position.offset;
|
|
2380
|
+
}, e.prototype.isEOF = function() {
|
|
2381
|
+
return this.offset() === this.message.length;
|
|
2382
|
+
}, e.prototype.clonePosition = function() {
|
|
2383
|
+
return {
|
|
2384
|
+
offset: this.position.offset,
|
|
2385
|
+
line: this.position.line,
|
|
2386
|
+
column: this.position.column
|
|
2387
|
+
};
|
|
2388
|
+
}, e.prototype.char = function() {
|
|
2389
|
+
var t = this.position.offset;
|
|
2390
|
+
if (t >= this.message.length)
|
|
2391
|
+
throw Error("out of bound");
|
|
2392
|
+
var r = Pe(this.message, t);
|
|
2393
|
+
if (r === void 0)
|
|
2394
|
+
throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2395
|
+
return r;
|
|
2396
|
+
}, e.prototype.error = function(t, r) {
|
|
2397
|
+
return {
|
|
2398
|
+
val: null,
|
|
2399
|
+
err: {
|
|
2400
|
+
kind: t,
|
|
2401
|
+
message: this.message,
|
|
2402
|
+
location: r
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
}, e.prototype.bump = function() {
|
|
2406
|
+
if (!this.isEOF()) {
|
|
2407
|
+
var t = this.char();
|
|
2408
|
+
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);
|
|
2409
|
+
}
|
|
2410
|
+
}, e.prototype.bumpIf = function(t) {
|
|
2411
|
+
if (se(this.message, t, this.offset())) {
|
|
2412
|
+
for (var r = 0; r < t.length; r++)
|
|
2413
|
+
this.bump();
|
|
2414
|
+
return !0;
|
|
2415
|
+
}
|
|
2416
|
+
return !1;
|
|
2417
|
+
}, e.prototype.bumpUntil = function(t) {
|
|
2418
|
+
var r = this.offset(), n = this.message.indexOf(t, r);
|
|
2419
|
+
return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
|
|
2420
|
+
}, e.prototype.bumpTo = function(t) {
|
|
2421
|
+
if (this.offset() > t)
|
|
2422
|
+
throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
2423
|
+
for (t = Math.min(t, this.message.length); ; ) {
|
|
2424
|
+
var r = this.offset();
|
|
2425
|
+
if (r === t)
|
|
2426
|
+
break;
|
|
2427
|
+
if (r > t)
|
|
2428
|
+
throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
|
|
2429
|
+
if (this.bump(), this.isEOF())
|
|
2430
|
+
break;
|
|
2431
|
+
}
|
|
2432
|
+
}, e.prototype.bumpSpace = function() {
|
|
2433
|
+
for (; !this.isEOF() && Re(this.char()); )
|
|
2434
|
+
this.bump();
|
|
2435
|
+
}, e.prototype.peek = function() {
|
|
2436
|
+
if (this.isEOF())
|
|
2437
|
+
return null;
|
|
2438
|
+
var t = this.char(), r = this.offset(), n = this.message.charCodeAt(r + (t >= 65536 ? 2 : 1));
|
|
2439
|
+
return n ?? null;
|
|
2440
|
+
}, e;
|
|
2441
|
+
}()
|
|
2442
|
+
);
|
|
2443
|
+
function $(e) {
|
|
2444
|
+
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
2445
|
+
}
|
|
2446
|
+
function yt(e) {
|
|
2447
|
+
return $(e) || e === 47;
|
|
2448
|
+
}
|
|
2449
|
+
function xt(e) {
|
|
2450
|
+
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;
|
|
2451
|
+
}
|
|
2452
|
+
function Re(e) {
|
|
2453
|
+
return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
|
|
2454
|
+
}
|
|
2455
|
+
function Tt(e) {
|
|
2456
|
+
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;
|
|
2457
|
+
}
|
|
2458
|
+
function K(e) {
|
|
2459
|
+
e.forEach(function(t) {
|
|
2460
|
+
if (delete t.location, Te(t) || Se(t))
|
|
2461
|
+
for (var r in t.options)
|
|
2462
|
+
delete t.options[r].location, K(t.options[r].value);
|
|
2463
|
+
else be(t) && Ie(t.style) || (ye(t) || xe(t)) && J(t.style) ? delete t.style.location : He(t) && K(t.children);
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
function St(e, t) {
|
|
2467
|
+
t === void 0 && (t = {}), t = f({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
2468
|
+
var r = new bt(e, t).parse();
|
|
2469
|
+
if (r.err) {
|
|
2470
|
+
var n = SyntaxError(g[r.err.kind]);
|
|
2471
|
+
throw n.location = r.err.location, n.originalMessage = r.err.message, n;
|
|
2472
|
+
}
|
|
2473
|
+
return t != null && t.captureLocation || K(r.val), r.val;
|
|
2474
|
+
}
|
|
2475
|
+
var P;
|
|
2476
|
+
(function(e) {
|
|
2477
|
+
e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
|
|
2478
|
+
})(P || (P = {}));
|
|
2479
|
+
var L = (
|
|
2480
|
+
/** @class */
|
|
2481
|
+
function(e) {
|
|
2482
|
+
_(t, e);
|
|
2483
|
+
function t(r, n, a) {
|
|
2484
|
+
var i = e.call(this, r) || this;
|
|
2485
|
+
return i.code = n, i.originalMessage = a, i;
|
|
2486
|
+
}
|
|
2487
|
+
return t.prototype.toString = function() {
|
|
2488
|
+
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
|
|
2489
|
+
}, t;
|
|
2490
|
+
}(Error)
|
|
2491
|
+
), le = (
|
|
2492
|
+
/** @class */
|
|
2493
|
+
function(e) {
|
|
2494
|
+
_(t, e);
|
|
2495
|
+
function t(r, n, a, i) {
|
|
2496
|
+
return e.call(this, 'Invalid values for "'.concat(r, '": "').concat(n, '". Options are "').concat(Object.keys(a).join('", "'), '"'), P.INVALID_VALUE, i) || this;
|
|
2497
|
+
}
|
|
2498
|
+
return t;
|
|
2499
|
+
}(L)
|
|
2500
|
+
), Ht = (
|
|
2501
|
+
/** @class */
|
|
2502
|
+
function(e) {
|
|
2503
|
+
_(t, e);
|
|
2504
|
+
function t(r, n, a) {
|
|
2505
|
+
return e.call(this, 'Value for "'.concat(r, '" must be of type ').concat(n), P.INVALID_VALUE, a) || this;
|
|
2506
|
+
}
|
|
2507
|
+
return t;
|
|
2508
|
+
}(L)
|
|
2509
|
+
), It = (
|
|
2510
|
+
/** @class */
|
|
2511
|
+
function(e) {
|
|
2512
|
+
_(t, e);
|
|
2513
|
+
function t(r, n) {
|
|
2514
|
+
return e.call(this, 'The intl string context variable "'.concat(r, '" was not provided to the string "').concat(n, '"'), P.MISSING_VALUE, n) || this;
|
|
2515
|
+
}
|
|
2516
|
+
return t;
|
|
2517
|
+
}(L)
|
|
2518
|
+
), H;
|
|
2519
|
+
(function(e) {
|
|
2520
|
+
e[e.literal = 0] = "literal", e[e.object = 1] = "object";
|
|
2521
|
+
})(H || (H = {}));
|
|
2522
|
+
function Nt(e) {
|
|
2523
|
+
return e.length < 2 ? e : e.reduce(function(t, r) {
|
|
2524
|
+
var n = t[t.length - 1];
|
|
2525
|
+
return !n || n.type !== H.literal || r.type !== H.literal ? t.push(r) : n.value += r.value, t;
|
|
2526
|
+
}, []);
|
|
2527
|
+
}
|
|
2528
|
+
function At(e) {
|
|
2529
|
+
return typeof e == "function";
|
|
2530
|
+
}
|
|
2531
|
+
function k(e, t, r, n, a, i, o) {
|
|
2532
|
+
if (e.length === 1 && ne(e[0]))
|
|
2533
|
+
return [
|
|
2534
|
+
{
|
|
2535
|
+
type: H.literal,
|
|
2536
|
+
value: e[0].value
|
|
2537
|
+
}
|
|
2538
|
+
];
|
|
2539
|
+
for (var s = [], u = 0, l = e; u < l.length; u++) {
|
|
2540
|
+
var h = l[u];
|
|
2541
|
+
if (ne(h)) {
|
|
2542
|
+
s.push({
|
|
2543
|
+
type: H.literal,
|
|
2544
|
+
value: h.value
|
|
2545
|
+
});
|
|
2546
|
+
continue;
|
|
2547
|
+
}
|
|
2548
|
+
if (qe(h)) {
|
|
2549
|
+
typeof i == "number" && s.push({
|
|
2550
|
+
type: H.literal,
|
|
2551
|
+
value: r.getNumberFormat(t).format(i)
|
|
2552
|
+
});
|
|
2553
|
+
continue;
|
|
2554
|
+
}
|
|
2555
|
+
var m = h.value;
|
|
2556
|
+
if (!(a && m in a))
|
|
2557
|
+
throw new It(m, o);
|
|
2558
|
+
var c = a[m];
|
|
2559
|
+
if (Je(h)) {
|
|
2560
|
+
(!c || typeof c == "string" || typeof c == "number") && (c = typeof c == "string" || typeof c == "number" ? String(c) : ""), s.push({
|
|
2561
|
+
type: typeof c == "string" ? H.literal : H.object,
|
|
2562
|
+
value: c
|
|
2563
|
+
});
|
|
2564
|
+
continue;
|
|
2565
|
+
}
|
|
2566
|
+
if (ye(h)) {
|
|
2567
|
+
var b = typeof h.style == "string" ? n.date[h.style] : J(h.style) ? h.style.parsedOptions : void 0;
|
|
2568
|
+
s.push({
|
|
2569
|
+
type: H.literal,
|
|
2570
|
+
value: r.getDateTimeFormat(t, b).format(c)
|
|
2571
|
+
});
|
|
2572
|
+
continue;
|
|
2573
|
+
}
|
|
2574
|
+
if (xe(h)) {
|
|
2575
|
+
var b = typeof h.style == "string" ? n.time[h.style] : J(h.style) ? h.style.parsedOptions : n.time.medium;
|
|
2576
|
+
s.push({
|
|
2577
|
+
type: H.literal,
|
|
2578
|
+
value: r.getDateTimeFormat(t, b).format(c)
|
|
2579
|
+
});
|
|
2580
|
+
continue;
|
|
2581
|
+
}
|
|
2582
|
+
if (be(h)) {
|
|
2583
|
+
var b = typeof h.style == "string" ? n.number[h.style] : Ie(h.style) ? h.style.parsedOptions : void 0;
|
|
2584
|
+
b && b.scale && (c = c * (b.scale || 1)), s.push({
|
|
2585
|
+
type: H.literal,
|
|
2586
|
+
value: r.getNumberFormat(t, b).format(c)
|
|
2587
|
+
});
|
|
2588
|
+
continue;
|
|
2589
|
+
}
|
|
2590
|
+
if (He(h)) {
|
|
2591
|
+
var x = h.children, E = h.value, p = a[E];
|
|
2592
|
+
if (!At(p))
|
|
2593
|
+
throw new Ht(E, "function", o);
|
|
2594
|
+
var d = k(x, t, r, n, a, i), T = p(d.map(function(R) {
|
|
2595
|
+
return R.value;
|
|
2596
|
+
}));
|
|
2597
|
+
Array.isArray(T) || (T = [T]), s.push.apply(s, T.map(function(R) {
|
|
2598
|
+
return {
|
|
2599
|
+
type: typeof R == "string" ? H.literal : H.object,
|
|
2600
|
+
value: R
|
|
2601
|
+
};
|
|
2602
|
+
}));
|
|
2603
|
+
}
|
|
2604
|
+
if (Te(h)) {
|
|
2605
|
+
var S = h.options[c] || h.options.other;
|
|
2606
|
+
if (!S)
|
|
2607
|
+
throw new le(h.value, c, Object.keys(h.options), o);
|
|
2608
|
+
s.push.apply(s, k(S.value, t, r, n, a));
|
|
2609
|
+
continue;
|
|
2610
|
+
}
|
|
2611
|
+
if (Se(h)) {
|
|
2612
|
+
var S = h.options["=".concat(c)];
|
|
2613
|
+
if (!S) {
|
|
2614
|
+
if (!Intl.PluralRules)
|
|
2615
|
+
throw new L(`Intl.PluralRules is not available in this environment.
|
|
2616
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
2617
|
+
`, P.MISSING_INTL_API, o);
|
|
2618
|
+
var w = r.getPluralRules(t, { type: h.pluralType }).select(c - (h.offset || 0));
|
|
2619
|
+
S = h.options[w] || h.options.other;
|
|
2620
|
+
}
|
|
2621
|
+
if (!S)
|
|
2622
|
+
throw new le(h.value, c, Object.keys(h.options), o);
|
|
2623
|
+
s.push.apply(s, k(S.value, t, r, n, a, c - (h.offset || 0)));
|
|
2624
|
+
continue;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
return Nt(s);
|
|
2628
|
+
}
|
|
2629
|
+
function Bt(e, t) {
|
|
2630
|
+
return t ? f(f(f({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
|
|
2631
|
+
return r[n] = f(f({}, e[n]), t[n] || {}), r;
|
|
2632
|
+
}, {})) : e;
|
|
2633
|
+
}
|
|
2634
|
+
function _t(e, t) {
|
|
2635
|
+
return t ? Object.keys(e).reduce(function(r, n) {
|
|
2636
|
+
return r[n] = Bt(e[n], t[n]), r;
|
|
2637
|
+
}, f({}, e)) : e;
|
|
2638
|
+
}
|
|
2639
|
+
function W(e) {
|
|
2640
|
+
return {
|
|
2641
|
+
create: function() {
|
|
2642
|
+
return {
|
|
2643
|
+
get: function(t) {
|
|
2644
|
+
return e[t];
|
|
2645
|
+
},
|
|
2646
|
+
set: function(t, r) {
|
|
2647
|
+
e[t] = r;
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
}
|
|
2651
|
+
};
|
|
2652
|
+
}
|
|
2653
|
+
function Pt(e) {
|
|
2654
|
+
return e === void 0 && (e = {
|
|
2655
|
+
number: {},
|
|
2656
|
+
dateTime: {},
|
|
2657
|
+
pluralRules: {}
|
|
2658
|
+
}), {
|
|
2659
|
+
getNumberFormat: I(function() {
|
|
2660
|
+
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
2661
|
+
r[n] = arguments[n];
|
|
2662
|
+
return new ((t = Intl.NumberFormat).bind.apply(t, A([void 0], r, !1)))();
|
|
2663
|
+
}, {
|
|
2664
|
+
cache: W(e.number),
|
|
2665
|
+
strategy: N.variadic
|
|
2666
|
+
}),
|
|
2667
|
+
getDateTimeFormat: I(function() {
|
|
2668
|
+
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
2669
|
+
r[n] = arguments[n];
|
|
2670
|
+
return new ((t = Intl.DateTimeFormat).bind.apply(t, A([void 0], r, !1)))();
|
|
2671
|
+
}, {
|
|
2672
|
+
cache: W(e.dateTime),
|
|
2673
|
+
strategy: N.variadic
|
|
2674
|
+
}),
|
|
2675
|
+
getPluralRules: I(function() {
|
|
2676
|
+
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
2677
|
+
r[n] = arguments[n];
|
|
2678
|
+
return new ((t = Intl.PluralRules).bind.apply(t, A([void 0], r, !1)))();
|
|
2679
|
+
}, {
|
|
2680
|
+
cache: W(e.pluralRules),
|
|
2681
|
+
strategy: N.variadic
|
|
2682
|
+
})
|
|
2683
|
+
};
|
|
2684
|
+
}
|
|
2685
|
+
var Oe = (
|
|
2686
|
+
/** @class */
|
|
2687
|
+
function() {
|
|
2688
|
+
function e(t, r, n, a) {
|
|
2689
|
+
r === void 0 && (r = e.defaultLocale);
|
|
2690
|
+
var i = this;
|
|
2691
|
+
if (this.formatterCache = {
|
|
2692
|
+
number: {},
|
|
2693
|
+
dateTime: {},
|
|
2694
|
+
pluralRules: {}
|
|
2695
|
+
}, this.format = function(u) {
|
|
2696
|
+
var l = i.formatToParts(u);
|
|
2697
|
+
if (l.length === 1)
|
|
2698
|
+
return l[0].value;
|
|
2699
|
+
var h = l.reduce(function(m, c) {
|
|
2700
|
+
return !m.length || c.type !== H.literal || typeof m[m.length - 1] != "string" ? m.push(c.value) : m[m.length - 1] += c.value, m;
|
|
2701
|
+
}, []);
|
|
2702
|
+
return h.length <= 1 ? h[0] || "" : h;
|
|
2703
|
+
}, this.formatToParts = function(u) {
|
|
2704
|
+
return k(i.ast, i.locales, i.formatters, i.formats, u, void 0, i.message);
|
|
2705
|
+
}, this.resolvedOptions = function() {
|
|
2706
|
+
var u;
|
|
2707
|
+
return {
|
|
2708
|
+
locale: ((u = i.resolvedLocale) === null || u === void 0 ? void 0 : u.toString()) || Intl.NumberFormat.supportedLocalesOf(i.locales)[0]
|
|
2709
|
+
};
|
|
2710
|
+
}, this.getAst = function() {
|
|
2711
|
+
return i.ast;
|
|
2712
|
+
}, this.locales = r, this.resolvedLocale = e.resolveLocale(r), typeof t == "string") {
|
|
2713
|
+
if (this.message = t, !e.__parse)
|
|
2714
|
+
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
2715
|
+
var o = a || {};
|
|
2716
|
+
o.formatters;
|
|
2717
|
+
var s = Ve(o, ["formatters"]);
|
|
2718
|
+
this.ast = e.__parse(t, f(f({}, s), { locale: this.resolvedLocale }));
|
|
2719
|
+
} else
|
|
2720
|
+
this.ast = t;
|
|
2721
|
+
if (!Array.isArray(this.ast))
|
|
2722
|
+
throw new TypeError("A message must be provided as a String or AST.");
|
|
2723
|
+
this.formats = _t(e.formats, n), this.formatters = a && a.formatters || Pt(this.formatterCache);
|
|
2724
|
+
}
|
|
2725
|
+
return Object.defineProperty(e, "defaultLocale", {
|
|
2726
|
+
get: function() {
|
|
2727
|
+
return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale;
|
|
2728
|
+
},
|
|
2729
|
+
enumerable: !1,
|
|
2730
|
+
configurable: !0
|
|
2731
|
+
}), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
|
|
2732
|
+
if (!(typeof Intl.Locale > "u")) {
|
|
2733
|
+
var r = Intl.NumberFormat.supportedLocalesOf(t);
|
|
2734
|
+
return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
|
|
2735
|
+
}
|
|
2736
|
+
}, e.__parse = St, e.formats = {
|
|
2737
|
+
number: {
|
|
2738
|
+
integer: {
|
|
2739
|
+
maximumFractionDigits: 0
|
|
2740
|
+
},
|
|
2741
|
+
currency: {
|
|
2742
|
+
style: "currency"
|
|
2743
|
+
},
|
|
2744
|
+
percent: {
|
|
2745
|
+
style: "percent"
|
|
2746
|
+
}
|
|
2747
|
+
},
|
|
2748
|
+
date: {
|
|
2749
|
+
short: {
|
|
2750
|
+
month: "numeric",
|
|
2751
|
+
day: "numeric",
|
|
2752
|
+
year: "2-digit"
|
|
2753
|
+
},
|
|
2754
|
+
medium: {
|
|
2755
|
+
month: "short",
|
|
2756
|
+
day: "numeric",
|
|
2757
|
+
year: "numeric"
|
|
2758
|
+
},
|
|
2759
|
+
long: {
|
|
2760
|
+
month: "long",
|
|
2761
|
+
day: "numeric",
|
|
2762
|
+
year: "numeric"
|
|
2763
|
+
},
|
|
2764
|
+
full: {
|
|
2765
|
+
weekday: "long",
|
|
2766
|
+
month: "long",
|
|
2767
|
+
day: "numeric",
|
|
2768
|
+
year: "numeric"
|
|
2769
|
+
}
|
|
2770
|
+
},
|
|
2771
|
+
time: {
|
|
2772
|
+
short: {
|
|
2773
|
+
hour: "numeric",
|
|
2774
|
+
minute: "numeric"
|
|
2775
|
+
},
|
|
2776
|
+
medium: {
|
|
2777
|
+
hour: "numeric",
|
|
2778
|
+
minute: "numeric",
|
|
2779
|
+
second: "numeric"
|
|
2780
|
+
},
|
|
2781
|
+
long: {
|
|
2782
|
+
hour: "numeric",
|
|
2783
|
+
minute: "numeric",
|
|
2784
|
+
second: "numeric",
|
|
2785
|
+
timeZoneName: "short"
|
|
2786
|
+
},
|
|
2787
|
+
full: {
|
|
2788
|
+
hour: "numeric",
|
|
2789
|
+
minute: "numeric",
|
|
2790
|
+
second: "numeric",
|
|
2791
|
+
timeZoneName: "short"
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}, e;
|
|
2795
|
+
}()
|
|
2796
|
+
), M;
|
|
2797
|
+
(function(e) {
|
|
2798
|
+
e.FORMAT_ERROR = "FORMAT_ERROR", e.UNSUPPORTED_FORMATTER = "UNSUPPORTED_FORMATTER", e.INVALID_CONFIG = "INVALID_CONFIG", e.MISSING_DATA = "MISSING_DATA", e.MISSING_TRANSLATION = "MISSING_TRANSLATION";
|
|
2799
|
+
})(M || (M = {}));
|
|
2800
|
+
var F = (
|
|
2801
|
+
/** @class */
|
|
2802
|
+
function(e) {
|
|
2803
|
+
_(t, e);
|
|
2804
|
+
function t(r, n, a) {
|
|
2805
|
+
var i = this, o = a ? a instanceof Error ? a : new Error(String(a)) : void 0;
|
|
2806
|
+
return i = e.call(this, "[@formatjs/intl Error ".concat(r, "] ").concat(n, `
|
|
2807
|
+
`).concat(o ? `
|
|
2808
|
+
`.concat(o.message, `
|
|
2809
|
+
`).concat(o.stack) : "")) || this, i.code = r, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(i, t), i;
|
|
2810
|
+
}
|
|
2811
|
+
return t;
|
|
2812
|
+
}(Error)
|
|
2813
|
+
), Lt = (
|
|
2814
|
+
/** @class */
|
|
2815
|
+
function(e) {
|
|
2816
|
+
_(t, e);
|
|
2817
|
+
function t(r, n) {
|
|
2818
|
+
return e.call(this, M.UNSUPPORTED_FORMATTER, r, n) || this;
|
|
2819
|
+
}
|
|
2820
|
+
return t;
|
|
2821
|
+
}(F)
|
|
2822
|
+
), Rt = (
|
|
2823
|
+
/** @class */
|
|
2824
|
+
function(e) {
|
|
2825
|
+
_(t, e);
|
|
2826
|
+
function t(r, n) {
|
|
2827
|
+
return e.call(this, M.INVALID_CONFIG, r, n) || this;
|
|
2828
|
+
}
|
|
2829
|
+
return t;
|
|
2830
|
+
}(F)
|
|
2831
|
+
), fe = (
|
|
2832
|
+
/** @class */
|
|
2833
|
+
function(e) {
|
|
2834
|
+
_(t, e);
|
|
2835
|
+
function t(r, n) {
|
|
2836
|
+
return e.call(this, M.MISSING_DATA, r, n) || this;
|
|
2837
|
+
}
|
|
2838
|
+
return t;
|
|
2839
|
+
}(F)
|
|
2840
|
+
), B = (
|
|
2841
|
+
/** @class */
|
|
2842
|
+
function(e) {
|
|
2843
|
+
_(t, e);
|
|
2844
|
+
function t(r, n, a) {
|
|
2845
|
+
var i = e.call(this, M.FORMAT_ERROR, "".concat(r, `
|
|
2846
|
+
Locale: `).concat(n, `
|
|
2847
|
+
`), a) || this;
|
|
2848
|
+
return i.locale = n, i;
|
|
2849
|
+
}
|
|
2850
|
+
return t;
|
|
2851
|
+
}(F)
|
|
2852
|
+
), Z = (
|
|
2853
|
+
/** @class */
|
|
2854
|
+
function(e) {
|
|
2855
|
+
_(t, e);
|
|
2856
|
+
function t(r, n, a, i) {
|
|
2857
|
+
var o = e.call(this, "".concat(r, `
|
|
2858
|
+
MessageID: `).concat(a == null ? void 0 : a.id, `
|
|
2859
|
+
Default Message: `).concat(a == null ? void 0 : a.defaultMessage, `
|
|
2860
|
+
Description: `).concat(a == null ? void 0 : a.description, `
|
|
2861
|
+
`), n, i) || this;
|
|
2862
|
+
return o.descriptor = a, o.locale = n, o;
|
|
2863
|
+
}
|
|
2864
|
+
return t;
|
|
2865
|
+
}(B)
|
|
2866
|
+
), Ot = (
|
|
2867
|
+
/** @class */
|
|
2868
|
+
function(e) {
|
|
2869
|
+
_(t, e);
|
|
2870
|
+
function t(r, n) {
|
|
2871
|
+
var a = e.call(this, M.MISSING_TRANSLATION, 'Missing message: "'.concat(r.id, '" for locale "').concat(n, '", using ').concat(r.defaultMessage ? "default message (".concat(typeof r.defaultMessage == "string" ? r.defaultMessage : r.defaultMessage.map(function(i) {
|
|
2872
|
+
var o;
|
|
2873
|
+
return (o = i.value) !== null && o !== void 0 ? o : JSON.stringify(i);
|
|
2874
|
+
}).join(), ")") : "id", " as fallback.")) || this;
|
|
2875
|
+
return a.descriptor = r, a;
|
|
2876
|
+
}
|
|
2877
|
+
return t;
|
|
2878
|
+
}(F)
|
|
2879
|
+
);
|
|
2880
|
+
function C(e, t, r) {
|
|
2881
|
+
return r === void 0 && (r = {}), t.reduce(function(n, a) {
|
|
2882
|
+
return a in e ? n[a] = e[a] : a in r && (n[a] = r[a]), n;
|
|
2883
|
+
}, {});
|
|
2884
|
+
}
|
|
2885
|
+
var Mt = function(e) {
|
|
2886
|
+
process.env.NODE_ENV !== "production" && console.error(e);
|
|
2887
|
+
}, Ct = function(e) {
|
|
2888
|
+
process.env.NODE_ENV !== "production" && console.warn(e);
|
|
2889
|
+
}, Dt = {
|
|
2890
|
+
formats: {},
|
|
2891
|
+
messages: {},
|
|
2892
|
+
timeZone: void 0,
|
|
2893
|
+
defaultLocale: "en",
|
|
2894
|
+
defaultFormats: {},
|
|
2895
|
+
fallbackOnEmptyString: !0,
|
|
2896
|
+
onError: Mt,
|
|
2897
|
+
onWarn: Ct
|
|
2898
|
+
};
|
|
2899
|
+
function Me() {
|
|
2900
|
+
return {
|
|
2901
|
+
dateTime: {},
|
|
2902
|
+
number: {},
|
|
2903
|
+
message: {},
|
|
2904
|
+
relativeTime: {},
|
|
2905
|
+
pluralRules: {},
|
|
2906
|
+
list: {},
|
|
2907
|
+
displayNames: {}
|
|
2908
|
+
};
|
|
2909
|
+
}
|
|
2910
|
+
function O(e) {
|
|
2911
|
+
return {
|
|
2912
|
+
create: function() {
|
|
2913
|
+
return {
|
|
2914
|
+
get: function(t) {
|
|
2915
|
+
return e[t];
|
|
2916
|
+
},
|
|
2917
|
+
set: function(t, r) {
|
|
2918
|
+
e[t] = r;
|
|
2919
|
+
}
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
}
|
|
2924
|
+
function wt(e) {
|
|
2925
|
+
e === void 0 && (e = Me());
|
|
2926
|
+
var t = Intl.RelativeTimeFormat, r = Intl.ListFormat, n = Intl.DisplayNames, a = I(function() {
|
|
2927
|
+
for (var s, u = [], l = 0; l < arguments.length; l++)
|
|
2928
|
+
u[l] = arguments[l];
|
|
2929
|
+
return new ((s = Intl.DateTimeFormat).bind.apply(s, A([void 0], u, !1)))();
|
|
2930
|
+
}, {
|
|
2931
|
+
cache: O(e.dateTime),
|
|
2932
|
+
strategy: N.variadic
|
|
2933
|
+
}), i = I(function() {
|
|
2934
|
+
for (var s, u = [], l = 0; l < arguments.length; l++)
|
|
2935
|
+
u[l] = arguments[l];
|
|
2936
|
+
return new ((s = Intl.NumberFormat).bind.apply(s, A([void 0], u, !1)))();
|
|
2937
|
+
}, {
|
|
2938
|
+
cache: O(e.number),
|
|
2939
|
+
strategy: N.variadic
|
|
2940
|
+
}), o = I(function() {
|
|
2941
|
+
for (var s, u = [], l = 0; l < arguments.length; l++)
|
|
2942
|
+
u[l] = arguments[l];
|
|
2943
|
+
return new ((s = Intl.PluralRules).bind.apply(s, A([void 0], u, !1)))();
|
|
2944
|
+
}, {
|
|
2945
|
+
cache: O(e.pluralRules),
|
|
2946
|
+
strategy: N.variadic
|
|
2947
|
+
});
|
|
2948
|
+
return {
|
|
2949
|
+
getDateTimeFormat: a,
|
|
2950
|
+
getNumberFormat: i,
|
|
2951
|
+
getMessageFormat: I(function(s, u, l, h) {
|
|
2952
|
+
return new Oe(s, u, l, f({ formatters: {
|
|
2953
|
+
getNumberFormat: i,
|
|
2954
|
+
getDateTimeFormat: a,
|
|
2955
|
+
getPluralRules: o
|
|
2956
|
+
} }, h || {}));
|
|
2957
|
+
}, {
|
|
2958
|
+
cache: O(e.message),
|
|
2959
|
+
strategy: N.variadic
|
|
2960
|
+
}),
|
|
2961
|
+
getRelativeTimeFormat: I(function() {
|
|
2962
|
+
for (var s = [], u = 0; u < arguments.length; u++)
|
|
2963
|
+
s[u] = arguments[u];
|
|
2964
|
+
return new (t.bind.apply(t, A([void 0], s, !1)))();
|
|
2965
|
+
}, {
|
|
2966
|
+
cache: O(e.relativeTime),
|
|
2967
|
+
strategy: N.variadic
|
|
2968
|
+
}),
|
|
2969
|
+
getPluralRules: o,
|
|
2970
|
+
getListFormat: I(function() {
|
|
2971
|
+
for (var s = [], u = 0; u < arguments.length; u++)
|
|
2972
|
+
s[u] = arguments[u];
|
|
2973
|
+
return new (r.bind.apply(r, A([void 0], s, !1)))();
|
|
2974
|
+
}, {
|
|
2975
|
+
cache: O(e.list),
|
|
2976
|
+
strategy: N.variadic
|
|
2977
|
+
}),
|
|
2978
|
+
getDisplayNames: I(function() {
|
|
2979
|
+
for (var s = [], u = 0; u < arguments.length; u++)
|
|
2980
|
+
s[u] = arguments[u];
|
|
2981
|
+
return new (n.bind.apply(n, A([void 0], s, !1)))();
|
|
2982
|
+
}, {
|
|
2983
|
+
cache: O(e.displayNames),
|
|
2984
|
+
strategy: N.variadic
|
|
2985
|
+
})
|
|
2986
|
+
};
|
|
2987
|
+
}
|
|
2988
|
+
function te(e, t, r, n) {
|
|
2989
|
+
var a = e && e[t], i;
|
|
2990
|
+
if (a && (i = a[r]), i)
|
|
2991
|
+
return i;
|
|
2992
|
+
n(new Lt("No ".concat(t, " format named: ").concat(r)));
|
|
2993
|
+
}
|
|
2994
|
+
function Ft(e, t, r) {
|
|
2995
|
+
if (r === void 0 && (r = Error), !e)
|
|
2996
|
+
throw new r(t);
|
|
2997
|
+
}
|
|
2998
|
+
I(function() {
|
|
2999
|
+
for (var e, t = [], r = 0; r < arguments.length; r++)
|
|
3000
|
+
t[r] = arguments[r];
|
|
3001
|
+
return new ((e = Intl.NumberFormat).bind.apply(e, A([void 0], t, !1)))();
|
|
3002
|
+
}, {
|
|
3003
|
+
strategy: N.variadic
|
|
3004
|
+
});
|
|
3005
|
+
I(function() {
|
|
3006
|
+
for (var e, t = [], r = 0; r < arguments.length; r++)
|
|
3007
|
+
t[r] = arguments[r];
|
|
3008
|
+
return new ((e = Intl.DateTimeFormat).bind.apply(e, A([void 0], t, !1)))();
|
|
3009
|
+
}, {
|
|
3010
|
+
strategy: N.variadic
|
|
3011
|
+
});
|
|
3012
|
+
I(function() {
|
|
3013
|
+
for (var e, t = [], r = 0; r < arguments.length; r++)
|
|
3014
|
+
t[r] = arguments[r];
|
|
3015
|
+
return new ((e = Intl.PluralRules).bind.apply(e, A([void 0], t, !1)))();
|
|
3016
|
+
}, {
|
|
3017
|
+
strategy: N.variadic
|
|
3018
|
+
});
|
|
3019
|
+
I(function() {
|
|
3020
|
+
for (var e, t = [], r = 0; r < arguments.length; r++)
|
|
3021
|
+
t[r] = arguments[r];
|
|
3022
|
+
return new ((e = Intl.Locale).bind.apply(e, A([void 0], t, !1)))();
|
|
3023
|
+
}, {
|
|
3024
|
+
strategy: N.variadic
|
|
3025
|
+
});
|
|
3026
|
+
I(function() {
|
|
3027
|
+
for (var e, t = [], r = 0; r < arguments.length; r++)
|
|
3028
|
+
t[r] = arguments[r];
|
|
3029
|
+
return new ((e = Intl.ListFormat).bind.apply(e, A([void 0], t, !1)))();
|
|
3030
|
+
}, {
|
|
3031
|
+
strategy: N.variadic
|
|
3032
|
+
});
|
|
3033
|
+
function V(e, t) {
|
|
3034
|
+
return Object.keys(e).reduce(function(r, n) {
|
|
3035
|
+
return r[n] = f({ timeZone: t }, e[n]), r;
|
|
3036
|
+
}, {});
|
|
3037
|
+
}
|
|
3038
|
+
function me(e, t) {
|
|
3039
|
+
var r = Object.keys(f(f({}, e), t));
|
|
3040
|
+
return r.reduce(function(n, a) {
|
|
3041
|
+
return n[a] = f(f({}, e[a] || {}), t[a] || {}), n;
|
|
3042
|
+
}, {});
|
|
3043
|
+
}
|
|
3044
|
+
function ce(e, t) {
|
|
3045
|
+
if (!t)
|
|
3046
|
+
return e;
|
|
3047
|
+
var r = Oe.formats;
|
|
3048
|
+
return f(f(f({}, r), e), { date: me(V(r.date, t), V(e.date || {}, t)), time: me(V(r.time, t), V(e.time || {}, t)) });
|
|
3049
|
+
}
|
|
3050
|
+
var ge = function(e, t, r, n, a) {
|
|
3051
|
+
var i = e.locale, o = e.formats, s = e.messages, u = e.defaultLocale, l = e.defaultFormats, h = e.fallbackOnEmptyString, m = e.onError, c = e.timeZone, b = e.defaultRichTextElements;
|
|
3052
|
+
r === void 0 && (r = { id: "" });
|
|
3053
|
+
var x = r.id, E = r.defaultMessage;
|
|
3054
|
+
Ft(!!x, "[@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");
|
|
3055
|
+
var p = String(x), d = (
|
|
3056
|
+
// In case messages is Object.create(null)
|
|
3057
|
+
// e.g import('foo.json') from webpack)
|
|
3058
|
+
// See https://github.com/formatjs/formatjs/issues/1914
|
|
3059
|
+
s && Object.prototype.hasOwnProperty.call(s, p) && s[p]
|
|
3060
|
+
);
|
|
3061
|
+
if (Array.isArray(d) && d.length === 1 && d[0].type === y.literal)
|
|
3062
|
+
return d[0].value;
|
|
3063
|
+
if (!n && d && typeof d == "string" && !b)
|
|
3064
|
+
return d.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
3065
|
+
if (n = f(f({}, b), n || {}), o = ce(o, c), l = ce(l, c), !d) {
|
|
3066
|
+
if (h === !1 && d === "")
|
|
3067
|
+
return d;
|
|
3068
|
+
if ((!E || i && i.toLowerCase() !== u.toLowerCase()) && m(new Ot(r, i)), E)
|
|
3069
|
+
try {
|
|
3070
|
+
var T = t.getMessageFormat(E, u, l, a);
|
|
3071
|
+
return T.format(n);
|
|
3072
|
+
} catch (S) {
|
|
3073
|
+
return m(new Z('Error formatting default message for: "'.concat(p, '", rendering default message verbatim'), i, r, S)), typeof E == "string" ? E : p;
|
|
3074
|
+
}
|
|
3075
|
+
return p;
|
|
3076
|
+
}
|
|
3077
|
+
try {
|
|
3078
|
+
var T = t.getMessageFormat(d, i, o, f({ formatters: t }, a || {}));
|
|
3079
|
+
return T.format(n);
|
|
3080
|
+
} catch (S) {
|
|
3081
|
+
m(new Z('Error formatting message: "'.concat(p, '", using ').concat(E ? "default message" : "id", " as fallback."), i, r, S));
|
|
3082
|
+
}
|
|
3083
|
+
if (E)
|
|
3084
|
+
try {
|
|
3085
|
+
var T = t.getMessageFormat(E, u, l, a);
|
|
3086
|
+
return T.format(n);
|
|
3087
|
+
} catch (S) {
|
|
3088
|
+
m(new Z('Error formatting the default message for: "'.concat(p, '", rendering message verbatim'), i, r, S));
|
|
3089
|
+
}
|
|
3090
|
+
return typeof d == "string" ? d : typeof E == "string" ? E : p;
|
|
3091
|
+
}, Ce = [
|
|
3092
|
+
"formatMatcher",
|
|
3093
|
+
"timeZone",
|
|
3094
|
+
"hour12",
|
|
3095
|
+
"weekday",
|
|
3096
|
+
"era",
|
|
3097
|
+
"year",
|
|
3098
|
+
"month",
|
|
3099
|
+
"day",
|
|
3100
|
+
"hour",
|
|
3101
|
+
"minute",
|
|
3102
|
+
"second",
|
|
3103
|
+
"timeZoneName",
|
|
3104
|
+
"hourCycle",
|
|
3105
|
+
"dateStyle",
|
|
3106
|
+
"timeStyle",
|
|
3107
|
+
"calendar",
|
|
3108
|
+
// 'dayPeriod',
|
|
3109
|
+
"numberingSystem",
|
|
3110
|
+
"fractionalSecondDigits"
|
|
3111
|
+
];
|
|
3112
|
+
function j(e, t, r, n) {
|
|
3113
|
+
var a = e.locale, i = e.formats, o = e.onError, s = e.timeZone;
|
|
3114
|
+
n === void 0 && (n = {});
|
|
3115
|
+
var u = n.format, l = f(f({}, s && { timeZone: s }), u && te(i, t, u, o)), h = C(n, Ce, l);
|
|
3116
|
+
return t === "time" && !h.hour && !h.minute && !h.second && !h.timeStyle && !h.dateStyle && (h = f(f({}, h), { hour: "numeric", minute: "numeric" })), r(a, h);
|
|
3117
|
+
}
|
|
3118
|
+
function Gt(e, t) {
|
|
3119
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3120
|
+
r[n - 2] = arguments[n];
|
|
3121
|
+
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3122
|
+
try {
|
|
3123
|
+
return j(e, "date", t, o).format(s);
|
|
3124
|
+
} catch (u) {
|
|
3125
|
+
e.onError(new B("Error formatting date.", e.locale, u));
|
|
3126
|
+
}
|
|
3127
|
+
return String(s);
|
|
3128
|
+
}
|
|
3129
|
+
function Ut(e, t) {
|
|
3130
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3131
|
+
r[n - 2] = arguments[n];
|
|
3132
|
+
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3133
|
+
try {
|
|
3134
|
+
return j(e, "time", t, o).format(s);
|
|
3135
|
+
} catch (u) {
|
|
3136
|
+
e.onError(new B("Error formatting time.", e.locale, u));
|
|
3137
|
+
}
|
|
3138
|
+
return String(s);
|
|
3139
|
+
}
|
|
3140
|
+
function Vt(e, t) {
|
|
3141
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3142
|
+
r[n - 2] = arguments[n];
|
|
3143
|
+
var a = r[0], i = r[1], o = r[2], s = o === void 0 ? {} : o, u = e.timeZone, l = e.locale, h = e.onError, m = C(s, Ce, u ? { timeZone: u } : {});
|
|
3144
|
+
try {
|
|
3145
|
+
return t(l, m).formatRange(a, i);
|
|
3146
|
+
} catch (c) {
|
|
3147
|
+
h(new B("Error formatting date time range.", e.locale, c));
|
|
3148
|
+
}
|
|
3149
|
+
return String(a);
|
|
3150
|
+
}
|
|
3151
|
+
function kt(e, t) {
|
|
3152
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3153
|
+
r[n - 2] = arguments[n];
|
|
3154
|
+
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3155
|
+
try {
|
|
3156
|
+
return j(e, "date", t, o).formatToParts(s);
|
|
3157
|
+
} catch (u) {
|
|
3158
|
+
e.onError(new B("Error formatting date.", e.locale, u));
|
|
3159
|
+
}
|
|
3160
|
+
return [];
|
|
3161
|
+
}
|
|
3162
|
+
function jt(e, t) {
|
|
3163
|
+
for (var r = [], n = 2; n < arguments.length; n++)
|
|
3164
|
+
r[n - 2] = arguments[n];
|
|
3165
|
+
var a = r[0], i = r[1], o = i === void 0 ? {} : i, s = typeof a == "string" ? new Date(a || 0) : a;
|
|
3166
|
+
try {
|
|
3167
|
+
return j(e, "time", t, o).formatToParts(s);
|
|
3168
|
+
} catch (u) {
|
|
3169
|
+
e.onError(new B("Error formatting time.", e.locale, u));
|
|
3170
|
+
}
|
|
3171
|
+
return [];
|
|
3172
|
+
}
|
|
3173
|
+
var Xt = [
|
|
3174
|
+
"style",
|
|
3175
|
+
"type",
|
|
3176
|
+
"fallback",
|
|
3177
|
+
"languageDisplay"
|
|
3178
|
+
];
|
|
3179
|
+
function Wt(e, t, r, n) {
|
|
3180
|
+
var a = e.locale, i = e.onError, o = Intl.DisplayNames;
|
|
3181
|
+
o || i(new L(`Intl.DisplayNames is not available in this environment.
|
|
3182
|
+
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3183
|
+
`, P.MISSING_INTL_API));
|
|
3184
|
+
var s = C(n, Xt);
|
|
3185
|
+
try {
|
|
3186
|
+
return t(a, s).of(r);
|
|
3187
|
+
} catch (u) {
|
|
3188
|
+
i(new B("Error formatting display name.", a, u));
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
var Zt = [
|
|
3192
|
+
"type",
|
|
3193
|
+
"style"
|
|
3194
|
+
], pe = Date.now();
|
|
3195
|
+
function zt(e) {
|
|
3196
|
+
return "".concat(pe, "_").concat(e, "_").concat(pe);
|
|
3197
|
+
}
|
|
3198
|
+
function Jt(e, t, r, n) {
|
|
3199
|
+
n === void 0 && (n = {});
|
|
3200
|
+
var a = De(e, t, r, n).reduce(function(i, o) {
|
|
3201
|
+
var s = o.value;
|
|
3202
|
+
return typeof s != "string" ? i.push(s) : typeof i[i.length - 1] == "string" ? i[i.length - 1] += s : i.push(s), i;
|
|
3203
|
+
}, []);
|
|
3204
|
+
return a.length === 1 ? a[0] : a.length === 0 ? "" : a;
|
|
3205
|
+
}
|
|
3206
|
+
function De(e, t, r, n) {
|
|
3207
|
+
var a = e.locale, i = e.onError;
|
|
3208
|
+
n === void 0 && (n = {});
|
|
3209
|
+
var o = Intl.ListFormat;
|
|
3210
|
+
o || i(new L(`Intl.ListFormat is not available in this environment.
|
|
3211
|
+
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3212
|
+
`, P.MISSING_INTL_API));
|
|
3213
|
+
var s = C(n, Zt);
|
|
3214
|
+
try {
|
|
3215
|
+
var u = {}, l = r.map(function(h, m) {
|
|
3216
|
+
if (typeof h == "object") {
|
|
3217
|
+
var c = zt(m);
|
|
3218
|
+
return u[c] = h, c;
|
|
3219
|
+
}
|
|
3220
|
+
return String(h);
|
|
3221
|
+
});
|
|
3222
|
+
return t(a, s).formatToParts(l).map(function(h) {
|
|
3223
|
+
return h.type === "literal" ? h : f(f({}, h), { value: u[h.value] || h.value });
|
|
3224
|
+
});
|
|
3225
|
+
} catch (h) {
|
|
3226
|
+
i(new B("Error formatting list.", a, h));
|
|
3227
|
+
}
|
|
3228
|
+
return r;
|
|
3229
|
+
}
|
|
3230
|
+
var qt = ["type"];
|
|
3231
|
+
function Qt(e, t, r, n) {
|
|
3232
|
+
var a = e.locale, i = e.onError;
|
|
3233
|
+
n === void 0 && (n = {}), Intl.PluralRules || i(new L(`Intl.PluralRules is not available in this environment.
|
|
3234
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3235
|
+
`, P.MISSING_INTL_API));
|
|
3236
|
+
var o = C(n, qt);
|
|
3237
|
+
try {
|
|
3238
|
+
return t(a, o).select(r);
|
|
3239
|
+
} catch (s) {
|
|
3240
|
+
i(new B("Error formatting plural.", a, s));
|
|
3241
|
+
}
|
|
3242
|
+
return "other";
|
|
3243
|
+
}
|
|
3244
|
+
var Yt = ["numeric", "style"];
|
|
3245
|
+
function $t(e, t, r) {
|
|
3246
|
+
var n = e.locale, a = e.formats, i = e.onError;
|
|
3247
|
+
r === void 0 && (r = {});
|
|
3248
|
+
var o = r.format, s = !!o && te(a, "relative", o, i) || {}, u = C(r, Yt, s);
|
|
3249
|
+
return t(n, u);
|
|
3250
|
+
}
|
|
3251
|
+
function Kt(e, t, r, n, a) {
|
|
3252
|
+
a === void 0 && (a = {}), n || (n = "second");
|
|
3253
|
+
var i = Intl.RelativeTimeFormat;
|
|
3254
|
+
i || e.onError(new L(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3255
|
+
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3256
|
+
`, P.MISSING_INTL_API));
|
|
3257
|
+
try {
|
|
3258
|
+
return $t(e, t, a).format(r, n);
|
|
3259
|
+
} catch (o) {
|
|
3260
|
+
e.onError(new B("Error formatting relative time.", e.locale, o));
|
|
3261
|
+
}
|
|
3262
|
+
return String(r);
|
|
3263
|
+
}
|
|
3264
|
+
var er = [
|
|
3265
|
+
"style",
|
|
3266
|
+
"currency",
|
|
3267
|
+
"unit",
|
|
3268
|
+
"unitDisplay",
|
|
3269
|
+
"useGrouping",
|
|
3270
|
+
"minimumIntegerDigits",
|
|
3271
|
+
"minimumFractionDigits",
|
|
3272
|
+
"maximumFractionDigits",
|
|
3273
|
+
"minimumSignificantDigits",
|
|
3274
|
+
"maximumSignificantDigits",
|
|
3275
|
+
// ES2020 NumberFormat
|
|
3276
|
+
"compactDisplay",
|
|
3277
|
+
"currencyDisplay",
|
|
3278
|
+
"currencySign",
|
|
3279
|
+
"notation",
|
|
3280
|
+
"signDisplay",
|
|
3281
|
+
"unit",
|
|
3282
|
+
"unitDisplay",
|
|
3283
|
+
"numberingSystem",
|
|
3284
|
+
// ES2023 NumberFormat
|
|
3285
|
+
"trailingZeroDisplay",
|
|
3286
|
+
"roundingPriority",
|
|
3287
|
+
"roundingIncrement",
|
|
3288
|
+
"roundingMode"
|
|
3289
|
+
];
|
|
3290
|
+
function we(e, t, r) {
|
|
3291
|
+
var n = e.locale, a = e.formats, i = e.onError;
|
|
3292
|
+
r === void 0 && (r = {});
|
|
3293
|
+
var o = r.format, s = o && te(a, "number", o, i) || {}, u = C(r, er, s);
|
|
3294
|
+
return t(n, u);
|
|
3295
|
+
}
|
|
3296
|
+
function tr(e, t, r, n) {
|
|
3297
|
+
n === void 0 && (n = {});
|
|
3298
|
+
try {
|
|
3299
|
+
return we(e, t, n).format(r);
|
|
3300
|
+
} catch (a) {
|
|
3301
|
+
e.onError(new B("Error formatting number.", e.locale, a));
|
|
3302
|
+
}
|
|
3303
|
+
return String(r);
|
|
3304
|
+
}
|
|
3305
|
+
function rr(e, t, r, n) {
|
|
3306
|
+
n === void 0 && (n = {});
|
|
3307
|
+
try {
|
|
3308
|
+
return we(e, t, n).formatToParts(r);
|
|
3309
|
+
} catch (a) {
|
|
3310
|
+
e.onError(new B("Error formatting number.", e.locale, a));
|
|
3311
|
+
}
|
|
3312
|
+
return [];
|
|
3313
|
+
}
|
|
3314
|
+
function nr(e) {
|
|
3315
|
+
var t = e ? e[Object.keys(e)[0]] : void 0;
|
|
3316
|
+
return typeof t == "string";
|
|
3317
|
+
}
|
|
3318
|
+
function ar(e) {
|
|
3319
|
+
e.onWarn && e.defaultRichTextElements && nr(e.messages || {}) && e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
3320
|
+
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
3321
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3322
|
+
}
|
|
3323
|
+
function ir(e, t) {
|
|
3324
|
+
var r = wt(t), n = f(f({}, Dt), e), a = n.locale, i = n.defaultLocale, o = n.onError;
|
|
3325
|
+
return a ? !Intl.NumberFormat.supportedLocalesOf(a).length && o ? o(new fe('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 fe('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 Rt('"locale" was not configured, using "'.concat(i, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), n.locale = n.defaultLocale || "en"), ar(n), f(f({}, n), {
|
|
3326
|
+
formatters: r,
|
|
3327
|
+
formatNumber: tr.bind(null, n, r.getNumberFormat),
|
|
3328
|
+
formatNumberToParts: rr.bind(null, n, r.getNumberFormat),
|
|
3329
|
+
formatRelativeTime: Kt.bind(null, n, r.getRelativeTimeFormat),
|
|
3330
|
+
formatDate: Gt.bind(null, n, r.getDateTimeFormat),
|
|
3331
|
+
formatDateToParts: kt.bind(null, n, r.getDateTimeFormat),
|
|
3332
|
+
formatTime: Ut.bind(null, n, r.getDateTimeFormat),
|
|
3333
|
+
formatDateTimeRange: Vt.bind(null, n, r.getDateTimeFormat),
|
|
3334
|
+
formatTimeToParts: jt.bind(null, n, r.getDateTimeFormat),
|
|
3335
|
+
formatPlural: Qt.bind(null, n, r.getPluralRules),
|
|
3336
|
+
// @ts-expect-error TODO: will get to this later
|
|
3337
|
+
formatMessage: ge.bind(null, n, r),
|
|
3338
|
+
// @ts-expect-error TODO: will get to this later
|
|
3339
|
+
$t: ge.bind(null, n, r),
|
|
3340
|
+
formatList: Jt.bind(null, n, r.getListFormat),
|
|
3341
|
+
formatListToParts: De.bind(null, n, r.getListFormat),
|
|
3342
|
+
formatDisplayName: Wt.bind(null, n, r.getDisplayNames)
|
|
3343
|
+
});
|
|
3344
|
+
}
|
|
3345
|
+
function or(e) {
|
|
3346
|
+
return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
3347
|
+
}
|
|
3348
|
+
function sr(e) {
|
|
3349
|
+
return e;
|
|
3350
|
+
}
|
|
3351
|
+
function ur(e, t) {
|
|
3352
|
+
t = t || {};
|
|
3353
|
+
const r = t.delimiter || ".", n = t.maxDepth, a = t.transformKey || sr, i = {};
|
|
3354
|
+
function o(s, u, l) {
|
|
3355
|
+
l = l || 1, Object.keys(s).forEach(function(h) {
|
|
3356
|
+
const m = s[h], c = t.safe && Array.isArray(m), b = Object.prototype.toString.call(m), x = or(m), E = b === "[object Object]" || b === "[object Array]", p = u ? u + r + a(h) : a(h);
|
|
3357
|
+
if (!c && !x && E && Object.keys(m).length && (!t.maxDepth || l < n))
|
|
3358
|
+
return o(m, p, l + 1);
|
|
3359
|
+
i[p] = m;
|
|
3360
|
+
});
|
|
3361
|
+
}
|
|
3362
|
+
return o(e), i;
|
|
3363
|
+
}
|
|
3364
|
+
const hr = Me();
|
|
3365
|
+
let Fe;
|
|
3366
|
+
const ve = {
|
|
3367
|
+
year: "numeric",
|
|
3368
|
+
month: "short",
|
|
3369
|
+
day: "numeric",
|
|
3370
|
+
hour: "numeric",
|
|
3371
|
+
minute: "numeric"
|
|
3372
|
+
}, mr = (e, t, r = !1) => {
|
|
3373
|
+
var E;
|
|
3374
|
+
const n = typeof r == "boolean", a = ir(
|
|
3375
|
+
{
|
|
3376
|
+
...n ? null : r,
|
|
3377
|
+
locale: e,
|
|
3378
|
+
messages: ur(t, {
|
|
3379
|
+
safe: !0
|
|
3380
|
+
// Preserve arrays
|
|
3381
|
+
}),
|
|
3382
|
+
formats: {
|
|
3383
|
+
...n ? null : r.formats,
|
|
3384
|
+
date: {
|
|
3385
|
+
...n ? null : (E = r.formats) == null ? void 0 : E.date,
|
|
3386
|
+
datetime: ve
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
},
|
|
3390
|
+
hr
|
|
3391
|
+
), { $t: i, ...o } = a, s = o, u = (p) => p.toString().length === 13 ? Math.floor(p / 1e3) : p, l = (p) => {
|
|
3392
|
+
const d = "Invalid Date";
|
|
3393
|
+
if (!p)
|
|
3394
|
+
return d;
|
|
3395
|
+
try {
|
|
3396
|
+
const T = new Date(u(p) * 1e3);
|
|
3397
|
+
return s.formatDate(T, ve);
|
|
3398
|
+
} catch {
|
|
3399
|
+
return d;
|
|
3400
|
+
}
|
|
3401
|
+
}, x = {
|
|
3402
|
+
formatUnixTimeStamp: l,
|
|
3403
|
+
formatIsoDate: (p) => {
|
|
3404
|
+
const d = Date.parse(p) / 1e3, T = Math.floor(d);
|
|
3405
|
+
return l(T);
|
|
3406
|
+
},
|
|
3407
|
+
t: (p, d, T) => s.formatMessage({ id: p }, d, T),
|
|
3408
|
+
te: (p) => !!s.messages[p],
|
|
3409
|
+
tm: (p) => s.messages[p] || [],
|
|
3410
|
+
...s,
|
|
3411
|
+
source: t
|
|
3412
|
+
};
|
|
3413
|
+
return (typeof r == "boolean" && r === !0 || typeof r != "boolean" && r.isGlobal === !0) && (Fe = x), x;
|
|
3414
|
+
};
|
|
3415
|
+
function cr() {
|
|
3416
|
+
return Fe;
|
|
3417
|
+
}
|
|
3418
|
+
const lr = (e = null) => Ge({
|
|
3419
|
+
name: "I18nT",
|
|
3420
|
+
props: {
|
|
3421
|
+
i18n: {
|
|
3422
|
+
type: Object,
|
|
3423
|
+
default: null
|
|
3424
|
+
},
|
|
3425
|
+
keypath: {
|
|
3426
|
+
type: String,
|
|
3427
|
+
// type: String as unknown as PropType<PathToDotNotation<MessageSource, string>>, // This breaks the type interface, enable to debug
|
|
3428
|
+
required: !0
|
|
3429
|
+
},
|
|
3430
|
+
tag: {
|
|
3431
|
+
type: String,
|
|
3432
|
+
default: "span"
|
|
3433
|
+
}
|
|
3434
|
+
},
|
|
3435
|
+
setup(t, { slots: r }) {
|
|
3436
|
+
const n = (a) => {
|
|
3437
|
+
if (!a)
|
|
3438
|
+
return [];
|
|
3439
|
+
const i = /(\{[^}]+\})/g;
|
|
3440
|
+
return a.split(i).filter(Boolean);
|
|
3441
|
+
};
|
|
3442
|
+
return () => {
|
|
3443
|
+
var s;
|
|
3444
|
+
const a = Object.keys(r).filter((u) => u !== "_"), i = ((s = (e || t.i18n).messages[t.keypath]) == null ? void 0 : s.toString()) || "";
|
|
3445
|
+
let o = n(i);
|
|
3446
|
+
return o = o.filter((u) => u !== ""), o.forEach((u, l) => {
|
|
3447
|
+
if (!u.startsWith("{") && !u.endsWith("}"))
|
|
3448
|
+
return;
|
|
3449
|
+
const h = u.replace(/[\{\}]/g, "");
|
|
3450
|
+
h === "0" && r.default ? o[l] = r.default() : a.includes(h) && r[h] && (o[l] = r[h]());
|
|
3451
|
+
}), Ue(t.tag, t, o);
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3454
|
+
}), gr = {
|
|
3455
|
+
install(e, t) {
|
|
3456
|
+
const { i18n: r } = t;
|
|
3457
|
+
e.component("I18nT", lr(r));
|
|
3458
|
+
}
|
|
3459
|
+
};
|
|
3460
|
+
export {
|
|
3461
|
+
gr as Translation,
|
|
3462
|
+
mr as createI18n,
|
|
3463
|
+
lr as i18nTComponent,
|
|
3464
|
+
cr as useI18n
|
|
3465
|
+
};
|