@everymatrix/player-account-vault 0.19.12 → 0.19.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ function Wn(e) {
6
6
  function pn() {
7
7
  return /* @__PURE__ */ Object.create(null);
8
8
  }
9
- function xe(e) {
9
+ function _e(e) {
10
10
  e.forEach(Wn);
11
11
  }
12
12
  function ct(e) {
@@ -179,7 +179,7 @@ function V() {
179
179
  }
180
180
  function Rr(e) {
181
181
  if (e.fragment !== null) {
182
- e.update(), xe(e.before_update);
182
+ e.update(), _e(e.before_update);
183
183
  const t = e.dirty;
184
184
  e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(Kt);
185
185
  }
@@ -199,7 +199,7 @@ function Ie() {
199
199
  };
200
200
  }
201
201
  function Le() {
202
- Pe.r || xe(Pe.c), Pe = Pe.p;
202
+ Pe.r || _e(Pe.c), Pe = Pe.p;
203
203
  }
204
204
  function G(e, t) {
205
205
  e && e.i && (Et.delete(e), e.i(t));
@@ -228,12 +228,12 @@ function Ge(e, t, n) {
228
228
  const { fragment: r, after_update: i } = e.$$;
229
229
  r && r.m(t, n), Kt(() => {
230
230
  const a = e.$$.on_mount.map(Wn).filter(ct);
231
- e.$$.on_destroy ? e.$$.on_destroy.push(...a) : xe(a), e.$$.on_mount = [];
231
+ e.$$.on_destroy ? e.$$.on_destroy.push(...a) : _e(a), e.$$.on_mount = [];
232
232
  }), i.forEach(Kt);
233
233
  }
234
234
  function $e(e, t) {
235
235
  const n = e.$$;
236
- n.fragment !== null && (Or(n.after_update), xe(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
236
+ n.fragment !== null && (Or(n.after_update), _e(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
237
237
  }
238
238
  function Dr(e, t) {
239
239
  e.$$.dirty[0] === -1 && (Fe.push(e), Nr(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
@@ -267,7 +267,7 @@ function un(e, t, n, r, i, a, l = null, s = [-1]) {
267
267
  if (u.ctx = n ? n(e, t.props || {}, (d, c, ...p) => {
268
268
  const v = p.length ? p[0] : c;
269
269
  return u.ctx && i(u.ctx[d], u.ctx[d] = v) && (!u.skip_bound && u.bound[d] && u.bound[d](v), h && Dr(e, d)), c;
270
- }) : [], u.update(), h = !0, xe(u.before_update), u.fragment = r ? r(u.ctx) : !1, t.target) {
270
+ }) : [], u.update(), h = !0, _e(u.before_update), u.fragment = r ? r(u.ctx) : !1, t.target) {
271
271
  if (t.hydrate) {
272
272
  const d = Hr(t.target);
273
273
  u.fragment && u.fragment.l(d), d.forEach(A);
@@ -558,7 +558,7 @@ function Ze(e, t, n) {
558
558
  )
559
559
  );
560
560
  return o = !0, c(), function() {
561
- xe(p), d(), o = !1;
561
+ _e(p), d(), o = !1;
562
562
  };
563
563
  });
564
564
  }
@@ -653,15 +653,15 @@ function Lt(e, t) {
653
653
  }
654
654
  e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
655
655
  }
656
- var de = function() {
657
- return de = Object.assign || function(t) {
656
+ var fe = function() {
657
+ return fe = Object.assign || function(t) {
658
658
  for (var n, r = 1, i = arguments.length; r < i; r++) {
659
659
  n = arguments[r];
660
660
  for (var a in n)
661
661
  Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
662
662
  }
663
663
  return t;
664
- }, de.apply(this, arguments);
664
+ }, fe.apply(this, arguments);
665
665
  };
666
666
  function ti(e, t) {
667
667
  var n = {};
@@ -2917,13 +2917,13 @@ var Ri = (
2917
2917
  var v = this.tryParseArgumentClose(i);
2918
2918
  if (v.err)
2919
2919
  return v;
2920
- var pe = H(i, this.clonePosition());
2920
+ var de = H(i, this.clonePosition());
2921
2921
  return s === "select" ? {
2922
2922
  val: {
2923
2923
  type: D.select,
2924
2924
  value: r,
2925
2925
  options: An(Z.val),
2926
- location: pe
2926
+ location: de
2927
2927
  },
2928
2928
  err: null
2929
2929
  } : {
@@ -2933,7 +2933,7 @@ var Ri = (
2933
2933
  options: An(Z.val),
2934
2934
  offset: M,
2935
2935
  pluralType: s === "plural" ? "cardinal" : "ordinal",
2936
- location: pe
2936
+ location: de
2937
2937
  },
2938
2938
  err: null
2939
2939
  };
@@ -3292,14 +3292,14 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
3292
3292
  return Vi(s);
3293
3293
  }
3294
3294
  function $i(e, t) {
3295
- return t ? de(de(de({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
3296
- return n[r] = de(de({}, e[r]), t[r] || {}), n;
3295
+ return t ? fe(fe(fe({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
3296
+ return n[r] = fe(fe({}, e[r]), t[r] || {}), n;
3297
3297
  }, {})) : e;
3298
3298
  }
3299
3299
  function ji(e, t) {
3300
3300
  return t ? Object.keys(e).reduce(function(n, r) {
3301
3301
  return n[r] = $i(e[r], t[r]), n;
3302
- }, de({}, e)) : e;
3302
+ }, fe({}, e)) : e;
3303
3303
  }
3304
3304
  function jt(e) {
3305
3305
  return {
@@ -3380,7 +3380,7 @@ var Wi = (
3380
3380
  var l = i || {};
3381
3381
  l.formatters;
3382
3382
  var s = ti(l, ["formatters"]);
3383
- this.ast = e.__parse(t, de(de({}, s), { locale: this.resolvedLocale }));
3383
+ this.ast = e.__parse(t, fe(fe({}, s), { locale: this.resolvedLocale }));
3384
3384
  } else
3385
3385
  this.ast = t;
3386
3386
  if (!Array.isArray(this.ast))
@@ -4172,7 +4172,7 @@ const O = wr(Ca), Ln = {
4172
4172
  }, Rn = {
4173
4173
  Real: "Real",
4174
4174
  Vault: "Vault"
4175
- }, Ee = {
4175
+ }, Ce = {
4176
4176
  success: "success",
4177
4177
  error: "error"
4178
4178
  }, zt = String(Number.MAX_SAFE_INTEGER).length + 1, _t = {
@@ -4349,7 +4349,7 @@ function Un(e) {
4349
4349
  );
4350
4350
  },
4351
4351
  d(c) {
4352
- c && A(t), h = !1, xe(d);
4352
+ c && A(t), h = !1, _e(d);
4353
4353
  }
4354
4354
  };
4355
4355
  }
@@ -4428,7 +4428,7 @@ function Ra(e) {
4428
4428
  i: B,
4429
4429
  o: B,
4430
4430
  d(v) {
4431
- v && A(t), c && c.d(), p && p.d(), h = !1, xe(d);
4431
+ v && A(t), c && c.d(), p && p.d(), h = !1, _e(d);
4432
4432
  }
4433
4433
  };
4434
4434
  }
@@ -5061,10 +5061,10 @@ function Ja(e) {
5061
5061
  };
5062
5062
  }
5063
5063
  function eo(e) {
5064
- let t, n, r, i, a, l, s, o, u, h, d, c, p, v, b, L, N, R, _, $, M, Z, pe, re, j, se, le, ae, ue, we, q, Y, ce, Qe, Ae, Re, ht, Oe, Ye, ie, me = O(
5064
+ let t, n, r, i, a, l, s, o, u, h, d, c, p, v, b, L, N, R, _, $, M, Z, de, re, j, se, pe, ae, le, Ee, q, Y, ue, Qe, xe, Re, ht, Oe, Ye, ie, me = O(
5065
5065
  /*fetchResponse*/
5066
5066
  e[12]?.message || ""
5067
- ) + "", Ce, ge, be, De, J, ye = O("exchange") + "", ft, ve, ee, Je, et, K = (
5067
+ ) + "", we, ge, be, De, J, Ae = O("exchange") + "", ft, ye, ee, Je, et, K = (
5068
5068
  /*showclosebutton*/
5069
5069
  e[3] === Te.true && Gn(e)
5070
5070
  ), U = (
@@ -5095,13 +5095,13 @@ function eo(e) {
5095
5095
  /*selectedCurrencyFrom*/
5096
5096
  e[5] !== void 0 && (dt.selected = /*selectedCurrencyFrom*/
5097
5097
  e[5]), b = new sn({ props: dt }), Ve.push(() => bn(b, "selected", Mt));
5098
- const pt = [Xa, ja], he = [];
5098
+ const pt = [Xa, ja], ce = [];
5099
5099
  function tt(m, S) {
5100
5100
  return !/*isBalanceFetched*/
5101
5101
  m[16] || !/*isCurrenciesFetched*/
5102
5102
  m[17] ? 0 : 1;
5103
5103
  }
5104
- R = tt(e), _ = he[R] = pt[R](e);
5104
+ R = tt(e), _ = ce[R] = pt[R](e);
5105
5105
  function kt(m) {
5106
5106
  e[41](m);
5107
5107
  }
@@ -5128,13 +5128,13 @@ function eo(e) {
5128
5128
  /*selectedCurrencyTo*/
5129
5129
  e[6] !== void 0 && (mt.selected = /*selectedCurrencyTo*/
5130
5130
  e[6]), ae = new sn({ props: mt }), Ve.push(() => bn(ae, "selected", kt));
5131
- const gt = [qa, Za], fe = [];
5131
+ const gt = [qa, Za], he = [];
5132
5132
  function bt(m, S) {
5133
5133
  return !/*isBalanceFetched*/
5134
5134
  m[16] || !/*isCurrenciesFetched*/
5135
5135
  m[17] ? 0 : 1;
5136
5136
  }
5137
- q = bt(e), Y = fe[q] = gt[q](e);
5137
+ q = bt(e), Y = he[q] = gt[q](e);
5138
5138
  let f = (
5139
5139
  /*showvaults*/
5140
5140
  e[1] === Te.true && jn(e)
@@ -5148,13 +5148,13 @@ function eo(e) {
5148
5148
  let I = E(e), x = I(e);
5149
5149
  return {
5150
5150
  c() {
5151
- t = w("div"), K && K.c(), n = P(), r = w("div"), i = w("h1"), i.textContent = `${O("vaultExchange")}`, a = P(), U && U.c(), l = P(), s = w("div"), o = w("div"), u = w("p"), u.textContent = `${O("exchangeFrom")}`, h = P(), d = w("div"), c = w("input"), v = P(), st(b.$$.fragment), N = P(), _.c(), $ = P(), M = w("div"), Z = w("p"), Z.textContent = `${O("exchangeTo")}`, pe = P(), re = w("div"), j = w("input"), le = P(), st(ae.$$.fragment), we = P(), Y.c(), ce = P(), f && f.c(), Qe = P(), Ae = w("div"), Re = w("span"), Re.textContent = `${O("feesIncluded")}`, ht = P(), Oe = w("span"), x.c(), Ye = P(), ie = w("div"), Ce = P(), ge = w("div"), be = w("button"), be.textContent = `${O("reset")}`, De = P(), J = w("button"), ft = W(ye), g(i, "class", "headerTitle"), g(r, "class", "headerContainer"), g(u, "class", "exchangeHeader"), g(c, "id", "senderInput"), c.disabled = p = !/*session*/
5151
+ t = w("div"), K && K.c(), n = P(), r = w("div"), i = w("h1"), i.textContent = `${O("vaultExchange")}`, a = P(), U && U.c(), l = P(), s = w("div"), o = w("div"), u = w("p"), u.textContent = `${O("exchangeFrom")}`, h = P(), d = w("div"), c = w("input"), v = P(), st(b.$$.fragment), N = P(), _.c(), $ = P(), M = w("div"), Z = w("p"), Z.textContent = `${O("exchangeTo")}`, de = P(), re = w("div"), j = w("input"), pe = P(), st(ae.$$.fragment), Ee = P(), Y.c(), ue = P(), f && f.c(), Qe = P(), xe = w("div"), Re = w("span"), Re.textContent = `${O("feesIncluded")}`, ht = P(), Oe = w("span"), x.c(), Ye = P(), ie = w("div"), we = P(), ge = w("div"), be = w("button"), be.textContent = `${O("reset")}`, De = P(), J = w("button"), ft = W(Ae), g(i, "class", "headerTitle"), g(r, "class", "headerContainer"), g(u, "class", "exchangeHeader"), g(c, "id", "senderInput"), c.disabled = p = !/*session*/
5152
5152
  e[0] || !/*isBalanceFetched*/
5153
5153
  e[16] || !/*isCurrenciesFetched*/
5154
5154
  e[17], g(c, "placeholder", O("debitPlaceHolder")), g(c, "class", "exchangeInput"), g(c, "type", "number"), g(c, "aria-label", "Enter exchange amount"), g(c, "inputmode", "decimal"), g(c, "step", "0.000000000000001"), g(c, "min", "0"), g(d, "class", "flexingContainerRow"), g(o, "class", "containerExchangeFrom exchangeContainer"), g(Z, "class", "exchangeHeader"), g(j, "id", "destinationInput"), j.disabled = se = !/*session*/
5155
5155
  e[0] || !/*isBalanceFetched*/
5156
5156
  e[16] || !/*isCurrenciesFetched*/
5157
- e[17], g(j, "placeholder", O("creditPlaceHolder")), g(j, "class", "exchangeInput"), g(j, "type", "number"), j.readOnly = !0, g(j, "min", "0"), g(re, "class", "flexingContainerRow"), g(M, "class", "containerExchangeTo exchangeContainer"), g(s, "class", "exchangesContainer"), g(Re, "class", "feesLabel"), g(Ae, "class", "feesContainer"), g(ie, "class", "notificationsContainer"), oe(
5157
+ e[17], g(j, "placeholder", O("creditPlaceHolder")), g(j, "class", "exchangeInput"), g(j, "type", "number"), j.readOnly = !0, g(j, "min", "0"), g(re, "class", "flexingContainerRow"), g(M, "class", "containerExchangeTo exchangeContainer"), g(s, "class", "exchangesContainer"), g(Re, "class", "feesLabel"), g(xe, "class", "feesContainer"), g(ie, "class", "notificationsContainer"), oe(
5158
5158
  ie,
5159
5159
  "error",
5160
5160
  /*fetchResponse*/
@@ -5164,7 +5164,7 @@ function eo(e) {
5164
5164
  "success",
5165
5165
  /*fetchResponse*/
5166
5166
  e[12]?.type === "success"
5167
- ), g(be, "class", "resetButton"), g(be, "type", "button"), g(J, "type", "button"), g(J, "class", "exchangeButton"), J.disabled = ve = /*isExchangeDisabled*/
5167
+ ), g(be, "class", "resetButton"), g(be, "type", "button"), g(J, "type", "button"), g(J, "class", "exchangeButton"), J.disabled = ye = /*isExchangeDisabled*/
5168
5168
  e[14] || /*isExchangePending*/
5169
5169
  e[18] || /*inputExchangeFrom*/
5170
5170
  e[8] === 0 && !/*selectedCurrencyFrom*/
@@ -5186,11 +5186,11 @@ function eo(e) {
5186
5186
  c,
5187
5187
  /*inputExchangeFrom*/
5188
5188
  e[8]
5189
- ), y(d, v), Ge(b, d, null), y(o, N), he[R].m(o, null), y(s, $), y(s, M), y(M, Z), y(M, pe), y(M, re), y(re, j), yt(
5189
+ ), y(d, v), Ge(b, d, null), y(o, N), ce[R].m(o, null), y(s, $), y(s, M), y(M, Z), y(M, de), y(M, re), y(re, j), yt(
5190
5190
  j,
5191
5191
  /*inputExchangeTo*/
5192
5192
  e[9]
5193
- ), y(re, le), Ge(ae, re, null), y(M, we), fe[q].m(M, null), y(t, ce), f && f.m(t, null), y(t, Qe), y(t, Ae), y(Ae, Re), y(Ae, ht), y(Ae, Oe), x.m(Oe, null), y(t, Ye), y(t, ie), ie.innerHTML = me, y(t, Ce), y(t, ge), y(ge, be), y(ge, De), y(ge, J), y(J, ft), e[42](t), ee = !0, Je || (et = [
5193
+ ), y(re, pe), Ge(ae, re, null), y(M, Ee), he[q].m(M, null), y(t, ue), f && f.m(t, null), y(t, Qe), y(t, xe), y(xe, Re), y(xe, ht), y(xe, Oe), x.m(Oe, null), y(t, Ye), y(t, ie), ie.innerHTML = me, y(t, we), y(t, ge), y(ge, be), y(ge, De), y(ge, J), y(J, ft), e[42](t), ee = !0, Je || (et = [
5194
5194
  te(
5195
5195
  c,
5196
5196
  "input",
@@ -5264,9 +5264,9 @@ function eo(e) {
5264
5264
  32 && (L = !0, He.selected = /*selectedCurrencyFrom*/
5265
5265
  m[5], gn(() => L = !1)), b.$set(He);
5266
5266
  let nt = R;
5267
- R = tt(m), R === nt ? he[R].p(m, S) : (Ie(), X(he[nt], 1, 1, () => {
5268
- he[nt] = null;
5269
- }), Le(), _ = he[R], _ ? _.p(m, S) : (_ = he[R] = pt[R](m), _.c()), G(_, 1), _.m(o, null)), (!ee || S[0] & /*session, isBalanceFetched, isCurrenciesFetched*/
5267
+ R = tt(m), R === nt ? ce[R].p(m, S) : (Ie(), X(ce[nt], 1, 1, () => {
5268
+ ce[nt] = null;
5269
+ }), Le(), _ = ce[R], _ ? _.p(m, S) : (_ = ce[R] = pt[R](m), _.c()), G(_, 1), _.m(o, null)), (!ee || S[0] & /*session, isBalanceFetched, isCurrenciesFetched*/
5270
5270
  196609 && se !== (se = !/*session*/
5271
5271
  m[0] || !/*isBalanceFetched*/
5272
5272
  m[16] || !/*isCurrenciesFetched*/
@@ -5287,13 +5287,13 @@ function eo(e) {
5287
5287
  m[16] || !/*isCurrenciesFetched*/
5288
5288
  m[17]), S[0] & /*optionsTo*/
5289
5289
  2097152 && (k.options = /*optionsTo*/
5290
- m[21]), !ue && S[0] & /*selectedCurrencyTo*/
5291
- 64 && (ue = !0, k.selected = /*selectedCurrencyTo*/
5292
- m[6], gn(() => ue = !1)), ae.$set(k);
5293
- let _e = q;
5294
- q = bt(m), q === _e ? fe[q].p(m, S) : (Ie(), X(fe[_e], 1, 1, () => {
5295
- fe[_e] = null;
5296
- }), Le(), Y = fe[q], Y ? Y.p(m, S) : (Y = fe[q] = gt[q](m), Y.c()), G(Y, 1), Y.m(M, null)), /*showvaults*/
5290
+ m[21]), !le && S[0] & /*selectedCurrencyTo*/
5291
+ 64 && (le = !0, k.selected = /*selectedCurrencyTo*/
5292
+ m[6], gn(() => le = !1)), ae.$set(k);
5293
+ let ve = q;
5294
+ q = bt(m), q === ve ? he[q].p(m, S) : (Ie(), X(he[ve], 1, 1, () => {
5295
+ he[ve] = null;
5296
+ }), Le(), Y = he[q], Y ? Y.p(m, S) : (Y = he[q] = gt[q](m), Y.c()), G(Y, 1), Y.m(M, null)), /*showvaults*/
5297
5297
  m[1] === Te.true ? f ? f.p(m, S) : (f = jn(m), f.c(), f.m(t, Qe)) : f && (f.d(1), f = null), I === (I = E(m)) && x ? x.p(m, S) : (x.d(1), x = I(m), x && (x.c(), x.m(Oe, null))), (!ee || S[0] & /*fetchResponse*/
5298
5298
  4096) && me !== (me = O(
5299
5299
  /*fetchResponse*/
@@ -5311,11 +5311,11 @@ function eo(e) {
5311
5311
  /*fetchResponse*/
5312
5312
  m[12]?.type === "success"
5313
5313
  ), (!ee || S[0] & /*isExchangeDisabled, isExchangePending, inputExchangeFrom, selectedCurrencyFrom*/
5314
- 278816 && ve !== (ve = /*isExchangeDisabled*/
5314
+ 278816 && ye !== (ye = /*isExchangeDisabled*/
5315
5315
  m[14] || /*isExchangePending*/
5316
5316
  m[18] || /*inputExchangeFrom*/
5317
5317
  m[8] === 0 && !/*selectedCurrencyFrom*/
5318
- m[5]?.amount)) && (J.disabled = ve), (!ee || S[0] & /*isExchangeDisabled, isExchangePending*/
5318
+ m[5]?.amount)) && (J.disabled = ye), (!ee || S[0] & /*isExchangeDisabled, isExchangePending*/
5319
5319
  278528) && oe(
5320
5320
  J,
5321
5321
  "disabled",
@@ -5337,18 +5337,18 @@ function eo(e) {
5337
5337
  X(U), X(b.$$.fragment, m), X(_), X(ae.$$.fragment, m), X(Y), ee = !1;
5338
5338
  },
5339
5339
  d(m) {
5340
- m && A(t), K && K.d(), U && U.d(), $e(b), he[R].d(), $e(ae), fe[q].d(), f && f.d(), x.d(), e[42](null), Je = !1, xe(et);
5340
+ m && A(t), K && K.d(), U && U.d(), $e(b), ce[R].d(), $e(ae), he[q].d(), f && f.d(), x.d(), e[42](null), Je = !1, _e(et);
5341
5341
  }
5342
5342
  };
5343
5343
  }
5344
5344
  function to(e, t, n) {
5345
- let { session: r = "" } = t, { userid: i = "" } = t, { endpoint: a = "" } = t, { lang: l = "en" } = t, { clientstyling: s = "" } = t, { clientstylingurl: o = "" } = t, { translationurl: u = "" } = t, { playercurrency: h = "" } = t, { showvaults: d = "true" } = t, { showtotalbalance: c = "true" } = t, { showclosebutton: p = "true" } = t, { showcurrencysymbol: v = "true" } = t, b = null, L = null, N = 0, R = 0, _ = 0, $ = null, M = null, Z = null, pe = "", re = !0, j = !1, se = !1, le = !1, ae = !1, ue = [], we = [], q = [], Y = [], ce;
5345
+ let { session: r = "" } = t, { userid: i = "" } = t, { endpoint: a = "" } = t, { lang: l = "en" } = t, { clientstyling: s = "" } = t, { clientstylingurl: o = "" } = t, { translationurl: u = "" } = t, { playercurrency: h = "" } = t, { showvaults: d = "true" } = t, { showtotalbalance: c = "true" } = t, { showclosebutton: p = "true" } = t, { showcurrencysymbol: v = "true" } = t, b = null, L = null, N = 0, R = 0, _ = 0, $ = null, M = null, Z = null, de = "", re = !0, j = !1, se = !1, pe = !1, ae = !1, le = [], Ee = [], q = [], Y = [], ue;
5346
5346
  Ta({ withLocale: "en", translations: {} }), Object.keys(Ln).forEach((f) => {
5347
5347
  In(f, Ln[f]);
5348
5348
  });
5349
5349
  const Qe = () => {
5350
5350
  Ba(l);
5351
- }, Ae = () => {
5351
+ }, xe = () => {
5352
5352
  fetch(u).then((f) => f.json()).then((f) => {
5353
5353
  Object.keys(f).forEach((E) => {
5354
5354
  In(E, f[E]);
@@ -5358,19 +5358,19 @@ function to(e, t, n) {
5358
5358
  });
5359
5359
  }, Re = () => {
5360
5360
  let f = document.createElement("style");
5361
- f.innerHTML = s, ce.appendChild(f);
5361
+ f.innerHTML = s, ue.appendChild(f);
5362
5362
  }, ht = () => {
5363
5363
  let f, E = new URL(o), I = document.createElement("style");
5364
5364
  fetch(E.href).then((x) => x.text()).then((x) => {
5365
5365
  I.innerHTML = x, f && clearTimeout(f), f = setTimeout(
5366
5366
  () => {
5367
- ce.appendChild(I);
5367
+ ue.appendChild(I);
5368
5368
  },
5369
5369
  1
5370
5370
  );
5371
5371
  });
5372
5372
  }, Oe = () => {
5373
- we.length !== 0 && (n(15, j = !j), window.postMessage(
5373
+ Ee.length !== 0 && (n(15, j = !j), window.postMessage(
5374
5374
  {
5375
5375
  type: Wt.VaultDropdownToggled,
5376
5376
  state: j
@@ -5385,26 +5385,26 @@ function to(e, t, n) {
5385
5385
  window.location.href
5386
5386
  );
5387
5387
  }, ie = () => {
5388
- n(14, re = !0), Ce(), ge(), be(), De(), window.postMessage({ type: Wt.VaultWidgetReset }, window.location.href);
5388
+ n(14, re = !0), we(), ge(), be(), De(), window.postMessage({ type: Wt.VaultWidgetReset }, window.location.href);
5389
5389
  }, me = () => {
5390
5390
  n(14, re = !0), n(9, _ = 0);
5391
- }, Ce = () => {
5391
+ }, we = () => {
5392
5392
  n(11, M = null);
5393
5393
  }, ge = () => {
5394
5394
  n(8, N = 0), n(9, _ = 0);
5395
5395
  }, be = () => {
5396
- n(13, pe = "");
5396
+ n(13, de = "");
5397
5397
  }, De = () => {
5398
5398
  n(12, Z = null);
5399
5399
  }, J = (f) => {
5400
- f && n(13, pe = f);
5401
- }, ye = ({ type: f, message: E, source: I = "" }) => {
5400
+ f && n(13, de = f);
5401
+ }, Ae = ({ type: f, message: E, source: I = "" }) => {
5402
5402
  let x;
5403
5403
  switch (n(12, Z = { message: E, source: I, type: f }), f) {
5404
- case Ee.error:
5404
+ case Ce.error:
5405
5405
  n(14, re = !0), window.postMessage({ type: I, data: { type: f, message: E } }, window.location.href);
5406
5406
  break;
5407
- case Ee.success:
5407
+ case Ce.success:
5408
5408
  n(14, re = !0), window.postMessage({ type: I, data: { type: f, message: E } }, window.location.href), x && clearTimeout(x), x = setTimeout(
5409
5409
  () => {
5410
5410
  De();
@@ -5415,11 +5415,11 @@ function to(e, t, n) {
5415
5415
  }
5416
5416
  }, ft = () => new Promise((f, E) => {
5417
5417
  const I = Z?.message.includes(Pa.InvalidSession);
5418
- I && E(), isNaN(Number(N)) && (me(), Ce(), E(O("invalidValue"))), N > b?.amount && (me(), Ce(), E(O("exceededValue"))), N === null && !I && (me(), Ce(), E()), N === 0 && N === 0 && !I && (ie(), E()), (!b || !L) && !I && E(), be(), f();
5419
- }), ve = async (f, E) => {
5418
+ I && E(), isNaN(Number(N)) && (me(), we(), E(O("invalidValue"))), N > b?.amount && (me(), we(), E(O("exceededValue"))), N === null && !I && (me(), we(), E()), N === 0 && N === 0 && !I && (ie(), E()), (!b || !L) && !I && E(), be(), f();
5419
+ }), ye = async (f, E) => {
5420
5420
  const I = await f.json();
5421
- return f?.status >= 200 && f?.status < 400 ? I : (E === z.CheckWalletExchangeError && me(), !se && E === z.BalanceError && (n(16, se = !0), n(17, le = !0)), !le && E === z.CurrenciesError && n(17, le = !0), ye({
5422
- type: Ee.error,
5421
+ return f?.status >= 200 && f?.status < 400 ? I : (E === z.CheckWalletExchangeError && me(), !se && E === z.BalanceError && (n(16, se = !0), n(17, pe = !0)), !pe && E === z.CurrenciesError && n(17, pe = !0), Ae({
5422
+ type: Ce.error,
5423
5423
  message: O(I?.thirdPartyResponse?.code) || O(I?.thirdPartyResponse?.errorCode) || "generalError",
5424
5424
  source: E
5425
5425
  }));
@@ -5432,32 +5432,32 @@ function to(e, t, n) {
5432
5432
  "Content-Type": "application/json",
5433
5433
  Accept: "application/json"
5434
5434
  }
5435
- }).then((m) => ve(m, z.CurrenciesError)).then((m) => {
5435
+ }).then((m) => ye(m, z.CurrenciesError)).then((m) => {
5436
5436
  f(m?.currencies);
5437
5437
  }).catch((m) => {
5438
- n(17, le = !0), console.error("There was an error on the allowed currencies request.", m), ye({
5439
- type: Ee.error,
5438
+ n(17, pe = !0), console.error("There was an error on the allowed currencies request.", m), Ae({
5439
+ type: Ce.error,
5440
5440
  message: O("generalError"),
5441
5441
  source: z.CurrenciesError
5442
5442
  }), E();
5443
5443
  }).finally(() => {
5444
- n(17, le = !0);
5444
+ n(17, pe = !0);
5445
5445
  });
5446
5446
  }), Je = ({ data: f, shouldUpdateSelectedCurrencies: E, allowed: I = [] }) => {
5447
5447
  const { items: x = [], totalAmount: m = {}, totalRealAmount: S } = f || {};
5448
- n(10, $ = Object.entries(S || m).map(([k = "", _e = 0]) => ({ currency: k, amount: _e }))[0]);
5448
+ n(10, $ = Object.entries(S || m).map(([k = "", ve = 0]) => ({ currency: k, amount: ve }))[0]);
5449
5449
  let He = null;
5450
5450
  const nt = new Map(I.map((k) => [k.code, k]));
5451
5451
  for (const k of x)
5452
5452
  if (k?.type === Rn.Real) {
5453
- const _e = nt.get(k?.currency);
5454
- if (_e && _e.code === k?.currency) {
5453
+ const ve = nt.get(k?.currency);
5454
+ if (ve && ve.code === k?.currency) {
5455
5455
  const rt = {
5456
5456
  ...k,
5457
- ..._e,
5457
+ ...ve,
5458
5458
  symbol: Sa[k?.currency]?.[0]
5459
5459
  };
5460
- n(37, ue = [...ue, rt]), k?.currency === $?.currency && n(10, $ = { ...$, ...rt }), k?.currency !== $?.currency && k?.walletAccountType === Rn.Vault && n(19, we = [...we, rt]), E && k?.amount > 0 && n(5, b = $?.currency ? $ : He), b && b?.currency === k?.currency && n(5, b = rt), L && L?.currency === k?.currency && n(6, L = rt);
5460
+ n(37, le = [...le, rt]), k?.currency === $?.currency && n(10, $ = { ...$, ...rt }), k?.currency !== $?.currency && k?.walletAccountType === Rn.Vault && n(19, Ee = [...Ee, rt]), E && k?.amount > 0 && n(5, b = $?.currency ? $ : He), b && b?.currency === k?.currency && n(5, b = rt), L && L?.currency === k?.currency && n(6, L = rt);
5461
5461
  }
5462
5462
  }
5463
5463
  }, et = (f = !0) => {
@@ -5469,17 +5469,17 @@ function to(e, t, n) {
5469
5469
  "Content-Type": "application/json",
5470
5470
  Accept: "application/json"
5471
5471
  }
5472
- }).then((x) => ve(x, z.BalanceError)).then((x) => {
5472
+ }).then((x) => ye(x, z.BalanceError)).then((x) => {
5473
5473
  x && ee().then((m) => {
5474
- n(37, ue = []), n(19, we = []), Je({
5474
+ n(37, le = []), n(19, Ee = []), Je({
5475
5475
  data: x,
5476
5476
  shouldUpdateSelectedCurrencies: f,
5477
5477
  allowed: m
5478
5478
  });
5479
5479
  });
5480
5480
  }).catch((x) => {
5481
- n(16, se = !0), console.error("There was an error with the player balance request.", x), ye({
5482
- type: Ee.error,
5481
+ n(16, se = !0), console.error("There was an error with the player balance request.", x), Ae({
5482
+ type: Ce.error,
5483
5483
  message: O("generalError"),
5484
5484
  source: z.BalanceError
5485
5485
  });
@@ -5504,11 +5504,11 @@ function to(e, t, n) {
5504
5504
  },
5505
5505
  body: Dn(E)
5506
5506
  };
5507
- fetch(f, I).then((x) => ve(x, z.CheckWalletExchangeError)).then((x) => {
5507
+ fetch(f, I).then((x) => ye(x, z.CheckWalletExchangeError)).then((x) => {
5508
5508
  x && (Z?.source === z.CheckWalletExchangeError && De(), Array.isArray(x?.fees?.fees) && n(11, M = x.fees), Array.isArray(x?.walletActions) && n(9, _ = x.walletActions.find((m) => m?.directionName === "Credit")?.amount || 0), N > 0 && b?.currency && L?.currency && h && n(14, re = !1));
5509
5509
  }).catch((x) => {
5510
- ye({
5511
- type: Ee.error,
5510
+ Ae({
5511
+ type: Ce.error,
5512
5512
  message: O("generalError"),
5513
5513
  source: z.CheckWalletExchangeError
5514
5514
  }), console.error("There was a problem with the wallet exchange request.", x);
@@ -5524,7 +5524,7 @@ function to(e, t, n) {
5524
5524
  [">", "<", ","].includes(E) && f.preventDefault(), E && !E.match(/[\d.]/) && f.preventDefault(), E === "." && f.target.value.includes(".") && f.preventDefault();
5525
5525
  }, pt = () => {
5526
5526
  N === 0 && n(8, N = null);
5527
- }, he = () => {
5527
+ }, ce = () => {
5528
5528
  const f = new URL(`${a}/v2/player/${i}/wallet-exchange`);
5529
5529
  n(18, ae = !0);
5530
5530
  const E = {
@@ -5544,20 +5544,20 @@ function to(e, t, n) {
5544
5544
  },
5545
5545
  body: Dn(E)
5546
5546
  };
5547
- fetch(f, I).then((x) => ve(x, z.WalletExchangeError)).then((x) => {
5548
- x && (ye({
5549
- type: Ee.success,
5547
+ fetch(f, I).then((x) => ye(x, z.WalletExchangeError)).then((x) => {
5548
+ x && (Ae({
5549
+ type: Ce.success,
5550
5550
  message: O("exchangeSuccess"),
5551
5551
  source: "ExchangeSuccess"
5552
5552
  }), et(!1));
5553
5553
  }).catch((x) => {
5554
- ye({
5555
- type: Ee.error,
5554
+ Ae({
5555
+ type: Ce.error,
5556
5556
  message: O("generalError"),
5557
5557
  source: z.WalletExchangeError
5558
5558
  }), console.error("There was an error with the wallet exchange request.", x);
5559
5559
  }).finally(() => {
5560
- n(18, ae = !1), ge(), Ce();
5560
+ n(18, ae = !1), ge(), we();
5561
5561
  });
5562
5562
  }, tt = (f) => {
5563
5563
  const { data: { type: E } = {} } = f || {};
@@ -5582,12 +5582,12 @@ function to(e, t, n) {
5582
5582
  function gt() {
5583
5583
  _ = Ct(this.value), n(9, _);
5584
5584
  }
5585
- function fe(f) {
5585
+ function he(f) {
5586
5586
  L = f, n(6, L);
5587
5587
  }
5588
5588
  function bt(f) {
5589
5589
  Ve[f ? "unshift" : "push"](() => {
5590
- ce = f, n(7, ce);
5590
+ ue = f, n(7, ue);
5591
5591
  });
5592
5592
  }
5593
5593
  return e.$$set = (f) => {
@@ -5596,22 +5596,16 @@ function to(e, t, n) {
5596
5596
  e.$$.dirty[1] & /*lang*/
5597
5597
  2 && l && Qe(), e.$$.dirty[0] & /*customStylingContainer*/
5598
5598
  128 | e.$$.dirty[1] & /*clientstyling*/
5599
- 4 && s && ce && Re(), e.$$.dirty[0] & /*customStylingContainer*/
5599
+ 4 && s && ue && Re(), e.$$.dirty[0] & /*customStylingContainer*/
5600
5600
  128 | e.$$.dirty[1] & /*clientstylingurl*/
5601
- 8 && o && ce && ht(), e.$$.dirty[1] & /*translationurl*/
5602
- 16 && u && Ae(), e.$$.dirty[0] & /*session, userid*/
5601
+ 8 && o && ue && ht(), e.$$.dirty[1] & /*translationurl*/
5602
+ 16 && u && xe(), e.$$.dirty[0] & /*session, userid*/
5603
5603
  1073741825 | e.$$.dirty[1] & /*endpoint, playercurrency*/
5604
- 33 && r && i && a && h && et(), e.$$.dirty[0] & /*session, userid*/
5605
- 1073741825 | e.$$.dirty[1] & /*endpoint, playercurrency*/
5606
- 33 && (!r || !i || !a || !h) && (n(16, se = !0), n(17, le = !0), ye({
5607
- type: Ee.error,
5608
- message: O("generalError"),
5609
- source: z.BalanceError
5610
- })), e.$$.dirty[0] & /*selectedCurrencyTo*/
5604
+ 33 && r && i && a && h && et(), e.$$.dirty[0] & /*selectedCurrencyTo*/
5611
5605
  64 | e.$$.dirty[1] & /*filteredBalances*/
5612
- 64 && n(20, q = ue.filter((f) => f?.amount > 0 && f?.currency !== L?.currency)), e.$$.dirty[0] & /*selectedCurrencyFrom*/
5606
+ 64 && n(20, q = le.filter((f) => f?.amount > 0 && f?.currency !== L?.currency)), e.$$.dirty[0] & /*selectedCurrencyFrom*/
5613
5607
  32 | e.$$.dirty[1] & /*filteredBalances*/
5614
- 64 && n(21, Y = ue.filter((f) => b?.currency !== f?.currency));
5608
+ 64 && n(21, Y = le.filter((f) => b?.currency !== f?.currency));
5615
5609
  }, [
5616
5610
  r,
5617
5611
  d,
@@ -5620,19 +5614,19 @@ function to(e, t, n) {
5620
5614
  v,
5621
5615
  b,
5622
5616
  L,
5623
- ce,
5617
+ ue,
5624
5618
  N,
5625
5619
  _,
5626
5620
  $,
5627
5621
  M,
5628
5622
  Z,
5629
- pe,
5623
+ de,
5630
5624
  re,
5631
5625
  j,
5632
5626
  se,
5633
- le,
5627
+ pe,
5634
5628
  ae,
5635
- we,
5629
+ Ee,
5636
5630
  q,
5637
5631
  Y,
5638
5632
  Oe,
@@ -5642,7 +5636,7 @@ function to(e, t, n) {
5642
5636
  Mt,
5643
5637
  dt,
5644
5638
  pt,
5645
- he,
5639
+ ce,
5646
5640
  i,
5647
5641
  a,
5648
5642
  l,
@@ -5650,11 +5644,11 @@ function to(e, t, n) {
5650
5644
  o,
5651
5645
  u,
5652
5646
  h,
5653
- ue,
5647
+ le,
5654
5648
  kt,
5655
5649
  mt,
5656
5650
  gt,
5657
- fe,
5651
+ he,
5658
5652
  bt
5659
5653
  ];
5660
5654
  }
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountVault-BWJHrxHt.cjs")).then(({default:t})=>{!customElements.get("player-account-vault")&&customElements.define("player-account-vault",t.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountVault-B-jaJVWl.cjs")).then(({default:t})=>{!customElements.get("player-account-vault")&&customElements.define("player-account-vault",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/PlayerAccountVault-VsYtPpzT.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/PlayerAccountVault-BtEskMQw.js").then(({ default: t }) => {
14
14
  !customElements.get("player-account-vault") && customElements.define("player-account-vault", t.element);
15
15
  });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-vault",
3
- "version": "0.19.12",
3
+ "version": "0.19.13",
4
4
  "type": "module",
5
5
  "main": "es2015/player-account-vault.cjs",
6
6
  "module": "es2015/player-account-vault.js",