@everymatrix/cashier-step-up 0.5.16 → 0.5.18

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,4582 +0,0 @@
1
- function D() {
2
- }
3
- function wt(e) {
4
- return e();
5
- }
6
- function st() {
7
- return /* @__PURE__ */ Object.create(null);
8
- }
9
- function ae(e) {
10
- e.forEach(wt);
11
- }
12
- function Qe(e) {
13
- return typeof e == "function";
14
- }
15
- function Bt(e, t) {
16
- return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
17
- }
18
- function vr(e) {
19
- return Object.keys(e).length === 0;
20
- }
21
- function At(e, ...t) {
22
- if (e == null) {
23
- for (const n of t)
24
- n(void 0);
25
- return D;
26
- }
27
- const r = e.subscribe(...t);
28
- return r.unsubscribe ? () => r.unsubscribe() : r;
29
- }
30
- function Er(e, t, r) {
31
- e.$$.on_destroy.push(At(t, r));
32
- }
33
- function C(e, t) {
34
- e.appendChild(t);
35
- }
36
- function yr(e, t, r) {
37
- const n = _r(e);
38
- if (!n.getElementById(t)) {
39
- const i = S("style");
40
- i.id = t, i.textContent = r, xr(n, i);
41
- }
42
- }
43
- function _r(e) {
44
- if (!e)
45
- return document;
46
- const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
47
- return t && /** @type {ShadowRoot} */
48
- t.host ? (
49
- /** @type {ShadowRoot} */
50
- t
51
- ) : e.ownerDocument;
52
- }
53
- function xr(e, t) {
54
- return C(
55
- /** @type {Document} */
56
- e.head || e,
57
- t
58
- ), t.sheet;
59
- }
60
- function M(e, t, r) {
61
- e.insertBefore(t, r || null);
62
- }
63
- function L(e) {
64
- e.parentNode && e.parentNode.removeChild(e);
65
- }
66
- function Or(e, t) {
67
- for (let r = 0; r < e.length; r += 1)
68
- e[r] && e[r].d(t);
69
- }
70
- function S(e) {
71
- return document.createElement(e);
72
- }
73
- function X(e) {
74
- return document.createTextNode(e);
75
- }
76
- function W() {
77
- return X(" ");
78
- }
79
- function Tr() {
80
- return X("");
81
- }
82
- function Z(e, t, r, n) {
83
- return e.addEventListener(t, r, n), () => e.removeEventListener(t, r, n);
84
- }
85
- function x(e, t, r) {
86
- r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
87
- }
88
- function Hr(e) {
89
- return Array.from(e.childNodes);
90
- }
91
- function Je(e, t) {
92
- t = "" + t, e.data !== t && (e.data = /** @type {string} */
93
- t);
94
- }
95
- function Pr(e) {
96
- const t = {};
97
- return e.childNodes.forEach(
98
- /** @param {Element} node */
99
- (r) => {
100
- t[r.slot || "default"] = !0;
101
- }
102
- ), t;
103
- }
104
- let pe;
105
- function fe(e) {
106
- pe = e;
107
- }
108
- function Sr() {
109
- if (!pe)
110
- throw new Error("Function called outside component initialization");
111
- return pe;
112
- }
113
- function wr(e) {
114
- Sr().$$.on_mount.push(e);
115
- }
116
- const te = [], xe = [];
117
- let re = [];
118
- const at = [], Br = /* @__PURE__ */ Promise.resolve();
119
- let Ue = !1;
120
- function Ar() {
121
- Ue || (Ue = !0, Br.then(z));
122
- }
123
- function Ge(e) {
124
- re.push(e);
125
- }
126
- const Me = /* @__PURE__ */ new Set();
127
- let K = 0;
128
- function z() {
129
- if (K !== 0)
130
- return;
131
- const e = pe;
132
- do {
133
- try {
134
- for (; K < te.length; ) {
135
- const t = te[K];
136
- K++, fe(t), Lr(t.$$);
137
- }
138
- } catch (t) {
139
- throw te.length = 0, K = 0, t;
140
- }
141
- for (fe(null), te.length = 0, K = 0; xe.length; )
142
- xe.pop()();
143
- for (let t = 0; t < re.length; t += 1) {
144
- const r = re[t];
145
- Me.has(r) || (Me.add(r), r());
146
- }
147
- re.length = 0;
148
- } while (te.length);
149
- for (; at.length; )
150
- at.pop()();
151
- Ue = !1, Me.clear(), fe(e);
152
- }
153
- function Lr(e) {
154
- if (e.fragment !== null) {
155
- e.update(), ae(e.before_update);
156
- const t = e.dirty;
157
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(Ge);
158
- }
159
- }
160
- function Mr(e) {
161
- const t = [], r = [];
162
- re.forEach((n) => e.indexOf(n) === -1 ? t.push(n) : r.push(n)), r.forEach((n) => n()), re = t;
163
- }
164
- const Ir = /* @__PURE__ */ new Set();
165
- function Nr(e, t) {
166
- e && e.i && (Ir.delete(e), e.i(t));
167
- }
168
- function ut(e) {
169
- return e?.length !== void 0 ? e : Array.from(e);
170
- }
171
- function Cr(e, t, r) {
172
- const { fragment: n, after_update: i } = e.$$;
173
- n && n.m(t, r), Ge(() => {
174
- const o = e.$$.on_mount.map(wt).filter(Qe);
175
- e.$$.on_destroy ? e.$$.on_destroy.push(...o) : ae(o), e.$$.on_mount = [];
176
- }), i.forEach(Ge);
177
- }
178
- function Rr(e, t) {
179
- const r = e.$$;
180
- r.fragment !== null && (Mr(r.after_update), ae(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
181
- }
182
- function kr(e, t) {
183
- e.$$.dirty[0] === -1 && (te.push(e), Ar(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
184
- }
185
- function Dr(e, t, r, n, i, o, a = null, s = [-1]) {
186
- const l = pe;
187
- fe(e);
188
- const u = e.$$ = {
189
- fragment: null,
190
- ctx: [],
191
- // state
192
- props: o,
193
- update: D,
194
- not_equal: i,
195
- bound: st(),
196
- // lifecycle
197
- on_mount: [],
198
- on_destroy: [],
199
- on_disconnect: [],
200
- before_update: [],
201
- after_update: [],
202
- context: new Map(t.context || (l ? l.$$.context : [])),
203
- // everything else
204
- callbacks: st(),
205
- dirty: s,
206
- skip_bound: !1,
207
- root: t.target || l.$$.root
208
- };
209
- a && a(u.root);
210
- let h = !1;
211
- if (u.ctx = r ? r(e, t.props || {}, (f, p, ...g) => {
212
- const d = g.length ? g[0] : p;
213
- return u.ctx && i(u.ctx[f], u.ctx[f] = d) && (!u.skip_bound && u.bound[f] && u.bound[f](d), h && kr(e, f)), p;
214
- }) : [], u.update(), h = !0, ae(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
215
- if (t.hydrate) {
216
- const f = Hr(t.target);
217
- u.fragment && u.fragment.l(f), f.forEach(L);
218
- } else
219
- u.fragment && u.fragment.c();
220
- t.intro && Nr(e.$$.fragment), Cr(e, t.target, t.anchor), z();
221
- }
222
- fe(l);
223
- }
224
- let Lt;
225
- typeof HTMLElement == "function" && (Lt = class extends HTMLElement {
226
- /** The Svelte component constructor */
227
- $$ctor;
228
- /** Slots */
229
- $$s;
230
- /** The Svelte component instance */
231
- $$c;
232
- /** Whether or not the custom element is connected */
233
- $$cn = !1;
234
- /** Component props data */
235
- $$d = {};
236
- /** `true` if currently in the process of reflecting component props back to attributes */
237
- $$r = !1;
238
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
239
- $$p_d = {};
240
- /** @type {Record<string, Function[]>} Event listeners */
241
- $$l = {};
242
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
243
- $$l_u = /* @__PURE__ */ new Map();
244
- constructor(e, t, r) {
245
- super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
246
- }
247
- addEventListener(e, t, r) {
248
- if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
249
- const n = this.$$c.$on(e, t);
250
- this.$$l_u.set(t, n);
251
- }
252
- super.addEventListener(e, t, r);
253
- }
254
- removeEventListener(e, t, r) {
255
- if (super.removeEventListener(e, t, r), this.$$c) {
256
- const n = this.$$l_u.get(t);
257
- n && (n(), this.$$l_u.delete(t));
258
- }
259
- }
260
- async connectedCallback() {
261
- if (this.$$cn = !0, !this.$$c) {
262
- let e = function(i) {
263
- return () => {
264
- let o;
265
- return {
266
- c: function() {
267
- o = S("slot"), i !== "default" && x(o, "name", i);
268
- },
269
- /**
270
- * @param {HTMLElement} target
271
- * @param {HTMLElement} [anchor]
272
- */
273
- m: function(l, u) {
274
- M(l, o, u);
275
- },
276
- d: function(l) {
277
- l && L(o);
278
- }
279
- };
280
- };
281
- };
282
- if (await Promise.resolve(), !this.$$cn || this.$$c)
283
- return;
284
- const t = {}, r = Pr(this);
285
- for (const i of this.$$s)
286
- i in r && (t[i] = [e(i)]);
287
- for (const i of this.attributes) {
288
- const o = this.$$g_p(i.name);
289
- o in this.$$d || (this.$$d[o] = Ee(o, i.value, this.$$p_d, "toProp"));
290
- }
291
- for (const i in this.$$p_d)
292
- !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
293
- this.$$c = new this.$$ctor({
294
- target: this.shadowRoot || this,
295
- props: {
296
- ...this.$$d,
297
- $$slots: t,
298
- $$scope: {
299
- ctx: []
300
- }
301
- }
302
- });
303
- const n = () => {
304
- this.$$r = !0;
305
- for (const i in this.$$p_d)
306
- if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
307
- const o = Ee(
308
- i,
309
- this.$$d[i],
310
- this.$$p_d,
311
- "toAttribute"
312
- );
313
- o == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
314
- }
315
- this.$$r = !1;
316
- };
317
- this.$$c.$$.after_update.push(n), n();
318
- for (const i in this.$$l)
319
- for (const o of this.$$l[i]) {
320
- const a = this.$$c.$on(i, o);
321
- this.$$l_u.set(o, a);
322
- }
323
- this.$$l = {};
324
- }
325
- }
326
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
327
- // and setting attributes through setAttribute etc, this is helpful
328
- attributeChangedCallback(e, t, r) {
329
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ee(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
330
- }
331
- disconnectedCallback() {
332
- this.$$cn = !1, Promise.resolve().then(() => {
333
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
334
- });
335
- }
336
- $$g_p(e) {
337
- return Object.keys(this.$$p_d).find(
338
- (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
339
- ) || e;
340
- }
341
- });
342
- function Ee(e, t, r, n) {
343
- const i = r[e]?.type;
344
- if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
345
- return t;
346
- if (n === "toAttribute")
347
- switch (i) {
348
- case "Object":
349
- case "Array":
350
- return t == null ? null : JSON.stringify(t);
351
- case "Boolean":
352
- return t ? "" : null;
353
- case "Number":
354
- return t ?? null;
355
- default:
356
- return t;
357
- }
358
- else
359
- switch (i) {
360
- case "Object":
361
- case "Array":
362
- return t && JSON.parse(t);
363
- case "Boolean":
364
- return t;
365
- case "Number":
366
- return t != null ? +t : t;
367
- default:
368
- return t;
369
- }
370
- }
371
- function Ur(e, t, r, n, i, o) {
372
- let a = class extends Lt {
373
- constructor() {
374
- super(e, r, i), this.$$p_d = t;
375
- }
376
- static get observedAttributes() {
377
- return Object.keys(t).map(
378
- (s) => (t[s].attribute || s).toLowerCase()
379
- );
380
- }
381
- };
382
- return Object.keys(t).forEach((s) => {
383
- Object.defineProperty(a.prototype, s, {
384
- get() {
385
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
386
- },
387
- set(l) {
388
- l = Ee(s, l, t), this.$$d[s] = l, this.$$c?.$set({ [s]: l });
389
- }
390
- });
391
- }), n.forEach((s) => {
392
- Object.defineProperty(a.prototype, s, {
393
- get() {
394
- return this.$$c?.[s];
395
- }
396
- });
397
- }), e.element = /** @type {any} */
398
- a, a;
399
- }
400
- class Gr {
401
- /**
402
- * ### PRIVATE API
403
- *
404
- * Do not use, may change at any time
405
- *
406
- * @type {any}
407
- */
408
- $$ = void 0;
409
- /**
410
- * ### PRIVATE API
411
- *
412
- * Do not use, may change at any time
413
- *
414
- * @type {any}
415
- */
416
- $$set = void 0;
417
- /** @returns {void} */
418
- $destroy() {
419
- Rr(this, 1), this.$destroy = D;
420
- }
421
- /**
422
- * @template {Extract<keyof Events, string>} K
423
- * @param {K} type
424
- * @param {((e: Events[K]) => void) | null | undefined} callback
425
- * @returns {() => void}
426
- */
427
- $on(t, r) {
428
- if (!Qe(r))
429
- return D;
430
- const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
431
- return n.push(r), () => {
432
- const i = n.indexOf(r);
433
- i !== -1 && n.splice(i, 1);
434
- };
435
- }
436
- /**
437
- * @param {Partial<Props>} props
438
- * @returns {void}
439
- */
440
- $set(t) {
441
- this.$$set && !vr(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
442
- }
443
- }
444
- const jr = "4";
445
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(jr);
446
- function $r(e, t) {
447
- if (e) {
448
- const r = document.createElement("style");
449
- r.innerHTML = t, e.appendChild(r);
450
- }
451
- }
452
- function Fr(e, t) {
453
- const r = new URL(t);
454
- fetch(r.href).then((n) => n.text()).then((n) => {
455
- const i = document.createElement("style");
456
- i.innerHTML = n, e && e.appendChild(i);
457
- }).catch((n) => {
458
- console.error("There was an error while trying to load client styling from URL", n);
459
- });
460
- }
461
- function Vr(e, t, r) {
462
- if (window.emMessageBus) {
463
- const n = document.createElement("style");
464
- window.emMessageBus.subscribe(t, (i) => {
465
- n.innerHTML = i, e && e.appendChild(n);
466
- });
467
- }
468
- }
469
- const ee = [];
470
- function zr(e, t) {
471
- return {
472
- subscribe: Pe(e, t).subscribe
473
- };
474
- }
475
- function Pe(e, t = D) {
476
- let r;
477
- const n = /* @__PURE__ */ new Set();
478
- function i(s) {
479
- if (Bt(e, s) && (e = s, r)) {
480
- const l = !ee.length;
481
- for (const u of n)
482
- u[1](), ee.push(u, e);
483
- if (l) {
484
- for (let u = 0; u < ee.length; u += 2)
485
- ee[u][0](ee[u + 1]);
486
- ee.length = 0;
487
- }
488
- }
489
- }
490
- function o(s) {
491
- i(s(e));
492
- }
493
- function a(s, l = D) {
494
- const u = [s, l];
495
- return n.add(u), n.size === 1 && (r = t(i, o) || D), s(e), () => {
496
- n.delete(u), n.size === 0 && r && (r(), r = null);
497
- };
498
- }
499
- return { set: i, update: o, subscribe: a };
500
- }
501
- function ue(e, t, r) {
502
- const n = !Array.isArray(e), i = n ? [e] : e;
503
- if (!i.every(Boolean))
504
- throw new Error("derived() expects stores as input, got a falsy value");
505
- const o = t.length < 2;
506
- return zr(r, (a, s) => {
507
- let l = !1;
508
- const u = [];
509
- let h = 0, f = D;
510
- const p = () => {
511
- if (h)
512
- return;
513
- f();
514
- const d = t(n ? u[0] : u, a, s);
515
- o ? a(d) : f = Qe(d) ? d : D;
516
- }, g = i.map(
517
- (d, H) => At(
518
- d,
519
- (R) => {
520
- u[H] = R, h &= ~(1 << H), l && p();
521
- },
522
- () => {
523
- h |= 1 << H;
524
- }
525
- )
526
- );
527
- return l = !0, p(), function() {
528
- ae(g), f(), l = !1;
529
- };
530
- });
531
- }
532
- function Xr(e) {
533
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
534
- }
535
- var Wr = function(t) {
536
- return qr(t) && !Zr(t);
537
- };
538
- function qr(e) {
539
- return !!e && typeof e == "object";
540
- }
541
- function Zr(e) {
542
- var t = Object.prototype.toString.call(e);
543
- return t === "[object RegExp]" || t === "[object Date]" || Yr(e);
544
- }
545
- var Qr = typeof Symbol == "function" && Symbol.for, Jr = Qr ? Symbol.for("react.element") : 60103;
546
- function Yr(e) {
547
- return e.$$typeof === Jr;
548
- }
549
- function Kr(e) {
550
- return Array.isArray(e) ? [] : {};
551
- }
552
- function de(e, t) {
553
- return t.clone !== !1 && t.isMergeableObject(e) ? ne(Kr(e), e, t) : e;
554
- }
555
- function en(e, t, r) {
556
- return e.concat(t).map(function(n) {
557
- return de(n, r);
558
- });
559
- }
560
- function tn(e, t) {
561
- if (!t.customMerge)
562
- return ne;
563
- var r = t.customMerge(e);
564
- return typeof r == "function" ? r : ne;
565
- }
566
- function rn(e) {
567
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) {
568
- return Object.propertyIsEnumerable.call(e, t);
569
- }) : [];
570
- }
571
- function lt(e) {
572
- return Object.keys(e).concat(rn(e));
573
- }
574
- function Mt(e, t) {
575
- try {
576
- return t in e;
577
- } catch {
578
- return !1;
579
- }
580
- }
581
- function nn(e, t) {
582
- return Mt(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
583
- }
584
- function on(e, t, r) {
585
- var n = {};
586
- return r.isMergeableObject(e) && lt(e).forEach(function(i) {
587
- n[i] = de(e[i], r);
588
- }), lt(t).forEach(function(i) {
589
- nn(e, i) || (Mt(e, i) && r.isMergeableObject(t[i]) ? n[i] = tn(i, r)(e[i], t[i], r) : n[i] = de(t[i], r));
590
- }), n;
591
- }
592
- function ne(e, t, r) {
593
- r = r || {}, r.arrayMerge = r.arrayMerge || en, r.isMergeableObject = r.isMergeableObject || Wr, r.cloneUnlessOtherwiseSpecified = de;
594
- var n = Array.isArray(t), i = Array.isArray(e), o = n === i;
595
- return o ? n ? r.arrayMerge(e, t, r) : on(e, t, r) : de(t, r);
596
- }
597
- ne.all = function(t, r) {
598
- if (!Array.isArray(t))
599
- throw new Error("first argument should be an array");
600
- return t.reduce(function(n, i) {
601
- return ne(n, i, r);
602
- }, {});
603
- };
604
- var sn = ne, an = sn;
605
- const un = /* @__PURE__ */ Xr(an);
606
- var je = function(e, t) {
607
- return je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
608
- r.__proto__ = n;
609
- } || function(r, n) {
610
- for (var i in n)
611
- Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
612
- }, je(e, t);
613
- };
614
- function Se(e, t) {
615
- if (typeof t != "function" && t !== null)
616
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
617
- je(e, t);
618
- function r() {
619
- this.constructor = e;
620
- }
621
- e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
622
- }
623
- var $ = function() {
624
- return $ = Object.assign || function(t) {
625
- for (var r, n = 1, i = arguments.length; n < i; n++) {
626
- r = arguments[n];
627
- for (var o in r)
628
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
629
- }
630
- return t;
631
- }, $.apply(this, arguments);
632
- };
633
- function ln(e, t) {
634
- var r = {};
635
- for (var n in e)
636
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
637
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
638
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
639
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
640
- return r;
641
- }
642
- function Ie(e, t, r) {
643
- if (r || arguments.length === 2)
644
- for (var n = 0, i = t.length, o; n < i; n++)
645
- (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
646
- return e.concat(o || Array.prototype.slice.call(t));
647
- }
648
- function Ne(e, t) {
649
- var r = t && t.cache ? t.cache : gn, n = t && t.serializer ? t.serializer : dn, i = t && t.strategy ? t.strategy : fn;
650
- return i(e, {
651
- cache: r,
652
- serializer: n
653
- });
654
- }
655
- function hn(e) {
656
- return e == null || typeof e == "number" || typeof e == "boolean";
657
- }
658
- function cn(e, t, r, n) {
659
- var i = hn(n) ? n : r(n), o = t.get(i);
660
- return typeof o > "u" && (o = e.call(this, n), t.set(i, o)), o;
661
- }
662
- function It(e, t, r) {
663
- var n = Array.prototype.slice.call(arguments, 3), i = r(n), o = t.get(i);
664
- return typeof o > "u" && (o = e.apply(this, n), t.set(i, o)), o;
665
- }
666
- function Nt(e, t, r, n, i) {
667
- return r.bind(t, e, n, i);
668
- }
669
- function fn(e, t) {
670
- var r = e.length === 1 ? cn : It;
671
- return Nt(e, this, r, t.cache.create(), t.serializer);
672
- }
673
- function pn(e, t) {
674
- return Nt(e, this, It, t.cache.create(), t.serializer);
675
- }
676
- var dn = function() {
677
- return JSON.stringify(arguments);
678
- }, mn = (
679
- /** @class */
680
- function() {
681
- function e() {
682
- this.cache = /* @__PURE__ */ Object.create(null);
683
- }
684
- return e.prototype.get = function(t) {
685
- return this.cache[t];
686
- }, e.prototype.set = function(t, r) {
687
- this.cache[t] = r;
688
- }, e;
689
- }()
690
- ), gn = {
691
- create: function() {
692
- return new mn();
693
- }
694
- }, Ce = {
695
- variadic: pn
696
- }, Oe = function() {
697
- return Oe = Object.assign || function(t) {
698
- for (var r, n = 1, i = arguments.length; n < i; n++) {
699
- r = arguments[n];
700
- for (var o in r)
701
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
702
- }
703
- return t;
704
- }, Oe.apply(this, arguments);
705
- };
706
- var v;
707
- (function(e) {
708
- 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";
709
- })(v || (v = {}));
710
- var P;
711
- (function(e) {
712
- 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";
713
- })(P || (P = {}));
714
- var ie;
715
- (function(e) {
716
- e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
717
- })(ie || (ie = {}));
718
- function ht(e) {
719
- return e.type === P.literal;
720
- }
721
- function bn(e) {
722
- return e.type === P.argument;
723
- }
724
- function Ct(e) {
725
- return e.type === P.number;
726
- }
727
- function Rt(e) {
728
- return e.type === P.date;
729
- }
730
- function kt(e) {
731
- return e.type === P.time;
732
- }
733
- function Dt(e) {
734
- return e.type === P.select;
735
- }
736
- function Ut(e) {
737
- return e.type === P.plural;
738
- }
739
- function vn(e) {
740
- return e.type === P.pound;
741
- }
742
- function Gt(e) {
743
- return e.type === P.tag;
744
- }
745
- function jt(e) {
746
- return !!(e && typeof e == "object" && e.type === ie.number);
747
- }
748
- function $e(e) {
749
- return !!(e && typeof e == "object" && e.type === ie.dateTime);
750
- }
751
- var $t = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, En = /(?:[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;
752
- function yn(e) {
753
- var t = {};
754
- return e.replace(En, function(r) {
755
- var n = r.length;
756
- switch (r[0]) {
757
- case "G":
758
- t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
759
- break;
760
- case "y":
761
- t.year = n === 2 ? "2-digit" : "numeric";
762
- break;
763
- case "Y":
764
- case "u":
765
- case "U":
766
- case "r":
767
- throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
768
- case "q":
769
- case "Q":
770
- throw new RangeError("`q/Q` (quarter) patterns are not supported");
771
- case "M":
772
- case "L":
773
- t.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
774
- break;
775
- case "w":
776
- case "W":
777
- throw new RangeError("`w/W` (week) patterns are not supported");
778
- case "d":
779
- t.day = ["numeric", "2-digit"][n - 1];
780
- break;
781
- case "D":
782
- case "F":
783
- case "g":
784
- throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
785
- case "E":
786
- t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
787
- break;
788
- case "e":
789
- if (n < 4)
790
- throw new RangeError("`e..eee` (weekday) patterns are not supported");
791
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
792
- break;
793
- case "c":
794
- if (n < 4)
795
- throw new RangeError("`c..ccc` (weekday) patterns are not supported");
796
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
797
- break;
798
- case "a":
799
- t.hour12 = !0;
800
- break;
801
- case "b":
802
- case "B":
803
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
804
- case "h":
805
- t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
806
- break;
807
- case "H":
808
- t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
809
- break;
810
- case "K":
811
- t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
812
- break;
813
- case "k":
814
- t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
815
- break;
816
- case "j":
817
- case "J":
818
- case "C":
819
- throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
820
- case "m":
821
- t.minute = ["numeric", "2-digit"][n - 1];
822
- break;
823
- case "s":
824
- t.second = ["numeric", "2-digit"][n - 1];
825
- break;
826
- case "S":
827
- case "A":
828
- throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
829
- case "z":
830
- t.timeZoneName = n < 4 ? "short" : "long";
831
- break;
832
- case "Z":
833
- case "O":
834
- case "v":
835
- case "V":
836
- case "X":
837
- case "x":
838
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
839
- }
840
- return "";
841
- }), t;
842
- }
843
- var w = function() {
844
- return w = Object.assign || function(t) {
845
- for (var r, n = 1, i = arguments.length; n < i; n++) {
846
- r = arguments[n];
847
- for (var o in r)
848
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
849
- }
850
- return t;
851
- }, w.apply(this, arguments);
852
- };
853
- var _n = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
854
- function xn(e) {
855
- if (e.length === 0)
856
- throw new Error("Number skeleton cannot be empty");
857
- for (var t = e.split(_n).filter(function(p) {
858
- return p.length > 0;
859
- }), r = [], n = 0, i = t; n < i.length; n++) {
860
- var o = i[n], a = o.split("/");
861
- if (a.length === 0)
862
- throw new Error("Invalid number skeleton");
863
- for (var s = a[0], l = a.slice(1), u = 0, h = l; u < h.length; u++) {
864
- var f = h[u];
865
- if (f.length === 0)
866
- throw new Error("Invalid number skeleton");
867
- }
868
- r.push({ stem: s, options: l });
869
- }
870
- return r;
871
- }
872
- function On(e) {
873
- return e.replace(/^(.*?)-/, "");
874
- }
875
- var ct = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ft = /^(@+)?(\+|#+)?[rs]?$/g, Tn = /(\*)(0+)|(#+)(0+)|(0+)/g, Vt = /^(0+)$/;
876
- function ft(e) {
877
- var t = {};
878
- return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Ft, function(r, n, i) {
879
- return typeof i != "string" ? (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length) : i === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof i == "string" ? i.length : 0)), "";
880
- }), t;
881
- }
882
- function zt(e) {
883
- switch (e) {
884
- case "sign-auto":
885
- return {
886
- signDisplay: "auto"
887
- };
888
- case "sign-accounting":
889
- case "()":
890
- return {
891
- currencySign: "accounting"
892
- };
893
- case "sign-always":
894
- case "+!":
895
- return {
896
- signDisplay: "always"
897
- };
898
- case "sign-accounting-always":
899
- case "()!":
900
- return {
901
- signDisplay: "always",
902
- currencySign: "accounting"
903
- };
904
- case "sign-except-zero":
905
- case "+?":
906
- return {
907
- signDisplay: "exceptZero"
908
- };
909
- case "sign-accounting-except-zero":
910
- case "()?":
911
- return {
912
- signDisplay: "exceptZero",
913
- currencySign: "accounting"
914
- };
915
- case "sign-never":
916
- case "+_":
917
- return {
918
- signDisplay: "never"
919
- };
920
- }
921
- }
922
- function Hn(e) {
923
- var t;
924
- if (e[0] === "E" && e[1] === "E" ? (t = {
925
- notation: "engineering"
926
- }, e = e.slice(2)) : e[0] === "E" && (t = {
927
- notation: "scientific"
928
- }, e = e.slice(1)), t) {
929
- var r = e.slice(0, 2);
930
- if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Vt.test(e))
931
- throw new Error("Malformed concise eng/scientific notation");
932
- t.minimumIntegerDigits = e.length;
933
- }
934
- return t;
935
- }
936
- function pt(e) {
937
- var t = {}, r = zt(e);
938
- return r || t;
939
- }
940
- function Pn(e) {
941
- for (var t = {}, r = 0, n = e; r < n.length; r++) {
942
- var i = n[r];
943
- switch (i.stem) {
944
- case "percent":
945
- case "%":
946
- t.style = "percent";
947
- continue;
948
- case "%x100":
949
- t.style = "percent", t.scale = 100;
950
- continue;
951
- case "currency":
952
- t.style = "currency", t.currency = i.options[0];
953
- continue;
954
- case "group-off":
955
- case ",_":
956
- t.useGrouping = !1;
957
- continue;
958
- case "precision-integer":
959
- case ".":
960
- t.maximumFractionDigits = 0;
961
- continue;
962
- case "measure-unit":
963
- case "unit":
964
- t.style = "unit", t.unit = On(i.options[0]);
965
- continue;
966
- case "compact-short":
967
- case "K":
968
- t.notation = "compact", t.compactDisplay = "short";
969
- continue;
970
- case "compact-long":
971
- case "KK":
972
- t.notation = "compact", t.compactDisplay = "long";
973
- continue;
974
- case "scientific":
975
- t = w(w(w({}, t), { notation: "scientific" }), i.options.reduce(function(l, u) {
976
- return w(w({}, l), pt(u));
977
- }, {}));
978
- continue;
979
- case "engineering":
980
- t = w(w(w({}, t), { notation: "engineering" }), i.options.reduce(function(l, u) {
981
- return w(w({}, l), pt(u));
982
- }, {}));
983
- continue;
984
- case "notation-simple":
985
- t.notation = "standard";
986
- continue;
987
- case "unit-width-narrow":
988
- t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
989
- continue;
990
- case "unit-width-short":
991
- t.currencyDisplay = "code", t.unitDisplay = "short";
992
- continue;
993
- case "unit-width-full-name":
994
- t.currencyDisplay = "name", t.unitDisplay = "long";
995
- continue;
996
- case "unit-width-iso-code":
997
- t.currencyDisplay = "symbol";
998
- continue;
999
- case "scale":
1000
- t.scale = parseFloat(i.options[0]);
1001
- continue;
1002
- case "rounding-mode-floor":
1003
- t.roundingMode = "floor";
1004
- continue;
1005
- case "rounding-mode-ceiling":
1006
- t.roundingMode = "ceil";
1007
- continue;
1008
- case "rounding-mode-down":
1009
- t.roundingMode = "trunc";
1010
- continue;
1011
- case "rounding-mode-up":
1012
- t.roundingMode = "expand";
1013
- continue;
1014
- case "rounding-mode-half-even":
1015
- t.roundingMode = "halfEven";
1016
- continue;
1017
- case "rounding-mode-half-down":
1018
- t.roundingMode = "halfTrunc";
1019
- continue;
1020
- case "rounding-mode-half-up":
1021
- t.roundingMode = "halfExpand";
1022
- continue;
1023
- case "integer-width":
1024
- if (i.options.length > 1)
1025
- throw new RangeError("integer-width stems only accept a single optional option");
1026
- i.options[0].replace(Tn, function(l, u, h, f, p, g) {
1027
- if (u)
1028
- t.minimumIntegerDigits = h.length;
1029
- else {
1030
- if (f && p)
1031
- throw new Error("We currently do not support maximum integer digits");
1032
- if (g)
1033
- throw new Error("We currently do not support exact integer digits");
1034
- }
1035
- return "";
1036
- });
1037
- continue;
1038
- }
1039
- if (Vt.test(i.stem)) {
1040
- t.minimumIntegerDigits = i.stem.length;
1041
- continue;
1042
- }
1043
- if (ct.test(i.stem)) {
1044
- if (i.options.length > 1)
1045
- throw new RangeError("Fraction-precision stems only accept a single optional option");
1046
- i.stem.replace(ct, function(l, u, h, f, p, g) {
1047
- return h === "*" ? t.minimumFractionDigits = u.length : f && f[0] === "#" ? t.maximumFractionDigits = f.length : p && g ? (t.minimumFractionDigits = p.length, t.maximumFractionDigits = p.length + g.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), "";
1048
- });
1049
- var o = i.options[0];
1050
- o === "w" ? t = w(w({}, t), { trailingZeroDisplay: "stripIfInteger" }) : o && (t = w(w({}, t), ft(o)));
1051
- continue;
1052
- }
1053
- if (Ft.test(i.stem)) {
1054
- t = w(w({}, t), ft(i.stem));
1055
- continue;
1056
- }
1057
- var a = zt(i.stem);
1058
- a && (t = w(w({}, t), a));
1059
- var s = Hn(i.stem);
1060
- s && (t = w(w({}, t), s));
1061
- }
1062
- return t;
1063
- }
1064
- var ve = {
1065
- "001": [
1066
- "H",
1067
- "h"
1068
- ],
1069
- 419: [
1070
- "h",
1071
- "H",
1072
- "hB",
1073
- "hb"
1074
- ],
1075
- AC: [
1076
- "H",
1077
- "h",
1078
- "hb",
1079
- "hB"
1080
- ],
1081
- AD: [
1082
- "H",
1083
- "hB"
1084
- ],
1085
- AE: [
1086
- "h",
1087
- "hB",
1088
- "hb",
1089
- "H"
1090
- ],
1091
- AF: [
1092
- "H",
1093
- "hb",
1094
- "hB",
1095
- "h"
1096
- ],
1097
- AG: [
1098
- "h",
1099
- "hb",
1100
- "H",
1101
- "hB"
1102
- ],
1103
- AI: [
1104
- "H",
1105
- "h",
1106
- "hb",
1107
- "hB"
1108
- ],
1109
- AL: [
1110
- "h",
1111
- "H",
1112
- "hB"
1113
- ],
1114
- AM: [
1115
- "H",
1116
- "hB"
1117
- ],
1118
- AO: [
1119
- "H",
1120
- "hB"
1121
- ],
1122
- AR: [
1123
- "h",
1124
- "H",
1125
- "hB",
1126
- "hb"
1127
- ],
1128
- AS: [
1129
- "h",
1130
- "H"
1131
- ],
1132
- AT: [
1133
- "H",
1134
- "hB"
1135
- ],
1136
- AU: [
1137
- "h",
1138
- "hb",
1139
- "H",
1140
- "hB"
1141
- ],
1142
- AW: [
1143
- "H",
1144
- "hB"
1145
- ],
1146
- AX: [
1147
- "H"
1148
- ],
1149
- AZ: [
1150
- "H",
1151
- "hB",
1152
- "h"
1153
- ],
1154
- BA: [
1155
- "H",
1156
- "hB",
1157
- "h"
1158
- ],
1159
- BB: [
1160
- "h",
1161
- "hb",
1162
- "H",
1163
- "hB"
1164
- ],
1165
- BD: [
1166
- "h",
1167
- "hB",
1168
- "H"
1169
- ],
1170
- BE: [
1171
- "H",
1172
- "hB"
1173
- ],
1174
- BF: [
1175
- "H",
1176
- "hB"
1177
- ],
1178
- BG: [
1179
- "H",
1180
- "hB",
1181
- "h"
1182
- ],
1183
- BH: [
1184
- "h",
1185
- "hB",
1186
- "hb",
1187
- "H"
1188
- ],
1189
- BI: [
1190
- "H",
1191
- "h"
1192
- ],
1193
- BJ: [
1194
- "H",
1195
- "hB"
1196
- ],
1197
- BL: [
1198
- "H",
1199
- "hB"
1200
- ],
1201
- BM: [
1202
- "h",
1203
- "hb",
1204
- "H",
1205
- "hB"
1206
- ],
1207
- BN: [
1208
- "hb",
1209
- "hB",
1210
- "h",
1211
- "H"
1212
- ],
1213
- BO: [
1214
- "h",
1215
- "H",
1216
- "hB",
1217
- "hb"
1218
- ],
1219
- BQ: [
1220
- "H"
1221
- ],
1222
- BR: [
1223
- "H",
1224
- "hB"
1225
- ],
1226
- BS: [
1227
- "h",
1228
- "hb",
1229
- "H",
1230
- "hB"
1231
- ],
1232
- BT: [
1233
- "h",
1234
- "H"
1235
- ],
1236
- BW: [
1237
- "H",
1238
- "h",
1239
- "hb",
1240
- "hB"
1241
- ],
1242
- BY: [
1243
- "H",
1244
- "h"
1245
- ],
1246
- BZ: [
1247
- "H",
1248
- "h",
1249
- "hb",
1250
- "hB"
1251
- ],
1252
- CA: [
1253
- "h",
1254
- "hb",
1255
- "H",
1256
- "hB"
1257
- ],
1258
- CC: [
1259
- "H",
1260
- "h",
1261
- "hb",
1262
- "hB"
1263
- ],
1264
- CD: [
1265
- "hB",
1266
- "H"
1267
- ],
1268
- CF: [
1269
- "H",
1270
- "h",
1271
- "hB"
1272
- ],
1273
- CG: [
1274
- "H",
1275
- "hB"
1276
- ],
1277
- CH: [
1278
- "H",
1279
- "hB",
1280
- "h"
1281
- ],
1282
- CI: [
1283
- "H",
1284
- "hB"
1285
- ],
1286
- CK: [
1287
- "H",
1288
- "h",
1289
- "hb",
1290
- "hB"
1291
- ],
1292
- CL: [
1293
- "h",
1294
- "H",
1295
- "hB",
1296
- "hb"
1297
- ],
1298
- CM: [
1299
- "H",
1300
- "h",
1301
- "hB"
1302
- ],
1303
- CN: [
1304
- "H",
1305
- "hB",
1306
- "hb",
1307
- "h"
1308
- ],
1309
- CO: [
1310
- "h",
1311
- "H",
1312
- "hB",
1313
- "hb"
1314
- ],
1315
- CP: [
1316
- "H"
1317
- ],
1318
- CR: [
1319
- "h",
1320
- "H",
1321
- "hB",
1322
- "hb"
1323
- ],
1324
- CU: [
1325
- "h",
1326
- "H",
1327
- "hB",
1328
- "hb"
1329
- ],
1330
- CV: [
1331
- "H",
1332
- "hB"
1333
- ],
1334
- CW: [
1335
- "H",
1336
- "hB"
1337
- ],
1338
- CX: [
1339
- "H",
1340
- "h",
1341
- "hb",
1342
- "hB"
1343
- ],
1344
- CY: [
1345
- "h",
1346
- "H",
1347
- "hb",
1348
- "hB"
1349
- ],
1350
- CZ: [
1351
- "H"
1352
- ],
1353
- DE: [
1354
- "H",
1355
- "hB"
1356
- ],
1357
- DG: [
1358
- "H",
1359
- "h",
1360
- "hb",
1361
- "hB"
1362
- ],
1363
- DJ: [
1364
- "h",
1365
- "H"
1366
- ],
1367
- DK: [
1368
- "H"
1369
- ],
1370
- DM: [
1371
- "h",
1372
- "hb",
1373
- "H",
1374
- "hB"
1375
- ],
1376
- DO: [
1377
- "h",
1378
- "H",
1379
- "hB",
1380
- "hb"
1381
- ],
1382
- DZ: [
1383
- "h",
1384
- "hB",
1385
- "hb",
1386
- "H"
1387
- ],
1388
- EA: [
1389
- "H",
1390
- "h",
1391
- "hB",
1392
- "hb"
1393
- ],
1394
- EC: [
1395
- "h",
1396
- "H",
1397
- "hB",
1398
- "hb"
1399
- ],
1400
- EE: [
1401
- "H",
1402
- "hB"
1403
- ],
1404
- EG: [
1405
- "h",
1406
- "hB",
1407
- "hb",
1408
- "H"
1409
- ],
1410
- EH: [
1411
- "h",
1412
- "hB",
1413
- "hb",
1414
- "H"
1415
- ],
1416
- ER: [
1417
- "h",
1418
- "H"
1419
- ],
1420
- ES: [
1421
- "H",
1422
- "hB",
1423
- "h",
1424
- "hb"
1425
- ],
1426
- ET: [
1427
- "hB",
1428
- "hb",
1429
- "h",
1430
- "H"
1431
- ],
1432
- FI: [
1433
- "H"
1434
- ],
1435
- FJ: [
1436
- "h",
1437
- "hb",
1438
- "H",
1439
- "hB"
1440
- ],
1441
- FK: [
1442
- "H",
1443
- "h",
1444
- "hb",
1445
- "hB"
1446
- ],
1447
- FM: [
1448
- "h",
1449
- "hb",
1450
- "H",
1451
- "hB"
1452
- ],
1453
- FO: [
1454
- "H",
1455
- "h"
1456
- ],
1457
- FR: [
1458
- "H",
1459
- "hB"
1460
- ],
1461
- GA: [
1462
- "H",
1463
- "hB"
1464
- ],
1465
- GB: [
1466
- "H",
1467
- "h",
1468
- "hb",
1469
- "hB"
1470
- ],
1471
- GD: [
1472
- "h",
1473
- "hb",
1474
- "H",
1475
- "hB"
1476
- ],
1477
- GE: [
1478
- "H",
1479
- "hB",
1480
- "h"
1481
- ],
1482
- GF: [
1483
- "H",
1484
- "hB"
1485
- ],
1486
- GG: [
1487
- "H",
1488
- "h",
1489
- "hb",
1490
- "hB"
1491
- ],
1492
- GH: [
1493
- "h",
1494
- "H"
1495
- ],
1496
- GI: [
1497
- "H",
1498
- "h",
1499
- "hb",
1500
- "hB"
1501
- ],
1502
- GL: [
1503
- "H",
1504
- "h"
1505
- ],
1506
- GM: [
1507
- "h",
1508
- "hb",
1509
- "H",
1510
- "hB"
1511
- ],
1512
- GN: [
1513
- "H",
1514
- "hB"
1515
- ],
1516
- GP: [
1517
- "H",
1518
- "hB"
1519
- ],
1520
- GQ: [
1521
- "H",
1522
- "hB",
1523
- "h",
1524
- "hb"
1525
- ],
1526
- GR: [
1527
- "h",
1528
- "H",
1529
- "hb",
1530
- "hB"
1531
- ],
1532
- GT: [
1533
- "h",
1534
- "H",
1535
- "hB",
1536
- "hb"
1537
- ],
1538
- GU: [
1539
- "h",
1540
- "hb",
1541
- "H",
1542
- "hB"
1543
- ],
1544
- GW: [
1545
- "H",
1546
- "hB"
1547
- ],
1548
- GY: [
1549
- "h",
1550
- "hb",
1551
- "H",
1552
- "hB"
1553
- ],
1554
- HK: [
1555
- "h",
1556
- "hB",
1557
- "hb",
1558
- "H"
1559
- ],
1560
- HN: [
1561
- "h",
1562
- "H",
1563
- "hB",
1564
- "hb"
1565
- ],
1566
- HR: [
1567
- "H",
1568
- "hB"
1569
- ],
1570
- HU: [
1571
- "H",
1572
- "h"
1573
- ],
1574
- IC: [
1575
- "H",
1576
- "h",
1577
- "hB",
1578
- "hb"
1579
- ],
1580
- ID: [
1581
- "H"
1582
- ],
1583
- IE: [
1584
- "H",
1585
- "h",
1586
- "hb",
1587
- "hB"
1588
- ],
1589
- IL: [
1590
- "H",
1591
- "hB"
1592
- ],
1593
- IM: [
1594
- "H",
1595
- "h",
1596
- "hb",
1597
- "hB"
1598
- ],
1599
- IN: [
1600
- "h",
1601
- "H"
1602
- ],
1603
- IO: [
1604
- "H",
1605
- "h",
1606
- "hb",
1607
- "hB"
1608
- ],
1609
- IQ: [
1610
- "h",
1611
- "hB",
1612
- "hb",
1613
- "H"
1614
- ],
1615
- IR: [
1616
- "hB",
1617
- "H"
1618
- ],
1619
- IS: [
1620
- "H"
1621
- ],
1622
- IT: [
1623
- "H",
1624
- "hB"
1625
- ],
1626
- JE: [
1627
- "H",
1628
- "h",
1629
- "hb",
1630
- "hB"
1631
- ],
1632
- JM: [
1633
- "h",
1634
- "hb",
1635
- "H",
1636
- "hB"
1637
- ],
1638
- JO: [
1639
- "h",
1640
- "hB",
1641
- "hb",
1642
- "H"
1643
- ],
1644
- JP: [
1645
- "H",
1646
- "K",
1647
- "h"
1648
- ],
1649
- KE: [
1650
- "hB",
1651
- "hb",
1652
- "H",
1653
- "h"
1654
- ],
1655
- KG: [
1656
- "H",
1657
- "h",
1658
- "hB",
1659
- "hb"
1660
- ],
1661
- KH: [
1662
- "hB",
1663
- "h",
1664
- "H",
1665
- "hb"
1666
- ],
1667
- KI: [
1668
- "h",
1669
- "hb",
1670
- "H",
1671
- "hB"
1672
- ],
1673
- KM: [
1674
- "H",
1675
- "h",
1676
- "hB",
1677
- "hb"
1678
- ],
1679
- KN: [
1680
- "h",
1681
- "hb",
1682
- "H",
1683
- "hB"
1684
- ],
1685
- KP: [
1686
- "h",
1687
- "H",
1688
- "hB",
1689
- "hb"
1690
- ],
1691
- KR: [
1692
- "h",
1693
- "H",
1694
- "hB",
1695
- "hb"
1696
- ],
1697
- KW: [
1698
- "h",
1699
- "hB",
1700
- "hb",
1701
- "H"
1702
- ],
1703
- KY: [
1704
- "h",
1705
- "hb",
1706
- "H",
1707
- "hB"
1708
- ],
1709
- KZ: [
1710
- "H",
1711
- "hB"
1712
- ],
1713
- LA: [
1714
- "H",
1715
- "hb",
1716
- "hB",
1717
- "h"
1718
- ],
1719
- LB: [
1720
- "h",
1721
- "hB",
1722
- "hb",
1723
- "H"
1724
- ],
1725
- LC: [
1726
- "h",
1727
- "hb",
1728
- "H",
1729
- "hB"
1730
- ],
1731
- LI: [
1732
- "H",
1733
- "hB",
1734
- "h"
1735
- ],
1736
- LK: [
1737
- "H",
1738
- "h",
1739
- "hB",
1740
- "hb"
1741
- ],
1742
- LR: [
1743
- "h",
1744
- "hb",
1745
- "H",
1746
- "hB"
1747
- ],
1748
- LS: [
1749
- "h",
1750
- "H"
1751
- ],
1752
- LT: [
1753
- "H",
1754
- "h",
1755
- "hb",
1756
- "hB"
1757
- ],
1758
- LU: [
1759
- "H",
1760
- "h",
1761
- "hB"
1762
- ],
1763
- LV: [
1764
- "H",
1765
- "hB",
1766
- "hb",
1767
- "h"
1768
- ],
1769
- LY: [
1770
- "h",
1771
- "hB",
1772
- "hb",
1773
- "H"
1774
- ],
1775
- MA: [
1776
- "H",
1777
- "h",
1778
- "hB",
1779
- "hb"
1780
- ],
1781
- MC: [
1782
- "H",
1783
- "hB"
1784
- ],
1785
- MD: [
1786
- "H",
1787
- "hB"
1788
- ],
1789
- ME: [
1790
- "H",
1791
- "hB",
1792
- "h"
1793
- ],
1794
- MF: [
1795
- "H",
1796
- "hB"
1797
- ],
1798
- MG: [
1799
- "H",
1800
- "h"
1801
- ],
1802
- MH: [
1803
- "h",
1804
- "hb",
1805
- "H",
1806
- "hB"
1807
- ],
1808
- MK: [
1809
- "H",
1810
- "h",
1811
- "hb",
1812
- "hB"
1813
- ],
1814
- ML: [
1815
- "H"
1816
- ],
1817
- MM: [
1818
- "hB",
1819
- "hb",
1820
- "H",
1821
- "h"
1822
- ],
1823
- MN: [
1824
- "H",
1825
- "h",
1826
- "hb",
1827
- "hB"
1828
- ],
1829
- MO: [
1830
- "h",
1831
- "hB",
1832
- "hb",
1833
- "H"
1834
- ],
1835
- MP: [
1836
- "h",
1837
- "hb",
1838
- "H",
1839
- "hB"
1840
- ],
1841
- MQ: [
1842
- "H",
1843
- "hB"
1844
- ],
1845
- MR: [
1846
- "h",
1847
- "hB",
1848
- "hb",
1849
- "H"
1850
- ],
1851
- MS: [
1852
- "H",
1853
- "h",
1854
- "hb",
1855
- "hB"
1856
- ],
1857
- MT: [
1858
- "H",
1859
- "h"
1860
- ],
1861
- MU: [
1862
- "H",
1863
- "h"
1864
- ],
1865
- MV: [
1866
- "H",
1867
- "h"
1868
- ],
1869
- MW: [
1870
- "h",
1871
- "hb",
1872
- "H",
1873
- "hB"
1874
- ],
1875
- MX: [
1876
- "h",
1877
- "H",
1878
- "hB",
1879
- "hb"
1880
- ],
1881
- MY: [
1882
- "hb",
1883
- "hB",
1884
- "h",
1885
- "H"
1886
- ],
1887
- MZ: [
1888
- "H",
1889
- "hB"
1890
- ],
1891
- NA: [
1892
- "h",
1893
- "H",
1894
- "hB",
1895
- "hb"
1896
- ],
1897
- NC: [
1898
- "H",
1899
- "hB"
1900
- ],
1901
- NE: [
1902
- "H"
1903
- ],
1904
- NF: [
1905
- "H",
1906
- "h",
1907
- "hb",
1908
- "hB"
1909
- ],
1910
- NG: [
1911
- "H",
1912
- "h",
1913
- "hb",
1914
- "hB"
1915
- ],
1916
- NI: [
1917
- "h",
1918
- "H",
1919
- "hB",
1920
- "hb"
1921
- ],
1922
- NL: [
1923
- "H",
1924
- "hB"
1925
- ],
1926
- NO: [
1927
- "H",
1928
- "h"
1929
- ],
1930
- NP: [
1931
- "H",
1932
- "h",
1933
- "hB"
1934
- ],
1935
- NR: [
1936
- "H",
1937
- "h",
1938
- "hb",
1939
- "hB"
1940
- ],
1941
- NU: [
1942
- "H",
1943
- "h",
1944
- "hb",
1945
- "hB"
1946
- ],
1947
- NZ: [
1948
- "h",
1949
- "hb",
1950
- "H",
1951
- "hB"
1952
- ],
1953
- OM: [
1954
- "h",
1955
- "hB",
1956
- "hb",
1957
- "H"
1958
- ],
1959
- PA: [
1960
- "h",
1961
- "H",
1962
- "hB",
1963
- "hb"
1964
- ],
1965
- PE: [
1966
- "h",
1967
- "H",
1968
- "hB",
1969
- "hb"
1970
- ],
1971
- PF: [
1972
- "H",
1973
- "h",
1974
- "hB"
1975
- ],
1976
- PG: [
1977
- "h",
1978
- "H"
1979
- ],
1980
- PH: [
1981
- "h",
1982
- "hB",
1983
- "hb",
1984
- "H"
1985
- ],
1986
- PK: [
1987
- "h",
1988
- "hB",
1989
- "H"
1990
- ],
1991
- PL: [
1992
- "H",
1993
- "h"
1994
- ],
1995
- PM: [
1996
- "H",
1997
- "hB"
1998
- ],
1999
- PN: [
2000
- "H",
2001
- "h",
2002
- "hb",
2003
- "hB"
2004
- ],
2005
- PR: [
2006
- "h",
2007
- "H",
2008
- "hB",
2009
- "hb"
2010
- ],
2011
- PS: [
2012
- "h",
2013
- "hB",
2014
- "hb",
2015
- "H"
2016
- ],
2017
- PT: [
2018
- "H",
2019
- "hB"
2020
- ],
2021
- PW: [
2022
- "h",
2023
- "H"
2024
- ],
2025
- PY: [
2026
- "h",
2027
- "H",
2028
- "hB",
2029
- "hb"
2030
- ],
2031
- QA: [
2032
- "h",
2033
- "hB",
2034
- "hb",
2035
- "H"
2036
- ],
2037
- RE: [
2038
- "H",
2039
- "hB"
2040
- ],
2041
- RO: [
2042
- "H",
2043
- "hB"
2044
- ],
2045
- RS: [
2046
- "H",
2047
- "hB",
2048
- "h"
2049
- ],
2050
- RU: [
2051
- "H"
2052
- ],
2053
- RW: [
2054
- "H",
2055
- "h"
2056
- ],
2057
- SA: [
2058
- "h",
2059
- "hB",
2060
- "hb",
2061
- "H"
2062
- ],
2063
- SB: [
2064
- "h",
2065
- "hb",
2066
- "H",
2067
- "hB"
2068
- ],
2069
- SC: [
2070
- "H",
2071
- "h",
2072
- "hB"
2073
- ],
2074
- SD: [
2075
- "h",
2076
- "hB",
2077
- "hb",
2078
- "H"
2079
- ],
2080
- SE: [
2081
- "H"
2082
- ],
2083
- SG: [
2084
- "h",
2085
- "hb",
2086
- "H",
2087
- "hB"
2088
- ],
2089
- SH: [
2090
- "H",
2091
- "h",
2092
- "hb",
2093
- "hB"
2094
- ],
2095
- SI: [
2096
- "H",
2097
- "hB"
2098
- ],
2099
- SJ: [
2100
- "H"
2101
- ],
2102
- SK: [
2103
- "H"
2104
- ],
2105
- SL: [
2106
- "h",
2107
- "hb",
2108
- "H",
2109
- "hB"
2110
- ],
2111
- SM: [
2112
- "H",
2113
- "h",
2114
- "hB"
2115
- ],
2116
- SN: [
2117
- "H",
2118
- "h",
2119
- "hB"
2120
- ],
2121
- SO: [
2122
- "h",
2123
- "H"
2124
- ],
2125
- SR: [
2126
- "H",
2127
- "hB"
2128
- ],
2129
- SS: [
2130
- "h",
2131
- "hb",
2132
- "H",
2133
- "hB"
2134
- ],
2135
- ST: [
2136
- "H",
2137
- "hB"
2138
- ],
2139
- SV: [
2140
- "h",
2141
- "H",
2142
- "hB",
2143
- "hb"
2144
- ],
2145
- SX: [
2146
- "H",
2147
- "h",
2148
- "hb",
2149
- "hB"
2150
- ],
2151
- SY: [
2152
- "h",
2153
- "hB",
2154
- "hb",
2155
- "H"
2156
- ],
2157
- SZ: [
2158
- "h",
2159
- "hb",
2160
- "H",
2161
- "hB"
2162
- ],
2163
- TA: [
2164
- "H",
2165
- "h",
2166
- "hb",
2167
- "hB"
2168
- ],
2169
- TC: [
2170
- "h",
2171
- "hb",
2172
- "H",
2173
- "hB"
2174
- ],
2175
- TD: [
2176
- "h",
2177
- "H",
2178
- "hB"
2179
- ],
2180
- TF: [
2181
- "H",
2182
- "h",
2183
- "hB"
2184
- ],
2185
- TG: [
2186
- "H",
2187
- "hB"
2188
- ],
2189
- TH: [
2190
- "H",
2191
- "h"
2192
- ],
2193
- TJ: [
2194
- "H",
2195
- "h"
2196
- ],
2197
- TL: [
2198
- "H",
2199
- "hB",
2200
- "hb",
2201
- "h"
2202
- ],
2203
- TM: [
2204
- "H",
2205
- "h"
2206
- ],
2207
- TN: [
2208
- "h",
2209
- "hB",
2210
- "hb",
2211
- "H"
2212
- ],
2213
- TO: [
2214
- "h",
2215
- "H"
2216
- ],
2217
- TR: [
2218
- "H",
2219
- "hB"
2220
- ],
2221
- TT: [
2222
- "h",
2223
- "hb",
2224
- "H",
2225
- "hB"
2226
- ],
2227
- TW: [
2228
- "hB",
2229
- "hb",
2230
- "h",
2231
- "H"
2232
- ],
2233
- TZ: [
2234
- "hB",
2235
- "hb",
2236
- "H",
2237
- "h"
2238
- ],
2239
- UA: [
2240
- "H",
2241
- "hB",
2242
- "h"
2243
- ],
2244
- UG: [
2245
- "hB",
2246
- "hb",
2247
- "H",
2248
- "h"
2249
- ],
2250
- UM: [
2251
- "h",
2252
- "hb",
2253
- "H",
2254
- "hB"
2255
- ],
2256
- US: [
2257
- "h",
2258
- "hb",
2259
- "H",
2260
- "hB"
2261
- ],
2262
- UY: [
2263
- "h",
2264
- "H",
2265
- "hB",
2266
- "hb"
2267
- ],
2268
- UZ: [
2269
- "H",
2270
- "hB",
2271
- "h"
2272
- ],
2273
- VA: [
2274
- "H",
2275
- "h",
2276
- "hB"
2277
- ],
2278
- VC: [
2279
- "h",
2280
- "hb",
2281
- "H",
2282
- "hB"
2283
- ],
2284
- VE: [
2285
- "h",
2286
- "H",
2287
- "hB",
2288
- "hb"
2289
- ],
2290
- VG: [
2291
- "h",
2292
- "hb",
2293
- "H",
2294
- "hB"
2295
- ],
2296
- VI: [
2297
- "h",
2298
- "hb",
2299
- "H",
2300
- "hB"
2301
- ],
2302
- VN: [
2303
- "H",
2304
- "h"
2305
- ],
2306
- VU: [
2307
- "h",
2308
- "H"
2309
- ],
2310
- WF: [
2311
- "H",
2312
- "hB"
2313
- ],
2314
- WS: [
2315
- "h",
2316
- "H"
2317
- ],
2318
- XK: [
2319
- "H",
2320
- "hB",
2321
- "h"
2322
- ],
2323
- YE: [
2324
- "h",
2325
- "hB",
2326
- "hb",
2327
- "H"
2328
- ],
2329
- YT: [
2330
- "H",
2331
- "hB"
2332
- ],
2333
- ZA: [
2334
- "H",
2335
- "h",
2336
- "hb",
2337
- "hB"
2338
- ],
2339
- ZM: [
2340
- "h",
2341
- "hb",
2342
- "H",
2343
- "hB"
2344
- ],
2345
- ZW: [
2346
- "H",
2347
- "h"
2348
- ],
2349
- "af-ZA": [
2350
- "H",
2351
- "h",
2352
- "hB",
2353
- "hb"
2354
- ],
2355
- "ar-001": [
2356
- "h",
2357
- "hB",
2358
- "hb",
2359
- "H"
2360
- ],
2361
- "ca-ES": [
2362
- "H",
2363
- "h",
2364
- "hB"
2365
- ],
2366
- "en-001": [
2367
- "h",
2368
- "hb",
2369
- "H",
2370
- "hB"
2371
- ],
2372
- "en-HK": [
2373
- "h",
2374
- "hb",
2375
- "H",
2376
- "hB"
2377
- ],
2378
- "en-IL": [
2379
- "H",
2380
- "h",
2381
- "hb",
2382
- "hB"
2383
- ],
2384
- "en-MY": [
2385
- "h",
2386
- "hb",
2387
- "H",
2388
- "hB"
2389
- ],
2390
- "es-BR": [
2391
- "H",
2392
- "h",
2393
- "hB",
2394
- "hb"
2395
- ],
2396
- "es-ES": [
2397
- "H",
2398
- "h",
2399
- "hB",
2400
- "hb"
2401
- ],
2402
- "es-GQ": [
2403
- "H",
2404
- "h",
2405
- "hB",
2406
- "hb"
2407
- ],
2408
- "fr-CA": [
2409
- "H",
2410
- "h",
2411
- "hB"
2412
- ],
2413
- "gl-ES": [
2414
- "H",
2415
- "h",
2416
- "hB"
2417
- ],
2418
- "gu-IN": [
2419
- "hB",
2420
- "hb",
2421
- "h",
2422
- "H"
2423
- ],
2424
- "hi-IN": [
2425
- "hB",
2426
- "h",
2427
- "H"
2428
- ],
2429
- "it-CH": [
2430
- "H",
2431
- "h",
2432
- "hB"
2433
- ],
2434
- "it-IT": [
2435
- "H",
2436
- "h",
2437
- "hB"
2438
- ],
2439
- "kn-IN": [
2440
- "hB",
2441
- "h",
2442
- "H"
2443
- ],
2444
- "ml-IN": [
2445
- "hB",
2446
- "h",
2447
- "H"
2448
- ],
2449
- "mr-IN": [
2450
- "hB",
2451
- "hb",
2452
- "h",
2453
- "H"
2454
- ],
2455
- "pa-IN": [
2456
- "hB",
2457
- "hb",
2458
- "h",
2459
- "H"
2460
- ],
2461
- "ta-IN": [
2462
- "hB",
2463
- "h",
2464
- "hb",
2465
- "H"
2466
- ],
2467
- "te-IN": [
2468
- "hB",
2469
- "h",
2470
- "H"
2471
- ],
2472
- "zu-ZA": [
2473
- "H",
2474
- "hB",
2475
- "hb",
2476
- "h"
2477
- ]
2478
- };
2479
- function Sn(e, t) {
2480
- for (var r = "", n = 0; n < e.length; n++) {
2481
- var i = e.charAt(n);
2482
- if (i === "j") {
2483
- for (var o = 0; n + 1 < e.length && e.charAt(n + 1) === i; )
2484
- o++, n++;
2485
- var a = 1 + (o & 1), s = o < 2 ? 1 : 3 + (o >> 1), l = "a", u = wn(t);
2486
- for ((u == "H" || u == "k") && (s = 0); s-- > 0; )
2487
- r += l;
2488
- for (; a-- > 0; )
2489
- r = u + r;
2490
- } else
2491
- i === "J" ? r += "H" : r += i;
2492
- }
2493
- return r;
2494
- }
2495
- function wn(e) {
2496
- var t = e.hourCycle;
2497
- if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
2498
- e.hourCycles && // @ts-ignore
2499
- e.hourCycles.length && (t = e.hourCycles[0]), t)
2500
- switch (t) {
2501
- case "h24":
2502
- return "k";
2503
- case "h23":
2504
- return "H";
2505
- case "h12":
2506
- return "h";
2507
- case "h11":
2508
- return "K";
2509
- default:
2510
- throw new Error("Invalid hourCycle");
2511
- }
2512
- var r = e.language, n;
2513
- r !== "root" && (n = e.maximize().region);
2514
- var i = ve[n || ""] || ve[r || ""] || ve["".concat(r, "-001")] || ve["001"];
2515
- return i[0];
2516
- }
2517
- var Re, Bn = new RegExp("^".concat($t.source, "*")), An = new RegExp("".concat($t.source, "*$"));
2518
- function E(e, t) {
2519
- return { start: e, end: t };
2520
- }
2521
- var Ln = !!String.prototype.startsWith && "_a".startsWith("a", 1), Mn = !!String.fromCodePoint, In = !!Object.fromEntries, Nn = !!String.prototype.codePointAt, Cn = !!String.prototype.trimStart, Rn = !!String.prototype.trimEnd, kn = !!Number.isSafeInteger, Dn = kn ? Number.isSafeInteger : function(e) {
2522
- return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2523
- }, Fe = !0;
2524
- try {
2525
- var Un = Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2526
- Fe = ((Re = Un.exec("a")) === null || Re === void 0 ? void 0 : Re[0]) === "a";
2527
- } catch {
2528
- Fe = !1;
2529
- }
2530
- var dt = Ln ? (
2531
- // Native
2532
- function(t, r, n) {
2533
- return t.startsWith(r, n);
2534
- }
2535
- ) : (
2536
- // For IE11
2537
- function(t, r, n) {
2538
- return t.slice(n, n + r.length) === r;
2539
- }
2540
- ), Ve = Mn ? String.fromCodePoint : (
2541
- // IE11
2542
- function() {
2543
- for (var t = [], r = 0; r < arguments.length; r++)
2544
- t[r] = arguments[r];
2545
- for (var n = "", i = t.length, o = 0, a; i > o; ) {
2546
- if (a = t[o++], a > 1114111)
2547
- throw RangeError(a + " is not a valid code point");
2548
- n += a < 65536 ? String.fromCharCode(a) : String.fromCharCode(((a -= 65536) >> 10) + 55296, a % 1024 + 56320);
2549
- }
2550
- return n;
2551
- }
2552
- ), mt = (
2553
- // native
2554
- In ? Object.fromEntries : (
2555
- // Ponyfill
2556
- function(t) {
2557
- for (var r = {}, n = 0, i = t; n < i.length; n++) {
2558
- var o = i[n], a = o[0], s = o[1];
2559
- r[a] = s;
2560
- }
2561
- return r;
2562
- }
2563
- )
2564
- ), Xt = Nn ? (
2565
- // Native
2566
- function(t, r) {
2567
- return t.codePointAt(r);
2568
- }
2569
- ) : (
2570
- // IE 11
2571
- function(t, r) {
2572
- var n = t.length;
2573
- if (!(r < 0 || r >= n)) {
2574
- var i = t.charCodeAt(r), o;
2575
- return i < 55296 || i > 56319 || r + 1 === n || (o = t.charCodeAt(r + 1)) < 56320 || o > 57343 ? i : (i - 55296 << 10) + (o - 56320) + 65536;
2576
- }
2577
- }
2578
- ), Gn = Cn ? (
2579
- // Native
2580
- function(t) {
2581
- return t.trimStart();
2582
- }
2583
- ) : (
2584
- // Ponyfill
2585
- function(t) {
2586
- return t.replace(Bn, "");
2587
- }
2588
- ), jn = Rn ? (
2589
- // Native
2590
- function(t) {
2591
- return t.trimEnd();
2592
- }
2593
- ) : (
2594
- // Ponyfill
2595
- function(t) {
2596
- return t.replace(An, "");
2597
- }
2598
- );
2599
- function Wt(e, t) {
2600
- return new RegExp(e, t);
2601
- }
2602
- var ze;
2603
- if (Fe) {
2604
- var gt = Wt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2605
- ze = function(t, r) {
2606
- var n;
2607
- gt.lastIndex = r;
2608
- var i = gt.exec(t);
2609
- return (n = i[1]) !== null && n !== void 0 ? n : "";
2610
- };
2611
- } else
2612
- ze = function(t, r) {
2613
- for (var n = []; ; ) {
2614
- var i = Xt(t, r);
2615
- if (i === void 0 || qt(i) || zn(i))
2616
- break;
2617
- n.push(i), r += i >= 65536 ? 2 : 1;
2618
- }
2619
- return Ve.apply(void 0, n);
2620
- };
2621
- var $n = (
2622
- /** @class */
2623
- function() {
2624
- function e(t, r) {
2625
- 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;
2626
- }
2627
- return e.prototype.parse = function() {
2628
- if (this.offset() !== 0)
2629
- throw Error("parser can only be used once");
2630
- return this.parseMessage(0, "", !1);
2631
- }, e.prototype.parseMessage = function(t, r, n) {
2632
- for (var i = []; !this.isEOF(); ) {
2633
- var o = this.char();
2634
- if (o === 123) {
2635
- var a = this.parseArgument(t, n);
2636
- if (a.err)
2637
- return a;
2638
- i.push(a.val);
2639
- } else {
2640
- if (o === 125 && t > 0)
2641
- break;
2642
- if (o === 35 && (r === "plural" || r === "selectordinal")) {
2643
- var s = this.clonePosition();
2644
- this.bump(), i.push({
2645
- type: P.pound,
2646
- location: E(s, this.clonePosition())
2647
- });
2648
- } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2649
- if (n)
2650
- break;
2651
- return this.error(v.UNMATCHED_CLOSING_TAG, E(this.clonePosition(), this.clonePosition()));
2652
- } else if (o === 60 && !this.ignoreTag && Xe(this.peek() || 0)) {
2653
- var a = this.parseTag(t, r);
2654
- if (a.err)
2655
- return a;
2656
- i.push(a.val);
2657
- } else {
2658
- var a = this.parseLiteral(t, r);
2659
- if (a.err)
2660
- return a;
2661
- i.push(a.val);
2662
- }
2663
- }
2664
- }
2665
- return { val: i, err: null };
2666
- }, e.prototype.parseTag = function(t, r) {
2667
- var n = this.clonePosition();
2668
- this.bump();
2669
- var i = this.parseTagName();
2670
- if (this.bumpSpace(), this.bumpIf("/>"))
2671
- return {
2672
- val: {
2673
- type: P.literal,
2674
- value: "<".concat(i, "/>"),
2675
- location: E(n, this.clonePosition())
2676
- },
2677
- err: null
2678
- };
2679
- if (this.bumpIf(">")) {
2680
- var o = this.parseMessage(t + 1, r, !0);
2681
- if (o.err)
2682
- return o;
2683
- var a = o.val, s = this.clonePosition();
2684
- if (this.bumpIf("</")) {
2685
- if (this.isEOF() || !Xe(this.char()))
2686
- return this.error(v.INVALID_TAG, E(s, this.clonePosition()));
2687
- var l = this.clonePosition(), u = this.parseTagName();
2688
- return i !== u ? this.error(v.UNMATCHED_CLOSING_TAG, E(l, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
2689
- val: {
2690
- type: P.tag,
2691
- value: i,
2692
- children: a,
2693
- location: E(n, this.clonePosition())
2694
- },
2695
- err: null
2696
- } : this.error(v.INVALID_TAG, E(s, this.clonePosition())));
2697
- } else
2698
- return this.error(v.UNCLOSED_TAG, E(n, this.clonePosition()));
2699
- } else
2700
- return this.error(v.INVALID_TAG, E(n, this.clonePosition()));
2701
- }, e.prototype.parseTagName = function() {
2702
- var t = this.offset();
2703
- for (this.bump(); !this.isEOF() && Vn(this.char()); )
2704
- this.bump();
2705
- return this.message.slice(t, this.offset());
2706
- }, e.prototype.parseLiteral = function(t, r) {
2707
- for (var n = this.clonePosition(), i = ""; ; ) {
2708
- var o = this.tryParseQuote(r);
2709
- if (o) {
2710
- i += o;
2711
- continue;
2712
- }
2713
- var a = this.tryParseUnquoted(t, r);
2714
- if (a) {
2715
- i += a;
2716
- continue;
2717
- }
2718
- var s = this.tryParseLeftAngleBracket();
2719
- if (s) {
2720
- i += s;
2721
- continue;
2722
- }
2723
- break;
2724
- }
2725
- var l = E(n, this.clonePosition());
2726
- return {
2727
- val: { type: P.literal, value: i, location: l },
2728
- err: null
2729
- };
2730
- }, e.prototype.tryParseLeftAngleBracket = function() {
2731
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
2732
- !Fn(this.peek() || 0)) ? (this.bump(), "<") : null;
2733
- }, e.prototype.tryParseQuote = function(t) {
2734
- if (this.isEOF() || this.char() !== 39)
2735
- return null;
2736
- switch (this.peek()) {
2737
- case 39:
2738
- return this.bump(), this.bump(), "'";
2739
- case 123:
2740
- case 60:
2741
- case 62:
2742
- case 125:
2743
- break;
2744
- case 35:
2745
- if (t === "plural" || t === "selectordinal")
2746
- break;
2747
- return null;
2748
- default:
2749
- return null;
2750
- }
2751
- this.bump();
2752
- var r = [this.char()];
2753
- for (this.bump(); !this.isEOF(); ) {
2754
- var n = this.char();
2755
- if (n === 39)
2756
- if (this.peek() === 39)
2757
- r.push(39), this.bump();
2758
- else {
2759
- this.bump();
2760
- break;
2761
- }
2762
- else
2763
- r.push(n);
2764
- this.bump();
2765
- }
2766
- return Ve.apply(void 0, r);
2767
- }, e.prototype.tryParseUnquoted = function(t, r) {
2768
- if (this.isEOF())
2769
- return null;
2770
- var n = this.char();
2771
- return n === 60 || n === 123 || n === 35 && (r === "plural" || r === "selectordinal") || n === 125 && t > 0 ? null : (this.bump(), Ve(n));
2772
- }, e.prototype.parseArgument = function(t, r) {
2773
- var n = this.clonePosition();
2774
- if (this.bump(), this.bumpSpace(), this.isEOF())
2775
- return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
2776
- if (this.char() === 125)
2777
- return this.bump(), this.error(v.EMPTY_ARGUMENT, E(n, this.clonePosition()));
2778
- var i = this.parseIdentifierIfPossible().value;
2779
- if (!i)
2780
- return this.error(v.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
2781
- if (this.bumpSpace(), this.isEOF())
2782
- return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
2783
- switch (this.char()) {
2784
- case 125:
2785
- return this.bump(), {
2786
- val: {
2787
- type: P.argument,
2788
- // value does not include the opening and closing braces.
2789
- value: i,
2790
- location: E(n, this.clonePosition())
2791
- },
2792
- err: null
2793
- };
2794
- case 44:
2795
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
2796
- default:
2797
- return this.error(v.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
2798
- }
2799
- }, e.prototype.parseIdentifierIfPossible = function() {
2800
- var t = this.clonePosition(), r = this.offset(), n = ze(this.message, r), i = r + n.length;
2801
- this.bumpTo(i);
2802
- var o = this.clonePosition(), a = E(t, o);
2803
- return { value: n, location: a };
2804
- }, e.prototype.parseArgumentOptions = function(t, r, n, i) {
2805
- var o, a = this.clonePosition(), s = this.parseIdentifierIfPossible().value, l = this.clonePosition();
2806
- switch (s) {
2807
- case "":
2808
- return this.error(v.EXPECT_ARGUMENT_TYPE, E(a, l));
2809
- case "number":
2810
- case "date":
2811
- case "time": {
2812
- this.bumpSpace();
2813
- var u = null;
2814
- if (this.bumpIf(",")) {
2815
- this.bumpSpace();
2816
- var h = this.clonePosition(), f = this.parseSimpleArgStyleIfPossible();
2817
- if (f.err)
2818
- return f;
2819
- var p = jn(f.val);
2820
- if (p.length === 0)
2821
- return this.error(v.EXPECT_ARGUMENT_STYLE, E(this.clonePosition(), this.clonePosition()));
2822
- var g = E(h, this.clonePosition());
2823
- u = { style: p, styleLocation: g };
2824
- }
2825
- var d = this.tryParseArgumentClose(i);
2826
- if (d.err)
2827
- return d;
2828
- var H = E(i, this.clonePosition());
2829
- if (u && dt(u?.style, "::", 0)) {
2830
- var R = Gn(u.style.slice(2));
2831
- if (s === "number") {
2832
- var f = this.parseNumberSkeletonFromString(R, u.styleLocation);
2833
- return f.err ? f : {
2834
- val: { type: P.number, value: n, location: H, style: f.val },
2835
- err: null
2836
- };
2837
- } else {
2838
- if (R.length === 0)
2839
- return this.error(v.EXPECT_DATE_TIME_SKELETON, H);
2840
- var G = R;
2841
- this.locale && (G = Sn(R, this.locale));
2842
- var p = {
2843
- type: ie.dateTime,
2844
- pattern: G,
2845
- location: u.styleLocation,
2846
- parsedOptions: this.shouldParseSkeletons ? yn(G) : {}
2847
- }, I = s === "date" ? P.date : P.time;
2848
- return {
2849
- val: { type: I, value: n, location: H, style: p },
2850
- err: null
2851
- };
2852
- }
2853
- }
2854
- return {
2855
- val: {
2856
- type: s === "number" ? P.number : s === "date" ? P.date : P.time,
2857
- value: n,
2858
- location: H,
2859
- style: (o = u?.style) !== null && o !== void 0 ? o : null
2860
- },
2861
- err: null
2862
- };
2863
- }
2864
- case "plural":
2865
- case "selectordinal":
2866
- case "select": {
2867
- var B = this.clonePosition();
2868
- if (this.bumpSpace(), !this.bumpIf(","))
2869
- return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS, E(B, Oe({}, B)));
2870
- this.bumpSpace();
2871
- var _ = this.parseIdentifierIfPossible(), N = 0;
2872
- if (s !== "select" && _.value === "offset") {
2873
- if (!this.bumpIf(":"))
2874
- return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, E(this.clonePosition(), this.clonePosition()));
2875
- this.bumpSpace();
2876
- var f = this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2877
- if (f.err)
2878
- return f;
2879
- this.bumpSpace(), _ = this.parseIdentifierIfPossible(), N = f.val;
2880
- }
2881
- var T = this.tryParsePluralOrSelectOptions(t, s, r, _);
2882
- if (T.err)
2883
- return T;
2884
- var d = this.tryParseArgumentClose(i);
2885
- if (d.err)
2886
- return d;
2887
- var F = E(i, this.clonePosition());
2888
- return s === "select" ? {
2889
- val: {
2890
- type: P.select,
2891
- value: n,
2892
- options: mt(T.val),
2893
- location: F
2894
- },
2895
- err: null
2896
- } : {
2897
- val: {
2898
- type: P.plural,
2899
- value: n,
2900
- options: mt(T.val),
2901
- offset: N,
2902
- pluralType: s === "plural" ? "cardinal" : "ordinal",
2903
- location: F
2904
- },
2905
- err: null
2906
- };
2907
- }
2908
- default:
2909
- return this.error(v.INVALID_ARGUMENT_TYPE, E(a, l));
2910
- }
2911
- }, e.prototype.tryParseArgumentClose = function(t) {
2912
- return this.isEOF() || this.char() !== 125 ? this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE, E(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
2913
- }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2914
- for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
2915
- var n = this.char();
2916
- switch (n) {
2917
- case 39: {
2918
- this.bump();
2919
- var i = this.clonePosition();
2920
- if (!this.bumpUntil("'"))
2921
- return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, E(i, this.clonePosition()));
2922
- this.bump();
2923
- break;
2924
- }
2925
- case 123: {
2926
- t += 1, this.bump();
2927
- break;
2928
- }
2929
- case 125: {
2930
- if (t > 0)
2931
- t -= 1;
2932
- else
2933
- return {
2934
- val: this.message.slice(r.offset, this.offset()),
2935
- err: null
2936
- };
2937
- break;
2938
- }
2939
- default:
2940
- this.bump();
2941
- break;
2942
- }
2943
- }
2944
- return {
2945
- val: this.message.slice(r.offset, this.offset()),
2946
- err: null
2947
- };
2948
- }, e.prototype.parseNumberSkeletonFromString = function(t, r) {
2949
- var n = [];
2950
- try {
2951
- n = xn(t);
2952
- } catch {
2953
- return this.error(v.INVALID_NUMBER_SKELETON, r);
2954
- }
2955
- return {
2956
- val: {
2957
- type: ie.number,
2958
- tokens: n,
2959
- location: r,
2960
- parsedOptions: this.shouldParseSkeletons ? Pn(n) : {}
2961
- },
2962
- err: null
2963
- };
2964
- }, e.prototype.tryParsePluralOrSelectOptions = function(t, r, n, i) {
2965
- for (var o, a = !1, s = [], l = /* @__PURE__ */ new Set(), u = i.value, h = i.location; ; ) {
2966
- if (u.length === 0) {
2967
- var f = this.clonePosition();
2968
- if (r !== "select" && this.bumpIf("=")) {
2969
- var p = this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR, v.INVALID_PLURAL_ARGUMENT_SELECTOR);
2970
- if (p.err)
2971
- return p;
2972
- h = E(f, this.clonePosition()), u = this.message.slice(f.offset, this.offset());
2973
- } else
2974
- break;
2975
- }
2976
- if (l.has(u))
2977
- return this.error(r === "select" ? v.DUPLICATE_SELECT_ARGUMENT_SELECTOR : v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, h);
2978
- u === "other" && (a = !0), this.bumpSpace();
2979
- var g = this.clonePosition();
2980
- if (!this.bumpIf("{"))
2981
- return this.error(r === "select" ? v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, E(this.clonePosition(), this.clonePosition()));
2982
- var d = this.parseMessage(t + 1, r, n);
2983
- if (d.err)
2984
- return d;
2985
- var H = this.tryParseArgumentClose(g);
2986
- if (H.err)
2987
- return H;
2988
- s.push([
2989
- u,
2990
- {
2991
- value: d.val,
2992
- location: E(g, this.clonePosition())
2993
- }
2994
- ]), l.add(u), this.bumpSpace(), o = this.parseIdentifierIfPossible(), u = o.value, h = o.location;
2995
- }
2996
- return s.length === 0 ? this.error(r === "select" ? v.EXPECT_SELECT_ARGUMENT_SELECTOR : v.EXPECT_PLURAL_ARGUMENT_SELECTOR, E(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !a ? this.error(v.MISSING_OTHER_CLAUSE, E(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
2997
- }, e.prototype.tryParseDecimalInteger = function(t, r) {
2998
- var n = 1, i = this.clonePosition();
2999
- this.bumpIf("+") || this.bumpIf("-") && (n = -1);
3000
- for (var o = !1, a = 0; !this.isEOF(); ) {
3001
- var s = this.char();
3002
- if (s >= 48 && s <= 57)
3003
- o = !0, a = a * 10 + (s - 48), this.bump();
3004
- else
3005
- break;
3006
- }
3007
- var l = E(i, this.clonePosition());
3008
- return o ? (a *= n, Dn(a) ? { val: a, err: null } : this.error(r, l)) : this.error(t, l);
3009
- }, e.prototype.offset = function() {
3010
- return this.position.offset;
3011
- }, e.prototype.isEOF = function() {
3012
- return this.offset() === this.message.length;
3013
- }, e.prototype.clonePosition = function() {
3014
- return {
3015
- offset: this.position.offset,
3016
- line: this.position.line,
3017
- column: this.position.column
3018
- };
3019
- }, e.prototype.char = function() {
3020
- var t = this.position.offset;
3021
- if (t >= this.message.length)
3022
- throw Error("out of bound");
3023
- var r = Xt(this.message, t);
3024
- if (r === void 0)
3025
- throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3026
- return r;
3027
- }, e.prototype.error = function(t, r) {
3028
- return {
3029
- val: null,
3030
- err: {
3031
- kind: t,
3032
- message: this.message,
3033
- location: r
3034
- }
3035
- };
3036
- }, e.prototype.bump = function() {
3037
- if (!this.isEOF()) {
3038
- var t = this.char();
3039
- 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);
3040
- }
3041
- }, e.prototype.bumpIf = function(t) {
3042
- if (dt(this.message, t, this.offset())) {
3043
- for (var r = 0; r < t.length; r++)
3044
- this.bump();
3045
- return !0;
3046
- }
3047
- return !1;
3048
- }, e.prototype.bumpUntil = function(t) {
3049
- var r = this.offset(), n = this.message.indexOf(t, r);
3050
- return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
3051
- }, e.prototype.bumpTo = function(t) {
3052
- if (this.offset() > t)
3053
- throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
3054
- for (t = Math.min(t, this.message.length); ; ) {
3055
- var r = this.offset();
3056
- if (r === t)
3057
- break;
3058
- if (r > t)
3059
- throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3060
- if (this.bump(), this.isEOF())
3061
- break;
3062
- }
3063
- }, e.prototype.bumpSpace = function() {
3064
- for (; !this.isEOF() && qt(this.char()); )
3065
- this.bump();
3066
- }, e.prototype.peek = function() {
3067
- if (this.isEOF())
3068
- return null;
3069
- var t = this.char(), r = this.offset(), n = this.message.charCodeAt(r + (t >= 65536 ? 2 : 1));
3070
- return n ?? null;
3071
- }, e;
3072
- }()
3073
- );
3074
- function Xe(e) {
3075
- return e >= 97 && e <= 122 || e >= 65 && e <= 90;
3076
- }
3077
- function Fn(e) {
3078
- return Xe(e) || e === 47;
3079
- }
3080
- function Vn(e) {
3081
- 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;
3082
- }
3083
- function qt(e) {
3084
- return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
3085
- }
3086
- function zn(e) {
3087
- 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;
3088
- }
3089
- function We(e) {
3090
- e.forEach(function(t) {
3091
- if (delete t.location, Dt(t) || Ut(t))
3092
- for (var r in t.options)
3093
- delete t.options[r].location, We(t.options[r].value);
3094
- else
3095
- Ct(t) && jt(t.style) || (Rt(t) || kt(t)) && $e(t.style) ? delete t.style.location : Gt(t) && We(t.children);
3096
- });
3097
- }
3098
- function Xn(e, t) {
3099
- t === void 0 && (t = {}), t = Oe({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
3100
- var r = new $n(e, t).parse();
3101
- if (r.err) {
3102
- var n = SyntaxError(v[r.err.kind]);
3103
- throw n.location = r.err.location, n.originalMessage = r.err.message, n;
3104
- }
3105
- return t?.captureLocation || We(r.val), r.val;
3106
- }
3107
- var oe;
3108
- (function(e) {
3109
- e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
3110
- })(oe || (oe = {}));
3111
- var we = (
3112
- /** @class */
3113
- function(e) {
3114
- Se(t, e);
3115
- function t(r, n, i) {
3116
- var o = e.call(this, r) || this;
3117
- return o.code = n, o.originalMessage = i, o;
3118
- }
3119
- return t.prototype.toString = function() {
3120
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3121
- }, t;
3122
- }(Error)
3123
- ), bt = (
3124
- /** @class */
3125
- function(e) {
3126
- Se(t, e);
3127
- function t(r, n, i, o) {
3128
- return e.call(this, 'Invalid values for "'.concat(r, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), oe.INVALID_VALUE, o) || this;
3129
- }
3130
- return t;
3131
- }(we)
3132
- ), Wn = (
3133
- /** @class */
3134
- function(e) {
3135
- Se(t, e);
3136
- function t(r, n, i) {
3137
- return e.call(this, 'Value for "'.concat(r, '" must be of type ').concat(n), oe.INVALID_VALUE, i) || this;
3138
- }
3139
- return t;
3140
- }(we)
3141
- ), qn = (
3142
- /** @class */
3143
- function(e) {
3144
- Se(t, e);
3145
- function t(r, n) {
3146
- return e.call(this, 'The intl string context variable "'.concat(r, '" was not provided to the string "').concat(n, '"'), oe.MISSING_VALUE, n) || this;
3147
- }
3148
- return t;
3149
- }(we)
3150
- ), k;
3151
- (function(e) {
3152
- e[e.literal = 0] = "literal", e[e.object = 1] = "object";
3153
- })(k || (k = {}));
3154
- function Zn(e) {
3155
- return e.length < 2 ? e : e.reduce(function(t, r) {
3156
- var n = t[t.length - 1];
3157
- return !n || n.type !== k.literal || r.type !== k.literal ? t.push(r) : n.value += r.value, t;
3158
- }, []);
3159
- }
3160
- function Qn(e) {
3161
- return typeof e == "function";
3162
- }
3163
- function ye(e, t, r, n, i, o, a) {
3164
- if (e.length === 1 && ht(e[0]))
3165
- return [
3166
- {
3167
- type: k.literal,
3168
- value: e[0].value
3169
- }
3170
- ];
3171
- for (var s = [], l = 0, u = e; l < u.length; l++) {
3172
- var h = u[l];
3173
- if (ht(h)) {
3174
- s.push({
3175
- type: k.literal,
3176
- value: h.value
3177
- });
3178
- continue;
3179
- }
3180
- if (vn(h)) {
3181
- typeof o == "number" && s.push({
3182
- type: k.literal,
3183
- value: r.getNumberFormat(t).format(o)
3184
- });
3185
- continue;
3186
- }
3187
- var f = h.value;
3188
- if (!(i && f in i))
3189
- throw new qn(f, a);
3190
- var p = i[f];
3191
- if (bn(h)) {
3192
- (!p || typeof p == "string" || typeof p == "number") && (p = typeof p == "string" || typeof p == "number" ? String(p) : ""), s.push({
3193
- type: typeof p == "string" ? k.literal : k.object,
3194
- value: p
3195
- });
3196
- continue;
3197
- }
3198
- if (Rt(h)) {
3199
- var g = typeof h.style == "string" ? n.date[h.style] : $e(h.style) ? h.style.parsedOptions : void 0;
3200
- s.push({
3201
- type: k.literal,
3202
- value: r.getDateTimeFormat(t, g).format(p)
3203
- });
3204
- continue;
3205
- }
3206
- if (kt(h)) {
3207
- var g = typeof h.style == "string" ? n.time[h.style] : $e(h.style) ? h.style.parsedOptions : n.time.medium;
3208
- s.push({
3209
- type: k.literal,
3210
- value: r.getDateTimeFormat(t, g).format(p)
3211
- });
3212
- continue;
3213
- }
3214
- if (Ct(h)) {
3215
- var g = typeof h.style == "string" ? n.number[h.style] : jt(h.style) ? h.style.parsedOptions : void 0;
3216
- g && g.scale && (p = p * (g.scale || 1)), s.push({
3217
- type: k.literal,
3218
- value: r.getNumberFormat(t, g).format(p)
3219
- });
3220
- continue;
3221
- }
3222
- if (Gt(h)) {
3223
- var d = h.children, H = h.value, R = i[H];
3224
- if (!Qn(R))
3225
- throw new Wn(H, "function", a);
3226
- var G = ye(d, t, r, n, i, o), I = R(G.map(function(N) {
3227
- return N.value;
3228
- }));
3229
- Array.isArray(I) || (I = [I]), s.push.apply(s, I.map(function(N) {
3230
- return {
3231
- type: typeof N == "string" ? k.literal : k.object,
3232
- value: N
3233
- };
3234
- }));
3235
- }
3236
- if (Dt(h)) {
3237
- var B = h.options[p] || h.options.other;
3238
- if (!B)
3239
- throw new bt(h.value, p, Object.keys(h.options), a);
3240
- s.push.apply(s, ye(B.value, t, r, n, i));
3241
- continue;
3242
- }
3243
- if (Ut(h)) {
3244
- var B = h.options["=".concat(p)];
3245
- if (!B) {
3246
- if (!Intl.PluralRules)
3247
- throw new we(`Intl.PluralRules is not available in this environment.
3248
- Try polyfilling it using "@formatjs/intl-pluralrules"
3249
- `, oe.MISSING_INTL_API, a);
3250
- var _ = r.getPluralRules(t, { type: h.pluralType }).select(p - (h.offset || 0));
3251
- B = h.options[_] || h.options.other;
3252
- }
3253
- if (!B)
3254
- throw new bt(h.value, p, Object.keys(h.options), a);
3255
- s.push.apply(s, ye(B.value, t, r, n, i, p - (h.offset || 0)));
3256
- continue;
3257
- }
3258
- }
3259
- return Zn(s);
3260
- }
3261
- function Jn(e, t) {
3262
- return t ? $($($({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
3263
- return r[n] = $($({}, e[n]), t[n] || {}), r;
3264
- }, {})) : e;
3265
- }
3266
- function Yn(e, t) {
3267
- return t ? Object.keys(e).reduce(function(r, n) {
3268
- return r[n] = Jn(e[n], t[n]), r;
3269
- }, $({}, e)) : e;
3270
- }
3271
- function ke(e) {
3272
- return {
3273
- create: function() {
3274
- return {
3275
- get: function(t) {
3276
- return e[t];
3277
- },
3278
- set: function(t, r) {
3279
- e[t] = r;
3280
- }
3281
- };
3282
- }
3283
- };
3284
- }
3285
- function Kn(e) {
3286
- return e === void 0 && (e = {
3287
- number: {},
3288
- dateTime: {},
3289
- pluralRules: {}
3290
- }), {
3291
- getNumberFormat: Ne(function() {
3292
- for (var t, r = [], n = 0; n < arguments.length; n++)
3293
- r[n] = arguments[n];
3294
- return new ((t = Intl.NumberFormat).bind.apply(t, Ie([void 0], r, !1)))();
3295
- }, {
3296
- cache: ke(e.number),
3297
- strategy: Ce.variadic
3298
- }),
3299
- getDateTimeFormat: Ne(function() {
3300
- for (var t, r = [], n = 0; n < arguments.length; n++)
3301
- r[n] = arguments[n];
3302
- return new ((t = Intl.DateTimeFormat).bind.apply(t, Ie([void 0], r, !1)))();
3303
- }, {
3304
- cache: ke(e.dateTime),
3305
- strategy: Ce.variadic
3306
- }),
3307
- getPluralRules: Ne(function() {
3308
- for (var t, r = [], n = 0; n < arguments.length; n++)
3309
- r[n] = arguments[n];
3310
- return new ((t = Intl.PluralRules).bind.apply(t, Ie([void 0], r, !1)))();
3311
- }, {
3312
- cache: ke(e.pluralRules),
3313
- strategy: Ce.variadic
3314
- })
3315
- };
3316
- }
3317
- var ei = (
3318
- /** @class */
3319
- function() {
3320
- function e(t, r, n, i) {
3321
- r === void 0 && (r = e.defaultLocale);
3322
- var o = this;
3323
- if (this.formatterCache = {
3324
- number: {},
3325
- dateTime: {},
3326
- pluralRules: {}
3327
- }, this.format = function(l) {
3328
- var u = o.formatToParts(l);
3329
- if (u.length === 1)
3330
- return u[0].value;
3331
- var h = u.reduce(function(f, p) {
3332
- return !f.length || p.type !== k.literal || typeof f[f.length - 1] != "string" ? f.push(p.value) : f[f.length - 1] += p.value, f;
3333
- }, []);
3334
- return h.length <= 1 ? h[0] || "" : h;
3335
- }, this.formatToParts = function(l) {
3336
- return ye(o.ast, o.locales, o.formatters, o.formats, l, void 0, o.message);
3337
- }, this.resolvedOptions = function() {
3338
- var l;
3339
- return {
3340
- locale: ((l = o.resolvedLocale) === null || l === void 0 ? void 0 : l.toString()) || Intl.NumberFormat.supportedLocalesOf(o.locales)[0]
3341
- };
3342
- }, this.getAst = function() {
3343
- return o.ast;
3344
- }, this.locales = r, this.resolvedLocale = e.resolveLocale(r), typeof t == "string") {
3345
- if (this.message = t, !e.__parse)
3346
- throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3347
- var a = i || {};
3348
- a.formatters;
3349
- var s = ln(a, ["formatters"]);
3350
- this.ast = e.__parse(t, $($({}, s), { locale: this.resolvedLocale }));
3351
- } else
3352
- this.ast = t;
3353
- if (!Array.isArray(this.ast))
3354
- throw new TypeError("A message must be provided as a String or AST.");
3355
- this.formats = Yn(e.formats, n), this.formatters = i && i.formatters || Kn(this.formatterCache);
3356
- }
3357
- return Object.defineProperty(e, "defaultLocale", {
3358
- get: function() {
3359
- return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale;
3360
- },
3361
- enumerable: !1,
3362
- configurable: !0
3363
- }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
3364
- if (!(typeof Intl.Locale > "u")) {
3365
- var r = Intl.NumberFormat.supportedLocalesOf(t);
3366
- return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
3367
- }
3368
- }, e.__parse = Xn, e.formats = {
3369
- number: {
3370
- integer: {
3371
- maximumFractionDigits: 0
3372
- },
3373
- currency: {
3374
- style: "currency"
3375
- },
3376
- percent: {
3377
- style: "percent"
3378
- }
3379
- },
3380
- date: {
3381
- short: {
3382
- month: "numeric",
3383
- day: "numeric",
3384
- year: "2-digit"
3385
- },
3386
- medium: {
3387
- month: "short",
3388
- day: "numeric",
3389
- year: "numeric"
3390
- },
3391
- long: {
3392
- month: "long",
3393
- day: "numeric",
3394
- year: "numeric"
3395
- },
3396
- full: {
3397
- weekday: "long",
3398
- month: "long",
3399
- day: "numeric",
3400
- year: "numeric"
3401
- }
3402
- },
3403
- time: {
3404
- short: {
3405
- hour: "numeric",
3406
- minute: "numeric"
3407
- },
3408
- medium: {
3409
- hour: "numeric",
3410
- minute: "numeric",
3411
- second: "numeric"
3412
- },
3413
- long: {
3414
- hour: "numeric",
3415
- minute: "numeric",
3416
- second: "numeric",
3417
- timeZoneName: "short"
3418
- },
3419
- full: {
3420
- hour: "numeric",
3421
- minute: "numeric",
3422
- second: "numeric",
3423
- timeZoneName: "short"
3424
- }
3425
- }
3426
- }, e;
3427
- }()
3428
- );
3429
- function ti(e, t) {
3430
- if (t == null)
3431
- return;
3432
- if (t in e)
3433
- return e[t];
3434
- const r = t.split(".");
3435
- let n = e;
3436
- for (let i = 0; i < r.length; i++)
3437
- if (typeof n == "object") {
3438
- if (i > 0) {
3439
- const o = r.slice(i, r.length).join(".");
3440
- if (o in n) {
3441
- n = n[o];
3442
- break;
3443
- }
3444
- }
3445
- n = n[r[i]];
3446
- } else
3447
- n = void 0;
3448
- return n;
3449
- }
3450
- const q = {}, ri = (e, t, r) => r && (t in q || (q[t] = {}), e in q[t] || (q[t][e] = r), r), Zt = (e, t) => {
3451
- if (t == null)
3452
- return;
3453
- if (t in q && e in q[t])
3454
- return q[t][e];
3455
- const r = Be(t);
3456
- for (let n = 0; n < r.length; n++) {
3457
- const i = r[n], o = ii(i, e);
3458
- if (o)
3459
- return ri(e, t, o);
3460
- }
3461
- };
3462
- let Ye;
3463
- const ge = Pe({});
3464
- function ni(e) {
3465
- return Ye[e] || null;
3466
- }
3467
- function Qt(e) {
3468
- return e in Ye;
3469
- }
3470
- function ii(e, t) {
3471
- if (!Qt(e))
3472
- return null;
3473
- const r = ni(e);
3474
- return ti(r, t);
3475
- }
3476
- function oi(e) {
3477
- if (e == null)
3478
- return;
3479
- const t = Be(e);
3480
- for (let r = 0; r < t.length; r++) {
3481
- const n = t[r];
3482
- if (Qt(n))
3483
- return n;
3484
- }
3485
- }
3486
- function Jt(e, ...t) {
3487
- delete q[e], ge.update((r) => (r[e] = un.all([r[e] || {}, ...t]), r));
3488
- }
3489
- ue(
3490
- [ge],
3491
- ([e]) => Object.keys(e)
3492
- );
3493
- ge.subscribe((e) => Ye = e);
3494
- const _e = {};
3495
- function si(e, t) {
3496
- _e[e].delete(t), _e[e].size === 0 && delete _e[e];
3497
- }
3498
- function Yt(e) {
3499
- return _e[e];
3500
- }
3501
- function ai(e) {
3502
- return Be(e).map((t) => {
3503
- const r = Yt(t);
3504
- return [t, r ? [...r] : []];
3505
- }).filter(([, t]) => t.length > 0);
3506
- }
3507
- function qe(e) {
3508
- return e == null ? !1 : Be(e).some(
3509
- (t) => {
3510
- var r;
3511
- return (r = Yt(t)) == null ? void 0 : r.size;
3512
- }
3513
- );
3514
- }
3515
- function ui(e, t) {
3516
- return Promise.all(
3517
- t.map((n) => (si(e, n), n().then((i) => i.default || i)))
3518
- ).then((n) => Jt(e, ...n));
3519
- }
3520
- const ce = {};
3521
- function Kt(e) {
3522
- if (!qe(e))
3523
- return e in ce ? ce[e] : Promise.resolve();
3524
- const t = ai(e);
3525
- return ce[e] = Promise.all(
3526
- t.map(
3527
- ([r, n]) => ui(r, n)
3528
- )
3529
- ).then(() => {
3530
- if (qe(e))
3531
- return Kt(e);
3532
- delete ce[e];
3533
- }), ce[e];
3534
- }
3535
- const li = {
3536
- number: {
3537
- scientific: { notation: "scientific" },
3538
- engineering: { notation: "engineering" },
3539
- compactLong: { notation: "compact", compactDisplay: "long" },
3540
- compactShort: { notation: "compact", compactDisplay: "short" }
3541
- },
3542
- date: {
3543
- short: { month: "numeric", day: "numeric", year: "2-digit" },
3544
- medium: { month: "short", day: "numeric", year: "numeric" },
3545
- long: { month: "long", day: "numeric", year: "numeric" },
3546
- full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
3547
- },
3548
- time: {
3549
- short: { hour: "numeric", minute: "numeric" },
3550
- medium: { hour: "numeric", minute: "numeric", second: "numeric" },
3551
- long: {
3552
- hour: "numeric",
3553
- minute: "numeric",
3554
- second: "numeric",
3555
- timeZoneName: "short"
3556
- },
3557
- full: {
3558
- hour: "numeric",
3559
- minute: "numeric",
3560
- second: "numeric",
3561
- timeZoneName: "short"
3562
- }
3563
- }
3564
- }, hi = {
3565
- fallbackLocale: null,
3566
- loadingDelay: 200,
3567
- formats: li,
3568
- warnOnMissingMessages: !0,
3569
- handleMissingMessage: void 0,
3570
- ignoreTag: !0
3571
- }, ci = hi;
3572
- function se() {
3573
- return ci;
3574
- }
3575
- const De = Pe(!1);
3576
- var fi = Object.defineProperty, pi = Object.defineProperties, di = Object.getOwnPropertyDescriptors, vt = Object.getOwnPropertySymbols, mi = Object.prototype.hasOwnProperty, gi = Object.prototype.propertyIsEnumerable, Et = (e, t, r) => t in e ? fi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bi = (e, t) => {
3577
- for (var r in t || (t = {}))
3578
- mi.call(t, r) && Et(e, r, t[r]);
3579
- if (vt)
3580
- for (var r of vt(t))
3581
- gi.call(t, r) && Et(e, r, t[r]);
3582
- return e;
3583
- }, vi = (e, t) => pi(e, di(t));
3584
- let Ze;
3585
- const Te = Pe(null);
3586
- function yt(e) {
3587
- return e.split("-").map((t, r, n) => n.slice(0, r + 1).join("-")).reverse();
3588
- }
3589
- function Be(e, t = se().fallbackLocale) {
3590
- const r = yt(e);
3591
- return t ? [.../* @__PURE__ */ new Set([...r, ...yt(t)])] : r;
3592
- }
3593
- function Q() {
3594
- return Ze ?? void 0;
3595
- }
3596
- Te.subscribe((e) => {
3597
- Ze = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
3598
- });
3599
- const Ei = (e) => {
3600
- if (e && oi(e) && qe(e)) {
3601
- const { loadingDelay: t } = se();
3602
- let r;
3603
- return typeof window < "u" && Q() != null && t ? r = window.setTimeout(
3604
- () => De.set(!0),
3605
- t
3606
- ) : De.set(!0), Kt(e).then(() => {
3607
- Te.set(e);
3608
- }).finally(() => {
3609
- clearTimeout(r), De.set(!1);
3610
- });
3611
- }
3612
- return Te.set(e);
3613
- }, le = vi(bi({}, Te), {
3614
- set: Ei
3615
- }), Ae = (e) => {
3616
- const t = /* @__PURE__ */ Object.create(null);
3617
- return (n) => {
3618
- const i = JSON.stringify(n);
3619
- return i in t ? t[i] : t[i] = e(n);
3620
- };
3621
- };
3622
- var yi = Object.defineProperty, He = Object.getOwnPropertySymbols, er = Object.prototype.hasOwnProperty, tr = Object.prototype.propertyIsEnumerable, _t = (e, t, r) => t in e ? yi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ke = (e, t) => {
3623
- for (var r in t || (t = {}))
3624
- er.call(t, r) && _t(e, r, t[r]);
3625
- if (He)
3626
- for (var r of He(t))
3627
- tr.call(t, r) && _t(e, r, t[r]);
3628
- return e;
3629
- }, he = (e, t) => {
3630
- var r = {};
3631
- for (var n in e)
3632
- er.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
3633
- if (e != null && He)
3634
- for (var n of He(e))
3635
- t.indexOf(n) < 0 && tr.call(e, n) && (r[n] = e[n]);
3636
- return r;
3637
- };
3638
- const me = (e, t) => {
3639
- const { formats: r } = se();
3640
- if (e in r && t in r[e])
3641
- return r[e][t];
3642
- throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`);
3643
- }, _i = Ae(
3644
- (e) => {
3645
- var t = e, { locale: r, format: n } = t, i = he(t, ["locale", "format"]);
3646
- if (r == null)
3647
- throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
3648
- return n && (i = me("number", n)), new Intl.NumberFormat(r, i);
3649
- }
3650
- ), xi = Ae(
3651
- (e) => {
3652
- var t = e, { locale: r, format: n } = t, i = he(t, ["locale", "format"]);
3653
- if (r == null)
3654
- throw new Error('[svelte-i18n] A "locale" must be set to format dates');
3655
- return n ? i = me("date", n) : Object.keys(i).length === 0 && (i = me("date", "short")), new Intl.DateTimeFormat(r, i);
3656
- }
3657
- ), Oi = Ae(
3658
- (e) => {
3659
- var t = e, { locale: r, format: n } = t, i = he(t, ["locale", "format"]);
3660
- if (r == null)
3661
- throw new Error(
3662
- '[svelte-i18n] A "locale" must be set to format time values'
3663
- );
3664
- return n ? i = me("time", n) : Object.keys(i).length === 0 && (i = me("time", "short")), new Intl.DateTimeFormat(r, i);
3665
- }
3666
- ), Ti = (e = {}) => {
3667
- var t = e, {
3668
- locale: r = Q()
3669
- } = t, n = he(t, [
3670
- "locale"
3671
- ]);
3672
- return _i(Ke({ locale: r }, n));
3673
- }, Hi = (e = {}) => {
3674
- var t = e, {
3675
- locale: r = Q()
3676
- } = t, n = he(t, [
3677
- "locale"
3678
- ]);
3679
- return xi(Ke({ locale: r }, n));
3680
- }, Pi = (e = {}) => {
3681
- var t = e, {
3682
- locale: r = Q()
3683
- } = t, n = he(t, [
3684
- "locale"
3685
- ]);
3686
- return Oi(Ke({ locale: r }, n));
3687
- }, Si = Ae(
3688
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3689
- (e, t = Q()) => new ei(e, t, se().formats, {
3690
- ignoreTag: se().ignoreTag
3691
- })
3692
- ), wi = (e, t = {}) => {
3693
- var r, n, i, o;
3694
- let a = t;
3695
- typeof e == "object" && (a = e, e = a.id);
3696
- const {
3697
- values: s,
3698
- locale: l = Q(),
3699
- default: u
3700
- } = a;
3701
- if (l == null)
3702
- throw new Error(
3703
- "[svelte-i18n] Cannot format a message without first setting the initial locale."
3704
- );
3705
- let h = Zt(e, l);
3706
- if (!h)
3707
- h = (o = (i = (n = (r = se()).handleMissingMessage) == null ? void 0 : n.call(r, { locale: l, id: e, defaultValue: u })) != null ? i : u) != null ? o : e;
3708
- else if (typeof h != "string")
3709
- return console.warn(
3710
- `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
3711
- ), h;
3712
- if (!s)
3713
- return h;
3714
- let f = h;
3715
- try {
3716
- f = Si(h, l).format(s);
3717
- } catch (p) {
3718
- p instanceof Error && console.warn(
3719
- `[svelte-i18n] Message "${e}" has syntax error:`,
3720
- p.message
3721
- );
3722
- }
3723
- return f;
3724
- }, Bi = (e, t) => Pi(t).format(e), Ai = (e, t) => Hi(t).format(e), Li = (e, t) => Ti(t).format(e), Mi = (e, t = Q()) => Zt(e, t), Ii = ue([le, ge], () => wi);
3725
- ue([le], () => Bi);
3726
- ue([le], () => Ai);
3727
- ue([le], () => Li);
3728
- ue([le, ge], () => Mi);
3729
- function xt(e, t) {
3730
- Jt(e, t);
3731
- }
3732
- function Ni(e) {
3733
- le.set(e);
3734
- }
3735
- const Ot = {
3736
- en: {
3737
- popupMessage: "Please enter the security code received on your email address to perform the update.",
3738
- popupMessageLastWarning: "If the next validation attempt is failed, you will be logged out and blocked temporarily.",
3739
- minutes: "minutes",
3740
- errorHeader: "Error",
3741
- configError: "Unable to load OTP data. Please try again later.",
3742
- otpHeading: "Enter OTP",
3743
- resendOtp: "Resent OTP",
3744
- submit: "Submit",
3745
- close: "Close",
3746
- invalidOtp: "The code you've sent is not valid. Please try again.",
3747
- accountBlocked: "Too many attempts for OTP. Your account has been blocked for one hour.",
3748
- submissionError: "Something went wrong. Please try again.",
3749
- otpExpiredMessage: "Validation code has expired, please request a new one to continue."
3750
- },
3751
- ro: {
3752
- popupMessage: "Introduceți codul de securitate primit pe adresa dvs. de e-mail pentru a efectua actualizarea.",
3753
- popupMessageLastWarning: "Dacă următoarea încercare de validare eșuează, veți fi delogat și blocat temporar.",
3754
- minutes: "minute",
3755
- errorHeader: "Eroare",
3756
- configError: "Nu s-a putut încărca datele OTP. Vă rugăm să încercați din nou mai târziu.",
3757
- otpHeading: "Introduceți OTP",
3758
- resendOtp: "Retrimitere OTP",
3759
- submit: "Trimite",
3760
- close: "Închide",
3761
- invalidOtp: "Codul introdus nu este valid. Vă rugăm să încercați din nou.",
3762
- accountBlocked: "Prea multe încercări de OTP. Contul dvs. a fost blocat timp de o oră.",
3763
- submissionError: "Ceva a mers prost. Vă rugăm să încercați din nou.",
3764
- otpExpiredMessage: "Codul de validare a expirat, vă rugăm să solicitați unul nou pentru a continua."
3765
- },
3766
- fr: {
3767
- popupMessage: "Veuillez entrer le code de sécurité reçu sur votre adresse e-mail pour effectuer la mise à jour.",
3768
- popupMessageLastWarning: "Si la prochaine tentative de validation échoue, vous serez déconnecté et temporairement bloqué.",
3769
- minutes: "minutes",
3770
- errorHeader: "Erreur",
3771
- configError: "Impossible de charger les données OTP. Veuillez réessayer plus tard.",
3772
- otpHeading: "Entrez OTP",
3773
- resendOtp: "Renvoyer OTP",
3774
- submit: "Soumettre",
3775
- close: "Fermer",
3776
- invalidOtp: "Le code que vous avez saisi n’est pas valide. Veuillez réessayer.",
3777
- accountBlocked: "Trop de tentatives OTP. Votre compte a été bloqué pendant une heure.",
3778
- submissionError: "Quelque chose s'est mal passé. Veuillez réessayer.",
3779
- otpExpiredMessage: "Le code de validation a expiré, veuillez en demander un nouveau pour continuer."
3780
- },
3781
- hu: {
3782
- popupMessage: "Kérjük, adja meg az e-mail címére küldött biztonsági kódot a frissítés végrehajtásához.",
3783
- popupMessageLastWarning: "Ha a következő érvényesítési kísérlet sikertelen, ki lesz jelentkeztetve és ideiglenesen letiltva.",
3784
- minutes: "perc",
3785
- errorHeader: "Hiba",
3786
- configError: "Nem sikerült betölteni az OTP adatokat. Kérjük, próbálja újra később.",
3787
- otpHeading: "OTP megadása",
3788
- resendOtp: "Újraküldés",
3789
- submit: "Beküldés",
3790
- close: "Bezárás",
3791
- invalidOtp: "A megadott kód érvénytelen. Kérjük, próbálja újra.",
3792
- accountBlocked: "Túl sok OTP próbálkozás. A fiókja egy órára zárolva lett.",
3793
- submissionError: "Valami hiba történt. Kérjük, próbálja újra.",
3794
- otpExpiredMessage: "A megerősítő kód lejárt, kérjük, kérjen egy újat a folytatáshoz."
3795
- },
3796
- tr: {
3797
- popupMessage: "Güncellemeyi gerçekleştirmek için e-posta adresinize gelen güvenlik kodunu girin.",
3798
- popupMessageLastWarning: "Bir sonraki doğrulama girişimi başarısız olursa, oturumunuz kapatılacak ve geçici olarak engelleneceksiniz.",
3799
- minutes: "dakika",
3800
- errorHeader: "Hata",
3801
- configError: "OTP verisi yüklenemedi. Lütfen daha sonra tekrar deneyin.",
3802
- otpHeading: "OTP Girin",
3803
- resendOtp: "OTP'yi Yeniden Gönder",
3804
- submit: "Gönder",
3805
- close: "Kapat",
3806
- invalidOtp: "Gönderdiğiniz kod geçersiz. Lütfen tekrar deneyin.",
3807
- accountBlocked: "Çok fazla OTP denemesi yapıldı. Hesabınız bir saat boyunca kilitlendi.",
3808
- submissionError: "Bir şeyler yanlış gitti. Lütfen tekrar deneyin.",
3809
- otpExpiredMessage: "Doğrulama kodunun süresi doldu, devam etmek için lütfen yeni bir tane isteyin."
3810
- },
3811
- el: {
3812
- popupMessage: "Παρακαλώ εισάγετε τον κωδικό ασφαλείας που λάβατε στο email σας για να ολοκληρώσετε την ενημέρωση.",
3813
- popupMessageLastWarning: "Αν η επόμενη προσπάθεια επικύρωσης αποτύχει, θα αποσυνδεθείτε και θα αποκλειστείτε προσωρινά.",
3814
- minutes: "λεπτά",
3815
- errorHeader: "Σφάλμα",
3816
- configError: "Δεν ήταν δυνατή η φόρτωση των δεδομένων OTP. Παρακαλούμε προσπαθήστε ξανά αργότερα.",
3817
- otpHeading: "Εισαγωγή OTP",
3818
- resendOtp: "Αποστολή ξανά OTP",
3819
- submit: "Υποβολή",
3820
- close: "Κλείσιμο",
3821
- invalidOtp: "Ο κωδικός που εισαγάγατε δεν είναι έγκυρος. Παρακαλώ προσπαθήστε ξανά.",
3822
- accountBlocked: "Πάρα πολλές προσπάθειες OTP. Ο λογαριασμός σας έχει αποκλειστεί για μία ώρα.",
3823
- submissionError: "Κάτι πήγε στραβά. Παρακαλώ προσπαθήστε ξανά.",
3824
- otpExpiredMessage: "Ο κωδικός επαλήθευσης έχει λήξει, παρακαλώ ζητήστε έναν νέο για να συνεχίσετε."
3825
- },
3826
- es: {
3827
- popupMessage: "Por favor, introduzca el código de seguridad recibido en su correo electrónico para realizar la actualización.",
3828
- popupMessageLastWarning: "Si el siguiente intento de validación falla, se cerrará tu sesión y serás bloqueado temporalmente.",
3829
- minutes: "minutos",
3830
- errorHeader: "Error",
3831
- configError: "No se pudo cargar los datos del OTP. Por favor, inténtelo de nuevo más tarde.",
3832
- otpHeading: "Introducir OTP",
3833
- resendOtp: "Reenviar OTP",
3834
- submit: "Enviar",
3835
- close: "Cerrar",
3836
- invalidOtp: "El código que ingresaste no es válido. Por favor, inténtalo de nuevo.",
3837
- accountBlocked: "Demasiados intentos de OTP. Su cuenta ha sido bloqueada por una hora.",
3838
- submissionError: "Algo salió mal. Por favor, inténtelo de nuevo.",
3839
- otpExpiredMessage: "El código de validación ha expirado, por favor solicite uno nuevo para continuar."
3840
- },
3841
- pt: {
3842
- popupMessage: "Por favor, insira o código de segurança recebido no seu e-mail para realizar a atualização.",
3843
- popupMessageLastWarning: "Se a próxima tentativa de validação falhar, será desconectado e temporariamente bloqueado.",
3844
- minutes: "minutos",
3845
- errorHeader: "Erro",
3846
- configError: "Não foi possível carregar os dados do OTP. Tente novamente mais tarde.",
3847
- otpHeading: "Insira o OTP",
3848
- resendOtp: "Reenviar OTP",
3849
- submit: "Enviar",
3850
- close: "Fechar",
3851
- invalidOtp: "O código inserido não é válido. Por favor, tente novamente.",
3852
- accountBlocked: "Muitas tentativas de OTP. Sua conta foi bloqueada por uma hora.",
3853
- submissionError: "Algo deu errado. Por favor, tente novamente.",
3854
- otpExpiredMessage: "O código de validação expirou, por favor solicite um novo para continuar."
3855
- },
3856
- hr: {
3857
- popupMessage: "Unesite sigurnosni kod primljen na vašu e-mail adresu kako biste izvršili ažuriranje.",
3858
- popupMessageLastWarning: "Ako sljedeći pokušaj provjere ne uspije, bit ćete odjavljeni i privremeno blokirani.",
3859
- minutes: "minute",
3860
- errorHeader: "Greška",
3861
- configError: "Nije moguće učitati OTP podatke. Pokušajte ponovno kasnije.",
3862
- otpHeading: "Unesite OTP",
3863
- resendOtp: "Ponovno pošalji OTP",
3864
- submit: "Pošalji",
3865
- close: "Zatvori",
3866
- invalidOtp: "Uneseni kod nije valjan. Molimo pokušajte ponovo.",
3867
- accountBlocked: "Previše pokušaja unosa OTP-a. Vaš račun je blokiran na jedan sat.",
3868
- submissionError: "Nešto je pošlo po zlu. Molimo pokušajte ponovo.",
3869
- otpExpiredMessage: "Kod za potvrdu je istekao, molimo zatražite novi kako biste nastavili."
3870
- },
3871
- de: {
3872
- popupMessage: "Bitte geben Sie den Sicherheitscode ein, den Sie an Ihre E-Mail-Adresse erhalten haben, um das Update durchzuführen.",
3873
- popupMessageLastWarning: "Wenn der nächste Validierungsversuch fehlschlägt, werden Sie abgemeldet und vorübergehend gesperrt.",
3874
- minutes: "Minuten",
3875
- errorHeader: "Fehler",
3876
- configError: "OTP-Daten konnten nicht geladen werden. Bitte versuchen Sie es später erneut.",
3877
- otpHeading: "OTP eingeben",
3878
- resendOtp: "OTP erneut senden",
3879
- submit: "Absenden",
3880
- close: "Schließen",
3881
- invalidOtp: "Der eingegebene Code ist ungültig. Bitte versuchen Sie es erneut.",
3882
- accountBlocked: "Zu viele OTP-Versuche. Ihr Konto wurde für eine Stunde gesperrt.",
3883
- submissionError: "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",
3884
- otpExpiredMessage: "Der Bestätigungscode ist abgelaufen, bitte fordern Sie einen neuen an, um fortzufahren."
3885
- },
3886
- "es-mx": {
3887
- popupMessage: "Por favor, ingrese el código de seguridad recibido en su correo electrónico para realizar la actualización.",
3888
- popupMessageLastWarning: "Si el siguiente intento de validación falla, se cerrará tu sesión y serás bloqueado temporalmente.",
3889
- minutes: "minutos",
3890
- errorHeader: "Error",
3891
- configError: "No se pudieron cargar los datos del OTP. Inténtelo de nuevo más tarde.",
3892
- otpHeading: "Ingrese OTP",
3893
- resendOtp: "Reenviar OTP",
3894
- submit: "Enviar",
3895
- close: "Cerrar",
3896
- invalidOtp: "El código que ingresó no es válido. Inténtelo de nuevo.",
3897
- accountBlocked: "Demasiados intentos de OTP. Su cuenta ha sido bloqueada por una hora.",
3898
- submissionError: "Algo salió mal. Por favor, inténtelo de nuevo.",
3899
- otpExpiredMessage: "El código de validación ha expirado, por favor solicite uno nuevo para continuar."
3900
- },
3901
- "pt-br": {
3902
- popupMessage: "Por favor, digite o código de segurança recebido no seu e-mail para realizar a atualização.",
3903
- popupMessageLastWarning: "Se a próxima tentativa de validação falhar, você será desconectado e bloqueado temporariamente.",
3904
- minutes: "minutos",
3905
- errorHeader: "Erro",
3906
- configError: "Não foi possível carregar os dados do OTP. Tente novamente mais tarde.",
3907
- otpHeading: "Digite o OTP",
3908
- resendOtp: "Reenviar OTP",
3909
- submit: "Enviar",
3910
- close: "Fechar",
3911
- invalidOtp: "O código informado não é válido. Tente novamente.",
3912
- accountBlocked: "Muitas tentativas de OTP. Sua conta foi bloqueada por uma hora.",
3913
- submissionError: "Algo deu errado. Por favor, tente novamente.",
3914
- otpExpiredMessage: "O código de validação expirou, por favor solicite um novo para continuar."
3915
- }
3916
- };
3917
- function Ci(e) {
3918
- yr(e, "svelte-1wx5k2x", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.OtpPopupOverlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--emw--color-overlay, rgba(0, 0, 0, 0.5));display:flex;align-items:center;justify-content:center}.OtpButton{font-family:var(--emw--button-typography);border:var(--emw--button-border, none);border-radius:var(--emw--button-border-radius, 3px);border-color:var(--emw--button-border-color);background-color:var(--emw--button-background-color, var(--emw--color-primary, #007bff));color:var(--emw--button-typography, var(--emw--color-white, #fff));padding:10px 20px;cursor:pointer;font-size:16px}.OtpButton.error{background:var(--emw--color-error, #dd3434)}.OtpPopupContent{position:relative;background:var(--emw--color-white, #fff);padding:20px;border-radius:5px;text-align:center;min-width:25%;min-height:200px;display:flex;flex-direction:column;justify-content:center;gap:20px}.OtpPopupContent .OtpError{display:flex;flex-direction:column;gap:20px;align-items:center}.OtpPopupContent .OtpError .OtpErrorHeader{display:flex;justify-content:center;gap:5px}.OtpPopupContent .OtpError h2{margin:0}.OtpPopupContent .OtpError svg{width:25px;fill:var(--emw--color-error, #dd3434)}.OtpFieldWrapper{display:flex;flex-direction:column;gap:10px}.OtpFieldWrapper h2{margin:0}.OtpField{display:flex;justify-content:center}.OtpField input{width:24px;font-size:32px;padding:10px;text-align:center;border-radius:5px;margin:2px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:bold;outline:none;transition:all 0.1s}.OtpField input.space{margin-right:1rem !important}.OtpField input:focus{border:2px solid var(--emw--color-primary, #007bff);box-shadow:0 0 2px 2px var(--emw--color-primary, #007bff)}.OtpActionButtons{display:flex;justify-content:space-between}.OtpErrorMessage{color:var(--emw--color-error, #dd3434);font-weight:bold}.OtpLoaderContainer{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.OtpLoader{width:48px;height:48px;border:5px solid var(--emw--color-secondary, #b3d8ff);border-bottom-color:var(--emw--color-primary, #007bff);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}");
3919
- }
3920
- function Tt(e, t, r) {
3921
- const n = e.slice();
3922
- return n[51] = t[r], n[52] = t, n[53] = r, n;
3923
- }
3924
- function Ht(e) {
3925
- let t, r;
3926
- function n(a, s) {
3927
- return (
3928
- /*isLoading*/
3929
- a[3] ? Di : (
3930
- /*hasConfigErrors*/
3931
- a[7] ? ki : Ri
3932
- )
3933
- );
3934
- }
3935
- let i = n(e), o = i(e);
3936
- return {
3937
- c() {
3938
- t = S("div"), r = S("div"), o.c(), x(r, "class", "OtpPopupContent"), x(t, "class", "OtpPopupOverlay");
3939
- },
3940
- m(a, s) {
3941
- M(a, t, s), C(t, r), o.m(r, null);
3942
- },
3943
- p(a, s) {
3944
- i === (i = n(a)) && o ? o.p(a, s) : (o.d(1), o = i(a), o && (o.c(), o.m(r, null)));
3945
- },
3946
- d(a) {
3947
- a && L(t), o.d();
3948
- }
3949
- };
3950
- }
3951
- function Ri(e) {
3952
- let t, r, n, i, o, a, s, l, u = (
3953
- /*formatTime*/
3954
- e[13](
3955
- /*timeLeft*/
3956
- e[5]
3957
- ) + ""
3958
- ), h, f, p, g, d, H, R, G;
3959
- function I(m, A) {
3960
- return (
3961
- /*showResendOtp*/
3962
- m[9] ? Gi : Ui
3963
- );
3964
- }
3965
- let B = I(e), _ = B(e), N = ut(
3966
- /*otp*/
3967
- e[2]
3968
- ), T = [];
3969
- for (let m = 0; m < N.length; m += 1)
3970
- T[m] = St(Tt(e, N, m));
3971
- function F(m, A) {
3972
- return (
3973
- /*showResendOtp*/
3974
- m[9] ? Vi : Fi
3975
- );
3976
- }
3977
- let V = F(e), U = V(e);
3978
- return {
3979
- c() {
3980
- t = S("div"), _.c(), r = W(), n = S("div"), i = S("h2"), i.textContent = "$_('otpHeading')", o = W(), a = S("div");
3981
- for (let m = 0; m < T.length; m += 1)
3982
- T[m].c();
3983
- s = W(), l = S("div"), h = X(u), f = X(" $_('minutes')"), p = W(), g = S("div"), U.c(), d = W(), H = S("button"), H.textContent = "$_('submit')", x(t, "class", "otp-description"), x(a, "class", "OtpField"), x(l, "class", "otp-timer"), x(n, "class", "OtpFieldWrapper"), x(H, "class", "OtpButton"), x(g, "class", "OtpActionButtons");
3984
- },
3985
- m(m, A) {
3986
- M(m, t, A), _.m(t, null), M(m, r, A), M(m, n, A), C(n, i), C(n, o), C(n, a);
3987
- for (let O = 0; O < T.length; O += 1)
3988
- T[O] && T[O].m(a, null);
3989
- C(n, s), C(n, l), C(l, h), C(l, f), M(m, p, A), M(m, g, A), U.m(g, null), C(g, d), C(g, H), R || (G = Z(
3990
- H,
3991
- "click",
3992
- /*manualClosePopup*/
3993
- e[18]
3994
- ), R = !0);
3995
- },
3996
- p(m, A) {
3997
- if (B === (B = I(m)) && _ ? _.p(m, A) : (_.d(1), _ = B(m), _ && (_.c(), _.m(t, null))), A[0] & /*config, otp, inputDisabled, otpInputs, handleOtpInput, handleKeyDown, handleOnPasteOtp*/
3998
- 120852) {
3999
- N = ut(
4000
- /*otp*/
4001
- m[2]
4002
- );
4003
- let O;
4004
- for (O = 0; O < N.length; O += 1) {
4005
- const J = Tt(m, N, O);
4006
- T[O] ? T[O].p(J, A) : (T[O] = St(J), T[O].c(), T[O].m(a, null));
4007
- }
4008
- for (; O < T.length; O += 1)
4009
- T[O].d(1);
4010
- T.length = N.length;
4011
- }
4012
- A[0] & /*timeLeft*/
4013
- 32 && u !== (u = /*formatTime*/
4014
- m[13](
4015
- /*timeLeft*/
4016
- m[5]
4017
- ) + "") && Je(h, u), V === (V = F(m)) && U ? U.p(m, A) : (U.d(1), U = V(m), U && (U.c(), U.m(g, d)));
4018
- },
4019
- d(m) {
4020
- m && (L(t), L(r), L(n), L(p), L(g)), _.d(), Or(T, m), U.d(), R = !1, G();
4021
- }
4022
- };
4023
- }
4024
- function ki(e) {
4025
- let t, r, n, i, o, a, s, l, u;
4026
- return {
4027
- c() {
4028
- t = S("div"), r = S("div"), r.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg> <h2>$_(&#39;errorHeader&#39;)</h2>', n = W(), i = S("p"), o = X(
4029
- /*errorMessage*/
4030
- e[8]
4031
- ), a = W(), s = S("button"), s.textContent = "$_('close')", x(r, "class", "OtpErrorHeader"), x(s, "class", "OtpButton error"), x(t, "class", "OtpError");
4032
- },
4033
- m(h, f) {
4034
- M(h, t, f), C(t, r), C(t, n), C(t, i), C(i, o), C(t, a), C(t, s), l || (u = Z(
4035
- s,
4036
- "click",
4037
- /*manualClosePopup*/
4038
- e[18]
4039
- ), l = !0);
4040
- },
4041
- p(h, f) {
4042
- f[0] & /*errorMessage*/
4043
- 256 && Je(
4044
- o,
4045
- /*errorMessage*/
4046
- h[8]
4047
- );
4048
- },
4049
- d(h) {
4050
- h && L(t), l = !1, u();
4051
- }
4052
- };
4053
- }
4054
- function Di(e) {
4055
- let t;
4056
- return {
4057
- c() {
4058
- t = S("div"), t.innerHTML = '<span class="OtpLoader"></span>', x(t, "class", "OtpLoaderContainer");
4059
- },
4060
- m(r, n) {
4061
- M(r, t, n);
4062
- },
4063
- p: D,
4064
- d(r) {
4065
- r && L(t);
4066
- }
4067
- };
4068
- }
4069
- function Ui(e) {
4070
- let t, r, n, i;
4071
- function o(u, h) {
4072
- return (
4073
- /*isLastWarning*/
4074
- u[10] ? $i : ji
4075
- );
4076
- }
4077
- let a = o(e), s = a(e), l = (
4078
- /*hasErrors*/
4079
- e[6] && Pt(e)
4080
- );
4081
- return {
4082
- c() {
4083
- t = S("p"), s.c(), n = W(), l && l.c(), i = Tr(), x(t, "class", r = /*isLastWarning*/
4084
- e[10] ? "LastWarningMessage" : "");
4085
- },
4086
- m(u, h) {
4087
- M(u, t, h), s.m(t, null), M(u, n, h), l && l.m(u, h), M(u, i, h);
4088
- },
4089
- p(u, h) {
4090
- a !== (a = o(u)) && (s.d(1), s = a(u), s && (s.c(), s.m(t, null))), h[0] & /*isLastWarning*/
4091
- 1024 && r !== (r = /*isLastWarning*/
4092
- u[10] ? "LastWarningMessage" : "") && x(t, "class", r), /*hasErrors*/
4093
- u[6] ? l ? l.p(u, h) : (l = Pt(u), l.c(), l.m(i.parentNode, i)) : l && (l.d(1), l = null);
4094
- },
4095
- d(u) {
4096
- u && (L(t), L(n), L(i)), s.d(), l && l.d(u);
4097
- }
4098
- };
4099
- }
4100
- function Gi(e) {
4101
- let t;
4102
- return {
4103
- c() {
4104
- t = S("p"), t.textContent = "$_('otpExpiredMessage')", x(t, "class", "OtpNoticeMessage"), x(t, "role", "alert");
4105
- },
4106
- m(r, n) {
4107
- M(r, t, n);
4108
- },
4109
- p: D,
4110
- d(r) {
4111
- r && L(t);
4112
- }
4113
- };
4114
- }
4115
- function ji(e) {
4116
- let t;
4117
- return {
4118
- c() {
4119
- t = X("$_('popupMessage')");
4120
- },
4121
- m(r, n) {
4122
- M(r, t, n);
4123
- },
4124
- d(r) {
4125
- r && L(t);
4126
- }
4127
- };
4128
- }
4129
- function $i(e) {
4130
- let t;
4131
- return {
4132
- c() {
4133
- t = X("$_('popupMessageLastWarning')");
4134
- },
4135
- m(r, n) {
4136
- M(r, t, n);
4137
- },
4138
- d(r) {
4139
- r && L(t);
4140
- }
4141
- };
4142
- }
4143
- function Pt(e) {
4144
- let t, r;
4145
- return {
4146
- c() {
4147
- t = S("p"), r = X(
4148
- /*errorMessage*/
4149
- e[8]
4150
- ), x(t, "class", "OtpErrorMessage"), x(t, "role", "alert");
4151
- },
4152
- m(n, i) {
4153
- M(n, t, i), C(t, r);
4154
- },
4155
- p(n, i) {
4156
- i[0] & /*errorMessage*/
4157
- 256 && Je(
4158
- r,
4159
- /*errorMessage*/
4160
- n[8]
4161
- );
4162
- },
4163
- d(n) {
4164
- n && L(t);
4165
- }
4166
- };
4167
- }
4168
- function St(e) {
4169
- let t, r, n, i = (
4170
- /*index*/
4171
- e[53]
4172
- ), o, a;
4173
- const s = () => (
4174
- /*input_binding*/
4175
- e[27](t, i)
4176
- ), l = () => (
4177
- /*input_binding*/
4178
- e[27](null, i)
4179
- );
4180
- function u(...f) {
4181
- return (
4182
- /*input_handler*/
4183
- e[28](
4184
- /*index*/
4185
- e[53],
4186
- ...f
4187
- )
4188
- );
4189
- }
4190
- function h(...f) {
4191
- return (
4192
- /*keydown_handler*/
4193
- e[29](
4194
- /*index*/
4195
- e[53],
4196
- ...f
4197
- )
4198
- );
4199
- }
4200
- return {
4201
- c() {
4202
- t = S("input"), x(t, "id", `otp-input-${/*index*/
4203
- e[53]}`), x(t, "type", "text"), x(t, "class", r = `otp-box ${/*config*/
4204
- e[4].inputLength % 2 === 0 && /*index*/
4205
- e[53] === /*config*/
4206
- e[4].inputLength / 2 - 1 ? "space" : ""}`), x(t, "maxlength", 1), t.value = n = /*char*/
4207
- e[51], t.disabled = /*inputDisabled*/
4208
- e[11], x(t, "autocomplete", "off");
4209
- },
4210
- m(f, p) {
4211
- M(f, t, p), s(), o || (a = [
4212
- Z(t, "input", u),
4213
- Z(t, "keydown", h),
4214
- Z(
4215
- t,
4216
- "paste",
4217
- /*handleOnPasteOtp*/
4218
- e[14]
4219
- )
4220
- ], o = !0);
4221
- },
4222
- p(f, p) {
4223
- e = f, p[0] & /*config*/
4224
- 16 && r !== (r = `otp-box ${/*config*/
4225
- e[4].inputLength % 2 === 0 && /*index*/
4226
- e[53] === /*config*/
4227
- e[4].inputLength / 2 - 1 ? "space" : ""}`) && x(t, "class", r), p[0] & /*otp*/
4228
- 4 && n !== (n = /*char*/
4229
- e[51]) && t.value !== n && (t.value = n), p[0] & /*inputDisabled*/
4230
- 2048 && (t.disabled = /*inputDisabled*/
4231
- e[11]), i !== /*index*/
4232
- e[53] && (l(), i = /*index*/
4233
- e[53], s());
4234
- },
4235
- d(f) {
4236
- f && L(t), l(), o = !1, ae(a);
4237
- }
4238
- };
4239
- }
4240
- function Fi(e) {
4241
- let t, r, n, i, o;
4242
- return {
4243
- c() {
4244
- t = S("button"), r = X("$_('submit')"), x(t, "class", "OtpButton"), t.disabled = n = /*otp*/
4245
- e[2].join("").length !== /*config*/
4246
- e[4].inputLength;
4247
- },
4248
- m(a, s) {
4249
- M(a, t, s), C(t, r), i || (o = Z(
4250
- t,
4251
- "click",
4252
- /*submitOtp*/
4253
- e[19]
4254
- ), i = !0);
4255
- },
4256
- p(a, s) {
4257
- s[0] & /*otp, config*/
4258
- 20 && n !== (n = /*otp*/
4259
- a[2].join("").length !== /*config*/
4260
- a[4].inputLength) && (t.disabled = n);
4261
- },
4262
- d(a) {
4263
- a && L(t), i = !1, o();
4264
- }
4265
- };
4266
- }
4267
- function Vi(e) {
4268
- let t, r, n;
4269
- return {
4270
- c() {
4271
- t = S("button"), t.textContent = "$_('resendOtp')", x(t, "class", "OtpButton");
4272
- },
4273
- m(i, o) {
4274
- M(i, t, o), r || (n = Z(
4275
- t,
4276
- "click",
4277
- /*handleResendOtp*/
4278
- e[17]
4279
- ), r = !0);
4280
- },
4281
- p: D,
4282
- d(i) {
4283
- i && L(t), r = !1, n();
4284
- }
4285
- };
4286
- }
4287
- function zi(e) {
4288
- let t, r = (
4289
- /*showPopup*/
4290
- e[1] && Ht(e)
4291
- );
4292
- return {
4293
- c() {
4294
- t = S("div"), r && r.c();
4295
- },
4296
- m(n, i) {
4297
- M(n, t, i), r && r.m(t, null), e[30](t);
4298
- },
4299
- p(n, i) {
4300
- /*showPopup*/
4301
- n[1] ? r ? r.p(n, i) : (r = Ht(n), r.c(), r.m(t, null)) : r && (r.d(1), r = null);
4302
- },
4303
- i: D,
4304
- o: D,
4305
- d(n) {
4306
- n && L(t), r && r.d(), e[30](null);
4307
- }
4308
- };
4309
- }
4310
- function Xi(e, t, r) {
4311
- let n;
4312
- Er(e, Ii, (c) => r(37, n = c));
4313
- let { clientstyling: i = "" } = t, { clientstylingurl: o = "" } = t, { mbsource: a } = t, { lang: s = "en" } = t, { endpoint: l } = t, { session: u } = t, { translationurl: h } = t, f = !1, p, g = !0, d = null, H = 0, R = "", G = "", I = !1, B = !1, _ = "", N = "", T = "", F = !1, V = !1, U = !1, m, A = [], O = null, J = 0;
4314
- const et = {
4315
- MAX_ATTEMPTS_EXCEEDED: "gm.twofa.token_max_attempts_exceeded",
4316
- INTERNAL_SERVER_ERROR: "gm.multifactorauthentication.internal_server_error"
4317
- };
4318
- Object.keys(Ot).forEach((c) => {
4319
- xt(c, Ot[c]);
4320
- });
4321
- const rr = () => {
4322
- Ni(s);
4323
- }, nr = () => {
4324
- fetch(h).then((c) => c.json()).then((c) => {
4325
- Object.keys(c).forEach((b) => {
4326
- xt(b, c[b]);
4327
- });
4328
- }).catch((c) => {
4329
- console.log(c);
4330
- });
4331
- }, tt = async (c) => {
4332
- if (c.detail?.["x-step-up-required"]) {
4333
- if (r(7, B = !1), r(6, I = !1), r(8, _ = ""), r(1, f = !0), N = c.detail["x-step-up-token"], T = c.detail.flow, !N || !T) {
4334
- r(3, g = !1), r(7, B = !0), r(8, _ = n("configError"));
4335
- return;
4336
- }
4337
- await ot();
4338
- }
4339
- }, Y = () => {
4340
- O && (clearInterval(O), O = null), r(6, I = !1), r(7, B = !1), r(8, _ = ""), r(1, f = !1), r(10, V = !1);
4341
- }, ir = () => {
4342
- const c = new Date(R), b = new Date(G), y = /* @__PURE__ */ new Date(), j = b.getTime() - y.getTime();
4343
- J = c.getTime() - j;
4344
- const be = Date.now(), br = Math.max(0, Math.floor((J - be) / 1e3));
4345
- r(5, H = br);
4346
- }, or = () => {
4347
- O && clearInterval(O), O = setInterval(
4348
- () => {
4349
- const c = Date.now(), b = Math.max(0, Math.floor((J - c) / 1e3));
4350
- r(5, H = b), r(11, U = b <= 0), b <= 0 && (clearInterval(O), O = null, r(9, F = !0), r(6, I = !1), r(10, V = !1));
4351
- },
4352
- 1e3
4353
- );
4354
- }, sr = (c) => {
4355
- const b = Math.floor(c / 60), y = c % 60;
4356
- return `${b.toString().padStart(2, "0")}:${y.toString().padStart(2, "0")}`;
4357
- }, Le = (c, b) => {
4358
- const y = [...p];
4359
- y[c] = b.toUpperCase(), r(2, p = y);
4360
- }, ar = (c) => {
4361
- c.preventDefault();
4362
- const y = (c.clipboardData?.getData("text")?.trim() || "").slice(0, d.inputLength).split("");
4363
- r(2, p = [...y, ...Array(d.inputLength - y.length).fill("")]), A[y.length]?.focus(), y.length === d.inputLength && it();
4364
- }, rt = (c, b) => {
4365
- const y = c.target, j = y.value;
4366
- /^[a-z0-9]$/i.test(j) && (Le(b, j), A[b + 1]?.focus()), y.value = "";
4367
- }, nt = (c, b) => {
4368
- const y = c.key, j = c.ctrlKey || c.metaKey;
4369
- if (/^[a-z0-9]$/i.test(y)) {
4370
- if (j && y.toLowerCase() === "v")
4371
- return;
4372
- c.preventDefault(), Le(b, y), A[b + 1]?.focus();
4373
- } else
4374
- y === "Backspace" && (c.preventDefault(), p[b] !== "" && Le(b, ""), A[b - 1]?.focus());
4375
- }, ur = () => {
4376
- const c = new CustomEvent("otpResendRequested");
4377
- window.dispatchEvent(c);
4378
- }, lr = (c) => {
4379
- window.dispatchEvent(new CustomEvent(
4380
- "otpSubmitted",
4381
- {
4382
- detail: {
4383
- code: c,
4384
- maxAttempts: d.maxValidationAttempts,
4385
- validatedAttempts: d.numberOfValidateAttempts
4386
- }
4387
- }
4388
- ));
4389
- }, hr = async (c) => {
4390
- const b = new URL(`/api/v1/mfa/challenge/${N}/validate`, l);
4391
- b.searchParams.append("input", c);
4392
- try {
4393
- const y = await fetch(b.href, { method: "POST" });
4394
- if (y.status === 200) {
4395
- cr();
4396
- return;
4397
- }
4398
- const j = await y.json();
4399
- throw new Error(j.message);
4400
- } catch (y) {
4401
- if (y.message === et.INTERNAL_SERVER_ERROR) {
4402
- if (d.numberOfValidateAttempts === d.maxValidationAttempts - 1) {
4403
- window.dispatchEvent(new CustomEvent("otpSetTimeout")), window.postMessage(
4404
- {
4405
- type: "WidgetNotification",
4406
- data: {
4407
- type: "error",
4408
- message: n("accountBlocked")
4409
- }
4410
- },
4411
- window.location.href
4412
- ), Y();
4413
- return;
4414
- }
4415
- r(6, I = !0), r(8, _ = n("invalidOtp")), ot();
4416
- return;
4417
- }
4418
- console.error("OTP submission failed:", y), r(6, I = !0), r(8, _ = n("submissionError"));
4419
- } finally {
4420
- r(3, g = !1);
4421
- }
4422
- }, cr = () => {
4423
- window.dispatchEvent(new CustomEvent(
4424
- "otpSuccess",
4425
- {
4426
- detail: {
4427
- message: "User successfully authenticated"
4428
- }
4429
- }
4430
- )), Y();
4431
- }, fr = () => {
4432
- window.dispatchEvent(new CustomEvent("manualClosePopup")), Y();
4433
- }, it = async () => {
4434
- if (p.join("").length !== d.inputLength) {
4435
- r(6, I = !0), r(8, _ = n("invalidOtp"));
4436
- return;
4437
- }
4438
- r(3, g = !0), r(6, I = !1), r(8, _ = "");
4439
- const c = p.join("");
4440
- T === "stateless" && lr(c), T === "stateful" && await hr(c);
4441
- }, ot = async () => {
4442
- if (l)
4443
- try {
4444
- r(3, g = !0);
4445
- const c = new URL(`/api/v1/mfa/challenge/${N}/config`, l), b = await fetch(c.href), y = await b.json();
4446
- if (b.ok)
4447
- r(4, d = y), r(2, p = Array(d.inputLength).fill("")), r(3, g = !1), r(9, F = !1), R = d.expirationTime, G = d.serverTime, d.numberOfValidateAttempts !== 0 && (r(6, I = !0), r(8, _ = n("invalidOtp"))), d.numberOfValidateAttempts === d.maxValidationAttempts - 1 && r(10, V = !0), ir(), or();
4448
- else if (y && y.details === et.MAX_ATTEMPTS_EXCEEDED)
4449
- Y();
4450
- else {
4451
- const j = y && y.message || `Failed to load config. Status: ${b.status}`;
4452
- throw new Error(j);
4453
- }
4454
- } catch (c) {
4455
- r(3, g = !1), r(7, B = !0), r(8, _ = n("configError")), console.error("Error loading 2FA config:", c);
4456
- }
4457
- };
4458
- wr(() => (window.addEventListener("stepUpAuthRequired", tt, !1), window.addEventListener("closePupup", Y, !1), () => {
4459
- window.removeEventListener("stepUpAuthRequired", tt), window.removeEventListener("closePupup", Y, !1);
4460
- }));
4461
- function pr(c, b) {
4462
- xe[c ? "unshift" : "push"](() => {
4463
- A[b] = c, r(12, A);
4464
- });
4465
- }
4466
- const dr = (c, b) => rt(b, c), mr = (c, b) => nt(b, c);
4467
- function gr(c) {
4468
- xe[c ? "unshift" : "push"](() => {
4469
- m = c, r(0, m);
4470
- });
4471
- }
4472
- return e.$$set = (c) => {
4473
- "clientstyling" in c && r(20, i = c.clientstyling), "clientstylingurl" in c && r(21, o = c.clientstylingurl), "mbsource" in c && r(22, a = c.mbsource), "lang" in c && r(23, s = c.lang), "endpoint" in c && r(24, l = c.endpoint), "session" in c && r(25, u = c.session), "translationurl" in c && r(26, h = c.translationurl);
4474
- }, e.$$.update = () => {
4475
- e.$$.dirty[0] & /*clientstyling, customStylingContainer*/
4476
- 1048577 && i && m && $r(m, i), e.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
4477
- 2097153 && o && m && Fr(m, o), e.$$.dirty[0] & /*mbsource, customStylingContainer*/
4478
- 4194305 && a && m && Vr(m, `${a}.Style`), e.$$.dirty[0] & /*lang*/
4479
- 8388608 && s && rr(), e.$$.dirty[0] & /*lang, translationurl*/
4480
- 75497472 && s && h && nr();
4481
- }, [
4482
- m,
4483
- f,
4484
- p,
4485
- g,
4486
- d,
4487
- H,
4488
- I,
4489
- B,
4490
- _,
4491
- F,
4492
- V,
4493
- U,
4494
- A,
4495
- sr,
4496
- ar,
4497
- rt,
4498
- nt,
4499
- ur,
4500
- fr,
4501
- it,
4502
- i,
4503
- o,
4504
- a,
4505
- s,
4506
- l,
4507
- u,
4508
- h,
4509
- pr,
4510
- dr,
4511
- mr,
4512
- gr
4513
- ];
4514
- }
4515
- class Wi extends Gr {
4516
- constructor(t) {
4517
- super(), Dr(
4518
- this,
4519
- t,
4520
- Xi,
4521
- zi,
4522
- Bt,
4523
- {
4524
- clientstyling: 20,
4525
- clientstylingurl: 21,
4526
- mbsource: 22,
4527
- lang: 23,
4528
- endpoint: 24,
4529
- session: 25,
4530
- translationurl: 26
4531
- },
4532
- Ci,
4533
- [-1, -1]
4534
- );
4535
- }
4536
- get clientstyling() {
4537
- return this.$$.ctx[20];
4538
- }
4539
- set clientstyling(t) {
4540
- this.$$set({ clientstyling: t }), z();
4541
- }
4542
- get clientstylingurl() {
4543
- return this.$$.ctx[21];
4544
- }
4545
- set clientstylingurl(t) {
4546
- this.$$set({ clientstylingurl: t }), z();
4547
- }
4548
- get mbsource() {
4549
- return this.$$.ctx[22];
4550
- }
4551
- set mbsource(t) {
4552
- this.$$set({ mbsource: t }), z();
4553
- }
4554
- get lang() {
4555
- return this.$$.ctx[23];
4556
- }
4557
- set lang(t) {
4558
- this.$$set({ lang: t }), z();
4559
- }
4560
- get endpoint() {
4561
- return this.$$.ctx[24];
4562
- }
4563
- set endpoint(t) {
4564
- this.$$set({ endpoint: t }), z();
4565
- }
4566
- get session() {
4567
- return this.$$.ctx[25];
4568
- }
4569
- set session(t) {
4570
- this.$$set({ session: t }), z();
4571
- }
4572
- get translationurl() {
4573
- return this.$$.ctx[26];
4574
- }
4575
- set translationurl(t) {
4576
- this.$$set({ translationurl: t }), z();
4577
- }
4578
- }
4579
- Ur(Wi, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, session: {}, translationurl: {} }, [], [], !0);
4580
- export {
4581
- Wi as C
4582
- };