@everymatrix/player-account-balance-modal 1.64.8 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- function ue() {
1
+ function ae() {
2
2
  }
3
- function wr(e) {
3
+ function An(e) {
4
4
  return e();
5
5
  }
6
- function nr() {
6
+ function rn() {
7
7
  return /* @__PURE__ */ Object.create(null);
8
8
  }
9
9
  function ke(e) {
10
- e.forEach(wr);
10
+ e.forEach(An);
11
11
  }
12
- function Yt(e) {
12
+ function Qt(e) {
13
13
  return typeof e == "function";
14
14
  }
15
- function Ar(e, t) {
15
+ function Cn(e, t) {
16
16
  return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
17
17
  }
18
- function on(e) {
18
+ function or(e) {
19
19
  return Object.keys(e).length === 0;
20
20
  }
21
- function Cr(e, ...t) {
21
+ function Hn(e, ...t) {
22
22
  if (e == null) {
23
- for (const n of t)
24
- n(void 0);
25
- return ue;
23
+ for (const r of t)
24
+ r(void 0);
25
+ return ae;
26
26
  }
27
- const r = e.subscribe(...t);
28
- return r.unsubscribe ? () => r.unsubscribe() : r;
27
+ const n = e.subscribe(...t);
28
+ return n.unsubscribe ? () => n.unsubscribe() : n;
29
29
  }
30
- function an(e, t, r) {
31
- e.$$.on_destroy.push(Cr(t, r));
30
+ function ar(e, t, n) {
31
+ e.$$.on_destroy.push(Hn(t, n));
32
32
  }
33
33
  function L(e, t) {
34
34
  e.appendChild(t);
35
35
  }
36
- function sn(e, t, r) {
37
- const n = un(e);
38
- if (!n.getElementById(t)) {
39
- const i = V("style");
40
- i.id = t, i.textContent = r, ln(n, i);
36
+ function sr(e, t, n) {
37
+ const r = ur(e);
38
+ if (!r.getElementById(t)) {
39
+ const i = k("style");
40
+ i.id = t, i.textContent = n, lr(r, i);
41
41
  }
42
42
  }
43
- function un(e) {
43
+ function ur(e) {
44
44
  if (!e)
45
45
  return document;
46
46
  const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
@@ -50,179 +50,179 @@ function un(e) {
50
50
  t
51
51
  ) : e.ownerDocument;
52
52
  }
53
- function ln(e, t) {
53
+ function lr(e, t) {
54
54
  return L(
55
55
  /** @type {Document} */
56
56
  e.head || e,
57
57
  t
58
58
  ), t.sheet;
59
59
  }
60
- function ve(e, t, r) {
61
- e.insertBefore(t, r || null);
60
+ function pe(e, t, n) {
61
+ e.insertBefore(t, n || null);
62
62
  }
63
- function pe(e) {
63
+ function he(e) {
64
64
  e.parentNode && e.parentNode.removeChild(e);
65
65
  }
66
- function Hr(e, t) {
67
- for (let r = 0; r < e.length; r += 1)
68
- e[r] && e[r].d(t);
66
+ function On(e, t) {
67
+ for (let n = 0; n < e.length; n += 1)
68
+ e[n] && e[n].d(t);
69
69
  }
70
- function V(e) {
70
+ function k(e) {
71
71
  return document.createElement(e);
72
72
  }
73
- function de(e) {
73
+ function le(e) {
74
74
  return document.createTextNode(e);
75
75
  }
76
- function me() {
77
- return de(" ");
76
+ function ce() {
77
+ return le(" ");
78
78
  }
79
- function hn() {
80
- return de("");
79
+ function hr() {
80
+ return le("");
81
81
  }
82
- function bt(e, t, r, n) {
83
- return e.addEventListener(t, r, n), () => e.removeEventListener(t, r, n);
82
+ function pt(e, t, n, r) {
83
+ return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r);
84
84
  }
85
- function Z(e, t, r) {
86
- r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
85
+ function W(e, t, n) {
86
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
87
87
  }
88
- function cn(e) {
88
+ function cr(e) {
89
89
  return Array.from(e.childNodes);
90
90
  }
91
- function Be(e, t) {
91
+ function xe(e, t) {
92
92
  t = "" + t, e.data !== t && (e.data = /** @type {string} */
93
93
  t);
94
94
  }
95
- function fn(e) {
95
+ function fr(e) {
96
96
  const t = {};
97
97
  return e.childNodes.forEach(
98
98
  /** @param {Element} node */
99
- (r) => {
100
- t[r.slot || "default"] = !0;
99
+ (n) => {
100
+ t[n.slot || "default"] = !0;
101
101
  }
102
102
  ), t;
103
103
  }
104
- let tt;
105
- function et(e) {
106
- tt = e;
104
+ let nt;
105
+ function tt(e) {
106
+ nt = e;
107
107
  }
108
- function dn() {
109
- if (!tt)
108
+ function dr() {
109
+ if (!nt)
110
110
  throw new Error("Function called outside component initialization");
111
- return tt;
111
+ return nt;
112
112
  }
113
- function pn(e) {
114
- dn().$$.on_mount.push(e);
113
+ function pr(e) {
114
+ dr().$$.on_mount.push(e);
115
115
  }
116
- const De = [], Ut = [];
116
+ const De = [], Dt = [];
117
117
  let Fe = [];
118
- const ir = [], mn = /* @__PURE__ */ Promise.resolve();
119
- let Gt = !1;
120
- function gn() {
121
- Gt || (Gt = !0, mn.then(Q));
118
+ const on = [], mr = /* @__PURE__ */ Promise.resolve();
119
+ let Ft = !1;
120
+ function gr() {
121
+ Ft || (Ft = !0, mr.then(q));
122
122
  }
123
- function $t(e) {
123
+ function Ut(e) {
124
124
  Fe.push(e);
125
125
  }
126
- const Lt = /* @__PURE__ */ new Set();
126
+ const Ot = /* @__PURE__ */ new Set();
127
127
  let Pe = 0;
128
- function Q() {
128
+ function q() {
129
129
  if (Pe !== 0)
130
130
  return;
131
- const e = tt;
131
+ const e = nt;
132
132
  do {
133
133
  try {
134
134
  for (; Pe < De.length; ) {
135
135
  const t = De[Pe];
136
- Pe++, et(t), bn(t.$$);
136
+ Pe++, tt(t), br(t.$$);
137
137
  }
138
138
  } catch (t) {
139
139
  throw De.length = 0, Pe = 0, t;
140
140
  }
141
- for (et(null), De.length = 0, Pe = 0; Ut.length; )
142
- Ut.pop()();
141
+ for (tt(null), De.length = 0, Pe = 0; Dt.length; )
142
+ Dt.pop()();
143
143
  for (let t = 0; t < Fe.length; t += 1) {
144
- const r = Fe[t];
145
- Lt.has(r) || (Lt.add(r), r());
144
+ const n = Fe[t];
145
+ Ot.has(n) || (Ot.add(n), n());
146
146
  }
147
147
  Fe.length = 0;
148
148
  } while (De.length);
149
- for (; ir.length; )
150
- ir.pop()();
151
- Gt = !1, Lt.clear(), et(e);
149
+ for (; on.length; )
150
+ on.pop()();
151
+ Ft = !1, Ot.clear(), tt(e);
152
152
  }
153
- function bn(e) {
153
+ function br(e) {
154
154
  if (e.fragment !== null) {
155
155
  e.update(), ke(e.before_update);
156
156
  const t = e.dirty;
157
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach($t);
157
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(Ut);
158
158
  }
159
159
  }
160
- function yn(e) {
161
- const t = [], r = [];
162
- Fe.forEach((n) => e.indexOf(n) === -1 ? t.push(n) : r.push(n)), r.forEach((n) => n()), Fe = t;
160
+ function yr(e) {
161
+ const t = [], n = [];
162
+ Fe.forEach((r) => e.indexOf(r) === -1 ? t.push(r) : n.push(r)), n.forEach((r) => r()), Fe = t;
163
163
  }
164
- const vn = /* @__PURE__ */ new Set();
165
- function En(e, t) {
166
- e && e.i && (vn.delete(e), e.i(t));
164
+ const vr = /* @__PURE__ */ new Set();
165
+ function Er(e, t) {
166
+ e && e.i && (vr.delete(e), e.i(t));
167
167
  }
168
- function yt(e) {
168
+ function mt(e) {
169
169
  return e?.length !== void 0 ? e : Array.from(e);
170
170
  }
171
- function xn(e, t, r) {
172
- const { fragment: n, after_update: i } = e.$$;
173
- n && n.m(t, r), $t(() => {
174
- const o = e.$$.on_mount.map(wr).filter(Yt);
171
+ function xr(e, t, n) {
172
+ const { fragment: r, after_update: i } = e.$$;
173
+ r && r.m(t, n), Ut(() => {
174
+ const o = e.$$.on_mount.map(An).filter(Qt);
175
175
  e.$$.on_destroy ? e.$$.on_destroy.push(...o) : ke(o), e.$$.on_mount = [];
176
- }), i.forEach($t);
176
+ }), i.forEach(Ut);
177
177
  }
178
- function _n(e, t) {
179
- const r = e.$$;
180
- r.fragment !== null && (yn(r.after_update), ke(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
178
+ function _r(e, t) {
179
+ const n = e.$$;
180
+ n.fragment !== null && (yr(n.after_update), ke(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
181
181
  }
182
- function Tn(e, t) {
183
- e.$$.dirty[0] === -1 && (De.push(e), gn(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
182
+ function Tr(e, t) {
183
+ e.$$.dirty[0] === -1 && (De.push(e), gr(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
184
184
  }
185
- function Bn(e, t, r, n, i, o, l = null, s = [-1]) {
186
- const h = tt;
187
- et(e);
185
+ function Br(e, t, n, r, i, o, l = null, a = [-1]) {
186
+ const c = nt;
187
+ tt(e);
188
188
  const u = e.$$ = {
189
189
  fragment: null,
190
190
  ctx: [],
191
191
  // state
192
192
  props: o,
193
- update: ue,
193
+ update: ae,
194
194
  not_equal: i,
195
- bound: nr(),
195
+ bound: rn(),
196
196
  // lifecycle
197
197
  on_mount: [],
198
198
  on_destroy: [],
199
199
  on_disconnect: [],
200
200
  before_update: [],
201
201
  after_update: [],
202
- context: new Map(t.context || (h ? h.$$.context : [])),
202
+ context: new Map(t.context || (c ? c.$$.context : [])),
203
203
  // everything else
204
- callbacks: nr(),
205
- dirty: s,
204
+ callbacks: rn(),
205
+ dirty: a,
206
206
  skip_bound: !1,
207
- root: t.target || h.$$.root
207
+ root: t.target || c.$$.root
208
208
  };
209
209
  l && l(u.root);
210
210
  let f = !1;
211
- if (u.ctx = r ? r(e, t.props || {}, (m, p, ...y) => {
212
- const E = y.length ? y[0] : p;
213
- return u.ctx && i(u.ctx[m], u.ctx[m] = E) && (!u.skip_bound && u.bound[m] && u.bound[m](E), f && Tn(e, m)), p;
214
- }) : [], u.update(), f = !0, ke(u.before_update), u.fragment = n ? n(u.ctx) : !1, t.target) {
211
+ if (u.ctx = n ? n(e, t.props || {}, (g, d, ...x) => {
212
+ const _ = x.length ? x[0] : d;
213
+ return u.ctx && i(u.ctx[g], u.ctx[g] = _) && (!u.skip_bound && u.bound[g] && u.bound[g](_), f && Tr(e, g)), d;
214
+ }) : [], u.update(), f = !0, ke(u.before_update), u.fragment = r ? r(u.ctx) : !1, t.target) {
215
215
  if (t.hydrate) {
216
- const m = cn(t.target);
217
- u.fragment && u.fragment.l(m), m.forEach(pe);
216
+ const g = cr(t.target);
217
+ u.fragment && u.fragment.l(g), g.forEach(he);
218
218
  } else
219
219
  u.fragment && u.fragment.c();
220
- t.intro && En(e.$$.fragment), xn(e, t.target, t.anchor), Q();
220
+ t.intro && Er(e.$$.fragment), xr(e, t.target, t.anchor), q();
221
221
  }
222
- et(h);
222
+ tt(c);
223
223
  }
224
- let Or;
225
- typeof HTMLElement == "function" && (Or = class extends HTMLElement {
224
+ let Rn;
225
+ typeof HTMLElement == "function" && (Rn = class extends HTMLElement {
226
226
  /** The Svelte component constructor */
227
227
  $$ctor;
228
228
  /** Slots */
@@ -241,20 +241,20 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
241
241
  $$l = {};
242
242
  /** @type {Map<Function, Function>} Event listener unsubscribe functions */
243
243
  $$l_u = /* @__PURE__ */ new Map();
244
- constructor(e, t, r) {
245
- super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
244
+ constructor(e, t, n) {
245
+ super(), this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
246
246
  }
247
- addEventListener(e, t, r) {
247
+ addEventListener(e, t, n) {
248
248
  if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
249
- const n = this.$$c.$on(e, t);
250
- this.$$l_u.set(t, n);
249
+ const r = this.$$c.$on(e, t);
250
+ this.$$l_u.set(t, r);
251
251
  }
252
- super.addEventListener(e, t, r);
252
+ super.addEventListener(e, t, n);
253
253
  }
254
- removeEventListener(e, t, r) {
255
- if (super.removeEventListener(e, t, r), this.$$c) {
256
- const n = this.$$l_u.get(t);
257
- n && (n(), this.$$l_u.delete(t));
254
+ removeEventListener(e, t, n) {
255
+ if (super.removeEventListener(e, t, n), this.$$c) {
256
+ const r = this.$$l_u.get(t);
257
+ r && (r(), this.$$l_u.delete(t));
258
258
  }
259
259
  }
260
260
  async connectedCallback() {
@@ -264,29 +264,29 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
264
264
  let o;
265
265
  return {
266
266
  c: function() {
267
- o = V("slot"), i !== "default" && Z(o, "name", i);
267
+ o = k("slot"), i !== "default" && W(o, "name", i);
268
268
  },
269
269
  /**
270
270
  * @param {HTMLElement} target
271
271
  * @param {HTMLElement} [anchor]
272
272
  */
273
- m: function(h, u) {
274
- ve(h, o, u);
273
+ m: function(c, u) {
274
+ pe(c, o, u);
275
275
  },
276
- d: function(h) {
277
- h && pe(o);
276
+ d: function(c) {
277
+ c && he(o);
278
278
  }
279
279
  };
280
280
  };
281
281
  };
282
282
  if (await Promise.resolve(), !this.$$cn || this.$$c)
283
283
  return;
284
- const t = {}, r = fn(this);
284
+ const t = {}, n = fr(this);
285
285
  for (const i of this.$$s)
286
- i in r && (t[i] = [e(i)]);
286
+ i in n && (t[i] = [e(i)]);
287
287
  for (const i of this.attributes) {
288
288
  const o = this.$$g_p(i.name);
289
- o in this.$$d || (this.$$d[o] = dt(o, i.value, this.$$p_d, "toProp"));
289
+ o in this.$$d || (this.$$d[o] = ht(o, i.value, this.$$p_d, "toProp"));
290
290
  }
291
291
  for (const i in this.$$p_d)
292
292
  !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
@@ -300,11 +300,11 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
300
300
  }
301
301
  }
302
302
  });
303
- const n = () => {
303
+ const r = () => {
304
304
  this.$$r = !0;
305
305
  for (const i in this.$$p_d)
306
306
  if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
307
- const o = dt(
307
+ const o = ht(
308
308
  i,
309
309
  this.$$d[i],
310
310
  this.$$p_d,
@@ -314,7 +314,7 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
314
314
  }
315
315
  this.$$r = !1;
316
316
  };
317
- this.$$c.$$.after_update.push(n), n();
317
+ this.$$c.$$.after_update.push(r), r();
318
318
  for (const i in this.$$l)
319
319
  for (const o of this.$$l[i]) {
320
320
  const l = this.$$c.$on(i, o);
@@ -325,8 +325,8 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
325
325
  }
326
326
  // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
327
327
  // and setting attributes through setAttribute etc, this is helpful
328
- attributeChangedCallback(e, t, r) {
329
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = dt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
328
+ attributeChangedCallback(e, t, n) {
329
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = ht(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
330
330
  }
331
331
  disconnectedCallback() {
332
332
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -339,11 +339,11 @@ typeof HTMLElement == "function" && (Or = class extends HTMLElement {
339
339
  ) || e;
340
340
  }
341
341
  });
342
- function dt(e, t, r, n) {
343
- const i = r[e]?.type;
344
- if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
342
+ function ht(e, t, n, r) {
343
+ const i = n[e]?.type;
344
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
345
345
  return t;
346
- if (n === "toAttribute")
346
+ if (r === "toAttribute")
347
347
  switch (i) {
348
348
  case "Object":
349
349
  case "Array":
@@ -368,36 +368,36 @@ function dt(e, t, r, n) {
368
368
  return t;
369
369
  }
370
370
  }
371
- function Sn(e, t, r, n, i, o) {
372
- let l = class extends Or {
371
+ function Sr(e, t, n, r, i, o) {
372
+ let l = class extends Rn {
373
373
  constructor() {
374
- super(e, r, i), this.$$p_d = t;
374
+ super(e, n, i), this.$$p_d = t;
375
375
  }
376
376
  static get observedAttributes() {
377
377
  return Object.keys(t).map(
378
- (s) => (t[s].attribute || s).toLowerCase()
378
+ (a) => (t[a].attribute || a).toLowerCase()
379
379
  );
380
380
  }
381
381
  };
382
- return Object.keys(t).forEach((s) => {
383
- Object.defineProperty(l.prototype, s, {
382
+ return Object.keys(t).forEach((a) => {
383
+ Object.defineProperty(l.prototype, a, {
384
384
  get() {
385
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
385
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
386
386
  },
387
- set(h) {
388
- h = dt(s, h, t), this.$$d[s] = h, this.$$c?.$set({ [s]: h });
387
+ set(c) {
388
+ c = ht(a, c, t), this.$$d[a] = c, this.$$c?.$set({ [a]: c });
389
389
  }
390
390
  });
391
- }), n.forEach((s) => {
392
- Object.defineProperty(l.prototype, s, {
391
+ }), r.forEach((a) => {
392
+ Object.defineProperty(l.prototype, a, {
393
393
  get() {
394
- return this.$$c?.[s];
394
+ return this.$$c?.[a];
395
395
  }
396
396
  });
397
397
  }), e.element = /** @type {any} */
398
398
  l, l;
399
399
  }
400
- class wn {
400
+ class wr {
401
401
  /**
402
402
  * ### PRIVATE API
403
403
  *
@@ -416,7 +416,7 @@ class wn {
416
416
  $$set = void 0;
417
417
  /** @returns {void} */
418
418
  $destroy() {
419
- _n(this, 1), this.$destroy = ue;
419
+ _r(this, 1), this.$destroy = ae;
420
420
  }
421
421
  /**
422
422
  * @template {Extract<keyof Events, string>} K
@@ -424,13 +424,13 @@ class wn {
424
424
  * @param {((e: Events[K]) => void) | null | undefined} callback
425
425
  * @returns {() => void}
426
426
  */
427
- $on(t, r) {
428
- if (!Yt(r))
429
- return ue;
430
- const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
431
- return n.push(r), () => {
432
- const i = n.indexOf(r);
433
- i !== -1 && n.splice(i, 1);
427
+ $on(t, n) {
428
+ if (!Qt(n))
429
+ return ae;
430
+ const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
431
+ return r.push(n), () => {
432
+ const i = r.indexOf(n);
433
+ i !== -1 && r.splice(i, 1);
434
434
  };
435
435
  }
436
436
  /**
@@ -438,328 +438,334 @@ class wn {
438
438
  * @returns {void}
439
439
  */
440
440
  $set(t) {
441
- this.$$set && !on(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
441
+ this.$$set && !or(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
442
442
  }
443
443
  }
444
- const An = "4";
445
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(An);
446
- function Cn(e, t) {
444
+ const Ar = "4";
445
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ar);
446
+ function Cr(e, t) {
447
447
  if (e) {
448
- const r = document.createElement("style");
449
- r.innerHTML = t, e.appendChild(r);
448
+ const n = document.createElement("style");
449
+ n.innerHTML = t, e.appendChild(n);
450
450
  }
451
451
  }
452
- function Hn(e, t) {
453
- const r = new URL(t);
454
- fetch(r.href).then((n) => n.text()).then((n) => {
452
+ function Hr(e, t) {
453
+ const n = new URL(t);
454
+ fetch(n.href).then((r) => r.text()).then((r) => {
455
455
  const i = document.createElement("style");
456
- i.innerHTML = n, e && e.appendChild(i);
457
- }).catch((n) => {
458
- console.error("There was an error while trying to load client styling from URL", n);
456
+ i.innerHTML = r, e && e.appendChild(i);
457
+ }).catch((r) => {
458
+ console.error("There was an error while trying to load client styling from URL", r);
459
459
  });
460
460
  }
461
- function On(e, t, r) {
461
+ function Or(e, t, n) {
462
462
  if (window.emMessageBus) {
463
- const n = document.createElement("style");
463
+ const r = document.createElement("style");
464
464
  window.emMessageBus.subscribe(t, (i) => {
465
- n.innerHTML = i, e && e.appendChild(n);
465
+ r.innerHTML = i, e && e.appendChild(r);
466
466
  });
467
467
  }
468
468
  }
469
469
  const Ie = [];
470
- function Rn(e, t) {
470
+ function Rr(e, t) {
471
471
  return {
472
- subscribe: _t(e, t).subscribe
472
+ subscribe: yt(e, t).subscribe
473
473
  };
474
474
  }
475
- function _t(e, t = ue) {
476
- let r;
477
- const n = /* @__PURE__ */ new Set();
478
- function i(s) {
479
- if (Ar(e, s) && (e = s, r)) {
480
- const h = !Ie.length;
481
- for (const u of n)
475
+ function yt(e, t = ae) {
476
+ let n;
477
+ const r = /* @__PURE__ */ new Set();
478
+ function i(a) {
479
+ if (Cn(e, a) && (e = a, n)) {
480
+ const c = !Ie.length;
481
+ for (const u of r)
482
482
  u[1](), Ie.push(u, e);
483
- if (h) {
483
+ if (c) {
484
484
  for (let u = 0; u < Ie.length; u += 2)
485
485
  Ie[u][0](Ie[u + 1]);
486
486
  Ie.length = 0;
487
487
  }
488
488
  }
489
489
  }
490
- function o(s) {
491
- i(s(e));
490
+ function o(a) {
491
+ i(a(e));
492
492
  }
493
- function l(s, h = ue) {
494
- const u = [s, h];
495
- return n.add(u), n.size === 1 && (r = t(i, o) || ue), s(e), () => {
496
- n.delete(u), n.size === 0 && r && (r(), r = null);
493
+ function l(a, c = ae) {
494
+ const u = [a, c];
495
+ return r.add(u), r.size === 1 && (n = t(i, o) || ae), a(e), () => {
496
+ r.delete(u), r.size === 0 && n && (n(), n = null);
497
497
  };
498
498
  }
499
499
  return { set: i, update: o, subscribe: l };
500
500
  }
501
- function Ve(e, t, r) {
502
- const n = !Array.isArray(e), i = n ? [e] : e;
501
+ function Ve(e, t, n) {
502
+ const r = !Array.isArray(e), i = r ? [e] : e;
503
503
  if (!i.every(Boolean))
504
504
  throw new Error("derived() expects stores as input, got a falsy value");
505
505
  const o = t.length < 2;
506
- return Rn(r, (l, s) => {
507
- let h = !1;
506
+ return Rr(n, (l, a) => {
507
+ let c = !1;
508
508
  const u = [];
509
- let f = 0, m = ue;
510
- const p = () => {
509
+ let f = 0, g = ae;
510
+ const d = () => {
511
511
  if (f)
512
512
  return;
513
- m();
514
- const E = t(n ? u[0] : u, l, s);
515
- o ? l(E) : m = Yt(E) ? E : ue;
516
- }, y = i.map(
517
- (E, N) => Cr(
518
- E,
513
+ g();
514
+ const _ = t(r ? u[0] : u, l, a);
515
+ o ? l(_) : g = Qt(_) ? _ : ae;
516
+ }, x = i.map(
517
+ (_, M) => Hn(
518
+ _,
519
519
  (H) => {
520
- u[N] = H, f &= ~(1 << N), h && p();
520
+ u[M] = H, f &= ~(1 << M), c && d();
521
521
  },
522
522
  () => {
523
- f |= 1 << N;
523
+ f |= 1 << M;
524
524
  }
525
525
  )
526
526
  );
527
- return h = !0, p(), function() {
528
- ke(y), m(), h = !1;
527
+ return c = !0, d(), function() {
528
+ ke(x), g(), c = !1;
529
529
  };
530
530
  });
531
531
  }
532
- var Ln = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
533
- function Nn(e) {
532
+ var Lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
533
+ function Nr(e) {
534
534
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
535
535
  }
536
- var Mn = function(t) {
537
- return Pn(t) && !In(t);
536
+ var Mr = function(t) {
537
+ return Pr(t) && !Ir(t);
538
538
  };
539
- function Pn(e) {
539
+ function Pr(e) {
540
540
  return !!e && typeof e == "object";
541
541
  }
542
- function In(e) {
542
+ function Ir(e) {
543
543
  var t = Object.prototype.toString.call(e);
544
- return t === "[object RegExp]" || t === "[object Date]" || Un(e);
544
+ return t === "[object RegExp]" || t === "[object Date]" || Ur(e);
545
545
  }
546
- var Dn = typeof Symbol == "function" && Symbol.for, Fn = Dn ? Symbol.for("react.element") : 60103;
547
- function Un(e) {
548
- return e.$$typeof === Fn;
546
+ var Dr = typeof Symbol == "function" && Symbol.for, Fr = Dr ? Symbol.for("react.element") : 60103;
547
+ function Ur(e) {
548
+ return e.$$typeof === Fr;
549
549
  }
550
- function Gn(e) {
550
+ function Gr(e) {
551
551
  return Array.isArray(e) ? [] : {};
552
552
  }
553
553
  function rt(e, t) {
554
- return t.clone !== !1 && t.isMergeableObject(e) ? Ue(Gn(e), e, t) : e;
554
+ return t.clone !== !1 && t.isMergeableObject(e) ? Ue(Gr(e), e, t) : e;
555
555
  }
556
- function $n(e, t, r) {
557
- return e.concat(t).map(function(n) {
558
- return rt(n, r);
556
+ function $r(e, t, n) {
557
+ return e.concat(t).map(function(r) {
558
+ return rt(r, n);
559
559
  });
560
560
  }
561
- function jn(e, t) {
561
+ function jr(e, t) {
562
562
  if (!t.customMerge)
563
563
  return Ue;
564
- var r = t.customMerge(e);
565
- return typeof r == "function" ? r : Ue;
564
+ var n = t.customMerge(e);
565
+ return typeof n == "function" ? n : Ue;
566
566
  }
567
- function kn(e) {
567
+ function kr(e) {
568
568
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) {
569
569
  return Object.propertyIsEnumerable.call(e, t);
570
570
  }) : [];
571
571
  }
572
- function or(e) {
573
- return Object.keys(e).concat(kn(e));
572
+ function an(e) {
573
+ return Object.keys(e).concat(kr(e));
574
574
  }
575
- function Rr(e, t) {
575
+ function Ln(e, t) {
576
576
  try {
577
577
  return t in e;
578
578
  } catch {
579
579
  return !1;
580
580
  }
581
581
  }
582
- function Vn(e, t) {
583
- return Rr(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
582
+ function Vr(e, t) {
583
+ return Ln(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
584
584
  }
585
- function Xn(e, t, r) {
586
- var n = {};
587
- return r.isMergeableObject(e) && or(e).forEach(function(i) {
588
- n[i] = rt(e[i], r);
589
- }), or(t).forEach(function(i) {
590
- Vn(e, i) || (Rr(e, i) && r.isMergeableObject(t[i]) ? n[i] = jn(i, r)(e[i], t[i], r) : n[i] = rt(t[i], r));
591
- }), n;
592
- }
593
- function Ue(e, t, r) {
594
- r = r || {}, r.arrayMerge = r.arrayMerge || $n, r.isMergeableObject = r.isMergeableObject || Mn, r.cloneUnlessOtherwiseSpecified = rt;
595
- var n = Array.isArray(t), i = Array.isArray(e), o = n === i;
596
- return o ? n ? r.arrayMerge(e, t, r) : Xn(e, t, r) : rt(t, r);
597
- }
598
- Ue.all = function(t, r) {
585
+ function Xr(e, t, n) {
586
+ var r = {};
587
+ return n.isMergeableObject(e) && an(e).forEach(function(i) {
588
+ r[i] = rt(e[i], n);
589
+ }), an(t).forEach(function(i) {
590
+ Vr(e, i) || (Ln(e, i) && n.isMergeableObject(t[i]) ? r[i] = jr(i, n)(e[i], t[i], n) : r[i] = rt(t[i], n));
591
+ }), r;
592
+ }
593
+ function Ue(e, t, n) {
594
+ n = n || {}, n.arrayMerge = n.arrayMerge || $r, n.isMergeableObject = n.isMergeableObject || Mr, n.cloneUnlessOtherwiseSpecified = rt;
595
+ var r = Array.isArray(t), i = Array.isArray(e), o = r === i;
596
+ return o ? r ? n.arrayMerge(e, t, n) : Xr(e, t, n) : rt(t, n);
597
+ }
598
+ Ue.all = function(t, n) {
599
599
  if (!Array.isArray(t))
600
600
  throw new Error("first argument should be an array");
601
- return t.reduce(function(n, i) {
602
- return Ue(n, i, r);
601
+ return t.reduce(function(r, i) {
602
+ return Ue(r, i, n);
603
603
  }, {});
604
604
  };
605
- var zn = Ue, Wn = zn;
606
- const Zn = /* @__PURE__ */ Nn(Wn);
607
- var jt = function(e, t) {
608
- return jt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
609
- r.__proto__ = n;
610
- } || function(r, n) {
611
- for (var i in n)
612
- Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
613
- }, jt(e, t);
605
+ var zr = Ue, Wr = zr;
606
+ const Zr = /* @__PURE__ */ Nr(Wr);
607
+ /*! *****************************************************************************
608
+ Copyright (c) Microsoft Corporation.
609
+
610
+ Permission to use, copy, modify, and/or distribute this software for any
611
+ purpose with or without fee is hereby granted.
612
+
613
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
614
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
615
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
616
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
617
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
618
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
619
+ PERFORMANCE OF THIS SOFTWARE.
620
+ ***************************************************************************** */
621
+ var Gt = function(e, t) {
622
+ return Gt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
623
+ n.__proto__ = r;
624
+ } || function(n, r) {
625
+ for (var i in r)
626
+ Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
627
+ }, Gt(e, t);
614
628
  };
615
- function Tt(e, t) {
629
+ function vt(e, t) {
616
630
  if (typeof t != "function" && t !== null)
617
631
  throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
618
- jt(e, t);
619
- function r() {
632
+ Gt(e, t);
633
+ function n() {
620
634
  this.constructor = e;
621
635
  }
622
- e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
623
- }
624
- var ye = function() {
625
- return ye = Object.assign || function(t) {
626
- for (var r, n = 1, i = arguments.length; n < i; n++) {
627
- r = arguments[n];
628
- for (var o in r)
629
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
636
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
637
+ }
638
+ var N = function() {
639
+ return N = Object.assign || function(t) {
640
+ for (var n, r = 1, i = arguments.length; r < i; r++) {
641
+ n = arguments[r];
642
+ for (var o in n)
643
+ Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
630
644
  }
631
645
  return t;
632
- }, ye.apply(this, arguments);
646
+ }, N.apply(this, arguments);
633
647
  };
634
- function qn(e, t) {
635
- var r = {};
636
- for (var n in e)
637
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
648
+ function qr(e, t) {
649
+ var n = {};
650
+ for (var r in e)
651
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
638
652
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
639
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
640
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
641
- return r;
653
+ for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
654
+ t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
655
+ return n;
642
656
  }
643
- function Nt(e, t, r) {
644
- if (r || arguments.length === 2)
645
- for (var n = 0, i = t.length, o; n < i; n++)
646
- (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
647
- return e.concat(o || Array.prototype.slice.call(t));
657
+ function Rt(e, t, n) {
658
+ if (arguments.length === 2)
659
+ for (var r = 0, i = t.length, o; r < i; r++)
660
+ (o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
661
+ return e.concat(o || t);
648
662
  }
649
- function Mt(e, t) {
650
- var r = t && t.cache ? t.cache : ri, n = t && t.serializer ? t.serializer : ei, i = t && t.strategy ? t.strategy : Yn;
663
+ function Lt(e, t) {
664
+ var n = t && t.cache ? t.cache : ti, r = t && t.serializer ? t.serializer : ei, i = t && t.strategy ? t.strategy : Jr;
651
665
  return i(e, {
652
- cache: r,
653
- serializer: n
666
+ cache: n,
667
+ serializer: r
654
668
  });
655
669
  }
656
- function Qn(e) {
670
+ function Qr(e) {
657
671
  return e == null || typeof e == "number" || typeof e == "boolean";
658
672
  }
659
- function Jn(e, t, r, n) {
660
- var i = Qn(n) ? n : r(n), o = t.get(i);
661
- return typeof o > "u" && (o = e.call(this, n), t.set(i, o)), o;
673
+ function Nn(e, t, n, r) {
674
+ var i = Qr(r) ? r : n(r), o = t.get(i);
675
+ return typeof o > "u" && (o = e.call(this, r), t.set(i, o)), o;
676
+ }
677
+ function Mn(e, t, n) {
678
+ var r = Array.prototype.slice.call(arguments, 3), i = n(r), o = t.get(i);
679
+ return typeof o > "u" && (o = e.apply(this, r), t.set(i, o)), o;
662
680
  }
663
- function Lr(e, t, r) {
664
- var n = Array.prototype.slice.call(arguments, 3), i = r(n), o = t.get(i);
665
- return typeof o > "u" && (o = e.apply(this, n), t.set(i, o)), o;
681
+ function Jt(e, t, n, r, i) {
682
+ return n.bind(t, e, r, i);
666
683
  }
667
- function Nr(e, t, r, n, i) {
668
- return r.bind(t, e, n, i);
684
+ function Jr(e, t) {
685
+ var n = e.length === 1 ? Nn : Mn;
686
+ return Jt(e, this, n, t.cache.create(), t.serializer);
669
687
  }
670
- function Yn(e, t) {
671
- var r = e.length === 1 ? Jn : Lr;
672
- return Nr(e, this, r, t.cache.create(), t.serializer);
688
+ function Yr(e, t) {
689
+ return Jt(e, this, Mn, t.cache.create(), t.serializer);
673
690
  }
674
- function Kn(e, t) {
675
- return Nr(e, this, Lr, t.cache.create(), t.serializer);
691
+ function Kr(e, t) {
692
+ return Jt(e, this, Nn, t.cache.create(), t.serializer);
676
693
  }
677
694
  var ei = function() {
678
695
  return JSON.stringify(arguments);
679
- }, ti = (
680
- /** @class */
681
- function() {
682
- function e() {
683
- this.cache = /* @__PURE__ */ Object.create(null);
684
- }
685
- return e.prototype.get = function(t) {
686
- return this.cache[t];
687
- }, e.prototype.set = function(t, r) {
688
- this.cache[t] = r;
689
- }, e;
690
- }()
691
- ), ri = {
696
+ };
697
+ function Yt() {
698
+ this.cache = /* @__PURE__ */ Object.create(null);
699
+ }
700
+ Yt.prototype.get = function(e) {
701
+ return this.cache[e];
702
+ };
703
+ Yt.prototype.set = function(e, t) {
704
+ this.cache[e] = t;
705
+ };
706
+ var ti = {
692
707
  create: function() {
693
- return new ti();
708
+ return new Yt();
694
709
  }
695
- }, Pt = {
696
- variadic: Kn
697
- }, vt = function() {
698
- return vt = Object.assign || function(t) {
699
- for (var r, n = 1, i = arguments.length; n < i; n++) {
700
- r = arguments[n];
701
- for (var o in r)
702
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
703
- }
704
- return t;
705
- }, vt.apply(this, arguments);
706
- };
707
- var C;
710
+ }, Nt = {
711
+ variadic: Yr,
712
+ monadic: Kr
713
+ }, C;
708
714
  (function(e) {
709
715
  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";
710
716
  })(C || (C = {}));
711
- var F;
717
+ var U;
712
718
  (function(e) {
713
719
  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";
714
- })(F || (F = {}));
720
+ })(U || (U = {}));
715
721
  var Ge;
716
722
  (function(e) {
717
723
  e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
718
724
  })(Ge || (Ge = {}));
719
- function ar(e) {
720
- return e.type === F.literal;
725
+ function sn(e) {
726
+ return e.type === U.literal;
721
727
  }
722
728
  function ni(e) {
723
- return e.type === F.argument;
729
+ return e.type === U.argument;
724
730
  }
725
- function Mr(e) {
726
- return e.type === F.number;
731
+ function Pn(e) {
732
+ return e.type === U.number;
727
733
  }
728
- function Pr(e) {
729
- return e.type === F.date;
734
+ function In(e) {
735
+ return e.type === U.date;
730
736
  }
731
- function Ir(e) {
732
- return e.type === F.time;
737
+ function Dn(e) {
738
+ return e.type === U.time;
733
739
  }
734
- function Dr(e) {
735
- return e.type === F.select;
740
+ function Fn(e) {
741
+ return e.type === U.select;
736
742
  }
737
- function Fr(e) {
738
- return e.type === F.plural;
743
+ function Un(e) {
744
+ return e.type === U.plural;
739
745
  }
740
- function ii(e) {
741
- return e.type === F.pound;
746
+ function ri(e) {
747
+ return e.type === U.pound;
742
748
  }
743
- function Ur(e) {
744
- return e.type === F.tag;
749
+ function Gn(e) {
750
+ return e.type === U.tag;
745
751
  }
746
- function Gr(e) {
752
+ function $n(e) {
747
753
  return !!(e && typeof e == "object" && e.type === Ge.number);
748
754
  }
749
- function kt(e) {
755
+ function $t(e) {
750
756
  return !!(e && typeof e == "object" && e.type === Ge.dateTime);
751
757
  }
752
- var $r = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, oi = /(?:[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;
753
- function ai(e) {
758
+ var jn = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, ii = /(?:[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;
759
+ function oi(e) {
754
760
  var t = {};
755
- return e.replace(oi, function(r) {
756
- var n = r.length;
757
- switch (r[0]) {
761
+ return e.replace(ii, function(n) {
762
+ var r = n.length;
763
+ switch (n[0]) {
758
764
  case "G":
759
- t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
765
+ t.era = r === 4 ? "long" : r === 5 ? "narrow" : "short";
760
766
  break;
761
767
  case "y":
762
- t.year = n === 2 ? "2-digit" : "numeric";
768
+ t.year = r === 2 ? "2-digit" : "numeric";
763
769
  break;
764
770
  case "Y":
765
771
  case "u":
@@ -771,30 +777,30 @@ function ai(e) {
771
777
  throw new RangeError("`q/Q` (quarter) patterns are not supported");
772
778
  case "M":
773
779
  case "L":
774
- t.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
780
+ t.month = ["numeric", "2-digit", "short", "long", "narrow"][r - 1];
775
781
  break;
776
782
  case "w":
777
783
  case "W":
778
784
  throw new RangeError("`w/W` (week) patterns are not supported");
779
785
  case "d":
780
- t.day = ["numeric", "2-digit"][n - 1];
786
+ t.day = ["numeric", "2-digit"][r - 1];
781
787
  break;
782
788
  case "D":
783
789
  case "F":
784
790
  case "g":
785
791
  throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
786
792
  case "E":
787
- t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
793
+ t.weekday = r === 4 ? "long" : r === 5 ? "narrow" : "short";
788
794
  break;
789
795
  case "e":
790
- if (n < 4)
796
+ if (r < 4)
791
797
  throw new RangeError("`e..eee` (weekday) patterns are not supported");
792
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
798
+ t.weekday = ["short", "long", "narrow", "short"][r - 4];
793
799
  break;
794
800
  case "c":
795
- if (n < 4)
801
+ if (r < 4)
796
802
  throw new RangeError("`c..ccc` (weekday) patterns are not supported");
797
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
803
+ t.weekday = ["short", "long", "narrow", "short"][r - 4];
798
804
  break;
799
805
  case "a":
800
806
  t.hour12 = !0;
@@ -803,32 +809,32 @@ function ai(e) {
803
809
  case "B":
804
810
  throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
805
811
  case "h":
806
- t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
812
+ t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][r - 1];
807
813
  break;
808
814
  case "H":
809
- t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
815
+ t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][r - 1];
810
816
  break;
811
817
  case "K":
812
- t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
818
+ t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][r - 1];
813
819
  break;
814
820
  case "k":
815
- t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
821
+ t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][r - 1];
816
822
  break;
817
823
  case "j":
818
824
  case "J":
819
825
  case "C":
820
826
  throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
821
827
  case "m":
822
- t.minute = ["numeric", "2-digit"][n - 1];
828
+ t.minute = ["numeric", "2-digit"][r - 1];
823
829
  break;
824
830
  case "s":
825
- t.second = ["numeric", "2-digit"][n - 1];
831
+ t.second = ["numeric", "2-digit"][r - 1];
826
832
  break;
827
833
  case "S":
828
834
  case "A":
829
835
  throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
830
836
  case "z":
831
- t.timeZoneName = n < 4 ? "short" : "long";
837
+ t.timeZoneName = r < 4 ? "short" : "long";
832
838
  break;
833
839
  case "Z":
834
840
  case "O":
@@ -841,46 +847,36 @@ function ai(e) {
841
847
  return "";
842
848
  }), t;
843
849
  }
844
- var k = function() {
845
- return k = Object.assign || function(t) {
846
- for (var r, n = 1, i = arguments.length; n < i; n++) {
847
- r = arguments[n];
848
- for (var o in r)
849
- Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
850
- }
851
- return t;
852
- }, k.apply(this, arguments);
853
- };
854
- var si = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
855
- function ui(e) {
850
+ var ai = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
851
+ function si(e) {
856
852
  if (e.length === 0)
857
853
  throw new Error("Number skeleton cannot be empty");
858
- for (var t = e.split(si).filter(function(p) {
859
- return p.length > 0;
860
- }), r = [], n = 0, i = t; n < i.length; n++) {
861
- var o = i[n], l = o.split("/");
854
+ for (var t = e.split(ai).filter(function(d) {
855
+ return d.length > 0;
856
+ }), n = [], r = 0, i = t; r < i.length; r++) {
857
+ var o = i[r], l = o.split("/");
862
858
  if (l.length === 0)
863
859
  throw new Error("Invalid number skeleton");
864
- for (var s = l[0], h = l.slice(1), u = 0, f = h; u < f.length; u++) {
865
- var m = f[u];
866
- if (m.length === 0)
860
+ for (var a = l[0], c = l.slice(1), u = 0, f = c; u < f.length; u++) {
861
+ var g = f[u];
862
+ if (g.length === 0)
867
863
  throw new Error("Invalid number skeleton");
868
864
  }
869
- r.push({ stem: s, options: h });
865
+ n.push({ stem: a, options: c });
870
866
  }
871
- return r;
867
+ return n;
872
868
  }
873
- function li(e) {
869
+ function ui(e) {
874
870
  return e.replace(/^(.*?)-/, "");
875
871
  }
876
- var sr = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, jr = /^(@+)?(\+|#+)?[rs]?$/g, hi = /(\*)(0+)|(#+)(0+)|(0+)/g, kr = /^(0+)$/;
877
- function ur(e) {
872
+ var un = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, kn = /^(@+)?(\+|#+)?[rs]?$/g, li = /(\*)(0+)|(#+)(0+)|(0+)/g, Vn = /^(0+)$/;
873
+ function ln(e) {
878
874
  var t = {};
879
- return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(jr, function(r, n, i) {
880
- 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)), "";
875
+ return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(kn, function(n, r, i) {
876
+ return typeof i != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : i === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof i == "string" ? i.length : 0)), "";
881
877
  }), t;
882
878
  }
883
- function Vr(e) {
879
+ function Xn(e) {
884
880
  switch (e) {
885
881
  case "sign-auto":
886
882
  return {
@@ -920,27 +916,27 @@ function Vr(e) {
920
916
  };
921
917
  }
922
918
  }
923
- function ci(e) {
919
+ function hi(e) {
924
920
  var t;
925
921
  if (e[0] === "E" && e[1] === "E" ? (t = {
926
922
  notation: "engineering"
927
923
  }, e = e.slice(2)) : e[0] === "E" && (t = {
928
924
  notation: "scientific"
929
925
  }, e = e.slice(1)), t) {
930
- var r = e.slice(0, 2);
931
- if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !kr.test(e))
926
+ var n = e.slice(0, 2);
927
+ if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Vn.test(e))
932
928
  throw new Error("Malformed concise eng/scientific notation");
933
929
  t.minimumIntegerDigits = e.length;
934
930
  }
935
931
  return t;
936
932
  }
937
- function lr(e) {
938
- var t = {}, r = Vr(e);
939
- return r || t;
933
+ function hn(e) {
934
+ var t = {}, n = Xn(e);
935
+ return n || t;
940
936
  }
941
- function fi(e) {
942
- for (var t = {}, r = 0, n = e; r < n.length; r++) {
943
- var i = n[r];
937
+ function ci(e) {
938
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
939
+ var i = r[n];
944
940
  switch (i.stem) {
945
941
  case "percent":
946
942
  case "%":
@@ -962,7 +958,7 @@ function fi(e) {
962
958
  continue;
963
959
  case "measure-unit":
964
960
  case "unit":
965
- t.style = "unit", t.unit = li(i.options[0]);
961
+ t.style = "unit", t.unit = ui(i.options[0]);
966
962
  continue;
967
963
  case "compact-short":
968
964
  case "K":
@@ -973,13 +969,13 @@ function fi(e) {
973
969
  t.notation = "compact", t.compactDisplay = "long";
974
970
  continue;
975
971
  case "scientific":
976
- t = k(k(k({}, t), { notation: "scientific" }), i.options.reduce(function(h, u) {
977
- return k(k({}, h), lr(u));
972
+ t = N(N(N({}, t), { notation: "scientific" }), i.options.reduce(function(c, u) {
973
+ return N(N({}, c), hn(u));
978
974
  }, {}));
979
975
  continue;
980
976
  case "engineering":
981
- t = k(k(k({}, t), { notation: "engineering" }), i.options.reduce(function(h, u) {
982
- return k(k({}, h), lr(u));
977
+ t = N(N(N({}, t), { notation: "engineering" }), i.options.reduce(function(c, u) {
978
+ return N(N({}, c), hn(u));
983
979
  }, {}));
984
980
  continue;
985
981
  case "notation-simple":
@@ -1024,45 +1020,45 @@ function fi(e) {
1024
1020
  case "integer-width":
1025
1021
  if (i.options.length > 1)
1026
1022
  throw new RangeError("integer-width stems only accept a single optional option");
1027
- i.options[0].replace(hi, function(h, u, f, m, p, y) {
1023
+ i.options[0].replace(li, function(c, u, f, g, d, x) {
1028
1024
  if (u)
1029
1025
  t.minimumIntegerDigits = f.length;
1030
1026
  else {
1031
- if (m && p)
1027
+ if (g && d)
1032
1028
  throw new Error("We currently do not support maximum integer digits");
1033
- if (y)
1029
+ if (x)
1034
1030
  throw new Error("We currently do not support exact integer digits");
1035
1031
  }
1036
1032
  return "";
1037
1033
  });
1038
1034
  continue;
1039
1035
  }
1040
- if (kr.test(i.stem)) {
1036
+ if (Vn.test(i.stem)) {
1041
1037
  t.minimumIntegerDigits = i.stem.length;
1042
1038
  continue;
1043
1039
  }
1044
- if (sr.test(i.stem)) {
1040
+ if (un.test(i.stem)) {
1045
1041
  if (i.options.length > 1)
1046
1042
  throw new RangeError("Fraction-precision stems only accept a single optional option");
1047
- i.stem.replace(sr, function(h, u, f, m, p, y) {
1048
- return f === "*" ? t.minimumFractionDigits = u.length : m && m[0] === "#" ? t.maximumFractionDigits = m.length : p && y ? (t.minimumFractionDigits = p.length, t.maximumFractionDigits = p.length + y.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), "";
1043
+ i.stem.replace(un, function(c, u, f, g, d, x) {
1044
+ return f === "*" ? t.minimumFractionDigits = u.length : g && g[0] === "#" ? t.maximumFractionDigits = g.length : d && x ? (t.minimumFractionDigits = d.length, t.maximumFractionDigits = d.length + x.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), "";
1049
1045
  });
1050
1046
  var o = i.options[0];
1051
- o === "w" ? t = k(k({}, t), { trailingZeroDisplay: "stripIfInteger" }) : o && (t = k(k({}, t), ur(o)));
1047
+ o === "w" ? t = N(N({}, t), { trailingZeroDisplay: "stripIfInteger" }) : o && (t = N(N({}, t), ln(o)));
1052
1048
  continue;
1053
1049
  }
1054
- if (jr.test(i.stem)) {
1055
- t = k(k({}, t), ur(i.stem));
1050
+ if (kn.test(i.stem)) {
1051
+ t = N(N({}, t), ln(i.stem));
1056
1052
  continue;
1057
1053
  }
1058
- var l = Vr(i.stem);
1059
- l && (t = k(k({}, t), l));
1060
- var s = ci(i.stem);
1061
- s && (t = k(k({}, t), s));
1054
+ var l = Xn(i.stem);
1055
+ l && (t = N(N({}, t), l));
1056
+ var a = hi(i.stem);
1057
+ a && (t = N(N({}, t), a));
1062
1058
  }
1063
1059
  return t;
1064
1060
  }
1065
- var ft = {
1061
+ var lt = {
1066
1062
  "001": [
1067
1063
  "H",
1068
1064
  "h"
@@ -2477,23 +2473,23 @@ var ft = {
2477
2473
  "h"
2478
2474
  ]
2479
2475
  };
2480
- function di(e, t) {
2481
- for (var r = "", n = 0; n < e.length; n++) {
2482
- var i = e.charAt(n);
2476
+ function fi(e, t) {
2477
+ for (var n = "", r = 0; r < e.length; r++) {
2478
+ var i = e.charAt(r);
2483
2479
  if (i === "j") {
2484
- for (var o = 0; n + 1 < e.length && e.charAt(n + 1) === i; )
2485
- o++, n++;
2486
- var l = 1 + (o & 1), s = o < 2 ? 1 : 3 + (o >> 1), h = "a", u = pi(t);
2487
- for ((u == "H" || u == "k") && (s = 0); s-- > 0; )
2488
- r += h;
2480
+ for (var o = 0; r + 1 < e.length && e.charAt(r + 1) === i; )
2481
+ o++, r++;
2482
+ var l = 1 + (o & 1), a = o < 2 ? 1 : 3 + (o >> 1), c = "a", u = di(t);
2483
+ for ((u == "H" || u == "k") && (a = 0); a-- > 0; )
2484
+ n += c;
2489
2485
  for (; l-- > 0; )
2490
- r = u + r;
2486
+ n = u + n;
2491
2487
  } else
2492
- i === "J" ? r += "H" : r += i;
2488
+ i === "J" ? n += "H" : n += i;
2493
2489
  }
2494
- return r;
2490
+ return n;
2495
2491
  }
2496
- function pi(e) {
2492
+ function di(e) {
2497
2493
  var t = e.hourCycle;
2498
2494
  if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
2499
2495
  e.hourCycles && // @ts-ignore
@@ -2510,73 +2506,73 @@ function pi(e) {
2510
2506
  default:
2511
2507
  throw new Error("Invalid hourCycle");
2512
2508
  }
2513
- var r = e.language, n;
2514
- r !== "root" && (n = e.maximize().region);
2515
- var i = ft[n || ""] || ft[r || ""] || ft["".concat(r, "-001")] || ft["001"];
2509
+ var n = e.language, r;
2510
+ n !== "root" && (r = e.maximize().region);
2511
+ var i = lt[r || ""] || lt[n || ""] || lt["".concat(n, "-001")] || lt["001"];
2516
2512
  return i[0];
2517
2513
  }
2518
- var It, mi = new RegExp("^".concat($r.source, "*")), gi = new RegExp("".concat($r.source, "*$"));
2514
+ var Mt, pi = new RegExp("^".concat(jn.source, "*")), mi = new RegExp("".concat(jn.source, "*$"));
2519
2515
  function R(e, t) {
2520
2516
  return { start: e, end: t };
2521
2517
  }
2522
- var bi = !!String.prototype.startsWith && "_a".startsWith("a", 1), yi = !!String.fromCodePoint, vi = !!Object.fromEntries, Ei = !!String.prototype.codePointAt, xi = !!String.prototype.trimStart, _i = !!String.prototype.trimEnd, Ti = !!Number.isSafeInteger, Bi = Ti ? Number.isSafeInteger : function(e) {
2518
+ var gi = !!String.prototype.startsWith && "_a".startsWith("a", 1), bi = !!String.fromCodePoint, yi = !!Object.fromEntries, vi = !!String.prototype.codePointAt, Ei = !!String.prototype.trimStart, xi = !!String.prototype.trimEnd, _i = !!Number.isSafeInteger, Ti = _i ? Number.isSafeInteger : function(e) {
2523
2519
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2524
- }, Vt = !0;
2520
+ }, jt = !0;
2525
2521
  try {
2526
- var Si = zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2527
- Vt = ((It = Si.exec("a")) === null || It === void 0 ? void 0 : It[0]) === "a";
2522
+ var Bi = Wn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2523
+ jt = ((Mt = Bi.exec("a")) === null || Mt === void 0 ? void 0 : Mt[0]) === "a";
2528
2524
  } catch {
2529
- Vt = !1;
2525
+ jt = !1;
2530
2526
  }
2531
- var hr = bi ? (
2527
+ var cn = gi ? (
2532
2528
  // Native
2533
- function(t, r, n) {
2534
- return t.startsWith(r, n);
2529
+ function(t, n, r) {
2530
+ return t.startsWith(n, r);
2535
2531
  }
2536
2532
  ) : (
2537
2533
  // For IE11
2538
- function(t, r, n) {
2539
- return t.slice(n, n + r.length) === r;
2534
+ function(t, n, r) {
2535
+ return t.slice(r, r + n.length) === n;
2540
2536
  }
2541
- ), Xt = yi ? String.fromCodePoint : (
2537
+ ), kt = bi ? String.fromCodePoint : (
2542
2538
  // IE11
2543
2539
  function() {
2544
- for (var t = [], r = 0; r < arguments.length; r++)
2545
- t[r] = arguments[r];
2546
- for (var n = "", i = t.length, o = 0, l; i > o; ) {
2540
+ for (var t = [], n = 0; n < arguments.length; n++)
2541
+ t[n] = arguments[n];
2542
+ for (var r = "", i = t.length, o = 0, l; i > o; ) {
2547
2543
  if (l = t[o++], l > 1114111)
2548
2544
  throw RangeError(l + " is not a valid code point");
2549
- n += l < 65536 ? String.fromCharCode(l) : String.fromCharCode(((l -= 65536) >> 10) + 55296, l % 1024 + 56320);
2545
+ r += l < 65536 ? String.fromCharCode(l) : String.fromCharCode(((l -= 65536) >> 10) + 55296, l % 1024 + 56320);
2550
2546
  }
2551
- return n;
2547
+ return r;
2552
2548
  }
2553
- ), cr = (
2549
+ ), fn = (
2554
2550
  // native
2555
- vi ? Object.fromEntries : (
2551
+ yi ? Object.fromEntries : (
2556
2552
  // Ponyfill
2557
2553
  function(t) {
2558
- for (var r = {}, n = 0, i = t; n < i.length; n++) {
2559
- var o = i[n], l = o[0], s = o[1];
2560
- r[l] = s;
2554
+ for (var n = {}, r = 0, i = t; r < i.length; r++) {
2555
+ var o = i[r], l = o[0], a = o[1];
2556
+ n[l] = a;
2561
2557
  }
2562
- return r;
2558
+ return n;
2563
2559
  }
2564
2560
  )
2565
- ), Xr = Ei ? (
2561
+ ), zn = vi ? (
2566
2562
  // Native
2567
- function(t, r) {
2568
- return t.codePointAt(r);
2563
+ function(t, n) {
2564
+ return t.codePointAt(n);
2569
2565
  }
2570
2566
  ) : (
2571
2567
  // IE 11
2572
- function(t, r) {
2573
- var n = t.length;
2574
- if (!(r < 0 || r >= n)) {
2575
- var i = t.charCodeAt(r), o;
2576
- return i < 55296 || i > 56319 || r + 1 === n || (o = t.charCodeAt(r + 1)) < 56320 || o > 57343 ? i : (i - 55296 << 10) + (o - 56320) + 65536;
2568
+ function(t, n) {
2569
+ var r = t.length;
2570
+ if (!(n < 0 || n >= r)) {
2571
+ var i = t.charCodeAt(n), o;
2572
+ return i < 55296 || i > 56319 || n + 1 === r || (o = t.charCodeAt(n + 1)) < 56320 || o > 57343 ? i : (i - 55296 << 10) + (o - 56320) + 65536;
2577
2573
  }
2578
2574
  }
2579
- ), wi = xi ? (
2575
+ ), Si = Ei ? (
2580
2576
  // Native
2581
2577
  function(t) {
2582
2578
  return t.trimStart();
@@ -2584,9 +2580,9 @@ var hr = bi ? (
2584
2580
  ) : (
2585
2581
  // Ponyfill
2586
2582
  function(t) {
2587
- return t.replace(mi, "");
2583
+ return t.replace(pi, "");
2588
2584
  }
2589
- ), Ai = _i ? (
2585
+ ), wi = xi ? (
2590
2586
  // Native
2591
2587
  function(t) {
2592
2588
  return t.trimEnd();
@@ -2594,69 +2590,69 @@ var hr = bi ? (
2594
2590
  ) : (
2595
2591
  // Ponyfill
2596
2592
  function(t) {
2597
- return t.replace(gi, "");
2593
+ return t.replace(mi, "");
2598
2594
  }
2599
2595
  );
2600
- function zr(e, t) {
2596
+ function Wn(e, t) {
2601
2597
  return new RegExp(e, t);
2602
2598
  }
2603
- var zt;
2604
- if (Vt) {
2605
- var fr = zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2606
- zt = function(t, r) {
2607
- var n;
2608
- fr.lastIndex = r;
2609
- var i = fr.exec(t);
2610
- return (n = i[1]) !== null && n !== void 0 ? n : "";
2599
+ var Vt;
2600
+ if (jt) {
2601
+ var dn = Wn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2602
+ Vt = function(t, n) {
2603
+ var r;
2604
+ dn.lastIndex = n;
2605
+ var i = dn.exec(t);
2606
+ return (r = i[1]) !== null && r !== void 0 ? r : "";
2611
2607
  };
2612
2608
  } else
2613
- zt = function(t, r) {
2614
- for (var n = []; ; ) {
2615
- var i = Xr(t, r);
2616
- if (i === void 0 || Wr(i) || Ri(i))
2609
+ Vt = function(t, n) {
2610
+ for (var r = []; ; ) {
2611
+ var i = zn(t, n);
2612
+ if (i === void 0 || Zn(i) || Oi(i))
2617
2613
  break;
2618
- n.push(i), r += i >= 65536 ? 2 : 1;
2614
+ r.push(i), n += i >= 65536 ? 2 : 1;
2619
2615
  }
2620
- return Xt.apply(void 0, n);
2616
+ return kt.apply(void 0, r);
2621
2617
  };
2622
- var Ci = (
2618
+ var Ai = (
2623
2619
  /** @class */
2624
2620
  function() {
2625
- function e(t, r) {
2626
- 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;
2621
+ function e(t, n) {
2622
+ n === void 0 && (n = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons;
2627
2623
  }
2628
2624
  return e.prototype.parse = function() {
2629
2625
  if (this.offset() !== 0)
2630
2626
  throw Error("parser can only be used once");
2631
2627
  return this.parseMessage(0, "", !1);
2632
- }, e.prototype.parseMessage = function(t, r, n) {
2628
+ }, e.prototype.parseMessage = function(t, n, r) {
2633
2629
  for (var i = []; !this.isEOF(); ) {
2634
2630
  var o = this.char();
2635
2631
  if (o === 123) {
2636
- var l = this.parseArgument(t, n);
2632
+ var l = this.parseArgument(t, r);
2637
2633
  if (l.err)
2638
2634
  return l;
2639
2635
  i.push(l.val);
2640
2636
  } else {
2641
2637
  if (o === 125 && t > 0)
2642
2638
  break;
2643
- if (o === 35 && (r === "plural" || r === "selectordinal")) {
2644
- var s = this.clonePosition();
2639
+ if (o === 35 && (n === "plural" || n === "selectordinal")) {
2640
+ var a = this.clonePosition();
2645
2641
  this.bump(), i.push({
2646
- type: F.pound,
2647
- location: R(s, this.clonePosition())
2642
+ type: U.pound,
2643
+ location: R(a, this.clonePosition())
2648
2644
  });
2649
2645
  } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2650
- if (n)
2646
+ if (r)
2651
2647
  break;
2652
2648
  return this.error(C.UNMATCHED_CLOSING_TAG, R(this.clonePosition(), this.clonePosition()));
2653
- } else if (o === 60 && !this.ignoreTag && Wt(this.peek() || 0)) {
2654
- var l = this.parseTag(t, r);
2649
+ } else if (o === 60 && !this.ignoreTag && Xt(this.peek() || 0)) {
2650
+ var l = this.parseTag(t, n);
2655
2651
  if (l.err)
2656
2652
  return l;
2657
2653
  i.push(l.val);
2658
2654
  } else {
2659
- var l = this.parseLiteral(t, r);
2655
+ var l = this.parseLiteral(t, n);
2660
2656
  if (l.err)
2661
2657
  return l;
2662
2658
  i.push(l.val);
@@ -2664,73 +2660,73 @@ var Ci = (
2664
2660
  }
2665
2661
  }
2666
2662
  return { val: i, err: null };
2667
- }, e.prototype.parseTag = function(t, r) {
2668
- var n = this.clonePosition();
2663
+ }, e.prototype.parseTag = function(t, n) {
2664
+ var r = this.clonePosition();
2669
2665
  this.bump();
2670
2666
  var i = this.parseTagName();
2671
2667
  if (this.bumpSpace(), this.bumpIf("/>"))
2672
2668
  return {
2673
2669
  val: {
2674
- type: F.literal,
2670
+ type: U.literal,
2675
2671
  value: "<".concat(i, "/>"),
2676
- location: R(n, this.clonePosition())
2672
+ location: R(r, this.clonePosition())
2677
2673
  },
2678
2674
  err: null
2679
2675
  };
2680
2676
  if (this.bumpIf(">")) {
2681
- var o = this.parseMessage(t + 1, r, !0);
2677
+ var o = this.parseMessage(t + 1, n, !0);
2682
2678
  if (o.err)
2683
2679
  return o;
2684
- var l = o.val, s = this.clonePosition();
2680
+ var l = o.val, a = this.clonePosition();
2685
2681
  if (this.bumpIf("</")) {
2686
- if (this.isEOF() || !Wt(this.char()))
2687
- return this.error(C.INVALID_TAG, R(s, this.clonePosition()));
2688
- var h = this.clonePosition(), u = this.parseTagName();
2689
- return i !== u ? this.error(C.UNMATCHED_CLOSING_TAG, R(h, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
2682
+ if (this.isEOF() || !Xt(this.char()))
2683
+ return this.error(C.INVALID_TAG, R(a, this.clonePosition()));
2684
+ var c = this.clonePosition(), u = this.parseTagName();
2685
+ return i !== u ? this.error(C.UNMATCHED_CLOSING_TAG, R(c, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
2690
2686
  val: {
2691
- type: F.tag,
2687
+ type: U.tag,
2692
2688
  value: i,
2693
2689
  children: l,
2694
- location: R(n, this.clonePosition())
2690
+ location: R(r, this.clonePosition())
2695
2691
  },
2696
2692
  err: null
2697
- } : this.error(C.INVALID_TAG, R(s, this.clonePosition())));
2693
+ } : this.error(C.INVALID_TAG, R(a, this.clonePosition())));
2698
2694
  } else
2699
- return this.error(C.UNCLOSED_TAG, R(n, this.clonePosition()));
2695
+ return this.error(C.UNCLOSED_TAG, R(r, this.clonePosition()));
2700
2696
  } else
2701
- return this.error(C.INVALID_TAG, R(n, this.clonePosition()));
2697
+ return this.error(C.INVALID_TAG, R(r, this.clonePosition()));
2702
2698
  }, e.prototype.parseTagName = function() {
2703
2699
  var t = this.offset();
2704
- for (this.bump(); !this.isEOF() && Oi(this.char()); )
2700
+ for (this.bump(); !this.isEOF() && Hi(this.char()); )
2705
2701
  this.bump();
2706
2702
  return this.message.slice(t, this.offset());
2707
- }, e.prototype.parseLiteral = function(t, r) {
2708
- for (var n = this.clonePosition(), i = ""; ; ) {
2709
- var o = this.tryParseQuote(r);
2703
+ }, e.prototype.parseLiteral = function(t, n) {
2704
+ for (var r = this.clonePosition(), i = ""; ; ) {
2705
+ var o = this.tryParseQuote(n);
2710
2706
  if (o) {
2711
2707
  i += o;
2712
2708
  continue;
2713
2709
  }
2714
- var l = this.tryParseUnquoted(t, r);
2710
+ var l = this.tryParseUnquoted(t, n);
2715
2711
  if (l) {
2716
2712
  i += l;
2717
2713
  continue;
2718
2714
  }
2719
- var s = this.tryParseLeftAngleBracket();
2720
- if (s) {
2721
- i += s;
2715
+ var a = this.tryParseLeftAngleBracket();
2716
+ if (a) {
2717
+ i += a;
2722
2718
  continue;
2723
2719
  }
2724
2720
  break;
2725
2721
  }
2726
- var h = R(n, this.clonePosition());
2722
+ var c = R(r, this.clonePosition());
2727
2723
  return {
2728
- val: { type: F.literal, value: i, location: h },
2724
+ val: { type: U.literal, value: i, location: c },
2729
2725
  err: null
2730
2726
  };
2731
2727
  }, e.prototype.tryParseLeftAngleBracket = function() {
2732
2728
  return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
2733
- !Hi(this.peek() || 0)) ? (this.bump(), "<") : null;
2729
+ !Ci(this.peek() || 0)) ? (this.bump(), "<") : null;
2734
2730
  }, e.prototype.tryParseQuote = function(t) {
2735
2731
  if (this.isEOF() || this.char() !== 39)
2736
2732
  return null;
@@ -2750,63 +2746,63 @@ var Ci = (
2750
2746
  return null;
2751
2747
  }
2752
2748
  this.bump();
2753
- var r = [this.char()];
2749
+ var n = [this.char()];
2754
2750
  for (this.bump(); !this.isEOF(); ) {
2755
- var n = this.char();
2756
- if (n === 39)
2751
+ var r = this.char();
2752
+ if (r === 39)
2757
2753
  if (this.peek() === 39)
2758
- r.push(39), this.bump();
2754
+ n.push(39), this.bump();
2759
2755
  else {
2760
2756
  this.bump();
2761
2757
  break;
2762
2758
  }
2763
2759
  else
2764
- r.push(n);
2760
+ n.push(r);
2765
2761
  this.bump();
2766
2762
  }
2767
- return Xt.apply(void 0, r);
2768
- }, e.prototype.tryParseUnquoted = function(t, r) {
2763
+ return kt.apply(void 0, n);
2764
+ }, e.prototype.tryParseUnquoted = function(t, n) {
2769
2765
  if (this.isEOF())
2770
2766
  return null;
2771
- var n = this.char();
2772
- return n === 60 || n === 123 || n === 35 && (r === "plural" || r === "selectordinal") || n === 125 && t > 0 ? null : (this.bump(), Xt(n));
2773
- }, e.prototype.parseArgument = function(t, r) {
2774
- var n = this.clonePosition();
2767
+ var r = this.char();
2768
+ return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), kt(r));
2769
+ }, e.prototype.parseArgument = function(t, n) {
2770
+ var r = this.clonePosition();
2775
2771
  if (this.bump(), this.bumpSpace(), this.isEOF())
2776
- return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(n, this.clonePosition()));
2772
+ return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(r, this.clonePosition()));
2777
2773
  if (this.char() === 125)
2778
- return this.bump(), this.error(C.EMPTY_ARGUMENT, R(n, this.clonePosition()));
2774
+ return this.bump(), this.error(C.EMPTY_ARGUMENT, R(r, this.clonePosition()));
2779
2775
  var i = this.parseIdentifierIfPossible().value;
2780
2776
  if (!i)
2781
- return this.error(C.MALFORMED_ARGUMENT, R(n, this.clonePosition()));
2777
+ return this.error(C.MALFORMED_ARGUMENT, R(r, this.clonePosition()));
2782
2778
  if (this.bumpSpace(), this.isEOF())
2783
- return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(n, this.clonePosition()));
2779
+ return this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(r, this.clonePosition()));
2784
2780
  switch (this.char()) {
2785
2781
  case 125:
2786
2782
  return this.bump(), {
2787
2783
  val: {
2788
- type: F.argument,
2784
+ type: U.argument,
2789
2785
  // value does not include the opening and closing braces.
2790
2786
  value: i,
2791
- location: R(n, this.clonePosition())
2787
+ location: R(r, this.clonePosition())
2792
2788
  },
2793
2789
  err: null
2794
2790
  };
2795
2791
  case 44:
2796
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
2792
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(r, this.clonePosition())) : this.parseArgumentOptions(t, n, i, r);
2797
2793
  default:
2798
- return this.error(C.MALFORMED_ARGUMENT, R(n, this.clonePosition()));
2794
+ return this.error(C.MALFORMED_ARGUMENT, R(r, this.clonePosition()));
2799
2795
  }
2800
2796
  }, e.prototype.parseIdentifierIfPossible = function() {
2801
- var t = this.clonePosition(), r = this.offset(), n = zt(this.message, r), i = r + n.length;
2797
+ var t = this.clonePosition(), n = this.offset(), r = Vt(this.message, n), i = n + r.length;
2802
2798
  this.bumpTo(i);
2803
2799
  var o = this.clonePosition(), l = R(t, o);
2804
- return { value: n, location: l };
2805
- }, e.prototype.parseArgumentOptions = function(t, r, n, i) {
2806
- var o, l = this.clonePosition(), s = this.parseIdentifierIfPossible().value, h = this.clonePosition();
2807
- switch (s) {
2800
+ return { value: r, location: l };
2801
+ }, e.prototype.parseArgumentOptions = function(t, n, r, i) {
2802
+ var o, l = this.clonePosition(), a = this.parseIdentifierIfPossible().value, c = this.clonePosition();
2803
+ switch (a) {
2808
2804
  case "":
2809
- return this.error(C.EXPECT_ARGUMENT_TYPE, R(l, h));
2805
+ return this.error(C.EXPECT_ARGUMENT_TYPE, R(l, c));
2810
2806
  case "number":
2811
2807
  case "date":
2812
2808
  case "time": {
@@ -2814,49 +2810,49 @@ var Ci = (
2814
2810
  var u = null;
2815
2811
  if (this.bumpIf(",")) {
2816
2812
  this.bumpSpace();
2817
- var f = this.clonePosition(), m = this.parseSimpleArgStyleIfPossible();
2818
- if (m.err)
2819
- return m;
2820
- var p = Ai(m.val);
2821
- if (p.length === 0)
2813
+ var f = this.clonePosition(), g = this.parseSimpleArgStyleIfPossible();
2814
+ if (g.err)
2815
+ return g;
2816
+ var d = wi(g.val);
2817
+ if (d.length === 0)
2822
2818
  return this.error(C.EXPECT_ARGUMENT_STYLE, R(this.clonePosition(), this.clonePosition()));
2823
- var y = R(f, this.clonePosition());
2824
- u = { style: p, styleLocation: y };
2819
+ var x = R(f, this.clonePosition());
2820
+ u = { style: d, styleLocation: x };
2825
2821
  }
2826
- var E = this.tryParseArgumentClose(i);
2827
- if (E.err)
2828
- return E;
2829
- var N = R(i, this.clonePosition());
2830
- if (u && hr(u?.style, "::", 0)) {
2831
- var H = wi(u.style.slice(2));
2832
- if (s === "number") {
2833
- var m = this.parseNumberSkeletonFromString(H, u.styleLocation);
2834
- return m.err ? m : {
2835
- val: { type: F.number, value: n, location: N, style: m.val },
2822
+ var _ = this.tryParseArgumentClose(i);
2823
+ if (_.err)
2824
+ return _;
2825
+ var M = R(i, this.clonePosition());
2826
+ if (u && cn(u?.style, "::", 0)) {
2827
+ var H = Si(u.style.slice(2));
2828
+ if (a === "number") {
2829
+ var g = this.parseNumberSkeletonFromString(H, u.styleLocation);
2830
+ return g.err ? g : {
2831
+ val: { type: U.number, value: r, location: M, style: g.val },
2836
2832
  err: null
2837
2833
  };
2838
2834
  } else {
2839
2835
  if (H.length === 0)
2840
- return this.error(C.EXPECT_DATE_TIME_SKELETON, N);
2841
- var U = H;
2842
- this.locale && (U = di(H, this.locale));
2843
- var p = {
2836
+ return this.error(C.EXPECT_DATE_TIME_SKELETON, M);
2837
+ var G = H;
2838
+ this.locale && (G = fi(H, this.locale));
2839
+ var d = {
2844
2840
  type: Ge.dateTime,
2845
- pattern: U,
2841
+ pattern: G,
2846
2842
  location: u.styleLocation,
2847
- parsedOptions: this.shouldParseSkeletons ? ai(U) : {}
2848
- }, X = s === "date" ? F.date : F.time;
2843
+ parsedOptions: this.shouldParseSkeletons ? oi(G) : {}
2844
+ }, V = a === "date" ? U.date : U.time;
2849
2845
  return {
2850
- val: { type: X, value: n, location: N, style: p },
2846
+ val: { type: V, value: r, location: M, style: d },
2851
2847
  err: null
2852
2848
  };
2853
2849
  }
2854
2850
  }
2855
2851
  return {
2856
2852
  val: {
2857
- type: s === "number" ? F.number : s === "date" ? F.date : F.time,
2858
- value: n,
2859
- location: N,
2853
+ type: a === "number" ? U.number : a === "date" ? U.date : U.time,
2854
+ value: r,
2855
+ location: M,
2860
2856
  style: (o = u?.style) !== null && o !== void 0 ? o : null
2861
2857
  },
2862
2858
  err: null
@@ -2867,54 +2863,54 @@ var Ci = (
2867
2863
  case "select": {
2868
2864
  var T = this.clonePosition();
2869
2865
  if (this.bumpSpace(), !this.bumpIf(","))
2870
- return this.error(C.EXPECT_SELECT_ARGUMENT_OPTIONS, R(T, vt({}, T)));
2866
+ return this.error(C.EXPECT_SELECT_ARGUMENT_OPTIONS, R(T, N({}, T)));
2871
2867
  this.bumpSpace();
2872
- var S = this.parseIdentifierIfPossible(), G = 0;
2873
- if (s !== "select" && S.value === "offset") {
2868
+ var A = this.parseIdentifierIfPossible(), F = 0;
2869
+ if (a !== "select" && A.value === "offset") {
2874
2870
  if (!this.bumpIf(":"))
2875
2871
  return this.error(C.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, R(this.clonePosition(), this.clonePosition()));
2876
2872
  this.bumpSpace();
2877
- var m = this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, C.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2878
- if (m.err)
2879
- return m;
2880
- this.bumpSpace(), S = this.parseIdentifierIfPossible(), G = m.val;
2873
+ var g = this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, C.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2874
+ if (g.err)
2875
+ return g;
2876
+ this.bumpSpace(), A = this.parseIdentifierIfPossible(), F = g.val;
2881
2877
  }
2882
- var M = this.tryParsePluralOrSelectOptions(t, s, r, S);
2883
- if (M.err)
2884
- return M;
2885
- var E = this.tryParseArgumentClose(i);
2886
- if (E.err)
2887
- return E;
2888
- var J = R(i, this.clonePosition());
2889
- return s === "select" ? {
2878
+ var P = this.tryParsePluralOrSelectOptions(t, a, n, A);
2879
+ if (P.err)
2880
+ return P;
2881
+ var _ = this.tryParseArgumentClose(i);
2882
+ if (_.err)
2883
+ return _;
2884
+ var ee = R(i, this.clonePosition());
2885
+ return a === "select" ? {
2890
2886
  val: {
2891
- type: F.select,
2892
- value: n,
2893
- options: cr(M.val),
2894
- location: J
2887
+ type: U.select,
2888
+ value: r,
2889
+ options: fn(P.val),
2890
+ location: ee
2895
2891
  },
2896
2892
  err: null
2897
2893
  } : {
2898
2894
  val: {
2899
- type: F.plural,
2900
- value: n,
2901
- options: cr(M.val),
2902
- offset: G,
2903
- pluralType: s === "plural" ? "cardinal" : "ordinal",
2904
- location: J
2895
+ type: U.plural,
2896
+ value: r,
2897
+ options: fn(P.val),
2898
+ offset: F,
2899
+ pluralType: a === "plural" ? "cardinal" : "ordinal",
2900
+ location: ee
2905
2901
  },
2906
2902
  err: null
2907
2903
  };
2908
2904
  }
2909
2905
  default:
2910
- return this.error(C.INVALID_ARGUMENT_TYPE, R(l, h));
2906
+ return this.error(C.INVALID_ARGUMENT_TYPE, R(l, c));
2911
2907
  }
2912
2908
  }, e.prototype.tryParseArgumentClose = function(t) {
2913
2909
  return this.isEOF() || this.char() !== 125 ? this.error(C.EXPECT_ARGUMENT_CLOSING_BRACE, R(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
2914
2910
  }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2915
- for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
2916
- var n = this.char();
2917
- switch (n) {
2911
+ for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) {
2912
+ var r = this.char();
2913
+ switch (r) {
2918
2914
  case 39: {
2919
2915
  this.bump();
2920
2916
  var i = this.clonePosition();
@@ -2932,7 +2928,7 @@ var Ci = (
2932
2928
  t -= 1;
2933
2929
  else
2934
2930
  return {
2935
- val: this.message.slice(r.offset, this.offset()),
2931
+ val: this.message.slice(n.offset, this.offset()),
2936
2932
  err: null
2937
2933
  };
2938
2934
  break;
@@ -2943,70 +2939,70 @@ var Ci = (
2943
2939
  }
2944
2940
  }
2945
2941
  return {
2946
- val: this.message.slice(r.offset, this.offset()),
2942
+ val: this.message.slice(n.offset, this.offset()),
2947
2943
  err: null
2948
2944
  };
2949
- }, e.prototype.parseNumberSkeletonFromString = function(t, r) {
2950
- var n = [];
2945
+ }, e.prototype.parseNumberSkeletonFromString = function(t, n) {
2946
+ var r = [];
2951
2947
  try {
2952
- n = ui(t);
2948
+ r = si(t);
2953
2949
  } catch {
2954
- return this.error(C.INVALID_NUMBER_SKELETON, r);
2950
+ return this.error(C.INVALID_NUMBER_SKELETON, n);
2955
2951
  }
2956
2952
  return {
2957
2953
  val: {
2958
2954
  type: Ge.number,
2959
- tokens: n,
2960
- location: r,
2961
- parsedOptions: this.shouldParseSkeletons ? fi(n) : {}
2955
+ tokens: r,
2956
+ location: n,
2957
+ parsedOptions: this.shouldParseSkeletons ? ci(r) : {}
2962
2958
  },
2963
2959
  err: null
2964
2960
  };
2965
- }, e.prototype.tryParsePluralOrSelectOptions = function(t, r, n, i) {
2966
- for (var o, l = !1, s = [], h = /* @__PURE__ */ new Set(), u = i.value, f = i.location; ; ) {
2961
+ }, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) {
2962
+ for (var o, l = !1, a = [], c = /* @__PURE__ */ new Set(), u = i.value, f = i.location; ; ) {
2967
2963
  if (u.length === 0) {
2968
- var m = this.clonePosition();
2969
- if (r !== "select" && this.bumpIf("=")) {
2970
- var p = this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_SELECTOR, C.INVALID_PLURAL_ARGUMENT_SELECTOR);
2971
- if (p.err)
2972
- return p;
2973
- f = R(m, this.clonePosition()), u = this.message.slice(m.offset, this.offset());
2964
+ var g = this.clonePosition();
2965
+ if (n !== "select" && this.bumpIf("=")) {
2966
+ var d = this.tryParseDecimalInteger(C.EXPECT_PLURAL_ARGUMENT_SELECTOR, C.INVALID_PLURAL_ARGUMENT_SELECTOR);
2967
+ if (d.err)
2968
+ return d;
2969
+ f = R(g, this.clonePosition()), u = this.message.slice(g.offset, this.offset());
2974
2970
  } else
2975
2971
  break;
2976
2972
  }
2977
- if (h.has(u))
2978
- return this.error(r === "select" ? C.DUPLICATE_SELECT_ARGUMENT_SELECTOR : C.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f);
2973
+ if (c.has(u))
2974
+ return this.error(n === "select" ? C.DUPLICATE_SELECT_ARGUMENT_SELECTOR : C.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f);
2979
2975
  u === "other" && (l = !0), this.bumpSpace();
2980
- var y = this.clonePosition();
2976
+ var x = this.clonePosition();
2981
2977
  if (!this.bumpIf("{"))
2982
- return this.error(r === "select" ? C.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : C.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, R(this.clonePosition(), this.clonePosition()));
2983
- var E = this.parseMessage(t + 1, r, n);
2984
- if (E.err)
2985
- return E;
2986
- var N = this.tryParseArgumentClose(y);
2987
- if (N.err)
2988
- return N;
2989
- s.push([
2978
+ return this.error(n === "select" ? C.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : C.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, R(this.clonePosition(), this.clonePosition()));
2979
+ var _ = this.parseMessage(t + 1, n, r);
2980
+ if (_.err)
2981
+ return _;
2982
+ var M = this.tryParseArgumentClose(x);
2983
+ if (M.err)
2984
+ return M;
2985
+ a.push([
2990
2986
  u,
2991
2987
  {
2992
- value: E.val,
2993
- location: R(y, this.clonePosition())
2988
+ value: _.val,
2989
+ location: R(x, this.clonePosition())
2994
2990
  }
2995
- ]), h.add(u), this.bumpSpace(), o = this.parseIdentifierIfPossible(), u = o.value, f = o.location;
2991
+ ]), c.add(u), this.bumpSpace(), o = this.parseIdentifierIfPossible(), u = o.value, f = o.location;
2996
2992
  }
2997
- return s.length === 0 ? this.error(r === "select" ? C.EXPECT_SELECT_ARGUMENT_SELECTOR : C.EXPECT_PLURAL_ARGUMENT_SELECTOR, R(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !l ? this.error(C.MISSING_OTHER_CLAUSE, R(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
2998
- }, e.prototype.tryParseDecimalInteger = function(t, r) {
2999
- var n = 1, i = this.clonePosition();
3000
- this.bumpIf("+") || this.bumpIf("-") && (n = -1);
2993
+ return a.length === 0 ? this.error(n === "select" ? C.EXPECT_SELECT_ARGUMENT_SELECTOR : C.EXPECT_PLURAL_ARGUMENT_SELECTOR, R(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !l ? this.error(C.MISSING_OTHER_CLAUSE, R(this.clonePosition(), this.clonePosition())) : { val: a, err: null };
2994
+ }, e.prototype.tryParseDecimalInteger = function(t, n) {
2995
+ var r = 1, i = this.clonePosition();
2996
+ this.bumpIf("+") || this.bumpIf("-") && (r = -1);
3001
2997
  for (var o = !1, l = 0; !this.isEOF(); ) {
3002
- var s = this.char();
3003
- if (s >= 48 && s <= 57)
3004
- o = !0, l = l * 10 + (s - 48), this.bump();
2998
+ var a = this.char();
2999
+ if (a >= 48 && a <= 57)
3000
+ o = !0, l = l * 10 + (a - 48), this.bump();
3005
3001
  else
3006
3002
  break;
3007
3003
  }
3008
- var h = R(i, this.clonePosition());
3009
- return o ? (l *= n, Bi(l) ? { val: l, err: null } : this.error(r, h)) : this.error(t, h);
3004
+ var c = R(i, this.clonePosition());
3005
+ return o ? (l *= r, Ti(l) ? { val: l, err: null } : this.error(n, c)) : this.error(t, c);
3010
3006
  }, e.prototype.offset = function() {
3011
3007
  return this.position.offset;
3012
3008
  }, e.prototype.isEOF = function() {
@@ -3021,17 +3017,17 @@ var Ci = (
3021
3017
  var t = this.position.offset;
3022
3018
  if (t >= this.message.length)
3023
3019
  throw Error("out of bound");
3024
- var r = Xr(this.message, t);
3025
- if (r === void 0)
3020
+ var n = zn(this.message, t);
3021
+ if (n === void 0)
3026
3022
  throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3027
- return r;
3028
- }, e.prototype.error = function(t, r) {
3023
+ return n;
3024
+ }, e.prototype.error = function(t, n) {
3029
3025
  return {
3030
3026
  val: null,
3031
3027
  err: {
3032
3028
  kind: t,
3033
3029
  message: this.message,
3034
- location: r
3030
+ location: n
3035
3031
  }
3036
3032
  };
3037
3033
  }, e.prototype.bump = function() {
@@ -3040,320 +3036,320 @@ var Ci = (
3040
3036
  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);
3041
3037
  }
3042
3038
  }, e.prototype.bumpIf = function(t) {
3043
- if (hr(this.message, t, this.offset())) {
3044
- for (var r = 0; r < t.length; r++)
3039
+ if (cn(this.message, t, this.offset())) {
3040
+ for (var n = 0; n < t.length; n++)
3045
3041
  this.bump();
3046
3042
  return !0;
3047
3043
  }
3048
3044
  return !1;
3049
3045
  }, e.prototype.bumpUntil = function(t) {
3050
- var r = this.offset(), n = this.message.indexOf(t, r);
3051
- return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
3046
+ var n = this.offset(), r = this.message.indexOf(t, n);
3047
+ return r >= 0 ? (this.bumpTo(r), !0) : (this.bumpTo(this.message.length), !1);
3052
3048
  }, e.prototype.bumpTo = function(t) {
3053
3049
  if (this.offset() > t)
3054
3050
  throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
3055
3051
  for (t = Math.min(t, this.message.length); ; ) {
3056
- var r = this.offset();
3057
- if (r === t)
3052
+ var n = this.offset();
3053
+ if (n === t)
3058
3054
  break;
3059
- if (r > t)
3055
+ if (n > t)
3060
3056
  throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3061
3057
  if (this.bump(), this.isEOF())
3062
3058
  break;
3063
3059
  }
3064
3060
  }, e.prototype.bumpSpace = function() {
3065
- for (; !this.isEOF() && Wr(this.char()); )
3061
+ for (; !this.isEOF() && Zn(this.char()); )
3066
3062
  this.bump();
3067
3063
  }, e.prototype.peek = function() {
3068
3064
  if (this.isEOF())
3069
3065
  return null;
3070
- var t = this.char(), r = this.offset(), n = this.message.charCodeAt(r + (t >= 65536 ? 2 : 1));
3071
- return n ?? null;
3066
+ var t = this.char(), n = this.offset(), r = this.message.charCodeAt(n + (t >= 65536 ? 2 : 1));
3067
+ return r ?? null;
3072
3068
  }, e;
3073
3069
  }()
3074
3070
  );
3075
- function Wt(e) {
3071
+ function Xt(e) {
3076
3072
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
3077
3073
  }
3078
- function Hi(e) {
3079
- return Wt(e) || e === 47;
3074
+ function Ci(e) {
3075
+ return Xt(e) || e === 47;
3080
3076
  }
3081
- function Oi(e) {
3077
+ function Hi(e) {
3082
3078
  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;
3083
3079
  }
3084
- function Wr(e) {
3080
+ function Zn(e) {
3085
3081
  return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
3086
3082
  }
3087
- function Ri(e) {
3083
+ function Oi(e) {
3088
3084
  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;
3089
3085
  }
3090
- function Zt(e) {
3086
+ function zt(e) {
3091
3087
  e.forEach(function(t) {
3092
- if (delete t.location, Dr(t) || Fr(t))
3093
- for (var r in t.options)
3094
- delete t.options[r].location, Zt(t.options[r].value);
3088
+ if (delete t.location, Fn(t) || Un(t))
3089
+ for (var n in t.options)
3090
+ delete t.options[n].location, zt(t.options[n].value);
3095
3091
  else
3096
- Mr(t) && Gr(t.style) || (Pr(t) || Ir(t)) && kt(t.style) ? delete t.style.location : Ur(t) && Zt(t.children);
3092
+ Pn(t) && $n(t.style) || (In(t) || Dn(t)) && $t(t.style) ? delete t.style.location : Gn(t) && zt(t.children);
3097
3093
  });
3098
3094
  }
3099
- function Li(e, t) {
3100
- t === void 0 && (t = {}), t = vt({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
3101
- var r = new Ci(e, t).parse();
3102
- if (r.err) {
3103
- var n = SyntaxError(C[r.err.kind]);
3104
- throw n.location = r.err.location, n.originalMessage = r.err.message, n;
3095
+ function Ri(e, t) {
3096
+ t === void 0 && (t = {}), t = N({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
3097
+ var n = new Ai(e, t).parse();
3098
+ if (n.err) {
3099
+ var r = SyntaxError(C[n.err.kind]);
3100
+ throw r.location = n.err.location, r.originalMessage = n.err.message, r;
3105
3101
  }
3106
- return t?.captureLocation || Zt(r.val), r.val;
3102
+ return t?.captureLocation || zt(n.val), n.val;
3107
3103
  }
3108
3104
  var $e;
3109
3105
  (function(e) {
3110
3106
  e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
3111
3107
  })($e || ($e = {}));
3112
- var Bt = (
3108
+ var Et = (
3113
3109
  /** @class */
3114
3110
  function(e) {
3115
- Tt(t, e);
3116
- function t(r, n, i) {
3117
- var o = e.call(this, r) || this;
3118
- return o.code = n, o.originalMessage = i, o;
3111
+ vt(t, e);
3112
+ function t(n, r, i) {
3113
+ var o = e.call(this, n) || this;
3114
+ return o.code = r, o.originalMessage = i, o;
3119
3115
  }
3120
3116
  return t.prototype.toString = function() {
3121
3117
  return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3122
3118
  }, t;
3123
3119
  }(Error)
3124
- ), dr = (
3120
+ ), pn = (
3125
3121
  /** @class */
3126
3122
  function(e) {
3127
- Tt(t, e);
3128
- function t(r, n, i, o) {
3129
- return e.call(this, 'Invalid values for "'.concat(r, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), $e.INVALID_VALUE, o) || this;
3123
+ vt(t, e);
3124
+ function t(n, r, i, o) {
3125
+ return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), $e.INVALID_VALUE, o) || this;
3130
3126
  }
3131
3127
  return t;
3132
- }(Bt)
3133
- ), Ni = (
3128
+ }(Et)
3129
+ ), Li = (
3134
3130
  /** @class */
3135
3131
  function(e) {
3136
- Tt(t, e);
3137
- function t(r, n, i) {
3138
- return e.call(this, 'Value for "'.concat(r, '" must be of type ').concat(n), $e.INVALID_VALUE, i) || this;
3132
+ vt(t, e);
3133
+ function t(n, r, i) {
3134
+ return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), $e.INVALID_VALUE, i) || this;
3139
3135
  }
3140
3136
  return t;
3141
- }(Bt)
3142
- ), Mi = (
3137
+ }(Et)
3138
+ ), Ni = (
3143
3139
  /** @class */
3144
3140
  function(e) {
3145
- Tt(t, e);
3146
- function t(r, n) {
3147
- return e.call(this, 'The intl string context variable "'.concat(r, '" was not provided to the string "').concat(n, '"'), $e.MISSING_VALUE, n) || this;
3141
+ vt(t, e);
3142
+ function t(n, r) {
3143
+ return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), $e.MISSING_VALUE, r) || this;
3148
3144
  }
3149
3145
  return t;
3150
- }(Bt)
3151
- ), te;
3146
+ }(Et)
3147
+ ), K;
3152
3148
  (function(e) {
3153
3149
  e[e.literal = 0] = "literal", e[e.object = 1] = "object";
3154
- })(te || (te = {}));
3155
- function Pi(e) {
3156
- return e.length < 2 ? e : e.reduce(function(t, r) {
3157
- var n = t[t.length - 1];
3158
- return !n || n.type !== te.literal || r.type !== te.literal ? t.push(r) : n.value += r.value, t;
3150
+ })(K || (K = {}));
3151
+ function Mi(e) {
3152
+ return e.length < 2 ? e : e.reduce(function(t, n) {
3153
+ var r = t[t.length - 1];
3154
+ return !r || r.type !== K.literal || n.type !== K.literal ? t.push(n) : r.value += n.value, t;
3159
3155
  }, []);
3160
3156
  }
3161
- function Ii(e) {
3157
+ function Pi(e) {
3162
3158
  return typeof e == "function";
3163
3159
  }
3164
- function pt(e, t, r, n, i, o, l) {
3165
- if (e.length === 1 && ar(e[0]))
3160
+ function ct(e, t, n, r, i, o, l) {
3161
+ if (e.length === 1 && sn(e[0]))
3166
3162
  return [
3167
3163
  {
3168
- type: te.literal,
3164
+ type: K.literal,
3169
3165
  value: e[0].value
3170
3166
  }
3171
3167
  ];
3172
- for (var s = [], h = 0, u = e; h < u.length; h++) {
3173
- var f = u[h];
3174
- if (ar(f)) {
3175
- s.push({
3176
- type: te.literal,
3168
+ for (var a = [], c = 0, u = e; c < u.length; c++) {
3169
+ var f = u[c];
3170
+ if (sn(f)) {
3171
+ a.push({
3172
+ type: K.literal,
3177
3173
  value: f.value
3178
3174
  });
3179
3175
  continue;
3180
3176
  }
3181
- if (ii(f)) {
3182
- typeof o == "number" && s.push({
3183
- type: te.literal,
3184
- value: r.getNumberFormat(t).format(o)
3177
+ if (ri(f)) {
3178
+ typeof o == "number" && a.push({
3179
+ type: K.literal,
3180
+ value: n.getNumberFormat(t).format(o)
3185
3181
  });
3186
3182
  continue;
3187
3183
  }
3188
- var m = f.value;
3189
- if (!(i && m in i))
3190
- throw new Mi(m, l);
3191
- var p = i[m];
3184
+ var g = f.value;
3185
+ if (!(i && g in i))
3186
+ throw new Ni(g, l);
3187
+ var d = i[g];
3192
3188
  if (ni(f)) {
3193
- (!p || typeof p == "string" || typeof p == "number") && (p = typeof p == "string" || typeof p == "number" ? String(p) : ""), s.push({
3194
- type: typeof p == "string" ? te.literal : te.object,
3195
- value: p
3189
+ (!d || typeof d == "string" || typeof d == "number") && (d = typeof d == "string" || typeof d == "number" ? String(d) : ""), a.push({
3190
+ type: typeof d == "string" ? K.literal : K.object,
3191
+ value: d
3196
3192
  });
3197
3193
  continue;
3198
3194
  }
3199
- if (Pr(f)) {
3200
- var y = typeof f.style == "string" ? n.date[f.style] : kt(f.style) ? f.style.parsedOptions : void 0;
3201
- s.push({
3202
- type: te.literal,
3203
- value: r.getDateTimeFormat(t, y).format(p)
3195
+ if (In(f)) {
3196
+ var x = typeof f.style == "string" ? r.date[f.style] : $t(f.style) ? f.style.parsedOptions : void 0;
3197
+ a.push({
3198
+ type: K.literal,
3199
+ value: n.getDateTimeFormat(t, x).format(d)
3204
3200
  });
3205
3201
  continue;
3206
3202
  }
3207
- if (Ir(f)) {
3208
- var y = typeof f.style == "string" ? n.time[f.style] : kt(f.style) ? f.style.parsedOptions : n.time.medium;
3209
- s.push({
3210
- type: te.literal,
3211
- value: r.getDateTimeFormat(t, y).format(p)
3203
+ if (Dn(f)) {
3204
+ var x = typeof f.style == "string" ? r.time[f.style] : $t(f.style) ? f.style.parsedOptions : r.time.medium;
3205
+ a.push({
3206
+ type: K.literal,
3207
+ value: n.getDateTimeFormat(t, x).format(d)
3212
3208
  });
3213
3209
  continue;
3214
3210
  }
3215
- if (Mr(f)) {
3216
- var y = typeof f.style == "string" ? n.number[f.style] : Gr(f.style) ? f.style.parsedOptions : void 0;
3217
- y && y.scale && (p = p * (y.scale || 1)), s.push({
3218
- type: te.literal,
3219
- value: r.getNumberFormat(t, y).format(p)
3211
+ if (Pn(f)) {
3212
+ var x = typeof f.style == "string" ? r.number[f.style] : $n(f.style) ? f.style.parsedOptions : void 0;
3213
+ x && x.scale && (d = d * (x.scale || 1)), a.push({
3214
+ type: K.literal,
3215
+ value: n.getNumberFormat(t, x).format(d)
3220
3216
  });
3221
3217
  continue;
3222
3218
  }
3223
- if (Ur(f)) {
3224
- var E = f.children, N = f.value, H = i[N];
3225
- if (!Ii(H))
3226
- throw new Ni(N, "function", l);
3227
- var U = pt(E, t, r, n, i, o), X = H(U.map(function(G) {
3228
- return G.value;
3219
+ if (Gn(f)) {
3220
+ var _ = f.children, M = f.value, H = i[M];
3221
+ if (!Pi(H))
3222
+ throw new Li(M, "function", l);
3223
+ var G = ct(_, t, n, r, i, o), V = H(G.map(function(F) {
3224
+ return F.value;
3229
3225
  }));
3230
- Array.isArray(X) || (X = [X]), s.push.apply(s, X.map(function(G) {
3226
+ Array.isArray(V) || (V = [V]), a.push.apply(a, V.map(function(F) {
3231
3227
  return {
3232
- type: typeof G == "string" ? te.literal : te.object,
3233
- value: G
3228
+ type: typeof F == "string" ? K.literal : K.object,
3229
+ value: F
3234
3230
  };
3235
3231
  }));
3236
3232
  }
3237
- if (Dr(f)) {
3238
- var T = f.options[p] || f.options.other;
3233
+ if (Fn(f)) {
3234
+ var T = f.options[d] || f.options.other;
3239
3235
  if (!T)
3240
- throw new dr(f.value, p, Object.keys(f.options), l);
3241
- s.push.apply(s, pt(T.value, t, r, n, i));
3236
+ throw new pn(f.value, d, Object.keys(f.options), l);
3237
+ a.push.apply(a, ct(T.value, t, n, r, i));
3242
3238
  continue;
3243
3239
  }
3244
- if (Fr(f)) {
3245
- var T = f.options["=".concat(p)];
3240
+ if (Un(f)) {
3241
+ var T = f.options["=".concat(d)];
3246
3242
  if (!T) {
3247
3243
  if (!Intl.PluralRules)
3248
- throw new Bt(`Intl.PluralRules is not available in this environment.
3244
+ throw new Et(`Intl.PluralRules is not available in this environment.
3249
3245
  Try polyfilling it using "@formatjs/intl-pluralrules"
3250
3246
  `, $e.MISSING_INTL_API, l);
3251
- var S = r.getPluralRules(t, { type: f.pluralType }).select(p - (f.offset || 0));
3252
- T = f.options[S] || f.options.other;
3247
+ var A = n.getPluralRules(t, { type: f.pluralType }).select(d - (f.offset || 0));
3248
+ T = f.options[A] || f.options.other;
3253
3249
  }
3254
3250
  if (!T)
3255
- throw new dr(f.value, p, Object.keys(f.options), l);
3256
- s.push.apply(s, pt(T.value, t, r, n, i, p - (f.offset || 0)));
3251
+ throw new pn(f.value, d, Object.keys(f.options), l);
3252
+ a.push.apply(a, ct(T.value, t, n, r, i, d - (f.offset || 0)));
3257
3253
  continue;
3258
3254
  }
3259
3255
  }
3260
- return Pi(s);
3256
+ return Mi(a);
3261
3257
  }
3262
- function Di(e, t) {
3263
- return t ? ye(ye(ye({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
3264
- return r[n] = ye(ye({}, e[n]), t[n] || {}), r;
3258
+ function Ii(e, t) {
3259
+ return t ? N(N(N({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
3260
+ return n[r] = N(N({}, e[r]), t[r] || {}), n;
3265
3261
  }, {})) : e;
3266
3262
  }
3267
- function Fi(e, t) {
3268
- return t ? Object.keys(e).reduce(function(r, n) {
3269
- return r[n] = Di(e[n], t[n]), r;
3270
- }, ye({}, e)) : e;
3263
+ function Di(e, t) {
3264
+ return t ? Object.keys(e).reduce(function(n, r) {
3265
+ return n[r] = Ii(e[r], t[r]), n;
3266
+ }, N({}, e)) : e;
3271
3267
  }
3272
- function Dt(e) {
3268
+ function Pt(e) {
3273
3269
  return {
3274
3270
  create: function() {
3275
3271
  return {
3276
3272
  get: function(t) {
3277
3273
  return e[t];
3278
3274
  },
3279
- set: function(t, r) {
3280
- e[t] = r;
3275
+ set: function(t, n) {
3276
+ e[t] = n;
3281
3277
  }
3282
3278
  };
3283
3279
  }
3284
3280
  };
3285
3281
  }
3286
- function Ui(e) {
3282
+ function Fi(e) {
3287
3283
  return e === void 0 && (e = {
3288
3284
  number: {},
3289
3285
  dateTime: {},
3290
3286
  pluralRules: {}
3291
3287
  }), {
3292
- getNumberFormat: Mt(function() {
3293
- for (var t, r = [], n = 0; n < arguments.length; n++)
3294
- r[n] = arguments[n];
3295
- return new ((t = Intl.NumberFormat).bind.apply(t, Nt([void 0], r, !1)))();
3288
+ getNumberFormat: Lt(function() {
3289
+ for (var t, n = [], r = 0; r < arguments.length; r++)
3290
+ n[r] = arguments[r];
3291
+ return new ((t = Intl.NumberFormat).bind.apply(t, Rt([void 0], n, !1)))();
3296
3292
  }, {
3297
- cache: Dt(e.number),
3298
- strategy: Pt.variadic
3293
+ cache: Pt(e.number),
3294
+ strategy: Nt.variadic
3299
3295
  }),
3300
- getDateTimeFormat: Mt(function() {
3301
- for (var t, r = [], n = 0; n < arguments.length; n++)
3302
- r[n] = arguments[n];
3303
- return new ((t = Intl.DateTimeFormat).bind.apply(t, Nt([void 0], r, !1)))();
3296
+ getDateTimeFormat: Lt(function() {
3297
+ for (var t, n = [], r = 0; r < arguments.length; r++)
3298
+ n[r] = arguments[r];
3299
+ return new ((t = Intl.DateTimeFormat).bind.apply(t, Rt([void 0], n, !1)))();
3304
3300
  }, {
3305
- cache: Dt(e.dateTime),
3306
- strategy: Pt.variadic
3301
+ cache: Pt(e.dateTime),
3302
+ strategy: Nt.variadic
3307
3303
  }),
3308
- getPluralRules: Mt(function() {
3309
- for (var t, r = [], n = 0; n < arguments.length; n++)
3310
- r[n] = arguments[n];
3311
- return new ((t = Intl.PluralRules).bind.apply(t, Nt([void 0], r, !1)))();
3304
+ getPluralRules: Lt(function() {
3305
+ for (var t, n = [], r = 0; r < arguments.length; r++)
3306
+ n[r] = arguments[r];
3307
+ return new ((t = Intl.PluralRules).bind.apply(t, Rt([void 0], n, !1)))();
3312
3308
  }, {
3313
- cache: Dt(e.pluralRules),
3314
- strategy: Pt.variadic
3309
+ cache: Pt(e.pluralRules),
3310
+ strategy: Nt.variadic
3315
3311
  })
3316
3312
  };
3317
3313
  }
3318
- var Gi = (
3314
+ var Ui = (
3319
3315
  /** @class */
3320
3316
  function() {
3321
- function e(t, r, n, i) {
3322
- r === void 0 && (r = e.defaultLocale);
3317
+ function e(t, n, r, i) {
3318
+ n === void 0 && (n = e.defaultLocale);
3323
3319
  var o = this;
3324
3320
  if (this.formatterCache = {
3325
3321
  number: {},
3326
3322
  dateTime: {},
3327
3323
  pluralRules: {}
3328
- }, this.format = function(h) {
3329
- var u = o.formatToParts(h);
3324
+ }, this.format = function(c) {
3325
+ var u = o.formatToParts(c);
3330
3326
  if (u.length === 1)
3331
3327
  return u[0].value;
3332
- var f = u.reduce(function(m, p) {
3333
- return !m.length || p.type !== te.literal || typeof m[m.length - 1] != "string" ? m.push(p.value) : m[m.length - 1] += p.value, m;
3328
+ var f = u.reduce(function(g, d) {
3329
+ return !g.length || d.type !== K.literal || typeof g[g.length - 1] != "string" ? g.push(d.value) : g[g.length - 1] += d.value, g;
3334
3330
  }, []);
3335
3331
  return f.length <= 1 ? f[0] || "" : f;
3336
- }, this.formatToParts = function(h) {
3337
- return pt(o.ast, o.locales, o.formatters, o.formats, h, void 0, o.message);
3332
+ }, this.formatToParts = function(c) {
3333
+ return ct(o.ast, o.locales, o.formatters, o.formats, c, void 0, o.message);
3338
3334
  }, this.resolvedOptions = function() {
3339
- var h;
3335
+ var c;
3340
3336
  return {
3341
- locale: ((h = o.resolvedLocale) === null || h === void 0 ? void 0 : h.toString()) || Intl.NumberFormat.supportedLocalesOf(o.locales)[0]
3337
+ locale: ((c = o.resolvedLocale) === null || c === void 0 ? void 0 : c.toString()) || Intl.NumberFormat.supportedLocalesOf(o.locales)[0]
3342
3338
  };
3343
3339
  }, this.getAst = function() {
3344
3340
  return o.ast;
3345
- }, this.locales = r, this.resolvedLocale = e.resolveLocale(r), typeof t == "string") {
3341
+ }, this.locales = n, this.resolvedLocale = e.resolveLocale(n), typeof t == "string") {
3346
3342
  if (this.message = t, !e.__parse)
3347
3343
  throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3348
3344
  var l = i || {};
3349
3345
  l.formatters;
3350
- var s = qn(l, ["formatters"]);
3351
- this.ast = e.__parse(t, ye(ye({}, s), { locale: this.resolvedLocale }));
3346
+ var a = qr(l, ["formatters"]);
3347
+ this.ast = e.__parse(t, N(N({}, a), { locale: this.resolvedLocale }));
3352
3348
  } else
3353
3349
  this.ast = t;
3354
3350
  if (!Array.isArray(this.ast))
3355
3351
  throw new TypeError("A message must be provided as a String or AST.");
3356
- this.formats = Fi(e.formats, n), this.formatters = i && i.formatters || Ui(this.formatterCache);
3352
+ this.formats = Di(e.formats, r), this.formatters = i && i.formatters || Fi(this.formatterCache);
3357
3353
  }
3358
3354
  return Object.defineProperty(e, "defaultLocale", {
3359
3355
  get: function() {
@@ -3363,10 +3359,10 @@ var Gi = (
3363
3359
  configurable: !0
3364
3360
  }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
3365
3361
  if (!(typeof Intl.Locale > "u")) {
3366
- var r = Intl.NumberFormat.supportedLocalesOf(t);
3367
- return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
3362
+ var n = Intl.NumberFormat.supportedLocalesOf(t);
3363
+ return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
3368
3364
  }
3369
- }, e.__parse = Li, e.formats = {
3365
+ }, e.__parse = Ri, e.formats = {
3370
3366
  number: {
3371
3367
  integer: {
3372
3368
  maximumFractionDigits: 0
@@ -3427,113 +3423,113 @@ var Gi = (
3427
3423
  }, e;
3428
3424
  }()
3429
3425
  );
3430
- function $i(e, t) {
3426
+ function Gi(e, t) {
3431
3427
  if (t == null)
3432
3428
  return;
3433
3429
  if (t in e)
3434
3430
  return e[t];
3435
- const r = t.split(".");
3436
- let n = e;
3437
- for (let i = 0; i < r.length; i++)
3438
- if (typeof n == "object") {
3431
+ const n = t.split(".");
3432
+ let r = e;
3433
+ for (let i = 0; i < n.length; i++)
3434
+ if (typeof r == "object") {
3439
3435
  if (i > 0) {
3440
- const o = r.slice(i, r.length).join(".");
3441
- if (o in n) {
3442
- n = n[o];
3436
+ const o = n.slice(i, n.length).join(".");
3437
+ if (o in r) {
3438
+ r = r[o];
3443
3439
  break;
3444
3440
  }
3445
3441
  }
3446
- n = n[r[i]];
3442
+ r = r[n[i]];
3447
3443
  } else
3448
- n = void 0;
3449
- return n;
3444
+ r = void 0;
3445
+ return r;
3450
3446
  }
3451
- const Ce = {}, ji = (e, t, r) => r && (t in Ce || (Ce[t] = {}), e in Ce[t] || (Ce[t][e] = r), r), Zr = (e, t) => {
3447
+ const Ae = {}, $i = (e, t, n) => n && (t in Ae || (Ae[t] = {}), e in Ae[t] || (Ae[t][e] = n), n), qn = (e, t) => {
3452
3448
  if (t == null)
3453
3449
  return;
3454
- if (t in Ce && e in Ce[t])
3455
- return Ce[t][e];
3456
- const r = St(t);
3457
- for (let n = 0; n < r.length; n++) {
3458
- const i = r[n], o = Vi(i, e);
3450
+ if (t in Ae && e in Ae[t])
3451
+ return Ae[t][e];
3452
+ const n = xt(t);
3453
+ for (let r = 0; r < n.length; r++) {
3454
+ const i = n[r], o = ki(i, e);
3459
3455
  if (o)
3460
- return ji(e, t, o);
3456
+ return $i(e, t, o);
3461
3457
  }
3462
3458
  };
3463
3459
  let Kt;
3464
- const it = _t({});
3465
- function ki(e) {
3460
+ const ot = yt({});
3461
+ function ji(e) {
3466
3462
  return Kt[e] || null;
3467
3463
  }
3468
- function qr(e) {
3464
+ function Qn(e) {
3469
3465
  return e in Kt;
3470
3466
  }
3471
- function Vi(e, t) {
3472
- if (!qr(e))
3467
+ function ki(e, t) {
3468
+ if (!Qn(e))
3473
3469
  return null;
3474
- const r = ki(e);
3475
- return $i(r, t);
3470
+ const n = ji(e);
3471
+ return Gi(n, t);
3476
3472
  }
3477
- function Xi(e) {
3473
+ function Vi(e) {
3478
3474
  if (e == null)
3479
3475
  return;
3480
- const t = St(e);
3481
- for (let r = 0; r < t.length; r++) {
3482
- const n = t[r];
3483
- if (qr(n))
3484
- return n;
3476
+ const t = xt(e);
3477
+ for (let n = 0; n < t.length; n++) {
3478
+ const r = t[n];
3479
+ if (Qn(r))
3480
+ return r;
3485
3481
  }
3486
3482
  }
3487
- function Qr(e, ...t) {
3488
- delete Ce[e], it.update((r) => (r[e] = Zn.all([r[e] || {}, ...t]), r));
3483
+ function Jn(e, ...t) {
3484
+ delete Ae[e], ot.update((n) => (n[e] = Zr.all([n[e] || {}, ...t]), n));
3489
3485
  }
3490
3486
  Ve(
3491
- [it],
3487
+ [ot],
3492
3488
  ([e]) => Object.keys(e)
3493
3489
  );
3494
- it.subscribe((e) => Kt = e);
3495
- const mt = {};
3496
- function zi(e, t) {
3497
- mt[e].delete(t), mt[e].size === 0 && delete mt[e];
3498
- }
3499
- function Jr(e) {
3500
- return mt[e];
3501
- }
3502
- function Wi(e) {
3503
- return St(e).map((t) => {
3504
- const r = Jr(t);
3505
- return [t, r ? [...r] : []];
3490
+ ot.subscribe((e) => Kt = e);
3491
+ const ft = {};
3492
+ function Xi(e, t) {
3493
+ ft[e].delete(t), ft[e].size === 0 && delete ft[e];
3494
+ }
3495
+ function Yn(e) {
3496
+ return ft[e];
3497
+ }
3498
+ function zi(e) {
3499
+ return xt(e).map((t) => {
3500
+ const n = Yn(t);
3501
+ return [t, n ? [...n] : []];
3506
3502
  }).filter(([, t]) => t.length > 0);
3507
3503
  }
3508
- function qt(e) {
3509
- return e == null ? !1 : St(e).some(
3504
+ function Wt(e) {
3505
+ return e == null ? !1 : xt(e).some(
3510
3506
  (t) => {
3511
- var r;
3512
- return (r = Jr(t)) == null ? void 0 : r.size;
3507
+ var n;
3508
+ return (n = Yn(t)) == null ? void 0 : n.size;
3513
3509
  }
3514
3510
  );
3515
3511
  }
3516
- function Zi(e, t) {
3512
+ function Wi(e, t) {
3517
3513
  return Promise.all(
3518
- t.map((n) => (zi(e, n), n().then((i) => i.default || i)))
3519
- ).then((n) => Qr(e, ...n));
3520
- }
3521
- const Ke = {};
3522
- function Yr(e) {
3523
- if (!qt(e))
3524
- return e in Ke ? Ke[e] : Promise.resolve();
3525
- const t = Wi(e);
3526
- return Ke[e] = Promise.all(
3514
+ t.map((r) => (Xi(e, r), r().then((i) => i.default || i)))
3515
+ ).then((r) => Jn(e, ...r));
3516
+ }
3517
+ const et = {};
3518
+ function Kn(e) {
3519
+ if (!Wt(e))
3520
+ return e in et ? et[e] : Promise.resolve();
3521
+ const t = zi(e);
3522
+ return et[e] = Promise.all(
3527
3523
  t.map(
3528
- ([r, n]) => Zi(r, n)
3524
+ ([n, r]) => Wi(n, r)
3529
3525
  )
3530
3526
  ).then(() => {
3531
- if (qt(e))
3532
- return Yr(e);
3533
- delete Ke[e];
3534
- }), Ke[e];
3527
+ if (Wt(e))
3528
+ return Kn(e);
3529
+ delete et[e];
3530
+ }), et[e];
3535
3531
  }
3536
- const qi = {
3532
+ const Zi = {
3537
3533
  number: {
3538
3534
  scientific: { notation: "scientific" },
3539
3535
  engineering: { notation: "engineering" },
@@ -3562,178 +3558,178 @@ const qi = {
3562
3558
  timeZoneName: "short"
3563
3559
  }
3564
3560
  }
3565
- }, Qi = {
3561
+ }, qi = {
3566
3562
  fallbackLocale: null,
3567
3563
  loadingDelay: 200,
3568
- formats: qi,
3564
+ formats: Zi,
3569
3565
  warnOnMissingMessages: !0,
3570
3566
  handleMissingMessage: void 0,
3571
3567
  ignoreTag: !0
3572
- }, Ji = Qi;
3568
+ }, Qi = qi;
3573
3569
  function je() {
3574
- return Ji;
3575
- }
3576
- const Ft = _t(!1);
3577
- var Yi = Object.defineProperty, Ki = Object.defineProperties, eo = Object.getOwnPropertyDescriptors, pr = Object.getOwnPropertySymbols, to = Object.prototype.hasOwnProperty, ro = Object.prototype.propertyIsEnumerable, mr = (e, t, r) => t in e ? Yi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, no = (e, t) => {
3578
- for (var r in t || (t = {}))
3579
- to.call(t, r) && mr(e, r, t[r]);
3580
- if (pr)
3581
- for (var r of pr(t))
3582
- ro.call(t, r) && mr(e, r, t[r]);
3570
+ return Qi;
3571
+ }
3572
+ const It = yt(!1);
3573
+ var Ji = Object.defineProperty, Yi = Object.defineProperties, Ki = Object.getOwnPropertyDescriptors, mn = Object.getOwnPropertySymbols, eo = Object.prototype.hasOwnProperty, to = Object.prototype.propertyIsEnumerable, gn = (e, t, n) => t in e ? Ji(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, no = (e, t) => {
3574
+ for (var n in t || (t = {}))
3575
+ eo.call(t, n) && gn(e, n, t[n]);
3576
+ if (mn)
3577
+ for (var n of mn(t))
3578
+ to.call(t, n) && gn(e, n, t[n]);
3583
3579
  return e;
3584
- }, io = (e, t) => Ki(e, eo(t));
3585
- let Qt;
3586
- const Et = _t(null);
3587
- function gr(e) {
3588
- return e.split("-").map((t, r, n) => n.slice(0, r + 1).join("-")).reverse();
3580
+ }, ro = (e, t) => Yi(e, Ki(t));
3581
+ let Zt;
3582
+ const gt = yt(null);
3583
+ function bn(e) {
3584
+ return e.split("-").map((t, n, r) => r.slice(0, n + 1).join("-")).reverse();
3589
3585
  }
3590
- function St(e, t = je().fallbackLocale) {
3591
- const r = gr(e);
3592
- return t ? [.../* @__PURE__ */ new Set([...r, ...gr(t)])] : r;
3586
+ function xt(e, t = je().fallbackLocale) {
3587
+ const n = bn(e);
3588
+ return t ? [.../* @__PURE__ */ new Set([...n, ...bn(t)])] : n;
3593
3589
  }
3594
3590
  function Oe() {
3595
- return Qt ?? void 0;
3591
+ return Zt ?? void 0;
3596
3592
  }
3597
- Et.subscribe((e) => {
3598
- Qt = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
3593
+ gt.subscribe((e) => {
3594
+ Zt = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
3599
3595
  });
3600
- const oo = (e) => {
3601
- if (e && Xi(e) && qt(e)) {
3596
+ const io = (e) => {
3597
+ if (e && Vi(e) && Wt(e)) {
3602
3598
  const { loadingDelay: t } = je();
3603
- let r;
3604
- return typeof window < "u" && Oe() != null && t ? r = window.setTimeout(
3605
- () => Ft.set(!0),
3599
+ let n;
3600
+ return typeof window < "u" && Oe() != null && t ? n = window.setTimeout(
3601
+ () => It.set(!0),
3606
3602
  t
3607
- ) : Ft.set(!0), Yr(e).then(() => {
3608
- Et.set(e);
3603
+ ) : It.set(!0), Kn(e).then(() => {
3604
+ gt.set(e);
3609
3605
  }).finally(() => {
3610
- clearTimeout(r), Ft.set(!1);
3606
+ clearTimeout(n), It.set(!1);
3611
3607
  });
3612
3608
  }
3613
- return Et.set(e);
3614
- }, Xe = io(no({}, Et), {
3615
- set: oo
3616
- }), wt = (e) => {
3609
+ return gt.set(e);
3610
+ }, Xe = ro(no({}, gt), {
3611
+ set: io
3612
+ }), _t = (e) => {
3617
3613
  const t = /* @__PURE__ */ Object.create(null);
3618
- return (n) => {
3619
- const i = JSON.stringify(n);
3620
- return i in t ? t[i] : t[i] = e(n);
3614
+ return (r) => {
3615
+ const i = JSON.stringify(r);
3616
+ return i in t ? t[i] : t[i] = e(r);
3621
3617
  };
3622
3618
  };
3623
- var ao = Object.defineProperty, xt = Object.getOwnPropertySymbols, Kr = Object.prototype.hasOwnProperty, en = Object.prototype.propertyIsEnumerable, br = (e, t, r) => t in e ? ao(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, er = (e, t) => {
3624
- for (var r in t || (t = {}))
3625
- Kr.call(t, r) && br(e, r, t[r]);
3626
- if (xt)
3627
- for (var r of xt(t))
3628
- en.call(t, r) && br(e, r, t[r]);
3619
+ var oo = Object.defineProperty, bt = Object.getOwnPropertySymbols, er = Object.prototype.hasOwnProperty, tr = Object.prototype.propertyIsEnumerable, yn = (e, t, n) => t in e ? oo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, en = (e, t) => {
3620
+ for (var n in t || (t = {}))
3621
+ er.call(t, n) && yn(e, n, t[n]);
3622
+ if (bt)
3623
+ for (var n of bt(t))
3624
+ tr.call(t, n) && yn(e, n, t[n]);
3629
3625
  return e;
3630
3626
  }, ze = (e, t) => {
3631
- var r = {};
3632
- for (var n in e)
3633
- Kr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
3634
- if (e != null && xt)
3635
- for (var n of xt(e))
3636
- t.indexOf(n) < 0 && en.call(e, n) && (r[n] = e[n]);
3637
- return r;
3627
+ var n = {};
3628
+ for (var r in e)
3629
+ er.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
3630
+ if (e != null && bt)
3631
+ for (var r of bt(e))
3632
+ t.indexOf(r) < 0 && tr.call(e, r) && (n[r] = e[r]);
3633
+ return n;
3638
3634
  };
3639
- const nt = (e, t) => {
3640
- const { formats: r } = je();
3641
- if (e in r && t in r[e])
3642
- return r[e][t];
3635
+ const it = (e, t) => {
3636
+ const { formats: n } = je();
3637
+ if (e in n && t in n[e])
3638
+ return n[e][t];
3643
3639
  throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`);
3644
- }, so = wt(
3640
+ }, ao = _t(
3645
3641
  (e) => {
3646
- var t = e, { locale: r, format: n } = t, i = ze(t, ["locale", "format"]);
3647
- if (r == null)
3642
+ var t = e, { locale: n, format: r } = t, i = ze(t, ["locale", "format"]);
3643
+ if (n == null)
3648
3644
  throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
3649
- return n && (i = nt("number", n)), new Intl.NumberFormat(r, i);
3645
+ return r && (i = it("number", r)), new Intl.NumberFormat(n, i);
3650
3646
  }
3651
- ), uo = wt(
3647
+ ), so = _t(
3652
3648
  (e) => {
3653
- var t = e, { locale: r, format: n } = t, i = ze(t, ["locale", "format"]);
3654
- if (r == null)
3649
+ var t = e, { locale: n, format: r } = t, i = ze(t, ["locale", "format"]);
3650
+ if (n == null)
3655
3651
  throw new Error('[svelte-i18n] A "locale" must be set to format dates');
3656
- return n ? i = nt("date", n) : Object.keys(i).length === 0 && (i = nt("date", "short")), new Intl.DateTimeFormat(r, i);
3652
+ return r ? i = it("date", r) : Object.keys(i).length === 0 && (i = it("date", "short")), new Intl.DateTimeFormat(n, i);
3657
3653
  }
3658
- ), lo = wt(
3654
+ ), uo = _t(
3659
3655
  (e) => {
3660
- var t = e, { locale: r, format: n } = t, i = ze(t, ["locale", "format"]);
3661
- if (r == null)
3656
+ var t = e, { locale: n, format: r } = t, i = ze(t, ["locale", "format"]);
3657
+ if (n == null)
3662
3658
  throw new Error(
3663
3659
  '[svelte-i18n] A "locale" must be set to format time values'
3664
3660
  );
3665
- return n ? i = nt("time", n) : Object.keys(i).length === 0 && (i = nt("time", "short")), new Intl.DateTimeFormat(r, i);
3661
+ return r ? i = it("time", r) : Object.keys(i).length === 0 && (i = it("time", "short")), new Intl.DateTimeFormat(n, i);
3666
3662
  }
3667
- ), ho = (e = {}) => {
3663
+ ), lo = (e = {}) => {
3668
3664
  var t = e, {
3669
- locale: r = Oe()
3670
- } = t, n = ze(t, [
3665
+ locale: n = Oe()
3666
+ } = t, r = ze(t, [
3671
3667
  "locale"
3672
3668
  ]);
3673
- return so(er({ locale: r }, n));
3674
- }, co = (e = {}) => {
3669
+ return ao(en({ locale: n }, r));
3670
+ }, ho = (e = {}) => {
3675
3671
  var t = e, {
3676
- locale: r = Oe()
3677
- } = t, n = ze(t, [
3672
+ locale: n = Oe()
3673
+ } = t, r = ze(t, [
3678
3674
  "locale"
3679
3675
  ]);
3680
- return uo(er({ locale: r }, n));
3681
- }, fo = (e = {}) => {
3676
+ return so(en({ locale: n }, r));
3677
+ }, co = (e = {}) => {
3682
3678
  var t = e, {
3683
- locale: r = Oe()
3684
- } = t, n = ze(t, [
3679
+ locale: n = Oe()
3680
+ } = t, r = ze(t, [
3685
3681
  "locale"
3686
3682
  ]);
3687
- return lo(er({ locale: r }, n));
3688
- }, po = wt(
3683
+ return uo(en({ locale: n }, r));
3684
+ }, fo = _t(
3689
3685
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3690
- (e, t = Oe()) => new Gi(e, t, je().formats, {
3686
+ (e, t = Oe()) => new Ui(e, t, je().formats, {
3691
3687
  ignoreTag: je().ignoreTag
3692
3688
  })
3693
- ), mo = (e, t = {}) => {
3694
- var r, n, i, o;
3689
+ ), po = (e, t = {}) => {
3690
+ var n, r, i, o;
3695
3691
  let l = t;
3696
3692
  typeof e == "object" && (l = e, e = l.id);
3697
3693
  const {
3698
- values: s,
3699
- locale: h = Oe(),
3694
+ values: a,
3695
+ locale: c = Oe(),
3700
3696
  default: u
3701
3697
  } = l;
3702
- if (h == null)
3698
+ if (c == null)
3703
3699
  throw new Error(
3704
3700
  "[svelte-i18n] Cannot format a message without first setting the initial locale."
3705
3701
  );
3706
- let f = Zr(e, h);
3702
+ let f = qn(e, c);
3707
3703
  if (!f)
3708
- f = (o = (i = (n = (r = je()).handleMissingMessage) == null ? void 0 : n.call(r, { locale: h, id: e, defaultValue: u })) != null ? i : u) != null ? o : e;
3704
+ f = (o = (i = (r = (n = je()).handleMissingMessage) == null ? void 0 : r.call(n, { locale: c, id: e, defaultValue: u })) != null ? i : u) != null ? o : e;
3709
3705
  else if (typeof f != "string")
3710
3706
  return console.warn(
3711
3707
  `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
3712
3708
  ), f;
3713
- if (!s)
3709
+ if (!a)
3714
3710
  return f;
3715
- let m = f;
3711
+ let g = f;
3716
3712
  try {
3717
- m = po(f, h).format(s);
3718
- } catch (p) {
3719
- p instanceof Error && console.warn(
3713
+ g = fo(f, c).format(a);
3714
+ } catch (d) {
3715
+ d instanceof Error && console.warn(
3720
3716
  `[svelte-i18n] Message "${e}" has syntax error:`,
3721
- p.message
3717
+ d.message
3722
3718
  );
3723
3719
  }
3724
- return m;
3725
- }, go = (e, t) => fo(t).format(e), bo = (e, t) => co(t).format(e), yo = (e, t) => ho(t).format(e), vo = (e, t = Oe()) => Zr(e, t), Eo = Ve([Xe, it], () => mo);
3720
+ return g;
3721
+ }, mo = (e, t) => co(t).format(e), go = (e, t) => ho(t).format(e), bo = (e, t) => lo(t).format(e), yo = (e, t = Oe()) => qn(e, t), vo = Ve([Xe, ot], () => po);
3722
+ Ve([Xe], () => mo);
3726
3723
  Ve([Xe], () => go);
3727
3724
  Ve([Xe], () => bo);
3728
- Ve([Xe], () => yo);
3729
- Ve([Xe, it], () => vo);
3730
- function yr(e, t) {
3731
- Qr(e, t);
3725
+ Ve([Xe, ot], () => yo);
3726
+ function vn(e, t) {
3727
+ Jn(e, t);
3732
3728
  }
3733
- function xo(e) {
3729
+ function Eo(e) {
3734
3730
  Xe.set(e);
3735
3731
  }
3736
- const vr = {
3732
+ const En = {
3737
3733
  en: {
3738
3734
  Title: "Your Balance",
3739
3735
  Total: "Total Balance",
@@ -3933,43 +3929,43 @@ const vr = {
3933
3929
  Loading: "Loading ..."
3934
3930
  }
3935
3931
  };
3936
- var Jt = { exports: {} };
3932
+ var qt = { exports: {} };
3937
3933
  /** @license
3938
3934
  * eventsource.js
3939
3935
  * Available under MIT License (MIT)
3940
3936
  * https://github.com/Yaffle/EventSource/
3941
3937
  */
3942
3938
  (function(e, t) {
3943
- (function(r) {
3944
- var n = r.setTimeout, i = r.clearTimeout, o = r.XMLHttpRequest, l = r.XDomainRequest, s = r.ActiveXObject, h = r.EventSource, u = r.document, f = r.Promise, m = r.fetch, p = r.Response, y = r.TextDecoder, E = r.TextEncoder, N = r.AbortController;
3945
- if (typeof window < "u" && typeof u < "u" && !("readyState" in u) && u.body == null && (u.readyState = "loading", window.addEventListener("load", function(a) {
3939
+ (function(n) {
3940
+ var r = n.setTimeout, i = n.clearTimeout, o = n.XMLHttpRequest, l = n.XDomainRequest, a = n.ActiveXObject, c = n.EventSource, u = n.document, f = n.Promise, g = n.fetch, d = n.Response, x = n.TextDecoder, _ = n.TextEncoder, M = n.AbortController;
3941
+ if (typeof window < "u" && typeof u < "u" && !("readyState" in u) && u.body == null && (u.readyState = "loading", window.addEventListener("load", function(s) {
3946
3942
  u.readyState = "complete";
3947
- }, !1)), o == null && s != null && (o = function() {
3948
- return new s("Microsoft.XMLHTTP");
3949
- }), Object.create == null && (Object.create = function(a) {
3950
- function d() {
3943
+ }, !1)), o == null && a != null && (o = function() {
3944
+ return new a("Microsoft.XMLHTTP");
3945
+ }), Object.create == null && (Object.create = function(s) {
3946
+ function h() {
3951
3947
  }
3952
- return d.prototype = a, new d();
3948
+ return h.prototype = s, new h();
3953
3949
  }), Date.now || (Date.now = function() {
3954
3950
  return (/* @__PURE__ */ new Date()).getTime();
3955
- }), N == null) {
3956
- var H = m;
3957
- m = function(a, d) {
3958
- var b = d.signal;
3959
- return H(a, { headers: d.headers, credentials: d.credentials, cache: d.cache }).then(function(c) {
3960
- var _ = c.body.getReader();
3961
- return b._reader = _, b._aborted && b._reader.cancel(), {
3962
- status: c.status,
3963
- statusText: c.statusText,
3964
- headers: c.headers,
3951
+ }), M == null) {
3952
+ var H = g;
3953
+ g = function(s, h) {
3954
+ var m = h.signal;
3955
+ return H(s, { headers: h.headers, credentials: h.credentials, cache: h.cache }).then(function(p) {
3956
+ var y = p.body.getReader();
3957
+ return m._reader = y, m._aborted && m._reader.cancel(), {
3958
+ status: p.status,
3959
+ statusText: p.statusText,
3960
+ headers: p.headers,
3965
3961
  body: {
3966
3962
  getReader: function() {
3967
- return _;
3963
+ return y;
3968
3964
  }
3969
3965
  }
3970
3966
  };
3971
3967
  });
3972
- }, N = function() {
3968
+ }, M = function() {
3973
3969
  this.signal = {
3974
3970
  _reader: null,
3975
3971
  _aborted: !1
@@ -3978,11 +3974,11 @@ var Jt = { exports: {} };
3978
3974
  };
3979
3975
  };
3980
3976
  }
3981
- function U() {
3977
+ function G() {
3982
3978
  this.bitsNeeded = 0, this.codePoint = 0;
3983
3979
  }
3984
- U.prototype.decode = function(a) {
3985
- function d(I, D, B) {
3980
+ G.prototype.decode = function(s) {
3981
+ function h(I, D, B) {
3986
3982
  if (B === 1)
3987
3983
  return I >= 128 >> D && I << D <= 2047;
3988
3984
  if (B === 2)
@@ -3991,7 +3987,7 @@ var Jt = { exports: {} };
3991
3987
  return I >= 65536 >> D && I << D <= 1114111;
3992
3988
  throw new Error();
3993
3989
  }
3994
- function b(I, D) {
3990
+ function m(I, D) {
3995
3991
  if (I === 6 * 1)
3996
3992
  return D >> 6 > 15 ? 3 : D > 31 ? 2 : 1;
3997
3993
  if (I === 6 * 2)
@@ -4000,385 +3996,385 @@ var Jt = { exports: {} };
4000
3996
  return 3;
4001
3997
  throw new Error();
4002
3998
  }
4003
- for (var c = 65533, _ = "", x = this.bitsNeeded, w = this.codePoint, $ = 0; $ < a.length; $ += 1) {
4004
- var O = a[$];
4005
- x !== 0 && (O < 128 || O > 191 || !d(w << 6 | O & 63, x - 6, b(x, w))) && (x = 0, w = c, _ += String.fromCharCode(w)), x === 0 ? (O >= 0 && O <= 127 ? (x = 0, w = O) : O >= 192 && O <= 223 ? (x = 6 * 1, w = O & 31) : O >= 224 && O <= 239 ? (x = 6 * 2, w = O & 15) : O >= 240 && O <= 247 ? (x = 6 * 3, w = O & 7) : (x = 0, w = c), x !== 0 && !d(w, x, b(x, w)) && (x = 0, w = c)) : (x -= 6, w = w << 6 | O & 63), x === 0 && (w <= 65535 ? _ += String.fromCharCode(w) : (_ += String.fromCharCode(55296 + (w - 65535 - 1 >> 10)), _ += String.fromCharCode(56320 + (w - 65535 - 1 & 1023))));
3999
+ for (var p = 65533, y = "", E = this.bitsNeeded, S = this.codePoint, $ = 0; $ < s.length; $ += 1) {
4000
+ var O = s[$];
4001
+ E !== 0 && (O < 128 || O > 191 || !h(S << 6 | O & 63, E - 6, m(E, S))) && (E = 0, S = p, y += String.fromCharCode(S)), E === 0 ? (O >= 0 && O <= 127 ? (E = 0, S = O) : O >= 192 && O <= 223 ? (E = 6 * 1, S = O & 31) : O >= 224 && O <= 239 ? (E = 6 * 2, S = O & 15) : O >= 240 && O <= 247 ? (E = 6 * 3, S = O & 7) : (E = 0, S = p), E !== 0 && !h(S, E, m(E, S)) && (E = 0, S = p)) : (E -= 6, S = S << 6 | O & 63), E === 0 && (S <= 65535 ? y += String.fromCharCode(S) : (y += String.fromCharCode(55296 + (S - 65535 - 1 >> 10)), y += String.fromCharCode(56320 + (S - 65535 - 1 & 1023))));
4006
4002
  }
4007
- return this.bitsNeeded = x, this.codePoint = w, _;
4003
+ return this.bitsNeeded = E, this.codePoint = S, y;
4008
4004
  };
4009
- var X = function() {
4005
+ var V = function() {
4010
4006
  try {
4011
- return new y().decode(new E().encode("test"), { stream: !0 }) === "test";
4012
- } catch (a) {
4013
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + a);
4007
+ return new x().decode(new _().encode("test"), { stream: !0 }) === "test";
4008
+ } catch (s) {
4009
+ console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + s);
4014
4010
  }
4015
4011
  return !1;
4016
4012
  };
4017
- (y == null || E == null || !X()) && (y = U);
4013
+ (x == null || _ == null || !V()) && (x = G);
4018
4014
  var T = function() {
4019
4015
  };
4020
- function S(a) {
4021
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = T, this.onload = T, this.onerror = T, this.onreadystatechange = T, this._contentType = "", this._xhr = a, this._sendTimeout = 0, this._abort = T;
4016
+ function A(s) {
4017
+ this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = T, this.onload = T, this.onerror = T, this.onreadystatechange = T, this._contentType = "", this._xhr = s, this._sendTimeout = 0, this._abort = T;
4022
4018
  }
4023
- S.prototype.open = function(a, d) {
4019
+ A.prototype.open = function(s, h) {
4024
4020
  this._abort(!0);
4025
- var b = this, c = this._xhr, _ = 1, x = 0;
4021
+ var m = this, p = this._xhr, y = 1, E = 0;
4026
4022
  this._abort = function(B) {
4027
- b._sendTimeout !== 0 && (i(b._sendTimeout), b._sendTimeout = 0), (_ === 1 || _ === 2 || _ === 3) && (_ = 4, c.onload = T, c.onerror = T, c.onabort = T, c.onprogress = T, c.onreadystatechange = T, c.abort(), x !== 0 && (i(x), x = 0), B || (b.readyState = 4, b.onabort(null), b.onreadystatechange())), _ = 0;
4023
+ m._sendTimeout !== 0 && (i(m._sendTimeout), m._sendTimeout = 0), (y === 1 || y === 2 || y === 3) && (y = 4, p.onload = T, p.onerror = T, p.onabort = T, p.onprogress = T, p.onreadystatechange = T, p.abort(), E !== 0 && (i(E), E = 0), B || (m.readyState = 4, m.onabort(null), m.onreadystatechange())), y = 0;
4028
4024
  };
4029
- var w = function() {
4030
- if (_ === 1) {
4031
- var B = 0, j = "", Ee = void 0;
4032
- if ("contentType" in c)
4033
- B = 200, j = "OK", Ee = c.contentType;
4025
+ var S = function() {
4026
+ if (y === 1) {
4027
+ var B = 0, j = "", be = void 0;
4028
+ if ("contentType" in p)
4029
+ B = 200, j = "OK", be = p.contentType;
4034
4030
  else
4035
4031
  try {
4036
- B = c.status, j = c.statusText, Ee = c.getResponseHeader("Content-Type");
4032
+ B = p.status, j = p.statusText, be = p.getResponseHeader("Content-Type");
4037
4033
  } catch {
4038
- B = 0, j = "", Ee = void 0;
4034
+ B = 0, j = "", be = void 0;
4039
4035
  }
4040
- B !== 0 && (_ = 2, b.readyState = 2, b.status = B, b.statusText = j, b._contentType = Ee, b.onreadystatechange());
4036
+ B !== 0 && (y = 2, m.readyState = 2, m.status = B, m.statusText = j, m._contentType = be, m.onreadystatechange());
4041
4037
  }
4042
4038
  }, $ = function() {
4043
- if (w(), _ === 2 || _ === 3) {
4044
- _ = 3;
4039
+ if (S(), y === 2 || y === 3) {
4040
+ y = 3;
4045
4041
  var B = "";
4046
4042
  try {
4047
- B = c.responseText;
4043
+ B = p.responseText;
4048
4044
  } catch {
4049
4045
  }
4050
- b.readyState = 3, b.responseText = B, b.onprogress();
4046
+ m.readyState = 3, m.responseText = B, m.onprogress();
4051
4047
  }
4052
4048
  }, O = function(B, j) {
4053
4049
  if ((j == null || j.preventDefault == null) && (j = {
4054
4050
  preventDefault: T
4055
- }), $(), _ === 1 || _ === 2 || _ === 3) {
4056
- if (_ = 4, x !== 0 && (i(x), x = 0), b.readyState = 4, B === "load")
4057
- b.onload(j);
4051
+ }), $(), y === 1 || y === 2 || y === 3) {
4052
+ if (y = 4, E !== 0 && (i(E), E = 0), m.readyState = 4, B === "load")
4053
+ m.onload(j);
4058
4054
  else if (B === "error")
4059
- b.onerror(j);
4055
+ m.onerror(j);
4060
4056
  else if (B === "abort")
4061
- b.onabort(j);
4057
+ m.onabort(j);
4062
4058
  else
4063
4059
  throw new TypeError();
4064
- b.onreadystatechange();
4060
+ m.onreadystatechange();
4065
4061
  }
4066
4062
  }, I = function(B) {
4067
- c != null && (c.readyState === 4 ? (!("onload" in c) || !("onerror" in c) || !("onabort" in c)) && O(c.responseText === "" ? "error" : "load", B) : c.readyState === 3 ? "onprogress" in c || $() : c.readyState === 2 && w());
4063
+ p != null && (p.readyState === 4 ? (!("onload" in p) || !("onerror" in p) || !("onabort" in p)) && O(p.responseText === "" ? "error" : "load", B) : p.readyState === 3 ? "onprogress" in p || $() : p.readyState === 2 && S());
4068
4064
  }, D = function() {
4069
- x = n(function() {
4065
+ E = r(function() {
4070
4066
  D();
4071
- }, 500), c.readyState === 3 && $();
4067
+ }, 500), p.readyState === 3 && $();
4072
4068
  };
4073
- "onload" in c && (c.onload = function(B) {
4069
+ "onload" in p && (p.onload = function(B) {
4074
4070
  O("load", B);
4075
- }), "onerror" in c && (c.onerror = function(B) {
4071
+ }), "onerror" in p && (p.onerror = function(B) {
4076
4072
  O("error", B);
4077
- }), "onabort" in c && (c.onabort = function(B) {
4073
+ }), "onabort" in p && (p.onabort = function(B) {
4078
4074
  O("abort", B);
4079
- }), "onprogress" in c && (c.onprogress = $), "onreadystatechange" in c && (c.onreadystatechange = function(B) {
4075
+ }), "onprogress" in p && (p.onprogress = $), "onreadystatechange" in p && (p.onreadystatechange = function(B) {
4080
4076
  I(B);
4081
- }), ("contentType" in c || !("ontimeout" in o.prototype)) && (d += (d.indexOf("?") === -1 ? "?" : "&") + "padding=true"), c.open(a, d, !0), "readyState" in c && (x = n(function() {
4077
+ }), ("contentType" in p || !("ontimeout" in o.prototype)) && (h += (h.indexOf("?") === -1 ? "?" : "&") + "padding=true"), p.open(s, h, !0), "readyState" in p && (E = r(function() {
4082
4078
  D();
4083
4079
  }, 0));
4084
- }, S.prototype.abort = function() {
4080
+ }, A.prototype.abort = function() {
4085
4081
  this._abort(!1);
4086
- }, S.prototype.getResponseHeader = function(a) {
4082
+ }, A.prototype.getResponseHeader = function(s) {
4087
4083
  return this._contentType;
4088
- }, S.prototype.setRequestHeader = function(a, d) {
4089
- var b = this._xhr;
4090
- "setRequestHeader" in b && b.setRequestHeader(a, d);
4091
- }, S.prototype.getAllResponseHeaders = function() {
4084
+ }, A.prototype.setRequestHeader = function(s, h) {
4085
+ var m = this._xhr;
4086
+ "setRequestHeader" in m && m.setRequestHeader(s, h);
4087
+ }, A.prototype.getAllResponseHeaders = function() {
4092
4088
  return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
4093
- }, S.prototype.send = function() {
4089
+ }, A.prototype.send = function() {
4094
4090
  if ((!("ontimeout" in o.prototype) || !("sendAsBinary" in o.prototype) && !("mozAnon" in o.prototype)) && u != null && u.readyState != null && u.readyState !== "complete") {
4095
- var a = this;
4096
- a._sendTimeout = n(function() {
4097
- a._sendTimeout = 0, a.send();
4091
+ var s = this;
4092
+ s._sendTimeout = r(function() {
4093
+ s._sendTimeout = 0, s.send();
4098
4094
  }, 4);
4099
4095
  return;
4100
4096
  }
4101
- var d = this._xhr;
4102
- "withCredentials" in d && (d.withCredentials = this.withCredentials);
4097
+ var h = this._xhr;
4098
+ "withCredentials" in h && (h.withCredentials = this.withCredentials);
4103
4099
  try {
4104
- d.send(void 0);
4105
- } catch (b) {
4106
- throw b;
4100
+ h.send(void 0);
4101
+ } catch (m) {
4102
+ throw m;
4107
4103
  }
4108
4104
  };
4109
- function G(a) {
4110
- return a.replace(/[A-Z]/g, function(d) {
4111
- return String.fromCharCode(d.charCodeAt(0) + 32);
4105
+ function F(s) {
4106
+ return s.replace(/[A-Z]/g, function(h) {
4107
+ return String.fromCharCode(h.charCodeAt(0) + 32);
4112
4108
  });
4113
4109
  }
4114
- function M(a) {
4115
- for (var d = /* @__PURE__ */ Object.create(null), b = a.split(`\r
4116
- `), c = 0; c < b.length; c += 1) {
4117
- var _ = b[c], x = _.split(": "), w = x.shift(), $ = x.join(": ");
4118
- d[G(w)] = $;
4110
+ function P(s) {
4111
+ for (var h = /* @__PURE__ */ Object.create(null), m = s.split(`\r
4112
+ `), p = 0; p < m.length; p += 1) {
4113
+ var y = m[p], E = y.split(": "), S = E.shift(), $ = E.join(": ");
4114
+ h[F(S)] = $;
4119
4115
  }
4120
- this._map = d;
4116
+ this._map = h;
4121
4117
  }
4122
- M.prototype.get = function(a) {
4123
- return this._map[G(a)];
4118
+ P.prototype.get = function(s) {
4119
+ return this._map[F(s)];
4124
4120
  }, o != null && o.HEADERS_RECEIVED == null && (o.HEADERS_RECEIVED = 2);
4125
- function J() {
4121
+ function ee() {
4126
4122
  }
4127
- J.prototype.open = function(a, d, b, c, _, x, w) {
4128
- a.open("GET", _);
4123
+ ee.prototype.open = function(s, h, m, p, y, E, S) {
4124
+ s.open("GET", y);
4129
4125
  var $ = 0;
4130
- a.onprogress = function() {
4131
- var I = a.responseText, D = I.slice($);
4132
- $ += D.length, b(D);
4133
- }, a.onerror = function(I) {
4134
- I.preventDefault(), c(new Error("NetworkError"));
4135
- }, a.onload = function() {
4136
- c(null);
4137
- }, a.onabort = function() {
4138
- c(null);
4139
- }, a.onreadystatechange = function() {
4140
- if (a.readyState === o.HEADERS_RECEIVED) {
4141
- var I = a.status, D = a.statusText, B = a.getResponseHeader("Content-Type"), j = a.getAllResponseHeaders();
4142
- d(I, D, B, new M(j));
4126
+ s.onprogress = function() {
4127
+ var I = s.responseText, D = I.slice($);
4128
+ $ += D.length, m(D);
4129
+ }, s.onerror = function(I) {
4130
+ I.preventDefault(), p(new Error("NetworkError"));
4131
+ }, s.onload = function() {
4132
+ p(null);
4133
+ }, s.onabort = function() {
4134
+ p(null);
4135
+ }, s.onreadystatechange = function() {
4136
+ if (s.readyState === o.HEADERS_RECEIVED) {
4137
+ var I = s.status, D = s.statusText, B = s.getResponseHeader("Content-Type"), j = s.getAllResponseHeaders();
4138
+ h(I, D, B, new P(j));
4143
4139
  }
4144
- }, a.withCredentials = x;
4145
- for (var O in w)
4146
- Object.prototype.hasOwnProperty.call(w, O) && a.setRequestHeader(O, w[O]);
4147
- return a.send(), a;
4140
+ }, s.withCredentials = E;
4141
+ for (var O in S)
4142
+ Object.prototype.hasOwnProperty.call(S, O) && s.setRequestHeader(O, S[O]);
4143
+ return s.send(), s;
4148
4144
  };
4149
- function Se(a) {
4150
- this._headers = a;
4145
+ function me(s) {
4146
+ this._headers = s;
4151
4147
  }
4152
- Se.prototype.get = function(a) {
4153
- return this._headers.get(a);
4148
+ me.prototype.get = function(s) {
4149
+ return this._headers.get(s);
4154
4150
  };
4155
- function le() {
4151
+ function _e() {
4156
4152
  }
4157
- le.prototype.open = function(a, d, b, c, _, x, w) {
4158
- var $ = null, O = new N(), I = O.signal, D = new y();
4159
- return m(_, {
4160
- headers: w,
4161
- credentials: x ? "include" : "same-origin",
4153
+ _e.prototype.open = function(s, h, m, p, y, E, S) {
4154
+ var $ = null, O = new M(), I = O.signal, D = new x();
4155
+ return g(y, {
4156
+ headers: S,
4157
+ credentials: E ? "include" : "same-origin",
4162
4158
  signal: I,
4163
4159
  cache: "no-store"
4164
4160
  }).then(function(B) {
4165
- return $ = B.body.getReader(), d(B.status, B.statusText, B.headers.get("Content-Type"), new Se(B.headers)), new f(function(j, Ee) {
4166
- var Je = function() {
4167
- $.read().then(function(ne) {
4168
- if (ne.done)
4161
+ return $ = B.body.getReader(), h(B.status, B.statusText, B.headers.get("Content-Type"), new me(B.headers)), new f(function(j, be) {
4162
+ var Ye = function() {
4163
+ $.read().then(function(re) {
4164
+ if (re.done)
4169
4165
  j(void 0);
4170
4166
  else {
4171
- var Y = D.decode(ne.value, { stream: !0 });
4172
- b(Y), Je();
4167
+ var Q = D.decode(re.value, { stream: !0 });
4168
+ m(Q), Ye();
4173
4169
  }
4174
- }).catch(function(ne) {
4175
- Ee(ne);
4170
+ }).catch(function(re) {
4171
+ be(re);
4176
4172
  });
4177
4173
  };
4178
- Je();
4174
+ Ye();
4179
4175
  });
4180
4176
  }).catch(function(B) {
4181
4177
  if (B.name !== "AbortError")
4182
4178
  return B;
4183
4179
  }).then(function(B) {
4184
- c(B);
4180
+ p(B);
4185
4181
  }), {
4186
4182
  abort: function() {
4187
4183
  $?.cancel(), O.abort();
4188
4184
  }
4189
4185
  };
4190
4186
  };
4191
- function he() {
4187
+ function te() {
4192
4188
  this._listeners = /* @__PURE__ */ Object.create(null);
4193
4189
  }
4194
- function v(a) {
4195
- n(function() {
4196
- throw a;
4190
+ function Te(s) {
4191
+ r(function() {
4192
+ throw s;
4197
4193
  }, 0);
4198
4194
  }
4199
- he.prototype.dispatchEvent = function(a) {
4200
- a.target = this;
4201
- var d = this._listeners[a.type];
4202
- if (d != null)
4203
- for (var b = d.length, c = 0; c < b; c += 1) {
4204
- var _ = d[c];
4195
+ te.prototype.dispatchEvent = function(s) {
4196
+ s.target = this;
4197
+ var h = this._listeners[s.type];
4198
+ if (h != null)
4199
+ for (var m = h.length, p = 0; p < m; p += 1) {
4200
+ var y = h[p];
4205
4201
  try {
4206
- typeof _.handleEvent == "function" ? _.handleEvent(a) : _.call(this, a);
4207
- } catch (x) {
4208
- v(x);
4202
+ typeof y.handleEvent == "function" ? y.handleEvent(s) : y.call(this, s);
4203
+ } catch (E) {
4204
+ Te(E);
4209
4205
  }
4210
4206
  }
4211
- }, he.prototype.addEventListener = function(a, d) {
4212
- a = String(a);
4213
- var b = this._listeners, c = b[a];
4214
- c == null && (c = [], b[a] = c);
4215
- for (var _ = !1, x = 0; x < c.length; x += 1)
4216
- c[x] === d && (_ = !0);
4217
- _ || c.push(d);
4218
- }, he.prototype.removeEventListener = function(a, d) {
4219
- a = String(a);
4220
- var b = this._listeners, c = b[a];
4221
- if (c != null) {
4222
- for (var _ = [], x = 0; x < c.length; x += 1)
4223
- c[x] !== d && _.push(c[x]);
4224
- _.length === 0 ? delete b[a] : b[a] = _;
4207
+ }, te.prototype.addEventListener = function(s, h) {
4208
+ s = String(s);
4209
+ var m = this._listeners, p = m[s];
4210
+ p == null && (p = [], m[s] = p);
4211
+ for (var y = !1, E = 0; E < p.length; E += 1)
4212
+ p[E] === h && (y = !0);
4213
+ y || p.push(h);
4214
+ }, te.prototype.removeEventListener = function(s, h) {
4215
+ s = String(s);
4216
+ var m = this._listeners, p = m[s];
4217
+ if (p != null) {
4218
+ for (var y = [], E = 0; E < p.length; E += 1)
4219
+ p[E] !== h && y.push(p[E]);
4220
+ y.length === 0 ? delete m[s] : m[s] = y;
4225
4221
  }
4226
4222
  };
4227
- function ae(a) {
4228
- this.type = a, this.target = void 0;
4223
+ function v(s) {
4224
+ this.type = s, this.target = void 0;
4229
4225
  }
4230
- function ot(a, d) {
4231
- ae.call(this, a), this.data = d.data, this.lastEventId = d.lastEventId;
4226
+ function Be(s, h) {
4227
+ v.call(this, s), this.data = h.data, this.lastEventId = h.lastEventId;
4232
4228
  }
4233
- ot.prototype = Object.create(ae.prototype);
4234
- function Re(a, d) {
4235
- ae.call(this, a), this.status = d.status, this.statusText = d.statusText, this.headers = d.headers;
4229
+ Be.prototype = Object.create(v.prototype);
4230
+ function We(s, h) {
4231
+ v.call(this, s), this.status = h.status, this.statusText = h.statusText, this.headers = h.headers;
4236
4232
  }
4237
- Re.prototype = Object.create(ae.prototype);
4238
- function at(a, d) {
4239
- ae.call(this, a), this.error = d.error;
4233
+ We.prototype = Object.create(v.prototype);
4234
+ function Ze(s, h) {
4235
+ v.call(this, s), this.error = h.error;
4240
4236
  }
4241
- at.prototype = Object.create(ae.prototype);
4242
- var We = -1, ge = 0, be = 1, we = 2, Ze = -1, se = 0, Le = 1, st = 2, ut = 3, At = /^text\/event\-stream(;.*)?$/i, Ct = 1e3, lt = 18e6, qe = function(a, d) {
4243
- var b = a == null ? d : parseInt(a, 10);
4244
- return b !== b && (b = d), Qe(b);
4245
- }, Qe = function(a) {
4246
- return Math.min(Math.max(a, Ct), lt);
4247
- }, Ae = function(a, d, b) {
4237
+ Ze.prototype = Object.create(v.prototype);
4238
+ var qe = -1, fe = 0, Se = 1, ge = 2, Re = -1, de = 0, Ce = 1, Qe = 2, Tt = 3, at = /^text\/event\-stream(;.*)?$/i, Bt = 1e3, St = 18e6, Le = function(s, h) {
4239
+ var m = s == null ? h : parseInt(s, 10);
4240
+ return m !== m && (m = h), Je(m);
4241
+ }, Je = function(s) {
4242
+ return Math.min(Math.max(s, Bt), St);
4243
+ }, we = function(s, h, m) {
4248
4244
  try {
4249
- typeof d == "function" && d.call(a, b);
4250
- } catch (c) {
4251
- v(c);
4245
+ typeof h == "function" && h.call(s, m);
4246
+ } catch (p) {
4247
+ Te(p);
4252
4248
  }
4253
4249
  };
4254
- function re(a, d) {
4255
- he.call(this), d = d || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, A(this, a, d);
4250
+ function ne(s, h) {
4251
+ te.call(this), h = h || {}, this.onopen = void 0, this.onmessage = void 0, this.onerror = void 0, this.url = void 0, this.readyState = void 0, this.withCredentials = void 0, this.headers = void 0, this._close = void 0, b(this, s, h);
4256
4252
  }
4257
- function Ht() {
4253
+ function wt() {
4258
4254
  return o != null && "withCredentials" in o.prototype || l == null ? new o() : new l();
4259
4255
  }
4260
- var g = m != null && p != null && "body" in p.prototype;
4261
- function A(a, d, b) {
4262
- d = String(d);
4263
- var c = !!b.withCredentials, _ = b.lastEventIdQueryParameterName || "lastEventId", x = Qe(1e3), w = qe(b.heartbeatTimeout, 45e3), $ = "", O = x, I = !1, D = 0, B = b.headers || {}, j = b.Transport, Ee = g && j == null ? void 0 : new S(j != null ? new j() : Ht()), Je = j != null && typeof j != "string" ? new j() : Ee == null ? new le() : new J(), ne = void 0, Y = 0, ce = We, Ne = "", ht = "", xe = "", ct = "", K = se, Ot = 0, He = 0, rn = function(W, z, ie, oe) {
4264
- if (ce === ge)
4265
- if (W === 200 && ie != null && At.test(ie)) {
4266
- ce = be, I = Date.now(), O = x, a.readyState = be;
4267
- var ee = new Re("open", {
4268
- status: W,
4269
- statusText: z,
4256
+ var At = g != null && d != null && "body" in d.prototype;
4257
+ function b(s, h, m) {
4258
+ h = String(h);
4259
+ var p = !!m.withCredentials, y = m.lastEventIdQueryParameterName || "lastEventId", E = Je(1e3), S = Le(m.heartbeatTimeout, 45e3), $ = "", O = E, I = !1, D = 0, B = m.headers || {}, j = m.Transport, be = At && j == null ? void 0 : new A(j != null ? new j() : wt()), Ye = j != null && typeof j != "string" ? new j() : be == null ? new _e() : new ee(), re = void 0, Q = 0, se = qe, Ne = "", st = "", ye = "", ut = "", J = de, Ct = 0, He = 0, rr = function(z, X, ie, oe) {
4260
+ if (se === fe)
4261
+ if (z === 200 && ie != null && at.test(ie)) {
4262
+ se = Se, I = Date.now(), O = E, s.readyState = Se;
4263
+ var Y = new We("open", {
4264
+ status: z,
4265
+ statusText: X,
4270
4266
  headers: oe
4271
4267
  });
4272
- a.dispatchEvent(ee), Ae(a, a.onopen, ee);
4268
+ s.dispatchEvent(Y), we(s, s.onopen, Y);
4273
4269
  } else {
4274
- var q = "";
4275
- W !== 200 ? (z && (z = z.replace(/\s+/g, " ")), q = "EventSource's response has a status " + W + " " + z + " that is not 200. Aborting the connection.") : q = "EventSource's response has a Content-Type specifying an unsupported type: " + (ie == null ? "-" : ie.replace(/\s+/g, " ")) + ". Aborting the connection.", Rt();
4276
- var ee = new Re("error", {
4277
- status: W,
4278
- statusText: z,
4270
+ var Z = "";
4271
+ z !== 200 ? (X && (X = X.replace(/\s+/g, " ")), Z = "EventSource's response has a status " + z + " " + X + " that is not 200. Aborting the connection.") : Z = "EventSource's response has a Content-Type specifying an unsupported type: " + (ie == null ? "-" : ie.replace(/\s+/g, " ")) + ". Aborting the connection.", Ht();
4272
+ var Y = new We("error", {
4273
+ status: z,
4274
+ statusText: X,
4279
4275
  headers: oe
4280
4276
  });
4281
- a.dispatchEvent(ee), Ae(a, a.onerror, ee), console.error(q);
4277
+ s.dispatchEvent(Y), we(s, s.onerror, Y), console.error(Z);
4282
4278
  }
4283
- }, nn = function(W) {
4284
- if (ce === be) {
4285
- for (var z = -1, ie = 0; ie < W.length; ie += 1) {
4286
- var oe = W.charCodeAt(ie);
4287
- (oe === 10 || oe === 13) && (z = ie);
4279
+ }, ir = function(z) {
4280
+ if (se === Se) {
4281
+ for (var X = -1, ie = 0; ie < z.length; ie += 1) {
4282
+ var oe = z.charCodeAt(ie);
4283
+ (oe === 10 || oe === 13) && (X = ie);
4288
4284
  }
4289
- var ee = (z !== -1 ? ct : "") + W.slice(0, z + 1);
4290
- ct = (z === -1 ? ct : "") + W.slice(z + 1), W !== "" && (I = Date.now(), D += W.length);
4291
- for (var q = 0; q < ee.length; q += 1) {
4292
- var oe = ee.charCodeAt(q);
4293
- if (K === Ze && oe === 10)
4294
- K = se;
4295
- else if (K === Ze && (K = se), oe === 13 || oe === 10) {
4296
- if (K !== se) {
4297
- K === Le && (He = q + 1);
4298
- var _e = ee.slice(Ot, He - 1), Te = ee.slice(He + (He < q && ee.charCodeAt(He) === 32 ? 1 : 0), q);
4299
- _e === "data" ? (Ne += `
4300
- `, Ne += Te) : _e === "id" ? ht = Te : _e === "event" ? xe = Te : _e === "retry" ? (x = qe(Te, x), O = x) : _e === "heartbeatTimeout" && (w = qe(Te, w), Y !== 0 && (i(Y), Y = n(function() {
4301
- Ye();
4302
- }, w)));
4285
+ var Y = (X !== -1 ? ut : "") + z.slice(0, X + 1);
4286
+ ut = (X === -1 ? ut : "") + z.slice(X + 1), z !== "" && (I = Date.now(), D += z.length);
4287
+ for (var Z = 0; Z < Y.length; Z += 1) {
4288
+ var oe = Y.charCodeAt(Z);
4289
+ if (J === Re && oe === 10)
4290
+ J = de;
4291
+ else if (J === Re && (J = de), oe === 13 || oe === 10) {
4292
+ if (J !== de) {
4293
+ J === Ce && (He = Z + 1);
4294
+ var ve = Y.slice(Ct, He - 1), Ee = Y.slice(He + (He < Z && Y.charCodeAt(He) === 32 ? 1 : 0), Z);
4295
+ ve === "data" ? (Ne += `
4296
+ `, Ne += Ee) : ve === "id" ? st = Ee : ve === "event" ? ye = Ee : ve === "retry" ? (E = Le(Ee, E), O = E) : ve === "heartbeatTimeout" && (S = Le(Ee, S), Q !== 0 && (i(Q), Q = r(function() {
4297
+ Ke();
4298
+ }, S)));
4303
4299
  }
4304
- if (K === se) {
4300
+ if (J === de) {
4305
4301
  if (Ne !== "") {
4306
- $ = ht, xe === "" && (xe = "message");
4307
- var Me = new ot(xe, {
4302
+ $ = st, ye === "" && (ye = "message");
4303
+ var Me = new Be(ye, {
4308
4304
  data: Ne.slice(1),
4309
- lastEventId: ht
4305
+ lastEventId: st
4310
4306
  });
4311
- if (a.dispatchEvent(Me), xe === "open" ? Ae(a, a.onopen, Me) : xe === "message" ? Ae(a, a.onmessage, Me) : xe === "error" && Ae(a, a.onerror, Me), ce === we)
4307
+ if (s.dispatchEvent(Me), ye === "open" ? we(s, s.onopen, Me) : ye === "message" ? we(s, s.onmessage, Me) : ye === "error" && we(s, s.onerror, Me), se === ge)
4312
4308
  return;
4313
4309
  }
4314
- Ne = "", xe = "";
4310
+ Ne = "", ye = "";
4315
4311
  }
4316
- K = oe === 13 ? Ze : se;
4312
+ J = oe === 13 ? Re : de;
4317
4313
  } else
4318
- K === se && (Ot = q, K = Le), K === Le ? oe === 58 && (He = q + 1, K = st) : K === st && (K = ut);
4314
+ J === de && (Ct = Z, J = Ce), J === Ce ? oe === 58 && (He = Z + 1, J = Qe) : J === Qe && (J = Tt);
4319
4315
  }
4320
4316
  }
4321
- }, rr = function(W) {
4322
- if (ce === be || ce === ge) {
4323
- ce = We, Y !== 0 && (i(Y), Y = 0), Y = n(function() {
4324
- Ye();
4325
- }, O), O = Qe(Math.min(x * 16, O * 2)), a.readyState = ge;
4326
- var z = new at("error", { error: W });
4327
- a.dispatchEvent(z), Ae(a, a.onerror, z), W != null && console.error(W);
4317
+ }, nn = function(z) {
4318
+ if (se === Se || se === fe) {
4319
+ se = qe, Q !== 0 && (i(Q), Q = 0), Q = r(function() {
4320
+ Ke();
4321
+ }, O), O = Je(Math.min(E * 16, O * 2)), s.readyState = fe;
4322
+ var X = new Ze("error", { error: z });
4323
+ s.dispatchEvent(X), we(s, s.onerror, X), z != null && console.error(z);
4328
4324
  }
4329
- }, Rt = function() {
4330
- ce = we, ne != null && (ne.abort(), ne = void 0), Y !== 0 && (i(Y), Y = 0), a.readyState = we;
4331
- }, Ye = function() {
4332
- if (Y = 0, ce !== We) {
4333
- if (!I && ne != null)
4334
- rr(new Error("No activity within " + w + " milliseconds. " + (ce === ge ? "No response received." : D + " chars received.") + " Reconnecting.")), ne != null && (ne.abort(), ne = void 0);
4325
+ }, Ht = function() {
4326
+ se = ge, re != null && (re.abort(), re = void 0), Q !== 0 && (i(Q), Q = 0), s.readyState = ge;
4327
+ }, Ke = function() {
4328
+ if (Q = 0, se !== qe) {
4329
+ if (!I && re != null)
4330
+ nn(new Error("No activity within " + S + " milliseconds. " + (se === fe ? "No response received." : D + " chars received.") + " Reconnecting.")), re != null && (re.abort(), re = void 0);
4335
4331
  else {
4336
- var W = Math.max((I || Date.now()) + w - Date.now(), 1);
4337
- I = !1, Y = n(function() {
4338
- Ye();
4339
- }, W);
4332
+ var z = Math.max((I || Date.now()) + S - Date.now(), 1);
4333
+ I = !1, Q = r(function() {
4334
+ Ke();
4335
+ }, z);
4340
4336
  }
4341
4337
  return;
4342
4338
  }
4343
- I = !1, D = 0, Y = n(function() {
4344
- Ye();
4345
- }, w), ce = ge, Ne = "", xe = "", ht = $, ct = "", Ot = 0, He = 0, K = se;
4346
- var z = d;
4347
- if (d.slice(0, 5) !== "data:" && d.slice(0, 5) !== "blob:" && $ !== "") {
4348
- var ie = d.indexOf("?");
4349
- z = ie === -1 ? d : d.slice(0, ie + 1) + d.slice(ie + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(Te, Me) {
4350
- return Me === _ ? "" : Te;
4351
- }), z += (d.indexOf("?") === -1 ? "?" : "&") + _ + "=" + encodeURIComponent($);
4339
+ I = !1, D = 0, Q = r(function() {
4340
+ Ke();
4341
+ }, S), se = fe, Ne = "", ye = "", st = $, ut = "", Ct = 0, He = 0, J = de;
4342
+ var X = h;
4343
+ if (h.slice(0, 5) !== "data:" && h.slice(0, 5) !== "blob:" && $ !== "") {
4344
+ var ie = h.indexOf("?");
4345
+ X = ie === -1 ? h : h.slice(0, ie + 1) + h.slice(ie + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(Ee, Me) {
4346
+ return Me === y ? "" : Ee;
4347
+ }), X += (h.indexOf("?") === -1 ? "?" : "&") + y + "=" + encodeURIComponent($);
4352
4348
  }
4353
- var oe = a.withCredentials, ee = {};
4354
- ee.Accept = "text/event-stream";
4355
- var q = a.headers;
4356
- if (q != null)
4357
- for (var _e in q)
4358
- Object.prototype.hasOwnProperty.call(q, _e) && (ee[_e] = q[_e]);
4349
+ var oe = s.withCredentials, Y = {};
4350
+ Y.Accept = "text/event-stream";
4351
+ var Z = s.headers;
4352
+ if (Z != null)
4353
+ for (var ve in Z)
4354
+ Object.prototype.hasOwnProperty.call(Z, ve) && (Y[ve] = Z[ve]);
4359
4355
  try {
4360
- ne = Je.open(Ee, rn, nn, rr, z, oe, ee);
4361
- } catch (Te) {
4362
- throw Rt(), Te;
4356
+ re = Ye.open(be, rr, ir, nn, X, oe, Y);
4357
+ } catch (Ee) {
4358
+ throw Ht(), Ee;
4363
4359
  }
4364
4360
  };
4365
- a.url = d, a.readyState = ge, a.withCredentials = c, a.headers = B, a._close = Rt, Ye();
4361
+ s.url = h, s.readyState = fe, s.withCredentials = p, s.headers = B, s._close = Ht, Ke();
4366
4362
  }
4367
- re.prototype = Object.create(he.prototype), re.prototype.CONNECTING = ge, re.prototype.OPEN = be, re.prototype.CLOSED = we, re.prototype.close = function() {
4363
+ ne.prototype = Object.create(te.prototype), ne.prototype.CONNECTING = fe, ne.prototype.OPEN = Se, ne.prototype.CLOSED = ge, ne.prototype.close = function() {
4368
4364
  this._close();
4369
- }, re.CONNECTING = ge, re.OPEN = be, re.CLOSED = we, re.prototype.withCredentials = void 0;
4370
- var P = h;
4371
- o != null && (h == null || !("withCredentials" in h.prototype)) && (P = re), function(a) {
4365
+ }, ne.CONNECTING = fe, ne.OPEN = Se, ne.CLOSED = ge, ne.prototype.withCredentials = void 0;
4366
+ var w = c;
4367
+ o != null && (c == null || !("withCredentials" in c.prototype)) && (w = ne), function(s) {
4372
4368
  {
4373
- var d = a(t);
4374
- d !== void 0 && (e.exports = d);
4369
+ var h = s(t);
4370
+ h !== void 0 && (e.exports = h);
4375
4371
  }
4376
- }(function(a) {
4377
- a.EventSourcePolyfill = re, a.NativeEventSource = h, a.EventSource = P;
4372
+ }(function(s) {
4373
+ s.EventSourcePolyfill = ne, s.NativeEventSource = c, s.EventSource = w;
4378
4374
  });
4379
- })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : Ln : globalThis);
4380
- })(Jt, Jt.exports);
4381
- var _o = Jt.exports;
4375
+ })(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : Lr : globalThis);
4376
+ })(qt, qt.exports);
4377
+ var xo = qt.exports;
4382
4378
  /*!
4383
4379
  * currency.js - v2.0.4
4384
4380
  * http://scurker.github.io/currency.js
@@ -4386,7 +4382,7 @@ var _o = Jt.exports;
4386
4382
  * Copyright (c) 2021 Jason Wilson
4387
4383
  * Released under MIT license
4388
4384
  */
4389
- var To = {
4385
+ var _o = {
4390
4386
  symbol: "$",
4391
4387
  separator: ",",
4392
4388
  decimal: ".",
@@ -4394,51 +4390,51 @@ var To = {
4394
4390
  precision: 2,
4395
4391
  pattern: "!#",
4396
4392
  negativePattern: "-!#",
4397
- format: Ao,
4393
+ format: wo,
4398
4394
  fromCents: !1
4399
- }, tn = function(t) {
4395
+ }, nr = function(t) {
4400
4396
  return Math.round(t);
4401
- }, tr = function(t) {
4397
+ }, tn = function(t) {
4402
4398
  return Math.pow(10, t);
4403
- }, Bo = function(t, r) {
4404
- return tn(t / r) * r;
4405
- }, So = /(\d)(?=(\d{3})+\b)/g, wo = /(\d)(?=(\d\d)+\d\b)/g;
4406
- function fe(e, t) {
4407
- var r = this;
4408
- if (!(r instanceof fe))
4409
- return new fe(e, t);
4410
- var n = Object.assign({}, To, t), i = tr(n.precision), o = gt(e, n);
4411
- r.intValue = o, r.value = o / i, n.increment = n.increment || 1 / i, n.useVedic ? n.groups = wo : n.groups = So, this.s = n, this.p = i;
4412
- }
4413
- function gt(e, t) {
4414
- var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, n = 0, i = t.decimal, o = t.errorOnInvalid, l = t.precision, s = t.fromCents, h = tr(l), u = typeof e == "number", f = e instanceof fe;
4415
- if (f && s)
4399
+ }, To = function(t, n) {
4400
+ return nr(t / n) * n;
4401
+ }, Bo = /(\d)(?=(\d{3})+\b)/g, So = /(\d)(?=(\d\d)+\d\b)/g;
4402
+ function ue(e, t) {
4403
+ var n = this;
4404
+ if (!(n instanceof ue))
4405
+ return new ue(e, t);
4406
+ var r = Object.assign({}, _o, t), i = tn(r.precision), o = dt(e, r);
4407
+ n.intValue = o, n.value = o / i, r.increment = r.increment || 1 / i, r.useVedic ? r.groups = So : r.groups = Bo, this.s = r, this.p = i;
4408
+ }
4409
+ function dt(e, t) {
4410
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = 0, i = t.decimal, o = t.errorOnInvalid, l = t.precision, a = t.fromCents, c = tn(l), u = typeof e == "number", f = e instanceof ue;
4411
+ if (f && a)
4416
4412
  return e.intValue;
4417
4413
  if (u || f)
4418
- n = f ? e.value : e;
4414
+ r = f ? e.value : e;
4419
4415
  else if (typeof e == "string") {
4420
- var m = new RegExp("[^-\\d" + i + "]", "g"), p = new RegExp("\\" + i, "g");
4421
- n = e.replace(/\((.*)\)/, "-$1").replace(m, "").replace(p, "."), n = n || 0;
4416
+ var g = new RegExp("[^-\\d" + i + "]", "g"), d = new RegExp("\\" + i, "g");
4417
+ r = e.replace(/\((.*)\)/, "-$1").replace(g, "").replace(d, "."), r = r || 0;
4422
4418
  } else {
4423
4419
  if (o)
4424
4420
  throw Error("Invalid Input");
4425
- n = 0;
4421
+ r = 0;
4426
4422
  }
4427
- return s || (n *= h, n = n.toFixed(4)), r ? tn(n) : n;
4423
+ return a || (r *= c, r = r.toFixed(4)), n ? nr(r) : r;
4428
4424
  }
4429
- function Ao(e, t) {
4430
- var r = t.pattern, n = t.negativePattern, i = t.symbol, o = t.separator, l = t.decimal, s = t.groups, h = ("" + e).replace(/^-/, "").split("."), u = h[0], f = h[1];
4431
- return (e.value >= 0 ? r : n).replace("!", i).replace("#", u.replace(s, "$1" + o) + (f ? l + f : ""));
4425
+ function wo(e, t) {
4426
+ var n = t.pattern, r = t.negativePattern, i = t.symbol, o = t.separator, l = t.decimal, a = t.groups, c = ("" + e).replace(/^-/, "").split("."), u = c[0], f = c[1];
4427
+ return (e.value >= 0 ? n : r).replace("!", i).replace("#", u.replace(a, "$1" + o) + (f ? l + f : ""));
4432
4428
  }
4433
- fe.prototype = {
4429
+ ue.prototype = {
4434
4430
  /**
4435
4431
  * Adds values together.
4436
4432
  * @param {number} number
4437
4433
  * @returns {currency}
4438
4434
  */
4439
4435
  add: function(t) {
4440
- var r = this.intValue, n = this.s, i = this.p;
4441
- return fe((r += gt(t, n)) / (n.fromCents ? 1 : i), n);
4436
+ var n = this.intValue, r = this.s, i = this.p;
4437
+ return ue((n += dt(t, r)) / (r.fromCents ? 1 : i), r);
4442
4438
  },
4443
4439
  /**
4444
4440
  * Subtracts value.
@@ -4446,8 +4442,8 @@ fe.prototype = {
4446
4442
  * @returns {currency}
4447
4443
  */
4448
4444
  subtract: function(t) {
4449
- var r = this.intValue, n = this.s, i = this.p;
4450
- return fe((r -= gt(t, n)) / (n.fromCents ? 1 : i), n);
4445
+ var n = this.intValue, r = this.s, i = this.p;
4446
+ return ue((n -= dt(t, r)) / (r.fromCents ? 1 : i), r);
4451
4447
  },
4452
4448
  /**
4453
4449
  * Multiplies values.
@@ -4455,8 +4451,8 @@ fe.prototype = {
4455
4451
  * @returns {currency}
4456
4452
  */
4457
4453
  multiply: function(t) {
4458
- var r = this.intValue, n = this.s;
4459
- return fe((r *= t) / (n.fromCents ? 1 : tr(n.precision)), n);
4454
+ var n = this.intValue, r = this.s;
4455
+ return ue((n *= t) / (r.fromCents ? 1 : tn(r.precision)), r);
4460
4456
  },
4461
4457
  /**
4462
4458
  * Divides value.
@@ -4464,8 +4460,8 @@ fe.prototype = {
4464
4460
  * @returns {currency}
4465
4461
  */
4466
4462
  divide: function(t) {
4467
- var r = this.intValue, n = this.s;
4468
- return fe(r /= gt(t, n, !1), n);
4463
+ var n = this.intValue, r = this.s;
4464
+ return ue(n /= dt(t, r, !1), r);
4469
4465
  },
4470
4466
  /**
4471
4467
  * Takes the currency amount and distributes the values evenly. Any extra pennies
@@ -4474,9 +4470,9 @@ fe.prototype = {
4474
4470
  * @returns {array}
4475
4471
  */
4476
4472
  distribute: function(t) {
4477
- for (var r = this.intValue, n = this.p, i = this.s, o = [], l = Math[r >= 0 ? "floor" : "ceil"](r / t), s = Math.abs(r - l * t), h = i.fromCents ? 1 : n; t !== 0; t--) {
4478
- var u = fe(l / h, i);
4479
- s-- > 0 && (u = u[r >= 0 ? "add" : "subtract"](1 / h)), o.push(u);
4473
+ for (var n = this.intValue, r = this.p, i = this.s, o = [], l = Math[n >= 0 ? "floor" : "ceil"](n / t), a = Math.abs(n - l * t), c = i.fromCents ? 1 : r; t !== 0; t--) {
4474
+ var u = ue(l / c, i);
4475
+ a-- > 0 && (u = u[n >= 0 ? "add" : "subtract"](1 / c)), o.push(u);
4480
4476
  }
4481
4477
  return o;
4482
4478
  },
@@ -4492,8 +4488,8 @@ fe.prototype = {
4492
4488
  * @returns {number}
4493
4489
  */
4494
4490
  cents: function() {
4495
- var t = this.intValue, r = this.p;
4496
- return ~~(t % r);
4491
+ var t = this.intValue, n = this.p;
4492
+ return ~~(t % n);
4497
4493
  },
4498
4494
  /**
4499
4495
  * Formats the value as a string according to the formatting settings.
@@ -4501,16 +4497,16 @@ fe.prototype = {
4501
4497
  * @returns {string}
4502
4498
  */
4503
4499
  format: function(t) {
4504
- var r = this.s;
4505
- return typeof t == "function" ? t(this, r) : r.format(this, Object.assign({}, r, t));
4500
+ var n = this.s;
4501
+ return typeof t == "function" ? t(this, n) : n.format(this, Object.assign({}, n, t));
4506
4502
  },
4507
4503
  /**
4508
4504
  * Formats the value as a string according to the formatting settings.
4509
4505
  * @returns {string}
4510
4506
  */
4511
4507
  toString: function() {
4512
- var t = this.intValue, r = this.p, n = this.s;
4513
- return Bo(t / r, n.increment).toFixed(n.precision);
4508
+ var t = this.intValue, n = this.p, r = this.s;
4509
+ return To(t / n, r.increment).toFixed(r.precision);
4514
4510
  },
4515
4511
  /**
4516
4512
  * Value for JSON serialization.
@@ -4520,19 +4516,19 @@ fe.prototype = {
4520
4516
  return this.value;
4521
4517
  }
4522
4518
  };
4523
- function Co(e) {
4524
- sn(e, "svelte-gv6dm2", '*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}');
4519
+ function Ao(e) {
4520
+ sr(e, "svelte-gv6dm2", '*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}');
4525
4521
  }
4526
- function Er(e, t, r) {
4527
- const n = e.slice();
4528
- return n[47] = t[r], n;
4522
+ function xn(e, t, n) {
4523
+ const r = e.slice();
4524
+ return r[47] = t[n], r;
4529
4525
  }
4530
- function xr(e, t, r) {
4531
- const n = e.slice();
4532
- return n[50] = t[r], n;
4526
+ function _n(e, t, n) {
4527
+ const r = e.slice();
4528
+ return r[50] = t[n], r;
4533
4529
  }
4534
- function Ho(e) {
4535
- let t, r = (
4530
+ function Co(e) {
4531
+ let t, n = (
4536
4532
  /*balances*/
4537
4533
  (e[4].Total ? (
4538
4534
  /*formatBalance*/
@@ -4541,137 +4537,137 @@ function Ho(e) {
4541
4537
  e[4].Total[0].amount
4542
4538
  )
4543
4539
  ) : "0") + ""
4544
- ), n, i, o, l, s, h, u, f, m, p = (
4540
+ ), r, i, o, l, a, c, u, f, g, d = (
4545
4541
  /*isModalDisplayed*/
4546
- e[2] && _r(e)
4542
+ e[2] && Tn(e)
4547
4543
  );
4548
4544
  return {
4549
4545
  c() {
4550
- t = V("button"), n = de(r), i = me(), o = de(
4546
+ t = k("button"), r = le(n), i = ce(), o = le(
4551
4547
  /*currency*/
4552
4548
  e[3]
4553
- ), l = me(), s = V("span"), s.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" 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" transform="translate(-6.188 -11.246)"></path></svg>', h = me(), p && p.c(), u = hn(), Z(t, "class", "BalanceValue");
4549
+ ), l = ce(), a = k("span"), a.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" 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" transform="translate(-6.188 -11.246)"></path></svg>', c = ce(), d && d.c(), u = hr(), W(t, "class", "BalanceValue");
4554
4550
  },
4555
- m(y, E) {
4556
- ve(y, t, E), L(t, n), L(t, i), L(t, o), L(t, l), L(t, s), ve(y, h, E), p && p.m(y, E), ve(y, u, E), f || (m = bt(
4551
+ m(x, _) {
4552
+ pe(x, t, _), L(t, r), L(t, i), L(t, o), L(t, l), L(t, a), pe(x, c, _), d && d.m(x, _), pe(x, u, _), f || (g = pt(
4557
4553
  t,
4558
4554
  "click",
4559
4555
  /*click_handler*/
4560
4556
  e[23]
4561
4557
  ), f = !0);
4562
4558
  },
4563
- p(y, E) {
4564
- E[0] & /*balances*/
4565
- 16 && r !== (r = /*balances*/
4566
- (y[4].Total ? (
4559
+ p(x, _) {
4560
+ _[0] & /*balances*/
4561
+ 16 && n !== (n = /*balances*/
4562
+ (x[4].Total ? (
4567
4563
  /*formatBalance*/
4568
- y[6](
4564
+ x[6](
4569
4565
  /*balances*/
4570
- y[4].Total[0].amount
4566
+ x[4].Total[0].amount
4571
4567
  )
4572
- ) : "0") + "") && Be(n, r), E[0] & /*currency*/
4573
- 8 && Be(
4568
+ ) : "0") + "") && xe(r, n), _[0] & /*currency*/
4569
+ 8 && xe(
4574
4570
  o,
4575
4571
  /*currency*/
4576
- y[3]
4572
+ x[3]
4577
4573
  ), /*isModalDisplayed*/
4578
- y[2] ? p ? p.p(y, E) : (p = _r(y), p.c(), p.m(u.parentNode, u)) : p && (p.d(1), p = null);
4574
+ x[2] ? d ? d.p(x, _) : (d = Tn(x), d.c(), d.m(u.parentNode, u)) : d && (d.d(1), d = null);
4579
4575
  },
4580
- d(y) {
4581
- y && (pe(t), pe(h), pe(u)), p && p.d(y), f = !1, m();
4576
+ d(x) {
4577
+ x && (he(t), he(c), he(u)), d && d.d(x), f = !1, g();
4582
4578
  }
4583
4579
  };
4584
4580
  }
4585
- function Oo(e) {
4586
- let t, r = (
4581
+ function Ho(e) {
4582
+ let t, n = (
4587
4583
  /*$_*/
4588
4584
  e[5]("Loading") + ""
4589
- ), n;
4585
+ ), r;
4590
4586
  return {
4591
4587
  c() {
4592
- t = V("p"), n = de(r);
4588
+ t = k("p"), r = le(n);
4593
4589
  },
4594
4590
  m(i, o) {
4595
- ve(i, t, o), L(t, n);
4591
+ pe(i, t, o), L(t, r);
4596
4592
  },
4597
4593
  p(i, o) {
4598
4594
  o[0] & /*$_*/
4599
- 32 && r !== (r = /*$_*/
4600
- i[5]("Loading") + "") && Be(n, r);
4595
+ 32 && n !== (n = /*$_*/
4596
+ i[5]("Loading") + "") && xe(r, n);
4601
4597
  },
4602
4598
  d(i) {
4603
- i && pe(t);
4599
+ i && he(t);
4604
4600
  }
4605
4601
  };
4606
4602
  }
4607
- function _r(e) {
4608
- let t, r, n, i, o, l, s = (
4603
+ function Tn(e) {
4604
+ let t, n, r, i, o, l, a = (
4609
4605
  /*$_*/
4610
4606
  e[5]("Title") + ""
4611
- ), h, u, f, m, p, y, E = (
4607
+ ), c, u, f, g, d, x, _ = (
4612
4608
  /*$_*/
4613
4609
  e[5]("DepositButton") + ""
4614
- ), N, H, U, X = yt(Object.keys(
4610
+ ), M, H, G, V = mt(Object.keys(
4615
4611
  /*balances*/
4616
4612
  e[4]
4617
4613
  )), T = [];
4618
- for (let S = 0; S < X.length; S += 1)
4619
- T[S] = Br(Er(e, X, S));
4614
+ for (let A = 0; A < V.length; A += 1)
4615
+ T[A] = Sn(xn(e, V, A));
4620
4616
  return {
4621
4617
  c() {
4622
- t = V("div"), r = V("button"), n = me(), i = V("div"), o = V("div"), l = V("p"), h = de(s), u = me(), f = V("div");
4623
- for (let S = 0; S < T.length; S += 1)
4624
- T[S].c();
4625
- m = me(), p = V("div"), y = V("button"), N = de(E), Z(r, "class", "BalanceModalClose"), Z(l, "class", "BalanceModalTitle"), Z(o, "class", "BalanceModalHeader"), Z(f, "class", "BalanceModalBody"), Z(y, "class", "BalanceModalAction"), Z(p, "class", "BalanceModalFooter"), Z(i, "class", "BalanceModal"), Z(t, "class", "BalanceModalWrapper");
4618
+ t = k("div"), n = k("button"), r = ce(), i = k("div"), o = k("div"), l = k("p"), c = le(a), u = ce(), f = k("div");
4619
+ for (let A = 0; A < T.length; A += 1)
4620
+ T[A].c();
4621
+ g = ce(), d = k("div"), x = k("button"), M = le(_), W(n, "class", "BalanceModalClose"), W(l, "class", "BalanceModalTitle"), W(o, "class", "BalanceModalHeader"), W(f, "class", "BalanceModalBody"), W(x, "class", "BalanceModalAction"), W(d, "class", "BalanceModalFooter"), W(i, "class", "BalanceModal"), W(t, "class", "BalanceModalWrapper");
4626
4622
  },
4627
- m(S, G) {
4628
- ve(S, t, G), L(t, r), L(t, n), L(t, i), L(i, o), L(o, l), L(l, h), L(i, u), L(i, f);
4629
- for (let M = 0; M < T.length; M += 1)
4630
- T[M] && T[M].m(f, null);
4631
- L(i, m), L(i, p), L(p, y), L(y, N), H || (U = [
4632
- bt(
4633
- r,
4623
+ m(A, F) {
4624
+ pe(A, t, F), L(t, n), L(t, r), L(t, i), L(i, o), L(o, l), L(l, c), L(i, u), L(i, f);
4625
+ for (let P = 0; P < T.length; P += 1)
4626
+ T[P] && T[P].m(f, null);
4627
+ L(i, g), L(i, d), L(d, x), L(x, M), H || (G = [
4628
+ pt(
4629
+ n,
4634
4630
  "click",
4635
4631
  /*click_handler_1*/
4636
4632
  e[24]
4637
4633
  ),
4638
- bt(
4639
- y,
4634
+ pt(
4635
+ x,
4640
4636
  "click",
4641
4637
  /*click_handler_2*/
4642
4638
  e[25]
4643
4639
  )
4644
4640
  ], H = !0);
4645
4641
  },
4646
- p(S, G) {
4647
- if (G[0] & /*$_*/
4648
- 32 && s !== (s = /*$_*/
4649
- S[5]("Title") + "") && Be(h, s), G[0] & /*balances, currency, formatBalance, $_*/
4642
+ p(A, F) {
4643
+ if (F[0] & /*$_*/
4644
+ 32 && a !== (a = /*$_*/
4645
+ A[5]("Title") + "") && xe(c, a), F[0] & /*balances, currency, formatBalance, $_*/
4650
4646
  120) {
4651
- X = yt(Object.keys(
4647
+ V = mt(Object.keys(
4652
4648
  /*balances*/
4653
- S[4]
4649
+ A[4]
4654
4650
  ));
4655
- let M;
4656
- for (M = 0; M < X.length; M += 1) {
4657
- const J = Er(S, X, M);
4658
- T[M] ? T[M].p(J, G) : (T[M] = Br(J), T[M].c(), T[M].m(f, null));
4651
+ let P;
4652
+ for (P = 0; P < V.length; P += 1) {
4653
+ const ee = xn(A, V, P);
4654
+ T[P] ? T[P].p(ee, F) : (T[P] = Sn(ee), T[P].c(), T[P].m(f, null));
4659
4655
  }
4660
- for (; M < T.length; M += 1)
4661
- T[M].d(1);
4662
- T.length = X.length;
4656
+ for (; P < T.length; P += 1)
4657
+ T[P].d(1);
4658
+ T.length = V.length;
4663
4659
  }
4664
- G[0] & /*$_*/
4665
- 32 && E !== (E = /*$_*/
4666
- S[5]("DepositButton") + "") && Be(N, E);
4660
+ F[0] & /*$_*/
4661
+ 32 && _ !== (_ = /*$_*/
4662
+ A[5]("DepositButton") + "") && xe(M, _);
4667
4663
  },
4668
- d(S) {
4669
- S && pe(t), Hr(T, S), H = !1, ke(U);
4664
+ d(A) {
4665
+ A && he(t), On(T, A), H = !1, ke(G);
4670
4666
  }
4671
4667
  };
4672
4668
  }
4673
- function Tr(e) {
4674
- let t, r, n = (
4669
+ function Bn(e) {
4670
+ let t, n, r = (
4675
4671
  /*$_*/
4676
4672
  e[5](
4677
4673
  /*k*/
@@ -4686,7 +4682,7 @@ function Tr(e) {
4686
4682
  e[50].productType
4687
4683
  )
4688
4684
  ) : "") + ""
4689
- ), s, h, u, f, m = (
4685
+ ), a, c, u, f, g = (
4690
4686
  /*b*/
4691
4687
  (e[50].amount ? (
4692
4688
  /*formatBalance*/
@@ -4695,24 +4691,24 @@ function Tr(e) {
4695
4691
  e[50].amount
4696
4692
  )
4697
4693
  ) : "0") + ""
4698
- ), p, y, E, N;
4694
+ ), d, x, _, M;
4699
4695
  return {
4700
4696
  c() {
4701
- t = V("div"), r = V("p"), i = de(n), o = me(), s = de(l), h = me(), u = V("p"), f = V("span"), p = de(m), y = me(), E = V("span"), N = de(
4697
+ t = k("div"), n = k("p"), i = le(r), o = ce(), a = le(l), c = ce(), u = k("p"), f = k("span"), d = le(g), x = ce(), _ = k("span"), M = le(
4702
4698
  /*currency*/
4703
4699
  e[3]
4704
- ), Z(r, "class", "BalanceModalText"), Z(f, "class", "BalanceModalAmount"), Z(E, "class", "BalanceModalCurrency"), Z(u, "class", "BalanceModalValue"), Z(t, "class", "BalanceModalRowLine");
4700
+ ), W(n, "class", "BalanceModalText"), W(f, "class", "BalanceModalAmount"), W(_, "class", "BalanceModalCurrency"), W(u, "class", "BalanceModalValue"), W(t, "class", "BalanceModalRowLine");
4705
4701
  },
4706
- m(H, U) {
4707
- ve(H, t, U), L(t, r), L(r, i), L(r, o), L(r, s), L(t, h), L(t, u), L(u, f), L(f, p), L(u, y), L(u, E), L(E, N);
4702
+ m(H, G) {
4703
+ pe(H, t, G), L(t, n), L(n, i), L(n, o), L(n, a), L(t, c), L(t, u), L(u, f), L(f, d), L(u, x), L(u, _), L(_, M);
4708
4704
  },
4709
- p(H, U) {
4710
- U[0] & /*$_, balances*/
4711
- 48 && n !== (n = /*$_*/
4705
+ p(H, G) {
4706
+ G[0] & /*$_, balances*/
4707
+ 48 && r !== (r = /*$_*/
4712
4708
  H[5](
4713
4709
  /*k*/
4714
4710
  H[47]
4715
- ) + "") && Be(i, n), U[0] & /*balances, $_*/
4711
+ ) + "") && xe(i, r), G[0] & /*balances, $_*/
4716
4712
  48 && l !== (l = /*b*/
4717
4713
  (H[50].productType ? (
4718
4714
  /*$_*/
@@ -4720,206 +4716,206 @@ function Tr(e) {
4720
4716
  /*b*/
4721
4717
  H[50].productType
4722
4718
  )
4723
- ) : "") + "") && Be(s, l), U[0] & /*balances*/
4724
- 16 && m !== (m = /*b*/
4719
+ ) : "") + "") && xe(a, l), G[0] & /*balances*/
4720
+ 16 && g !== (g = /*b*/
4725
4721
  (H[50].amount ? (
4726
4722
  /*formatBalance*/
4727
4723
  H[6](
4728
4724
  /*b*/
4729
4725
  H[50].amount
4730
4726
  )
4731
- ) : "0") + "") && Be(p, m), U[0] & /*currency*/
4732
- 8 && Be(
4733
- N,
4727
+ ) : "0") + "") && xe(d, g), G[0] & /*currency*/
4728
+ 8 && xe(
4729
+ M,
4734
4730
  /*currency*/
4735
4731
  H[3]
4736
4732
  );
4737
4733
  },
4738
4734
  d(H) {
4739
- H && pe(t);
4735
+ H && he(t);
4740
4736
  }
4741
4737
  };
4742
4738
  }
4743
- function Br(e) {
4744
- let t, r, n = yt(
4739
+ function Sn(e) {
4740
+ let t, n, r = mt(
4745
4741
  /*balances*/
4746
4742
  e[4][
4747
4743
  /*k*/
4748
4744
  e[47]
4749
4745
  ]
4750
4746
  ), i = [];
4751
- for (let o = 0; o < n.length; o += 1)
4752
- i[o] = Tr(xr(e, n, o));
4747
+ for (let o = 0; o < r.length; o += 1)
4748
+ i[o] = Bn(_n(e, r, o));
4753
4749
  return {
4754
4750
  c() {
4755
- t = V("div");
4751
+ t = k("div");
4756
4752
  for (let o = 0; o < i.length; o += 1)
4757
4753
  i[o].c();
4758
- r = me(), Z(t, "class", "BalanceModalRowBoth");
4754
+ n = ce(), W(t, "class", "BalanceModalRowBoth");
4759
4755
  },
4760
4756
  m(o, l) {
4761
- ve(o, t, l);
4762
- for (let s = 0; s < i.length; s += 1)
4763
- i[s] && i[s].m(t, null);
4764
- L(t, r);
4757
+ pe(o, t, l);
4758
+ for (let a = 0; a < i.length; a += 1)
4759
+ i[a] && i[a].m(t, null);
4760
+ L(t, n);
4765
4761
  },
4766
4762
  p(o, l) {
4767
4763
  if (l[0] & /*currency, balances, formatBalance, $_*/
4768
4764
  120) {
4769
- n = yt(
4765
+ r = mt(
4770
4766
  /*balances*/
4771
4767
  o[4][
4772
4768
  /*k*/
4773
4769
  o[47]
4774
4770
  ]
4775
4771
  );
4776
- let s;
4777
- for (s = 0; s < n.length; s += 1) {
4778
- const h = xr(o, n, s);
4779
- i[s] ? i[s].p(h, l) : (i[s] = Tr(h), i[s].c(), i[s].m(t, r));
4772
+ let a;
4773
+ for (a = 0; a < r.length; a += 1) {
4774
+ const c = _n(o, r, a);
4775
+ i[a] ? i[a].p(c, l) : (i[a] = Bn(c), i[a].c(), i[a].m(t, n));
4780
4776
  }
4781
- for (; s < i.length; s += 1)
4782
- i[s].d(1);
4783
- i.length = n.length;
4777
+ for (; a < i.length; a += 1)
4778
+ i[a].d(1);
4779
+ i.length = r.length;
4784
4780
  }
4785
4781
  },
4786
4782
  d(o) {
4787
- o && pe(t), Hr(i, o);
4783
+ o && he(t), On(i, o);
4788
4784
  }
4789
4785
  };
4790
4786
  }
4791
- function Sr(e) {
4792
- let t, r, n;
4787
+ function wn(e) {
4788
+ let t, n, r;
4793
4789
  return {
4794
4790
  c() {
4795
- t = V("button"), Z(t, "class", "ShowBalanceModalOverlay");
4791
+ t = k("button"), W(t, "class", "ShowBalanceModalOverlay");
4796
4792
  },
4797
4793
  m(i, o) {
4798
- ve(i, t, o), r || (n = bt(
4794
+ pe(i, t, o), n || (r = pt(
4799
4795
  t,
4800
4796
  "click",
4801
4797
  /*click_handler_3*/
4802
4798
  e[26]
4803
- ), r = !0);
4799
+ ), n = !0);
4804
4800
  },
4805
- p: ue,
4801
+ p: ae,
4806
4802
  d(i) {
4807
- i && pe(t), r = !1, n();
4803
+ i && he(t), n = !1, r();
4808
4804
  }
4809
4805
  };
4810
4806
  }
4811
- function Ro(e) {
4812
- let t, r, n;
4813
- function i(h, u) {
4807
+ function Oo(e) {
4808
+ let t, n, r;
4809
+ function i(c, u) {
4814
4810
  return (
4815
4811
  /*isLoading*/
4816
- h[1] ? Oo : Ho
4812
+ c[1] ? Ho : Co
4817
4813
  );
4818
4814
  }
4819
- let o = i(e), l = o(e), s = (
4815
+ let o = i(e), l = o(e), a = (
4820
4816
  /*isModalDisplayed*/
4821
- e[2] && Sr(e)
4817
+ e[2] && wn(e)
4822
4818
  );
4823
4819
  return {
4824
4820
  c() {
4825
- t = V("div"), r = V("div"), l.c(), n = me(), s && s.c(), Z(r, "class", "ShowBalance");
4821
+ t = k("div"), n = k("div"), l.c(), r = ce(), a && a.c(), W(n, "class", "ShowBalance");
4826
4822
  },
4827
- m(h, u) {
4828
- ve(h, t, u), L(t, r), l.m(r, null), L(t, n), s && s.m(t, null), e[27](t);
4823
+ m(c, u) {
4824
+ pe(c, t, u), L(t, n), l.m(n, null), L(t, r), a && a.m(t, null), e[27](t);
4829
4825
  },
4830
- p(h, u) {
4831
- o === (o = i(h)) && l ? l.p(h, u) : (l.d(1), l = o(h), l && (l.c(), l.m(r, null))), /*isModalDisplayed*/
4832
- h[2] ? s ? s.p(h, u) : (s = Sr(h), s.c(), s.m(t, null)) : s && (s.d(1), s = null);
4826
+ p(c, u) {
4827
+ o === (o = i(c)) && l ? l.p(c, u) : (l.d(1), l = o(c), l && (l.c(), l.m(n, null))), /*isModalDisplayed*/
4828
+ c[2] ? a ? a.p(c, u) : (a = wn(c), a.c(), a.m(t, null)) : a && (a.d(1), a = null);
4833
4829
  },
4834
- i: ue,
4835
- o: ue,
4836
- d(h) {
4837
- h && pe(t), l.d(), s && s.d(), e[27](null);
4830
+ i: ae,
4831
+ o: ae,
4832
+ d(c) {
4833
+ c && he(t), l.d(), a && a.d(), e[27](null);
4838
4834
  }
4839
4835
  };
4840
4836
  }
4841
- function Lo(e, t, r) {
4842
- let n;
4843
- an(e, Eo, (g) => r(5, n = g));
4844
- let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: l = "" } = t, { lang: s = "en" } = t, { clientstyling: h = "" } = t, { clientstylingurl: u = "" } = t, { translationurl: f = "" } = t, { customlocaleidentifier: m = "" } = t, { gmversion: p = "gm16" } = t, { displaybalanceoption: y = "All" } = t, { totalcalculationmode: E = "totalCashAmount" } = t, { currencyseparator: N = "" } = t, { currencydecimal: H = "" } = t, { currencyprecision: U = "" } = t, { mbsource: X } = t, T, S = !0, G = !1, M = !1, J, Se = "", le = [], he;
4845
- const v = {}, ae = ["totalCashAmount", "totalRealAmount"], ot = () => {
4846
- fetch(f).then((g) => g.json()).then((g) => Object.keys(g).forEach((A) => yr(A, g[A]))).catch((g) => console.log(g));
4837
+ function Ro(e, t, n) {
4838
+ let r;
4839
+ ar(e, vo, (b) => n(5, r = b));
4840
+ let { userid: i = "" } = t, { session: o = "" } = t, { endpoint: l = "" } = t, { lang: a = "en" } = t, { clientstyling: c = "" } = t, { clientstylingurl: u = "" } = t, { translationurl: f = "" } = t, { customlocaleidentifier: g = "" } = t, { gmversion: d = "gm16" } = t, { displaybalanceoption: x = "All" } = t, { totalcalculationmode: _ = "totalCashAmount" } = t, { currencyseparator: M = "" } = t, { currencydecimal: H = "" } = t, { currencyprecision: G = "" } = t, { mbsource: V } = t, T, A, F = !0, P = !1, ee = !1, me, _e = "", te = [], Te;
4841
+ const v = {}, Be = ["totalCashAmount", "totalRealAmount"], We = () => {
4842
+ fetch(f).then((b) => b.json()).then((b) => Object.keys(b).forEach((w) => vn(w, b[w]))).catch((b) => console.log(b));
4847
4843
  };
4848
- Object.keys(vr).forEach((g) => yr(g, vr[g]));
4849
- const Re = () => {
4850
- if (m.includes(s))
4851
- return m;
4852
- }, at = (g) => m ? new Intl.NumberFormat(Re(), { useGrouping: !0 }).format(g) : N && H ? fe(g, {
4853
- separator: N,
4844
+ Object.keys(En).forEach((b) => vn(b, En[b]));
4845
+ const Ze = () => {
4846
+ if (g.includes(a))
4847
+ return g;
4848
+ }, qe = (b) => g ? new Intl.NumberFormat(Ze(), { useGrouping: !0 }).format(b) : M && H ? ue(b, {
4849
+ separator: M,
4854
4850
  decimal: H,
4855
4851
  symbol: "",
4856
- precision: parseInt(U || "2", 10)
4857
- }).format() : fe(g, {
4852
+ precision: parseInt(G || "2", 10)
4853
+ }).format() : ue(b, {
4858
4854
  separator: ".",
4859
4855
  decimal: ",",
4860
4856
  symbol: "",
4861
- precision: parseInt(U || "2", 10)
4862
- }).format(), We = async () => {
4863
- r(1, S = !0);
4864
- const g = new URL(`${l}/v1/player/${i}/account`);
4857
+ precision: parseInt(G || "2", 10)
4858
+ }).format(), fe = async () => {
4859
+ n(1, F = !0);
4860
+ const b = new URL(`${l}/v1/player/${i}/account`);
4865
4861
  try {
4866
- const A = await fetch(g, {
4862
+ const w = await fetch(b, {
4867
4863
  method: "GET",
4868
4864
  headers: { "X-SessionID": o }
4869
- }), P = await A.json();
4870
- if (A.ok)
4871
- le = P.items, r(3, Se = le.find((a) => a.displayName === "Casino")?.currency), r(4, v.Total = [{ amount: P.totalAmount[Se] }], v), r(
4865
+ }), s = await w.json();
4866
+ if (w.ok)
4867
+ te = s.items, n(3, _e = te.find((h) => h.displayName === "Casino")?.currency), n(4, v.Total = [{ amount: s.totalAmount[_e] }], v), n(
4872
4868
  4,
4873
4869
  v.Real = [
4874
4870
  {
4875
- amount: le.find((a) => a.displayName === "Casino")?.balanceAmount
4871
+ amount: te.find((h) => h.displayName === "Casino")?.balanceAmount
4876
4872
  }
4877
4873
  ],
4878
4874
  v
4879
- ), r(
4875
+ ), n(
4880
4876
  4,
4881
4877
  v.Bonus = [
4882
4878
  {
4883
- amount: le.find((a) => a.displayName === "UBS")?.balanceAmount
4879
+ amount: te.find((h) => h.displayName === "UBS")?.balanceAmount
4884
4880
  }
4885
4881
  ],
4886
4882
  v
4887
4883
  );
4888
4884
  else
4889
4885
  throw new Error("Failed to fetch balance data !");
4890
- } catch (A) {
4891
- console.log("Balance error: ", A);
4886
+ } catch (w) {
4887
+ console.log("Balance error: ", w);
4892
4888
  } finally {
4893
- r(1, S = !1);
4889
+ n(1, F = !1);
4894
4890
  }
4895
- }, ge = () => {
4896
- r(1, S = !0);
4897
- const g = new URL(`${l}/v2/player/${i}/balance`), A = new Headers();
4898
- A.append("X-SessionID", o), fetch(g, { method: "GET", headers: A }).then((a) => a.json()).then((a) => {
4899
- a[E] || r(8, E = ae[0]);
4900
- const d = a.items.find((c) => c.type === "Real" && c.walletAccountType === "Ordinary");
4901
- if (r(3, Se = d.currency), M = !!d.productType, r(4, v.Total = [{ amount: 0 }], v), r(4, v.Real = [], v), r(4, v.Bonus = [], v), r(4, v.Credit = [], v), !M) {
4902
- he = {
4891
+ }, Se = () => {
4892
+ n(1, F = !0);
4893
+ const b = new URL(`${l}/v2/player/${i}/balance`), w = new Headers();
4894
+ w.append("X-SessionID", o), fetch(b, { method: "GET", headers: w }).then((h) => h.json()).then((h) => {
4895
+ h[_] || n(8, _ = Be[0]);
4896
+ const m = h.items.find((y) => y.type === "Real" && y.walletAccountType === "Ordinary");
4897
+ if (n(3, _e = m.currency), ee = !!m.productType, n(4, v.Total = [{ amount: 0 }], v), n(4, v.Real = [], v), n(4, v.Bonus = [], v), n(4, v.Credit = [], v), !ee) {
4898
+ Te = {
4903
4899
  lastOrdinaryAfterAmount: 0,
4904
4900
  showCreditLineAfterAmount: !1
4905
- }, r(4, v.Total[0].amount = a[E][Se], v);
4906
- for (const c of a.items)
4907
- switch (c.type) {
4901
+ }, n(4, v.Total[0].amount = h[_][_e], v);
4902
+ for (const y of h.items)
4903
+ switch (y.type) {
4908
4904
  case "Bonus":
4909
- v.Bonus.length === 0 ? v.Bonus.push({ amount: c.amount }) : r(4, v.Bonus[0].amount += c.amount, v);
4905
+ v.Bonus.length === 0 ? v.Bonus.push({ amount: y.amount }) : n(4, v.Bonus[0].amount += y.amount, v);
4910
4906
  break;
4911
4907
  case "Real":
4912
- if (c.creditLine && v.Credit.length === 0 && v.Credit.push({ amount: c.creditLine }), E === "totalRealAmount")
4908
+ if (y.creditLine && v.Credit.length === 0 && v.Credit.push({ amount: y.creditLine }), _ === "totalRealAmount")
4913
4909
  continue;
4914
- v.Real.length === 0 ? v.Real.push({ amount: c.amount }) : r(4, v.Real[0].amount += c.amount, v);
4910
+ v.Real.length === 0 ? v.Real.push({ amount: y.amount }) : n(4, v.Real[0].amount += y.amount, v);
4915
4911
  break;
4916
4912
  }
4917
- for (const [c, _] of Object.entries(v))
4918
- _.length < 1 && delete v[c];
4919
- r(1, S = !1);
4913
+ for (const [y, E] of Object.entries(v))
4914
+ E.length < 1 && delete v[y];
4915
+ n(1, F = !1);
4920
4916
  return;
4921
4917
  }
4922
- he = {
4918
+ Te = {
4923
4919
  Casino: {
4924
4920
  lastOrdinaryAfterAmount: 0,
4925
4921
  showCreditLineAfterAmount: !1
@@ -4929,197 +4925,197 @@ function Lo(e, t, r) {
4929
4925
  showCreditLineAfterAmount: !1
4930
4926
  }
4931
4927
  };
4932
- let b = a.items;
4933
- y && y !== "All" && (b = a.items.filter((c) => c.productType === y));
4934
- for (const c of b) {
4935
- let _;
4936
- switch (c.type) {
4928
+ let p = h.items;
4929
+ x && x !== "All" && (p = h.items.filter((y) => y.productType === x));
4930
+ for (const y of p) {
4931
+ let E;
4932
+ switch (y.type) {
4937
4933
  case "Bonus":
4938
- _ = v.Bonus.findIndex((x) => x.productType === c.productType), _ > 0 ? r(4, v.Bonus[_].amount += c.amount, v) : v.Bonus.push({
4939
- amount: c.amount,
4940
- productType: c.productType
4934
+ E = v.Bonus.findIndex((S) => S.productType === y.productType), E > 0 ? n(4, v.Bonus[E].amount += y.amount, v) : v.Bonus.push({
4935
+ amount: y.amount,
4936
+ productType: y.productType
4941
4937
  });
4942
4938
  break;
4943
4939
  case "Real":
4944
- c.creditLine && v.Credit.push({
4945
- amount: c.creditLine,
4946
- productType: c.productType
4947
- }), _ = v.Real.findIndex((x) => x.productType === c.productType), _ > 0 ? r(4, v.Real[_].amount += c.amount, v) : v.Real.push({
4948
- amount: c.amount,
4949
- productType: c.productType
4940
+ y.creditLine && v.Credit.push({
4941
+ amount: y.creditLine,
4942
+ productType: y.productType
4943
+ }), E = v.Real.findIndex((S) => S.productType === y.productType), E > 0 ? n(4, v.Real[E].amount += y.amount, v) : v.Real.push({
4944
+ amount: y.amount,
4945
+ productType: y.productType
4950
4946
  });
4951
4947
  break;
4952
4948
  }
4953
4949
  }
4954
- Le();
4955
- for (const [c, _] of Object.entries(v))
4956
- _.length < 1 && delete v[c];
4957
- r(1, S = !1);
4950
+ Qe();
4951
+ for (const [y, E] of Object.entries(v))
4952
+ E.length < 1 && delete v[y];
4953
+ n(1, F = !1);
4958
4954
  }).catch(() => {
4959
- throw r(1, S = !1), new Error("Failed to fetch balance data !");
4955
+ throw n(1, F = !1), new Error("Failed to fetch balance data !");
4960
4956
  });
4961
- }, be = () => {
4962
- if (J && J.close(), o.length < 1)
4957
+ }, ge = () => {
4958
+ if (me && me.close(), o.length < 1)
4963
4959
  return;
4964
- let g, A;
4965
- switch (p) {
4960
+ let b, w;
4961
+ switch (d) {
4966
4962
  case "gm16":
4967
- g = new URL(`${l}/v2/player/${i}/information/updates`), A = (d) => st(d);
4963
+ b = new URL(`${l}/v2/player/${i}/information/updates`), w = (m) => Tt(m);
4968
4964
  break;
4969
4965
  case "gmcore":
4970
- g = new URL(`${l}/v1/player/${i}/balance/updates`), A = (d) => Ze(d);
4966
+ b = new URL(`${l}/v1/player/${i}/balance/updates`), w = (m) => de(m);
4971
4967
  break;
4972
4968
  }
4973
- const P = {
4969
+ const s = {
4974
4970
  accept: "text/event-stream",
4975
4971
  "X-SessionId": o
4976
- }, a = new _o.EventSourcePolyfill(g, { headers: P });
4977
- J = a, a.addEventListener("message", A);
4978
- }, we = (g) => {
4979
- let A;
4972
+ }, h = new xo.EventSourcePolyfill(b, { headers: s });
4973
+ me = h, h.addEventListener("message", w);
4974
+ }, Re = (b) => {
4975
+ let w;
4980
4976
  try {
4981
- A = JSON.parse(g);
4982
- } catch (P) {
4983
- console.log("Balance stream failed: ", P);
4977
+ w = JSON.parse(b);
4978
+ } catch (s) {
4979
+ console.log("Balance stream failed: ", s);
4984
4980
  return;
4985
4981
  }
4986
- return A;
4987
- }, Ze = (g) => {
4988
- const A = we(g.data);
4989
- if (!A) {
4990
- be();
4982
+ return w;
4983
+ }, de = (b) => {
4984
+ const w = Re(b.data);
4985
+ if (!w) {
4986
+ ge();
4991
4987
  return;
4992
4988
  }
4993
- let P = "0";
4994
- const a = A.balanceChange;
4995
- le = le.map((d) => (a && a[d.id] && (d = {
4996
- ...d,
4997
- balanceAmount: a[d.id].afterAmount
4998
- }), P = (parseFloat(d?.balanceAmount) + parseFloat(P)).toString(), d)), r(4, v.Real = [{ amount: le[0]?.balanceAmount }], v), r(4, v.Bonus = [{ amount: le[1]?.balanceAmount }], v), r(4, v.Total = [{ amount: Number(P) }], v);
4999
- }, se = (g, A, P) => {
5000
- let a = null;
5001
- switch (P.walletAccountType) {
4989
+ let s = "0";
4990
+ const h = w.balanceChange;
4991
+ te = te.map((m) => (h && h[m.id] && (m = {
4992
+ ...m,
4993
+ balanceAmount: h[m.id].afterAmount
4994
+ }), s = (parseFloat(m?.balanceAmount) + parseFloat(s)).toString(), m)), n(4, v.Real = [{ amount: te[0]?.balanceAmount }], v), n(4, v.Bonus = [{ amount: te[1]?.balanceAmount }], v), n(4, v.Total = [{ amount: Number(s) }], v);
4995
+ }, Ce = (b, w, s) => {
4996
+ let h = null;
4997
+ switch (s.walletAccountType) {
5002
4998
  case "Ordinary":
5003
- (P.afterAmount !== P.affectedAmount || A.lastOrdinaryAfterAmount === 0) && (A.lastOrdinaryAfterAmount = P.afterAmount, A.showCreditLineAfterAmount || (a = P.afterAmount));
4999
+ (s.afterAmount !== s.affectedAmount || w.lastOrdinaryAfterAmount === 0) && (w.lastOrdinaryAfterAmount = s.afterAmount, w.showCreditLineAfterAmount || (h = s.afterAmount));
5004
5000
  break;
5005
5001
  case "CreditLine":
5006
- P.afterAmount !== 0 ? (a = P.afterAmount, A.showCreditLineAfterAmount = !0) : (a = A.lastOrdinaryAfterAmount, A.showCreditLineAfterAmount = !1);
5002
+ s.afterAmount !== 0 ? (h = s.afterAmount, w.showCreditLineAfterAmount = !0) : (h = w.lastOrdinaryAfterAmount, w.showCreditLineAfterAmount = !1);
5007
5003
  break;
5008
5004
  default:
5009
- a = P.afterAmount;
5005
+ h = s.afterAmount;
5010
5006
  }
5011
- return a === null ? g : a;
5012
- }, Le = () => {
5013
- switch (E) {
5007
+ return h === null ? b : h;
5008
+ }, Qe = () => {
5009
+ switch (_) {
5014
5010
  case "totalCashAmount":
5015
- let g = 0;
5016
- for (const P of ["Real", "Bonus"])
5017
- for (const a of v[P])
5018
- g += Math.max(a.amount, 0);
5019
- r(4, v.Total[0].amount = g, v);
5011
+ let b = 0;
5012
+ for (const s of ["Real", "Bonus"])
5013
+ for (const h of v[s])
5014
+ b += Math.max(h.amount, 0);
5015
+ n(4, v.Total[0].amount = b, v);
5020
5016
  break;
5021
5017
  case "totalRealAmount":
5022
- if (!M)
5018
+ if (!ee)
5023
5019
  return;
5024
- let A = 0;
5025
- for (const P of v.Real)
5026
- A += P.amount;
5027
- r(4, v.Total[0].amount = A, v);
5020
+ let w = 0;
5021
+ for (const s of v.Real)
5022
+ w += s.amount;
5023
+ n(4, v.Total[0].amount = w, v);
5028
5024
  }
5029
- }, st = (g) => {
5030
- const A = we(g.data);
5031
- if (!A) {
5032
- be();
5025
+ }, Tt = (b) => {
5026
+ const w = Re(b.data);
5027
+ if (!w) {
5028
+ ge();
5033
5029
  return;
5034
5030
  }
5035
- if (A.type !== "BALANCE_UPDATE_V2")
5031
+ if (w.type !== "BALANCE_UPDATE_V2")
5036
5032
  return;
5037
- const P = A.body.balanceChange;
5038
- for (const [a, d] of Object.entries(P))
5039
- if (E === "totalRealAmount" && a === "Real" && !M && r(4, v.Total[0].amount = se(v.Total[0].amount, he, d), v), !!v[a])
5040
- for (const b of v[a]) {
5041
- if (!M) {
5042
- b.amount = a === "Real" ? se(b.amount, he, d) : d.afterAmount;
5033
+ const s = w.body.balanceChange;
5034
+ for (const [h, m] of Object.entries(s))
5035
+ if (_ === "totalRealAmount" && h === "Real" && !ee && n(4, v.Total[0].amount = Ce(v.Total[0].amount, Te, m), v), !!v[h])
5036
+ for (const p of v[h]) {
5037
+ if (!ee) {
5038
+ p.amount = h === "Real" ? Ce(p.amount, Te, m) : m.afterAmount;
5043
5039
  continue;
5044
5040
  }
5045
- d.productType === b.productType && (b.amount = a === "Real" ? se(b.amount, he[b.productType], d) : d.afterAmount);
5041
+ m.productType === p.productType && (p.amount = h === "Real" ? Ce(p.amount, Te[p.productType], m) : m.afterAmount);
5046
5042
  }
5047
- Le();
5048
- }, ut = () => {
5049
- r(2, G = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
5050
- }, At = () => {
5051
- ae.includes(E) || (console.error(`Unsupported value ('${E}') for totalcalculationmode parameter. Only the following values are supported ${ae}. Using default value ('${ae[0]}').`), r(8, E = ae[0]));
5052
- }, Ct = () => {
5053
- switch (xo(s), At(), p) {
5043
+ Qe();
5044
+ }, at = () => {
5045
+ n(2, P = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
5046
+ }, Bt = () => {
5047
+ Be.includes(_) || (console.error(`Unsupported value ('${_}') for totalcalculationmode parameter. Only the following values are supported ${Be}. Using default value ('${Be[0]}').`), n(8, _ = Be[0]));
5048
+ }, St = () => {
5049
+ switch (Eo(a), Bt(), d) {
5054
5050
  case "gmcore":
5055
- We();
5051
+ fe();
5056
5052
  break;
5057
5053
  case "gm16":
5058
- ge();
5054
+ Se();
5059
5055
  break;
5060
5056
  default:
5061
- throw Error(`Invalid apiversion attribute: ${p}`);
5057
+ throw Error(`Invalid apiversion attribute: ${d}`);
5062
5058
  }
5063
- }, lt = (g) => g.data && g.data.type === "LogoutSuccessfull" && J.close();
5064
- pn(() => (window.addEventListener("message", lt, !1), () => {
5065
- window.removeEventListener("message", lt), J && J.close();
5059
+ }, Le = (b) => b.data && b.data.type === "LogoutSuccessfull" && me.close();
5060
+ pr(() => (window.addEventListener("message", Le, !1), () => {
5061
+ window.emMessageBus && A && A.unsubscribe(), window.removeEventListener("message", Le), me && me.close();
5066
5062
  }));
5067
- const qe = () => r(2, G = !0), Qe = () => r(2, G = !1), Ae = () => ut(), re = () => r(2, G = !1);
5068
- function Ht(g) {
5069
- Ut[g ? "unshift" : "push"](() => {
5070
- T = g, r(0, T);
5063
+ const Je = () => n(2, P = !0), we = () => n(2, P = !1), ne = () => at(), wt = () => n(2, P = !1);
5064
+ function At(b) {
5065
+ Dt[b ? "unshift" : "push"](() => {
5066
+ T = b, n(0, T);
5071
5067
  });
5072
5068
  }
5073
- return e.$$set = (g) => {
5074
- "userid" in g && r(9, i = g.userid), "session" in g && r(10, o = g.session), "endpoint" in g && r(11, l = g.endpoint), "lang" in g && r(12, s = g.lang), "clientstyling" in g && r(13, h = g.clientstyling), "clientstylingurl" in g && r(14, u = g.clientstylingurl), "translationurl" in g && r(15, f = g.translationurl), "customlocaleidentifier" in g && r(16, m = g.customlocaleidentifier), "gmversion" in g && r(17, p = g.gmversion), "displaybalanceoption" in g && r(18, y = g.displaybalanceoption), "totalcalculationmode" in g && r(8, E = g.totalcalculationmode), "currencyseparator" in g && r(19, N = g.currencyseparator), "currencydecimal" in g && r(20, H = g.currencydecimal), "currencyprecision" in g && r(21, U = g.currencyprecision), "mbsource" in g && r(22, X = g.mbsource);
5069
+ return e.$$set = (b) => {
5070
+ "userid" in b && n(9, i = b.userid), "session" in b && n(10, o = b.session), "endpoint" in b && n(11, l = b.endpoint), "lang" in b && n(12, a = b.lang), "clientstyling" in b && n(13, c = b.clientstyling), "clientstylingurl" in b && n(14, u = b.clientstylingurl), "translationurl" in b && n(15, f = b.translationurl), "customlocaleidentifier" in b && n(16, g = b.customlocaleidentifier), "gmversion" in b && n(17, d = b.gmversion), "displaybalanceoption" in b && n(18, x = b.displaybalanceoption), "totalcalculationmode" in b && n(8, _ = b.totalcalculationmode), "currencyseparator" in b && n(19, M = b.currencyseparator), "currencydecimal" in b && n(20, H = b.currencydecimal), "currencyprecision" in b && n(21, G = b.currencyprecision), "mbsource" in b && n(22, V = b.mbsource);
5075
5071
  }, e.$$.update = () => {
5076
5072
  e.$$.dirty[0] & /*lang*/
5077
- 4096 && s && Re(), e.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
5078
- 400896 && l && i && o && s && p && y && Ct(), e.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
5079
- 134656 && l && i && o && p && be(), e.$$.dirty[0] & /*clientstyling, customStylingContainer*/
5080
- 8193 && h && T && Cn(T, h), e.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
5081
- 16385 && u && T && Hn(T, u), e.$$.dirty[0] & /*customStylingContainer, mbsource*/
5082
- 4194305 && T && On(T, `${X}.Style`), e.$$.dirty[0] & /*translationurl*/
5083
- 32768 && f && ot();
5073
+ 4096 && a && Ze(), e.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
5074
+ 400896 && l && i && o && a && d && x && St(), e.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
5075
+ 134656 && l && i && o && d && ge(), e.$$.dirty[0] & /*clientstyling, customStylingContainer*/
5076
+ 8193 && c && T && Cr(T, c), e.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
5077
+ 16385 && u && T && Hr(T, u), e.$$.dirty[0] & /*customStylingContainer, mbsource*/
5078
+ 4194305 && T && Or(T, `${V}.Style`), e.$$.dirty[0] & /*translationurl*/
5079
+ 32768 && f && We();
5084
5080
  }, [
5085
5081
  T,
5086
- S,
5087
- G,
5088
- Se,
5082
+ F,
5083
+ P,
5084
+ _e,
5089
5085
  v,
5090
- n,
5086
+ r,
5087
+ qe,
5091
5088
  at,
5092
- ut,
5093
- E,
5089
+ _,
5094
5090
  i,
5095
5091
  o,
5096
5092
  l,
5097
- s,
5098
- h,
5093
+ a,
5094
+ c,
5099
5095
  u,
5100
5096
  f,
5101
- m,
5102
- p,
5103
- y,
5104
- N,
5097
+ g,
5098
+ d,
5099
+ x,
5100
+ M,
5105
5101
  H,
5106
- U,
5107
- X,
5108
- qe,
5109
- Qe,
5110
- Ae,
5111
- re,
5112
- Ht
5102
+ G,
5103
+ V,
5104
+ Je,
5105
+ we,
5106
+ ne,
5107
+ wt,
5108
+ At
5113
5109
  ];
5114
5110
  }
5115
- class No extends wn {
5111
+ class Lo extends wr {
5116
5112
  constructor(t) {
5117
- super(), Bn(
5113
+ super(), Br(
5118
5114
  this,
5119
5115
  t,
5120
- Lo,
5121
5116
  Ro,
5122
- Ar,
5117
+ Oo,
5118
+ Cn,
5123
5119
  {
5124
5120
  userid: 9,
5125
5121
  session: 10,
@@ -5137,7 +5133,7 @@ class No extends wn {
5137
5133
  currencyprecision: 21,
5138
5134
  mbsource: 22
5139
5135
  },
5140
- Co,
5136
+ Ao,
5141
5137
  [-1, -1]
5142
5138
  );
5143
5139
  }
@@ -5145,94 +5141,94 @@ class No extends wn {
5145
5141
  return this.$$.ctx[9];
5146
5142
  }
5147
5143
  set userid(t) {
5148
- this.$$set({ userid: t }), Q();
5144
+ this.$$set({ userid: t }), q();
5149
5145
  }
5150
5146
  get session() {
5151
5147
  return this.$$.ctx[10];
5152
5148
  }
5153
5149
  set session(t) {
5154
- this.$$set({ session: t }), Q();
5150
+ this.$$set({ session: t }), q();
5155
5151
  }
5156
5152
  get endpoint() {
5157
5153
  return this.$$.ctx[11];
5158
5154
  }
5159
5155
  set endpoint(t) {
5160
- this.$$set({ endpoint: t }), Q();
5156
+ this.$$set({ endpoint: t }), q();
5161
5157
  }
5162
5158
  get lang() {
5163
5159
  return this.$$.ctx[12];
5164
5160
  }
5165
5161
  set lang(t) {
5166
- this.$$set({ lang: t }), Q();
5162
+ this.$$set({ lang: t }), q();
5167
5163
  }
5168
5164
  get clientstyling() {
5169
5165
  return this.$$.ctx[13];
5170
5166
  }
5171
5167
  set clientstyling(t) {
5172
- this.$$set({ clientstyling: t }), Q();
5168
+ this.$$set({ clientstyling: t }), q();
5173
5169
  }
5174
5170
  get clientstylingurl() {
5175
5171
  return this.$$.ctx[14];
5176
5172
  }
5177
5173
  set clientstylingurl(t) {
5178
- this.$$set({ clientstylingurl: t }), Q();
5174
+ this.$$set({ clientstylingurl: t }), q();
5179
5175
  }
5180
5176
  get translationurl() {
5181
5177
  return this.$$.ctx[15];
5182
5178
  }
5183
5179
  set translationurl(t) {
5184
- this.$$set({ translationurl: t }), Q();
5180
+ this.$$set({ translationurl: t }), q();
5185
5181
  }
5186
5182
  get customlocaleidentifier() {
5187
5183
  return this.$$.ctx[16];
5188
5184
  }
5189
5185
  set customlocaleidentifier(t) {
5190
- this.$$set({ customlocaleidentifier: t }), Q();
5186
+ this.$$set({ customlocaleidentifier: t }), q();
5191
5187
  }
5192
5188
  get gmversion() {
5193
5189
  return this.$$.ctx[17];
5194
5190
  }
5195
5191
  set gmversion(t) {
5196
- this.$$set({ gmversion: t }), Q();
5192
+ this.$$set({ gmversion: t }), q();
5197
5193
  }
5198
5194
  get displaybalanceoption() {
5199
5195
  return this.$$.ctx[18];
5200
5196
  }
5201
5197
  set displaybalanceoption(t) {
5202
- this.$$set({ displaybalanceoption: t }), Q();
5198
+ this.$$set({ displaybalanceoption: t }), q();
5203
5199
  }
5204
5200
  get totalcalculationmode() {
5205
5201
  return this.$$.ctx[8];
5206
5202
  }
5207
5203
  set totalcalculationmode(t) {
5208
- this.$$set({ totalcalculationmode: t }), Q();
5204
+ this.$$set({ totalcalculationmode: t }), q();
5209
5205
  }
5210
5206
  get currencyseparator() {
5211
5207
  return this.$$.ctx[19];
5212
5208
  }
5213
5209
  set currencyseparator(t) {
5214
- this.$$set({ currencyseparator: t }), Q();
5210
+ this.$$set({ currencyseparator: t }), q();
5215
5211
  }
5216
5212
  get currencydecimal() {
5217
5213
  return this.$$.ctx[20];
5218
5214
  }
5219
5215
  set currencydecimal(t) {
5220
- this.$$set({ currencydecimal: t }), Q();
5216
+ this.$$set({ currencydecimal: t }), q();
5221
5217
  }
5222
5218
  get currencyprecision() {
5223
5219
  return this.$$.ctx[21];
5224
5220
  }
5225
5221
  set currencyprecision(t) {
5226
- this.$$set({ currencyprecision: t }), Q();
5222
+ this.$$set({ currencyprecision: t }), q();
5227
5223
  }
5228
5224
  get mbsource() {
5229
5225
  return this.$$.ctx[22];
5230
5226
  }
5231
5227
  set mbsource(t) {
5232
- this.$$set({ mbsource: t }), Q();
5228
+ this.$$set({ mbsource: t }), q();
5233
5229
  }
5234
5230
  }
5235
- Sn(No, { userid: {}, session: {}, endpoint: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, customlocaleidentifier: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencyseparator: {}, currencydecimal: {}, currencyprecision: {}, mbsource: {} }, [], [], !0);
5231
+ Sr(Lo, { userid: {}, session: {}, endpoint: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, customlocaleidentifier: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencyseparator: {}, currencydecimal: {}, currencyprecision: {}, mbsource: {} }, [], [], !0);
5236
5232
  export {
5237
- No as P
5233
+ Lo as P
5238
5234
  };