@danidoble/webserial 4.3.10 → 4.3.11

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.
package/dist/pinpad.js CHANGED
@@ -1,68 +1,68 @@
1
- import { K as Ye, a as ti, i as K, b as Zt, w as Yt } from "./kernel-Dk_J4ThU.js";
2
- import { h as te } from "./webserial-core-BjytHor1.js";
3
- var ei = "0123456789abcdefghijklmnopqrstuvwxyz";
4
- function H(n) {
5
- return ei.charAt(n);
1
+ import { K as si, a as ai, i as W, b as ee, w as ie } from "./kernel-D2dlpMca.js";
2
+ import { s as ne } from "./webserial-core-l5v2UEyv.js";
3
+ var oi = "0123456789abcdefghijklmnopqrstuvwxyz";
4
+ function X(n) {
5
+ return oi.charAt(n);
6
6
  }
7
- function ii(n, t) {
7
+ function ci(n, t) {
8
8
  return n & t;
9
9
  }
10
- function pt(n, t) {
10
+ function gt(n, t) {
11
11
  return n | t;
12
12
  }
13
- function ee(n, t) {
13
+ function re(n, t) {
14
14
  return n ^ t;
15
15
  }
16
- function ie(n, t) {
16
+ function se(n, t) {
17
17
  return n & ~t;
18
18
  }
19
- function ni(n) {
19
+ function ui(n) {
20
20
  if (n == 0)
21
21
  return -1;
22
22
  var t = 0;
23
23
  return (n & 65535) == 0 && (n >>= 16, t += 16), (n & 255) == 0 && (n >>= 8, t += 8), (n & 15) == 0 && (n >>= 4, t += 4), (n & 3) == 0 && (n >>= 2, t += 2), (n & 1) == 0 && ++t, t;
24
24
  }
25
- function ri(n) {
25
+ function hi(n) {
26
26
  for (var t = 0; n != 0; )
27
27
  n &= n - 1, ++t;
28
28
  return t;
29
29
  }
30
- var tt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Se = "=";
31
- function Et(n) {
30
+ var it = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Oe = "=";
31
+ function ut(n) {
32
32
  var t, e, i = "";
33
33
  for (t = 0; t + 3 <= n.length; t += 3)
34
- e = parseInt(n.substring(t, t + 3), 16), i += tt.charAt(e >> 6) + tt.charAt(e & 63);
35
- for (t + 1 == n.length ? (e = parseInt(n.substring(t, t + 1), 16), i += tt.charAt(e << 2)) : t + 2 == n.length && (e = parseInt(n.substring(t, t + 2), 16), i += tt.charAt(e >> 2) + tt.charAt((e & 3) << 4)); (i.length & 3) > 0; )
36
- i += Se;
34
+ e = parseInt(n.substring(t, t + 3), 16), i += it.charAt(e >> 6) + it.charAt(e & 63);
35
+ for (t + 1 == n.length ? (e = parseInt(n.substring(t, t + 1), 16), i += it.charAt(e << 2)) : t + 2 == n.length && (e = parseInt(n.substring(t, t + 2), 16), i += it.charAt(e >> 2) + it.charAt((e & 3) << 4)); (i.length & 3) > 0; )
36
+ i += Oe;
37
37
  return i;
38
38
  }
39
- function ne(n) {
39
+ function ae(n) {
40
40
  var t = "", e, i = 0, r = 0;
41
- for (e = 0; e < n.length && n.charAt(e) != Se; ++e) {
42
- var s = tt.indexOf(n.charAt(e));
43
- s < 0 || (i == 0 ? (t += H(s >> 2), r = s & 3, i = 1) : i == 1 ? (t += H(r << 2 | s >> 4), r = s & 15, i = 2) : i == 2 ? (t += H(r), t += H(s >> 2), r = s & 3, i = 3) : (t += H(r << 2 | s >> 4), t += H(s & 15), i = 0));
41
+ for (e = 0; e < n.length && n.charAt(e) != Oe; ++e) {
42
+ var s = it.indexOf(n.charAt(e));
43
+ s < 0 || (i == 0 ? (t += X(s >> 2), r = s & 3, i = 1) : i == 1 ? (t += X(r << 2 | s >> 4), r = s & 15, i = 2) : i == 2 ? (t += X(r), t += X(s >> 2), r = s & 3, i = 3) : (t += X(r << 2 | s >> 4), t += X(s & 15), i = 0));
44
44
  }
45
- return i == 1 && (t += H(r << 2)), t;
45
+ return i == 1 && (t += X(r << 2)), t;
46
46
  }
47
- var Z, si = {
47
+ var tt, li = {
48
48
  decode: function(n) {
49
49
  var t;
50
- if (Z === void 0) {
50
+ if (tt === void 0) {
51
51
  var e = "0123456789ABCDEF", i = ` \f
52
52
  \r  \u2028\u2029`;
53
- for (Z = {}, t = 0; t < 16; ++t)
54
- Z[e.charAt(t)] = t;
53
+ for (tt = {}, t = 0; t < 16; ++t)
54
+ tt[e.charAt(t)] = t;
55
55
  for (e = e.toLowerCase(), t = 10; t < 16; ++t)
56
- Z[e.charAt(t)] = t;
56
+ tt[e.charAt(t)] = t;
57
57
  for (t = 0; t < i.length; ++t)
58
- Z[i.charAt(t)] = -1;
58
+ tt[i.charAt(t)] = -1;
59
59
  }
60
60
  var r = [], s = 0, a = 0;
61
61
  for (t = 0; t < n.length; ++t) {
62
62
  var o = n.charAt(t);
63
63
  if (o == "=")
64
64
  break;
65
- if (o = Z[o], o != -1) {
65
+ if (o = tt[o], o != -1) {
66
66
  if (o === void 0)
67
67
  throw new Error("Illegal character at offset " + t);
68
68
  s |= o, ++a >= 2 ? (r[r.length] = s, s = 0, a = 0) : s <<= 4;
@@ -72,23 +72,23 @@ var Z, si = {
72
72
  throw new Error("Hex encoding incomplete: 4 bits missing");
73
73
  return r;
74
74
  }
75
- }, G, Ft = {
75
+ }, J, Kt = {
76
76
  decode: function(n) {
77
77
  var t;
78
- if (G === void 0) {
78
+ if (J === void 0) {
79
79
  var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = `= \f
80
80
  \r  \u2028\u2029`;
81
- for (G = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
82
- G[e.charAt(t)] = t;
83
- for (G["-"] = 62, G._ = 63, t = 0; t < i.length; ++t)
84
- G[i.charAt(t)] = -1;
81
+ for (J = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
82
+ J[e.charAt(t)] = t;
83
+ for (J["-"] = 62, J._ = 63, t = 0; t < i.length; ++t)
84
+ J[i.charAt(t)] = -1;
85
85
  }
86
86
  var r = [], s = 0, a = 0;
87
87
  for (t = 0; t < n.length; ++t) {
88
88
  var o = n.charAt(t);
89
89
  if (o == "=")
90
90
  break;
91
- if (o = G[o], o != -1) {
91
+ if (o = J[o], o != -1) {
92
92
  if (o === void 0)
93
93
  throw new Error("Illegal character at offset " + t);
94
94
  s |= o, ++a >= 4 ? (r[r.length] = s >> 16, r[r.length] = s >> 8 & 255, r[r.length] = s & 255, s = 0, a = 0) : s <<= 6;
@@ -108,7 +108,7 @@ var Z, si = {
108
108
  },
109
109
  re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
110
110
  unarmor: function(n) {
111
- var t = Ft.re.exec(n);
111
+ var t = Kt.re.exec(n);
112
112
  if (t)
113
113
  if (t[1])
114
114
  n = t[1];
@@ -116,9 +116,9 @@ var Z, si = {
116
116
  n = t[2];
117
117
  else
118
118
  throw new Error("RegExp out of sync");
119
- return Ft.decode(n);
119
+ return Kt.decode(n);
120
120
  }
121
- }, Y = 1e13, at = (
121
+ }, et = 1e13, ct = (
122
122
  /** @class */
123
123
  function() {
124
124
  function n(t) {
@@ -127,34 +127,34 @@ var Z, si = {
127
127
  return n.prototype.mulAdd = function(t, e) {
128
128
  var i = this.buf, r = i.length, s, a;
129
129
  for (s = 0; s < r; ++s)
130
- a = i[s] * t + e, a < Y ? e = 0 : (e = 0 | a / Y, a -= e * Y), i[s] = a;
130
+ a = i[s] * t + e, a < et ? e = 0 : (e = 0 | a / et, a -= e * et), i[s] = a;
131
131
  e > 0 && (i[s] = e);
132
132
  }, n.prototype.sub = function(t) {
133
133
  var e = this.buf, i = e.length, r, s;
134
134
  for (r = 0; r < i; ++r)
135
- s = e[r] - t, s < 0 ? (s += Y, t = 1) : t = 0, e[r] = s;
135
+ s = e[r] - t, s < 0 ? (s += et, t = 1) : t = 0, e[r] = s;
136
136
  for (; e[e.length - 1] === 0; )
137
137
  e.pop();
138
138
  }, n.prototype.toString = function(t) {
139
139
  if ((t || 10) != 10)
140
140
  throw new Error("only base 10 is supported");
141
141
  for (var e = this.buf, i = e[e.length - 1].toString(), r = e.length - 2; r >= 0; --r)
142
- i += (Y + e[r]).toString().substring(1);
142
+ i += (et + e[r]).toString().substring(1);
143
143
  return i;
144
144
  }, n.prototype.valueOf = function() {
145
145
  for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i)
146
- e = e * Y + t[i];
146
+ e = e * et + t[i];
147
147
  return e;
148
148
  }, n.prototype.simplify = function() {
149
149
  var t = this.buf;
150
150
  return t.length == 1 ? t[0] : this;
151
151
  }, n;
152
152
  }()
153
- ), Te = "…", ai = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, oi = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
154
- function et(n, t) {
155
- return n.length > t && (n = n.substring(0, t) + Te), n;
153
+ ), xe = "…", fi = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, pi = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
154
+ function nt(n, t) {
155
+ return n.length > t && (n = n.substring(0, t) + xe), n;
156
156
  }
157
- var Nt = (
157
+ var Lt = (
158
158
  /** @class */
159
159
  function() {
160
160
  function n(t, e) {
@@ -203,7 +203,7 @@ var Nt = (
203
203
  r = this.get(a++), s = this.get(a++), i += String.fromCharCode(r << 8 | s);
204
204
  return i;
205
205
  }, n.prototype.parseTime = function(t, e, i) {
206
- var r = this.parseStringISO(t, e), s = (i ? ai : oi).exec(r);
206
+ var r = this.parseStringISO(t, e), s = (i ? fi : pi).exec(r);
207
207
  return s ? (i && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), r = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (r += ":" + s[5], s[6] && (r += ":" + s[6], s[7] && (r += "." + s[7]))), s[8] && (r += " UTC", s[8] != "Z" && (r += s[8], s[9] && (r += ":" + s[9]))), r) : "Unrecognized time: " + r;
208
208
  }, n.prototype.parseInteger = function(t, e) {
209
209
  for (var i = this.get(t), r = i > 127, s = r ? 255 : 0, a, o = ""; i == s && ++t < e; )
@@ -217,53 +217,53 @@ var Nt = (
217
217
  `;
218
218
  }
219
219
  r && (i = i - 256);
220
- for (var c = new at(i), h = t + 1; h < e; ++h)
221
- c.mulAdd(256, this.get(h));
220
+ for (var c = new ct(i), u = t + 1; u < e; ++u)
221
+ c.mulAdd(256, this.get(u));
222
222
  return o + c.toString();
223
223
  }, n.prototype.parseBitString = function(t, e, i) {
224
224
  for (var r = this.get(t), s = (e - t - 1 << 3) - r, a = "(" + s + ` bit)
225
225
  `, o = "", c = t + 1; c < e; ++c) {
226
- for (var h = this.get(c), u = c == e - 1 ? r : 0, f = 7; f >= u; --f)
227
- o += h >> f & 1 ? "1" : "0";
226
+ for (var u = this.get(c), h = c == e - 1 ? r : 0, f = 7; f >= h; --f)
227
+ o += u >> f & 1 ? "1" : "0";
228
228
  if (o.length > i)
229
- return a + et(o, i);
229
+ return a + nt(o, i);
230
230
  }
231
231
  return a + o;
232
232
  }, n.prototype.parseOctetString = function(t, e, i) {
233
233
  if (this.isASCII(t, e))
234
- return et(this.parseStringISO(t, e), i);
234
+ return nt(this.parseStringISO(t, e), i);
235
235
  var r = e - t, s = "(" + r + ` byte)
236
236
  `;
237
237
  i /= 2, r > i && (e = t + i);
238
238
  for (var a = t; a < e; ++a)
239
239
  s += this.hexByte(this.get(a));
240
- return r > i && (s += Te), s;
240
+ return r > i && (s += xe), s;
241
241
  }, n.prototype.parseOID = function(t, e, i) {
242
- for (var r = "", s = new at(), a = 0, o = t; o < e; ++o) {
242
+ for (var r = "", s = new ct(), a = 0, o = t; o < e; ++o) {
243
243
  var c = this.get(o);
244
244
  if (s.mulAdd(128, c & 127), a += 7, !(c & 128)) {
245
245
  if (r === "")
246
- if (s = s.simplify(), s instanceof at)
246
+ if (s = s.simplify(), s instanceof ct)
247
247
  s.sub(80), r = "2." + s.toString();
248
248
  else {
249
- var h = s < 80 ? s < 40 ? 0 : 1 : 2;
250
- r = h + "." + (s - h * 40);
249
+ var u = s < 80 ? s < 40 ? 0 : 1 : 2;
250
+ r = u + "." + (s - u * 40);
251
251
  }
252
252
  else
253
253
  r += "." + s.toString();
254
254
  if (r.length > i)
255
- return et(r, i);
256
- s = new at(), a = 0;
255
+ return nt(r, i);
256
+ s = new ct(), a = 0;
257
257
  }
258
258
  }
259
259
  return a > 0 && (r += ".incomplete"), r;
260
260
  }, n;
261
261
  }()
262
- ), ci = (
262
+ ), di = (
263
263
  /** @class */
264
264
  function() {
265
265
  function n(t, e, i, r, s) {
266
- if (!(r instanceof re))
266
+ if (!(r instanceof oe))
267
267
  throw new Error("Invalid tag value.");
268
268
  this.stream = t, this.header = e, this.length = i, this.tag = r, this.sub = s;
269
269
  }
@@ -368,7 +368,7 @@ var Nt = (
368
368
  case 17:
369
369
  return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
370
370
  case 12:
371
- return et(this.stream.parseStringUTF(e, e + i), t);
371
+ return nt(this.stream.parseStringUTF(e, e + i), t);
372
372
  case 18:
373
373
  // NumericString
374
374
  case 19:
@@ -381,9 +381,9 @@ var Nt = (
381
381
  // IA5String
382
382
  // case 0x19: // GraphicString
383
383
  case 26:
384
- return et(this.stream.parseStringISO(e, e + i), t);
384
+ return nt(this.stream.parseStringISO(e, e + i), t);
385
385
  case 30:
386
- return et(this.stream.parseStringBMP(e, e + i), t);
386
+ return nt(this.stream.parseStringBMP(e, e + i), t);
387
387
  case 23:
388
388
  // UTCTime
389
389
  case 24:
@@ -424,40 +424,40 @@ var Nt = (
424
424
  return e;
425
425
  }, n.prototype.getHexStringValue = function() {
426
426
  var t = this.toHexString(), e = this.header * 2, i = this.length * 2;
427
- return t.substr(e, i);
427
+ return t.substring(e, e + i);
428
428
  }, n.decode = function(t) {
429
429
  var e;
430
- t instanceof Nt ? e = t : e = new Nt(t, 0);
431
- var i = new Nt(e), r = new re(e), s = n.decodeLength(e), a = e.pos, o = a - i.pos, c = null, h = function() {
430
+ t instanceof Lt ? e = t : e = new Lt(t, 0);
431
+ var i = new Lt(e), r = new oe(e), s = n.decodeLength(e), a = e.pos, o = a - i.pos, c = null, u = function() {
432
432
  var f = [];
433
433
  if (s !== null) {
434
- for (var _ = a + s; e.pos < _; )
434
+ for (var d = a + s; e.pos < d; )
435
435
  f[f.length] = n.decode(e);
436
- if (e.pos != _)
436
+ if (e.pos != d)
437
437
  throw new Error("Content size is not correct for container starting at offset " + a);
438
438
  } else
439
439
  try {
440
440
  for (; ; ) {
441
- var y = n.decode(e);
442
- if (y.tag.isEOC())
441
+ var g = n.decode(e);
442
+ if (g.tag.isEOC())
443
443
  break;
444
- f[f.length] = y;
444
+ f[f.length] = g;
445
445
  }
446
446
  s = a - e.pos;
447
- } catch (d) {
448
- throw new Error("Exception while decoding undefined length content: " + d);
447
+ } catch (_) {
448
+ throw new Error("Exception while decoding undefined length content: " + _);
449
449
  }
450
450
  return f;
451
451
  };
452
452
  if (r.tagConstructed)
453
- c = h();
453
+ c = u();
454
454
  else if (r.isUniversal() && (r.tagNumber == 3 || r.tagNumber == 4))
455
455
  try {
456
456
  if (r.tagNumber == 3 && e.get() != 0)
457
457
  throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
458
- c = h();
459
- for (var u = 0; u < c.length; ++u)
460
- if (c[u].tag.isEOC())
458
+ c = u();
459
+ for (var h = 0; h < c.length; ++h)
460
+ if (c[h].tag.isEOC())
461
461
  throw new Error("EOC is not supposed to be actual content.");
462
462
  } catch {
463
463
  c = null;
@@ -470,13 +470,13 @@ var Nt = (
470
470
  return new n(i, o, s, r, c);
471
471
  }, n;
472
472
  }()
473
- ), re = (
473
+ ), oe = (
474
474
  /** @class */
475
475
  function() {
476
476
  function n(t) {
477
477
  var e = t.get();
478
478
  if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
479
- var i = new at();
479
+ var i = new ct();
480
480
  do
481
481
  e = t.get(), i.mulAdd(128, e & 127);
482
482
  while (e & 128);
@@ -489,7 +489,7 @@ var Nt = (
489
489
  return this.tagClass === 0 && this.tagNumber === 0;
490
490
  }, n;
491
491
  }()
492
- ), z, ui = 244837814094590, se = (ui & 16777215) == 15715070, D = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], hi = (1 << 26) / D[D.length - 1], v = (
492
+ ), $, _i = 244837814094590, ce = (_i & 16777215) == 15715070, I = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], gi = (1 << 26) / I[I.length - 1], P = (
493
493
  /** @class */
494
494
  function() {
495
495
  function n(t, e, i) {
@@ -513,11 +513,11 @@ var Nt = (
513
513
  return this.toRadix(t);
514
514
  var i = (1 << e) - 1, r, s = !1, a = "", o = this.t, c = this.DB - o * this.DB % e;
515
515
  if (o-- > 0)
516
- for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a = H(r)); o >= 0; )
517
- c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & i, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a += H(r));
516
+ for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a = X(r)); o >= 0; )
517
+ c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & i, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a += X(r));
518
518
  return s ? a : "0";
519
519
  }, n.prototype.negate = function() {
520
- var t = w();
520
+ var t = E();
521
521
  return n.ZERO.subTo(this, t), t;
522
522
  }, n.prototype.abs = function() {
523
523
  return this.s < 0 ? this.negate() : this;
@@ -533,15 +533,15 @@ var Nt = (
533
533
  return e;
534
534
  return 0;
535
535
  }, n.prototype.bitLength = function() {
536
- return this.t <= 0 ? 0 : this.DB * (this.t - 1) + dt(this[this.t - 1] ^ this.s & this.DM);
536
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + mt(this[this.t - 1] ^ this.s & this.DM);
537
537
  }, n.prototype.mod = function(t) {
538
- var e = w();
538
+ var e = E();
539
539
  return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(n.ZERO) > 0 && t.subTo(e, e), e;
540
540
  }, n.prototype.modPowInt = function(t, e) {
541
541
  var i;
542
- return t < 256 || e.isEven() ? i = new ae(e) : i = new oe(e), this.exp(t, i);
542
+ return t < 256 || e.isEven() ? i = new ue(e) : i = new he(e), this.exp(t, i);
543
543
  }, n.prototype.clone = function() {
544
- var t = w();
544
+ var t = E();
545
545
  return this.copyTo(t), t;
546
546
  }, n.prototype.intValue = function() {
547
547
  if (this.s < 0) {
@@ -577,94 +577,94 @@ var Nt = (
577
577
  }, n.prototype.max = function(t) {
578
578
  return this.compareTo(t) > 0 ? this : t;
579
579
  }, n.prototype.and = function(t) {
580
- var e = w();
581
- return this.bitwiseTo(t, ii, e), e;
580
+ var e = E();
581
+ return this.bitwiseTo(t, ci, e), e;
582
582
  }, n.prototype.or = function(t) {
583
- var e = w();
584
- return this.bitwiseTo(t, pt, e), e;
583
+ var e = E();
584
+ return this.bitwiseTo(t, gt, e), e;
585
585
  }, n.prototype.xor = function(t) {
586
- var e = w();
587
- return this.bitwiseTo(t, ee, e), e;
586
+ var e = E();
587
+ return this.bitwiseTo(t, re, e), e;
588
588
  }, n.prototype.andNot = function(t) {
589
- var e = w();
590
- return this.bitwiseTo(t, ie, e), e;
589
+ var e = E();
590
+ return this.bitwiseTo(t, se, e), e;
591
591
  }, n.prototype.not = function() {
592
- for (var t = w(), e = 0; e < this.t; ++e)
592
+ for (var t = E(), e = 0; e < this.t; ++e)
593
593
  t[e] = this.DM & ~this[e];
594
594
  return t.t = this.t, t.s = ~this.s, t;
595
595
  }, n.prototype.shiftLeft = function(t) {
596
- var e = w();
596
+ var e = E();
597
597
  return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
598
598
  }, n.prototype.shiftRight = function(t) {
599
- var e = w();
599
+ var e = E();
600
600
  return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
601
601
  }, n.prototype.getLowestSetBit = function() {
602
602
  for (var t = 0; t < this.t; ++t)
603
603
  if (this[t] != 0)
604
- return t * this.DB + ni(this[t]);
604
+ return t * this.DB + ui(this[t]);
605
605
  return this.s < 0 ? this.t * this.DB : -1;
606
606
  }, n.prototype.bitCount = function() {
607
607
  for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i)
608
- t += ri(this[i] ^ e);
608
+ t += hi(this[i] ^ e);
609
609
  return t;
610
610
  }, n.prototype.testBit = function(t) {
611
611
  var e = Math.floor(t / this.DB);
612
612
  return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
613
613
  }, n.prototype.setBit = function(t) {
614
- return this.changeBit(t, pt);
614
+ return this.changeBit(t, gt);
615
615
  }, n.prototype.clearBit = function(t) {
616
- return this.changeBit(t, ie);
616
+ return this.changeBit(t, se);
617
617
  }, n.prototype.flipBit = function(t) {
618
- return this.changeBit(t, ee);
618
+ return this.changeBit(t, re);
619
619
  }, n.prototype.add = function(t) {
620
- var e = w();
620
+ var e = E();
621
621
  return this.addTo(t, e), e;
622
622
  }, n.prototype.subtract = function(t) {
623
- var e = w();
623
+ var e = E();
624
624
  return this.subTo(t, e), e;
625
625
  }, n.prototype.multiply = function(t) {
626
- var e = w();
626
+ var e = E();
627
627
  return this.multiplyTo(t, e), e;
628
628
  }, n.prototype.divide = function(t) {
629
- var e = w();
629
+ var e = E();
630
630
  return this.divRemTo(t, e, null), e;
631
631
  }, n.prototype.remainder = function(t) {
632
- var e = w();
632
+ var e = E();
633
633
  return this.divRemTo(t, null, e), e;
634
634
  }, n.prototype.divideAndRemainder = function(t) {
635
- var e = w(), i = w();
635
+ var e = E(), i = E();
636
636
  return this.divRemTo(t, e, i), [e, i];
637
637
  }, n.prototype.modPow = function(t, e) {
638
- var i = t.bitLength(), r, s = W(1), a;
638
+ var i = t.bitLength(), r, s = z(1), a;
639
639
  if (i <= 0)
640
640
  return s;
641
- i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new ae(e) : e.isEven() ? a = new fi(e) : a = new oe(e);
642
- var o = [], c = 3, h = r - 1, u = (1 << r) - 1;
641
+ i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new ue(e) : e.isEven() ? a = new yi(e) : a = new he(e);
642
+ var o = [], c = 3, u = r - 1, h = (1 << r) - 1;
643
643
  if (o[1] = a.convert(this), r > 1) {
644
- var f = w();
645
- for (a.sqrTo(o[1], f); c <= u; )
646
- o[c] = w(), a.mulTo(f, o[c - 2], o[c]), c += 2;
644
+ var f = E();
645
+ for (a.sqrTo(o[1], f); c <= h; )
646
+ o[c] = E(), a.mulTo(f, o[c - 2], o[c]), c += 2;
647
647
  }
648
- var _ = t.t - 1, y, d = !0, m = w(), g;
649
- for (i = dt(t[_]) - 1; _ >= 0; ) {
650
- for (i >= h ? y = t[_] >> i - h & u : (y = (t[_] & (1 << i + 1) - 1) << h - i, _ > 0 && (y |= t[_ - 1] >> this.DB + i - h)), c = r; (y & 1) == 0; )
651
- y >>= 1, --c;
652
- if ((i -= c) < 0 && (i += this.DB, --_), d)
653
- o[y].copyTo(s), d = !1;
648
+ var d = t.t - 1, g, _ = !0, y = E(), m;
649
+ for (i = mt(t[d]) - 1; d >= 0; ) {
650
+ for (i >= u ? g = t[d] >> i - u & h : (g = (t[d] & (1 << i + 1) - 1) << u - i, d > 0 && (g |= t[d - 1] >> this.DB + i - u)), c = r; (g & 1) == 0; )
651
+ g >>= 1, --c;
652
+ if ((i -= c) < 0 && (i += this.DB, --d), _)
653
+ o[g].copyTo(s), _ = !1;
654
654
  else {
655
655
  for (; c > 1; )
656
- a.sqrTo(s, m), a.sqrTo(m, s), c -= 2;
657
- c > 0 ? a.sqrTo(s, m) : (g = s, s = m, m = g), a.mulTo(m, o[y], s);
656
+ a.sqrTo(s, y), a.sqrTo(y, s), c -= 2;
657
+ c > 0 ? a.sqrTo(s, y) : (m = s, s = y, y = m), a.mulTo(y, o[g], s);
658
658
  }
659
- for (; _ >= 0 && (t[_] & 1 << i) == 0; )
660
- a.sqrTo(s, m), g = s, s = m, m = g, --i < 0 && (i = this.DB - 1, --_);
659
+ for (; d >= 0 && (t[d] & 1 << i) == 0; )
660
+ a.sqrTo(s, y), m = s, s = y, y = m, --i < 0 && (i = this.DB - 1, --d);
661
661
  }
662
662
  return a.revert(s);
663
663
  }, n.prototype.modInverse = function(t) {
664
664
  var e = t.isEven();
665
665
  if (this.isEven() && e || t.signum() == 0)
666
666
  return n.ZERO;
667
- for (var i = t.clone(), r = this.clone(), s = W(1), a = W(0), o = W(0), c = W(1); i.signum() != 0; ) {
667
+ for (var i = t.clone(), r = this.clone(), s = z(1), a = z(0), o = z(0), c = z(1); i.signum() != 0; ) {
668
668
  for (; i.isEven(); )
669
669
  i.rShiftTo(1, i), e ? ((!s.isEven() || !a.isEven()) && (s.addTo(this, s), a.subTo(t, a)), s.rShiftTo(1, s)) : a.isEven() || a.subTo(t, a), a.rShiftTo(1, a);
670
670
  for (; r.isEven(); )
@@ -681,7 +681,7 @@ var Nt = (
681
681
  return c;
682
682
  return c.signum() < 0 ? c.add(t) : c;
683
683
  }, n.prototype.pow = function(t) {
684
- return this.exp(t, new li());
684
+ return this.exp(t, new mi());
685
685
  }, n.prototype.gcd = function(t) {
686
686
  var e = this.s < 0 ? this.negate() : this.clone(), i = t.s < 0 ? t.negate() : t.clone();
687
687
  if (e.compareTo(i) < 0) {
@@ -696,19 +696,19 @@ var Nt = (
696
696
  return a > 0 && i.lShiftTo(a, i), i;
697
697
  }, n.prototype.isProbablePrime = function(t) {
698
698
  var e, i = this.abs();
699
- if (i.t == 1 && i[0] <= D[D.length - 1]) {
700
- for (e = 0; e < D.length; ++e)
701
- if (i[0] == D[e])
699
+ if (i.t == 1 && i[0] <= I[I.length - 1]) {
700
+ for (e = 0; e < I.length; ++e)
701
+ if (i[0] == I[e])
702
702
  return !0;
703
703
  return !1;
704
704
  }
705
705
  if (i.isEven())
706
706
  return !1;
707
- for (e = 1; e < D.length; ) {
708
- for (var r = D[e], s = e + 1; s < D.length && r < hi; )
709
- r *= D[s++];
707
+ for (e = 1; e < I.length; ) {
708
+ for (var r = I[e], s = e + 1; s < I.length && r < gi; )
709
+ r *= I[s++];
710
710
  for (r = i.modInt(r); e < s; )
711
- if (r % D[e++] == 0)
711
+ if (r % I[e++] == 0)
712
712
  return !1;
713
713
  }
714
714
  return i.millerRabin(t);
@@ -738,7 +738,7 @@ var Nt = (
738
738
  }
739
739
  this.t = 0, this.s = 0;
740
740
  for (var r = t.length, s = !1, a = 0; --r >= 0; ) {
741
- var o = i == 8 ? +t[r] & 255 : ue(t, r);
741
+ var o = i == 8 ? +t[r] & 255 : fe(t, r);
742
742
  if (o < 0) {
743
743
  t.charAt(r) == "-" && (s = !0);
744
744
  continue;
@@ -814,21 +814,21 @@ var Nt = (
814
814
  e?.fromInt(0), i != null && this.copyTo(i);
815
815
  return;
816
816
  }
817
- i == null && (i = w());
818
- var a = w(), o = this.s, c = t.s, h = this.DB - dt(r[r.t - 1]);
819
- h > 0 ? (r.lShiftTo(h, a), s.lShiftTo(h, i)) : (r.copyTo(a), s.copyTo(i));
820
- var u = a.t, f = a[u - 1];
817
+ i == null && (i = E());
818
+ var a = E(), o = this.s, c = t.s, u = this.DB - mt(r[r.t - 1]);
819
+ u > 0 ? (r.lShiftTo(u, a), s.lShiftTo(u, i)) : (r.copyTo(a), s.copyTo(i));
820
+ var h = a.t, f = a[h - 1];
821
821
  if (f != 0) {
822
- var _ = f * (1 << this.F1) + (u > 1 ? a[u - 2] >> this.F2 : 0), y = this.FV / _, d = (1 << this.F1) / _, m = 1 << this.F2, g = i.t, S = g - u, E = e ?? w();
823
- for (a.dlShiftTo(S, E), i.compareTo(E) >= 0 && (i[i.t++] = 1, i.subTo(E, i)), n.ONE.dlShiftTo(u, E), E.subTo(a, a); a.t < u; )
822
+ var d = f * (1 << this.F1) + (h > 1 ? a[h - 2] >> this.F2 : 0), g = this.FV / d, _ = (1 << this.F1) / d, y = 1 << this.F2, m = i.t, S = m - h, w = e ?? E();
823
+ for (a.dlShiftTo(S, w), i.compareTo(w) >= 0 && (i[i.t++] = 1, i.subTo(w, i)), n.ONE.dlShiftTo(h, w), w.subTo(a, a); a.t < h; )
824
824
  a[a.t++] = 0;
825
825
  for (; --S >= 0; ) {
826
- var C = i[--g] == f ? this.DM : Math.floor(i[g] * y + (i[g - 1] + m) * d);
827
- if ((i[g] += a.am(0, C, i, S, 0, u)) < C)
828
- for (a.dlShiftTo(S, E), i.subTo(E, i); i[g] < --C; )
829
- i.subTo(E, i);
826
+ var C = i[--m] == f ? this.DM : Math.floor(i[m] * g + (i[m - 1] + y) * _);
827
+ if ((i[m] += a.am(0, C, i, S, 0, h)) < C)
828
+ for (a.dlShiftTo(S, w), i.subTo(w, i); i[m] < --C; )
829
+ i.subTo(w, i);
830
830
  }
831
- e != null && (i.drShiftTo(u, e), o != c && n.ZERO.subTo(e, e)), i.t = u, i.clamp(), h > 0 && i.rShiftTo(h, i), o < 0 && n.ZERO.subTo(i, i);
831
+ e != null && (i.drShiftTo(h, e), o != c && n.ZERO.subTo(e, e)), i.t = h, i.clamp(), u > 0 && i.rShiftTo(u, i), o < 0 && n.ZERO.subTo(i, i);
832
832
  }
833
833
  }
834
834
  }, n.prototype.invDigit = function() {
@@ -844,7 +844,7 @@ var Nt = (
844
844
  }, n.prototype.exp = function(t, e) {
845
845
  if (t > 4294967295 || t < 1)
846
846
  return n.ONE;
847
- var i = w(), r = w(), s = e.convert(this), a = dt(t) - 1;
847
+ var i = E(), r = E(), s = e.convert(this), a = mt(t) - 1;
848
848
  for (s.copyTo(i); --a >= 0; )
849
849
  if (e.sqrTo(i, r), (t & 1 << a) > 0)
850
850
  e.mulTo(r, s, i);
@@ -858,19 +858,19 @@ var Nt = (
858
858
  }, n.prototype.toRadix = function(t) {
859
859
  if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
860
860
  return "0";
861
- var e = this.chunkSize(t), i = Math.pow(t, e), r = W(i), s = w(), a = w(), o = "";
861
+ var e = this.chunkSize(t), i = Math.pow(t, e), r = z(i), s = E(), a = E(), o = "";
862
862
  for (this.divRemTo(r, s, a); s.signum() > 0; )
863
- o = (i + a.intValue()).toString(t).substr(1) + o, s.divRemTo(r, s, a);
863
+ o = (i + a.intValue()).toString(t).substring(1) + o, s.divRemTo(r, s, a);
864
864
  return a.intValue().toString(t) + o;
865
865
  }, n.prototype.fromRadix = function(t, e) {
866
866
  this.fromInt(0), e == null && (e = 10);
867
867
  for (var i = this.chunkSize(e), r = Math.pow(e, i), s = !1, a = 0, o = 0, c = 0; c < t.length; ++c) {
868
- var h = ue(t, c);
869
- if (h < 0) {
868
+ var u = fe(t, c);
869
+ if (u < 0) {
870
870
  t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
871
871
  continue;
872
872
  }
873
- o = e * o + h, ++a >= i && (this.dMultiply(r), this.dAddOffset(o, 0), a = 0, o = 0);
873
+ o = e * o + u, ++a >= i && (this.dMultiply(r), this.dAddOffset(o, 0), a = 0, o = 0);
874
874
  }
875
875
  a > 0 && (this.dMultiply(Math.pow(e, a)), this.dAddOffset(o, 0)), s && n.ZERO.subTo(this, this);
876
876
  }, n.prototype.fromNumber = function(t, e, i) {
@@ -878,7 +878,7 @@ var Nt = (
878
878
  if (t < 2)
879
879
  this.fromInt(1);
880
880
  else
881
- for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), pt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
881
+ for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), gt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
882
882
  this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(n.ONE.shiftLeft(t - 1), this);
883
883
  else {
884
884
  var r = [], s = t & 7;
@@ -956,9 +956,9 @@ var Nt = (
956
956
  if (i <= 0)
957
957
  return !1;
958
958
  var r = e.shiftRight(i);
959
- t = t + 1 >> 1, t > D.length && (t = D.length);
960
- for (var s = w(), a = 0; a < t; ++a) {
961
- s.fromInt(D[Math.floor(Math.random() * D.length)]);
959
+ t = t + 1 >> 1, t > I.length && (t = I.length);
960
+ for (var s = E(), a = 0; a < t; ++a) {
961
+ s.fromInt(I[Math.floor(Math.random() * I.length)]);
962
962
  var o = s.modPow(r, this);
963
963
  if (o.compareTo(n.ONE) != 0 && o.compareTo(e) != 0) {
964
964
  for (var c = 1; c++ < i && o.compareTo(e) != 0; )
@@ -970,7 +970,7 @@ var Nt = (
970
970
  }
971
971
  return !0;
972
972
  }, n.prototype.square = function() {
973
- var t = w();
973
+ var t = E();
974
974
  return this.squareTo(t), t;
975
975
  }, n.prototype.gcda = function(t, e) {
976
976
  var i = this.s < 0 ? this.negate() : this.clone(), r = t.s < 0 ? t.negate() : t.clone();
@@ -995,7 +995,7 @@ var Nt = (
995
995
  if (t < 2)
996
996
  this.fromInt(1);
997
997
  else {
998
- this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), pt, this), this.isEven() && this.dAddOffset(1, 0);
998
+ this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(n.ONE.shiftLeft(t - 1), gt, this), this.isEven() && this.dAddOffset(1, 0);
999
999
  var s = this, a = function() {
1000
1000
  s.dAddOffset(2, 0), s.bitLength() > t && s.subTo(n.ONE.shiftLeft(t - 1), s), s.isProbablePrime(e) ? setTimeout(function() {
1001
1001
  r();
@@ -1009,7 +1009,7 @@ var Nt = (
1009
1009
  }
1010
1010
  }, n;
1011
1011
  }()
1012
- ), li = (
1012
+ ), mi = (
1013
1013
  /** @class */
1014
1014
  function() {
1015
1015
  function n() {
@@ -1024,7 +1024,7 @@ var Nt = (
1024
1024
  t.squareTo(e);
1025
1025
  }, n;
1026
1026
  }()
1027
- ), ae = (
1027
+ ), ue = (
1028
1028
  /** @class */
1029
1029
  function() {
1030
1030
  function n(t) {
@@ -1042,17 +1042,17 @@ var Nt = (
1042
1042
  t.squareTo(e), this.reduce(e);
1043
1043
  }, n;
1044
1044
  }()
1045
- ), oe = (
1045
+ ), he = (
1046
1046
  /** @class */
1047
1047
  function() {
1048
1048
  function n(t) {
1049
1049
  this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
1050
1050
  }
1051
1051
  return n.prototype.convert = function(t) {
1052
- var e = w();
1053
- return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(v.ZERO) > 0 && this.m.subTo(e, e), e;
1052
+ var e = E();
1053
+ return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(P.ZERO) > 0 && this.m.subTo(e, e), e;
1054
1054
  }, n.prototype.revert = function(t) {
1055
- var e = w();
1055
+ var e = E();
1056
1056
  return t.copyTo(e), this.reduce(e), e;
1057
1057
  }, n.prototype.reduce = function(t) {
1058
1058
  for (; t.t <= this.mt2; )
@@ -1069,18 +1069,18 @@ var Nt = (
1069
1069
  t.squareTo(e), this.reduce(e);
1070
1070
  }, n;
1071
1071
  }()
1072
- ), fi = (
1072
+ ), yi = (
1073
1073
  /** @class */
1074
1074
  function() {
1075
1075
  function n(t) {
1076
- this.m = t, this.r2 = w(), this.q3 = w(), v.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1076
+ this.m = t, this.r2 = E(), this.q3 = E(), P.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1077
1077
  }
1078
1078
  return n.prototype.convert = function(t) {
1079
1079
  if (t.s < 0 || t.t > 2 * this.m.t)
1080
1080
  return t.mod(this.m);
1081
1081
  if (t.compareTo(this.m) < 0)
1082
1082
  return t;
1083
- var e = w();
1083
+ var e = E();
1084
1084
  return t.copyTo(e), this.reduce(e), e;
1085
1085
  }, n.prototype.revert = function(t) {
1086
1086
  return t;
@@ -1096,64 +1096,64 @@ var Nt = (
1096
1096
  }, n;
1097
1097
  }()
1098
1098
  );
1099
- function w() {
1100
- return new v(null);
1099
+ function E() {
1100
+ return new P(null);
1101
1101
  }
1102
1102
  function A(n, t) {
1103
- return new v(n, t);
1103
+ return new P(n, t);
1104
1104
  }
1105
- var ce = typeof navigator < "u";
1106
- ce && se && navigator.appName == "Microsoft Internet Explorer" ? (v.prototype.am = function(t, e, i, r, s, a) {
1105
+ var le = typeof navigator < "u";
1106
+ le && ce && navigator.appName == "Microsoft Internet Explorer" ? (P.prototype.am = function(t, e, i, r, s, a) {
1107
1107
  for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
1108
- var h = this[t] & 32767, u = this[t++] >> 15, f = c * h + u * o;
1109
- h = o * h + ((f & 32767) << 15) + i[r] + (s & 1073741823), s = (h >>> 30) + (f >>> 15) + c * u + (s >>> 30), i[r++] = h & 1073741823;
1108
+ var u = this[t] & 32767, h = this[t++] >> 15, f = c * u + h * o;
1109
+ u = o * u + ((f & 32767) << 15) + i[r] + (s & 1073741823), s = (u >>> 30) + (f >>> 15) + c * h + (s >>> 30), i[r++] = u & 1073741823;
1110
1110
  }
1111
1111
  return s;
1112
- }, z = 30) : ce && se && navigator.appName != "Netscape" ? (v.prototype.am = function(t, e, i, r, s, a) {
1112
+ }, $ = 30) : le && ce && navigator.appName != "Netscape" ? (P.prototype.am = function(t, e, i, r, s, a) {
1113
1113
  for (; --a >= 0; ) {
1114
1114
  var o = e * this[t++] + i[r] + s;
1115
1115
  s = Math.floor(o / 67108864), i[r++] = o & 67108863;
1116
1116
  }
1117
1117
  return s;
1118
- }, z = 26) : (v.prototype.am = function(t, e, i, r, s, a) {
1118
+ }, $ = 26) : (P.prototype.am = function(t, e, i, r, s, a) {
1119
1119
  for (var o = e & 16383, c = e >> 14; --a >= 0; ) {
1120
- var h = this[t] & 16383, u = this[t++] >> 14, f = c * h + u * o;
1121
- h = o * h + ((f & 16383) << 14) + i[r] + s, s = (h >> 28) + (f >> 14) + c * u, i[r++] = h & 268435455;
1120
+ var u = this[t] & 16383, h = this[t++] >> 14, f = c * u + h * o;
1121
+ u = o * u + ((f & 16383) << 14) + i[r] + s, s = (u >> 28) + (f >> 14) + c * h, i[r++] = u & 268435455;
1122
1122
  }
1123
1123
  return s;
1124
- }, z = 28);
1125
- v.prototype.DB = z;
1126
- v.prototype.DM = (1 << z) - 1;
1127
- v.prototype.DV = 1 << z;
1128
- var Gt = 52;
1129
- v.prototype.FV = Math.pow(2, Gt);
1130
- v.prototype.F1 = Gt - z;
1131
- v.prototype.F2 = 2 * z - Gt;
1132
- var Ct = [], it, U;
1133
- it = 48;
1134
- for (U = 0; U <= 9; ++U)
1135
- Ct[it++] = U;
1136
- it = 97;
1137
- for (U = 10; U < 36; ++U)
1138
- Ct[it++] = U;
1139
- it = 65;
1140
- for (U = 10; U < 36; ++U)
1141
- Ct[it++] = U;
1142
- function ue(n, t) {
1143
- var e = Ct[n.charCodeAt(t)];
1124
+ }, $ = 28);
1125
+ P.prototype.DB = $;
1126
+ P.prototype.DM = (1 << $) - 1;
1127
+ P.prototype.DV = 1 << $;
1128
+ var Qt = 52;
1129
+ P.prototype.FV = Math.pow(2, Qt);
1130
+ P.prototype.F1 = Qt - $;
1131
+ P.prototype.F2 = 2 * $ - Qt;
1132
+ var Ot = [], rt, L;
1133
+ rt = 48;
1134
+ for (L = 0; L <= 9; ++L)
1135
+ Ot[rt++] = L;
1136
+ rt = 97;
1137
+ for (L = 10; L < 36; ++L)
1138
+ Ot[rt++] = L;
1139
+ rt = 65;
1140
+ for (L = 10; L < 36; ++L)
1141
+ Ot[rt++] = L;
1142
+ function fe(n, t) {
1143
+ var e = Ot[n.charCodeAt(t)];
1144
1144
  return e ?? -1;
1145
1145
  }
1146
- function W(n) {
1147
- var t = w();
1146
+ function z(n) {
1147
+ var t = E();
1148
1148
  return t.fromInt(n), t;
1149
1149
  }
1150
- function dt(n) {
1150
+ function mt(n) {
1151
1151
  var t = 1, e;
1152
1152
  return (e = n >>> 16) != 0 && (n = e, t += 16), (e = n >> 8) != 0 && (n = e, t += 8), (e = n >> 4) != 0 && (n = e, t += 4), (e = n >> 2) != 0 && (n = e, t += 2), (e = n >> 1) != 0 && (n = e, t += 1), t;
1153
1153
  }
1154
- v.ZERO = W(0);
1155
- v.ONE = W(1);
1156
- var pi = (
1154
+ P.ZERO = z(0);
1155
+ P.ONE = z(1);
1156
+ var bi = (
1157
1157
  /** @class */
1158
1158
  function() {
1159
1159
  function n() {
@@ -1172,55 +1172,115 @@ var pi = (
1172
1172
  }, n;
1173
1173
  }()
1174
1174
  );
1175
- function di() {
1176
- return new pi();
1175
+ function Pi() {
1176
+ return new bi();
1177
1177
  }
1178
- var Ce = 256, _t, X = null, M;
1179
- if (X == null) {
1180
- X = [], M = 0;
1181
- var gt = void 0;
1182
- if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
1183
- var Vt = new Uint32Array(256);
1184
- for (window.crypto.getRandomValues(Vt), gt = 0; gt < Vt.length; ++gt)
1185
- X[M++] = Vt[gt] & 255;
1186
- }
1187
- var mt = 0, yt = function(n) {
1188
- if (mt = mt || 0, mt >= 256 || M >= Ce) {
1189
- window.removeEventListener ? window.removeEventListener("mousemove", yt, !1) : window.detachEvent && window.detachEvent("onmousemove", yt);
1178
+ var De = 256, yt, G = null, k;
1179
+ if (G == null) {
1180
+ G = [], k = 0;
1181
+ var bt = void 0;
1182
+ if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
1183
+ var Mt = new Uint32Array(256);
1184
+ for (self.crypto.getRandomValues(Mt), bt = 0; bt < Mt.length; ++bt)
1185
+ G[k++] = Mt[bt] & 255;
1186
+ }
1187
+ var Pt = 0, vt = function(n) {
1188
+ if (Pt = Pt || 0, Pt >= 256 || k >= De) {
1189
+ self.removeEventListener ? self.removeEventListener("mousemove", vt, !1) : self.detachEvent && self.detachEvent("onmousemove", vt);
1190
1190
  return;
1191
1191
  }
1192
1192
  try {
1193
1193
  var t = n.x + n.y;
1194
- X[M++] = t & 255, mt += 1;
1194
+ G[k++] = t & 255, Pt += 1;
1195
1195
  } catch {
1196
1196
  }
1197
1197
  };
1198
- typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", yt, !1) : window.attachEvent && window.attachEvent("onmousemove", yt));
1198
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", vt, !1) : self.attachEvent && self.attachEvent("onmousemove", vt));
1199
1199
  }
1200
- function _i() {
1201
- if (_t == null) {
1202
- for (_t = di(); M < Ce; ) {
1200
+ function vi() {
1201
+ if (yt == null) {
1202
+ for (yt = Pi(); k < De; ) {
1203
1203
  var n = Math.floor(65536 * Math.random());
1204
- X[M++] = n & 255;
1204
+ G[k++] = n & 255;
1205
1205
  }
1206
- for (_t.init(X), M = 0; M < X.length; ++M)
1207
- X[M] = 0;
1208
- M = 0;
1206
+ for (yt.init(G), k = 0; k < G.length; ++k)
1207
+ G[k] = 0;
1208
+ k = 0;
1209
1209
  }
1210
- return _t.next();
1210
+ return yt.next();
1211
1211
  }
1212
- var jt = (
1212
+ var Ct = (
1213
1213
  /** @class */
1214
1214
  function() {
1215
1215
  function n() {
1216
1216
  }
1217
1217
  return n.prototype.nextBytes = function(t) {
1218
1218
  for (var e = 0; e < t.length; ++e)
1219
- t[e] = _i();
1219
+ t[e] = vi();
1220
1220
  }, n;
1221
1221
  }()
1222
1222
  );
1223
- function gi(n, t) {
1223
+ function Ht(n) {
1224
+ return wi(Di(Ei(n), n.length * 8));
1225
+ }
1226
+ function pe(n) {
1227
+ for (var t = "0123456789abcdef", e = "", i = 0; i < n.length; i++) {
1228
+ var r = n.charCodeAt(i);
1229
+ e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
1230
+ }
1231
+ return e;
1232
+ }
1233
+ function Ei(n) {
1234
+ for (var t = Array(n.length >> 2), e = 0; e < t.length; e++)
1235
+ t[e] = 0;
1236
+ for (var e = 0; e < n.length * 8; e += 8)
1237
+ t[e >> 5] |= (n.charCodeAt(e / 8) & 255) << 24 - e % 32;
1238
+ return t;
1239
+ }
1240
+ function wi(n) {
1241
+ for (var t = "", e = 0; e < n.length * 32; e += 8)
1242
+ t += String.fromCharCode(n[e >> 5] >>> 24 - e % 32 & 255);
1243
+ return t;
1244
+ }
1245
+ function H(n, t) {
1246
+ return n >>> t | n << 32 - t;
1247
+ }
1248
+ function Ie(n, t) {
1249
+ return n >>> t;
1250
+ }
1251
+ function Si(n, t, e) {
1252
+ return n & t ^ ~n & e;
1253
+ }
1254
+ function Ti(n, t, e) {
1255
+ return n & t ^ n & e ^ t & e;
1256
+ }
1257
+ function Ci(n) {
1258
+ return H(n, 2) ^ H(n, 13) ^ H(n, 22);
1259
+ }
1260
+ function Ai(n) {
1261
+ return H(n, 6) ^ H(n, 11) ^ H(n, 25);
1262
+ }
1263
+ function Ri(n) {
1264
+ return H(n, 7) ^ H(n, 18) ^ Ie(n, 3);
1265
+ }
1266
+ function Oi(n) {
1267
+ return H(n, 17) ^ H(n, 19) ^ Ie(n, 10);
1268
+ }
1269
+ var xi = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
1270
+ function Di(n, t) {
1271
+ var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), r, s, a, o, c, u, h, f, d, g, _, y;
1272
+ for (n[t >> 5] |= 128 << 24 - t % 32, n[(t + 64 >> 9 << 4) + 15] = t, d = 0; d < n.length; d += 16) {
1273
+ for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], u = e[5], h = e[6], f = e[7], g = 0; g < 64; g++)
1274
+ g < 16 ? i[g] = n[g + d] : i[g] = O(O(O(Oi(i[g - 2]), i[g - 7]), Ri(i[g - 15])), i[g - 16]), _ = O(O(O(O(f, Ai(c)), Si(c, u, h)), xi[g]), i[g]), y = O(Ci(r), Ti(r, s, a)), f = h, h = u, u = c, c = O(o, _), o = a, a = s, s = r, r = O(_, y);
1275
+ e[0] = O(r, e[0]), e[1] = O(s, e[1]), e[2] = O(a, e[2]), e[3] = O(o, e[3]), e[4] = O(c, e[4]), e[5] = O(u, e[5]), e[6] = O(h, e[6]), e[7] = O(f, e[7]);
1276
+ }
1277
+ return e;
1278
+ }
1279
+ function O(n, t) {
1280
+ var e = (n & 65535) + (t & 65535), i = (n >> 16) + (t >> 16) + (e >> 16);
1281
+ return i << 16 | e & 65535;
1282
+ }
1283
+ function Ii(n, t) {
1224
1284
  if (t < n.length + 22)
1225
1285
  return console.error("Message too long for RSA"), null;
1226
1286
  for (var e = t - n.length - 6, i = "", r = 0; r < e; r += 2)
@@ -1228,7 +1288,7 @@ function gi(n, t) {
1228
1288
  var s = "0001" + i + "00" + n;
1229
1289
  return A(s, 16);
1230
1290
  }
1231
- function mi(n, t) {
1291
+ function Bi(n, t) {
1232
1292
  if (t < n.length + 11)
1233
1293
  return console.error("Message too long for RSA"), null;
1234
1294
  for (var e = [], i = n.length - 1; i >= 0 && t > 0; ) {
@@ -1236,14 +1296,42 @@ function mi(n, t) {
1236
1296
  r < 128 ? e[--t] = r : r > 127 && r < 2048 ? (e[--t] = r & 63 | 128, e[--t] = r >> 6 | 192) : (e[--t] = r & 63 | 128, e[--t] = r >> 6 & 63 | 128, e[--t] = r >> 12 | 224);
1237
1297
  }
1238
1298
  e[--t] = 0;
1239
- for (var s = new jt(), a = []; t > 2; ) {
1299
+ for (var s = new Ct(), a = []; t > 2; ) {
1240
1300
  for (a[0] = 0; a[0] == 0; )
1241
1301
  s.nextBytes(a);
1242
1302
  e[--t] = a[0];
1243
1303
  }
1244
- return e[--t] = 2, e[--t] = 0, new v(e);
1304
+ return e[--t] = 2, e[--t] = 0, new P(e);
1305
+ }
1306
+ function de(n, t, e) {
1307
+ for (var i = "", r = 0; i.length < t; )
1308
+ i += e(String.fromCharCode.apply(String, n.concat([
1309
+ (r & 4278190080) >> 24,
1310
+ (r & 16711680) >> 16,
1311
+ (r & 65280) >> 8,
1312
+ r & 255
1313
+ ]))), r += 1;
1314
+ return i;
1315
+ }
1316
+ var Ni = 32;
1317
+ function Vi(n, t) {
1318
+ var e = Ni, i = Ht;
1319
+ if (n.length + 2 * e + 2 > t)
1320
+ throw "Message too long for RSA";
1321
+ var r = "", s;
1322
+ for (s = 0; s < t - n.length - 2 * e - 2; s += 1)
1323
+ r += "\0";
1324
+ var a = i("") + r + "" + n, o = new Array(e);
1325
+ new Ct().nextBytes(o);
1326
+ var c = de(o, a.length, i), u = [];
1327
+ for (s = 0; s < a.length; s += 1)
1328
+ u[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
1329
+ var h = de(u, o.length, i), f = [0];
1330
+ for (s = 0; s < o.length; s += 1)
1331
+ f[s + 1] = o[s] ^ h.charCodeAt(s);
1332
+ return new P(f.concat(u));
1245
1333
  }
1246
- var yi = (
1334
+ var Ui = (
1247
1335
  /** @class */
1248
1336
  function() {
1249
1337
  function n() {
@@ -1259,64 +1347,65 @@ var yi = (
1259
1347
  return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i);
1260
1348
  }, n.prototype.setPublic = function(t, e) {
1261
1349
  t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1262
- }, n.prototype.encrypt = function(t) {
1263
- var e = this.n.bitLength() + 7 >> 3, i = mi(t, e);
1264
- if (i == null)
1265
- return null;
1266
- var r = this.doPublic(i);
1350
+ }, n.prototype.encrypt = function(t, e) {
1351
+ typeof e > "u" && (e = Bi);
1352
+ var i = this.n.bitLength() + 7 >> 3, r = e(t, i);
1267
1353
  if (r == null)
1268
1354
  return null;
1269
- for (var s = r.toString(16), a = s.length, o = 0; o < e * 2 - a; o++)
1270
- s = "0" + s;
1271
- return s;
1355
+ var s = this.doPublic(r);
1356
+ if (s == null)
1357
+ return null;
1358
+ for (var a = s.toString(16), o = a.length, c = 0; c < i * 2 - o; c++)
1359
+ a = "0" + a;
1360
+ return a;
1272
1361
  }, n.prototype.setPrivate = function(t, e, i) {
1273
1362
  t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16), this.d = A(i, 16)) : console.error("Invalid RSA private key");
1274
1363
  }, n.prototype.setPrivateEx = function(t, e, i, r, s, a, o, c) {
1275
1364
  t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = A(t, 16), this.e = parseInt(e, 16), this.d = A(i, 16), this.p = A(r, 16), this.q = A(s, 16), this.dmp1 = A(a, 16), this.dmq1 = A(o, 16), this.coeff = A(c, 16)) : console.error("Invalid RSA private key");
1276
1365
  }, n.prototype.generate = function(t, e) {
1277
- var i = new jt(), r = t >> 1;
1366
+ var i = new Ct(), r = t >> 1;
1278
1367
  this.e = parseInt(e, 16);
1279
- for (var s = new v(e, 16); ; ) {
1280
- for (; this.p = new v(t - r, 1, i), !(this.p.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.p.isProbablePrime(10)); )
1368
+ for (var s = new P(e, 16); ; ) {
1369
+ for (; this.p = new P(t - r, 1, i), !(this.p.subtract(P.ONE).gcd(s).compareTo(P.ONE) == 0 && this.p.isProbablePrime(10)); )
1281
1370
  ;
1282
- for (; this.q = new v(r, 1, i), !(this.q.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.q.isProbablePrime(10)); )
1371
+ for (; this.q = new P(r, 1, i), !(this.q.subtract(P.ONE).gcd(s).compareTo(P.ONE) == 0 && this.q.isProbablePrime(10)); )
1283
1372
  ;
1284
1373
  if (this.p.compareTo(this.q) <= 0) {
1285
1374
  var a = this.p;
1286
1375
  this.p = this.q, this.q = a;
1287
1376
  }
1288
- var o = this.p.subtract(v.ONE), c = this.q.subtract(v.ONE), h = o.multiply(c);
1289
- if (h.gcd(s).compareTo(v.ONE) == 0) {
1290
- this.n = this.p.multiply(this.q), this.d = s.modInverse(h), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(c), this.coeff = this.q.modInverse(this.p);
1377
+ var o = this.p.subtract(P.ONE), c = this.q.subtract(P.ONE), u = o.multiply(c);
1378
+ if (u.gcd(s).compareTo(P.ONE) == 0) {
1379
+ this.n = this.p.multiply(this.q), this.d = s.modInverse(u), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(c), this.coeff = this.q.modInverse(this.p);
1291
1380
  break;
1292
1381
  }
1293
1382
  }
1294
1383
  }, n.prototype.decrypt = function(t) {
1295
1384
  var e = A(t, 16), i = this.doPrivate(e);
1296
- return i == null ? null : bi(i, this.n.bitLength() + 7 >> 3);
1385
+ return i == null ? null : Li(i, this.n.bitLength() + 7 >> 3);
1297
1386
  }, n.prototype.generateAsync = function(t, e, i) {
1298
- var r = new jt(), s = t >> 1;
1387
+ var r = new Ct(), s = t >> 1;
1299
1388
  this.e = parseInt(e, 16);
1300
- var a = new v(e, 16), o = this, c = function() {
1301
- var h = function() {
1389
+ var a = new P(e, 16), o = this, c = function() {
1390
+ var u = function() {
1302
1391
  if (o.p.compareTo(o.q) <= 0) {
1303
- var _ = o.p;
1304
- o.p = o.q, o.q = _;
1392
+ var d = o.p;
1393
+ o.p = o.q, o.q = d;
1305
1394
  }
1306
- var y = o.p.subtract(v.ONE), d = o.q.subtract(v.ONE), m = y.multiply(d);
1307
- m.gcd(a).compareTo(v.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(m), o.dmp1 = o.d.mod(y), o.dmq1 = o.d.mod(d), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1395
+ var g = o.p.subtract(P.ONE), _ = o.q.subtract(P.ONE), y = g.multiply(_);
1396
+ y.gcd(a).compareTo(P.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(y), o.dmp1 = o.d.mod(g), o.dmq1 = o.d.mod(_), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
1308
1397
  i();
1309
1398
  }, 0)) : setTimeout(c, 0);
1310
- }, u = function() {
1311
- o.q = w(), o.q.fromNumberAsync(s, 1, r, function() {
1312
- o.q.subtract(v.ONE).gcda(a, function(_) {
1313
- _.compareTo(v.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(u, 0);
1399
+ }, h = function() {
1400
+ o.q = E(), o.q.fromNumberAsync(s, 1, r, function() {
1401
+ o.q.subtract(P.ONE).gcda(a, function(d) {
1402
+ d.compareTo(P.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(h, 0);
1314
1403
  });
1315
1404
  });
1316
1405
  }, f = function() {
1317
- o.p = w(), o.p.fromNumberAsync(t - s, 1, r, function() {
1318
- o.p.subtract(v.ONE).gcda(a, function(_) {
1319
- _.compareTo(v.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(f, 0);
1406
+ o.p = E(), o.p.fromNumberAsync(t - s, 1, r, function() {
1407
+ o.p.subtract(P.ONE).gcda(a, function(d) {
1408
+ d.compareTo(P.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(f, 0);
1320
1409
  });
1321
1410
  });
1322
1411
  };
@@ -1324,24 +1413,25 @@ var yi = (
1324
1413
  };
1325
1414
  setTimeout(c, 0);
1326
1415
  }, n.prototype.sign = function(t, e, i) {
1327
- var r = Pi(i), s = r + e(t).toString(), a = gi(s, this.n.bitLength() / 4);
1328
- if (a == null)
1329
- return null;
1330
- var o = this.doPrivate(a);
1416
+ var r = Mi(i), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = Ii(s, a);
1331
1417
  if (o == null)
1332
1418
  return null;
1333
- var c = o.toString(16);
1334
- return (c.length & 1) == 0 ? c : "0" + c;
1419
+ var c = this.doPrivate(o);
1420
+ if (c == null)
1421
+ return null;
1422
+ for (var u = c.toString(16), h = u.length, f = 0; f < a - h; f++)
1423
+ u = "0" + u;
1424
+ return u;
1335
1425
  }, n.prototype.verify = function(t, e, i) {
1336
1426
  var r = A(e, 16), s = this.doPublic(r);
1337
1427
  if (s == null)
1338
1428
  return null;
1339
- var a = s.toString(16).replace(/^1f+00/, ""), o = vi(a);
1429
+ var a = s.toString(16).replace(/^1f+00/, ""), o = ki(a);
1340
1430
  return o == i(t).toString();
1341
1431
  }, n;
1342
1432
  }()
1343
1433
  );
1344
- function bi(n, t) {
1434
+ function Li(n, t) {
1345
1435
  for (var e = n.toByteArray(), i = 0; i < e.length && e[i] == 0; )
1346
1436
  ++i;
1347
1437
  if (e.length - i != t - 1 || e[i] != 2)
@@ -1355,7 +1445,7 @@ function bi(n, t) {
1355
1445
  }
1356
1446
  return r;
1357
1447
  }
1358
- var bt = {
1448
+ var Et = {
1359
1449
  md2: "3020300c06082a864886f70d020205000410",
1360
1450
  md5: "3020300c06082a864886f70d020505000410",
1361
1451
  sha1: "3021300906052b0e03021a05000414",
@@ -1365,64 +1455,25 @@ var bt = {
1365
1455
  sha512: "3051300d060960864801650304020305000440",
1366
1456
  ripemd160: "3021300906052b2403020105000414"
1367
1457
  };
1368
- function Pi(n) {
1369
- return bt[n] || "";
1458
+ function Mi(n) {
1459
+ return Et[n] || "";
1370
1460
  }
1371
- function vi(n) {
1372
- for (var t in bt)
1373
- if (bt.hasOwnProperty(t)) {
1374
- var e = bt[t], i = e.length;
1375
- if (n.substr(0, i) == e)
1376
- return n.substr(i);
1461
+ function ki(n) {
1462
+ for (var t in Et)
1463
+ if (Et.hasOwnProperty(t)) {
1464
+ var e = Et[t], i = e.length;
1465
+ if (n.substring(0, i) == e)
1466
+ return n.substring(i);
1377
1467
  }
1378
1468
  return n;
1379
1469
  }
1380
- /*!
1381
- Copyright (c) 2011, Yahoo! Inc. All rights reserved.
1382
- Code licensed under the BSD License:
1383
- http://developer.yahoo.com/yui/license.html
1384
- version: 2.9.0
1385
- */
1386
- var R = {};
1387
- R.lang = {
1388
- /**
1389
- * Utility to set up the prototype, constructor and superclass properties to
1390
- * support an inheritance strategy that can chain constructors and methods.
1391
- * Static members will not be inherited.
1392
- *
1393
- * @method extend
1394
- * @static
1395
- * @param {Function} subc the object to modify
1396
- * @param {Function} superc the object to inherit
1397
- * @param {Object} overrides additional properties/methods to add to the
1398
- * subclass prototype. These will override the
1399
- * matching items obtained from the superclass
1400
- * if present.
1401
- */
1402
- extend: function(n, t, e) {
1403
- if (!t || !n)
1404
- throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
1405
- var i = function() {
1406
- };
1407
- if (i.prototype = t.prototype, n.prototype = new i(), n.prototype.constructor = n, n.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), e) {
1408
- var r;
1409
- for (r in e)
1410
- n.prototype[r] = e[r];
1411
- var s = function() {
1412
- }, a = ["toString", "valueOf"];
1413
- try {
1414
- /MSIE/.test(navigator.userAgent) && (s = function(o, c) {
1415
- for (r = 0; r < a.length; r = r + 1) {
1416
- var h = a[r], u = c[h];
1417
- typeof u == "function" && u != Object.prototype[h] && (o[h] = u);
1418
- }
1419
- });
1420
- } catch {
1421
- }
1422
- s(n.prototype, e);
1423
- }
1424
- }
1425
- };
1470
+ function R(n, t, e) {
1471
+ if (!t || !n)
1472
+ throw new Error("extend failed, please check that all dependencies are included.");
1473
+ var i = function() {
1474
+ };
1475
+ i.prototype = t.prototype, n.prototype = new i(), n.prototype.constructor = n, n.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t);
1476
+ }
1426
1477
  /**
1427
1478
  * @fileOverview
1428
1479
  * @name asn1-1.0.js
@@ -1439,24 +1490,24 @@ p.asn1.ASN1Util = new function() {
1439
1490
  return t.length % 2 == 1 && (t = "0" + t), t;
1440
1491
  }, this.bigIntToMinTwosComplementsHex = function(n) {
1441
1492
  var t = n.toString(16);
1442
- if (t.substr(0, 1) != "-")
1493
+ if (t.substring(0, 1) != "-")
1443
1494
  t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
1444
1495
  else {
1445
- var e = t.substr(1), i = e.length;
1496
+ var e = t.substring(1), i = e.length;
1446
1497
  i % 2 == 1 ? i += 1 : t.match(/^[0-7]/) || (i += 2);
1447
1498
  for (var r = "", s = 0; s < i; s++)
1448
1499
  r += "f";
1449
- var a = new v(r, 16), o = a.xor(n).add(v.ONE);
1500
+ var a = new P(r, 16), o = a.xor(n).add(P.ONE);
1450
1501
  t = o.toString(16).replace(/^-/, "");
1451
1502
  }
1452
1503
  return t;
1453
1504
  }, this.getPEMStringFromHex = function(n, t) {
1454
1505
  return hextopem(n, t);
1455
1506
  }, this.newObject = function(n) {
1456
- var t = p, e = t.asn1, i = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, h = e.DEREnumerated, u = e.DERUTF8String, f = e.DERNumericString, _ = e.DERPrintableString, y = e.DERTeletexString, d = e.DERIA5String, m = e.DERUTCTime, g = e.DERGeneralizedTime, S = e.DERSequence, E = e.DERSet, C = e.DERTaggedObject, I = e.ASN1Util.newObject, O = Object.keys(n);
1457
- if (O.length != 1)
1507
+ var t = p, e = t.asn1, i = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, h = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, _ = e.DERIA5String, y = e.DERUTCTime, m = e.DERGeneralizedTime, S = e.DERSequence, w = e.DERSet, C = e.DERTaggedObject, B = e.ASN1Util.newObject, x = Object.keys(n);
1508
+ if (x.length != 1)
1458
1509
  throw "key of param shall be only one.";
1459
- var b = O[0];
1510
+ var b = x[0];
1460
1511
  if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + b + ":") == -1)
1461
1512
  throw "undefined key: " + b;
1462
1513
  if (b == "bool")
@@ -1472,49 +1523,49 @@ p.asn1.ASN1Util = new function() {
1472
1523
  if (b == "oid")
1473
1524
  return new c(n[b]);
1474
1525
  if (b == "enum")
1475
- return new h(n[b]);
1476
- if (b == "utf8str")
1477
1526
  return new u(n[b]);
1527
+ if (b == "utf8str")
1528
+ return new h(n[b]);
1478
1529
  if (b == "numstr")
1479
1530
  return new f(n[b]);
1480
1531
  if (b == "prnstr")
1481
- return new _(n[b]);
1532
+ return new d(n[b]);
1482
1533
  if (b == "telstr")
1483
- return new y(n[b]);
1534
+ return new g(n[b]);
1484
1535
  if (b == "ia5str")
1485
- return new d(n[b]);
1536
+ return new _(n[b]);
1486
1537
  if (b == "utctime")
1487
- return new m(n[b]);
1538
+ return new y(n[b]);
1488
1539
  if (b == "gentime")
1489
- return new g(n[b]);
1540
+ return new m(n[b]);
1490
1541
  if (b == "seq") {
1491
- for (var V = n[b], F = [], j = 0; j < V.length; j++) {
1492
- var Bt = I(V[j]);
1493
- F.push(Bt);
1542
+ for (var U = n[b], j = [], q = 0; q < U.length; q++) {
1543
+ var Ut = B(U[q]);
1544
+ j.push(Ut);
1494
1545
  }
1495
- return new S({ array: F });
1546
+ return new S({ array: j });
1496
1547
  }
1497
1548
  if (b == "set") {
1498
- for (var V = n[b], F = [], j = 0; j < V.length; j++) {
1499
- var Bt = I(V[j]);
1500
- F.push(Bt);
1549
+ for (var U = n[b], j = [], q = 0; q < U.length; q++) {
1550
+ var Ut = B(U[q]);
1551
+ j.push(Ut);
1501
1552
  }
1502
- return new E({ array: F });
1553
+ return new w({ array: j });
1503
1554
  }
1504
1555
  if (b == "tag") {
1505
- var L = n[b];
1506
- if (Object.prototype.toString.call(L) === "[object Array]" && L.length == 3) {
1507
- var Ze = I(L[2]);
1556
+ var M = n[b];
1557
+ if (Object.prototype.toString.call(M) === "[object Array]" && M.length == 3) {
1558
+ var ri = B(M[2]);
1508
1559
  return new C({
1509
- tag: L[0],
1510
- explicit: L[1],
1511
- obj: Ze
1560
+ tag: M[0],
1561
+ explicit: M[1],
1562
+ obj: ri
1512
1563
  });
1513
1564
  } else {
1514
- var ft = {};
1515
- if (L.explicit !== void 0 && (ft.explicit = L.explicit), L.tag !== void 0 && (ft.tag = L.tag), L.obj === void 0)
1565
+ var _t = {};
1566
+ if (M.explicit !== void 0 && (_t.explicit = M.explicit), M.tag !== void 0 && (_t.tag = M.tag), M.obj === void 0)
1516
1567
  throw "obj shall be specified for 'tag'.";
1517
- return ft.obj = I(L.obj), new C(ft);
1568
+ return _t.obj = B(M.obj), new C(_t);
1518
1569
  }
1519
1570
  }
1520
1571
  }, this.jsonToASN1HEX = function(n) {
@@ -1523,11 +1574,11 @@ p.asn1.ASN1Util = new function() {
1523
1574
  };
1524
1575
  }();
1525
1576
  p.asn1.ASN1Util.oidHexToInt = function(n) {
1526
- for (var r = "", t = parseInt(n.substr(0, 2), 16), e = Math.floor(t / 40), i = t % 40, r = e + "." + i, s = "", a = 2; a < n.length; a += 2) {
1527
- var o = parseInt(n.substr(a, 2), 16), c = ("00000000" + o.toString(2)).slice(-8);
1528
- if (s = s + c.substr(1, 7), c.substr(0, 1) == "0") {
1529
- var h = new v(s, 2);
1530
- r = r + "." + h.toString(10), s = "";
1577
+ for (var r = "", t = parseInt(n.substring(0, 2), 16), e = Math.floor(t / 40), i = t % 40, r = e + "." + i, s = "", a = 2; a < n.length; a += 2) {
1578
+ var o = parseInt(n.substring(a, a + 2), 16), c = ("00000000" + o.toString(2)).slice(-8);
1579
+ if (s = s + c.substring(1, 8), c.substring(0, 1) == "0") {
1580
+ var u = new P(s, 2);
1581
+ r = r + "." + u.toString(10), s = "";
1531
1582
  }
1532
1583
  }
1533
1584
  return r;
@@ -1537,14 +1588,14 @@ p.asn1.ASN1Util.oidIntToHex = function(n) {
1537
1588
  var c = o.toString(16);
1538
1589
  return c.length == 1 && (c = "0" + c), c;
1539
1590
  }, e = function(o) {
1540
- var c = "", h = new v(o, 10), u = h.toString(2), f = 7 - u.length % 7;
1591
+ var c = "", u = new P(o, 10), h = u.toString(2), f = 7 - h.length % 7;
1541
1592
  f == 7 && (f = 0);
1542
- for (var _ = "", y = 0; y < f; y++)
1543
- _ += "0";
1544
- u = _ + u;
1545
- for (var y = 0; y < u.length - 1; y += 7) {
1546
- var d = u.substr(y, 7);
1547
- y != u.length - 7 && (d = "1" + d), c += t(parseInt(d, 2));
1593
+ for (var d = "", g = 0; g < f; g++)
1594
+ d += "0";
1595
+ h = d + h;
1596
+ for (var g = 0; g < h.length - 1; g += 7) {
1597
+ var _ = h.substring(g, g + 7);
1598
+ g != h.length - 7 && (_ = "1" + _), c += t(parseInt(_, 2));
1548
1599
  }
1549
1600
  return c;
1550
1601
  };
@@ -1590,7 +1641,7 @@ p.asn1.DERAbstractString = function(n) {
1590
1641
  return this.hV;
1591
1642
  }, typeof n < "u" && (typeof n == "string" ? this.setString(n) : typeof n.str < "u" ? this.setString(n.str) : typeof n.hex < "u" && this.setStringHex(n.hex));
1592
1643
  };
1593
- R.lang.extend(p.asn1.DERAbstractString, p.asn1.ASN1Object);
1644
+ R(p.asn1.DERAbstractString, p.asn1.ASN1Object);
1594
1645
  p.asn1.DERAbstractTime = function(n) {
1595
1646
  p.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
1596
1647
  utc = t.getTime() + t.getTimezoneOffset() * 6e4;
@@ -1598,16 +1649,16 @@ p.asn1.DERAbstractTime = function(n) {
1598
1649
  return e;
1599
1650
  }, this.formatDate = function(t, e, i) {
1600
1651
  var r = this.zeroPadding, s = this.localDateToUTC(t), a = String(s.getFullYear());
1601
- e == "utc" && (a = a.substr(2, 2));
1602
- var o = r(String(s.getMonth() + 1), 2), c = r(String(s.getDate()), 2), h = r(String(s.getHours()), 2), u = r(String(s.getMinutes()), 2), f = r(String(s.getSeconds()), 2), _ = a + o + c + h + u + f;
1652
+ e == "utc" && (a = a.substring(2, 4));
1653
+ var o = r(String(s.getMonth() + 1), 2), c = r(String(s.getDate()), 2), u = r(String(s.getHours()), 2), h = r(String(s.getMinutes()), 2), f = r(String(s.getSeconds()), 2), d = a + o + c + u + h + f;
1603
1654
  if (i === !0) {
1604
- var y = s.getMilliseconds();
1605
- if (y != 0) {
1606
- var d = r(String(y), 3);
1607
- d = d.replace(/[0]+$/, ""), _ = _ + "." + d;
1655
+ var g = s.getMilliseconds();
1656
+ if (g != 0) {
1657
+ var _ = r(String(g), 3);
1658
+ _ = _.replace(/[0]+$/, ""), d = d + "." + _;
1608
1659
  }
1609
1660
  }
1610
- return _ + "Z";
1661
+ return d + "Z";
1611
1662
  }, this.zeroPadding = function(t, e) {
1612
1663
  return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t;
1613
1664
  }, this.getString = function() {
@@ -1621,7 +1672,7 @@ p.asn1.DERAbstractTime = function(n) {
1621
1672
  return this.hV;
1622
1673
  };
1623
1674
  };
1624
- R.lang.extend(p.asn1.DERAbstractTime, p.asn1.ASN1Object);
1675
+ R(p.asn1.DERAbstractTime, p.asn1.ASN1Object);
1625
1676
  p.asn1.DERAbstractStructured = function(n) {
1626
1677
  p.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
1627
1678
  this.hTLV = null, this.isModified = !0, this.asn1Array = t;
@@ -1629,16 +1680,16 @@ p.asn1.DERAbstractStructured = function(n) {
1629
1680
  this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
1630
1681
  }, this.asn1Array = new Array(), typeof n < "u" && typeof n.array < "u" && (this.asn1Array = n.array);
1631
1682
  };
1632
- R.lang.extend(p.asn1.DERAbstractStructured, p.asn1.ASN1Object);
1683
+ R(p.asn1.DERAbstractStructured, p.asn1.ASN1Object);
1633
1684
  p.asn1.DERBoolean = function() {
1634
1685
  p.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
1635
1686
  };
1636
- R.lang.extend(p.asn1.DERBoolean, p.asn1.ASN1Object);
1687
+ R(p.asn1.DERBoolean, p.asn1.ASN1Object);
1637
1688
  p.asn1.DERInteger = function(n) {
1638
1689
  p.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
1639
1690
  this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1640
1691
  }, this.setByInteger = function(t) {
1641
- var e = new v(String(t), 10);
1692
+ var e = new P(String(t), 10);
1642
1693
  this.setByBigInteger(e);
1643
1694
  }, this.setValueHex = function(t) {
1644
1695
  this.hV = t;
@@ -1646,7 +1697,7 @@ p.asn1.DERInteger = function(n) {
1646
1697
  return this.hV;
1647
1698
  }, typeof n < "u" && (typeof n.bigint < "u" ? this.setByBigInteger(n.bigint) : typeof n.int < "u" ? this.setByInteger(n.int) : typeof n == "number" ? this.setByInteger(n) : typeof n.hex < "u" && this.setValueHex(n.hex));
1648
1699
  };
1649
- R.lang.extend(p.asn1.DERInteger, p.asn1.ASN1Object);
1700
+ R(p.asn1.DERInteger, p.asn1.ASN1Object);
1650
1701
  p.asn1.DERBitString = function(n) {
1651
1702
  if (n !== void 0 && typeof n.obj < "u") {
1652
1703
  var t = p.asn1.ASN1Util.newObject(n.obj);
@@ -1666,7 +1717,7 @@ p.asn1.DERBitString = function(n) {
1666
1717
  for (var r = 0; r <= i; r++)
1667
1718
  e += "0";
1668
1719
  for (var s = "", r = 0; r < e.length - 1; r += 8) {
1669
- var a = e.substr(r, 8), o = parseInt(a, 2).toString(16);
1720
+ var a = e.substring(r, r + 8), o = parseInt(a, 2).toString(16);
1670
1721
  o.length == 1 && (o = "0" + o), s += o;
1671
1722
  }
1672
1723
  this.hTLV = null, this.isModified = !0, this.hV = "0" + i + s;
@@ -1682,7 +1733,7 @@ p.asn1.DERBitString = function(n) {
1682
1733
  return this.hV;
1683
1734
  }, typeof n < "u" && (typeof n == "string" && n.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(n) : typeof n.hex < "u" ? this.setHexValueIncludingUnusedBits(n.hex) : typeof n.bin < "u" ? this.setByBinaryString(n.bin) : typeof n.array < "u" && this.setByBooleanArray(n.array));
1684
1735
  };
1685
- R.lang.extend(p.asn1.DERBitString, p.asn1.ASN1Object);
1736
+ R(p.asn1.DERBitString, p.asn1.ASN1Object);
1686
1737
  p.asn1.DEROctetString = function(n) {
1687
1738
  if (n !== void 0 && typeof n.obj < "u") {
1688
1739
  var t = p.asn1.ASN1Util.newObject(n.obj);
@@ -1690,24 +1741,24 @@ p.asn1.DEROctetString = function(n) {
1690
1741
  }
1691
1742
  p.asn1.DEROctetString.superclass.constructor.call(this, n), this.hT = "04";
1692
1743
  };
1693
- R.lang.extend(p.asn1.DEROctetString, p.asn1.DERAbstractString);
1744
+ R(p.asn1.DEROctetString, p.asn1.DERAbstractString);
1694
1745
  p.asn1.DERNull = function() {
1695
1746
  p.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
1696
1747
  };
1697
- R.lang.extend(p.asn1.DERNull, p.asn1.ASN1Object);
1748
+ R(p.asn1.DERNull, p.asn1.ASN1Object);
1698
1749
  p.asn1.DERObjectIdentifier = function(n) {
1699
1750
  var t = function(i) {
1700
1751
  var r = i.toString(16);
1701
1752
  return r.length == 1 && (r = "0" + r), r;
1702
1753
  }, e = function(i) {
1703
- var r = "", s = new v(i, 10), a = s.toString(2), o = 7 - a.length % 7;
1754
+ var r = "", s = new P(i, 10), a = s.toString(2), o = 7 - a.length % 7;
1704
1755
  o == 7 && (o = 0);
1705
- for (var c = "", h = 0; h < o; h++)
1756
+ for (var c = "", u = 0; u < o; u++)
1706
1757
  c += "0";
1707
1758
  a = c + a;
1708
- for (var h = 0; h < a.length - 1; h += 7) {
1709
- var u = a.substr(h, 7);
1710
- h != a.length - 7 && (u = "1" + u), r += t(parseInt(u, 2));
1759
+ for (var u = 0; u < a.length - 1; u += 7) {
1760
+ var h = a.substring(u, u + 7);
1761
+ u != a.length - 7 && (h = "1" + h), r += t(parseInt(h, 2));
1711
1762
  }
1712
1763
  return r;
1713
1764
  };
@@ -1731,12 +1782,12 @@ p.asn1.DERObjectIdentifier = function(n) {
1731
1782
  return this.hV;
1732
1783
  }, n !== void 0 && (typeof n == "string" ? n.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(n) : this.setValueName(n) : n.oid !== void 0 ? this.setValueOidString(n.oid) : n.hex !== void 0 ? this.setValueHex(n.hex) : n.name !== void 0 && this.setValueName(n.name));
1733
1784
  };
1734
- R.lang.extend(p.asn1.DERObjectIdentifier, p.asn1.ASN1Object);
1785
+ R(p.asn1.DERObjectIdentifier, p.asn1.ASN1Object);
1735
1786
  p.asn1.DEREnumerated = function(n) {
1736
1787
  p.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
1737
1788
  this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1738
1789
  }, this.setByInteger = function(t) {
1739
- var e = new v(String(t), 10);
1790
+ var e = new P(String(t), 10);
1740
1791
  this.setByBigInteger(e);
1741
1792
  }, this.setValueHex = function(t) {
1742
1793
  this.hV = t;
@@ -1744,27 +1795,27 @@ p.asn1.DEREnumerated = function(n) {
1744
1795
  return this.hV;
1745
1796
  }, typeof n < "u" && (typeof n.int < "u" ? this.setByInteger(n.int) : typeof n == "number" ? this.setByInteger(n) : typeof n.hex < "u" && this.setValueHex(n.hex));
1746
1797
  };
1747
- R.lang.extend(p.asn1.DEREnumerated, p.asn1.ASN1Object);
1798
+ R(p.asn1.DEREnumerated, p.asn1.ASN1Object);
1748
1799
  p.asn1.DERUTF8String = function(n) {
1749
1800
  p.asn1.DERUTF8String.superclass.constructor.call(this, n), this.hT = "0c";
1750
1801
  };
1751
- R.lang.extend(p.asn1.DERUTF8String, p.asn1.DERAbstractString);
1802
+ R(p.asn1.DERUTF8String, p.asn1.DERAbstractString);
1752
1803
  p.asn1.DERNumericString = function(n) {
1753
1804
  p.asn1.DERNumericString.superclass.constructor.call(this, n), this.hT = "12";
1754
1805
  };
1755
- R.lang.extend(p.asn1.DERNumericString, p.asn1.DERAbstractString);
1806
+ R(p.asn1.DERNumericString, p.asn1.DERAbstractString);
1756
1807
  p.asn1.DERPrintableString = function(n) {
1757
1808
  p.asn1.DERPrintableString.superclass.constructor.call(this, n), this.hT = "13";
1758
1809
  };
1759
- R.lang.extend(p.asn1.DERPrintableString, p.asn1.DERAbstractString);
1810
+ R(p.asn1.DERPrintableString, p.asn1.DERAbstractString);
1760
1811
  p.asn1.DERTeletexString = function(n) {
1761
1812
  p.asn1.DERTeletexString.superclass.constructor.call(this, n), this.hT = "14";
1762
1813
  };
1763
- R.lang.extend(p.asn1.DERTeletexString, p.asn1.DERAbstractString);
1814
+ R(p.asn1.DERTeletexString, p.asn1.DERAbstractString);
1764
1815
  p.asn1.DERIA5String = function(n) {
1765
1816
  p.asn1.DERIA5String.superclass.constructor.call(this, n), this.hT = "16";
1766
1817
  };
1767
- R.lang.extend(p.asn1.DERIA5String, p.asn1.DERAbstractString);
1818
+ R(p.asn1.DERIA5String, p.asn1.DERAbstractString);
1768
1819
  p.asn1.DERUTCTime = function(n) {
1769
1820
  p.asn1.DERUTCTime.superclass.constructor.call(this, n), this.hT = "17", this.setByDate = function(t) {
1770
1821
  this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
@@ -1772,7 +1823,7 @@ p.asn1.DERUTCTime = function(n) {
1772
1823
  return typeof this.date > "u" && typeof this.s > "u" && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
1773
1824
  }, n !== void 0 && (n.str !== void 0 ? this.setString(n.str) : typeof n == "string" && n.match(/^[0-9]{12}Z$/) ? this.setString(n) : n.hex !== void 0 ? this.setStringHex(n.hex) : n.date !== void 0 && this.setByDate(n.date));
1774
1825
  };
1775
- R.lang.extend(p.asn1.DERUTCTime, p.asn1.DERAbstractTime);
1826
+ R(p.asn1.DERUTCTime, p.asn1.DERAbstractTime);
1776
1827
  p.asn1.DERGeneralizedTime = function(n) {
1777
1828
  p.asn1.DERGeneralizedTime.superclass.constructor.call(this, n), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
1778
1829
  this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
@@ -1780,7 +1831,7 @@ p.asn1.DERGeneralizedTime = function(n) {
1780
1831
  return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
1781
1832
  }, n !== void 0 && (n.str !== void 0 ? this.setString(n.str) : typeof n == "string" && n.match(/^[0-9]{14}Z$/) ? this.setString(n) : n.hex !== void 0 ? this.setStringHex(n.hex) : n.date !== void 0 && this.setByDate(n.date), n.millis === !0 && (this.withMillis = !0));
1782
1833
  };
1783
- R.lang.extend(p.asn1.DERGeneralizedTime, p.asn1.DERAbstractTime);
1834
+ R(p.asn1.DERGeneralizedTime, p.asn1.DERAbstractTime);
1784
1835
  p.asn1.DERSequence = function(n) {
1785
1836
  p.asn1.DERSequence.superclass.constructor.call(this, n), this.hT = "30", this.getFreshValueHex = function() {
1786
1837
  for (var t = "", e = 0; e < this.asn1Array.length; e++) {
@@ -1790,7 +1841,7 @@ p.asn1.DERSequence = function(n) {
1790
1841
  return this.hV = t, this.hV;
1791
1842
  };
1792
1843
  };
1793
- R.lang.extend(p.asn1.DERSequence, p.asn1.DERAbstractStructured);
1844
+ R(p.asn1.DERSequence, p.asn1.DERAbstractStructured);
1794
1845
  p.asn1.DERSet = function(n) {
1795
1846
  p.asn1.DERSet.superclass.constructor.call(this, n), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
1796
1847
  for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
@@ -1800,7 +1851,7 @@ p.asn1.DERSet = function(n) {
1800
1851
  return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
1801
1852
  }, typeof n < "u" && typeof n.sortflag < "u" && n.sortflag == !1 && (this.sortFlag = !1);
1802
1853
  };
1803
- R.lang.extend(p.asn1.DERSet, p.asn1.DERAbstractStructured);
1854
+ R(p.asn1.DERSet, p.asn1.DERAbstractStructured);
1804
1855
  p.asn1.DERTaggedObject = function(n) {
1805
1856
  p.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, i) {
1806
1857
  this.hT = e, this.isExplicit = t, this.asn1Object = i, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = i.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
@@ -1808,8 +1859,8 @@ p.asn1.DERTaggedObject = function(n) {
1808
1859
  return this.hV;
1809
1860
  }, typeof n < "u" && (typeof n.tag < "u" && (this.hT = n.tag), typeof n.explicit < "u" && (this.isExplicit = n.explicit), typeof n.obj < "u" && (this.asn1Object = n.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
1810
1861
  };
1811
- R.lang.extend(p.asn1.DERTaggedObject, p.asn1.ASN1Object);
1812
- var wi = /* @__PURE__ */ function() {
1862
+ R(p.asn1.DERTaggedObject, p.asn1.ASN1Object);
1863
+ var Fi = /* @__PURE__ */ function() {
1813
1864
  var n = function(t, e) {
1814
1865
  return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
1815
1866
  i.__proto__ = r;
@@ -1826,35 +1877,35 @@ var wi = /* @__PURE__ */ function() {
1826
1877
  }
1827
1878
  t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i());
1828
1879
  };
1829
- }(), he = (
1880
+ }(), _e = (
1830
1881
  /** @class */
1831
1882
  function(n) {
1832
- wi(t, n);
1883
+ Fi(t, n);
1833
1884
  function t(e) {
1834
1885
  var i = n.call(this) || this;
1835
1886
  return e && (typeof e == "string" ? i.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && i.parsePropertiesFrom(e)), i;
1836
1887
  }
1837
1888
  return t.prototype.parseKey = function(e) {
1838
1889
  try {
1839
- var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? si.decode(e) : Ft.unarmor(e), o = ci.decode(a);
1890
+ var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? li.decode(e) : Kt.unarmor(e), o = di.decode(a);
1840
1891
  if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
1841
1892
  i = o.sub[1].getHexStringValue(), this.n = A(i, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
1842
1893
  var c = o.sub[3].getHexStringValue();
1843
1894
  this.d = A(c, 16);
1844
- var h = o.sub[4].getHexStringValue();
1845
- this.p = A(h, 16);
1846
- var u = o.sub[5].getHexStringValue();
1847
- this.q = A(u, 16);
1895
+ var u = o.sub[4].getHexStringValue();
1896
+ this.p = A(u, 16);
1897
+ var h = o.sub[5].getHexStringValue();
1898
+ this.q = A(h, 16);
1848
1899
  var f = o.sub[6].getHexStringValue();
1849
1900
  this.dmp1 = A(f, 16);
1850
- var _ = o.sub[7].getHexStringValue();
1851
- this.dmq1 = A(_, 16);
1852
- var y = o.sub[8].getHexStringValue();
1853
- this.coeff = A(y, 16);
1901
+ var d = o.sub[7].getHexStringValue();
1902
+ this.dmq1 = A(d, 16);
1903
+ var g = o.sub[8].getHexStringValue();
1904
+ this.coeff = A(g, 16);
1854
1905
  } else if (o.sub.length === 2)
1855
1906
  if (o.sub[0].sub) {
1856
- var d = o.sub[1], m = d.sub[0];
1857
- i = m.sub[0].getHexStringValue(), this.n = A(i, 16), r = m.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1907
+ var _ = o.sub[1], y = _.sub[0];
1908
+ i = y.sub[0].getHexStringValue(), this.n = A(i, 16), r = y.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1858
1909
  } else
1859
1910
  i = o.sub[0].getHexStringValue(), this.n = A(i, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
1860
1911
  else
@@ -1879,11 +1930,12 @@ var wi = /* @__PURE__ */ function() {
1879
1930
  }, i = new p.asn1.DERSequence(e);
1880
1931
  return i.getEncodedHex();
1881
1932
  }, t.prototype.getPrivateBaseKeyB64 = function() {
1882
- return Et(this.getPrivateBaseKey());
1933
+ return ut(this.getPrivateBaseKey());
1883
1934
  }, t.prototype.getPublicBaseKey = function() {
1884
1935
  var e = new p.asn1.DERSequence({
1885
1936
  array: [
1886
1937
  new p.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
1938
+ // RSA Encryption pkcs #1 oid
1887
1939
  new p.asn1.DERNull()
1888
1940
  ]
1889
1941
  }), i = new p.asn1.DERSequence({
@@ -1898,7 +1950,7 @@ var wi = /* @__PURE__ */ function() {
1898
1950
  });
1899
1951
  return s.getEncodedHex();
1900
1952
  }, t.prototype.getPublicBaseKeyB64 = function() {
1901
- return Et(this.getPublicBaseKey());
1953
+ return ut(this.getPublicBaseKey());
1902
1954
  }, t.wordwrap = function(e, i) {
1903
1955
  if (i = i || 64, !e)
1904
1956
  return e;
@@ -1923,46 +1975,66 @@ var wi = /* @__PURE__ */ function() {
1923
1975
  }, t.prototype.parsePropertiesFrom = function(e) {
1924
1976
  this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
1925
1977
  }, t;
1926
- }(yi)
1927
- ), Ut, Ei = typeof process < "u" ? (Ut = process.env) === null || Ut === void 0 ? void 0 : Ut.npm_package_version : void 0, Si = (
1978
+ }(Ui)
1979
+ ), kt, ji = typeof process < "u" ? (kt = process.env) === null || kt === void 0 ? void 0 : kt.npm_package_version : void 0, qi = (
1928
1980
  /** @class */
1929
1981
  function() {
1930
1982
  function n(t) {
1931
- t === void 0 && (t = {}), t = t || {}, this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = null;
1983
+ t === void 0 && (t = {}), this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = t.key || null;
1932
1984
  }
1933
1985
  return n.prototype.setKey = function(t) {
1934
- this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new he(t);
1986
+ t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new _e(t)) : !this.key && this.log && console.error("A key was not set.");
1935
1987
  }, n.prototype.setPrivateKey = function(t) {
1936
1988
  this.setKey(t);
1937
1989
  }, n.prototype.setPublicKey = function(t) {
1938
1990
  this.setKey(t);
1939
1991
  }, n.prototype.decrypt = function(t) {
1940
1992
  try {
1941
- return this.getKey().decrypt(ne(t));
1993
+ return this.getKey().decrypt(ae(t));
1942
1994
  } catch {
1943
1995
  return !1;
1944
1996
  }
1945
1997
  }, n.prototype.encrypt = function(t) {
1946
1998
  try {
1947
- return Et(this.getKey().encrypt(t));
1999
+ return ut(this.getKey().encrypt(t));
2000
+ } catch {
2001
+ return !1;
2002
+ }
2003
+ }, n.prototype.encryptOAEP = function(t) {
2004
+ try {
2005
+ return ut(this.getKey().encrypt(t, Vi));
1948
2006
  } catch {
1949
2007
  return !1;
1950
2008
  }
1951
2009
  }, n.prototype.sign = function(t, e, i) {
2010
+ e === void 0 && (e = function(r) {
2011
+ return r;
2012
+ }), i === void 0 && (i = "");
1952
2013
  try {
1953
- return Et(this.getKey().sign(t, e, i));
2014
+ return ut(this.getKey().sign(t, e, i));
1954
2015
  } catch {
1955
2016
  return !1;
1956
2017
  }
2018
+ }, n.prototype.signSha256 = function(t) {
2019
+ return this.sign(t, function(e) {
2020
+ return pe(Ht(e));
2021
+ }, "sha256");
1957
2022
  }, n.prototype.verify = function(t, e, i) {
2023
+ i === void 0 && (i = function(r) {
2024
+ return r;
2025
+ });
1958
2026
  try {
1959
- return this.getKey().verify(t, ne(e), i);
2027
+ return this.getKey().verify(t, ae(e), i);
1960
2028
  } catch {
1961
2029
  return !1;
1962
2030
  }
2031
+ }, n.prototype.verifySha256 = function(t, e) {
2032
+ return this.verify(t, e, function(i) {
2033
+ return pe(Ht(i));
2034
+ });
1963
2035
  }, n.prototype.getKey = function(t) {
1964
2036
  if (!this.key) {
1965
- if (this.key = new he(), t && {}.toString.call(t) === "[object Function]") {
2037
+ if (this.key = new _e(), t && {}.toString.call(t) === "[object Function]") {
1966
2038
  this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
1967
2039
  return;
1968
2040
  }
@@ -1977,53 +2049,53 @@ var wi = /* @__PURE__ */ function() {
1977
2049
  return this.getKey().getPublicKey();
1978
2050
  }, n.prototype.getPublicKeyB64 = function() {
1979
2051
  return this.getKey().getPublicBaseKeyB64();
1980
- }, n.version = Ei, n;
2052
+ }, n.version = ji, n;
1981
2053
  }()
1982
2054
  );
1983
- function Ae(n, t) {
2055
+ function Be(n, t) {
1984
2056
  return function() {
1985
2057
  return n.apply(t, arguments);
1986
2058
  };
1987
2059
  }
1988
- const { toString: Ti } = Object.prototype, { getPrototypeOf: $t } = Object, { iterator: At, toStringTag: Re } = Symbol, Rt = /* @__PURE__ */ ((n) => (t) => {
1989
- const e = Ti.call(t);
2060
+ const { toString: Ki } = Object.prototype, { getPrototypeOf: Zt } = Object, { iterator: xt, toStringTag: Ne } = Symbol, Dt = /* @__PURE__ */ ((n) => (t) => {
2061
+ const e = Ki.call(t);
1990
2062
  return n[e] || (n[e] = e.slice(8, -1).toLowerCase());
1991
- })(/* @__PURE__ */ Object.create(null)), k = (n) => (n = n.toLowerCase(), (t) => Rt(t) === n), Ot = (n) => (t) => typeof t === n, { isArray: nt } = Array, ot = Ot("undefined");
1992
- function ct(n) {
1993
- return n !== null && !ot(n) && n.constructor !== null && !ot(n.constructor) && B(n.constructor.isBuffer) && n.constructor.isBuffer(n);
2063
+ })(/* @__PURE__ */ Object.create(null)), F = (n) => (n = n.toLowerCase(), (t) => Dt(t) === n), It = (n) => (t) => typeof t === n, { isArray: st } = Array, ht = It("undefined");
2064
+ function lt(n) {
2065
+ return n !== null && !ht(n) && n.constructor !== null && !ht(n.constructor) && N(n.constructor.isBuffer) && n.constructor.isBuffer(n);
1994
2066
  }
1995
- const Oe = k("ArrayBuffer");
1996
- function Ci(n) {
2067
+ const Ve = F("ArrayBuffer");
2068
+ function Hi(n) {
1997
2069
  let t;
1998
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer && Oe(n.buffer), t;
2070
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer && Ve(n.buffer), t;
1999
2071
  }
2000
- const Ai = Ot("string"), B = Ot("function"), xe = Ot("number"), ut = (n) => n !== null && typeof n == "object", Ri = (n) => n === !0 || n === !1, Pt = (n) => {
2001
- if (Rt(n) !== "object")
2072
+ const Wi = It("string"), N = It("function"), Ue = It("number"), ft = (n) => n !== null && typeof n == "object", Xi = (n) => n === !0 || n === !1, wt = (n) => {
2073
+ if (Dt(n) !== "object")
2002
2074
  return !1;
2003
- const t = $t(n);
2004
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Re in n) && !(At in n);
2005
- }, Oi = (n) => {
2006
- if (!ut(n) || ct(n))
2075
+ const t = Zt(n);
2076
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ne in n) && !(xt in n);
2077
+ }, zi = (n) => {
2078
+ if (!ft(n) || lt(n))
2007
2079
  return !1;
2008
2080
  try {
2009
2081
  return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
2010
2082
  } catch {
2011
2083
  return !1;
2012
2084
  }
2013
- }, xi = k("Date"), Di = k("File"), Ii = k("Blob"), Bi = k("FileList"), Ni = (n) => ut(n) && B(n.pipe), Vi = (n) => {
2085
+ }, Gi = F("Date"), $i = F("File"), Ji = F("Blob"), Qi = F("FileList"), Zi = (n) => ft(n) && N(n.pipe), Yi = (n) => {
2014
2086
  let t;
2015
- return n && (typeof FormData == "function" && n instanceof FormData || B(n.append) && ((t = Rt(n)) === "formdata" || // detect form-data instance
2016
- t === "object" && B(n.toString) && n.toString() === "[object FormData]"));
2017
- }, Ui = k("URLSearchParams"), [Li, Mi, ki, Fi] = ["ReadableStream", "Request", "Response", "Headers"].map(k), ji = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2018
- function ht(n, t, { allOwnKeys: e = !1 } = {}) {
2087
+ return n && (typeof FormData == "function" && n instanceof FormData || N(n.append) && ((t = Dt(n)) === "formdata" || // detect form-data instance
2088
+ t === "object" && N(n.toString) && n.toString() === "[object FormData]"));
2089
+ }, tn = F("URLSearchParams"), [en, nn, rn, sn] = ["ReadableStream", "Request", "Response", "Headers"].map(F), an = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2090
+ function pt(n, t, { allOwnKeys: e = !1 } = {}) {
2019
2091
  if (n === null || typeof n > "u")
2020
2092
  return;
2021
2093
  let i, r;
2022
- if (typeof n != "object" && (n = [n]), nt(n))
2094
+ if (typeof n != "object" && (n = [n]), st(n))
2023
2095
  for (i = 0, r = n.length; i < r; i++)
2024
2096
  t.call(null, n[i], i, n);
2025
2097
  else {
2026
- if (ct(n))
2098
+ if (lt(n))
2027
2099
  return;
2028
2100
  const s = e ? Object.getOwnPropertyNames(n) : Object.keys(n), a = s.length;
2029
2101
  let o;
@@ -2031,8 +2103,8 @@ function ht(n, t, { allOwnKeys: e = !1 } = {}) {
2031
2103
  o = s[i], t.call(null, n[o], o, n);
2032
2104
  }
2033
2105
  }
2034
- function De(n, t) {
2035
- if (ct(n))
2106
+ function Le(n, t) {
2107
+ if (lt(n))
2036
2108
  return null;
2037
2109
  t = t.toLowerCase();
2038
2110
  const e = Object.keys(n);
@@ -2042,75 +2114,75 @@ function De(n, t) {
2042
2114
  return r;
2043
2115
  return null;
2044
2116
  }
2045
- const $ = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ie = (n) => !ot(n) && n !== $;
2046
- function qt() {
2047
- const { caseless: n } = Ie(this) && this || {}, t = {}, e = (i, r) => {
2048
- const s = n && De(t, r) || r;
2049
- Pt(t[s]) && Pt(i) ? t[s] = qt(t[s], i) : Pt(i) ? t[s] = qt({}, i) : nt(i) ? t[s] = i.slice() : t[s] = i;
2117
+ const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Me = (n) => !ht(n) && n !== Q;
2118
+ function Wt() {
2119
+ const { caseless: n } = Me(this) && this || {}, t = {}, e = (i, r) => {
2120
+ const s = n && Le(t, r) || r;
2121
+ wt(t[s]) && wt(i) ? t[s] = Wt(t[s], i) : wt(i) ? t[s] = Wt({}, i) : st(i) ? t[s] = i.slice() : t[s] = i;
2050
2122
  };
2051
2123
  for (let i = 0, r = arguments.length; i < r; i++)
2052
- arguments[i] && ht(arguments[i], e);
2124
+ arguments[i] && pt(arguments[i], e);
2053
2125
  return t;
2054
2126
  }
2055
- const qi = (n, t, e, { allOwnKeys: i } = {}) => (ht(t, (r, s) => {
2056
- e && B(r) ? n[s] = Ae(r, e) : n[s] = r;
2057
- }, { allOwnKeys: i }), n), Ki = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), Hi = (n, t, e, i) => {
2127
+ const on = (n, t, e, { allOwnKeys: i } = {}) => (pt(t, (r, s) => {
2128
+ e && N(r) ? n[s] = Be(r, e) : n[s] = r;
2129
+ }, { allOwnKeys: i }), n), cn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), un = (n, t, e, i) => {
2058
2130
  n.prototype = Object.create(t.prototype, i), n.prototype.constructor = n, Object.defineProperty(n, "super", {
2059
2131
  value: t.prototype
2060
2132
  }), e && Object.assign(n.prototype, e);
2061
- }, Wi = (n, t, e, i) => {
2133
+ }, hn = (n, t, e, i) => {
2062
2134
  let r, s, a;
2063
2135
  const o = {};
2064
2136
  if (t = t || {}, n == null) return t;
2065
2137
  do {
2066
2138
  for (r = Object.getOwnPropertyNames(n), s = r.length; s-- > 0; )
2067
2139
  a = r[s], (!i || i(a, n, t)) && !o[a] && (t[a] = n[a], o[a] = !0);
2068
- n = e !== !1 && $t(n);
2140
+ n = e !== !1 && Zt(n);
2069
2141
  } while (n && (!e || e(n, t)) && n !== Object.prototype);
2070
2142
  return t;
2071
- }, Xi = (n, t, e) => {
2143
+ }, ln = (n, t, e) => {
2072
2144
  n = String(n), (e === void 0 || e > n.length) && (e = n.length), e -= t.length;
2073
2145
  const i = n.indexOf(t, e);
2074
2146
  return i !== -1 && i === e;
2075
- }, zi = (n) => {
2147
+ }, fn = (n) => {
2076
2148
  if (!n) return null;
2077
- if (nt(n)) return n;
2149
+ if (st(n)) return n;
2078
2150
  let t = n.length;
2079
- if (!xe(t)) return null;
2151
+ if (!Ue(t)) return null;
2080
2152
  const e = new Array(t);
2081
2153
  for (; t-- > 0; )
2082
2154
  e[t] = n[t];
2083
2155
  return e;
2084
- }, Gi = /* @__PURE__ */ ((n) => (t) => n && t instanceof n)(typeof Uint8Array < "u" && $t(Uint8Array)), $i = (n, t) => {
2085
- const i = (n && n[At]).call(n);
2156
+ }, pn = /* @__PURE__ */ ((n) => (t) => n && t instanceof n)(typeof Uint8Array < "u" && Zt(Uint8Array)), dn = (n, t) => {
2157
+ const i = (n && n[xt]).call(n);
2086
2158
  let r;
2087
2159
  for (; (r = i.next()) && !r.done; ) {
2088
2160
  const s = r.value;
2089
2161
  t.call(n, s[0], s[1]);
2090
2162
  }
2091
- }, Ji = (n, t) => {
2163
+ }, _n = (n, t) => {
2092
2164
  let e;
2093
2165
  const i = [];
2094
2166
  for (; (e = n.exec(t)) !== null; )
2095
2167
  i.push(e);
2096
2168
  return i;
2097
- }, Qi = k("HTMLFormElement"), Zi = (n) => n.toLowerCase().replace(
2169
+ }, gn = F("HTMLFormElement"), mn = (n) => n.toLowerCase().replace(
2098
2170
  /[-_\s]([a-z\d])(\w*)/g,
2099
2171
  function(e, i, r) {
2100
2172
  return i.toUpperCase() + r;
2101
2173
  }
2102
- ), le = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), Yi = k("RegExp"), Be = (n, t) => {
2174
+ ), ge = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), yn = F("RegExp"), ke = (n, t) => {
2103
2175
  const e = Object.getOwnPropertyDescriptors(n), i = {};
2104
- ht(e, (r, s) => {
2176
+ pt(e, (r, s) => {
2105
2177
  let a;
2106
2178
  (a = t(r, s, n)) !== !1 && (i[s] = a || r);
2107
2179
  }), Object.defineProperties(n, i);
2108
- }, tn = (n) => {
2109
- Be(n, (t, e) => {
2110
- if (B(n) && ["arguments", "caller", "callee"].indexOf(e) !== -1)
2180
+ }, bn = (n) => {
2181
+ ke(n, (t, e) => {
2182
+ if (N(n) && ["arguments", "caller", "callee"].indexOf(e) !== -1)
2111
2183
  return !1;
2112
2184
  const i = n[e];
2113
- if (B(i)) {
2185
+ if (N(i)) {
2114
2186
  if (t.enumerable = !1, "writable" in t) {
2115
2187
  t.writable = !1;
2116
2188
  return;
@@ -2120,108 +2192,108 @@ const qi = (n, t, e, { allOwnKeys: i } = {}) => (ht(t, (r, s) => {
2120
2192
  });
2121
2193
  }
2122
2194
  });
2123
- }, en = (n, t) => {
2195
+ }, Pn = (n, t) => {
2124
2196
  const e = {}, i = (r) => {
2125
2197
  r.forEach((s) => {
2126
2198
  e[s] = !0;
2127
2199
  });
2128
2200
  };
2129
- return nt(n) ? i(n) : i(String(n).split(t)), e;
2130
- }, nn = () => {
2131
- }, rn = (n, t) => n != null && Number.isFinite(n = +n) ? n : t;
2132
- function sn(n) {
2133
- return !!(n && B(n.append) && n[Re] === "FormData" && n[At]);
2201
+ return st(n) ? i(n) : i(String(n).split(t)), e;
2202
+ }, vn = () => {
2203
+ }, En = (n, t) => n != null && Number.isFinite(n = +n) ? n : t;
2204
+ function wn(n) {
2205
+ return !!(n && N(n.append) && n[Ne] === "FormData" && n[xt]);
2134
2206
  }
2135
- const an = (n) => {
2207
+ const Sn = (n) => {
2136
2208
  const t = new Array(10), e = (i, r) => {
2137
- if (ut(i)) {
2209
+ if (ft(i)) {
2138
2210
  if (t.indexOf(i) >= 0)
2139
2211
  return;
2140
- if (ct(i))
2212
+ if (lt(i))
2141
2213
  return i;
2142
2214
  if (!("toJSON" in i)) {
2143
2215
  t[r] = i;
2144
- const s = nt(i) ? [] : {};
2145
- return ht(i, (a, o) => {
2216
+ const s = st(i) ? [] : {};
2217
+ return pt(i, (a, o) => {
2146
2218
  const c = e(a, r + 1);
2147
- !ot(c) && (s[o] = c);
2219
+ !ht(c) && (s[o] = c);
2148
2220
  }), t[r] = void 0, s;
2149
2221
  }
2150
2222
  }
2151
2223
  return i;
2152
2224
  };
2153
2225
  return e(n, 0);
2154
- }, on = k("AsyncFunction"), cn = (n) => n && (ut(n) || B(n)) && B(n.then) && B(n.catch), Ne = ((n, t) => n ? setImmediate : t ? ((e, i) => ($.addEventListener("message", ({ source: r, data: s }) => {
2155
- r === $ && s === e && i.length && i.shift()();
2226
+ }, Tn = F("AsyncFunction"), Cn = (n) => n && (ft(n) || N(n)) && N(n.then) && N(n.catch), Fe = ((n, t) => n ? setImmediate : t ? ((e, i) => (Q.addEventListener("message", ({ source: r, data: s }) => {
2227
+ r === Q && s === e && i.length && i.shift()();
2156
2228
  }, !1), (r) => {
2157
- i.push(r), $.postMessage(e, "*");
2229
+ i.push(r), Q.postMessage(e, "*");
2158
2230
  }))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(
2159
2231
  typeof setImmediate == "function",
2160
- B($.postMessage)
2161
- ), un = typeof queueMicrotask < "u" ? queueMicrotask.bind($) : typeof process < "u" && process.nextTick || Ne, hn = (n) => n != null && B(n[At]), l = {
2162
- isArray: nt,
2163
- isArrayBuffer: Oe,
2164
- isBuffer: ct,
2165
- isFormData: Vi,
2166
- isArrayBufferView: Ci,
2167
- isString: Ai,
2168
- isNumber: xe,
2169
- isBoolean: Ri,
2170
- isObject: ut,
2171
- isPlainObject: Pt,
2172
- isEmptyObject: Oi,
2173
- isReadableStream: Li,
2174
- isRequest: Mi,
2175
- isResponse: ki,
2176
- isHeaders: Fi,
2177
- isUndefined: ot,
2178
- isDate: xi,
2179
- isFile: Di,
2180
- isBlob: Ii,
2181
- isRegExp: Yi,
2182
- isFunction: B,
2183
- isStream: Ni,
2184
- isURLSearchParams: Ui,
2185
- isTypedArray: Gi,
2186
- isFileList: Bi,
2187
- forEach: ht,
2188
- merge: qt,
2189
- extend: qi,
2190
- trim: ji,
2191
- stripBOM: Ki,
2192
- inherits: Hi,
2193
- toFlatObject: Wi,
2194
- kindOf: Rt,
2195
- kindOfTest: k,
2196
- endsWith: Xi,
2197
- toArray: zi,
2198
- forEachEntry: $i,
2199
- matchAll: Ji,
2200
- isHTMLForm: Qi,
2201
- hasOwnProperty: le,
2202
- hasOwnProp: le,
2232
+ N(Q.postMessage)
2233
+ ), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(Q) : typeof process < "u" && process.nextTick || Fe, Rn = (n) => n != null && N(n[xt]), l = {
2234
+ isArray: st,
2235
+ isArrayBuffer: Ve,
2236
+ isBuffer: lt,
2237
+ isFormData: Yi,
2238
+ isArrayBufferView: Hi,
2239
+ isString: Wi,
2240
+ isNumber: Ue,
2241
+ isBoolean: Xi,
2242
+ isObject: ft,
2243
+ isPlainObject: wt,
2244
+ isEmptyObject: zi,
2245
+ isReadableStream: en,
2246
+ isRequest: nn,
2247
+ isResponse: rn,
2248
+ isHeaders: sn,
2249
+ isUndefined: ht,
2250
+ isDate: Gi,
2251
+ isFile: $i,
2252
+ isBlob: Ji,
2253
+ isRegExp: yn,
2254
+ isFunction: N,
2255
+ isStream: Zi,
2256
+ isURLSearchParams: tn,
2257
+ isTypedArray: pn,
2258
+ isFileList: Qi,
2259
+ forEach: pt,
2260
+ merge: Wt,
2261
+ extend: on,
2262
+ trim: an,
2263
+ stripBOM: cn,
2264
+ inherits: un,
2265
+ toFlatObject: hn,
2266
+ kindOf: Dt,
2267
+ kindOfTest: F,
2268
+ endsWith: ln,
2269
+ toArray: fn,
2270
+ forEachEntry: dn,
2271
+ matchAll: _n,
2272
+ isHTMLForm: gn,
2273
+ hasOwnProperty: ge,
2274
+ hasOwnProp: ge,
2203
2275
  // an alias to avoid ESLint no-prototype-builtins detection
2204
- reduceDescriptors: Be,
2205
- freezeMethods: tn,
2206
- toObjectSet: en,
2207
- toCamelCase: Zi,
2208
- noop: nn,
2209
- toFiniteNumber: rn,
2210
- findKey: De,
2211
- global: $,
2212
- isContextDefined: Ie,
2213
- isSpecCompliantForm: sn,
2214
- toJSONObject: an,
2215
- isAsyncFn: on,
2216
- isThenable: cn,
2217
- setImmediate: Ne,
2218
- asap: un,
2219
- isIterable: hn
2276
+ reduceDescriptors: ke,
2277
+ freezeMethods: bn,
2278
+ toObjectSet: Pn,
2279
+ toCamelCase: mn,
2280
+ noop: vn,
2281
+ toFiniteNumber: En,
2282
+ findKey: Le,
2283
+ global: Q,
2284
+ isContextDefined: Me,
2285
+ isSpecCompliantForm: wn,
2286
+ toJSONObject: Sn,
2287
+ isAsyncFn: Tn,
2288
+ isThenable: Cn,
2289
+ setImmediate: Fe,
2290
+ asap: An,
2291
+ isIterable: Rn
2220
2292
  };
2221
- function P(n, t, e, i, r) {
2293
+ function v(n, t, e, i, r) {
2222
2294
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = n, this.name = "AxiosError", t && (this.code = t), e && (this.config = e), i && (this.request = i), r && (this.response = r, this.status = r.status ? r.status : null);
2223
2295
  }
2224
- l.inherits(P, Error, {
2296
+ l.inherits(v, Error, {
2225
2297
  toJSON: function() {
2226
2298
  return {
2227
2299
  // Standard
@@ -2242,7 +2314,7 @@ l.inherits(P, Error, {
2242
2314
  };
2243
2315
  }
2244
2316
  });
2245
- const Ve = P.prototype, Ue = {};
2317
+ const je = v.prototype, qe = {};
2246
2318
  [
2247
2319
  "ERR_BAD_OPTION_VALUE",
2248
2320
  "ERR_BAD_OPTION",
@@ -2258,98 +2330,98 @@ const Ve = P.prototype, Ue = {};
2258
2330
  "ERR_INVALID_URL"
2259
2331
  // eslint-disable-next-line func-names
2260
2332
  ].forEach((n) => {
2261
- Ue[n] = { value: n };
2333
+ qe[n] = { value: n };
2262
2334
  });
2263
- Object.defineProperties(P, Ue);
2264
- Object.defineProperty(Ve, "isAxiosError", { value: !0 });
2265
- P.from = (n, t, e, i, r, s) => {
2266
- const a = Object.create(Ve);
2335
+ Object.defineProperties(v, qe);
2336
+ Object.defineProperty(je, "isAxiosError", { value: !0 });
2337
+ v.from = (n, t, e, i, r, s) => {
2338
+ const a = Object.create(je);
2267
2339
  return l.toFlatObject(n, a, function(c) {
2268
2340
  return c !== Error.prototype;
2269
- }, (o) => o !== "isAxiosError"), P.call(a, n.message, t, e, i, r), a.cause = n, a.name = n.name, s && Object.assign(a, s), a;
2341
+ }, (o) => o !== "isAxiosError"), v.call(a, n.message, t, e, i, r), a.cause = n, a.name = n.name, s && Object.assign(a, s), a;
2270
2342
  };
2271
- const ln = null;
2272
- function Kt(n) {
2343
+ const On = null;
2344
+ function Xt(n) {
2273
2345
  return l.isPlainObject(n) || l.isArray(n);
2274
2346
  }
2275
- function Le(n) {
2347
+ function Ke(n) {
2276
2348
  return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
2277
2349
  }
2278
- function fe(n, t, e) {
2350
+ function me(n, t, e) {
2279
2351
  return n ? n.concat(t).map(function(r, s) {
2280
- return r = Le(r), !e && s ? "[" + r + "]" : r;
2352
+ return r = Ke(r), !e && s ? "[" + r + "]" : r;
2281
2353
  }).join(e ? "." : "") : t;
2282
2354
  }
2283
- function fn(n) {
2284
- return l.isArray(n) && !n.some(Kt);
2355
+ function xn(n) {
2356
+ return l.isArray(n) && !n.some(Xt);
2285
2357
  }
2286
- const pn = l.toFlatObject(l, {}, null, function(t) {
2358
+ const Dn = l.toFlatObject(l, {}, null, function(t) {
2287
2359
  return /^is[A-Z]/.test(t);
2288
2360
  });
2289
- function xt(n, t, e) {
2361
+ function Bt(n, t, e) {
2290
2362
  if (!l.isObject(n))
2291
2363
  throw new TypeError("target must be an object");
2292
2364
  t = t || new FormData(), e = l.toFlatObject(e, {
2293
2365
  metaTokens: !0,
2294
2366
  dots: !1,
2295
2367
  indexes: !1
2296
- }, !1, function(m, g) {
2297
- return !l.isUndefined(g[m]);
2368
+ }, !1, function(y, m) {
2369
+ return !l.isUndefined(m[y]);
2298
2370
  });
2299
- const i = e.metaTokens, r = e.visitor || u, s = e.dots, a = e.indexes, c = (e.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
2371
+ const i = e.metaTokens, r = e.visitor || h, s = e.dots, a = e.indexes, c = (e.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
2300
2372
  if (!l.isFunction(r))
2301
2373
  throw new TypeError("visitor must be a function");
2302
- function h(d) {
2303
- if (d === null) return "";
2304
- if (l.isDate(d))
2305
- return d.toISOString();
2306
- if (l.isBoolean(d))
2307
- return d.toString();
2308
- if (!c && l.isBlob(d))
2309
- throw new P("Blob is not supported. Use a Buffer instead.");
2310
- return l.isArrayBuffer(d) || l.isTypedArray(d) ? c && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
2311
- }
2312
- function u(d, m, g) {
2313
- let S = d;
2314
- if (d && !g && typeof d == "object") {
2315
- if (l.endsWith(m, "{}"))
2316
- m = i ? m : m.slice(0, -2), d = JSON.stringify(d);
2317
- else if (l.isArray(d) && fn(d) || (l.isFileList(d) || l.endsWith(m, "[]")) && (S = l.toArray(d)))
2318
- return m = Le(m), S.forEach(function(C, I) {
2374
+ function u(_) {
2375
+ if (_ === null) return "";
2376
+ if (l.isDate(_))
2377
+ return _.toISOString();
2378
+ if (l.isBoolean(_))
2379
+ return _.toString();
2380
+ if (!c && l.isBlob(_))
2381
+ throw new v("Blob is not supported. Use a Buffer instead.");
2382
+ return l.isArrayBuffer(_) || l.isTypedArray(_) ? c && typeof Blob == "function" ? new Blob([_]) : Buffer.from(_) : _;
2383
+ }
2384
+ function h(_, y, m) {
2385
+ let S = _;
2386
+ if (_ && !m && typeof _ == "object") {
2387
+ if (l.endsWith(y, "{}"))
2388
+ y = i ? y : y.slice(0, -2), _ = JSON.stringify(_);
2389
+ else if (l.isArray(_) && xn(_) || (l.isFileList(_) || l.endsWith(y, "[]")) && (S = l.toArray(_)))
2390
+ return y = Ke(y), S.forEach(function(C, B) {
2319
2391
  !(l.isUndefined(C) || C === null) && t.append(
2320
2392
  // eslint-disable-next-line no-nested-ternary
2321
- a === !0 ? fe([m], I, s) : a === null ? m : m + "[]",
2322
- h(C)
2393
+ a === !0 ? me([y], B, s) : a === null ? y : y + "[]",
2394
+ u(C)
2323
2395
  );
2324
2396
  }), !1;
2325
2397
  }
2326
- return Kt(d) ? !0 : (t.append(fe(g, m, s), h(d)), !1);
2398
+ return Xt(_) ? !0 : (t.append(me(m, y, s), u(_)), !1);
2327
2399
  }
2328
- const f = [], _ = Object.assign(pn, {
2329
- defaultVisitor: u,
2330
- convertValue: h,
2331
- isVisitable: Kt
2400
+ const f = [], d = Object.assign(Dn, {
2401
+ defaultVisitor: h,
2402
+ convertValue: u,
2403
+ isVisitable: Xt
2332
2404
  });
2333
- function y(d, m) {
2334
- if (!l.isUndefined(d)) {
2335
- if (f.indexOf(d) !== -1)
2336
- throw Error("Circular reference detected in " + m.join("."));
2337
- f.push(d), l.forEach(d, function(S, E) {
2405
+ function g(_, y) {
2406
+ if (!l.isUndefined(_)) {
2407
+ if (f.indexOf(_) !== -1)
2408
+ throw Error("Circular reference detected in " + y.join("."));
2409
+ f.push(_), l.forEach(_, function(S, w) {
2338
2410
  (!(l.isUndefined(S) || S === null) && r.call(
2339
2411
  t,
2340
2412
  S,
2341
- l.isString(E) ? E.trim() : E,
2342
- m,
2343
- _
2344
- )) === !0 && y(S, m ? m.concat(E) : [E]);
2413
+ l.isString(w) ? w.trim() : w,
2414
+ y,
2415
+ d
2416
+ )) === !0 && g(S, y ? y.concat(w) : [w]);
2345
2417
  }), f.pop();
2346
2418
  }
2347
2419
  }
2348
2420
  if (!l.isObject(n))
2349
2421
  throw new TypeError("data must be an object");
2350
- return y(n), t;
2422
+ return g(n), t;
2351
2423
  }
2352
- function pe(n) {
2424
+ function ye(n) {
2353
2425
  const t = {
2354
2426
  "!": "%21",
2355
2427
  "'": "%27",
@@ -2363,40 +2435,40 @@ function pe(n) {
2363
2435
  return t[i];
2364
2436
  });
2365
2437
  }
2366
- function Jt(n, t) {
2367
- this._pairs = [], n && xt(n, this, t);
2438
+ function Yt(n, t) {
2439
+ this._pairs = [], n && Bt(n, this, t);
2368
2440
  }
2369
- const Me = Jt.prototype;
2370
- Me.append = function(t, e) {
2441
+ const He = Yt.prototype;
2442
+ He.append = function(t, e) {
2371
2443
  this._pairs.push([t, e]);
2372
2444
  };
2373
- Me.toString = function(t) {
2445
+ He.toString = function(t) {
2374
2446
  const e = t ? function(i) {
2375
- return t.call(this, i, pe);
2376
- } : pe;
2447
+ return t.call(this, i, ye);
2448
+ } : ye;
2377
2449
  return this._pairs.map(function(r) {
2378
2450
  return e(r[0]) + "=" + e(r[1]);
2379
2451
  }, "").join("&");
2380
2452
  };
2381
- function dn(n) {
2453
+ function In(n) {
2382
2454
  return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2383
2455
  }
2384
- function ke(n, t, e) {
2456
+ function We(n, t, e) {
2385
2457
  if (!t)
2386
2458
  return n;
2387
- const i = e && e.encode || dn;
2459
+ const i = e && e.encode || In;
2388
2460
  l.isFunction(e) && (e = {
2389
2461
  serialize: e
2390
2462
  });
2391
2463
  const r = e && e.serialize;
2392
2464
  let s;
2393
- if (r ? s = r(t, e) : s = l.isURLSearchParams(t) ? t.toString() : new Jt(t, e).toString(i), s) {
2465
+ if (r ? s = r(t, e) : s = l.isURLSearchParams(t) ? t.toString() : new Yt(t, e).toString(i), s) {
2394
2466
  const a = n.indexOf("#");
2395
2467
  a !== -1 && (n = n.slice(0, a)), n += (n.indexOf("?") === -1 ? "?" : "&") + s;
2396
2468
  }
2397
2469
  return n;
2398
2470
  }
2399
- class de {
2471
+ class be {
2400
2472
  constructor() {
2401
2473
  this.handlers = [];
2402
2474
  }
@@ -2450,42 +2522,42 @@ class de {
2450
2522
  });
2451
2523
  }
2452
2524
  }
2453
- const Fe = {
2525
+ const Xe = {
2454
2526
  silentJSONParsing: !0,
2455
2527
  forcedJSONParsing: !0,
2456
2528
  clarifyTimeoutError: !1
2457
- }, _n = typeof URLSearchParams < "u" ? URLSearchParams : Jt, gn = typeof FormData < "u" ? FormData : null, mn = typeof Blob < "u" ? Blob : null, yn = {
2529
+ }, Bn = typeof URLSearchParams < "u" ? URLSearchParams : Yt, Nn = typeof FormData < "u" ? FormData : null, Vn = typeof Blob < "u" ? Blob : null, Un = {
2458
2530
  isBrowser: !0,
2459
2531
  classes: {
2460
- URLSearchParams: _n,
2461
- FormData: gn,
2462
- Blob: mn
2532
+ URLSearchParams: Bn,
2533
+ FormData: Nn,
2534
+ Blob: Vn
2463
2535
  },
2464
2536
  protocols: ["http", "https", "file", "blob", "url", "data"]
2465
- }, Qt = typeof window < "u" && typeof document < "u", Ht = typeof navigator == "object" && navigator || void 0, bn = Qt && (!Ht || ["ReactNative", "NativeScript", "NS"].indexOf(Ht.product) < 0), Pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2466
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vn = Qt && window.location.href || "http://localhost", wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2537
+ }, te = typeof window < "u" && typeof document < "u", zt = typeof navigator == "object" && navigator || void 0, Ln = te && (!zt || ["ReactNative", "NativeScript", "NS"].indexOf(zt.product) < 0), Mn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2538
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", kn = te && window.location.href || "http://localhost", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2467
2539
  __proto__: null,
2468
- hasBrowserEnv: Qt,
2469
- hasStandardBrowserEnv: bn,
2470
- hasStandardBrowserWebWorkerEnv: Pn,
2471
- navigator: Ht,
2472
- origin: vn
2473
- }, Symbol.toStringTag, { value: "Module" })), x = {
2474
- ...wn,
2475
- ...yn
2540
+ hasBrowserEnv: te,
2541
+ hasStandardBrowserEnv: Ln,
2542
+ hasStandardBrowserWebWorkerEnv: Mn,
2543
+ navigator: zt,
2544
+ origin: kn
2545
+ }, Symbol.toStringTag, { value: "Module" })), D = {
2546
+ ...Fn,
2547
+ ...Un
2476
2548
  };
2477
- function En(n, t) {
2478
- return xt(n, new x.classes.URLSearchParams(), {
2549
+ function jn(n, t) {
2550
+ return Bt(n, new D.classes.URLSearchParams(), {
2479
2551
  visitor: function(e, i, r, s) {
2480
- return x.isNode && l.isBuffer(e) ? (this.append(i, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
2552
+ return D.isNode && l.isBuffer(e) ? (this.append(i, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
2481
2553
  },
2482
2554
  ...t
2483
2555
  });
2484
2556
  }
2485
- function Sn(n) {
2557
+ function qn(n) {
2486
2558
  return l.matchAll(/\w+|\[(\w*)]/g, n).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
2487
2559
  }
2488
- function Tn(n) {
2560
+ function Kn(n) {
2489
2561
  const t = {}, e = Object.keys(n);
2490
2562
  let i;
2491
2563
  const r = e.length;
@@ -2494,22 +2566,22 @@ function Tn(n) {
2494
2566
  s = e[i], t[s] = n[s];
2495
2567
  return t;
2496
2568
  }
2497
- function je(n) {
2569
+ function ze(n) {
2498
2570
  function t(e, i, r, s) {
2499
2571
  let a = e[s++];
2500
2572
  if (a === "__proto__") return !0;
2501
2573
  const o = Number.isFinite(+a), c = s >= e.length;
2502
- return a = !a && l.isArray(r) ? r.length : a, c ? (l.hasOwnProp(r, a) ? r[a] = [r[a], i] : r[a] = i, !o) : ((!r[a] || !l.isObject(r[a])) && (r[a] = []), t(e, i, r[a], s) && l.isArray(r[a]) && (r[a] = Tn(r[a])), !o);
2574
+ return a = !a && l.isArray(r) ? r.length : a, c ? (l.hasOwnProp(r, a) ? r[a] = [r[a], i] : r[a] = i, !o) : ((!r[a] || !l.isObject(r[a])) && (r[a] = []), t(e, i, r[a], s) && l.isArray(r[a]) && (r[a] = Kn(r[a])), !o);
2503
2575
  }
2504
2576
  if (l.isFormData(n) && l.isFunction(n.entries)) {
2505
2577
  const e = {};
2506
2578
  return l.forEachEntry(n, (i, r) => {
2507
- t(Sn(i), r, e, 0);
2579
+ t(qn(i), r, e, 0);
2508
2580
  }), e;
2509
2581
  }
2510
2582
  return null;
2511
2583
  }
2512
- function Cn(n, t, e) {
2584
+ function Hn(n, t, e) {
2513
2585
  if (l.isString(n))
2514
2586
  try {
2515
2587
  return (t || JSON.parse)(n), l.trim(n);
@@ -2519,13 +2591,13 @@ function Cn(n, t, e) {
2519
2591
  }
2520
2592
  return (e || JSON.stringify)(n);
2521
2593
  }
2522
- const lt = {
2523
- transitional: Fe,
2594
+ const dt = {
2595
+ transitional: Xe,
2524
2596
  adapter: ["xhr", "http", "fetch"],
2525
2597
  transformRequest: [function(t, e) {
2526
2598
  const i = e.getContentType() || "", r = i.indexOf("application/json") > -1, s = l.isObject(t);
2527
2599
  if (s && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
2528
- return r ? JSON.stringify(je(t)) : t;
2600
+ return r ? JSON.stringify(ze(t)) : t;
2529
2601
  if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
2530
2602
  return t;
2531
2603
  if (l.isArrayBufferView(t))
@@ -2535,20 +2607,20 @@ const lt = {
2535
2607
  let o;
2536
2608
  if (s) {
2537
2609
  if (i.indexOf("application/x-www-form-urlencoded") > -1)
2538
- return En(t, this.formSerializer).toString();
2610
+ return jn(t, this.formSerializer).toString();
2539
2611
  if ((o = l.isFileList(t)) || i.indexOf("multipart/form-data") > -1) {
2540
2612
  const c = this.env && this.env.FormData;
2541
- return xt(
2613
+ return Bt(
2542
2614
  o ? { "files[]": t } : t,
2543
2615
  c && new c(),
2544
2616
  this.formSerializer
2545
2617
  );
2546
2618
  }
2547
2619
  }
2548
- return s || r ? (e.setContentType("application/json", !1), Cn(t)) : t;
2620
+ return s || r ? (e.setContentType("application/json", !1), Hn(t)) : t;
2549
2621
  }],
2550
2622
  transformResponse: [function(t) {
2551
- const e = this.transitional || lt.transitional, i = e && e.forcedJSONParsing, r = this.responseType === "json";
2623
+ const e = this.transitional || dt.transitional, i = e && e.forcedJSONParsing, r = this.responseType === "json";
2552
2624
  if (l.isResponse(t) || l.isReadableStream(t))
2553
2625
  return t;
2554
2626
  if (t && l.isString(t) && (i && !this.responseType || r)) {
@@ -2557,7 +2629,7 @@ const lt = {
2557
2629
  return JSON.parse(t);
2558
2630
  } catch (o) {
2559
2631
  if (a)
2560
- throw o.name === "SyntaxError" ? P.from(o, P.ERR_BAD_RESPONSE, this, null, this.response) : o;
2632
+ throw o.name === "SyntaxError" ? v.from(o, v.ERR_BAD_RESPONSE, this, null, this.response) : o;
2561
2633
  }
2562
2634
  }
2563
2635
  return t;
@@ -2572,8 +2644,8 @@ const lt = {
2572
2644
  maxContentLength: -1,
2573
2645
  maxBodyLength: -1,
2574
2646
  env: {
2575
- FormData: x.classes.FormData,
2576
- Blob: x.classes.Blob
2647
+ FormData: D.classes.FormData,
2648
+ Blob: D.classes.Blob
2577
2649
  },
2578
2650
  validateStatus: function(t) {
2579
2651
  return t >= 200 && t < 300;
@@ -2586,9 +2658,9 @@ const lt = {
2586
2658
  }
2587
2659
  };
2588
2660
  l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
2589
- lt.headers[n] = {};
2661
+ dt.headers[n] = {};
2590
2662
  });
2591
- const An = l.toObjectSet([
2663
+ const Wn = l.toObjectSet([
2592
2664
  "age",
2593
2665
  "authorization",
2594
2666
  "content-length",
@@ -2606,29 +2678,29 @@ const An = l.toObjectSet([
2606
2678
  "referer",
2607
2679
  "retry-after",
2608
2680
  "user-agent"
2609
- ]), Rn = (n) => {
2681
+ ]), Xn = (n) => {
2610
2682
  const t = {};
2611
2683
  let e, i, r;
2612
2684
  return n && n.split(`
2613
2685
  `).forEach(function(a) {
2614
- r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), i = a.substring(r + 1).trim(), !(!e || t[e] && An[e]) && (e === "set-cookie" ? t[e] ? t[e].push(i) : t[e] = [i] : t[e] = t[e] ? t[e] + ", " + i : i);
2686
+ r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), i = a.substring(r + 1).trim(), !(!e || t[e] && Wn[e]) && (e === "set-cookie" ? t[e] ? t[e].push(i) : t[e] = [i] : t[e] = t[e] ? t[e] + ", " + i : i);
2615
2687
  }), t;
2616
- }, _e = Symbol("internals");
2617
- function st(n) {
2688
+ }, Pe = Symbol("internals");
2689
+ function ot(n) {
2618
2690
  return n && String(n).trim().toLowerCase();
2619
2691
  }
2620
- function vt(n) {
2621
- return n === !1 || n == null ? n : l.isArray(n) ? n.map(vt) : String(n);
2692
+ function St(n) {
2693
+ return n === !1 || n == null ? n : l.isArray(n) ? n.map(St) : String(n);
2622
2694
  }
2623
- function On(n) {
2695
+ function zn(n) {
2624
2696
  const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2625
2697
  let i;
2626
2698
  for (; i = e.exec(n); )
2627
2699
  t[i[1]] = i[2];
2628
2700
  return t;
2629
2701
  }
2630
- const xn = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
2631
- function Lt(n, t, e, i, r) {
2702
+ const Gn = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
2703
+ function Ft(n, t, e, i, r) {
2632
2704
  if (l.isFunction(i))
2633
2705
  return i.call(this, t, e);
2634
2706
  if (r && (t = e), !!l.isString(t)) {
@@ -2638,10 +2710,10 @@ function Lt(n, t, e, i, r) {
2638
2710
  return i.test(t);
2639
2711
  }
2640
2712
  }
2641
- function Dn(n) {
2713
+ function $n(n) {
2642
2714
  return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, i) => e.toUpperCase() + i);
2643
2715
  }
2644
- function In(n, t) {
2716
+ function Jn(n, t) {
2645
2717
  const e = l.toCamelCase(" " + t);
2646
2718
  ["get", "set", "has"].forEach((i) => {
2647
2719
  Object.defineProperty(n, i + e, {
@@ -2652,30 +2724,30 @@ function In(n, t) {
2652
2724
  });
2653
2725
  });
2654
2726
  }
2655
- let N = class {
2727
+ let V = class {
2656
2728
  constructor(t) {
2657
2729
  t && this.set(t);
2658
2730
  }
2659
2731
  set(t, e, i) {
2660
2732
  const r = this;
2661
- function s(o, c, h) {
2662
- const u = st(c);
2663
- if (!u)
2733
+ function s(o, c, u) {
2734
+ const h = ot(c);
2735
+ if (!h)
2664
2736
  throw new Error("header name must be a non-empty string");
2665
- const f = l.findKey(r, u);
2666
- (!f || r[f] === void 0 || h === !0 || h === void 0 && r[f] !== !1) && (r[f || c] = vt(o));
2737
+ const f = l.findKey(r, h);
2738
+ (!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || c] = St(o));
2667
2739
  }
2668
- const a = (o, c) => l.forEach(o, (h, u) => s(h, u, c));
2740
+ const a = (o, c) => l.forEach(o, (u, h) => s(u, h, c));
2669
2741
  if (l.isPlainObject(t) || t instanceof this.constructor)
2670
2742
  a(t, e);
2671
- else if (l.isString(t) && (t = t.trim()) && !xn(t))
2672
- a(Rn(t), e);
2743
+ else if (l.isString(t) && (t = t.trim()) && !Gn(t))
2744
+ a(Xn(t), e);
2673
2745
  else if (l.isObject(t) && l.isIterable(t)) {
2674
- let o = {}, c, h;
2675
- for (const u of t) {
2676
- if (!l.isArray(u))
2746
+ let o = {}, c, u;
2747
+ for (const h of t) {
2748
+ if (!l.isArray(h))
2677
2749
  throw TypeError("Object iterator must return a key-value pair");
2678
- o[h = u[0]] = (c = o[h]) ? l.isArray(c) ? [...c, u[1]] : [c, u[1]] : u[1];
2750
+ o[u = h[0]] = (c = o[u]) ? l.isArray(c) ? [...c, h[1]] : [c, h[1]] : h[1];
2679
2751
  }
2680
2752
  a(o, e);
2681
2753
  } else
@@ -2683,14 +2755,14 @@ let N = class {
2683
2755
  return this;
2684
2756
  }
2685
2757
  get(t, e) {
2686
- if (t = st(t), t) {
2758
+ if (t = ot(t), t) {
2687
2759
  const i = l.findKey(this, t);
2688
2760
  if (i) {
2689
2761
  const r = this[i];
2690
2762
  if (!e)
2691
2763
  return r;
2692
2764
  if (e === !0)
2693
- return On(r);
2765
+ return zn(r);
2694
2766
  if (l.isFunction(e))
2695
2767
  return e.call(this, r, i);
2696
2768
  if (l.isRegExp(e))
@@ -2700,9 +2772,9 @@ let N = class {
2700
2772
  }
2701
2773
  }
2702
2774
  has(t, e) {
2703
- if (t = st(t), t) {
2775
+ if (t = ot(t), t) {
2704
2776
  const i = l.findKey(this, t);
2705
- return !!(i && this[i] !== void 0 && (!e || Lt(this, this[i], i, e)));
2777
+ return !!(i && this[i] !== void 0 && (!e || Ft(this, this[i], i, e)));
2706
2778
  }
2707
2779
  return !1;
2708
2780
  }
@@ -2710,9 +2782,9 @@ let N = class {
2710
2782
  const i = this;
2711
2783
  let r = !1;
2712
2784
  function s(a) {
2713
- if (a = st(a), a) {
2785
+ if (a = ot(a), a) {
2714
2786
  const o = l.findKey(i, a);
2715
- o && (!e || Lt(i, i[o], o, e)) && (delete i[o], r = !0);
2787
+ o && (!e || Ft(i, i[o], o, e)) && (delete i[o], r = !0);
2716
2788
  }
2717
2789
  }
2718
2790
  return l.isArray(t) ? t.forEach(s) : s(t), r;
@@ -2722,7 +2794,7 @@ let N = class {
2722
2794
  let i = e.length, r = !1;
2723
2795
  for (; i--; ) {
2724
2796
  const s = e[i];
2725
- (!t || Lt(this, this[s], s, t, !0)) && (delete this[s], r = !0);
2797
+ (!t || Ft(this, this[s], s, t, !0)) && (delete this[s], r = !0);
2726
2798
  }
2727
2799
  return r;
2728
2800
  }
@@ -2731,11 +2803,11 @@ let N = class {
2731
2803
  return l.forEach(this, (r, s) => {
2732
2804
  const a = l.findKey(i, s);
2733
2805
  if (a) {
2734
- e[a] = vt(r), delete e[s];
2806
+ e[a] = St(r), delete e[s];
2735
2807
  return;
2736
2808
  }
2737
- const o = t ? Dn(s) : String(s).trim();
2738
- o !== s && delete e[s], e[o] = vt(r), i[o] = !0;
2809
+ const o = t ? $n(s) : String(s).trim();
2810
+ o !== s && delete e[s], e[o] = St(r), i[o] = !0;
2739
2811
  }), this;
2740
2812
  }
2741
2813
  concat(...t) {
@@ -2768,18 +2840,18 @@ let N = class {
2768
2840
  return e.forEach((r) => i.set(r)), i;
2769
2841
  }
2770
2842
  static accessor(t) {
2771
- const i = (this[_e] = this[_e] = {
2843
+ const i = (this[Pe] = this[Pe] = {
2772
2844
  accessors: {}
2773
2845
  }).accessors, r = this.prototype;
2774
2846
  function s(a) {
2775
- const o = st(a);
2776
- i[o] || (In(r, a), i[o] = !0);
2847
+ const o = ot(a);
2848
+ i[o] || (Jn(r, a), i[o] = !0);
2777
2849
  }
2778
2850
  return l.isArray(t) ? t.forEach(s) : s(t), this;
2779
2851
  }
2780
2852
  };
2781
- N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2782
- l.reduceDescriptors(N.prototype, ({ value: n }, t) => {
2853
+ V.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2854
+ l.reduceDescriptors(V.prototype, ({ value: n }, t) => {
2783
2855
  let e = t[0].toUpperCase() + t.slice(1);
2784
2856
  return {
2785
2857
  get: () => n,
@@ -2788,95 +2860,95 @@ l.reduceDescriptors(N.prototype, ({ value: n }, t) => {
2788
2860
  }
2789
2861
  };
2790
2862
  });
2791
- l.freezeMethods(N);
2792
- function Mt(n, t) {
2793
- const e = this || lt, i = t || e, r = N.from(i.headers);
2863
+ l.freezeMethods(V);
2864
+ function jt(n, t) {
2865
+ const e = this || dt, i = t || e, r = V.from(i.headers);
2794
2866
  let s = i.data;
2795
2867
  return l.forEach(n, function(o) {
2796
2868
  s = o.call(e, s, r.normalize(), t ? t.status : void 0);
2797
2869
  }), r.normalize(), s;
2798
2870
  }
2799
- function qe(n) {
2871
+ function Ge(n) {
2800
2872
  return !!(n && n.__CANCEL__);
2801
2873
  }
2802
- function rt(n, t, e) {
2803
- P.call(this, n ?? "canceled", P.ERR_CANCELED, t, e), this.name = "CanceledError";
2874
+ function at(n, t, e) {
2875
+ v.call(this, n ?? "canceled", v.ERR_CANCELED, t, e), this.name = "CanceledError";
2804
2876
  }
2805
- l.inherits(rt, P, {
2877
+ l.inherits(at, v, {
2806
2878
  __CANCEL__: !0
2807
2879
  });
2808
- function Ke(n, t, e) {
2880
+ function $e(n, t, e) {
2809
2881
  const i = e.config.validateStatus;
2810
- !e.status || !i || i(e.status) ? n(e) : t(new P(
2882
+ !e.status || !i || i(e.status) ? n(e) : t(new v(
2811
2883
  "Request failed with status code " + e.status,
2812
- [P.ERR_BAD_REQUEST, P.ERR_BAD_RESPONSE][Math.floor(e.status / 100) - 4],
2884
+ [v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(e.status / 100) - 4],
2813
2885
  e.config,
2814
2886
  e.request,
2815
2887
  e
2816
2888
  ));
2817
2889
  }
2818
- function Bn(n) {
2890
+ function Qn(n) {
2819
2891
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
2820
2892
  return t && t[1] || "";
2821
2893
  }
2822
- function Nn(n, t) {
2894
+ function Zn(n, t) {
2823
2895
  n = n || 10;
2824
2896
  const e = new Array(n), i = new Array(n);
2825
2897
  let r = 0, s = 0, a;
2826
2898
  return t = t !== void 0 ? t : 1e3, function(c) {
2827
- const h = Date.now(), u = i[s];
2828
- a || (a = h), e[r] = c, i[r] = h;
2829
- let f = s, _ = 0;
2899
+ const u = Date.now(), h = i[s];
2900
+ a || (a = u), e[r] = c, i[r] = u;
2901
+ let f = s, d = 0;
2830
2902
  for (; f !== r; )
2831
- _ += e[f++], f = f % n;
2832
- if (r = (r + 1) % n, r === s && (s = (s + 1) % n), h - a < t)
2903
+ d += e[f++], f = f % n;
2904
+ if (r = (r + 1) % n, r === s && (s = (s + 1) % n), u - a < t)
2833
2905
  return;
2834
- const y = u && h - u;
2835
- return y ? Math.round(_ * 1e3 / y) : void 0;
2906
+ const g = h && u - h;
2907
+ return g ? Math.round(d * 1e3 / g) : void 0;
2836
2908
  };
2837
2909
  }
2838
- function Vn(n, t) {
2910
+ function Yn(n, t) {
2839
2911
  let e = 0, i = 1e3 / t, r, s;
2840
- const a = (h, u = Date.now()) => {
2841
- e = u, r = null, s && (clearTimeout(s), s = null), n(...h);
2912
+ const a = (u, h = Date.now()) => {
2913
+ e = h, r = null, s && (clearTimeout(s), s = null), n(...u);
2842
2914
  };
2843
- return [(...h) => {
2844
- const u = Date.now(), f = u - e;
2845
- f >= i ? a(h, u) : (r = h, s || (s = setTimeout(() => {
2915
+ return [(...u) => {
2916
+ const h = Date.now(), f = h - e;
2917
+ f >= i ? a(u, h) : (r = u, s || (s = setTimeout(() => {
2846
2918
  s = null, a(r);
2847
2919
  }, i - f)));
2848
2920
  }, () => r && a(r)];
2849
2921
  }
2850
- const St = (n, t, e = 3) => {
2922
+ const At = (n, t, e = 3) => {
2851
2923
  let i = 0;
2852
- const r = Nn(50, 250);
2853
- return Vn((s) => {
2854
- const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = a - i, h = r(c), u = a <= o;
2924
+ const r = Zn(50, 250);
2925
+ return Yn((s) => {
2926
+ const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = a - i, u = r(c), h = a <= o;
2855
2927
  i = a;
2856
2928
  const f = {
2857
2929
  loaded: a,
2858
2930
  total: o,
2859
2931
  progress: o ? a / o : void 0,
2860
2932
  bytes: c,
2861
- rate: h || void 0,
2862
- estimated: h && o && u ? (o - a) / h : void 0,
2933
+ rate: u || void 0,
2934
+ estimated: u && o && h ? (o - a) / u : void 0,
2863
2935
  event: s,
2864
2936
  lengthComputable: o != null,
2865
2937
  [t ? "download" : "upload"]: !0
2866
2938
  };
2867
2939
  n(f);
2868
2940
  }, e);
2869
- }, ge = (n, t) => {
2941
+ }, ve = (n, t) => {
2870
2942
  const e = n != null;
2871
2943
  return [(i) => t[0]({
2872
2944
  lengthComputable: e,
2873
2945
  total: n,
2874
2946
  loaded: i
2875
2947
  }), t[1]];
2876
- }, me = (n) => (...t) => l.asap(() => n(...t)), Un = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, t) => (e) => (e = new URL(e, x.origin), n.protocol === e.protocol && n.host === e.host && (t || n.port === e.port)))(
2877
- new URL(x.origin),
2878
- x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
2879
- ) : () => !0, Ln = x.hasStandardBrowserEnv ? (
2948
+ }, Ee = (n) => (...t) => l.asap(() => n(...t)), tr = D.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, t) => (e) => (e = new URL(e, D.origin), n.protocol === e.protocol && n.host === e.host && (t || n.port === e.port)))(
2949
+ new URL(D.origin),
2950
+ D.navigator && /(msie|trident)/i.test(D.navigator.userAgent)
2951
+ ) : () => !0, er = D.hasStandardBrowserEnv ? (
2880
2952
  // Standard browser envs support document.cookie
2881
2953
  {
2882
2954
  write(n, t, e, i, r, s) {
@@ -2903,44 +2975,44 @@ const St = (n, t, e = 3) => {
2903
2975
  }
2904
2976
  }
2905
2977
  );
2906
- function Mn(n) {
2978
+ function ir(n) {
2907
2979
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
2908
2980
  }
2909
- function kn(n, t) {
2981
+ function nr(n, t) {
2910
2982
  return t ? n.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : n;
2911
2983
  }
2912
- function He(n, t, e) {
2913
- let i = !Mn(t);
2914
- return n && (i || e == !1) ? kn(n, t) : t;
2984
+ function Je(n, t, e) {
2985
+ let i = !ir(t);
2986
+ return n && (i || e == !1) ? nr(n, t) : t;
2915
2987
  }
2916
- const ye = (n) => n instanceof N ? { ...n } : n;
2917
- function Q(n, t) {
2988
+ const we = (n) => n instanceof V ? { ...n } : n;
2989
+ function Y(n, t) {
2918
2990
  t = t || {};
2919
2991
  const e = {};
2920
- function i(h, u, f, _) {
2921
- return l.isPlainObject(h) && l.isPlainObject(u) ? l.merge.call({ caseless: _ }, h, u) : l.isPlainObject(u) ? l.merge({}, u) : l.isArray(u) ? u.slice() : u;
2992
+ function i(u, h, f, d) {
2993
+ return l.isPlainObject(u) && l.isPlainObject(h) ? l.merge.call({ caseless: d }, u, h) : l.isPlainObject(h) ? l.merge({}, h) : l.isArray(h) ? h.slice() : h;
2922
2994
  }
2923
- function r(h, u, f, _) {
2924
- if (l.isUndefined(u)) {
2925
- if (!l.isUndefined(h))
2926
- return i(void 0, h, f, _);
2927
- } else return i(h, u, f, _);
2995
+ function r(u, h, f, d) {
2996
+ if (l.isUndefined(h)) {
2997
+ if (!l.isUndefined(u))
2998
+ return i(void 0, u, f, d);
2999
+ } else return i(u, h, f, d);
2928
3000
  }
2929
- function s(h, u) {
2930
- if (!l.isUndefined(u))
2931
- return i(void 0, u);
3001
+ function s(u, h) {
3002
+ if (!l.isUndefined(h))
3003
+ return i(void 0, h);
2932
3004
  }
2933
- function a(h, u) {
2934
- if (l.isUndefined(u)) {
2935
- if (!l.isUndefined(h))
2936
- return i(void 0, h);
2937
- } else return i(void 0, u);
3005
+ function a(u, h) {
3006
+ if (l.isUndefined(h)) {
3007
+ if (!l.isUndefined(u))
3008
+ return i(void 0, u);
3009
+ } else return i(void 0, h);
2938
3010
  }
2939
- function o(h, u, f) {
3011
+ function o(u, h, f) {
2940
3012
  if (f in t)
2941
- return i(h, u);
3013
+ return i(u, h);
2942
3014
  if (f in n)
2943
- return i(void 0, h);
3015
+ return i(void 0, u);
2944
3016
  }
2945
3017
  const c = {
2946
3018
  url: s,
@@ -2971,115 +3043,115 @@ function Q(n, t) {
2971
3043
  socketPath: a,
2972
3044
  responseEncoding: a,
2973
3045
  validateStatus: o,
2974
- headers: (h, u, f) => r(ye(h), ye(u), f, !0)
3046
+ headers: (u, h, f) => r(we(u), we(h), f, !0)
2975
3047
  };
2976
- return l.forEach(Object.keys({ ...n, ...t }), function(u) {
2977
- const f = c[u] || r, _ = f(n[u], t[u], u);
2978
- l.isUndefined(_) && f !== o || (e[u] = _);
3048
+ return l.forEach(Object.keys({ ...n, ...t }), function(h) {
3049
+ const f = c[h] || r, d = f(n[h], t[h], h);
3050
+ l.isUndefined(d) && f !== o || (e[h] = d);
2979
3051
  }), e;
2980
3052
  }
2981
- const We = (n) => {
2982
- const t = Q({}, n);
3053
+ const Qe = (n) => {
3054
+ const t = Y({}, n);
2983
3055
  let { data: e, withXSRFToken: i, xsrfHeaderName: r, xsrfCookieName: s, headers: a, auth: o } = t;
2984
- t.headers = a = N.from(a), t.url = ke(He(t.baseURL, t.url, t.allowAbsoluteUrls), n.params, n.paramsSerializer), o && a.set(
3056
+ t.headers = a = V.from(a), t.url = We(Je(t.baseURL, t.url, t.allowAbsoluteUrls), n.params, n.paramsSerializer), o && a.set(
2985
3057
  "Authorization",
2986
3058
  "Basic " + btoa((o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : ""))
2987
3059
  );
2988
3060
  let c;
2989
3061
  if (l.isFormData(e)) {
2990
- if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
3062
+ if (D.hasStandardBrowserEnv || D.hasStandardBrowserWebWorkerEnv)
2991
3063
  a.setContentType(void 0);
2992
3064
  else if ((c = a.getContentType()) !== !1) {
2993
- const [h, ...u] = c ? c.split(";").map((f) => f.trim()).filter(Boolean) : [];
2994
- a.setContentType([h || "multipart/form-data", ...u].join("; "));
3065
+ const [u, ...h] = c ? c.split(";").map((f) => f.trim()).filter(Boolean) : [];
3066
+ a.setContentType([u || "multipart/form-data", ...h].join("; "));
2995
3067
  }
2996
3068
  }
2997
- if (x.hasStandardBrowserEnv && (i && l.isFunction(i) && (i = i(t)), i || i !== !1 && Un(t.url))) {
2998
- const h = r && s && Ln.read(s);
2999
- h && a.set(r, h);
3069
+ if (D.hasStandardBrowserEnv && (i && l.isFunction(i) && (i = i(t)), i || i !== !1 && tr(t.url))) {
3070
+ const u = r && s && er.read(s);
3071
+ u && a.set(r, u);
3000
3072
  }
3001
3073
  return t;
3002
- }, Fn = typeof XMLHttpRequest < "u", jn = Fn && function(n) {
3074
+ }, rr = typeof XMLHttpRequest < "u", sr = rr && function(n) {
3003
3075
  return new Promise(function(e, i) {
3004
- const r = We(n);
3076
+ const r = Qe(n);
3005
3077
  let s = r.data;
3006
- const a = N.from(r.headers).normalize();
3007
- let { responseType: o, onUploadProgress: c, onDownloadProgress: h } = r, u, f, _, y, d;
3008
- function m() {
3009
- y && y(), d && d(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
3078
+ const a = V.from(r.headers).normalize();
3079
+ let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, h, f, d, g, _;
3080
+ function y() {
3081
+ g && g(), _ && _(), r.cancelToken && r.cancelToken.unsubscribe(h), r.signal && r.signal.removeEventListener("abort", h);
3010
3082
  }
3011
- let g = new XMLHttpRequest();
3012
- g.open(r.method.toUpperCase(), r.url, !0), g.timeout = r.timeout;
3083
+ let m = new XMLHttpRequest();
3084
+ m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
3013
3085
  function S() {
3014
- if (!g)
3086
+ if (!m)
3015
3087
  return;
3016
- const C = N.from(
3017
- "getAllResponseHeaders" in g && g.getAllResponseHeaders()
3018
- ), O = {
3019
- data: !o || o === "text" || o === "json" ? g.responseText : g.response,
3020
- status: g.status,
3021
- statusText: g.statusText,
3088
+ const C = V.from(
3089
+ "getAllResponseHeaders" in m && m.getAllResponseHeaders()
3090
+ ), x = {
3091
+ data: !o || o === "text" || o === "json" ? m.responseText : m.response,
3092
+ status: m.status,
3093
+ statusText: m.statusText,
3022
3094
  headers: C,
3023
3095
  config: n,
3024
- request: g
3096
+ request: m
3025
3097
  };
3026
- Ke(function(V) {
3027
- e(V), m();
3028
- }, function(V) {
3029
- i(V), m();
3030
- }, O), g = null;
3098
+ $e(function(U) {
3099
+ e(U), y();
3100
+ }, function(U) {
3101
+ i(U), y();
3102
+ }, x), m = null;
3031
3103
  }
3032
- "onloadend" in g ? g.onloadend = S : g.onreadystatechange = function() {
3033
- !g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(S);
3034
- }, g.onabort = function() {
3035
- g && (i(new P("Request aborted", P.ECONNABORTED, n, g)), g = null);
3036
- }, g.onerror = function() {
3037
- i(new P("Network Error", P.ERR_NETWORK, n, g)), g = null;
3038
- }, g.ontimeout = function() {
3039
- let I = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
3040
- const O = r.transitional || Fe;
3041
- r.timeoutErrorMessage && (I = r.timeoutErrorMessage), i(new P(
3042
- I,
3043
- O.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
3104
+ "onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
3105
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
3106
+ }, m.onabort = function() {
3107
+ m && (i(new v("Request aborted", v.ECONNABORTED, n, m)), m = null);
3108
+ }, m.onerror = function() {
3109
+ i(new v("Network Error", v.ERR_NETWORK, n, m)), m = null;
3110
+ }, m.ontimeout = function() {
3111
+ let B = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
3112
+ const x = r.transitional || Xe;
3113
+ r.timeoutErrorMessage && (B = r.timeoutErrorMessage), i(new v(
3114
+ B,
3115
+ x.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
3044
3116
  n,
3045
- g
3046
- )), g = null;
3047
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in g && l.forEach(a.toJSON(), function(I, O) {
3048
- g.setRequestHeader(O, I);
3049
- }), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), o && o !== "json" && (g.responseType = r.responseType), h && ([_, d] = St(h, !0), g.addEventListener("progress", _)), c && g.upload && ([f, y] = St(c), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", y)), (r.cancelToken || r.signal) && (u = (C) => {
3050
- g && (i(!C || C.type ? new rt(null, n, g) : C), g.abort(), g = null);
3051
- }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u)));
3052
- const E = Bn(r.url);
3053
- if (E && x.protocols.indexOf(E) === -1) {
3054
- i(new P("Unsupported protocol " + E + ":", P.ERR_BAD_REQUEST, n));
3117
+ m
3118
+ )), m = null;
3119
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in m && l.forEach(a.toJSON(), function(B, x) {
3120
+ m.setRequestHeader(x, B);
3121
+ }), l.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), o && o !== "json" && (m.responseType = r.responseType), u && ([d, _] = At(u, !0), m.addEventListener("progress", d)), c && m.upload && ([f, g] = At(c), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (h = (C) => {
3122
+ m && (i(!C || C.type ? new at(null, n, m) : C), m.abort(), m = null);
3123
+ }, r.cancelToken && r.cancelToken.subscribe(h), r.signal && (r.signal.aborted ? h() : r.signal.addEventListener("abort", h)));
3124
+ const w = Qn(r.url);
3125
+ if (w && D.protocols.indexOf(w) === -1) {
3126
+ i(new v("Unsupported protocol " + w + ":", v.ERR_BAD_REQUEST, n));
3055
3127
  return;
3056
3128
  }
3057
- g.send(s || null);
3129
+ m.send(s || null);
3058
3130
  });
3059
- }, qn = (n, t) => {
3131
+ }, ar = (n, t) => {
3060
3132
  const { length: e } = n = n ? n.filter(Boolean) : [];
3061
3133
  if (t || e) {
3062
3134
  let i = new AbortController(), r;
3063
- const s = function(h) {
3135
+ const s = function(u) {
3064
3136
  if (!r) {
3065
3137
  r = !0, o();
3066
- const u = h instanceof Error ? h : this.reason;
3067
- i.abort(u instanceof P ? u : new rt(u instanceof Error ? u.message : u));
3138
+ const h = u instanceof Error ? u : this.reason;
3139
+ i.abort(h instanceof v ? h : new at(h instanceof Error ? h.message : h));
3068
3140
  }
3069
3141
  };
3070
3142
  let a = t && setTimeout(() => {
3071
- a = null, s(new P(`timeout ${t} of ms exceeded`, P.ETIMEDOUT));
3143
+ a = null, s(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
3072
3144
  }, t);
3073
3145
  const o = () => {
3074
- n && (a && clearTimeout(a), a = null, n.forEach((h) => {
3075
- h.unsubscribe ? h.unsubscribe(s) : h.removeEventListener("abort", s);
3146
+ n && (a && clearTimeout(a), a = null, n.forEach((u) => {
3147
+ u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
3076
3148
  }), n = null);
3077
3149
  };
3078
- n.forEach((h) => h.addEventListener("abort", s));
3150
+ n.forEach((u) => u.addEventListener("abort", s));
3079
3151
  const { signal: c } = i;
3080
3152
  return c.unsubscribe = () => l.asap(o), c;
3081
3153
  }
3082
- }, Kn = function* (n, t) {
3154
+ }, or = function* (n, t) {
3083
3155
  let e = n.byteLength;
3084
3156
  if (e < t) {
3085
3157
  yield n;
@@ -3088,10 +3160,10 @@ const We = (n) => {
3088
3160
  let i = 0, r;
3089
3161
  for (; i < e; )
3090
3162
  r = i + t, yield n.slice(i, r), i = r;
3091
- }, Hn = async function* (n, t) {
3092
- for await (const e of Wn(n))
3093
- yield* Kn(e, t);
3094
- }, Wn = async function* (n) {
3163
+ }, cr = async function* (n, t) {
3164
+ for await (const e of ur(n))
3165
+ yield* or(e, t);
3166
+ }, ur = async function* (n) {
3095
3167
  if (n[Symbol.asyncIterator]) {
3096
3168
  yield* n;
3097
3169
  return;
@@ -3107,27 +3179,27 @@ const We = (n) => {
3107
3179
  } finally {
3108
3180
  await t.cancel();
3109
3181
  }
3110
- }, be = (n, t, e, i) => {
3111
- const r = Hn(n, t);
3182
+ }, Se = (n, t, e, i) => {
3183
+ const r = cr(n, t);
3112
3184
  let s = 0, a, o = (c) => {
3113
3185
  a || (a = !0, i && i(c));
3114
3186
  };
3115
3187
  return new ReadableStream({
3116
3188
  async pull(c) {
3117
3189
  try {
3118
- const { done: h, value: u } = await r.next();
3119
- if (h) {
3190
+ const { done: u, value: h } = await r.next();
3191
+ if (u) {
3120
3192
  o(), c.close();
3121
3193
  return;
3122
3194
  }
3123
- let f = u.byteLength;
3195
+ let f = h.byteLength;
3124
3196
  if (e) {
3125
- let _ = s += f;
3126
- e(_);
3197
+ let d = s += f;
3198
+ e(d);
3127
3199
  }
3128
- c.enqueue(new Uint8Array(u));
3129
- } catch (h) {
3130
- throw o(h), h;
3200
+ c.enqueue(new Uint8Array(h));
3201
+ } catch (u) {
3202
+ throw o(u), u;
3131
3203
  }
3132
3204
  },
3133
3205
  cancel(c) {
@@ -3136,15 +3208,15 @@ const We = (n) => {
3136
3208
  }, {
3137
3209
  highWaterMark: 2
3138
3210
  });
3139
- }, Dt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Xe = Dt && typeof ReadableStream == "function", Xn = Dt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((n) => (t) => n.encode(t))(new TextEncoder()) : async (n) => new Uint8Array(await new Response(n).arrayBuffer())), ze = (n, ...t) => {
3211
+ }, Nt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ze = Nt && typeof ReadableStream == "function", hr = Nt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((n) => (t) => n.encode(t))(new TextEncoder()) : async (n) => new Uint8Array(await new Response(n).arrayBuffer())), Ye = (n, ...t) => {
3140
3212
  try {
3141
3213
  return !!n(...t);
3142
3214
  } catch {
3143
3215
  return !1;
3144
3216
  }
3145
- }, zn = Xe && ze(() => {
3217
+ }, lr = Ze && Ye(() => {
3146
3218
  let n = !1;
3147
- const t = new Request(x.origin, {
3219
+ const t = new Request(D.origin, {
3148
3220
  body: new ReadableStream(),
3149
3221
  method: "POST",
3150
3222
  get duplex() {
@@ -3152,34 +3224,34 @@ const We = (n) => {
3152
3224
  }
3153
3225
  }).headers.has("Content-Type");
3154
3226
  return n && !t;
3155
- }), Pe = 64 * 1024, Wt = Xe && ze(() => l.isReadableStream(new Response("").body)), Tt = {
3156
- stream: Wt && ((n) => n.body)
3227
+ }), Te = 64 * 1024, Gt = Ze && Ye(() => l.isReadableStream(new Response("").body)), Rt = {
3228
+ stream: Gt && ((n) => n.body)
3157
3229
  };
3158
- Dt && ((n) => {
3230
+ Nt && ((n) => {
3159
3231
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
3160
- !Tt[t] && (Tt[t] = l.isFunction(n[t]) ? (e) => e[t]() : (e, i) => {
3161
- throw new P(`Response type '${t}' is not supported`, P.ERR_NOT_SUPPORT, i);
3232
+ !Rt[t] && (Rt[t] = l.isFunction(n[t]) ? (e) => e[t]() : (e, i) => {
3233
+ throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, i);
3162
3234
  });
3163
3235
  });
3164
3236
  })(new Response());
3165
- const Gn = async (n) => {
3237
+ const fr = async (n) => {
3166
3238
  if (n == null)
3167
3239
  return 0;
3168
3240
  if (l.isBlob(n))
3169
3241
  return n.size;
3170
3242
  if (l.isSpecCompliantForm(n))
3171
- return (await new Request(x.origin, {
3243
+ return (await new Request(D.origin, {
3172
3244
  method: "POST",
3173
3245
  body: n
3174
3246
  }).arrayBuffer()).byteLength;
3175
3247
  if (l.isArrayBufferView(n) || l.isArrayBuffer(n))
3176
3248
  return n.byteLength;
3177
3249
  if (l.isURLSearchParams(n) && (n = n + ""), l.isString(n))
3178
- return (await Xn(n)).byteLength;
3179
- }, $n = async (n, t) => {
3250
+ return (await hr(n)).byteLength;
3251
+ }, pr = async (n, t) => {
3180
3252
  const e = l.toFiniteNumber(n.getContentLength());
3181
- return e ?? Gn(t);
3182
- }, Jn = Dt && (async (n) => {
3253
+ return e ?? fr(t);
3254
+ }, dr = Nt && (async (n) => {
3183
3255
  let {
3184
3256
  url: t,
3185
3257
  method: e,
@@ -3189,87 +3261,87 @@ const Gn = async (n) => {
3189
3261
  timeout: a,
3190
3262
  onDownloadProgress: o,
3191
3263
  onUploadProgress: c,
3192
- responseType: h,
3193
- headers: u,
3264
+ responseType: u,
3265
+ headers: h,
3194
3266
  withCredentials: f = "same-origin",
3195
- fetchOptions: _
3196
- } = We(n);
3197
- h = h ? (h + "").toLowerCase() : "text";
3198
- let y = qn([r, s && s.toAbortSignal()], a), d;
3199
- const m = y && y.unsubscribe && (() => {
3200
- y.unsubscribe();
3267
+ fetchOptions: d
3268
+ } = Qe(n);
3269
+ u = u ? (u + "").toLowerCase() : "text";
3270
+ let g = ar([r, s && s.toAbortSignal()], a), _;
3271
+ const y = g && g.unsubscribe && (() => {
3272
+ g.unsubscribe();
3201
3273
  });
3202
- let g;
3274
+ let m;
3203
3275
  try {
3204
- if (c && zn && e !== "get" && e !== "head" && (g = await $n(u, i)) !== 0) {
3205
- let O = new Request(t, {
3276
+ if (c && lr && e !== "get" && e !== "head" && (m = await pr(h, i)) !== 0) {
3277
+ let x = new Request(t, {
3206
3278
  method: "POST",
3207
3279
  body: i,
3208
3280
  duplex: "half"
3209
3281
  }), b;
3210
- if (l.isFormData(i) && (b = O.headers.get("content-type")) && u.setContentType(b), O.body) {
3211
- const [V, F] = ge(
3212
- g,
3213
- St(me(c))
3282
+ if (l.isFormData(i) && (b = x.headers.get("content-type")) && h.setContentType(b), x.body) {
3283
+ const [U, j] = ve(
3284
+ m,
3285
+ At(Ee(c))
3214
3286
  );
3215
- i = be(O.body, Pe, V, F);
3287
+ i = Se(x.body, Te, U, j);
3216
3288
  }
3217
3289
  }
3218
3290
  l.isString(f) || (f = f ? "include" : "omit");
3219
3291
  const S = "credentials" in Request.prototype;
3220
- d = new Request(t, {
3221
- ..._,
3222
- signal: y,
3292
+ _ = new Request(t, {
3293
+ ...d,
3294
+ signal: g,
3223
3295
  method: e.toUpperCase(),
3224
- headers: u.normalize().toJSON(),
3296
+ headers: h.normalize().toJSON(),
3225
3297
  body: i,
3226
3298
  duplex: "half",
3227
3299
  credentials: S ? f : void 0
3228
3300
  });
3229
- let E = await fetch(d, _);
3230
- const C = Wt && (h === "stream" || h === "response");
3231
- if (Wt && (o || C && m)) {
3232
- const O = {};
3233
- ["status", "statusText", "headers"].forEach((j) => {
3234
- O[j] = E[j];
3301
+ let w = await fetch(_, d);
3302
+ const C = Gt && (u === "stream" || u === "response");
3303
+ if (Gt && (o || C && y)) {
3304
+ const x = {};
3305
+ ["status", "statusText", "headers"].forEach((q) => {
3306
+ x[q] = w[q];
3235
3307
  });
3236
- const b = l.toFiniteNumber(E.headers.get("content-length")), [V, F] = o && ge(
3308
+ const b = l.toFiniteNumber(w.headers.get("content-length")), [U, j] = o && ve(
3237
3309
  b,
3238
- St(me(o), !0)
3310
+ At(Ee(o), !0)
3239
3311
  ) || [];
3240
- E = new Response(
3241
- be(E.body, Pe, V, () => {
3242
- F && F(), m && m();
3312
+ w = new Response(
3313
+ Se(w.body, Te, U, () => {
3314
+ j && j(), y && y();
3243
3315
  }),
3244
- O
3316
+ x
3245
3317
  );
3246
3318
  }
3247
- h = h || "text";
3248
- let I = await Tt[l.findKey(Tt, h) || "text"](E, n);
3249
- return !C && m && m(), await new Promise((O, b) => {
3250
- Ke(O, b, {
3251
- data: I,
3252
- headers: N.from(E.headers),
3253
- status: E.status,
3254
- statusText: E.statusText,
3319
+ u = u || "text";
3320
+ let B = await Rt[l.findKey(Rt, u) || "text"](w, n);
3321
+ return !C && y && y(), await new Promise((x, b) => {
3322
+ $e(x, b, {
3323
+ data: B,
3324
+ headers: V.from(w.headers),
3325
+ status: w.status,
3326
+ statusText: w.statusText,
3255
3327
  config: n,
3256
- request: d
3328
+ request: _
3257
3329
  });
3258
3330
  });
3259
3331
  } catch (S) {
3260
- throw m && m(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
3261
- new P("Network Error", P.ERR_NETWORK, n, d),
3332
+ throw y && y(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
3333
+ new v("Network Error", v.ERR_NETWORK, n, _),
3262
3334
  {
3263
3335
  cause: S.cause || S
3264
3336
  }
3265
- ) : P.from(S, S && S.code, n, d);
3337
+ ) : v.from(S, S && S.code, n, _);
3266
3338
  }
3267
- }), Xt = {
3268
- http: ln,
3269
- xhr: jn,
3270
- fetch: Jn
3339
+ }), $t = {
3340
+ http: On,
3341
+ xhr: sr,
3342
+ fetch: dr
3271
3343
  };
3272
- l.forEach(Xt, (n, t) => {
3344
+ l.forEach($t, (n, t) => {
3273
3345
  if (n) {
3274
3346
  try {
3275
3347
  Object.defineProperty(n, "name", { value: t });
@@ -3278,7 +3350,7 @@ l.forEach(Xt, (n, t) => {
3278
3350
  Object.defineProperty(n, "adapterName", { value: t });
3279
3351
  }
3280
3352
  });
3281
- const ve = (n) => `- ${n}`, Qn = (n) => l.isFunction(n) || n === null || n === !1, Ge = {
3353
+ const Ce = (n) => `- ${n}`, _r = (n) => l.isFunction(n) || n === null || n === !1, ti = {
3282
3354
  getAdapter: (n) => {
3283
3355
  n = l.isArray(n) ? n : [n];
3284
3356
  const { length: t } = n;
@@ -3287,8 +3359,8 @@ const ve = (n) => `- ${n}`, Qn = (n) => l.isFunction(n) || n === null || n === !
3287
3359
  for (let s = 0; s < t; s++) {
3288
3360
  e = n[s];
3289
3361
  let a;
3290
- if (i = e, !Qn(e) && (i = Xt[(a = String(e)).toLowerCase()], i === void 0))
3291
- throw new P(`Unknown adapter '${a}'`);
3362
+ if (i = e, !_r(e) && (i = $t[(a = String(e)).toLowerCase()], i === void 0))
3363
+ throw new v(`Unknown adapter '${a}'`);
3292
3364
  if (i)
3293
3365
  break;
3294
3366
  r[a || "#" + s] = i;
@@ -3298,57 +3370,57 @@ const ve = (n) => `- ${n}`, Qn = (n) => l.isFunction(n) || n === null || n === !
3298
3370
  ([o, c]) => `adapter ${o} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
3299
3371
  );
3300
3372
  let a = t ? s.length > 1 ? `since :
3301
- ` + s.map(ve).join(`
3302
- `) : " " + ve(s[0]) : "as no adapter specified";
3303
- throw new P(
3373
+ ` + s.map(Ce).join(`
3374
+ `) : " " + Ce(s[0]) : "as no adapter specified";
3375
+ throw new v(
3304
3376
  "There is no suitable adapter to dispatch the request " + a,
3305
3377
  "ERR_NOT_SUPPORT"
3306
3378
  );
3307
3379
  }
3308
3380
  return i;
3309
3381
  },
3310
- adapters: Xt
3382
+ adapters: $t
3311
3383
  };
3312
- function kt(n) {
3384
+ function qt(n) {
3313
3385
  if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
3314
- throw new rt(null, n);
3386
+ throw new at(null, n);
3315
3387
  }
3316
- function we(n) {
3317
- return kt(n), n.headers = N.from(n.headers), n.data = Mt.call(
3388
+ function Ae(n) {
3389
+ return qt(n), n.headers = V.from(n.headers), n.data = jt.call(
3318
3390
  n,
3319
3391
  n.transformRequest
3320
- ), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), Ge.getAdapter(n.adapter || lt.adapter)(n).then(function(i) {
3321
- return kt(n), i.data = Mt.call(
3392
+ ), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), ti.getAdapter(n.adapter || dt.adapter)(n).then(function(i) {
3393
+ return qt(n), i.data = jt.call(
3322
3394
  n,
3323
3395
  n.transformResponse,
3324
3396
  i
3325
- ), i.headers = N.from(i.headers), i;
3397
+ ), i.headers = V.from(i.headers), i;
3326
3398
  }, function(i) {
3327
- return qe(i) || (kt(n), i && i.response && (i.response.data = Mt.call(
3399
+ return Ge(i) || (qt(n), i && i.response && (i.response.data = jt.call(
3328
3400
  n,
3329
3401
  n.transformResponse,
3330
3402
  i.response
3331
- ), i.response.headers = N.from(i.response.headers))), Promise.reject(i);
3403
+ ), i.response.headers = V.from(i.response.headers))), Promise.reject(i);
3332
3404
  });
3333
3405
  }
3334
- const $e = "1.11.0", It = {};
3406
+ const ei = "1.11.0", Vt = {};
3335
3407
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
3336
- It[n] = function(i) {
3408
+ Vt[n] = function(i) {
3337
3409
  return typeof i === n || "a" + (t < 1 ? "n " : " ") + n;
3338
3410
  };
3339
3411
  });
3340
- const Ee = {};
3341
- It.transitional = function(t, e, i) {
3412
+ const Re = {};
3413
+ Vt.transitional = function(t, e, i) {
3342
3414
  function r(s, a) {
3343
- return "[Axios v" + $e + "] Transitional option '" + s + "'" + a + (i ? ". " + i : "");
3415
+ return "[Axios v" + ei + "] Transitional option '" + s + "'" + a + (i ? ". " + i : "");
3344
3416
  }
3345
3417
  return (s, a, o) => {
3346
3418
  if (t === !1)
3347
- throw new P(
3419
+ throw new v(
3348
3420
  r(a, " has been removed" + (e ? " in " + e : "")),
3349
- P.ERR_DEPRECATED
3421
+ v.ERR_DEPRECATED
3350
3422
  );
3351
- return e && !Ee[a] && (Ee[a] = !0, console.warn(
3423
+ return e && !Re[a] && (Re[a] = !0, console.warn(
3352
3424
  r(
3353
3425
  a,
3354
3426
  " has been deprecated since v" + e + " and will be removed in the near future"
@@ -3356,12 +3428,12 @@ It.transitional = function(t, e, i) {
3356
3428
  )), t ? t(s, a, o) : !0;
3357
3429
  };
3358
3430
  };
3359
- It.spelling = function(t) {
3431
+ Vt.spelling = function(t) {
3360
3432
  return (e, i) => (console.warn(`${i} is likely a misspelling of ${t}`), !0);
3361
3433
  };
3362
- function Zn(n, t, e) {
3434
+ function gr(n, t, e) {
3363
3435
  if (typeof n != "object")
3364
- throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
3436
+ throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
3365
3437
  const i = Object.keys(n);
3366
3438
  let r = i.length;
3367
3439
  for (; r-- > 0; ) {
@@ -3369,22 +3441,22 @@ function Zn(n, t, e) {
3369
3441
  if (a) {
3370
3442
  const o = n[s], c = o === void 0 || a(o, s, n);
3371
3443
  if (c !== !0)
3372
- throw new P("option " + s + " must be " + c, P.ERR_BAD_OPTION_VALUE);
3444
+ throw new v("option " + s + " must be " + c, v.ERR_BAD_OPTION_VALUE);
3373
3445
  continue;
3374
3446
  }
3375
3447
  if (e !== !0)
3376
- throw new P("Unknown option " + s, P.ERR_BAD_OPTION);
3448
+ throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
3377
3449
  }
3378
3450
  }
3379
- const wt = {
3380
- assertOptions: Zn,
3381
- validators: It
3382
- }, q = wt.validators;
3383
- let J = class {
3451
+ const Tt = {
3452
+ assertOptions: gr,
3453
+ validators: Vt
3454
+ }, K = Tt.validators;
3455
+ let Z = class {
3384
3456
  constructor(t) {
3385
3457
  this.defaults = t || {}, this.interceptors = {
3386
- request: new de(),
3387
- response: new de()
3458
+ request: new be(),
3459
+ response: new be()
3388
3460
  };
3389
3461
  }
3390
3462
  /**
@@ -3413,20 +3485,20 @@ let J = class {
3413
3485
  }
3414
3486
  }
3415
3487
  _request(t, e) {
3416
- typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = Q(this.defaults, e);
3488
+ typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = Y(this.defaults, e);
3417
3489
  const { transitional: i, paramsSerializer: r, headers: s } = e;
3418
- i !== void 0 && wt.assertOptions(i, {
3419
- silentJSONParsing: q.transitional(q.boolean),
3420
- forcedJSONParsing: q.transitional(q.boolean),
3421
- clarifyTimeoutError: q.transitional(q.boolean)
3490
+ i !== void 0 && Tt.assertOptions(i, {
3491
+ silentJSONParsing: K.transitional(K.boolean),
3492
+ forcedJSONParsing: K.transitional(K.boolean),
3493
+ clarifyTimeoutError: K.transitional(K.boolean)
3422
3494
  }, !1), r != null && (l.isFunction(r) ? e.paramsSerializer = {
3423
3495
  serialize: r
3424
- } : wt.assertOptions(r, {
3425
- encode: q.function,
3426
- serialize: q.function
3427
- }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), wt.assertOptions(e, {
3428
- baseUrl: q.spelling("baseURL"),
3429
- withXsrfToken: q.spelling("withXSRFToken")
3496
+ } : Tt.assertOptions(r, {
3497
+ encode: K.function,
3498
+ serialize: K.function
3499
+ }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), Tt.assertOptions(e, {
3500
+ baseUrl: K.spelling("baseURL"),
3501
+ withXsrfToken: K.spelling("withXSRFToken")
3430
3502
  }, !0), e.method = (e.method || this.defaults.method || "get").toLowerCase();
3431
3503
  let a = s && l.merge(
3432
3504
  s.common,
@@ -3434,55 +3506,55 @@ let J = class {
3434
3506
  );
3435
3507
  s && l.forEach(
3436
3508
  ["delete", "get", "head", "post", "put", "patch", "common"],
3437
- (d) => {
3438
- delete s[d];
3509
+ (_) => {
3510
+ delete s[_];
3439
3511
  }
3440
- ), e.headers = N.concat(a, s);
3512
+ ), e.headers = V.concat(a, s);
3441
3513
  const o = [];
3442
3514
  let c = !0;
3443
- this.interceptors.request.forEach(function(m) {
3444
- typeof m.runWhen == "function" && m.runWhen(e) === !1 || (c = c && m.synchronous, o.unshift(m.fulfilled, m.rejected));
3515
+ this.interceptors.request.forEach(function(y) {
3516
+ typeof y.runWhen == "function" && y.runWhen(e) === !1 || (c = c && y.synchronous, o.unshift(y.fulfilled, y.rejected));
3445
3517
  });
3446
- const h = [];
3447
- this.interceptors.response.forEach(function(m) {
3448
- h.push(m.fulfilled, m.rejected);
3518
+ const u = [];
3519
+ this.interceptors.response.forEach(function(y) {
3520
+ u.push(y.fulfilled, y.rejected);
3449
3521
  });
3450
- let u, f = 0, _;
3522
+ let h, f = 0, d;
3451
3523
  if (!c) {
3452
- const d = [we.bind(this), void 0];
3453
- for (d.unshift(...o), d.push(...h), _ = d.length, u = Promise.resolve(e); f < _; )
3454
- u = u.then(d[f++], d[f++]);
3455
- return u;
3524
+ const _ = [Ae.bind(this), void 0];
3525
+ for (_.unshift(...o), _.push(...u), d = _.length, h = Promise.resolve(e); f < d; )
3526
+ h = h.then(_[f++], _[f++]);
3527
+ return h;
3456
3528
  }
3457
- _ = o.length;
3458
- let y = e;
3459
- for (f = 0; f < _; ) {
3460
- const d = o[f++], m = o[f++];
3529
+ d = o.length;
3530
+ let g = e;
3531
+ for (f = 0; f < d; ) {
3532
+ const _ = o[f++], y = o[f++];
3461
3533
  try {
3462
- y = d(y);
3463
- } catch (g) {
3464
- m.call(this, g);
3534
+ g = _(g);
3535
+ } catch (m) {
3536
+ y.call(this, m);
3465
3537
  break;
3466
3538
  }
3467
3539
  }
3468
3540
  try {
3469
- u = we.call(this, y);
3470
- } catch (d) {
3471
- return Promise.reject(d);
3541
+ h = Ae.call(this, g);
3542
+ } catch (_) {
3543
+ return Promise.reject(_);
3472
3544
  }
3473
- for (f = 0, _ = h.length; f < _; )
3474
- u = u.then(h[f++], h[f++]);
3475
- return u;
3545
+ for (f = 0, d = u.length; f < d; )
3546
+ h = h.then(u[f++], u[f++]);
3547
+ return h;
3476
3548
  }
3477
3549
  getUri(t) {
3478
- t = Q(this.defaults, t);
3479
- const e = He(t.baseURL, t.url, t.allowAbsoluteUrls);
3480
- return ke(e, t.params, t.paramsSerializer);
3550
+ t = Y(this.defaults, t);
3551
+ const e = Je(t.baseURL, t.url, t.allowAbsoluteUrls);
3552
+ return We(e, t.params, t.paramsSerializer);
3481
3553
  }
3482
3554
  };
3483
3555
  l.forEach(["delete", "get", "head", "options"], function(t) {
3484
- J.prototype[t] = function(e, i) {
3485
- return this.request(Q(i || {}, {
3556
+ Z.prototype[t] = function(e, i) {
3557
+ return this.request(Y(i || {}, {
3486
3558
  method: t,
3487
3559
  url: e,
3488
3560
  data: (i || {}).data
@@ -3492,7 +3564,7 @@ l.forEach(["delete", "get", "head", "options"], function(t) {
3492
3564
  l.forEach(["post", "put", "patch"], function(t) {
3493
3565
  function e(i) {
3494
3566
  return function(s, a, o) {
3495
- return this.request(Q(o || {}, {
3567
+ return this.request(Y(o || {}, {
3496
3568
  method: t,
3497
3569
  headers: i ? {
3498
3570
  "Content-Type": "multipart/form-data"
@@ -3502,9 +3574,9 @@ l.forEach(["post", "put", "patch"], function(t) {
3502
3574
  }));
3503
3575
  };
3504
3576
  }
3505
- J.prototype[t] = e(), J.prototype[t + "Form"] = e(!0);
3577
+ Z.prototype[t] = e(), Z.prototype[t + "Form"] = e(!0);
3506
3578
  });
3507
- let Yn = class Je {
3579
+ let mr = class ii {
3508
3580
  constructor(t) {
3509
3581
  if (typeof t != "function")
3510
3582
  throw new TypeError("executor must be a function.");
@@ -3528,7 +3600,7 @@ let Yn = class Je {
3528
3600
  i.unsubscribe(s);
3529
3601
  }, a;
3530
3602
  }, t(function(s, a, o) {
3531
- i.reason || (i.reason = new rt(s, a, o), e(i.reason));
3603
+ i.reason || (i.reason = new at(s, a, o), e(i.reason));
3532
3604
  });
3533
3605
  }
3534
3606
  /**
@@ -3570,22 +3642,22 @@ let Yn = class Je {
3570
3642
  static source() {
3571
3643
  let t;
3572
3644
  return {
3573
- token: new Je(function(r) {
3645
+ token: new ii(function(r) {
3574
3646
  t = r;
3575
3647
  }),
3576
3648
  cancel: t
3577
3649
  };
3578
3650
  }
3579
3651
  };
3580
- function tr(n) {
3652
+ function yr(n) {
3581
3653
  return function(e) {
3582
3654
  return n.apply(null, e);
3583
3655
  };
3584
3656
  }
3585
- function er(n) {
3657
+ function br(n) {
3586
3658
  return l.isObject(n) && n.isAxiosError === !0;
3587
3659
  }
3588
- const zt = {
3660
+ const Jt = {
3589
3661
  Continue: 100,
3590
3662
  SwitchingProtocols: 101,
3591
3663
  Processing: 102,
@@ -3650,54 +3722,54 @@ const zt = {
3650
3722
  NotExtended: 510,
3651
3723
  NetworkAuthenticationRequired: 511
3652
3724
  };
3653
- Object.entries(zt).forEach(([n, t]) => {
3654
- zt[t] = n;
3725
+ Object.entries(Jt).forEach(([n, t]) => {
3726
+ Jt[t] = n;
3655
3727
  });
3656
- function Qe(n) {
3657
- const t = new J(n), e = Ae(J.prototype.request, t);
3658
- return l.extend(e, J.prototype, t, { allOwnKeys: !0 }), l.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
3659
- return Qe(Q(n, r));
3728
+ function ni(n) {
3729
+ const t = new Z(n), e = Be(Z.prototype.request, t);
3730
+ return l.extend(e, Z.prototype, t, { allOwnKeys: !0 }), l.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
3731
+ return ni(Y(n, r));
3660
3732
  }, e;
3661
3733
  }
3662
- const T = Qe(lt);
3663
- T.Axios = J;
3664
- T.CanceledError = rt;
3665
- T.CancelToken = Yn;
3666
- T.isCancel = qe;
3667
- T.VERSION = $e;
3668
- T.toFormData = xt;
3669
- T.AxiosError = P;
3734
+ const T = ni(dt);
3735
+ T.Axios = Z;
3736
+ T.CanceledError = at;
3737
+ T.CancelToken = mr;
3738
+ T.isCancel = Ge;
3739
+ T.VERSION = ei;
3740
+ T.toFormData = Bt;
3741
+ T.AxiosError = v;
3670
3742
  T.Cancel = T.CanceledError;
3671
3743
  T.all = function(t) {
3672
3744
  return Promise.all(t);
3673
3745
  };
3674
- T.spread = tr;
3675
- T.isAxiosError = er;
3676
- T.mergeConfig = Q;
3677
- T.AxiosHeaders = N;
3678
- T.formToJSON = (n) => je(l.isHTMLForm(n) ? new FormData(n) : n);
3679
- T.getAdapter = Ge.getAdapter;
3680
- T.HttpStatusCode = zt;
3746
+ T.spread = yr;
3747
+ T.isAxiosError = br;
3748
+ T.mergeConfig = Y;
3749
+ T.AxiosHeaders = V;
3750
+ T.formToJSON = (n) => ze(l.isHTMLForm(n) ? new FormData(n) : n);
3751
+ T.getAdapter = ti.getAdapter;
3752
+ T.HttpStatusCode = Jt;
3681
3753
  T.default = T;
3682
3754
  const {
3683
- Axios: ar,
3684
- AxiosError: or,
3685
- CanceledError: cr,
3686
- isCancel: ur,
3687
- CancelToken: hr,
3688
- VERSION: lr,
3689
- all: fr,
3690
- Cancel: pr,
3691
- isAxiosError: dr,
3692
- spread: _r,
3693
- toFormData: gr,
3694
- AxiosHeaders: mr,
3695
- HttpStatusCode: yr,
3696
- formToJSON: br,
3697
- getAdapter: Pr,
3698
- mergeConfig: vr
3755
+ Axios: Sr,
3756
+ AxiosError: Tr,
3757
+ CanceledError: Cr,
3758
+ isCancel: Ar,
3759
+ CancelToken: Rr,
3760
+ VERSION: Or,
3761
+ all: xr,
3762
+ Cancel: Dr,
3763
+ isAxiosError: Ir,
3764
+ spread: Br,
3765
+ toFormData: Nr,
3766
+ AxiosHeaders: Vr,
3767
+ HttpStatusCode: Ur,
3768
+ formToJSON: Lr,
3769
+ getAdapter: Mr,
3770
+ mergeConfig: kr
3699
3771
  } = T;
3700
- class wr extends Ye {
3772
+ class Fr extends si {
3701
3773
  __pinPad__ = {
3702
3774
  buffer: null,
3703
3775
  about: {
@@ -3874,14 +3946,14 @@ class wr extends Ye {
3874
3946
  password: null,
3875
3947
  environment: "production"
3876
3948
  }) {
3877
- if (super({ filters: t, config_port: e, no_device: i, device_listen_on_channel: r }), this.__internal__.device.type = "pinpad", !ti())
3949
+ if (super({ filters: t, config_port: e, no_device: i, device_listen_on_channel: r }), this.__internal__.device.type = "pinpad", !ai())
3878
3950
  throw new Error("Crypto not supported in this browser");
3879
- if (te.getCustom(this.typeDevice, i))
3951
+ if (ne.getCustom(this.typeDevice, i))
3880
3952
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
3881
3953
  this.__internal__.time.response_connection = 3e3, this.__internal__.time.response_general = 5e3, this.__internal__.serial.delay_first_connection = 1e3, this.environment = o, s && (this.username = s), a && (this.password = a), this.#A(), this.#C();
3882
3954
  }
3883
3955
  #C() {
3884
- te.add(this);
3956
+ ne.add(this);
3885
3957
  }
3886
3958
  #A() {
3887
3959
  const t = [
@@ -3908,18 +3980,18 @@ class wr extends Ye {
3908
3980
  const o = t.split(r);
3909
3981
  o.push(...a[1].split(r));
3910
3982
  const c = {};
3911
- return o.map((h, u) => {
3912
- const f = u > 0 ? h.substring(0, 1) : "A", _ = u > 0 ? h.substring(1) : h;
3913
- return { [f]: _.replace(new RegExp(s, "g"), "") };
3914
- }).forEach((h) => Object.assign(c, h)), c;
3983
+ return o.map((u, h) => {
3984
+ const f = h > 0 ? u.substring(0, 1) : "A", d = h > 0 ? u.substring(1) : u;
3985
+ return { [f]: d.replace(new RegExp(s, "g"), "") };
3986
+ }).forEach((u) => Object.assign(c, u)), c;
3915
3987
  }
3916
3988
  #f(t, e) {
3917
3989
  const i = this.__pinPad__.constants.ETX, r = e.substring(e.indexOf("D") + 2, e.indexOf("E"));
3918
3990
  let s = 0;
3919
3991
  const a = e.indexOf("N") > 0, o = e.substring(e.indexOf("A00") + 3, e.indexOf("B"));
3920
3992
  if (o && o !== "undefined" && o.toUpperCase() === "VERIFONE") {
3921
- const h = r.replace("MITP_1.00.", "").replace("MITP_01.00.", "").replace("MITD_1.00.", "").replace("MITD_01.00.", "");
3922
- s = parseInt(h), s >= 15 && (this.__pinPad__.about.hasCashback = !0);
3993
+ const u = r.replace("MITP_1.00.", "").replace("MITP_01.00.", "").replace("MITD_1.00.", "").replace("MITD_01.00.", "");
3994
+ s = parseInt(u), s >= 15 && (this.__pinPad__.about.hasCashback = !0);
3923
3995
  }
3924
3996
  this.__pinPad__.about.supportInjection = a, e.indexOf("M") > 0 ? (this.__pinPad__.about.supportSign = e.substring(e.indexOf("L") + 2, e.indexOf("M")), this.__pinPad__.about.supportInjection ? this.__pinPad__.about.supportContactlessCollisionCard = e.substring(
3925
3997
  e.indexOf("M") + 2,
@@ -3984,36 +4056,36 @@ class wr extends Ye {
3984
4056
  const e = this.__pinPad__.constants.ETX, i = this.__pinPad__.about.brand.toLowerCase();
3985
4057
  let r, s, a, o, c;
3986
4058
  i === "verifone" ? t = t.replace("006P93A00.", "").replace("009P93A00", "").replace("010P93A00B01v", "") : t = t.replace("006P93A00,", ""), this.__pinPad__.config.read.POSEM = t.substring(t.indexOf("P93A") + 4, t.indexOf("B"));
3987
- const h = this.__pinPad__.config.read.POSEM;
3988
- if (h === "051" || h === "071") {
4059
+ const u = this.__pinPad__.config.read.POSEM;
4060
+ if (u === "051" || u === "071") {
3989
4061
  if (this.__pinPad__.config.read.Chip = "1", this.__pinPad__.config.read.PIN = t.substring(t.indexOf("C") + 2, t.indexOf("D")), this.__pinPad__.config.read.AppId = t.substring(t.indexOf("G") + 2, t.indexOf("H")), this.__pinPad__.config.read.AppIdLabel = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.Arqc = t.substring(t.indexOf("F") + 2, t.indexOf("G")), t.includes("O")) {
3990
- const u = t.substring(t.indexOf("P93A"));
3991
- this.__pinPad__.config.read.ReadCTLS = u.substring(
3992
- u.indexOf("M") + 2,
3993
- u.indexOf("N")
3994
- ), this.__pinPad__.operation.hasQPS = u.substring(u.indexOf("N") + 2, u.indexOf("O")) === "1", this.__pinPad__.operation.bin8 = u.substring(u.indexOf("O") + 2, u.indexOf(e));
4062
+ const h = t.substring(t.indexOf("P93A"));
4063
+ this.__pinPad__.config.read.ReadCTLS = h.substring(
4064
+ h.indexOf("M") + 2,
4065
+ h.indexOf("N")
4066
+ ), this.__pinPad__.operation.hasQPS = h.substring(h.indexOf("N") + 2, h.indexOf("O")) === "1", this.__pinPad__.operation.bin8 = h.substring(h.indexOf("O") + 2, h.indexOf(e));
3995
4067
  } else if (t.includes("N")) {
3996
- const u = t.substring(t.indexOf("P93A"));
3997
- this.__pinPad__.config.read.ReadCTLS = u.substring(
3998
- u.indexOf("M") + 2,
3999
- u.indexOf("N")
4000
- ), this.__pinPad__.operation.hasQPS = u.substring(u.indexOf("N") + 2, u.indexOf(e)) === "1";
4068
+ const h = t.substring(t.indexOf("P93A"));
4069
+ this.__pinPad__.config.read.ReadCTLS = h.substring(
4070
+ h.indexOf("M") + 2,
4071
+ h.indexOf("N")
4072
+ ), this.__pinPad__.operation.hasQPS = h.substring(h.indexOf("N") + 2, h.indexOf(e)) === "1";
4001
4073
  } else {
4002
- const u = t.substring(t.indexOf("P93A"), t.indexOf("M") + 5);
4003
- this.__pinPad__.config.read.ReadCTLS = u.substring(u.indexOf("M") + 2, u.indexOf(e)), this.__pinPad__.operation.hasQPS = !1;
4074
+ const h = t.substring(t.indexOf("P93A"), t.indexOf("M") + 5);
4075
+ this.__pinPad__.config.read.ReadCTLS = h.substring(h.indexOf("M") + 2, h.indexOf(e)), this.__pinPad__.operation.hasQPS = !1;
4004
4076
  }
4005
4077
  this.__pinPad__.config.read.Tags = t.substring(t.indexOf("B") + 2, t.indexOf("C")), this.__pinPad__.config.read.NB_ksn = t.substring(t.indexOf("K") + 2, t.indexOf("M")), this.__pinPad__.config.read.NB_Data = t.substring(t.indexOf("D") + 2, t.indexOf("E")), s = t.substring(t.indexOf("I") + 2, t.indexOf("J")), a = t.substring(t.indexOf("E") + 2, t.indexOf("F")), this.__pinPad__.config.read.ChipName = a, r = t.substring(t.indexOf("J") + 2, t.indexOf("K"));
4006
4078
  } else {
4007
- let u;
4008
- if (this.__pinPad__.config.read.Chip = "0", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ReadCTLS = "0", this.__pinPad__.config.read.AppIdLabel = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.Tags = t.substring(t.indexOf("B") + 2, t.indexOf("C")), h === "022")
4079
+ let h;
4080
+ if (this.__pinPad__.config.read.Chip = "0", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ReadCTLS = "0", this.__pinPad__.config.read.AppIdLabel = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.Tags = t.substring(t.indexOf("B") + 2, t.indexOf("C")), u === "022")
4009
4081
  if (t.includes("O")) {
4010
4082
  const f = t.substring(t.indexOf("P93A"));
4011
- this.__pinPad__.operation.bin8 = f.substring(f.indexOf("O") + 2, f.indexOf(e)), u = t.substring(t.indexOf("P93A022"), t.indexOf("I") + 23), u = u.substring(u.indexOf("I") + 2, u.lastIndexOf(""));
4083
+ this.__pinPad__.operation.bin8 = f.substring(f.indexOf("O") + 2, f.indexOf(e)), h = t.substring(t.indexOf("P93A022"), t.indexOf("I") + 23), h = h.substring(h.indexOf("I") + 2, h.lastIndexOf(""));
4012
4084
  } else
4013
- u = t.substring(t.indexOf("P93A022"), t.indexOf("I") + 23), u = u.substring(u.indexOf("I") + 2, u.indexOf(e));
4085
+ h = t.substring(t.indexOf("P93A022"), t.indexOf("I") + 23), h = h.substring(h.indexOf("I") + 2, h.indexOf(e));
4014
4086
  else
4015
- u = t.substring(t.indexOf("P93A800"), t.indexOf("I") + 23), u = u.substring(u.indexOf("I") + 2, u.indexOf(e));
4016
- this.__pinPad__.config.read.NB_ksn = u, this.__pinPad__.config.read.NB_Data = t.substring(t.indexOf("B") + 2, t.indexOf("C")), s = t.substring(t.indexOf("F") + 2, t.indexOf("G")), r = t.substring(t.indexOf("G") + 2, t.indexOf("H")), this.__pinPad__.about.model.toLowerCase() === "vx520" ? (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a) : (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a);
4087
+ h = t.substring(t.indexOf("P93A800"), t.indexOf("I") + 23), h = h.substring(h.indexOf("I") + 2, h.indexOf(e));
4088
+ this.__pinPad__.config.read.NB_ksn = h, this.__pinPad__.config.read.NB_Data = t.substring(t.indexOf("B") + 2, t.indexOf("C")), s = t.substring(t.indexOf("F") + 2, t.indexOf("G")), r = t.substring(t.indexOf("G") + 2, t.indexOf("H")), this.__pinPad__.about.model.toLowerCase() === "vx520" ? (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a) : (a = t.substring(t.indexOf("H") + 2, t.indexOf("I")), this.__pinPad__.config.read.ChipName = a);
4017
4089
  }
4018
4090
  r.includes("/") && (r = r.replace("/", "")), r.toString().length === 4 ? (c = r.toString().substring(0, 2), o = r.toString().substring(2)) : (c = "", o = ""), this.__pinPad__.config.read.Chip === "1" ? (this.__pinPad__.config.read.EMV = "3", this.__pinPad__.config.read.ChipNameEnc = "1") : (this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.config.read.EMV = "2"), this.__pinPad__.config.read.AppIdLabel.toLowerCase().includes("american") || this.__pinPad__.config.read.AppIdLabel.toLowerCase().includes("amex") ? this.__pinPad__.config.read.Type = "AMEX" : this.__pinPad__.config.read.Type = "V/MC", this.__pinPad__.operation.bin = s, s.length > 6 && (this.__pinPad__.operation.bin = s.substring(0, 6)), this.__pinPad__.waiting.statusReadCardWaiting = "resolved", this.dispatch("pp:read-card", {
4019
4091
  ERROR: "",
@@ -4202,7 +4274,7 @@ class wr extends Ye {
4202
4274
  // Updated to WS v4
4203
4275
  // ========================================================================================
4204
4276
  #s(t, e) {
4205
- const i = new Si();
4277
+ const i = new qi();
4206
4278
  return i.setPublicKey(t), i.encrypt(e);
4207
4279
  }
4208
4280
  #a(t) {
@@ -4240,8 +4312,8 @@ class wr extends Ye {
4240
4312
  // return decodedArray.join('');
4241
4313
  // }
4242
4314
  async #o(t, e) {
4243
- const i = new Uint8Array(t.match(/.{1,2}/g).map((f) => parseInt(f, 16))), r = crypto.getRandomValues(new Uint8Array(16)), a = new TextEncoder().encode(e), o = await crypto.subtle.importKey("raw", i, { name: "AES-CBC" }, !1, ["encrypt"]), c = await crypto.subtle.encrypt({ name: "AES-CBC", iv: r }, o, a), h = btoa(String.fromCharCode(...r)), u = btoa(String.fromCharCode(...new Uint8Array(c)));
4244
- return h + u;
4315
+ const i = new Uint8Array(t.match(/.{1,2}/g).map((f) => parseInt(f, 16))), r = crypto.getRandomValues(new Uint8Array(16)), a = new TextEncoder().encode(e), o = await crypto.subtle.importKey("raw", i, { name: "AES-CBC" }, !1, ["encrypt"]), c = await crypto.subtle.encrypt({ name: "AES-CBC", iv: r }, o, a), u = btoa(String.fromCharCode(...r)), h = btoa(String.fromCharCode(...new Uint8Array(c)));
4316
+ return u + h;
4245
4317
  }
4246
4318
  // async AESDecrypt(key, encryptedMessage) {
4247
4319
  // const keyBytes = new Uint8Array(key.match(/.{1,2}/g).map((byte) => parseInt(byte, 16)));
@@ -4268,16 +4340,16 @@ class wr extends Ye {
4268
4340
  // }
4269
4341
  #F(t, e, i = !1) {
4270
4342
  const r = [];
4271
- for (let h = 0; h < 256; h++)
4272
- r[h] = h;
4343
+ for (let u = 0; u < 256; u++)
4344
+ r[u] = u;
4273
4345
  let s = 0;
4274
- for (let h = 0; h < 256; h++)
4275
- s = (s + r[h] + t.charCodeAt(h % t.length)) % 256, [r[h], r[s]] = [r[s], r[h]];
4346
+ for (let u = 0; u < 256; u++)
4347
+ s = (s + r[u] + t.charCodeAt(u % t.length)) % 256, [r[u], r[s]] = [r[s], r[u]];
4276
4348
  let a = 0, o = 0, c = "";
4277
- for (const h of e) {
4349
+ for (const u of e) {
4278
4350
  a = (a + 1) % 256, o = (o + r[a]) % 256, [r[a], r[o]] = [r[o], r[a]];
4279
- let u = r[(r[a] + r[o]) % 256];
4280
- c += String.fromCharCode(h.charCodeAt(0) ^ u);
4351
+ let h = r[(r[a] + r[o]) % 256];
4352
+ c += String.fromCharCode(u.charCodeAt(0) ^ h);
4281
4353
  }
4282
4354
  return i ? this.#k(c).toUpperCase() : c;
4283
4355
  }
@@ -4316,8 +4388,8 @@ class wr extends Ye {
4316
4388
  "cache-control": "no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0",
4317
4389
  data: s || ""
4318
4390
  }
4319
- }).catch((h) => {
4320
- throw new Error(`Error in request, verify internet connection: ${h.response?.status} ${h.message}`);
4391
+ }).catch((u) => {
4392
+ throw new Error(`Error in request, verify internet connection: ${u.response?.status} ${u.message}`);
4321
4393
  });
4322
4394
  let c = this.#b(JSON.stringify(o.data));
4323
4395
  if (typeof c == "string" && (c = JSON.parse(c)), !c)
@@ -4398,7 +4470,7 @@ class wr extends Ye {
4398
4470
  return /^[A-Z-a-z0-9\s]+$/g.test(t);
4399
4471
  }
4400
4472
  #z(t) {
4401
- if (K(t))
4473
+ if (W(t))
4402
4474
  return !0;
4403
4475
  const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
4404
4476
  if (!e)
@@ -4451,7 +4523,7 @@ class wr extends Ye {
4451
4523
  return e + i;
4452
4524
  }
4453
4525
  async checkPositionPermission() {
4454
- if (!Zt())
4526
+ if (!ee())
4455
4527
  throw new Error("Geolocation not supported");
4456
4528
  return new Promise((t, e) => {
4457
4529
  navigator.permissions.query({ name: "geolocation" }).then((i) => {
@@ -4460,7 +4532,7 @@ class wr extends Ye {
4460
4532
  });
4461
4533
  }
4462
4534
  async #$() {
4463
- return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, Zt() ? new Promise((t) => {
4535
+ return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, ee() ? new Promise((t) => {
4464
4536
  navigator.geolocation.getCurrentPosition(
4465
4537
  (e) => {
4466
4538
  this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
@@ -4554,7 +4626,7 @@ class wr extends Ye {
4554
4626
  // this.dispatch('pp:merchant-moto', response);
4555
4627
  // return response;
4556
4628
  // }
4557
- async #w({ data: t, url: e, cancelable: i = !1 } = {}) {
4629
+ async #E({ data: t, url: e, cancelable: i = !1 } = {}) {
4558
4630
  await this.#c();
4559
4631
  const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA, r), a = await this.#o(r, JSON.stringify(t)), o = this;
4560
4632
  return (await T.post(e, a, {
@@ -4563,9 +4635,9 @@ class wr extends Ye {
4563
4635
  "cache-control": "no-cache",
4564
4636
  data: s || ""
4565
4637
  }
4566
- }).catch(async (h) => {
4567
- let u = `Error in request, verify internet connection: ${h.status} ${h.message}`;
4568
- throw h.response.status >= 500 && h.response.status <= 599 ? u = "Service Temporarily Unavailable" : h.response.status >= 400 && h.response.status <= 499 && (u = "Bad Request"), i && await o.#G(), new Error(u);
4638
+ }).catch(async (u) => {
4639
+ let h = `Error in request, verify internet connection: ${u.status} ${u.message}`;
4640
+ throw u.response.status >= 500 && u.response.status <= 599 ? h = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (h = "Bad Request"), i && await o.#G(), new Error(h);
4569
4641
  })).data;
4570
4642
  }
4571
4643
  async #Q() {
@@ -4578,7 +4650,7 @@ class wr extends Ye {
4578
4650
  }
4579
4651
  async #Z() {
4580
4652
  this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
4581
- const t = await this.#w({
4653
+ const t = await this.#E({
4582
4654
  data: {
4583
4655
  accion: "tipoPagoInfo",
4584
4656
  cc_num: this.__pinPad__.operation.bin,
@@ -4607,7 +4679,7 @@ class wr extends Ye {
4607
4679
  if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
4608
4680
  const e = this.__pinPad__.constants.STX, i = this.__pinPad__.constants.ETX;
4609
4681
  let r = "C56AABOUT";
4610
- if (r = e + this.#e(r) + r + i, r = r + this.#i(r), K(this.__pinPad__.about.pp)) {
4682
+ if (r = e + this.#e(r) + r + i, r = r + this.#i(r), W(this.__pinPad__.about.pp)) {
4611
4683
  this.__pinPad__.waiting.statusAboutWaiting = "pending";
4612
4684
  const o = this.parseStringToBytes(r, "");
4613
4685
  await this.appendToQueue(o, "about");
@@ -4618,7 +4690,7 @@ class wr extends Ye {
4618
4690
  return new Promise((o, c) => {
4619
4691
  a = setInterval(() => {
4620
4692
  if (s.__pinPad__.waiting.statusAboutWaiting === "resolved") {
4621
- if (clearInterval(a), s.__pinPad__.waiting.statusAboutWaiting = null, K(s.__pinPad__.about.pp))
4693
+ if (clearInterval(a), s.__pinPad__.waiting.statusAboutWaiting = null, W(s.__pinPad__.about.pp))
4622
4694
  return;
4623
4695
  t || o(!0), o(t(s.__pinPad__.about.pp.supportDUKPT, s.__pinPad__.about.pp.hasDUKPTKeys));
4624
4696
  } else s.__pinPad__.waiting.statusAboutWaiting === "rejected" && (clearInterval(a), s.__pinPad__.waiting.statusAboutWaiting = null, c("Error"));
@@ -4626,25 +4698,25 @@ class wr extends Ye {
4626
4698
  });
4627
4699
  }
4628
4700
  async #l(t, e) {
4629
- if (t = t ? t.toString() : "", e = e ? e.toString() : "", K(t) || t === "0") {
4701
+ if (t = t ? t.toString() : "", e = e ? e.toString() : "", W(t) || t === "0") {
4630
4702
  this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
4631
4703
  return;
4632
4704
  }
4633
- if (K(e) || e === "1") {
4705
+ if (W(e) || e === "1") {
4634
4706
  this.dispatch("pp:dukpt", { status: "charged", already: !0 });
4635
4707
  return;
4636
4708
  }
4637
4709
  const i = this.#P(), r = this.#v(), s = this.__pinPad__.constants.FS, a = this.__pinPad__.constants.ETX, o = this.__pinPad__.constants.STX;
4638
4710
  let c = "C91A" + i + s + "B" + r;
4639
4711
  c = o + this.#e(c) + c + a, c = c + this.#i(c);
4640
- const h = this.parseStringToBytes(c, "");
4641
- await this.appendToQueue(h, "init-dukpt");
4642
- let u = 0;
4712
+ const u = this.parseStringToBytes(c, "");
4713
+ await this.appendToQueue(u, "init-dukpt");
4714
+ let h = 0;
4643
4715
  this.__pinPad__.waiting.statusinitDUKPTWaiting = "pending";
4644
4716
  const f = this;
4645
- return new Promise((_, y) => {
4646
- u = setInterval(async () => {
4647
- f.__pinPad__.waiting.statusinitDUKPTWaiting === "resolved" ? (clearInterval(u), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, f.dispatch("pp:dukpt", { status: "charged", already: !1 }), await f.#tt(), _(!0)) : f.__pinPad__.waiting.statusinitDUKPTWaiting === "rejected" && (clearInterval(u), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, y("Error"));
4717
+ return new Promise((d, g) => {
4718
+ h = setInterval(async () => {
4719
+ f.__pinPad__.waiting.statusinitDUKPTWaiting === "resolved" ? (clearInterval(h), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, f.dispatch("pp:dukpt", { status: "charged", already: !1 }), await f.#tt(), d(!0)) : f.__pinPad__.waiting.statusinitDUKPTWaiting === "rejected" && (clearInterval(h), f.__pinPad__.waiting.statusinitDUKPTWaiting = null, g("Error"));
4648
4720
  }, 500);
4649
4721
  });
4650
4722
  }
@@ -4660,7 +4732,7 @@ class wr extends Ye {
4660
4732
  },
4661
4733
  terminal: this.__pinPad__.config.terminal
4662
4734
  }
4663
- }, e = await this.#w({
4735
+ }, e = await this.#E({
4664
4736
  data: t,
4665
4737
  url: this.url + this.__pinPad__.constants.uris.keysDUKPT
4666
4738
  });
@@ -4681,7 +4753,7 @@ class wr extends Ye {
4681
4753
  });
4682
4754
  });
4683
4755
  }
4684
- #E(t, e = 0) {
4756
+ #w(t, e = 0) {
4685
4757
  if (t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) || t === 0)
4686
4758
  return parseFloat("0").toFixed(e);
4687
4759
  t = t.toFixed(e);
@@ -4697,7 +4769,7 @@ class wr extends Ye {
4697
4769
  async #it() {
4698
4770
  this.__pinPad__.operation.errors = 0;
4699
4771
  let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
4700
- if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), K(this.amount) || this.amount <= 0)
4772
+ if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), W(this.amount) || this.amount <= 0)
4701
4773
  throw new Error("Amount required");
4702
4774
  if (this.#m(this.amount) === !1)
4703
4775
  throw new Error("Invalid amount required");
@@ -4710,27 +4782,27 @@ class wr extends Ye {
4710
4782
  await this.appendToQueue(a, "read-card");
4711
4783
  let o = 0;
4712
4784
  const c = this;
4713
- return this.__pinPad__.waiting.statusReadCardWaiting = "pending", new Promise((h, u) => {
4785
+ return this.__pinPad__.waiting.statusReadCardWaiting = "pending", new Promise((u, h) => {
4714
4786
  o = setInterval(() => {
4715
4787
  if (c.__pinPad__.waiting.statusReadCardWaiting === "resolved")
4716
- clearInterval(o), c.__pinPad__.waiting.statusReadCardWaiting = null, h(!0);
4788
+ clearInterval(o), c.__pinPad__.waiting.statusReadCardWaiting = null, u(!0);
4717
4789
  else if (c.__pinPad__.waiting.statusReadCardWaiting === "rejected") {
4718
4790
  clearInterval(o), c.__pinPad__.waiting.statusReadCardWaiting = null;
4719
4791
  const f = c.__pinPad__.operation.last_error;
4720
- u(f ?? "Error reading card");
4792
+ h(f ?? "Error reading card");
4721
4793
  }
4722
4794
  }, 500);
4723
4795
  });
4724
4796
  }
4725
4797
  async #nt(t) {
4726
- return await Yt(t * 1e3);
4798
+ return await ie(t * 1e3);
4727
4799
  }
4728
4800
  /**
4729
4801
  * @param {null|string} reference
4730
4802
  * @return {Promise<any>}
4731
4803
  */
4732
4804
  async consult({ reference: t = null }) {
4733
- return t || (t = this.reference), K(t) && (t = "--", this.reference = t), this.#z(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
4805
+ return t || (t = this.reference), W(t) && (t = "--", this.reference = t), this.#z(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
4734
4806
  Ambiente: this.environment,
4735
4807
  User: this.username,
4736
4808
  Pwd: this.password,
@@ -4770,24 +4842,24 @@ class wr extends Ye {
4770
4842
  ), await this.#nt(5)), await this.#c();
4771
4843
  const s = this.#a(32), a = this.#s(this.__pinPad__.config.publicKeyRSA, s), o = await this.#o(s, JSON.stringify(e));
4772
4844
  let c = !1;
4773
- const h = await T.post(t, o, {
4845
+ const u = await T.post(t, o, {
4774
4846
  headers: {
4775
4847
  "Content-Type": "application/json",
4776
4848
  data: a || ""
4777
4849
  }
4778
- }).catch(async (u) => {
4779
- let f = `Error in request, verify internet connection: ${u.status} ${u.message}`;
4780
- u.response.status >= 500 && u.response.status <= 599 ? f = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (f = "Bad Request"), console.warn(u), r = f;
4781
- const _ = await this.#rt(i);
4782
- _ && _ !== "{}" && !_.includes('"transacciones":""') && _.includes("nu_operaion") && (i = 5, r = "EE32"), c = !0;
4850
+ }).catch(async (h) => {
4851
+ let f = `Error in request, verify internet connection: ${h.status} ${h.message}`;
4852
+ h.response.status >= 500 && h.response.status <= 599 ? f = "Service Temporarily Unavailable" : h.response.status >= 400 && h.response.status <= 499 && (f = "Bad Request"), console.warn(h), r = f;
4853
+ const d = await this.#rt(i);
4854
+ d && d !== "{}" && !d.includes('"transacciones":""') && d.includes("nu_operaion") && (i = 5, r = "EE32"), c = !0;
4783
4855
  });
4784
4856
  if (!c)
4785
- return h.data;
4857
+ return u.data;
4786
4858
  } while (i++ <= 3);
4787
4859
  return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
4788
4860
  }
4789
4861
  #at(t) {
4790
- if (K(t)) throw new Error("Number of authorization invalid");
4862
+ if (W(t)) throw new Error("Number of authorization invalid");
4791
4863
  if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
4792
4864
  if (t.length !== 6) throw new Error("Number of authorization invalid");
4793
4865
  return !0;
@@ -4894,7 +4966,7 @@ class wr extends Ye {
4894
4966
  if (!this.#m(t)) throw new Error("Invalid amount");
4895
4967
  if (!this.#at(e)) throw new Error("Invalid authorization");
4896
4968
  if (!this.#y(i)) throw new Error("Invalid folio");
4897
- t = this.#E(t, 2);
4969
+ t = this.#w(t, 2);
4898
4970
  const r = {
4899
4971
  Ambiente: this.environment,
4900
4972
  User: this.username,
@@ -4948,7 +5020,7 @@ class wr extends Ye {
4948
5020
  object: {}
4949
5021
  };
4950
5022
  try {
4951
- const r = await this.#E(this.amount, 2);
5023
+ const r = await this.#w(this.amount, 2);
4952
5024
  await this.#u({
4953
5025
  Ambiente: this.environment,
4954
5026
  Country: this.__pinPad__.config.country,
@@ -5046,7 +5118,7 @@ class wr extends Ye {
5046
5118
  this.__pinPad__.waiting.statusSecondGenerateWaiting = "pending", await this.appendToQueue(a, "second-generate");
5047
5119
  let o = 0;
5048
5120
  const c = this;
5049
- return new Promise((h, u) => {
5121
+ return new Promise((u, h) => {
5050
5122
  o = setInterval(async () => {
5051
5123
  if (c.__pinPad__.waiting.statusSecondGenerateWaiting === "resolved") {
5052
5124
  if (clearInterval(o), c.__pinPad__.waiting.statusSecondGenerateWaiting = null, c.__pinPad__.operation.applyReverse) {
@@ -5069,13 +5141,13 @@ class wr extends Ye {
5069
5141
  version: this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion
5070
5142
  }
5071
5143
  }
5072
- }), _ = JSON.parse(f);
5073
- let y;
5074
- _.response === "approved" ? y = { message: "Transaction rejected by PinPad." } : y = { message: "No communication, please check your report." }, c.__pinPad__.operation.ignore.counterSale || (c.dispatch("pp:finish-emv", y), c.__pinPad__.operation.ignore.counterSale = !0);
5144
+ }), d = JSON.parse(f);
5145
+ let g;
5146
+ d.response === "approved" ? g = { message: "Transaction rejected by PinPad." } : g = { message: "No communication, please check your report." }, c.__pinPad__.operation.ignore.counterSale || (c.dispatch("pp:finish-emv", g), c.__pinPad__.operation.ignore.counterSale = !0);
5075
5147
  } else
5076
5148
  c.__pinPad__.operation.ignore.counterSale || (c.dispatch("pp:finish-emv", t), c.__pinPad__.operation.ignore.counterSale = !0);
5077
- t.cd_error === "92" && await c.#ht(t, s), h(!0);
5078
- } else c.__pinPad__.waiting.statusSecondGenerateWaiting === "rejected" && (clearInterval(o), c.__pinPad__.waiting.statusSecondGenerateWaiting = null, u("There is no response from the reader, check that it is connected."));
5149
+ t.cd_error === "92" && await c.#ht(t, s), u(!0);
5150
+ } else c.__pinPad__.waiting.statusSecondGenerateWaiting === "rejected" && (clearInterval(o), c.__pinPad__.waiting.statusSecondGenerateWaiting = null, h("There is no response from the reader, check that it is connected."));
5079
5151
  }, 500);
5080
5152
  });
5081
5153
  }
@@ -5087,7 +5159,7 @@ class wr extends Ye {
5087
5159
  this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5088
5160
  else {
5089
5161
  const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
5090
- await this.appendToQueue(t, "code93"), await Yt(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5162
+ await this.appendToQueue(t, "code93"), await ie(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
5091
5163
  }
5092
5164
  }
5093
5165
  #T(t) {
@@ -5154,14 +5226,14 @@ class wr extends Ye {
5154
5226
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.ETX, r = this.__pinPad__.constants.STX, s = t.nb_ksn, a = t.nb_kcv || "", o = t.nb_ipek || "";
5155
5227
  let c = "C92A" + s + e + "B" + a + e + "C" + o;
5156
5228
  c = r + this.#e(c) + c + i, c = c + this.#i(c);
5157
- const h = this.parseStringToBytes(c, "");
5158
- await this.appendToQueue(h, "dukpt");
5159
- let u = 0;
5229
+ const u = this.parseStringToBytes(c, "");
5230
+ await this.appendToQueue(u, "dukpt");
5231
+ let h = 0;
5160
5232
  this.__pinPad__.waiting.statuswritingDUKPTWaiting = "pending";
5161
5233
  const f = this;
5162
- return new Promise((_, y) => {
5163
- u = setInterval(async () => {
5164
- f.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(u), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await f.#S(), _(!0)) : f.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(u), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, y("Error writing DUKPT keys"));
5234
+ return new Promise((d, g) => {
5235
+ h = setInterval(async () => {
5236
+ f.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(h), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await f.#S(), d(!0)) : f.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(h), f.__pinPad__.waiting.statuswritingDUKPTWaiting = null, g("Error writing DUKPT keys"));
5165
5237
  }, 500);
5166
5238
  });
5167
5239
  }
@@ -5179,7 +5251,7 @@ class wr extends Ye {
5179
5251
  async makeSale({ amount: t = 0, reference: e = null } = {}) {
5180
5252
  if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
5181
5253
  throw new Error("Amount is required and must be greater than 0");
5182
- if (this.amount = t, !e || K(e) || !this.#g(e))
5254
+ if (this.amount = t, !e || W(e) || !this.#g(e))
5183
5255
  throw new Error("Reference is required and must be alphanumeric");
5184
5256
  if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
5185
5257
  throw new Error("Invalid currency");
@@ -5198,5 +5270,5 @@ class wr extends Ye {
5198
5270
  }
5199
5271
  }
5200
5272
  export {
5201
- wr as PinPad
5273
+ Fr as PinPad
5202
5274
  };