@danidoble/webserial 4.5.0-beta.8 → 4.6.0-beta.1
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.js +2 -2
- package/dist/{devices-B5N__0E-.js → devices-CzEcntFZ.js} +1 -1
- package/dist/hopper.js +1 -1
- package/dist/jofemar.js +2 -2
- package/dist/jsd.cjs +1 -1
- package/dist/jsd.js +1014 -229
- package/dist/{kernel-B9Cl3HQU.js → kernel-ClC2wiQo.js} +2 -2
- package/dist/kernel.js +2 -2
- package/dist/locker.js +2 -2
- package/dist/pinpad.cjs +14 -14
- package/dist/pinpad.js +1047 -919
- package/dist/pinpax.js +2 -2
- package/dist/relay.js +2 -2
- package/dist/types/lib/commands/jsd/applications/licensing.d.ts +7 -0
- package/dist/types/lib/commands/jsd/applications/licensing.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/applications/mdbCardHolder.d.ts +178 -0
- package/dist/types/lib/commands/jsd/applications/mdbCardHolder.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts +5 -0
- package/dist/types/lib/commands/jsd/frames/licensing/licensingClient.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts +3 -0
- package/dist/types/lib/commands/jsd/frames/licensing/opCodes.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/mdbCardHolderClient.d.ts +114 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/mdbCardHolderClient.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/opCodes.d.ts +52 -0
- package/dist/types/lib/commands/jsd/frames/mdb-card-holder/opCodes.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts +13 -0
- package/dist/types/lib/commands/jsd/types/LicensingClient.d.ts.map +1 -1
- package/dist/types/lib/commands/jsd/types/mdbCardHolder.types.d.ts +200 -0
- package/dist/types/lib/commands/jsd/types/mdbCardHolder.types.d.ts.map +1 -0
- package/dist/types/lib/commands/jsd/utils/aplications.d.ts +18 -0
- package/dist/types/lib/commands/jsd/utils/aplications.d.ts.map +1 -1
- package/dist/types/lib/serial/jsd.d.ts +2 -0
- package/dist/types/lib/serial/jsd.d.ts.map +1 -1
- package/dist/types/lib/serial/pinpad.d.ts +5 -3
- package/dist/types/lib/serial/pinpad.d.ts.map +1 -1
- package/dist/{webserial-core-DNpHXAr2.js → webserial-core-Bn6Ker2l.js} +3 -3
- package/dist/webserial.js +4 -4
- package/package.json +6 -6
package/dist/pinpad.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { K as
|
|
2
|
-
import { D as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import { K as Bn, a as xn, i as J, b as Ae, w as Re } from "./kernel-ClC2wiQo.js";
|
|
2
|
+
import { D as Ce } from "./devices-CzEcntFZ.js";
|
|
3
|
+
var Un = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
4
|
+
function et(i) {
|
|
5
|
+
return Un.charAt(i);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function Ln(i, t) {
|
|
8
8
|
return i & t;
|
|
9
9
|
}
|
|
10
10
|
function Bt(i, t) {
|
|
11
11
|
return i | t;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Oe(i, t) {
|
|
14
14
|
return i ^ t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function De(i, t) {
|
|
17
17
|
return i & ~t;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Vn(i) {
|
|
20
20
|
if (i == 0)
|
|
21
21
|
return -1;
|
|
22
22
|
var t = 0;
|
|
23
23
|
return (i & 65535) == 0 && (i >>= 16, t += 16), (i & 255) == 0 && (i >>= 8, t += 8), (i & 15) == 0 && (i >>= 4, t += 4), (i & 3) == 0 && (i >>= 2, t += 2), (i & 1) == 0 && ++t, t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Mn(i) {
|
|
26
26
|
for (var t = 0; i != 0; )
|
|
27
27
|
i &= i - 1, ++t;
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
30
|
+
var yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", nn = "=";
|
|
31
|
+
function Rt(i) {
|
|
32
32
|
var t, e, n = "";
|
|
33
33
|
for (t = 0; t + 3 <= i.length; t += 3)
|
|
34
|
-
e = parseInt(i.substring(t, t + 3), 16), n +=
|
|
35
|
-
for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n +=
|
|
36
|
-
n +=
|
|
34
|
+
e = parseInt(i.substring(t, t + 3), 16), n += yt.charAt(e >> 6) + yt.charAt(e & 63);
|
|
35
|
+
for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n += yt.charAt(e << 2)) : t + 2 == i.length && (e = parseInt(i.substring(t, t + 2), 16), n += yt.charAt(e >> 2) + yt.charAt((e & 3) << 4)); (n.length & 3) > 0; )
|
|
36
|
+
n += nn;
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Ie(i) {
|
|
40
40
|
var t = "", e, n = 0, r = 0;
|
|
41
|
-
for (e = 0; e < i.length && i.charAt(e) !=
|
|
42
|
-
var s =
|
|
43
|
-
s < 0 || (n == 0 ? (t +=
|
|
41
|
+
for (e = 0; e < i.length && i.charAt(e) != nn; ++e) {
|
|
42
|
+
var s = yt.indexOf(i.charAt(e));
|
|
43
|
+
s < 0 || (n == 0 ? (t += et(s >> 2), r = s & 3, n = 1) : n == 1 ? (t += et(r << 2 | s >> 4), r = s & 15, n = 2) : n == 2 ? (t += et(r), t += et(s >> 2), r = s & 3, n = 3) : (t += et(r << 2 | s >> 4), t += et(s & 15), n = 0));
|
|
44
44
|
}
|
|
45
|
-
return n == 1 && (t +=
|
|
45
|
+
return n == 1 && (t += et(r << 2)), t;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var _t, Fn = {
|
|
48
48
|
decode: function(i) {
|
|
49
49
|
var t;
|
|
50
|
-
if (
|
|
50
|
+
if (_t === void 0) {
|
|
51
51
|
var e = "0123456789ABCDEF", n = ` \f
|
|
52
52
|
\r \u2028\u2029`;
|
|
53
|
-
for (
|
|
54
|
-
|
|
53
|
+
for (_t = {}, t = 0; t < 16; ++t)
|
|
54
|
+
_t[e.charAt(t)] = t;
|
|
55
55
|
for (e = e.toLowerCase(), t = 10; t < 16; ++t)
|
|
56
|
-
|
|
56
|
+
_t[e.charAt(t)] = t;
|
|
57
57
|
for (t = 0; t < n.length; ++t)
|
|
58
|
-
|
|
58
|
+
_t[n.charAt(t)] = -1;
|
|
59
59
|
}
|
|
60
60
|
var r = [], s = 0, a = 0;
|
|
61
61
|
for (t = 0; t < i.length; ++t) {
|
|
62
62
|
var o = i.charAt(t);
|
|
63
63
|
if (o == "=")
|
|
64
64
|
break;
|
|
65
|
-
if (o =
|
|
65
|
+
if (o = _t[o], o != -1) {
|
|
66
66
|
if (o === void 0)
|
|
67
67
|
throw new Error("Illegal character at offset " + t);
|
|
68
68
|
s |= o, ++a >= 2 ? (r[r.length] = s, s = 0, a = 0) : s <<= 4;
|
|
@@ -72,23 +72,23 @@ var pt, Bn = {
|
|
|
72
72
|
throw new Error("Hex encoding incomplete: 4 bits missing");
|
|
73
73
|
return r;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
75
|
+
}, ct, ce = {
|
|
76
76
|
decode: function(i) {
|
|
77
77
|
var t;
|
|
78
|
-
if (
|
|
78
|
+
if (ct === void 0) {
|
|
79
79
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = `= \f
|
|
80
80
|
\r \u2028\u2029`;
|
|
81
|
-
for (
|
|
82
|
-
|
|
83
|
-
for (
|
|
84
|
-
|
|
81
|
+
for (ct = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
|
|
82
|
+
ct[e.charAt(t)] = t;
|
|
83
|
+
for (ct["-"] = 62, ct._ = 63, t = 0; t < n.length; ++t)
|
|
84
|
+
ct[n.charAt(t)] = -1;
|
|
85
85
|
}
|
|
86
86
|
var r = [], s = 0, a = 0;
|
|
87
87
|
for (t = 0; t < i.length; ++t) {
|
|
88
88
|
var o = i.charAt(t);
|
|
89
89
|
if (o == "=")
|
|
90
90
|
break;
|
|
91
|
-
if (o =
|
|
91
|
+
if (o = ct[o], o != -1) {
|
|
92
92
|
if (o === void 0)
|
|
93
93
|
throw new Error("Illegal character at offset " + t);
|
|
94
94
|
s |= o, ++a >= 4 ? (r[r.length] = s >> 16, r[r.length] = s >> 8 & 255, r[r.length] = s & 255, s = 0, a = 0) : s <<= 6;
|
|
@@ -118,7 +118,7 @@ var pt, Bn = {
|
|
|
118
118
|
throw new Error("RegExp out of sync");
|
|
119
119
|
return ce.decode(i);
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, gt = 1e13, At = (
|
|
122
122
|
/** @class */
|
|
123
123
|
(function() {
|
|
124
124
|
function i(t) {
|
|
@@ -127,32 +127,32 @@ var pt, Bn = {
|
|
|
127
127
|
return i.prototype.mulAdd = function(t, e) {
|
|
128
128
|
var n = this.buf, r = n.length, s, a;
|
|
129
129
|
for (s = 0; s < r; ++s)
|
|
130
|
-
a = n[s] * t + e, a <
|
|
130
|
+
a = n[s] * t + e, a < gt ? e = 0 : (e = 0 | a / gt, a -= e * gt), n[s] = a;
|
|
131
131
|
e > 0 && (n[s] = e);
|
|
132
132
|
}, i.prototype.sub = function(t) {
|
|
133
133
|
var e = this.buf, n = e.length, r, s;
|
|
134
134
|
for (r = 0; r < n; ++r)
|
|
135
|
-
s = e[r] - t, s < 0 ? (s +=
|
|
135
|
+
s = e[r] - t, s < 0 ? (s += gt, t = 1) : t = 0, e[r] = s;
|
|
136
136
|
for (; e[e.length - 1] === 0; )
|
|
137
137
|
e.pop();
|
|
138
138
|
}, i.prototype.toString = function(t) {
|
|
139
139
|
if ((t || 10) != 10)
|
|
140
140
|
throw new Error("only base 10 is supported");
|
|
141
141
|
for (var e = this.buf, n = e[e.length - 1].toString(), r = e.length - 2; r >= 0; --r)
|
|
142
|
-
n += (
|
|
142
|
+
n += (gt + e[r]).toString().substring(1);
|
|
143
143
|
return n;
|
|
144
144
|
}, i.prototype.valueOf = function() {
|
|
145
145
|
for (var t = this.buf, e = 0, n = t.length - 1; n >= 0; --n)
|
|
146
|
-
e = e *
|
|
146
|
+
e = e * gt + t[n];
|
|
147
147
|
return e;
|
|
148
148
|
}, i.prototype.simplify = function() {
|
|
149
149
|
var t = this.buf;
|
|
150
150
|
return t.length == 1 ? t[0] : this;
|
|
151
151
|
}, i;
|
|
152
152
|
})()
|
|
153
|
-
),
|
|
154
|
-
function
|
|
155
|
-
return i.length > t && (i = i.substring(0, t) +
|
|
153
|
+
), rn = "…", kn = /^(\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)?)?$/, jn = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
154
|
+
function bt(i, t) {
|
|
155
|
+
return i.length > t && (i = i.substring(0, t) + rn), i;
|
|
156
156
|
}
|
|
157
157
|
var ee = (
|
|
158
158
|
/** @class */
|
|
@@ -203,7 +203,7 @@ var ee = (
|
|
|
203
203
|
r = this.get(a++), s = this.get(a++), n += String.fromCharCode(r << 8 | s);
|
|
204
204
|
return n;
|
|
205
205
|
}, i.prototype.parseTime = function(t, e, n) {
|
|
206
|
-
var r = this.parseStringISO(t, e), s = (n ?
|
|
206
|
+
var r = this.parseStringISO(t, e), s = (n ? kn : jn).exec(r);
|
|
207
207
|
return s ? (n && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), r = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (r += ":" + s[5], s[6] && (r += ":" + s[6], s[7] && (r += "." + s[7]))), s[8] && (r += " UTC", s[8] != "Z" && (r += s[8], s[9] && (r += ":" + s[9]))), r) : "Unrecognized time: " + r;
|
|
208
208
|
}, i.prototype.parseInteger = function(t, e) {
|
|
209
209
|
for (var n = this.get(t), r = n > 127, s = r ? 255 : 0, a, o = ""; n == s && ++t < e; )
|
|
@@ -217,7 +217,7 @@ var ee = (
|
|
|
217
217
|
`;
|
|
218
218
|
}
|
|
219
219
|
r && (n = n - 256);
|
|
220
|
-
for (var c = new
|
|
220
|
+
for (var c = new At(n), u = t + 1; u < e; ++u)
|
|
221
221
|
c.mulAdd(256, this.get(u));
|
|
222
222
|
return o + c.toString();
|
|
223
223
|
}, i.prototype.parseBitString = function(t, e, n) {
|
|
@@ -226,24 +226,24 @@ var ee = (
|
|
|
226
226
|
for (var u = this.get(c), l = c == e - 1 ? r : 0, f = 7; f >= l; --f)
|
|
227
227
|
o += u >> f & 1 ? "1" : "0";
|
|
228
228
|
if (o.length > n)
|
|
229
|
-
return a +
|
|
229
|
+
return a + bt(o, n);
|
|
230
230
|
}
|
|
231
231
|
return a + o;
|
|
232
232
|
}, i.prototype.parseOctetString = function(t, e, n) {
|
|
233
233
|
if (this.isASCII(t, e))
|
|
234
|
-
return
|
|
234
|
+
return bt(this.parseStringISO(t, e), n);
|
|
235
235
|
var r = e - t, s = "(" + r + ` byte)
|
|
236
236
|
`;
|
|
237
237
|
n /= 2, r > n && (e = t + n);
|
|
238
238
|
for (var a = t; a < e; ++a)
|
|
239
239
|
s += this.hexByte(this.get(a));
|
|
240
|
-
return r > n && (s +=
|
|
240
|
+
return r > n && (s += rn), s;
|
|
241
241
|
}, i.prototype.parseOID = function(t, e, n) {
|
|
242
|
-
for (var r = "", s = new
|
|
242
|
+
for (var r = "", s = new At(), a = 0, o = t; o < e; ++o) {
|
|
243
243
|
var c = this.get(o);
|
|
244
244
|
if (s.mulAdd(128, c & 127), a += 7, !(c & 128)) {
|
|
245
245
|
if (r === "")
|
|
246
|
-
if (s = s.simplify(), s instanceof
|
|
246
|
+
if (s = s.simplify(), s instanceof At)
|
|
247
247
|
s.sub(80), r = "2." + s.toString();
|
|
248
248
|
else {
|
|
249
249
|
var u = s < 80 ? s < 40 ? 0 : 1 : 2;
|
|
@@ -252,18 +252,18 @@ var ee = (
|
|
|
252
252
|
else
|
|
253
253
|
r += "." + s.toString();
|
|
254
254
|
if (r.length > n)
|
|
255
|
-
return
|
|
256
|
-
s = new
|
|
255
|
+
return bt(r, n);
|
|
256
|
+
s = new At(), a = 0;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
return a > 0 && (r += ".incomplete"), r;
|
|
260
260
|
}, i;
|
|
261
261
|
})()
|
|
262
|
-
),
|
|
262
|
+
), qn = (
|
|
263
263
|
/** @class */
|
|
264
264
|
(function() {
|
|
265
265
|
function i(t, e, n, r, s) {
|
|
266
|
-
if (!(r instanceof
|
|
266
|
+
if (!(r instanceof Ne))
|
|
267
267
|
throw new Error("Invalid tag value.");
|
|
268
268
|
this.stream = t, this.header = e, this.length = n, this.tag = r, this.sub = s;
|
|
269
269
|
}
|
|
@@ -368,7 +368,7 @@ var ee = (
|
|
|
368
368
|
case 17:
|
|
369
369
|
return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
|
|
370
370
|
case 12:
|
|
371
|
-
return
|
|
371
|
+
return bt(this.stream.parseStringUTF(e, e + n), t);
|
|
372
372
|
case 18:
|
|
373
373
|
// NumericString
|
|
374
374
|
case 19:
|
|
@@ -381,9 +381,9 @@ var ee = (
|
|
|
381
381
|
// IA5String
|
|
382
382
|
// case 0x19: // GraphicString
|
|
383
383
|
case 26:
|
|
384
|
-
return
|
|
384
|
+
return bt(this.stream.parseStringISO(e, e + n), t);
|
|
385
385
|
case 30:
|
|
386
|
-
return
|
|
386
|
+
return bt(this.stream.parseStringBMP(e, e + n), t);
|
|
387
387
|
case 23:
|
|
388
388
|
// UTCTime
|
|
389
389
|
case 24:
|
|
@@ -428,7 +428,7 @@ var ee = (
|
|
|
428
428
|
}, i.decode = function(t) {
|
|
429
429
|
var e;
|
|
430
430
|
t instanceof ee ? e = t : e = new ee(t, 0);
|
|
431
|
-
var n = new ee(e), r = new
|
|
431
|
+
var n = new ee(e), r = new Ne(e), s = i.decodeLength(e), a = e.pos, o = a - n.pos, c = null, u = function() {
|
|
432
432
|
var f = [];
|
|
433
433
|
if (s !== null) {
|
|
434
434
|
for (var d = a + s; e.pos < d; )
|
|
@@ -470,13 +470,13 @@ var ee = (
|
|
|
470
470
|
return new i(n, o, s, r, c);
|
|
471
471
|
}, i;
|
|
472
472
|
})()
|
|
473
|
-
),
|
|
473
|
+
), Ne = (
|
|
474
474
|
/** @class */
|
|
475
475
|
(function() {
|
|
476
476
|
function i(t) {
|
|
477
477
|
var e = t.get();
|
|
478
478
|
if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
|
|
479
|
-
var n = new
|
|
479
|
+
var n = new At();
|
|
480
480
|
do
|
|
481
481
|
e = t.get(), n.mulAdd(128, e & 127);
|
|
482
482
|
while (e & 128);
|
|
@@ -489,7 +489,7 @@ var ee = (
|
|
|
489
489
|
return this.tagClass === 0 && this.tagNumber === 0;
|
|
490
490
|
}, i;
|
|
491
491
|
})()
|
|
492
|
-
),
|
|
492
|
+
), st, Kn = 244837814094590, Be = (Kn & 16777215) == 15715070, L = [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], Hn = (1 << 26) / L[L.length - 1], w = (
|
|
493
493
|
/** @class */
|
|
494
494
|
(function() {
|
|
495
495
|
function i(t, e, n) {
|
|
@@ -513,11 +513,11 @@ var ee = (
|
|
|
513
513
|
return this.toRadix(t);
|
|
514
514
|
var n = (1 << e) - 1, r, s = !1, a = "", o = this.t, c = this.DB - o * this.DB % e;
|
|
515
515
|
if (o-- > 0)
|
|
516
|
-
for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a =
|
|
517
|
-
c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & n, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a +=
|
|
516
|
+
for (c < this.DB && (r = this[o] >> c) > 0 && (s = !0, a = et(r)); o >= 0; )
|
|
517
|
+
c < e ? (r = (this[o] & (1 << c) - 1) << e - c, r |= this[--o] >> (c += this.DB - e)) : (r = this[o] >> (c -= e) & n, c <= 0 && (c += this.DB, --o)), r > 0 && (s = !0), s && (a += et(r));
|
|
518
518
|
return s ? a : "0";
|
|
519
519
|
}, i.prototype.negate = function() {
|
|
520
|
-
var t =
|
|
520
|
+
var t = T();
|
|
521
521
|
return i.ZERO.subTo(this, t), t;
|
|
522
522
|
}, i.prototype.abs = function() {
|
|
523
523
|
return this.s < 0 ? this.negate() : this;
|
|
@@ -535,13 +535,13 @@ var ee = (
|
|
|
535
535
|
}, i.prototype.bitLength = function() {
|
|
536
536
|
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + xt(this[this.t - 1] ^ this.s & this.DM);
|
|
537
537
|
}, i.prototype.mod = function(t) {
|
|
538
|
-
var e =
|
|
538
|
+
var e = T();
|
|
539
539
|
return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(i.ZERO) > 0 && t.subTo(e, e), e;
|
|
540
540
|
}, i.prototype.modPowInt = function(t, e) {
|
|
541
541
|
var n;
|
|
542
|
-
return t < 256 || e.isEven() ? n = new
|
|
542
|
+
return t < 256 || e.isEven() ? n = new xe(e) : n = new Ue(e), this.exp(t, n);
|
|
543
543
|
}, i.prototype.clone = function() {
|
|
544
|
-
var t =
|
|
544
|
+
var t = T();
|
|
545
545
|
return this.copyTo(t), t;
|
|
546
546
|
}, i.prototype.intValue = function() {
|
|
547
547
|
if (this.s < 0) {
|
|
@@ -577,35 +577,35 @@ var ee = (
|
|
|
577
577
|
}, i.prototype.max = function(t) {
|
|
578
578
|
return this.compareTo(t) > 0 ? this : t;
|
|
579
579
|
}, i.prototype.and = function(t) {
|
|
580
|
-
var e =
|
|
581
|
-
return this.bitwiseTo(t,
|
|
580
|
+
var e = T();
|
|
581
|
+
return this.bitwiseTo(t, Ln, e), e;
|
|
582
582
|
}, i.prototype.or = function(t) {
|
|
583
|
-
var e =
|
|
583
|
+
var e = T();
|
|
584
584
|
return this.bitwiseTo(t, Bt, e), e;
|
|
585
585
|
}, i.prototype.xor = function(t) {
|
|
586
|
-
var e =
|
|
587
|
-
return this.bitwiseTo(t,
|
|
586
|
+
var e = T();
|
|
587
|
+
return this.bitwiseTo(t, Oe, e), e;
|
|
588
588
|
}, i.prototype.andNot = function(t) {
|
|
589
|
-
var e =
|
|
590
|
-
return this.bitwiseTo(t,
|
|
589
|
+
var e = T();
|
|
590
|
+
return this.bitwiseTo(t, De, e), e;
|
|
591
591
|
}, i.prototype.not = function() {
|
|
592
|
-
for (var t =
|
|
592
|
+
for (var t = T(), e = 0; e < this.t; ++e)
|
|
593
593
|
t[e] = this.DM & ~this[e];
|
|
594
594
|
return t.t = this.t, t.s = ~this.s, t;
|
|
595
595
|
}, i.prototype.shiftLeft = function(t) {
|
|
596
|
-
var e =
|
|
596
|
+
var e = T();
|
|
597
597
|
return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
|
|
598
598
|
}, i.prototype.shiftRight = function(t) {
|
|
599
|
-
var e =
|
|
599
|
+
var e = T();
|
|
600
600
|
return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
|
|
601
601
|
}, i.prototype.getLowestSetBit = function() {
|
|
602
602
|
for (var t = 0; t < this.t; ++t)
|
|
603
603
|
if (this[t] != 0)
|
|
604
|
-
return t * this.DB +
|
|
604
|
+
return t * this.DB + Vn(this[t]);
|
|
605
605
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
606
606
|
}, i.prototype.bitCount = function() {
|
|
607
607
|
for (var t = 0, e = this.s & this.DM, n = 0; n < this.t; ++n)
|
|
608
|
-
t +=
|
|
608
|
+
t += Mn(this[n] ^ e);
|
|
609
609
|
return t;
|
|
610
610
|
}, i.prototype.testBit = function(t) {
|
|
611
611
|
var e = Math.floor(t / this.DB);
|
|
@@ -613,39 +613,39 @@ var ee = (
|
|
|
613
613
|
}, i.prototype.setBit = function(t) {
|
|
614
614
|
return this.changeBit(t, Bt);
|
|
615
615
|
}, i.prototype.clearBit = function(t) {
|
|
616
|
-
return this.changeBit(t,
|
|
616
|
+
return this.changeBit(t, De);
|
|
617
617
|
}, i.prototype.flipBit = function(t) {
|
|
618
|
-
return this.changeBit(t,
|
|
618
|
+
return this.changeBit(t, Oe);
|
|
619
619
|
}, i.prototype.add = function(t) {
|
|
620
|
-
var e =
|
|
620
|
+
var e = T();
|
|
621
621
|
return this.addTo(t, e), e;
|
|
622
622
|
}, i.prototype.subtract = function(t) {
|
|
623
|
-
var e =
|
|
623
|
+
var e = T();
|
|
624
624
|
return this.subTo(t, e), e;
|
|
625
625
|
}, i.prototype.multiply = function(t) {
|
|
626
|
-
var e =
|
|
626
|
+
var e = T();
|
|
627
627
|
return this.multiplyTo(t, e), e;
|
|
628
628
|
}, i.prototype.divide = function(t) {
|
|
629
|
-
var e =
|
|
629
|
+
var e = T();
|
|
630
630
|
return this.divRemTo(t, e, null), e;
|
|
631
631
|
}, i.prototype.remainder = function(t) {
|
|
632
|
-
var e =
|
|
632
|
+
var e = T();
|
|
633
633
|
return this.divRemTo(t, null, e), e;
|
|
634
634
|
}, i.prototype.divideAndRemainder = function(t) {
|
|
635
|
-
var e =
|
|
635
|
+
var e = T(), n = T();
|
|
636
636
|
return this.divRemTo(t, e, n), [e, n];
|
|
637
637
|
}, i.prototype.modPow = function(t, e) {
|
|
638
|
-
var n = t.bitLength(), r, s =
|
|
638
|
+
var n = t.bitLength(), r, s = it(1), a;
|
|
639
639
|
if (n <= 0)
|
|
640
640
|
return s;
|
|
641
|
-
n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new
|
|
641
|
+
n < 18 ? r = 1 : n < 48 ? r = 3 : n < 144 ? r = 4 : n < 768 ? r = 5 : r = 6, n < 8 ? a = new xe(e) : e.isEven() ? a = new Xn(e) : a = new Ue(e);
|
|
642
642
|
var o = [], c = 3, u = r - 1, l = (1 << r) - 1;
|
|
643
643
|
if (o[1] = a.convert(this), r > 1) {
|
|
644
|
-
var f =
|
|
644
|
+
var f = T();
|
|
645
645
|
for (a.sqrTo(o[1], f); c <= l; )
|
|
646
|
-
o[c] =
|
|
646
|
+
o[c] = T(), a.mulTo(f, o[c - 2], o[c]), c += 2;
|
|
647
647
|
}
|
|
648
|
-
var d = t.t - 1, g, P = !0, m =
|
|
648
|
+
var d = t.t - 1, g, P = !0, m = T(), _;
|
|
649
649
|
for (n = xt(t[d]) - 1; d >= 0; ) {
|
|
650
650
|
for (n >= u ? g = t[d] >> n - u & l : (g = (t[d] & (1 << n + 1) - 1) << u - n, d > 0 && (g |= t[d - 1] >> this.DB + n - u)), c = r; (g & 1) == 0; )
|
|
651
651
|
g >>= 1, --c;
|
|
@@ -664,7 +664,7 @@ var ee = (
|
|
|
664
664
|
var e = t.isEven();
|
|
665
665
|
if (this.isEven() && e || t.signum() == 0)
|
|
666
666
|
return i.ZERO;
|
|
667
|
-
for (var n = t.clone(), r = this.clone(), s =
|
|
667
|
+
for (var n = t.clone(), r = this.clone(), s = it(1), a = it(0), o = it(0), c = it(1); n.signum() != 0; ) {
|
|
668
668
|
for (; n.isEven(); )
|
|
669
669
|
n.rShiftTo(1, n), e ? ((!s.isEven() || !a.isEven()) && (s.addTo(this, s), a.subTo(t, a)), s.rShiftTo(1, s)) : a.isEven() || a.subTo(t, a), a.rShiftTo(1, a);
|
|
670
670
|
for (; r.isEven(); )
|
|
@@ -681,7 +681,7 @@ var ee = (
|
|
|
681
681
|
return c;
|
|
682
682
|
return c.signum() < 0 ? c.add(t) : c;
|
|
683
683
|
}, i.prototype.pow = function(t) {
|
|
684
|
-
return this.exp(t, new
|
|
684
|
+
return this.exp(t, new Wn());
|
|
685
685
|
}, i.prototype.gcd = function(t) {
|
|
686
686
|
var e = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
|
|
687
687
|
if (e.compareTo(n) < 0) {
|
|
@@ -705,7 +705,7 @@ var ee = (
|
|
|
705
705
|
if (n.isEven())
|
|
706
706
|
return !1;
|
|
707
707
|
for (e = 1; e < L.length; ) {
|
|
708
|
-
for (var r = L[e], s = e + 1; s < L.length && r <
|
|
708
|
+
for (var r = L[e], s = e + 1; s < L.length && r < Hn; )
|
|
709
709
|
r *= L[s++];
|
|
710
710
|
for (r = n.modInt(r); e < s; )
|
|
711
711
|
if (r % L[e++] == 0)
|
|
@@ -738,7 +738,7 @@ var ee = (
|
|
|
738
738
|
}
|
|
739
739
|
this.t = 0, this.s = 0;
|
|
740
740
|
for (var r = t.length, s = !1, a = 0; --r >= 0; ) {
|
|
741
|
-
var o = n == 8 ? +t[r] & 255 :
|
|
741
|
+
var o = n == 8 ? +t[r] & 255 : Ve(t, r);
|
|
742
742
|
if (o < 0) {
|
|
743
743
|
t.charAt(r) == "-" && (s = !0);
|
|
744
744
|
continue;
|
|
@@ -814,19 +814,19 @@ var ee = (
|
|
|
814
814
|
e?.fromInt(0), n != null && this.copyTo(n);
|
|
815
815
|
return;
|
|
816
816
|
}
|
|
817
|
-
n == null && (n =
|
|
818
|
-
var a =
|
|
817
|
+
n == null && (n = T());
|
|
818
|
+
var a = T(), o = this.s, c = t.s, u = this.DB - xt(r[r.t - 1]);
|
|
819
819
|
u > 0 ? (r.lShiftTo(u, a), s.lShiftTo(u, n)) : (r.copyTo(a), s.copyTo(n));
|
|
820
820
|
var l = a.t, f = a[l - 1];
|
|
821
821
|
if (f != 0) {
|
|
822
|
-
var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t,
|
|
823
|
-
for (a.dlShiftTo(
|
|
822
|
+
var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, P = (1 << this.F1) / d, m = 1 << this.F2, _ = n.t, y = _ - l, v = e ?? T();
|
|
823
|
+
for (a.dlShiftTo(y, v), n.compareTo(v) >= 0 && (n[n.t++] = 1, n.subTo(v, n)), i.ONE.dlShiftTo(l, v), v.subTo(a, a); a.t < l; )
|
|
824
824
|
a[a.t++] = 0;
|
|
825
|
-
for (; --
|
|
826
|
-
var
|
|
827
|
-
if ((n[_] += a.am(0,
|
|
828
|
-
for (a.dlShiftTo(
|
|
829
|
-
n.subTo(
|
|
825
|
+
for (; --y >= 0; ) {
|
|
826
|
+
var A = n[--_] == f ? this.DM : Math.floor(n[_] * g + (n[_ - 1] + m) * P);
|
|
827
|
+
if ((n[_] += a.am(0, A, n, y, 0, l)) < A)
|
|
828
|
+
for (a.dlShiftTo(y, v), n.subTo(v, n); n[_] < --A; )
|
|
829
|
+
n.subTo(v, n);
|
|
830
830
|
}
|
|
831
831
|
e != null && (n.drShiftTo(l, e), o != c && i.ZERO.subTo(e, e)), n.t = l, n.clamp(), u > 0 && n.rShiftTo(u, n), o < 0 && i.ZERO.subTo(n, n);
|
|
832
832
|
}
|
|
@@ -844,7 +844,7 @@ var ee = (
|
|
|
844
844
|
}, i.prototype.exp = function(t, e) {
|
|
845
845
|
if (t > 4294967295 || t < 1)
|
|
846
846
|
return i.ONE;
|
|
847
|
-
var n =
|
|
847
|
+
var n = T(), r = T(), s = e.convert(this), a = xt(t) - 1;
|
|
848
848
|
for (s.copyTo(n); --a >= 0; )
|
|
849
849
|
if (e.sqrTo(n, r), (t & 1 << a) > 0)
|
|
850
850
|
e.mulTo(r, s, n);
|
|
@@ -858,14 +858,14 @@ var ee = (
|
|
|
858
858
|
}, i.prototype.toRadix = function(t) {
|
|
859
859
|
if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
|
|
860
860
|
return "0";
|
|
861
|
-
var e = this.chunkSize(t), n = Math.pow(t, e), r =
|
|
861
|
+
var e = this.chunkSize(t), n = Math.pow(t, e), r = it(n), s = T(), a = T(), o = "";
|
|
862
862
|
for (this.divRemTo(r, s, a); s.signum() > 0; )
|
|
863
863
|
o = (n + a.intValue()).toString(t).substring(1) + o, s.divRemTo(r, s, a);
|
|
864
864
|
return a.intValue().toString(t) + o;
|
|
865
865
|
}, i.prototype.fromRadix = function(t, e) {
|
|
866
866
|
this.fromInt(0), e == null && (e = 10);
|
|
867
867
|
for (var n = this.chunkSize(e), r = Math.pow(e, n), s = !1, a = 0, o = 0, c = 0; c < t.length; ++c) {
|
|
868
|
-
var u =
|
|
868
|
+
var u = Ve(t, c);
|
|
869
869
|
if (u < 0) {
|
|
870
870
|
t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
|
|
871
871
|
continue;
|
|
@@ -957,7 +957,7 @@ var ee = (
|
|
|
957
957
|
return !1;
|
|
958
958
|
var r = e.shiftRight(n);
|
|
959
959
|
t = t + 1 >> 1, t > L.length && (t = L.length);
|
|
960
|
-
for (var s =
|
|
960
|
+
for (var s = T(), a = 0; a < t; ++a) {
|
|
961
961
|
s.fromInt(L[Math.floor(Math.random() * L.length)]);
|
|
962
962
|
var o = s.modPow(r, this);
|
|
963
963
|
if (o.compareTo(i.ONE) != 0 && o.compareTo(e) != 0) {
|
|
@@ -970,7 +970,7 @@ var ee = (
|
|
|
970
970
|
}
|
|
971
971
|
return !0;
|
|
972
972
|
}, i.prototype.square = function() {
|
|
973
|
-
var t =
|
|
973
|
+
var t = T();
|
|
974
974
|
return this.squareTo(t), t;
|
|
975
975
|
}, i.prototype.gcda = function(t, e) {
|
|
976
976
|
var n = this.s < 0 ? this.negate() : this.clone(), r = t.s < 0 ? t.negate() : t.clone();
|
|
@@ -1009,7 +1009,7 @@ var ee = (
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}, i;
|
|
1011
1011
|
})()
|
|
1012
|
-
),
|
|
1012
|
+
), Wn = (
|
|
1013
1013
|
/** @class */
|
|
1014
1014
|
(function() {
|
|
1015
1015
|
function i() {
|
|
@@ -1024,7 +1024,7 @@ var ee = (
|
|
|
1024
1024
|
t.squareTo(e);
|
|
1025
1025
|
}, i;
|
|
1026
1026
|
})()
|
|
1027
|
-
),
|
|
1027
|
+
), xe = (
|
|
1028
1028
|
/** @class */
|
|
1029
1029
|
(function() {
|
|
1030
1030
|
function i(t) {
|
|
@@ -1042,17 +1042,17 @@ var ee = (
|
|
|
1042
1042
|
t.squareTo(e), this.reduce(e);
|
|
1043
1043
|
}, i;
|
|
1044
1044
|
})()
|
|
1045
|
-
),
|
|
1045
|
+
), Ue = (
|
|
1046
1046
|
/** @class */
|
|
1047
1047
|
(function() {
|
|
1048
1048
|
function i(t) {
|
|
1049
1049
|
this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
|
|
1050
1050
|
}
|
|
1051
1051
|
return i.prototype.convert = function(t) {
|
|
1052
|
-
var e =
|
|
1053
|
-
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(
|
|
1052
|
+
var e = T();
|
|
1053
|
+
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(w.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
1054
1054
|
}, i.prototype.revert = function(t) {
|
|
1055
|
-
var e =
|
|
1055
|
+
var e = T();
|
|
1056
1056
|
return t.copyTo(e), this.reduce(e), e;
|
|
1057
1057
|
}, i.prototype.reduce = function(t) {
|
|
1058
1058
|
for (; t.t <= this.mt2; )
|
|
@@ -1069,18 +1069,18 @@ var ee = (
|
|
|
1069
1069
|
t.squareTo(e), this.reduce(e);
|
|
1070
1070
|
}, i;
|
|
1071
1071
|
})()
|
|
1072
|
-
),
|
|
1072
|
+
), Xn = (
|
|
1073
1073
|
/** @class */
|
|
1074
1074
|
(function() {
|
|
1075
1075
|
function i(t) {
|
|
1076
|
-
this.m = t, this.r2 =
|
|
1076
|
+
this.m = t, this.r2 = T(), this.q3 = T(), w.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
|
|
1077
1077
|
}
|
|
1078
1078
|
return i.prototype.convert = function(t) {
|
|
1079
1079
|
if (t.s < 0 || t.t > 2 * this.m.t)
|
|
1080
1080
|
return t.mod(this.m);
|
|
1081
1081
|
if (t.compareTo(this.m) < 0)
|
|
1082
1082
|
return t;
|
|
1083
|
-
var e =
|
|
1083
|
+
var e = T();
|
|
1084
1084
|
return t.copyTo(e), this.reduce(e), e;
|
|
1085
1085
|
}, i.prototype.revert = function(t) {
|
|
1086
1086
|
return t;
|
|
@@ -1096,64 +1096,64 @@ var ee = (
|
|
|
1096
1096
|
}, i;
|
|
1097
1097
|
})()
|
|
1098
1098
|
);
|
|
1099
|
-
function
|
|
1100
|
-
return new
|
|
1099
|
+
function T() {
|
|
1100
|
+
return new w(null);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return new
|
|
1102
|
+
function D(i, t) {
|
|
1103
|
+
return new w(i, t);
|
|
1104
1104
|
}
|
|
1105
|
-
var
|
|
1106
|
-
|
|
1105
|
+
var Le = typeof navigator < "u";
|
|
1106
|
+
Le && Be && navigator.appName == "Microsoft Internet Explorer" ? (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1107
1107
|
for (var o = e & 32767, c = e >> 15; --a >= 0; ) {
|
|
1108
1108
|
var u = this[t] & 32767, l = this[t++] >> 15, f = c * u + l * o;
|
|
1109
1109
|
u = o * u + ((f & 32767) << 15) + n[r] + (s & 1073741823), s = (u >>> 30) + (f >>> 15) + c * l + (s >>> 30), n[r++] = u & 1073741823;
|
|
1110
1110
|
}
|
|
1111
1111
|
return s;
|
|
1112
|
-
},
|
|
1112
|
+
}, st = 30) : Le && Be && navigator.appName != "Netscape" ? (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1113
1113
|
for (; --a >= 0; ) {
|
|
1114
1114
|
var o = e * this[t++] + n[r] + s;
|
|
1115
1115
|
s = Math.floor(o / 67108864), n[r++] = o & 67108863;
|
|
1116
1116
|
}
|
|
1117
1117
|
return s;
|
|
1118
|
-
},
|
|
1118
|
+
}, st = 26) : (w.prototype.am = function(t, e, n, r, s, a) {
|
|
1119
1119
|
for (var o = e & 16383, c = e >> 14; --a >= 0; ) {
|
|
1120
1120
|
var u = this[t] & 16383, l = this[t++] >> 14, f = c * u + l * o;
|
|
1121
1121
|
u = o * u + ((f & 16383) << 14) + n[r] + s, s = (u >> 28) + (f >> 14) + c * l, n[r++] = u & 268435455;
|
|
1122
1122
|
}
|
|
1123
1123
|
return s;
|
|
1124
|
-
},
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1124
|
+
}, st = 28);
|
|
1125
|
+
w.prototype.DB = st;
|
|
1126
|
+
w.prototype.DM = (1 << st) - 1;
|
|
1127
|
+
w.prototype.DV = 1 << st;
|
|
1128
1128
|
var _e = 52;
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
var Xt = [],
|
|
1133
|
-
|
|
1129
|
+
w.prototype.FV = Math.pow(2, _e);
|
|
1130
|
+
w.prototype.F1 = _e - st;
|
|
1131
|
+
w.prototype.F2 = 2 * st - _e;
|
|
1132
|
+
var Xt = [], Et, q;
|
|
1133
|
+
Et = 48;
|
|
1134
1134
|
for (q = 0; q <= 9; ++q)
|
|
1135
|
-
Xt[
|
|
1136
|
-
|
|
1135
|
+
Xt[Et++] = q;
|
|
1136
|
+
Et = 97;
|
|
1137
1137
|
for (q = 10; q < 36; ++q)
|
|
1138
|
-
Xt[
|
|
1139
|
-
|
|
1138
|
+
Xt[Et++] = q;
|
|
1139
|
+
Et = 65;
|
|
1140
1140
|
for (q = 10; q < 36; ++q)
|
|
1141
|
-
Xt[
|
|
1142
|
-
function
|
|
1141
|
+
Xt[Et++] = q;
|
|
1142
|
+
function Ve(i, t) {
|
|
1143
1143
|
var e = Xt[i.charCodeAt(t)];
|
|
1144
1144
|
return e ?? -1;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
var t =
|
|
1146
|
+
function it(i) {
|
|
1147
|
+
var t = T();
|
|
1148
1148
|
return t.fromInt(i), t;
|
|
1149
1149
|
}
|
|
1150
1150
|
function xt(i) {
|
|
1151
1151
|
var t = 1, e;
|
|
1152
1152
|
return (e = i >>> 16) != 0 && (i = e, t += 16), (e = i >> 8) != 0 && (i = e, t += 8), (e = i >> 4) != 0 && (i = e, t += 4), (e = i >> 2) != 0 && (i = e, t += 2), (e = i >> 1) != 0 && (i = e, t += 1), t;
|
|
1153
1153
|
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
var
|
|
1154
|
+
w.ZERO = it(0);
|
|
1155
|
+
w.ONE = it(1);
|
|
1156
|
+
var zn = (
|
|
1157
1157
|
/** @class */
|
|
1158
1158
|
(function() {
|
|
1159
1159
|
function i() {
|
|
@@ -1172,39 +1172,39 @@ var jn = (
|
|
|
1172
1172
|
}, i;
|
|
1173
1173
|
})()
|
|
1174
1174
|
);
|
|
1175
|
-
function
|
|
1176
|
-
return new
|
|
1175
|
+
function Gn() {
|
|
1176
|
+
return new zn();
|
|
1177
1177
|
}
|
|
1178
|
-
var
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1178
|
+
var sn = 256, Ut, rt = null, H;
|
|
1179
|
+
if (rt == null) {
|
|
1180
|
+
rt = [], H = 0;
|
|
1181
1181
|
var Lt = void 0;
|
|
1182
1182
|
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
1183
1183
|
var ne = new Uint32Array(256);
|
|
1184
1184
|
for (self.crypto.getRandomValues(ne), Lt = 0; Lt < ne.length; ++Lt)
|
|
1185
|
-
|
|
1185
|
+
rt[H++] = ne[Lt] & 255;
|
|
1186
1186
|
}
|
|
1187
1187
|
var Vt = 0, Mt = function(i) {
|
|
1188
|
-
if (Vt = Vt || 0, Vt >= 256 || H >=
|
|
1188
|
+
if (Vt = Vt || 0, Vt >= 256 || H >= sn) {
|
|
1189
1189
|
self.removeEventListener ? self.removeEventListener("mousemove", Mt, !1) : self.detachEvent && self.detachEvent("onmousemove", Mt);
|
|
1190
1190
|
return;
|
|
1191
1191
|
}
|
|
1192
1192
|
try {
|
|
1193
1193
|
var t = i.x + i.y;
|
|
1194
|
-
|
|
1194
|
+
rt[H++] = t & 255, Vt += 1;
|
|
1195
1195
|
} catch {
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
1198
|
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Mt, !1) : self.attachEvent && self.attachEvent("onmousemove", Mt));
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function $n() {
|
|
1201
1201
|
if (Ut == null) {
|
|
1202
|
-
for (Ut =
|
|
1202
|
+
for (Ut = Gn(); H < sn; ) {
|
|
1203
1203
|
var i = Math.floor(65536 * Math.random());
|
|
1204
|
-
|
|
1204
|
+
rt[H++] = i & 255;
|
|
1205
1205
|
}
|
|
1206
|
-
for (Ut.init(
|
|
1207
|
-
|
|
1206
|
+
for (Ut.init(rt), H = 0; H < rt.length; ++H)
|
|
1207
|
+
rt[H] = 0;
|
|
1208
1208
|
H = 0;
|
|
1209
1209
|
}
|
|
1210
1210
|
return Ut.next();
|
|
@@ -1216,79 +1216,79 @@ var Ht = (
|
|
|
1216
1216
|
}
|
|
1217
1217
|
return i.prototype.nextBytes = function(t) {
|
|
1218
1218
|
for (var e = 0; e < t.length; ++e)
|
|
1219
|
-
t[e] =
|
|
1219
|
+
t[e] = $n();
|
|
1220
1220
|
}, i;
|
|
1221
1221
|
})()
|
|
1222
1222
|
);
|
|
1223
1223
|
function ue(i) {
|
|
1224
|
-
return
|
|
1224
|
+
return Qn(si(Jn(i), i.length * 8));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Me(i) {
|
|
1227
1227
|
for (var t = "0123456789abcdef", e = "", n = 0; n < i.length; n++) {
|
|
1228
1228
|
var r = i.charCodeAt(n);
|
|
1229
1229
|
e += t.charAt(r >>> 4 & 15) + t.charAt(r & 15);
|
|
1230
1230
|
}
|
|
1231
1231
|
return e;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function Jn(i) {
|
|
1234
1234
|
for (var t = Array(i.length >> 2), e = 0; e < t.length; e++)
|
|
1235
1235
|
t[e] = 0;
|
|
1236
1236
|
for (var e = 0; e < i.length * 8; e += 8)
|
|
1237
1237
|
t[e >> 5] |= (i.charCodeAt(e / 8) & 255) << 24 - e % 32;
|
|
1238
1238
|
return t;
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function Qn(i) {
|
|
1241
1241
|
for (var t = "", e = 0; e < i.length * 32; e += 8)
|
|
1242
1242
|
t += String.fromCharCode(i[e >> 5] >>> 24 - e % 32 & 255);
|
|
1243
1243
|
return t;
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Q(i, t) {
|
|
1246
1246
|
return i >>> t | i << 32 - t;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function an(i, t) {
|
|
1249
1249
|
return i >>> t;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Zn(i, t, e) {
|
|
1252
1252
|
return i & t ^ ~i & e;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Yn(i, t, e) {
|
|
1255
1255
|
return i & t ^ i & e ^ t & e;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function ti(i) {
|
|
1258
|
+
return Q(i, 2) ^ Q(i, 13) ^ Q(i, 22);
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1260
|
+
function ei(i) {
|
|
1261
|
+
return Q(i, 6) ^ Q(i, 11) ^ Q(i, 25);
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1263
|
+
function ni(i) {
|
|
1264
|
+
return Q(i, 7) ^ Q(i, 18) ^ an(i, 3);
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
1266
|
+
function ii(i) {
|
|
1267
|
+
return Q(i, 17) ^ Q(i, 19) ^ an(i, 10);
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1269
|
+
var ri = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
|
|
1270
|
+
function si(i, t) {
|
|
1271
1271
|
var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), n = new Array(64), r, s, a, o, c, u, l, f, d, g, P, m;
|
|
1272
1272
|
for (i[t >> 5] |= 128 << 24 - t % 32, i[(t + 64 >> 9 << 4) + 15] = t, d = 0; d < i.length; d += 16) {
|
|
1273
1273
|
for (r = e[0], s = e[1], a = e[2], o = e[3], c = e[4], u = e[5], l = e[6], f = e[7], g = 0; g < 64; g++)
|
|
1274
|
-
g < 16 ? n[g] = i[g + d] : n[g] =
|
|
1275
|
-
e[0] =
|
|
1274
|
+
g < 16 ? n[g] = i[g + d] : n[g] = B(B(B(ii(n[g - 2]), n[g - 7]), ni(n[g - 15])), n[g - 16]), P = B(B(B(B(f, ei(c)), Zn(c, u, l)), ri[g]), n[g]), m = B(ti(r), Yn(r, s, a)), f = l, l = u, u = c, c = B(o, P), o = a, a = s, s = r, r = B(P, m);
|
|
1275
|
+
e[0] = B(r, e[0]), e[1] = B(s, e[1]), e[2] = B(a, e[2]), e[3] = B(o, e[3]), e[4] = B(c, e[4]), e[5] = B(u, e[5]), e[6] = B(l, e[6]), e[7] = B(f, e[7]);
|
|
1276
1276
|
}
|
|
1277
1277
|
return e;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function B(i, t) {
|
|
1280
1280
|
var e = (i & 65535) + (t & 65535), n = (i >> 16) + (t >> 16) + (e >> 16);
|
|
1281
1281
|
return n << 16 | e & 65535;
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function ai(i, t) {
|
|
1284
1284
|
if (t < i.length + 22)
|
|
1285
1285
|
return console.error("Message too long for RSA"), null;
|
|
1286
1286
|
for (var e = t - i.length - 6, n = "", r = 0; r < e; r += 2)
|
|
1287
1287
|
n += "ff";
|
|
1288
1288
|
var s = "0001" + n + "00" + i;
|
|
1289
|
-
return
|
|
1289
|
+
return D(s, 16);
|
|
1290
1290
|
}
|
|
1291
|
-
function
|
|
1291
|
+
function oi(i, t) {
|
|
1292
1292
|
if (t < i.length + 11)
|
|
1293
1293
|
return console.error("Message too long for RSA"), null;
|
|
1294
1294
|
for (var e = [], n = i.length - 1; n >= 0 && t > 0; ) {
|
|
@@ -1301,9 +1301,9 @@ function ei(i, t) {
|
|
|
1301
1301
|
s.nextBytes(a);
|
|
1302
1302
|
e[--t] = a[0];
|
|
1303
1303
|
}
|
|
1304
|
-
return e[--t] = 2, e[--t] = 0, new
|
|
1304
|
+
return e[--t] = 2, e[--t] = 0, new w(e);
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Fe(i, t, e) {
|
|
1307
1307
|
for (var n = "", r = 0; n.length < t; )
|
|
1308
1308
|
n += e(String.fromCharCode.apply(String, i.concat([
|
|
1309
1309
|
(r & 4278190080) >> 24,
|
|
@@ -1313,9 +1313,9 @@ function Ve(i, t, e) {
|
|
|
1313
1313
|
]))), r += 1;
|
|
1314
1314
|
return n;
|
|
1315
1315
|
}
|
|
1316
|
-
var
|
|
1317
|
-
function
|
|
1318
|
-
var e =
|
|
1316
|
+
var ci = 32;
|
|
1317
|
+
function ui(i, t) {
|
|
1318
|
+
var e = ci, n = ue;
|
|
1319
1319
|
if (i.length + 2 * e + 2 > t)
|
|
1320
1320
|
throw "Message too long for RSA";
|
|
1321
1321
|
var r = "", s;
|
|
@@ -1323,15 +1323,15 @@ function ii(i, t) {
|
|
|
1323
1323
|
r += "\0";
|
|
1324
1324
|
var a = n("") + r + "" + i, o = new Array(e);
|
|
1325
1325
|
new Ht().nextBytes(o);
|
|
1326
|
-
var c =
|
|
1326
|
+
var c = Fe(o, a.length, n), u = [];
|
|
1327
1327
|
for (s = 0; s < a.length; s += 1)
|
|
1328
1328
|
u[s] = a.charCodeAt(s) ^ c.charCodeAt(s);
|
|
1329
|
-
var l =
|
|
1329
|
+
var l = Fe(u, o.length, n), f = [0];
|
|
1330
1330
|
for (s = 0; s < o.length; s += 1)
|
|
1331
1331
|
f[s + 1] = o[s] ^ l.charCodeAt(s);
|
|
1332
|
-
return new
|
|
1332
|
+
return new w(f.concat(u));
|
|
1333
1333
|
}
|
|
1334
|
-
var
|
|
1334
|
+
var li = (
|
|
1335
1335
|
/** @class */
|
|
1336
1336
|
(function() {
|
|
1337
1337
|
function i() {
|
|
@@ -1346,9 +1346,9 @@ var ri = (
|
|
|
1346
1346
|
e = e.add(this.p);
|
|
1347
1347
|
return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
1348
1348
|
}, i.prototype.setPublic = function(t, e) {
|
|
1349
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1349
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
|
|
1350
1350
|
}, i.prototype.encrypt = function(t, e) {
|
|
1351
|
-
typeof e > "u" && (e =
|
|
1351
|
+
typeof e > "u" && (e = oi);
|
|
1352
1352
|
var n = this.n.bitLength() + 7 >> 3, r = e(t, n);
|
|
1353
1353
|
if (r == null)
|
|
1354
1354
|
return null;
|
|
@@ -1359,53 +1359,53 @@ var ri = (
|
|
|
1359
1359
|
a = "0" + a;
|
|
1360
1360
|
return a;
|
|
1361
1361
|
}, i.prototype.setPrivate = function(t, e, n) {
|
|
1362
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1362
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16), this.d = D(n, 16)) : console.error("Invalid RSA private key");
|
|
1363
1363
|
}, i.prototype.setPrivateEx = function(t, e, n, r, s, a, o, c) {
|
|
1364
|
-
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n =
|
|
1364
|
+
t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = D(t, 16), this.e = parseInt(e, 16), this.d = D(n, 16), this.p = D(r, 16), this.q = D(s, 16), this.dmp1 = D(a, 16), this.dmq1 = D(o, 16), this.coeff = D(c, 16)) : console.error("Invalid RSA private key");
|
|
1365
1365
|
}, i.prototype.generate = function(t, e) {
|
|
1366
1366
|
var n = new Ht(), r = t >> 1;
|
|
1367
1367
|
this.e = parseInt(e, 16);
|
|
1368
|
-
for (var s = new
|
|
1369
|
-
for (; this.p = new
|
|
1368
|
+
for (var s = new w(e, 16); ; ) {
|
|
1369
|
+
for (; this.p = new w(t - r, 1, n), !(this.p.subtract(w.ONE).gcd(s).compareTo(w.ONE) == 0 && this.p.isProbablePrime(10)); )
|
|
1370
1370
|
;
|
|
1371
|
-
for (; this.q = new
|
|
1371
|
+
for (; this.q = new w(r, 1, n), !(this.q.subtract(w.ONE).gcd(s).compareTo(w.ONE) == 0 && this.q.isProbablePrime(10)); )
|
|
1372
1372
|
;
|
|
1373
1373
|
if (this.p.compareTo(this.q) <= 0) {
|
|
1374
1374
|
var a = this.p;
|
|
1375
1375
|
this.p = this.q, this.q = a;
|
|
1376
1376
|
}
|
|
1377
|
-
var o = this.p.subtract(
|
|
1378
|
-
if (u.gcd(s).compareTo(
|
|
1377
|
+
var o = this.p.subtract(w.ONE), c = this.q.subtract(w.ONE), u = o.multiply(c);
|
|
1378
|
+
if (u.gcd(s).compareTo(w.ONE) == 0) {
|
|
1379
1379
|
this.n = this.p.multiply(this.q), this.d = s.modInverse(u), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(c), this.coeff = this.q.modInverse(this.p);
|
|
1380
1380
|
break;
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
1383
|
}, i.prototype.decrypt = function(t) {
|
|
1384
|
-
var e =
|
|
1385
|
-
return n == null ? null :
|
|
1384
|
+
var e = D(t, 16), n = this.doPrivate(e);
|
|
1385
|
+
return n == null ? null : hi(n, this.n.bitLength() + 7 >> 3);
|
|
1386
1386
|
}, i.prototype.generateAsync = function(t, e, n) {
|
|
1387
1387
|
var r = new Ht(), s = t >> 1;
|
|
1388
1388
|
this.e = parseInt(e, 16);
|
|
1389
|
-
var a = new
|
|
1389
|
+
var a = new w(e, 16), o = this, c = function() {
|
|
1390
1390
|
var u = function() {
|
|
1391
1391
|
if (o.p.compareTo(o.q) <= 0) {
|
|
1392
1392
|
var d = o.p;
|
|
1393
1393
|
o.p = o.q, o.q = d;
|
|
1394
1394
|
}
|
|
1395
|
-
var g = o.p.subtract(
|
|
1396
|
-
m.gcd(a).compareTo(
|
|
1395
|
+
var g = o.p.subtract(w.ONE), P = o.q.subtract(w.ONE), m = g.multiply(P);
|
|
1396
|
+
m.gcd(a).compareTo(w.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(m), o.dmp1 = o.d.mod(g), o.dmq1 = o.d.mod(P), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
|
|
1397
1397
|
n();
|
|
1398
1398
|
}, 0)) : setTimeout(c, 0);
|
|
1399
1399
|
}, l = function() {
|
|
1400
|
-
o.q =
|
|
1401
|
-
o.q.subtract(
|
|
1402
|
-
d.compareTo(
|
|
1400
|
+
o.q = T(), o.q.fromNumberAsync(s, 1, r, function() {
|
|
1401
|
+
o.q.subtract(w.ONE).gcda(a, function(d) {
|
|
1402
|
+
d.compareTo(w.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(l, 0);
|
|
1403
1403
|
});
|
|
1404
1404
|
});
|
|
1405
1405
|
}, f = function() {
|
|
1406
|
-
o.p =
|
|
1407
|
-
o.p.subtract(
|
|
1408
|
-
d.compareTo(
|
|
1406
|
+
o.p = T(), o.p.fromNumberAsync(t - s, 1, r, function() {
|
|
1407
|
+
o.p.subtract(w.ONE).gcda(a, function(d) {
|
|
1408
|
+
d.compareTo(w.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0);
|
|
1409
1409
|
});
|
|
1410
1410
|
});
|
|
1411
1411
|
};
|
|
@@ -1413,7 +1413,7 @@ var ri = (
|
|
|
1413
1413
|
};
|
|
1414
1414
|
setTimeout(c, 0);
|
|
1415
1415
|
}, i.prototype.sign = function(t, e, n) {
|
|
1416
|
-
var r =
|
|
1416
|
+
var r = fi(n), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = ai(s, a);
|
|
1417
1417
|
if (o == null)
|
|
1418
1418
|
return null;
|
|
1419
1419
|
var c = this.doPrivate(o);
|
|
@@ -1423,15 +1423,15 @@ var ri = (
|
|
|
1423
1423
|
u = "0" + u;
|
|
1424
1424
|
return u;
|
|
1425
1425
|
}, i.prototype.verify = function(t, e, n) {
|
|
1426
|
-
var r =
|
|
1426
|
+
var r = D(e, 16), s = this.doPublic(r);
|
|
1427
1427
|
if (s == null)
|
|
1428
1428
|
return null;
|
|
1429
|
-
var a = s.toString(16).replace(/^1f+00/, ""), o =
|
|
1429
|
+
var a = s.toString(16).replace(/^1f+00/, ""), o = pi(a);
|
|
1430
1430
|
return o == n(t).toString();
|
|
1431
1431
|
}, i;
|
|
1432
1432
|
})()
|
|
1433
1433
|
);
|
|
1434
|
-
function
|
|
1434
|
+
function hi(i, t) {
|
|
1435
1435
|
for (var e = i.toByteArray(), n = 0; n < e.length && e[n] == 0; )
|
|
1436
1436
|
++n;
|
|
1437
1437
|
if (e.length - n != t - 1 || e[n] != 2)
|
|
@@ -1455,10 +1455,10 @@ var kt = {
|
|
|
1455
1455
|
sha512: "3051300d060960864801650304020305000440",
|
|
1456
1456
|
ripemd160: "3021300906052b2403020105000414"
|
|
1457
1457
|
};
|
|
1458
|
-
function
|
|
1458
|
+
function fi(i) {
|
|
1459
1459
|
return kt[i] || "";
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function pi(i) {
|
|
1462
1462
|
for (var t in kt)
|
|
1463
1463
|
if (kt.hasOwnProperty(t)) {
|
|
1464
1464
|
var e = kt[t], n = e.length;
|
|
@@ -1467,7 +1467,7 @@ function oi(i) {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
return i;
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function N(i, t, e) {
|
|
1471
1471
|
if (!t || !i)
|
|
1472
1472
|
throw new Error("extend failed, please check that all dependencies are included.");
|
|
1473
1473
|
var n = function() {
|
|
@@ -1489,14 +1489,14 @@ p.asn1.ASN1Util = new function() {
|
|
|
1489
1489
|
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
|
|
1490
1490
|
for (var r = "", s = 0; s < n; s++)
|
|
1491
1491
|
r += "f";
|
|
1492
|
-
var a = new
|
|
1492
|
+
var a = new w(r, 16), o = a.xor(i).add(w.ONE);
|
|
1493
1493
|
t = o.toString(16).replace(/^-/, "");
|
|
1494
1494
|
}
|
|
1495
1495
|
return t;
|
|
1496
1496
|
}, this.getPEMStringFromHex = function(i, t) {
|
|
1497
1497
|
return hextopem(i, t);
|
|
1498
1498
|
}, this.newObject = function(i) {
|
|
1499
|
-
var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime,
|
|
1499
|
+
var t = p, e = t.asn1, n = e.DERBoolean, r = e.DERInteger, s = e.DERBitString, a = e.DEROctetString, o = e.DERNull, c = e.DERObjectIdentifier, u = e.DEREnumerated, l = e.DERUTF8String, f = e.DERNumericString, d = e.DERPrintableString, g = e.DERTeletexString, P = e.DERIA5String, m = e.DERUTCTime, _ = e.DERGeneralizedTime, y = e.DERSequence, v = e.DERSet, A = e.DERTaggedObject, R = e.ASN1Util.newObject, U = Object.keys(i);
|
|
1500
1500
|
if (U.length != 1)
|
|
1501
1501
|
throw "key of param shall be only one.";
|
|
1502
1502
|
var E = U[0];
|
|
@@ -1531,33 +1531,33 @@ p.asn1.ASN1Util = new function() {
|
|
|
1531
1531
|
if (E == "gentime")
|
|
1532
1532
|
return new _(i[E]);
|
|
1533
1533
|
if (E == "seq") {
|
|
1534
|
-
for (var K = i[E],
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1534
|
+
for (var K = i[E], Z = [], X = 0; X < K.length; X++) {
|
|
1535
|
+
var k = R(K[X]);
|
|
1536
|
+
Z.push(k);
|
|
1537
1537
|
}
|
|
1538
|
-
return new
|
|
1538
|
+
return new y({ array: Z });
|
|
1539
1539
|
}
|
|
1540
1540
|
if (E == "set") {
|
|
1541
|
-
for (var K = i[E],
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1541
|
+
for (var K = i[E], Z = [], X = 0; X < K.length; X++) {
|
|
1542
|
+
var k = R(K[X]);
|
|
1543
|
+
Z.push(k);
|
|
1544
1544
|
}
|
|
1545
|
-
return new
|
|
1545
|
+
return new v({ array: Z });
|
|
1546
1546
|
}
|
|
1547
1547
|
if (E == "tag") {
|
|
1548
1548
|
var I = i[E];
|
|
1549
1549
|
if (Object.prototype.toString.call(I) === "[object Array]" && I.length == 3) {
|
|
1550
|
-
var
|
|
1551
|
-
return new
|
|
1550
|
+
var pt = R(I[2]);
|
|
1551
|
+
return new A({
|
|
1552
1552
|
tag: I[0],
|
|
1553
1553
|
explicit: I[1],
|
|
1554
|
-
obj:
|
|
1554
|
+
obj: pt
|
|
1555
1555
|
});
|
|
1556
1556
|
} else {
|
|
1557
|
-
var
|
|
1558
|
-
if (I.explicit !== void 0 && (
|
|
1557
|
+
var at = {};
|
|
1558
|
+
if (I.explicit !== void 0 && (at.explicit = I.explicit), I.tag !== void 0 && (at.tag = I.tag), I.obj === void 0)
|
|
1559
1559
|
throw "obj shall be specified for 'tag'.";
|
|
1560
|
-
return
|
|
1560
|
+
return at.obj = R(I.obj), new A(at);
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
}, this.jsonToASN1HEX = function(i) {
|
|
@@ -1569,7 +1569,7 @@ p.asn1.ASN1Util.oidHexToInt = function(i) {
|
|
|
1569
1569
|
for (var r = "", t = parseInt(i.substring(0, 2), 16), e = Math.floor(t / 40), n = t % 40, r = e + "." + n, s = "", a = 2; a < i.length; a += 2) {
|
|
1570
1570
|
var o = parseInt(i.substring(a, a + 2), 16), c = ("00000000" + o.toString(2)).slice(-8);
|
|
1571
1571
|
if (s = s + c.substring(1, 8), c.substring(0, 1) == "0") {
|
|
1572
|
-
var u = new
|
|
1572
|
+
var u = new w(s, 2);
|
|
1573
1573
|
r = r + "." + u.toString(10), s = "";
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
@@ -1580,7 +1580,7 @@ p.asn1.ASN1Util.oidIntToHex = function(i) {
|
|
|
1580
1580
|
var c = o.toString(16);
|
|
1581
1581
|
return c.length == 1 && (c = "0" + c), c;
|
|
1582
1582
|
}, e = function(o) {
|
|
1583
|
-
var c = "", u = new
|
|
1583
|
+
var c = "", u = new w(o, 10), l = u.toString(2), f = 7 - l.length % 7;
|
|
1584
1584
|
f == 7 && (f = 0);
|
|
1585
1585
|
for (var d = "", g = 0; g < f; g++)
|
|
1586
1586
|
d += "0";
|
|
@@ -1633,7 +1633,7 @@ p.asn1.DERAbstractString = function(i) {
|
|
|
1633
1633
|
return this.hV;
|
|
1634
1634
|
}, typeof i < "u" && (typeof i == "string" ? this.setString(i) : typeof i.str < "u" ? this.setString(i.str) : typeof i.hex < "u" && this.setStringHex(i.hex));
|
|
1635
1635
|
};
|
|
1636
|
-
|
|
1636
|
+
N(p.asn1.DERAbstractString, p.asn1.ASN1Object);
|
|
1637
1637
|
p.asn1.DERAbstractTime = function(i) {
|
|
1638
1638
|
p.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
|
|
1639
1639
|
utc = t.getTime() + t.getTimezoneOffset() * 6e4;
|
|
@@ -1664,7 +1664,7 @@ p.asn1.DERAbstractTime = function(i) {
|
|
|
1664
1664
|
return this.hV;
|
|
1665
1665
|
};
|
|
1666
1666
|
};
|
|
1667
|
-
|
|
1667
|
+
N(p.asn1.DERAbstractTime, p.asn1.ASN1Object);
|
|
1668
1668
|
p.asn1.DERAbstractStructured = function(i) {
|
|
1669
1669
|
p.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
|
|
1670
1670
|
this.hTLV = null, this.isModified = !0, this.asn1Array = t;
|
|
@@ -1672,16 +1672,16 @@ p.asn1.DERAbstractStructured = function(i) {
|
|
|
1672
1672
|
this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
|
|
1673
1673
|
}, this.asn1Array = new Array(), typeof i < "u" && typeof i.array < "u" && (this.asn1Array = i.array);
|
|
1674
1674
|
};
|
|
1675
|
-
|
|
1675
|
+
N(p.asn1.DERAbstractStructured, p.asn1.ASN1Object);
|
|
1676
1676
|
p.asn1.DERBoolean = function() {
|
|
1677
1677
|
p.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
1678
1678
|
};
|
|
1679
|
-
|
|
1679
|
+
N(p.asn1.DERBoolean, p.asn1.ASN1Object);
|
|
1680
1680
|
p.asn1.DERInteger = function(i) {
|
|
1681
1681
|
p.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
|
|
1682
1682
|
this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
1683
1683
|
}, this.setByInteger = function(t) {
|
|
1684
|
-
var e = new
|
|
1684
|
+
var e = new w(String(t), 10);
|
|
1685
1685
|
this.setByBigInteger(e);
|
|
1686
1686
|
}, this.setValueHex = function(t) {
|
|
1687
1687
|
this.hV = t;
|
|
@@ -1689,7 +1689,7 @@ p.asn1.DERInteger = function(i) {
|
|
|
1689
1689
|
return this.hV;
|
|
1690
1690
|
}, typeof i < "u" && (typeof i.bigint < "u" ? this.setByBigInteger(i.bigint) : typeof i.int < "u" ? this.setByInteger(i.int) : typeof i == "number" ? this.setByInteger(i) : typeof i.hex < "u" && this.setValueHex(i.hex));
|
|
1691
1691
|
};
|
|
1692
|
-
|
|
1692
|
+
N(p.asn1.DERInteger, p.asn1.ASN1Object);
|
|
1693
1693
|
p.asn1.DERBitString = function(i) {
|
|
1694
1694
|
if (i !== void 0 && typeof i.obj < "u") {
|
|
1695
1695
|
var t = p.asn1.ASN1Util.newObject(i.obj);
|
|
@@ -1725,7 +1725,7 @@ p.asn1.DERBitString = function(i) {
|
|
|
1725
1725
|
return this.hV;
|
|
1726
1726
|
}, typeof i < "u" && (typeof i == "string" && i.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(i) : typeof i.hex < "u" ? this.setHexValueIncludingUnusedBits(i.hex) : typeof i.bin < "u" ? this.setByBinaryString(i.bin) : typeof i.array < "u" && this.setByBooleanArray(i.array));
|
|
1727
1727
|
};
|
|
1728
|
-
|
|
1728
|
+
N(p.asn1.DERBitString, p.asn1.ASN1Object);
|
|
1729
1729
|
p.asn1.DEROctetString = function(i) {
|
|
1730
1730
|
if (i !== void 0 && typeof i.obj < "u") {
|
|
1731
1731
|
var t = p.asn1.ASN1Util.newObject(i.obj);
|
|
@@ -1733,17 +1733,17 @@ p.asn1.DEROctetString = function(i) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
p.asn1.DEROctetString.superclass.constructor.call(this, i), this.hT = "04";
|
|
1735
1735
|
};
|
|
1736
|
-
|
|
1736
|
+
N(p.asn1.DEROctetString, p.asn1.DERAbstractString);
|
|
1737
1737
|
p.asn1.DERNull = function() {
|
|
1738
1738
|
p.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
1739
1739
|
};
|
|
1740
|
-
|
|
1740
|
+
N(p.asn1.DERNull, p.asn1.ASN1Object);
|
|
1741
1741
|
p.asn1.DERObjectIdentifier = function(i) {
|
|
1742
1742
|
var t = function(n) {
|
|
1743
1743
|
var r = n.toString(16);
|
|
1744
1744
|
return r.length == 1 && (r = "0" + r), r;
|
|
1745
1745
|
}, e = function(n) {
|
|
1746
|
-
var r = "", s = new
|
|
1746
|
+
var r = "", s = new w(n, 10), a = s.toString(2), o = 7 - a.length % 7;
|
|
1747
1747
|
o == 7 && (o = 0);
|
|
1748
1748
|
for (var c = "", u = 0; u < o; u++)
|
|
1749
1749
|
c += "0";
|
|
@@ -1774,12 +1774,12 @@ p.asn1.DERObjectIdentifier = function(i) {
|
|
|
1774
1774
|
return this.hV;
|
|
1775
1775
|
}, i !== void 0 && (typeof i == "string" ? i.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(i) : this.setValueName(i) : i.oid !== void 0 ? this.setValueOidString(i.oid) : i.hex !== void 0 ? this.setValueHex(i.hex) : i.name !== void 0 && this.setValueName(i.name));
|
|
1776
1776
|
};
|
|
1777
|
-
|
|
1777
|
+
N(p.asn1.DERObjectIdentifier, p.asn1.ASN1Object);
|
|
1778
1778
|
p.asn1.DEREnumerated = function(i) {
|
|
1779
1779
|
p.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
|
|
1780
1780
|
this.hTLV = null, this.isModified = !0, this.hV = p.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
|
|
1781
1781
|
}, this.setByInteger = function(t) {
|
|
1782
|
-
var e = new
|
|
1782
|
+
var e = new w(String(t), 10);
|
|
1783
1783
|
this.setByBigInteger(e);
|
|
1784
1784
|
}, this.setValueHex = function(t) {
|
|
1785
1785
|
this.hV = t;
|
|
@@ -1787,27 +1787,27 @@ p.asn1.DEREnumerated = function(i) {
|
|
|
1787
1787
|
return this.hV;
|
|
1788
1788
|
}, typeof i < "u" && (typeof i.int < "u" ? this.setByInteger(i.int) : typeof i == "number" ? this.setByInteger(i) : typeof i.hex < "u" && this.setValueHex(i.hex));
|
|
1789
1789
|
};
|
|
1790
|
-
|
|
1790
|
+
N(p.asn1.DEREnumerated, p.asn1.ASN1Object);
|
|
1791
1791
|
p.asn1.DERUTF8String = function(i) {
|
|
1792
1792
|
p.asn1.DERUTF8String.superclass.constructor.call(this, i), this.hT = "0c";
|
|
1793
1793
|
};
|
|
1794
|
-
|
|
1794
|
+
N(p.asn1.DERUTF8String, p.asn1.DERAbstractString);
|
|
1795
1795
|
p.asn1.DERNumericString = function(i) {
|
|
1796
1796
|
p.asn1.DERNumericString.superclass.constructor.call(this, i), this.hT = "12";
|
|
1797
1797
|
};
|
|
1798
|
-
|
|
1798
|
+
N(p.asn1.DERNumericString, p.asn1.DERAbstractString);
|
|
1799
1799
|
p.asn1.DERPrintableString = function(i) {
|
|
1800
1800
|
p.asn1.DERPrintableString.superclass.constructor.call(this, i), this.hT = "13";
|
|
1801
1801
|
};
|
|
1802
|
-
|
|
1802
|
+
N(p.asn1.DERPrintableString, p.asn1.DERAbstractString);
|
|
1803
1803
|
p.asn1.DERTeletexString = function(i) {
|
|
1804
1804
|
p.asn1.DERTeletexString.superclass.constructor.call(this, i), this.hT = "14";
|
|
1805
1805
|
};
|
|
1806
|
-
|
|
1806
|
+
N(p.asn1.DERTeletexString, p.asn1.DERAbstractString);
|
|
1807
1807
|
p.asn1.DERIA5String = function(i) {
|
|
1808
1808
|
p.asn1.DERIA5String.superclass.constructor.call(this, i), this.hT = "16";
|
|
1809
1809
|
};
|
|
1810
|
-
|
|
1810
|
+
N(p.asn1.DERIA5String, p.asn1.DERAbstractString);
|
|
1811
1811
|
p.asn1.DERUTCTime = function(i) {
|
|
1812
1812
|
p.asn1.DERUTCTime.superclass.constructor.call(this, i), this.hT = "17", this.setByDate = function(t) {
|
|
1813
1813
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
@@ -1815,7 +1815,7 @@ p.asn1.DERUTCTime = function(i) {
|
|
|
1815
1815
|
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;
|
|
1816
1816
|
}, i !== void 0 && (i.str !== void 0 ? this.setString(i.str) : typeof i == "string" && i.match(/^[0-9]{12}Z$/) ? this.setString(i) : i.hex !== void 0 ? this.setStringHex(i.hex) : i.date !== void 0 && this.setByDate(i.date));
|
|
1817
1817
|
};
|
|
1818
|
-
|
|
1818
|
+
N(p.asn1.DERUTCTime, p.asn1.DERAbstractTime);
|
|
1819
1819
|
p.asn1.DERGeneralizedTime = function(i) {
|
|
1820
1820
|
p.asn1.DERGeneralizedTime.superclass.constructor.call(this, i), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
|
|
1821
1821
|
this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
@@ -1823,7 +1823,7 @@ p.asn1.DERGeneralizedTime = function(i) {
|
|
|
1823
1823
|
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;
|
|
1824
1824
|
}, i !== void 0 && (i.str !== void 0 ? this.setString(i.str) : typeof i == "string" && i.match(/^[0-9]{14}Z$/) ? this.setString(i) : i.hex !== void 0 ? this.setStringHex(i.hex) : i.date !== void 0 && this.setByDate(i.date), i.millis === !0 && (this.withMillis = !0));
|
|
1825
1825
|
};
|
|
1826
|
-
|
|
1826
|
+
N(p.asn1.DERGeneralizedTime, p.asn1.DERAbstractTime);
|
|
1827
1827
|
p.asn1.DERSequence = function(i) {
|
|
1828
1828
|
p.asn1.DERSequence.superclass.constructor.call(this, i), this.hT = "30", this.getFreshValueHex = function() {
|
|
1829
1829
|
for (var t = "", e = 0; e < this.asn1Array.length; e++) {
|
|
@@ -1833,7 +1833,7 @@ p.asn1.DERSequence = function(i) {
|
|
|
1833
1833
|
return this.hV = t, this.hV;
|
|
1834
1834
|
};
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1836
|
+
N(p.asn1.DERSequence, p.asn1.DERAbstractStructured);
|
|
1837
1837
|
p.asn1.DERSet = function(i) {
|
|
1838
1838
|
p.asn1.DERSet.superclass.constructor.call(this, i), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
1839
1839
|
for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
|
|
@@ -1843,7 +1843,7 @@ p.asn1.DERSet = function(i) {
|
|
|
1843
1843
|
return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
|
|
1844
1844
|
}, typeof i < "u" && typeof i.sortflag < "u" && i.sortflag == !1 && (this.sortFlag = !1);
|
|
1845
1845
|
};
|
|
1846
|
-
|
|
1846
|
+
N(p.asn1.DERSet, p.asn1.DERAbstractStructured);
|
|
1847
1847
|
p.asn1.DERTaggedObject = function(i) {
|
|
1848
1848
|
p.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, n) {
|
|
1849
1849
|
this.hT = e, this.isExplicit = t, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
|
|
@@ -1851,8 +1851,8 @@ p.asn1.DERTaggedObject = function(i) {
|
|
|
1851
1851
|
return this.hV;
|
|
1852
1852
|
}, typeof i < "u" && (typeof i.tag < "u" && (this.hT = i.tag), typeof i.explicit < "u" && (this.isExplicit = i.explicit), typeof i.obj < "u" && (this.asn1Object = i.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
|
|
1853
1853
|
};
|
|
1854
|
-
|
|
1855
|
-
var
|
|
1854
|
+
N(p.asn1.DERTaggedObject, p.asn1.ASN1Object);
|
|
1855
|
+
var di = /* @__PURE__ */ (function() {
|
|
1856
1856
|
var i = function(t, e) {
|
|
1857
1857
|
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
1858
1858
|
n.__proto__ = r;
|
|
@@ -1869,37 +1869,37 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
1871
1871
|
};
|
|
1872
|
-
})(),
|
|
1872
|
+
})(), ke = (
|
|
1873
1873
|
/** @class */
|
|
1874
1874
|
(function(i) {
|
|
1875
|
-
|
|
1875
|
+
di(t, i);
|
|
1876
1876
|
function t(e) {
|
|
1877
1877
|
var n = i.call(this) || this;
|
|
1878
1878
|
return e && (typeof e == "string" ? n.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && n.parsePropertiesFrom(e)), n;
|
|
1879
1879
|
}
|
|
1880
1880
|
return t.prototype.parseKey = function(e) {
|
|
1881
1881
|
try {
|
|
1882
|
-
var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ?
|
|
1882
|
+
var n = 0, r = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(e) ? Fn.decode(e) : ce.unarmor(e), o = qn.decode(a);
|
|
1883
1883
|
if (o.sub.length === 3 && (o = o.sub[2].sub[0]), o.sub.length === 9) {
|
|
1884
|
-
n = o.sub[1].getHexStringValue(), this.n =
|
|
1884
|
+
n = o.sub[1].getHexStringValue(), this.n = D(n, 16), r = o.sub[2].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1885
1885
|
var c = o.sub[3].getHexStringValue();
|
|
1886
|
-
this.d =
|
|
1886
|
+
this.d = D(c, 16);
|
|
1887
1887
|
var u = o.sub[4].getHexStringValue();
|
|
1888
|
-
this.p =
|
|
1888
|
+
this.p = D(u, 16);
|
|
1889
1889
|
var l = o.sub[5].getHexStringValue();
|
|
1890
|
-
this.q =
|
|
1890
|
+
this.q = D(l, 16);
|
|
1891
1891
|
var f = o.sub[6].getHexStringValue();
|
|
1892
|
-
this.dmp1 =
|
|
1892
|
+
this.dmp1 = D(f, 16);
|
|
1893
1893
|
var d = o.sub[7].getHexStringValue();
|
|
1894
|
-
this.dmq1 =
|
|
1894
|
+
this.dmq1 = D(d, 16);
|
|
1895
1895
|
var g = o.sub[8].getHexStringValue();
|
|
1896
|
-
this.coeff =
|
|
1896
|
+
this.coeff = D(g, 16);
|
|
1897
1897
|
} else if (o.sub.length === 2)
|
|
1898
1898
|
if (o.sub[0].sub) {
|
|
1899
1899
|
var P = o.sub[1], m = P.sub[0];
|
|
1900
|
-
n = m.sub[0].getHexStringValue(), this.n =
|
|
1900
|
+
n = m.sub[0].getHexStringValue(), this.n = D(n, 16), r = m.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1901
1901
|
} else
|
|
1902
|
-
n = o.sub[0].getHexStringValue(), this.n =
|
|
1902
|
+
n = o.sub[0].getHexStringValue(), this.n = D(n, 16), r = o.sub[1].getHexStringValue(), this.e = parseInt(r, 16);
|
|
1903
1903
|
else
|
|
1904
1904
|
return !1;
|
|
1905
1905
|
return !0;
|
|
@@ -1922,7 +1922,7 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
1922
1922
|
}, n = new p.asn1.DERSequence(e);
|
|
1923
1923
|
return n.getEncodedHex();
|
|
1924
1924
|
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
1925
|
-
return
|
|
1925
|
+
return Rt(this.getPrivateBaseKey());
|
|
1926
1926
|
}, t.prototype.getPublicBaseKey = function() {
|
|
1927
1927
|
var e = new p.asn1.DERSequence({
|
|
1928
1928
|
array: [
|
|
@@ -1942,7 +1942,7 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
return s.getEncodedHex();
|
|
1944
1944
|
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
1945
|
-
return
|
|
1945
|
+
return Rt(this.getPublicBaseKey());
|
|
1946
1946
|
}, t.wordwrap = function(e, n) {
|
|
1947
1947
|
if (n = n || 64, !e)
|
|
1948
1948
|
return e;
|
|
@@ -1967,34 +1967,34 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
1967
1967
|
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
1968
1968
|
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);
|
|
1969
1969
|
}, t;
|
|
1970
|
-
})(
|
|
1971
|
-
), ie,
|
|
1970
|
+
})(li)
|
|
1971
|
+
), ie, _i = typeof process < "u" ? (ie = process.env) === null || ie === void 0 ? void 0 : ie.npm_package_version : void 0, gi = (
|
|
1972
1972
|
/** @class */
|
|
1973
1973
|
(function() {
|
|
1974
1974
|
function i(t) {
|
|
1975
1975
|
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;
|
|
1976
1976
|
}
|
|
1977
1977
|
return i.prototype.setKey = function(t) {
|
|
1978
|
-
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new
|
|
1978
|
+
t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new ke(t)) : !this.key && this.log && console.error("A key was not set.");
|
|
1979
1979
|
}, i.prototype.setPrivateKey = function(t) {
|
|
1980
1980
|
this.setKey(t);
|
|
1981
1981
|
}, i.prototype.setPublicKey = function(t) {
|
|
1982
1982
|
this.setKey(t);
|
|
1983
1983
|
}, i.prototype.decrypt = function(t) {
|
|
1984
1984
|
try {
|
|
1985
|
-
return this.getKey().decrypt(
|
|
1985
|
+
return this.getKey().decrypt(Ie(t));
|
|
1986
1986
|
} catch {
|
|
1987
1987
|
return !1;
|
|
1988
1988
|
}
|
|
1989
1989
|
}, i.prototype.encrypt = function(t) {
|
|
1990
1990
|
try {
|
|
1991
|
-
return
|
|
1991
|
+
return Rt(this.getKey().encrypt(t));
|
|
1992
1992
|
} catch {
|
|
1993
1993
|
return !1;
|
|
1994
1994
|
}
|
|
1995
1995
|
}, i.prototype.encryptOAEP = function(t) {
|
|
1996
1996
|
try {
|
|
1997
|
-
return
|
|
1997
|
+
return Rt(this.getKey().encrypt(t, ui));
|
|
1998
1998
|
} catch {
|
|
1999
1999
|
return !1;
|
|
2000
2000
|
}
|
|
@@ -2003,30 +2003,30 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
2003
2003
|
return r;
|
|
2004
2004
|
}), n === void 0 && (n = "");
|
|
2005
2005
|
try {
|
|
2006
|
-
return
|
|
2006
|
+
return Rt(this.getKey().sign(t, e, n));
|
|
2007
2007
|
} catch {
|
|
2008
2008
|
return !1;
|
|
2009
2009
|
}
|
|
2010
2010
|
}, i.prototype.signSha256 = function(t) {
|
|
2011
2011
|
return this.sign(t, function(e) {
|
|
2012
|
-
return
|
|
2012
|
+
return Me(ue(e));
|
|
2013
2013
|
}, "sha256");
|
|
2014
2014
|
}, i.prototype.verify = function(t, e, n) {
|
|
2015
2015
|
n === void 0 && (n = function(r) {
|
|
2016
2016
|
return r;
|
|
2017
2017
|
});
|
|
2018
2018
|
try {
|
|
2019
|
-
return this.getKey().verify(t,
|
|
2019
|
+
return this.getKey().verify(t, Ie(e), n);
|
|
2020
2020
|
} catch {
|
|
2021
2021
|
return !1;
|
|
2022
2022
|
}
|
|
2023
2023
|
}, i.prototype.verifySha256 = function(t, e) {
|
|
2024
2024
|
return this.verify(t, e, function(n) {
|
|
2025
|
-
return
|
|
2025
|
+
return Me(ue(n));
|
|
2026
2026
|
});
|
|
2027
2027
|
}, i.prototype.getKey = function(t) {
|
|
2028
2028
|
if (!this.key) {
|
|
2029
|
-
if (this.key = new
|
|
2029
|
+
if (this.key = new ke(), t && {}.toString.call(t) === "[object Function]") {
|
|
2030
2030
|
this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
|
|
2031
2031
|
return;
|
|
2032
2032
|
}
|
|
@@ -2041,66 +2041,66 @@ var ci = /* @__PURE__ */ (function() {
|
|
|
2041
2041
|
return this.getKey().getPublicKey();
|
|
2042
2042
|
}, i.prototype.getPublicKeyB64 = function() {
|
|
2043
2043
|
return this.getKey().getPublicBaseKeyB64();
|
|
2044
|
-
}, i.version =
|
|
2044
|
+
}, i.version = _i, i;
|
|
2045
2045
|
})()
|
|
2046
2046
|
);
|
|
2047
|
-
function
|
|
2047
|
+
function on(i, t) {
|
|
2048
2048
|
return function() {
|
|
2049
2049
|
return i.apply(t, arguments);
|
|
2050
2050
|
};
|
|
2051
2051
|
}
|
|
2052
|
-
const { toString:
|
|
2053
|
-
const e =
|
|
2052
|
+
const { toString: mi } = Object.prototype, { getPrototypeOf: zt } = Object, { iterator: Gt, toStringTag: cn } = Symbol, $t = /* @__PURE__ */ ((i) => (t) => {
|
|
2053
|
+
const e = mi.call(t);
|
|
2054
2054
|
return i[e] || (i[e] = e.slice(8, -1).toLowerCase());
|
|
2055
|
-
})(/* @__PURE__ */ Object.create(null)), W = (i) => (i = i.toLowerCase(), (t) => $t(t) === i), Jt = (i) => (t) => typeof t === i, { isArray:
|
|
2056
|
-
function
|
|
2057
|
-
return i !== null && !
|
|
2055
|
+
})(/* @__PURE__ */ Object.create(null)), W = (i) => (i = i.toLowerCase(), (t) => $t(t) === i), Jt = (i) => (t) => typeof t === i, { isArray: ht } = Array, Pt = Jt("undefined");
|
|
2056
|
+
function wt(i) {
|
|
2057
|
+
return i !== null && !Pt(i) && i.constructor !== null && !Pt(i.constructor) && F(i.constructor.isBuffer) && i.constructor.isBuffer(i);
|
|
2058
2058
|
}
|
|
2059
|
-
const
|
|
2060
|
-
function
|
|
2059
|
+
const un = W("ArrayBuffer");
|
|
2060
|
+
function yi(i) {
|
|
2061
2061
|
let t;
|
|
2062
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer &&
|
|
2062
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer && un(i.buffer), t;
|
|
2063
2063
|
}
|
|
2064
|
-
const
|
|
2064
|
+
const bi = Jt("string"), F = Jt("function"), ln = Jt("number"), Ct = (i) => i !== null && typeof i == "object", Pi = (i) => i === !0 || i === !1, jt = (i) => {
|
|
2065
2065
|
if ($t(i) !== "object")
|
|
2066
2066
|
return !1;
|
|
2067
2067
|
const t = zt(i);
|
|
2068
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
2069
|
-
},
|
|
2070
|
-
if (!
|
|
2068
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(cn in i) && !(Gt in i);
|
|
2069
|
+
}, Ei = (i) => {
|
|
2070
|
+
if (!Ct(i) || wt(i))
|
|
2071
2071
|
return !1;
|
|
2072
2072
|
try {
|
|
2073
2073
|
return Object.keys(i).length === 0 && Object.getPrototypeOf(i) === Object.prototype;
|
|
2074
2074
|
} catch {
|
|
2075
2075
|
return !1;
|
|
2076
2076
|
}
|
|
2077
|
-
},
|
|
2078
|
-
function
|
|
2077
|
+
}, wi = W("Date"), vi = W("File"), Si = (i) => !!(i && typeof i.uri < "u"), Ti = (i) => i && typeof i.getParts < "u", Ai = W("Blob"), Ri = W("FileList"), Ci = (i) => Ct(i) && F(i.pipe);
|
|
2078
|
+
function Oi() {
|
|
2079
2079
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
2080
2080
|
}
|
|
2081
|
-
const
|
|
2081
|
+
const je = Oi(), qe = typeof je.FormData < "u" ? je.FormData : void 0, Di = (i) => {
|
|
2082
2082
|
if (!i) return !1;
|
|
2083
|
-
if (
|
|
2083
|
+
if (qe && i instanceof qe) return !0;
|
|
2084
2084
|
const t = zt(i);
|
|
2085
|
-
if (!t || t === Object.prototype || !
|
|
2085
|
+
if (!t || t === Object.prototype || !F(i.append)) return !1;
|
|
2086
2086
|
const e = $t(i);
|
|
2087
2087
|
return e === "formdata" || // detect form-data instance
|
|
2088
|
-
e === "object" &&
|
|
2089
|
-
},
|
|
2088
|
+
e === "object" && F(i.toString) && i.toString() === "[object FormData]";
|
|
2089
|
+
}, Ii = W("URLSearchParams"), [Ni, Bi, xi, Ui] = [
|
|
2090
2090
|
"ReadableStream",
|
|
2091
2091
|
"Request",
|
|
2092
2092
|
"Response",
|
|
2093
2093
|
"Headers"
|
|
2094
|
-
].map(W),
|
|
2095
|
-
function
|
|
2094
|
+
].map(W), Li = (i) => i.trim ? i.trim() : i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2095
|
+
function Ot(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
2096
2096
|
if (i === null || typeof i > "u")
|
|
2097
2097
|
return;
|
|
2098
2098
|
let n, r;
|
|
2099
|
-
if (typeof i != "object" && (i = [i]),
|
|
2099
|
+
if (typeof i != "object" && (i = [i]), ht(i))
|
|
2100
2100
|
for (n = 0, r = i.length; n < r; n++)
|
|
2101
2101
|
t.call(null, i[n], n, i);
|
|
2102
2102
|
else {
|
|
2103
|
-
if (
|
|
2103
|
+
if (wt(i))
|
|
2104
2104
|
return;
|
|
2105
2105
|
const s = e ? Object.getOwnPropertyNames(i) : Object.keys(i), a = s.length;
|
|
2106
2106
|
let o;
|
|
@@ -2108,8 +2108,8 @@ function Ct(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
|
2108
2108
|
o = s[n], t.call(null, i[o], o, i);
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2112
|
-
if (
|
|
2111
|
+
function hn(i, t) {
|
|
2112
|
+
if (wt(i))
|
|
2113
2113
|
return null;
|
|
2114
2114
|
t = t.toLowerCase();
|
|
2115
2115
|
const e = Object.keys(i);
|
|
@@ -2119,26 +2119,34 @@ function cn(i, t) {
|
|
|
2119
2119
|
return r;
|
|
2120
2120
|
return null;
|
|
2121
2121
|
}
|
|
2122
|
-
const
|
|
2122
|
+
const ut = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, fn = (i) => !Pt(i) && i !== ut;
|
|
2123
2123
|
function le(...i) {
|
|
2124
|
-
const { caseless: t, skipUndefined: e } =
|
|
2124
|
+
const { caseless: t, skipUndefined: e } = fn(this) && this || {}, n = {}, r = (s, a) => {
|
|
2125
2125
|
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
2126
2126
|
return;
|
|
2127
|
-
const o = t &&
|
|
2128
|
-
jt(c) && jt(s) ? n[o] = le(c, s) : jt(s) ? n[o] = le({}, s) :
|
|
2127
|
+
const o = t && typeof a == "string" && hn(n, a) || a, c = he(n, o) ? n[o] : void 0;
|
|
2128
|
+
jt(c) && jt(s) ? n[o] = le(c, s) : jt(s) ? n[o] = le({}, s) : ht(s) ? n[o] = s.slice() : (!e || !Pt(s)) && (n[o] = s);
|
|
2129
2129
|
};
|
|
2130
|
-
for (let s = 0, a = i.length; s < a; s++)
|
|
2131
|
-
|
|
2130
|
+
for (let s = 0, a = i.length; s < a; s++) {
|
|
2131
|
+
const o = i[s];
|
|
2132
|
+
if (!o || wt(o) || (Ot(o, r), typeof o != "object" || ht(o)))
|
|
2133
|
+
continue;
|
|
2134
|
+
const c = Object.getOwnPropertySymbols(o);
|
|
2135
|
+
for (let u = 0; u < c.length; u++) {
|
|
2136
|
+
const l = c[u];
|
|
2137
|
+
Gi.call(o, l) && r(o[l], l);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2132
2140
|
return n;
|
|
2133
2141
|
}
|
|
2134
|
-
const
|
|
2142
|
+
const Vi = (i, t, e, { allOwnKeys: n } = {}) => (Ot(
|
|
2135
2143
|
t,
|
|
2136
2144
|
(r, s) => {
|
|
2137
|
-
e &&
|
|
2145
|
+
e && F(r) ? Object.defineProperty(i, s, {
|
|
2138
2146
|
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
2139
2147
|
// hijack defineProperty's accessor-vs-data resolution.
|
|
2140
2148
|
__proto__: null,
|
|
2141
|
-
value:
|
|
2149
|
+
value: on(r, e),
|
|
2142
2150
|
writable: !0,
|
|
2143
2151
|
enumerable: !0,
|
|
2144
2152
|
configurable: !0
|
|
@@ -2151,7 +2159,7 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2151
2159
|
});
|
|
2152
2160
|
},
|
|
2153
2161
|
{ allOwnKeys: n }
|
|
2154
|
-
), i),
|
|
2162
|
+
), i), Mi = (i) => (i.charCodeAt(0) === 65279 && (i = i.slice(1)), i), Fi = (i, t, e, n) => {
|
|
2155
2163
|
i.prototype = Object.create(t.prototype, n), Object.defineProperty(i.prototype, "constructor", {
|
|
2156
2164
|
__proto__: null,
|
|
2157
2165
|
value: i,
|
|
@@ -2162,7 +2170,7 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2162
2170
|
__proto__: null,
|
|
2163
2171
|
value: t.prototype
|
|
2164
2172
|
}), e && Object.assign(i.prototype, e);
|
|
2165
|
-
},
|
|
2173
|
+
}, ki = (i, t, e, n) => {
|
|
2166
2174
|
let r, s, a;
|
|
2167
2175
|
const o = {};
|
|
2168
2176
|
if (t = t || {}, i == null) return t;
|
|
@@ -2172,46 +2180,46 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2172
2180
|
i = e !== !1 && zt(i);
|
|
2173
2181
|
} while (i && (!e || e(i, t)) && i !== Object.prototype);
|
|
2174
2182
|
return t;
|
|
2175
|
-
},
|
|
2183
|
+
}, ji = (i, t, e) => {
|
|
2176
2184
|
i = String(i), (e === void 0 || e > i.length) && (e = i.length), e -= t.length;
|
|
2177
2185
|
const n = i.indexOf(t, e);
|
|
2178
2186
|
return n !== -1 && n === e;
|
|
2179
|
-
},
|
|
2187
|
+
}, qi = (i) => {
|
|
2180
2188
|
if (!i) return null;
|
|
2181
|
-
if (
|
|
2189
|
+
if (ht(i)) return i;
|
|
2182
2190
|
let t = i.length;
|
|
2183
|
-
if (!
|
|
2191
|
+
if (!ln(t)) return null;
|
|
2184
2192
|
const e = new Array(t);
|
|
2185
2193
|
for (; t-- > 0; )
|
|
2186
2194
|
e[t] = i[t];
|
|
2187
2195
|
return e;
|
|
2188
|
-
},
|
|
2196
|
+
}, Ki = /* @__PURE__ */ ((i) => (t) => i && t instanceof i)(typeof Uint8Array < "u" && zt(Uint8Array)), Hi = (i, t) => {
|
|
2189
2197
|
const n = (i && i[Gt]).call(i);
|
|
2190
2198
|
let r;
|
|
2191
2199
|
for (; (r = n.next()) && !r.done; ) {
|
|
2192
2200
|
const s = r.value;
|
|
2193
2201
|
t.call(i, s[0], s[1]);
|
|
2194
2202
|
}
|
|
2195
|
-
},
|
|
2203
|
+
}, Wi = (i, t) => {
|
|
2196
2204
|
let e;
|
|
2197
2205
|
const n = [];
|
|
2198
2206
|
for (; (e = i.exec(t)) !== null; )
|
|
2199
2207
|
n.push(e);
|
|
2200
2208
|
return n;
|
|
2201
|
-
},
|
|
2209
|
+
}, Xi = W("HTMLFormElement"), zi = (i) => i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) {
|
|
2202
2210
|
return n.toUpperCase() + r;
|
|
2203
|
-
}), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype),
|
|
2211
|
+
}), he = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype), { propertyIsEnumerable: Gi } = Object.prototype, $i = W("RegExp"), pn = (i, t) => {
|
|
2204
2212
|
const e = Object.getOwnPropertyDescriptors(i), n = {};
|
|
2205
|
-
|
|
2213
|
+
Ot(e, (r, s) => {
|
|
2206
2214
|
let a;
|
|
2207
2215
|
(a = t(r, s, i)) !== !1 && (n[s] = a || r);
|
|
2208
2216
|
}), Object.defineProperties(i, n);
|
|
2209
|
-
},
|
|
2210
|
-
|
|
2211
|
-
if (
|
|
2217
|
+
}, Ji = (i) => {
|
|
2218
|
+
pn(i, (t, e) => {
|
|
2219
|
+
if (F(i) && ["arguments", "caller", "callee"].includes(e))
|
|
2212
2220
|
return !1;
|
|
2213
2221
|
const n = i[e];
|
|
2214
|
-
if (
|
|
2222
|
+
if (F(n)) {
|
|
2215
2223
|
if (t.enumerable = !1, "writable" in t) {
|
|
2216
2224
|
t.writable = !1;
|
|
2217
2225
|
return;
|
|
@@ -2221,107 +2229,107 @@ const Ii = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2221
2229
|
});
|
|
2222
2230
|
}
|
|
2223
2231
|
});
|
|
2224
|
-
},
|
|
2232
|
+
}, Qi = (i, t) => {
|
|
2225
2233
|
const e = {}, n = (r) => {
|
|
2226
2234
|
r.forEach((s) => {
|
|
2227
2235
|
e[s] = !0;
|
|
2228
2236
|
});
|
|
2229
2237
|
};
|
|
2230
|
-
return
|
|
2231
|
-
},
|
|
2232
|
-
},
|
|
2233
|
-
function
|
|
2234
|
-
return !!(i &&
|
|
2238
|
+
return ht(i) ? n(i) : n(String(i).split(t)), e;
|
|
2239
|
+
}, Zi = () => {
|
|
2240
|
+
}, Yi = (i, t) => i != null && Number.isFinite(i = +i) ? i : t;
|
|
2241
|
+
function tr(i) {
|
|
2242
|
+
return !!(i && F(i.append) && i[cn] === "FormData" && i[Gt]);
|
|
2235
2243
|
}
|
|
2236
|
-
const
|
|
2237
|
-
const t = new
|
|
2238
|
-
if (
|
|
2239
|
-
if (t.
|
|
2244
|
+
const er = (i) => {
|
|
2245
|
+
const t = /* @__PURE__ */ new WeakSet(), e = (n) => {
|
|
2246
|
+
if (Ct(n)) {
|
|
2247
|
+
if (t.has(n))
|
|
2240
2248
|
return;
|
|
2241
|
-
if (
|
|
2249
|
+
if (wt(n))
|
|
2242
2250
|
return n;
|
|
2243
2251
|
if (!("toJSON" in n)) {
|
|
2244
|
-
t
|
|
2245
|
-
const
|
|
2246
|
-
return
|
|
2247
|
-
const
|
|
2248
|
-
!
|
|
2249
|
-
}), t
|
|
2252
|
+
t.add(n);
|
|
2253
|
+
const r = ht(n) ? [] : {};
|
|
2254
|
+
return Ot(n, (s, a) => {
|
|
2255
|
+
const o = e(s);
|
|
2256
|
+
!Pt(o) && (r[a] = o);
|
|
2257
|
+
}), t.delete(n), r;
|
|
2250
2258
|
}
|
|
2251
2259
|
}
|
|
2252
2260
|
return n;
|
|
2253
2261
|
};
|
|
2254
|
-
return e(i
|
|
2255
|
-
},
|
|
2262
|
+
return e(i);
|
|
2263
|
+
}, nr = W("AsyncFunction"), ir = (i) => i && (Ct(i) || F(i)) && F(i.then) && F(i.catch), dn = ((i, t) => i ? setImmediate : t ? ((e, n) => (ut.addEventListener(
|
|
2256
2264
|
"message",
|
|
2257
2265
|
({ source: r, data: s }) => {
|
|
2258
|
-
r ===
|
|
2266
|
+
r === ut && s === e && n.length && n.shift()();
|
|
2259
2267
|
},
|
|
2260
2268
|
!1
|
|
2261
2269
|
), (r) => {
|
|
2262
|
-
n.push(r),
|
|
2263
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
2264
|
-
isArray:
|
|
2265
|
-
isArrayBuffer:
|
|
2266
|
-
isBuffer:
|
|
2267
|
-
isFormData:
|
|
2268
|
-
isArrayBufferView:
|
|
2269
|
-
isString:
|
|
2270
|
-
isNumber:
|
|
2271
|
-
isBoolean:
|
|
2272
|
-
isObject:
|
|
2270
|
+
n.push(r), ut.postMessage(e, "*");
|
|
2271
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", F(ut.postMessage)), rr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ut) : typeof process < "u" && process.nextTick || dn, sr = (i) => i != null && F(i[Gt]), h = {
|
|
2272
|
+
isArray: ht,
|
|
2273
|
+
isArrayBuffer: un,
|
|
2274
|
+
isBuffer: wt,
|
|
2275
|
+
isFormData: Di,
|
|
2276
|
+
isArrayBufferView: yi,
|
|
2277
|
+
isString: bi,
|
|
2278
|
+
isNumber: ln,
|
|
2279
|
+
isBoolean: Pi,
|
|
2280
|
+
isObject: Ct,
|
|
2273
2281
|
isPlainObject: jt,
|
|
2274
|
-
isEmptyObject:
|
|
2275
|
-
isReadableStream:
|
|
2276
|
-
isRequest:
|
|
2277
|
-
isResponse:
|
|
2278
|
-
isHeaders:
|
|
2279
|
-
isUndefined:
|
|
2280
|
-
isDate:
|
|
2281
|
-
isFile:
|
|
2282
|
-
isReactNativeBlob:
|
|
2283
|
-
isReactNative:
|
|
2284
|
-
isBlob:
|
|
2285
|
-
isRegExp:
|
|
2286
|
-
isFunction:
|
|
2287
|
-
isStream:
|
|
2288
|
-
isURLSearchParams:
|
|
2289
|
-
isTypedArray:
|
|
2290
|
-
isFileList:
|
|
2291
|
-
forEach:
|
|
2282
|
+
isEmptyObject: Ei,
|
|
2283
|
+
isReadableStream: Ni,
|
|
2284
|
+
isRequest: Bi,
|
|
2285
|
+
isResponse: xi,
|
|
2286
|
+
isHeaders: Ui,
|
|
2287
|
+
isUndefined: Pt,
|
|
2288
|
+
isDate: wi,
|
|
2289
|
+
isFile: vi,
|
|
2290
|
+
isReactNativeBlob: Si,
|
|
2291
|
+
isReactNative: Ti,
|
|
2292
|
+
isBlob: Ai,
|
|
2293
|
+
isRegExp: $i,
|
|
2294
|
+
isFunction: F,
|
|
2295
|
+
isStream: Ci,
|
|
2296
|
+
isURLSearchParams: Ii,
|
|
2297
|
+
isTypedArray: Ki,
|
|
2298
|
+
isFileList: Ri,
|
|
2299
|
+
forEach: Ot,
|
|
2292
2300
|
merge: le,
|
|
2293
|
-
extend:
|
|
2294
|
-
trim:
|
|
2295
|
-
stripBOM:
|
|
2296
|
-
inherits:
|
|
2297
|
-
toFlatObject:
|
|
2301
|
+
extend: Vi,
|
|
2302
|
+
trim: Li,
|
|
2303
|
+
stripBOM: Mi,
|
|
2304
|
+
inherits: Fi,
|
|
2305
|
+
toFlatObject: ki,
|
|
2298
2306
|
kindOf: $t,
|
|
2299
2307
|
kindOfTest: W,
|
|
2300
|
-
endsWith:
|
|
2301
|
-
toArray:
|
|
2302
|
-
forEachEntry:
|
|
2303
|
-
matchAll:
|
|
2304
|
-
isHTMLForm:
|
|
2308
|
+
endsWith: ji,
|
|
2309
|
+
toArray: qi,
|
|
2310
|
+
forEachEntry: Hi,
|
|
2311
|
+
matchAll: Wi,
|
|
2312
|
+
isHTMLForm: Xi,
|
|
2305
2313
|
hasOwnProperty: he,
|
|
2306
2314
|
hasOwnProp: he,
|
|
2307
2315
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2308
|
-
reduceDescriptors:
|
|
2309
|
-
freezeMethods:
|
|
2310
|
-
toObjectSet:
|
|
2311
|
-
toCamelCase:
|
|
2312
|
-
noop:
|
|
2313
|
-
toFiniteNumber:
|
|
2314
|
-
findKey:
|
|
2315
|
-
global:
|
|
2316
|
-
isContextDefined:
|
|
2317
|
-
isSpecCompliantForm:
|
|
2318
|
-
toJSONObject:
|
|
2319
|
-
isAsyncFn:
|
|
2320
|
-
isThenable:
|
|
2321
|
-
setImmediate:
|
|
2322
|
-
asap:
|
|
2323
|
-
isIterable:
|
|
2324
|
-
},
|
|
2316
|
+
reduceDescriptors: pn,
|
|
2317
|
+
freezeMethods: Ji,
|
|
2318
|
+
toObjectSet: Qi,
|
|
2319
|
+
toCamelCase: zi,
|
|
2320
|
+
noop: Zi,
|
|
2321
|
+
toFiniteNumber: Yi,
|
|
2322
|
+
findKey: hn,
|
|
2323
|
+
global: ut,
|
|
2324
|
+
isContextDefined: fn,
|
|
2325
|
+
isSpecCompliantForm: tr,
|
|
2326
|
+
toJSONObject: er,
|
|
2327
|
+
isAsyncFn: nr,
|
|
2328
|
+
isThenable: ir,
|
|
2329
|
+
setImmediate: dn,
|
|
2330
|
+
asap: rr,
|
|
2331
|
+
isIterable: sr
|
|
2332
|
+
}, ar = h.toObjectSet([
|
|
2325
2333
|
"age",
|
|
2326
2334
|
"authorization",
|
|
2327
2335
|
"content-length",
|
|
@@ -2339,15 +2347,15 @@ const Gi = (i) => {
|
|
|
2339
2347
|
"referer",
|
|
2340
2348
|
"retry-after",
|
|
2341
2349
|
"user-agent"
|
|
2342
|
-
]),
|
|
2350
|
+
]), or = (i) => {
|
|
2343
2351
|
const t = {};
|
|
2344
2352
|
let e, n, r;
|
|
2345
2353
|
return i && i.split(`
|
|
2346
2354
|
`).forEach(function(a) {
|
|
2347
|
-
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] &&
|
|
2355
|
+
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] && ar[e]) && (e === "set-cookie" ? t[e] ? t[e].push(n) : t[e] = [n] : t[e] = t[e] ? t[e] + ", " + n : n);
|
|
2348
2356
|
}), t;
|
|
2349
|
-
}
|
|
2350
|
-
function
|
|
2357
|
+
};
|
|
2358
|
+
function cr(i) {
|
|
2351
2359
|
let t = 0, e = i.length;
|
|
2352
2360
|
for (; t < e; ) {
|
|
2353
2361
|
const n = i.charCodeAt(t);
|
|
@@ -2363,23 +2371,32 @@ function nr(i) {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
return t === 0 && e === i.length ? i : i.slice(t, e);
|
|
2365
2373
|
}
|
|
2366
|
-
|
|
2367
|
-
|
|
2374
|
+
const ur = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), lr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
2375
|
+
function ge(i, t) {
|
|
2376
|
+
return h.isArray(i) ? i.map((e) => ge(e, t)) : cr(String(i).replace(t, ""));
|
|
2377
|
+
}
|
|
2378
|
+
const hr = (i) => ge(i, ur), fr = (i) => ge(i, lr);
|
|
2379
|
+
function _n(i) {
|
|
2380
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
2381
|
+
return h.forEach(i.toJSON(), (e, n) => {
|
|
2382
|
+
t[n] = fr(e);
|
|
2383
|
+
}), t;
|
|
2368
2384
|
}
|
|
2369
|
-
|
|
2370
|
-
|
|
2385
|
+
const Ke = /* @__PURE__ */ Symbol("internals");
|
|
2386
|
+
function Tt(i) {
|
|
2387
|
+
return i && String(i).trim().toLowerCase();
|
|
2371
2388
|
}
|
|
2372
2389
|
function qt(i) {
|
|
2373
|
-
return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) :
|
|
2390
|
+
return i === !1 || i == null ? i : h.isArray(i) ? i.map(qt) : hr(String(i));
|
|
2374
2391
|
}
|
|
2375
|
-
function
|
|
2392
|
+
function pr(i) {
|
|
2376
2393
|
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2377
2394
|
let n;
|
|
2378
2395
|
for (; n = e.exec(i); )
|
|
2379
2396
|
t[n[1]] = n[2];
|
|
2380
2397
|
return t;
|
|
2381
2398
|
}
|
|
2382
|
-
const
|
|
2399
|
+
const dr = (i) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());
|
|
2383
2400
|
function re(i, t, e, n, r) {
|
|
2384
2401
|
if (h.isFunction(n))
|
|
2385
2402
|
return n.call(this, t, e);
|
|
@@ -2390,10 +2407,10 @@ function re(i, t, e, n, r) {
|
|
|
2390
2407
|
return n.test(t);
|
|
2391
2408
|
}
|
|
2392
2409
|
}
|
|
2393
|
-
function
|
|
2410
|
+
function _r(i) {
|
|
2394
2411
|
return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, n) => e.toUpperCase() + n);
|
|
2395
2412
|
}
|
|
2396
|
-
function
|
|
2413
|
+
function gr(i, t) {
|
|
2397
2414
|
const e = h.toCamelCase(" " + t);
|
|
2398
2415
|
["get", "set", "has"].forEach((n) => {
|
|
2399
2416
|
Object.defineProperty(i, n + e, {
|
|
@@ -2414,22 +2431,22 @@ let V = class {
|
|
|
2414
2431
|
set(t, e, n) {
|
|
2415
2432
|
const r = this;
|
|
2416
2433
|
function s(o, c, u) {
|
|
2417
|
-
const l =
|
|
2434
|
+
const l = Tt(c);
|
|
2418
2435
|
if (!l)
|
|
2419
|
-
|
|
2436
|
+
return;
|
|
2420
2437
|
const f = h.findKey(r, l);
|
|
2421
2438
|
(!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || c] = qt(o));
|
|
2422
2439
|
}
|
|
2423
2440
|
const a = (o, c) => h.forEach(o, (u, l) => s(u, l, c));
|
|
2424
2441
|
if (h.isPlainObject(t) || t instanceof this.constructor)
|
|
2425
2442
|
a(t, e);
|
|
2426
|
-
else if (h.isString(t) && (t = t.trim()) && !
|
|
2427
|
-
a(
|
|
2443
|
+
else if (h.isString(t) && (t = t.trim()) && !dr(t))
|
|
2444
|
+
a(or(t), e);
|
|
2428
2445
|
else if (h.isObject(t) && h.isIterable(t)) {
|
|
2429
2446
|
let o = {}, c, u;
|
|
2430
2447
|
for (const l of t) {
|
|
2431
2448
|
if (!h.isArray(l))
|
|
2432
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
2449
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
2433
2450
|
o[u = l[0]] = (c = o[u]) ? h.isArray(c) ? [...c, l[1]] : [c, l[1]] : l[1];
|
|
2434
2451
|
}
|
|
2435
2452
|
a(o, e);
|
|
@@ -2438,14 +2455,14 @@ let V = class {
|
|
|
2438
2455
|
return this;
|
|
2439
2456
|
}
|
|
2440
2457
|
get(t, e) {
|
|
2441
|
-
if (t =
|
|
2458
|
+
if (t = Tt(t), t) {
|
|
2442
2459
|
const n = h.findKey(this, t);
|
|
2443
2460
|
if (n) {
|
|
2444
2461
|
const r = this[n];
|
|
2445
2462
|
if (!e)
|
|
2446
2463
|
return r;
|
|
2447
2464
|
if (e === !0)
|
|
2448
|
-
return
|
|
2465
|
+
return pr(r);
|
|
2449
2466
|
if (h.isFunction(e))
|
|
2450
2467
|
return e.call(this, r, n);
|
|
2451
2468
|
if (h.isRegExp(e))
|
|
@@ -2455,7 +2472,7 @@ let V = class {
|
|
|
2455
2472
|
}
|
|
2456
2473
|
}
|
|
2457
2474
|
has(t, e) {
|
|
2458
|
-
if (t =
|
|
2475
|
+
if (t = Tt(t), t) {
|
|
2459
2476
|
const n = h.findKey(this, t);
|
|
2460
2477
|
return !!(n && this[n] !== void 0 && (!e || re(this, this[n], n, e)));
|
|
2461
2478
|
}
|
|
@@ -2465,7 +2482,7 @@ let V = class {
|
|
|
2465
2482
|
const n = this;
|
|
2466
2483
|
let r = !1;
|
|
2467
2484
|
function s(a) {
|
|
2468
|
-
if (a =
|
|
2485
|
+
if (a = Tt(a), a) {
|
|
2469
2486
|
const o = h.findKey(n, a);
|
|
2470
2487
|
o && (!e || re(n, n[o], o, e)) && (delete n[o], r = !0);
|
|
2471
2488
|
}
|
|
@@ -2489,7 +2506,7 @@ let V = class {
|
|
|
2489
2506
|
e[a] = qt(r), delete e[s];
|
|
2490
2507
|
return;
|
|
2491
2508
|
}
|
|
2492
|
-
const o = t ?
|
|
2509
|
+
const o = t ? _r(s) : String(s).trim();
|
|
2493
2510
|
o !== s && delete e[s], e[o] = qt(r), n[o] = !0;
|
|
2494
2511
|
}), this;
|
|
2495
2512
|
}
|
|
@@ -2523,12 +2540,12 @@ let V = class {
|
|
|
2523
2540
|
return e.forEach((r) => n.set(r)), n;
|
|
2524
2541
|
}
|
|
2525
2542
|
static accessor(t) {
|
|
2526
|
-
const n = (this[
|
|
2543
|
+
const n = (this[Ke] = this[Ke] = {
|
|
2527
2544
|
accessors: {}
|
|
2528
2545
|
}).accessors, r = this.prototype;
|
|
2529
2546
|
function s(a) {
|
|
2530
|
-
const o =
|
|
2531
|
-
n[o] || (
|
|
2547
|
+
const o = Tt(a);
|
|
2548
|
+
n[o] || (gr(r, a), n[o] = !0);
|
|
2532
2549
|
}
|
|
2533
2550
|
return h.isArray(t) ? t.forEach(s) : s(t), this;
|
|
2534
2551
|
}
|
|
@@ -2551,8 +2568,8 @@ h.reduceDescriptors(V.prototype, ({ value: i }, t) => {
|
|
|
2551
2568
|
};
|
|
2552
2569
|
});
|
|
2553
2570
|
h.freezeMethods(V);
|
|
2554
|
-
const
|
|
2555
|
-
function
|
|
2571
|
+
const mr = "[REDACTED ****]";
|
|
2572
|
+
function yr(i) {
|
|
2556
2573
|
if (h.hasOwnProp(i, "toJSON"))
|
|
2557
2574
|
return !0;
|
|
2558
2575
|
let t = Object.getPrototypeOf(i);
|
|
@@ -2563,7 +2580,7 @@ function ur(i) {
|
|
|
2563
2580
|
}
|
|
2564
2581
|
return !1;
|
|
2565
2582
|
}
|
|
2566
|
-
function
|
|
2583
|
+
function br(i, t) {
|
|
2567
2584
|
const e = new Set(t.map((s) => String(s).toLowerCase())), n = [], r = (s) => {
|
|
2568
2585
|
if (s === null || typeof s != "object" || h.isBuffer(s)) return s;
|
|
2569
2586
|
if (n.indexOf(s) !== -1) return;
|
|
@@ -2575,11 +2592,11 @@ function lr(i, t) {
|
|
|
2575
2592
|
h.isUndefined(u) || (a[c] = u);
|
|
2576
2593
|
});
|
|
2577
2594
|
else {
|
|
2578
|
-
if (!h.isPlainObject(s) &&
|
|
2595
|
+
if (!h.isPlainObject(s) && yr(s))
|
|
2579
2596
|
return n.pop(), s;
|
|
2580
2597
|
a = /* @__PURE__ */ Object.create(null);
|
|
2581
2598
|
for (const [o, c] of Object.entries(s)) {
|
|
2582
|
-
const u = e.has(o.toLowerCase()) ?
|
|
2599
|
+
const u = e.has(o.toLowerCase()) ? mr : r(c);
|
|
2583
2600
|
h.isUndefined(u) || (a[o] = u);
|
|
2584
2601
|
}
|
|
2585
2602
|
}
|
|
@@ -2587,9 +2604,9 @@ function lr(i, t) {
|
|
|
2587
2604
|
};
|
|
2588
2605
|
return r(i);
|
|
2589
2606
|
}
|
|
2590
|
-
let
|
|
2607
|
+
let b = class gn extends Error {
|
|
2591
2608
|
static from(t, e, n, r, s, a) {
|
|
2592
|
-
const o = new
|
|
2609
|
+
const o = new gn(t.message, e || t.code, n, r, s);
|
|
2593
2610
|
return o.cause = t, o.name = t.name, t.status != null && o.status == null && (o.status = t.status), a && Object.assign(o, a), o;
|
|
2594
2611
|
}
|
|
2595
2612
|
/**
|
|
@@ -2615,7 +2632,7 @@ let y = class fn extends Error {
|
|
|
2615
2632
|
}), this.name = "AxiosError", this.isAxiosError = !0, e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status);
|
|
2616
2633
|
}
|
|
2617
2634
|
toJSON() {
|
|
2618
|
-
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ?
|
|
2635
|
+
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ? br(t, e) : h.toJSONObject(t);
|
|
2619
2636
|
return {
|
|
2620
2637
|
// Standard
|
|
2621
2638
|
message: this.message,
|
|
@@ -2635,36 +2652,36 @@ let y = class fn extends Error {
|
|
|
2635
2652
|
};
|
|
2636
2653
|
}
|
|
2637
2654
|
};
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
const
|
|
2655
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2656
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2657
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
2658
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
2659
|
+
b.ECONNREFUSED = "ECONNREFUSED";
|
|
2660
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
2661
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2662
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2663
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2664
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2665
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
2666
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2667
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2668
|
+
b.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
2669
|
+
const Pr = null;
|
|
2653
2670
|
function fe(i) {
|
|
2654
2671
|
return h.isPlainObject(i) || h.isArray(i);
|
|
2655
2672
|
}
|
|
2656
|
-
function
|
|
2673
|
+
function mn(i) {
|
|
2657
2674
|
return h.endsWith(i, "[]") ? i.slice(0, -2) : i;
|
|
2658
2675
|
}
|
|
2659
2676
|
function se(i, t, e) {
|
|
2660
2677
|
return i ? i.concat(t).map(function(r, s) {
|
|
2661
|
-
return r =
|
|
2678
|
+
return r = mn(r), !e && s ? "[" + r + "]" : r;
|
|
2662
2679
|
}).join(e ? "." : "") : t;
|
|
2663
2680
|
}
|
|
2664
|
-
function
|
|
2681
|
+
function Er(i) {
|
|
2665
2682
|
return h.isArray(i) && !i.some(fe);
|
|
2666
2683
|
}
|
|
2667
|
-
const
|
|
2684
|
+
const wr = h.toFlatObject(h, {}, null, function(t) {
|
|
2668
2685
|
return /^is[A-Z]/.test(t);
|
|
2669
2686
|
});
|
|
2670
2687
|
function Qt(i, t, e) {
|
|
@@ -2678,8 +2695,8 @@ function Qt(i, t, e) {
|
|
|
2678
2695
|
indexes: !1
|
|
2679
2696
|
},
|
|
2680
2697
|
!1,
|
|
2681
|
-
function(_,
|
|
2682
|
-
return !h.isUndefined(
|
|
2698
|
+
function(_, y) {
|
|
2699
|
+
return !h.isUndefined(y[_]);
|
|
2683
2700
|
}
|
|
2684
2701
|
);
|
|
2685
2702
|
const n = e.metaTokens, r = e.visitor || f, s = e.dots, a = e.indexes, o = e.Blob || typeof Blob < "u" && Blob, c = e.maxDepth === void 0 ? 100 : e.maxDepth, u = o && h.isSpecCompliantForm(t);
|
|
@@ -2692,43 +2709,43 @@ function Qt(i, t, e) {
|
|
|
2692
2709
|
if (h.isBoolean(m))
|
|
2693
2710
|
return m.toString();
|
|
2694
2711
|
if (!u && h.isBlob(m))
|
|
2695
|
-
throw new
|
|
2712
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
2696
2713
|
return h.isArrayBuffer(m) || h.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
2697
2714
|
}
|
|
2698
|
-
function f(m, _,
|
|
2699
|
-
let
|
|
2715
|
+
function f(m, _, y) {
|
|
2716
|
+
let v = m;
|
|
2700
2717
|
if (h.isReactNative(t) && h.isReactNativeBlob(m))
|
|
2701
|
-
return t.append(se(
|
|
2702
|
-
if (m && !
|
|
2718
|
+
return t.append(se(y, _, s), l(m)), !1;
|
|
2719
|
+
if (m && !y && typeof m == "object") {
|
|
2703
2720
|
if (h.endsWith(_, "{}"))
|
|
2704
2721
|
_ = n ? _ : _.slice(0, -2), m = JSON.stringify(m);
|
|
2705
|
-
else if (h.isArray(m) &&
|
|
2706
|
-
return _ =
|
|
2707
|
-
!(h.isUndefined(
|
|
2722
|
+
else if (h.isArray(m) && Er(m) || (h.isFileList(m) || h.endsWith(_, "[]")) && (v = h.toArray(m)))
|
|
2723
|
+
return _ = mn(_), v.forEach(function(R, U) {
|
|
2724
|
+
!(h.isUndefined(R) || R === null) && t.append(
|
|
2708
2725
|
// eslint-disable-next-line no-nested-ternary
|
|
2709
2726
|
a === !0 ? se([_], U, s) : a === null ? _ : _ + "[]",
|
|
2710
|
-
l(
|
|
2727
|
+
l(R)
|
|
2711
2728
|
);
|
|
2712
2729
|
}), !1;
|
|
2713
2730
|
}
|
|
2714
|
-
return fe(m) ? !0 : (t.append(se(
|
|
2731
|
+
return fe(m) ? !0 : (t.append(se(y, _, s), l(m)), !1);
|
|
2715
2732
|
}
|
|
2716
|
-
const d = [], g = Object.assign(
|
|
2733
|
+
const d = [], g = Object.assign(wr, {
|
|
2717
2734
|
defaultVisitor: f,
|
|
2718
2735
|
convertValue: l,
|
|
2719
2736
|
isVisitable: fe
|
|
2720
2737
|
});
|
|
2721
|
-
function P(m, _,
|
|
2738
|
+
function P(m, _, y = 0) {
|
|
2722
2739
|
if (!h.isUndefined(m)) {
|
|
2723
|
-
if (
|
|
2724
|
-
throw new
|
|
2725
|
-
"Object is too deeply nested (" +
|
|
2726
|
-
|
|
2740
|
+
if (y > c)
|
|
2741
|
+
throw new b(
|
|
2742
|
+
"Object is too deeply nested (" + y + " levels). Max depth: " + c,
|
|
2743
|
+
b.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
2727
2744
|
);
|
|
2728
2745
|
if (d.indexOf(m) !== -1)
|
|
2729
|
-
throw Error("Circular reference detected in " + _.join("."));
|
|
2730
|
-
d.push(m), h.forEach(m, function(
|
|
2731
|
-
(!(h.isUndefined(
|
|
2746
|
+
throw new Error("Circular reference detected in " + _.join("."));
|
|
2747
|
+
d.push(m), h.forEach(m, function(A, R) {
|
|
2748
|
+
(!(h.isUndefined(A) || A === null) && r.call(t, A, h.isString(R) ? R.trim() : R, _, g)) === !0 && P(A, _ ? _.concat(R) : [R], y + 1);
|
|
2732
2749
|
}), d.pop();
|
|
2733
2750
|
}
|
|
2734
2751
|
}
|
|
@@ -2736,7 +2753,7 @@ function Qt(i, t, e) {
|
|
|
2736
2753
|
throw new TypeError("data must be an object");
|
|
2737
2754
|
return P(i), t;
|
|
2738
2755
|
}
|
|
2739
|
-
function
|
|
2756
|
+
function He(i) {
|
|
2740
2757
|
const t = {
|
|
2741
2758
|
"!": "%21",
|
|
2742
2759
|
"'": "%27",
|
|
@@ -2749,38 +2766,38 @@ function qe(i) {
|
|
|
2749
2766
|
return t[n];
|
|
2750
2767
|
});
|
|
2751
2768
|
}
|
|
2752
|
-
function
|
|
2769
|
+
function me(i, t) {
|
|
2753
2770
|
this._pairs = [], i && Qt(i, this, t);
|
|
2754
2771
|
}
|
|
2755
|
-
const
|
|
2756
|
-
|
|
2772
|
+
const yn = me.prototype;
|
|
2773
|
+
yn.append = function(t, e) {
|
|
2757
2774
|
this._pairs.push([t, e]);
|
|
2758
2775
|
};
|
|
2759
|
-
|
|
2776
|
+
yn.toString = function(t) {
|
|
2760
2777
|
const e = t ? function(n) {
|
|
2761
|
-
return t.call(this, n,
|
|
2762
|
-
} :
|
|
2778
|
+
return t.call(this, n, He);
|
|
2779
|
+
} : He;
|
|
2763
2780
|
return this._pairs.map(function(r) {
|
|
2764
2781
|
return e(r[0]) + "=" + e(r[1]);
|
|
2765
2782
|
}, "").join("&");
|
|
2766
2783
|
};
|
|
2767
|
-
function
|
|
2784
|
+
function vr(i) {
|
|
2768
2785
|
return encodeURIComponent(i).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
2769
2786
|
}
|
|
2770
|
-
function
|
|
2787
|
+
function bn(i, t, e) {
|
|
2771
2788
|
if (!t)
|
|
2772
2789
|
return i;
|
|
2773
|
-
const n = e && e.encode ||
|
|
2790
|
+
const n = e && e.encode || vr, r = h.isFunction(e) ? {
|
|
2774
2791
|
serialize: e
|
|
2775
2792
|
} : e, s = r && r.serialize;
|
|
2776
2793
|
let a;
|
|
2777
|
-
if (s ? a = s(t, r) : a = h.isURLSearchParams(t) ? t.toString() : new
|
|
2794
|
+
if (s ? a = s(t, r) : a = h.isURLSearchParams(t) ? t.toString() : new me(t, r).toString(n), a) {
|
|
2778
2795
|
const o = i.indexOf("#");
|
|
2779
2796
|
o !== -1 && (i = i.slice(0, o)), i += (i.indexOf("?") === -1 ? "?" : "&") + a;
|
|
2780
2797
|
}
|
|
2781
2798
|
return i;
|
|
2782
2799
|
}
|
|
2783
|
-
class
|
|
2800
|
+
class We {
|
|
2784
2801
|
constructor() {
|
|
2785
2802
|
this.handlers = [];
|
|
2786
2803
|
}
|
|
@@ -2835,32 +2852,33 @@ class Ke {
|
|
|
2835
2852
|
});
|
|
2836
2853
|
}
|
|
2837
2854
|
}
|
|
2838
|
-
const
|
|
2855
|
+
const ye = {
|
|
2839
2856
|
silentJSONParsing: !0,
|
|
2840
2857
|
forcedJSONParsing: !0,
|
|
2841
2858
|
clarifyTimeoutError: !1,
|
|
2842
|
-
legacyInterceptorReqResOrdering: !0
|
|
2843
|
-
|
|
2859
|
+
legacyInterceptorReqResOrdering: !0,
|
|
2860
|
+
advertiseZstdAcceptEncoding: !1
|
|
2861
|
+
}, Sr = typeof URLSearchParams < "u" ? URLSearchParams : me, Tr = typeof FormData < "u" ? FormData : null, Ar = typeof Blob < "u" ? Blob : null, Rr = {
|
|
2844
2862
|
isBrowser: !0,
|
|
2845
2863
|
classes: {
|
|
2846
|
-
URLSearchParams:
|
|
2847
|
-
FormData:
|
|
2848
|
-
Blob:
|
|
2864
|
+
URLSearchParams: Sr,
|
|
2865
|
+
FormData: Tr,
|
|
2866
|
+
Blob: Ar
|
|
2849
2867
|
},
|
|
2850
2868
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2851
|
-
},
|
|
2852
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
2869
|
+
}, be = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, Cr = be && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), Or = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2870
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dr = be && window.location.href || "http://localhost", Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2853
2871
|
__proto__: null,
|
|
2854
|
-
hasBrowserEnv:
|
|
2855
|
-
hasStandardBrowserEnv:
|
|
2856
|
-
hasStandardBrowserWebWorkerEnv:
|
|
2872
|
+
hasBrowserEnv: be,
|
|
2873
|
+
hasStandardBrowserEnv: Cr,
|
|
2874
|
+
hasStandardBrowserWebWorkerEnv: Or,
|
|
2857
2875
|
navigator: pe,
|
|
2858
|
-
origin:
|
|
2876
|
+
origin: Dr
|
|
2859
2877
|
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
2860
|
-
...
|
|
2861
|
-
...
|
|
2878
|
+
...Ir,
|
|
2879
|
+
...Rr
|
|
2862
2880
|
};
|
|
2863
|
-
function
|
|
2881
|
+
function Nr(i, t) {
|
|
2864
2882
|
return Qt(i, new x.classes.URLSearchParams(), {
|
|
2865
2883
|
visitor: function(e, n, r, s) {
|
|
2866
2884
|
return x.isNode && h.isBuffer(e) ? (this.append(n, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
@@ -2868,10 +2886,10 @@ function wr(i, t) {
|
|
|
2868
2886
|
...t
|
|
2869
2887
|
});
|
|
2870
2888
|
}
|
|
2871
|
-
function
|
|
2889
|
+
function Br(i) {
|
|
2872
2890
|
return h.matchAll(/\w+|\[(\w*)]/g, i).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
2873
2891
|
}
|
|
2874
|
-
function
|
|
2892
|
+
function xr(i) {
|
|
2875
2893
|
const t = {}, e = Object.keys(i);
|
|
2876
2894
|
let n;
|
|
2877
2895
|
const r = e.length;
|
|
@@ -2880,23 +2898,23 @@ function Tr(i) {
|
|
|
2880
2898
|
s = e[n], t[s] = i[s];
|
|
2881
2899
|
return t;
|
|
2882
2900
|
}
|
|
2883
|
-
function
|
|
2901
|
+
function Pn(i) {
|
|
2884
2902
|
function t(e, n, r, s) {
|
|
2885
2903
|
let a = e[s++];
|
|
2886
2904
|
if (a === "__proto__") return !0;
|
|
2887
2905
|
const o = Number.isFinite(+a), c = s >= e.length;
|
|
2888
|
-
return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r
|
|
2906
|
+
return a = !a && h.isArray(r) ? r.length : a, c ? (h.hasOwnProp(r, a) ? r[a] = h.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!h.hasOwnProp(r, a) || !h.isObject(r[a])) && (r[a] = []), t(e, n, r[a], s) && h.isArray(r[a]) && (r[a] = xr(r[a])), !o);
|
|
2889
2907
|
}
|
|
2890
2908
|
if (h.isFormData(i) && h.isFunction(i.entries)) {
|
|
2891
2909
|
const e = {};
|
|
2892
2910
|
return h.forEachEntry(i, (n, r) => {
|
|
2893
|
-
t(
|
|
2911
|
+
t(Br(n), r, e, 0);
|
|
2894
2912
|
}), e;
|
|
2895
2913
|
}
|
|
2896
2914
|
return null;
|
|
2897
2915
|
}
|
|
2898
|
-
const
|
|
2899
|
-
function
|
|
2916
|
+
const mt = (i, t) => i != null && h.hasOwnProp(i, t) ? i[t] : void 0;
|
|
2917
|
+
function Ur(i, t, e) {
|
|
2900
2918
|
if (h.isString(i))
|
|
2901
2919
|
try {
|
|
2902
2920
|
return (t || JSON.parse)(i), h.trim(i);
|
|
@@ -2906,14 +2924,14 @@ function Ar(i, t, e) {
|
|
|
2906
2924
|
}
|
|
2907
2925
|
return (e || JSON.stringify)(i);
|
|
2908
2926
|
}
|
|
2909
|
-
const
|
|
2910
|
-
transitional:
|
|
2927
|
+
const Dt = {
|
|
2928
|
+
transitional: ye,
|
|
2911
2929
|
adapter: ["xhr", "http", "fetch"],
|
|
2912
2930
|
transformRequest: [
|
|
2913
2931
|
function(t, e) {
|
|
2914
2932
|
const n = e.getContentType() || "", r = n.indexOf("application/json") > -1, s = h.isObject(t);
|
|
2915
2933
|
if (s && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
|
|
2916
|
-
return r ? JSON.stringify(
|
|
2934
|
+
return r ? JSON.stringify(Pn(t)) : t;
|
|
2917
2935
|
if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
|
|
2918
2936
|
return t;
|
|
2919
2937
|
if (h.isArrayBufferView(t))
|
|
@@ -2922,11 +2940,11 @@ const Ot = {
|
|
|
2922
2940
|
return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
2923
2941
|
let o;
|
|
2924
2942
|
if (s) {
|
|
2925
|
-
const c =
|
|
2943
|
+
const c = mt(this, "formSerializer");
|
|
2926
2944
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
2927
|
-
return
|
|
2945
|
+
return Nr(t, c).toString();
|
|
2928
2946
|
if ((o = h.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
2929
|
-
const u =
|
|
2947
|
+
const u = mt(this, "env"), l = u && u.FormData;
|
|
2930
2948
|
return Qt(
|
|
2931
2949
|
o ? { "files[]": t } : t,
|
|
2932
2950
|
l && new l(),
|
|
@@ -2934,21 +2952,21 @@ const Ot = {
|
|
|
2934
2952
|
);
|
|
2935
2953
|
}
|
|
2936
2954
|
}
|
|
2937
|
-
return s || r ? (e.setContentType("application/json", !1),
|
|
2955
|
+
return s || r ? (e.setContentType("application/json", !1), Ur(t)) : t;
|
|
2938
2956
|
}
|
|
2939
2957
|
],
|
|
2940
2958
|
transformResponse: [
|
|
2941
2959
|
function(t) {
|
|
2942
|
-
const e =
|
|
2960
|
+
const e = mt(this, "transitional") || Dt.transitional, n = e && e.forcedJSONParsing, r = mt(this, "responseType"), s = r === "json";
|
|
2943
2961
|
if (h.isResponse(t) || h.isReadableStream(t))
|
|
2944
2962
|
return t;
|
|
2945
2963
|
if (t && h.isString(t) && (n && !r || s)) {
|
|
2946
2964
|
const o = !(e && e.silentJSONParsing) && s;
|
|
2947
2965
|
try {
|
|
2948
|
-
return JSON.parse(t,
|
|
2966
|
+
return JSON.parse(t, mt(this, "parseReviver"));
|
|
2949
2967
|
} catch (c) {
|
|
2950
2968
|
if (o)
|
|
2951
|
-
throw c.name === "SyntaxError" ?
|
|
2969
|
+
throw c.name === "SyntaxError" ? b.from(c, b.ERR_BAD_RESPONSE, this, null, mt(this, "response")) : c;
|
|
2952
2970
|
}
|
|
2953
2971
|
}
|
|
2954
2972
|
return t;
|
|
@@ -2978,19 +2996,19 @@ const Ot = {
|
|
|
2978
2996
|
}
|
|
2979
2997
|
};
|
|
2980
2998
|
h.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (i) => {
|
|
2981
|
-
|
|
2999
|
+
Dt.headers[i] = {};
|
|
2982
3000
|
});
|
|
2983
3001
|
function ae(i, t) {
|
|
2984
|
-
const e = this ||
|
|
3002
|
+
const e = this || Dt, n = t || e, r = V.from(n.headers);
|
|
2985
3003
|
let s = n.data;
|
|
2986
3004
|
return h.forEach(i, function(o) {
|
|
2987
3005
|
s = o.call(e, s, r.normalize(), t ? t.status : void 0);
|
|
2988
3006
|
}), r.normalize(), s;
|
|
2989
3007
|
}
|
|
2990
|
-
function
|
|
3008
|
+
function En(i) {
|
|
2991
3009
|
return !!(i && i.__CANCEL__);
|
|
2992
3010
|
}
|
|
2993
|
-
let
|
|
3011
|
+
let It = class extends b {
|
|
2994
3012
|
/**
|
|
2995
3013
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
2996
3014
|
*
|
|
@@ -3001,24 +3019,24 @@ let Dt = class extends y {
|
|
|
3001
3019
|
* @returns {CanceledError} The created error.
|
|
3002
3020
|
*/
|
|
3003
3021
|
constructor(t, e, n) {
|
|
3004
|
-
super(t ?? "canceled",
|
|
3022
|
+
super(t ?? "canceled", b.ERR_CANCELED, e, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
3005
3023
|
}
|
|
3006
3024
|
};
|
|
3007
|
-
function
|
|
3025
|
+
function wn(i, t, e) {
|
|
3008
3026
|
const n = e.config.validateStatus;
|
|
3009
|
-
!e.status || !n || n(e.status) ? i(e) : t(new
|
|
3027
|
+
!e.status || !n || n(e.status) ? i(e) : t(new b(
|
|
3010
3028
|
"Request failed with status code " + e.status,
|
|
3011
|
-
e.status >= 400 && e.status < 500 ?
|
|
3029
|
+
e.status >= 400 && e.status < 500 ? b.ERR_BAD_REQUEST : b.ERR_BAD_RESPONSE,
|
|
3012
3030
|
e.config,
|
|
3013
3031
|
e.request,
|
|
3014
3032
|
e
|
|
3015
3033
|
));
|
|
3016
3034
|
}
|
|
3017
|
-
function
|
|
3035
|
+
function Lr(i) {
|
|
3018
3036
|
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(i);
|
|
3019
3037
|
return t && t[1] || "";
|
|
3020
3038
|
}
|
|
3021
|
-
function
|
|
3039
|
+
function Vr(i, t) {
|
|
3022
3040
|
i = i || 10;
|
|
3023
3041
|
const e = new Array(i), n = new Array(i);
|
|
3024
3042
|
let r = 0, s = 0, a;
|
|
@@ -3034,7 +3052,7 @@ function Cr(i, t) {
|
|
|
3034
3052
|
return g ? Math.round(d * 1e3 / g) : void 0;
|
|
3035
3053
|
};
|
|
3036
3054
|
}
|
|
3037
|
-
function
|
|
3055
|
+
function Mr(i, t) {
|
|
3038
3056
|
let e = 0, n = 1e3 / t, r, s;
|
|
3039
3057
|
const a = (u, l = Date.now()) => {
|
|
3040
3058
|
e = l, r = null, s && (clearTimeout(s), s = null), i(...u);
|
|
@@ -3048,8 +3066,10 @@ function Or(i, t) {
|
|
|
3048
3066
|
}
|
|
3049
3067
|
const Wt = (i, t, e = 3) => {
|
|
3050
3068
|
let n = 0;
|
|
3051
|
-
const r =
|
|
3052
|
-
return
|
|
3069
|
+
const r = Vr(50, 250);
|
|
3070
|
+
return Mr((s) => {
|
|
3071
|
+
if (!s || typeof s.loaded != "number")
|
|
3072
|
+
return;
|
|
3053
3073
|
const a = s.loaded, o = s.lengthComputable ? s.total : void 0, c = o != null ? Math.min(a, o) : a, u = Math.max(0, c - n), l = r(u);
|
|
3054
3074
|
n = Math.max(n, c);
|
|
3055
3075
|
const f = {
|
|
@@ -3065,7 +3085,7 @@ const Wt = (i, t, e = 3) => {
|
|
|
3065
3085
|
};
|
|
3066
3086
|
i(f);
|
|
3067
3087
|
}, e);
|
|
3068
|
-
},
|
|
3088
|
+
}, Xe = (i, t) => {
|
|
3069
3089
|
const e = i != null;
|
|
3070
3090
|
return [
|
|
3071
3091
|
(n) => t[0]({
|
|
@@ -3075,10 +3095,10 @@ const Wt = (i, t, e = 3) => {
|
|
|
3075
3095
|
}),
|
|
3076
3096
|
t[1]
|
|
3077
3097
|
];
|
|
3078
|
-
},
|
|
3098
|
+
}, ze = (i) => (...t) => h.asap(() => i(...t)), Fr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((i, t) => (e) => (e = new URL(e, x.origin), i.protocol === e.protocol && i.host === e.host && (t || i.port === e.port)))(
|
|
3079
3099
|
new URL(x.origin),
|
|
3080
3100
|
x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
|
|
3081
|
-
) : () => !0,
|
|
3101
|
+
) : () => !0, kr = x.hasStandardBrowserEnv ? (
|
|
3082
3102
|
// Standard browser envs support document.cookie
|
|
3083
3103
|
{
|
|
3084
3104
|
write(i, t, e, n, r, s, a) {
|
|
@@ -3112,18 +3132,18 @@ const Wt = (i, t, e = 3) => {
|
|
|
3112
3132
|
}
|
|
3113
3133
|
}
|
|
3114
3134
|
);
|
|
3115
|
-
function
|
|
3135
|
+
function jr(i) {
|
|
3116
3136
|
return typeof i != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(i);
|
|
3117
3137
|
}
|
|
3118
|
-
function
|
|
3138
|
+
function qr(i, t) {
|
|
3119
3139
|
return t ? i.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : i;
|
|
3120
3140
|
}
|
|
3121
|
-
function
|
|
3122
|
-
let n = !
|
|
3123
|
-
return i && (n || e === !1) ?
|
|
3141
|
+
function vn(i, t, e) {
|
|
3142
|
+
let n = !jr(t);
|
|
3143
|
+
return i && (n || e === !1) ? qr(i, t) : t;
|
|
3124
3144
|
}
|
|
3125
|
-
const
|
|
3126
|
-
function
|
|
3145
|
+
const Ge = (i) => i instanceof V ? { ...i } : i;
|
|
3146
|
+
function ft(i, t) {
|
|
3127
3147
|
t = t || {};
|
|
3128
3148
|
const e = /* @__PURE__ */ Object.create(null);
|
|
3129
3149
|
Object.defineProperty(e, "hasOwnProperty", {
|
|
@@ -3190,7 +3210,7 @@ function lt(i, t) {
|
|
|
3190
3210
|
allowedSocketPaths: a,
|
|
3191
3211
|
responseEncoding: a,
|
|
3192
3212
|
validateStatus: o,
|
|
3193
|
-
headers: (u, l, f) => r(
|
|
3213
|
+
headers: (u, l, f) => r(Ge(u), Ge(l), f, !0)
|
|
3194
3214
|
};
|
|
3195
3215
|
return h.forEach(Object.keys({ ...i, ...t }), function(l) {
|
|
3196
3216
|
if (l === "__proto__" || l === "constructor" || l === "prototype") return;
|
|
@@ -3198,40 +3218,42 @@ function lt(i, t) {
|
|
|
3198
3218
|
h.isUndefined(P) && f !== o || (e[l] = P);
|
|
3199
3219
|
}), e;
|
|
3200
3220
|
}
|
|
3201
|
-
const
|
|
3202
|
-
function
|
|
3221
|
+
const Kr = ["content-type", "content-length"];
|
|
3222
|
+
function Hr(i, t, e) {
|
|
3203
3223
|
if (e !== "content-only") {
|
|
3204
3224
|
i.set(t);
|
|
3205
3225
|
return;
|
|
3206
3226
|
}
|
|
3207
3227
|
Object.entries(t).forEach(([n, r]) => {
|
|
3208
|
-
|
|
3228
|
+
Kr.includes(n.toLowerCase()) && i.set(n, r);
|
|
3209
3229
|
});
|
|
3210
3230
|
}
|
|
3211
|
-
const
|
|
3231
|
+
const Wr = (i) => encodeURIComponent(i).replace(
|
|
3212
3232
|
/%([0-9A-F]{2})/gi,
|
|
3213
3233
|
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3214
|
-
)
|
|
3215
|
-
|
|
3234
|
+
);
|
|
3235
|
+
function Sn(i) {
|
|
3236
|
+
const t = ft({}, i), e = (d) => h.hasOwnProp(t, d) ? t[d] : void 0, n = e("data");
|
|
3216
3237
|
let r = e("withXSRFToken");
|
|
3217
3238
|
const s = e("xsrfHeaderName"), a = e("xsrfCookieName");
|
|
3218
3239
|
let o = e("headers");
|
|
3219
3240
|
const c = e("auth"), u = e("baseURL"), l = e("allowAbsoluteUrls"), f = e("url");
|
|
3220
|
-
if (t.headers = o = V.from(o), t.url =
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3241
|
+
if (t.headers = o = V.from(o), t.url = bn(
|
|
3242
|
+
vn(u, f, l),
|
|
3243
|
+
e("params"),
|
|
3244
|
+
e("paramsSerializer")
|
|
3224
3245
|
), c && o.set(
|
|
3225
3246
|
"Authorization",
|
|
3226
|
-
"Basic " + btoa((c.username || "") + ":" + (c.password ?
|
|
3227
|
-
), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv ? o.setContentType(void 0) : h.isFunction(n.getHeaders) &&
|
|
3228
|
-
const g = s && a &&
|
|
3247
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? Wr(c.password) : ""))
|
|
3248
|
+
), h.isFormData(n) && (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv || h.isReactNative(n) ? o.setContentType(void 0) : h.isFunction(n.getHeaders) && Hr(o, n.getHeaders(), e("formDataHeaderPolicy"))), x.hasStandardBrowserEnv && (h.isFunction(r) && (r = r(t)), r === !0 || r == null && Fr(t.url))) {
|
|
3249
|
+
const g = s && a && kr.read(a);
|
|
3229
3250
|
g && o.set(s, g);
|
|
3230
3251
|
}
|
|
3231
3252
|
return t;
|
|
3232
|
-
}
|
|
3253
|
+
}
|
|
3254
|
+
const Xr = typeof XMLHttpRequest < "u", zr = Xr && function(i) {
|
|
3233
3255
|
return new Promise(function(e, n) {
|
|
3234
|
-
const r =
|
|
3256
|
+
const r = Sn(i);
|
|
3235
3257
|
let s = r.data;
|
|
3236
3258
|
const a = V.from(r.headers).normalize();
|
|
3237
3259
|
let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, l, f, d, g, P;
|
|
@@ -3240,20 +3262,20 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3240
3262
|
}
|
|
3241
3263
|
let _ = new XMLHttpRequest();
|
|
3242
3264
|
_.open(r.method.toUpperCase(), r.url, !0), _.timeout = r.timeout;
|
|
3243
|
-
function
|
|
3265
|
+
function y() {
|
|
3244
3266
|
if (!_)
|
|
3245
3267
|
return;
|
|
3246
|
-
const
|
|
3268
|
+
const A = V.from(
|
|
3247
3269
|
"getAllResponseHeaders" in _ && _.getAllResponseHeaders()
|
|
3248
3270
|
), U = {
|
|
3249
3271
|
data: !o || o === "text" || o === "json" ? _.responseText : _.response,
|
|
3250
3272
|
status: _.status,
|
|
3251
3273
|
statusText: _.statusText,
|
|
3252
|
-
headers:
|
|
3274
|
+
headers: A,
|
|
3253
3275
|
config: i,
|
|
3254
3276
|
request: _
|
|
3255
3277
|
};
|
|
3256
|
-
|
|
3278
|
+
wn(
|
|
3257
3279
|
function(K) {
|
|
3258
3280
|
e(K), m();
|
|
3259
3281
|
},
|
|
@@ -3263,35 +3285,35 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3263
3285
|
U
|
|
3264
3286
|
), _ = null;
|
|
3265
3287
|
}
|
|
3266
|
-
"onloadend" in _ ? _.onloadend =
|
|
3267
|
-
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.startsWith("file:")) || setTimeout(
|
|
3288
|
+
"onloadend" in _ ? _.onloadend = y : _.onreadystatechange = function() {
|
|
3289
|
+
!_ || _.readyState !== 4 || _.status === 0 && !(_.responseURL && _.responseURL.startsWith("file:")) || setTimeout(y);
|
|
3268
3290
|
}, _.onabort = function() {
|
|
3269
|
-
_ && (n(new
|
|
3270
|
-
}, _.onerror = function(
|
|
3271
|
-
const U =
|
|
3272
|
-
E.event =
|
|
3291
|
+
_ && (n(new b("Request aborted", b.ECONNABORTED, i, _)), m(), _ = null);
|
|
3292
|
+
}, _.onerror = function(R) {
|
|
3293
|
+
const U = R && R.message ? R.message : "Network Error", E = new b(U, b.ERR_NETWORK, i, _);
|
|
3294
|
+
E.event = R || null, n(E), m(), _ = null;
|
|
3273
3295
|
}, _.ontimeout = function() {
|
|
3274
|
-
let
|
|
3275
|
-
const U = r.transitional ||
|
|
3276
|
-
r.timeoutErrorMessage && (
|
|
3277
|
-
new
|
|
3278
|
-
|
|
3279
|
-
U.clarifyTimeoutError ?
|
|
3296
|
+
let R = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
3297
|
+
const U = r.transitional || ye;
|
|
3298
|
+
r.timeoutErrorMessage && (R = r.timeoutErrorMessage), n(
|
|
3299
|
+
new b(
|
|
3300
|
+
R,
|
|
3301
|
+
U.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
3280
3302
|
i,
|
|
3281
3303
|
_
|
|
3282
3304
|
)
|
|
3283
3305
|
), m(), _ = null;
|
|
3284
|
-
}, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(a
|
|
3285
|
-
_.setRequestHeader(U,
|
|
3286
|
-
}), h.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), o && o !== "json" && (_.responseType = r.responseType), u && ([d, P] = Wt(u, !0), _.addEventListener("progress", d)), c && _.upload && ([f, g] = Wt(c), _.upload.addEventListener("progress", f), _.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (
|
|
3287
|
-
_ && (n(!
|
|
3306
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in _ && h.forEach(_n(a), function(R, U) {
|
|
3307
|
+
_.setRequestHeader(U, R);
|
|
3308
|
+
}), h.isUndefined(r.withCredentials) || (_.withCredentials = !!r.withCredentials), o && o !== "json" && (_.responseType = r.responseType), u && ([d, P] = Wt(u, !0), _.addEventListener("progress", d)), c && _.upload && ([f, g] = Wt(c), _.upload.addEventListener("progress", f), _.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (A) => {
|
|
3309
|
+
_ && (n(!A || A.type ? new It(null, i, _) : A), _.abort(), m(), _ = null);
|
|
3288
3310
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
3289
|
-
const
|
|
3290
|
-
if (
|
|
3311
|
+
const v = Lr(r.url);
|
|
3312
|
+
if (v && !x.protocols.includes(v)) {
|
|
3291
3313
|
n(
|
|
3292
|
-
new
|
|
3293
|
-
"Unsupported protocol " +
|
|
3294
|
-
|
|
3314
|
+
new b(
|
|
3315
|
+
"Unsupported protocol " + v + ":",
|
|
3316
|
+
b.ERR_BAD_REQUEST,
|
|
3295
3317
|
i
|
|
3296
3318
|
)
|
|
3297
3319
|
);
|
|
@@ -3299,32 +3321,32 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3299
3321
|
}
|
|
3300
3322
|
_.send(s || null);
|
|
3301
3323
|
});
|
|
3302
|
-
},
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
)
|
|
3313
|
-
|
|
3314
|
-
}
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
};
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
},
|
|
3324
|
+
}, Gr = (i, t) => {
|
|
3325
|
+
if (i = i ? i.filter(Boolean) : [], !t && !i.length)
|
|
3326
|
+
return;
|
|
3327
|
+
const e = new AbortController();
|
|
3328
|
+
let n = !1;
|
|
3329
|
+
const r = function(c) {
|
|
3330
|
+
if (!n) {
|
|
3331
|
+
n = !0, a();
|
|
3332
|
+
const u = c instanceof Error ? c : this.reason;
|
|
3333
|
+
e.abort(
|
|
3334
|
+
u instanceof b ? u : new It(u instanceof Error ? u.message : u)
|
|
3335
|
+
);
|
|
3336
|
+
}
|
|
3337
|
+
};
|
|
3338
|
+
let s = t && setTimeout(() => {
|
|
3339
|
+
s = null, r(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
3340
|
+
}, t);
|
|
3341
|
+
const a = () => {
|
|
3342
|
+
i && (s && clearTimeout(s), s = null, i.forEach((c) => {
|
|
3343
|
+
c.unsubscribe ? c.unsubscribe(r) : c.removeEventListener("abort", r);
|
|
3344
|
+
}), i = null);
|
|
3345
|
+
};
|
|
3346
|
+
i.forEach((c) => c.addEventListener("abort", r));
|
|
3347
|
+
const { signal: o } = e;
|
|
3348
|
+
return o.unsubscribe = () => h.asap(a), o;
|
|
3349
|
+
}, $r = function* (i, t) {
|
|
3328
3350
|
let e = i.byteLength;
|
|
3329
3351
|
if (e < t) {
|
|
3330
3352
|
yield i;
|
|
@@ -3333,10 +3355,10 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3333
3355
|
let n = 0, r;
|
|
3334
3356
|
for (; n < e; )
|
|
3335
3357
|
r = n + t, yield i.slice(n, r), n = r;
|
|
3336
|
-
},
|
|
3337
|
-
for await (const e of
|
|
3338
|
-
yield*
|
|
3339
|
-
},
|
|
3358
|
+
}, Jr = async function* (i, t) {
|
|
3359
|
+
for await (const e of Qr(i))
|
|
3360
|
+
yield* $r(e, t);
|
|
3361
|
+
}, Qr = async function* (i) {
|
|
3340
3362
|
if (i[Symbol.asyncIterator]) {
|
|
3341
3363
|
yield* i;
|
|
3342
3364
|
return;
|
|
@@ -3352,8 +3374,8 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3352
3374
|
} finally {
|
|
3353
3375
|
await t.cancel();
|
|
3354
3376
|
}
|
|
3355
|
-
},
|
|
3356
|
-
const r =
|
|
3377
|
+
}, $e = (i, t, e, n) => {
|
|
3378
|
+
const r = Jr(i, t);
|
|
3357
3379
|
let s = 0, a, o = (c) => {
|
|
3358
3380
|
a || (a = !0, n && n(c));
|
|
3359
3381
|
};
|
|
@@ -3385,7 +3407,7 @@ const Lr = (i) => encodeURIComponent(i).replace(
|
|
|
3385
3407
|
}
|
|
3386
3408
|
);
|
|
3387
3409
|
};
|
|
3388
|
-
function
|
|
3410
|
+
function Zr(i) {
|
|
3389
3411
|
if (!i || typeof i != "string" || !i.startsWith("data:")) return 0;
|
|
3390
3412
|
const t = i.indexOf(",");
|
|
3391
3413
|
if (t < 0) return 0;
|
|
@@ -3423,14 +3445,29 @@ function Kr(i) {
|
|
|
3423
3445
|
}
|
|
3424
3446
|
return s;
|
|
3425
3447
|
}
|
|
3426
|
-
const
|
|
3448
|
+
const Pe = "1.17.0", Je = 64 * 1024, { isFunction: Ft } = h, Yr = (i) => encodeURIComponent(i).replace(
|
|
3449
|
+
/%([0-9A-F]{2})/gi,
|
|
3450
|
+
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3451
|
+
), Qe = (i) => {
|
|
3452
|
+
if (!h.isString(i))
|
|
3453
|
+
return i;
|
|
3454
|
+
try {
|
|
3455
|
+
return decodeURIComponent(i);
|
|
3456
|
+
} catch {
|
|
3457
|
+
return i;
|
|
3458
|
+
}
|
|
3459
|
+
}, Ze = (i, ...t) => {
|
|
3427
3460
|
try {
|
|
3428
3461
|
return !!i(...t);
|
|
3429
3462
|
} catch {
|
|
3430
3463
|
return !1;
|
|
3431
3464
|
}
|
|
3432
|
-
},
|
|
3433
|
-
const t =
|
|
3465
|
+
}, ts = (i) => {
|
|
3466
|
+
const t = i.indexOf("://");
|
|
3467
|
+
let e = i;
|
|
3468
|
+
return t !== -1 && (e = e.slice(t + 3)), e.includes("@") || e.includes(":");
|
|
3469
|
+
}, es = (i) => {
|
|
3470
|
+
const t = h.global !== void 0 && h.global !== null ? h.global : globalThis, { ReadableStream: e, TextEncoder: n } = t;
|
|
3434
3471
|
i = h.merge.call(
|
|
3435
3472
|
{
|
|
3436
3473
|
skipUndefined: !0
|
|
@@ -3444,226 +3481,249 @@ const be = "1.16.0", Ge = 64 * 1024, { isFunction: Ft } = h, $e = (i, ...t) => {
|
|
|
3444
3481
|
const { fetch: r, Request: s, Response: a } = i, o = r ? Ft(r) : typeof fetch == "function", c = Ft(s), u = Ft(a);
|
|
3445
3482
|
if (!o)
|
|
3446
3483
|
return !1;
|
|
3447
|
-
const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((
|
|
3448
|
-
let
|
|
3449
|
-
const
|
|
3484
|
+
const l = o && Ft(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((y) => (v) => y.encode(v))(new n()) : async (y) => new Uint8Array(await new s(y).arrayBuffer())), d = c && l && Ze(() => {
|
|
3485
|
+
let y = !1;
|
|
3486
|
+
const v = new s(x.origin, {
|
|
3450
3487
|
body: new e(),
|
|
3451
3488
|
method: "POST",
|
|
3452
3489
|
get duplex() {
|
|
3453
|
-
return
|
|
3490
|
+
return y = !0, "half";
|
|
3454
3491
|
}
|
|
3455
|
-
}),
|
|
3456
|
-
return
|
|
3457
|
-
}), g = u && l &&
|
|
3458
|
-
stream: g && ((
|
|
3492
|
+
}), A = v.headers.has("Content-Type");
|
|
3493
|
+
return v.body != null && v.body.cancel(), y && !A;
|
|
3494
|
+
}), g = u && l && Ze(() => h.isReadableStream(new a("").body)), P = {
|
|
3495
|
+
stream: g && ((y) => y.body)
|
|
3459
3496
|
};
|
|
3460
|
-
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
3461
|
-
!P[
|
|
3462
|
-
let
|
|
3463
|
-
if (
|
|
3464
|
-
return
|
|
3465
|
-
throw new
|
|
3466
|
-
`Response type '${
|
|
3467
|
-
|
|
3468
|
-
|
|
3497
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((y) => {
|
|
3498
|
+
!P[y] && (P[y] = (v, A) => {
|
|
3499
|
+
let R = v && v[y];
|
|
3500
|
+
if (R)
|
|
3501
|
+
return R.call(v);
|
|
3502
|
+
throw new b(
|
|
3503
|
+
`Response type '${y}' is not supported`,
|
|
3504
|
+
b.ERR_NOT_SUPPORT,
|
|
3505
|
+
A
|
|
3469
3506
|
);
|
|
3470
3507
|
});
|
|
3471
3508
|
});
|
|
3472
|
-
const m = async (
|
|
3473
|
-
if (
|
|
3509
|
+
const m = async (y) => {
|
|
3510
|
+
if (y == null)
|
|
3474
3511
|
return 0;
|
|
3475
|
-
if (h.isBlob(
|
|
3476
|
-
return
|
|
3477
|
-
if (h.isSpecCompliantForm(
|
|
3512
|
+
if (h.isBlob(y))
|
|
3513
|
+
return y.size;
|
|
3514
|
+
if (h.isSpecCompliantForm(y))
|
|
3478
3515
|
return (await new s(x.origin, {
|
|
3479
3516
|
method: "POST",
|
|
3480
|
-
body:
|
|
3517
|
+
body: y
|
|
3481
3518
|
}).arrayBuffer()).byteLength;
|
|
3482
|
-
if (h.isArrayBufferView(
|
|
3483
|
-
return
|
|
3484
|
-
if (h.isURLSearchParams(
|
|
3485
|
-
return (await f(
|
|
3486
|
-
}, _ = async (
|
|
3487
|
-
const
|
|
3488
|
-
return
|
|
3519
|
+
if (h.isArrayBufferView(y) || h.isArrayBuffer(y))
|
|
3520
|
+
return y.byteLength;
|
|
3521
|
+
if (h.isURLSearchParams(y) && (y = y + ""), h.isString(y))
|
|
3522
|
+
return (await f(y)).byteLength;
|
|
3523
|
+
}, _ = async (y, v) => {
|
|
3524
|
+
const A = h.toFiniteNumber(y.getContentLength());
|
|
3525
|
+
return A ?? m(v);
|
|
3489
3526
|
};
|
|
3490
|
-
return async (
|
|
3527
|
+
return async (y) => {
|
|
3491
3528
|
let {
|
|
3492
|
-
url:
|
|
3493
|
-
method:
|
|
3494
|
-
data:
|
|
3529
|
+
url: v,
|
|
3530
|
+
method: A,
|
|
3531
|
+
data: R,
|
|
3495
3532
|
signal: U,
|
|
3496
3533
|
cancelToken: E,
|
|
3497
3534
|
timeout: K,
|
|
3498
|
-
onDownloadProgress:
|
|
3535
|
+
onDownloadProgress: Z,
|
|
3499
3536
|
onUploadProgress: X,
|
|
3500
|
-
responseType:
|
|
3537
|
+
responseType: k,
|
|
3501
3538
|
headers: I,
|
|
3502
|
-
withCredentials:
|
|
3503
|
-
fetchOptions:
|
|
3539
|
+
withCredentials: pt = "same-origin",
|
|
3540
|
+
fetchOptions: at,
|
|
3504
3541
|
maxContentLength: z,
|
|
3505
3542
|
maxBodyLength: Yt
|
|
3506
|
-
} =
|
|
3507
|
-
const
|
|
3508
|
-
let
|
|
3509
|
-
|
|
3510
|
-
let
|
|
3543
|
+
} = Sn(y);
|
|
3544
|
+
const vt = h.isNumber(z) && z > -1, On = h.isNumber(Yt) && Yt > -1, Dn = (O) => h.hasOwnProp(y, O) ? y[O] : void 0;
|
|
3545
|
+
let we = r || fetch;
|
|
3546
|
+
k = k ? (k + "").toLowerCase() : "text";
|
|
3547
|
+
let nt = Gr(
|
|
3511
3548
|
[U, E && E.toAbortSignal()],
|
|
3512
3549
|
K
|
|
3513
|
-
),
|
|
3514
|
-
const
|
|
3515
|
-
|
|
3550
|
+
), j = null;
|
|
3551
|
+
const ot = nt && nt.unsubscribe && (() => {
|
|
3552
|
+
nt.unsubscribe();
|
|
3516
3553
|
});
|
|
3517
3554
|
let ve;
|
|
3518
3555
|
try {
|
|
3519
|
-
|
|
3520
|
-
|
|
3556
|
+
let O;
|
|
3557
|
+
const Y = Dn("auth");
|
|
3558
|
+
if (Y) {
|
|
3559
|
+
const S = Y.username || "", $ = Y.password || "";
|
|
3560
|
+
O = {
|
|
3561
|
+
username: S,
|
|
3562
|
+
password: $
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
if (ts(v)) {
|
|
3566
|
+
const S = new URL(v, x.origin);
|
|
3567
|
+
if (!O && (S.username || S.password)) {
|
|
3568
|
+
const $ = Qe(S.username), dt = Qe(S.password);
|
|
3569
|
+
O = {
|
|
3570
|
+
username: $,
|
|
3571
|
+
password: dt
|
|
3572
|
+
};
|
|
3573
|
+
}
|
|
3574
|
+
(S.username || S.password) && (S.username = "", S.password = "", v = S.href);
|
|
3575
|
+
}
|
|
3576
|
+
if (O && (I.delete("authorization"), I.set(
|
|
3577
|
+
"Authorization",
|
|
3578
|
+
"Basic " + btoa(Yr((O.username || "") + ":" + (O.password || "")))
|
|
3579
|
+
)), vt && typeof v == "string" && v.startsWith("data:") && Zr(v) > z)
|
|
3580
|
+
throw new b(
|
|
3521
3581
|
"maxContentLength size of " + z + " exceeded",
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3582
|
+
b.ERR_BAD_RESPONSE,
|
|
3583
|
+
y,
|
|
3584
|
+
j
|
|
3525
3585
|
);
|
|
3526
|
-
if (
|
|
3527
|
-
const
|
|
3528
|
-
if (typeof
|
|
3529
|
-
throw new
|
|
3586
|
+
if (On && A !== "get" && A !== "head") {
|
|
3587
|
+
const S = await _(I, R);
|
|
3588
|
+
if (typeof S == "number" && isFinite(S) && S > Yt)
|
|
3589
|
+
throw new b(
|
|
3530
3590
|
"Request body larger than maxBodyLength limit",
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3591
|
+
b.ERR_BAD_REQUEST,
|
|
3592
|
+
y,
|
|
3593
|
+
j
|
|
3534
3594
|
);
|
|
3535
3595
|
}
|
|
3536
|
-
if (X && d &&
|
|
3537
|
-
let
|
|
3596
|
+
if (X && d && A !== "get" && A !== "head" && (ve = await _(I, R)) !== 0) {
|
|
3597
|
+
let S = new s(v, {
|
|
3538
3598
|
method: "POST",
|
|
3539
|
-
body:
|
|
3599
|
+
body: R,
|
|
3540
3600
|
duplex: "half"
|
|
3541
|
-
}),
|
|
3542
|
-
if (h.isFormData(
|
|
3543
|
-
const [
|
|
3601
|
+
}), $;
|
|
3602
|
+
if (h.isFormData(R) && ($ = S.headers.get("content-type")) && I.setContentType($), S.body) {
|
|
3603
|
+
const [dt, Nt] = Xe(
|
|
3544
3604
|
ve,
|
|
3545
|
-
Wt(
|
|
3605
|
+
Wt(ze(X))
|
|
3546
3606
|
);
|
|
3547
|
-
|
|
3607
|
+
R = $e(S.body, Je, dt, Nt);
|
|
3548
3608
|
}
|
|
3549
3609
|
}
|
|
3550
|
-
h.isString(
|
|
3551
|
-
const
|
|
3552
|
-
if (h.isFormData(
|
|
3553
|
-
const
|
|
3554
|
-
|
|
3610
|
+
h.isString(pt) || (pt = pt ? "include" : "omit");
|
|
3611
|
+
const In = c && "credentials" in s.prototype;
|
|
3612
|
+
if (h.isFormData(R)) {
|
|
3613
|
+
const S = I.getContentType();
|
|
3614
|
+
S && /^multipart\/form-data/i.test(S) && !/boundary=/i.test(S) && I.delete("content-type");
|
|
3555
3615
|
}
|
|
3556
|
-
I.set("User-Agent", "axios/" +
|
|
3557
|
-
const
|
|
3558
|
-
...
|
|
3559
|
-
signal:
|
|
3560
|
-
method:
|
|
3561
|
-
headers: I.normalize()
|
|
3562
|
-
body:
|
|
3616
|
+
I.set("User-Agent", "axios/" + Pe, !1);
|
|
3617
|
+
const Se = {
|
|
3618
|
+
...at,
|
|
3619
|
+
signal: nt,
|
|
3620
|
+
method: A.toUpperCase(),
|
|
3621
|
+
headers: _n(I.normalize()),
|
|
3622
|
+
body: R,
|
|
3563
3623
|
duplex: "half",
|
|
3564
|
-
credentials:
|
|
3624
|
+
credentials: In ? pt : void 0
|
|
3565
3625
|
};
|
|
3566
|
-
|
|
3567
|
-
let G = await (c ?
|
|
3568
|
-
if (
|
|
3569
|
-
const
|
|
3570
|
-
if (
|
|
3571
|
-
throw new
|
|
3626
|
+
j = c && new s(v, Se);
|
|
3627
|
+
let G = await (c ? we(j, at) : we(v, Se));
|
|
3628
|
+
if (vt) {
|
|
3629
|
+
const S = h.toFiniteNumber(G.headers.get("content-length"));
|
|
3630
|
+
if (S != null && S > z)
|
|
3631
|
+
throw new b(
|
|
3572
3632
|
"maxContentLength size of " + z + " exceeded",
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3633
|
+
b.ERR_BAD_RESPONSE,
|
|
3634
|
+
y,
|
|
3635
|
+
j
|
|
3576
3636
|
);
|
|
3577
3637
|
}
|
|
3578
|
-
const te = g && (
|
|
3579
|
-
if (g && G.body && (
|
|
3580
|
-
const
|
|
3581
|
-
["status", "statusText", "headers"].forEach((
|
|
3582
|
-
|
|
3638
|
+
const te = g && (k === "stream" || k === "response");
|
|
3639
|
+
if (g && G.body && (Z || vt || te && ot)) {
|
|
3640
|
+
const S = {};
|
|
3641
|
+
["status", "statusText", "headers"].forEach((St) => {
|
|
3642
|
+
S[St] = G[St];
|
|
3583
3643
|
});
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3586
|
-
Wt(
|
|
3644
|
+
const $ = h.toFiniteNumber(G.headers.get("content-length")), [dt, Nt] = Z && Xe(
|
|
3645
|
+
$,
|
|
3646
|
+
Wt(ze(Z), !0)
|
|
3587
3647
|
) || [];
|
|
3588
|
-
let
|
|
3589
|
-
const
|
|
3590
|
-
if (
|
|
3591
|
-
throw new
|
|
3648
|
+
let Te = 0;
|
|
3649
|
+
const Nn = (St) => {
|
|
3650
|
+
if (vt && (Te = St, Te > z))
|
|
3651
|
+
throw new b(
|
|
3592
3652
|
"maxContentLength size of " + z + " exceeded",
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3653
|
+
b.ERR_BAD_RESPONSE,
|
|
3654
|
+
y,
|
|
3655
|
+
j
|
|
3596
3656
|
);
|
|
3597
|
-
|
|
3657
|
+
dt && dt(St);
|
|
3598
3658
|
};
|
|
3599
3659
|
G = new a(
|
|
3600
|
-
|
|
3601
|
-
Nt && Nt(),
|
|
3660
|
+
$e(G.body, Je, Nn, () => {
|
|
3661
|
+
Nt && Nt(), ot && ot();
|
|
3602
3662
|
}),
|
|
3603
|
-
|
|
3663
|
+
S
|
|
3604
3664
|
);
|
|
3605
3665
|
}
|
|
3606
|
-
|
|
3607
|
-
let
|
|
3666
|
+
k = k || "text";
|
|
3667
|
+
let tt = await P[h.findKey(P, k) || "text"](
|
|
3608
3668
|
G,
|
|
3609
|
-
|
|
3669
|
+
y
|
|
3610
3670
|
);
|
|
3611
|
-
if (
|
|
3612
|
-
let
|
|
3613
|
-
if (
|
|
3614
|
-
throw new
|
|
3671
|
+
if (vt && !g && !te) {
|
|
3672
|
+
let S;
|
|
3673
|
+
if (tt != null && (typeof tt.byteLength == "number" ? S = tt.byteLength : typeof tt.size == "number" ? S = tt.size : typeof tt == "string" && (S = typeof n == "function" ? new n().encode(tt).byteLength : tt.length)), typeof S == "number" && S > z)
|
|
3674
|
+
throw new b(
|
|
3615
3675
|
"maxContentLength size of " + z + " exceeded",
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3676
|
+
b.ERR_BAD_RESPONSE,
|
|
3677
|
+
y,
|
|
3678
|
+
j
|
|
3619
3679
|
);
|
|
3620
3680
|
}
|
|
3621
|
-
return !te &&
|
|
3622
|
-
|
|
3623
|
-
data:
|
|
3681
|
+
return !te && ot && ot(), await new Promise((S, $) => {
|
|
3682
|
+
wn(S, $, {
|
|
3683
|
+
data: tt,
|
|
3624
3684
|
headers: V.from(G.headers),
|
|
3625
3685
|
status: G.status,
|
|
3626
3686
|
statusText: G.statusText,
|
|
3627
|
-
config:
|
|
3628
|
-
request:
|
|
3687
|
+
config: y,
|
|
3688
|
+
request: j
|
|
3629
3689
|
});
|
|
3630
3690
|
});
|
|
3631
|
-
} catch (
|
|
3632
|
-
if (
|
|
3633
|
-
const
|
|
3634
|
-
throw
|
|
3691
|
+
} catch (O) {
|
|
3692
|
+
if (ot && ot(), nt && nt.aborted && nt.reason instanceof b) {
|
|
3693
|
+
const Y = nt.reason;
|
|
3694
|
+
throw Y.config = y, j && (Y.request = j), O !== Y && (Y.cause = O), Y;
|
|
3635
3695
|
}
|
|
3636
|
-
throw
|
|
3637
|
-
new
|
|
3696
|
+
throw O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
|
|
3697
|
+
new b(
|
|
3638
3698
|
"Network Error",
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3699
|
+
b.ERR_NETWORK,
|
|
3700
|
+
y,
|
|
3701
|
+
j,
|
|
3702
|
+
O && O.response
|
|
3643
3703
|
),
|
|
3644
3704
|
{
|
|
3645
|
-
cause:
|
|
3705
|
+
cause: O.cause || O
|
|
3646
3706
|
}
|
|
3647
|
-
) :
|
|
3707
|
+
) : b.from(O, O && O.code, y, j, O && O.response);
|
|
3648
3708
|
}
|
|
3649
3709
|
};
|
|
3650
|
-
},
|
|
3710
|
+
}, ns = /* @__PURE__ */ new Map(), Tn = (i) => {
|
|
3651
3711
|
let t = i && i.env || {};
|
|
3652
3712
|
const { fetch: e, Request: n, Response: r } = t, s = [n, r, e];
|
|
3653
|
-
let a = s.length, o = a, c, u, l =
|
|
3713
|
+
let a = s.length, o = a, c, u, l = ns;
|
|
3654
3714
|
for (; o--; )
|
|
3655
|
-
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() :
|
|
3715
|
+
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() : es(t)), l = u;
|
|
3656
3716
|
return u;
|
|
3657
3717
|
};
|
|
3658
|
-
|
|
3659
|
-
const
|
|
3660
|
-
http:
|
|
3661
|
-
xhr:
|
|
3718
|
+
Tn();
|
|
3719
|
+
const Ee = {
|
|
3720
|
+
http: Pr,
|
|
3721
|
+
xhr: zr,
|
|
3662
3722
|
fetch: {
|
|
3663
|
-
get:
|
|
3723
|
+
get: Tn
|
|
3664
3724
|
}
|
|
3665
3725
|
};
|
|
3666
|
-
h.forEach(
|
|
3726
|
+
h.forEach(Ee, (i, t) => {
|
|
3667
3727
|
if (i) {
|
|
3668
3728
|
try {
|
|
3669
3729
|
Object.defineProperty(i, "name", { __proto__: null, value: t });
|
|
@@ -3672,8 +3732,8 @@ h.forEach(Pe, (i, t) => {
|
|
|
3672
3732
|
Object.defineProperty(i, "adapterName", { __proto__: null, value: t });
|
|
3673
3733
|
}
|
|
3674
3734
|
});
|
|
3675
|
-
const
|
|
3676
|
-
function
|
|
3735
|
+
const Ye = (i) => `- ${i}`, is = (i) => h.isFunction(i) || i === null || i === !1;
|
|
3736
|
+
function rs(i, t) {
|
|
3677
3737
|
i = h.isArray(i) ? i : [i];
|
|
3678
3738
|
const { length: e } = i;
|
|
3679
3739
|
let n, r;
|
|
@@ -3681,8 +3741,8 @@ function zr(i, t) {
|
|
|
3681
3741
|
for (let a = 0; a < e; a++) {
|
|
3682
3742
|
n = i[a];
|
|
3683
3743
|
let o;
|
|
3684
|
-
if (r = n, !
|
|
3685
|
-
throw new
|
|
3744
|
+
if (r = n, !is(n) && (r = Ee[(o = String(n)).toLowerCase()], r === void 0))
|
|
3745
|
+
throw new b(`Unknown adapter '${o}'`);
|
|
3686
3746
|
if (r && (h.isFunction(r) || (r = r.get(t))))
|
|
3687
3747
|
break;
|
|
3688
3748
|
s[o || "#" + a] = r;
|
|
@@ -3692,33 +3752,33 @@ function zr(i, t) {
|
|
|
3692
3752
|
([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
3693
3753
|
);
|
|
3694
3754
|
let o = e ? a.length > 1 ? `since :
|
|
3695
|
-
` + a.map(
|
|
3696
|
-
`) : " " +
|
|
3697
|
-
throw new
|
|
3755
|
+
` + a.map(Ye).join(`
|
|
3756
|
+
`) : " " + Ye(a[0]) : "as no adapter specified";
|
|
3757
|
+
throw new b(
|
|
3698
3758
|
"There is no suitable adapter to dispatch the request " + o,
|
|
3699
3759
|
"ERR_NOT_SUPPORT"
|
|
3700
3760
|
);
|
|
3701
3761
|
}
|
|
3702
3762
|
return r;
|
|
3703
3763
|
}
|
|
3704
|
-
const
|
|
3764
|
+
const An = {
|
|
3705
3765
|
/**
|
|
3706
3766
|
* Resolve an adapter from a list of adapter names or functions.
|
|
3707
3767
|
* @type {Function}
|
|
3708
3768
|
*/
|
|
3709
|
-
getAdapter:
|
|
3769
|
+
getAdapter: rs,
|
|
3710
3770
|
/**
|
|
3711
3771
|
* Exposes all known adapters
|
|
3712
3772
|
* @type {Object<string, Function|Object>}
|
|
3713
3773
|
*/
|
|
3714
|
-
adapters:
|
|
3774
|
+
adapters: Ee
|
|
3715
3775
|
};
|
|
3716
3776
|
function oe(i) {
|
|
3717
3777
|
if (i.cancelToken && i.cancelToken.throwIfRequested(), i.signal && i.signal.aborted)
|
|
3718
|
-
throw new
|
|
3778
|
+
throw new It(null, i);
|
|
3719
3779
|
}
|
|
3720
|
-
function
|
|
3721
|
-
return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
3780
|
+
function tn(i) {
|
|
3781
|
+
return oe(i), i.headers = V.from(i.headers), i.data = ae.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(i.adapter || Dt.adapter, i)(i).then(
|
|
3722
3782
|
function(n) {
|
|
3723
3783
|
oe(i), i.response = n;
|
|
3724
3784
|
try {
|
|
@@ -3729,7 +3789,7 @@ function Qe(i) {
|
|
|
3729
3789
|
return n.headers = V.from(n.headers), n;
|
|
3730
3790
|
},
|
|
3731
3791
|
function(n) {
|
|
3732
|
-
if (!
|
|
3792
|
+
if (!En(n) && (oe(i), n && n.response)) {
|
|
3733
3793
|
i.response = n.response;
|
|
3734
3794
|
try {
|
|
3735
3795
|
n.response.data = ae.call(
|
|
@@ -3752,18 +3812,18 @@ const Zt = {};
|
|
|
3752
3812
|
return typeof n === i || "a" + (t < 1 ? "n " : " ") + i;
|
|
3753
3813
|
};
|
|
3754
3814
|
});
|
|
3755
|
-
const
|
|
3815
|
+
const en = {};
|
|
3756
3816
|
Zt.transitional = function(t, e, n) {
|
|
3757
3817
|
function r(s, a) {
|
|
3758
|
-
return "[Axios v" +
|
|
3818
|
+
return "[Axios v" + Pe + "] Transitional option '" + s + "'" + a + (n ? ". " + n : "");
|
|
3759
3819
|
}
|
|
3760
3820
|
return (s, a, o) => {
|
|
3761
3821
|
if (t === !1)
|
|
3762
|
-
throw new
|
|
3822
|
+
throw new b(
|
|
3763
3823
|
r(a, " has been removed" + (e ? " in " + e : "")),
|
|
3764
|
-
|
|
3824
|
+
b.ERR_DEPRECATED
|
|
3765
3825
|
);
|
|
3766
|
-
return e && !
|
|
3826
|
+
return e && !en[a] && (en[a] = !0, console.warn(
|
|
3767
3827
|
r(
|
|
3768
3828
|
a,
|
|
3769
3829
|
" has been deprecated since v" + e + " and will be removed in the near future"
|
|
@@ -3774,9 +3834,9 @@ Zt.transitional = function(t, e, n) {
|
|
|
3774
3834
|
Zt.spelling = function(t) {
|
|
3775
3835
|
return (e, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
3776
3836
|
};
|
|
3777
|
-
function
|
|
3837
|
+
function ss(i, t, e) {
|
|
3778
3838
|
if (typeof i != "object")
|
|
3779
|
-
throw new
|
|
3839
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
3780
3840
|
const n = Object.keys(i);
|
|
3781
3841
|
let r = n.length;
|
|
3782
3842
|
for (; r-- > 0; ) {
|
|
@@ -3784,25 +3844,25 @@ function Gr(i, t, e) {
|
|
|
3784
3844
|
if (a) {
|
|
3785
3845
|
const o = i[s], c = o === void 0 || a(o, s, i);
|
|
3786
3846
|
if (c !== !0)
|
|
3787
|
-
throw new
|
|
3847
|
+
throw new b(
|
|
3788
3848
|
"option " + s + " must be " + c,
|
|
3789
|
-
|
|
3849
|
+
b.ERR_BAD_OPTION_VALUE
|
|
3790
3850
|
);
|
|
3791
3851
|
continue;
|
|
3792
3852
|
}
|
|
3793
3853
|
if (e !== !0)
|
|
3794
|
-
throw new
|
|
3854
|
+
throw new b("Unknown option " + s, b.ERR_BAD_OPTION);
|
|
3795
3855
|
}
|
|
3796
3856
|
}
|
|
3797
3857
|
const Kt = {
|
|
3798
|
-
assertOptions:
|
|
3858
|
+
assertOptions: ss,
|
|
3799
3859
|
validators: Zt
|
|
3800
|
-
},
|
|
3801
|
-
let
|
|
3860
|
+
}, M = Kt.validators;
|
|
3861
|
+
let lt = class {
|
|
3802
3862
|
constructor(t) {
|
|
3803
3863
|
this.defaults = t || {}, this.interceptors = {
|
|
3804
|
-
request: new
|
|
3805
|
-
response: new
|
|
3864
|
+
request: new We(),
|
|
3865
|
+
response: new We()
|
|
3806
3866
|
};
|
|
3807
3867
|
}
|
|
3808
3868
|
/**
|
|
@@ -3844,15 +3904,16 @@ let ut = class {
|
|
|
3844
3904
|
}
|
|
3845
3905
|
}
|
|
3846
3906
|
_request(t, e) {
|
|
3847
|
-
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e =
|
|
3907
|
+
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = ft(this.defaults, e);
|
|
3848
3908
|
const { transitional: n, paramsSerializer: r, headers: s } = e;
|
|
3849
3909
|
n !== void 0 && Kt.assertOptions(
|
|
3850
3910
|
n,
|
|
3851
3911
|
{
|
|
3852
|
-
silentJSONParsing:
|
|
3853
|
-
forcedJSONParsing:
|
|
3854
|
-
clarifyTimeoutError:
|
|
3855
|
-
legacyInterceptorReqResOrdering:
|
|
3912
|
+
silentJSONParsing: M.transitional(M.boolean),
|
|
3913
|
+
forcedJSONParsing: M.transitional(M.boolean),
|
|
3914
|
+
clarifyTimeoutError: M.transitional(M.boolean),
|
|
3915
|
+
legacyInterceptorReqResOrdering: M.transitional(M.boolean),
|
|
3916
|
+
advertiseZstdAcceptEncoding: M.transitional(M.boolean)
|
|
3856
3917
|
},
|
|
3857
3918
|
!1
|
|
3858
3919
|
), r != null && (h.isFunction(r) ? e.paramsSerializer = {
|
|
@@ -3860,15 +3921,15 @@ let ut = class {
|
|
|
3860
3921
|
} : Kt.assertOptions(
|
|
3861
3922
|
r,
|
|
3862
3923
|
{
|
|
3863
|
-
encode:
|
|
3864
|
-
serialize:
|
|
3924
|
+
encode: M.function,
|
|
3925
|
+
serialize: M.function
|
|
3865
3926
|
},
|
|
3866
3927
|
!0
|
|
3867
3928
|
)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), Kt.assertOptions(
|
|
3868
3929
|
e,
|
|
3869
3930
|
{
|
|
3870
|
-
baseUrl:
|
|
3871
|
-
withXsrfToken:
|
|
3931
|
+
baseUrl: M.spelling("baseURL"),
|
|
3932
|
+
withXsrfToken: M.spelling("withXSRFToken")
|
|
3872
3933
|
},
|
|
3873
3934
|
!0
|
|
3874
3935
|
), e.method = (e.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -3882,7 +3943,7 @@ let ut = class {
|
|
|
3882
3943
|
if (typeof m.runWhen == "function" && m.runWhen(e) === !1)
|
|
3883
3944
|
return;
|
|
3884
3945
|
c = c && m.synchronous;
|
|
3885
|
-
const _ = e.transitional ||
|
|
3946
|
+
const _ = e.transitional || ye;
|
|
3886
3947
|
_ && _.legacyInterceptorReqResOrdering ? o.unshift(m.fulfilled, m.rejected) : o.push(m.fulfilled, m.rejected);
|
|
3887
3948
|
});
|
|
3888
3949
|
const u = [];
|
|
@@ -3891,7 +3952,7 @@ let ut = class {
|
|
|
3891
3952
|
});
|
|
3892
3953
|
let l, f = 0, d;
|
|
3893
3954
|
if (!c) {
|
|
3894
|
-
const P = [
|
|
3955
|
+
const P = [tn.bind(this), void 0];
|
|
3895
3956
|
for (P.unshift(...o), P.push(...u), d = P.length, l = Promise.resolve(e); f < d; )
|
|
3896
3957
|
l = l.then(P[f++], P[f++]);
|
|
3897
3958
|
return l;
|
|
@@ -3908,7 +3969,7 @@ let ut = class {
|
|
|
3908
3969
|
}
|
|
3909
3970
|
}
|
|
3910
3971
|
try {
|
|
3911
|
-
l =
|
|
3972
|
+
l = tn.call(this, g);
|
|
3912
3973
|
} catch (P) {
|
|
3913
3974
|
return Promise.reject(P);
|
|
3914
3975
|
}
|
|
@@ -3917,15 +3978,15 @@ let ut = class {
|
|
|
3917
3978
|
return l;
|
|
3918
3979
|
}
|
|
3919
3980
|
getUri(t) {
|
|
3920
|
-
t =
|
|
3921
|
-
const e =
|
|
3922
|
-
return
|
|
3981
|
+
t = ft(this.defaults, t);
|
|
3982
|
+
const e = vn(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
3983
|
+
return bn(e, t.params, t.paramsSerializer);
|
|
3923
3984
|
}
|
|
3924
3985
|
};
|
|
3925
3986
|
h.forEach(["delete", "get", "head", "options"], function(t) {
|
|
3926
|
-
|
|
3987
|
+
lt.prototype[t] = function(e, n) {
|
|
3927
3988
|
return this.request(
|
|
3928
|
-
|
|
3989
|
+
ft(n || {}, {
|
|
3929
3990
|
method: t,
|
|
3930
3991
|
url: e,
|
|
3931
3992
|
data: (n || {}).data
|
|
@@ -3937,7 +3998,7 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3937
3998
|
function e(n) {
|
|
3938
3999
|
return function(s, a, o) {
|
|
3939
4000
|
return this.request(
|
|
3940
|
-
|
|
4001
|
+
ft(o || {}, {
|
|
3941
4002
|
method: t,
|
|
3942
4003
|
headers: n ? {
|
|
3943
4004
|
"Content-Type": "multipart/form-data"
|
|
@@ -3948,9 +4009,9 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3948
4009
|
);
|
|
3949
4010
|
};
|
|
3950
4011
|
}
|
|
3951
|
-
|
|
4012
|
+
lt.prototype[t] = e(), t !== "query" && (lt.prototype[t + "Form"] = e(!0));
|
|
3952
4013
|
});
|
|
3953
|
-
let
|
|
4014
|
+
let as = class Rn {
|
|
3954
4015
|
constructor(t) {
|
|
3955
4016
|
if (typeof t != "function")
|
|
3956
4017
|
throw new TypeError("executor must be a function.");
|
|
@@ -3974,7 +4035,7 @@ let $r = class wn {
|
|
|
3974
4035
|
n.unsubscribe(s);
|
|
3975
4036
|
}, a;
|
|
3976
4037
|
}, t(function(s, a, o) {
|
|
3977
|
-
n.reason || (n.reason = new
|
|
4038
|
+
n.reason || (n.reason = new It(s, a, o), e(n.reason));
|
|
3978
4039
|
});
|
|
3979
4040
|
}
|
|
3980
4041
|
/**
|
|
@@ -4016,19 +4077,19 @@ let $r = class wn {
|
|
|
4016
4077
|
static source() {
|
|
4017
4078
|
let t;
|
|
4018
4079
|
return {
|
|
4019
|
-
token: new
|
|
4080
|
+
token: new Rn(function(r) {
|
|
4020
4081
|
t = r;
|
|
4021
4082
|
}),
|
|
4022
4083
|
cancel: t
|
|
4023
4084
|
};
|
|
4024
4085
|
}
|
|
4025
4086
|
};
|
|
4026
|
-
function
|
|
4087
|
+
function os(i) {
|
|
4027
4088
|
return function(e) {
|
|
4028
4089
|
return i.apply(null, e);
|
|
4029
4090
|
};
|
|
4030
4091
|
}
|
|
4031
|
-
function
|
|
4092
|
+
function cs(i) {
|
|
4032
4093
|
return h.isObject(i) && i.isAxiosError === !0;
|
|
4033
4094
|
}
|
|
4034
4095
|
const de = {
|
|
@@ -4105,52 +4166,52 @@ const de = {
|
|
|
4105
4166
|
Object.entries(de).forEach(([i, t]) => {
|
|
4106
4167
|
de[t] = i;
|
|
4107
4168
|
});
|
|
4108
|
-
function
|
|
4109
|
-
const t = new
|
|
4110
|
-
return h.extend(e,
|
|
4111
|
-
return
|
|
4169
|
+
function Cn(i) {
|
|
4170
|
+
const t = new lt(i), e = on(lt.prototype.request, t);
|
|
4171
|
+
return h.extend(e, lt.prototype, t, { allOwnKeys: !0 }), h.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
|
|
4172
|
+
return Cn(ft(i, r));
|
|
4112
4173
|
}, e;
|
|
4113
4174
|
}
|
|
4114
|
-
const C =
|
|
4115
|
-
C.Axios =
|
|
4116
|
-
C.CanceledError =
|
|
4117
|
-
C.CancelToken =
|
|
4118
|
-
C.isCancel =
|
|
4119
|
-
C.VERSION =
|
|
4175
|
+
const C = Cn(Dt);
|
|
4176
|
+
C.Axios = lt;
|
|
4177
|
+
C.CanceledError = It;
|
|
4178
|
+
C.CancelToken = as;
|
|
4179
|
+
C.isCancel = En;
|
|
4180
|
+
C.VERSION = Pe;
|
|
4120
4181
|
C.toFormData = Qt;
|
|
4121
|
-
C.AxiosError =
|
|
4182
|
+
C.AxiosError = b;
|
|
4122
4183
|
C.Cancel = C.CanceledError;
|
|
4123
4184
|
C.all = function(t) {
|
|
4124
4185
|
return Promise.all(t);
|
|
4125
4186
|
};
|
|
4126
|
-
C.spread =
|
|
4127
|
-
C.isAxiosError =
|
|
4128
|
-
C.mergeConfig =
|
|
4187
|
+
C.spread = os;
|
|
4188
|
+
C.isAxiosError = cs;
|
|
4189
|
+
C.mergeConfig = ft;
|
|
4129
4190
|
C.AxiosHeaders = V;
|
|
4130
|
-
C.formToJSON = (i) =>
|
|
4131
|
-
C.getAdapter =
|
|
4191
|
+
C.formToJSON = (i) => Pn(h.isHTMLForm(i) ? new FormData(i) : i);
|
|
4192
|
+
C.getAdapter = An.getAdapter;
|
|
4132
4193
|
C.HttpStatusCode = de;
|
|
4133
4194
|
C.default = C;
|
|
4134
4195
|
const {
|
|
4135
|
-
Axios:
|
|
4136
|
-
AxiosError:
|
|
4137
|
-
CanceledError:
|
|
4138
|
-
isCancel:
|
|
4139
|
-
CancelToken:
|
|
4140
|
-
VERSION:
|
|
4141
|
-
all:
|
|
4142
|
-
Cancel:
|
|
4143
|
-
isAxiosError:
|
|
4144
|
-
spread:
|
|
4145
|
-
toFormData:
|
|
4146
|
-
AxiosHeaders:
|
|
4147
|
-
HttpStatusCode:
|
|
4148
|
-
formToJSON:
|
|
4149
|
-
getAdapter:
|
|
4150
|
-
mergeConfig:
|
|
4151
|
-
create:
|
|
4196
|
+
Axios: ds,
|
|
4197
|
+
AxiosError: _s,
|
|
4198
|
+
CanceledError: gs,
|
|
4199
|
+
isCancel: ms,
|
|
4200
|
+
CancelToken: ys,
|
|
4201
|
+
VERSION: bs,
|
|
4202
|
+
all: Ps,
|
|
4203
|
+
Cancel: Es,
|
|
4204
|
+
isAxiosError: ws,
|
|
4205
|
+
spread: vs,
|
|
4206
|
+
toFormData: Ss,
|
|
4207
|
+
AxiosHeaders: Ts,
|
|
4208
|
+
HttpStatusCode: As,
|
|
4209
|
+
formToJSON: Rs,
|
|
4210
|
+
getAdapter: Cs,
|
|
4211
|
+
mergeConfig: Os,
|
|
4212
|
+
create: Ds
|
|
4152
4213
|
} = C;
|
|
4153
|
-
class
|
|
4214
|
+
class Is extends Bn {
|
|
4154
4215
|
__pinPad__ = {
|
|
4155
4216
|
buffer: null,
|
|
4156
4217
|
about: {
|
|
@@ -4338,11 +4399,11 @@ class Ps extends Rn {
|
|
|
4338
4399
|
environment: "production",
|
|
4339
4400
|
socket: !1
|
|
4340
4401
|
}) {
|
|
4341
|
-
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !
|
|
4402
|
+
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !xn())
|
|
4342
4403
|
throw new Error("Crypto not supported in this browser");
|
|
4343
|
-
if (
|
|
4404
|
+
if (Ce.getCustom(this.typeDevice, n))
|
|
4344
4405
|
throw new Error(`Device ${this.typeDevice} ${n} already exists`);
|
|
4345
|
-
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(),
|
|
4406
|
+
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(), Ce.add(this);
|
|
4346
4407
|
}
|
|
4347
4408
|
#A() {
|
|
4348
4409
|
const t = [
|
|
@@ -4423,7 +4484,7 @@ class Ps extends Rn {
|
|
|
4423
4484
|
#I(t, e) {
|
|
4424
4485
|
const n = this.__pinPad__.about?.brand?.toLowerCase(), r = this.__pinPad__.about?.model?.toLowerCase(), s = n === "ingenico" && r === "ipp320" ? 500 : 350;
|
|
4425
4486
|
if (e.length < s) {
|
|
4426
|
-
e = e.replace("006P93A00.", "").replace("006P93A00,", ""), e.includes("E93") ? this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E93") + 3, e.indexOf("E93") + 6) : e.includes("E71") && (this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E71") + 3, e.indexOf("E71") + 6)), this.__pinPad__.operation.ignore.error !== "" && e.indexOf("OPERACION CANCELADA") === -1 && e.indexOf("TIEMPO EXCEDIDO") === -1 && this.__pinPad__.operation.ignore.error.length === 3 && (this.__pinPad__.operation.last_error = this.#T(this.__pinPad__.operation.ignore.error), this.__pinPad__.waiting.statusReadCardWaiting = "rejected");
|
|
4487
|
+
e = e.replace("006P93A00.", "").replace("006P93A00,", ""), e.includes("E93") ? this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E93") + 3, e.indexOf("E93") + 6) : e.includes("E71") && (this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E71") + 3, e.indexOf("E71") + 6)), this.__pinPad__.operation.ignore.error !== "" && e.indexOf("OPERACION CANCELADA") === -1 && e.indexOf("TIEMPO EXCEDIDO") === -1 && this.__pinPad__.operation.ignore.error.length === 3 && (this.__pinPad__.operation.last_error = this.#T(this.__pinPad__.operation.ignore.error), this.__pinPad__.waiting.statusReadCardWaiting = "rejected"), e.includes("INSERTE CHIP O DESLICE TARJETA") && (this.dispatch("pp:sale-process", { step: "insert-card", message: "Please insert or swipe the card" }), this.dispatch("pp:insert-card", { waiting: !0 }));
|
|
4427
4488
|
return;
|
|
4428
4489
|
}
|
|
4429
4490
|
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") {
|
|
@@ -4535,13 +4596,13 @@ class Ps extends Rn {
|
|
|
4535
4596
|
e.name = "About PinPad", e.description = "Response of about", e.no_code = 101, this.#f(s, r);
|
|
4536
4597
|
break;
|
|
4537
4598
|
case "inject":
|
|
4538
|
-
e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#C();
|
|
4599
|
+
this.dispatch("pp:sale-process", { step: "inject", message: "Injecting values..." }), e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, this.#C();
|
|
4539
4600
|
break;
|
|
4540
4601
|
case "init-dukpt":
|
|
4541
|
-
e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#O(s, r);
|
|
4602
|
+
this.dispatch("pp:sale-process", { step: "dukpt-init", message: "Initializing DUKPT..." }), e.name = "Init DUKPT", e.description = "Response of init DUKPT", e.no_code = 103, this.#O(s, r);
|
|
4542
4603
|
break;
|
|
4543
4604
|
case "dukpt":
|
|
4544
|
-
e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D();
|
|
4605
|
+
this.dispatch("pp:sale-process", { step: "dukpt-written", message: "Written DUKPT..." }), e.name = "Write DUKPT", e.description = "Response of write DUKPT", e.no_code = 104, this.#D();
|
|
4545
4606
|
break;
|
|
4546
4607
|
case "read-card":
|
|
4547
4608
|
e.name = "read card", e.description = "response of read card", e.no_code = 105, this.#I(s, r);
|
|
@@ -4657,7 +4718,7 @@ class Ps extends Rn {
|
|
|
4657
4718
|
// Updated to WS v4
|
|
4658
4719
|
// ========================================================================================
|
|
4659
4720
|
#s(t, e) {
|
|
4660
|
-
const n = new
|
|
4721
|
+
const n = new gi();
|
|
4661
4722
|
return n.setPublicKey(t), n.encrypt(e);
|
|
4662
4723
|
}
|
|
4663
4724
|
#a(t) {
|
|
@@ -4754,7 +4815,8 @@ class Ps extends Rn {
|
|
|
4754
4815
|
return t.includes("@cnb Santander") ? (t = t.replace("@cnb Santander", "@logo1@br"), this.#t(t, n, r)) : t.includes("@cnb American Express") ? (t = t.replace("@cnb American Express", "@logo2@br"), this.#t(t, n, r)) : t.includes("@cnb HSBC") ? (t = t.replace("@cnb HSBC", "@logo7@br"), this.#t(t, n, r)) : t.includes("@cnb IXE") ? (t = t.replace("@cnb IXE", "@logo11@br"), this.#t(t, n, r)) : t.includes("@cnb MULTIVA") ? (t = t.replace("@cnb MULTIVA", "@logo15@br"), this.#t(t, n, r)) : t.includes("@cnb Multiva") ? (t = t.replace("@cnb Multiva", "@logo15@br"), this.#t(t, n, r)) : t.includes("@cnb SCOTIA BANK") ? (t = t.replace("@cnb SCOTIA BANK", "@logo16@br"), this.#t(t, n, r)) : t.includes("@cnb SCOTIABANK") ? (t = t.replace("@cnb SCOTIABANK", "@logo16@br"), this.#t(t, n, r)) : t.includes("@cnb BANCOMER") ? (t = t.replace("@cnb BANCOMER", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb Bancomer") ? (t = t.replace("@cnb Bancomer", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb BBVA") ? (t = t.replace("@cnb BBVA", "@logo17@br"), this.#t(t, n, r)) : t.includes("@cnb BANORTE") ? (t = t.replace("@cnb BANORTE", "@logo18@br"), this.#t(t, n, r)) : t.includes("@cnb Banorte") ? (t = t.replace("@cnb Banorte", "@logo18@br"), this.#t(t, n, r)) : t.includes("@cnb BANREGIO") ? (t = t.replace("@cnb BANREGIO", "@logo19@br"), this.#t(t, n, r)) : t.includes("@cnb Banregio") ? (t = t.replace("@cnb Banregio", "@logo19@br"), this.#t(t, n, r)) : t.includes("@cnb GETNET") ? (t = t.replace("@cnb GETNET", "@logo20@br"), this.#t(t, n, r)) : t.includes("@cnb GetNET") ? (t = t.replace("@cnb GetNET", "@logo20@br"), this.#t(t, n, r)) : this.#t(t, n, r);
|
|
4755
4816
|
}
|
|
4756
4817
|
async #q(t = !1) {
|
|
4757
|
-
if (this.#H(), this.__pinPad__.config.loginResponse && !t)
|
|
4818
|
+
if (this.#H(), this.__pinPad__.config.loginResponse && !t)
|
|
4819
|
+
return await this.#p();
|
|
4758
4820
|
const e = this.url + this.__pinPad__.constants.uris.login, n = {
|
|
4759
4821
|
usuario: this.username,
|
|
4760
4822
|
password: this.password,
|
|
@@ -4842,7 +4904,7 @@ class Ps extends Rn {
|
|
|
4842
4904
|
), this.__pinPad__.config.publicKeyRSA;
|
|
4843
4905
|
}
|
|
4844
4906
|
clearSession() {
|
|
4845
|
-
localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP");
|
|
4907
|
+
localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP"), localStorage.removeItem("ppGeolocation");
|
|
4846
4908
|
}
|
|
4847
4909
|
#d() {
|
|
4848
4910
|
const t = localStorage.getItem("ppRSAKey");
|
|
@@ -4861,7 +4923,7 @@ class Ps extends Rn {
|
|
|
4861
4923
|
return /^[A-Z-a-z0-9\s]+$/g.test(t);
|
|
4862
4924
|
}
|
|
4863
4925
|
#X(t) {
|
|
4864
|
-
if (
|
|
4926
|
+
if (J(t))
|
|
4865
4927
|
return !0;
|
|
4866
4928
|
const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
|
|
4867
4929
|
if (!e)
|
|
@@ -4914,7 +4976,7 @@ class Ps extends Rn {
|
|
|
4914
4976
|
return e + n;
|
|
4915
4977
|
}
|
|
4916
4978
|
async checkPositionPermission() {
|
|
4917
|
-
if (!
|
|
4979
|
+
if (!Ae())
|
|
4918
4980
|
throw new Error("Geolocation not supported");
|
|
4919
4981
|
return new Promise((t, e) => {
|
|
4920
4982
|
navigator.permissions.query({ name: "geolocation" }).then((n) => {
|
|
@@ -4923,35 +4985,75 @@ class Ps extends Rn {
|
|
|
4923
4985
|
});
|
|
4924
4986
|
}
|
|
4925
4987
|
async getPosition() {
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4988
|
+
const t = "ppGeolocation";
|
|
4989
|
+
if (!this.__pinPad__.config.latitude || !this.__pinPad__.config.longitude) {
|
|
4990
|
+
const r = localStorage.getItem(t);
|
|
4991
|
+
if (r)
|
|
4992
|
+
try {
|
|
4993
|
+
const s = JSON.parse(r);
|
|
4994
|
+
s.data?.latitude && s.data?.longitude && (this.__pinPad__.config.latitude = s.data.latitude, this.__pinPad__.config.longitude = s.data.longitude);
|
|
4995
|
+
} catch {
|
|
4996
|
+
localStorage.removeItem(t);
|
|
4933
4997
|
}
|
|
4934
|
-
|
|
4935
|
-
|
|
4998
|
+
}
|
|
4999
|
+
const n = localStorage.getItem(t);
|
|
5000
|
+
if (n)
|
|
5001
|
+
try {
|
|
5002
|
+
const r = JSON.parse(n);
|
|
5003
|
+
if ((/* @__PURE__ */ new Date()).getTime() - r.timestamp < 864e5 && r.data?.latitude && r.data?.longitude)
|
|
5004
|
+
return this.__pinPad__.config.latitude = r.data.latitude, this.__pinPad__.config.longitude = r.data.longitude, this.latitudeLongitude;
|
|
5005
|
+
} catch {
|
|
5006
|
+
localStorage.removeItem(t);
|
|
5007
|
+
}
|
|
5008
|
+
return Ae() ? new Promise((r) => {
|
|
5009
|
+
navigator.permissions.query({ name: "geolocation" }).then((s) => {
|
|
5010
|
+
s.state === "granted" ? navigator.geolocation.getCurrentPosition(
|
|
5011
|
+
(a) => {
|
|
5012
|
+
this.__pinPad__.config.latitude = a.coords.latitude, this.__pinPad__.config.longitude = a.coords.longitude, localStorage.setItem(
|
|
5013
|
+
t,
|
|
5014
|
+
JSON.stringify({
|
|
5015
|
+
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
5016
|
+
data: {
|
|
5017
|
+
latitude: a.coords.latitude,
|
|
5018
|
+
longitude: a.coords.longitude
|
|
5019
|
+
}
|
|
5020
|
+
})
|
|
5021
|
+
), r(this.latitudeLongitude);
|
|
5022
|
+
},
|
|
5023
|
+
() => {
|
|
5024
|
+
r(this.latitudeLongitude);
|
|
5025
|
+
},
|
|
5026
|
+
{
|
|
5027
|
+
enableHighAccuracy: !1,
|
|
5028
|
+
timeout: 5e3,
|
|
5029
|
+
maximumAge: 6e4
|
|
5030
|
+
}
|
|
5031
|
+
) : r(this.latitudeLongitude);
|
|
5032
|
+
}).catch(() => r(this.latitudeLongitude));
|
|
5033
|
+
}) : this.latitudeLongitude;
|
|
4936
5034
|
}
|
|
4937
5035
|
async #G() {
|
|
4938
|
-
const
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
5036
|
+
const e = localStorage.getItem("ppPublicIP");
|
|
5037
|
+
let n = null, r = !1;
|
|
5038
|
+
if (e)
|
|
5039
|
+
try {
|
|
5040
|
+
const c = JSON.parse(e);
|
|
5041
|
+
if (n = c.data || null, this.__pinPad__.config.publicIP = n, (/* @__PURE__ */ new Date()).getTime() - c.timestamp < 864e5)
|
|
5042
|
+
return this.__pinPad__.config.publicIP;
|
|
5043
|
+
r = !0;
|
|
5044
|
+
} catch {
|
|
5045
|
+
localStorage.removeItem("ppPublicIP");
|
|
5046
|
+
}
|
|
5047
|
+
let s = !1;
|
|
5048
|
+
const a = await C.get("https://api.ipify.org?format=json").catch(() => s = !0);
|
|
5049
|
+
if (s || typeof a != "object" || !a || !a.data)
|
|
5050
|
+
return r && n ? this.__pinPad__.config.publicIP : (this.__pinPad__.config.publicIP = null, null);
|
|
5051
|
+
const o = a.data || {};
|
|
5052
|
+
return this.__pinPad__.config.publicIP = o.ip || null, localStorage.setItem(
|
|
4951
5053
|
"ppPublicIP",
|
|
4952
5054
|
JSON.stringify({
|
|
4953
5055
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
4954
|
-
data:
|
|
5056
|
+
data: o.ip
|
|
4955
5057
|
})
|
|
4956
5058
|
), this.__pinPad__.config.publicIP;
|
|
4957
5059
|
}
|
|
@@ -5023,7 +5125,7 @@ class Ps extends Rn {
|
|
|
5023
5125
|
// this.dispatch('pp:merchant-moto', response);
|
|
5024
5126
|
// return response;
|
|
5025
5127
|
// }
|
|
5026
|
-
async #
|
|
5128
|
+
async #w({ data: t, url: e, cancelable: n = !1 } = {
|
|
5027
5129
|
data: null,
|
|
5028
5130
|
url: "",
|
|
5029
5131
|
cancelable: !1
|
|
@@ -5037,8 +5139,12 @@ class Ps extends Rn {
|
|
|
5037
5139
|
data: s || ""
|
|
5038
5140
|
}
|
|
5039
5141
|
}).catch(async (u) => {
|
|
5040
|
-
let l
|
|
5041
|
-
throw u.response.status >= 500 && u.response.status <= 599 ? l = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (l = "Bad Request"), n && await o.#z(),
|
|
5142
|
+
let l;
|
|
5143
|
+
throw u.code === "ERR_NETWORK" && u.name === "AxiosError" && (l = `Error in request, verify internet connection: ${u.code} ${u.message}`), u.status && u.response && (l = `Error in request, verify internet connection: ${u.status} ${u.message}`, u.response.status >= 500 && u.response.status <= 599 ? l = "Service Temporarily Unavailable" : u.response.status >= 400 && u.response.status <= 499 && (l = "Bad Request")), n && await o.#z(), o.dispatch("pp:error", {
|
|
5144
|
+
error: !0,
|
|
5145
|
+
code: u.response?.status || "NETWORK_ERROR",
|
|
5146
|
+
message: l
|
|
5147
|
+
}), new Error(l);
|
|
5042
5148
|
})).data;
|
|
5043
5149
|
}
|
|
5044
5150
|
async #$() {
|
|
@@ -5051,7 +5157,7 @@ class Ps extends Rn {
|
|
|
5051
5157
|
}
|
|
5052
5158
|
async #J() {
|
|
5053
5159
|
this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
|
|
5054
|
-
const t = await this.#
|
|
5160
|
+
const t = await this.#w({
|
|
5055
5161
|
data: {
|
|
5056
5162
|
accion: "tipoPagoInfo",
|
|
5057
5163
|
cc_num: this.__pinPad__.operation.bin,
|
|
@@ -5080,7 +5186,7 @@ class Ps extends Rn {
|
|
|
5080
5186
|
if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
|
|
5081
5187
|
const e = this.__pinPad__.constants.STX, n = this.__pinPad__.constants.ETX;
|
|
5082
5188
|
let r = "C56AABOUT";
|
|
5083
|
-
if (r = e + this.#e(r) + r + n, r = r + this.#n(r),
|
|
5189
|
+
if (r = e + this.#e(r) + r + n, r = r + this.#n(r), J(this.__pinPad__.about.pp)) {
|
|
5084
5190
|
this.__pinPad__.waiting.statusAboutWaiting = "pending";
|
|
5085
5191
|
const a = this.parseStringToBytes(r, "");
|
|
5086
5192
|
await this.appendToQueue(a, "about");
|
|
@@ -5090,7 +5196,7 @@ class Ps extends Rn {
|
|
|
5090
5196
|
return new Promise((a, o) => {
|
|
5091
5197
|
s = setInterval(() => {
|
|
5092
5198
|
if (this.__pinPad__.waiting.statusAboutWaiting === "resolved") {
|
|
5093
|
-
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null,
|
|
5199
|
+
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, J(this.__pinPad__.about.pp))
|
|
5094
5200
|
return;
|
|
5095
5201
|
if (!t || typeof t != "function") {
|
|
5096
5202
|
a(!0);
|
|
@@ -5106,11 +5212,11 @@ class Ps extends Rn {
|
|
|
5106
5212
|
});
|
|
5107
5213
|
}
|
|
5108
5214
|
async #h(t, e) {
|
|
5109
|
-
if (t = t ? t.toString() : "", e = e ? e.toString() : "",
|
|
5215
|
+
if (t = t ? t.toString() : "", e = e ? e.toString() : "", J(t) || t === "0") {
|
|
5110
5216
|
this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
|
|
5111
5217
|
return;
|
|
5112
5218
|
}
|
|
5113
|
-
if (
|
|
5219
|
+
if (J(e) || e === "1") {
|
|
5114
5220
|
this.dispatch("pp:dukpt", { status: "charged", already: !0 });
|
|
5115
5221
|
return;
|
|
5116
5222
|
}
|
|
@@ -5138,7 +5244,7 @@ class Ps extends Rn {
|
|
|
5138
5244
|
},
|
|
5139
5245
|
terminal: this.__pinPad__.config.terminal
|
|
5140
5246
|
}
|
|
5141
|
-
}, e = await this.#
|
|
5247
|
+
}, e = await this.#w({
|
|
5142
5248
|
data: t,
|
|
5143
5249
|
url: this.url + this.__pinPad__.constants.uris.keysDUKPT
|
|
5144
5250
|
});
|
|
@@ -5159,7 +5265,7 @@ class Ps extends Rn {
|
|
|
5159
5265
|
});
|
|
5160
5266
|
});
|
|
5161
5267
|
}
|
|
5162
|
-
#
|
|
5268
|
+
#v(t, e = 0) {
|
|
5163
5269
|
if (t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) || t === 0)
|
|
5164
5270
|
return parseFloat("0").toFixed(e);
|
|
5165
5271
|
t = t.toFixed(e);
|
|
@@ -5175,7 +5281,7 @@ class Ps extends Rn {
|
|
|
5175
5281
|
async #tt() {
|
|
5176
5282
|
this.__pinPad__.operation.errors = 0;
|
|
5177
5283
|
let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
|
|
5178
|
-
if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"),
|
|
5284
|
+
if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), J(this.amount) || isNaN(parseFloat(this.amount)))
|
|
5179
5285
|
throw new Error("Amount required");
|
|
5180
5286
|
if (parseFloat(this.amount) <= 0)
|
|
5181
5287
|
throw new Error("Amount must be greater than 0");
|
|
@@ -5202,14 +5308,14 @@ class Ps extends Rn {
|
|
|
5202
5308
|
});
|
|
5203
5309
|
}
|
|
5204
5310
|
async #et(t) {
|
|
5205
|
-
return await
|
|
5311
|
+
return await Re(t * 1e3);
|
|
5206
5312
|
}
|
|
5207
5313
|
/**
|
|
5208
5314
|
* @param {null|string} reference
|
|
5209
5315
|
* @return {Promise<any>}
|
|
5210
5316
|
*/
|
|
5211
5317
|
async consult({ reference: t = null } = { reference: null }) {
|
|
5212
|
-
return t || (t = this.reference),
|
|
5318
|
+
return t || (t = this.reference), J(t) && (t = "--", this.reference = t), this.#X(this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await this.#u({
|
|
5213
5319
|
Ambiente: this.environment,
|
|
5214
5320
|
User: this.username,
|
|
5215
5321
|
Pwd: this.password,
|
|
@@ -5271,7 +5377,7 @@ class Ps extends Rn {
|
|
|
5271
5377
|
return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
|
|
5272
5378
|
}
|
|
5273
5379
|
#rt(t) {
|
|
5274
|
-
if (
|
|
5380
|
+
if (J(t)) throw new Error("Number of authorization invalid");
|
|
5275
5381
|
if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
|
|
5276
5382
|
if (t.length !== 6) throw new Error("Number of authorization invalid");
|
|
5277
5383
|
return !0;
|
|
@@ -5378,7 +5484,7 @@ class Ps extends Rn {
|
|
|
5378
5484
|
if (!this.#m(t)) throw new Error("Invalid amount");
|
|
5379
5485
|
if (!this.#rt(e)) throw new Error("Invalid authorization");
|
|
5380
5486
|
if (!this.#y(n)) throw new Error("Invalid folio");
|
|
5381
|
-
const r = this.#
|
|
5487
|
+
const r = this.#v(t, 2), s = {
|
|
5382
5488
|
Ambiente: this.environment,
|
|
5383
5489
|
User: this.username,
|
|
5384
5490
|
Pwd: this.password,
|
|
@@ -5430,7 +5536,7 @@ class Ps extends Rn {
|
|
|
5430
5536
|
object: {}
|
|
5431
5537
|
};
|
|
5432
5538
|
try {
|
|
5433
|
-
const n = await this.#
|
|
5539
|
+
const n = await this.#v(this.amount, 2);
|
|
5434
5540
|
await this.#u({
|
|
5435
5541
|
Ambiente: this.environment,
|
|
5436
5542
|
Country: this.__pinPad__.config.country,
|
|
@@ -5496,7 +5602,7 @@ class Ps extends Rn {
|
|
|
5496
5602
|
serie: this.__pinPad__.about.serial,
|
|
5497
5603
|
terminal: {
|
|
5498
5604
|
display: "1",
|
|
5499
|
-
is_contactless: s,
|
|
5605
|
+
is_contactless: s ? "1" : "0",
|
|
5500
5606
|
is_mobile: "0",
|
|
5501
5607
|
printer: this.__pinPad__.about.printer
|
|
5502
5608
|
},
|
|
@@ -5570,7 +5676,7 @@ class Ps extends Rn {
|
|
|
5570
5676
|
this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5571
5677
|
else {
|
|
5572
5678
|
const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
|
|
5573
|
-
await this.appendToQueue(t, "code93"), await
|
|
5679
|
+
await this.appendToQueue(t, "code93"), await Re(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5574
5680
|
}
|
|
5575
5681
|
}
|
|
5576
5682
|
#T(t) {
|
|
@@ -5648,6 +5754,16 @@ class Ps extends Rn {
|
|
|
5648
5754
|
#ht() {
|
|
5649
5755
|
this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.AppIdLabel = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ChipName = "", this.__pinPad__.config.read.ReadCTLS = "", this.__pinPad__.config.read.NB_Data = "", this.__pinPad__.config.read.NB_ksn = "", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.POSEM = "", this.__pinPad__.config.read.Tags = "", this.__pinPad__.config.read.Type = "", this.__pinPad__.config.read.Chip = "", this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.operation.ignore.error = "", this.__pinPad__.operation.ignore.C93Global = "", this.__pinPad__.operation.folio = "", this.__pinPad__.operation.authorization = "", this.__pinPad__.config.tokenizeTRX = !1;
|
|
5650
5756
|
}
|
|
5757
|
+
createReference() {
|
|
5758
|
+
const t = Date.now().toString(), e = Math.random().toString(36).substring(2, 12).toUpperCase();
|
|
5759
|
+
return `${t}${e}`;
|
|
5760
|
+
}
|
|
5761
|
+
verifyNetwork() {
|
|
5762
|
+
return new Promise((t) => {
|
|
5763
|
+
const e = new Image();
|
|
5764
|
+
e.onload = () => t(!0), e.onerror = () => t(!1), e.src = "https://www.google.com/favicon.ico?" + (/* @__PURE__ */ new Date()).getTime();
|
|
5765
|
+
});
|
|
5766
|
+
}
|
|
5651
5767
|
// ========================================================================================
|
|
5652
5768
|
// Needed for WS v4
|
|
5653
5769
|
// ========================================================================================
|
|
@@ -5656,13 +5772,20 @@ class Ps extends Rn {
|
|
|
5656
5772
|
* @param {null|string} reference
|
|
5657
5773
|
* @returns {Promise<{error: boolean, message: null, approved: boolean, object: {}}>}
|
|
5658
5774
|
*/
|
|
5659
|
-
async makeSale({
|
|
5775
|
+
async makeSale({
|
|
5776
|
+
amount: t = 0,
|
|
5777
|
+
reference: e = null
|
|
5778
|
+
} = {}) {
|
|
5660
5779
|
if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
|
|
5661
5780
|
throw new Error("Amount is required and must be greater than 0");
|
|
5662
|
-
if (this.amount = t, !e ||
|
|
5781
|
+
if (this.amount = t, (!e || J(e)) && (e = this.createReference()), !e || J(e) || !this.#g(e))
|
|
5663
5782
|
throw new Error("Reference is required and must be alphanumeric");
|
|
5664
5783
|
if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
|
|
5665
5784
|
throw new Error("Invalid currency");
|
|
5785
|
+
if (this.username === null || this.username.trim() === "")
|
|
5786
|
+
throw new Error("Username are required");
|
|
5787
|
+
if (this.password === null || this.password.trim() === "")
|
|
5788
|
+
throw new Error("Password are required");
|
|
5666
5789
|
const n = {
|
|
5667
5790
|
error: !1,
|
|
5668
5791
|
message: null,
|
|
@@ -5670,13 +5793,18 @@ class Ps extends Rn {
|
|
|
5670
5793
|
object: {}
|
|
5671
5794
|
};
|
|
5672
5795
|
try {
|
|
5796
|
+
if (!await this.verifyNetwork())
|
|
5797
|
+
throw new Error("No internet connection");
|
|
5673
5798
|
return await this.login(), await this.#Y(), !await this.#tt() || !await this.#J() ? n : await this.#at();
|
|
5674
5799
|
} catch (r) {
|
|
5675
|
-
|
|
5800
|
+
this.dispatch("pp:sale-process", {
|
|
5801
|
+
step: "error",
|
|
5802
|
+
message: r.message
|
|
5803
|
+
}), n.error = !0, n.message = r.message, n.approved = !1, n.object = r;
|
|
5676
5804
|
}
|
|
5677
5805
|
return n;
|
|
5678
5806
|
}
|
|
5679
5807
|
}
|
|
5680
5808
|
export {
|
|
5681
|
-
|
|
5809
|
+
Is as PinPad
|
|
5682
5810
|
};
|