@everymatrix/player-account-vault 0.19.6 → 0.19.8

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