@danidoble/webserial 4.4.4 → 4.4.6
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/boardroid.cjs +1 -1
- package/dist/boardroid.js +1 -1
- package/dist/hopper.cjs +1 -1
- package/dist/hopper.js +1 -1
- package/dist/jofemar.cjs +1 -1
- package/dist/jofemar.js +25 -25
- package/dist/{kernel-BZzs36vi.js → kernel-BfYgLcpB.js} +1 -1
- package/dist/{kernel-7ObJp74F.cjs → kernel-CR94n4kR.cjs} +1 -1
- package/dist/kernel.cjs +1 -1
- package/dist/kernel.js +1 -1
- package/dist/locker.cjs +1 -1
- package/dist/locker.js +8 -2
- package/dist/pinpad.cjs +13 -13
- package/dist/pinpad.js +1070 -960
- package/dist/pinpax.cjs +1 -1
- package/dist/pinpax.js +1 -1
- package/dist/relay.cjs +1 -1
- package/dist/relay.js +1 -1
- package/dist/types/serial/boardroid.d.ts.map +1 -1
- package/dist/types/serial/jofemar.d.ts.map +1 -1
- package/dist/types/serial/kernel.d.ts.map +1 -1
- package/dist/types/serial/locker.d.ts.map +1 -1
- package/dist/types/serial/pinpad.d.ts.map +1 -1
- package/dist/types/serial/pinpax.d.ts.map +1 -1
- package/dist/types/serial/relay.d.ts.map +1 -1
- package/dist/types/utils/devices.d.ts.map +1 -1
- package/dist/webserial-core-DE33mmiR.cjs +4 -0
- package/dist/{webserial-core-Zwd9L-Y9.js → webserial-core-DdCTPQZr.js} +137 -129
- package/dist/webserial.cjs +1 -1
- package/dist/webserial.js +3 -3
- package/package.json +9 -9
- package/dist/webserial-core-Co8HLQvu.cjs +0 -4
package/dist/pinpad.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { K as
|
|
2
|
-
var
|
|
1
|
+
import { K as yi, a as bi, D as pe, i as z, b as de, w as _e } from "./kernel-BfYgLcpB.js";
|
|
2
|
+
var Pi = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
3
3
|
function G(n) {
|
|
4
|
-
return
|
|
4
|
+
return Pi.charAt(n);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function vi(n, t) {
|
|
7
7
|
return n & t;
|
|
8
8
|
}
|
|
9
9
|
function St(n, t) {
|
|
10
10
|
return n | t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ge(n, t) {
|
|
13
13
|
return n ^ t;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function me(n, t) {
|
|
16
16
|
return n & ~t;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ei(n) {
|
|
19
19
|
if (n == 0)
|
|
20
20
|
return -1;
|
|
21
21
|
var t = 0;
|
|
22
22
|
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;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function wi(n) {
|
|
25
25
|
for (var t = 0; n != 0; )
|
|
26
26
|
n &= n - 1, ++t;
|
|
27
27
|
return t;
|
|
28
28
|
}
|
|
29
|
-
var ht = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
|
30
|
-
function
|
|
29
|
+
var ht = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", We = "=";
|
|
30
|
+
function mt(n) {
|
|
31
31
|
var t, e, i = "";
|
|
32
32
|
for (t = 0; t + 3 <= n.length; t += 3)
|
|
33
33
|
e = parseInt(n.substring(t, t + 3), 16), i += ht.charAt(e >> 6) + ht.charAt(e & 63);
|
|
34
34
|
for (t + 1 == n.length ? (e = parseInt(n.substring(t, t + 1), 16), i += ht.charAt(e << 2)) : t + 2 == n.length && (e = parseInt(n.substring(t, t + 2), 16), i += ht.charAt(e >> 2) + ht.charAt((e & 3) << 4)); (i.length & 3) > 0; )
|
|
35
|
-
i +=
|
|
35
|
+
i += We;
|
|
36
36
|
return i;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ye(n) {
|
|
39
39
|
var t = "", e, i = 0, r = 0;
|
|
40
|
-
for (e = 0; e < n.length && n.charAt(e) !=
|
|
40
|
+
for (e = 0; e < n.length && n.charAt(e) != We; ++e) {
|
|
41
41
|
var s = ht.indexOf(n.charAt(e));
|
|
42
42
|
s < 0 || (i == 0 ? (t += G(s >> 2), r = s & 3, i = 1) : i == 1 ? (t += G(r << 2 | s >> 4), r = s & 15, i = 2) : i == 2 ? (t += G(r), t += G(s >> 2), r = s & 3, i = 3) : (t += G(r << 2 | s >> 4), t += G(s & 15), i = 0));
|
|
43
43
|
}
|
|
44
44
|
return i == 1 && (t += G(r << 2)), t;
|
|
45
45
|
}
|
|
46
|
-
var ct,
|
|
46
|
+
var ct, Si = {
|
|
47
47
|
decode: function(n) {
|
|
48
48
|
var t;
|
|
49
49
|
if (ct === void 0) {
|
|
@@ -71,7 +71,7 @@ var ct, wi = {
|
|
|
71
71
|
throw new Error("Hex encoding incomplete: 4 bits missing");
|
|
72
72
|
return r;
|
|
73
73
|
}
|
|
74
|
-
}, et,
|
|
74
|
+
}, et, Qt = {
|
|
75
75
|
decode: function(n) {
|
|
76
76
|
var t;
|
|
77
77
|
if (et === void 0) {
|
|
@@ -107,7 +107,7 @@ var ct, wi = {
|
|
|
107
107
|
},
|
|
108
108
|
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
109
109
|
unarmor: function(n) {
|
|
110
|
-
var t =
|
|
110
|
+
var t = Qt.re.exec(n);
|
|
111
111
|
if (t)
|
|
112
112
|
if (t[1])
|
|
113
113
|
n = t[1];
|
|
@@ -115,9 +115,9 @@ var ct, wi = {
|
|
|
115
115
|
n = t[2];
|
|
116
116
|
else
|
|
117
117
|
throw new Error("RegExp out of sync");
|
|
118
|
-
return
|
|
118
|
+
return Qt.decode(n);
|
|
119
119
|
}
|
|
120
|
-
}, ut = 1e13,
|
|
120
|
+
}, ut = 1e13, gt = (
|
|
121
121
|
/** @class */
|
|
122
122
|
(function() {
|
|
123
123
|
function n(t) {
|
|
@@ -149,9 +149,9 @@ var ct, wi = {
|
|
|
149
149
|
return t.length == 1 ? t[0] : this;
|
|
150
150
|
}, n;
|
|
151
151
|
})()
|
|
152
|
-
),
|
|
152
|
+
), Xe = "…", Ti = /^(\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)?)?$/, Ai = /^(\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)?)?$/;
|
|
153
153
|
function lt(n, t) {
|
|
154
|
-
return n.length > t && (n = n.substring(0, t) +
|
|
154
|
+
return n.length > t && (n = n.substring(0, t) + Xe), n;
|
|
155
155
|
}
|
|
156
156
|
var Ht = (
|
|
157
157
|
/** @class */
|
|
@@ -202,7 +202,7 @@ var Ht = (
|
|
|
202
202
|
r = this.get(a++), s = this.get(a++), i += String.fromCharCode(r << 8 | s);
|
|
203
203
|
return i;
|
|
204
204
|
}, n.prototype.parseTime = function(t, e, i) {
|
|
205
|
-
var r = this.parseStringISO(t, e), s = (i ?
|
|
205
|
+
var r = this.parseStringISO(t, e), s = (i ? Ti : Ai).exec(r);
|
|
206
206
|
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;
|
|
207
207
|
}, n.prototype.parseInteger = function(t, e) {
|
|
208
208
|
for (var i = this.get(t), r = i > 127, s = r ? 255 : 0, a, o = ""; i == s && ++t < e; )
|
|
@@ -216,7 +216,7 @@ var Ht = (
|
|
|
216
216
|
`;
|
|
217
217
|
}
|
|
218
218
|
r && (i = i - 256);
|
|
219
|
-
for (var c = new
|
|
219
|
+
for (var c = new gt(i), h = t + 1; h < e; ++h)
|
|
220
220
|
c.mulAdd(256, this.get(h));
|
|
221
221
|
return o + c.toString();
|
|
222
222
|
}, n.prototype.parseBitString = function(t, e, i) {
|
|
@@ -236,13 +236,13 @@ var Ht = (
|
|
|
236
236
|
i /= 2, r > i && (e = t + i);
|
|
237
237
|
for (var a = t; a < e; ++a)
|
|
238
238
|
s += this.hexByte(this.get(a));
|
|
239
|
-
return r > i && (s +=
|
|
239
|
+
return r > i && (s += Xe), s;
|
|
240
240
|
}, n.prototype.parseOID = function(t, e, i) {
|
|
241
|
-
for (var r = "", s = new
|
|
241
|
+
for (var r = "", s = new gt(), a = 0, o = t; o < e; ++o) {
|
|
242
242
|
var c = this.get(o);
|
|
243
243
|
if (s.mulAdd(128, c & 127), a += 7, !(c & 128)) {
|
|
244
244
|
if (r === "")
|
|
245
|
-
if (s = s.simplify(), s instanceof
|
|
245
|
+
if (s = s.simplify(), s instanceof gt)
|
|
246
246
|
s.sub(80), r = "2." + s.toString();
|
|
247
247
|
else {
|
|
248
248
|
var h = s < 80 ? s < 40 ? 0 : 1 : 2;
|
|
@@ -252,17 +252,17 @@ var Ht = (
|
|
|
252
252
|
r += "." + s.toString();
|
|
253
253
|
if (r.length > i)
|
|
254
254
|
return lt(r, i);
|
|
255
|
-
s = new
|
|
255
|
+
s = new gt(), a = 0;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
return a > 0 && (r += ".incomplete"), r;
|
|
259
259
|
}, n;
|
|
260
260
|
})()
|
|
261
|
-
),
|
|
261
|
+
), Ci = (
|
|
262
262
|
/** @class */
|
|
263
263
|
(function() {
|
|
264
264
|
function n(t, e, i, r, s) {
|
|
265
|
-
if (!(r instanceof
|
|
265
|
+
if (!(r instanceof be))
|
|
266
266
|
throw new Error("Invalid tag value.");
|
|
267
267
|
this.stream = t, this.header = e, this.length = i, this.tag = r, this.sub = s;
|
|
268
268
|
}
|
|
@@ -427,7 +427,7 @@ var Ht = (
|
|
|
427
427
|
}, n.decode = function(t) {
|
|
428
428
|
var e;
|
|
429
429
|
t instanceof Ht ? e = t : e = new Ht(t, 0);
|
|
430
|
-
var i = new Ht(e), r = new
|
|
430
|
+
var i = new Ht(e), r = new be(e), s = n.decodeLength(e), a = e.pos, o = a - i.pos, c = null, h = function() {
|
|
431
431
|
var f = [];
|
|
432
432
|
if (s !== null) {
|
|
433
433
|
for (var _ = a + s; e.pos < _; )
|
|
@@ -443,8 +443,8 @@ var Ht = (
|
|
|
443
443
|
f[f.length] = y;
|
|
444
444
|
}
|
|
445
445
|
s = a - e.pos;
|
|
446
|
-
} catch (
|
|
447
|
-
throw new Error("Exception while decoding undefined length content: " +
|
|
446
|
+
} catch (p) {
|
|
447
|
+
throw new Error("Exception while decoding undefined length content: " + p);
|
|
448
448
|
}
|
|
449
449
|
return f;
|
|
450
450
|
};
|
|
@@ -469,13 +469,13 @@ var Ht = (
|
|
|
469
469
|
return new n(i, o, s, r, c);
|
|
470
470
|
}, n;
|
|
471
471
|
})()
|
|
472
|
-
),
|
|
472
|
+
), be = (
|
|
473
473
|
/** @class */
|
|
474
474
|
(function() {
|
|
475
475
|
function n(t) {
|
|
476
476
|
var e = t.get();
|
|
477
477
|
if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
|
|
478
|
-
var i = new
|
|
478
|
+
var i = new gt();
|
|
479
479
|
do
|
|
480
480
|
e = t.get(), i.mulAdd(128, e & 127);
|
|
481
481
|
while (e & 128);
|
|
@@ -488,7 +488,7 @@ var Ht = (
|
|
|
488
488
|
return this.tagClass === 0 && this.tagNumber === 0;
|
|
489
489
|
}, n;
|
|
490
490
|
})()
|
|
491
|
-
), Y,
|
|
491
|
+
), Y, Ri = 244837814094590, Pe = (Ri & 16777215) == 15715070, B = [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], Oi = (1 << 26) / B[B.length - 1], v = (
|
|
492
492
|
/** @class */
|
|
493
493
|
(function() {
|
|
494
494
|
function n(t, e, i) {
|
|
@@ -538,7 +538,7 @@ var Ht = (
|
|
|
538
538
|
return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(n.ZERO) > 0 && t.subTo(e, e), e;
|
|
539
539
|
}, n.prototype.modPowInt = function(t, e) {
|
|
540
540
|
var i;
|
|
541
|
-
return t < 256 || e.isEven() ? i = new
|
|
541
|
+
return t < 256 || e.isEven() ? i = new ve(e) : i = new Ee(e), this.exp(t, i);
|
|
542
542
|
}, n.prototype.clone = function() {
|
|
543
543
|
var t = E();
|
|
544
544
|
return this.copyTo(t), t;
|
|
@@ -577,16 +577,16 @@ var Ht = (
|
|
|
577
577
|
return this.compareTo(t) > 0 ? this : t;
|
|
578
578
|
}, n.prototype.and = function(t) {
|
|
579
579
|
var e = E();
|
|
580
|
-
return this.bitwiseTo(t,
|
|
580
|
+
return this.bitwiseTo(t, vi, e), e;
|
|
581
581
|
}, n.prototype.or = function(t) {
|
|
582
582
|
var e = E();
|
|
583
583
|
return this.bitwiseTo(t, St, e), e;
|
|
584
584
|
}, n.prototype.xor = function(t) {
|
|
585
585
|
var e = E();
|
|
586
|
-
return this.bitwiseTo(t,
|
|
586
|
+
return this.bitwiseTo(t, ge, e), e;
|
|
587
587
|
}, n.prototype.andNot = function(t) {
|
|
588
588
|
var e = E();
|
|
589
|
-
return this.bitwiseTo(t,
|
|
589
|
+
return this.bitwiseTo(t, me, e), e;
|
|
590
590
|
}, n.prototype.not = function() {
|
|
591
591
|
for (var t = E(), e = 0; e < this.t; ++e)
|
|
592
592
|
t[e] = this.DM & ~this[e];
|
|
@@ -600,11 +600,11 @@ var Ht = (
|
|
|
600
600
|
}, n.prototype.getLowestSetBit = function() {
|
|
601
601
|
for (var t = 0; t < this.t; ++t)
|
|
602
602
|
if (this[t] != 0)
|
|
603
|
-
return t * this.DB +
|
|
603
|
+
return t * this.DB + Ei(this[t]);
|
|
604
604
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
605
605
|
}, n.prototype.bitCount = function() {
|
|
606
606
|
for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i)
|
|
607
|
-
t +=
|
|
607
|
+
t += wi(this[i] ^ e);
|
|
608
608
|
return t;
|
|
609
609
|
}, n.prototype.testBit = function(t) {
|
|
610
610
|
var e = Math.floor(t / this.DB);
|
|
@@ -612,9 +612,9 @@ var Ht = (
|
|
|
612
612
|
}, n.prototype.setBit = function(t) {
|
|
613
613
|
return this.changeBit(t, St);
|
|
614
614
|
}, n.prototype.clearBit = function(t) {
|
|
615
|
-
return this.changeBit(t,
|
|
615
|
+
return this.changeBit(t, me);
|
|
616
616
|
}, n.prototype.flipBit = function(t) {
|
|
617
|
-
return this.changeBit(t,
|
|
617
|
+
return this.changeBit(t, ge);
|
|
618
618
|
}, n.prototype.add = function(t) {
|
|
619
619
|
var e = E();
|
|
620
620
|
return this.addTo(t, e), e;
|
|
@@ -637,19 +637,19 @@ var Ht = (
|
|
|
637
637
|
var i = t.bitLength(), r, s = Q(1), a;
|
|
638
638
|
if (i <= 0)
|
|
639
639
|
return s;
|
|
640
|
-
i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new
|
|
640
|
+
i < 18 ? r = 1 : i < 48 ? r = 3 : i < 144 ? r = 4 : i < 768 ? r = 5 : r = 6, i < 8 ? a = new ve(e) : e.isEven() ? a = new Ii(e) : a = new Ee(e);
|
|
641
641
|
var o = [], c = 3, h = r - 1, u = (1 << r) - 1;
|
|
642
642
|
if (o[1] = a.convert(this), r > 1) {
|
|
643
643
|
var f = E();
|
|
644
644
|
for (a.sqrTo(o[1], f); c <= u; )
|
|
645
645
|
o[c] = E(), a.mulTo(f, o[c - 2], o[c]), c += 2;
|
|
646
646
|
}
|
|
647
|
-
var _ = t.t - 1, y,
|
|
647
|
+
var _ = t.t - 1, y, p = !0, m = E(), g;
|
|
648
648
|
for (i = Tt(t[_]) - 1; _ >= 0; ) {
|
|
649
649
|
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; )
|
|
650
650
|
y >>= 1, --c;
|
|
651
|
-
if ((i -= c) < 0 && (i += this.DB, --_),
|
|
652
|
-
o[y].copyTo(s),
|
|
651
|
+
if ((i -= c) < 0 && (i += this.DB, --_), p)
|
|
652
|
+
o[y].copyTo(s), p = !1;
|
|
653
653
|
else {
|
|
654
654
|
for (; c > 1; )
|
|
655
655
|
a.sqrTo(s, m), a.sqrTo(m, s), c -= 2;
|
|
@@ -680,7 +680,7 @@ var Ht = (
|
|
|
680
680
|
return c;
|
|
681
681
|
return c.signum() < 0 ? c.add(t) : c;
|
|
682
682
|
}, n.prototype.pow = function(t) {
|
|
683
|
-
return this.exp(t, new
|
|
683
|
+
return this.exp(t, new Di());
|
|
684
684
|
}, n.prototype.gcd = function(t) {
|
|
685
685
|
var e = this.s < 0 ? this.negate() : this.clone(), i = t.s < 0 ? t.negate() : t.clone();
|
|
686
686
|
if (e.compareTo(i) < 0) {
|
|
@@ -695,19 +695,19 @@ var Ht = (
|
|
|
695
695
|
return a > 0 && i.lShiftTo(a, i), i;
|
|
696
696
|
}, n.prototype.isProbablePrime = function(t) {
|
|
697
697
|
var e, i = this.abs();
|
|
698
|
-
if (i.t == 1 && i[0] <=
|
|
699
|
-
for (e = 0; e <
|
|
700
|
-
if (i[0] ==
|
|
698
|
+
if (i.t == 1 && i[0] <= B[B.length - 1]) {
|
|
699
|
+
for (e = 0; e < B.length; ++e)
|
|
700
|
+
if (i[0] == B[e])
|
|
701
701
|
return !0;
|
|
702
702
|
return !1;
|
|
703
703
|
}
|
|
704
704
|
if (i.isEven())
|
|
705
705
|
return !1;
|
|
706
|
-
for (e = 1; e <
|
|
707
|
-
for (var r =
|
|
708
|
-
r *=
|
|
706
|
+
for (e = 1; e < B.length; ) {
|
|
707
|
+
for (var r = B[e], s = e + 1; s < B.length && r < Oi; )
|
|
708
|
+
r *= B[s++];
|
|
709
709
|
for (r = i.modInt(r); e < s; )
|
|
710
|
-
if (r %
|
|
710
|
+
if (r % B[e++] == 0)
|
|
711
711
|
return !1;
|
|
712
712
|
}
|
|
713
713
|
return i.millerRabin(t);
|
|
@@ -737,7 +737,7 @@ var Ht = (
|
|
|
737
737
|
}
|
|
738
738
|
this.t = 0, this.s = 0;
|
|
739
739
|
for (var r = t.length, s = !1, a = 0; --r >= 0; ) {
|
|
740
|
-
var o = i == 8 ? +t[r] & 255 :
|
|
740
|
+
var o = i == 8 ? +t[r] & 255 : Se(t, r);
|
|
741
741
|
if (o < 0) {
|
|
742
742
|
t.charAt(r) == "-" && (s = !0);
|
|
743
743
|
continue;
|
|
@@ -818,11 +818,11 @@ var Ht = (
|
|
|
818
818
|
h > 0 ? (r.lShiftTo(h, a), s.lShiftTo(h, i)) : (r.copyTo(a), s.copyTo(i));
|
|
819
819
|
var u = a.t, f = a[u - 1];
|
|
820
820
|
if (f != 0) {
|
|
821
|
-
var _ = f * (1 << this.F1) + (u > 1 ? a[u - 2] >> this.F2 : 0), y = this.FV / _,
|
|
821
|
+
var _ = f * (1 << this.F1) + (u > 1 ? a[u - 2] >> this.F2 : 0), y = this.FV / _, p = (1 << this.F1) / _, m = 1 << this.F2, g = i.t, w = g - u, A = e ?? E();
|
|
822
822
|
for (a.dlShiftTo(w, A), i.compareTo(A) >= 0 && (i[i.t++] = 1, i.subTo(A, i)), n.ONE.dlShiftTo(u, A), A.subTo(a, a); a.t < u; )
|
|
823
823
|
a[a.t++] = 0;
|
|
824
824
|
for (; --w >= 0; ) {
|
|
825
|
-
var T = i[--g] == f ? this.DM : Math.floor(i[g] * y + (i[g - 1] + m) *
|
|
825
|
+
var T = i[--g] == f ? this.DM : Math.floor(i[g] * y + (i[g - 1] + m) * p);
|
|
826
826
|
if ((i[g] += a.am(0, T, i, w, 0, u)) < T)
|
|
827
827
|
for (a.dlShiftTo(w, A), i.subTo(A, i); i[g] < --T; )
|
|
828
828
|
i.subTo(A, i);
|
|
@@ -864,7 +864,7 @@ var Ht = (
|
|
|
864
864
|
}, n.prototype.fromRadix = function(t, e) {
|
|
865
865
|
this.fromInt(0), e == null && (e = 10);
|
|
866
866
|
for (var i = this.chunkSize(e), r = Math.pow(e, i), s = !1, a = 0, o = 0, c = 0; c < t.length; ++c) {
|
|
867
|
-
var h =
|
|
867
|
+
var h = Se(t, c);
|
|
868
868
|
if (h < 0) {
|
|
869
869
|
t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
|
|
870
870
|
continue;
|
|
@@ -955,9 +955,9 @@ var Ht = (
|
|
|
955
955
|
if (i <= 0)
|
|
956
956
|
return !1;
|
|
957
957
|
var r = e.shiftRight(i);
|
|
958
|
-
t = t + 1 >> 1, t >
|
|
958
|
+
t = t + 1 >> 1, t > B.length && (t = B.length);
|
|
959
959
|
for (var s = E(), a = 0; a < t; ++a) {
|
|
960
|
-
s.fromInt(
|
|
960
|
+
s.fromInt(B[Math.floor(Math.random() * B.length)]);
|
|
961
961
|
var o = s.modPow(r, this);
|
|
962
962
|
if (o.compareTo(n.ONE) != 0 && o.compareTo(e) != 0) {
|
|
963
963
|
for (var c = 1; c++ < i && o.compareTo(e) != 0; )
|
|
@@ -1008,7 +1008,7 @@ var Ht = (
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}, n;
|
|
1010
1010
|
})()
|
|
1011
|
-
),
|
|
1011
|
+
), Di = (
|
|
1012
1012
|
/** @class */
|
|
1013
1013
|
(function() {
|
|
1014
1014
|
function n() {
|
|
@@ -1023,7 +1023,7 @@ var Ht = (
|
|
|
1023
1023
|
t.squareTo(e);
|
|
1024
1024
|
}, n;
|
|
1025
1025
|
})()
|
|
1026
|
-
),
|
|
1026
|
+
), ve = (
|
|
1027
1027
|
/** @class */
|
|
1028
1028
|
(function() {
|
|
1029
1029
|
function n(t) {
|
|
@@ -1041,7 +1041,7 @@ var Ht = (
|
|
|
1041
1041
|
t.squareTo(e), this.reduce(e);
|
|
1042
1042
|
}, n;
|
|
1043
1043
|
})()
|
|
1044
|
-
),
|
|
1044
|
+
), Ee = (
|
|
1045
1045
|
/** @class */
|
|
1046
1046
|
(function() {
|
|
1047
1047
|
function n(t) {
|
|
@@ -1049,7 +1049,7 @@ var Ht = (
|
|
|
1049
1049
|
}
|
|
1050
1050
|
return n.prototype.convert = function(t) {
|
|
1051
1051
|
var e = E();
|
|
1052
|
-
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(
|
|
1052
|
+
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;
|
|
1053
1053
|
}, n.prototype.revert = function(t) {
|
|
1054
1054
|
var e = E();
|
|
1055
1055
|
return t.copyTo(e), this.reduce(e), e;
|
|
@@ -1068,11 +1068,11 @@ var Ht = (
|
|
|
1068
1068
|
t.squareTo(e), this.reduce(e);
|
|
1069
1069
|
}, n;
|
|
1070
1070
|
})()
|
|
1071
|
-
),
|
|
1071
|
+
), Ii = (
|
|
1072
1072
|
/** @class */
|
|
1073
1073
|
(function() {
|
|
1074
1074
|
function n(t) {
|
|
1075
|
-
this.m = t, this.r2 = E(), this.q3 = E(),
|
|
1075
|
+
this.m = t, this.r2 = E(), this.q3 = E(), v.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
|
|
1076
1076
|
}
|
|
1077
1077
|
return n.prototype.convert = function(t) {
|
|
1078
1078
|
if (t.s < 0 || t.t > 2 * this.m.t)
|
|
@@ -1096,49 +1096,49 @@ var Ht = (
|
|
|
1096
1096
|
})()
|
|
1097
1097
|
);
|
|
1098
1098
|
function E() {
|
|
1099
|
-
return new
|
|
1099
|
+
return new v(null);
|
|
1100
1100
|
}
|
|
1101
1101
|
function C(n, t) {
|
|
1102
|
-
return new
|
|
1102
|
+
return new v(n, t);
|
|
1103
1103
|
}
|
|
1104
|
-
var
|
|
1105
|
-
|
|
1104
|
+
var we = typeof navigator < "u";
|
|
1105
|
+
we && Pe && navigator.appName == "Microsoft Internet Explorer" ? (v.prototype.am = function(t, e, i, r, s, a) {
|
|
1106
1106
|
for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
|
|
1107
1107
|
var h = this[t] & 32767, u = this[t++] >> 15, f = c * h + u * o;
|
|
1108
1108
|
h = o * h + ((f & 32767) << 15) + i[r] + (s & 1073741823), s = (h >>> 30) + (f >>> 15) + c * u + (s >>> 30), i[r++] = h & 1073741823;
|
|
1109
1109
|
}
|
|
1110
1110
|
return s;
|
|
1111
|
-
}, Y = 30) :
|
|
1111
|
+
}, Y = 30) : we && Pe && navigator.appName != "Netscape" ? (v.prototype.am = function(t, e, i, r, s, a) {
|
|
1112
1112
|
for (; --a >= 0; ) {
|
|
1113
1113
|
var o = e * this[t++] + i[r] + s;
|
|
1114
1114
|
s = Math.floor(o / 67108864), i[r++] = o & 67108863;
|
|
1115
1115
|
}
|
|
1116
1116
|
return s;
|
|
1117
|
-
}, Y = 26) : (
|
|
1117
|
+
}, Y = 26) : (v.prototype.am = function(t, e, i, r, s, a) {
|
|
1118
1118
|
for (var o = e & 16383, c = e >> 14; --a >= 0; ) {
|
|
1119
1119
|
var h = this[t] & 16383, u = this[t++] >> 14, f = c * h + u * o;
|
|
1120
1120
|
h = o * h + ((f & 16383) << 14) + i[r] + s, s = (h >> 28) + (f >> 14) + c * u, i[r++] = h & 268435455;
|
|
1121
1121
|
}
|
|
1122
1122
|
return s;
|
|
1123
1123
|
}, Y = 28);
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
var
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
var Lt = [], pt,
|
|
1124
|
+
v.prototype.DB = Y;
|
|
1125
|
+
v.prototype.DM = (1 << Y) - 1;
|
|
1126
|
+
v.prototype.DV = 1 << Y;
|
|
1127
|
+
var ne = 52;
|
|
1128
|
+
v.prototype.FV = Math.pow(2, ne);
|
|
1129
|
+
v.prototype.F1 = ne - Y;
|
|
1130
|
+
v.prototype.F2 = 2 * Y - ne;
|
|
1131
|
+
var Lt = [], pt, j;
|
|
1132
1132
|
pt = 48;
|
|
1133
|
-
for (
|
|
1134
|
-
Lt[pt++] =
|
|
1133
|
+
for (j = 0; j <= 9; ++j)
|
|
1134
|
+
Lt[pt++] = j;
|
|
1135
1135
|
pt = 97;
|
|
1136
|
-
for (
|
|
1137
|
-
Lt[pt++] =
|
|
1136
|
+
for (j = 10; j < 36; ++j)
|
|
1137
|
+
Lt[pt++] = j;
|
|
1138
1138
|
pt = 65;
|
|
1139
|
-
for (
|
|
1140
|
-
Lt[pt++] =
|
|
1141
|
-
function
|
|
1139
|
+
for (j = 10; j < 36; ++j)
|
|
1140
|
+
Lt[pt++] = j;
|
|
1141
|
+
function Se(n, t) {
|
|
1142
1142
|
var e = Lt[n.charCodeAt(t)];
|
|
1143
1143
|
return e ?? -1;
|
|
1144
1144
|
}
|
|
@@ -1150,9 +1150,9 @@ function Tt(n) {
|
|
|
1150
1150
|
var t = 1, e;
|
|
1151
1151
|
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;
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
var
|
|
1153
|
+
v.ZERO = Q(0);
|
|
1154
|
+
v.ONE = Q(1);
|
|
1155
|
+
var Ni = (
|
|
1156
1156
|
/** @class */
|
|
1157
1157
|
(function() {
|
|
1158
1158
|
function n() {
|
|
@@ -1172,39 +1172,39 @@ var Ii = (
|
|
|
1172
1172
|
})()
|
|
1173
1173
|
);
|
|
1174
1174
|
function Bi() {
|
|
1175
|
-
return new
|
|
1175
|
+
return new Ni();
|
|
1176
1176
|
}
|
|
1177
|
-
var
|
|
1177
|
+
var ze = 256, At, Z = null, q;
|
|
1178
1178
|
if (Z == null) {
|
|
1179
|
-
Z = [],
|
|
1179
|
+
Z = [], q = 0;
|
|
1180
1180
|
var Ct = void 0;
|
|
1181
1181
|
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
1182
1182
|
var Wt = new Uint32Array(256);
|
|
1183
1183
|
for (self.crypto.getRandomValues(Wt), Ct = 0; Ct < Wt.length; ++Ct)
|
|
1184
|
-
Z[
|
|
1184
|
+
Z[q++] = Wt[Ct] & 255;
|
|
1185
1185
|
}
|
|
1186
1186
|
var Rt = 0, Ot = function(n) {
|
|
1187
|
-
if (Rt = Rt || 0, Rt >= 256 ||
|
|
1187
|
+
if (Rt = Rt || 0, Rt >= 256 || q >= ze) {
|
|
1188
1188
|
self.removeEventListener ? self.removeEventListener("mousemove", Ot, !1) : self.detachEvent && self.detachEvent("onmousemove", Ot);
|
|
1189
1189
|
return;
|
|
1190
1190
|
}
|
|
1191
1191
|
try {
|
|
1192
1192
|
var t = n.x + n.y;
|
|
1193
|
-
Z[
|
|
1193
|
+
Z[q++] = t & 255, Rt += 1;
|
|
1194
1194
|
} catch {
|
|
1195
1195
|
}
|
|
1196
1196
|
};
|
|
1197
1197
|
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Ot, !1) : self.attachEvent && self.attachEvent("onmousemove", Ot));
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function xi() {
|
|
1200
1200
|
if (At == null) {
|
|
1201
|
-
for (At = Bi();
|
|
1201
|
+
for (At = Bi(); q < ze; ) {
|
|
1202
1202
|
var n = Math.floor(65536 * Math.random());
|
|
1203
|
-
Z[
|
|
1203
|
+
Z[q++] = n & 255;
|
|
1204
1204
|
}
|
|
1205
|
-
for (At.init(Z),
|
|
1206
|
-
Z[
|
|
1207
|
-
|
|
1205
|
+
for (At.init(Z), q = 0; q < Z.length; ++q)
|
|
1206
|
+
Z[q] = 0;
|
|
1207
|
+
q = 0;
|
|
1208
1208
|
}
|
|
1209
1209
|
return At.next();
|
|
1210
1210
|
}
|
|
@@ -1215,28 +1215,28 @@ var Vt = (
|
|
|
1215
1215
|
}
|
|
1216
1216
|
return n.prototype.nextBytes = function(t) {
|
|
1217
1217
|
for (var e = 0; e < t.length; ++e)
|
|
1218
|
-
t[e] =
|
|
1218
|
+
t[e] = xi();
|
|
1219
1219
|
}, n;
|
|
1220
1220
|
})()
|
|
1221
1221
|
);
|
|
1222
|
-
function
|
|
1223
|
-
return
|
|
1222
|
+
function Zt(n) {
|
|
1223
|
+
return Ui(Hi(Vi(n), n.length * 8));
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Te(n) {
|
|
1226
1226
|
for (var t = "0123456789abcdef", e = "", i = 0; i < n.length; i++) {
|
|
1227
1227
|
var r = n.charCodeAt(i);
|
|
1228
1228
|
e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
|
|
1229
1229
|
}
|
|
1230
1230
|
return e;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Vi(n) {
|
|
1233
1233
|
for (var t = Array(n.length >> 2), e = 0; e < t.length; e++)
|
|
1234
1234
|
t[e] = 0;
|
|
1235
1235
|
for (var e = 0; e < n.length * 8; e += 8)
|
|
1236
1236
|
t[e >> 5] |= (n.charCodeAt(e / 8) & 255) << 24 - e % 32;
|
|
1237
1237
|
return t;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function Ui(n) {
|
|
1240
1240
|
for (var t = "", e = 0; e < n.length * 32; e += 8)
|
|
1241
1241
|
t += String.fromCharCode(n[e >> 5] >>> 24 - e % 32 & 255);
|
|
1242
1242
|
return t;
|
|
@@ -1244,33 +1244,33 @@ function Vi(n) {
|
|
|
1244
1244
|
function W(n, t) {
|
|
1245
1245
|
return n >>> t | n << 32 - t;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function Ge(n, t) {
|
|
1248
1248
|
return n >>> t;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Li(n, t, e) {
|
|
1251
1251
|
return n & t ^ ~n & e;
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function Mi(n, t, e) {
|
|
1254
1254
|
return n & t ^ n & e ^ t & e;
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Fi(n) {
|
|
1257
1257
|
return W(n, 2) ^ W(n, 13) ^ W(n, 22);
|
|
1258
1258
|
}
|
|
1259
1259
|
function ki(n) {
|
|
1260
1260
|
return W(n, 6) ^ W(n, 11) ^ W(n, 25);
|
|
1261
1261
|
}
|
|
1262
|
-
function Fi(n) {
|
|
1263
|
-
return W(n, 7) ^ W(n, 18) ^ We(n, 3);
|
|
1264
|
-
}
|
|
1265
1262
|
function ji(n) {
|
|
1266
|
-
return W(n,
|
|
1263
|
+
return W(n, 7) ^ W(n, 18) ^ Ge(n, 3);
|
|
1264
|
+
}
|
|
1265
|
+
function qi(n) {
|
|
1266
|
+
return W(n, 17) ^ W(n, 19) ^ Ge(n, 10);
|
|
1267
1267
|
}
|
|
1268
|
-
var
|
|
1269
|
-
function
|
|
1270
|
-
var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), r, s, a, o, c, h, u, f, _, y,
|
|
1268
|
+
var Ki = 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);
|
|
1269
|
+
function Hi(n, t) {
|
|
1270
|
+
var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), r, s, a, o, c, h, u, f, _, y, p, m;
|
|
1271
1271
|
for (n[t >> 5] |= 128 << 24 - t % 32, n[(t + 64 >> 9 << 4) + 15] = t, _ = 0; _ < n.length; _ += 16) {
|
|
1272
1272
|
for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], h = e[5], u = e[6], f = e[7], y = 0; y < 64; y++)
|
|
1273
|
-
y < 16 ? i[y] = n[y + _] : i[y] = I(I(I(
|
|
1273
|
+
y < 16 ? i[y] = n[y + _] : i[y] = I(I(I(qi(i[y - 2]), i[y - 7]), ji(i[y - 15])), i[y - 16]), p = I(I(I(I(f, ki(c)), Li(c, h, u)), Ki[y]), i[y]), m = I(Fi(r), Mi(r, s, a)), f = u, u = h, h = c, c = I(o, p), o = a, a = s, s = r, r = I(p, m);
|
|
1274
1274
|
e[0] = I(r, e[0]), e[1] = I(s, e[1]), e[2] = I(a, e[2]), e[3] = I(o, e[3]), e[4] = I(c, e[4]), e[5] = I(h, e[5]), e[6] = I(u, e[6]), e[7] = I(f, e[7]);
|
|
1275
1275
|
}
|
|
1276
1276
|
return e;
|
|
@@ -1279,7 +1279,7 @@ function I(n, t) {
|
|
|
1279
1279
|
var e = (n & 65535) + (t & 65535), i = (n >> 16) + (t >> 16) + (e >> 16);
|
|
1280
1280
|
return i << 16 | e & 65535;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Wi(n, t) {
|
|
1283
1283
|
if (t < n.length + 22)
|
|
1284
1284
|
return console.error("Message too long for RSA"), null;
|
|
1285
1285
|
for (var e = t - n.length - 6, i = "", r = 0; r < e; r += 2)
|
|
@@ -1287,7 +1287,7 @@ function Hi(n, t) {
|
|
|
1287
1287
|
var s = "0001" + i + "00" + n;
|
|
1288
1288
|
return C(s, 16);
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Xi(n, t) {
|
|
1291
1291
|
if (t < n.length + 11)
|
|
1292
1292
|
return console.error("Message too long for RSA"), null;
|
|
1293
1293
|
for (var e = [], i = n.length - 1; i >= 0 && t > 0; ) {
|
|
@@ -1300,9 +1300,9 @@ function Wi(n, t) {
|
|
|
1300
1300
|
s.nextBytes(a);
|
|
1301
1301
|
e[--t] = a[0];
|
|
1302
1302
|
}
|
|
1303
|
-
return e[--t] = 2, e[--t] = 0, new
|
|
1303
|
+
return e[--t] = 2, e[--t] = 0, new v(e);
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function Ae(n, t, e) {
|
|
1306
1306
|
for (var i = "", r = 0; i.length < t; )
|
|
1307
1307
|
i += e(String.fromCharCode.apply(String, n.concat([
|
|
1308
1308
|
(r & 4278190080) >> 24,
|
|
@@ -1312,9 +1312,9 @@ function Se(n, t, e) {
|
|
|
1312
1312
|
]))), r += 1;
|
|
1313
1313
|
return i;
|
|
1314
1314
|
}
|
|
1315
|
-
var
|
|
1316
|
-
function
|
|
1317
|
-
var e =
|
|
1315
|
+
var zi = 32;
|
|
1316
|
+
function Gi(n, t) {
|
|
1317
|
+
var e = zi, i = Zt;
|
|
1318
1318
|
if (n.length + 2 * e + 2 > t)
|
|
1319
1319
|
throw "Message too long for RSA";
|
|
1320
1320
|
var r = "", s;
|
|
@@ -1322,15 +1322,15 @@ function zi(n, t) {
|
|
|
1322
1322
|
r += "\0";
|
|
1323
1323
|
var a = i("") + r + "" + n, o = new Array(e);
|
|
1324
1324
|
new Vt().nextBytes(o);
|
|
1325
|
-
var c =
|
|
1325
|
+
var c = Ae(o, a.length, i), h = [];
|
|
1326
1326
|
for (s = 0; s < a.length; s += 1)
|
|
1327
1327
|
h[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
|
|
1328
|
-
var u =
|
|
1328
|
+
var u = Ae(h, o.length, i), f = [0];
|
|
1329
1329
|
for (s = 0; s < o.length; s += 1)
|
|
1330
1330
|
f[s + 1] = o[s] ^ u.charCodeAt(s);
|
|
1331
|
-
return new
|
|
1331
|
+
return new v(f.concat(h));
|
|
1332
1332
|
}
|
|
1333
|
-
var
|
|
1333
|
+
var $i = (
|
|
1334
1334
|
/** @class */
|
|
1335
1335
|
(function() {
|
|
1336
1336
|
function n() {
|
|
@@ -1347,7 +1347,7 @@ var Gi = (
|
|
|
1347
1347
|
}, n.prototype.setPublic = function(t, e) {
|
|
1348
1348
|
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = C(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
|
|
1349
1349
|
}, n.prototype.encrypt = function(t, e) {
|
|
1350
|
-
typeof e > "u" && (e =
|
|
1350
|
+
typeof e > "u" && (e = Xi);
|
|
1351
1351
|
var i = this.n.bitLength() + 7 >> 3, r = e(t, i);
|
|
1352
1352
|
if (r == null)
|
|
1353
1353
|
return null;
|
|
@@ -1364,47 +1364,47 @@ var Gi = (
|
|
|
1364
1364
|
}, n.prototype.generate = function(t, e) {
|
|
1365
1365
|
var i = new Vt(), r = t >> 1;
|
|
1366
1366
|
this.e = parseInt(e, 16);
|
|
1367
|
-
for (var s = new
|
|
1368
|
-
for (; this.p = new
|
|
1367
|
+
for (var s = new v(e, 16); ; ) {
|
|
1368
|
+
for (; this.p = new v(t - r, 1, i), !(this.p.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.p.isProbablePrime(10)); )
|
|
1369
1369
|
;
|
|
1370
|
-
for (; this.q = new
|
|
1370
|
+
for (; this.q = new v(r, 1, i), !(this.q.subtract(v.ONE).gcd(s).compareTo(v.ONE) == 0 && this.q.isProbablePrime(10)); )
|
|
1371
1371
|
;
|
|
1372
1372
|
if (this.p.compareTo(this.q) <= 0) {
|
|
1373
1373
|
var a = this.p;
|
|
1374
1374
|
this.p = this.q, this.q = a;
|
|
1375
1375
|
}
|
|
1376
|
-
var o = this.p.subtract(
|
|
1377
|
-
if (h.gcd(s).compareTo(
|
|
1376
|
+
var o = this.p.subtract(v.ONE), c = this.q.subtract(v.ONE), h = o.multiply(c);
|
|
1377
|
+
if (h.gcd(s).compareTo(v.ONE) == 0) {
|
|
1378
1378
|
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);
|
|
1379
1379
|
break;
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
1382
|
}, n.prototype.decrypt = function(t) {
|
|
1383
1383
|
var e = C(t, 16), i = this.doPrivate(e);
|
|
1384
|
-
return i == null ? null :
|
|
1384
|
+
return i == null ? null : Ji(i, this.n.bitLength() + 7 >> 3);
|
|
1385
1385
|
}, n.prototype.generateAsync = function(t, e, i) {
|
|
1386
1386
|
var r = new Vt(), s = t >> 1;
|
|
1387
1387
|
this.e = parseInt(e, 16);
|
|
1388
|
-
var a = new
|
|
1388
|
+
var a = new v(e, 16), o = this, c = function() {
|
|
1389
1389
|
var h = function() {
|
|
1390
1390
|
if (o.p.compareTo(o.q) <= 0) {
|
|
1391
1391
|
var _ = o.p;
|
|
1392
1392
|
o.p = o.q, o.q = _;
|
|
1393
1393
|
}
|
|
1394
|
-
var y = o.p.subtract(
|
|
1395
|
-
m.gcd(a).compareTo(
|
|
1394
|
+
var y = o.p.subtract(v.ONE), p = o.q.subtract(v.ONE), m = y.multiply(p);
|
|
1395
|
+
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(p), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
|
|
1396
1396
|
i();
|
|
1397
1397
|
}, 0)) : setTimeout(c, 0);
|
|
1398
1398
|
}, u = function() {
|
|
1399
1399
|
o.q = E(), o.q.fromNumberAsync(s, 1, r, function() {
|
|
1400
|
-
o.q.subtract(
|
|
1401
|
-
_.compareTo(
|
|
1400
|
+
o.q.subtract(v.ONE).gcda(a, function(_) {
|
|
1401
|
+
_.compareTo(v.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(u, 0);
|
|
1402
1402
|
});
|
|
1403
1403
|
});
|
|
1404
1404
|
}, f = function() {
|
|
1405
1405
|
o.p = E(), o.p.fromNumberAsync(t - s, 1, r, function() {
|
|
1406
|
-
o.p.subtract(
|
|
1407
|
-
_.compareTo(
|
|
1406
|
+
o.p.subtract(v.ONE).gcda(a, function(_) {
|
|
1407
|
+
_.compareTo(v.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(f, 0);
|
|
1408
1408
|
});
|
|
1409
1409
|
});
|
|
1410
1410
|
};
|
|
@@ -1412,7 +1412,7 @@ var Gi = (
|
|
|
1412
1412
|
};
|
|
1413
1413
|
setTimeout(c, 0);
|
|
1414
1414
|
}, n.prototype.sign = function(t, e, i) {
|
|
1415
|
-
var r =
|
|
1415
|
+
var r = Qi(i), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = Wi(s, a);
|
|
1416
1416
|
if (o == null)
|
|
1417
1417
|
return null;
|
|
1418
1418
|
var c = this.doPrivate(o);
|
|
@@ -1425,12 +1425,12 @@ var Gi = (
|
|
|
1425
1425
|
var r = C(e, 16), s = this.doPublic(r);
|
|
1426
1426
|
if (s == null)
|
|
1427
1427
|
return null;
|
|
1428
|
-
var a = s.toString(16).replace(/^1f+00/, ""), o =
|
|
1428
|
+
var a = s.toString(16).replace(/^1f+00/, ""), o = Zi(a);
|
|
1429
1429
|
return o == i(t).toString();
|
|
1430
1430
|
}, n;
|
|
1431
1431
|
})()
|
|
1432
1432
|
);
|
|
1433
|
-
function
|
|
1433
|
+
function Ji(n, t) {
|
|
1434
1434
|
for (var e = n.toByteArray(), i = 0; i < e.length && e[i] == 0; )
|
|
1435
1435
|
++i;
|
|
1436
1436
|
if (e.length - i != t - 1 || e[i] != 2)
|
|
@@ -1454,10 +1454,10 @@ var It = {
|
|
|
1454
1454
|
sha512: "3051300d060960864801650304020305000440",
|
|
1455
1455
|
ripemd160: "3021300906052b2403020105000414"
|
|
1456
1456
|
};
|
|
1457
|
-
function
|
|
1457
|
+
function Qi(n) {
|
|
1458
1458
|
return It[n] || "";
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Zi(n) {
|
|
1461
1461
|
for (var t in It)
|
|
1462
1462
|
if (It.hasOwnProperty(t)) {
|
|
1463
1463
|
var e = It[t], i = e.length;
|
|
@@ -1473,9 +1473,9 @@ function R(n, t, e) {
|
|
|
1473
1473
|
};
|
|
1474
1474
|
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);
|
|
1475
1475
|
}
|
|
1476
|
-
var
|
|
1477
|
-
(typeof
|
|
1478
|
-
|
|
1476
|
+
var d = {};
|
|
1477
|
+
(typeof d.asn1 > "u" || !d.asn1) && (d.asn1 = {});
|
|
1478
|
+
d.asn1.ASN1Util = new function() {
|
|
1479
1479
|
this.integerToByteHex = function(n) {
|
|
1480
1480
|
var t = n.toString(16);
|
|
1481
1481
|
return t.length % 2 == 1 && (t = "0" + t), t;
|
|
@@ -1488,63 +1488,63 @@ p.asn1.ASN1Util = new function() {
|
|
|
1488
1488
|
i % 2 == 1 ? i += 1 : t.match(/^[0-7]/) || (i += 2);
|
|
1489
1489
|
for (var r = "", s = 0; s < i; s++)
|
|
1490
1490
|
r += "f";
|
|
1491
|
-
var a = new
|
|
1491
|
+
var a = new v(r, 16), o = a.xor(n).add(v.ONE);
|
|
1492
1492
|
t = o.toString(16).replace(/^-/, "");
|
|
1493
1493
|
}
|
|
1494
1494
|
return t;
|
|
1495
1495
|
}, this.getPEMStringFromHex = function(n, t) {
|
|
1496
1496
|
return hextopem(n, t);
|
|
1497
1497
|
}, this.newObject = function(n) {
|
|
1498
|
-
var t =
|
|
1498
|
+
var t = d, 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, p = e.DERIA5String, m = e.DERUTCTime, g = e.DERGeneralizedTime, w = e.DERSequence, A = e.DERSet, T = e.DERTaggedObject, O = e.ASN1Util.newObject, x = Object.keys(n);
|
|
1499
1499
|
if (x.length != 1)
|
|
1500
1500
|
throw "key of param shall be only one.";
|
|
1501
|
-
var
|
|
1502
|
-
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" +
|
|
1503
|
-
throw "undefined key: " +
|
|
1504
|
-
if (
|
|
1505
|
-
return new i(n[
|
|
1506
|
-
if (
|
|
1507
|
-
return new r(n[
|
|
1508
|
-
if (
|
|
1509
|
-
return new s(n[
|
|
1510
|
-
if (
|
|
1511
|
-
return new a(n[
|
|
1512
|
-
if (
|
|
1513
|
-
return new o(n[
|
|
1514
|
-
if (
|
|
1515
|
-
return new c(n[
|
|
1516
|
-
if (
|
|
1517
|
-
return new h(n[
|
|
1518
|
-
if (
|
|
1519
|
-
return new u(n[
|
|
1520
|
-
if (
|
|
1521
|
-
return new f(n[
|
|
1522
|
-
if (
|
|
1523
|
-
return new _(n[
|
|
1524
|
-
if (
|
|
1525
|
-
return new y(n[
|
|
1526
|
-
if (
|
|
1527
|
-
return new
|
|
1528
|
-
if (
|
|
1529
|
-
return new m(n[
|
|
1530
|
-
if (
|
|
1531
|
-
return new g(n[
|
|
1532
|
-
if (
|
|
1533
|
-
for (var D = n[
|
|
1534
|
-
var st = O(D[
|
|
1501
|
+
var P = x[0];
|
|
1502
|
+
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + P + ":") == -1)
|
|
1503
|
+
throw "undefined key: " + P;
|
|
1504
|
+
if (P == "bool")
|
|
1505
|
+
return new i(n[P]);
|
|
1506
|
+
if (P == "int")
|
|
1507
|
+
return new r(n[P]);
|
|
1508
|
+
if (P == "bitstr")
|
|
1509
|
+
return new s(n[P]);
|
|
1510
|
+
if (P == "octstr")
|
|
1511
|
+
return new a(n[P]);
|
|
1512
|
+
if (P == "null")
|
|
1513
|
+
return new o(n[P]);
|
|
1514
|
+
if (P == "oid")
|
|
1515
|
+
return new c(n[P]);
|
|
1516
|
+
if (P == "enum")
|
|
1517
|
+
return new h(n[P]);
|
|
1518
|
+
if (P == "utf8str")
|
|
1519
|
+
return new u(n[P]);
|
|
1520
|
+
if (P == "numstr")
|
|
1521
|
+
return new f(n[P]);
|
|
1522
|
+
if (P == "prnstr")
|
|
1523
|
+
return new _(n[P]);
|
|
1524
|
+
if (P == "telstr")
|
|
1525
|
+
return new y(n[P]);
|
|
1526
|
+
if (P == "ia5str")
|
|
1527
|
+
return new p(n[P]);
|
|
1528
|
+
if (P == "utctime")
|
|
1529
|
+
return new m(n[P]);
|
|
1530
|
+
if (P == "gentime")
|
|
1531
|
+
return new g(n[P]);
|
|
1532
|
+
if (P == "seq") {
|
|
1533
|
+
for (var D = n[P], X = [], F = 0; F < D.length; F++) {
|
|
1534
|
+
var st = O(D[F]);
|
|
1535
1535
|
X.push(st);
|
|
1536
1536
|
}
|
|
1537
1537
|
return new w({ array: X });
|
|
1538
1538
|
}
|
|
1539
|
-
if (
|
|
1540
|
-
for (var D = n[
|
|
1541
|
-
var st = O(D[
|
|
1539
|
+
if (P == "set") {
|
|
1540
|
+
for (var D = n[P], X = [], F = 0; F < D.length; F++) {
|
|
1541
|
+
var st = O(D[F]);
|
|
1542
1542
|
X.push(st);
|
|
1543
1543
|
}
|
|
1544
1544
|
return new A({ array: X });
|
|
1545
1545
|
}
|
|
1546
|
-
if (
|
|
1547
|
-
var V = n[
|
|
1546
|
+
if (P == "tag") {
|
|
1547
|
+
var V = n[P];
|
|
1548
1548
|
if (Object.prototype.toString.call(V) === "[object Array]" && V.length == 3) {
|
|
1549
1549
|
var at = O(V[2]);
|
|
1550
1550
|
return new T({
|
|
@@ -1553,10 +1553,10 @@ p.asn1.ASN1Util = new function() {
|
|
|
1553
1553
|
obj: at
|
|
1554
1554
|
});
|
|
1555
1555
|
} else {
|
|
1556
|
-
var
|
|
1557
|
-
if (V.explicit !== void 0 && (
|
|
1556
|
+
var H = {};
|
|
1557
|
+
if (V.explicit !== void 0 && (H.explicit = V.explicit), V.tag !== void 0 && (H.tag = V.tag), V.obj === void 0)
|
|
1558
1558
|
throw "obj shall be specified for 'tag'.";
|
|
1559
|
-
return
|
|
1559
|
+
return H.obj = O(V.obj), new T(H);
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
1562
|
}, this.jsonToASN1HEX = function(n) {
|
|
@@ -1564,29 +1564,29 @@ p.asn1.ASN1Util = new function() {
|
|
|
1564
1564
|
return t.getEncodedHex();
|
|
1565
1565
|
};
|
|
1566
1566
|
}();
|
|
1567
|
-
|
|
1567
|
+
d.asn1.ASN1Util.oidHexToInt = function(n) {
|
|
1568
1568
|
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) {
|
|
1569
1569
|
var o = parseInt(n.substring(a, a + 2), 16), c = ("00000000" + o.toString(2)).slice(-8);
|
|
1570
1570
|
if (s = s + c.substring(1, 8), c.substring(0, 1) == "0") {
|
|
1571
|
-
var h = new
|
|
1571
|
+
var h = new v(s, 2);
|
|
1572
1572
|
r = r + "." + h.toString(10), s = "";
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
return r;
|
|
1576
1576
|
};
|
|
1577
|
-
|
|
1577
|
+
d.asn1.ASN1Util.oidIntToHex = function(n) {
|
|
1578
1578
|
var t = function(o) {
|
|
1579
1579
|
var c = o.toString(16);
|
|
1580
1580
|
return c.length == 1 && (c = "0" + c), c;
|
|
1581
1581
|
}, e = function(o) {
|
|
1582
|
-
var c = "", h = new
|
|
1582
|
+
var c = "", h = new v(o, 10), u = h.toString(2), f = 7 - u.length % 7;
|
|
1583
1583
|
f == 7 && (f = 0);
|
|
1584
1584
|
for (var _ = "", y = 0; y < f; y++)
|
|
1585
1585
|
_ += "0";
|
|
1586
1586
|
u = _ + u;
|
|
1587
1587
|
for (var y = 0; y < u.length - 1; y += 7) {
|
|
1588
|
-
var
|
|
1589
|
-
y != u.length - 7 && (
|
|
1588
|
+
var p = u.substring(y, y + 7);
|
|
1589
|
+
y != u.length - 7 && (p = "1" + p), c += t(parseInt(p, 2));
|
|
1590
1590
|
}
|
|
1591
1591
|
return c;
|
|
1592
1592
|
};
|
|
@@ -1598,7 +1598,7 @@ p.asn1.ASN1Util.oidIntToHex = function(n) {
|
|
|
1598
1598
|
i += e(r[a]);
|
|
1599
1599
|
return i;
|
|
1600
1600
|
};
|
|
1601
|
-
|
|
1601
|
+
d.asn1.ASN1Object = function() {
|
|
1602
1602
|
var n = "";
|
|
1603
1603
|
this.getLengthHexFromValue = function() {
|
|
1604
1604
|
if (typeof this.hV > "u" || this.hV == null)
|
|
@@ -1621,8 +1621,8 @@ p.asn1.ASN1Object = function() {
|
|
|
1621
1621
|
return "";
|
|
1622
1622
|
};
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1625
|
-
|
|
1624
|
+
d.asn1.DERAbstractString = function(n) {
|
|
1625
|
+
d.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
|
|
1626
1626
|
return this.s;
|
|
1627
1627
|
}, this.setString = function(t) {
|
|
1628
1628
|
this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(this.s);
|
|
@@ -1632,9 +1632,9 @@ p.asn1.DERAbstractString = function(n) {
|
|
|
1632
1632
|
return this.hV;
|
|
1633
1633
|
}, 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));
|
|
1634
1634
|
};
|
|
1635
|
-
R(
|
|
1636
|
-
|
|
1637
|
-
|
|
1635
|
+
R(d.asn1.DERAbstractString, d.asn1.ASN1Object);
|
|
1636
|
+
d.asn1.DERAbstractTime = function(n) {
|
|
1637
|
+
d.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
|
|
1638
1638
|
utc = t.getTime() + t.getTimezoneOffset() * 6e4;
|
|
1639
1639
|
var e = new Date(utc);
|
|
1640
1640
|
return e;
|
|
@@ -1645,8 +1645,8 @@ p.asn1.DERAbstractTime = function(n) {
|
|
|
1645
1645
|
if (i === !0) {
|
|
1646
1646
|
var y = s.getMilliseconds();
|
|
1647
1647
|
if (y != 0) {
|
|
1648
|
-
var
|
|
1649
|
-
|
|
1648
|
+
var p = r(String(y), 3);
|
|
1649
|
+
p = p.replace(/[0]+$/, ""), _ = _ + "." + p;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
return _ + "Z";
|
|
@@ -1663,24 +1663,24 @@ p.asn1.DERAbstractTime = function(n) {
|
|
|
1663
1663
|
return this.hV;
|
|
1664
1664
|
};
|
|
1665
1665
|
};
|
|
1666
|
-
R(
|
|
1667
|
-
|
|
1668
|
-
|
|
1666
|
+
R(d.asn1.DERAbstractTime, d.asn1.ASN1Object);
|
|
1667
|
+
d.asn1.DERAbstractStructured = function(n) {
|
|
1668
|
+
d.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
|
|
1669
1669
|
this.hTLV = null, this.isModified = !0, this.asn1Array = t;
|
|
1670
1670
|
}, this.appendASN1Object = function(t) {
|
|
1671
1671
|
this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
|
|
1672
1672
|
}, this.asn1Array = new Array(), typeof n < "u" && typeof n.array < "u" && (this.asn1Array = n.array);
|
|
1673
1673
|
};
|
|
1674
|
-
R(
|
|
1675
|
-
|
|
1676
|
-
|
|
1674
|
+
R(d.asn1.DERAbstractStructured, d.asn1.ASN1Object);
|
|
1675
|
+
d.asn1.DERBoolean = function() {
|
|
1676
|
+
d.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
1677
1677
|
};
|
|
1678
|
-
R(
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
this.hTLV = null, this.isModified = !0, this.hV =
|
|
1678
|
+
R(d.asn1.DERBoolean, d.asn1.ASN1Object);
|
|
1679
|
+
d.asn1.DERInteger = function(n) {
|
|
1680
|
+
d.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
|
|
1681
|
+
this.hTLV = null, this.isModified = !0, this.hV = d.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
1682
1682
|
}, this.setByInteger = function(t) {
|
|
1683
|
-
var e = new
|
|
1683
|
+
var e = new v(String(t), 10);
|
|
1684
1684
|
this.setByBigInteger(e);
|
|
1685
1685
|
}, this.setValueHex = function(t) {
|
|
1686
1686
|
this.hV = t;
|
|
@@ -1688,13 +1688,13 @@ p.asn1.DERInteger = function(n) {
|
|
|
1688
1688
|
return this.hV;
|
|
1689
1689
|
}, 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));
|
|
1690
1690
|
};
|
|
1691
|
-
R(
|
|
1692
|
-
|
|
1691
|
+
R(d.asn1.DERInteger, d.asn1.ASN1Object);
|
|
1692
|
+
d.asn1.DERBitString = function(n) {
|
|
1693
1693
|
if (n !== void 0 && typeof n.obj < "u") {
|
|
1694
|
-
var t =
|
|
1694
|
+
var t = d.asn1.ASN1Util.newObject(n.obj);
|
|
1695
1695
|
n.hex = "00" + t.getEncodedHex();
|
|
1696
1696
|
}
|
|
1697
|
-
|
|
1697
|
+
d.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
|
|
1698
1698
|
this.hTLV = null, this.isModified = !0, this.hV = e;
|
|
1699
1699
|
}, this.setUnusedBitsAndHexValue = function(e, i) {
|
|
1700
1700
|
if (e < 0 || 7 < e)
|
|
@@ -1724,25 +1724,25 @@ p.asn1.DERBitString = function(n) {
|
|
|
1724
1724
|
return this.hV;
|
|
1725
1725
|
}, 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));
|
|
1726
1726
|
};
|
|
1727
|
-
R(
|
|
1728
|
-
|
|
1727
|
+
R(d.asn1.DERBitString, d.asn1.ASN1Object);
|
|
1728
|
+
d.asn1.DEROctetString = function(n) {
|
|
1729
1729
|
if (n !== void 0 && typeof n.obj < "u") {
|
|
1730
|
-
var t =
|
|
1730
|
+
var t = d.asn1.ASN1Util.newObject(n.obj);
|
|
1731
1731
|
n.hex = t.getEncodedHex();
|
|
1732
1732
|
}
|
|
1733
|
-
|
|
1733
|
+
d.asn1.DEROctetString.superclass.constructor.call(this, n), this.hT = "04";
|
|
1734
1734
|
};
|
|
1735
|
-
R(
|
|
1736
|
-
|
|
1737
|
-
|
|
1735
|
+
R(d.asn1.DEROctetString, d.asn1.DERAbstractString);
|
|
1736
|
+
d.asn1.DERNull = function() {
|
|
1737
|
+
d.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
1738
1738
|
};
|
|
1739
|
-
R(
|
|
1740
|
-
|
|
1739
|
+
R(d.asn1.DERNull, d.asn1.ASN1Object);
|
|
1740
|
+
d.asn1.DERObjectIdentifier = function(n) {
|
|
1741
1741
|
var t = function(i) {
|
|
1742
1742
|
var r = i.toString(16);
|
|
1743
1743
|
return r.length == 1 && (r = "0" + r), r;
|
|
1744
1744
|
}, e = function(i) {
|
|
1745
|
-
var r = "", s = new
|
|
1745
|
+
var r = "", s = new v(i, 10), a = s.toString(2), o = 7 - a.length % 7;
|
|
1746
1746
|
o == 7 && (o = 0);
|
|
1747
1747
|
for (var c = "", h = 0; h < o; h++)
|
|
1748
1748
|
c += "0";
|
|
@@ -1753,7 +1753,7 @@ p.asn1.DERObjectIdentifier = function(n) {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
return r;
|
|
1755
1755
|
};
|
|
1756
|
-
|
|
1756
|
+
d.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(i) {
|
|
1757
1757
|
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = i;
|
|
1758
1758
|
}, this.setValueOidString = function(i) {
|
|
1759
1759
|
if (!i.match(/^[0-9.]+$/))
|
|
@@ -1764,7 +1764,7 @@ p.asn1.DERObjectIdentifier = function(n) {
|
|
|
1764
1764
|
r += e(s[o]);
|
|
1765
1765
|
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
|
|
1766
1766
|
}, this.setValueName = function(i) {
|
|
1767
|
-
var r =
|
|
1767
|
+
var r = d.asn1.x509.OID.name2oid(i);
|
|
1768
1768
|
if (r !== "")
|
|
1769
1769
|
this.setValueOidString(r);
|
|
1770
1770
|
else
|
|
@@ -1773,12 +1773,12 @@ p.asn1.DERObjectIdentifier = function(n) {
|
|
|
1773
1773
|
return this.hV;
|
|
1774
1774
|
}, 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));
|
|
1775
1775
|
};
|
|
1776
|
-
R(
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
this.hTLV = null, this.isModified = !0, this.hV =
|
|
1776
|
+
R(d.asn1.DERObjectIdentifier, d.asn1.ASN1Object);
|
|
1777
|
+
d.asn1.DEREnumerated = function(n) {
|
|
1778
|
+
d.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
|
|
1779
|
+
this.hTLV = null, this.isModified = !0, this.hV = d.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
1780
1780
|
}, this.setByInteger = function(t) {
|
|
1781
|
-
var e = new
|
|
1781
|
+
var e = new v(String(t), 10);
|
|
1782
1782
|
this.setByBigInteger(e);
|
|
1783
1783
|
}, this.setValueHex = function(t) {
|
|
1784
1784
|
this.hV = t;
|
|
@@ -1786,45 +1786,45 @@ p.asn1.DEREnumerated = function(n) {
|
|
|
1786
1786
|
return this.hV;
|
|
1787
1787
|
}, 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));
|
|
1788
1788
|
};
|
|
1789
|
-
R(
|
|
1790
|
-
|
|
1791
|
-
|
|
1789
|
+
R(d.asn1.DEREnumerated, d.asn1.ASN1Object);
|
|
1790
|
+
d.asn1.DERUTF8String = function(n) {
|
|
1791
|
+
d.asn1.DERUTF8String.superclass.constructor.call(this, n), this.hT = "0c";
|
|
1792
1792
|
};
|
|
1793
|
-
R(
|
|
1794
|
-
|
|
1795
|
-
|
|
1793
|
+
R(d.asn1.DERUTF8String, d.asn1.DERAbstractString);
|
|
1794
|
+
d.asn1.DERNumericString = function(n) {
|
|
1795
|
+
d.asn1.DERNumericString.superclass.constructor.call(this, n), this.hT = "12";
|
|
1796
1796
|
};
|
|
1797
|
-
R(
|
|
1798
|
-
|
|
1799
|
-
|
|
1797
|
+
R(d.asn1.DERNumericString, d.asn1.DERAbstractString);
|
|
1798
|
+
d.asn1.DERPrintableString = function(n) {
|
|
1799
|
+
d.asn1.DERPrintableString.superclass.constructor.call(this, n), this.hT = "13";
|
|
1800
1800
|
};
|
|
1801
|
-
R(
|
|
1802
|
-
|
|
1803
|
-
|
|
1801
|
+
R(d.asn1.DERPrintableString, d.asn1.DERAbstractString);
|
|
1802
|
+
d.asn1.DERTeletexString = function(n) {
|
|
1803
|
+
d.asn1.DERTeletexString.superclass.constructor.call(this, n), this.hT = "14";
|
|
1804
1804
|
};
|
|
1805
|
-
R(
|
|
1806
|
-
|
|
1807
|
-
|
|
1805
|
+
R(d.asn1.DERTeletexString, d.asn1.DERAbstractString);
|
|
1806
|
+
d.asn1.DERIA5String = function(n) {
|
|
1807
|
+
d.asn1.DERIA5String.superclass.constructor.call(this, n), this.hT = "16";
|
|
1808
1808
|
};
|
|
1809
|
-
R(
|
|
1810
|
-
|
|
1811
|
-
|
|
1809
|
+
R(d.asn1.DERIA5String, d.asn1.DERAbstractString);
|
|
1810
|
+
d.asn1.DERUTCTime = function(n) {
|
|
1811
|
+
d.asn1.DERUTCTime.superclass.constructor.call(this, n), this.hT = "17", this.setByDate = function(t) {
|
|
1812
1812
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
1813
1813
|
}, this.getFreshValueHex = function() {
|
|
1814
1814
|
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;
|
|
1815
1815
|
}, 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));
|
|
1816
1816
|
};
|
|
1817
|
-
R(
|
|
1818
|
-
|
|
1819
|
-
|
|
1817
|
+
R(d.asn1.DERUTCTime, d.asn1.DERAbstractTime);
|
|
1818
|
+
d.asn1.DERGeneralizedTime = function(n) {
|
|
1819
|
+
d.asn1.DERGeneralizedTime.superclass.constructor.call(this, n), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
|
|
1820
1820
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
1821
1821
|
}, this.getFreshValueHex = function() {
|
|
1822
1822
|
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;
|
|
1823
1823
|
}, 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));
|
|
1824
1824
|
};
|
|
1825
|
-
R(
|
|
1826
|
-
|
|
1827
|
-
|
|
1825
|
+
R(d.asn1.DERGeneralizedTime, d.asn1.DERAbstractTime);
|
|
1826
|
+
d.asn1.DERSequence = function(n) {
|
|
1827
|
+
d.asn1.DERSequence.superclass.constructor.call(this, n), this.hT = "30", this.getFreshValueHex = function() {
|
|
1828
1828
|
for (var t = "", e = 0; e < this.asn1Array.length; e++) {
|
|
1829
1829
|
var i = this.asn1Array[e];
|
|
1830
1830
|
t += i.getEncodedHex();
|
|
@@ -1832,9 +1832,9 @@ p.asn1.DERSequence = function(n) {
|
|
|
1832
1832
|
return this.hV = t, this.hV;
|
|
1833
1833
|
};
|
|
1834
1834
|
};
|
|
1835
|
-
R(
|
|
1836
|
-
|
|
1837
|
-
|
|
1835
|
+
R(d.asn1.DERSequence, d.asn1.DERAbstractStructured);
|
|
1836
|
+
d.asn1.DERSet = function(n) {
|
|
1837
|
+
d.asn1.DERSet.superclass.constructor.call(this, n), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
1838
1838
|
for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
|
|
1839
1839
|
var i = this.asn1Array[e];
|
|
1840
1840
|
t.push(i.getEncodedHex());
|
|
@@ -1842,16 +1842,16 @@ p.asn1.DERSet = function(n) {
|
|
|
1842
1842
|
return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
|
|
1843
1843
|
}, typeof n < "u" && typeof n.sortflag < "u" && n.sortflag == !1 && (this.sortFlag = !1);
|
|
1844
1844
|
};
|
|
1845
|
-
R(
|
|
1846
|
-
|
|
1847
|
-
|
|
1845
|
+
R(d.asn1.DERSet, d.asn1.DERAbstractStructured);
|
|
1846
|
+
d.asn1.DERTaggedObject = function(n) {
|
|
1847
|
+
d.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, i) {
|
|
1848
1848
|
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);
|
|
1849
1849
|
}, this.getFreshValueHex = function() {
|
|
1850
1850
|
return this.hV;
|
|
1851
1851
|
}, 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)));
|
|
1852
1852
|
};
|
|
1853
|
-
R(
|
|
1854
|
-
var
|
|
1853
|
+
R(d.asn1.DERTaggedObject, d.asn1.ASN1Object);
|
|
1854
|
+
var Yi = /* @__PURE__ */ (function() {
|
|
1855
1855
|
var n = function(t, e) {
|
|
1856
1856
|
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, r) {
|
|
1857
1857
|
i.__proto__ = r;
|
|
@@ -1868,17 +1868,17 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i());
|
|
1870
1870
|
};
|
|
1871
|
-
})(),
|
|
1871
|
+
})(), Ce = (
|
|
1872
1872
|
/** @class */
|
|
1873
1873
|
(function(n) {
|
|
1874
|
-
|
|
1874
|
+
Yi(t, n);
|
|
1875
1875
|
function t(e) {
|
|
1876
1876
|
var i = n.call(this) || this;
|
|
1877
1877
|
return e && (typeof e == "string" ? i.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && i.parsePropertiesFrom(e)), i;
|
|
1878
1878
|
}
|
|
1879
1879
|
return t.prototype.parseKey = function(e) {
|
|
1880
1880
|
try {
|
|
1881
|
-
var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ?
|
|
1881
|
+
var i = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? Si.decode(e) : Qt.unarmor(e), o = Ci.decode(a);
|
|
1882
1882
|
if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
|
|
1883
1883
|
i = o.sub[1].getHexStringValue(), this.n = C(i, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1884
1884
|
var c = o.sub[3].getHexStringValue();
|
|
@@ -1895,7 +1895,7 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
1895
1895
|
this.coeff = C(y, 16);
|
|
1896
1896
|
} else if (o.sub.length === 2)
|
|
1897
1897
|
if (o.sub[0].sub) {
|
|
1898
|
-
var
|
|
1898
|
+
var p = o.sub[1], m = p.sub[0];
|
|
1899
1899
|
i = m.sub[0].getHexStringValue(), this.n = C(i, 16), r = m.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1900
1900
|
} else
|
|
1901
1901
|
i = o.sub[0].getHexStringValue(), this.n = C(i, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
@@ -1908,40 +1908,40 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
1908
1908
|
}, t.prototype.getPrivateBaseKey = function() {
|
|
1909
1909
|
var e = {
|
|
1910
1910
|
array: [
|
|
1911
|
-
new
|
|
1912
|
-
new
|
|
1913
|
-
new
|
|
1914
|
-
new
|
|
1915
|
-
new
|
|
1916
|
-
new
|
|
1917
|
-
new
|
|
1918
|
-
new
|
|
1919
|
-
new
|
|
1911
|
+
new d.asn1.DERInteger({ int: 0 }),
|
|
1912
|
+
new d.asn1.DERInteger({ bigint: this.n }),
|
|
1913
|
+
new d.asn1.DERInteger({ int: this.e }),
|
|
1914
|
+
new d.asn1.DERInteger({ bigint: this.d }),
|
|
1915
|
+
new d.asn1.DERInteger({ bigint: this.p }),
|
|
1916
|
+
new d.asn1.DERInteger({ bigint: this.q }),
|
|
1917
|
+
new d.asn1.DERInteger({ bigint: this.dmp1 }),
|
|
1918
|
+
new d.asn1.DERInteger({ bigint: this.dmq1 }),
|
|
1919
|
+
new d.asn1.DERInteger({ bigint: this.coeff })
|
|
1920
1920
|
]
|
|
1921
|
-
}, i = new
|
|
1921
|
+
}, i = new d.asn1.DERSequence(e);
|
|
1922
1922
|
return i.getEncodedHex();
|
|
1923
1923
|
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
1924
|
-
return
|
|
1924
|
+
return mt(this.getPrivateBaseKey());
|
|
1925
1925
|
}, t.prototype.getPublicBaseKey = function() {
|
|
1926
|
-
var e = new
|
|
1926
|
+
var e = new d.asn1.DERSequence({
|
|
1927
1927
|
array: [
|
|
1928
|
-
new
|
|
1928
|
+
new d.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
|
|
1929
1929
|
// RSA Encryption pkcs #1 oid
|
|
1930
|
-
new
|
|
1930
|
+
new d.asn1.DERNull()
|
|
1931
1931
|
]
|
|
1932
|
-
}), i = new
|
|
1932
|
+
}), i = new d.asn1.DERSequence({
|
|
1933
1933
|
array: [
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1934
|
+
new d.asn1.DERInteger({ bigint: this.n }),
|
|
1935
|
+
new d.asn1.DERInteger({ int: this.e })
|
|
1936
1936
|
]
|
|
1937
|
-
}), r = new
|
|
1937
|
+
}), r = new d.asn1.DERBitString({
|
|
1938
1938
|
hex: "00" + i.getEncodedHex()
|
|
1939
|
-
}), s = new
|
|
1939
|
+
}), s = new d.asn1.DERSequence({
|
|
1940
1940
|
array: [e, r]
|
|
1941
1941
|
});
|
|
1942
1942
|
return s.getEncodedHex();
|
|
1943
1943
|
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
1944
|
-
return
|
|
1944
|
+
return mt(this.getPublicBaseKey());
|
|
1945
1945
|
}, t.wordwrap = function(e, i) {
|
|
1946
1946
|
if (i = i || 64, !e)
|
|
1947
1947
|
return e;
|
|
@@ -1966,34 +1966,34 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
1966
1966
|
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
1967
1967
|
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);
|
|
1968
1968
|
}, t;
|
|
1969
|
-
})(
|
|
1970
|
-
), Xt,
|
|
1969
|
+
})($i)
|
|
1970
|
+
), Xt, tn = typeof process < "u" ? (Xt = process.env) === null || Xt === void 0 ? void 0 : Xt.npm_package_version : void 0, en = (
|
|
1971
1971
|
/** @class */
|
|
1972
1972
|
(function() {
|
|
1973
1973
|
function n(t) {
|
|
1974
1974
|
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;
|
|
1975
1975
|
}
|
|
1976
1976
|
return n.prototype.setKey = function(t) {
|
|
1977
|
-
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new
|
|
1977
|
+
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Ce(t)) : !this.key && this.log && console.error("A key was not set.");
|
|
1978
1978
|
}, n.prototype.setPrivateKey = function(t) {
|
|
1979
1979
|
this.setKey(t);
|
|
1980
1980
|
}, n.prototype.setPublicKey = function(t) {
|
|
1981
1981
|
this.setKey(t);
|
|
1982
1982
|
}, n.prototype.decrypt = function(t) {
|
|
1983
1983
|
try {
|
|
1984
|
-
return this.getKey().decrypt(
|
|
1984
|
+
return this.getKey().decrypt(ye(t));
|
|
1985
1985
|
} catch {
|
|
1986
1986
|
return !1;
|
|
1987
1987
|
}
|
|
1988
1988
|
}, n.prototype.encrypt = function(t) {
|
|
1989
1989
|
try {
|
|
1990
|
-
return
|
|
1990
|
+
return mt(this.getKey().encrypt(t));
|
|
1991
1991
|
} catch {
|
|
1992
1992
|
return !1;
|
|
1993
1993
|
}
|
|
1994
1994
|
}, n.prototype.encryptOAEP = function(t) {
|
|
1995
1995
|
try {
|
|
1996
|
-
return
|
|
1996
|
+
return mt(this.getKey().encrypt(t, Gi));
|
|
1997
1997
|
} catch {
|
|
1998
1998
|
return !1;
|
|
1999
1999
|
}
|
|
@@ -2002,30 +2002,30 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
2002
2002
|
return r;
|
|
2003
2003
|
}), i === void 0 && (i = "");
|
|
2004
2004
|
try {
|
|
2005
|
-
return
|
|
2005
|
+
return mt(this.getKey().sign(t, e, i));
|
|
2006
2006
|
} catch {
|
|
2007
2007
|
return !1;
|
|
2008
2008
|
}
|
|
2009
2009
|
}, n.prototype.signSha256 = function(t) {
|
|
2010
2010
|
return this.sign(t, function(e) {
|
|
2011
|
-
return
|
|
2011
|
+
return Te(Zt(e));
|
|
2012
2012
|
}, "sha256");
|
|
2013
2013
|
}, n.prototype.verify = function(t, e, i) {
|
|
2014
2014
|
i === void 0 && (i = function(r) {
|
|
2015
2015
|
return r;
|
|
2016
2016
|
});
|
|
2017
2017
|
try {
|
|
2018
|
-
return this.getKey().verify(t,
|
|
2018
|
+
return this.getKey().verify(t, ye(e), i);
|
|
2019
2019
|
} catch {
|
|
2020
2020
|
return !1;
|
|
2021
2021
|
}
|
|
2022
2022
|
}, n.prototype.verifySha256 = function(t, e) {
|
|
2023
2023
|
return this.verify(t, e, function(i) {
|
|
2024
|
-
return
|
|
2024
|
+
return Te(Zt(i));
|
|
2025
2025
|
});
|
|
2026
2026
|
}, n.prototype.getKey = function(t) {
|
|
2027
2027
|
if (!this.key) {
|
|
2028
|
-
if (this.key = new
|
|
2028
|
+
if (this.key = new Ce(), t && {}.toString.call(t) === "[object Function]") {
|
|
2029
2029
|
this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
|
|
2030
2030
|
return;
|
|
2031
2031
|
}
|
|
@@ -2040,45 +2040,54 @@ var Zi = /* @__PURE__ */ (function() {
|
|
|
2040
2040
|
return this.getKey().getPublicKey();
|
|
2041
2041
|
}, n.prototype.getPublicKeyB64 = function() {
|
|
2042
2042
|
return this.getKey().getPublicBaseKeyB64();
|
|
2043
|
-
}, n.version =
|
|
2043
|
+
}, n.version = tn, n;
|
|
2044
2044
|
})()
|
|
2045
2045
|
);
|
|
2046
|
-
function
|
|
2046
|
+
function $e(n, t) {
|
|
2047
2047
|
return function() {
|
|
2048
2048
|
return n.apply(t, arguments);
|
|
2049
2049
|
};
|
|
2050
2050
|
}
|
|
2051
|
-
const { toString:
|
|
2052
|
-
const e =
|
|
2051
|
+
const { toString: nn } = Object.prototype, { getPrototypeOf: re } = Object, { iterator: Mt, toStringTag: Je } = Symbol, Ft = /* @__PURE__ */ ((n) => (t) => {
|
|
2052
|
+
const e = nn.call(t);
|
|
2053
2053
|
return n[e] || (n[e] = e.slice(8, -1).toLowerCase());
|
|
2054
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
2055
|
-
function
|
|
2056
|
-
return n !== null && !ft(n) && n.constructor !== null && !ft(n.constructor) &&
|
|
2054
|
+
})(/* @__PURE__ */ Object.create(null)), K = (n) => (n = n.toLowerCase(), (t) => Ft(t) === n), kt = (n) => (t) => typeof t === n, { isArray: dt } = Array, ft = kt("undefined");
|
|
2055
|
+
function yt(n) {
|
|
2056
|
+
return n !== null && !ft(n) && n.constructor !== null && !ft(n.constructor) && L(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
2057
2057
|
}
|
|
2058
|
-
const
|
|
2059
|
-
function
|
|
2058
|
+
const Qe = K("ArrayBuffer");
|
|
2059
|
+
function rn(n) {
|
|
2060
2060
|
let t;
|
|
2061
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer &&
|
|
2061
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(n) : t = n && n.buffer && Qe(n.buffer), t;
|
|
2062
2062
|
}
|
|
2063
|
-
const
|
|
2064
|
-
if (
|
|
2063
|
+
const sn = kt("string"), L = kt("function"), Ze = kt("number"), bt = (n) => n !== null && typeof n == "object", an = (n) => n === !0 || n === !1, Nt = (n) => {
|
|
2064
|
+
if (Ft(n) !== "object")
|
|
2065
2065
|
return !1;
|
|
2066
|
-
const t =
|
|
2067
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
2068
|
-
},
|
|
2069
|
-
if (!
|
|
2066
|
+
const t = re(n);
|
|
2067
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Je in n) && !(Mt in n);
|
|
2068
|
+
}, on = (n) => {
|
|
2069
|
+
if (!bt(n) || yt(n))
|
|
2070
2070
|
return !1;
|
|
2071
2071
|
try {
|
|
2072
2072
|
return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
|
|
2073
2073
|
} catch {
|
|
2074
2074
|
return !1;
|
|
2075
2075
|
}
|
|
2076
|
-
},
|
|
2076
|
+
}, cn = K("Date"), un = K("File"), hn = (n) => !!(n && typeof n.uri < "u"), ln = (n) => n && typeof n.getParts < "u", fn = K("Blob"), pn = K("FileList"), dn = (n) => bt(n) && L(n.pipe);
|
|
2077
|
+
function _n() {
|
|
2078
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
2079
|
+
}
|
|
2080
|
+
const Re = _n(), Oe = typeof Re.FormData < "u" ? Re.FormData : void 0, gn = (n) => {
|
|
2077
2081
|
let t;
|
|
2078
|
-
return n && (
|
|
2079
|
-
t === "object" &&
|
|
2080
|
-
},
|
|
2081
|
-
|
|
2082
|
+
return n && (Oe && n instanceof Oe || L(n.append) && ((t = Ft(n)) === "formdata" || // detect form-data instance
|
|
2083
|
+
t === "object" && L(n.toString) && n.toString() === "[object FormData]"));
|
|
2084
|
+
}, mn = K("URLSearchParams"), [yn, bn, Pn, vn] = [
|
|
2085
|
+
"ReadableStream",
|
|
2086
|
+
"Request",
|
|
2087
|
+
"Response",
|
|
2088
|
+
"Headers"
|
|
2089
|
+
].map(K), En = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2090
|
+
function Pt(n, t, { allOwnKeys: e = !1 } = {}) {
|
|
2082
2091
|
if (n === null || typeof n > "u")
|
|
2083
2092
|
return;
|
|
2084
2093
|
let i, r;
|
|
@@ -2086,7 +2095,7 @@ function vt(n, t, { allOwnKeys: e = !1 } = {}) {
|
|
|
2086
2095
|
for (i = 0, r = n.length; i < r; i++)
|
|
2087
2096
|
t.call(null, n[i], i, n);
|
|
2088
2097
|
else {
|
|
2089
|
-
if (
|
|
2098
|
+
if (yt(n))
|
|
2090
2099
|
return;
|
|
2091
2100
|
const s = e ? Object.getOwnPropertyNames(n) : Object.keys(n), a = s.length;
|
|
2092
2101
|
let o;
|
|
@@ -2094,8 +2103,8 @@ function vt(n, t, { allOwnKeys: e = !1 } = {}) {
|
|
|
2094
2103
|
o = s[i], t.call(null, n[o], o, n);
|
|
2095
2104
|
}
|
|
2096
2105
|
}
|
|
2097
|
-
function
|
|
2098
|
-
if (
|
|
2106
|
+
function Ye(n, t) {
|
|
2107
|
+
if (yt(n))
|
|
2099
2108
|
return null;
|
|
2100
2109
|
t = t.toLowerCase();
|
|
2101
2110
|
const e = Object.keys(n);
|
|
@@ -2105,75 +2114,93 @@ function Je(n, t) {
|
|
|
2105
2114
|
return r;
|
|
2106
2115
|
return null;
|
|
2107
2116
|
}
|
|
2108
|
-
const it = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
2109
|
-
function
|
|
2110
|
-
const { caseless: n, skipUndefined: t } =
|
|
2111
|
-
|
|
2112
|
-
|
|
2117
|
+
const it = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ti = (n) => !ft(n) && n !== it;
|
|
2118
|
+
function Yt() {
|
|
2119
|
+
const { caseless: n, skipUndefined: t } = ti(this) && this || {}, e = {}, i = (r, s) => {
|
|
2120
|
+
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
2121
|
+
return;
|
|
2122
|
+
const a = n && Ye(e, s) || s;
|
|
2123
|
+
Nt(e[a]) && Nt(r) ? e[a] = Yt(e[a], r) : Nt(r) ? e[a] = Yt({}, r) : dt(r) ? e[a] = r.slice() : (!t || !ft(r)) && (e[a] = r);
|
|
2113
2124
|
};
|
|
2114
2125
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
2115
|
-
arguments[r] &&
|
|
2126
|
+
arguments[r] && Pt(arguments[r], i);
|
|
2116
2127
|
return e;
|
|
2117
2128
|
}
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2129
|
+
const wn = (n, t, e, { allOwnKeys: i } = {}) => (Pt(
|
|
2130
|
+
t,
|
|
2131
|
+
(r, s) => {
|
|
2132
|
+
e && L(r) ? Object.defineProperty(n, s, {
|
|
2133
|
+
value: $e(r, e),
|
|
2134
|
+
writable: !0,
|
|
2135
|
+
enumerable: !0,
|
|
2136
|
+
configurable: !0
|
|
2137
|
+
}) : Object.defineProperty(n, s, {
|
|
2138
|
+
value: r,
|
|
2139
|
+
writable: !0,
|
|
2140
|
+
enumerable: !0,
|
|
2141
|
+
configurable: !0
|
|
2142
|
+
});
|
|
2143
|
+
},
|
|
2144
|
+
{ allOwnKeys: i }
|
|
2145
|
+
), n), Sn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), Tn = (n, t, e, i) => {
|
|
2146
|
+
n.prototype = Object.create(t.prototype, i), Object.defineProperty(n.prototype, "constructor", {
|
|
2147
|
+
value: n,
|
|
2148
|
+
writable: !0,
|
|
2149
|
+
enumerable: !1,
|
|
2150
|
+
configurable: !0
|
|
2151
|
+
}), Object.defineProperty(n, "super", {
|
|
2122
2152
|
value: t.prototype
|
|
2123
2153
|
}), e && Object.assign(n.prototype, e);
|
|
2124
|
-
},
|
|
2154
|
+
}, An = (n, t, e, i) => {
|
|
2125
2155
|
let r, s, a;
|
|
2126
2156
|
const o = {};
|
|
2127
2157
|
if (t = t || {}, n == null) return t;
|
|
2128
2158
|
do {
|
|
2129
2159
|
for (r = Object.getOwnPropertyNames(n), s = r.length; s-- > 0; )
|
|
2130
2160
|
a = r[s], (!i || i(a, n, t)) && !o[a] && (t[a] = n[a], o[a] = !0);
|
|
2131
|
-
n = e !== !1 &&
|
|
2161
|
+
n = e !== !1 && re(n);
|
|
2132
2162
|
} while (n && (!e || e(n, t)) && n !== Object.prototype);
|
|
2133
2163
|
return t;
|
|
2134
|
-
},
|
|
2164
|
+
}, Cn = (n, t, e) => {
|
|
2135
2165
|
n = String(n), (e === void 0 || e > n.length) && (e = n.length), e -= t.length;
|
|
2136
2166
|
const i = n.indexOf(t, e);
|
|
2137
2167
|
return i !== -1 && i === e;
|
|
2138
|
-
},
|
|
2168
|
+
}, Rn = (n) => {
|
|
2139
2169
|
if (!n) return null;
|
|
2140
2170
|
if (dt(n)) return n;
|
|
2141
2171
|
let t = n.length;
|
|
2142
|
-
if (
|
|
2172
|
+
if (!Ze(t)) return null;
|
|
2143
2173
|
const e = new Array(t);
|
|
2144
2174
|
for (; t-- > 0; )
|
|
2145
2175
|
e[t] = n[t];
|
|
2146
2176
|
return e;
|
|
2147
|
-
},
|
|
2177
|
+
}, On = /* @__PURE__ */ ((n) => (t) => n && t instanceof n)(typeof Uint8Array < "u" && re(Uint8Array)), Dn = (n, t) => {
|
|
2148
2178
|
const i = (n && n[Mt]).call(n);
|
|
2149
2179
|
let r;
|
|
2150
2180
|
for (; (r = i.next()) && !r.done; ) {
|
|
2151
2181
|
const s = r.value;
|
|
2152
2182
|
t.call(n, s[0], s[1]);
|
|
2153
2183
|
}
|
|
2154
|
-
},
|
|
2184
|
+
}, In = (n, t) => {
|
|
2155
2185
|
let e;
|
|
2156
2186
|
const i = [];
|
|
2157
2187
|
for (; (e = n.exec(t)) !== null; )
|
|
2158
2188
|
i.push(e);
|
|
2159
2189
|
return i;
|
|
2160
|
-
},
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
return i.toUpperCase() + r;
|
|
2164
|
-
}
|
|
2165
|
-
), Ae = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), Dn = j("RegExp"), Ze = (n, t) => {
|
|
2190
|
+
}, Nn = K("HTMLFormElement"), Bn = (n) => n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, i, r) {
|
|
2191
|
+
return i.toUpperCase() + r;
|
|
2192
|
+
}), De = (({ hasOwnProperty: n }) => (t, e) => n.call(t, e))(Object.prototype), xn = K("RegExp"), ei = (n, t) => {
|
|
2166
2193
|
const e = Object.getOwnPropertyDescriptors(n), i = {};
|
|
2167
|
-
|
|
2194
|
+
Pt(e, (r, s) => {
|
|
2168
2195
|
let a;
|
|
2169
2196
|
(a = t(r, s, n)) !== !1 && (i[s] = a || r);
|
|
2170
2197
|
}), Object.defineProperties(n, i);
|
|
2171
|
-
},
|
|
2172
|
-
|
|
2173
|
-
if (
|
|
2198
|
+
}, Vn = (n) => {
|
|
2199
|
+
ei(n, (t, e) => {
|
|
2200
|
+
if (L(n) && ["arguments", "caller", "callee"].indexOf(e) !== -1)
|
|
2174
2201
|
return !1;
|
|
2175
2202
|
const i = n[e];
|
|
2176
|
-
if (
|
|
2203
|
+
if (L(i)) {
|
|
2177
2204
|
if (t.enumerable = !1, "writable" in t) {
|
|
2178
2205
|
t.writable = !1;
|
|
2179
2206
|
return;
|
|
@@ -2183,29 +2210,29 @@ const bn = (n, t, e, { allOwnKeys: i } = {}) => (vt(t, (r, s) => {
|
|
|
2183
2210
|
});
|
|
2184
2211
|
}
|
|
2185
2212
|
});
|
|
2186
|
-
},
|
|
2213
|
+
}, Un = (n, t) => {
|
|
2187
2214
|
const e = {}, i = (r) => {
|
|
2188
2215
|
r.forEach((s) => {
|
|
2189
2216
|
e[s] = !0;
|
|
2190
2217
|
});
|
|
2191
2218
|
};
|
|
2192
2219
|
return dt(n) ? i(n) : i(String(n).split(t)), e;
|
|
2193
|
-
},
|
|
2194
|
-
},
|
|
2195
|
-
function
|
|
2196
|
-
return !!(n &&
|
|
2220
|
+
}, Ln = () => {
|
|
2221
|
+
}, Mn = (n, t) => n != null && Number.isFinite(n = +n) ? n : t;
|
|
2222
|
+
function Fn(n) {
|
|
2223
|
+
return !!(n && L(n.append) && n[Je] === "FormData" && n[Mt]);
|
|
2197
2224
|
}
|
|
2198
|
-
const
|
|
2225
|
+
const kn = (n) => {
|
|
2199
2226
|
const t = new Array(10), e = (i, r) => {
|
|
2200
|
-
if (
|
|
2227
|
+
if (bt(i)) {
|
|
2201
2228
|
if (t.indexOf(i) >= 0)
|
|
2202
2229
|
return;
|
|
2203
|
-
if (
|
|
2230
|
+
if (yt(i))
|
|
2204
2231
|
return i;
|
|
2205
2232
|
if (!("toJSON" in i)) {
|
|
2206
2233
|
t[r] = i;
|
|
2207
2234
|
const s = dt(i) ? [] : {};
|
|
2208
|
-
return
|
|
2235
|
+
return Pt(i, (a, o) => {
|
|
2209
2236
|
const c = e(a, r + 1);
|
|
2210
2237
|
!ft(c) && (s[o] = c);
|
|
2211
2238
|
}), t[r] = void 0, s;
|
|
@@ -2214,78 +2241,101 @@ const Un = (n) => {
|
|
|
2214
2241
|
return i;
|
|
2215
2242
|
};
|
|
2216
2243
|
return e(n, 0);
|
|
2217
|
-
},
|
|
2218
|
-
|
|
2219
|
-
|
|
2244
|
+
}, jn = K("AsyncFunction"), qn = (n) => n && (bt(n) || L(n)) && L(n.then) && L(n.catch), ii = ((n, t) => n ? setImmediate : t ? ((e, i) => (it.addEventListener(
|
|
2245
|
+
"message",
|
|
2246
|
+
({ source: r, data: s }) => {
|
|
2247
|
+
r === it && s === e && i.length && i.shift()();
|
|
2248
|
+
},
|
|
2249
|
+
!1
|
|
2250
|
+
), (r) => {
|
|
2220
2251
|
i.push(r), it.postMessage(e, "*");
|
|
2221
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(
|
|
2222
|
-
typeof setImmediate == "function",
|
|
2223
|
-
U(it.postMessage)
|
|
2224
|
-
), kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(it) : typeof process < "u" && process.nextTick || Ye, Fn = (n) => n != null && U(n[Mt]), l = {
|
|
2252
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", L(it.postMessage)), Kn = typeof queueMicrotask < "u" ? queueMicrotask.bind(it) : typeof process < "u" && process.nextTick || ii, Hn = (n) => n != null && L(n[Mt]), l = {
|
|
2225
2253
|
isArray: dt,
|
|
2226
|
-
isArrayBuffer:
|
|
2227
|
-
isBuffer:
|
|
2228
|
-
isFormData:
|
|
2229
|
-
isArrayBufferView:
|
|
2230
|
-
isString:
|
|
2231
|
-
isNumber:
|
|
2232
|
-
isBoolean:
|
|
2233
|
-
isObject:
|
|
2234
|
-
isPlainObject:
|
|
2235
|
-
isEmptyObject:
|
|
2236
|
-
isReadableStream:
|
|
2237
|
-
isRequest:
|
|
2238
|
-
isResponse:
|
|
2239
|
-
isHeaders:
|
|
2254
|
+
isArrayBuffer: Qe,
|
|
2255
|
+
isBuffer: yt,
|
|
2256
|
+
isFormData: gn,
|
|
2257
|
+
isArrayBufferView: rn,
|
|
2258
|
+
isString: sn,
|
|
2259
|
+
isNumber: Ze,
|
|
2260
|
+
isBoolean: an,
|
|
2261
|
+
isObject: bt,
|
|
2262
|
+
isPlainObject: Nt,
|
|
2263
|
+
isEmptyObject: on,
|
|
2264
|
+
isReadableStream: yn,
|
|
2265
|
+
isRequest: bn,
|
|
2266
|
+
isResponse: Pn,
|
|
2267
|
+
isHeaders: vn,
|
|
2240
2268
|
isUndefined: ft,
|
|
2241
|
-
isDate:
|
|
2242
|
-
isFile:
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2269
|
+
isDate: cn,
|
|
2270
|
+
isFile: un,
|
|
2271
|
+
isReactNativeBlob: hn,
|
|
2272
|
+
isReactNative: ln,
|
|
2273
|
+
isBlob: fn,
|
|
2274
|
+
isRegExp: xn,
|
|
2275
|
+
isFunction: L,
|
|
2276
|
+
isStream: dn,
|
|
2277
|
+
isURLSearchParams: mn,
|
|
2278
|
+
isTypedArray: On,
|
|
2279
|
+
isFileList: pn,
|
|
2280
|
+
forEach: Pt,
|
|
2281
|
+
merge: Yt,
|
|
2282
|
+
extend: wn,
|
|
2283
|
+
trim: En,
|
|
2284
|
+
stripBOM: Sn,
|
|
2285
|
+
inherits: Tn,
|
|
2286
|
+
toFlatObject: An,
|
|
2287
|
+
kindOf: Ft,
|
|
2288
|
+
kindOfTest: K,
|
|
2289
|
+
endsWith: Cn,
|
|
2290
|
+
toArray: Rn,
|
|
2291
|
+
forEachEntry: Dn,
|
|
2292
|
+
matchAll: In,
|
|
2293
|
+
isHTMLForm: Nn,
|
|
2294
|
+
hasOwnProperty: De,
|
|
2295
|
+
hasOwnProp: De,
|
|
2266
2296
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2267
|
-
reduceDescriptors:
|
|
2268
|
-
freezeMethods:
|
|
2269
|
-
toObjectSet:
|
|
2270
|
-
toCamelCase:
|
|
2271
|
-
noop:
|
|
2272
|
-
toFiniteNumber:
|
|
2273
|
-
findKey:
|
|
2297
|
+
reduceDescriptors: ei,
|
|
2298
|
+
freezeMethods: Vn,
|
|
2299
|
+
toObjectSet: Un,
|
|
2300
|
+
toCamelCase: Bn,
|
|
2301
|
+
noop: Ln,
|
|
2302
|
+
toFiniteNumber: Mn,
|
|
2303
|
+
findKey: Ye,
|
|
2274
2304
|
global: it,
|
|
2275
|
-
isContextDefined:
|
|
2276
|
-
isSpecCompliantForm:
|
|
2277
|
-
toJSONObject:
|
|
2278
|
-
isAsyncFn:
|
|
2279
|
-
isThenable:
|
|
2280
|
-
setImmediate:
|
|
2281
|
-
asap:
|
|
2282
|
-
isIterable:
|
|
2305
|
+
isContextDefined: ti,
|
|
2306
|
+
isSpecCompliantForm: Fn,
|
|
2307
|
+
toJSONObject: kn,
|
|
2308
|
+
isAsyncFn: jn,
|
|
2309
|
+
isThenable: qn,
|
|
2310
|
+
setImmediate: ii,
|
|
2311
|
+
asap: Kn,
|
|
2312
|
+
isIterable: Hn
|
|
2283
2313
|
};
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2314
|
+
let b = class ni extends Error {
|
|
2315
|
+
static from(t, e, i, r, s, a) {
|
|
2316
|
+
const o = new ni(t.message, e || t.code, i, r, s);
|
|
2317
|
+
return o.cause = t, o.name = t.name, t.status != null && o.status == null && (o.status = t.status), a && Object.assign(o, a), o;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
2321
|
+
*
|
|
2322
|
+
* @param {string} message The error message.
|
|
2323
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
2324
|
+
* @param {Object} [config] The config.
|
|
2325
|
+
* @param {Object} [request] The request.
|
|
2326
|
+
* @param {Object} [response] The response.
|
|
2327
|
+
*
|
|
2328
|
+
* @returns {Error} The created error.
|
|
2329
|
+
*/
|
|
2330
|
+
constructor(t, e, i, r, s) {
|
|
2331
|
+
super(t), Object.defineProperty(this, "message", {
|
|
2332
|
+
value: t,
|
|
2333
|
+
enumerable: !0,
|
|
2334
|
+
writable: !0,
|
|
2335
|
+
configurable: !0
|
|
2336
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, e && (this.code = e), i && (this.config = i), r && (this.request = r), s && (this.response = s, this.status = s.status);
|
|
2337
|
+
}
|
|
2338
|
+
toJSON() {
|
|
2289
2339
|
return {
|
|
2290
2340
|
// Standard
|
|
2291
2341
|
message: this.message,
|
|
@@ -2304,109 +2354,94 @@ l.inherits(v, Error, {
|
|
|
2304
2354
|
status: this.status
|
|
2305
2355
|
};
|
|
2306
2356
|
}
|
|
2307
|
-
});
|
|
2308
|
-
const ti = v.prototype, ei = {};
|
|
2309
|
-
[
|
|
2310
|
-
"ERR_BAD_OPTION_VALUE",
|
|
2311
|
-
"ERR_BAD_OPTION",
|
|
2312
|
-
"ECONNABORTED",
|
|
2313
|
-
"ETIMEDOUT",
|
|
2314
|
-
"ERR_NETWORK",
|
|
2315
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
2316
|
-
"ERR_DEPRECATED",
|
|
2317
|
-
"ERR_BAD_RESPONSE",
|
|
2318
|
-
"ERR_BAD_REQUEST",
|
|
2319
|
-
"ERR_CANCELED",
|
|
2320
|
-
"ERR_NOT_SUPPORT",
|
|
2321
|
-
"ERR_INVALID_URL"
|
|
2322
|
-
// eslint-disable-next-line func-names
|
|
2323
|
-
].forEach((n) => {
|
|
2324
|
-
ei[n] = { value: n };
|
|
2325
|
-
});
|
|
2326
|
-
Object.defineProperties(v, ei);
|
|
2327
|
-
Object.defineProperty(ti, "isAxiosError", { value: !0 });
|
|
2328
|
-
v.from = (n, t, e, i, r, s) => {
|
|
2329
|
-
const a = Object.create(ti);
|
|
2330
|
-
l.toFlatObject(n, a, function(u) {
|
|
2331
|
-
return u !== Error.prototype;
|
|
2332
|
-
}, (h) => h !== "isAxiosError");
|
|
2333
|
-
const o = n && n.message ? n.message : "Error", c = t == null && n ? n.code : t;
|
|
2334
|
-
return v.call(a, o, c, e, i, r), n && a.cause == null && Object.defineProperty(a, "cause", { value: n, configurable: !0 }), a.name = n && n.name || "Error", s && Object.assign(a, s), a;
|
|
2335
2357
|
};
|
|
2336
|
-
|
|
2337
|
-
|
|
2358
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2359
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2360
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
2361
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
2362
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
2363
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2364
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2365
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2366
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2367
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
2368
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2369
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2370
|
+
const Wn = null;
|
|
2371
|
+
function te(n) {
|
|
2338
2372
|
return l.isPlainObject(n) || l.isArray(n);
|
|
2339
2373
|
}
|
|
2340
|
-
function
|
|
2374
|
+
function ri(n) {
|
|
2341
2375
|
return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
2342
2376
|
}
|
|
2343
|
-
function
|
|
2377
|
+
function zt(n, t, e) {
|
|
2344
2378
|
return n ? n.concat(t).map(function(r, s) {
|
|
2345
|
-
return r =
|
|
2379
|
+
return r = ri(r), !e && s ? "[" + r + "]" : r;
|
|
2346
2380
|
}).join(e ? "." : "") : t;
|
|
2347
2381
|
}
|
|
2348
|
-
function
|
|
2349
|
-
return l.isArray(n) && !n.some(
|
|
2382
|
+
function Xn(n) {
|
|
2383
|
+
return l.isArray(n) && !n.some(te);
|
|
2350
2384
|
}
|
|
2351
|
-
const
|
|
2385
|
+
const zn = l.toFlatObject(l, {}, null, function(t) {
|
|
2352
2386
|
return /^is[A-Z]/.test(t);
|
|
2353
2387
|
});
|
|
2354
2388
|
function jt(n, t, e) {
|
|
2355
2389
|
if (!l.isObject(n))
|
|
2356
2390
|
throw new TypeError("target must be an object");
|
|
2357
|
-
t = t || new FormData(), e = l.toFlatObject(
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2391
|
+
t = t || new FormData(), e = l.toFlatObject(
|
|
2392
|
+
e,
|
|
2393
|
+
{
|
|
2394
|
+
metaTokens: !0,
|
|
2395
|
+
dots: !1,
|
|
2396
|
+
indexes: !1
|
|
2397
|
+
},
|
|
2398
|
+
!1,
|
|
2399
|
+
function(m, g) {
|
|
2400
|
+
return !l.isUndefined(g[m]);
|
|
2401
|
+
}
|
|
2402
|
+
);
|
|
2364
2403
|
const i = e.metaTokens, r = e.visitor || u, s = e.dots, a = e.indexes, c = (e.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
|
|
2365
2404
|
if (!l.isFunction(r))
|
|
2366
2405
|
throw new TypeError("visitor must be a function");
|
|
2367
|
-
function h(
|
|
2368
|
-
if (
|
|
2369
|
-
if (l.isDate(
|
|
2370
|
-
return
|
|
2371
|
-
if (l.isBoolean(
|
|
2372
|
-
return
|
|
2373
|
-
if (!c && l.isBlob(
|
|
2374
|
-
throw new
|
|
2375
|
-
return l.isArrayBuffer(
|
|
2376
|
-
}
|
|
2377
|
-
function u(
|
|
2378
|
-
let w =
|
|
2379
|
-
if (
|
|
2406
|
+
function h(p) {
|
|
2407
|
+
if (p === null) return "";
|
|
2408
|
+
if (l.isDate(p))
|
|
2409
|
+
return p.toISOString();
|
|
2410
|
+
if (l.isBoolean(p))
|
|
2411
|
+
return p.toString();
|
|
2412
|
+
if (!c && l.isBlob(p))
|
|
2413
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
2414
|
+
return l.isArrayBuffer(p) || l.isTypedArray(p) ? c && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
2415
|
+
}
|
|
2416
|
+
function u(p, m, g) {
|
|
2417
|
+
let w = p;
|
|
2418
|
+
if (l.isReactNative(t) && l.isReactNativeBlob(p))
|
|
2419
|
+
return t.append(zt(g, m, s), h(p)), !1;
|
|
2420
|
+
if (p && !g && typeof p == "object") {
|
|
2380
2421
|
if (l.endsWith(m, "{}"))
|
|
2381
|
-
m = i ? m : m.slice(0, -2),
|
|
2382
|
-
else if (l.isArray(
|
|
2383
|
-
return m =
|
|
2422
|
+
m = i ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
2423
|
+
else if (l.isArray(p) && Xn(p) || (l.isFileList(p) || l.endsWith(m, "[]")) && (w = l.toArray(p)))
|
|
2424
|
+
return m = ri(m), w.forEach(function(T, O) {
|
|
2384
2425
|
!(l.isUndefined(T) || T === null) && t.append(
|
|
2385
2426
|
// eslint-disable-next-line no-nested-ternary
|
|
2386
|
-
a === !0 ?
|
|
2427
|
+
a === !0 ? zt([m], O, s) : a === null ? m : m + "[]",
|
|
2387
2428
|
h(T)
|
|
2388
2429
|
);
|
|
2389
2430
|
}), !1;
|
|
2390
2431
|
}
|
|
2391
|
-
return
|
|
2432
|
+
return te(p) ? !0 : (t.append(zt(g, m, s), h(p)), !1);
|
|
2392
2433
|
}
|
|
2393
|
-
const f = [], _ = Object.assign(
|
|
2434
|
+
const f = [], _ = Object.assign(zn, {
|
|
2394
2435
|
defaultVisitor: u,
|
|
2395
2436
|
convertValue: h,
|
|
2396
|
-
isVisitable:
|
|
2437
|
+
isVisitable: te
|
|
2397
2438
|
});
|
|
2398
|
-
function y(
|
|
2399
|
-
if (!l.isUndefined(
|
|
2400
|
-
if (f.indexOf(
|
|
2439
|
+
function y(p, m) {
|
|
2440
|
+
if (!l.isUndefined(p)) {
|
|
2441
|
+
if (f.indexOf(p) !== -1)
|
|
2401
2442
|
throw Error("Circular reference detected in " + m.join("."));
|
|
2402
|
-
f.push(
|
|
2403
|
-
(!(l.isUndefined(w) || w === null) && r.call(
|
|
2404
|
-
t,
|
|
2405
|
-
w,
|
|
2406
|
-
l.isString(A) ? A.trim() : A,
|
|
2407
|
-
m,
|
|
2408
|
-
_
|
|
2409
|
-
)) === !0 && y(w, m ? m.concat(A) : [A]);
|
|
2443
|
+
f.push(p), l.forEach(p, function(w, A) {
|
|
2444
|
+
(!(l.isUndefined(w) || w === null) && r.call(t, w, l.isString(A) ? A.trim() : A, m, _)) === !0 && y(w, m ? m.concat(A) : [A]);
|
|
2410
2445
|
}), f.pop();
|
|
2411
2446
|
}
|
|
2412
2447
|
}
|
|
@@ -2414,7 +2449,7 @@ function jt(n, t, e) {
|
|
|
2414
2449
|
throw new TypeError("data must be an object");
|
|
2415
2450
|
return y(n), t;
|
|
2416
2451
|
}
|
|
2417
|
-
function
|
|
2452
|
+
function Ie(n) {
|
|
2418
2453
|
const t = {
|
|
2419
2454
|
"!": "%21",
|
|
2420
2455
|
"'": "%27",
|
|
@@ -2428,40 +2463,38 @@ function Re(n) {
|
|
|
2428
2463
|
return t[i];
|
|
2429
2464
|
});
|
|
2430
2465
|
}
|
|
2431
|
-
function
|
|
2466
|
+
function se(n, t) {
|
|
2432
2467
|
this._pairs = [], n && jt(n, this, t);
|
|
2433
2468
|
}
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2469
|
+
const si = se.prototype;
|
|
2470
|
+
si.append = function(t, e) {
|
|
2436
2471
|
this._pairs.push([t, e]);
|
|
2437
2472
|
};
|
|
2438
|
-
|
|
2473
|
+
si.toString = function(t) {
|
|
2439
2474
|
const e = t ? function(i) {
|
|
2440
|
-
return t.call(this, i,
|
|
2441
|
-
} :
|
|
2475
|
+
return t.call(this, i, Ie);
|
|
2476
|
+
} : Ie;
|
|
2442
2477
|
return this._pairs.map(function(r) {
|
|
2443
2478
|
return e(r[0]) + "=" + e(r[1]);
|
|
2444
2479
|
}, "").join("&");
|
|
2445
2480
|
};
|
|
2446
|
-
function
|
|
2481
|
+
function Gn(n) {
|
|
2447
2482
|
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
2448
2483
|
}
|
|
2449
|
-
function
|
|
2484
|
+
function ai(n, t, e) {
|
|
2450
2485
|
if (!t)
|
|
2451
2486
|
return n;
|
|
2452
|
-
const i = e && e.encode ||
|
|
2453
|
-
l.isFunction(e) && (e = {
|
|
2487
|
+
const i = e && e.encode || Gn, r = l.isFunction(e) ? {
|
|
2454
2488
|
serialize: e
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
a !== -1 && (n = n.slice(0, a)), n += (n.indexOf("?") === -1 ? "?" : "&") + s;
|
|
2489
|
+
} : e, s = r && r.serialize;
|
|
2490
|
+
let a;
|
|
2491
|
+
if (s ? a = s(t, r) : a = l.isURLSearchParams(t) ? t.toString() : new se(t, r).toString(i), a) {
|
|
2492
|
+
const o = n.indexOf("#");
|
|
2493
|
+
o !== -1 && (n = n.slice(0, o)), n += (n.indexOf("?") === -1 ? "?" : "&") + a;
|
|
2461
2494
|
}
|
|
2462
2495
|
return n;
|
|
2463
2496
|
}
|
|
2464
|
-
class
|
|
2497
|
+
class Ne {
|
|
2465
2498
|
constructor() {
|
|
2466
2499
|
this.handlers = [];
|
|
2467
2500
|
}
|
|
@@ -2470,6 +2503,7 @@ class Oe {
|
|
|
2470
2503
|
*
|
|
2471
2504
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
2472
2505
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
2506
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
2473
2507
|
*
|
|
2474
2508
|
* @return {Number} An ID used to remove interceptor later
|
|
2475
2509
|
*/
|
|
@@ -2515,42 +2549,43 @@ class Oe {
|
|
|
2515
2549
|
});
|
|
2516
2550
|
}
|
|
2517
2551
|
}
|
|
2518
|
-
const
|
|
2552
|
+
const ae = {
|
|
2519
2553
|
silentJSONParsing: !0,
|
|
2520
2554
|
forcedJSONParsing: !0,
|
|
2521
|
-
clarifyTimeoutError: !1
|
|
2522
|
-
|
|
2555
|
+
clarifyTimeoutError: !1,
|
|
2556
|
+
legacyInterceptorReqResOrdering: !0
|
|
2557
|
+
}, $n = typeof URLSearchParams < "u" ? URLSearchParams : se, Jn = typeof FormData < "u" ? FormData : null, Qn = typeof Blob < "u" ? Blob : null, Zn = {
|
|
2523
2558
|
isBrowser: !0,
|
|
2524
2559
|
classes: {
|
|
2525
|
-
URLSearchParams:
|
|
2526
|
-
FormData:
|
|
2527
|
-
Blob:
|
|
2560
|
+
URLSearchParams: $n,
|
|
2561
|
+
FormData: Jn,
|
|
2562
|
+
Blob: Qn
|
|
2528
2563
|
},
|
|
2529
2564
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2530
|
-
},
|
|
2531
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
2565
|
+
}, oe = typeof window < "u" && typeof document < "u", ee = typeof navigator == "object" && navigator || void 0, Yn = oe && (!ee || ["ReactNative", "NativeScript", "NS"].indexOf(ee.product) < 0), tr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2566
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", er = oe && window.location.href || "http://localhost", ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2532
2567
|
__proto__: null,
|
|
2533
|
-
hasBrowserEnv:
|
|
2534
|
-
hasStandardBrowserEnv:
|
|
2535
|
-
hasStandardBrowserWebWorkerEnv:
|
|
2536
|
-
navigator:
|
|
2537
|
-
origin:
|
|
2538
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2539
|
-
...
|
|
2540
|
-
...
|
|
2568
|
+
hasBrowserEnv: oe,
|
|
2569
|
+
hasStandardBrowserEnv: Yn,
|
|
2570
|
+
hasStandardBrowserWebWorkerEnv: tr,
|
|
2571
|
+
navigator: ee,
|
|
2572
|
+
origin: er
|
|
2573
|
+
}, Symbol.toStringTag, { value: "Module" })), N = {
|
|
2574
|
+
...ir,
|
|
2575
|
+
...Zn
|
|
2541
2576
|
};
|
|
2542
|
-
function
|
|
2543
|
-
return jt(n, new
|
|
2577
|
+
function nr(n, t) {
|
|
2578
|
+
return jt(n, new N.classes.URLSearchParams(), {
|
|
2544
2579
|
visitor: function(e, i, r, s) {
|
|
2545
|
-
return
|
|
2580
|
+
return N.isNode && l.isBuffer(e) ? (this.append(i, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
2546
2581
|
},
|
|
2547
2582
|
...t
|
|
2548
2583
|
});
|
|
2549
2584
|
}
|
|
2550
|
-
function
|
|
2585
|
+
function rr(n) {
|
|
2551
2586
|
return l.matchAll(/\w+|\[(\w*)]/g, n).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
2552
2587
|
}
|
|
2553
|
-
function
|
|
2588
|
+
function sr(n) {
|
|
2554
2589
|
const t = {}, e = Object.keys(n);
|
|
2555
2590
|
let i;
|
|
2556
2591
|
const r = e.length;
|
|
@@ -2559,22 +2594,22 @@ function er(n) {
|
|
|
2559
2594
|
s = e[i], t[s] = n[s];
|
|
2560
2595
|
return t;
|
|
2561
2596
|
}
|
|
2562
|
-
function
|
|
2597
|
+
function oi(n) {
|
|
2563
2598
|
function t(e, i, r, s) {
|
|
2564
2599
|
let a = e[s++];
|
|
2565
2600
|
if (a === "__proto__") return !0;
|
|
2566
2601
|
const o = Number.isFinite(+a), c = s >= e.length;
|
|
2567
|
-
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] =
|
|
2602
|
+
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] = sr(r[a])), !o);
|
|
2568
2603
|
}
|
|
2569
2604
|
if (l.isFormData(n) && l.isFunction(n.entries)) {
|
|
2570
2605
|
const e = {};
|
|
2571
2606
|
return l.forEachEntry(n, (i, r) => {
|
|
2572
|
-
t(
|
|
2607
|
+
t(rr(i), r, e, 0);
|
|
2573
2608
|
}), e;
|
|
2574
2609
|
}
|
|
2575
2610
|
return null;
|
|
2576
2611
|
}
|
|
2577
|
-
function
|
|
2612
|
+
function ar(n, t, e) {
|
|
2578
2613
|
if (l.isString(n))
|
|
2579
2614
|
try {
|
|
2580
2615
|
return (t || JSON.parse)(n), l.trim(n);
|
|
@@ -2584,49 +2619,53 @@ function ir(n, t, e) {
|
|
|
2584
2619
|
}
|
|
2585
2620
|
return (e || JSON.stringify)(n);
|
|
2586
2621
|
}
|
|
2587
|
-
const
|
|
2588
|
-
transitional:
|
|
2622
|
+
const vt = {
|
|
2623
|
+
transitional: ae,
|
|
2589
2624
|
adapter: ["xhr", "http", "fetch"],
|
|
2590
|
-
transformRequest: [
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
if (
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2625
|
+
transformRequest: [
|
|
2626
|
+
function(t, e) {
|
|
2627
|
+
const i = e.getContentType() || "", r = i.indexOf("application/json") > -1, s = l.isObject(t);
|
|
2628
|
+
if (s && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
|
|
2629
|
+
return r ? JSON.stringify(oi(t)) : t;
|
|
2630
|
+
if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
|
|
2631
|
+
return t;
|
|
2632
|
+
if (l.isArrayBufferView(t))
|
|
2633
|
+
return t.buffer;
|
|
2634
|
+
if (l.isURLSearchParams(t))
|
|
2635
|
+
return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
2636
|
+
let o;
|
|
2637
|
+
if (s) {
|
|
2638
|
+
if (i.indexOf("application/x-www-form-urlencoded") > -1)
|
|
2639
|
+
return nr(t, this.formSerializer).toString();
|
|
2640
|
+
if ((o = l.isFileList(t)) || i.indexOf("multipart/form-data") > -1) {
|
|
2641
|
+
const c = this.env && this.env.FormData;
|
|
2642
|
+
return jt(
|
|
2643
|
+
o ? { "files[]": t } : t,
|
|
2644
|
+
c && new c(),
|
|
2645
|
+
this.formSerializer
|
|
2646
|
+
);
|
|
2647
|
+
}
|
|
2611
2648
|
}
|
|
2649
|
+
return s || r ? (e.setContentType("application/json", !1), ar(t)) : t;
|
|
2612
2650
|
}
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2651
|
+
],
|
|
2652
|
+
transformResponse: [
|
|
2653
|
+
function(t) {
|
|
2654
|
+
const e = this.transitional || vt.transitional, i = e && e.forcedJSONParsing, r = this.responseType === "json";
|
|
2655
|
+
if (l.isResponse(t) || l.isReadableStream(t))
|
|
2656
|
+
return t;
|
|
2657
|
+
if (t && l.isString(t) && (i && !this.responseType || r)) {
|
|
2658
|
+
const a = !(e && e.silentJSONParsing) && r;
|
|
2659
|
+
try {
|
|
2660
|
+
return JSON.parse(t, this.parseReviver);
|
|
2661
|
+
} catch (o) {
|
|
2662
|
+
if (a)
|
|
2663
|
+
throw o.name === "SyntaxError" ? b.from(o, b.ERR_BAD_RESPONSE, this, null, this.response) : o;
|
|
2664
|
+
}
|
|
2626
2665
|
}
|
|
2666
|
+
return t;
|
|
2627
2667
|
}
|
|
2628
|
-
|
|
2629
|
-
}],
|
|
2668
|
+
],
|
|
2630
2669
|
/**
|
|
2631
2670
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
2632
2671
|
* timeout is not created.
|
|
@@ -2637,8 +2676,8 @@ const Et = {
|
|
|
2637
2676
|
maxContentLength: -1,
|
|
2638
2677
|
maxBodyLength: -1,
|
|
2639
2678
|
env: {
|
|
2640
|
-
FormData:
|
|
2641
|
-
Blob:
|
|
2679
|
+
FormData: N.classes.FormData,
|
|
2680
|
+
Blob: N.classes.Blob
|
|
2642
2681
|
},
|
|
2643
2682
|
validateStatus: function(t) {
|
|
2644
2683
|
return t >= 200 && t < 300;
|
|
@@ -2651,9 +2690,9 @@ const Et = {
|
|
|
2651
2690
|
}
|
|
2652
2691
|
};
|
|
2653
2692
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
|
|
2654
|
-
|
|
2693
|
+
vt.headers[n] = {};
|
|
2655
2694
|
});
|
|
2656
|
-
const
|
|
2695
|
+
const or = l.toObjectSet([
|
|
2657
2696
|
"age",
|
|
2658
2697
|
"authorization",
|
|
2659
2698
|
"content-length",
|
|
@@ -2671,29 +2710,29 @@ const nr = l.toObjectSet([
|
|
|
2671
2710
|
"referer",
|
|
2672
2711
|
"retry-after",
|
|
2673
2712
|
"user-agent"
|
|
2674
|
-
]),
|
|
2713
|
+
]), cr = (n) => {
|
|
2675
2714
|
const t = {};
|
|
2676
2715
|
let e, i, r;
|
|
2677
2716
|
return n && n.split(`
|
|
2678
2717
|
`).forEach(function(a) {
|
|
2679
|
-
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), i = a.substring(r + 1).trim(), !(!e || t[e] &&
|
|
2718
|
+
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), i = a.substring(r + 1).trim(), !(!e || t[e] && or[e]) && (e === "set-cookie" ? t[e] ? t[e].push(i) : t[e] = [i] : t[e] = t[e] ? t[e] + ", " + i : i);
|
|
2680
2719
|
}), t;
|
|
2681
|
-
},
|
|
2682
|
-
function
|
|
2720
|
+
}, Be = /* @__PURE__ */ Symbol("internals");
|
|
2721
|
+
function _t(n) {
|
|
2683
2722
|
return n && String(n).trim().toLowerCase();
|
|
2684
2723
|
}
|
|
2685
|
-
function
|
|
2686
|
-
return n === !1 || n == null ? n : l.isArray(n) ? n.map(
|
|
2724
|
+
function Bt(n) {
|
|
2725
|
+
return n === !1 || n == null ? n : l.isArray(n) ? n.map(Bt) : String(n);
|
|
2687
2726
|
}
|
|
2688
|
-
function
|
|
2727
|
+
function ur(n) {
|
|
2689
2728
|
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2690
2729
|
let i;
|
|
2691
2730
|
for (; i = e.exec(n); )
|
|
2692
2731
|
t[i[1]] = i[2];
|
|
2693
2732
|
return t;
|
|
2694
2733
|
}
|
|
2695
|
-
const
|
|
2696
|
-
function
|
|
2734
|
+
const hr = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
2735
|
+
function Gt(n, t, e, i, r) {
|
|
2697
2736
|
if (l.isFunction(i))
|
|
2698
2737
|
return i.call(this, t, e);
|
|
2699
2738
|
if (r && (t = e), !!l.isString(t)) {
|
|
@@ -2703,10 +2742,10 @@ function zt(n, t, e, i, r) {
|
|
|
2703
2742
|
return i.test(t);
|
|
2704
2743
|
}
|
|
2705
2744
|
}
|
|
2706
|
-
function
|
|
2745
|
+
function lr(n) {
|
|
2707
2746
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, i) => e.toUpperCase() + i);
|
|
2708
2747
|
}
|
|
2709
|
-
function
|
|
2748
|
+
function fr(n, t) {
|
|
2710
2749
|
const e = l.toCamelCase(" " + t);
|
|
2711
2750
|
["get", "set", "has"].forEach((i) => {
|
|
2712
2751
|
Object.defineProperty(n, i + e, {
|
|
@@ -2717,24 +2756,24 @@ function cr(n, t) {
|
|
|
2717
2756
|
});
|
|
2718
2757
|
});
|
|
2719
2758
|
}
|
|
2720
|
-
let
|
|
2759
|
+
let M = class {
|
|
2721
2760
|
constructor(t) {
|
|
2722
2761
|
t && this.set(t);
|
|
2723
2762
|
}
|
|
2724
2763
|
set(t, e, i) {
|
|
2725
2764
|
const r = this;
|
|
2726
2765
|
function s(o, c, h) {
|
|
2727
|
-
const u =
|
|
2766
|
+
const u = _t(c);
|
|
2728
2767
|
if (!u)
|
|
2729
2768
|
throw new Error("header name must be a non-empty string");
|
|
2730
2769
|
const f = l.findKey(r, u);
|
|
2731
|
-
(!f || r[f] === void 0 || h === !0 || h === void 0 && r[f] !== !1) && (r[f || c] =
|
|
2770
|
+
(!f || r[f] === void 0 || h === !0 || h === void 0 && r[f] !== !1) && (r[f || c] = Bt(o));
|
|
2732
2771
|
}
|
|
2733
2772
|
const a = (o, c) => l.forEach(o, (h, u) => s(h, u, c));
|
|
2734
2773
|
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
2735
2774
|
a(t, e);
|
|
2736
|
-
else if (l.isString(t) && (t = t.trim()) && !
|
|
2737
|
-
a(
|
|
2775
|
+
else if (l.isString(t) && (t = t.trim()) && !hr(t))
|
|
2776
|
+
a(cr(t), e);
|
|
2738
2777
|
else if (l.isObject(t) && l.isIterable(t)) {
|
|
2739
2778
|
let o = {}, c, h;
|
|
2740
2779
|
for (const u of t) {
|
|
@@ -2748,14 +2787,14 @@ let L = class {
|
|
|
2748
2787
|
return this;
|
|
2749
2788
|
}
|
|
2750
2789
|
get(t, e) {
|
|
2751
|
-
if (t =
|
|
2790
|
+
if (t = _t(t), t) {
|
|
2752
2791
|
const i = l.findKey(this, t);
|
|
2753
2792
|
if (i) {
|
|
2754
2793
|
const r = this[i];
|
|
2755
2794
|
if (!e)
|
|
2756
2795
|
return r;
|
|
2757
2796
|
if (e === !0)
|
|
2758
|
-
return
|
|
2797
|
+
return ur(r);
|
|
2759
2798
|
if (l.isFunction(e))
|
|
2760
2799
|
return e.call(this, r, i);
|
|
2761
2800
|
if (l.isRegExp(e))
|
|
@@ -2765,9 +2804,9 @@ let L = class {
|
|
|
2765
2804
|
}
|
|
2766
2805
|
}
|
|
2767
2806
|
has(t, e) {
|
|
2768
|
-
if (t =
|
|
2807
|
+
if (t = _t(t), t) {
|
|
2769
2808
|
const i = l.findKey(this, t);
|
|
2770
|
-
return !!(i && this[i] !== void 0 && (!e ||
|
|
2809
|
+
return !!(i && this[i] !== void 0 && (!e || Gt(this, this[i], i, e)));
|
|
2771
2810
|
}
|
|
2772
2811
|
return !1;
|
|
2773
2812
|
}
|
|
@@ -2775,9 +2814,9 @@ let L = class {
|
|
|
2775
2814
|
const i = this;
|
|
2776
2815
|
let r = !1;
|
|
2777
2816
|
function s(a) {
|
|
2778
|
-
if (a =
|
|
2817
|
+
if (a = _t(a), a) {
|
|
2779
2818
|
const o = l.findKey(i, a);
|
|
2780
|
-
o && (!e ||
|
|
2819
|
+
o && (!e || Gt(i, i[o], o, e)) && (delete i[o], r = !0);
|
|
2781
2820
|
}
|
|
2782
2821
|
}
|
|
2783
2822
|
return l.isArray(t) ? t.forEach(s) : s(t), r;
|
|
@@ -2787,7 +2826,7 @@ let L = class {
|
|
|
2787
2826
|
let i = e.length, r = !1;
|
|
2788
2827
|
for (; i--; ) {
|
|
2789
2828
|
const s = e[i];
|
|
2790
|
-
(!t ||
|
|
2829
|
+
(!t || Gt(this, this[s], s, t, !0)) && (delete this[s], r = !0);
|
|
2791
2830
|
}
|
|
2792
2831
|
return r;
|
|
2793
2832
|
}
|
|
@@ -2796,11 +2835,11 @@ let L = class {
|
|
|
2796
2835
|
return l.forEach(this, (r, s) => {
|
|
2797
2836
|
const a = l.findKey(i, s);
|
|
2798
2837
|
if (a) {
|
|
2799
|
-
e[a] =
|
|
2838
|
+
e[a] = Bt(r), delete e[s];
|
|
2800
2839
|
return;
|
|
2801
2840
|
}
|
|
2802
|
-
const o = t ?
|
|
2803
|
-
o !== s && delete e[s], e[o] =
|
|
2841
|
+
const o = t ? lr(s) : String(s).trim();
|
|
2842
|
+
o !== s && delete e[s], e[o] = Bt(r), i[o] = !0;
|
|
2804
2843
|
}), this;
|
|
2805
2844
|
}
|
|
2806
2845
|
concat(...t) {
|
|
@@ -2833,18 +2872,25 @@ let L = class {
|
|
|
2833
2872
|
return e.forEach((r) => i.set(r)), i;
|
|
2834
2873
|
}
|
|
2835
2874
|
static accessor(t) {
|
|
2836
|
-
const i = (this[
|
|
2875
|
+
const i = (this[Be] = this[Be] = {
|
|
2837
2876
|
accessors: {}
|
|
2838
2877
|
}).accessors, r = this.prototype;
|
|
2839
2878
|
function s(a) {
|
|
2840
|
-
const o =
|
|
2841
|
-
i[o] || (
|
|
2879
|
+
const o = _t(a);
|
|
2880
|
+
i[o] || (fr(r, a), i[o] = !0);
|
|
2842
2881
|
}
|
|
2843
2882
|
return l.isArray(t) ? t.forEach(s) : s(t), this;
|
|
2844
2883
|
}
|
|
2845
2884
|
};
|
|
2846
|
-
|
|
2847
|
-
|
|
2885
|
+
M.accessor([
|
|
2886
|
+
"Content-Type",
|
|
2887
|
+
"Content-Length",
|
|
2888
|
+
"Accept",
|
|
2889
|
+
"Accept-Encoding",
|
|
2890
|
+
"User-Agent",
|
|
2891
|
+
"Authorization"
|
|
2892
|
+
]);
|
|
2893
|
+
l.reduceDescriptors(M.prototype, ({ value: n }, t) => {
|
|
2848
2894
|
let e = t[0].toUpperCase() + t.slice(1);
|
|
2849
2895
|
return {
|
|
2850
2896
|
get: () => n,
|
|
@@ -2853,38 +2899,48 @@ l.reduceDescriptors(L.prototype, ({ value: n }, t) => {
|
|
|
2853
2899
|
}
|
|
2854
2900
|
};
|
|
2855
2901
|
});
|
|
2856
|
-
l.freezeMethods(
|
|
2857
|
-
function
|
|
2858
|
-
const e = this ||
|
|
2902
|
+
l.freezeMethods(M);
|
|
2903
|
+
function $t(n, t) {
|
|
2904
|
+
const e = this || vt, i = t || e, r = M.from(i.headers);
|
|
2859
2905
|
let s = i.data;
|
|
2860
2906
|
return l.forEach(n, function(o) {
|
|
2861
2907
|
s = o.call(e, s, r.normalize(), t ? t.status : void 0);
|
|
2862
2908
|
}), r.normalize(), s;
|
|
2863
2909
|
}
|
|
2864
|
-
function
|
|
2910
|
+
function ci(n) {
|
|
2865
2911
|
return !!(n && n.__CANCEL__);
|
|
2866
2912
|
}
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
}
|
|
2873
|
-
|
|
2913
|
+
let Et = class extends b {
|
|
2914
|
+
/**
|
|
2915
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
2916
|
+
*
|
|
2917
|
+
* @param {string=} message The message.
|
|
2918
|
+
* @param {Object=} config The config.
|
|
2919
|
+
* @param {Object=} request The request.
|
|
2920
|
+
*
|
|
2921
|
+
* @returns {CanceledError} The created error.
|
|
2922
|
+
*/
|
|
2923
|
+
constructor(t, e, i) {
|
|
2924
|
+
super(t ?? "canceled", b.ERR_CANCELED, e, i), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
2925
|
+
}
|
|
2926
|
+
};
|
|
2927
|
+
function ui(n, t, e) {
|
|
2874
2928
|
const i = e.config.validateStatus;
|
|
2875
|
-
!e.status || !i || i(e.status) ? n(e) : t(
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2929
|
+
!e.status || !i || i(e.status) ? n(e) : t(
|
|
2930
|
+
new b(
|
|
2931
|
+
"Request failed with status code " + e.status,
|
|
2932
|
+
[b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(e.status / 100) - 4],
|
|
2933
|
+
e.config,
|
|
2934
|
+
e.request,
|
|
2935
|
+
e
|
|
2936
|
+
)
|
|
2937
|
+
);
|
|
2882
2938
|
}
|
|
2883
|
-
function
|
|
2939
|
+
function pr(n) {
|
|
2884
2940
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
|
|
2885
2941
|
return t && t[1] || "";
|
|
2886
2942
|
}
|
|
2887
|
-
function
|
|
2943
|
+
function dr(n, t) {
|
|
2888
2944
|
n = n || 10;
|
|
2889
2945
|
const e = new Array(n), i = new Array(n);
|
|
2890
2946
|
let r = 0, s = 0, a;
|
|
@@ -2900,7 +2956,7 @@ function hr(n, t) {
|
|
|
2900
2956
|
return y ? Math.round(_ * 1e3 / y) : void 0;
|
|
2901
2957
|
};
|
|
2902
2958
|
}
|
|
2903
|
-
function
|
|
2959
|
+
function _r(n, t) {
|
|
2904
2960
|
let e = 0, i = 1e3 / t, r, s;
|
|
2905
2961
|
const a = (h, u = Date.now()) => {
|
|
2906
2962
|
e = u, r = null, s && (clearTimeout(s), s = null), n(...h);
|
|
@@ -2914,8 +2970,8 @@ function lr(n, t) {
|
|
|
2914
2970
|
}
|
|
2915
2971
|
const Ut = (n, t, e = 3) => {
|
|
2916
2972
|
let i = 0;
|
|
2917
|
-
const r =
|
|
2918
|
-
return
|
|
2973
|
+
const r = dr(50, 250);
|
|
2974
|
+
return _r((s) => {
|
|
2919
2975
|
const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = a - i, h = r(c), u = a <= o;
|
|
2920
2976
|
i = a;
|
|
2921
2977
|
const f = {
|
|
@@ -2931,17 +2987,20 @@ const Ut = (n, t, e = 3) => {
|
|
|
2931
2987
|
};
|
|
2932
2988
|
n(f);
|
|
2933
2989
|
}, e);
|
|
2934
|
-
},
|
|
2990
|
+
}, xe = (n, t) => {
|
|
2935
2991
|
const e = n != null;
|
|
2936
|
-
return [
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
)
|
|
2992
|
+
return [
|
|
2993
|
+
(i) => t[0]({
|
|
2994
|
+
lengthComputable: e,
|
|
2995
|
+
total: n,
|
|
2996
|
+
loaded: i
|
|
2997
|
+
}),
|
|
2998
|
+
t[1]
|
|
2999
|
+
];
|
|
3000
|
+
}, Ve = (n) => (...t) => l.asap(() => n(...t)), gr = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, t) => (e) => (e = new URL(e, N.origin), n.protocol === e.protocol && n.host === e.host && (t || n.port === e.port)))(
|
|
3001
|
+
new URL(N.origin),
|
|
3002
|
+
N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
|
|
3003
|
+
) : () => !0, mr = N.hasStandardBrowserEnv ? (
|
|
2945
3004
|
// Standard browser envs support document.cookie
|
|
2946
3005
|
{
|
|
2947
3006
|
write(n, t, e, i, r, s, a) {
|
|
@@ -2970,17 +3029,17 @@ const Ut = (n, t, e = 3) => {
|
|
|
2970
3029
|
}
|
|
2971
3030
|
}
|
|
2972
3031
|
);
|
|
2973
|
-
function
|
|
2974
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
3032
|
+
function yr(n) {
|
|
3033
|
+
return typeof n != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
2975
3034
|
}
|
|
2976
|
-
function
|
|
3035
|
+
function br(n, t) {
|
|
2977
3036
|
return t ? n.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : n;
|
|
2978
3037
|
}
|
|
2979
|
-
function
|
|
2980
|
-
let i = !
|
|
2981
|
-
return n && (i || e == !1) ?
|
|
3038
|
+
function hi(n, t, e) {
|
|
3039
|
+
let i = !yr(t);
|
|
3040
|
+
return n && (i || e == !1) ? br(n, t) : t;
|
|
2982
3041
|
}
|
|
2983
|
-
const
|
|
3042
|
+
const Ue = (n) => n instanceof M ? { ...n } : n;
|
|
2984
3043
|
function rt(n, t) {
|
|
2985
3044
|
t = t || {};
|
|
2986
3045
|
const e = {};
|
|
@@ -3038,21 +3097,28 @@ function rt(n, t) {
|
|
|
3038
3097
|
socketPath: a,
|
|
3039
3098
|
responseEncoding: a,
|
|
3040
3099
|
validateStatus: o,
|
|
3041
|
-
headers: (h, u, f) => r(
|
|
3100
|
+
headers: (h, u, f) => r(Ue(h), Ue(u), f, !0)
|
|
3042
3101
|
};
|
|
3043
3102
|
return l.forEach(Object.keys({ ...n, ...t }), function(u) {
|
|
3044
|
-
|
|
3103
|
+
if (u === "__proto__" || u === "constructor" || u === "prototype") return;
|
|
3104
|
+
const f = l.hasOwnProp(c, u) ? c[u] : r, _ = f(n[u], t[u], u);
|
|
3045
3105
|
l.isUndefined(_) && f !== o || (e[u] = _);
|
|
3046
3106
|
}), e;
|
|
3047
3107
|
}
|
|
3048
|
-
const
|
|
3108
|
+
const li = (n) => {
|
|
3049
3109
|
const t = rt({}, n);
|
|
3050
3110
|
let { data: e, withXSRFToken: i, xsrfHeaderName: r, xsrfCookieName: s, headers: a, auth: o } = t;
|
|
3051
|
-
if (t.headers = a =
|
|
3111
|
+
if (t.headers = a = M.from(a), t.url = ai(
|
|
3112
|
+
hi(t.baseURL, t.url, t.allowAbsoluteUrls),
|
|
3113
|
+
n.params,
|
|
3114
|
+
n.paramsSerializer
|
|
3115
|
+
), o && a.set(
|
|
3052
3116
|
"Authorization",
|
|
3053
|
-
"Basic " + btoa(
|
|
3117
|
+
"Basic " + btoa(
|
|
3118
|
+
(o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : "")
|
|
3119
|
+
)
|
|
3054
3120
|
), l.isFormData(e)) {
|
|
3055
|
-
if (
|
|
3121
|
+
if (N.hasStandardBrowserEnv || N.hasStandardBrowserWebWorkerEnv)
|
|
3056
3122
|
a.setContentType(void 0);
|
|
3057
3123
|
else if (l.isFunction(e.getHeaders)) {
|
|
3058
3124
|
const c = e.getHeaders(), h = ["content-type", "content-length"];
|
|
@@ -3061,26 +3127,26 @@ const hi = (n) => {
|
|
|
3061
3127
|
});
|
|
3062
3128
|
}
|
|
3063
3129
|
}
|
|
3064
|
-
if (
|
|
3065
|
-
const c = r && s &&
|
|
3130
|
+
if (N.hasStandardBrowserEnv && (i && l.isFunction(i) && (i = i(t)), i || i !== !1 && gr(t.url))) {
|
|
3131
|
+
const c = r && s && mr.read(s);
|
|
3066
3132
|
c && a.set(r, c);
|
|
3067
3133
|
}
|
|
3068
3134
|
return t;
|
|
3069
|
-
},
|
|
3135
|
+
}, Pr = typeof XMLHttpRequest < "u", vr = Pr && function(n) {
|
|
3070
3136
|
return new Promise(function(e, i) {
|
|
3071
|
-
const r =
|
|
3137
|
+
const r = li(n);
|
|
3072
3138
|
let s = r.data;
|
|
3073
|
-
const a =
|
|
3074
|
-
let { responseType: o, onUploadProgress: c, onDownloadProgress: h } = r, u, f, _, y,
|
|
3139
|
+
const a = M.from(r.headers).normalize();
|
|
3140
|
+
let { responseType: o, onUploadProgress: c, onDownloadProgress: h } = r, u, f, _, y, p;
|
|
3075
3141
|
function m() {
|
|
3076
|
-
y && y(),
|
|
3142
|
+
y && y(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
|
|
3077
3143
|
}
|
|
3078
3144
|
let g = new XMLHttpRequest();
|
|
3079
3145
|
g.open(r.method.toUpperCase(), r.url, !0), g.timeout = r.timeout;
|
|
3080
3146
|
function w() {
|
|
3081
3147
|
if (!g)
|
|
3082
3148
|
return;
|
|
3083
|
-
const T =
|
|
3149
|
+
const T = M.from(
|
|
3084
3150
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
3085
3151
|
), x = {
|
|
3086
3152
|
data: !o || o === "text" || o === "json" ? g.responseText : g.response,
|
|
@@ -3090,41 +3156,53 @@ const hi = (n) => {
|
|
|
3090
3156
|
config: n,
|
|
3091
3157
|
request: g
|
|
3092
3158
|
};
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3159
|
+
ui(
|
|
3160
|
+
function(D) {
|
|
3161
|
+
e(D), m();
|
|
3162
|
+
},
|
|
3163
|
+
function(D) {
|
|
3164
|
+
i(D), m();
|
|
3165
|
+
},
|
|
3166
|
+
x
|
|
3167
|
+
), g = null;
|
|
3098
3168
|
}
|
|
3099
3169
|
"onloadend" in g ? g.onloadend = w : g.onreadystatechange = function() {
|
|
3100
3170
|
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
3101
3171
|
}, g.onabort = function() {
|
|
3102
|
-
g && (i(new
|
|
3172
|
+
g && (i(new b("Request aborted", b.ECONNABORTED, n, g)), g = null);
|
|
3103
3173
|
}, g.onerror = function(O) {
|
|
3104
|
-
const x = O && O.message ? O.message : "Network Error",
|
|
3105
|
-
|
|
3174
|
+
const x = O && O.message ? O.message : "Network Error", P = new b(x, b.ERR_NETWORK, n, g);
|
|
3175
|
+
P.event = O || null, i(P), g = null;
|
|
3106
3176
|
}, g.ontimeout = function() {
|
|
3107
3177
|
let O = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
3108
|
-
const x = r.transitional ||
|
|
3109
|
-
r.timeoutErrorMessage && (O = r.timeoutErrorMessage), i(
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3178
|
+
const x = r.transitional || ae;
|
|
3179
|
+
r.timeoutErrorMessage && (O = r.timeoutErrorMessage), i(
|
|
3180
|
+
new b(
|
|
3181
|
+
O,
|
|
3182
|
+
x.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
3183
|
+
n,
|
|
3184
|
+
g
|
|
3185
|
+
)
|
|
3186
|
+
), g = null;
|
|
3115
3187
|
}, s === void 0 && a.setContentType(null), "setRequestHeader" in g && l.forEach(a.toJSON(), function(O, x) {
|
|
3116
3188
|
g.setRequestHeader(x, O);
|
|
3117
|
-
}), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), o && o !== "json" && (g.responseType = r.responseType), h && ([_,
|
|
3118
|
-
g && (i(!T || T.type ? new
|
|
3189
|
+
}), l.isUndefined(r.withCredentials) || (g.withCredentials = !!r.withCredentials), o && o !== "json" && (g.responseType = r.responseType), h && ([_, p] = Ut(h, !0), g.addEventListener("progress", _)), c && g.upload && ([f, y] = Ut(c), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", y)), (r.cancelToken || r.signal) && (u = (T) => {
|
|
3190
|
+
g && (i(!T || T.type ? new Et(null, n, g) : T), g.abort(), g = null);
|
|
3119
3191
|
}, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u)));
|
|
3120
|
-
const A =
|
|
3121
|
-
if (A &&
|
|
3122
|
-
i(
|
|
3192
|
+
const A = pr(r.url);
|
|
3193
|
+
if (A && N.protocols.indexOf(A) === -1) {
|
|
3194
|
+
i(
|
|
3195
|
+
new b(
|
|
3196
|
+
"Unsupported protocol " + A + ":",
|
|
3197
|
+
b.ERR_BAD_REQUEST,
|
|
3198
|
+
n
|
|
3199
|
+
)
|
|
3200
|
+
);
|
|
3123
3201
|
return;
|
|
3124
3202
|
}
|
|
3125
3203
|
g.send(s || null);
|
|
3126
3204
|
});
|
|
3127
|
-
},
|
|
3205
|
+
}, Er = (n, t) => {
|
|
3128
3206
|
const { length: e } = n = n ? n.filter(Boolean) : [];
|
|
3129
3207
|
if (t || e) {
|
|
3130
3208
|
let i = new AbortController(), r;
|
|
@@ -3132,11 +3210,13 @@ const hi = (n) => {
|
|
|
3132
3210
|
if (!r) {
|
|
3133
3211
|
r = !0, o();
|
|
3134
3212
|
const u = h instanceof Error ? h : this.reason;
|
|
3135
|
-
i.abort(
|
|
3213
|
+
i.abort(
|
|
3214
|
+
u instanceof b ? u : new Et(u instanceof Error ? u.message : u)
|
|
3215
|
+
);
|
|
3136
3216
|
}
|
|
3137
3217
|
};
|
|
3138
3218
|
let a = t && setTimeout(() => {
|
|
3139
|
-
a = null, s(new
|
|
3219
|
+
a = null, s(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
3140
3220
|
}, t);
|
|
3141
3221
|
const o = () => {
|
|
3142
3222
|
n && (a && clearTimeout(a), a = null, n.forEach((h) => {
|
|
@@ -3147,7 +3227,7 @@ const hi = (n) => {
|
|
|
3147
3227
|
const { signal: c } = i;
|
|
3148
3228
|
return c.unsubscribe = () => l.asap(o), c;
|
|
3149
3229
|
}
|
|
3150
|
-
},
|
|
3230
|
+
}, wr = function* (n, t) {
|
|
3151
3231
|
let e = n.byteLength;
|
|
3152
3232
|
if (e < t) {
|
|
3153
3233
|
yield n;
|
|
@@ -3156,10 +3236,10 @@ const hi = (n) => {
|
|
|
3156
3236
|
let i = 0, r;
|
|
3157
3237
|
for (; i < e; )
|
|
3158
3238
|
r = i + t, yield n.slice(i, r), i = r;
|
|
3159
|
-
},
|
|
3160
|
-
for await (const e of
|
|
3161
|
-
yield*
|
|
3162
|
-
},
|
|
3239
|
+
}, Sr = async function* (n, t) {
|
|
3240
|
+
for await (const e of Tr(n))
|
|
3241
|
+
yield* wr(e, t);
|
|
3242
|
+
}, Tr = async function* (n) {
|
|
3163
3243
|
if (n[Symbol.asyncIterator]) {
|
|
3164
3244
|
yield* n;
|
|
3165
3245
|
return;
|
|
@@ -3175,94 +3255,102 @@ const hi = (n) => {
|
|
|
3175
3255
|
} finally {
|
|
3176
3256
|
await t.cancel();
|
|
3177
3257
|
}
|
|
3178
|
-
},
|
|
3179
|
-
const r =
|
|
3258
|
+
}, Le = (n, t, e, i) => {
|
|
3259
|
+
const r = Sr(n, t);
|
|
3180
3260
|
let s = 0, a, o = (c) => {
|
|
3181
3261
|
a || (a = !0, i && i(c));
|
|
3182
3262
|
};
|
|
3183
|
-
return new ReadableStream(
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3263
|
+
return new ReadableStream(
|
|
3264
|
+
{
|
|
3265
|
+
async pull(c) {
|
|
3266
|
+
try {
|
|
3267
|
+
const { done: h, value: u } = await r.next();
|
|
3268
|
+
if (h) {
|
|
3269
|
+
o(), c.close();
|
|
3270
|
+
return;
|
|
3271
|
+
}
|
|
3272
|
+
let f = u.byteLength;
|
|
3273
|
+
if (e) {
|
|
3274
|
+
let _ = s += f;
|
|
3275
|
+
e(_);
|
|
3276
|
+
}
|
|
3277
|
+
c.enqueue(new Uint8Array(u));
|
|
3278
|
+
} catch (h) {
|
|
3279
|
+
throw o(h), h;
|
|
3195
3280
|
}
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3281
|
+
},
|
|
3282
|
+
cancel(c) {
|
|
3283
|
+
return o(c), r.return();
|
|
3199
3284
|
}
|
|
3200
3285
|
},
|
|
3201
|
-
|
|
3202
|
-
|
|
3286
|
+
{
|
|
3287
|
+
highWaterMark: 2
|
|
3203
3288
|
}
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
});
|
|
3207
|
-
}, Ve = 64 * 1024, { isFunction: Dt } = l, Er = (({ Request: n, Response: t }) => ({
|
|
3289
|
+
);
|
|
3290
|
+
}, Me = 64 * 1024, { isFunction: Dt } = l, Ar = (({ Request: n, Response: t }) => ({
|
|
3208
3291
|
Request: n,
|
|
3209
3292
|
Response: t
|
|
3210
|
-
}))(l.global), {
|
|
3211
|
-
ReadableStream: Ue,
|
|
3212
|
-
TextEncoder: Le
|
|
3213
|
-
} = l.global, Me = (n, ...t) => {
|
|
3293
|
+
}))(l.global), { ReadableStream: Fe, TextEncoder: ke } = l.global, je = (n, ...t) => {
|
|
3214
3294
|
try {
|
|
3215
3295
|
return !!n(...t);
|
|
3216
3296
|
} catch {
|
|
3217
3297
|
return !1;
|
|
3218
3298
|
}
|
|
3219
|
-
},
|
|
3220
|
-
n = l.merge.call(
|
|
3221
|
-
|
|
3222
|
-
|
|
3299
|
+
}, Cr = (n) => {
|
|
3300
|
+
n = l.merge.call(
|
|
3301
|
+
{
|
|
3302
|
+
skipUndefined: !0
|
|
3303
|
+
},
|
|
3304
|
+
Ar,
|
|
3305
|
+
n
|
|
3306
|
+
);
|
|
3223
3307
|
const { fetch: t, Request: e, Response: i } = n, r = t ? Dt(t) : typeof fetch == "function", s = Dt(e), a = Dt(i);
|
|
3224
3308
|
if (!r)
|
|
3225
3309
|
return !1;
|
|
3226
|
-
const o = r && Dt(
|
|
3227
|
-
let
|
|
3228
|
-
const m = new e(
|
|
3229
|
-
body: new
|
|
3310
|
+
const o = r && Dt(Fe), c = r && (typeof ke == "function" ? /* @__PURE__ */ ((p) => (m) => p.encode(m))(new ke()) : async (p) => new Uint8Array(await new e(p).arrayBuffer())), h = s && o && je(() => {
|
|
3311
|
+
let p = !1;
|
|
3312
|
+
const m = new e(N.origin, {
|
|
3313
|
+
body: new Fe(),
|
|
3230
3314
|
method: "POST",
|
|
3231
3315
|
get duplex() {
|
|
3232
|
-
return
|
|
3316
|
+
return p = !0, "half";
|
|
3233
3317
|
}
|
|
3234
3318
|
}).headers.has("Content-Type");
|
|
3235
|
-
return
|
|
3236
|
-
}), u = a && o &&
|
|
3237
|
-
stream: u && ((
|
|
3319
|
+
return p && !m;
|
|
3320
|
+
}), u = a && o && je(() => l.isReadableStream(new i("").body)), f = {
|
|
3321
|
+
stream: u && ((p) => p.body)
|
|
3238
3322
|
};
|
|
3239
|
-
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
3240
|
-
!f[
|
|
3241
|
-
let w = m && m[
|
|
3323
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
3324
|
+
!f[p] && (f[p] = (m, g) => {
|
|
3325
|
+
let w = m && m[p];
|
|
3242
3326
|
if (w)
|
|
3243
3327
|
return w.call(m);
|
|
3244
|
-
throw new
|
|
3328
|
+
throw new b(
|
|
3329
|
+
`Response type '${p}' is not supported`,
|
|
3330
|
+
b.ERR_NOT_SUPPORT,
|
|
3331
|
+
g
|
|
3332
|
+
);
|
|
3245
3333
|
});
|
|
3246
3334
|
});
|
|
3247
|
-
const _ = async (
|
|
3248
|
-
if (
|
|
3335
|
+
const _ = async (p) => {
|
|
3336
|
+
if (p == null)
|
|
3249
3337
|
return 0;
|
|
3250
|
-
if (l.isBlob(
|
|
3251
|
-
return
|
|
3252
|
-
if (l.isSpecCompliantForm(
|
|
3253
|
-
return (await new e(
|
|
3338
|
+
if (l.isBlob(p))
|
|
3339
|
+
return p.size;
|
|
3340
|
+
if (l.isSpecCompliantForm(p))
|
|
3341
|
+
return (await new e(N.origin, {
|
|
3254
3342
|
method: "POST",
|
|
3255
|
-
body:
|
|
3343
|
+
body: p
|
|
3256
3344
|
}).arrayBuffer()).byteLength;
|
|
3257
|
-
if (l.isArrayBufferView(
|
|
3258
|
-
return
|
|
3259
|
-
if (l.isURLSearchParams(
|
|
3260
|
-
return (await c(
|
|
3261
|
-
}, y = async (
|
|
3262
|
-
const g = l.toFiniteNumber(
|
|
3345
|
+
if (l.isArrayBufferView(p) || l.isArrayBuffer(p))
|
|
3346
|
+
return p.byteLength;
|
|
3347
|
+
if (l.isURLSearchParams(p) && (p = p + ""), l.isString(p))
|
|
3348
|
+
return (await c(p)).byteLength;
|
|
3349
|
+
}, y = async (p, m) => {
|
|
3350
|
+
const g = l.toFiniteNumber(p.getContentLength());
|
|
3263
3351
|
return g ?? _(m);
|
|
3264
3352
|
};
|
|
3265
|
-
return async (
|
|
3353
|
+
return async (p) => {
|
|
3266
3354
|
let {
|
|
3267
3355
|
url: m,
|
|
3268
3356
|
method: g,
|
|
@@ -3271,104 +3359,112 @@ const hi = (n) => {
|
|
|
3271
3359
|
cancelToken: T,
|
|
3272
3360
|
timeout: O,
|
|
3273
3361
|
onDownloadProgress: x,
|
|
3274
|
-
onUploadProgress:
|
|
3362
|
+
onUploadProgress: P,
|
|
3275
3363
|
responseType: D,
|
|
3276
3364
|
headers: X,
|
|
3277
|
-
withCredentials:
|
|
3365
|
+
withCredentials: F = "same-origin",
|
|
3278
3366
|
fetchOptions: st
|
|
3279
|
-
} =
|
|
3367
|
+
} = li(p), V = t || fetch;
|
|
3280
3368
|
D = D ? (D + "").toLowerCase() : "text";
|
|
3281
|
-
let at =
|
|
3369
|
+
let at = Er(
|
|
3370
|
+
[A, T && T.toAbortSignal()],
|
|
3371
|
+
O
|
|
3372
|
+
), H = null;
|
|
3282
3373
|
const tt = at && at.unsubscribe && (() => {
|
|
3283
3374
|
at.unsubscribe();
|
|
3284
3375
|
});
|
|
3285
|
-
let
|
|
3376
|
+
let ue;
|
|
3286
3377
|
try {
|
|
3287
|
-
if (
|
|
3378
|
+
if (P && h && g !== "get" && g !== "head" && (ue = await y(X, w)) !== 0) {
|
|
3288
3379
|
let J = new e(m, {
|
|
3289
3380
|
method: "POST",
|
|
3290
3381
|
body: w,
|
|
3291
3382
|
duplex: "half"
|
|
3292
3383
|
}), ot;
|
|
3293
3384
|
if (l.isFormData(w) && (ot = J.headers.get("content-type")) && X.setContentType(ot), J.body) {
|
|
3294
|
-
const [Kt, wt] =
|
|
3295
|
-
|
|
3296
|
-
Ut(
|
|
3385
|
+
const [Kt, wt] = xe(
|
|
3386
|
+
ue,
|
|
3387
|
+
Ut(Ve(P))
|
|
3297
3388
|
);
|
|
3298
|
-
w =
|
|
3389
|
+
w = Le(J.body, Me, Kt, wt);
|
|
3299
3390
|
}
|
|
3300
3391
|
}
|
|
3301
|
-
l.isString(
|
|
3302
|
-
const
|
|
3392
|
+
l.isString(F) || (F = F ? "include" : "omit");
|
|
3393
|
+
const U = s && "credentials" in e.prototype, he = {
|
|
3303
3394
|
...st,
|
|
3304
3395
|
signal: at,
|
|
3305
3396
|
method: g.toUpperCase(),
|
|
3306
3397
|
headers: X.normalize().toJSON(),
|
|
3307
3398
|
body: w,
|
|
3308
3399
|
duplex: "half",
|
|
3309
|
-
credentials:
|
|
3400
|
+
credentials: U ? F : void 0
|
|
3310
3401
|
};
|
|
3311
|
-
|
|
3312
|
-
let $ = await (s ? V(
|
|
3313
|
-
const
|
|
3314
|
-
if (u && (x ||
|
|
3402
|
+
H = s && new e(m, he);
|
|
3403
|
+
let $ = await (s ? V(H, st) : V(m, he));
|
|
3404
|
+
const le = u && (D === "stream" || D === "response");
|
|
3405
|
+
if (u && (x || le && tt)) {
|
|
3315
3406
|
const J = {};
|
|
3316
|
-
["status", "statusText", "headers"].forEach((
|
|
3317
|
-
J[
|
|
3407
|
+
["status", "statusText", "headers"].forEach((fe) => {
|
|
3408
|
+
J[fe] = $[fe];
|
|
3318
3409
|
});
|
|
3319
|
-
const ot = l.toFiniteNumber($.headers.get("content-length")), [Kt, wt] = x &&
|
|
3410
|
+
const ot = l.toFiniteNumber($.headers.get("content-length")), [Kt, wt] = x && xe(
|
|
3320
3411
|
ot,
|
|
3321
|
-
Ut(
|
|
3412
|
+
Ut(Ve(x), !0)
|
|
3322
3413
|
) || [];
|
|
3323
3414
|
$ = new i(
|
|
3324
|
-
|
|
3415
|
+
Le($.body, Me, Kt, () => {
|
|
3325
3416
|
wt && wt(), tt && tt();
|
|
3326
3417
|
}),
|
|
3327
3418
|
J
|
|
3328
3419
|
);
|
|
3329
3420
|
}
|
|
3330
3421
|
D = D || "text";
|
|
3331
|
-
let
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3422
|
+
let mi = await f[l.findKey(f, D) || "text"](
|
|
3423
|
+
$,
|
|
3424
|
+
p
|
|
3425
|
+
);
|
|
3426
|
+
return !le && tt && tt(), await new Promise((J, ot) => {
|
|
3427
|
+
ui(J, ot, {
|
|
3428
|
+
data: mi,
|
|
3429
|
+
headers: M.from($.headers),
|
|
3336
3430
|
status: $.status,
|
|
3337
3431
|
statusText: $.statusText,
|
|
3338
|
-
config:
|
|
3339
|
-
request:
|
|
3432
|
+
config: p,
|
|
3433
|
+
request: H
|
|
3340
3434
|
});
|
|
3341
3435
|
});
|
|
3342
|
-
} catch (
|
|
3343
|
-
throw tt && tt(),
|
|
3344
|
-
new
|
|
3436
|
+
} catch (U) {
|
|
3437
|
+
throw tt && tt(), U && U.name === "TypeError" && /Load failed|fetch/i.test(U.message) ? Object.assign(
|
|
3438
|
+
new b(
|
|
3439
|
+
"Network Error",
|
|
3440
|
+
b.ERR_NETWORK,
|
|
3441
|
+
p,
|
|
3442
|
+
H,
|
|
3443
|
+
U && U.response
|
|
3444
|
+
),
|
|
3345
3445
|
{
|
|
3346
|
-
cause:
|
|
3446
|
+
cause: U.cause || U
|
|
3347
3447
|
}
|
|
3348
|
-
) :
|
|
3448
|
+
) : b.from(U, U && U.code, p, H, U && U.response);
|
|
3349
3449
|
}
|
|
3350
3450
|
};
|
|
3351
|
-
},
|
|
3451
|
+
}, Rr = /* @__PURE__ */ new Map(), fi = (n) => {
|
|
3352
3452
|
let t = n && n.env || {};
|
|
3353
|
-
const { fetch: e, Request: i, Response: r } = t, s = [
|
|
3354
|
-
|
|
3355
|
-
r,
|
|
3356
|
-
e
|
|
3357
|
-
];
|
|
3358
|
-
let a = s.length, o = a, c, h, u = Sr;
|
|
3453
|
+
const { fetch: e, Request: i, Response: r } = t, s = [i, r, e];
|
|
3454
|
+
let a = s.length, o = a, c, h, u = Rr;
|
|
3359
3455
|
for (; o--; )
|
|
3360
|
-
c = s[o], h = u.get(c), h === void 0 && u.set(c, h = o ? /* @__PURE__ */ new Map() :
|
|
3456
|
+
c = s[o], h = u.get(c), h === void 0 && u.set(c, h = o ? /* @__PURE__ */ new Map() : Cr(t)), u = h;
|
|
3361
3457
|
return h;
|
|
3362
3458
|
};
|
|
3363
|
-
|
|
3364
|
-
const
|
|
3365
|
-
http:
|
|
3366
|
-
xhr:
|
|
3459
|
+
fi();
|
|
3460
|
+
const ce = {
|
|
3461
|
+
http: Wn,
|
|
3462
|
+
xhr: vr,
|
|
3367
3463
|
fetch: {
|
|
3368
|
-
get:
|
|
3464
|
+
get: fi
|
|
3369
3465
|
}
|
|
3370
3466
|
};
|
|
3371
|
-
l.forEach(
|
|
3467
|
+
l.forEach(ce, (n, t) => {
|
|
3372
3468
|
if (n) {
|
|
3373
3469
|
try {
|
|
3374
3470
|
Object.defineProperty(n, "name", { value: t });
|
|
@@ -3377,8 +3473,8 @@ l.forEach(ae, (n, t) => {
|
|
|
3377
3473
|
Object.defineProperty(n, "adapterName", { value: t });
|
|
3378
3474
|
}
|
|
3379
3475
|
});
|
|
3380
|
-
const
|
|
3381
|
-
function
|
|
3476
|
+
const qe = (n) => `- ${n}`, Or = (n) => l.isFunction(n) || n === null || n === !1;
|
|
3477
|
+
function Dr(n, t) {
|
|
3382
3478
|
n = l.isArray(n) ? n : [n];
|
|
3383
3479
|
const { length: e } = n;
|
|
3384
3480
|
let i, r;
|
|
@@ -3386,8 +3482,8 @@ function Ar(n, t) {
|
|
|
3386
3482
|
for (let a = 0; a < e; a++) {
|
|
3387
3483
|
i = n[a];
|
|
3388
3484
|
let o;
|
|
3389
|
-
if (r = i, !
|
|
3390
|
-
throw new
|
|
3485
|
+
if (r = i, !Or(i) && (r = ce[(o = String(i)).toLowerCase()], r === void 0))
|
|
3486
|
+
throw new b(`Unknown adapter '${o}'`);
|
|
3391
3487
|
if (r && (l.isFunction(r) || (r = r.get(t))))
|
|
3392
3488
|
break;
|
|
3393
3489
|
s[o || "#" + a] = r;
|
|
@@ -3397,67 +3493,63 @@ function Ar(n, t) {
|
|
|
3397
3493
|
([c, h]) => `adapter ${c} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
3398
3494
|
);
|
|
3399
3495
|
let o = e ? a.length > 1 ? `since :
|
|
3400
|
-
` + a.map(
|
|
3401
|
-
`) : " " +
|
|
3402
|
-
throw new
|
|
3496
|
+
` + a.map(qe).join(`
|
|
3497
|
+
`) : " " + qe(a[0]) : "as no adapter specified";
|
|
3498
|
+
throw new b(
|
|
3403
3499
|
"There is no suitable adapter to dispatch the request " + o,
|
|
3404
3500
|
"ERR_NOT_SUPPORT"
|
|
3405
3501
|
);
|
|
3406
3502
|
}
|
|
3407
3503
|
return r;
|
|
3408
3504
|
}
|
|
3409
|
-
const
|
|
3505
|
+
const pi = {
|
|
3410
3506
|
/**
|
|
3411
3507
|
* Resolve an adapter from a list of adapter names or functions.
|
|
3412
3508
|
* @type {Function}
|
|
3413
3509
|
*/
|
|
3414
|
-
getAdapter:
|
|
3510
|
+
getAdapter: Dr,
|
|
3415
3511
|
/**
|
|
3416
3512
|
* Exposes all known adapters
|
|
3417
3513
|
* @type {Object<string, Function|Object>}
|
|
3418
3514
|
*/
|
|
3419
|
-
adapters:
|
|
3515
|
+
adapters: ce
|
|
3420
3516
|
};
|
|
3421
|
-
function
|
|
3517
|
+
function Jt(n) {
|
|
3422
3518
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
3423
|
-
throw new
|
|
3519
|
+
throw new Et(null, n);
|
|
3424
3520
|
}
|
|
3425
|
-
function
|
|
3426
|
-
return
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
n,
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
n.transformResponse,
|
|
3439
|
-
i.response
|
|
3440
|
-
), i.response.headers = L.from(i.response.headers))), Promise.reject(i);
|
|
3441
|
-
});
|
|
3521
|
+
function Ke(n) {
|
|
3522
|
+
return Jt(n), n.headers = M.from(n.headers), n.data = $t.call(n, n.transformRequest), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), pi.getAdapter(n.adapter || vt.adapter, n)(n).then(
|
|
3523
|
+
function(i) {
|
|
3524
|
+
return Jt(n), i.data = $t.call(n, n.transformResponse, i), i.headers = M.from(i.headers), i;
|
|
3525
|
+
},
|
|
3526
|
+
function(i) {
|
|
3527
|
+
return ci(i) || (Jt(n), i && i.response && (i.response.data = $t.call(
|
|
3528
|
+
n,
|
|
3529
|
+
n.transformResponse,
|
|
3530
|
+
i.response
|
|
3531
|
+
), i.response.headers = M.from(i.response.headers))), Promise.reject(i);
|
|
3532
|
+
}
|
|
3533
|
+
);
|
|
3442
3534
|
}
|
|
3443
|
-
const
|
|
3535
|
+
const di = "1.13.6", qt = {};
|
|
3444
3536
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
|
|
3445
3537
|
qt[n] = function(i) {
|
|
3446
3538
|
return typeof i === n || "a" + (t < 1 ? "n " : " ") + n;
|
|
3447
3539
|
};
|
|
3448
3540
|
});
|
|
3449
|
-
const
|
|
3541
|
+
const He = {};
|
|
3450
3542
|
qt.transitional = function(t, e, i) {
|
|
3451
3543
|
function r(s, a) {
|
|
3452
|
-
return "[Axios v" +
|
|
3544
|
+
return "[Axios v" + di + "] Transitional option '" + s + "'" + a + (i ? ". " + i : "");
|
|
3453
3545
|
}
|
|
3454
3546
|
return (s, a, o) => {
|
|
3455
3547
|
if (t === !1)
|
|
3456
|
-
throw new
|
|
3548
|
+
throw new b(
|
|
3457
3549
|
r(a, " has been removed" + (e ? " in " + e : "")),
|
|
3458
|
-
|
|
3550
|
+
b.ERR_DEPRECATED
|
|
3459
3551
|
);
|
|
3460
|
-
return e && !
|
|
3552
|
+
return e && !He[a] && (He[a] = !0, console.warn(
|
|
3461
3553
|
r(
|
|
3462
3554
|
a,
|
|
3463
3555
|
" has been deprecated since v" + e + " and will be removed in the near future"
|
|
@@ -3468,9 +3560,9 @@ qt.transitional = function(t, e, i) {
|
|
|
3468
3560
|
qt.spelling = function(t) {
|
|
3469
3561
|
return (e, i) => (console.warn(`${i} is likely a misspelling of ${t}`), !0);
|
|
3470
3562
|
};
|
|
3471
|
-
function
|
|
3563
|
+
function Ir(n, t, e) {
|
|
3472
3564
|
if (typeof n != "object")
|
|
3473
|
-
throw new
|
|
3565
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
3474
3566
|
const i = Object.keys(n);
|
|
3475
3567
|
let r = i.length;
|
|
3476
3568
|
for (; r-- > 0; ) {
|
|
@@ -3478,22 +3570,25 @@ function Cr(n, t, e) {
|
|
|
3478
3570
|
if (a) {
|
|
3479
3571
|
const o = n[s], c = o === void 0 || a(o, s, n);
|
|
3480
3572
|
if (c !== !0)
|
|
3481
|
-
throw new
|
|
3573
|
+
throw new b(
|
|
3574
|
+
"option " + s + " must be " + c,
|
|
3575
|
+
b.ERR_BAD_OPTION_VALUE
|
|
3576
|
+
);
|
|
3482
3577
|
continue;
|
|
3483
3578
|
}
|
|
3484
3579
|
if (e !== !0)
|
|
3485
|
-
throw new
|
|
3580
|
+
throw new b("Unknown option " + s, b.ERR_BAD_OPTION);
|
|
3486
3581
|
}
|
|
3487
3582
|
}
|
|
3488
3583
|
const xt = {
|
|
3489
|
-
assertOptions:
|
|
3584
|
+
assertOptions: Ir,
|
|
3490
3585
|
validators: qt
|
|
3491
|
-
},
|
|
3586
|
+
}, k = xt.validators;
|
|
3492
3587
|
let nt = class {
|
|
3493
3588
|
constructor(t) {
|
|
3494
3589
|
this.defaults = t || {}, this.interceptors = {
|
|
3495
|
-
request: new
|
|
3496
|
-
response: new
|
|
3590
|
+
request: new Ne(),
|
|
3591
|
+
response: new Ne()
|
|
3497
3592
|
};
|
|
3498
3593
|
}
|
|
3499
3594
|
/**
|
|
@@ -3524,33 +3619,44 @@ let nt = class {
|
|
|
3524
3619
|
_request(t, e) {
|
|
3525
3620
|
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = rt(this.defaults, e);
|
|
3526
3621
|
const { transitional: i, paramsSerializer: r, headers: s } = e;
|
|
3527
|
-
i !== void 0 && xt.assertOptions(
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3622
|
+
i !== void 0 && xt.assertOptions(
|
|
3623
|
+
i,
|
|
3624
|
+
{
|
|
3625
|
+
silentJSONParsing: k.transitional(k.boolean),
|
|
3626
|
+
forcedJSONParsing: k.transitional(k.boolean),
|
|
3627
|
+
clarifyTimeoutError: k.transitional(k.boolean),
|
|
3628
|
+
legacyInterceptorReqResOrdering: k.transitional(k.boolean)
|
|
3629
|
+
},
|
|
3630
|
+
!1
|
|
3631
|
+
), r != null && (l.isFunction(r) ? e.paramsSerializer = {
|
|
3532
3632
|
serialize: r
|
|
3533
|
-
} : xt.assertOptions(
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3633
|
+
} : xt.assertOptions(
|
|
3634
|
+
r,
|
|
3635
|
+
{
|
|
3636
|
+
encode: k.function,
|
|
3637
|
+
serialize: k.function
|
|
3638
|
+
},
|
|
3639
|
+
!0
|
|
3640
|
+
)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), xt.assertOptions(
|
|
3641
|
+
e,
|
|
3642
|
+
{
|
|
3643
|
+
baseUrl: k.spelling("baseURL"),
|
|
3644
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
3645
|
+
},
|
|
3646
|
+
!0
|
|
3647
|
+
), e.method = (e.method || this.defaults.method || "get").toLowerCase();
|
|
3648
|
+
let a = s && l.merge(s.common, s[e.method]);
|
|
3649
|
+
s && l.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (p) => {
|
|
3650
|
+
delete s[p];
|
|
3651
|
+
}), e.headers = M.concat(a, s);
|
|
3550
3652
|
const o = [];
|
|
3551
3653
|
let c = !0;
|
|
3552
3654
|
this.interceptors.request.forEach(function(m) {
|
|
3553
|
-
typeof m.runWhen == "function" && m.runWhen(e) === !1
|
|
3655
|
+
if (typeof m.runWhen == "function" && m.runWhen(e) === !1)
|
|
3656
|
+
return;
|
|
3657
|
+
c = c && m.synchronous;
|
|
3658
|
+
const g = e.transitional || ae;
|
|
3659
|
+
g && g.legacyInterceptorReqResOrdering ? o.unshift(m.fulfilled, m.rejected) : o.push(m.fulfilled, m.rejected);
|
|
3554
3660
|
});
|
|
3555
3661
|
const h = [];
|
|
3556
3662
|
this.interceptors.response.forEach(function(m) {
|
|
@@ -3558,26 +3664,26 @@ let nt = class {
|
|
|
3558
3664
|
});
|
|
3559
3665
|
let u, f = 0, _;
|
|
3560
3666
|
if (!c) {
|
|
3561
|
-
const
|
|
3562
|
-
for (
|
|
3563
|
-
u = u.then(
|
|
3667
|
+
const p = [Ke.bind(this), void 0];
|
|
3668
|
+
for (p.unshift(...o), p.push(...h), _ = p.length, u = Promise.resolve(e); f < _; )
|
|
3669
|
+
u = u.then(p[f++], p[f++]);
|
|
3564
3670
|
return u;
|
|
3565
3671
|
}
|
|
3566
3672
|
_ = o.length;
|
|
3567
3673
|
let y = e;
|
|
3568
3674
|
for (; f < _; ) {
|
|
3569
|
-
const
|
|
3675
|
+
const p = o[f++], m = o[f++];
|
|
3570
3676
|
try {
|
|
3571
|
-
y =
|
|
3677
|
+
y = p(y);
|
|
3572
3678
|
} catch (g) {
|
|
3573
3679
|
m.call(this, g);
|
|
3574
3680
|
break;
|
|
3575
3681
|
}
|
|
3576
3682
|
}
|
|
3577
3683
|
try {
|
|
3578
|
-
u =
|
|
3579
|
-
} catch (
|
|
3580
|
-
return Promise.reject(
|
|
3684
|
+
u = Ke.call(this, y);
|
|
3685
|
+
} catch (p) {
|
|
3686
|
+
return Promise.reject(p);
|
|
3581
3687
|
}
|
|
3582
3688
|
for (f = 0, _ = h.length; f < _; )
|
|
3583
3689
|
u = u.then(h[f++], h[f++]);
|
|
@@ -3585,35 +3691,39 @@ let nt = class {
|
|
|
3585
3691
|
}
|
|
3586
3692
|
getUri(t) {
|
|
3587
3693
|
t = rt(this.defaults, t);
|
|
3588
|
-
const e =
|
|
3589
|
-
return
|
|
3694
|
+
const e = hi(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
3695
|
+
return ai(e, t.params, t.paramsSerializer);
|
|
3590
3696
|
}
|
|
3591
3697
|
};
|
|
3592
3698
|
l.forEach(["delete", "get", "head", "options"], function(t) {
|
|
3593
3699
|
nt.prototype[t] = function(e, i) {
|
|
3594
|
-
return this.request(
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3700
|
+
return this.request(
|
|
3701
|
+
rt(i || {}, {
|
|
3702
|
+
method: t,
|
|
3703
|
+
url: e,
|
|
3704
|
+
data: (i || {}).data
|
|
3705
|
+
})
|
|
3706
|
+
);
|
|
3599
3707
|
};
|
|
3600
3708
|
});
|
|
3601
3709
|
l.forEach(["post", "put", "patch"], function(t) {
|
|
3602
3710
|
function e(i) {
|
|
3603
3711
|
return function(s, a, o) {
|
|
3604
|
-
return this.request(
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3712
|
+
return this.request(
|
|
3713
|
+
rt(o || {}, {
|
|
3714
|
+
method: t,
|
|
3715
|
+
headers: i ? {
|
|
3716
|
+
"Content-Type": "multipart/form-data"
|
|
3717
|
+
} : {},
|
|
3718
|
+
url: s,
|
|
3719
|
+
data: a
|
|
3720
|
+
})
|
|
3721
|
+
);
|
|
3612
3722
|
};
|
|
3613
3723
|
}
|
|
3614
3724
|
nt.prototype[t] = e(), nt.prototype[t + "Form"] = e(!0);
|
|
3615
3725
|
});
|
|
3616
|
-
let
|
|
3726
|
+
let Nr = class _i {
|
|
3617
3727
|
constructor(t) {
|
|
3618
3728
|
if (typeof t != "function")
|
|
3619
3729
|
throw new TypeError("executor must be a function.");
|
|
@@ -3637,7 +3747,7 @@ let Rr = class di {
|
|
|
3637
3747
|
i.unsubscribe(s);
|
|
3638
3748
|
}, a;
|
|
3639
3749
|
}, t(function(s, a, o) {
|
|
3640
|
-
i.reason || (i.reason = new
|
|
3750
|
+
i.reason || (i.reason = new Et(s, a, o), e(i.reason));
|
|
3641
3751
|
});
|
|
3642
3752
|
}
|
|
3643
3753
|
/**
|
|
@@ -3679,22 +3789,22 @@ let Rr = class di {
|
|
|
3679
3789
|
static source() {
|
|
3680
3790
|
let t;
|
|
3681
3791
|
return {
|
|
3682
|
-
token: new
|
|
3792
|
+
token: new _i(function(r) {
|
|
3683
3793
|
t = r;
|
|
3684
3794
|
}),
|
|
3685
3795
|
cancel: t
|
|
3686
3796
|
};
|
|
3687
3797
|
}
|
|
3688
3798
|
};
|
|
3689
|
-
function
|
|
3799
|
+
function Br(n) {
|
|
3690
3800
|
return function(e) {
|
|
3691
3801
|
return n.apply(null, e);
|
|
3692
3802
|
};
|
|
3693
3803
|
}
|
|
3694
|
-
function
|
|
3804
|
+
function xr(n) {
|
|
3695
3805
|
return l.isObject(n) && n.isAxiosError === !0;
|
|
3696
3806
|
}
|
|
3697
|
-
const
|
|
3807
|
+
const ie = {
|
|
3698
3808
|
Continue: 100,
|
|
3699
3809
|
SwitchingProtocols: 101,
|
|
3700
3810
|
Processing: 102,
|
|
@@ -3765,54 +3875,54 @@ const ee = {
|
|
|
3765
3875
|
SslHandshakeFailed: 525,
|
|
3766
3876
|
InvalidSslCertificate: 526
|
|
3767
3877
|
};
|
|
3768
|
-
Object.entries(
|
|
3769
|
-
|
|
3878
|
+
Object.entries(ie).forEach(([n, t]) => {
|
|
3879
|
+
ie[t] = n;
|
|
3770
3880
|
});
|
|
3771
|
-
function
|
|
3772
|
-
const t = new nt(n), e =
|
|
3881
|
+
function gi(n) {
|
|
3882
|
+
const t = new nt(n), e = $e(nt.prototype.request, t);
|
|
3773
3883
|
return l.extend(e, nt.prototype, t, { allOwnKeys: !0 }), l.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
|
|
3774
|
-
return
|
|
3884
|
+
return gi(rt(n, r));
|
|
3775
3885
|
}, e;
|
|
3776
3886
|
}
|
|
3777
|
-
const S =
|
|
3887
|
+
const S = gi(vt);
|
|
3778
3888
|
S.Axios = nt;
|
|
3779
|
-
S.CanceledError =
|
|
3780
|
-
S.CancelToken =
|
|
3781
|
-
S.isCancel =
|
|
3782
|
-
S.VERSION =
|
|
3889
|
+
S.CanceledError = Et;
|
|
3890
|
+
S.CancelToken = Nr;
|
|
3891
|
+
S.isCancel = ci;
|
|
3892
|
+
S.VERSION = di;
|
|
3783
3893
|
S.toFormData = jt;
|
|
3784
|
-
S.AxiosError =
|
|
3894
|
+
S.AxiosError = b;
|
|
3785
3895
|
S.Cancel = S.CanceledError;
|
|
3786
3896
|
S.all = function(t) {
|
|
3787
3897
|
return Promise.all(t);
|
|
3788
3898
|
};
|
|
3789
|
-
S.spread =
|
|
3790
|
-
S.isAxiosError =
|
|
3899
|
+
S.spread = Br;
|
|
3900
|
+
S.isAxiosError = xr;
|
|
3791
3901
|
S.mergeConfig = rt;
|
|
3792
|
-
S.AxiosHeaders =
|
|
3793
|
-
S.formToJSON = (n) =>
|
|
3794
|
-
S.getAdapter =
|
|
3795
|
-
S.HttpStatusCode =
|
|
3902
|
+
S.AxiosHeaders = M;
|
|
3903
|
+
S.formToJSON = (n) => oi(l.isHTMLForm(n) ? new FormData(n) : n);
|
|
3904
|
+
S.getAdapter = pi.getAdapter;
|
|
3905
|
+
S.HttpStatusCode = ie;
|
|
3796
3906
|
S.default = S;
|
|
3797
3907
|
const {
|
|
3798
|
-
Axios:
|
|
3799
|
-
AxiosError:
|
|
3800
|
-
CanceledError:
|
|
3801
|
-
isCancel:
|
|
3802
|
-
CancelToken:
|
|
3803
|
-
VERSION:
|
|
3804
|
-
all:
|
|
3805
|
-
Cancel:
|
|
3806
|
-
isAxiosError:
|
|
3807
|
-
spread:
|
|
3808
|
-
toFormData:
|
|
3809
|
-
AxiosHeaders:
|
|
3810
|
-
HttpStatusCode:
|
|
3811
|
-
formToJSON:
|
|
3812
|
-
getAdapter:
|
|
3813
|
-
mergeConfig:
|
|
3908
|
+
Axios: Fr,
|
|
3909
|
+
AxiosError: kr,
|
|
3910
|
+
CanceledError: jr,
|
|
3911
|
+
isCancel: qr,
|
|
3912
|
+
CancelToken: Kr,
|
|
3913
|
+
VERSION: Hr,
|
|
3914
|
+
all: Wr,
|
|
3915
|
+
Cancel: Xr,
|
|
3916
|
+
isAxiosError: zr,
|
|
3917
|
+
spread: Gr,
|
|
3918
|
+
toFormData: $r,
|
|
3919
|
+
AxiosHeaders: Jr,
|
|
3920
|
+
HttpStatusCode: Qr,
|
|
3921
|
+
formToJSON: Zr,
|
|
3922
|
+
getAdapter: Yr,
|
|
3923
|
+
mergeConfig: ts
|
|
3814
3924
|
} = S;
|
|
3815
|
-
class
|
|
3925
|
+
class es extends yi {
|
|
3816
3926
|
__pinPad__ = {
|
|
3817
3927
|
buffer: null,
|
|
3818
3928
|
about: {
|
|
@@ -4000,11 +4110,11 @@ class Jr extends mi {
|
|
|
4000
4110
|
environment: "production",
|
|
4001
4111
|
socket: !1
|
|
4002
4112
|
}) {
|
|
4003
|
-
if (super({ filters: t, config_port: e, no_device: i, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !
|
|
4113
|
+
if (super({ filters: t, config_port: e, no_device: i, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !bi())
|
|
4004
4114
|
throw new Error("Crypto not supported in this browser");
|
|
4005
|
-
if (
|
|
4115
|
+
if (pe.getCustom(this.typeDevice, i))
|
|
4006
4116
|
throw new Error(`Device ${this.typeDevice} ${i} already exists`);
|
|
4007
|
-
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(),
|
|
4117
|
+
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(), pe.add(this);
|
|
4008
4118
|
}
|
|
4009
4119
|
#A() {
|
|
4010
4120
|
const t = [
|
|
@@ -4090,16 +4200,16 @@ class Jr extends mi {
|
|
|
4090
4200
|
}
|
|
4091
4201
|
if (e.includes("M1") || e.includes("M0") || e.includes("M1") || e.includes("N1") || e.includes("N1") || e.includes("P93A022") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A800") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A022") && e.length >= 406 && r === "vx820" || e.includes("P93A022") && e.length >= 406 && r === "vx520" || e.includes("P93A800") && e.length >= 406 && r === "vx520" || e.includes("P93A800") && e.length >= 406 && r === "vx820" || e.includes("P93A022") && e.length >= 406 && r === "p400" || e.includes("P93A800") && e.length >= 406 && r === "p400" || e.includes("P93A022") && e.length >= 406 && r === "v205c" || e.includes("P93A800") && e.length >= 406 && r === "v205c" || e.includes("P93A022") && e.length >= 406 && r === "move2500" || e.includes("P93A800") && e.length >= 406 && r === "move2500" || e.includes("P93A022") && e.length >= 406 && r === "lane3000" || e.includes("P93A800") && e.length >= 406 && r === "lane3000") {
|
|
4092
4202
|
let a = e;
|
|
4093
|
-
i === "verifone" && (a = e.replace("006P93A00.", "").substring(e.indexOf("P93A"), e.indexOf("P93A") + 7)), e.includes("P81APROCESANDO, NO RETIRE TARJETA") || e.includes("P81APROCESANDO TARJETA") || a.includes("P93A022") || a.includes("P81AINSERTE CHIP O DESLICE TARJETA") || a.includes("ACERQUE, INSERTE CHIP O DESLICE") || a.includes("P81AACERQUE, INSERTE CHIP O DESLICE TARJETA") ? this.dispatch("pp:processing-card", { waiting: !0 }) : e.length > s && this.#
|
|
4203
|
+
i === "verifone" && (a = e.replace("006P93A00.", "").substring(e.indexOf("P93A"), e.indexOf("P93A") + 7)), e.includes("P81APROCESANDO, NO RETIRE TARJETA") || e.includes("P81APROCESANDO TARJETA") || a.includes("P93A022") || a.includes("P81AINSERTE CHIP O DESLICE TARJETA") || a.includes("ACERQUE, INSERTE CHIP O DESLICE") || a.includes("P81AACERQUE, INSERTE CHIP O DESLICE TARJETA") ? this.dispatch("pp:processing-card", { waiting: !0 }) : e.length > s && this.#B(e);
|
|
4094
4204
|
}
|
|
4095
4205
|
}
|
|
4096
4206
|
// @ts-expect-error parts is not used
|
|
4097
|
-
#
|
|
4207
|
+
#N(t, e) {
|
|
4098
4208
|
const i = this.__pinPad__.constants.ETX;
|
|
4099
4209
|
let r = e.replace("023P81AFAVOR RETIRAR TARJ.", "").replace("020P81A DECLINADA EMV ", "").replace("020P81A DECLINADA EMV ", "");
|
|
4100
4210
|
r = r.substring(r.indexOf("B") + 2, r.indexOf(i)), r.includes("006E93A16") && (r = "01"), this.__pinPad__.operation.applyReverse = r === "01" && this.__pinPad__.operation.responseMit._approved && this.__pinPad__.config.otherLogin.executeReverse === "1", this.__pinPad__.waiting.statusSecondGenerateWaiting = "resolved";
|
|
4101
4211
|
}
|
|
4102
|
-
#
|
|
4212
|
+
#B(t) {
|
|
4103
4213
|
const e = this.__pinPad__.constants.ETX, i = this.__pinPad__.about?.brand?.toLowerCase();
|
|
4104
4214
|
let r, s, a, o, c;
|
|
4105
4215
|
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"));
|
|
@@ -4209,7 +4319,7 @@ class Jr extends mi {
|
|
|
4209
4319
|
e.name = "read card", e.description = "response of read card", e.no_code = 105, this.#I(s, r);
|
|
4210
4320
|
break;
|
|
4211
4321
|
case "second-generate":
|
|
4212
|
-
e.name = "second generate", e.description = "response of second generate", e.no_code = 106, this.#
|
|
4322
|
+
e.name = "second generate", e.description = "response of second generate", e.no_code = 106, this.#N(s, r);
|
|
4213
4323
|
break;
|
|
4214
4324
|
case "cancel":
|
|
4215
4325
|
e.name = "cancel pinpad", e.description = "response of cancel", e.no_code = 107;
|
|
@@ -4319,7 +4429,7 @@ class Jr extends mi {
|
|
|
4319
4429
|
// Updated to WS v4
|
|
4320
4430
|
// ========================================================================================
|
|
4321
4431
|
#s(t, e) {
|
|
4322
|
-
const i = new
|
|
4432
|
+
const i = new en();
|
|
4323
4433
|
return i.setPublicKey(t), i.encrypt(e);
|
|
4324
4434
|
}
|
|
4325
4435
|
#a(t) {
|
|
@@ -4383,7 +4493,7 @@ class Jr extends mi {
|
|
|
4383
4493
|
// const decoder = new TextDecoder();
|
|
4384
4494
|
// return decoder.decode(decrypted);
|
|
4385
4495
|
// }
|
|
4386
|
-
#
|
|
4496
|
+
#F(t, e, i = !1) {
|
|
4387
4497
|
const r = [];
|
|
4388
4498
|
for (let h = 0; h < 256; h++)
|
|
4389
4499
|
r[h] = h;
|
|
@@ -4399,9 +4509,9 @@ class Jr extends mi {
|
|
|
4399
4509
|
return i ? this.#M(c).toUpperCase() : c;
|
|
4400
4510
|
}
|
|
4401
4511
|
#n(t, e) {
|
|
4402
|
-
return this.#
|
|
4512
|
+
return this.#F(t, this.hexToAscii(e));
|
|
4403
4513
|
}
|
|
4404
|
-
#
|
|
4514
|
+
#k(t) {
|
|
4405
4515
|
return t.replaceAll("Á", "A"), t.replaceAll("É", "E"), t.replaceAll("Í", "I"), t.replaceAll("Ó", "O"), t.replaceAll("Ú", "U"), t.replaceAll("á", "a"), t.replaceAll("é", "e"), t.replaceAll("í", "i"), t.replaceAll("ó", "o"), t.replaceAll("ú", "u"), t.replaceAll("ñ", "n"), t.replaceAll("Ñ", "N"), t.replaceAll('Electr?a"', "Electronica"), t;
|
|
4406
4516
|
}
|
|
4407
4517
|
#t(t, e, i) {
|
|
@@ -4576,7 +4686,7 @@ class Jr extends mi {
|
|
|
4576
4686
|
return e + i;
|
|
4577
4687
|
}
|
|
4578
4688
|
async checkPositionPermission() {
|
|
4579
|
-
if (!
|
|
4689
|
+
if (!de())
|
|
4580
4690
|
throw new Error("Geolocation not supported");
|
|
4581
4691
|
return new Promise((t, e) => {
|
|
4582
4692
|
navigator.permissions.query({ name: "geolocation" }).then((i) => {
|
|
@@ -4585,7 +4695,7 @@ class Jr extends mi {
|
|
|
4585
4695
|
});
|
|
4586
4696
|
}
|
|
4587
4697
|
async getPosition() {
|
|
4588
|
-
return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null,
|
|
4698
|
+
return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, de() ? new Promise((t) => {
|
|
4589
4699
|
navigator.geolocation.getCurrentPosition(
|
|
4590
4700
|
(e) => {
|
|
4591
4701
|
this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
|
|
@@ -4642,7 +4752,7 @@ class Jr extends mi {
|
|
|
4642
4752
|
});
|
|
4643
4753
|
return;
|
|
4644
4754
|
}
|
|
4645
|
-
r = this.#
|
|
4755
|
+
r = this.#k(r), r = this.#j(r, this.__pinPad__.constants.appName + this.__pinPad__.constants.appVersion);
|
|
4646
4756
|
let s = "C59A" + r;
|
|
4647
4757
|
s = e + this.#e(s) + s + i, s = s + this.#i(s), t === "client" ? this.__pinPad__.operation.clientVoucher = "" : t === "commerce" && (this.__pinPad__.operation.commerceVoucher = "");
|
|
4648
4758
|
const a = this.parseStringToBytes(s, "");
|
|
@@ -4864,7 +4974,7 @@ class Jr extends mi {
|
|
|
4864
4974
|
});
|
|
4865
4975
|
}
|
|
4866
4976
|
async #et(t) {
|
|
4867
|
-
return await
|
|
4977
|
+
return await _e(t * 1e3);
|
|
4868
4978
|
}
|
|
4869
4979
|
/**
|
|
4870
4980
|
* @param {null|string} reference
|
|
@@ -5232,7 +5342,7 @@ class Jr extends mi {
|
|
|
5232
5342
|
this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5233
5343
|
else {
|
|
5234
5344
|
const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
|
|
5235
|
-
await this.appendToQueue(t, "code93"), await
|
|
5345
|
+
await this.appendToQueue(t, "code93"), await _e(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5236
5346
|
}
|
|
5237
5347
|
}
|
|
5238
5348
|
#T(t) {
|
|
@@ -5340,5 +5450,5 @@ class Jr extends mi {
|
|
|
5340
5450
|
}
|
|
5341
5451
|
}
|
|
5342
5452
|
export {
|
|
5343
|
-
|
|
5453
|
+
es as PinPad
|
|
5344
5454
|
};
|