@danidoble/webserial 4.5.0 → 4.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boardroid.cjs +1 -1
- package/dist/boardroid.js +2 -2
- package/dist/{devices-CzEcntFZ.js → devices-52jckzh8.js} +1 -1
- package/dist/{devices-Be3Fj7uv.cjs → devices-Dr6p2eHd.cjs} +1 -1
- package/dist/hopper.cjs +1 -1
- package/dist/hopper.js +1 -1
- package/dist/jofemar.cjs +1 -1
- package/dist/jofemar.js +2 -2
- package/dist/jsd.cjs +1 -1
- package/dist/jsd.js +1046 -229
- package/dist/{kernel-D9C1iBu-.js → kernel-D-xrX0LR.js} +5 -5
- package/dist/{kernel-BEA0hNWZ.cjs → kernel-D5d0fk5q.cjs} +1 -1
- package/dist/kernel.cjs +1 -1
- package/dist/kernel.js +2 -2
- package/dist/locker.cjs +1 -1
- package/dist/locker.js +2 -2
- package/dist/pinpad.cjs +14 -14
- package/dist/pinpad.js +1368 -1180
- package/dist/pinpax.cjs +1 -1
- package/dist/pinpax.js +2 -2
- package/dist/relay.cjs +1 -1
- 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 +16 -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/jsd.types.d.ts +3 -0
- package/dist/types/lib/commands/jsd/types/jsd.types.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/webserial-core-CTWEcKYn.cjs +4 -0
- package/dist/{webserial-core-Bn6Ker2l.js → webserial-core-Cc11wk4k.js} +2 -2
- package/dist/webserial.cjs +1 -1
- package/dist/webserial.js +8 -8
- package/package.json +9 -9
- package/dist/webserial-core-DizZyWun.cjs +0 -4
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 Wn, a as Xn, i as J, b as xe, w as Ue } from "./kernel-D-xrX0LR.js";
|
|
2
|
+
import { D as Le } from "./devices-52jckzh8.js";
|
|
3
|
+
var zn = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
4
|
+
function et(i) {
|
|
5
|
+
return zn.charAt(i);
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function Gn(i, t) {
|
|
8
8
|
return i & t;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function kt(i, t) {
|
|
11
11
|
return i | t;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Ve(i, t) {
|
|
14
14
|
return i ^ t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Me(i, t) {
|
|
17
17
|
return i & ~t;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function $n(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 Jn(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 Pt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", pn = "=";
|
|
31
|
+
function Nt(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 += Pt.charAt(e >> 6) + Pt.charAt(e & 63);
|
|
35
|
+
for (t + 1 == i.length ? (e = parseInt(i.substring(t, t + 1), 16), n += Pt.charAt(e << 2)) : t + 2 == i.length && (e = parseInt(i.substring(t, t + 2), 16), n += Pt.charAt(e >> 2) + Pt.charAt((e & 3) << 4)); (n.length & 3) > 0; )
|
|
36
|
+
n += pn;
|
|
37
37
|
return n;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Fe(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) != pn; ++e) {
|
|
42
|
+
var s = Pt.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 mt, Qn = {
|
|
48
48
|
decode: function(i) {
|
|
49
49
|
var t;
|
|
50
|
-
if (
|
|
50
|
+
if (mt === void 0) {
|
|
51
51
|
var e = "0123456789ABCDEF", n = ` \f
|
|
52
52
|
\r \u2028\u2029`;
|
|
53
|
-
for (
|
|
54
|
-
|
|
53
|
+
for (mt = {}, t = 0; t < 16; ++t)
|
|
54
|
+
mt[e.charAt(t)] = t;
|
|
55
55
|
for (e = e.toLowerCase(), t = 10; t < 16; ++t)
|
|
56
|
-
|
|
56
|
+
mt[e.charAt(t)] = t;
|
|
57
57
|
for (t = 0; t < n.length; ++t)
|
|
58
|
-
|
|
58
|
+
mt[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 = mt[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, Ln = {
|
|
|
72
72
|
throw new Error("Hex encoding incomplete: 4 bits missing");
|
|
73
73
|
return r;
|
|
74
74
|
}
|
|
75
|
-
},
|
|
75
|
+
}, lt, de = {
|
|
76
76
|
decode: function(i) {
|
|
77
77
|
var t;
|
|
78
|
-
if (
|
|
78
|
+
if (lt === void 0) {
|
|
79
79
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", n = `= \f
|
|
80
80
|
\r \u2028\u2029`;
|
|
81
|
-
for (
|
|
82
|
-
|
|
83
|
-
for (
|
|
84
|
-
|
|
81
|
+
for (lt = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
|
|
82
|
+
lt[e.charAt(t)] = t;
|
|
83
|
+
for (lt["-"] = 62, lt._ = 63, t = 0; t < n.length; ++t)
|
|
84
|
+
lt[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 = lt[o], o != -1) {
|
|
92
92
|
if (o === void 0)
|
|
93
93
|
throw new Error("Illegal character at offset " + t);
|
|
94
94
|
s |= o, ++a >= 4 ? (r[r.length] = s >> 16, r[r.length] = s >> 8 & 255, r[r.length] = s & 255, s = 0, a = 0) : s <<= 6;
|
|
@@ -108,7 +108,7 @@ var pt, Ln = {
|
|
|
108
108
|
},
|
|
109
109
|
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
110
110
|
unarmor: function(i) {
|
|
111
|
-
var t =
|
|
111
|
+
var t = de.re.exec(i);
|
|
112
112
|
if (t)
|
|
113
113
|
if (t[1])
|
|
114
114
|
i = t[1];
|
|
@@ -116,9 +116,9 @@ var pt, Ln = {
|
|
|
116
116
|
i = t[2];
|
|
117
117
|
else
|
|
118
118
|
throw new Error("RegExp out of sync");
|
|
119
|
-
return
|
|
119
|
+
return de.decode(i);
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, yt = 1e13, It = (
|
|
122
122
|
/** @class */
|
|
123
123
|
(function() {
|
|
124
124
|
function i(t) {
|
|
@@ -127,34 +127,34 @@ var pt, Ln = {
|
|
|
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 < yt ? e = 0 : (e = 0 | a / yt, a -= e * yt), 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 += yt, 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 += (yt + 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 * yt + 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
|
+
), dn = "…", Zn = /^(\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)?)?$/, Yn = /^(\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 wt(i, t) {
|
|
155
|
+
return i.length > t && (i = i.substring(0, t) + dn), i;
|
|
156
156
|
}
|
|
157
|
-
var
|
|
157
|
+
var oe = (
|
|
158
158
|
/** @class */
|
|
159
159
|
(function() {
|
|
160
160
|
function i(t, e) {
|
|
@@ -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 ? Zn : Yn).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 It(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 + wt(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 wt(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 += dn), s;
|
|
241
241
|
}, i.prototype.parseOID = function(t, e, n) {
|
|
242
|
-
for (var r = "", s = new
|
|
242
|
+
for (var r = "", s = new It(), 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 It)
|
|
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 wt(r, n);
|
|
256
|
+
s = new It(), a = 0;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
return a > 0 && (r += ".incomplete"), r;
|
|
260
260
|
}, i;
|
|
261
261
|
})()
|
|
262
|
-
),
|
|
262
|
+
), ti = (
|
|
263
263
|
/** @class */
|
|
264
264
|
(function() {
|
|
265
265
|
function i(t, e, n, r, s) {
|
|
266
|
-
if (!(r instanceof
|
|
266
|
+
if (!(r instanceof ke))
|
|
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 wt(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 wt(this.stream.parseStringISO(e, e + n), t);
|
|
385
385
|
case 30:
|
|
386
|
-
return
|
|
386
|
+
return wt(this.stream.parseStringBMP(e, e + n), t);
|
|
387
387
|
case 23:
|
|
388
388
|
// UTCTime
|
|
389
389
|
case 24:
|
|
@@ -427,8 +427,8 @@ var ee = (
|
|
|
427
427
|
return t.substring(e, e + n);
|
|
428
428
|
}, i.decode = function(t) {
|
|
429
429
|
var e;
|
|
430
|
-
t instanceof
|
|
431
|
-
var n = new
|
|
430
|
+
t instanceof oe ? e = t : e = new oe(t, 0);
|
|
431
|
+
var n = new oe(e), r = new ke(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; )
|
|
@@ -444,8 +444,8 @@ var ee = (
|
|
|
444
444
|
f[f.length] = g;
|
|
445
445
|
}
|
|
446
446
|
s = a - e.pos;
|
|
447
|
-
} catch (
|
|
448
|
-
throw new Error("Exception while decoding undefined length content: " +
|
|
447
|
+
} catch (w) {
|
|
448
|
+
throw new Error("Exception while decoding undefined length content: " + w);
|
|
449
449
|
}
|
|
450
450
|
return f;
|
|
451
451
|
};
|
|
@@ -470,13 +470,13 @@ var ee = (
|
|
|
470
470
|
return new i(n, o, s, r, c);
|
|
471
471
|
}, i;
|
|
472
472
|
})()
|
|
473
|
-
),
|
|
473
|
+
), ke = (
|
|
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 It();
|
|
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
|
+
), at, ei = 244837814094590, je = (ei & 16777215) == 15715070, F = [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], ni = (1 << 26) / F[F.length - 1], S = (
|
|
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 = A();
|
|
521
521
|
return i.ZERO.subTo(this, t), t;
|
|
522
522
|
}, i.prototype.abs = function() {
|
|
523
523
|
return this.s < 0 ? this.negate() : this;
|
|
@@ -533,15 +533,15 @@ var ee = (
|
|
|
533
533
|
return e;
|
|
534
534
|
return 0;
|
|
535
535
|
}, i.prototype.bitLength = function() {
|
|
536
|
-
return this.t <= 0 ? 0 : this.DB * (this.t - 1) +
|
|
536
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + jt(this[this.t - 1] ^ this.s & this.DM);
|
|
537
537
|
}, i.prototype.mod = function(t) {
|
|
538
|
-
var e =
|
|
538
|
+
var e = A();
|
|
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 qe(e) : n = new He(e), this.exp(t, n);
|
|
543
543
|
}, i.prototype.clone = function() {
|
|
544
|
-
var t =
|
|
544
|
+
var t = A();
|
|
545
545
|
return this.copyTo(t), t;
|
|
546
546
|
}, i.prototype.intValue = function() {
|
|
547
547
|
if (this.s < 0) {
|
|
@@ -577,94 +577,94 @@ 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 = A();
|
|
581
|
+
return this.bitwiseTo(t, Gn, e), e;
|
|
582
582
|
}, i.prototype.or = function(t) {
|
|
583
|
-
var e =
|
|
584
|
-
return this.bitwiseTo(t,
|
|
583
|
+
var e = A();
|
|
584
|
+
return this.bitwiseTo(t, kt, e), e;
|
|
585
585
|
}, i.prototype.xor = function(t) {
|
|
586
|
-
var e =
|
|
587
|
-
return this.bitwiseTo(t,
|
|
586
|
+
var e = A();
|
|
587
|
+
return this.bitwiseTo(t, Ve, e), e;
|
|
588
588
|
}, i.prototype.andNot = function(t) {
|
|
589
|
-
var e =
|
|
590
|
-
return this.bitwiseTo(t,
|
|
589
|
+
var e = A();
|
|
590
|
+
return this.bitwiseTo(t, Me, e), e;
|
|
591
591
|
}, i.prototype.not = function() {
|
|
592
|
-
for (var t =
|
|
592
|
+
for (var t = A(), 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 = A();
|
|
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 = A();
|
|
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 + $n(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 += Jn(this[n] ^ e);
|
|
609
609
|
return t;
|
|
610
610
|
}, i.prototype.testBit = function(t) {
|
|
611
611
|
var e = Math.floor(t / this.DB);
|
|
612
612
|
return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
|
|
613
613
|
}, i.prototype.setBit = function(t) {
|
|
614
|
-
return this.changeBit(t,
|
|
614
|
+
return this.changeBit(t, kt);
|
|
615
615
|
}, i.prototype.clearBit = function(t) {
|
|
616
|
-
return this.changeBit(t,
|
|
616
|
+
return this.changeBit(t, Me);
|
|
617
617
|
}, i.prototype.flipBit = function(t) {
|
|
618
|
-
return this.changeBit(t,
|
|
618
|
+
return this.changeBit(t, Ve);
|
|
619
619
|
}, i.prototype.add = function(t) {
|
|
620
|
-
var e =
|
|
620
|
+
var e = A();
|
|
621
621
|
return this.addTo(t, e), e;
|
|
622
622
|
}, i.prototype.subtract = function(t) {
|
|
623
|
-
var e =
|
|
623
|
+
var e = A();
|
|
624
624
|
return this.subTo(t, e), e;
|
|
625
625
|
}, i.prototype.multiply = function(t) {
|
|
626
|
-
var e =
|
|
626
|
+
var e = A();
|
|
627
627
|
return this.multiplyTo(t, e), e;
|
|
628
628
|
}, i.prototype.divide = function(t) {
|
|
629
|
-
var e =
|
|
629
|
+
var e = A();
|
|
630
630
|
return this.divRemTo(t, e, null), e;
|
|
631
631
|
}, i.prototype.remainder = function(t) {
|
|
632
|
-
var e =
|
|
632
|
+
var e = A();
|
|
633
633
|
return this.divRemTo(t, null, e), e;
|
|
634
634
|
}, i.prototype.divideAndRemainder = function(t) {
|
|
635
|
-
var e =
|
|
635
|
+
var e = A(), n = A();
|
|
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 = rt(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 qe(e) : e.isEven() ? a = new ri(e) : a = new He(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 = A();
|
|
645
645
|
for (a.sqrTo(o[1], f); c <= l; )
|
|
646
|
-
o[c] =
|
|
646
|
+
o[c] = A(), a.mulTo(f, o[c - 2], o[c]), c += 2;
|
|
647
647
|
}
|
|
648
|
-
var d = t.t - 1, g,
|
|
649
|
-
for (n =
|
|
648
|
+
var d = t.t - 1, g, w = !0, E = A(), y;
|
|
649
|
+
for (n = jt(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;
|
|
652
|
-
if ((n -= c) < 0 && (n += this.DB, --d),
|
|
653
|
-
o[g].copyTo(s),
|
|
652
|
+
if ((n -= c) < 0 && (n += this.DB, --d), w)
|
|
653
|
+
o[g].copyTo(s), w = !1;
|
|
654
654
|
else {
|
|
655
655
|
for (; c > 1; )
|
|
656
|
-
a.sqrTo(s,
|
|
657
|
-
c > 0 ? a.sqrTo(s,
|
|
656
|
+
a.sqrTo(s, E), a.sqrTo(E, s), c -= 2;
|
|
657
|
+
c > 0 ? a.sqrTo(s, E) : (y = s, s = E, E = y), a.mulTo(E, o[g], s);
|
|
658
658
|
}
|
|
659
659
|
for (; d >= 0 && (t[d] & 1 << n) == 0; )
|
|
660
|
-
a.sqrTo(s,
|
|
660
|
+
a.sqrTo(s, E), y = s, s = E, E = y, --n < 0 && (n = this.DB - 1, --d);
|
|
661
661
|
}
|
|
662
662
|
return a.revert(s);
|
|
663
663
|
}, i.prototype.modInverse = function(t) {
|
|
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 = rt(1), a = rt(0), o = rt(0), c = rt(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 ii());
|
|
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) {
|
|
@@ -696,19 +696,19 @@ var ee = (
|
|
|
696
696
|
return a > 0 && n.lShiftTo(a, n), n;
|
|
697
697
|
}, i.prototype.isProbablePrime = function(t) {
|
|
698
698
|
var e, n = this.abs();
|
|
699
|
-
if (n.t == 1 && n[0] <=
|
|
700
|
-
for (e = 0; e <
|
|
701
|
-
if (n[0] ==
|
|
699
|
+
if (n.t == 1 && n[0] <= F[F.length - 1]) {
|
|
700
|
+
for (e = 0; e < F.length; ++e)
|
|
701
|
+
if (n[0] == F[e])
|
|
702
702
|
return !0;
|
|
703
703
|
return !1;
|
|
704
704
|
}
|
|
705
705
|
if (n.isEven())
|
|
706
706
|
return !1;
|
|
707
|
-
for (e = 1; e <
|
|
708
|
-
for (var r =
|
|
709
|
-
r *=
|
|
707
|
+
for (e = 1; e < F.length; ) {
|
|
708
|
+
for (var r = F[e], s = e + 1; s < F.length && r < ni; )
|
|
709
|
+
r *= F[s++];
|
|
710
710
|
for (r = n.modInt(r); e < s; )
|
|
711
|
-
if (r %
|
|
711
|
+
if (r % F[e++] == 0)
|
|
712
712
|
return !1;
|
|
713
713
|
}
|
|
714
714
|
return n.millerRabin(t);
|
|
@@ -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 : We(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 = A());
|
|
818
|
+
var a = A(), o = this.s, c = t.s, u = this.DB - jt(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,
|
|
823
|
-
for (a.dlShiftTo(
|
|
822
|
+
var d = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0), g = this.FV / d, w = (1 << this.F1) / d, E = 1 << this.F2, y = n.t, _ = y - l, b = e ?? A();
|
|
823
|
+
for (a.dlShiftTo(_, b), n.compareTo(b) >= 0 && (n[n.t++] = 1, n.subTo(b, n)), i.ONE.dlShiftTo(l, b), b.subTo(a, a); a.t < l; )
|
|
824
824
|
a[a.t++] = 0;
|
|
825
|
-
for (; --
|
|
826
|
-
var
|
|
827
|
-
if ((n[
|
|
828
|
-
for (a.dlShiftTo(
|
|
829
|
-
n.subTo(
|
|
825
|
+
for (; --_ >= 0; ) {
|
|
826
|
+
var v = n[--y] == f ? this.DM : Math.floor(n[y] * g + (n[y - 1] + E) * w);
|
|
827
|
+
if ((n[y] += a.am(0, v, n, _, 0, l)) < v)
|
|
828
|
+
for (a.dlShiftTo(_, b), n.subTo(b, n); n[y] < --v; )
|
|
829
|
+
n.subTo(b, 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 = A(), r = A(), s = e.convert(this), a = jt(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 = rt(n), s = A(), a = A(), 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 = We(t, c);
|
|
869
869
|
if (u < 0) {
|
|
870
870
|
t.charAt(c) == "-" && this.signum() == 0 && (s = !0);
|
|
871
871
|
continue;
|
|
@@ -878,7 +878,7 @@ var ee = (
|
|
|
878
878
|
if (t < 2)
|
|
879
879
|
this.fromInt(1);
|
|
880
880
|
else
|
|
881
|
-
for (this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(i.ONE.shiftLeft(t - 1),
|
|
881
|
+
for (this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(i.ONE.shiftLeft(t - 1), kt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
|
|
882
882
|
this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(i.ONE.shiftLeft(t - 1), this);
|
|
883
883
|
else {
|
|
884
884
|
var r = [], s = t & 7;
|
|
@@ -956,9 +956,9 @@ var ee = (
|
|
|
956
956
|
if (n <= 0)
|
|
957
957
|
return !1;
|
|
958
958
|
var r = e.shiftRight(n);
|
|
959
|
-
t = t + 1 >> 1, t >
|
|
960
|
-
for (var s =
|
|
961
|
-
s.fromInt(
|
|
959
|
+
t = t + 1 >> 1, t > F.length && (t = F.length);
|
|
960
|
+
for (var s = A(), a = 0; a < t; ++a) {
|
|
961
|
+
s.fromInt(F[Math.floor(Math.random() * F.length)]);
|
|
962
962
|
var o = s.modPow(r, this);
|
|
963
963
|
if (o.compareTo(i.ONE) != 0 && o.compareTo(e) != 0) {
|
|
964
964
|
for (var c = 1; c++ < n && 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 = A();
|
|
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();
|
|
@@ -995,7 +995,7 @@ var ee = (
|
|
|
995
995
|
if (t < 2)
|
|
996
996
|
this.fromInt(1);
|
|
997
997
|
else {
|
|
998
|
-
this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(i.ONE.shiftLeft(t - 1),
|
|
998
|
+
this.fromNumber(t, n), this.testBit(t - 1) || this.bitwiseTo(i.ONE.shiftLeft(t - 1), kt, this), this.isEven() && this.dAddOffset(1, 0);
|
|
999
999
|
var s = this, a = function() {
|
|
1000
1000
|
s.dAddOffset(2, 0), s.bitLength() > t && s.subTo(i.ONE.shiftLeft(t - 1), s), s.isProbablePrime(e) ? setTimeout(function() {
|
|
1001
1001
|
r();
|
|
@@ -1009,7 +1009,7 @@ var ee = (
|
|
|
1009
1009
|
}
|
|
1010
1010
|
}, i;
|
|
1011
1011
|
})()
|
|
1012
|
-
),
|
|
1012
|
+
), ii = (
|
|
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
|
+
), qe = (
|
|
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
|
+
), He = (
|
|
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 = A();
|
|
1053
|
+
return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(S.ZERO) > 0 && this.m.subTo(e, e), e;
|
|
1054
1054
|
}, i.prototype.revert = function(t) {
|
|
1055
|
-
var e =
|
|
1055
|
+
var e = A();
|
|
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
|
+
), ri = (
|
|
1073
1073
|
/** @class */
|
|
1074
1074
|
(function() {
|
|
1075
1075
|
function i(t) {
|
|
1076
|
-
this.m = t, this.r2 =
|
|
1076
|
+
this.m = t, this.r2 = A(), this.q3 = A(), S.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 = A();
|
|
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 A() {
|
|
1100
|
+
return new S(null);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return new
|
|
1102
|
+
function D(i, t) {
|
|
1103
|
+
return new S(i, t);
|
|
1104
1104
|
}
|
|
1105
|
-
var
|
|
1106
|
-
|
|
1105
|
+
var Ke = typeof navigator < "u";
|
|
1106
|
+
Ke && je && navigator.appName == "Microsoft Internet Explorer" ? (S.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
|
+
}, at = 30) : Ke && je && navigator.appName != "Netscape" ? (S.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
|
+
}, at = 26) : (S.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
|
-
|
|
1128
|
-
var
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
var
|
|
1133
|
-
|
|
1134
|
-
for (
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
for (
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
for (
|
|
1141
|
-
|
|
1142
|
-
function
|
|
1143
|
-
var e =
|
|
1124
|
+
}, at = 28);
|
|
1125
|
+
S.prototype.DB = at;
|
|
1126
|
+
S.prototype.DM = (1 << at) - 1;
|
|
1127
|
+
S.prototype.DV = 1 << at;
|
|
1128
|
+
var Pe = 52;
|
|
1129
|
+
S.prototype.FV = Math.pow(2, Pe);
|
|
1130
|
+
S.prototype.F1 = Pe - at;
|
|
1131
|
+
S.prototype.F2 = 2 * at - Pe;
|
|
1132
|
+
var ee = [], St, W;
|
|
1133
|
+
St = 48;
|
|
1134
|
+
for (W = 0; W <= 9; ++W)
|
|
1135
|
+
ee[St++] = W;
|
|
1136
|
+
St = 97;
|
|
1137
|
+
for (W = 10; W < 36; ++W)
|
|
1138
|
+
ee[St++] = W;
|
|
1139
|
+
St = 65;
|
|
1140
|
+
for (W = 10; W < 36; ++W)
|
|
1141
|
+
ee[St++] = W;
|
|
1142
|
+
function We(i, t) {
|
|
1143
|
+
var e = ee[i.charCodeAt(t)];
|
|
1144
1144
|
return e ?? -1;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
var t =
|
|
1146
|
+
function rt(i) {
|
|
1147
|
+
var t = A();
|
|
1148
1148
|
return t.fromInt(i), t;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function jt(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
|
+
S.ZERO = rt(0);
|
|
1155
|
+
S.ONE = rt(1);
|
|
1156
|
+
var si = (
|
|
1157
1157
|
/** @class */
|
|
1158
1158
|
(function() {
|
|
1159
1159
|
function i() {
|
|
@@ -1172,123 +1172,123 @@ var Kn = (
|
|
|
1172
1172
|
}, i;
|
|
1173
1173
|
})()
|
|
1174
1174
|
);
|
|
1175
|
-
function
|
|
1176
|
-
return new
|
|
1175
|
+
function ai() {
|
|
1176
|
+
return new si();
|
|
1177
1177
|
}
|
|
1178
|
-
var
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1181
|
-
var
|
|
1178
|
+
var _n = 256, qt, st = null, z;
|
|
1179
|
+
if (st == null) {
|
|
1180
|
+
st = [], z = 0;
|
|
1181
|
+
var Ht = void 0;
|
|
1182
1182
|
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
1183
|
-
var
|
|
1184
|
-
for (self.crypto.getRandomValues(
|
|
1185
|
-
|
|
1183
|
+
var ce = new Uint32Array(256);
|
|
1184
|
+
for (self.crypto.getRandomValues(ce), Ht = 0; Ht < ce.length; ++Ht)
|
|
1185
|
+
st[z++] = ce[Ht] & 255;
|
|
1186
1186
|
}
|
|
1187
|
-
var
|
|
1188
|
-
if (
|
|
1189
|
-
self.removeEventListener ? self.removeEventListener("mousemove",
|
|
1187
|
+
var Kt = 0, Wt = function(i) {
|
|
1188
|
+
if (Kt = Kt || 0, Kt >= 256 || z >= _n) {
|
|
1189
|
+
self.removeEventListener ? self.removeEventListener("mousemove", Wt, !1) : self.detachEvent && self.detachEvent("onmousemove", Wt);
|
|
1190
1190
|
return;
|
|
1191
1191
|
}
|
|
1192
1192
|
try {
|
|
1193
1193
|
var t = i.x + i.y;
|
|
1194
|
-
|
|
1194
|
+
st[z++] = t & 255, Kt += 1;
|
|
1195
1195
|
} catch {
|
|
1196
1196
|
}
|
|
1197
1197
|
};
|
|
1198
|
-
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove",
|
|
1198
|
+
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Wt, !1) : self.attachEvent && self.attachEvent("onmousemove", Wt));
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
if (
|
|
1202
|
-
for (
|
|
1200
|
+
function oi() {
|
|
1201
|
+
if (qt == null) {
|
|
1202
|
+
for (qt = ai(); z < _n; ) {
|
|
1203
1203
|
var i = Math.floor(65536 * Math.random());
|
|
1204
|
-
|
|
1204
|
+
st[z++] = i & 255;
|
|
1205
1205
|
}
|
|
1206
|
-
for (
|
|
1207
|
-
|
|
1208
|
-
|
|
1206
|
+
for (qt.init(st), z = 0; z < st.length; ++z)
|
|
1207
|
+
st[z] = 0;
|
|
1208
|
+
z = 0;
|
|
1209
1209
|
}
|
|
1210
|
-
return
|
|
1210
|
+
return qt.next();
|
|
1211
1211
|
}
|
|
1212
|
-
var
|
|
1212
|
+
var Qt = (
|
|
1213
1213
|
/** @class */
|
|
1214
1214
|
(function() {
|
|
1215
1215
|
function i() {
|
|
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] = oi();
|
|
1220
1220
|
}, i;
|
|
1221
1221
|
})()
|
|
1222
1222
|
);
|
|
1223
|
-
function
|
|
1224
|
-
return
|
|
1223
|
+
function _e(i) {
|
|
1224
|
+
return ui(mi(ci(i), i.length * 8));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Xe(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 ci(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 ui(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 gn(i, t) {
|
|
1249
1249
|
return i >>> t;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function li(i, t, e) {
|
|
1252
1252
|
return i & t ^ ~i & e;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function hi(i, t, e) {
|
|
1255
1255
|
return i & t ^ i & e ^ t & e;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function fi(i) {
|
|
1258
|
+
return Q(i, 2) ^ Q(i, 13) ^ Q(i, 22);
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return
|
|
1260
|
+
function pi(i) {
|
|
1261
|
+
return Q(i, 6) ^ Q(i, 11) ^ Q(i, 25);
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1263
|
+
function di(i) {
|
|
1264
|
+
return Q(i, 7) ^ Q(i, 18) ^ gn(i, 3);
|
|
1265
1265
|
}
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
1266
|
+
function _i(i) {
|
|
1267
|
+
return Q(i, 17) ^ Q(i, 19) ^ gn(i, 10);
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
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,
|
|
1269
|
+
var gi = 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 mi(i, t) {
|
|
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, w, E;
|
|
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] = x(x(x(_i(n[g - 2]), n[g - 7]), di(n[g - 15])), n[g - 16]), w = x(x(x(x(f, pi(c)), li(c, u, l)), gi[g]), n[g]), E = x(fi(r), hi(r, s, a)), f = l, l = u, u = c, c = x(o, w), o = a, a = s, s = r, r = x(w, E);
|
|
1275
|
+
e[0] = x(r, e[0]), e[1] = x(s, e[1]), e[2] = x(a, e[2]), e[3] = x(o, e[3]), e[4] = x(c, e[4]), e[5] = x(u, e[5]), e[6] = x(l, e[6]), e[7] = x(f, e[7]);
|
|
1276
1276
|
}
|
|
1277
1277
|
return e;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function x(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 yi(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 bi(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; ) {
|
|
@@ -1296,14 +1296,14 @@ function ii(i, t) {
|
|
|
1296
1296
|
r < 128 ? e[--t] = r : r > 127 && r < 2048 ? (e[--t] = r & 63 | 128, e[--t] = r >> 6 | 192) : (e[--t] = r & 63 | 128, e[--t] = r >> 6 & 63 | 128, e[--t] = r >> 12 | 224);
|
|
1297
1297
|
}
|
|
1298
1298
|
e[--t] = 0;
|
|
1299
|
-
for (var s = new
|
|
1299
|
+
for (var s = new Qt(), a = []; t > 2; ) {
|
|
1300
1300
|
for (a[0] = 0; a[0] == 0; )
|
|
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 S(e);
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function ze(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,25 +1313,25 @@ function Me(i, t, e) {
|
|
|
1313
1313
|
]))), r += 1;
|
|
1314
1314
|
return n;
|
|
1315
1315
|
}
|
|
1316
|
-
var
|
|
1317
|
-
function
|
|
1318
|
-
var e =
|
|
1316
|
+
var Pi = 32;
|
|
1317
|
+
function wi(i, t) {
|
|
1318
|
+
var e = Pi, n = _e;
|
|
1319
1319
|
if (i.length + 2 * e + 2 > t)
|
|
1320
1320
|
throw "Message too long for RSA";
|
|
1321
1321
|
var r = "", s;
|
|
1322
1322
|
for (s = 0; s < t - i.length - 2 * e - 2; s += 1)
|
|
1323
1323
|
r += "\0";
|
|
1324
1324
|
var a = n("") + r + "" + i, o = new Array(e);
|
|
1325
|
-
new
|
|
1326
|
-
var c =
|
|
1325
|
+
new Qt().nextBytes(o);
|
|
1326
|
+
var c = ze(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 = ze(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 S(f.concat(u));
|
|
1333
1333
|
}
|
|
1334
|
-
var
|
|
1334
|
+
var Ei = (
|
|
1335
1335
|
/** @class */
|
|
1336
1336
|
(function() {
|
|
1337
1337
|
function i() {
|
|
@@ -1346,9 +1346,9 @@ var ai = (
|
|
|
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 = bi);
|
|
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 ai = (
|
|
|
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
|
-
var n = new
|
|
1366
|
+
var n = new Qt(), 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 S(e, 16); ; ) {
|
|
1369
|
+
for (; this.p = new S(t - r, 1, n), !(this.p.subtract(S.ONE).gcd(s).compareTo(S.ONE) == 0 && this.p.isProbablePrime(10)); )
|
|
1370
1370
|
;
|
|
1371
|
-
for (; this.q = new
|
|
1371
|
+
for (; this.q = new S(r, 1, n), !(this.q.subtract(S.ONE).gcd(s).compareTo(S.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(S.ONE), c = this.q.subtract(S.ONE), u = o.multiply(c);
|
|
1378
|
+
if (u.gcd(s).compareTo(S.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 : vi(n, this.n.bitLength() + 7 >> 3);
|
|
1386
1386
|
}, i.prototype.generateAsync = function(t, e, n) {
|
|
1387
|
-
var r = new
|
|
1387
|
+
var r = new Qt(), s = t >> 1;
|
|
1388
1388
|
this.e = parseInt(e, 16);
|
|
1389
|
-
var a = new
|
|
1389
|
+
var a = new S(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
|
-
|
|
1395
|
+
var g = o.p.subtract(S.ONE), w = o.q.subtract(S.ONE), E = g.multiply(w);
|
|
1396
|
+
E.gcd(a).compareTo(S.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(E), o.dmp1 = o.d.mod(g), o.dmq1 = o.d.mod(w), 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 = A(), o.q.fromNumberAsync(s, 1, r, function() {
|
|
1401
|
+
o.q.subtract(S.ONE).gcda(a, function(d) {
|
|
1402
|
+
d.compareTo(S.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 = A(), o.p.fromNumberAsync(t - s, 1, r, function() {
|
|
1407
|
+
o.p.subtract(S.ONE).gcda(a, function(d) {
|
|
1408
|
+
d.compareTo(S.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(f, 0);
|
|
1409
1409
|
});
|
|
1410
1410
|
});
|
|
1411
1411
|
};
|
|
@@ -1413,7 +1413,7 @@ var ai = (
|
|
|
1413
1413
|
};
|
|
1414
1414
|
setTimeout(c, 0);
|
|
1415
1415
|
}, i.prototype.sign = function(t, e, n) {
|
|
1416
|
-
var r =
|
|
1416
|
+
var r = Si(n), s = r + e(t).toString(), a = this.n.bitLength() / 4, o = yi(s, a);
|
|
1417
1417
|
if (o == null)
|
|
1418
1418
|
return null;
|
|
1419
1419
|
var c = this.doPrivate(o);
|
|
@@ -1423,15 +1423,15 @@ var ai = (
|
|
|
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 = Ti(a);
|
|
1430
1430
|
return o == n(t).toString();
|
|
1431
1431
|
}, i;
|
|
1432
1432
|
})()
|
|
1433
1433
|
);
|
|
1434
|
-
function
|
|
1434
|
+
function vi(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)
|
|
@@ -1445,7 +1445,7 @@ function oi(i, t) {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
return r;
|
|
1447
1447
|
}
|
|
1448
|
-
var
|
|
1448
|
+
var zt = {
|
|
1449
1449
|
md2: "3020300c06082a864886f70d020205000410",
|
|
1450
1450
|
md5: "3020300c06082a864886f70d020505000410",
|
|
1451
1451
|
sha1: "3021300906052b0e03021a05000414",
|
|
@@ -1455,19 +1455,19 @@ var kt = {
|
|
|
1455
1455
|
sha512: "3051300d060960864801650304020305000440",
|
|
1456
1456
|
ripemd160: "3021300906052b2403020105000414"
|
|
1457
1457
|
};
|
|
1458
|
-
function
|
|
1459
|
-
return
|
|
1458
|
+
function Si(i) {
|
|
1459
|
+
return zt[i] || "";
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
for (var t in
|
|
1463
|
-
if (
|
|
1464
|
-
var e =
|
|
1461
|
+
function Ti(i) {
|
|
1462
|
+
for (var t in zt)
|
|
1463
|
+
if (zt.hasOwnProperty(t)) {
|
|
1464
|
+
var e = zt[t], n = e.length;
|
|
1465
1465
|
if (i.substring(0, n) == e)
|
|
1466
1466
|
return i.substring(n);
|
|
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,75 +1489,75 @@ 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 S(r, 16), o = a.xor(i).add(S.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,
|
|
1500
|
-
if (
|
|
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, w = e.DERIA5String, E = e.DERUTCTime, y = e.DERGeneralizedTime, _ = e.DERSequence, b = e.DERSet, v = e.DERTaggedObject, R = e.ASN1Util.newObject, B = Object.keys(i);
|
|
1500
|
+
if (B.length != 1)
|
|
1501
1501
|
throw "key of param shall be only one.";
|
|
1502
|
-
var
|
|
1503
|
-
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" +
|
|
1504
|
-
throw "undefined key: " +
|
|
1505
|
-
if (
|
|
1506
|
-
return new n(i[
|
|
1507
|
-
if (
|
|
1508
|
-
return new r(i[
|
|
1509
|
-
if (
|
|
1510
|
-
return new s(i[
|
|
1511
|
-
if (
|
|
1512
|
-
return new a(i[
|
|
1513
|
-
if (
|
|
1514
|
-
return new o(i[
|
|
1515
|
-
if (
|
|
1516
|
-
return new c(i[
|
|
1517
|
-
if (
|
|
1518
|
-
return new u(i[
|
|
1519
|
-
if (
|
|
1520
|
-
return new l(i[
|
|
1521
|
-
if (
|
|
1522
|
-
return new f(i[
|
|
1523
|
-
if (
|
|
1524
|
-
return new d(i[
|
|
1525
|
-
if (
|
|
1526
|
-
return new g(i[
|
|
1527
|
-
if (
|
|
1528
|
-
return new
|
|
1529
|
-
if (
|
|
1530
|
-
return new
|
|
1531
|
-
if (
|
|
1532
|
-
return new
|
|
1533
|
-
if (
|
|
1534
|
-
for (var
|
|
1535
|
-
var
|
|
1536
|
-
|
|
1502
|
+
var P = B[0];
|
|
1503
|
+
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + P + ":") == -1)
|
|
1504
|
+
throw "undefined key: " + P;
|
|
1505
|
+
if (P == "bool")
|
|
1506
|
+
return new n(i[P]);
|
|
1507
|
+
if (P == "int")
|
|
1508
|
+
return new r(i[P]);
|
|
1509
|
+
if (P == "bitstr")
|
|
1510
|
+
return new s(i[P]);
|
|
1511
|
+
if (P == "octstr")
|
|
1512
|
+
return new a(i[P]);
|
|
1513
|
+
if (P == "null")
|
|
1514
|
+
return new o(i[P]);
|
|
1515
|
+
if (P == "oid")
|
|
1516
|
+
return new c(i[P]);
|
|
1517
|
+
if (P == "enum")
|
|
1518
|
+
return new u(i[P]);
|
|
1519
|
+
if (P == "utf8str")
|
|
1520
|
+
return new l(i[P]);
|
|
1521
|
+
if (P == "numstr")
|
|
1522
|
+
return new f(i[P]);
|
|
1523
|
+
if (P == "prnstr")
|
|
1524
|
+
return new d(i[P]);
|
|
1525
|
+
if (P == "telstr")
|
|
1526
|
+
return new g(i[P]);
|
|
1527
|
+
if (P == "ia5str")
|
|
1528
|
+
return new w(i[P]);
|
|
1529
|
+
if (P == "utctime")
|
|
1530
|
+
return new E(i[P]);
|
|
1531
|
+
if (P == "gentime")
|
|
1532
|
+
return new y(i[P]);
|
|
1533
|
+
if (P == "seq") {
|
|
1534
|
+
for (var k = i[P], Z = [], X = 0; X < k.length; X++) {
|
|
1535
|
+
var H = R(k[X]);
|
|
1536
|
+
Z.push(H);
|
|
1537
1537
|
}
|
|
1538
|
-
return new
|
|
1538
|
+
return new _({ array: Z });
|
|
1539
1539
|
}
|
|
1540
|
-
if (
|
|
1541
|
-
for (var
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1540
|
+
if (P == "set") {
|
|
1541
|
+
for (var k = i[P], Z = [], X = 0; X < k.length; X++) {
|
|
1542
|
+
var H = R(k[X]);
|
|
1543
|
+
Z.push(H);
|
|
1544
1544
|
}
|
|
1545
|
-
return new
|
|
1545
|
+
return new b({ array: Z });
|
|
1546
1546
|
}
|
|
1547
|
-
if (
|
|
1548
|
-
var I = i[
|
|
1547
|
+
if (P == "tag") {
|
|
1548
|
+
var I = i[P];
|
|
1549
1549
|
if (Object.prototype.toString.call(I) === "[object Array]" && I.length == 3) {
|
|
1550
|
-
var
|
|
1551
|
-
return new
|
|
1550
|
+
var _t = R(I[2]);
|
|
1551
|
+
return new v({
|
|
1552
1552
|
tag: I[0],
|
|
1553
1553
|
explicit: I[1],
|
|
1554
|
-
obj:
|
|
1554
|
+
obj: _t
|
|
1555
1555
|
});
|
|
1556
1556
|
} else {
|
|
1557
|
-
var
|
|
1558
|
-
if (I.explicit !== void 0 && (
|
|
1557
|
+
var ot = {};
|
|
1558
|
+
if (I.explicit !== void 0 && (ot.explicit = I.explicit), I.tag !== void 0 && (ot.tag = I.tag), I.obj === void 0)
|
|
1559
1559
|
throw "obj shall be specified for 'tag'.";
|
|
1560
|
-
return
|
|
1560
|
+
return ot.obj = R(I.obj), new v(ot);
|
|
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 S(s, 2);
|
|
1573
1573
|
r = r + "." + u.toString(10), s = "";
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
@@ -1580,14 +1580,14 @@ 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 S(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";
|
|
1587
1587
|
l = d + l;
|
|
1588
1588
|
for (var g = 0; g < l.length - 1; g += 7) {
|
|
1589
|
-
var
|
|
1590
|
-
g != l.length - 7 && (
|
|
1589
|
+
var w = l.substring(g, g + 7);
|
|
1590
|
+
g != l.length - 7 && (w = "1" + w), c += t(parseInt(w, 2));
|
|
1591
1591
|
}
|
|
1592
1592
|
return c;
|
|
1593
1593
|
};
|
|
@@ -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;
|
|
@@ -1646,8 +1646,8 @@ p.asn1.DERAbstractTime = function(i) {
|
|
|
1646
1646
|
if (n === !0) {
|
|
1647
1647
|
var g = s.getMilliseconds();
|
|
1648
1648
|
if (g != 0) {
|
|
1649
|
-
var
|
|
1650
|
-
|
|
1649
|
+
var w = r(String(g), 3);
|
|
1650
|
+
w = w.replace(/[0]+$/, ""), d = d + "." + w;
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
1653
|
return d + "Z";
|
|
@@ -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 S(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 S(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 S(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 Ai = /* @__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 li = /* @__PURE__ */ (function() {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
1871
1871
|
};
|
|
1872
|
-
})(),
|
|
1872
|
+
})(), Ge = (
|
|
1873
1873
|
/** @class */
|
|
1874
1874
|
(function(i) {
|
|
1875
|
-
|
|
1875
|
+
Ai(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) ? Qn.decode(e) : de.unarmor(e), o = ti.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
|
-
var
|
|
1900
|
-
n =
|
|
1899
|
+
var w = o.sub[1], E = w.sub[0];
|
|
1900
|
+
n = E.sub[0].getHexStringValue(), this.n = D(n, 16), r = E.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 li = /* @__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 Nt(this.getPrivateBaseKey());
|
|
1926
1926
|
}, t.prototype.getPublicBaseKey = function() {
|
|
1927
1927
|
var e = new p.asn1.DERSequence({
|
|
1928
1928
|
array: [
|
|
@@ -1942,7 +1942,7 @@ var li = /* @__PURE__ */ (function() {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
return s.getEncodedHex();
|
|
1944
1944
|
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
1945
|
-
return
|
|
1945
|
+
return Nt(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 li = /* @__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
|
-
),
|
|
1970
|
+
})(Ei)
|
|
1971
|
+
), ue, Ri = typeof process < "u" ? (ue = process.env) === null || ue === void 0 ? void 0 : ue.npm_package_version : void 0, Ci = (
|
|
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 Ge(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(Fe(t));
|
|
1986
1986
|
} catch {
|
|
1987
1987
|
return !1;
|
|
1988
1988
|
}
|
|
1989
1989
|
}, i.prototype.encrypt = function(t) {
|
|
1990
1990
|
try {
|
|
1991
|
-
return
|
|
1991
|
+
return Nt(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 Nt(this.getKey().encrypt(t, wi));
|
|
1998
1998
|
} catch {
|
|
1999
1999
|
return !1;
|
|
2000
2000
|
}
|
|
@@ -2003,30 +2003,30 @@ var li = /* @__PURE__ */ (function() {
|
|
|
2003
2003
|
return r;
|
|
2004
2004
|
}), n === void 0 && (n = "");
|
|
2005
2005
|
try {
|
|
2006
|
-
return
|
|
2006
|
+
return Nt(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 Xe(_e(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, Fe(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 Xe(_e(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 Ge(), 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,80 @@ var li = /* @__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 = Ri, i;
|
|
2045
2045
|
})()
|
|
2046
2046
|
);
|
|
2047
|
-
function
|
|
2047
|
+
function mn(i, t) {
|
|
2048
2048
|
return function() {
|
|
2049
2049
|
return i.apply(t, arguments);
|
|
2050
2050
|
};
|
|
2051
2051
|
}
|
|
2052
|
-
const { toString:
|
|
2053
|
-
|
|
2052
|
+
const { toString: Oi } = Object.prototype, { getPrototypeOf: Et } = Object, { iterator: xt, toStringTag: yn } = Symbol, Zt = (({ hasOwnProperty: i }) => (t, e) => i.call(t, e))(Object.prototype), Bt = (i, t) => {
|
|
2053
|
+
let e = i;
|
|
2054
|
+
const n = [];
|
|
2055
|
+
for (; e != null && e !== Object.prototype; ) {
|
|
2056
|
+
if (n.indexOf(e) !== -1)
|
|
2057
|
+
return !1;
|
|
2058
|
+
if (n.push(e), Zt(e, t))
|
|
2059
|
+
return !0;
|
|
2060
|
+
e = Et(e);
|
|
2061
|
+
}
|
|
2062
|
+
return !1;
|
|
2063
|
+
}, Di = (i, t) => i != null && Bt(i, t) ? i[t] : void 0, we = /* @__PURE__ */ ((i) => (t) => {
|
|
2064
|
+
const e = Oi.call(t);
|
|
2054
2065
|
return i[e] || (i[e] = e.slice(8, -1).toLowerCase());
|
|
2055
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
2056
|
-
function
|
|
2057
|
-
return i !== null && !
|
|
2066
|
+
})(/* @__PURE__ */ Object.create(null)), G = (i) => (i = i.toLowerCase(), (t) => we(t) === i), ne = (i) => (t) => typeof t === i, { isArray: pt } = Array, vt = ne("undefined");
|
|
2067
|
+
function Tt(i) {
|
|
2068
|
+
return i !== null && !vt(i) && i.constructor !== null && !vt(i.constructor) && j(i.constructor.isBuffer) && i.constructor.isBuffer(i);
|
|
2058
2069
|
}
|
|
2059
|
-
const
|
|
2060
|
-
function
|
|
2070
|
+
const bn = G("ArrayBuffer");
|
|
2071
|
+
function Ii(i) {
|
|
2061
2072
|
let t;
|
|
2062
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer &&
|
|
2073
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(i) : t = i && i.buffer && bn(i.buffer), t;
|
|
2063
2074
|
}
|
|
2064
|
-
const
|
|
2065
|
-
if (
|
|
2075
|
+
const Ni = ne("string"), j = ne("function"), Pn = ne("number"), At = (i) => i !== null && typeof i == "object", Bi = (i) => i === !0 || i === !1, Gt = (i) => {
|
|
2076
|
+
if (!At(i))
|
|
2066
2077
|
return !1;
|
|
2067
|
-
const t =
|
|
2068
|
-
return (t === null || t === Object.prototype ||
|
|
2069
|
-
|
|
2070
|
-
|
|
2078
|
+
const t = Et(i);
|
|
2079
|
+
return (t === null || t === Object.prototype || Et(t) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
2080
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
2081
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
2082
|
+
!Bt(i, yn) && !Bt(i, xt);
|
|
2083
|
+
}, xi = (i) => {
|
|
2084
|
+
if (!At(i) || Tt(i))
|
|
2071
2085
|
return !1;
|
|
2072
2086
|
try {
|
|
2073
2087
|
return Object.keys(i).length === 0 && Object.getPrototypeOf(i) === Object.prototype;
|
|
2074
2088
|
} catch {
|
|
2075
2089
|
return !1;
|
|
2076
2090
|
}
|
|
2077
|
-
},
|
|
2078
|
-
function
|
|
2091
|
+
}, Ui = G("Date"), Li = G("File"), Vi = (i) => !!(i && typeof i.uri < "u"), Mi = (i) => i && typeof i.getParts < "u", Fi = G("Blob"), ki = G("FileList"), ji = (i) => At(i) && j(i.pipe);
|
|
2092
|
+
function qi() {
|
|
2079
2093
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
2080
2094
|
}
|
|
2081
|
-
const
|
|
2095
|
+
const $e = qi(), Je = typeof $e.FormData < "u" ? $e.FormData : void 0, Hi = (i) => {
|
|
2082
2096
|
if (!i) return !1;
|
|
2083
|
-
if (
|
|
2084
|
-
const t =
|
|
2085
|
-
if (!t || t === Object.prototype || !
|
|
2086
|
-
const e =
|
|
2097
|
+
if (Je && i instanceof Je) return !0;
|
|
2098
|
+
const t = Et(i);
|
|
2099
|
+
if (!t || t === Object.prototype || !j(i.append)) return !1;
|
|
2100
|
+
const e = we(i);
|
|
2087
2101
|
return e === "formdata" || // detect form-data instance
|
|
2088
|
-
e === "object" &&
|
|
2089
|
-
},
|
|
2102
|
+
e === "object" && j(i.toString) && i.toString() === "[object FormData]";
|
|
2103
|
+
}, Ki = G("URLSearchParams"), [Wi, Xi, zi, Gi] = [
|
|
2090
2104
|
"ReadableStream",
|
|
2091
2105
|
"Request",
|
|
2092
2106
|
"Response",
|
|
2093
2107
|
"Headers"
|
|
2094
|
-
].map(
|
|
2095
|
-
function
|
|
2108
|
+
].map(G), $i = (i) => i.trim ? i.trim() : i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2109
|
+
function Ut(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
2096
2110
|
if (i === null || typeof i > "u")
|
|
2097
2111
|
return;
|
|
2098
2112
|
let n, r;
|
|
2099
|
-
if (typeof i != "object" && (i = [i]),
|
|
2113
|
+
if (typeof i != "object" && (i = [i]), pt(i))
|
|
2100
2114
|
for (n = 0, r = i.length; n < r; n++)
|
|
2101
2115
|
t.call(null, i[n], n, i);
|
|
2102
2116
|
else {
|
|
2103
|
-
if (
|
|
2117
|
+
if (Tt(i))
|
|
2104
2118
|
return;
|
|
2105
2119
|
const s = e ? Object.getOwnPropertyNames(i) : Object.keys(i), a = s.length;
|
|
2106
2120
|
let o;
|
|
@@ -2108,8 +2122,8 @@ function Ct(i, t, { allOwnKeys: e = !1 } = {}) {
|
|
|
2108
2122
|
o = s[n], t.call(null, i[o], o, i);
|
|
2109
2123
|
}
|
|
2110
2124
|
}
|
|
2111
|
-
function
|
|
2112
|
-
if (
|
|
2125
|
+
function wn(i, t) {
|
|
2126
|
+
if (Tt(i))
|
|
2113
2127
|
return null;
|
|
2114
2128
|
t = t.toLowerCase();
|
|
2115
2129
|
const e = Object.keys(i);
|
|
@@ -2119,26 +2133,34 @@ function un(i, t) {
|
|
|
2119
2133
|
return r;
|
|
2120
2134
|
return null;
|
|
2121
2135
|
}
|
|
2122
|
-
const
|
|
2123
|
-
function
|
|
2124
|
-
const { caseless: t, skipUndefined: e } =
|
|
2136
|
+
const ht = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, En = (i) => !vt(i) && i !== ht;
|
|
2137
|
+
function ge(...i) {
|
|
2138
|
+
const { caseless: t, skipUndefined: e } = En(this) && this || {}, n = {}, r = (s, a) => {
|
|
2125
2139
|
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
2126
2140
|
return;
|
|
2127
|
-
const o = t &&
|
|
2128
|
-
|
|
2141
|
+
const o = t && typeof a == "string" && wn(n, a) || a, c = Zt(n, o) ? n[o] : void 0;
|
|
2142
|
+
Gt(c) && Gt(s) ? n[o] = ge(c, s) : Gt(s) ? n[o] = ge({}, s) : pt(s) ? n[o] = s.slice() : (!e || !vt(s)) && (n[o] = s);
|
|
2129
2143
|
};
|
|
2130
|
-
for (let s = 0, a = i.length; s < a; s++)
|
|
2131
|
-
|
|
2144
|
+
for (let s = 0, a = i.length; s < a; s++) {
|
|
2145
|
+
const o = i[s];
|
|
2146
|
+
if (!o || Tt(o) || (Ut(o, r), typeof o != "object" || pt(o)))
|
|
2147
|
+
continue;
|
|
2148
|
+
const c = Object.getOwnPropertySymbols(o);
|
|
2149
|
+
for (let u = 0; u < c.length; u++) {
|
|
2150
|
+
const l = c[u];
|
|
2151
|
+
or.call(o, l) && r(o[l], l);
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2132
2154
|
return n;
|
|
2133
2155
|
}
|
|
2134
|
-
const
|
|
2156
|
+
const Ji = (i, t, e, { allOwnKeys: n } = {}) => (Ut(
|
|
2135
2157
|
t,
|
|
2136
2158
|
(r, s) => {
|
|
2137
|
-
e &&
|
|
2159
|
+
e && j(r) ? Object.defineProperty(i, s, {
|
|
2138
2160
|
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
2139
2161
|
// hijack defineProperty's accessor-vs-data resolution.
|
|
2140
2162
|
__proto__: null,
|
|
2141
|
-
value:
|
|
2163
|
+
value: mn(r, e),
|
|
2142
2164
|
writable: !0,
|
|
2143
2165
|
enumerable: !0,
|
|
2144
2166
|
configurable: !0
|
|
@@ -2151,7 +2173,7 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2151
2173
|
});
|
|
2152
2174
|
},
|
|
2153
2175
|
{ allOwnKeys: n }
|
|
2154
|
-
), i),
|
|
2176
|
+
), i), Qi = (i) => (i.charCodeAt(0) === 65279 && (i = i.slice(1)), i), Zi = (i, t, e, n) => {
|
|
2155
2177
|
i.prototype = Object.create(t.prototype, n), Object.defineProperty(i.prototype, "constructor", {
|
|
2156
2178
|
__proto__: null,
|
|
2157
2179
|
value: i,
|
|
@@ -2162,56 +2184,56 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2162
2184
|
__proto__: null,
|
|
2163
2185
|
value: t.prototype
|
|
2164
2186
|
}), e && Object.assign(i.prototype, e);
|
|
2165
|
-
},
|
|
2187
|
+
}, Yi = (i, t, e, n) => {
|
|
2166
2188
|
let r, s, a;
|
|
2167
2189
|
const o = {};
|
|
2168
2190
|
if (t = t || {}, i == null) return t;
|
|
2169
2191
|
do {
|
|
2170
2192
|
for (r = Object.getOwnPropertyNames(i), s = r.length; s-- > 0; )
|
|
2171
2193
|
a = r[s], (!n || n(a, i, t)) && !o[a] && (t[a] = i[a], o[a] = !0);
|
|
2172
|
-
i = e !== !1 &&
|
|
2194
|
+
i = e !== !1 && Et(i);
|
|
2173
2195
|
} while (i && (!e || e(i, t)) && i !== Object.prototype);
|
|
2174
2196
|
return t;
|
|
2175
|
-
},
|
|
2197
|
+
}, tr = (i, t, e) => {
|
|
2176
2198
|
i = String(i), (e === void 0 || e > i.length) && (e = i.length), e -= t.length;
|
|
2177
2199
|
const n = i.indexOf(t, e);
|
|
2178
2200
|
return n !== -1 && n === e;
|
|
2179
|
-
},
|
|
2201
|
+
}, er = (i) => {
|
|
2180
2202
|
if (!i) return null;
|
|
2181
|
-
if (
|
|
2203
|
+
if (pt(i)) return i;
|
|
2182
2204
|
let t = i.length;
|
|
2183
|
-
if (!
|
|
2205
|
+
if (!Pn(t)) return null;
|
|
2184
2206
|
const e = new Array(t);
|
|
2185
2207
|
for (; t-- > 0; )
|
|
2186
2208
|
e[t] = i[t];
|
|
2187
2209
|
return e;
|
|
2188
|
-
},
|
|
2189
|
-
const n = (i && i[
|
|
2210
|
+
}, nr = /* @__PURE__ */ ((i) => (t) => i && t instanceof i)(typeof Uint8Array < "u" && Et(Uint8Array)), ir = (i, t) => {
|
|
2211
|
+
const n = (i && i[xt]).call(i);
|
|
2190
2212
|
let r;
|
|
2191
2213
|
for (; (r = n.next()) && !r.done; ) {
|
|
2192
2214
|
const s = r.value;
|
|
2193
2215
|
t.call(i, s[0], s[1]);
|
|
2194
2216
|
}
|
|
2195
|
-
},
|
|
2217
|
+
}, rr = (i, t) => {
|
|
2196
2218
|
let e;
|
|
2197
2219
|
const n = [];
|
|
2198
2220
|
for (; (e = i.exec(t)) !== null; )
|
|
2199
2221
|
n.push(e);
|
|
2200
2222
|
return n;
|
|
2201
|
-
},
|
|
2223
|
+
}, sr = G("HTMLFormElement"), ar = (i) => i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, n, r) {
|
|
2202
2224
|
return n.toUpperCase() + r;
|
|
2203
|
-
}),
|
|
2225
|
+
}), { propertyIsEnumerable: or } = Object.prototype, cr = G("RegExp"), vn = (i, t) => {
|
|
2204
2226
|
const e = Object.getOwnPropertyDescriptors(i), n = {};
|
|
2205
|
-
|
|
2227
|
+
Ut(e, (r, s) => {
|
|
2206
2228
|
let a;
|
|
2207
2229
|
(a = t(r, s, i)) !== !1 && (n[s] = a || r);
|
|
2208
2230
|
}), Object.defineProperties(i, n);
|
|
2209
|
-
},
|
|
2210
|
-
|
|
2211
|
-
if (
|
|
2231
|
+
}, ur = (i) => {
|
|
2232
|
+
vn(i, (t, e) => {
|
|
2233
|
+
if (j(i) && ["arguments", "caller", "callee"].includes(e))
|
|
2212
2234
|
return !1;
|
|
2213
2235
|
const n = i[e];
|
|
2214
|
-
if (
|
|
2236
|
+
if (j(n)) {
|
|
2215
2237
|
if (t.enumerable = !1, "writable" in t) {
|
|
2216
2238
|
t.writable = !1;
|
|
2217
2239
|
return;
|
|
@@ -2221,107 +2243,110 @@ const Bi = (i, t, e, { allOwnKeys: n } = {}) => (Ct(
|
|
|
2221
2243
|
});
|
|
2222
2244
|
}
|
|
2223
2245
|
});
|
|
2224
|
-
},
|
|
2246
|
+
}, lr = (i, t) => {
|
|
2225
2247
|
const e = {}, n = (r) => {
|
|
2226
2248
|
r.forEach((s) => {
|
|
2227
2249
|
e[s] = !0;
|
|
2228
2250
|
});
|
|
2229
2251
|
};
|
|
2230
|
-
return
|
|
2231
|
-
},
|
|
2232
|
-
},
|
|
2233
|
-
function
|
|
2234
|
-
return !!(i &&
|
|
2252
|
+
return pt(i) ? n(i) : n(String(i).split(t)), e;
|
|
2253
|
+
}, hr = () => {
|
|
2254
|
+
}, fr = (i, t) => i != null && Number.isFinite(i = +i) ? i : t;
|
|
2255
|
+
function pr(i) {
|
|
2256
|
+
return !!(i && j(i.append) && i[yn] === "FormData" && i[xt]);
|
|
2235
2257
|
}
|
|
2236
|
-
const
|
|
2258
|
+
const dr = (i) => {
|
|
2237
2259
|
const t = /* @__PURE__ */ new WeakSet(), e = (n) => {
|
|
2238
|
-
if (
|
|
2260
|
+
if (At(n)) {
|
|
2239
2261
|
if (t.has(n))
|
|
2240
2262
|
return;
|
|
2241
|
-
if (
|
|
2263
|
+
if (Tt(n))
|
|
2242
2264
|
return n;
|
|
2243
2265
|
if (!("toJSON" in n)) {
|
|
2244
2266
|
t.add(n);
|
|
2245
|
-
const r =
|
|
2246
|
-
return
|
|
2267
|
+
const r = pt(n) ? [] : {};
|
|
2268
|
+
return Ut(n, (s, a) => {
|
|
2247
2269
|
const o = e(s);
|
|
2248
|
-
!
|
|
2270
|
+
!vt(o) && (r[a] = o);
|
|
2249
2271
|
}), t.delete(n), r;
|
|
2250
2272
|
}
|
|
2251
2273
|
}
|
|
2252
2274
|
return n;
|
|
2253
2275
|
};
|
|
2254
2276
|
return e(i);
|
|
2255
|
-
},
|
|
2277
|
+
}, _r = G("AsyncFunction"), gr = (i) => i && (At(i) || j(i)) && j(i.then) && j(i.catch), Sn = ((i, t) => i ? setImmediate : t ? ((e, n) => (ht.addEventListener(
|
|
2256
2278
|
"message",
|
|
2257
2279
|
({ source: r, data: s }) => {
|
|
2258
|
-
r ===
|
|
2280
|
+
r === ht && s === e && n.length && n.shift()();
|
|
2259
2281
|
},
|
|
2260
2282
|
!1
|
|
2261
2283
|
), (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:
|
|
2273
|
-
isPlainObject:
|
|
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:
|
|
2292
|
-
merge:
|
|
2293
|
-
extend:
|
|
2294
|
-
trim:
|
|
2295
|
-
stripBOM:
|
|
2296
|
-
inherits:
|
|
2297
|
-
toFlatObject:
|
|
2298
|
-
kindOf:
|
|
2299
|
-
kindOfTest:
|
|
2300
|
-
endsWith:
|
|
2301
|
-
toArray:
|
|
2302
|
-
forEachEntry:
|
|
2303
|
-
matchAll:
|
|
2304
|
-
isHTMLForm:
|
|
2305
|
-
hasOwnProperty:
|
|
2306
|
-
hasOwnProp:
|
|
2284
|
+
n.push(r), ht.postMessage(e, "*");
|
|
2285
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", j(ht.postMessage)), mr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ht) : typeof process < "u" && process.nextTick || Sn, Tn = (i) => i != null && j(i[xt]), yr = (i) => i != null && Bt(i, xt) && Tn(i), h = {
|
|
2286
|
+
isArray: pt,
|
|
2287
|
+
isArrayBuffer: bn,
|
|
2288
|
+
isBuffer: Tt,
|
|
2289
|
+
isFormData: Hi,
|
|
2290
|
+
isArrayBufferView: Ii,
|
|
2291
|
+
isString: Ni,
|
|
2292
|
+
isNumber: Pn,
|
|
2293
|
+
isBoolean: Bi,
|
|
2294
|
+
isObject: At,
|
|
2295
|
+
isPlainObject: Gt,
|
|
2296
|
+
isEmptyObject: xi,
|
|
2297
|
+
isReadableStream: Wi,
|
|
2298
|
+
isRequest: Xi,
|
|
2299
|
+
isResponse: zi,
|
|
2300
|
+
isHeaders: Gi,
|
|
2301
|
+
isUndefined: vt,
|
|
2302
|
+
isDate: Ui,
|
|
2303
|
+
isFile: Li,
|
|
2304
|
+
isReactNativeBlob: Vi,
|
|
2305
|
+
isReactNative: Mi,
|
|
2306
|
+
isBlob: Fi,
|
|
2307
|
+
isRegExp: cr,
|
|
2308
|
+
isFunction: j,
|
|
2309
|
+
isStream: ji,
|
|
2310
|
+
isURLSearchParams: Ki,
|
|
2311
|
+
isTypedArray: nr,
|
|
2312
|
+
isFileList: ki,
|
|
2313
|
+
forEach: Ut,
|
|
2314
|
+
merge: ge,
|
|
2315
|
+
extend: Ji,
|
|
2316
|
+
trim: $i,
|
|
2317
|
+
stripBOM: Qi,
|
|
2318
|
+
inherits: Zi,
|
|
2319
|
+
toFlatObject: Yi,
|
|
2320
|
+
kindOf: we,
|
|
2321
|
+
kindOfTest: G,
|
|
2322
|
+
endsWith: tr,
|
|
2323
|
+
toArray: er,
|
|
2324
|
+
forEachEntry: ir,
|
|
2325
|
+
matchAll: rr,
|
|
2326
|
+
isHTMLForm: sr,
|
|
2327
|
+
hasOwnProperty: Zt,
|
|
2328
|
+
hasOwnProp: Zt,
|
|
2307
2329
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2330
|
+
hasOwnInPrototypeChain: Bt,
|
|
2331
|
+
getSafeProp: Di,
|
|
2332
|
+
reduceDescriptors: vn,
|
|
2333
|
+
freezeMethods: ur,
|
|
2334
|
+
toObjectSet: lr,
|
|
2335
|
+
toCamelCase: ar,
|
|
2336
|
+
noop: hr,
|
|
2337
|
+
toFiniteNumber: fr,
|
|
2338
|
+
findKey: wn,
|
|
2339
|
+
global: ht,
|
|
2340
|
+
isContextDefined: En,
|
|
2341
|
+
isSpecCompliantForm: pr,
|
|
2342
|
+
toJSONObject: dr,
|
|
2343
|
+
isAsyncFn: _r,
|
|
2344
|
+
isThenable: gr,
|
|
2345
|
+
setImmediate: Sn,
|
|
2346
|
+
asap: mr,
|
|
2347
|
+
isIterable: Tn,
|
|
2348
|
+
isSafeIterable: yr
|
|
2349
|
+
}, br = h.toObjectSet([
|
|
2325
2350
|
"age",
|
|
2326
2351
|
"authorization",
|
|
2327
2352
|
"content-length",
|
|
@@ -2339,15 +2364,15 @@ const Ji = (i) => {
|
|
|
2339
2364
|
"referer",
|
|
2340
2365
|
"retry-after",
|
|
2341
2366
|
"user-agent"
|
|
2342
|
-
]),
|
|
2367
|
+
]), Pr = (i) => {
|
|
2343
2368
|
const t = {};
|
|
2344
2369
|
let e, n, r;
|
|
2345
2370
|
return i && i.split(`
|
|
2346
2371
|
`).forEach(function(a) {
|
|
2347
|
-
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] &&
|
|
2372
|
+
r = a.indexOf(":"), e = a.substring(0, r).trim().toLowerCase(), n = a.substring(r + 1).trim(), !(!e || t[e] && br[e]) && (e === "set-cookie" ? t[e] ? t[e].push(n) : t[e] = [n] : t[e] = t[e] ? t[e] + ", " + n : n);
|
|
2348
2373
|
}), t;
|
|
2349
2374
|
};
|
|
2350
|
-
function
|
|
2375
|
+
function wr(i) {
|
|
2351
2376
|
let t = 0, e = i.length;
|
|
2352
2377
|
for (; t < e; ) {
|
|
2353
2378
|
const n = i.charCodeAt(t);
|
|
@@ -2363,33 +2388,33 @@ function ir(i) {
|
|
|
2363
2388
|
}
|
|
2364
2389
|
return t === 0 && e === i.length ? i : i.slice(t, e);
|
|
2365
2390
|
}
|
|
2366
|
-
const
|
|
2367
|
-
function
|
|
2368
|
-
return h.isArray(i) ? i.map((e) =>
|
|
2391
|
+
const Er = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), vr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
2392
|
+
function Ee(i, t) {
|
|
2393
|
+
return h.isArray(i) ? i.map((e) => Ee(e, t)) : wr(String(i).replace(t, ""));
|
|
2369
2394
|
}
|
|
2370
|
-
const
|
|
2371
|
-
function
|
|
2395
|
+
const Sr = (i) => Ee(i, Er), Tr = (i) => Ee(i, vr);
|
|
2396
|
+
function An(i) {
|
|
2372
2397
|
const t = /* @__PURE__ */ Object.create(null);
|
|
2373
2398
|
return h.forEach(i.toJSON(), (e, n) => {
|
|
2374
|
-
t[n] =
|
|
2399
|
+
t[n] = Tr(e);
|
|
2375
2400
|
}), t;
|
|
2376
2401
|
}
|
|
2377
|
-
const
|
|
2378
|
-
function
|
|
2402
|
+
const Qe = /* @__PURE__ */ Symbol("internals");
|
|
2403
|
+
function Dt(i) {
|
|
2379
2404
|
return i && String(i).trim().toLowerCase();
|
|
2380
2405
|
}
|
|
2381
|
-
function
|
|
2382
|
-
return i === !1 || i == null ? i : h.isArray(i) ? i.map(
|
|
2406
|
+
function $t(i) {
|
|
2407
|
+
return i === !1 || i == null ? i : h.isArray(i) ? i.map($t) : Sr(String(i));
|
|
2383
2408
|
}
|
|
2384
|
-
function
|
|
2409
|
+
function Ar(i) {
|
|
2385
2410
|
const t = /* @__PURE__ */ Object.create(null), e = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2386
2411
|
let n;
|
|
2387
2412
|
for (; n = e.exec(i); )
|
|
2388
2413
|
t[n[1]] = n[2];
|
|
2389
2414
|
return t;
|
|
2390
2415
|
}
|
|
2391
|
-
const
|
|
2392
|
-
function
|
|
2416
|
+
const Rr = (i) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim());
|
|
2417
|
+
function le(i, t, e, n, r) {
|
|
2393
2418
|
if (h.isFunction(n))
|
|
2394
2419
|
return n.call(this, t, e);
|
|
2395
2420
|
if (r && (t = e), !!h.isString(t)) {
|
|
@@ -2399,10 +2424,10 @@ function re(i, t, e, n, r) {
|
|
|
2399
2424
|
return n.test(t);
|
|
2400
2425
|
}
|
|
2401
2426
|
}
|
|
2402
|
-
function
|
|
2427
|
+
function Cr(i) {
|
|
2403
2428
|
return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, e, n) => e.toUpperCase() + n);
|
|
2404
2429
|
}
|
|
2405
|
-
function
|
|
2430
|
+
function Or(i, t) {
|
|
2406
2431
|
const e = h.toCamelCase(" " + t);
|
|
2407
2432
|
["get", "set", "has"].forEach((n) => {
|
|
2408
2433
|
Object.defineProperty(i, n + e, {
|
|
@@ -2416,30 +2441,30 @@ function hr(i, t) {
|
|
|
2416
2441
|
});
|
|
2417
2442
|
});
|
|
2418
2443
|
}
|
|
2419
|
-
let
|
|
2444
|
+
let M = class {
|
|
2420
2445
|
constructor(t) {
|
|
2421
2446
|
t && this.set(t);
|
|
2422
2447
|
}
|
|
2423
2448
|
set(t, e, n) {
|
|
2424
2449
|
const r = this;
|
|
2425
2450
|
function s(o, c, u) {
|
|
2426
|
-
const l =
|
|
2451
|
+
const l = Dt(c);
|
|
2427
2452
|
if (!l)
|
|
2428
|
-
|
|
2453
|
+
return;
|
|
2429
2454
|
const f = h.findKey(r, l);
|
|
2430
|
-
(!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || c] =
|
|
2455
|
+
(!f || r[f] === void 0 || u === !0 || u === void 0 && r[f] !== !1) && (r[f || c] = $t(o));
|
|
2431
2456
|
}
|
|
2432
2457
|
const a = (o, c) => h.forEach(o, (u, l) => s(u, l, c));
|
|
2433
2458
|
if (h.isPlainObject(t) || t instanceof this.constructor)
|
|
2434
2459
|
a(t, e);
|
|
2435
|
-
else if (h.isString(t) && (t = t.trim()) && !
|
|
2436
|
-
a(
|
|
2437
|
-
else if (h.isObject(t) && h.
|
|
2438
|
-
let o =
|
|
2460
|
+
else if (h.isString(t) && (t = t.trim()) && !Rr(t))
|
|
2461
|
+
a(Pr(t), e);
|
|
2462
|
+
else if (h.isObject(t) && h.isSafeIterable(t)) {
|
|
2463
|
+
let o = /* @__PURE__ */ Object.create(null), c, u;
|
|
2439
2464
|
for (const l of t) {
|
|
2440
2465
|
if (!h.isArray(l))
|
|
2441
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
2442
|
-
|
|
2466
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
2467
|
+
u = l[0], h.hasOwnProp(o, u) ? (c = o[u], o[u] = h.isArray(c) ? [...c, l[1]] : [c, l[1]]) : o[u] = l[1];
|
|
2443
2468
|
}
|
|
2444
2469
|
a(o, e);
|
|
2445
2470
|
} else
|
|
@@ -2447,14 +2472,14 @@ let V = class {
|
|
|
2447
2472
|
return this;
|
|
2448
2473
|
}
|
|
2449
2474
|
get(t, e) {
|
|
2450
|
-
if (t =
|
|
2475
|
+
if (t = Dt(t), t) {
|
|
2451
2476
|
const n = h.findKey(this, t);
|
|
2452
2477
|
if (n) {
|
|
2453
2478
|
const r = this[n];
|
|
2454
2479
|
if (!e)
|
|
2455
2480
|
return r;
|
|
2456
2481
|
if (e === !0)
|
|
2457
|
-
return
|
|
2482
|
+
return Ar(r);
|
|
2458
2483
|
if (h.isFunction(e))
|
|
2459
2484
|
return e.call(this, r, n);
|
|
2460
2485
|
if (h.isRegExp(e))
|
|
@@ -2464,9 +2489,9 @@ let V = class {
|
|
|
2464
2489
|
}
|
|
2465
2490
|
}
|
|
2466
2491
|
has(t, e) {
|
|
2467
|
-
if (t =
|
|
2492
|
+
if (t = Dt(t), t) {
|
|
2468
2493
|
const n = h.findKey(this, t);
|
|
2469
|
-
return !!(n && this[n] !== void 0 && (!e ||
|
|
2494
|
+
return !!(n && this[n] !== void 0 && (!e || le(this, this[n], n, e)));
|
|
2470
2495
|
}
|
|
2471
2496
|
return !1;
|
|
2472
2497
|
}
|
|
@@ -2474,9 +2499,9 @@ let V = class {
|
|
|
2474
2499
|
const n = this;
|
|
2475
2500
|
let r = !1;
|
|
2476
2501
|
function s(a) {
|
|
2477
|
-
if (a =
|
|
2502
|
+
if (a = Dt(a), a) {
|
|
2478
2503
|
const o = h.findKey(n, a);
|
|
2479
|
-
o && (!e ||
|
|
2504
|
+
o && (!e || le(n, n[o], o, e)) && (delete n[o], r = !0);
|
|
2480
2505
|
}
|
|
2481
2506
|
}
|
|
2482
2507
|
return h.isArray(t) ? t.forEach(s) : s(t), r;
|
|
@@ -2486,7 +2511,7 @@ let V = class {
|
|
|
2486
2511
|
let n = e.length, r = !1;
|
|
2487
2512
|
for (; n--; ) {
|
|
2488
2513
|
const s = e[n];
|
|
2489
|
-
(!t ||
|
|
2514
|
+
(!t || le(this, this[s], s, t, !0)) && (delete this[s], r = !0);
|
|
2490
2515
|
}
|
|
2491
2516
|
return r;
|
|
2492
2517
|
}
|
|
@@ -2495,11 +2520,11 @@ let V = class {
|
|
|
2495
2520
|
return h.forEach(this, (r, s) => {
|
|
2496
2521
|
const a = h.findKey(n, s);
|
|
2497
2522
|
if (a) {
|
|
2498
|
-
e[a] =
|
|
2523
|
+
e[a] = $t(r), delete e[s];
|
|
2499
2524
|
return;
|
|
2500
2525
|
}
|
|
2501
|
-
const o = t ?
|
|
2502
|
-
o !== s && delete e[s], e[o] =
|
|
2526
|
+
const o = t ? Cr(s) : String(s).trim();
|
|
2527
|
+
o !== s && delete e[s], e[o] = $t(r), n[o] = !0;
|
|
2503
2528
|
}), this;
|
|
2504
2529
|
}
|
|
2505
2530
|
concat(...t) {
|
|
@@ -2532,17 +2557,17 @@ let V = class {
|
|
|
2532
2557
|
return e.forEach((r) => n.set(r)), n;
|
|
2533
2558
|
}
|
|
2534
2559
|
static accessor(t) {
|
|
2535
|
-
const n = (this[
|
|
2560
|
+
const n = (this[Qe] = this[Qe] = {
|
|
2536
2561
|
accessors: {}
|
|
2537
2562
|
}).accessors, r = this.prototype;
|
|
2538
2563
|
function s(a) {
|
|
2539
|
-
const o =
|
|
2540
|
-
n[o] || (
|
|
2564
|
+
const o = Dt(a);
|
|
2565
|
+
n[o] || (Or(r, a), n[o] = !0);
|
|
2541
2566
|
}
|
|
2542
2567
|
return h.isArray(t) ? t.forEach(s) : s(t), this;
|
|
2543
2568
|
}
|
|
2544
2569
|
};
|
|
2545
|
-
|
|
2570
|
+
M.accessor([
|
|
2546
2571
|
"Content-Type",
|
|
2547
2572
|
"Content-Length",
|
|
2548
2573
|
"Accept",
|
|
@@ -2550,7 +2575,7 @@ V.accessor([
|
|
|
2550
2575
|
"User-Agent",
|
|
2551
2576
|
"Authorization"
|
|
2552
2577
|
]);
|
|
2553
|
-
h.reduceDescriptors(
|
|
2578
|
+
h.reduceDescriptors(M.prototype, ({ value: i }, t) => {
|
|
2554
2579
|
let e = t[0].toUpperCase() + t.slice(1);
|
|
2555
2580
|
return {
|
|
2556
2581
|
get: () => i,
|
|
@@ -2559,9 +2584,9 @@ h.reduceDescriptors(V.prototype, ({ value: i }, t) => {
|
|
|
2559
2584
|
}
|
|
2560
2585
|
};
|
|
2561
2586
|
});
|
|
2562
|
-
h.freezeMethods(
|
|
2563
|
-
const
|
|
2564
|
-
function
|
|
2587
|
+
h.freezeMethods(M);
|
|
2588
|
+
const Dr = "[REDACTED ****]";
|
|
2589
|
+
function Ir(i) {
|
|
2565
2590
|
if (h.hasOwnProp(i, "toJSON"))
|
|
2566
2591
|
return !0;
|
|
2567
2592
|
let t = Object.getPrototypeOf(i);
|
|
@@ -2572,11 +2597,11 @@ function pr(i) {
|
|
|
2572
2597
|
}
|
|
2573
2598
|
return !1;
|
|
2574
2599
|
}
|
|
2575
|
-
function
|
|
2600
|
+
function Nr(i, t) {
|
|
2576
2601
|
const e = new Set(t.map((s) => String(s).toLowerCase())), n = [], r = (s) => {
|
|
2577
2602
|
if (s === null || typeof s != "object" || h.isBuffer(s)) return s;
|
|
2578
2603
|
if (n.indexOf(s) !== -1) return;
|
|
2579
|
-
s instanceof
|
|
2604
|
+
s instanceof M && (s = s.toJSON()), n.push(s);
|
|
2580
2605
|
let a;
|
|
2581
2606
|
if (h.isArray(s))
|
|
2582
2607
|
a = [], s.forEach((o, c) => {
|
|
@@ -2584,11 +2609,11 @@ function dr(i, t) {
|
|
|
2584
2609
|
h.isUndefined(u) || (a[c] = u);
|
|
2585
2610
|
});
|
|
2586
2611
|
else {
|
|
2587
|
-
if (!h.isPlainObject(s) &&
|
|
2612
|
+
if (!h.isPlainObject(s) && Ir(s))
|
|
2588
2613
|
return n.pop(), s;
|
|
2589
2614
|
a = /* @__PURE__ */ Object.create(null);
|
|
2590
2615
|
for (const [o, c] of Object.entries(s)) {
|
|
2591
|
-
const u = e.has(o.toLowerCase()) ?
|
|
2616
|
+
const u = e.has(o.toLowerCase()) ? Dr : r(c);
|
|
2592
2617
|
h.isUndefined(u) || (a[o] = u);
|
|
2593
2618
|
}
|
|
2594
2619
|
}
|
|
@@ -2596,10 +2621,16 @@ function dr(i, t) {
|
|
|
2596
2621
|
};
|
|
2597
2622
|
return r(i);
|
|
2598
2623
|
}
|
|
2599
|
-
let
|
|
2624
|
+
let m = class Rn extends Error {
|
|
2600
2625
|
static from(t, e, n, r, s, a) {
|
|
2601
|
-
const o = new
|
|
2602
|
-
return
|
|
2626
|
+
const o = new Rn(t.message, e || t.code, n, r, s);
|
|
2627
|
+
return Object.defineProperty(o, "cause", {
|
|
2628
|
+
__proto__: null,
|
|
2629
|
+
value: t,
|
|
2630
|
+
writable: !0,
|
|
2631
|
+
enumerable: !1,
|
|
2632
|
+
configurable: !0
|
|
2633
|
+
}), o.name = t.name, t.status != null && o.status == null && (o.status = t.status), a && Object.assign(o, a), o;
|
|
2603
2634
|
}
|
|
2604
2635
|
/**
|
|
2605
2636
|
* Create an Error with the specified message, config, error code, request and response.
|
|
@@ -2624,7 +2655,7 @@ let y = class dn extends Error {
|
|
|
2624
2655
|
}), 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);
|
|
2625
2656
|
}
|
|
2626
2657
|
toJSON() {
|
|
2627
|
-
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ?
|
|
2658
|
+
const t = this.config, e = t && h.hasOwnProp(t, "redact") ? t.redact : void 0, n = h.isArray(e) && e.length > 0 ? Nr(t, e) : h.toJSONObject(t);
|
|
2628
2659
|
return {
|
|
2629
2660
|
// Standard
|
|
2630
2661
|
message: this.message,
|
|
@@ -2644,39 +2675,39 @@ let y = class dn extends Error {
|
|
|
2644
2675
|
};
|
|
2645
2676
|
}
|
|
2646
2677
|
};
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
const
|
|
2662
|
-
function
|
|
2678
|
+
m.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2679
|
+
m.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2680
|
+
m.ECONNABORTED = "ECONNABORTED";
|
|
2681
|
+
m.ETIMEDOUT = "ETIMEDOUT";
|
|
2682
|
+
m.ECONNREFUSED = "ECONNREFUSED";
|
|
2683
|
+
m.ERR_NETWORK = "ERR_NETWORK";
|
|
2684
|
+
m.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2685
|
+
m.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2686
|
+
m.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2687
|
+
m.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2688
|
+
m.ERR_CANCELED = "ERR_CANCELED";
|
|
2689
|
+
m.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2690
|
+
m.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2691
|
+
m.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
2692
|
+
const Br = null, Cn = 100;
|
|
2693
|
+
function me(i) {
|
|
2663
2694
|
return h.isPlainObject(i) || h.isArray(i);
|
|
2664
2695
|
}
|
|
2665
|
-
function
|
|
2696
|
+
function On(i) {
|
|
2666
2697
|
return h.endsWith(i, "[]") ? i.slice(0, -2) : i;
|
|
2667
2698
|
}
|
|
2668
|
-
function
|
|
2699
|
+
function he(i, t, e) {
|
|
2669
2700
|
return i ? i.concat(t).map(function(r, s) {
|
|
2670
|
-
return r =
|
|
2701
|
+
return r = On(r), !e && s ? "[" + r + "]" : r;
|
|
2671
2702
|
}).join(e ? "." : "") : t;
|
|
2672
2703
|
}
|
|
2673
|
-
function
|
|
2674
|
-
return h.isArray(i) && !i.some(
|
|
2704
|
+
function xr(i) {
|
|
2705
|
+
return h.isArray(i) && !i.some(me);
|
|
2675
2706
|
}
|
|
2676
|
-
const
|
|
2707
|
+
const Ur = h.toFlatObject(h, {}, null, function(t) {
|
|
2677
2708
|
return /^is[A-Z]/.test(t);
|
|
2678
2709
|
});
|
|
2679
|
-
function
|
|
2710
|
+
function ie(i, t, e) {
|
|
2680
2711
|
if (!h.isObject(i))
|
|
2681
2712
|
throw new TypeError("target must be an object");
|
|
2682
2713
|
t = t || new FormData(), e = h.toFlatObject(
|
|
@@ -2687,65 +2718,86 @@ function Qt(i, t, e) {
|
|
|
2687
2718
|
indexes: !1
|
|
2688
2719
|
},
|
|
2689
2720
|
!1,
|
|
2690
|
-
function(
|
|
2691
|
-
return !h.isUndefined(b
|
|
2721
|
+
function(b, v) {
|
|
2722
|
+
return !h.isUndefined(v[b]);
|
|
2692
2723
|
}
|
|
2693
2724
|
);
|
|
2694
|
-
const n = e.metaTokens, r = e.visitor ||
|
|
2725
|
+
const n = e.metaTokens, r = e.visitor || w, s = e.dots, a = e.indexes, o = e.Blob || typeof Blob < "u" && Blob, c = e.maxDepth === void 0 ? Cn : e.maxDepth, u = o && h.isSpecCompliantForm(t), l = [];
|
|
2695
2726
|
if (!h.isFunction(r))
|
|
2696
2727
|
throw new TypeError("visitor must be a function");
|
|
2697
|
-
function
|
|
2698
|
-
if (
|
|
2699
|
-
if (h.isDate(
|
|
2700
|
-
return
|
|
2701
|
-
if (h.isBoolean(
|
|
2702
|
-
return
|
|
2703
|
-
if (!u && h.isBlob(
|
|
2704
|
-
throw new
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2728
|
+
function f(_) {
|
|
2729
|
+
if (_ === null) return "";
|
|
2730
|
+
if (h.isDate(_))
|
|
2731
|
+
return _.toISOString();
|
|
2732
|
+
if (h.isBoolean(_))
|
|
2733
|
+
return _.toString();
|
|
2734
|
+
if (!u && h.isBlob(_))
|
|
2735
|
+
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
2736
|
+
if (h.isArrayBuffer(_) || h.isTypedArray(_)) {
|
|
2737
|
+
if (u && typeof o == "function")
|
|
2738
|
+
return new o([_]);
|
|
2739
|
+
if (typeof Buffer < "u")
|
|
2740
|
+
return Buffer.from(_);
|
|
2741
|
+
throw new m("Blob is not supported. Use a Buffer instead.", m.ERR_NOT_SUPPORT);
|
|
2742
|
+
}
|
|
2743
|
+
return _;
|
|
2744
|
+
}
|
|
2745
|
+
function d(_) {
|
|
2746
|
+
if (_ > c)
|
|
2747
|
+
throw new m(
|
|
2748
|
+
"Object is too deeply nested (" + _ + " levels). Max depth: " + c,
|
|
2749
|
+
m.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
2750
|
+
);
|
|
2751
|
+
}
|
|
2752
|
+
function g(_, b) {
|
|
2753
|
+
if (c === 1 / 0)
|
|
2754
|
+
return JSON.stringify(_);
|
|
2755
|
+
const v = [];
|
|
2756
|
+
return JSON.stringify(_, function(B, P) {
|
|
2757
|
+
if (!h.isObject(P))
|
|
2758
|
+
return P;
|
|
2759
|
+
for (; v.length && v[v.length - 1] !== this; )
|
|
2760
|
+
v.pop();
|
|
2761
|
+
return v.push(P), d(b + v.length - 1), P;
|
|
2762
|
+
});
|
|
2763
|
+
}
|
|
2764
|
+
function w(_, b, v) {
|
|
2765
|
+
let R = _;
|
|
2766
|
+
if (h.isReactNative(t) && h.isReactNativeBlob(_))
|
|
2767
|
+
return t.append(he(v, b, s), f(_)), !1;
|
|
2768
|
+
if (_ && !v && typeof _ == "object") {
|
|
2769
|
+
if (h.endsWith(b, "{}"))
|
|
2770
|
+
b = n ? b : b.slice(0, -2), _ = g(_, 1);
|
|
2771
|
+
else if (h.isArray(_) && xr(_) || (h.isFileList(_) || h.endsWith(b, "[]")) && (R = h.toArray(_)))
|
|
2772
|
+
return b = On(b), R.forEach(function(P, k) {
|
|
2773
|
+
!(h.isUndefined(P) || P === null) && t.append(
|
|
2717
2774
|
// eslint-disable-next-line no-nested-ternary
|
|
2718
|
-
a === !0 ?
|
|
2719
|
-
|
|
2775
|
+
a === !0 ? he([b], k, s) : a === null ? b : b + "[]",
|
|
2776
|
+
f(P)
|
|
2720
2777
|
);
|
|
2721
2778
|
}), !1;
|
|
2722
2779
|
}
|
|
2723
|
-
return
|
|
2780
|
+
return me(_) ? !0 : (t.append(he(v, b, s), f(_)), !1);
|
|
2724
2781
|
}
|
|
2725
|
-
const
|
|
2726
|
-
defaultVisitor:
|
|
2727
|
-
convertValue:
|
|
2728
|
-
isVisitable:
|
|
2782
|
+
const E = Object.assign(Ur, {
|
|
2783
|
+
defaultVisitor: w,
|
|
2784
|
+
convertValue: f,
|
|
2785
|
+
isVisitable: me
|
|
2729
2786
|
});
|
|
2730
|
-
function
|
|
2731
|
-
if (!h.isUndefined(
|
|
2732
|
-
if (
|
|
2733
|
-
throw new
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
if (d.indexOf(m) !== -1)
|
|
2738
|
-
throw Error("Circular reference detected in " + _.join("."));
|
|
2739
|
-
d.push(m), h.forEach(m, function(T, A) {
|
|
2740
|
-
(!(h.isUndefined(T) || T === null) && r.call(t, T, h.isString(A) ? A.trim() : A, _, g)) === !0 && P(T, _ ? _.concat(A) : [A], b + 1);
|
|
2741
|
-
}), d.pop();
|
|
2787
|
+
function y(_, b, v = 0) {
|
|
2788
|
+
if (!h.isUndefined(_)) {
|
|
2789
|
+
if (d(v), l.indexOf(_) !== -1)
|
|
2790
|
+
throw new Error("Circular reference detected in " + b.join("."));
|
|
2791
|
+
l.push(_), h.forEach(_, function(B, P) {
|
|
2792
|
+
(!(h.isUndefined(B) || B === null) && r.call(t, B, h.isString(P) ? P.trim() : P, b, E)) === !0 && y(B, b ? b.concat(P) : [P], v + 1);
|
|
2793
|
+
}), l.pop();
|
|
2742
2794
|
}
|
|
2743
2795
|
}
|
|
2744
2796
|
if (!h.isObject(i))
|
|
2745
2797
|
throw new TypeError("data must be an object");
|
|
2746
|
-
return
|
|
2798
|
+
return y(i), t;
|
|
2747
2799
|
}
|
|
2748
|
-
function
|
|
2800
|
+
function Ze(i) {
|
|
2749
2801
|
const t = {
|
|
2750
2802
|
"!": "%21",
|
|
2751
2803
|
"'": "%27",
|
|
@@ -2758,38 +2810,37 @@ function Ke(i) {
|
|
|
2758
2810
|
return t[n];
|
|
2759
2811
|
});
|
|
2760
2812
|
}
|
|
2761
|
-
function
|
|
2762
|
-
this._pairs = [], i &&
|
|
2813
|
+
function ve(i, t) {
|
|
2814
|
+
this._pairs = [], i && ie(i, this, t);
|
|
2763
2815
|
}
|
|
2764
|
-
const
|
|
2765
|
-
|
|
2816
|
+
const Dn = ve.prototype;
|
|
2817
|
+
Dn.append = function(t, e) {
|
|
2766
2818
|
this._pairs.push([t, e]);
|
|
2767
2819
|
};
|
|
2768
|
-
|
|
2769
|
-
const e = t ?
|
|
2770
|
-
return t.call(this, n, Ke);
|
|
2771
|
-
} : Ke;
|
|
2820
|
+
Dn.toString = function(t) {
|
|
2821
|
+
const e = t ? (n) => t.call(this, n, Ze) : Ze;
|
|
2772
2822
|
return this._pairs.map(function(r) {
|
|
2773
2823
|
return e(r[0]) + "=" + e(r[1]);
|
|
2774
2824
|
}, "").join("&");
|
|
2775
2825
|
};
|
|
2776
|
-
function
|
|
2826
|
+
function Lr(i) {
|
|
2777
2827
|
return encodeURIComponent(i).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
2778
2828
|
}
|
|
2779
|
-
function
|
|
2829
|
+
function In(i, t, e) {
|
|
2780
2830
|
if (!t)
|
|
2781
2831
|
return i;
|
|
2782
|
-
|
|
2832
|
+
i = i || "";
|
|
2833
|
+
const n = h.isFunction(e) ? {
|
|
2783
2834
|
serialize: e
|
|
2784
|
-
} : e,
|
|
2835
|
+
} : e, r = h.getSafeProp(n, "encode") || Lr, s = h.getSafeProp(n, "serialize");
|
|
2785
2836
|
let a;
|
|
2786
|
-
if (s ? a = s(t,
|
|
2837
|
+
if (s ? a = s(t, n) : a = h.isURLSearchParams(t) ? t.toString() : new ve(t, n).toString(r), a) {
|
|
2787
2838
|
const o = i.indexOf("#");
|
|
2788
2839
|
o !== -1 && (i = i.slice(0, o)), i += (i.indexOf("?") === -1 ? "?" : "&") + a;
|
|
2789
2840
|
}
|
|
2790
2841
|
return i;
|
|
2791
2842
|
}
|
|
2792
|
-
class
|
|
2843
|
+
class Ye {
|
|
2793
2844
|
constructor() {
|
|
2794
2845
|
this.handlers = [];
|
|
2795
2846
|
}
|
|
@@ -2844,43 +2895,57 @@ class He {
|
|
|
2844
2895
|
});
|
|
2845
2896
|
}
|
|
2846
2897
|
}
|
|
2847
|
-
const
|
|
2898
|
+
const Se = {
|
|
2848
2899
|
silentJSONParsing: !0,
|
|
2849
2900
|
forcedJSONParsing: !0,
|
|
2850
2901
|
clarifyTimeoutError: !1,
|
|
2851
|
-
legacyInterceptorReqResOrdering: !0
|
|
2852
|
-
|
|
2902
|
+
legacyInterceptorReqResOrdering: !0,
|
|
2903
|
+
advertiseZstdAcceptEncoding: !1,
|
|
2904
|
+
validateStatusUndefinedResolves: !0
|
|
2905
|
+
}, Vr = typeof URLSearchParams < "u" ? URLSearchParams : ve, Mr = typeof FormData < "u" ? FormData : null, Fr = typeof Blob < "u" ? Blob : null, kr = {
|
|
2853
2906
|
isBrowser: !0,
|
|
2854
2907
|
classes: {
|
|
2855
|
-
URLSearchParams:
|
|
2856
|
-
FormData:
|
|
2857
|
-
Blob:
|
|
2908
|
+
URLSearchParams: Vr,
|
|
2909
|
+
FormData: Mr,
|
|
2910
|
+
Blob: Fr
|
|
2858
2911
|
},
|
|
2859
2912
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2860
|
-
},
|
|
2861
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
2913
|
+
}, Te = typeof window < "u" && typeof document < "u", ye = typeof navigator == "object" && navigator || void 0, jr = Te && (!ye || ["ReactNative", "NativeScript", "NS"].indexOf(ye.product) < 0), qr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2914
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Hr = Te && window.location.href || "http://localhost", Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2862
2915
|
__proto__: null,
|
|
2863
|
-
hasBrowserEnv:
|
|
2864
|
-
hasStandardBrowserEnv:
|
|
2865
|
-
hasStandardBrowserWebWorkerEnv:
|
|
2866
|
-
navigator:
|
|
2867
|
-
origin:
|
|
2868
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2869
|
-
...
|
|
2870
|
-
...
|
|
2916
|
+
hasBrowserEnv: Te,
|
|
2917
|
+
hasStandardBrowserEnv: jr,
|
|
2918
|
+
hasStandardBrowserWebWorkerEnv: qr,
|
|
2919
|
+
navigator: ye,
|
|
2920
|
+
origin: Hr
|
|
2921
|
+
}, Symbol.toStringTag, { value: "Module" })), L = {
|
|
2922
|
+
...Kr,
|
|
2923
|
+
...kr
|
|
2871
2924
|
};
|
|
2872
|
-
function
|
|
2873
|
-
return
|
|
2925
|
+
function Wr(i, t) {
|
|
2926
|
+
return ie(i, new L.classes.URLSearchParams(), {
|
|
2874
2927
|
visitor: function(e, n, r, s) {
|
|
2875
|
-
return
|
|
2928
|
+
return L.isNode && h.isBuffer(e) ? (this.append(n, e.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
2876
2929
|
},
|
|
2877
2930
|
...t
|
|
2878
2931
|
});
|
|
2879
2932
|
}
|
|
2880
|
-
|
|
2881
|
-
|
|
2933
|
+
const tn = Cn;
|
|
2934
|
+
function Nn(i) {
|
|
2935
|
+
if (i > tn)
|
|
2936
|
+
throw new m(
|
|
2937
|
+
"FormData field is too deeply nested (" + i + " levels). Max depth: " + tn,
|
|
2938
|
+
m.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
2939
|
+
);
|
|
2882
2940
|
}
|
|
2883
|
-
function
|
|
2941
|
+
function Xr(i) {
|
|
2942
|
+
const t = [], e = /\w+|\[(\w*)]/g;
|
|
2943
|
+
let n;
|
|
2944
|
+
for (; (n = e.exec(i)) !== null; )
|
|
2945
|
+
Nn(t.length), t.push(n[0] === "[]" ? "" : n[1] || n[0]);
|
|
2946
|
+
return t;
|
|
2947
|
+
}
|
|
2948
|
+
function zr(i) {
|
|
2884
2949
|
const t = {}, e = Object.keys(i);
|
|
2885
2950
|
let n;
|
|
2886
2951
|
const r = e.length;
|
|
@@ -2889,23 +2954,24 @@ function Or(i) {
|
|
|
2889
2954
|
s = e[n], t[s] = i[s];
|
|
2890
2955
|
return t;
|
|
2891
2956
|
}
|
|
2892
|
-
function
|
|
2957
|
+
function Bn(i) {
|
|
2893
2958
|
function t(e, n, r, s) {
|
|
2959
|
+
Nn(s);
|
|
2894
2960
|
let a = e[s++];
|
|
2895
2961
|
if (a === "__proto__") return !0;
|
|
2896
2962
|
const o = Number.isFinite(+a), c = s >= e.length;
|
|
2897
|
-
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] =
|
|
2963
|
+
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] = zr(r[a])), !o);
|
|
2898
2964
|
}
|
|
2899
2965
|
if (h.isFormData(i) && h.isFunction(i.entries)) {
|
|
2900
2966
|
const e = {};
|
|
2901
2967
|
return h.forEachEntry(i, (n, r) => {
|
|
2902
|
-
t(
|
|
2968
|
+
t(Xr(n), r, e, 0);
|
|
2903
2969
|
}), e;
|
|
2904
2970
|
}
|
|
2905
2971
|
return null;
|
|
2906
2972
|
}
|
|
2907
|
-
const
|
|
2908
|
-
function
|
|
2973
|
+
const bt = (i, t) => i != null && h.hasOwnProp(i, t) ? i[t] : void 0;
|
|
2974
|
+
function Gr(i, t, e) {
|
|
2909
2975
|
if (h.isString(i))
|
|
2910
2976
|
try {
|
|
2911
2977
|
return (t || JSON.parse)(i), h.trim(i);
|
|
@@ -2915,14 +2981,14 @@ function Dr(i, t, e) {
|
|
|
2915
2981
|
}
|
|
2916
2982
|
return (e || JSON.stringify)(i);
|
|
2917
2983
|
}
|
|
2918
|
-
const
|
|
2919
|
-
transitional:
|
|
2984
|
+
const Lt = {
|
|
2985
|
+
transitional: Se,
|
|
2920
2986
|
adapter: ["xhr", "http", "fetch"],
|
|
2921
2987
|
transformRequest: [
|
|
2922
2988
|
function(t, e) {
|
|
2923
2989
|
const n = e.getContentType() || "", r = n.indexOf("application/json") > -1, s = h.isObject(t);
|
|
2924
2990
|
if (s && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
|
|
2925
|
-
return r ? JSON.stringify(
|
|
2991
|
+
return r ? JSON.stringify(Bn(t)) : t;
|
|
2926
2992
|
if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
|
|
2927
2993
|
return t;
|
|
2928
2994
|
if (h.isArrayBufferView(t))
|
|
@@ -2931,33 +2997,33 @@ const Ot = {
|
|
|
2931
2997
|
return e.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
2932
2998
|
let o;
|
|
2933
2999
|
if (s) {
|
|
2934
|
-
const c =
|
|
3000
|
+
const c = bt(this, "formSerializer");
|
|
2935
3001
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
2936
|
-
return
|
|
3002
|
+
return Wr(t, c).toString();
|
|
2937
3003
|
if ((o = h.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
2938
|
-
const u =
|
|
2939
|
-
return
|
|
3004
|
+
const u = bt(this, "env"), l = u && u.FormData;
|
|
3005
|
+
return ie(
|
|
2940
3006
|
o ? { "files[]": t } : t,
|
|
2941
3007
|
l && new l(),
|
|
2942
3008
|
c
|
|
2943
3009
|
);
|
|
2944
3010
|
}
|
|
2945
3011
|
}
|
|
2946
|
-
return s || r ? (e.setContentType("application/json", !1),
|
|
3012
|
+
return s || r ? (e.setContentType("application/json", !1), Gr(t)) : t;
|
|
2947
3013
|
}
|
|
2948
3014
|
],
|
|
2949
3015
|
transformResponse: [
|
|
2950
3016
|
function(t) {
|
|
2951
|
-
const e =
|
|
3017
|
+
const e = bt(this, "transitional") || Lt.transitional, n = e && e.forcedJSONParsing, r = bt(this, "responseType"), s = r === "json";
|
|
2952
3018
|
if (h.isResponse(t) || h.isReadableStream(t))
|
|
2953
3019
|
return t;
|
|
2954
3020
|
if (t && h.isString(t) && (n && !r || s)) {
|
|
2955
3021
|
const o = !(e && e.silentJSONParsing) && s;
|
|
2956
3022
|
try {
|
|
2957
|
-
return JSON.parse(t,
|
|
3023
|
+
return JSON.parse(t, bt(this, "parseReviver"));
|
|
2958
3024
|
} catch (c) {
|
|
2959
3025
|
if (o)
|
|
2960
|
-
throw c.name === "SyntaxError" ?
|
|
3026
|
+
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, bt(this, "response")) : c;
|
|
2961
3027
|
}
|
|
2962
3028
|
}
|
|
2963
3029
|
return t;
|
|
@@ -2973,8 +3039,8 @@ const Ot = {
|
|
|
2973
3039
|
maxContentLength: -1,
|
|
2974
3040
|
maxBodyLength: -1,
|
|
2975
3041
|
env: {
|
|
2976
|
-
FormData:
|
|
2977
|
-
Blob:
|
|
3042
|
+
FormData: L.classes.FormData,
|
|
3043
|
+
Blob: L.classes.Blob
|
|
2978
3044
|
},
|
|
2979
3045
|
validateStatus: function(t) {
|
|
2980
3046
|
return t >= 200 && t < 300;
|
|
@@ -2987,19 +3053,19 @@ const Ot = {
|
|
|
2987
3053
|
}
|
|
2988
3054
|
};
|
|
2989
3055
|
h.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (i) => {
|
|
2990
|
-
|
|
3056
|
+
Lt.headers[i] = {};
|
|
2991
3057
|
});
|
|
2992
|
-
function
|
|
2993
|
-
const e = this ||
|
|
3058
|
+
function fe(i, t) {
|
|
3059
|
+
const e = this || Lt, n = t || e, r = M.from(n.headers);
|
|
2994
3060
|
let s = n.data;
|
|
2995
3061
|
return h.forEach(i, function(o) {
|
|
2996
3062
|
s = o.call(e, s, r.normalize(), t ? t.status : void 0);
|
|
2997
3063
|
}), r.normalize(), s;
|
|
2998
3064
|
}
|
|
2999
|
-
function
|
|
3065
|
+
function xn(i) {
|
|
3000
3066
|
return !!(i && i.__CANCEL__);
|
|
3001
3067
|
}
|
|
3002
|
-
let
|
|
3068
|
+
let Vt = class extends m {
|
|
3003
3069
|
/**
|
|
3004
3070
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
3005
3071
|
*
|
|
@@ -3010,24 +3076,24 @@ let Dt = class extends y {
|
|
|
3010
3076
|
* @returns {CanceledError} The created error.
|
|
3011
3077
|
*/
|
|
3012
3078
|
constructor(t, e, n) {
|
|
3013
|
-
super(t ?? "canceled",
|
|
3079
|
+
super(t ?? "canceled", m.ERR_CANCELED, e, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
3014
3080
|
}
|
|
3015
3081
|
};
|
|
3016
|
-
function
|
|
3082
|
+
function Un(i, t, e) {
|
|
3017
3083
|
const n = e.config.validateStatus;
|
|
3018
|
-
!e.status || !n || n(e.status) ? i(e) : t(new
|
|
3084
|
+
!e.status || !n || n(e.status) ? i(e) : t(new m(
|
|
3019
3085
|
"Request failed with status code " + e.status,
|
|
3020
|
-
e.status >= 400 && e.status < 500 ?
|
|
3086
|
+
e.status >= 400 && e.status < 500 ? m.ERR_BAD_REQUEST : m.ERR_BAD_RESPONSE,
|
|
3021
3087
|
e.config,
|
|
3022
3088
|
e.request,
|
|
3023
3089
|
e
|
|
3024
3090
|
));
|
|
3025
3091
|
}
|
|
3026
|
-
function
|
|
3092
|
+
function $r(i) {
|
|
3027
3093
|
const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(i);
|
|
3028
3094
|
return t && t[1] || "";
|
|
3029
3095
|
}
|
|
3030
|
-
function
|
|
3096
|
+
function Jr(i, t) {
|
|
3031
3097
|
i = i || 10;
|
|
3032
3098
|
const e = new Array(i), n = new Array(i);
|
|
3033
3099
|
let r = 0, s = 0, a;
|
|
@@ -3043,7 +3109,7 @@ function Nr(i, t) {
|
|
|
3043
3109
|
return g ? Math.round(d * 1e3 / g) : void 0;
|
|
3044
3110
|
};
|
|
3045
3111
|
}
|
|
3046
|
-
function
|
|
3112
|
+
function Qr(i, t) {
|
|
3047
3113
|
let e = 0, n = 1e3 / t, r, s;
|
|
3048
3114
|
const a = (u, l = Date.now()) => {
|
|
3049
3115
|
e = l, r = null, s && (clearTimeout(s), s = null), i(...u);
|
|
@@ -3055,10 +3121,10 @@ function Br(i, t) {
|
|
|
3055
3121
|
}, n - f)));
|
|
3056
3122
|
}, () => r && a(r)];
|
|
3057
3123
|
}
|
|
3058
|
-
const
|
|
3124
|
+
const Yt = (i, t, e = 3) => {
|
|
3059
3125
|
let n = 0;
|
|
3060
|
-
const r =
|
|
3061
|
-
return
|
|
3126
|
+
const r = Jr(50, 250);
|
|
3127
|
+
return Qr((s) => {
|
|
3062
3128
|
if (!s || typeof s.loaded != "number")
|
|
3063
3129
|
return;
|
|
3064
3130
|
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);
|
|
@@ -3076,7 +3142,7 @@ const Wt = (i, t, e = 3) => {
|
|
|
3076
3142
|
};
|
|
3077
3143
|
i(f);
|
|
3078
3144
|
}, e);
|
|
3079
|
-
},
|
|
3145
|
+
}, en = (i, t) => {
|
|
3080
3146
|
const e = i != null;
|
|
3081
3147
|
return [
|
|
3082
3148
|
(n) => t[0]({
|
|
@@ -3086,10 +3152,10 @@ const Wt = (i, t, e = 3) => {
|
|
|
3086
3152
|
}),
|
|
3087
3153
|
t[1]
|
|
3088
3154
|
];
|
|
3089
|
-
},
|
|
3090
|
-
new URL(
|
|
3091
|
-
|
|
3092
|
-
) : () => !0,
|
|
3155
|
+
}, nn = (i) => (...t) => h.asap(() => i(...t)), Zr = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((i, t) => (e) => (e = new URL(e, L.origin), i.protocol === e.protocol && i.host === e.host && (t || i.port === e.port)))(
|
|
3156
|
+
new URL(L.origin),
|
|
3157
|
+
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
3158
|
+
) : () => !0, Yr = L.hasStandardBrowserEnv ? (
|
|
3093
3159
|
// Standard browser envs support document.cookie
|
|
3094
3160
|
{
|
|
3095
3161
|
write(i, t, e, n, r, s, a) {
|
|
@@ -3103,7 +3169,11 @@ const Wt = (i, t, e = 3) => {
|
|
|
3103
3169
|
for (let e = 0; e < t.length; e++) {
|
|
3104
3170
|
const n = t[e].replace(/^\s+/, ""), r = n.indexOf("=");
|
|
3105
3171
|
if (r !== -1 && n.slice(0, r) === i)
|
|
3106
|
-
|
|
3172
|
+
try {
|
|
3173
|
+
return decodeURIComponent(n.slice(r + 1));
|
|
3174
|
+
} catch {
|
|
3175
|
+
return n.slice(r + 1);
|
|
3176
|
+
}
|
|
3107
3177
|
}
|
|
3108
3178
|
return null;
|
|
3109
3179
|
},
|
|
@@ -3123,19 +3193,38 @@ const Wt = (i, t, e = 3) => {
|
|
|
3123
3193
|
}
|
|
3124
3194
|
}
|
|
3125
3195
|
);
|
|
3126
|
-
function
|
|
3196
|
+
function ts(i) {
|
|
3127
3197
|
return typeof i != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(i);
|
|
3128
3198
|
}
|
|
3129
|
-
function
|
|
3199
|
+
function es(i, t) {
|
|
3130
3200
|
return t ? i.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : i;
|
|
3131
3201
|
}
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3202
|
+
const ns = /^https?:(?!\/\/)/i, is = /[\t\n\r]/g;
|
|
3203
|
+
function rs(i) {
|
|
3204
|
+
let t = 0;
|
|
3205
|
+
for (; t < i.length && i.charCodeAt(t) <= 32; )
|
|
3206
|
+
t++;
|
|
3207
|
+
return i.slice(t);
|
|
3208
|
+
}
|
|
3209
|
+
function ss(i) {
|
|
3210
|
+
return rs(i).replace(is, "");
|
|
3135
3211
|
}
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3212
|
+
function rn(i, t) {
|
|
3213
|
+
if (typeof i == "string" && ns.test(ss(i)))
|
|
3214
|
+
throw new m(
|
|
3215
|
+
'Invalid URL: missing "//" after protocol',
|
|
3216
|
+
m.ERR_INVALID_URL,
|
|
3217
|
+
t
|
|
3218
|
+
);
|
|
3219
|
+
}
|
|
3220
|
+
function Ln(i, t, e, n) {
|
|
3221
|
+
rn(t, n);
|
|
3222
|
+
let r = !ts(t);
|
|
3223
|
+
return i && (r || e === !1) ? (rn(i, n), es(i, t)) : t;
|
|
3224
|
+
}
|
|
3225
|
+
const sn = (i) => i instanceof M ? { ...i } : i;
|
|
3226
|
+
function dt(i, t) {
|
|
3227
|
+
i = i || {}, t = t || {};
|
|
3139
3228
|
const e = /* @__PURE__ */ Object.create(null);
|
|
3140
3229
|
Object.defineProperty(e, "hasOwnProperty", {
|
|
3141
3230
|
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
@@ -3146,32 +3235,44 @@ function lt(i, t) {
|
|
|
3146
3235
|
writable: !0,
|
|
3147
3236
|
configurable: !0
|
|
3148
3237
|
});
|
|
3149
|
-
function n(
|
|
3150
|
-
return h.isPlainObject(
|
|
3151
|
-
}
|
|
3152
|
-
function r(
|
|
3153
|
-
if (h.isUndefined(
|
|
3154
|
-
if (!h.isUndefined(
|
|
3155
|
-
return n(void 0,
|
|
3156
|
-
} else return n(
|
|
3157
|
-
}
|
|
3158
|
-
function s(
|
|
3159
|
-
if (!h.isUndefined(
|
|
3238
|
+
function n(l, f, d, g) {
|
|
3239
|
+
return h.isPlainObject(l) && h.isPlainObject(f) ? h.merge.call({ caseless: g }, l, f) : h.isPlainObject(f) ? h.merge({}, f) : h.isArray(f) ? f.slice() : f;
|
|
3240
|
+
}
|
|
3241
|
+
function r(l, f, d, g) {
|
|
3242
|
+
if (h.isUndefined(f)) {
|
|
3243
|
+
if (!h.isUndefined(l))
|
|
3244
|
+
return n(void 0, l, d, g);
|
|
3245
|
+
} else return n(l, f, d, g);
|
|
3246
|
+
}
|
|
3247
|
+
function s(l, f) {
|
|
3248
|
+
if (!h.isUndefined(f))
|
|
3249
|
+
return n(void 0, f);
|
|
3250
|
+
}
|
|
3251
|
+
function a(l, f) {
|
|
3252
|
+
if (h.isUndefined(f)) {
|
|
3253
|
+
if (!h.isUndefined(l))
|
|
3254
|
+
return n(void 0, l);
|
|
3255
|
+
} else return n(void 0, f);
|
|
3256
|
+
}
|
|
3257
|
+
function o(l) {
|
|
3258
|
+
const f = h.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
3259
|
+
if (!h.isUndefined(f))
|
|
3260
|
+
if (h.isPlainObject(f)) {
|
|
3261
|
+
if (h.hasOwnProp(f, l))
|
|
3262
|
+
return f[l];
|
|
3263
|
+
} else
|
|
3264
|
+
return;
|
|
3265
|
+
const d = h.hasOwnProp(i, "transitional") ? i.transitional : void 0;
|
|
3266
|
+
if (h.isPlainObject(d) && h.hasOwnProp(d, l))
|
|
3267
|
+
return d[l];
|
|
3268
|
+
}
|
|
3269
|
+
function c(l, f, d) {
|
|
3270
|
+
if (h.hasOwnProp(t, d))
|
|
3271
|
+
return n(l, f);
|
|
3272
|
+
if (h.hasOwnProp(i, d))
|
|
3160
3273
|
return n(void 0, l);
|
|
3161
3274
|
}
|
|
3162
|
-
|
|
3163
|
-
if (h.isUndefined(l)) {
|
|
3164
|
-
if (!h.isUndefined(u))
|
|
3165
|
-
return n(void 0, u);
|
|
3166
|
-
} else return n(void 0, l);
|
|
3167
|
-
}
|
|
3168
|
-
function o(u, l, f) {
|
|
3169
|
-
if (h.hasOwnProp(t, f))
|
|
3170
|
-
return n(u, l);
|
|
3171
|
-
if (h.hasOwnProp(i, f))
|
|
3172
|
-
return n(void 0, u);
|
|
3173
|
-
}
|
|
3174
|
-
const c = {
|
|
3275
|
+
const u = {
|
|
3175
3276
|
url: s,
|
|
3176
3277
|
method: s,
|
|
3177
3278
|
data: s,
|
|
@@ -3200,117 +3301,127 @@ function lt(i, t) {
|
|
|
3200
3301
|
socketPath: a,
|
|
3201
3302
|
allowedSocketPaths: a,
|
|
3202
3303
|
responseEncoding: a,
|
|
3203
|
-
validateStatus:
|
|
3204
|
-
headers: (
|
|
3304
|
+
validateStatus: c,
|
|
3305
|
+
headers: (l, f, d) => r(sn(l), sn(f), d, !0)
|
|
3205
3306
|
};
|
|
3206
|
-
return h.forEach(Object.keys({ ...i, ...t }), function(
|
|
3207
|
-
if (
|
|
3208
|
-
const
|
|
3209
|
-
h.isUndefined(
|
|
3210
|
-
}), e;
|
|
3307
|
+
return h.forEach(Object.keys({ ...i, ...t }), function(f) {
|
|
3308
|
+
if (f === "__proto__" || f === "constructor" || f === "prototype") return;
|
|
3309
|
+
const d = h.hasOwnProp(u, f) ? u[f] : r, g = h.hasOwnProp(i, f) ? i[f] : void 0, w = h.hasOwnProp(t, f) ? t[f] : void 0, E = d(g, w, f);
|
|
3310
|
+
h.isUndefined(E) && d !== c || (e[f] = E);
|
|
3311
|
+
}), h.hasOwnProp(t, "validateStatus") && h.isUndefined(t.validateStatus) && o("validateStatusUndefinedResolves") === !1 && (h.hasOwnProp(i, "validateStatus") ? e.validateStatus = n(void 0, i.validateStatus) : delete e.validateStatus), e;
|
|
3211
3312
|
}
|
|
3212
|
-
const
|
|
3213
|
-
function
|
|
3313
|
+
const as = ["content-type", "content-length"];
|
|
3314
|
+
function os(i, t, e) {
|
|
3214
3315
|
if (e !== "content-only") {
|
|
3215
3316
|
i.set(t);
|
|
3216
3317
|
return;
|
|
3217
3318
|
}
|
|
3218
|
-
Object.entries(t).forEach(([n, r]) => {
|
|
3219
|
-
|
|
3319
|
+
Object.entries(t || {}).forEach(([n, r]) => {
|
|
3320
|
+
as.includes(n.toLowerCase()) && i.set(n, r);
|
|
3220
3321
|
});
|
|
3221
3322
|
}
|
|
3222
|
-
const
|
|
3323
|
+
const cs = (i) => encodeURIComponent(i).replace(
|
|
3223
3324
|
/%([0-9A-F]{2})/gi,
|
|
3224
3325
|
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3225
|
-
)
|
|
3226
|
-
|
|
3326
|
+
);
|
|
3327
|
+
function Vn(i) {
|
|
3328
|
+
const t = dt({}, i), e = (d) => h.hasOwnProp(t, d) ? t[d] : void 0, n = e("data");
|
|
3227
3329
|
let r = e("withXSRFToken");
|
|
3228
3330
|
const s = e("xsrfHeaderName"), a = e("xsrfCookieName");
|
|
3229
3331
|
let o = e("headers");
|
|
3230
3332
|
const c = e("auth"), u = e("baseURL"), l = e("allowAbsoluteUrls"), f = e("url");
|
|
3231
|
-
if (t.headers = o =
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
), c
|
|
3236
|
-
"
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3333
|
+
if (t.headers = o = M.from(o), t.url = In(
|
|
3334
|
+
Ln(u, f, l, t),
|
|
3335
|
+
e("params"),
|
|
3336
|
+
e("paramsSerializer")
|
|
3337
|
+
), c) {
|
|
3338
|
+
const d = h.getSafeProp(c, "username") || "", g = h.getSafeProp(c, "password") || "";
|
|
3339
|
+
try {
|
|
3340
|
+
o.set(
|
|
3341
|
+
"Authorization",
|
|
3342
|
+
"Basic " + btoa(d + ":" + (g ? cs(g) : ""))
|
|
3343
|
+
);
|
|
3344
|
+
} catch (w) {
|
|
3345
|
+
throw m.from(w, m.ERR_BAD_OPTION_VALUE, i);
|
|
3346
|
+
}
|
|
3347
|
+
}
|
|
3348
|
+
if (h.isFormData(n) && (L.hasStandardBrowserEnv || L.hasStandardBrowserWebWorkerEnv || h.isReactNative(n) ? o.setContentType(void 0) : h.isFunction(n.getHeaders) && os(o, n.getHeaders(), e("formDataHeaderPolicy"))), L.hasStandardBrowserEnv && (h.isFunction(r) && (r = r(t)), r === !0 || r == null && Zr(t.url))) {
|
|
3349
|
+
const g = s && a && Yr.read(a);
|
|
3240
3350
|
g && o.set(s, g);
|
|
3241
3351
|
}
|
|
3242
3352
|
return t;
|
|
3243
|
-
}
|
|
3353
|
+
}
|
|
3354
|
+
const us = typeof XMLHttpRequest < "u", ls = us && function(i) {
|
|
3244
3355
|
return new Promise(function(e, n) {
|
|
3245
|
-
const r =
|
|
3356
|
+
const r = Vn(i);
|
|
3246
3357
|
let s = r.data;
|
|
3247
|
-
const a =
|
|
3248
|
-
let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, l, f, d, g,
|
|
3249
|
-
function
|
|
3250
|
-
g && g(),
|
|
3358
|
+
const a = M.from(r.headers).normalize();
|
|
3359
|
+
let { responseType: o, onUploadProgress: c, onDownloadProgress: u } = r, l, f, d, g, w;
|
|
3360
|
+
function E() {
|
|
3361
|
+
g && g(), w && w(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
3251
3362
|
}
|
|
3252
|
-
let
|
|
3253
|
-
|
|
3254
|
-
function
|
|
3255
|
-
if (!
|
|
3363
|
+
let y = new XMLHttpRequest();
|
|
3364
|
+
y.open(r.method.toUpperCase(), r.url, !0), y.timeout = r.timeout;
|
|
3365
|
+
function _() {
|
|
3366
|
+
if (!y)
|
|
3256
3367
|
return;
|
|
3257
|
-
const
|
|
3258
|
-
"getAllResponseHeaders" in
|
|
3259
|
-
),
|
|
3260
|
-
data: !o || o === "text" || o === "json" ?
|
|
3261
|
-
status:
|
|
3262
|
-
statusText:
|
|
3263
|
-
headers:
|
|
3368
|
+
const v = M.from(
|
|
3369
|
+
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
3370
|
+
), B = {
|
|
3371
|
+
data: !o || o === "text" || o === "json" ? y.responseText : y.response,
|
|
3372
|
+
status: y.status,
|
|
3373
|
+
statusText: y.statusText,
|
|
3374
|
+
headers: v,
|
|
3264
3375
|
config: i,
|
|
3265
|
-
request:
|
|
3376
|
+
request: y
|
|
3266
3377
|
};
|
|
3267
|
-
|
|
3268
|
-
function(
|
|
3269
|
-
e(
|
|
3378
|
+
Un(
|
|
3379
|
+
function(k) {
|
|
3380
|
+
e(k), E();
|
|
3270
3381
|
},
|
|
3271
|
-
function(
|
|
3272
|
-
n(
|
|
3382
|
+
function(k) {
|
|
3383
|
+
n(k), E();
|
|
3273
3384
|
},
|
|
3274
|
-
|
|
3275
|
-
),
|
|
3385
|
+
B
|
|
3386
|
+
), y = null;
|
|
3276
3387
|
}
|
|
3277
|
-
"onloadend" in
|
|
3278
|
-
!
|
|
3279
|
-
},
|
|
3280
|
-
|
|
3281
|
-
},
|
|
3282
|
-
const
|
|
3283
|
-
|
|
3284
|
-
},
|
|
3285
|
-
let
|
|
3286
|
-
const
|
|
3287
|
-
r.timeoutErrorMessage && (
|
|
3288
|
-
new
|
|
3289
|
-
|
|
3290
|
-
|
|
3388
|
+
"onloadend" in y ? y.onloadend = _ : y.onreadystatechange = function() {
|
|
3389
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.startsWith("file:")) || setTimeout(_);
|
|
3390
|
+
}, y.onabort = function() {
|
|
3391
|
+
y && (n(new m("Request aborted", m.ECONNABORTED, i, y)), E(), y = null);
|
|
3392
|
+
}, y.onerror = function(R) {
|
|
3393
|
+
const B = R && R.message ? R.message : "Network Error", P = new m(B, m.ERR_NETWORK, i, y);
|
|
3394
|
+
P.event = R || null, n(P), E(), y = null;
|
|
3395
|
+
}, y.ontimeout = function() {
|
|
3396
|
+
let R = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
3397
|
+
const B = r.transitional || Se;
|
|
3398
|
+
r.timeoutErrorMessage && (R = r.timeoutErrorMessage), n(
|
|
3399
|
+
new m(
|
|
3400
|
+
R,
|
|
3401
|
+
B.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
3291
3402
|
i,
|
|
3292
|
-
|
|
3403
|
+
y
|
|
3293
3404
|
)
|
|
3294
|
-
),
|
|
3295
|
-
}, s === void 0 && a.setContentType(null), "setRequestHeader" in
|
|
3296
|
-
|
|
3297
|
-
}), h.isUndefined(r.withCredentials) || (
|
|
3298
|
-
|
|
3405
|
+
), E(), y = null;
|
|
3406
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in y && h.forEach(An(a), function(R, B) {
|
|
3407
|
+
y.setRequestHeader(B, R);
|
|
3408
|
+
}), h.isUndefined(r.withCredentials) || (y.withCredentials = !!r.withCredentials), o && o !== "json" && (y.responseType = r.responseType), u && ([d, w] = Yt(u, !0), y.addEventListener("progress", d)), c && y.upload && ([f, g] = Yt(c), y.upload.addEventListener("progress", f), y.upload.addEventListener("loadend", g)), (r.cancelToken || r.signal) && (l = (v) => {
|
|
3409
|
+
y && (n(!v || v.type ? new Vt(null, i, y) : v), y.abort(), E(), y = null);
|
|
3299
3410
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
3300
|
-
const
|
|
3301
|
-
if (
|
|
3411
|
+
const b = $r(r.url);
|
|
3412
|
+
if (b && !L.protocols.includes(b)) {
|
|
3302
3413
|
n(
|
|
3303
|
-
new
|
|
3304
|
-
"Unsupported protocol " +
|
|
3305
|
-
|
|
3414
|
+
new m(
|
|
3415
|
+
"Unsupported protocol " + b + ":",
|
|
3416
|
+
m.ERR_BAD_REQUEST,
|
|
3306
3417
|
i
|
|
3307
3418
|
)
|
|
3308
|
-
);
|
|
3419
|
+
), E();
|
|
3309
3420
|
return;
|
|
3310
3421
|
}
|
|
3311
|
-
|
|
3422
|
+
y.send(s || null);
|
|
3312
3423
|
});
|
|
3313
|
-
},
|
|
3424
|
+
}, hs = (i, t) => {
|
|
3314
3425
|
if (i = i ? i.filter(Boolean) : [], !t && !i.length)
|
|
3315
3426
|
return;
|
|
3316
3427
|
const e = new AbortController();
|
|
@@ -3320,22 +3431,22 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3320
3431
|
n = !0, a();
|
|
3321
3432
|
const u = c instanceof Error ? c : this.reason;
|
|
3322
3433
|
e.abort(
|
|
3323
|
-
u instanceof
|
|
3434
|
+
u instanceof m ? u : new Vt(u instanceof Error ? u.message : u)
|
|
3324
3435
|
);
|
|
3325
3436
|
}
|
|
3326
3437
|
};
|
|
3327
3438
|
let s = t && setTimeout(() => {
|
|
3328
|
-
s = null, r(new
|
|
3439
|
+
s = null, r(new m(`timeout of ${t}ms exceeded`, m.ETIMEDOUT));
|
|
3329
3440
|
}, t);
|
|
3330
3441
|
const a = () => {
|
|
3331
3442
|
i && (s && clearTimeout(s), s = null, i.forEach((c) => {
|
|
3332
3443
|
c.unsubscribe ? c.unsubscribe(r) : c.removeEventListener("abort", r);
|
|
3333
3444
|
}), i = null);
|
|
3334
3445
|
};
|
|
3335
|
-
i.forEach((c) => c.addEventListener("abort", r));
|
|
3446
|
+
i.forEach((c) => c.addEventListener("abort", r, { once: !0 }));
|
|
3336
3447
|
const { signal: o } = e;
|
|
3337
3448
|
return o.unsubscribe = () => h.asap(a), o;
|
|
3338
|
-
},
|
|
3449
|
+
}, fs = function* (i, t) {
|
|
3339
3450
|
let e = i.byteLength;
|
|
3340
3451
|
if (e < t) {
|
|
3341
3452
|
yield i;
|
|
@@ -3344,10 +3455,10 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3344
3455
|
let n = 0, r;
|
|
3345
3456
|
for (; n < e; )
|
|
3346
3457
|
r = n + t, yield i.slice(n, r), n = r;
|
|
3347
|
-
},
|
|
3348
|
-
for await (const e of
|
|
3349
|
-
yield*
|
|
3350
|
-
},
|
|
3458
|
+
}, ps = async function* (i, t) {
|
|
3459
|
+
for await (const e of ds(i))
|
|
3460
|
+
yield* fs(e, t);
|
|
3461
|
+
}, ds = async function* (i) {
|
|
3351
3462
|
if (i[Symbol.asyncIterator]) {
|
|
3352
3463
|
yield* i;
|
|
3353
3464
|
return;
|
|
@@ -3363,8 +3474,8 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3363
3474
|
} finally {
|
|
3364
3475
|
await t.cancel();
|
|
3365
3476
|
}
|
|
3366
|
-
},
|
|
3367
|
-
const r =
|
|
3477
|
+
}, an = (i, t, e, n) => {
|
|
3478
|
+
const r = ps(i, t);
|
|
3368
3479
|
let s = 0, a, o = (c) => {
|
|
3369
3480
|
a || (a = !0, n && n(c));
|
|
3370
3481
|
};
|
|
@@ -3395,8 +3506,8 @@ const kr = (i) => encodeURIComponent(i).replace(
|
|
|
3395
3506
|
highWaterMark: 2
|
|
3396
3507
|
}
|
|
3397
3508
|
);
|
|
3398
|
-
};
|
|
3399
|
-
function
|
|
3509
|
+
}, te = (i) => i >= 48 && i <= 57 || i >= 65 && i <= 70 || i >= 97 && i <= 102, _s = (i, t, e) => t + 2 < e && te(i.charCodeAt(t + 1)) && te(i.charCodeAt(t + 2));
|
|
3510
|
+
function gs(i) {
|
|
3400
3511
|
if (!i || typeof i != "string" || !i.startsWith("data:")) return 0;
|
|
3401
3512
|
const t = i.indexOf(",");
|
|
3402
3513
|
if (t < 0) return 0;
|
|
@@ -3406,8 +3517,8 @@ function zr(i) {
|
|
|
3406
3517
|
const o = n.length;
|
|
3407
3518
|
for (let g = 0; g < o; g++)
|
|
3408
3519
|
if (n.charCodeAt(g) === 37 && g + 2 < o) {
|
|
3409
|
-
const
|
|
3410
|
-
(
|
|
3520
|
+
const w = n.charCodeAt(g + 1), E = n.charCodeAt(g + 2);
|
|
3521
|
+
te(w) && te(E) && (a -= 2, g += 2);
|
|
3411
3522
|
}
|
|
3412
3523
|
let c = 0, u = o - 1;
|
|
3413
3524
|
const l = (g) => g >= 2 && n.charCodeAt(g - 2) === 37 && // '%'
|
|
@@ -3417,12 +3528,12 @@ function zr(i) {
|
|
|
3417
3528
|
const d = Math.floor(a / 4) * 3 - (c || 0);
|
|
3418
3529
|
return d > 0 ? d : 0;
|
|
3419
3530
|
}
|
|
3420
|
-
if (typeof Buffer < "u" && typeof Buffer.byteLength == "function")
|
|
3421
|
-
return Buffer.byteLength(n, "utf8");
|
|
3422
3531
|
let s = 0;
|
|
3423
3532
|
for (let a = 0, o = n.length; a < o; a++) {
|
|
3424
3533
|
const c = n.charCodeAt(a);
|
|
3425
|
-
if (c
|
|
3534
|
+
if (c === 37 && _s(n, a, o))
|
|
3535
|
+
s += 1, a += 2;
|
|
3536
|
+
else if (c < 128)
|
|
3426
3537
|
s += 1;
|
|
3427
3538
|
else if (c < 2048)
|
|
3428
3539
|
s += 2;
|
|
@@ -3434,13 +3545,28 @@ function zr(i) {
|
|
|
3434
3545
|
}
|
|
3435
3546
|
return s;
|
|
3436
3547
|
}
|
|
3437
|
-
const
|
|
3548
|
+
const Ae = "1.18.1", on = 64 * 1024, { isFunction: Xt } = h, ms = (i) => encodeURIComponent(i).replace(
|
|
3549
|
+
/%([0-9A-F]{2})/gi,
|
|
3550
|
+
(t, e) => String.fromCharCode(parseInt(e, 16))
|
|
3551
|
+
), cn = (i) => {
|
|
3552
|
+
if (!h.isString(i))
|
|
3553
|
+
return i;
|
|
3554
|
+
try {
|
|
3555
|
+
return decodeURIComponent(i);
|
|
3556
|
+
} catch {
|
|
3557
|
+
return i;
|
|
3558
|
+
}
|
|
3559
|
+
}, un = (i, ...t) => {
|
|
3438
3560
|
try {
|
|
3439
3561
|
return !!i(...t);
|
|
3440
3562
|
} catch {
|
|
3441
3563
|
return !1;
|
|
3442
3564
|
}
|
|
3443
|
-
},
|
|
3565
|
+
}, ys = (i) => {
|
|
3566
|
+
const t = i.indexOf("://");
|
|
3567
|
+
let e = i;
|
|
3568
|
+
return t !== -1 && (e = e.slice(t + 3)), e.includes("@") || e.includes(":");
|
|
3569
|
+
}, bs = (i) => {
|
|
3444
3570
|
const t = h.global !== void 0 && h.global !== null ? h.global : globalThis, { ReadableStream: e, TextEncoder: n } = t;
|
|
3445
3571
|
i = h.merge.call(
|
|
3446
3572
|
{
|
|
@@ -3452,229 +3578,289 @@ const Pe = "1.16.1", $e = 64 * 1024, { isFunction: Ft } = h, Je = (i, ...t) => {
|
|
|
3452
3578
|
},
|
|
3453
3579
|
i
|
|
3454
3580
|
);
|
|
3455
|
-
const { fetch: r, Request: s, Response: a } = i, o = r ?
|
|
3581
|
+
const { fetch: r, Request: s, Response: a } = i, o = r ? Xt(r) : typeof fetch == "function", c = Xt(s), u = Xt(a);
|
|
3456
3582
|
if (!o)
|
|
3457
3583
|
return !1;
|
|
3458
|
-
const l = o &&
|
|
3459
|
-
let
|
|
3460
|
-
const
|
|
3584
|
+
const l = o && Xt(e), f = o && (typeof n == "function" ? /* @__PURE__ */ ((_) => (b) => _.encode(b))(new n()) : async (_) => new Uint8Array(await new s(_).arrayBuffer())), d = c && l && un(() => {
|
|
3585
|
+
let _ = !1;
|
|
3586
|
+
const b = new s(L.origin, {
|
|
3461
3587
|
body: new e(),
|
|
3462
3588
|
method: "POST",
|
|
3463
3589
|
get duplex() {
|
|
3464
|
-
return
|
|
3590
|
+
return _ = !0, "half";
|
|
3465
3591
|
}
|
|
3466
|
-
}),
|
|
3467
|
-
return
|
|
3468
|
-
}), g = u && l &&
|
|
3469
|
-
stream: g && ((
|
|
3592
|
+
}), v = b.headers.has("Content-Type");
|
|
3593
|
+
return b.body != null && b.body.cancel(), _ && !v;
|
|
3594
|
+
}), g = u && l && un(() => h.isReadableStream(new a("").body)), w = {
|
|
3595
|
+
stream: g && ((_) => _.body)
|
|
3470
3596
|
};
|
|
3471
|
-
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
3472
|
-
!
|
|
3473
|
-
let
|
|
3474
|
-
if (
|
|
3475
|
-
return
|
|
3476
|
-
throw new
|
|
3477
|
-
`Response type '${
|
|
3478
|
-
|
|
3479
|
-
|
|
3597
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((_) => {
|
|
3598
|
+
!w[_] && (w[_] = (b, v) => {
|
|
3599
|
+
let R = b && b[_];
|
|
3600
|
+
if (R)
|
|
3601
|
+
return R.call(b);
|
|
3602
|
+
throw new m(
|
|
3603
|
+
`Response type '${_}' is not supported`,
|
|
3604
|
+
m.ERR_NOT_SUPPORT,
|
|
3605
|
+
v
|
|
3480
3606
|
);
|
|
3481
3607
|
});
|
|
3482
3608
|
});
|
|
3483
|
-
const
|
|
3484
|
-
if (
|
|
3609
|
+
const E = async (_) => {
|
|
3610
|
+
if (_ == null)
|
|
3485
3611
|
return 0;
|
|
3486
|
-
if (h.isBlob(
|
|
3487
|
-
return
|
|
3488
|
-
if (h.isSpecCompliantForm(
|
|
3489
|
-
return (await new s(
|
|
3612
|
+
if (h.isBlob(_))
|
|
3613
|
+
return _.size;
|
|
3614
|
+
if (h.isSpecCompliantForm(_))
|
|
3615
|
+
return (await new s(L.origin, {
|
|
3490
3616
|
method: "POST",
|
|
3491
|
-
body:
|
|
3617
|
+
body: _
|
|
3492
3618
|
}).arrayBuffer()).byteLength;
|
|
3493
|
-
if (h.isArrayBufferView(
|
|
3494
|
-
return
|
|
3495
|
-
if (h.isURLSearchParams(
|
|
3496
|
-
return (await f(
|
|
3497
|
-
},
|
|
3498
|
-
const
|
|
3499
|
-
return
|
|
3619
|
+
if (h.isArrayBufferView(_) || h.isArrayBuffer(_))
|
|
3620
|
+
return _.byteLength;
|
|
3621
|
+
if (h.isURLSearchParams(_) && (_ = _ + ""), h.isString(_))
|
|
3622
|
+
return (await f(_)).byteLength;
|
|
3623
|
+
}, y = async (_, b) => {
|
|
3624
|
+
const v = h.toFiniteNumber(_.getContentLength());
|
|
3625
|
+
return v ?? E(b);
|
|
3500
3626
|
};
|
|
3501
|
-
return async (
|
|
3627
|
+
return async (_) => {
|
|
3502
3628
|
let {
|
|
3503
|
-
url:
|
|
3504
|
-
method:
|
|
3505
|
-
data:
|
|
3506
|
-
signal:
|
|
3507
|
-
cancelToken:
|
|
3508
|
-
timeout:
|
|
3509
|
-
onDownloadProgress:
|
|
3629
|
+
url: b,
|
|
3630
|
+
method: v,
|
|
3631
|
+
data: R,
|
|
3632
|
+
signal: B,
|
|
3633
|
+
cancelToken: P,
|
|
3634
|
+
timeout: k,
|
|
3635
|
+
onDownloadProgress: Z,
|
|
3510
3636
|
onUploadProgress: X,
|
|
3511
|
-
responseType:
|
|
3637
|
+
responseType: H,
|
|
3512
3638
|
headers: I,
|
|
3513
|
-
withCredentials:
|
|
3514
|
-
fetchOptions:
|
|
3515
|
-
maxContentLength:
|
|
3516
|
-
maxBodyLength:
|
|
3517
|
-
} =
|
|
3518
|
-
const
|
|
3519
|
-
let
|
|
3520
|
-
|
|
3521
|
-
let
|
|
3522
|
-
[
|
|
3523
|
-
|
|
3524
|
-
),
|
|
3525
|
-
const
|
|
3526
|
-
|
|
3639
|
+
withCredentials: _t = "same-origin",
|
|
3640
|
+
fetchOptions: ot,
|
|
3641
|
+
maxContentLength: $,
|
|
3642
|
+
maxBodyLength: Mt
|
|
3643
|
+
} = Vn(_);
|
|
3644
|
+
const Rt = h.isNumber($) && $ > -1, se = h.isNumber(Mt) && Mt > -1, qn = (C) => h.hasOwnProp(_, C) ? _[C] : void 0;
|
|
3645
|
+
let Ce = r || fetch;
|
|
3646
|
+
H = H ? (H + "").toLowerCase() : "text";
|
|
3647
|
+
let nt = hs(
|
|
3648
|
+
[B, P && P.toAbortSignal()],
|
|
3649
|
+
k
|
|
3650
|
+
), U = null;
|
|
3651
|
+
const ct = nt && nt.unsubscribe && (() => {
|
|
3652
|
+
nt.unsubscribe();
|
|
3527
3653
|
});
|
|
3528
|
-
let
|
|
3654
|
+
let gt, Ct = null;
|
|
3655
|
+
const Oe = () => new m(
|
|
3656
|
+
"Request body larger than maxBodyLength limit",
|
|
3657
|
+
m.ERR_BAD_REQUEST,
|
|
3658
|
+
_,
|
|
3659
|
+
U
|
|
3660
|
+
);
|
|
3529
3661
|
try {
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
const R = await _(I, A);
|
|
3539
|
-
if (typeof R == "number" && isFinite(R) && R > Yt)
|
|
3540
|
-
throw new y(
|
|
3541
|
-
"Request body larger than maxBodyLength limit",
|
|
3542
|
-
y.ERR_BAD_REQUEST,
|
|
3543
|
-
b,
|
|
3544
|
-
k
|
|
3545
|
-
);
|
|
3662
|
+
let C;
|
|
3663
|
+
const K = qn("auth");
|
|
3664
|
+
if (K) {
|
|
3665
|
+
const T = h.getSafeProp(K, "username") || "", q = h.getSafeProp(K, "password") || "";
|
|
3666
|
+
C = {
|
|
3667
|
+
username: T,
|
|
3668
|
+
password: q
|
|
3669
|
+
};
|
|
3546
3670
|
}
|
|
3547
|
-
if (
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
ve,
|
|
3556
|
-
Wt(Xe(X))
|
|
3557
|
-
);
|
|
3558
|
-
A = Ge(R.body, $e, It, Nt);
|
|
3671
|
+
if (ys(b)) {
|
|
3672
|
+
const T = new URL(b, L.origin);
|
|
3673
|
+
if (!C && (T.username || T.password)) {
|
|
3674
|
+
const q = cn(T.username), it = cn(T.password);
|
|
3675
|
+
C = {
|
|
3676
|
+
username: q,
|
|
3677
|
+
password: it
|
|
3678
|
+
};
|
|
3559
3679
|
}
|
|
3680
|
+
(T.username || T.password) && (T.username = "", T.password = "", b = T.href);
|
|
3560
3681
|
}
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3682
|
+
if (C && (I.delete("authorization"), I.set(
|
|
3683
|
+
"Authorization",
|
|
3684
|
+
"Basic " + btoa(ms((C.username || "") + ":" + (C.password || "")))
|
|
3685
|
+
)), Rt && typeof b == "string" && b.startsWith("data:") && gs(b) > $)
|
|
3686
|
+
throw new m(
|
|
3687
|
+
"maxContentLength size of " + $ + " exceeded",
|
|
3688
|
+
m.ERR_BAD_RESPONSE,
|
|
3689
|
+
_,
|
|
3690
|
+
U
|
|
3691
|
+
);
|
|
3692
|
+
if (se && v !== "get" && v !== "head") {
|
|
3693
|
+
const T = await E(R);
|
|
3694
|
+
if (typeof T == "number" && isFinite(T) && (gt = T, T > Mt))
|
|
3695
|
+
throw Oe();
|
|
3696
|
+
}
|
|
3697
|
+
const Ft = se && (h.isReadableStream(R) || h.isStream(R)), De = (T, q, it) => an(
|
|
3698
|
+
T,
|
|
3699
|
+
on,
|
|
3700
|
+
(ut) => {
|
|
3701
|
+
if (se && ut > Mt)
|
|
3702
|
+
throw Ct = Oe();
|
|
3703
|
+
q && q(ut);
|
|
3704
|
+
},
|
|
3705
|
+
it
|
|
3706
|
+
);
|
|
3707
|
+
if (d && v !== "get" && v !== "head" && (X || Ft)) {
|
|
3708
|
+
if (gt = gt ?? await y(I, R), gt !== 0 || Ft) {
|
|
3709
|
+
let T = new s(b, {
|
|
3710
|
+
method: "POST",
|
|
3711
|
+
body: R,
|
|
3712
|
+
duplex: "half"
|
|
3713
|
+
}), q;
|
|
3714
|
+
if (h.isFormData(R) && (q = T.headers.get("content-type")) && I.setContentType(q), T.body) {
|
|
3715
|
+
const [it, ut] = X && en(
|
|
3716
|
+
gt,
|
|
3717
|
+
Yt(nn(X))
|
|
3718
|
+
) || [];
|
|
3719
|
+
R = De(T.body, it, ut);
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
} else if (Ft && !c && l && v !== "get" && v !== "head")
|
|
3723
|
+
R = De(R);
|
|
3724
|
+
else if (Ft && c && !d && v !== "get" && v !== "head")
|
|
3725
|
+
throw new m(
|
|
3726
|
+
"Stream request bodies are not supported by the current fetch implementation",
|
|
3727
|
+
m.ERR_NOT_SUPPORT,
|
|
3728
|
+
_,
|
|
3729
|
+
U
|
|
3730
|
+
);
|
|
3731
|
+
h.isString(_t) || (_t = _t ? "include" : "omit");
|
|
3732
|
+
const Hn = c && "credentials" in s.prototype;
|
|
3733
|
+
if (h.isFormData(R)) {
|
|
3734
|
+
const T = I.getContentType();
|
|
3735
|
+
T && /^multipart\/form-data/i.test(T) && !/boundary=/i.test(T) && I.delete("content-type");
|
|
3566
3736
|
}
|
|
3567
|
-
I.set("User-Agent", "axios/" +
|
|
3568
|
-
const
|
|
3569
|
-
...
|
|
3570
|
-
signal:
|
|
3571
|
-
method:
|
|
3572
|
-
headers:
|
|
3573
|
-
body:
|
|
3737
|
+
I.set("User-Agent", "axios/" + Ae, !1);
|
|
3738
|
+
const Ie = {
|
|
3739
|
+
...ot,
|
|
3740
|
+
signal: nt,
|
|
3741
|
+
method: v.toUpperCase(),
|
|
3742
|
+
headers: An(I.normalize()),
|
|
3743
|
+
body: R,
|
|
3574
3744
|
duplex: "half",
|
|
3575
|
-
credentials:
|
|
3745
|
+
credentials: Hn ? _t : void 0
|
|
3576
3746
|
};
|
|
3577
|
-
|
|
3578
|
-
let
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3747
|
+
U = c && new s(b, Ie);
|
|
3748
|
+
let Y = await (c ? Ce(U, ot) : Ce(b, Ie));
|
|
3749
|
+
const Ne = M.from(Y.headers);
|
|
3750
|
+
if (Rt) {
|
|
3751
|
+
const T = h.toFiniteNumber(Ne.getContentLength());
|
|
3752
|
+
if (T != null && T > $)
|
|
3753
|
+
throw new m(
|
|
3754
|
+
"maxContentLength size of " + $ + " exceeded",
|
|
3755
|
+
m.ERR_BAD_RESPONSE,
|
|
3756
|
+
_,
|
|
3757
|
+
U
|
|
3587
3758
|
);
|
|
3588
3759
|
}
|
|
3589
|
-
const
|
|
3590
|
-
if (g &&
|
|
3591
|
-
const
|
|
3592
|
-
["status", "statusText", "headers"].forEach((
|
|
3593
|
-
|
|
3760
|
+
const ae = g && (H === "stream" || H === "response");
|
|
3761
|
+
if (g && Y.body && (Z || Rt || ae && ct)) {
|
|
3762
|
+
const T = {};
|
|
3763
|
+
["status", "statusText", "headers"].forEach((Ot) => {
|
|
3764
|
+
T[Ot] = Y[Ot];
|
|
3594
3765
|
});
|
|
3595
|
-
const
|
|
3596
|
-
|
|
3597
|
-
|
|
3766
|
+
const q = h.toFiniteNumber(Ne.getContentLength()), [it, ut] = Z && en(
|
|
3767
|
+
q,
|
|
3768
|
+
Yt(nn(Z), !0)
|
|
3598
3769
|
) || [];
|
|
3599
|
-
let
|
|
3600
|
-
const
|
|
3601
|
-
if (
|
|
3602
|
-
throw new
|
|
3603
|
-
"maxContentLength size of " +
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3770
|
+
let Be = 0;
|
|
3771
|
+
const Kn = (Ot) => {
|
|
3772
|
+
if (Rt && (Be = Ot, Be > $))
|
|
3773
|
+
throw new m(
|
|
3774
|
+
"maxContentLength size of " + $ + " exceeded",
|
|
3775
|
+
m.ERR_BAD_RESPONSE,
|
|
3776
|
+
_,
|
|
3777
|
+
U
|
|
3607
3778
|
);
|
|
3608
|
-
|
|
3779
|
+
it && it(Ot);
|
|
3609
3780
|
};
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3781
|
+
Y = new a(
|
|
3782
|
+
an(Y.body, on, Kn, () => {
|
|
3783
|
+
ut && ut(), ct && ct();
|
|
3613
3784
|
}),
|
|
3614
|
-
|
|
3785
|
+
T
|
|
3615
3786
|
);
|
|
3616
3787
|
}
|
|
3617
|
-
|
|
3618
|
-
let
|
|
3619
|
-
|
|
3620
|
-
|
|
3788
|
+
H = H || "text";
|
|
3789
|
+
let tt = await w[h.findKey(w, H) || "text"](
|
|
3790
|
+
Y,
|
|
3791
|
+
_
|
|
3621
3792
|
);
|
|
3622
|
-
if (
|
|
3623
|
-
let
|
|
3624
|
-
if (
|
|
3625
|
-
throw new
|
|
3626
|
-
"maxContentLength size of " +
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3793
|
+
if (Rt && !g && !ae) {
|
|
3794
|
+
let T;
|
|
3795
|
+
if (tt != null && (typeof tt.byteLength == "number" ? T = tt.byteLength : typeof tt.size == "number" ? T = tt.size : typeof tt == "string" && (T = typeof n == "function" ? new n().encode(tt).byteLength : tt.length)), typeof T == "number" && T > $)
|
|
3796
|
+
throw new m(
|
|
3797
|
+
"maxContentLength size of " + $ + " exceeded",
|
|
3798
|
+
m.ERR_BAD_RESPONSE,
|
|
3799
|
+
_,
|
|
3800
|
+
U
|
|
3630
3801
|
);
|
|
3631
3802
|
}
|
|
3632
|
-
return !
|
|
3633
|
-
|
|
3634
|
-
data:
|
|
3635
|
-
headers:
|
|
3636
|
-
status:
|
|
3637
|
-
statusText:
|
|
3638
|
-
config:
|
|
3639
|
-
request:
|
|
3803
|
+
return !ae && ct && ct(), await new Promise((T, q) => {
|
|
3804
|
+
Un(T, q, {
|
|
3805
|
+
data: tt,
|
|
3806
|
+
headers: M.from(Y.headers),
|
|
3807
|
+
status: Y.status,
|
|
3808
|
+
statusText: Y.statusText,
|
|
3809
|
+
config: _,
|
|
3810
|
+
request: U
|
|
3640
3811
|
});
|
|
3641
3812
|
});
|
|
3642
|
-
} catch (
|
|
3643
|
-
if (
|
|
3644
|
-
const
|
|
3645
|
-
throw
|
|
3813
|
+
} catch (C) {
|
|
3814
|
+
if (ct && ct(), nt && nt.aborted && nt.reason instanceof m) {
|
|
3815
|
+
const K = nt.reason;
|
|
3816
|
+
throw K.config = _, U && (K.request = U), C !== K && Object.defineProperty(K, "cause", {
|
|
3817
|
+
__proto__: null,
|
|
3818
|
+
value: C,
|
|
3819
|
+
writable: !0,
|
|
3820
|
+
enumerable: !1,
|
|
3821
|
+
configurable: !0
|
|
3822
|
+
}), K;
|
|
3646
3823
|
}
|
|
3647
|
-
|
|
3648
|
-
|
|
3824
|
+
if (Ct)
|
|
3825
|
+
throw U && !Ct.request && (Ct.request = U), Ct;
|
|
3826
|
+
if (C instanceof m)
|
|
3827
|
+
throw U && !C.request && (C.request = U), C;
|
|
3828
|
+
if (C && C.name === "TypeError" && /Load failed|fetch/i.test(C.message)) {
|
|
3829
|
+
const K = new m(
|
|
3649
3830
|
"Network Error",
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
)
|
|
3655
|
-
{
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3831
|
+
m.ERR_NETWORK,
|
|
3832
|
+
_,
|
|
3833
|
+
U,
|
|
3834
|
+
C && C.response
|
|
3835
|
+
);
|
|
3836
|
+
throw Object.defineProperty(K, "cause", {
|
|
3837
|
+
__proto__: null,
|
|
3838
|
+
value: C.cause || C,
|
|
3839
|
+
writable: !0,
|
|
3840
|
+
enumerable: !1,
|
|
3841
|
+
configurable: !0
|
|
3842
|
+
}), K;
|
|
3843
|
+
}
|
|
3844
|
+
throw m.from(C, C && C.code, _, U, C && C.response);
|
|
3659
3845
|
}
|
|
3660
3846
|
};
|
|
3661
|
-
},
|
|
3847
|
+
}, Ps = /* @__PURE__ */ new Map(), Mn = (i) => {
|
|
3662
3848
|
let t = i && i.env || {};
|
|
3663
3849
|
const { fetch: e, Request: n, Response: r } = t, s = [n, r, e];
|
|
3664
|
-
let a = s.length, o = a, c, u, l =
|
|
3850
|
+
let a = s.length, o = a, c, u, l = Ps;
|
|
3665
3851
|
for (; o--; )
|
|
3666
|
-
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() :
|
|
3852
|
+
c = s[o], u = l.get(c), u === void 0 && l.set(c, u = o ? /* @__PURE__ */ new Map() : bs(t)), l = u;
|
|
3667
3853
|
return u;
|
|
3668
3854
|
};
|
|
3669
|
-
|
|
3670
|
-
const
|
|
3671
|
-
http:
|
|
3672
|
-
xhr:
|
|
3855
|
+
Mn();
|
|
3856
|
+
const Re = {
|
|
3857
|
+
http: Br,
|
|
3858
|
+
xhr: ls,
|
|
3673
3859
|
fetch: {
|
|
3674
|
-
get:
|
|
3860
|
+
get: Mn
|
|
3675
3861
|
}
|
|
3676
3862
|
};
|
|
3677
|
-
h.forEach(
|
|
3863
|
+
h.forEach(Re, (i, t) => {
|
|
3678
3864
|
if (i) {
|
|
3679
3865
|
try {
|
|
3680
3866
|
Object.defineProperty(i, "name", { __proto__: null, value: t });
|
|
@@ -3683,8 +3869,8 @@ h.forEach(Ee, (i, t) => {
|
|
|
3683
3869
|
Object.defineProperty(i, "adapterName", { __proto__: null, value: t });
|
|
3684
3870
|
}
|
|
3685
3871
|
});
|
|
3686
|
-
const
|
|
3687
|
-
function
|
|
3872
|
+
const ln = (i) => `- ${i}`, ws = (i) => h.isFunction(i) || i === null || i === !1;
|
|
3873
|
+
function Es(i, t) {
|
|
3688
3874
|
i = h.isArray(i) ? i : [i];
|
|
3689
3875
|
const { length: e } = i;
|
|
3690
3876
|
let n, r;
|
|
@@ -3692,8 +3878,8 @@ function Qr(i, t) {
|
|
|
3692
3878
|
for (let a = 0; a < e; a++) {
|
|
3693
3879
|
n = i[a];
|
|
3694
3880
|
let o;
|
|
3695
|
-
if (r = n, !
|
|
3696
|
-
throw new
|
|
3881
|
+
if (r = n, !ws(n) && (r = Re[(o = String(n)).toLowerCase()], r === void 0))
|
|
3882
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
3697
3883
|
if (r && (h.isFunction(r) || (r = r.get(t))))
|
|
3698
3884
|
break;
|
|
3699
3885
|
s[o || "#" + a] = r;
|
|
@@ -3703,47 +3889,47 @@ function Qr(i, t) {
|
|
|
3703
3889
|
([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
3704
3890
|
);
|
|
3705
3891
|
let o = e ? a.length > 1 ? `since :
|
|
3706
|
-
` + a.map(
|
|
3707
|
-
`) : " " +
|
|
3708
|
-
throw new
|
|
3892
|
+
` + a.map(ln).join(`
|
|
3893
|
+
`) : " " + ln(a[0]) : "as no adapter specified";
|
|
3894
|
+
throw new m(
|
|
3709
3895
|
"There is no suitable adapter to dispatch the request " + o,
|
|
3710
|
-
|
|
3896
|
+
m.ERR_NOT_SUPPORT
|
|
3711
3897
|
);
|
|
3712
3898
|
}
|
|
3713
3899
|
return r;
|
|
3714
3900
|
}
|
|
3715
|
-
const
|
|
3901
|
+
const Fn = {
|
|
3716
3902
|
/**
|
|
3717
3903
|
* Resolve an adapter from a list of adapter names or functions.
|
|
3718
3904
|
* @type {Function}
|
|
3719
3905
|
*/
|
|
3720
|
-
getAdapter:
|
|
3906
|
+
getAdapter: Es,
|
|
3721
3907
|
/**
|
|
3722
3908
|
* Exposes all known adapters
|
|
3723
3909
|
* @type {Object<string, Function|Object>}
|
|
3724
3910
|
*/
|
|
3725
|
-
adapters:
|
|
3911
|
+
adapters: Re
|
|
3726
3912
|
};
|
|
3727
|
-
function
|
|
3913
|
+
function pe(i) {
|
|
3728
3914
|
if (i.cancelToken && i.cancelToken.throwIfRequested(), i.signal && i.signal.aborted)
|
|
3729
|
-
throw new
|
|
3915
|
+
throw new Vt(null, i);
|
|
3730
3916
|
}
|
|
3731
|
-
function
|
|
3732
|
-
return
|
|
3917
|
+
function hn(i) {
|
|
3918
|
+
return pe(i), i.headers = M.from(i.headers), i.data = fe.call(i, i.transformRequest), ["post", "put", "patch"].indexOf(i.method) !== -1 && i.headers.setContentType("application/x-www-form-urlencoded", !1), Fn.getAdapter(i.adapter || Lt.adapter, i)(i).then(
|
|
3733
3919
|
function(n) {
|
|
3734
|
-
|
|
3920
|
+
pe(i), i.response = n;
|
|
3735
3921
|
try {
|
|
3736
|
-
n.data =
|
|
3922
|
+
n.data = fe.call(i, i.transformResponse, n);
|
|
3737
3923
|
} finally {
|
|
3738
3924
|
delete i.response;
|
|
3739
3925
|
}
|
|
3740
|
-
return n.headers =
|
|
3926
|
+
return n.headers = M.from(n.headers), n;
|
|
3741
3927
|
},
|
|
3742
3928
|
function(n) {
|
|
3743
|
-
if (!
|
|
3929
|
+
if (!xn(n) && (pe(i), n && n.response)) {
|
|
3744
3930
|
i.response = n.response;
|
|
3745
3931
|
try {
|
|
3746
|
-
n.response.data =
|
|
3932
|
+
n.response.data = fe.call(
|
|
3747
3933
|
i,
|
|
3748
3934
|
i.transformResponse,
|
|
3749
3935
|
n.response
|
|
@@ -3751,30 +3937,30 @@ function Ze(i) {
|
|
|
3751
3937
|
} finally {
|
|
3752
3938
|
delete i.response;
|
|
3753
3939
|
}
|
|
3754
|
-
n.response.headers =
|
|
3940
|
+
n.response.headers = M.from(n.response.headers);
|
|
3755
3941
|
}
|
|
3756
3942
|
return Promise.reject(n);
|
|
3757
3943
|
}
|
|
3758
3944
|
);
|
|
3759
3945
|
}
|
|
3760
|
-
const
|
|
3946
|
+
const re = {};
|
|
3761
3947
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((i, t) => {
|
|
3762
|
-
|
|
3948
|
+
re[i] = function(n) {
|
|
3763
3949
|
return typeof n === i || "a" + (t < 1 ? "n " : " ") + i;
|
|
3764
3950
|
};
|
|
3765
3951
|
});
|
|
3766
|
-
const
|
|
3767
|
-
|
|
3952
|
+
const fn = {};
|
|
3953
|
+
re.transitional = function(t, e, n) {
|
|
3768
3954
|
function r(s, a) {
|
|
3769
|
-
return "[Axios v" +
|
|
3955
|
+
return "[Axios v" + Ae + "] Transitional option '" + s + "'" + a + (n ? ". " + n : "");
|
|
3770
3956
|
}
|
|
3771
3957
|
return (s, a, o) => {
|
|
3772
3958
|
if (t === !1)
|
|
3773
|
-
throw new
|
|
3959
|
+
throw new m(
|
|
3774
3960
|
r(a, " has been removed" + (e ? " in " + e : "")),
|
|
3775
|
-
|
|
3961
|
+
m.ERR_DEPRECATED
|
|
3776
3962
|
);
|
|
3777
|
-
return e && !
|
|
3963
|
+
return e && !fn[a] && (fn[a] = !0, console.warn(
|
|
3778
3964
|
r(
|
|
3779
3965
|
a,
|
|
3780
3966
|
" has been deprecated since v" + e + " and will be removed in the near future"
|
|
@@ -3782,12 +3968,12 @@ Zt.transitional = function(t, e, n) {
|
|
|
3782
3968
|
)), t ? t(s, a, o) : !0;
|
|
3783
3969
|
};
|
|
3784
3970
|
};
|
|
3785
|
-
|
|
3971
|
+
re.spelling = function(t) {
|
|
3786
3972
|
return (e, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
3787
3973
|
};
|
|
3788
|
-
function
|
|
3789
|
-
if (typeof i != "object")
|
|
3790
|
-
throw new
|
|
3974
|
+
function vs(i, t, e) {
|
|
3975
|
+
if (typeof i != "object" || i === null)
|
|
3976
|
+
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
3791
3977
|
const n = Object.keys(i);
|
|
3792
3978
|
let r = n.length;
|
|
3793
3979
|
for (; r-- > 0; ) {
|
|
@@ -3795,25 +3981,25 @@ function Zr(i, t, e) {
|
|
|
3795
3981
|
if (a) {
|
|
3796
3982
|
const o = i[s], c = o === void 0 || a(o, s, i);
|
|
3797
3983
|
if (c !== !0)
|
|
3798
|
-
throw new
|
|
3984
|
+
throw new m(
|
|
3799
3985
|
"option " + s + " must be " + c,
|
|
3800
|
-
|
|
3986
|
+
m.ERR_BAD_OPTION_VALUE
|
|
3801
3987
|
);
|
|
3802
3988
|
continue;
|
|
3803
3989
|
}
|
|
3804
3990
|
if (e !== !0)
|
|
3805
|
-
throw new
|
|
3991
|
+
throw new m("Unknown option " + s, m.ERR_BAD_OPTION);
|
|
3806
3992
|
}
|
|
3807
3993
|
}
|
|
3808
|
-
const
|
|
3809
|
-
assertOptions:
|
|
3810
|
-
validators:
|
|
3811
|
-
},
|
|
3812
|
-
let
|
|
3994
|
+
const Jt = {
|
|
3995
|
+
assertOptions: vs,
|
|
3996
|
+
validators: re
|
|
3997
|
+
}, V = Jt.validators;
|
|
3998
|
+
let ft = class {
|
|
3813
3999
|
constructor(t) {
|
|
3814
4000
|
this.defaults = t || {}, this.interceptors = {
|
|
3815
|
-
request: new
|
|
3816
|
-
response: new
|
|
4001
|
+
request: new Ye(),
|
|
4002
|
+
response: new Ye()
|
|
3817
4003
|
};
|
|
3818
4004
|
}
|
|
3819
4005
|
/**
|
|
@@ -3855,91 +4041,93 @@ let ut = class {
|
|
|
3855
4041
|
}
|
|
3856
4042
|
}
|
|
3857
4043
|
_request(t, e) {
|
|
3858
|
-
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e =
|
|
4044
|
+
typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = dt(this.defaults, e);
|
|
3859
4045
|
const { transitional: n, paramsSerializer: r, headers: s } = e;
|
|
3860
|
-
n !== void 0 &&
|
|
4046
|
+
n !== void 0 && Jt.assertOptions(
|
|
3861
4047
|
n,
|
|
3862
4048
|
{
|
|
3863
|
-
silentJSONParsing:
|
|
3864
|
-
forcedJSONParsing:
|
|
3865
|
-
clarifyTimeoutError:
|
|
3866
|
-
legacyInterceptorReqResOrdering:
|
|
4049
|
+
silentJSONParsing: V.transitional(V.boolean),
|
|
4050
|
+
forcedJSONParsing: V.transitional(V.boolean),
|
|
4051
|
+
clarifyTimeoutError: V.transitional(V.boolean),
|
|
4052
|
+
legacyInterceptorReqResOrdering: V.transitional(V.boolean),
|
|
4053
|
+
advertiseZstdAcceptEncoding: V.transitional(V.boolean),
|
|
4054
|
+
validateStatusUndefinedResolves: V.transitional(V.boolean)
|
|
3867
4055
|
},
|
|
3868
4056
|
!1
|
|
3869
4057
|
), r != null && (h.isFunction(r) ? e.paramsSerializer = {
|
|
3870
4058
|
serialize: r
|
|
3871
|
-
} :
|
|
4059
|
+
} : Jt.assertOptions(
|
|
3872
4060
|
r,
|
|
3873
4061
|
{
|
|
3874
|
-
encode:
|
|
3875
|
-
serialize:
|
|
4062
|
+
encode: V.function,
|
|
4063
|
+
serialize: V.function
|
|
3876
4064
|
},
|
|
3877
4065
|
!0
|
|
3878
|
-
)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0),
|
|
4066
|
+
)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), Jt.assertOptions(
|
|
3879
4067
|
e,
|
|
3880
4068
|
{
|
|
3881
|
-
baseUrl:
|
|
3882
|
-
withXsrfToken:
|
|
4069
|
+
baseUrl: V.spelling("baseURL"),
|
|
4070
|
+
withXsrfToken: V.spelling("withXSRFToken")
|
|
3883
4071
|
},
|
|
3884
4072
|
!0
|
|
3885
4073
|
), e.method = (e.method || this.defaults.method || "get").toLowerCase();
|
|
3886
4074
|
let a = s && h.merge(s.common, s[e.method]);
|
|
3887
|
-
s && h.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (
|
|
3888
|
-
delete s[
|
|
3889
|
-
}), e.headers =
|
|
4075
|
+
s && h.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (w) => {
|
|
4076
|
+
delete s[w];
|
|
4077
|
+
}), e.headers = M.concat(a, s);
|
|
3890
4078
|
const o = [];
|
|
3891
4079
|
let c = !0;
|
|
3892
|
-
this.interceptors.request.forEach(function(
|
|
3893
|
-
if (typeof
|
|
4080
|
+
this.interceptors.request.forEach(function(E) {
|
|
4081
|
+
if (typeof E.runWhen == "function" && E.runWhen(e) === !1)
|
|
3894
4082
|
return;
|
|
3895
|
-
c = c &&
|
|
3896
|
-
const
|
|
3897
|
-
|
|
4083
|
+
c = c && E.synchronous;
|
|
4084
|
+
const y = e.transitional || Se;
|
|
4085
|
+
y && y.legacyInterceptorReqResOrdering ? o.unshift(E.fulfilled, E.rejected) : o.push(E.fulfilled, E.rejected);
|
|
3898
4086
|
});
|
|
3899
4087
|
const u = [];
|
|
3900
|
-
this.interceptors.response.forEach(function(
|
|
3901
|
-
u.push(
|
|
4088
|
+
this.interceptors.response.forEach(function(E) {
|
|
4089
|
+
u.push(E.fulfilled, E.rejected);
|
|
3902
4090
|
});
|
|
3903
4091
|
let l, f = 0, d;
|
|
3904
4092
|
if (!c) {
|
|
3905
|
-
const
|
|
3906
|
-
for (
|
|
3907
|
-
l = l.then(
|
|
4093
|
+
const w = [hn.bind(this), void 0];
|
|
4094
|
+
for (w.unshift(...o), w.push(...u), d = w.length, l = Promise.resolve(e); f < d; )
|
|
4095
|
+
l = l.then(w[f++], w[f++]);
|
|
3908
4096
|
return l;
|
|
3909
4097
|
}
|
|
3910
4098
|
d = o.length;
|
|
3911
4099
|
let g = e;
|
|
3912
4100
|
for (; f < d; ) {
|
|
3913
|
-
const
|
|
4101
|
+
const w = o[f++], E = o[f++];
|
|
3914
4102
|
try {
|
|
3915
|
-
g =
|
|
3916
|
-
} catch (
|
|
3917
|
-
|
|
4103
|
+
g = w(g);
|
|
4104
|
+
} catch (y) {
|
|
4105
|
+
E.call(this, y);
|
|
3918
4106
|
break;
|
|
3919
4107
|
}
|
|
3920
4108
|
}
|
|
3921
4109
|
try {
|
|
3922
|
-
l =
|
|
3923
|
-
} catch (
|
|
3924
|
-
return Promise.reject(
|
|
4110
|
+
l = hn.call(this, g);
|
|
4111
|
+
} catch (w) {
|
|
4112
|
+
return Promise.reject(w);
|
|
3925
4113
|
}
|
|
3926
4114
|
for (f = 0, d = u.length; f < d; )
|
|
3927
4115
|
l = l.then(u[f++], u[f++]);
|
|
3928
4116
|
return l;
|
|
3929
4117
|
}
|
|
3930
4118
|
getUri(t) {
|
|
3931
|
-
t =
|
|
3932
|
-
const e =
|
|
3933
|
-
return
|
|
4119
|
+
t = dt(this.defaults, t);
|
|
4120
|
+
const e = Ln(t.baseURL, t.url, t.allowAbsoluteUrls, t);
|
|
4121
|
+
return In(e, t.params, t.paramsSerializer);
|
|
3934
4122
|
}
|
|
3935
4123
|
};
|
|
3936
4124
|
h.forEach(["delete", "get", "head", "options"], function(t) {
|
|
3937
|
-
|
|
4125
|
+
ft.prototype[t] = function(e, n) {
|
|
3938
4126
|
return this.request(
|
|
3939
|
-
|
|
4127
|
+
dt(n || {}, {
|
|
3940
4128
|
method: t,
|
|
3941
4129
|
url: e,
|
|
3942
|
-
data: (n
|
|
4130
|
+
data: n && h.hasOwnProp(n, "data") ? n.data : void 0
|
|
3943
4131
|
})
|
|
3944
4132
|
);
|
|
3945
4133
|
};
|
|
@@ -3948,7 +4136,7 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3948
4136
|
function e(n) {
|
|
3949
4137
|
return function(s, a, o) {
|
|
3950
4138
|
return this.request(
|
|
3951
|
-
|
|
4139
|
+
dt(o || {}, {
|
|
3952
4140
|
method: t,
|
|
3953
4141
|
headers: n ? {
|
|
3954
4142
|
"Content-Type": "multipart/form-data"
|
|
@@ -3959,9 +4147,9 @@ h.forEach(["post", "put", "patch", "query"], function(t) {
|
|
|
3959
4147
|
);
|
|
3960
4148
|
};
|
|
3961
4149
|
}
|
|
3962
|
-
|
|
4150
|
+
ft.prototype[t] = e(), t !== "query" && (ft.prototype[t + "Form"] = e(!0));
|
|
3963
4151
|
});
|
|
3964
|
-
let
|
|
4152
|
+
let Ss = class kn {
|
|
3965
4153
|
constructor(t) {
|
|
3966
4154
|
if (typeof t != "function")
|
|
3967
4155
|
throw new TypeError("executor must be a function.");
|
|
@@ -3985,7 +4173,7 @@ let Yr = class Tn {
|
|
|
3985
4173
|
n.unsubscribe(s);
|
|
3986
4174
|
}, a;
|
|
3987
4175
|
}, t(function(s, a, o) {
|
|
3988
|
-
n.reason || (n.reason = new
|
|
4176
|
+
n.reason || (n.reason = new Vt(s, a, o), e(n.reason));
|
|
3989
4177
|
});
|
|
3990
4178
|
}
|
|
3991
4179
|
/**
|
|
@@ -4027,22 +4215,22 @@ let Yr = class Tn {
|
|
|
4027
4215
|
static source() {
|
|
4028
4216
|
let t;
|
|
4029
4217
|
return {
|
|
4030
|
-
token: new
|
|
4218
|
+
token: new kn(function(r) {
|
|
4031
4219
|
t = r;
|
|
4032
4220
|
}),
|
|
4033
4221
|
cancel: t
|
|
4034
4222
|
};
|
|
4035
4223
|
}
|
|
4036
4224
|
};
|
|
4037
|
-
function
|
|
4225
|
+
function Ts(i) {
|
|
4038
4226
|
return function(e) {
|
|
4039
4227
|
return i.apply(null, e);
|
|
4040
4228
|
};
|
|
4041
4229
|
}
|
|
4042
|
-
function
|
|
4230
|
+
function As(i) {
|
|
4043
4231
|
return h.isObject(i) && i.isAxiosError === !0;
|
|
4044
4232
|
}
|
|
4045
|
-
const
|
|
4233
|
+
const be = {
|
|
4046
4234
|
Continue: 100,
|
|
4047
4235
|
SwitchingProtocols: 101,
|
|
4048
4236
|
Processing: 102,
|
|
@@ -4113,55 +4301,55 @@ const de = {
|
|
|
4113
4301
|
SslHandshakeFailed: 525,
|
|
4114
4302
|
InvalidSslCertificate: 526
|
|
4115
4303
|
};
|
|
4116
|
-
Object.entries(
|
|
4117
|
-
|
|
4304
|
+
Object.entries(be).forEach(([i, t]) => {
|
|
4305
|
+
be[t] = i;
|
|
4118
4306
|
});
|
|
4119
|
-
function
|
|
4120
|
-
const t = new
|
|
4121
|
-
return h.extend(e,
|
|
4122
|
-
return
|
|
4307
|
+
function jn(i) {
|
|
4308
|
+
const t = new ft(i), e = mn(ft.prototype.request, t);
|
|
4309
|
+
return h.extend(e, ft.prototype, t, { allOwnKeys: !0 }), h.extend(e, t, null, { allOwnKeys: !0 }), e.create = function(r) {
|
|
4310
|
+
return jn(dt(i, r));
|
|
4123
4311
|
}, e;
|
|
4124
4312
|
}
|
|
4125
|
-
const
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4313
|
+
const O = jn(Lt);
|
|
4314
|
+
O.Axios = ft;
|
|
4315
|
+
O.CanceledError = Vt;
|
|
4316
|
+
O.CancelToken = Ss;
|
|
4317
|
+
O.isCancel = xn;
|
|
4318
|
+
O.VERSION = Ae;
|
|
4319
|
+
O.toFormData = ie;
|
|
4320
|
+
O.AxiosError = m;
|
|
4321
|
+
O.Cancel = O.CanceledError;
|
|
4322
|
+
O.all = function(t) {
|
|
4135
4323
|
return Promise.all(t);
|
|
4136
4324
|
};
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4325
|
+
O.spread = Ts;
|
|
4326
|
+
O.isAxiosError = As;
|
|
4327
|
+
O.mergeConfig = dt;
|
|
4328
|
+
O.AxiosHeaders = M;
|
|
4329
|
+
O.formToJSON = (i) => Bn(h.isHTMLForm(i) ? new FormData(i) : i);
|
|
4330
|
+
O.getAdapter = Fn.getAdapter;
|
|
4331
|
+
O.HttpStatusCode = be;
|
|
4332
|
+
O.default = O;
|
|
4145
4333
|
const {
|
|
4146
|
-
Axios:
|
|
4147
|
-
AxiosError:
|
|
4148
|
-
CanceledError:
|
|
4149
|
-
isCancel:
|
|
4150
|
-
CancelToken:
|
|
4151
|
-
VERSION:
|
|
4152
|
-
all:
|
|
4153
|
-
Cancel:
|
|
4154
|
-
isAxiosError:
|
|
4155
|
-
spread:
|
|
4156
|
-
toFormData:
|
|
4157
|
-
AxiosHeaders:
|
|
4158
|
-
HttpStatusCode:
|
|
4159
|
-
formToJSON:
|
|
4160
|
-
getAdapter:
|
|
4161
|
-
mergeConfig:
|
|
4162
|
-
create:
|
|
4163
|
-
} =
|
|
4164
|
-
class
|
|
4334
|
+
Axios: Ns,
|
|
4335
|
+
AxiosError: Bs,
|
|
4336
|
+
CanceledError: xs,
|
|
4337
|
+
isCancel: Us,
|
|
4338
|
+
CancelToken: Ls,
|
|
4339
|
+
VERSION: Vs,
|
|
4340
|
+
all: Ms,
|
|
4341
|
+
Cancel: Fs,
|
|
4342
|
+
isAxiosError: ks,
|
|
4343
|
+
spread: js,
|
|
4344
|
+
toFormData: qs,
|
|
4345
|
+
AxiosHeaders: Hs,
|
|
4346
|
+
HttpStatusCode: Ks,
|
|
4347
|
+
formToJSON: Ws,
|
|
4348
|
+
getAdapter: Xs,
|
|
4349
|
+
mergeConfig: zs,
|
|
4350
|
+
create: Gs
|
|
4351
|
+
} = O;
|
|
4352
|
+
class $s extends Wn {
|
|
4165
4353
|
__pinPad__ = {
|
|
4166
4354
|
buffer: null,
|
|
4167
4355
|
about: {
|
|
@@ -4349,11 +4537,11 @@ class Ss extends On {
|
|
|
4349
4537
|
environment: "production",
|
|
4350
4538
|
socket: !1
|
|
4351
4539
|
}) {
|
|
4352
|
-
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !
|
|
4540
|
+
if (super({ filters: t, config_port: e, no_device: n, device_listen_on_channel: r, socket: c }), this.__internal__.device.type = "pinpad", !Xn())
|
|
4353
4541
|
throw new Error("Crypto not supported in this browser");
|
|
4354
|
-
if (
|
|
4542
|
+
if (Le.getCustom(this.typeDevice, n))
|
|
4355
4543
|
throw new Error(`Device ${this.typeDevice} ${n} already exists`);
|
|
4356
|
-
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(),
|
|
4544
|
+
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(), Le.add(this);
|
|
4357
4545
|
}
|
|
4358
4546
|
#A() {
|
|
4359
4547
|
const t = [
|
|
@@ -4496,7 +4684,7 @@ class Ss extends On {
|
|
|
4496
4684
|
e.length > 10 && e.includes("E93A10") && (this.__pinPad__.waiting.statusReadCardWaiting === "pending" && (this.__pinPad__.waiting.statusReadCardWaiting = "rejected"), this.dispatch("pp:error", { message: "Operation cancelled by user." }));
|
|
4497
4685
|
}
|
|
4498
4686
|
// @ts-expect-error parts is not used
|
|
4499
|
-
#
|
|
4687
|
+
#U(t, e) {
|
|
4500
4688
|
if (this.__pinPad__.about.model?.toLowerCase() === "vx520") {
|
|
4501
4689
|
if (e.length > 11)
|
|
4502
4690
|
if (e.includes("P59A00"))
|
|
@@ -4522,7 +4710,7 @@ class Ss extends On {
|
|
|
4522
4710
|
this.dispatch("pp:print", n);
|
|
4523
4711
|
}
|
|
4524
4712
|
}
|
|
4525
|
-
#
|
|
4713
|
+
#L(t, e) {
|
|
4526
4714
|
console.log(t, e);
|
|
4527
4715
|
}
|
|
4528
4716
|
#V(t, e) {
|
|
@@ -4564,13 +4752,13 @@ class Ss extends On {
|
|
|
4564
4752
|
e.name = "cancel pinpad", e.description = "response of cancel", e.no_code = 107;
|
|
4565
4753
|
break;
|
|
4566
4754
|
case "print":
|
|
4567
|
-
this.#
|
|
4755
|
+
this.#U(s, r), e.name = "print voucher", e.description = "response of print", e.no_code = 108;
|
|
4568
4756
|
break;
|
|
4569
4757
|
case "cancel-read-card":
|
|
4570
4758
|
this.#x(s, r), e.name = "cancel read card", e.description = "response of cancel read card", e.no_code = 109;
|
|
4571
4759
|
break;
|
|
4572
4760
|
case "code93":
|
|
4573
|
-
this.#
|
|
4761
|
+
this.#L(s, r), e.name = "code 93", e.description = "response of code 93", e.no_code = 110;
|
|
4574
4762
|
break;
|
|
4575
4763
|
case "finish-emv-end":
|
|
4576
4764
|
this.#V(s, r), e.name = "Finish EMV End", e.description = "response of finish EMV End", e.no_code = 111;
|
|
@@ -4668,7 +4856,7 @@ class Ss extends On {
|
|
|
4668
4856
|
// Updated to WS v4
|
|
4669
4857
|
// ========================================================================================
|
|
4670
4858
|
#s(t, e) {
|
|
4671
|
-
const n = new
|
|
4859
|
+
const n = new Ci();
|
|
4672
4860
|
return n.setPublicKey(t), n.encrypt(e);
|
|
4673
4861
|
}
|
|
4674
4862
|
#a(t) {
|
|
@@ -4765,7 +4953,7 @@ class Ss extends On {
|
|
|
4765
4953
|
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);
|
|
4766
4954
|
}
|
|
4767
4955
|
async #q(t = !1) {
|
|
4768
|
-
if (this.#
|
|
4956
|
+
if (this.#K(), this.__pinPad__.config.loginResponse && !t)
|
|
4769
4957
|
return await this.#p();
|
|
4770
4958
|
const e = this.url + this.__pinPad__.constants.uris.login, n = {
|
|
4771
4959
|
usuario: this.username,
|
|
@@ -4777,7 +4965,7 @@ class Ss extends On {
|
|
|
4777
4965
|
};
|
|
4778
4966
|
if (await this.#c(), this.#d())
|
|
4779
4967
|
throw new Error("Empty RSA Key");
|
|
4780
|
-
const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA || "", r), a = await this.#o(r, JSON.stringify(n)), o = await
|
|
4968
|
+
const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA || "", r), a = await this.#o(r, JSON.stringify(n)), o = await O.post(e, a, {
|
|
4781
4969
|
headers: {
|
|
4782
4970
|
"Content-Type": "application/json",
|
|
4783
4971
|
"cache-control": "no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0",
|
|
@@ -4806,9 +4994,9 @@ class Ss extends On {
|
|
|
4806
4994
|
} catch (t) {
|
|
4807
4995
|
console.log("Error getting position", t);
|
|
4808
4996
|
}
|
|
4809
|
-
return this.__pinPad__.config.otherLogin = {}, this.#
|
|
4997
|
+
return this.__pinPad__.config.otherLogin = {}, this.#H(this.__pinPad__.config.loginResponse), this.__pinPad__.config.otherLogin;
|
|
4810
4998
|
}
|
|
4811
|
-
#
|
|
4999
|
+
#H(t) {
|
|
4812
5000
|
let e = "", n = "";
|
|
4813
5001
|
t.xml?.ventaspropias?.merchant_currencyb && (e = t.xml.ventaspropias.merchant_currencyb), t.xml?.ventaspropias?.merchant_currencym && (n = t.xml.ventaspropias.merchant_currencym);
|
|
4814
5002
|
let r = t.xml?.emvReverso;
|
|
@@ -4828,7 +5016,7 @@ class Ss extends On {
|
|
|
4828
5016
|
executeReverse: r
|
|
4829
5017
|
};
|
|
4830
5018
|
}
|
|
4831
|
-
#
|
|
5019
|
+
#K() {
|
|
4832
5020
|
const t = localStorage.getItem("ppLoginResponse");
|
|
4833
5021
|
let e = null;
|
|
4834
5022
|
t && (e = JSON.parse(t), this.__pinPad__.config.loginResponse || (this.__pinPad__.config.loginResponse = e?.data), (/* @__PURE__ */ new Date()).getTime() - e?.timestamp >= 864e5 && (this.__pinPad__.config.loginResponse = null));
|
|
@@ -4837,7 +5025,7 @@ class Ss extends On {
|
|
|
4837
5025
|
return await this.#q(t);
|
|
4838
5026
|
}
|
|
4839
5027
|
async #W() {
|
|
4840
|
-
const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await
|
|
5028
|
+
const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await O.get(t).catch((r) => {
|
|
4841
5029
|
throw new Error(`Error in request, verify internet connection: ${r.response.status} ${r.message}`);
|
|
4842
5030
|
});
|
|
4843
5031
|
if (!e) return "";
|
|
@@ -4873,7 +5061,7 @@ class Ss extends On {
|
|
|
4873
5061
|
return /^[A-Z-a-z0-9\s]+$/g.test(t);
|
|
4874
5062
|
}
|
|
4875
5063
|
#X(t) {
|
|
4876
|
-
if (
|
|
5064
|
+
if (J(t))
|
|
4877
5065
|
return !0;
|
|
4878
5066
|
const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
|
|
4879
5067
|
if (!e)
|
|
@@ -4921,12 +5109,12 @@ class Ss extends On {
|
|
|
4921
5109
|
const t = /* @__PURE__ */ new Date(), e = t.getDate().toString().padStart(2, "0"), n = (t.getMonth() + 1).toString().padStart(2, "0"), r = t.getFullYear().toString().substring(2);
|
|
4922
5110
|
return e + n + r;
|
|
4923
5111
|
}
|
|
4924
|
-
#
|
|
5112
|
+
#w() {
|
|
4925
5113
|
const t = /* @__PURE__ */ new Date(), e = t.getHours().toString().padStart(2, "0"), n = t.getMinutes().toString().padStart(2, "0");
|
|
4926
5114
|
return e + n;
|
|
4927
5115
|
}
|
|
4928
5116
|
async checkPositionPermission() {
|
|
4929
|
-
if (!
|
|
5117
|
+
if (!xe())
|
|
4930
5118
|
throw new Error("Geolocation not supported");
|
|
4931
5119
|
return new Promise((t, e) => {
|
|
4932
5120
|
navigator.permissions.query({ name: "geolocation" }).then((n) => {
|
|
@@ -4955,7 +5143,7 @@ class Ss extends On {
|
|
|
4955
5143
|
} catch {
|
|
4956
5144
|
localStorage.removeItem(t);
|
|
4957
5145
|
}
|
|
4958
|
-
return
|
|
5146
|
+
return xe() ? new Promise((r) => {
|
|
4959
5147
|
navigator.permissions.query({ name: "geolocation" }).then((s) => {
|
|
4960
5148
|
s.state === "granted" ? navigator.geolocation.getCurrentPosition(
|
|
4961
5149
|
(a) => {
|
|
@@ -4995,7 +5183,7 @@ class Ss extends On {
|
|
|
4995
5183
|
localStorage.removeItem("ppPublicIP");
|
|
4996
5184
|
}
|
|
4997
5185
|
let s = !1;
|
|
4998
|
-
const a = await
|
|
5186
|
+
const a = await O.get("https://api.ipify.org?format=json").catch(() => s = !0);
|
|
4999
5187
|
if (s || typeof a != "object" || !a || !a.data)
|
|
5000
5188
|
return r && n ? this.__pinPad__.config.publicIP : (this.__pinPad__.config.publicIP = null, null);
|
|
5001
5189
|
const o = a.data || {};
|
|
@@ -5041,7 +5229,7 @@ class Ss extends On {
|
|
|
5041
5229
|
async #r(t, e) {
|
|
5042
5230
|
await this.#c();
|
|
5043
5231
|
const n = this.#a(32), r = this.#s(this.__pinPad__.config.publicKeyRSA || "", n), s = await this.#o(n, JSON.stringify(e));
|
|
5044
|
-
return (await
|
|
5232
|
+
return (await O.post(t, s, {
|
|
5045
5233
|
headers: {
|
|
5046
5234
|
"Content-Type": "application/json",
|
|
5047
5235
|
"cache-control": "no-cache",
|
|
@@ -5075,14 +5263,14 @@ class Ss extends On {
|
|
|
5075
5263
|
// this.dispatch('pp:merchant-moto', response);
|
|
5076
5264
|
// return response;
|
|
5077
5265
|
// }
|
|
5078
|
-
async #
|
|
5266
|
+
async #E({ data: t, url: e, cancelable: n = !1 } = {
|
|
5079
5267
|
data: null,
|
|
5080
5268
|
url: "",
|
|
5081
5269
|
cancelable: !1
|
|
5082
5270
|
}) {
|
|
5083
5271
|
await this.#c();
|
|
5084
5272
|
const r = this.#a(32), s = this.#s(this.__pinPad__.config.publicKeyRSA || "", r), a = await this.#o(r, JSON.stringify(t)), o = this;
|
|
5085
|
-
return (await
|
|
5273
|
+
return (await O.post(e, a, {
|
|
5086
5274
|
headers: {
|
|
5087
5275
|
"Content-Type": "application/json",
|
|
5088
5276
|
"cache-control": "no-cache",
|
|
@@ -5107,7 +5295,7 @@ class Ss extends On {
|
|
|
5107
5295
|
}
|
|
5108
5296
|
async #J() {
|
|
5109
5297
|
this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
|
|
5110
|
-
const t = await this.#
|
|
5298
|
+
const t = await this.#E({
|
|
5111
5299
|
data: {
|
|
5112
5300
|
accion: "tipoPagoInfo",
|
|
5113
5301
|
cc_num: this.__pinPad__.operation.bin,
|
|
@@ -5136,7 +5324,7 @@ class Ss extends On {
|
|
|
5136
5324
|
if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
|
|
5137
5325
|
const e = this.__pinPad__.constants.STX, n = this.__pinPad__.constants.ETX;
|
|
5138
5326
|
let r = "C56AABOUT";
|
|
5139
|
-
if (r = e + this.#e(r) + r + n, r = r + this.#n(r),
|
|
5327
|
+
if (r = e + this.#e(r) + r + n, r = r + this.#n(r), J(this.__pinPad__.about.pp)) {
|
|
5140
5328
|
this.__pinPad__.waiting.statusAboutWaiting = "pending";
|
|
5141
5329
|
const a = this.parseStringToBytes(r, "");
|
|
5142
5330
|
await this.appendToQueue(a, "about");
|
|
@@ -5146,7 +5334,7 @@ class Ss extends On {
|
|
|
5146
5334
|
return new Promise((a, o) => {
|
|
5147
5335
|
s = setInterval(() => {
|
|
5148
5336
|
if (this.__pinPad__.waiting.statusAboutWaiting === "resolved") {
|
|
5149
|
-
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null,
|
|
5337
|
+
if (clearInterval(s), this.__pinPad__.waiting.statusAboutWaiting = null, J(this.__pinPad__.about.pp))
|
|
5150
5338
|
return;
|
|
5151
5339
|
if (!t || typeof t != "function") {
|
|
5152
5340
|
a(!0);
|
|
@@ -5162,15 +5350,15 @@ class Ss extends On {
|
|
|
5162
5350
|
});
|
|
5163
5351
|
}
|
|
5164
5352
|
async #h(t, e) {
|
|
5165
|
-
if (t = t ? t.toString() : "", e = e ? e.toString() : "",
|
|
5353
|
+
if (t = t ? t.toString() : "", e = e ? e.toString() : "", J(t) || t === "0") {
|
|
5166
5354
|
this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
|
|
5167
5355
|
return;
|
|
5168
5356
|
}
|
|
5169
|
-
if (
|
|
5357
|
+
if (J(e) || e === "1") {
|
|
5170
5358
|
this.dispatch("pp:dukpt", { status: "charged", already: !0 });
|
|
5171
5359
|
return;
|
|
5172
5360
|
}
|
|
5173
|
-
const n = this.#P(), r = this.#
|
|
5361
|
+
const n = this.#P(), r = this.#w(), s = this.__pinPad__.constants.FS, a = this.__pinPad__.constants.ETX, o = this.__pinPad__.constants.STX;
|
|
5174
5362
|
let c = "C91A" + n + s + "B" + r;
|
|
5175
5363
|
c = o + this.#e(c) + c + a, c = c + this.#n(c);
|
|
5176
5364
|
const u = this.parseStringToBytes(c, "");
|
|
@@ -5194,7 +5382,7 @@ class Ss extends On {
|
|
|
5194
5382
|
},
|
|
5195
5383
|
terminal: this.__pinPad__.config.terminal
|
|
5196
5384
|
}
|
|
5197
|
-
}, e = await this.#
|
|
5385
|
+
}, e = await this.#E({
|
|
5198
5386
|
data: t,
|
|
5199
5387
|
url: this.url + this.__pinPad__.constants.uris.keysDUKPT
|
|
5200
5388
|
});
|
|
@@ -5231,7 +5419,7 @@ class Ss extends On {
|
|
|
5231
5419
|
async #tt() {
|
|
5232
5420
|
this.__pinPad__.operation.errors = 0;
|
|
5233
5421
|
let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
|
|
5234
|
-
if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model?.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"),
|
|
5422
|
+
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)))
|
|
5235
5423
|
throw new Error("Amount required");
|
|
5236
5424
|
if (parseFloat(this.amount) <= 0)
|
|
5237
5425
|
throw new Error("Amount must be greater than 0");
|
|
@@ -5241,7 +5429,7 @@ class Ss extends On {
|
|
|
5241
5429
|
throw new Error("Amount must be greater than 0");
|
|
5242
5430
|
const e = this.__pinPad__.constants.FS, n = this.__pinPad__.constants.STX, r = this.__pinPad__.constants.ETX;
|
|
5243
5431
|
let s = "C93A" + t;
|
|
5244
|
-
s = s + e + "B" + this.#P(), s = s + e + "C" + this.#
|
|
5432
|
+
s = s + e + "B" + this.#P(), s = s + e + "C" + this.#w(), s = s + e + "D" + this.#l(this.amount, 2), s = s + e + "E0.00", s = s + e + "F" + this.__pinPad__.config.currencyCode, this.__pinPad__.about.supportDUKPT && this.__pinPad__.about.supportDUKPT !== "0" && this.__pinPad__.about.supportDUKPT !== "false" && (this.__pinPad__.about.supportContactless ? (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "J" + this.__pinPad__.config.forceOnline, s = s + e + "K" + this.__pinPad__.about.supportContactless, s = s + e + "L" + this.__pinPad__.config.emvCard, this.__pinPad__.about.hasCashback && (s = s + e + "M0", s = s + e + "N00")) : (s = s + e + "G" + this.timeoutPinPad, s = s + e + "HTAGS", s = s + e + "I" + this.__pinPad__.config.requireCVVAmex, s = s + e + "L" + this.__pinPad__.config.emvCard), this.__pinPad__.about.supportInjection && (s = s + e + "O" + this.__pinPad__.config.validateQPS)), s = n + this.#e(s) + s + r, s = s + this.#n(s), this.#ht();
|
|
5245
5433
|
const a = this.parseStringToBytes(s, "");
|
|
5246
5434
|
await this.appendToQueue(a, "read-card");
|
|
5247
5435
|
let o = 0;
|
|
@@ -5258,14 +5446,14 @@ class Ss extends On {
|
|
|
5258
5446
|
});
|
|
5259
5447
|
}
|
|
5260
5448
|
async #et(t) {
|
|
5261
|
-
return await
|
|
5449
|
+
return await Ue(t * 1e3);
|
|
5262
5450
|
}
|
|
5263
5451
|
/**
|
|
5264
5452
|
* @param {null|string} reference
|
|
5265
5453
|
* @return {Promise<any>}
|
|
5266
5454
|
*/
|
|
5267
5455
|
async consult({ reference: t = null } = { reference: null }) {
|
|
5268
|
-
return t || (t = this.reference),
|
|
5456
|
+
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({
|
|
5269
5457
|
Ambiente: this.environment,
|
|
5270
5458
|
User: this.username,
|
|
5271
5459
|
Pwd: this.password,
|
|
@@ -5305,7 +5493,7 @@ class Ss extends On {
|
|
|
5305
5493
|
), await this.#et(5)), await this.#c();
|
|
5306
5494
|
const s = this.#a(32), a = this.#s(this.__pinPad__.config.publicKeyRSA || "", s), o = await this.#o(s, JSON.stringify(e));
|
|
5307
5495
|
let c = !1;
|
|
5308
|
-
const u = await
|
|
5496
|
+
const u = await O.post(t, o, {
|
|
5309
5497
|
headers: {
|
|
5310
5498
|
"Content-Type": "application/json",
|
|
5311
5499
|
data: a || ""
|
|
@@ -5327,7 +5515,7 @@ class Ss extends On {
|
|
|
5327
5515
|
return r ? Promise.reject(r) : Promise.reject("Communication error with CDP. IL/MTY");
|
|
5328
5516
|
}
|
|
5329
5517
|
#rt(t) {
|
|
5330
|
-
if (
|
|
5518
|
+
if (J(t)) throw new Error("Number of authorization invalid");
|
|
5331
5519
|
if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
|
|
5332
5520
|
if (t.length !== 6) throw new Error("Number of authorization invalid");
|
|
5333
5521
|
return !0;
|
|
@@ -5626,7 +5814,7 @@ class Ss extends On {
|
|
|
5626
5814
|
this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5627
5815
|
else {
|
|
5628
5816
|
const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
|
|
5629
|
-
await this.appendToQueue(t, "code93"), await
|
|
5817
|
+
await this.appendToQueue(t, "code93"), await Ue(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
|
|
5630
5818
|
}
|
|
5631
5819
|
}
|
|
5632
5820
|
#T(t) {
|
|
@@ -5728,7 +5916,7 @@ class Ss extends On {
|
|
|
5728
5916
|
} = {}) {
|
|
5729
5917
|
if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
|
|
5730
5918
|
throw new Error("Amount is required and must be greater than 0");
|
|
5731
|
-
if (this.amount = t, (!e ||
|
|
5919
|
+
if (this.amount = t, (!e || J(e)) && (e = this.createReference()), !e || J(e) || !this.#g(e))
|
|
5732
5920
|
throw new Error("Reference is required and must be alphanumeric");
|
|
5733
5921
|
if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
|
|
5734
5922
|
throw new Error("Invalid currency");
|
|
@@ -5756,5 +5944,5 @@ class Ss extends On {
|
|
|
5756
5944
|
}
|
|
5757
5945
|
}
|
|
5758
5946
|
export {
|
|
5759
|
-
|
|
5947
|
+
$s as PinPad
|
|
5760
5948
|
};
|