@intlify/core 12.0.0-alpha.12 → 12.0.0-alpha.13

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @intlify/core v12.0.0-alpha.12
2
+ * @intlify/core v12.0.0-alpha.13
3
3
  * (c) 2016-present kazuya kawaguchi and contributors
4
4
  * @license MIT
5
5
  **/ var IntlifyCore = (function(e) {
@@ -76,61 +76,146 @@
76
76
  let a = n || ``;
77
77
  return `${i}=${a}${fe(e, t)}${a}`;
78
78
  }
79
- function me(e, t, n) {
79
+ let me = /^(?:area|base|basefont|bgsound|br|col|embed|frame|hr|image|img|input|keygen|link|meta|param|source|track|wbr|html|head|body|frameset)$/, F = /^(?:[bipsu]|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h[1-6]|head|hr|img|li|listing|menu|meta|nobr|ol|pre|ruby|small|span|strong|strike|sub|sup|table|tt|ul|var)$/, I = /^(?:address|article|aside|blockquote|center|details|dialog|dir|div|dl|fieldset|figcaption|figure|footer|header|hgroup|main|menu|nav|ol|p|search|section|summary|ul|h[1-6]|pre|listing|form|li|dd|dt|plaintext|table|hr|xmp)$/, L = /^(?:applet|caption|html|table|td|th|marquee|object|template|button)$/, he = /^(?:foreignobject|desc|title)$/, ge = /^(?:foreignobject|desc|mi|mo|mn|ms|mtext|annotation-xml)$/, _e = /^(?:mi|mo|mn|ms|mtext)$/, ve = /^(?:text\/html|application\/xhtml\+xml)$/i;
80
+ function ye(e) {
81
+ return e.replace(/[A-Z]+/g, (e) => e.toLowerCase());
82
+ }
83
+ function be(e, t) {
84
+ return !!e && e.namespace !== 0 && (!e.integration || _e.test(e.name) && (t === `mglyph` || t === `malignmark`)) && (e.name !== `annotation-xml` || t !== `svg`);
85
+ }
86
+ function xe(e, t) {
87
+ return F.test(e) || e === `font` && (t.has(`color`) || t.has(`face`) || t.has(`size`));
88
+ }
89
+ function Se(e, t, n) {
90
+ let r = ``;
91
+ for (let i = e.length - 1; i >= t; i--) {
92
+ let t = e[i];
93
+ t.namespace === 0 && t.name === `form` ? n[t.part] = P(n[t.part]) : r += `</${t.name}>`;
94
+ }
95
+ return e.length = t, r;
96
+ }
97
+ function Ce(e, t) {
98
+ let n = e.length;
99
+ for (; n > 0 && e[n - 1].namespace !== 0 && !e[n - 1].integration;) n--;
100
+ return Se(e, n, t);
101
+ }
102
+ function we(e, t, n, r, i) {
103
+ let a = t.length + 1, o = ``, s = e[e.length - 1];
104
+ if (be(s, n)) {
105
+ if (!xe(n, r)) return i || e.push({
106
+ name: n,
107
+ namespace: s.namespace,
108
+ integration: s.namespace === 1 ? he.test(n) : _e.test(n) || n === `annotation-xml` && ve.test((r.get(`encoding`) || ``).replace(k, ue)),
109
+ part: a
110
+ }), o;
111
+ o = Ce(e, t);
112
+ }
113
+ if (I.test(n)) for (let n = e.length - 1; n >= 0; n--) {
114
+ let r = e[n];
115
+ if (r.namespace === 0 ? L.test(r.name) : r.integration) break;
116
+ if (r.namespace === 0 && r.name === `p`) {
117
+ o += Se(e, n, t);
118
+ break;
119
+ }
120
+ }
121
+ if (!ge.test(n)) return n === `svg` || n === `math` ? i || e.push({
122
+ name: n,
123
+ namespace: n === `svg` ? 1 : 2,
124
+ integration: !1,
125
+ part: a
126
+ }) : me.test(n) || e.push({
127
+ name: n,
128
+ namespace: 0,
129
+ integration: !1,
130
+ part: a
131
+ }), o;
132
+ }
133
+ function Te(e, t, n) {
134
+ let r = ``;
135
+ (n === `p` || n === `br`) && (r = Ce(e, t));
136
+ let i = e.length - 1;
137
+ for (; i >= 0 && e[i].namespace !== 0 && e[i].name !== n;) i--;
138
+ if (!(i >= 0 && e[i].namespace !== 0)) for (; i >= 0 && (e[i].namespace !== 0 || e[i].name !== n);) i--;
139
+ return i < 0 ? n === `br` || n === `p` ? r : void 0 : (r += Se(e, i + 1, t), e.length = i, r);
140
+ }
141
+ function Ee(e, t, n) {
80
142
  A.lastIndex = t;
81
143
  let r = A.exec(e);
82
144
  if (!r) return;
83
- let [, i, a] = r, o = r[0], s;
84
- for (j.lastIndex = A.lastIndex; s = j.exec(e);) {
85
- let [r, c, l, u, d, f, p, m] = s;
86
- if (l) {
145
+ let [, i, a] = r, o = r[0], s = /* @__PURE__ */ new Map(), c;
146
+ for (j.lastIndex = A.lastIndex; c = j.exec(e);) {
147
+ let [r, l, u, d, f, p, m, h] = c;
148
+ if (u) {
87
149
  let n = j.lastIndex;
88
150
  return [
89
151
  i ? e.slice(t, n) : o + r,
90
152
  a,
91
- n
153
+ n,
154
+ !i && l.endsWith(`/`),
155
+ s
92
156
  ];
93
157
  }
94
- if (d && !p) break;
95
- i || (o += c + pe(u, d ? f : m, d, n));
158
+ if (f && !m) break;
159
+ if (!i) {
160
+ let e = f ? p : h, t = ye(d);
161
+ s.has(t) || s.set(t, e || ``), o += l + pe(d, e, f, n);
162
+ }
96
163
  }
97
164
  return [
98
165
  o,
99
166
  a,
100
- -1
167
+ -1,
168
+ !1,
169
+ s
101
170
  ];
102
171
  }
103
- function F(e, t, n) {
172
+ function De(e, t, n) {
104
173
  for (let r = e.indexOf(`</`, t); r !== -1; r = e.indexOf(`</`, r + 2)) {
105
- let t = me(e, r, {});
174
+ let t = Ee(e, r, {});
106
175
  if (t && t[1].toLowerCase() === n.toLowerCase()) return t[2] === -1 ? -1 : r;
107
176
  }
108
177
  return -1;
109
178
  }
110
- function I(e) {
111
- let t = {}, n = ``, r = 0, i;
112
- for (; (i = e.indexOf(`<`, r)) !== -1;) {
113
- n += e.slice(r, i), r = i + 1;
114
- let a = me(e, i, t);
115
- if (a) {
116
- let [o, s, c] = a;
117
- if (c === -1) {
118
- t.unclosed = !0, n += P(e.slice(i)), r = e.length;
179
+ function Oe(e) {
180
+ let t = {}, n = [], r = [], i = 0, a;
181
+ for (; (a = e.indexOf(`<`, i)) !== -1;) {
182
+ n.push(e.slice(i, a)), i = a + 1;
183
+ let o = Ee(e, a, t);
184
+ if (o) {
185
+ let [s, c, l, u, d] = o;
186
+ if (l === -1) {
187
+ t.unclosed = !0, n.push(P(e.slice(a))), i = e.length;
119
188
  break;
120
189
  }
121
- if (r = c, o[1] === `/`) n += o;
122
- else if (ce.test(s)) t.element = !0, n += P(o);
123
- else if (le.test(s)) {
124
- let i = F(e, c, s);
125
- i === -1 ? (t.unclosed = !0, n += P(o)) : (n += o + P(e.slice(c, i)), r = i);
126
- } else n += o;
127
- } else M.lastIndex = i, M.test(e) ? (n += e.slice(i, M.lastIndex), r = M.lastIndex) : (e.startsWith(`<!--`, i) && (t.unclosed = !0), n += `&lt;`);
128
- }
129
- return n += e.slice(r), n;
130
- }
131
- let L = (e) => !b(e) || g(e);
132
- function R(e, t) {
133
- if (L(e) || L(t) || t === Object.prototype) throw Error(`Invalid value`);
190
+ if (i = l, s[1] === `/`) {
191
+ let e = Te(r, n, ye(c));
192
+ e === void 0 ? t.closed = !0 : (e && (t.closed = !0), n.push(e + s));
193
+ } else if (ce.test(c)) t.element = !0, n.push(P(s));
194
+ else {
195
+ let a = ``;
196
+ if (le.test(c)) {
197
+ let r = De(e, l, c);
198
+ if (r === -1) {
199
+ t.unclosed = !0, n.push(P(s));
200
+ continue;
201
+ }
202
+ a = P(e.slice(l, r)), i = r;
203
+ }
204
+ let o = we(r, n, ye(c), d, u);
205
+ o === void 0 ? (t.closed = !0, n.push(P(s) + a)) : n.push(o, s + a);
206
+ }
207
+ } else M.lastIndex = a, M.test(e) ? (n.push(e.slice(a, M.lastIndex)), i = M.lastIndex) : (e.startsWith(`<!--`, a) && (t.unclosed = !0), n.push(`&lt;`));
208
+ }
209
+ n.push(e.slice(i));
210
+ for (let e = r.length - 1; e >= 0; e--) {
211
+ let i = r[e];
212
+ t.closed = !0, i.namespace === 0 && i.name === `form` ? n[i.part] = P(n[i.part]) : n.push(`</${i.name}>`);
213
+ }
214
+ return n.join(``);
215
+ }
216
+ let ke = (e) => !b(e) || g(e);
217
+ function Ae(e, t) {
218
+ if (ke(e) || ke(t) || t === Object.prototype) throw Error(`Invalid value`);
134
219
  let n = [e, t];
135
220
  for (; n.length;) {
136
221
  let e = n.pop(), t = n.pop(), r = Object.keys(t);
@@ -152,21 +237,21 @@
152
237
  }
153
238
  }
154
239
  }
155
- function he(e, t, n) {
240
+ function je(e, t, n) {
156
241
  return {
157
242
  line: e,
158
243
  column: t,
159
244
  offset: n
160
245
  };
161
246
  }
162
- function ge(e, t, n) {
247
+ function Me(e, t, n) {
163
248
  let r = {
164
249
  start: e,
165
250
  end: t
166
251
  };
167
252
  return n != null && (r.source = n), r;
168
253
  }
169
- let z = {
254
+ let R = {
170
255
  EXPECTED_TOKEN: 1,
171
256
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
172
257
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
@@ -184,30 +269,30 @@
184
269
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
185
270
  UNHANDLED_MINIFIER_NODE_TYPE: 16
186
271
  };
187
- z.EXPECTED_TOKEN, z.INVALID_TOKEN_IN_PLACEHOLDER, z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, z.UNKNOWN_ESCAPE_SEQUENCE, z.INVALID_UNICODE_ESCAPE_SEQUENCE, z.UNBALANCED_CLOSING_BRACE, z.UNTERMINATED_CLOSING_BRACE, z.EMPTY_PLACEHOLDER, z.NOT_ALLOW_NEST_PLACEHOLDER, z.INVALID_LINKED_FORMAT, z.MUST_HAVE_MESSAGES_IN_PLURAL, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, z.UNEXPECTED_EMPTY_LINKED_KEY, z.UNEXPECTED_LEXICAL_ANALYSIS, z.UNHANDLED_CODEGEN_NODE_TYPE, z.UNHANDLED_MINIFIER_NODE_TYPE;
188
- function B(e, t, n = {}) {
272
+ R.EXPECTED_TOKEN, R.INVALID_TOKEN_IN_PLACEHOLDER, R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, R.UNKNOWN_ESCAPE_SEQUENCE, R.INVALID_UNICODE_ESCAPE_SEQUENCE, R.UNBALANCED_CLOSING_BRACE, R.UNTERMINATED_CLOSING_BRACE, R.EMPTY_PLACEHOLDER, R.NOT_ALLOW_NEST_PLACEHOLDER, R.INVALID_LINKED_FORMAT, R.MUST_HAVE_MESSAGES_IN_PLURAL, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, R.UNEXPECTED_EMPTY_LINKED_KEY, R.UNEXPECTED_LEXICAL_ANALYSIS, R.UNHANDLED_CODEGEN_NODE_TYPE, R.UNHANDLED_MINIFIER_NODE_TYPE;
273
+ function z(e, t, n = {}) {
189
274
  let { domain: r, messages: i, args: a } = n, o = SyntaxError(String(e));
190
275
  return o.code = e, t && (o.location = t), o.domain = r, o;
191
276
  }
192
- function _e(e) {
277
+ function Ne(e) {
193
278
  throw e;
194
279
  }
195
- function V(e) {
280
+ function B(e) {
196
281
  switch (e.t = e.type, e.type) {
197
282
  case 0: {
198
283
  let t = e;
199
- V(t.body), t.b = t.body, delete t.body;
284
+ B(t.body), t.b = t.body, delete t.body;
200
285
  break;
201
286
  }
202
287
  case 1: {
203
288
  let t = e, n = t.cases;
204
- for (let e = 0; e < n.length; e++) V(n[e]);
289
+ for (let e = 0; e < n.length; e++) B(n[e]);
205
290
  t.c = n, delete t.cases;
206
291
  break;
207
292
  }
208
293
  case 2: {
209
294
  let t = e, n = t.items;
210
- for (let e = 0; e < n.length; e++) V(n[e]);
295
+ for (let e = 0; e < n.length; e++) B(n[e]);
211
296
  t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
212
297
  break;
213
298
  }
@@ -221,7 +306,7 @@
221
306
  }
222
307
  case 6: {
223
308
  let t = e;
224
- V(t.key), t.k = t.key, delete t.key, t.modifier && (V(t.modifier), t.m = t.modifier, delete t.modifier);
309
+ B(t.key), t.k = t.key, delete t.key, t.modifier && (B(t.modifier), t.m = t.modifier, delete t.modifier);
225
310
  break;
226
311
  }
227
312
  case 5: {
@@ -237,11 +322,11 @@
237
322
  }
238
323
  delete e.type;
239
324
  }
240
- function ve(e) {
325
+ function Pe(e) {
241
326
  let t = e.body;
242
- return t.type === 2 ? ye(t) : t.cases.forEach((e) => ye(e)), e;
327
+ return t.type === 2 ? Fe(t) : t.cases.forEach((e) => Fe(e)), e;
243
328
  }
244
- function ye(e) {
329
+ function Fe(e) {
245
330
  if (e.items.length === 1) {
246
331
  let t = e.items[0];
247
332
  (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
@@ -261,7 +346,7 @@
261
346
  }
262
347
  }
263
348
  }
264
- function be(e) {
349
+ function Ie(e) {
265
350
  let t = e, n = 0, r = 1, i = 1, a = 0, o = (e) => t[e] === `\r` && t[e + 1] === `
266
351
  `, s = (e) => t[e] === `
267
352
  `, c = (e) => t[e] === `\u2029`, l = (e) => t[e] === `\u2028`, u = (e) => o(e) || s(e) || c(e) || l(e), d = () => n, f = () => r, p = () => i, m = () => a, h = (e) => o(e) || c(e) || l(e) ? `
@@ -298,8 +383,8 @@
298
383
  skipToPeek: S
299
384
  };
300
385
  }
301
- function xe(e, t = {}) {
302
- let n = t.location !== !1, r = be(e), i = () => r.index(), a = () => he(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
386
+ function Le(e, t = {}) {
387
+ let n = t.location !== !1, r = Ie(e), i = () => r.index(), a = () => je(r.line(), r.column(), r.index()), o = a(), s = i(), c = {
303
388
  currentType: 13,
304
389
  offset: s,
305
390
  startLoc: o,
@@ -315,7 +400,7 @@
315
400
  function d(e, t, r, ...i) {
316
401
  let a = l();
317
402
  if (t.column += r, t.offset += r, u) {
318
- let r = B(e, n ? ge(a.startLoc, t) : null, {
403
+ let r = z(e, n ? Me(a.startLoc, t) : null, {
319
404
  domain: `tokenizer`,
320
405
  args: i
321
406
  });
@@ -325,11 +410,11 @@
325
410
  function f(e, t, r) {
326
411
  e.endLoc = a(), e.currentType = t;
327
412
  let i = { type: t };
328
- return n && (i.loc = ge(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
413
+ return n && (i.loc = Me(e.startLoc, e.endLoc)), r != null && (i.value = r), i;
329
414
  }
330
415
  let p = (e) => f(e, 13);
331
416
  function m(e, t) {
332
- return e.currentChar() === t ? (e.next(), t) : (d(z.EXPECTED_TOKEN, a(), 0, t), ``);
417
+ return e.currentChar() === t ? (e.next(), t) : (d(R.EXPECTED_TOKEN, a(), 0, t), ``);
333
418
  }
334
419
  function h(e) {
335
420
  let t = ``;
@@ -480,14 +565,14 @@
480
565
  if (r && r !== `}` && r !== void 0 && r !== ` ` && r !== `
481
566
  ` && r !== ` `) {
482
567
  let t = fe(e);
483
- return d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
568
+ return d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n + t), n + t;
484
569
  }
485
- return e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
570
+ return e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n;
486
571
  }
487
572
  function A(e) {
488
573
  g(e);
489
574
  let t = ``;
490
- return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
575
+ return e.currentChar() === `-` ? (e.next(), t += `-${se(e)}`) : t += se(e), e.currentChar() === void 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t;
491
576
  }
492
577
  function j(e) {
493
578
  return e !== `'` && e !== `
@@ -499,7 +584,7 @@
499
584
  for (; t = O(e, j);) n += t === `\\` ? ue(e) : t;
500
585
  let r = e.currentChar();
501
586
  return r === `
502
- ` || r === void 0 ? (d(z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
587
+ ` || r === void 0 ? (d(R.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), r === `
503
588
  ` && (e.next(), m(e, `'`)), n) : (m(e, `'`), n);
504
589
  }
505
590
  function ue(e) {
@@ -509,7 +594,7 @@
509
594
  case `'`: return e.next(), `\\${t}`;
510
595
  case `u`: return N(e, t, 4);
511
596
  case `U`: return N(e, t, 6);
512
- default: return d(z.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
597
+ default: return d(R.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, t), ``;
513
598
  }
514
599
  }
515
600
  function N(e, t, n) {
@@ -518,7 +603,7 @@
518
603
  for (let i = 0; i < n; i++) {
519
604
  let n = oe(e);
520
605
  if (!n) {
521
- d(z.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
606
+ d(R.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${t}${r}${e.currentChar()}`);
522
607
  break;
523
608
  }
524
609
  r += n;
@@ -558,17 +643,17 @@
558
643
  function I(e, t) {
559
644
  let n = null;
560
645
  switch (e.currentChar()) {
561
- case `{`: return t.braceNest >= 1 && d(z.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
562
- case `}`: return t.braceNest > 0 && t.currentType === 2 && d(z.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
563
- case `@`: return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = L(e, t) || p(t), t.braceNest = 0, n;
646
+ case `{`: return t.braceNest >= 1 && d(R.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), e.next(), n = f(t, 2, `{`), g(e), t.braceNest++, n;
647
+ case `}`: return t.braceNest > 0 && t.currentType === 2 && d(R.EMPTY_PLACEHOLDER, a(), 0), e.next(), n = f(t, 3, `}`), t.braceNest--, t.braceNest > 0 && g(e), t.inLinked && t.braceNest === 0 && (t.inLinked = !1), n;
648
+ case `@`: return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = L(e, t) || p(t), t.braceNest = 0, n;
564
649
  default: {
565
650
  let r = !0, i = !0, o = !0;
566
- if (E(e)) return t.braceNest > 0 && d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
567
- if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(z.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, R(e, t);
651
+ if (E(e)) return t.braceNest > 0 && d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
652
+ if (t.braceNest > 0 && (t.currentType === 4 || t.currentType === 5 || t.currentType === 6)) return d(R.UNTERMINATED_CLOSING_BRACE, a(), 0), t.braceNest = 0, he(e, t);
568
653
  if (r = y(e, t)) return n = f(t, 4, le(e)), g(e), n;
569
654
  if (i = b(e, t)) return n = f(t, 5, A(e)), g(e), n;
570
655
  if (o = x(e, t)) return n = f(t, 6, M(e)), g(e), n;
571
- if (!r && !i && !o) return n = f(t, 12, fe(e)), d(z.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
656
+ if (!r && !i && !o) return n = f(t, 12, fe(e)), d(R.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, n.value), g(e), n;
572
657
  break;
573
658
  }
574
659
  }
@@ -577,20 +662,20 @@
577
662
  function L(e, t) {
578
663
  let { currentType: n } = t, r = null, i = e.currentChar();
579
664
  switch (n !== 7 && n !== 8 && n !== 11 && n !== 9 || i !== `
580
- ` && i !== ` ` || d(z.INVALID_LINKED_FORMAT, a(), 0), i) {
665
+ ` && i !== ` ` || d(R.INVALID_LINKED_FORMAT, a(), 0), i) {
581
666
  case `@`: return e.next(), r = f(t, 7, `@`), t.inLinked = !0, r;
582
667
  case `.`: return g(e), e.next(), f(t, 8, `.`);
583
668
  case `:`: return g(e), e.next(), f(t, 9, `:`);
584
- default: return E(e) ? (r = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), L(e, t)) : C(e, t) ? (g(e), f(t, 11, P(e))) : T(e, t) ? (g(e), i === `{` ? I(e, t) || r : f(t, 10, me(e))) : (n === 7 && d(z.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, R(e, t));
669
+ default: return E(e) ? (r = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, r) : S(e, t) || w(e, t) ? (g(e), L(e, t)) : C(e, t) ? (g(e), f(t, 11, P(e))) : T(e, t) ? (g(e), i === `{` ? I(e, t) || r : f(t, 10, me(e))) : (n === 7 && d(R.INVALID_LINKED_FORMAT, a(), 0), t.braceNest = 0, t.inLinked = !1, he(e, t));
585
670
  }
586
671
  }
587
- function R(e, t) {
672
+ function he(e, t) {
588
673
  let n = { type: 13 };
589
674
  if (t.braceNest > 0) return I(e, t) || p(t);
590
675
  if (t.inLinked) return L(e, t) || p(t);
591
676
  switch (e.currentChar()) {
592
677
  case `{`: return I(e, t) || p(t);
593
- case `}`: return d(z.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
678
+ case `}`: return d(R.UNBALANCED_CLOSING_BRACE, a(), 0), e.next(), f(t, 3, `}`);
594
679
  case `@`: return L(e, t) || p(t);
595
680
  default:
596
681
  if (E(e)) return n = f(t, 1, F(e)), t.braceNest = 0, t.inLinked = !1, n;
@@ -598,22 +683,22 @@
598
683
  }
599
684
  return n;
600
685
  }
601
- function _e() {
686
+ function ge() {
602
687
  let { currentType: e, offset: t, startLoc: n, endLoc: o } = c;
603
- return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : R(r, c);
688
+ return c.lastType = e, c.lastOffset = t, c.lastStartLoc = n, c.lastEndLoc = o, c.offset = i(), c.startLoc = a(), r.currentChar() === void 0 ? f(c, 13) : he(r, c);
604
689
  }
605
690
  return {
606
- nextToken: _e,
691
+ nextToken: ge,
607
692
  currentOffset: i,
608
693
  currentPosition: a,
609
694
  context: l
610
695
  };
611
696
  }
612
- let Se = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, Ce = /\\([\\@{}|])/g;
613
- function we(e, t) {
697
+ let Re = /\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6})/g, ze = /\\([\\@{}|])/g;
698
+ function Be(e, t) {
614
699
  return t;
615
700
  }
616
- function Te(e, t, n) {
701
+ function Ve(e, t, n) {
617
702
  switch (e) {
618
703
  case `\\\\`: return `\\`;
619
704
  case `\\'`: return `'`;
@@ -623,12 +708,12 @@
623
708
  }
624
709
  }
625
710
  }
626
- function Ee(e = {}) {
711
+ function He(e = {}) {
627
712
  let t = e.location !== !1, { onError: n } = e;
628
713
  function r(e, r, i, a, ...o) {
629
714
  let s = e.currentPosition();
630
715
  if (s.offset += a, s.column += a, n) {
631
- let e = B(r, t ? ge(i, s) : null, {
716
+ let e = z(r, t ? Me(i, s) : null, {
632
717
  domain: `parser`,
633
718
  args: o
634
719
  });
@@ -647,7 +732,7 @@
647
732
  }
648
733
  function o(e, t) {
649
734
  let n = e.context(), r = i(3, n.offset, n.startLoc);
650
- return r.value = t.replace(Ce, we), a(r, e.currentOffset(), e.currentPosition()), r;
735
+ return r.value = t.replace(ze, Be), a(r, e.currentOffset(), e.currentPosition()), r;
651
736
  }
652
737
  function s(e, t) {
653
738
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(5, n, r);
@@ -659,11 +744,11 @@
659
744
  }
660
745
  function u(e, t) {
661
746
  let { lastOffset: n, lastStartLoc: r } = e.context(), o = i(9, n, r);
662
- return o.value = t.replace(Se, Te), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
747
+ return o.value = t.replace(Re, Ve), e.nextToken(), a(o, e.currentOffset(), e.currentPosition()), o;
663
748
  }
664
749
  function d(e) {
665
750
  let t = e.nextToken(), n = e.context(), { lastOffset: o, lastStartLoc: s } = n, c = i(8, o, s);
666
- return t.type === 11 ? (t.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, H(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, z.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
751
+ return t.type === 11 ? (t.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, n.lastStartLoc, 0, V(t)), c.value = t.value || ``, a(c, e.currentOffset(), e.currentPosition()), { node: c }) : (r(e, R.UNEXPECTED_EMPTY_LINKED_MODIFIER, n.lastStartLoc, 0), c.value = ``, a(c, o, s), {
667
752
  nextConsumeToken: t,
668
753
  node: c
669
754
  });
@@ -678,21 +763,21 @@
678
763
  let t = d(e);
679
764
  n.modifier = t.node, o = t.nextConsumeToken || e.nextToken();
680
765
  }
681
- switch (o.type !== 9 && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
766
+ switch (o.type !== 9 && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), o = e.nextToken(), o.type === 2 && (o = e.nextToken()), o.type) {
682
767
  case 10:
683
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = f(e, o.value || ``);
768
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = f(e, o.value || ``);
684
769
  break;
685
770
  case 4:
686
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = c(e, o.value || ``);
771
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = c(e, o.value || ``);
687
772
  break;
688
773
  case 5:
689
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = s(e, o.value || ``);
774
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = s(e, o.value || ``);
690
775
  break;
691
776
  case 6:
692
- o.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(o)), n.key = u(e, o.value || ``);
777
+ o.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(o)), n.key = u(e, o.value || ``);
693
778
  break;
694
779
  default: {
695
- r(e, z.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
780
+ r(e, R.UNEXPECTED_EMPTY_LINKED_KEY, t.lastStartLoc, 0);
696
781
  let s = e.context(), c = i(7, s.offset, s.startLoc);
697
782
  return c.value = ``, a(c, s.offset, s.startLoc), n.key = c, a(n, s.offset, s.startLoc), {
698
783
  nextConsumeToken: o,
@@ -710,16 +795,16 @@
710
795
  let i = l || e.nextToken();
711
796
  switch (l = null, i.type) {
712
797
  case 0:
713
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(o(e, i.value || ``));
798
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(o(e, i.value || ``));
714
799
  break;
715
800
  case 5:
716
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(s(e, i.value || ``));
801
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(s(e, i.value || ``));
717
802
  break;
718
803
  case 4:
719
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(c(e, i.value || ``));
804
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(c(e, i.value || ``));
720
805
  break;
721
806
  case 6:
722
- i.value == null && r(e, z.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, H(i)), n.items.push(u(e, i.value || ``));
807
+ i.value == null && r(e, R.UNEXPECTED_LEXICAL_ANALYSIS, t.lastStartLoc, 0, V(i)), n.items.push(u(e, i.value || ``));
723
808
  break;
724
809
  case 7: {
725
810
  let t = p(e);
@@ -737,164 +822,164 @@
737
822
  let t = m(e);
738
823
  c || (c = t.items.length === 0), l.cases.push(t);
739
824
  } while (s.currentType !== 13);
740
- return c && r(e, z.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
825
+ return c && r(e, R.MUST_HAVE_MESSAGES_IN_PLURAL, n, 0), a(l, e.currentOffset(), e.currentPosition()), l;
741
826
  }
742
827
  function g(e) {
743
828
  let t = e.context(), { offset: n, startLoc: r } = t, i = m(e);
744
829
  return t.currentType === 13 ? i : h(e, n, r, i);
745
830
  }
746
831
  function _(n) {
747
- let o = xe(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
748
- return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, z.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
832
+ let o = Le(n, l({}, e)), s = o.context(), c = i(0, s.offset, s.startLoc);
833
+ return t && c.loc && (c.loc.source = n), c.body = g(o), e.onCacheKey && (c.cacheKey = e.onCacheKey(n)), s.currentType !== 13 && r(o, R.UNEXPECTED_LEXICAL_ANALYSIS, s.lastStartLoc, 0, n[s.offset] || ``), a(c, o.currentOffset(), o.currentPosition()), c;
749
834
  }
750
835
  return { parse: _ };
751
836
  }
752
- function H(e) {
837
+ function V(e) {
753
838
  if (e.type === 13) return `EOF`;
754
839
  let t = (e.value || ``).replace(/\r?\n/gu, `\\n`);
755
840
  return t.length > 10 ? t.slice(0, 9) + `…` : t;
756
841
  }
757
- function U(e) {
758
- return b(e) && Ie(e) === 0 && (p(e, `b`) || p(e, `body`));
842
+ function H(e) {
843
+ return b(e) && Qe(e) === 0 && (p(e, `b`) || p(e, `body`));
759
844
  }
760
- let De = [`b`, `body`];
761
- function Oe(e) {
762
- return G(e, De);
845
+ let Ue = [`b`, `body`];
846
+ function We(e) {
847
+ return W(e, Ue);
763
848
  }
764
- let ke = [`c`, `cases`];
765
- function Ae(e) {
766
- return G(e, ke, []);
849
+ let Ge = [`c`, `cases`];
850
+ function Ke(e) {
851
+ return W(e, Ge, []);
767
852
  }
768
- let je = [`s`, `static`];
769
- function Me(e) {
770
- return G(e, je);
853
+ let qe = [`s`, `static`];
854
+ function Je(e) {
855
+ return W(e, qe);
771
856
  }
772
- let Ne = [`i`, `items`];
773
- function Pe(e) {
774
- return G(e, Ne, []);
857
+ let Ye = [`i`, `items`];
858
+ function Xe(e) {
859
+ return W(e, Ye, []);
775
860
  }
776
- let Fe = [`t`, `type`];
777
- function Ie(e) {
778
- return G(e, Fe);
861
+ let Ze = [`t`, `type`];
862
+ function Qe(e) {
863
+ return W(e, Ze);
779
864
  }
780
- let Le = [`v`, `value`];
781
- function W(e, t) {
782
- let n = G(e, Le);
865
+ let $e = [`v`, `value`];
866
+ function U(e, t) {
867
+ let n = W(e, $e);
783
868
  if (n != null) return n;
784
- throw K(t);
869
+ throw G(t);
785
870
  }
786
- let Re = [`m`, `modifier`];
787
- function ze(e) {
788
- return G(e, Re);
871
+ let et = [`m`, `modifier`];
872
+ function tt(e) {
873
+ return W(e, et);
789
874
  }
790
- let Be = [`k`, `key`];
791
- function Ve(e) {
792
- let t = G(e, Be);
875
+ let nt = [`k`, `key`];
876
+ function rt(e) {
877
+ let t = W(e, nt);
793
878
  if (t) return t;
794
- throw K(6);
879
+ throw G(6);
795
880
  }
796
- function G(e, t, n) {
881
+ function W(e, t, n) {
797
882
  for (let n = 0; n < t.length; n++) {
798
883
  let r = t[n];
799
884
  if (p(e, r) && e[r] != null) return e[r];
800
885
  }
801
886
  return n;
802
887
  }
803
- let He = [
804
- ...De,
805
- ...ke,
806
- ...je,
807
- ...Ne,
808
- ...Be,
809
- ...Re,
810
- ...Le,
811
- ...Fe
888
+ let it = [
889
+ ...Ue,
890
+ ...Ge,
891
+ ...qe,
892
+ ...Ye,
893
+ ...nt,
894
+ ...et,
895
+ ...$e,
896
+ ...Ze
812
897
  ];
813
- function K(e) {
898
+ function G(e) {
814
899
  return Error(`unhandled node type: ${e}`);
815
900
  }
816
- function Ue(e) {
817
- return (t) => We(t, e);
901
+ function at(e) {
902
+ return (t) => ot(t, e);
818
903
  }
819
- function We(e, t) {
820
- let n = Oe(t);
821
- if (n == null) throw K(0);
822
- if (Ie(n) === 1) {
823
- let t = Ae(n);
824
- return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], Ge(e, n)], []));
904
+ function ot(e, t) {
905
+ let n = We(t);
906
+ if (n == null) throw G(0);
907
+ if (Qe(n) === 1) {
908
+ let t = Ke(n);
909
+ return e.plural(t.reduce((t, n) => [...g(t) ? t : [t], st(e, n)], []));
825
910
  }
826
- return Ge(e, n);
911
+ return st(e, n);
827
912
  }
828
- function Ge(e, t) {
829
- let n = Me(t);
913
+ function st(e, t) {
914
+ let n = Je(t);
830
915
  if (n != null) return e.type === `text` ? n : e.normalize([n]);
831
916
  {
832
- let n = Pe(t).reduce((t, n) => [...t, Ke(e, n)], []);
917
+ let n = Xe(t).reduce((t, n) => [...t, ct(e, n)], []);
833
918
  return e.normalize(n);
834
919
  }
835
920
  }
836
- function Ke(e, t) {
837
- let n = Ie(t);
921
+ function ct(e, t) {
922
+ let n = Qe(t);
838
923
  switch (n) {
839
- case 3: return W(t, n);
840
- case 9: return W(t, n);
924
+ case 3: return U(t, n);
925
+ case 9: return U(t, n);
841
926
  case 4: {
842
927
  let r = t;
843
928
  if (p(r, `k`) && r.k) return e.interpolate(e.named(r.k));
844
929
  if (p(r, `key`) && r.key) return e.interpolate(e.named(r.key));
845
- throw K(n);
930
+ throw G(n);
846
931
  }
847
932
  case 5: {
848
933
  let r = t;
849
934
  if (p(r, `i`) && a(r.i)) return e.interpolate(e.list(r.i));
850
935
  if (p(r, `index`) && a(r.index)) return e.interpolate(e.list(r.index));
851
- throw K(n);
936
+ throw G(n);
852
937
  }
853
938
  case 6: {
854
- let n = t, r = ze(n), i = Ve(n);
855
- return e.linked(Ke(e, i), r ? Ke(e, r) : void 0, e.type);
939
+ let n = t, r = tt(n), i = rt(n);
940
+ return e.linked(ct(e, i), r ? ct(e, r) : void 0, e.type);
856
941
  }
857
- case 7: return W(t, n);
858
- case 8: return W(t, n);
942
+ case 7: return U(t, n);
943
+ case 8: return U(t, n);
859
944
  default: throw Error(`unhandled node on format message part: ${n}`);
860
945
  }
861
946
  }
862
- let qe = (e) => e, q = d();
863
- function Je() {
864
- q = d();
947
+ let lt = (e) => e, K = d();
948
+ function ut() {
949
+ K = d();
865
950
  }
866
- function Ye(e, t = {}) {
867
- let n = !1, r = t.onError || _e;
951
+ function dt(e, t = {}) {
952
+ let n = !1, r = t.onError || Ne;
868
953
  t.onError = (e) => {
869
954
  n = !0, r(e);
870
955
  };
871
- let i = Ee(t).parse(e);
872
- return t.optimize && ve(i), t.mangle && V(i), {
956
+ let i = He(t).parse(e);
957
+ return t.optimize && Pe(i), t.mangle && B(i), {
873
958
  ast: i,
874
959
  detectError: n,
875
960
  code: ``
876
961
  };
877
962
  }
878
- function Xe(e, t) {
963
+ function ft(e, t) {
879
964
  if (v(e)) {
880
965
  y(t.warnHtmlMessage) && t.warnHtmlMessage;
881
- let n = (t.onCacheKey || qe)(e), r = q[n];
966
+ let n = (t.onCacheKey || lt)(e), r = K[n];
882
967
  if (r) return r;
883
- let { ast: i, detectError: a } = Ye(e, {
968
+ let { ast: i, detectError: a } = dt(e, {
884
969
  ...t,
885
970
  location: !1,
886
971
  mangle: !0,
887
972
  optimize: !0
888
- }), o = Ue(i);
889
- return a ? o : q[n] = o;
973
+ }), o = at(i);
974
+ return a ? o : K[n] = o;
890
975
  }
891
976
  {
892
- if (!U(e)) return (() => e);
977
+ if (!H(e)) return (() => e);
893
978
  let t = e.cacheKey;
894
- return t ? q[t] || (q[t] = Ue(e)) : Ue(e);
979
+ return t ? K[t] || (K[t] = at(e)) : at(e);
895
980
  }
896
981
  }
897
- let J = {
982
+ let q = {
898
983
  INVALID_ARGUMENT: 17,
899
984
  INVALID_DATE_ARGUMENT: 18,
900
985
  INVALID_ISO_DATE_ARGUMENT: 19,
@@ -902,56 +987,56 @@
902
987
  NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 21,
903
988
  NOT_SUPPORT_LOCALE_TYPE: 22
904
989
  };
905
- function Y(e) {
906
- return B(e, null, void 0);
990
+ function J(e) {
991
+ return z(e, null, void 0);
907
992
  }
908
- J.INVALID_ARGUMENT, J.INVALID_DATE_ARGUMENT, J.INVALID_ISO_DATE_ARGUMENT, J.NOT_SUPPORT_LOCALE_PROMISE_VALUE, J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, J.NOT_SUPPORT_LOCALE_TYPE;
909
- function Ze(e, t) {
910
- return t.locale == null ? $e(e.locale) : $e(t.locale);
993
+ q.INVALID_ARGUMENT, q.INVALID_DATE_ARGUMENT, q.INVALID_ISO_DATE_ARGUMENT, q.NOT_SUPPORT_LOCALE_PROMISE_VALUE, q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION, q.NOT_SUPPORT_LOCALE_TYPE;
994
+ function pt(e, t) {
995
+ return t.locale == null ? ht(e.locale) : ht(t.locale);
911
996
  }
912
- let Qe;
913
- function $e(e) {
997
+ let mt;
998
+ function ht(e) {
914
999
  if (v(e)) return e;
915
1000
  if (_(e)) {
916
- if (e.resolvedOnce && Qe != null) return Qe;
1001
+ if (e.resolvedOnce && mt != null) return mt;
917
1002
  if (e.constructor.name === `Function`) {
918
1003
  let t = e();
919
- if (x(t)) throw Y(J.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
920
- return Qe = t;
1004
+ if (x(t)) throw J(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
1005
+ return mt = t;
921
1006
  }
922
- throw Y(J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
1007
+ throw J(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
923
1008
  }
924
- throw Y(J.NOT_SUPPORT_LOCALE_TYPE);
1009
+ throw J(q.NOT_SUPPORT_LOCALE_TYPE);
925
1010
  }
926
- function et(e, t, n) {
1011
+ function gt(e, t, n) {
927
1012
  return [.../* @__PURE__ */ new Set([n, ...g(t) ? t : b(t) ? Object.keys(t).filter((e) => e !== "default") : v(t) ? [t] : [n]])];
928
1013
  }
929
- function tt(e, t, n) {
930
- let r = v(n) ? n : _t, i = e, a;
1014
+ function _t(e, t, n) {
1015
+ let r = v(n) ? n : Z, i = e, a;
931
1016
  b(t) ? (i.__localeChainObjectCache || (i.__localeChainObjectCache = /* @__PURE__ */ new WeakMap()), a = i.__localeChainObjectCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainObjectCache.set(t, a))) : (i.__localeChainCache || (i.__localeChainCache = /* @__PURE__ */ new Map()), a = i.__localeChainCache.get(t), a || (a = /* @__PURE__ */ new Map(), i.__localeChainCache.set(t, a)));
932
1017
  let o = a.get(r);
933
1018
  if (o) return o;
934
1019
  let s = [], c = [n];
935
- for (; g(c);) c = nt(s, c, t);
1020
+ for (; g(c);) c = vt(s, c, t);
936
1021
  let l = g(t) || !w(t) ? t : t.default ? t.default : null;
937
- return c = v(l) ? [l] : l, g(c) && nt(s, c, !1), a.set(r, s), s;
1022
+ return c = v(l) ? [l] : l, g(c) && vt(s, c, !1), a.set(r, s), s;
938
1023
  }
939
- function nt(e, t, n) {
1024
+ function vt(e, t, n) {
940
1025
  let r = !0;
941
1026
  for (let i = 0; i < t.length && y(r); i++) {
942
1027
  let a = t[i];
943
- v(a) && (r = rt(e, t[i], n));
1028
+ v(a) && (r = yt(e, t[i], n));
944
1029
  }
945
1030
  return r;
946
1031
  }
947
- function rt(e, t, n) {
1032
+ function yt(e, t, n) {
948
1033
  let r, i = t.split(`-`);
949
1034
  do
950
- r = it(e, i.join(`-`), n), i.splice(-1, 1);
1035
+ r = bt(e, i.join(`-`), n), i.splice(-1, 1);
951
1036
  while (i.length && r === !0);
952
1037
  return r;
953
1038
  }
954
- function it(e, t, n) {
1039
+ function bt(e, t, n) {
955
1040
  let r = !1;
956
1041
  if (!e.includes(t) && (r = !0, t)) {
957
1042
  r = t[t.length - 1] !== `!`;
@@ -960,53 +1045,53 @@
960
1045
  }
961
1046
  return r;
962
1047
  }
963
- let X = [];
964
- X[0] = {
1048
+ let Y = [];
1049
+ Y[0] = {
965
1050
  w: [0],
966
1051
  i: [3, 0],
967
1052
  "[": [4],
968
1053
  o: [7]
969
- }, X[1] = {
1054
+ }, Y[1] = {
970
1055
  w: [1],
971
1056
  ".": [2],
972
1057
  "[": [4],
973
1058
  o: [7]
974
- }, X[2] = {
1059
+ }, Y[2] = {
975
1060
  w: [2],
976
1061
  i: [3, 0],
977
1062
  0: [3, 0]
978
- }, X[3] = {
1063
+ }, Y[3] = {
979
1064
  i: [3, 0],
980
1065
  0: [3, 0],
981
1066
  w: [1, 1],
982
1067
  ".": [2, 1],
983
1068
  "[": [4, 1],
984
1069
  o: [7, 1]
985
- }, X[4] = {
1070
+ }, Y[4] = {
986
1071
  "'": [5, 0],
987
1072
  "\"": [6, 0],
988
1073
  "[": [4, 2],
989
1074
  "]": [1, 3],
990
1075
  o: 8,
991
1076
  l: [4, 0]
992
- }, X[5] = {
1077
+ }, Y[5] = {
993
1078
  "'": [4, 0],
994
1079
  o: 8,
995
1080
  l: [5, 0]
996
- }, X[6] = {
1081
+ }, Y[6] = {
997
1082
  "\"": [4, 0],
998
1083
  o: 8,
999
1084
  l: [6, 0]
1000
1085
  };
1001
- let at = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1002
- function ot(e) {
1003
- return at.test(e);
1086
+ let xt = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
1087
+ function St(e) {
1088
+ return xt.test(e);
1004
1089
  }
1005
- function st(e) {
1090
+ function Ct(e) {
1006
1091
  let t = e.charCodeAt(0);
1007
1092
  return t === e.charCodeAt(e.length - 1) && (t === 34 || t === 39) ? e.slice(1, -1) : e;
1008
1093
  }
1009
- function ct(e) {
1094
+ function wt(e) {
1010
1095
  if (e == null) return `o`;
1011
1096
  switch (e.charCodeAt(0)) {
1012
1097
  case 91:
@@ -1027,11 +1112,11 @@
1027
1112
  }
1028
1113
  return `i`;
1029
1114
  }
1030
- function lt(e) {
1115
+ function Tt(e) {
1031
1116
  let t = e.trim();
1032
- return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : ot(t) ? st(t) : `*` + t;
1117
+ return e.charAt(0) === `0` && isNaN(parseInt(e)) ? !1 : St(t) ? Ct(t) : `*` + t;
1033
1118
  }
1034
- function ut(e) {
1119
+ function Et(e) {
1035
1120
  let t = [], n = -1, r = 0, i = 0, a, o, s, c, l, u, d, f = [];
1036
1121
  f[0] = () => {
1037
1122
  o === void 0 ? o = s : o += s;
@@ -1042,7 +1127,7 @@
1042
1127
  }, f[3] = () => {
1043
1128
  if (i > 0) i--, r = 4, f[0]();
1044
1129
  else {
1045
- if (i = 0, o === void 0 || (o = lt(o), o === !1)) return !1;
1130
+ if (i = 0, o === void 0 || (o = Tt(o), o === !1)) return !1;
1046
1131
  f[1]();
1047
1132
  }
1048
1133
  };
@@ -1051,29 +1136,29 @@
1051
1136
  if (r === 5 && t === `'` || r === 6 && t === `"`) return n++, s = `\\` + t, f[0](), !0;
1052
1137
  }
1053
1138
  for (; r !== null;) if (n++, a = e[n], !(a === `\\` && p())) {
1054
- if (c = ct(a), d = X[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
1139
+ if (c = wt(a), d = Y[r], l = d[c] || d.l || 8, l === 8 || (r = l[0], l[1] !== void 0 && (u = f[l[1]], u && (s = a, u() === !1)))) return;
1055
1140
  if (r === 7) return t;
1056
1141
  }
1057
1142
  }
1058
- let dt = /* @__PURE__ */ new Map();
1059
- function ft(e, t) {
1143
+ let Dt = /* @__PURE__ */ new Map();
1144
+ function Ot(e, t) {
1060
1145
  return b(e) ? m(e, t) : null;
1061
1146
  }
1062
- function pt(e, t) {
1147
+ function kt(e, t) {
1063
1148
  if (!b(e)) return null;
1064
- let n = dt.get(t);
1065
- if (n || (n = ut(t), n && dt.set(t, n)), !n) return null;
1149
+ let n = Dt.get(t);
1150
+ if (n || (n = Et(t), n && Dt.set(t, n)), !n) return null;
1066
1151
  let r = n.length, i = e, a = 0;
1067
1152
  for (; a < r;) {
1068
1153
  let e = n[a];
1069
- if (He.includes(e) && U(i) || !b(i) || !p(i, e)) return null;
1154
+ if (it.includes(e) && H(i) || !b(i) || !p(i, e)) return null;
1070
1155
  let t = i[e];
1071
1156
  if (t === void 0 || _(i)) return null;
1072
1157
  i = t, a++;
1073
1158
  }
1074
1159
  return i;
1075
1160
  }
1076
- let Z = {
1161
+ let X = {
1077
1162
  NOT_FOUND_KEY: 1,
1078
1163
  FALLBACK_TO_TRANSLATE: 2,
1079
1164
  CANNOT_FORMAT_NUMBER: 3,
@@ -1086,50 +1171,50 @@
1086
1171
  IGNORE_UNSAFE_LOCALE: 10,
1087
1172
  FALLBACK_TO_DEFAULT_PLURAL_RULE: 11,
1088
1173
  FALLBACK_FROM_INVALID_LOCALE: 12
1089
- }, mt = {
1090
- [Z.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1091
- [Z.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1092
- [Z.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1093
- [Z.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1094
- [Z.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1095
- [Z.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1096
- [Z.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
1097
- [Z.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1098
- [Z.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1099
- [Z.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1100
- [Z.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1101
- [Z.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1174
+ }, At = {
1175
+ [X.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale {resource}.`,
1176
+ [X.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
1177
+ [X.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
1178
+ [X.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
1179
+ [X.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
1180
+ [X.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
1181
+ [X.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,
1182
+ [X.INVALID_NUMBER_ARGUMENT]: `Invalid argument for number formatting: expected a number but received '{value}'.`,
1183
+ [X.INVALID_DATE_ARGUMENT]: `Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`,
1184
+ [X.IGNORE_UNSAFE_LOCALE]: `Ignore '{locale}' locale: it is a property name of Object.prototype`,
1185
+ [X.FALLBACK_TO_DEFAULT_PLURAL_RULE]: `Fall back to the default plural rule for '{locale}' locale: Intl.PluralRules does not support it`,
1186
+ [X.FALLBACK_FROM_INVALID_LOCALE]: `Fall back to '{target}' locale for {type} formatting with '{locale}' locale: it is not a BCP 47 language tag`
1102
1187
  };
1103
- function ht(e, ...t) {
1104
- return n(mt[e], ...t);
1188
+ function jt(e, ...t) {
1189
+ return n(At[e], ...t);
1105
1190
  }
1106
- let gt = `12.0.0-alpha.12`, _t = `en-US`, vt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1107
- function yt() {
1191
+ let Mt = `12.0.0-alpha.13`, Z = `en-US`, Nt = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
1192
+ function Pt() {
1108
1193
  return {
1109
1194
  upper: (e, t) => t === `text` && v(e) ? e.toUpperCase() : t === `vnode` && b(e) && `__v_isVNode` in e ? e.children.toUpperCase() : e,
1110
1195
  lower: (e, t) => t === `text` && v(e) ? e.toLowerCase() : t === `vnode` && b(e) && `__v_isVNode` in e ? e.children.toLowerCase() : e,
1111
- capitalize: (e, t) => t === `text` && v(e) ? vt(e) : t === `vnode` && b(e) && `__v_isVNode` in e ? vt(e.children) : e
1196
+ capitalize: (e, t) => t === `text` && v(e) ? Nt(e) : t === `vnode` && b(e) && `__v_isVNode` in e ? Nt(e.children) : e
1112
1197
  };
1113
1198
  }
1114
- let bt;
1115
- function xt(e) {
1116
- bt = e;
1199
+ let Ft;
1200
+ function It(e) {
1201
+ Ft = e;
1117
1202
  }
1118
- let St;
1119
- function Ct(e) {
1120
- St = e;
1203
+ let Lt;
1204
+ function Rt(e) {
1205
+ Lt = e;
1121
1206
  }
1122
- let wt;
1123
- function Tt(e) {
1124
- wt = e;
1207
+ let zt;
1208
+ function Bt(e) {
1209
+ zt = e;
1125
1210
  }
1126
- let Et = 0;
1127
- function Dt(e = {}) {
1128
- let t = _(e.onWarn) ? e.onWarn : D, n = v(e.version) ? e.version : gt, r = v(e.locale) || _(e.locale) ? e.locale : _t, i = _(r) ? _t : r, a = jt(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ot(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ot(i), c = w(e.numberFormats) ? e.numberFormats : Ot(i), u = l(d(), e.modifiers, yt()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !Mt(e.missingWarn) || e.missingWarn, h = !Mt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, T = !y(e.warnHtmlMessage) || e.warnHtmlMessage, E = !!e.escapeParameter, O = _(e.messageCompiler) ? e.messageCompiler : bt || null, ee = _(e.messageResolver) ? e.messageResolver : St || ft, te = _(e.localeFallbacker) ? e.localeFallbacker : wt || et, ne = b(e.fallbackContext) ? e.fallbackContext : void 0;
1129
- Et++;
1211
+ let Vt = 0;
1212
+ function Ht(e = {}) {
1213
+ let t = _(e.onWarn) ? e.onWarn : D, n = v(e.version) ? e.version : Mt, r = v(e.locale) || _(e.locale) ? e.locale : Z, i = _(r) ? Z : r, a = Kt(e.fallbackLocale) ? e.fallbackLocale : i, o = w(e.messages) ? e.messages : Ut(i), s = w(e.datetimeFormats) ? e.datetimeFormats : Ut(i), c = w(e.numberFormats) ? e.numberFormats : Ut(i), u = l(d(), e.modifiers, Pt()), f = e.pluralRules || d(), p = _(e.missing) ? e.missing : null, m = !qt(e.missingWarn) || e.missingWarn, h = !qt(e.fallbackWarn) || e.fallbackWarn, g = !!e.fallbackFormat, x = !!e.unresolving, S = _(e.postTranslation) ? e.postTranslation : null, C = w(e.processor) ? e.processor : null, T = !y(e.warnHtmlMessage) || e.warnHtmlMessage, E = !!e.escapeParameter, O = _(e.messageCompiler) ? e.messageCompiler : Ft || null, ee = _(e.messageResolver) ? e.messageResolver : Lt || Ot, te = _(e.localeFallbacker) ? e.localeFallbacker : zt || gt, ne = b(e.fallbackContext) ? e.fallbackContext : void 0;
1214
+ Vt++;
1130
1215
  let k = {
1131
1216
  version: n,
1132
- cid: Et,
1217
+ cid: Vt,
1133
1218
  locale: r,
1134
1219
  fallbackLocale: a,
1135
1220
  messages: o,
@@ -1152,29 +1237,29 @@
1152
1237
  };
1153
1238
  return k.datetimeFormats = s, k.numberFormats = c, k.__datetimeFormatters = /* @__PURE__ */ new Map(), k.__numberFormatters = /* @__PURE__ */ new Map(), k;
1154
1239
  }
1155
- let Ot = (e) => ({ [e]: d() });
1156
- function kt(e, t) {
1240
+ let Ut = (e) => ({ [e]: d() });
1241
+ function Wt(e, t) {
1157
1242
  let n = m(e.messages, t);
1158
1243
  if (n == null) return;
1159
1244
  let r = d();
1160
- return R(n, r), r;
1245
+ return Ae(n, r), r;
1161
1246
  }
1162
- function At(e, t, n) {
1247
+ function Gt(e, t, n) {
1163
1248
  h(t) || (e.messages[t] = n);
1164
1249
  }
1165
- function jt(e) {
1250
+ function Kt(e) {
1166
1251
  return v(e) || g(e) || w(e) || e === !1;
1167
1252
  }
1168
- function Mt(e) {
1253
+ function qt(e) {
1169
1254
  return y(e) || s(e);
1170
1255
  }
1171
- function Nt(e, t) {
1256
+ function Jt(e, t) {
1172
1257
  return s(e) ? e.test(t) : e;
1173
1258
  }
1174
- function Pt(e, t) {
1259
+ function Yt(e, t) {
1175
1260
  return s(e) ? e.test(t) : e;
1176
1261
  }
1177
- function Ft(e, t, n, r, i) {
1262
+ function Xt(e, t, n, r, i) {
1178
1263
  let { missing: a, onWarn: o } = e;
1179
1264
  if (a !== null) {
1180
1265
  let r = a(e, n, t, i);
@@ -1182,84 +1267,84 @@
1182
1267
  }
1183
1268
  return t;
1184
1269
  }
1185
- function It(e, t) {
1270
+ function Zt(e, t) {
1186
1271
  let n = e;
1187
1272
  b(t) ? n.__localeChainObjectCache?.delete(t) : n.__localeChainCache?.delete(t);
1188
1273
  }
1189
- function Lt(e, t, n) {
1190
- It(e, n), e.fallbackContext && It(e.fallbackContext, n);
1274
+ function Qt(e, t, n) {
1275
+ Zt(e, n), e.fallbackContext && Zt(e.fallbackContext, n);
1191
1276
  {
1192
1277
  let { __datetimeFormatters: t, __numberFormatters: n } = e;
1193
1278
  t.clear(), n.clear();
1194
1279
  }
1195
1280
  e.localeFallbacker(e, n, t);
1196
1281
  }
1197
- function Rt(e, t) {
1282
+ function $t(e, t) {
1198
1283
  return e !== t && e.split(`-`)[0] === t.split(`-`)[0];
1199
1284
  }
1200
- function zt(e, t) {
1285
+ function en(e, t) {
1201
1286
  let n = t.indexOf(e);
1202
1287
  if (n === -1) return !1;
1203
- for (let r = n + 1; r < t.length; r++) if (Rt(e, t[r])) return !0;
1288
+ for (let r = n + 1; r < t.length; r++) if ($t(e, t[r])) return !0;
1204
1289
  return !1;
1205
1290
  }
1206
- function Bt(e, t, n, r, i, a, o) {
1291
+ function tn(e, t, n, r, i, a, o) {
1207
1292
  let { fallbackLocale: s, localeFallbacker: c, onWarn: l } = e, u = c(e, s, n);
1208
1293
  for (let n = 0; n < u.length; n++) {
1209
1294
  let a = u[n], s = m(m(r, a) || {}, t);
1210
1295
  if (w(s) && v(a)) return a;
1211
- Ft(e, t, a, i, o);
1296
+ Xt(e, t, a, i, o);
1212
1297
  }
1213
1298
  return null;
1214
1299
  }
1215
- function Vt(e) {
1300
+ function nn(e) {
1216
1301
  try {
1217
1302
  return Intl.getCanonicalLocales(e), !0;
1218
1303
  } catch {
1219
1304
  return !1;
1220
1305
  }
1221
1306
  }
1222
- function Ht(e, t, n, r, i) {
1307
+ function rn(e, t, n, r, i) {
1223
1308
  try {
1224
1309
  return new t(n, r);
1225
1310
  } catch (i) {
1226
- if (Vt(n)) throw i;
1311
+ if (nn(n)) throw i;
1227
1312
  let { fallbackLocale: a, localeFallbacker: o, onWarn: s } = e;
1228
- return new t(o(e, a, n).find(Vt) || `en-US`, r);
1313
+ return new t(o(e, a, n).find(nn) || `en-US`, r);
1229
1314
  }
1230
1315
  }
1231
- function Ut(e, [t, n, r, i], a, o, s, c) {
1232
- let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = Ze(e, r);
1316
+ function an(e, [t, n, r, i], a, o, s, c) {
1317
+ let u = y(r.missingWarn) ? r.missingWarn : e.missingWarn, d = y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, f = !!r.part, p = pt(e, r);
1233
1318
  if (!v(t) || t === ``) {
1234
- let t = Ht(e, a, p.replace(/!/g, ``), i, c);
1319
+ let t = rn(e, a, p.replace(/!/g, ``), i, c);
1235
1320
  return f ? t.formatToParts(n) : t.format(n);
1236
1321
  }
1237
- let m = Bt(e, t, p, s, u, d, c);
1322
+ let m = tn(e, t, p, s, u, d, c);
1238
1323
  if (!v(m)) return e.unresolving ? -1 : t;
1239
- let h = s[m][t], g = Wt(m, t, i), _ = o.get(g);
1240
- return _ || (_ = Ht(e, a, m, l({}, h, i), c), o.set(g, _)), f ? _.formatToParts(n) : _.format(n);
1324
+ let h = s[m][t], g = on(m, t, i), _ = o.get(g);
1325
+ return _ || (_ = rn(e, a, m, l({}, h, i), c), o.set(g, _)), f ? _.formatToParts(n) : _.format(n);
1241
1326
  }
1242
- function Wt(e, t, n) {
1327
+ function on(e, t, n) {
1243
1328
  let r = `${e}__${t}`;
1244
1329
  return w(n) && !c(n) && (r = `${r}__${JSON.stringify(n)}`), r;
1245
1330
  }
1246
- function Gt(e, t, n) {
1331
+ function sn(e, t, n) {
1247
1332
  for (let r in n) {
1248
1333
  let n = `${t}__${r}`;
1249
1334
  for (let t of e.keys()) (t === n || t.startsWith(`${n}__`)) && e.delete(t);
1250
1335
  }
1251
1336
  }
1252
- function Kt(e, t, n, r) {
1337
+ function cn(e, t, n, r) {
1253
1338
  let [, i, a, o] = e, s = n;
1254
1339
  return v(i) ? t.key = i : w(i) && Object.keys(i).forEach((e) => {
1255
1340
  r.includes(e) ? s[e] = i[e] : t[e] = i[e];
1256
1341
  }), v(a) ? t.locale = a : w(a) && (s = a), w(o) && (s = o), s;
1257
1342
  }
1258
- function qt(e, ...t) {
1343
+ function ln(e, ...t) {
1259
1344
  let { datetimeFormats: n, onWarn: r } = e, { __datetimeFormatters: i } = e;
1260
- return !v(t[0]) && !o(t[0]) && !a(t[0]) ? `` : Ut(e, Yt(...t), Intl.DateTimeFormat, i, n, `datetime format`);
1345
+ return !v(t[0]) && !o(t[0]) && !a(t[0]) ? `` : an(e, dn(...t), Intl.DateTimeFormat, i, n, `datetime format`);
1261
1346
  }
1262
- let Jt = [
1347
+ let un = [
1263
1348
  `localeMatcher`,
1264
1349
  `weekday`,
1265
1350
  `era`,
@@ -1281,24 +1366,24 @@
1281
1366
  `hourCycle`,
1282
1367
  `fractionalSecondDigits`
1283
1368
  ];
1284
- function Yt(...e) {
1369
+ function dn(...e) {
1285
1370
  let [t] = e, n = d(), r = d(), i;
1286
1371
  if (v(t)) {
1287
1372
  let e = t.match(/^(\d{4}-\d{2}-\d{2})(?:(T|\s)(.+))?$/);
1288
- if (!e) throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1373
+ if (!e) throw J(q.INVALID_ISO_DATE_ARGUMENT);
1289
1374
  let n = e[3] ? e[3].trim().startsWith(`T`) ? `${e[1].trim()}${e[3].trim()}` : `${e[1].trim()}T${e[3].trim()}` : e[1].trim();
1290
1375
  i = new Date(n);
1291
1376
  try {
1292
1377
  i.toISOString();
1293
1378
  } catch {
1294
- throw Y(J.INVALID_ISO_DATE_ARGUMENT);
1379
+ throw J(q.INVALID_ISO_DATE_ARGUMENT);
1295
1380
  }
1296
1381
  } else if (o(t)) {
1297
- if (isNaN(t.getTime())) throw Y(J.INVALID_DATE_ARGUMENT);
1382
+ if (isNaN(t.getTime())) throw J(q.INVALID_DATE_ARGUMENT);
1298
1383
  i = t;
1299
1384
  } else if (a(t)) i = t;
1300
- else throw Y(J.INVALID_ARGUMENT);
1301
- let s = Kt(e, n, r, Jt);
1385
+ else throw J(q.INVALID_ARGUMENT);
1386
+ let s = cn(e, n, r, un);
1302
1387
  return [
1303
1388
  n.key || ``,
1304
1389
  i,
@@ -1306,14 +1391,14 @@
1306
1391
  s
1307
1392
  ];
1308
1393
  }
1309
- function Xt(e, t, n) {
1310
- Gt(e.__datetimeFormatters, t, n);
1394
+ function fn(e, t, n) {
1395
+ sn(e.__datetimeFormatters, t, n);
1311
1396
  }
1312
- function Zt(e, ...t) {
1397
+ function pn(e, ...t) {
1313
1398
  let { numberFormats: n, onWarn: r } = e, { __numberFormatters: i } = e;
1314
- return a(t[0]) ? Ut(e, $t(...t), Intl.NumberFormat, i, n, `number format`) : ``;
1399
+ return a(t[0]) ? an(e, hn(...t), Intl.NumberFormat, i, n, `number format`) : ``;
1315
1400
  }
1316
- let Qt = [
1401
+ let mn = [
1317
1402
  `localeMatcher`,
1318
1403
  `style`,
1319
1404
  `currency`,
@@ -1335,10 +1420,10 @@
1335
1420
  `roundingIncrement`,
1336
1421
  `trailingZeroDisplay`
1337
1422
  ];
1338
- function $t(...e) {
1423
+ function hn(...e) {
1339
1424
  let [t] = e, n = d(), r = d();
1340
- if (!a(t)) throw Y(J.INVALID_ARGUMENT);
1341
- let i = t, o = Kt(e, n, r, Qt);
1425
+ if (!a(t)) throw J(q.INVALID_ARGUMENT);
1426
+ let i = t, o = cn(e, n, r, mn);
1342
1427
  return [
1343
1428
  n.key || ``,
1344
1429
  i,
@@ -1346,14 +1431,14 @@
1346
1431
  o
1347
1432
  ];
1348
1433
  }
1349
- function en(e, t, n) {
1350
- Gt(e.__numberFormatters, t, n);
1434
+ function gn(e, t, n) {
1435
+ sn(e.__numberFormatters, t, n);
1351
1436
  }
1352
- let tn = (e) => e, nn = (e) => ``, rn = `text`, an = (e) => e.length === 0 ? `` : E(e), on = T;
1353
- function sn(e, t) {
1437
+ let _n = (e) => e, vn = (e) => ``, yn = `text`, bn = (e) => e.length === 0 ? `` : E(e), xn = T;
1438
+ function Sn(e, t) {
1354
1439
  return e = Math.abs(e), t === 2 ? e === 1 ? 0 : 1 : Math.min(e, 2);
1355
1440
  }
1356
- let cn = [
1441
+ let Cn = [
1357
1442
  `zero`,
1358
1443
  `one`,
1359
1444
  `two`,
@@ -1361,41 +1446,41 @@
1361
1446
  `many`,
1362
1447
  `other`
1363
1448
  ], Q = /* @__PURE__ */ new Map();
1364
- function ln(e) {
1449
+ function wn(e) {
1365
1450
  try {
1366
1451
  if (Intl.PluralRules.supportedLocalesOf(e).length === 0) return null;
1367
1452
  let t = new Intl.PluralRules(e);
1368
1453
  return {
1369
1454
  rules: t,
1370
- categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => cn.indexOf(e) - cn.indexOf(t))
1455
+ categories: t.resolvedOptions().pluralCategories.slice().sort((e, t) => Cn.indexOf(e) - Cn.indexOf(t))
1371
1456
  };
1372
1457
  } catch {
1373
1458
  return null;
1374
1459
  }
1375
1460
  }
1376
- function un(e) {
1461
+ function Tn(e) {
1377
1462
  let t = Q.get(e);
1378
- return t === void 0 && (t = ln(e), Q.size >= 1e3 && Q.delete(Q.keys().next().value), Q.set(e, t)), t;
1463
+ return t === void 0 && (t = wn(e), Q.size >= 1e3 && Q.delete(Q.keys().next().value), Q.set(e, t)), t;
1379
1464
  }
1380
- function dn(e) {
1465
+ function En(e) {
1381
1466
  return a(e.pluralIndex) ? e.pluralIndex : a(e.named?.count) ? e.named.count : a(e.named?.n) ? e.named.n : -1;
1382
1467
  }
1383
- function fn(e = {}) {
1384
- let t = e.locale, n = dn(e), r;
1468
+ function Dn(e = {}) {
1469
+ let t = e.locale, n = En(e), r;
1385
1470
  r = v(t) && e.pluralRules && _(m(e.pluralRules, t)) ? e.pluralRules[t] : v(t) && typeof Intl < `u` && Intl.PluralRules !== void 0 ? (e, n) => {
1386
- let r = un(t);
1387
- if (r === null || n > r.categories.length) return sn(e, n);
1471
+ let r = Tn(t);
1472
+ if (r === null || n > r.categories.length) return Sn(e, n);
1388
1473
  let { rules: i, categories: a } = r, o = i.select(Math.abs(e)), s = a.indexOf(o);
1389
1474
  return Math.min(s === -1 ? n - 1 : s, n - 1);
1390
- } : sn;
1391
- let i = r === sn ? void 0 : sn, o = (e) => e[r(n, e.length, i)], s = e.list || [], c = (e) => s[e], u = e.named || d(), f = a(e.pluralIndex), p = (t) => {
1475
+ } : Sn;
1476
+ let i = r === Sn ? void 0 : Sn, o = (e) => e[r(n, e.length, i)], s = e.list || [], c = (e) => s[e], u = e.named || d(), f = a(e.pluralIndex), p = (t) => {
1392
1477
  let n = h(t) ? m(u, t) : u[t];
1393
1478
  return f && n == null && (t === `count` || t === `n`) ? e.pluralIndex : n;
1394
1479
  };
1395
1480
  function y(t, n) {
1396
- return (_(e.messages) ? e.messages(t, !!n) : b(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : nn);
1481
+ return (_(e.messages) ? e.messages(t, !!n) : b(e.messages) ? e.messages[t] : !1) || (e.parent ? e.parent.message(t) : vn);
1397
1482
  }
1398
- let x = (t) => e.modifiers ? m(e.modifiers, t) : tn, S = _(e.processor?.normalize) ? e.processor.normalize : an, C = _(e.processor?.interpolate) ? e.processor.interpolate : on, w = {
1483
+ let x = (t) => e.modifiers ? m(e.modifiers, t) : _n, S = _(e.processor?.normalize) ? e.processor.normalize : bn, C = _(e.processor?.interpolate) ? e.processor.interpolate : xn, w = {
1399
1484
  list: c,
1400
1485
  named: p,
1401
1486
  plural: o,
@@ -1408,7 +1493,7 @@
1408
1493
  return _(l) ? l(c, i) : c;
1409
1494
  },
1410
1495
  message: y,
1411
- type: v(e.processor?.type) ? e.processor.type : rn,
1496
+ type: v(e.processor?.type) ? e.processor.type : yn,
1412
1497
  interpolate: C,
1413
1498
  normalize: S,
1414
1499
  values: l(d(), s, u, f ? {
@@ -1418,28 +1503,28 @@
1418
1503
  };
1419
1504
  return w;
1420
1505
  }
1421
- let pn = () => ``, $ = (e) => _(e), mn = (e) => v(e) || U(e) || $(e);
1422
- function hn(e, ...t) {
1423
- let [n, r] = xn(...t), i = Ze(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1424
- a && gn(r);
1506
+ let On = () => ``, $ = (e) => _(e), kn = (e) => v(e) || H(e) || $(e);
1507
+ function An(e, ...t) {
1508
+ let [n, r] = In(...t), i = pt(e, r), a = y(r.escapeParameter) ? r.escapeParameter : e.escapeParameter;
1509
+ a && jn(r);
1425
1510
  let o = !!r.resolvedMessage, [s, c, l] = o ? [
1426
1511
  n,
1427
1512
  i,
1428
1513
  m(e.messages, i) || d()
1429
- ] : yn(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1430
- if (!o && !mn(s)) {
1514
+ ] : Pn(e, n, i, e.fallbackLocale, y(r.fallbackWarn) ? r.fallbackWarn : e.fallbackWarn, y(r.missingWarn) ? r.missingWarn : e.missingWarn), u = n;
1515
+ if (!o && !kn(s)) {
1431
1516
  let t = v(r.default) ? r.default : y(r.default) || e.fallbackFormat ? e.messageCompiler ? n : () => n : null;
1432
1517
  (e.fallbackFormat || t != null && (v(t) || _(t))) && (s = t, u = s);
1433
1518
  }
1434
- if (!o && (!mn(s) || !v(c))) return e.unresolving ? -1 : n;
1435
- let f = !1, p = $(s) ? s : bn(e, n, c, s, u, () => {
1519
+ if (!o && (!kn(s) || !v(c))) return e.unresolving ? -1 : n;
1520
+ let f = !1, p = $(s) ? s : Fn(e, n, c, s, u, () => {
1436
1521
  f = !0;
1437
1522
  });
1438
1523
  if (f) return s;
1439
- let h = p(fn(Cn(e, c, l, r, a))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1440
- return a && v(g) && (g = I(g)), g;
1524
+ let h = p(Dn(Rn(e, c, l, r, a))), g = e.postTranslation ? e.postTranslation(h, n) : h;
1525
+ return a && v(g) && (g = Oe(g)), g;
1441
1526
  }
1442
- function gn(e) {
1527
+ function jn(e) {
1443
1528
  if (g(e.list) && (e.list = e.list.map((e) => v(e) ? O(e) : e)), b(e.named)) {
1444
1529
  let t = e.named, n = d();
1445
1530
  for (let e of Object.keys(t)) {
@@ -1449,16 +1534,16 @@
1449
1534
  e.named = n;
1450
1535
  }
1451
1536
  }
1452
- function _n(e) {
1537
+ function Mn(e) {
1453
1538
  return v(e) ? e : O(T(e));
1454
1539
  }
1455
- function vn(e, t) {
1456
- return !t || _(e?.interpolate) ? e ?? void 0 : l({}, e, { interpolate: _n });
1540
+ function Nn(e, t) {
1541
+ return !t || _(e?.interpolate) ? e ?? void 0 : l({}, e, { interpolate: Mn });
1457
1542
  }
1458
- function yn(e, t, n, r, i, a) {
1543
+ function Pn(e, t, n, r, i, a) {
1459
1544
  let { messages: o, onWarn: s, messageResolver: c, localeFallbacker: l } = e, u = l(e, r, n), f = d(), p, h = null;
1460
- for (let n = 0; n < u.length && (p = u[n], f = m(o, p) || d(), (h = c(f, t)) === null && (h = m(f, t)), !mn(h)); n++) if (!zt(p, u)) {
1461
- let n = Ft(e, t, p, a, `translate`);
1545
+ for (let n = 0; n < u.length && (p = u[n], f = m(o, p) || d(), (h = c(f, t)) === null && (h = m(f, t)), !kn(h)); n++) if (!en(p, u)) {
1546
+ let n = Xt(e, t, p, a, `translate`);
1462
1547
  n !== t && (h = n);
1463
1548
  }
1464
1549
  return [
@@ -1467,7 +1552,7 @@
1467
1552
  f
1468
1553
  ];
1469
1554
  }
1470
- function bn(e, t, n, r, i, a) {
1555
+ function Fn(e, t, n, r, i, a) {
1471
1556
  if ($(r)) {
1472
1557
  let e = r;
1473
1558
  return e.locale = e.locale || n, e.key = e.key || t, e;
@@ -1476,16 +1561,16 @@
1476
1561
  let e = (() => r);
1477
1562
  return e.locale = n, e.key = t, e;
1478
1563
  }
1479
- let o = e.messageCompiler(r, Sn(e, n, i, r, e.warnHtmlMessage, a));
1564
+ let o = e.messageCompiler(r, Ln(e, n, i, r, e.warnHtmlMessage, a));
1480
1565
  return o.locale = n, o.key = t, o.source = r, o;
1481
1566
  }
1482
- function xn(...e) {
1567
+ function In(...e) {
1483
1568
  let [t, n, r] = e;
1484
- if (!v(t) && !a(t) && !$(t) && !U(t)) throw Y(J.INVALID_ARGUMENT);
1569
+ if (!v(t) && !a(t) && !$(t) && !H(t)) throw J(q.INVALID_ARGUMENT);
1485
1570
  let i = a(t) ? String(t) : ($(t), t), o = d();
1486
1571
  return a(n) ? o.plural = n : v(n) ? o.default = n : w(n) && !c(n) ? o.named = n : g(n) && (o.list = n), a(r) ? o.plural = r : v(r) ? o.default = r : w(r) && l(o, r), [i, o];
1487
1572
  }
1488
- function Sn(e, t, n, i, a, o) {
1573
+ function Ln(e, t, n, i, a, o) {
1489
1574
  return {
1490
1575
  locale: t,
1491
1576
  key: n,
@@ -1496,7 +1581,7 @@
1496
1581
  onCacheKey: (e) => r(t, n, e)
1497
1582
  };
1498
1583
  }
1499
- function Cn(e, t, n, r, i) {
1584
+ function Rn(e, t, n, r, i) {
1500
1585
  let { modifiers: o, pluralRules: s, messageResolver: c, fallbackLocale: l, fallbackWarn: u, missingWarn: d, fallbackContext: f } = e;
1501
1586
  return {
1502
1587
  locale: t,
@@ -1505,22 +1590,22 @@
1505
1590
  messages: (r, i) => {
1506
1591
  let a = c(n, r);
1507
1592
  if (a == null && (f || i)) {
1508
- let [n, , i] = yn(f || e, r, t, l, u, d);
1593
+ let [n, , i] = Pn(f || e, r, t, l, u, d);
1509
1594
  a = n ?? c(i, r);
1510
1595
  }
1511
- if (v(a) || U(a)) {
1512
- let n = !1, i = bn(e, r, t, a, r, () => {
1596
+ if (v(a) || H(a)) {
1597
+ let n = !1, i = Fn(e, r, t, a, r, () => {
1513
1598
  n = !0;
1514
1599
  });
1515
- return n ? pn : i;
1600
+ return n ? On : i;
1516
1601
  }
1517
- return $(a) ? a : pn;
1602
+ return $(a) ? a : On;
1518
1603
  },
1519
- processor: vn(e.processor, i),
1604
+ processor: Nn(e.processor, i),
1520
1605
  list: r.list ?? void 0,
1521
1606
  named: r.named ?? void 0,
1522
1607
  pluralIndex: a(r.plural) ? r.plural : void 0
1523
1608
  };
1524
1609
  }
1525
- return e.AST_NODE_PROPS_KEYS = He, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = Z, e.DATETIME_FORMAT_OPTIONS_KEYS = Jt, e.DEFAULT_LOCALE = _t, e.DEFAULT_MESSAGE_DATA_TYPE = rn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = Qt, e.VERSION = gt, e.clearCompileCache = Je, e.clearDateTimeFormat = Xt, e.clearNumberFormat = en, e.compile = Xe, e.createCompileError = B, e.createCoreContext = Dt, e.createCoreError = Y, e.createMessageContext = fn, e.datetime = qt, e.fallbackWithLocaleChain = tt, e.fallbackWithSimple = et, e.getLocale = Ze, e.getLocaleMessage = kt, e.getWarnMessage = ht, e.handleMissing = Ft, e.isAlmostSameLocale = Rt, e.isFallbackLocale = jt, e.isImplicitFallback = zt, e.isMessageAST = U, e.isMessageFormat = mn, e.isMessageFunction = $, e.isTranslateFallbackWarn = Nt, e.isTranslateMissingWarn = Pt, e.isWarnOption = Mt, e.number = Zt, e.parse = ut, e.parseDateTimeArgs = Yt, e.parseNumberArgs = $t, e.parseTranslateArgs = xn, e.registerLocaleFallbacker = Tt, e.registerMessageCompiler = xt, e.registerMessageResolver = Ct, e.resolveLocale = $e, e.resolveValue = pt, e.resolveWithKeyValue = ft, e.setLocaleMessage = At, e.translate = hn, e.updateFallbackLocale = Lt, e;
1610
+ return e.AST_NODE_PROPS_KEYS = it, e.CORE_ERROR_CODES_EXTEND_POINT = 23, e.CORE_WARN_CODES_EXTEND_POINT = 13, e.CoreWarnCodes = X, e.DATETIME_FORMAT_OPTIONS_KEYS = un, e.DEFAULT_LOCALE = Z, e.DEFAULT_MESSAGE_DATA_TYPE = yn, e.MISSING_RESOLVE_VALUE = ``, e.NOT_RESOLVED = -1, e.NUMBER_FORMAT_OPTIONS_KEYS = mn, e.VERSION = Mt, e.clearCompileCache = ut, e.clearDateTimeFormat = fn, e.clearNumberFormat = gn, e.compile = ft, e.createCompileError = z, e.createCoreContext = Ht, e.createCoreError = J, e.createMessageContext = Dn, e.datetime = ln, e.fallbackWithLocaleChain = _t, e.fallbackWithSimple = gt, e.getLocale = pt, e.getLocaleMessage = Wt, e.getWarnMessage = jt, e.handleMissing = Xt, e.isAlmostSameLocale = $t, e.isFallbackLocale = Kt, e.isImplicitFallback = en, e.isMessageAST = H, e.isMessageFormat = kn, e.isMessageFunction = $, e.isTranslateFallbackWarn = Jt, e.isTranslateMissingWarn = Yt, e.isWarnOption = qt, e.number = pn, e.parse = Et, e.parseDateTimeArgs = dn, e.parseNumberArgs = hn, e.parseTranslateArgs = In, e.registerLocaleFallbacker = Bt, e.registerMessageCompiler = It, e.registerMessageResolver = Rt, e.resolveLocale = ht, e.resolveValue = kt, e.resolveWithKeyValue = Ot, e.setLocaleMessage = Gt, e.translate = An, e.updateFallbackLocale = Qt, e;
1526
1611
  })({});