首先找到这个请求接口
这个接口就是我们请求翻译的接口 发现有个sign值,这就是我们需要逆向的值
再看看这个接口的响应
可以发现这个响应是被加密的,我们还需要去逆向解密这个被加密的响应,这篇就单纯讲一下逆向这个sign值把
查看调用堆栈
下断点,一步步跟栈发现了sign的生成位置
进入这个k函数看看sign是由S函数生成的
S调用了_函数
发现 _ 这个函数内部调用了r 又发现r其实是个webpack打包打导出函数
我们进去r.createHash 函数看看
发现 如果传入的参数是md5 他会返回 一个new i 对象 那就简单了 我们看看i这个构造函数在哪就OK了
继续跟进看看i这个构造函数
发现这个构造函数就是88276这个打包模块里面的s函数
接下来就模仿webpack把函数copy下来就行了
我逆向sign完整代码如下
点击查看代码
window=global;
;;(function() {
var e = {
48287: function(e, t, n) {
"use strict";
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
var r = n(67526)
, i = n(251)
, o = "function" === typeof Symbol && "function" === typeof Symbol["for"] ? Symbol["for"]("nodejs.util.inspect.custom") : null;
t.Buffer = u,
t.SlowBuffer = w,
t.INSPECT_MAX_BYTES = 50;
var a = 2147483647;
function s() {
try {
var e = new Uint8Array(1)
, t = {
foo: function() {
return 42
}
};
return Object.setPrototypeOf(t, Uint8Array.prototype),
Object.setPrototypeOf(e, t),
42 === e.foo()
} catch (n) {
return !1
}
}
function l(e) {
if (e > a)
throw new RangeError('The value "' + e + '" is invalid for option "size"');
var t = new Uint8Array(e);
return Object.setPrototypeOf(t, u.prototype),
t
}
function u(e, t, n) {
if ("number" === typeof e) {
if ("string" === typeof t)
throw new TypeError('The "string" argument must be of type string. Received type number');
return h(e)
}
return c(e, t, n)
}
function c(e, t, n) {
if ("string" === typeof e)
return p(e, t);
if (ArrayBuffer.isView(e))
return m(e);
if (null == e)
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
if (Z(e, ArrayBuffer) || e && Z(e.buffer, ArrayBuffer))
return g(e, t, n);
if ("undefined" !== typeof SharedArrayBuffer && (Z(e, SharedArrayBuffer) || e && Z(e.buffer, SharedArrayBuffer)))
return g(e, t, n);
if ("number" === typeof e)
throw new TypeError('The "value" argument must not be of type number. Received type number');
var r = e.valueOf && e.valueOf();
if (null != r && r !== e)
return u.from(r, t, n);
var i = y(e);
if (i)
return i;
if ("undefined" !== typeof Symbol && null != Symbol.toPrimitive && "function" === typeof e[Symbol.toPrimitive])
return u.from(e[Symbol.toPrimitive]("string"), t, n);
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e)
}
function d(e) {
if ("number" !== typeof e)
throw new TypeError('"size" argument must be of type number');
if (e < 0)
throw new RangeError('The value "' + e + '" is invalid for option "size"')
}
function f(e, t, n) {
return d(e),
e <= 0 ? l(e) : void 0 !== t ? "string" === typeof n ? l(e).fill(t, n) : l(e).fill(t) : l(e)
}
function h(e) {
return d(e),
l(e < 0 ? 0 : 0 | b(e))
}
function p(e, t) {
if ("string" === typeof t && "" !== t || (t = "utf8"),
!u.isEncoding(t))
throw new TypeError("Unknown encoding: " + t);
var n = 0 | R(e, t)
, r = l(n)
, i = r.write(e, t);
return i !== n && (r = r.slice(0, i)),
r
}
function v(e) {
for (var t = e.length < 0 ? 0 : 0 | b(e.length), n = l(t), r = 0; r < t; r += 1)
n[r] = 255 & e[r];
return n
}
function m(e) {
if (Z(e, Uint8Array)) {
var t = new Uint8Array(e);
return g(t.buffer, t.byteOffset, t.byteLength)
}
return v(e)
}
function g(e, t, n) {
if (t < 0 || e.byteLength < t)
throw new RangeError('"offset" is outside of buffer bounds');
if (e.byteLength < t + (n || 0))
throw new RangeError('"length" is outside of buffer bounds');
var r;
return r = void 0 === t && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e,t) : new Uint8Array(e,t,n),
Object.setPrototypeOf(r, u.prototype),
r
}
function y(e) {
if (u.isBuffer(e)) {
var t = 0 | b(e.length)
, n = l(t);
return 0 === n.length || e.copy(n, 0, 0, t),
n
}
return void 0 !== e.length ? "number" !== typeof e.length || J(e.length) ? l(0) : v(e) : "Buffer" === e.type && Array.isArray(e.data) ? v(e.data) : void 0
}
function b(e) {
if (e >= a)
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a.toString(16) + " bytes");
return 0 | e
}
function w(e) {
return +e != e && (e = 0),
u.alloc(+e)
}
function R(e, t) {
if (u.isBuffer(e))
return e.length;
if (ArrayBuffer.isView(e) || Z(e, ArrayBuffer))
return e.byteLength;
if ("string" !== typeof e)
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);
var n = e.length
, r = arguments.length > 2 && !0 === arguments[2];
if (!r && 0 === n)
return 0;
for (var i = !1; ; )
switch (t) {
case "ascii":
case "latin1":
case "binary":
return n;
case "utf8":
case "utf-8":
return q(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return 2 * n;
case "hex":
return n >>> 1;
case "base64":
return Q(e).length;
default:
if (i)
return r ? -1 : q(e).length;
t = ("" + t).toLowerCase(),
i = !0
}
}
function M(e, t, n) {
var r = !1;
if ((void 0 === t || t < 0) && (t = 0),
t > this.length)
return "";
if ((void 0 === n || n > this.length) && (n = this.length),
n <= 0)
return "";
if (n >>>= 0,
t >>>= 0,
n <= t)
return "";
e || (e = "utf8");
while (1)
switch (e) {
case "hex":
return j(this, t, n);
case "utf8":
case "utf-8":
return T(this, t, n);
case "ascii":
return N(this, t, n);
case "latin1":
case "binary":
return D(this, t, n);
case "base64":
return B(this, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return z(this, t, n);
default:
if (r)
throw new TypeError("Unknown encoding: " + e);
e = (e + "").toLowerCase(),
r = !0
}
}
function x(e, t, n) {
var r = e[t];
e[t] = e[n],
e[n] = r
}
function E(e, t, n, r, i) {
if (0 === e.length)
return -1;
if ("string" === typeof n ? (r = n,
n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648),
n = +n,
J(n) && (n = i ? 0 : e.length - 1),
n < 0 && (n = e.length + n),
n >= e.length) {
if (i)
return -1;
n = e.length - 1
} else if (n < 0) {
if (!i)
return -1;
n = 0
}
if ("string" === typeof t && (t = u.from(t, r)),
u.isBuffer(t))
return 0 === t.length ? -1 : k(e, t, n, r, i);
if ("number" === typeof t)
return t &= 255,
"function" === typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : k(e, [t], n, r, i);
throw new TypeError("val must be string, number or Buffer")
}
function k(e, t, n, r, i) {
var o, a = 1, s = e.length, l = t.length;
if (void 0 !== r && (r = String(r).toLowerCase(),
"ucs2" === r || "ucs-2" === r || "utf16le" === r || "utf-16le" === r)) {
if (e.length < 2 || t.length < 2)
return -1;
a = 2,
s /= 2,
l /= 2,
n /= 2
}
function u(e, t) {
return 1 === a ? e[t] : e.readUInt16BE(t * a)
}
if (i) {
var c = -1;
for (o = n; o < s; o++)
if (u(e, o) === u(t, -1 === c ? 0 : o - c)) {
if (-1 === c && (c = o),
o - c + 1 === l)
return c * a
} else
-1 !== c && (o -= o - c),
c = -1
} else
for (n + l > s && (n = s - l),
o = n; o >= 0; o--) {
for (var d = !0, f = 0; f < l; f++)
if (u(e, o + f) !== u(t, f)) {
d = !1;
break
}
if (d)
return o
}
return -1
}
function A(e, t, n, r) {
n = Number(n) || 0;
var i = e.length - n;
r ? (r = Number(r),
r > i && (r = i)) : r = i;
var o = t.length;
r > o / 2 && (r = o / 2);
for (var a = 0; a < r; ++a) {
var s = parseInt(t.substr(2 * a, 2), 16);
if (J(s))
return a;
e[n + a] = s
}
return a
}
function C(e, t, n, r) {
return Y(q(t, e.length - n), e, n, r)
}
function S(e, t, n, r) {
return Y(_(t), e, n, r)
}
function O(e, t, n, r) {
return Y(Q(t), e, n, r)
}
function P(e, t, n, r) {
return Y(G(t, e.length - n), e, n, r)
}
function B(e, t, n) {
return 0 === t && n === e.length ? r.fromByteArray(e) : r.fromByteArray(e.slice(t, n))
}
function T(e, t, n) {
n = Math.min(e.length, n);
var r = []
, i = t;
while (i < n) {
var o, a, s, l, u = e[i], c = null, d = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
if (i + d <= n)
switch (d) {
case 1:
u < 128 && (c = u);
break;
case 2:
o = e[i + 1],
128 === (192 & o) && (l = (31 & u) << 6 | 63 & o,
l > 127 && (c = l));
break;
case 3:
o = e[i + 1],
a = e[i + 2],
128 === (192 & o) && 128 === (192 & a) && (l = (15 & u) << 12 | (63 & o) << 6 | 63 & a,
l > 2047 && (l < 55296 || l > 57343) && (c = l));
break;
case 4:
o = e[i + 1],
a = e[i + 2],
s = e[i + 3],
128 === (192 & o) && 128 === (192 & a) && 128 === (192 & s) && (l = (15 & u) << 18 | (63 & o) << 12 | (63 & a) << 6 | 63 & s,
l > 65535 && l < 1114112 && (c = l))
}
null === c ? (c = 65533,
d = 1) : c > 65535 && (c -= 65536,
r.push(c >>> 10 & 1023 | 55296),
c = 56320 | 1023 & c),
r.push(c),
i += d
}
return I(r)
}
t.kMaxLength = a,
u.TYPED_ARRAY_SUPPORT = s(),
u.TYPED_ARRAY_SUPPORT || "undefined" === typeof console || "function" !== typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),
Object.defineProperty(u.prototype, "parent", {
enumerable: !0,
get: function() {
if (u.isBuffer(this))
return this.buffer
}
}),
Object.defineProperty(u.prototype, "offset", {
enumerable: !0,
get: function() {
if (u.isBuffer(this))
return this.byteOffset
}
}),
u.poolSize = 8192,
u.from = function(e, t, n) {
return c(e, t, n)
}
,
Object.setPrototypeOf(u.prototype, Uint8Array.prototype),
Object.setPrototypeOf(u, Uint8Array),
u.alloc = function(e, t, n) {
return f(e, t, n)
}
,
u.allocUnsafe = function(e) {
return h(e)
}
,
u.allocUnsafeSlow = function(e) {
return h(e)
}
,
u.isBuffer = function(e) {
return null != e && !0 === e._isBuffer && e !== u.prototype
}
,
u.compare = function(e, t) {
if (Z(e, Uint8Array) && (e = u.from(e, e.offset, e.byteLength)),
Z(t, Uint8Array) && (t = u.from(t, t.offset, t.byteLength)),
!u.isBuffer(e) || !u.isBuffer(t))
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
if (e === t)
return 0;
for (var n = e.length, r = t.length, i = 0, o = Math.min(n, r); i < o; ++i)
if (e[i] !== t[i]) {
n = e[i],
r = t[i];
break
}
return n < r ? -1 : r < n ? 1 : 0
}
,
u.isEncoding = function(e) {
switch (String(e).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1
}
}
,
u.concat = function(e, t) {
if (!Array.isArray(e))
throw new TypeError('"list" argument must be an Array of Buffers');
if (0 === e.length)
return u.alloc(0);
var n;
if (void 0 === t)
for (t = 0,
n = 0; n < e.length; ++n)
t += e[n].length;
var r = u.allocUnsafe(t)
, i = 0;
for (n = 0; n < e.length; ++n) {
var o = e[n];
if (Z(o, Uint8Array))
i + o.length > r.length ? u.from(o).copy(r, i) : Uint8Array.prototype.set.call(r, o, i);
else {
if (!u.isBuffer(o))
throw new TypeError('"list" argument must be an Array of Buffers');
o.copy(r, i)
}
i += o.length
}
return r
}
,
u.byteLength = R,
u.prototype._isBuffer = !0,
u.prototype.swap16 = function() {
var e = this.length;
if (e % 2 !== 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (var t = 0; t < e; t += 2)
x(this, t, t + 1);
return this
}
,
u.prototype.swap32 = function() {
var e = this.length;
if (e % 4 !== 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (var t = 0; t < e; t += 4)
x(this, t, t + 3),
x(this, t + 1, t + 2);
return this
}
,
u.prototype.swap64 = function() {
var e = this.length;
if (e % 8 !== 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (var t = 0; t < e; t += 8)
x(this, t, t + 7),
x(this, t + 1, t + 6),
x(this, t + 2, t + 5),
x(this, t + 3, t + 4);
return this
}
,
u.prototype.toString = function() {
var e = this.length;
return 0 === e ? "" : 0 === arguments.length ? T(this, 0, e) : M.apply(this, arguments)
}
,
u.prototype.toLocaleString = u.prototype.toString,
u.prototype.equals = function(e) {
if (!u.isBuffer(e))
throw new TypeError("Argument must be a Buffer");
return this === e || 0 === u.compare(this, e)
}
,
u.prototype.inspect = function() {
var e = ""
, n = t.INSPECT_MAX_BYTES;
return e = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(),
this.length > n && (e += " ... "),
"<Buffer " + e + ">"
}
,
o && (u.prototype[o] = u.prototype.inspect),
u.prototype.compare = function(e, t, n, r, i) {
if (Z(e, Uint8Array) && (e = u.from(e, e.offset, e.byteLength)),
!u.isBuffer(e))
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);
if (void 0 === t && (t = 0),
void 0 === n && (n = e ? e.length : 0),
void 0 === r && (r = 0),
void 0 === i && (i = this.length),
t < 0 || n > e.length || r < 0 || i > this.length)
throw new RangeError("out of range index");
if (r >= i && t >= n)
return 0;
if (r >= i)
return -1;
if (t >= n)
return 1;
if (t >>>= 0,
n >>>= 0,
r >>>= 0,
i >>>= 0,
this === e)
return 0;
for (var o = i - r, a = n - t, s = Math.min(o, a), l = this.slice(r, i), c = e.slice(t, n), d = 0; d < s; ++d)
if (l[d] !== c[d]) {
o = l[d],
a = c[d];
break
}
return o < a ? -1 : a < o ? 1 : 0
}
,
u.prototype.includes = function(e, t, n) {
return -1 !== this.indexOf(e, t, n)
}
,
u.prototype.indexOf = function(e, t, n) {
return E(this, e, t, n, !0)
}
,
u.prototype.lastIndexOf = function(e, t, n) {
return E(this, e, t, n, !1)
}
,
u.prototype.write = function(e, t, n, r) {
if (void 0 === t)
r = "utf8",
n = this.length,
t = 0;
else if (void 0 === n && "string" === typeof t)
r = t,
n = this.length,
t = 0;
else {
if (!isFinite(t))
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
t >>>= 0,
isFinite(n) ? (n >>>= 0,
void 0 === r && (r = "utf8")) : (r = n,
n = void 0)
}
var i = this.length - t;
if ((void 0 === n || n > i) && (n = i),
e.length > 0 && (n < 0 || t < 0) || t > this.length)
throw new RangeError("Attempt to write outside buffer bounds");
r || (r = "utf8");
for (var o = !1; ; )
switch (r) {
case "hex":
return A(this, e, t, n);
case "utf8":
case "utf-8":
return C(this, e, t, n);
case "ascii":
case "latin1":
case "binary":
return S(this, e, t, n);
case "base64":
return O(this, e, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return P(this, e, t, n);
default:
if (o)
throw new TypeError("Unknown encoding: " + r);
r = ("" + r).toLowerCase(),
o = !0
}
}
,
u.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
;
var L = 4096;
function I(e) {
var t = e.length;
if (t <= L)
return String.fromCharCode.apply(String, e);
var n = ""
, r = 0;
while (r < t)
n += String.fromCharCode.apply(String, e.slice(r, r += L));
return n
}
function N(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(127 & e[i]);
return r
}
function D(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(e[i]);
return r
}
function j(e, t, n) {
var r = e.length;
(!t || t < 0) && (t = 0),
(!n || n < 0 || n > r) && (n = r);
for (var i = "", o = t; o < n; ++o)
i += $[e[o]];
return i
}
function z(e, t, n) {
for (var r = e.slice(t, n), i = "", o = 0; o < r.length - 1; o += 2)
i += String.fromCharCode(r[o] + 256 * r[o + 1]);
return i
}
function F(e, t, n) {
if (e % 1 !== 0 || e < 0)
throw new RangeError("offset is not uint");
if (e + t > n)
throw new RangeError("Trying to access beyond buffer length")
}
function H(e, t, n, r, i, o) {
if (!u.isBuffer(e))
throw new TypeError('"buffer" argument must be a Buffer instance');
if (t > i || t < o)
throw new RangeError('"value" argument is out of bounds');
if (n + r > e.length)
throw new RangeError("Index out of range")
}
function W(e, t, n, r, i, o) {
if (n + r > e.length)
throw new RangeError("Index out of range");
if (n < 0)
throw new RangeError("Index out of range")
}
function K(e, t, n, r, o) {
return t = +t,
n >>>= 0,
o || W(e, t, n, 4, 34028234663852886e22, -34028234663852886e22),
i.write(e, t, n, r, 23, 4),
n + 4
}
function X(e, t, n, r, o) {
return t = +t,
n >>>= 0,
o || W(e, t, n, 8, 17976931348623157e292, -17976931348623157e292),
i.write(e, t, n, r, 52, 8),
n + 8
}
u.prototype.slice = function(e, t) {
var n = this.length;
e = ~~e,
t = void 0 === t ? n : ~~t,
e < 0 ? (e += n,
e < 0 && (e = 0)) : e > n && (e = n),
t < 0 ? (t += n,
t < 0 && (t = 0)) : t > n && (t = n),
t < e && (t = e);
var r = this.subarray(e, t);
return Object.setPrototypeOf(r, u.prototype),
r
}
,
u.prototype.readUintLE = u.prototype.readUIntLE = function(e, t, n) {
e >>>= 0,
t >>>= 0,
n || F(e, t, this.length);
var r = this[e]
, i = 1
, o = 0;
while (++o < t && (i *= 256))
r += this[e + o] * i;
return r
}
,
u.prototype.readUintBE = u.prototype.readUIntBE = function(e, t, n) {
e >>>= 0,
t >>>= 0,
n || F(e, t, this.length);
var r = this[e + --t]
, i = 1;
while (t > 0 && (i *= 256))
r += this[e + --t] * i;
return r
}
,
u.prototype.readUint8 = u.prototype.readUInt8 = function(e, t) {
return e >>>= 0,
t || F(e, 1, this.length),
this[e]
}
,
u.prototype.readUint16LE = u.prototype.readUInt16LE = function(e, t) {
return e >>>= 0,
t || F(e, 2, this.length),
this[e] | this[e + 1] << 8
}
,
u.prototype.readUint16BE = u.prototype.readUInt16BE = function(e, t) {
return e >>>= 0,
t || F(e, 2, this.length),
this[e] << 8 | this[e + 1]
}
,
u.prototype.readUint32LE = u.prototype.readUInt32LE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
(this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
}
,
u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
}
,
u.prototype.readIntLE = function(e, t, n) {
e >>>= 0,
t >>>= 0,
n || F(e, t, this.length);
var r = this[e]
, i = 1
, o = 0;
while (++o < t && (i *= 256))
r += this[e + o] * i;
return i *= 128,
r >= i && (r -= Math.pow(2, 8 * t)),
r
}
,
u.prototype.readIntBE = function(e, t, n) {
e >>>= 0,
t >>>= 0,
n || F(e, t, this.length);
var r = t
, i = 1
, o = this[e + --r];
while (r > 0 && (i *= 256))
o += this[e + --r] * i;
return i *= 128,
o >= i && (o -= Math.pow(2, 8 * t)),
o
}
,
u.prototype.readInt8 = function(e, t) {
return e >>>= 0,
t || F(e, 1, this.length),
128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
}
,
u.prototype.readInt16LE = function(e, t) {
e >>>= 0,
t || F(e, 2, this.length);
var n = this[e] | this[e + 1] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
u.prototype.readInt16BE = function(e, t) {
e >>>= 0,
t || F(e, 2, this.length);
var n = this[e + 1] | this[e] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
u.prototype.readInt32LE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
}
,
u.prototype.readInt32BE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
}
,
u.prototype.readFloatLE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
i.read(this, e, !0, 23, 4)
}
,
u.prototype.readFloatBE = function(e, t) {
return e >>>= 0,
t || F(e, 4, this.length),
i.read(this, e, !1, 23, 4)
}
,
u.prototype.readDoubleLE = function(e, t) {
return e >>>= 0,
t || F(e, 8, this.length),
i.read(this, e, !0, 52, 8)
}
,
u.prototype.readDoubleBE = function(e, t) {
return e >>>= 0,
t || F(e, 8, this.length),
i.read(this, e, !1, 52, 8)
}
,
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(e, t, n, r) {
if (e = +e,
t >>>= 0,
n >>>= 0,
!r) {
var i = Math.pow(2, 8 * n) - 1;
H(this, e, t, n, i, 0)
}
var o = 1
, a = 0;
this[t] = 255 & e;
while (++a < n && (o *= 256))
this[t + a] = e / o & 255;
return t + n
}
,
u.prototype.writeUintBE = u.prototype.writeUIntBE = function(e, t, n, r) {
if (e = +e,
t >>>= 0,
n >>>= 0,
!r) {
var i = Math.pow(2, 8 * n) - 1;
H(this, e, t, n, i, 0)
}
var o = n - 1
, a = 1;
this[t + o] = 255 & e;
while (--o >= 0 && (a *= 256))
this[t + o] = e / a & 255;
return t + n
}
,
u.prototype.writeUint8 = u.prototype.writeUInt8 = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 1, 255, 0),
this[t] = 255 & e,
t + 1
}
,
u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 2, 65535, 0),
this[t] = 255 & e,
this[t + 1] = e >>> 8,
t + 2
}
,
u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 2, 65535, 0),
this[t] = e >>> 8,
this[t + 1] = 255 & e,
t + 2
}
,
u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 4, 4294967295, 0),
this[t + 3] = e >>> 24,
this[t + 2] = e >>> 16,
this[t + 1] = e >>> 8,
this[t] = 255 & e,
t + 4
}
,
u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 4, 4294967295, 0),
this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e,
t + 4
}
,
u.prototype.writeIntLE = function(e, t, n, r) {
if (e = +e,
t >>>= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
H(this, e, t, n, i - 1, -i)
}
var o = 0
, a = 1
, s = 0;
this[t] = 255 & e;
while (++o < n && (a *= 256))
e < 0 && 0 === s && 0 !== this[t + o - 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
u.prototype.writeIntBE = function(e, t, n, r) {
if (e = +e,
t >>>= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
H(this, e, t, n, i - 1, -i)
}
var o = n - 1
, a = 1
, s = 0;
this[t + o] = 255 & e;
while (--o >= 0 && (a *= 256))
e < 0 && 0 === s && 0 !== this[t + o + 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
u.prototype.writeInt8 = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 1, 127, -128),
e < 0 && (e = 255 + e + 1),
this[t] = 255 & e,
t + 1
}
,
u.prototype.writeInt16LE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 2, 32767, -32768),
this[t] = 255 & e,
this[t + 1] = e >>> 8,
t + 2
}
,
u.prototype.writeInt16BE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 2, 32767, -32768),
this[t] = e >>> 8,
this[t + 1] = 255 & e,
t + 2
}
,
u.prototype.writeInt32LE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 4, 2147483647, -2147483648),
this[t] = 255 & e,
this[t + 1] = e >>> 8,
this[t + 2] = e >>> 16,
this[t + 3] = e >>> 24,
t + 4
}
,
u.prototype.writeInt32BE = function(e, t, n) {
return e = +e,
t >>>= 0,
n || H(this, e, t, 4, 2147483647, -2147483648),
e < 0 && (e = 4294967295 + e + 1),
this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e,
t + 4
}
,
u.prototype.writeFloatLE = function(e, t, n) {
return K(this, e, t, !0, n)
}
,
u.prototype.writeFloatBE = function(e, t, n) {
return K(this, e, t, !1, n)
}
,
u.prototype.writeDoubleLE = function(e, t, n) {
return X(this, e, t, !0, n)
}
,
u.prototype.writeDoubleBE = function(e, t, n) {
return X(this, e, t, !1, n)
}
,
u.prototype.copy = function(e, t, n, r) {
if (!u.isBuffer(e))
throw new TypeError("argument should be a Buffer");
if (n || (n = 0),
r || 0 === r || (r = this.length),
t >= e.length && (t = e.length),
t || (t = 0),
r > 0 && r < n && (r = n),
r === n)
return 0;
if (0 === e.length || 0 === this.length)
return 0;
if (t < 0)
throw new RangeError("targetStart out of bounds");
if (n < 0 || n >= this.length)
throw new RangeError("Index out of range");
if (r < 0)
throw new RangeError("sourceEnd out of bounds");
r > this.length && (r = this.length),
e.length - t < r - n && (r = e.length - t + n);
var i = r - n;
return this === e && "function" === typeof Uint8Array.prototype.copyWithin ? this.copyWithin(t, n, r) : Uint8Array.prototype.set.call(e, this.subarray(n, r), t),
i
}
,
u.prototype.fill = function(e, t, n, r) {
if ("string" === typeof e) {
if ("string" === typeof t ? (r = t,
t = 0,
n = this.length) : "string" === typeof n && (r = n,
n = this.length),
void 0 !== r && "string" !== typeof r)
throw new TypeError("encoding must be a string");
if ("string" === typeof r && !u.isEncoding(r))
throw new TypeError("Unknown encoding: " + r);
if (1 === e.length) {
var i = e.charCodeAt(0);
("utf8" === r && i < 128 || "latin1" === r) && (e = i)
}
} else
"number" === typeof e ? e &= 255 : "boolean" === typeof e && (e = Number(e));
if (t < 0 || this.length < t || this.length < n)
throw new RangeError("Out of range index");
if (n <= t)
return this;
var o;
if (t >>>= 0,
n = void 0 === n ? this.length : n >>> 0,
e || (e = 0),
"number" === typeof e)
for (o = t; o < n; ++o)
this[o] = e;
else {
var a = u.isBuffer(e) ? e : u.from(e, r)
, s = a.length;
if (0 === s)
throw new TypeError('The value "' + e + '" is invalid for argument "value"');
for (o = 0; o < n - t; ++o)
this[o + t] = a[o % s]
}
return this
}
;
var V = /[^+/0-9A-Za-z-_]/g;
function U(e) {
if (e = e.split("=")[0],
e = e.trim().replace(V, ""),
e.length < 2)
return "";
while (e.length % 4 !== 0)
e += "=";
return e
}
function q(e, t) {
var n;
t = t || 1 / 0;
for (var r = e.length, i = null, o = [], a = 0; a < r; ++a) {
if (n = e.charCodeAt(a),
n > 55295 && n < 57344) {
if (!i) {
if (n > 56319) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
if (a + 1 === r) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
i = n;
continue
}
if (n < 56320) {
(t -= 3) > -1 && o.push(239, 191, 189),
i = n;
continue
}
n = 65536 + (i - 55296 << 10 | n - 56320)
} else
i && (t -= 3) > -1 && o.push(239, 191, 189);
if (i = null,
n < 128) {
if ((t -= 1) < 0)
break;
o.push(n)
} else if (n < 2048) {
if ((t -= 2) < 0)
break;
o.push(n >> 6 | 192, 63 & n | 128)
} else if (n < 65536) {
if ((t -= 3) < 0)
break;
o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
} else {
if (!(n < 1114112))
throw new Error("Invalid code point");
if ((t -= 4) < 0)
break;
o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
}
}
return o
}
function _(e) {
for (var t = [], n = 0; n < e.length; ++n)
t.push(255 & e.charCodeAt(n));
return t
}
function G(e, t) {
for (var n, r, i, o = [], a = 0; a < e.length; ++a) {
if ((t -= 2) < 0)
break;
n = e.charCodeAt(a),
r = n >> 8,
i = n % 256,
o.push(i),
o.push(r)
}
return o
}
function Q(e) {
return r.toByteArray(U(e))
}
function Y(e, t, n, r) {
for (var i = 0; i < r; ++i) {
if (i + n >= t.length || i >= e.length)
break;
t[i + n] = e[i]
}
return i
}
function Z(e, t) {
return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name
}
function J(e) {
return e !== e
}
var $ = function() {
for (var e = "0123456789abcdef", t = new Array(256), n = 0; n < 16; ++n)
for (var r = 16 * n, i = 0; i < 16; ++i)
t[r + i] = e[n] + e[i];
return t
}()
},
92861: function(e, t, n) {
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var r = n(48287)
, i = r.Buffer;
function o(e, t) {
for (var n in e)
t[n] = e[n]
}
function a(e, t, n) {
return i(e, t, n)
}
i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? e.exports = r : (o(r, t),
t.Buffer = a),
a.prototype = Object.create(i.prototype),
o(i, a),
a.from = function(e, t, n) {
if ("number" === typeof e)
throw new TypeError("Argument must not be a number");
return i(e, t, n)
}
,
a.alloc = function(e, t, n) {
if ("number" !== typeof e)
throw new TypeError("Argument must be a number");
var r = i(e);
return void 0 !== t ? "string" === typeof n ? r.fill(t, n) : r.fill(t) : r.fill(0),
r
}
,
a.allocUnsafe = function(e) {
if ("number" !== typeof e)
throw new TypeError("Argument must be a number");
return i(e)
}
,
a.allocUnsafeSlow = function(e) {
if ("number" !== typeof e)
throw new TypeError("Argument must be a number");
return r.SlowBuffer(e)
}
},
4729: function(e, t, n) {
"use strict";
var r = n(92861).Buffer
, i = n(28399).Transform
, o = n(56698);
function a(e, t) {
if (!r.isBuffer(e) && "string" !== typeof e)
throw new TypeError(t + " must be a string or a buffer")
}
function s(e) {
i.call(this),
this._block = r.allocUnsafe(e),
this._blockSize = e,
this._blockOffset = 0,
this._length = [0, 0, 0, 0],
this._finalized = !1
}
o(s, i),
s.prototype._transform = function(e, t, n) {
var r = null;
try {
this.update(e, t)
} catch (i) {
r = i
}
n(r)
}
,
s.prototype._flush = function(e) {
var t = null;
try {
this.push(this.digest())
} catch (n) {
t = n
}
e(t)
}
,
s.prototype.update = function(e, t) {
if (a(e, "Data"),
this._finalized)
throw new Error("Digest already called");
r.isBuffer(e) || (e = r.from(e, t));
var n = this._block
, i = 0;
while (this._blockOffset + e.length - i >= this._blockSize) {
for (var o = this._blockOffset; o < this._blockSize; )
n[o++] = e[i++];
this._update(),
this._blockOffset = 0
}
while (i < e.length)
n[this._blockOffset++] = e[i++];
for (var s = 0, l = 8 * e.length; l > 0; ++s)
this._length[s] += l,
l = this._length[s] / 4294967296 | 0,
l > 0 && (this._length[s] -= 4294967296 * l);
return this
}
,
s.prototype._update = function() {
throw new Error("_update is not implemented")
}
,
s.prototype.digest = function(e) {
if (this._finalized)
throw new Error("Digest already called");
this._finalized = !0;
var t = this._digest();
void 0 !== e && (t = t.toString(e)),
this._block.fill(0),
this._blockOffset = 0;
for (var n = 0; n < 4; ++n)
this._length[n] = 0;
return t
}
,
s.prototype._digest = function() {
throw new Error("_digest is not implemented")
}
,
e.exports = s
},
56698: function(e) {
"function" === typeof Object.create ? e.exports = function(e, t) {
t && (e.super_ = t,
e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}))
}
: e.exports = function(e, t) {
if (t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
}
},
67526: function(e, t) {
"use strict";
t.byteLength = u,
t.toByteArray = d,
t.fromByteArray = p;
for (var n = [], r = [], i = "undefined" !== typeof Uint8Array ? Uint8Array : Array, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, s = o.length; a < s; ++a)
n[a] = o[a],
r[o.charCodeAt(a)] = a;
function l(e) {
var t = e.length;
if (t % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
var n = e.indexOf("=");
-1 === n && (n = t);
var r = n === t ? 0 : 4 - n % 4;
return [n, r]
}
function u(e) {
var t = l(e)
, n = t[0]
, r = t[1];
return 3 * (n + r) / 4 - r
}
function c(e, t, n) {
return 3 * (t + n) / 4 - n
}
function d(e) {
var t, n, o = l(e), a = o[0], s = o[1], u = new i(c(e, a, s)), d = 0, f = s > 0 ? a - 4 : a;
for (n = 0; n < f; n += 4)
t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n + 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)],
u[d++] = t >> 16 & 255,
u[d++] = t >> 8 & 255,
u[d++] = 255 & t;
return 2 === s && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >> 4,
u[d++] = 255 & t),
1 === s && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2,
u[d++] = t >> 8 & 255,
u[d++] = 255 & t),
u
}
function f(e) {
return n[e >> 18 & 63] + n[e >> 12 & 63] + n[e >> 6 & 63] + n[63 & e]
}
function h(e, t, n) {
for (var r, i = [], o = t; o < n; o += 3)
r = (e[o] << 16 & 16711680) + (e[o + 1] << 8 & 65280) + (255 & e[o + 2]),
i.push(f(r));
return i.join("")
}
function p(e) {
for (var t, r = e.length, i = r % 3, o = [], a = 16383, s = 0, l = r - i; s < l; s += a)
o.push(h(e, s, s + a > l ? l : s + a));
return 1 === i ? (t = e[r - 1],
o.push(n[t >> 2] + n[t << 4 & 63] + "==")) : 2 === i && (t = (e[r - 2] << 8) + e[r - 1],
o.push(n[t >> 10] + n[t >> 4 & 63] + n[t << 2 & 63] + "=")),
o.join("")
}
r["-".charCodeAt(0)] = 62,
r["_".charCodeAt(0)] = 63
},
251: function(e, t) {
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read = function(e, t, n, r, i) {
var o, a, s = 8 * i - r - 1, l = (1 << s) - 1, u = l >> 1, c = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, h = e[t + d];
for (d += f,
o = h & (1 << -c) - 1,
h >>= -c,
c += s; c > 0; o = 256 * o + e[t + d],
d += f,
c -= 8)
;
for (a = o & (1 << -c) - 1,
o >>= -c,
c += r; c > 0; a = 256 * a + e[t + d],
d += f,
c -= 8)
;
if (0 === o)
o = 1 - u;
else {
if (o === l)
return a ? NaN : 1 / 0 * (h ? -1 : 1);
a += Math.pow(2, r),
o -= u
}
return (h ? -1 : 1) * a * Math.pow(2, o - r)
}
,
t.write = function(e, t, n, r, i, o) {
var a, s, l, u = 8 * o - i - 1, c = (1 << u) - 1, d = c >> 1, f = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, h = r ? 0 : o - 1, p = r ? 1 : -1, v = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
for (t = Math.abs(t),
isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0,
a = c) : (a = Math.floor(Math.log(t) / Math.LN2),
t * (l = Math.pow(2, -a)) < 1 && (a--,
l *= 2),
t += a + d >= 1 ? f / l : f * Math.pow(2, 1 - d),
t * l >= 2 && (a++,
l /= 2),
a + d >= c ? (s = 0,
a = c) : a + d >= 1 ? (s = (t * l - 1) * Math.pow(2, i),
a += d) : (s = t * Math.pow(2, d - 1) * Math.pow(2, i),
a = 0)); i >= 8; e[n + h] = 255 & s,
h += p,
s /= 256,
i -= 8)
;
for (a = a << i | s,
u += i; u > 0; e[n + h] = 255 & a,
h += p,
a /= 256,
u -= 8)
;
e[n + h - p] |= 128 * v
}
},
28399: function(e, t, n) {
t = e.exports = n(45412),
t.Stream = t,
t.Readable = t,
t.Writable = n(16708),
t.Duplex = n(25382),
t.Transform = n(74610),
t.PassThrough = n(63600),
t.finished = n(86238),
t.pipeline = n(57758)
},
45412: function(e, t, n) {
"use strict";
var r;
e.exports = S,
S.ReadableState = C;
n(37007).EventEmitter;
var i = function(e, t) {
return e.listeners(t).length
}
, o = n(40345)
, a = n(48287).Buffer
, s = ("undefined" !== typeof n.g ? n.g : "undefined" !== typeof window ? window : "undefined" !== typeof self ? self : {}).Uint8Array || function() {}
;
function l(e) {
return a.from(e)
}
function u(e) {
return a.isBuffer(e) || e instanceof s
}
var c, d = n(79838);
c = d && d.debuglog ? d.debuglog("stream") : function() {}
;
var f, h, p, v = n(80345), m = n(75896), g = n(65291), y = g.getHighWaterMark, b = n(86048).F, w = b.ERR_INVALID_ARG_TYPE, R = b.ERR_STREAM_PUSH_AFTER_EOF, M = b.ERR_METHOD_NOT_IMPLEMENTED, x = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
n(56698)(S, o);
var E = m.errorOrDestroy
, k = ["error", "close", "destroy", "pause", "resume"];
function A(e, t, n) {
if ("function" === typeof e.prependListener)
return e.prependListener(t, n);
e._events && e._events[t] ? Array.isArray(e._events[t]) ? e._events[t].unshift(n) : e._events[t] = [n, e._events[t]] : e.on(t, n)
}
function C(e, t, i) {
r = r || n(25382),
e = e || {},
"boolean" !== typeof i && (i = t instanceof r),
this.objectMode = !!e.objectMode,
i && (this.objectMode = this.objectMode || !!e.readableObjectMode),
this.highWaterMark = y(this, e, "readableHighWaterMark", i),
this.buffer = new v,
this.length = 0,
this.pipes = null,
this.pipesCount = 0,
this.flowing = null,
this.ended = !1,
this.endEmitted = !1,
this.reading = !1,
this.sync = !0,
this.needReadable = !1,
this.emittedReadable = !1,
this.readableListening = !1,
this.resumeScheduled = !1,
this.paused = !0,
this.emitClose = !1 !== e.emitClose,
this.autoDestroy = !!e.autoDestroy,
this.destroyed = !1,
this.defaultEncoding = e.defaultEncoding || "utf8",
this.awaitDrain = 0,
this.readingMore = !1,
this.decoder = null,
this.encoding = null,
e.encoding && (f || (f = n(83141).I),
this.decoder = new f(e.encoding),
this.encoding = e.encoding)
}
function S(e) {
if (r = r || n(25382),
!(this instanceof S))
return new S(e);
var t = this instanceof r;
this._readableState = new C(e,this,t),
this.readable = !0,
e && ("function" === typeof e.read && (this._read = e.read),
"function" === typeof e.destroy && (this._destroy = e.destroy)),
o.call(this)
}
function O(e, t, n, r, i) {
c("readableAddChunk", t);
var o, s = e._readableState;
if (null === t)
s.reading = !1,
N(e, s);
else if (i || (o = B(s, t)),
o)
E(e, o);
else if (s.objectMode || t && t.length > 0)
if ("string" === typeof t || s.objectMode || Object.getPrototypeOf(t) === a.prototype || (t = l(t)),
r)
s.endEmitted ? E(e, new x) : P(e, s, t, !0);
else if (s.ended)
E(e, new R);
else {
if (s.destroyed)
return !1;
s.reading = !1,
s.decoder && !n ? (t = s.decoder.write(t),
s.objectMode || 0 !== t.length ? P(e, s, t, !1) : z(e, s)) : P(e, s, t, !1)
}
else
r || (s.reading = !1,
z(e, s));
return !s.ended && (s.length < s.highWaterMark || 0 === s.length)
}
function P(e, t, n, r) {
t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0,
e.emit("data", n)) : (t.length += t.objectMode ? 1 : n.length,
r ? t.buffer.unshift(n) : t.buffer.push(n),
t.needReadable && D(e)),
z(e, t)
}
function B(e, t) {
var n;
return u(t) || "string" === typeof t || void 0 === t || e.objectMode || (n = new w("chunk",["string", "Buffer", "Uint8Array"],t)),
n
}
Object.defineProperty(S.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._readableState && this._readableState.destroyed
},
set: function(e) {
this._readableState && (this._readableState.destroyed = e)
}
}),
S.prototype.destroy = m.destroy,
S.prototype._undestroy = m.undestroy,
S.prototype._destroy = function(e, t) {
t(e)
}
,
S.prototype.push = function(e, t) {
var n, r = this._readableState;
return r.objectMode ? n = !0 : "string" === typeof e && (t = t || r.defaultEncoding,
t !== r.encoding && (e = a.from(e, t),
t = ""),
n = !0),
O(this, e, t, !1, n)
}
,
S.prototype.unshift = function(e) {
return O(this, e, null, !0, !1)
}
,
S.prototype.isPaused = function() {
return !1 === this._readableState.flowing
}
,
S.prototype.setEncoding = function(e) {
f || (f = n(83141).I);
var t = new f(e);
this._readableState.decoder = t,
this._readableState.encoding = this._readableState.decoder.encoding;
var r = this._readableState.buffer.head
, i = "";
while (null !== r)
i += t.write(r.data),
r = r.next;
return this._readableState.buffer.clear(),
"" !== i && this._readableState.buffer.push(i),
this._readableState.length = i.length,
this
}
;
var T = 1073741824;
function L(e) {
return e >= T ? e = T : (e--,
e |= e >>> 1,
e |= e >>> 2,
e |= e >>> 4,
e |= e >>> 8,
e |= e >>> 16,
e++),
e
}
function I(e, t) {
return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e !== e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = L(e)),
e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0,
0))
}
function N(e, t) {
if (c("onEofChunk"),
!t.ended) {
if (t.decoder) {
var n = t.decoder.end();
n && n.length && (t.buffer.push(n),
t.length += t.objectMode ? 1 : n.length)
}
t.ended = !0,
t.sync ? D(e) : (t.needReadable = !1,
t.emittedReadable || (t.emittedReadable = !0,
j(e)))
}
}
function D(e) {
var t = e._readableState;
c("emitReadable", t.needReadable, t.emittedReadable),
t.needReadable = !1,
t.emittedReadable || (c("emitReadable", t.flowing),
t.emittedReadable = !0,
process.nextTick(j, e))
}
function j(e) {
var t = e._readableState;
c("emitReadable_", t.destroyed, t.length, t.ended),
t.destroyed || !t.length && !t.ended || (e.emit("readable"),
t.emittedReadable = !1),
t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark,
U(e)
}
function z(e, t) {
t.readingMore || (t.readingMore = !0,
process.nextTick(F, e, t))
}
function F(e, t) {
while (!t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && 0 === t.length)) {
var n = t.length;
if (c("maybeReadMore read 0"),
e.read(0),
n === t.length)
break
}
t.readingMore = !1
}
function H(e) {
return function() {
var t = e._readableState;
c("pipeOnDrain", t.awaitDrain),
t.awaitDrain && t.awaitDrain--,
0 === t.awaitDrain && i(e, "data") && (t.flowing = !0,
U(e))
}
}
function W(e) {
var t = e._readableState;
t.readableListening = e.listenerCount("readable") > 0,
t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount("data") > 0 && e.resume()
}
function K(e) {
c("readable nexttick read 0"),
e.read(0)
}
function X(e, t) {
t.resumeScheduled || (t.resumeScheduled = !0,
process.nextTick(V, e, t))
}
function V(e, t) {
c("resume", t.reading),
t.reading || e.read(0),
t.resumeScheduled = !1,
e.emit("resume"),
U(e),
t.flowing && !t.reading && e.read(0)
}
function U(e) {
var t = e._readableState;
c("flow", t.flowing);
while (t.flowing && null !== e.read())
;
}
function q(e, t) {
return 0 === t.length ? null : (t.objectMode ? n = t.buffer.shift() : !e || e >= t.length ? (n = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.first() : t.buffer.concat(t.length),
t.buffer.clear()) : n = t.buffer.consume(e, t.decoder),
n);
var n
}
function _(e) {
var t = e._readableState;
c("endReadable", t.endEmitted),
t.endEmitted || (t.ended = !0,
process.nextTick(G, t, e))
}
function G(e, t) {
if (c("endReadableNT", e.endEmitted, e.length),
!e.endEmitted && 0 === e.length && (e.endEmitted = !0,
t.readable = !1,
t.emit("end"),
e.autoDestroy)) {
var n = t._writableState;
(!n || n.autoDestroy && n.finished) && t.destroy()
}
}
function Q(e, t) {
for (var n = 0, r = e.length; n < r; n++)
if (e[n] === t)
return n;
return -1
}
S.prototype.read = function(e) {
c("read", e),
e = parseInt(e, 10);
var t = this._readableState
, n = e;
if (0 !== e && (t.emittedReadable = !1),
0 === e && t.needReadable && ((0 !== t.highWaterMark ? t.length >= t.highWaterMark : t.length > 0) || t.ended))
return c("read: emitReadable", t.length, t.ended),
0 === t.length && t.ended ? _(this) : D(this),
null;
if (e = I(e, t),
0 === e && t.ended)
return 0 === t.length && _(this),
null;
var r, i = t.needReadable;
return c("need readable", i),
(0 === t.length || t.length - e < t.highWaterMark) && (i = !0,
c("length less than watermark", i)),
t.ended || t.reading ? (i = !1,
c("reading or ended", i)) : i && (c("do read"),
t.reading = !0,
t.sync = !0,
0 === t.length && (t.needReadable = !0),
this._read(t.highWaterMark),
t.sync = !1,
t.reading || (e = I(n, t))),
r = e > 0 ? q(e, t) : null,
null === r ? (t.needReadable = t.length <= t.highWaterMark,
e = 0) : (t.length -= e,
t.awaitDrain = 0),
0 === t.length && (t.ended || (t.needReadable = !0),
n !== e && t.ended && _(this)),
null !== r && this.emit("data", r),
r
}
,
S.prototype._read = function(e) {
E(this, new M("_read()"))
}
,
S.prototype.pipe = function(e, t) {
var n = this
, r = this._readableState;
switch (r.pipesCount) {
case 0:
r.pipes = e;
break;
case 1:
r.pipes = [r.pipes, e];
break;
default:
r.pipes.push(e);
break
}
r.pipesCount += 1,
c("pipe count=%d opts=%j", r.pipesCount, t);
var o = (!t || !1 !== t.end) && e !== process.stdout && e !== process.stderr
, a = o ? l : g;
function s(e, t) {
c("onunpipe"),
e === n && t && !1 === t.hasUnpiped && (t.hasUnpiped = !0,
f())
}
function l() {
c("onend"),
e.end()
}
r.endEmitted ? process.nextTick(a) : n.once("end", a),
e.on("unpipe", s);
var u = H(n);
e.on("drain", u);
var d = !1;
function f() {
c("cleanup"),
e.removeListener("close", v),
e.removeListener("finish", m),
e.removeListener("drain", u),
e.removeListener("error", p),
e.removeListener("unpipe", s),
n.removeListener("end", l),
n.removeListener("end", g),
n.removeListener("data", h),
d = !0,
!r.awaitDrain || e._writableState && !e._writableState.needDrain || u()
}
function h(t) {
c("ondata");
var i = e.write(t);
c("dest.write", i),
!1 === i && ((1 === r.pipesCount && r.pipes === e || r.pipesCount > 1 && -1 !== Q(r.pipes, e)) && !d && (c("false write response, pause", r.awaitDrain),
r.awaitDrain++),
n.pause())
}
function p(t) {
c("onerror", t),
g(),
e.removeListener("error", p),
0 === i(e, "error") && E(e, t)
}
function v() {
e.removeListener("finish", m),
g()
}
function m() {
c("onfinish"),
e.removeListener("close", v),
g()
}
function g() {
c("unpipe"),
n.unpipe(e)
}
return n.on("data", h),
A(e, "error", p),
e.once("close", v),
e.once("finish", m),
e.emit("pipe", n),
r.flowing || (c("pipe resume"),
n.resume()),
e
}
,
S.prototype.unpipe = function(e) {
var t = this._readableState
, n = {
hasUnpiped: !1
};
if (0 === t.pipesCount)
return this;
if (1 === t.pipesCount)
return e && e !== t.pipes || (e || (e = t.pipes),
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1,
e && e.emit("unpipe", this, n)),
this;
if (!e) {
var r = t.pipes
, i = t.pipesCount;
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1;
for (var o = 0; o < i; o++)
r[o].emit("unpipe", this, {
hasUnpiped: !1
});
return this
}
var a = Q(t.pipes, e);
return -1 === a || (t.pipes.splice(a, 1),
t.pipesCount -= 1,
1 === t.pipesCount && (t.pipes = t.pipes[0]),
e.emit("unpipe", this, n)),
this
}
,
S.prototype.on = function(e, t) {
var n = o.prototype.on.call(this, e, t)
, r = this._readableState;
return "data" === e ? (r.readableListening = this.listenerCount("readable") > 0,
!1 !== r.flowing && this.resume()) : "readable" === e && (r.endEmitted || r.readableListening || (r.readableListening = r.needReadable = !0,
r.flowing = !1,
r.emittedReadable = !1,
c("on readable", r.length, r.reading),
r.length ? D(this) : r.reading || process.nextTick(K, this))),
n
}
,
S.prototype.addListener = S.prototype.on,
S.prototype.removeListener = function(e, t) {
var n = o.prototype.removeListener.call(this, e, t);
return "readable" === e && process.nextTick(W, this),
n
}
,
S.prototype.removeAllListeners = function(e) {
var t = o.prototype.removeAllListeners.apply(this, arguments);
return "readable" !== e && void 0 !== e || process.nextTick(W, this),
t
}
,
S.prototype.resume = function() {
var e = this._readableState;
return e.flowing || (c("resume"),
e.flowing = !e.readableListening,
X(this, e)),
e.paused = !1,
this
}
,
S.prototype.pause = function() {
return c("call pause flowing=%j", this._readableState.flowing),
!1 !== this._readableState.flowing && (c("pause"),
this._readableState.flowing = !1,
this.emit("pause")),
this._readableState.paused = !0,
this
}
,
S.prototype.wrap = function(e) {
var t = this
, n = this._readableState
, r = !1;
for (var i in e.on("end", (function() {
if (c("wrapped end"),
n.decoder && !n.ended) {
var e = n.decoder.end();
e && e.length && t.push(e)
}
t.push(null)
}
)),
e.on("data", (function(i) {
if (c("wrapped data"),
n.decoder && (i = n.decoder.write(i)),
(!n.objectMode || null !== i && void 0 !== i) && (n.objectMode || i && i.length)) {
var o = t.push(i);
o || (r = !0,
e.pause())
}
}
)),
e)
void 0 === this[i] && "function" === typeof e[i] && (this[i] = function(t) {
return function() {
return e[t].apply(e, arguments)
}
}(i));
for (var o = 0; o < k.length; o++)
e.on(k[o], this.emit.bind(this, k[o]));
return this._read = function(t) {
c("wrapped _read", t),
r && (r = !1,
e.resume())
}
,
this
}
,
"function" === typeof Symbol && (S.prototype[Symbol.asyncIterator] = function() {
return void 0 === h && (h = n(2955)),
h(this)
}
),
Object.defineProperty(S.prototype, "readableHighWaterMark", {
enumerable: !1,
get: function() {
return this._readableState.highWaterMark
}
}),
Object.defineProperty(S.prototype, "readableBuffer", {
enumerable: !1,
get: function() {
return this._readableState && this._readableState.buffer
}
}),
Object.defineProperty(S.prototype, "readableFlowing", {
enumerable: !1,
get: function() {
return this._readableState.flowing
},
set: function(e) {
this._readableState && (this._readableState.flowing = e)
}
}),
S._fromList = q,
Object.defineProperty(S.prototype, "readableLength", {
enumerable: !1,
get: function() {
return this._readableState.length
}
}),
"function" === typeof Symbol && (S.from = function(e, t) {
return void 0 === p && (p = n(55157)),
p(S, e, t)
}
)
},
37007: function(e) {
"use strict";
var t, n = "object" === typeof Reflect ? Reflect : null, r = n && "function" === typeof n.apply ? n.apply : function(e, t, n) {
return Function.prototype.apply.call(e, t, n)
}
;
function i(e) {
console && console.warn && console.warn(e)
}
t = n && "function" === typeof n.ownKeys ? n.ownKeys : Object.getOwnPropertySymbols ? function(e) {
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))
}
: function(e) {
return Object.getOwnPropertyNames(e)
}
;
var o = Number.isNaN || function(e) {
return e !== e
}
;
function a() {
a.init.call(this)
}
e.exports = a,
e.exports.once = y,
a.EventEmitter = a,
a.prototype._events = void 0,
a.prototype._eventsCount = 0,
a.prototype._maxListeners = void 0;
var s = 10;
function l(e) {
if ("function" !== typeof e)
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e)
}
function u(e) {
return void 0 === e._maxListeners ? a.defaultMaxListeners : e._maxListeners
}
function c(e, t, n, r) {
var o, a, s;
if (l(n),
a = e._events,
void 0 === a ? (a = e._events = Object.create(null),
e._eventsCount = 0) : (void 0 !== a.newListener && (e.emit("newListener", t, n.listener ? n.listener : n),
a = e._events),
s = a[t]),
void 0 === s)
s = a[t] = n,
++e._eventsCount;
else if ("function" === typeof s ? s = a[t] = r ? [n, s] : [s, n] : r ? s.unshift(n) : s.push(n),
o = u(e),
o > 0 && s.length > o && !s.warned) {
s.warned = !0;
var c = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
c.name = "MaxListenersExceededWarning",
c.emitter = e,
c.type = t,
c.count = s.length,
i(c)
}
return e
}
function d() {
if (!this.fired)
return this.target.removeListener(this.type, this.wrapFn),
this.fired = !0,
0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments)
}
function f(e, t, n) {
var r = {
fired: !1,
wrapFn: void 0,
target: e,
type: t,
listener: n
}
, i = d.bind(r);
return i.listener = n,
r.wrapFn = i,
i
}
function h(e, t, n) {
var r = e._events;
if (void 0 === r)
return [];
var i = r[t];
return void 0 === i ? [] : "function" === typeof i ? n ? [i.listener || i] : [i] : n ? g(i) : v(i, i.length)
}
function p(e) {
var t = this._events;
if (void 0 !== t) {
var n = t[e];
if ("function" === typeof n)
return 1;
if (void 0 !== n)
return n.length
}
return 0
}
function v(e, t) {
for (var n = new Array(t), r = 0; r < t; ++r)
n[r] = e[r];
return n
}
function m(e, t) {
for (; t + 1 < e.length; t++)
e[t] = e[t + 1];
e.pop()
}
function g(e) {
for (var t = new Array(e.length), n = 0; n < t.length; ++n)
t[n] = e[n].listener || e[n];
return t
}
function y(e, t) {
return new Promise((function(n, r) {
function i(n) {
e.removeListener(t, o),
r(n)
}
function o() {
"function" === typeof e.removeListener && e.removeListener("error", i),
n([].slice.call(arguments))
}
w(e, t, o, {
once: !0
}),
"error" !== t && b(e, i, {
once: !0
})
}
))
}
function b(e, t, n) {
"function" === typeof e.on && w(e, "error", t, n)
}
function w(e, t, n, r) {
if ("function" === typeof e.on)
r.once ? e.once(t, n) : e.on(t, n);
else {
if ("function" !== typeof e.addEventListener)
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
e.addEventListener(t, (function i(o) {
r.once && e.removeEventListener(t, i),
n(o)
}
))
}
}
Object.defineProperty(a, "defaultMaxListeners", {
enumerable: !0,
get: function() {
return s
},
set: function(e) {
if ("number" !== typeof e || e < 0 || o(e))
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
s = e
}
}),
a.init = function() {
void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null),
this._eventsCount = 0),
this._maxListeners = this._maxListeners || void 0
}
,
a.prototype.setMaxListeners = function(e) {
if ("number" !== typeof e || e < 0 || o(e))
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
return this._maxListeners = e,
this
}
,
a.prototype.getMaxListeners = function() {
return u(this)
}
,
a.prototype.emit = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t.push(arguments[n]);
var i = "error" === e
, o = this._events;
if (void 0 !== o)
i = i && void 0 === o.error;
else if (!i)
return !1;
if (i) {
var a;
if (t.length > 0 && (a = t[0]),
a instanceof Error)
throw a;
var s = new Error("Unhandled error." + (a ? " (" + a.message + ")" : ""));
throw s.context = a,
s
}
var l = o[e];
if (void 0 === l)
return !1;
if ("function" === typeof l)
r(l, this, t);
else {
var u = l.length
, c = v(l, u);
for (n = 0; n < u; ++n)
r(c[n], this, t)
}
return !0
}
,
a.prototype.addListener = function(e, t) {
return c(this, e, t, !1)
}
,
a.prototype.on = a.prototype.addListener,
a.prototype.prependListener = function(e, t) {
return c(this, e, t, !0)
}
,
a.prototype.once = function(e, t) {
return l(t),
this.on(e, f(this, e, t)),
this
}
,
a.prototype.prependOnceListener = function(e, t) {
return l(t),
this.prependListener(e, f(this, e, t)),
this
}
,
a.prototype.removeListener = function(e, t) {
var n, r, i, o, a;
if (l(t),
r = this._events,
void 0 === r)
return this;
if (n = r[e],
void 0 === n)
return this;
if (n === t || n.listener === t)
0 === --this._eventsCount ? this._events = Object.create(null) : (delete r[e],
r.removeListener && this.emit("removeListener", e, n.listener || t));
else if ("function" !== typeof n) {
for (i = -1,
o = n.length - 1; o >= 0; o--)
if (n[o] === t || n[o].listener === t) {
a = n[o].listener,
i = o;
break
}
if (i < 0)
return this;
0 === i ? n.shift() : m(n, i),
1 === n.length && (r[e] = n[0]),
void 0 !== r.removeListener && this.emit("removeListener", e, a || t)
}
return this
}
,
a.prototype.off = a.prototype.removeListener,
a.prototype.removeAllListeners = function(e) {
var t, n, r;
if (n = this._events,
void 0 === n)
return this;
if (void 0 === n.removeListener)
return 0 === arguments.length ? (this._events = Object.create(null),
this._eventsCount = 0) : void 0 !== n[e] && (0 === --this._eventsCount ? this._events = Object.create(null) : delete n[e]),
this;
if (0 === arguments.length) {
var i, o = Object.keys(n);
for (r = 0; r < o.length; ++r)
i = o[r],
"removeListener" !== i && this.removeAllListeners(i);
return this.removeAllListeners("removeListener"),
this._events = Object.create(null),
this._eventsCount = 0,
this
}
if (t = n[e],
"function" === typeof t)
this.removeListener(e, t);
else if (void 0 !== t)
for (r = t.length - 1; r >= 0; r--)
this.removeListener(e, t[r]);
return this
}
,
a.prototype.listeners = function(e) {
return h(this, e, !0)
}
,
a.prototype.rawListeners = function(e) {
return h(this, e, !1)
}
,
a.listenerCount = function(e, t) {
return "function" === typeof e.listenerCount ? e.listenerCount(t) : p.call(e, t)
}
,
a.prototype.listenerCount = p,
a.prototype.eventNames = function() {
return this._eventsCount > 0 ? t(this._events) : []
}
},
40345: function(e, t, n) {
e.exports = n(37007).EventEmitter
},
79838: function() {},
80345: function(e, t, n) {
"use strict";
function r(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}
))),
n.push.apply(n, r)
}
return n
}
function i(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? r(Object(n), !0).forEach((function(t) {
o(e, t, n[t])
}
)) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}
))
}
return e
}
function o(e, t, n) {
return t = u(t),
t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
function a(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function s(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1,
r.configurable = !0,
"value"in r && (r.writable = !0),
Object.defineProperty(e, u(r.key), r)
}
}
function l(e, t, n) {
return t && s(e.prototype, t),
n && s(e, n),
Object.defineProperty(e, "prototype", {
writable: !1
}),
e
}
function u(e) {
var t = c(e, "string");
return "symbol" === typeof t ? t : String(t)
}
function c(e, t) {
if ("object" !== typeof e || null === e)
return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== typeof r)
return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}
var d = n(48287)
, f = d.Buffer
, h = n(15340)
, p = h.inspect
, v = p && p.custom || "inspect";
function m(e, t, n) {
f.prototype.copy.call(e, t, n)
}
e.exports = function() {
function e() {
a(this, e),
this.head = null,
this.tail = null,
this.length = 0
}
return l(e, [{
key: "push",
value: function(e) {
var t = {
data: e,
next: null
};
this.length > 0 ? this.tail.next = t : this.head = t,
this.tail = t,
++this.length
}
}, {
key: "unshift",
value: function(e) {
var t = {
data: e,
next: this.head
};
0 === this.length && (this.tail = t),
this.head = t,
++this.length
}
}, {
key: "shift",
value: function() {
if (0 !== this.length) {
var e = this.head.data;
return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next,
--this.length,
e
}
}
}, {
key: "clear",
value: function() {
this.head = this.tail = null,
this.length = 0
}
}, {
key: "join",
value: function(e) {
if (0 === this.length)
return "";
var t = this.head
, n = "" + t.data;
while (t = t.next)
n += e + t.data;
return n
}
}, {
key: "concat",
value: function(e) {
if (0 === this.length)
return f.alloc(0);
var t = f.allocUnsafe(e >>> 0)
, n = this.head
, r = 0;
while (n)
m(n.data, t, r),
r += n.data.length,
n = n.next;
return t
}
}, {
key: "consume",
value: function(e, t) {
var n;
return e < this.head.data.length ? (n = this.head.data.slice(0, e),
this.head.data = this.head.data.slice(e)) : n = e === this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e),
n
}
}, {
key: "first",
value: function() {
return this.head.data
}
}, {
key: "_getString",
value: function(e) {
var t = this.head
, n = 1
, r = t.data;
e -= r.length;
while (t = t.next) {
var i = t.data
, o = e > i.length ? i.length : e;
if (o === i.length ? r += i : r += i.slice(0, e),
e -= o,
0 === e) {
o === i.length ? (++n,
t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t,
t.data = i.slice(o));
break
}
++n
}
return this.length -= n,
r
}
}, {
key: "_getBuffer",
value: function(e) {
var t = f.allocUnsafe(e)
, n = this.head
, r = 1;
n.data.copy(t),
e -= n.data.length;
while (n = n.next) {
var i = n.data
, o = e > i.length ? i.length : e;
if (i.copy(t, t.length - e, 0, o),
e -= o,
0 === e) {
o === i.length ? (++r,
n.next ? this.head = n.next : this.head = this.tail = null) : (this.head = n,
n.data = i.slice(o));
break
}
++r
}
return this.length -= r,
t
}
}, {
key: v,
value: function(e, t) {
return p(this, i(i({}, t), {}, {
depth: 0,
customInspect: !1
}))
}
}]),
e
}()
},
15340: function() {},
75896: function(e) {
"use strict";
function t(e, t) {
var i = this
, a = this._readableState && this._readableState.destroyed
, s = this._writableState && this._writableState.destroyed;
return a || s ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0,
process.nextTick(o, this, e)) : process.nextTick(o, this, e)),
this) : (this._readableState && (this._readableState.destroyed = !0),
this._writableState && (this._writableState.destroyed = !0),
this._destroy(e || null, (function(e) {
!t && e ? i._writableState ? i._writableState.errorEmitted ? process.nextTick(r, i) : (i._writableState.errorEmitted = !0,
process.nextTick(n, i, e)) : process.nextTick(n, i, e) : t ? (process.nextTick(r, i),
t(e)) : process.nextTick(r, i)
}
)),
this)
}
function n(e, t) {
o(e, t),
r(e)
}
function r(e) {
e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close")
}
function i() {
this._readableState && (this._readableState.destroyed = !1,
this._readableState.reading = !1,
this._readableState.ended = !1,
this._readableState.endEmitted = !1),
this._writableState && (this._writableState.destroyed = !1,
this._writableState.ended = !1,
this._writableState.ending = !1,
this._writableState.finalCalled = !1,
this._writableState.prefinished = !1,
this._writableState.finished = !1,
this._writableState.errorEmitted = !1)
}
function o(e, t) {
e.emit("error", t)
}
function a(e, t) {
var n = e._readableState
, r = e._writableState;
n && n.autoDestroy || r && r.autoDestroy ? e.destroy(t) : e.emit("error", t)
}
e.exports = {
destroy: t,
undestroy: i,
errorOrDestroy: a
}
},
65291: function(e, t, n) {
"use strict";
var r = n(86048).F.ERR_INVALID_OPT_VALUE;
function i(e, t, n) {
return null != e.highWaterMark ? e.highWaterMark : t ? e[n] : null
}
function o(e, t, n, o) {
var a = i(t, o, n);
if (null != a) {
if (!isFinite(a) || Math.floor(a) !== a || a < 0) {
var s = o ? n : "highWaterMark";
throw new r(s,a)
}
return Math.floor(a)
}
return e.objectMode ? 16 : 16384
}
e.exports = {
getHighWaterMark: o
}
},
86048: function(e) {
"use strict";
function t(e, t) {
e.prototype = Object.create(t.prototype),
e.prototype.constructor = e,
e.__proto__ = t
}
var n = {};
function r(e, r, i) {
function o(e, t, n) {
return "string" === typeof r ? r : r(e, t, n)
}
i || (i = Error);
var a = function(e) {
function n(t, n, r) {
return e.call(this, o(t, n, r)) || this
}
return t(n, e),
n
}(i);
a.prototype.name = i.name,
a.prototype.code = e,
n[e] = a
}
function i(e, t) {
if (Array.isArray(e)) {
var n = e.length;
return e = e.map((function(e) {
return String(e)
}
)),
n > 2 ? "one of ".concat(t, " ").concat(e.slice(0, n - 1).join(", "), ", or ") + e[n - 1] : 2 === n ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of ".concat(t, " ").concat(e[0])
}
return "of ".concat(t, " ").concat(String(e))
}
function o(e, t, n) {
return e.substr(!n || n < 0 ? 0 : +n, t.length) === t
}
function a(e, t, n) {
return (void 0 === n || n > e.length) && (n = e.length),
e.substring(n - t.length, n) === t
}
function s(e, t, n) {
return "number" !== typeof n && (n = 0),
!(n + t.length > e.length) && -1 !== e.indexOf(t, n)
}
r("ERR_INVALID_OPT_VALUE", (function(e, t) {
return 'The value "' + t + '" is invalid for option "' + e + '"'
}
), TypeError),
r("ERR_INVALID_ARG_TYPE", (function(e, t, n) {
var r, l;
if ("string" === typeof t && o(t, "not ") ? (r = "must not be",
t = t.replace(/^not /, "")) : r = "must be",
a(e, " argument"))
l = "The ".concat(e, " ").concat(r, " ").concat(i(t, "type"));
else {
var u = s(e, ".") ? "property" : "argument";
l = 'The "'.concat(e, '" ').concat(u, " ").concat(r, " ").concat(i(t, "type"))
}
return l += ". Received type ".concat(typeof n),
l
}
), TypeError),
r("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"),
r("ERR_METHOD_NOT_IMPLEMENTED", (function(e) {
return "The " + e + " method is not implemented"
}
)),
r("ERR_STREAM_PREMATURE_CLOSE", "Premature close"),
r("ERR_STREAM_DESTROYED", (function(e) {
return "Cannot call " + e + " after a stream was destroyed"
}
)),
r("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"),
r("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"),
r("ERR_STREAM_WRITE_AFTER_END", "write after end"),
r("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError),
r("ERR_UNKNOWN_ENCODING", (function(e) {
return "Unknown encoding: " + e
}
), TypeError),
r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"),
e.exports.F = n
},
16708: function(e, t, n) {
"use strict";
function r(e) {
var t = this;
this.next = null,
this.entry = null,
this.finish = function() {
V(t, e)
}
}
var i;
e.exports = C,
C.WritableState = A;
var o = {
deprecate: n(94643)
}
, a = n(40345)
, s = n(48287).Buffer
, l = ("undefined" !== typeof n.g ? n.g : "undefined" !== typeof window ? window : "undefined" !== typeof self ? self : {}).Uint8Array || function() {}
;
function u(e) {
return s.from(e)
}
function c(e) {
return s.isBuffer(e) || e instanceof l
}
var d, f = n(75896), h = n(65291), p = h.getHighWaterMark, v = n(86048).F, m = v.ERR_INVALID_ARG_TYPE, g = v.ERR_METHOD_NOT_IMPLEMENTED, y = v.ERR_MULTIPLE_CALLBACK, b = v.ERR_STREAM_CANNOT_PIPE, w = v.ERR_STREAM_DESTROYED, R = v.ERR_STREAM_NULL_VALUES, M = v.ERR_STREAM_WRITE_AFTER_END, x = v.ERR_UNKNOWN_ENCODING, E = f.errorOrDestroy;
function k() {}
function A(e, t, o) {
i = i || n(25382),
e = e || {},
"boolean" !== typeof o && (o = t instanceof i),
this.objectMode = !!e.objectMode,
o && (this.objectMode = this.objectMode || !!e.writableObjectMode),
this.highWaterMark = p(this, e, "writableHighWaterMark", o),
this.finalCalled = !1,
this.needDrain = !1,
this.ending = !1,
this.ended = !1,
this.finished = !1,
this.destroyed = !1;
var a = !1 === e.decodeStrings;
this.decodeStrings = !a,
this.defaultEncoding = e.defaultEncoding || "utf8",
this.length = 0,
this.writing = !1,
this.corked = 0,
this.sync = !0,
this.bufferProcessing = !1,
this.onwrite = function(e) {
N(t, e)
}
,
this.writecb = null,
this.writelen = 0,
this.bufferedRequest = null,
this.lastBufferedRequest = null,
this.pendingcb = 0,
this.prefinished = !1,
this.errorEmitted = !1,
this.emitClose = !1 !== e.emitClose,
this.autoDestroy = !!e.autoDestroy,
this.bufferedRequestCount = 0,
this.corkedRequestsFree = new r(this)
}
function C(e) {
i = i || n(25382);
var t = this instanceof i;
if (!t && !d.call(C, this))
return new C(e);
this._writableState = new A(e,this,t),
this.writable = !0,
e && ("function" === typeof e.write && (this._write = e.write),
"function" === typeof e.writev && (this._writev = e.writev),
"function" === typeof e.destroy && (this._destroy = e.destroy),
"function" === typeof e.final && (this._final = e.final)),
a.call(this)
}
function S(e, t) {
var n = new M;
E(e, n),
process.nextTick(t, n)
}
function O(e, t, n, r) {
var i;
return null === n ? i = new R : "string" === typeof n || t.objectMode || (i = new m("chunk",["string", "Buffer"],n)),
!i || (E(e, i),
process.nextTick(r, i),
!1)
}
function P(e, t, n) {
return e.objectMode || !1 === e.decodeStrings || "string" !== typeof t || (t = s.from(t, n)),
t
}
function B(e, t, n, r, i, o) {
if (!n) {
var a = P(t, r, i);
r !== a && (n = !0,
i = "buffer",
r = a)
}
var s = t.objectMode ? 1 : r.length;
t.length += s;
var l = t.length < t.highWaterMark;
if (l || (t.needDrain = !0),
t.writing || t.corked) {
var u = t.lastBufferedRequest;
t.lastBufferedRequest = {
chunk: r,
encoding: i,
isBuf: n,
callback: o,
next: null
},
u ? u.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest,
t.bufferedRequestCount += 1
} else
T(e, t, !1, s, r, i, o);
return l
}
function T(e, t, n, r, i, o, a) {
t.writelen = r,
t.writecb = a,
t.writing = !0,
t.sync = !0,
t.destroyed ? t.onwrite(new w("write")) : n ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite),
t.sync = !1
}
function L(e, t, n, r, i) {
--t.pendingcb,
n ? (process.nextTick(i, r),
process.nextTick(K, e, t),
e._writableState.errorEmitted = !0,
E(e, r)) : (i(r),
e._writableState.errorEmitted = !0,
E(e, r),
K(e, t))
}
function I(e) {
e.writing = !1,
e.writecb = null,
e.length -= e.writelen,
e.writelen = 0
}
function N(e, t) {
var n = e._writableState
, r = n.sync
, i = n.writecb;
if ("function" !== typeof i)
throw new y;
if (I(n),
t)
L(e, n, r, t, i);
else {
var o = F(n) || e.destroyed;
o || n.corked || n.bufferProcessing || !n.bufferedRequest || z(e, n),
r ? process.nextTick(D, e, n, o, i) : D(e, n, o, i)
}
}
function D(e, t, n, r) {
n || j(e, t),
t.pendingcb--,
r(),
K(e, t)
}
function j(e, t) {
0 === t.length && t.needDrain && (t.needDrain = !1,
e.emit("drain"))
}
function z(e, t) {
t.bufferProcessing = !0;
var n = t.bufferedRequest;
if (e._writev && n && n.next) {
var i = t.bufferedRequestCount
, o = new Array(i)
, a = t.corkedRequestsFree;
a.entry = n;
var s = 0
, l = !0;
while (n)
o[s] = n,
n.isBuf || (l = !1),
n = n.next,
s += 1;
o.allBuffers = l,
T(e, t, !0, t.length, o, "", a.finish),
t.pendingcb++,
t.lastBufferedRequest = null,
a.next ? (t.corkedRequestsFree = a.next,
a.next = null) : t.corkedRequestsFree = new r(t),
t.bufferedRequestCount = 0
} else {
while (n) {
var u = n.chunk
, c = n.encoding
, d = n.callback
, f = t.objectMode ? 1 : u.length;
if (T(e, t, !1, f, u, c, d),
n = n.next,
t.bufferedRequestCount--,
t.writing)
break
}
null === n && (t.lastBufferedRequest = null)
}
t.bufferedRequest = n,
t.bufferProcessing = !1
}
function F(e) {
return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing
}
function H(e, t) {
e._final((function(n) {
t.pendingcb--,
n && E(e, n),
t.prefinished = !0,
e.emit("prefinish"),
K(e, t)
}
))
}
function W(e, t) {
t.prefinished || t.finalCalled || ("function" !== typeof e._final || t.destroyed ? (t.prefinished = !0,
e.emit("prefinish")) : (t.pendingcb++,
t.finalCalled = !0,
process.nextTick(H, e, t)))
}
function K(e, t) {
var n = F(t);
if (n && (W(e, t),
0 === t.pendingcb && (t.finished = !0,
e.emit("finish"),
t.autoDestroy))) {
var r = e._readableState;
(!r || r.autoDestroy && r.endEmitted) && e.destroy()
}
return n
}
function X(e, t, n) {
t.ending = !0,
K(e, t),
n && (t.finished ? process.nextTick(n) : e.once("finish", n)),
t.ended = !0,
e.writable = !1
}
function V(e, t, n) {
var r = e.entry;
e.entry = null;
while (r) {
var i = r.callback;
t.pendingcb--,
i(n),
r = r.next
}
t.corkedRequestsFree.next = e
}
n(56698)(C, a),
A.prototype.getBuffer = function() {
var e = this.bufferedRequest
, t = [];
while (e)
t.push(e),
e = e.next;
return t
}
,
function() {
try {
Object.defineProperty(A.prototype, "buffer", {
get: o.deprecate((function() {
return this.getBuffer()
}
), "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
})
} catch (e) {}
}(),
"function" === typeof Symbol && Symbol.hasInstance && "function" === typeof Function.prototype[Symbol.hasInstance] ? (d = Function.prototype[Symbol.hasInstance],
Object.defineProperty(C, Symbol.hasInstance, {
value: function(e) {
return !!d.call(this, e) || this === C && (e && e._writableState instanceof A)
}
})) : d = function(e) {
return e instanceof this
}
,
C.prototype.pipe = function() {
E(this, new b)
}
,
C.prototype.write = function(e, t, n) {
var r = this._writableState
, i = !1
, o = !r.objectMode && c(e);
return o && !s.isBuffer(e) && (e = u(e)),
"function" === typeof t && (n = t,
t = null),
o ? t = "buffer" : t || (t = r.defaultEncoding),
"function" !== typeof n && (n = k),
r.ending ? S(this, n) : (o || O(this, r, e, n)) && (r.pendingcb++,
i = B(this, r, o, e, t, n)),
i
}
,
C.prototype.cork = function() {
this._writableState.corked++
}
,
C.prototype.uncork = function() {
var e = this._writableState;
e.corked && (e.corked--,
e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest || z(this, e))
}
,
C.prototype.setDefaultEncoding = function(e) {
if ("string" === typeof e && (e = e.toLowerCase()),
!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1))
throw new x(e);
return this._writableState.defaultEncoding = e,
this
}
,
Object.defineProperty(C.prototype, "writableBuffer", {
enumerable: !1,
get: function() {
return this._writableState && this._writableState.getBuffer()
}
}),
Object.defineProperty(C.prototype, "writableHighWaterMark", {
enumerable: !1,
get: function() {
return this._writableState.highWaterMark
}
}),
C.prototype._write = function(e, t, n) {
n(new g("_write()"))
}
,
C.prototype._writev = null,
C.prototype.end = function(e, t, n) {
var r = this._writableState;
return "function" === typeof e ? (n = e,
e = null,
t = null) : "function" === typeof t && (n = t,
t = null),
null !== e && void 0 !== e && this.write(e, t),
r.corked && (r.corked = 1,
this.uncork()),
r.ending || X(this, r, n),
this
}
,
Object.defineProperty(C.prototype, "writableLength", {
enumerable: !1,
get: function() {
return this._writableState.length
}
}),
Object.defineProperty(C.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._writableState && this._writableState.destroyed
},
set: function(e) {
this._writableState && (this._writableState.destroyed = e)
}
}),
C.prototype.destroy = f.destroy,
C.prototype._undestroy = f.undestroy,
C.prototype._destroy = function(e, t) {
t(e)
}
},
94643: function(e, t, n) {
function r(e, t) {
if (i("noDeprecation"))
return e;
var n = !1;
function r() {
if (!n) {
if (i("throwDeprecation"))
throw new Error(t);
i("traceDeprecation") ? console.trace(t) : console.warn(t),
n = !0
}
return e.apply(this, arguments)
}
return r
}
function i(e) {
try {
if (!n.g.localStorage)
return !1
} catch (r) {
return !1
}
var t = n.g.localStorage[e];
return null != t && "true" === String(t).toLowerCase()
}
e.exports = r
},
25382: function(e, t, n) {
"use strict";
var r = Object.keys || function(e) {
var t = [];
for (var n in e)
t.push(n);
return t
}
;
e.exports = u;
var i = n(45412)
, o = n(16708);
n(56698)(u, i);
for (var a = r(o.prototype), s = 0; s < a.length; s++) {
var l = a[s];
u.prototype[l] || (u.prototype[l] = o.prototype[l])
}
function u(e) {
if (!(this instanceof u))
return new u(e);
i.call(this, e),
o.call(this, e),
this.allowHalfOpen = !0,
e && (!1 === e.readable && (this.readable = !1),
!1 === e.writable && (this.writable = !1),
!1 === e.allowHalfOpen && (this.allowHalfOpen = !1,
this.once("end", c)))
}
function c() {
this._writableState.ended || process.nextTick(d, this)
}
function d(e) {
e.end()
}
Object.defineProperty(u.prototype, "writableHighWaterMark", {
enumerable: !1,
get: function() {
return this._writableState.highWaterMark
}
}),
Object.defineProperty(u.prototype, "writableBuffer", {
enumerable: !1,
get: function() {
return this._writableState && this._writableState.getBuffer()
}
}),
Object.defineProperty(u.prototype, "writableLength", {
enumerable: !1,
get: function() {
return this._writableState.length
}
}),
Object.defineProperty(u.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed && this._writableState.destroyed)
},
set: function(e) {
void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e,
this._writableState.destroyed = e)
}
})
},
74610: function(e, t, n) {
"use strict";
e.exports = c;
var r = n(86048).F
, i = r.ERR_METHOD_NOT_IMPLEMENTED
, o = r.ERR_MULTIPLE_CALLBACK
, a = r.ERR_TRANSFORM_ALREADY_TRANSFORMING
, s = r.ERR_TRANSFORM_WITH_LENGTH_0
, l = n(25382);
function u(e, t) {
var n = this._transformState;
n.transforming = !1;
var r = n.writecb;
if (null === r)
return this.emit("error", new o);
n.writechunk = null,
n.writecb = null,
null != t && this.push(t),
r(e);
var i = this._readableState;
i.reading = !1,
(i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark)
}
function c(e) {
if (!(this instanceof c))
return new c(e);
l.call(this, e),
this._transformState = {
afterTransform: u.bind(this),
needTransform: !1,
transforming: !1,
writecb: null,
writechunk: null,
writeencoding: null
},
this._readableState.needReadable = !0,
this._readableState.sync = !1,
e && ("function" === typeof e.transform && (this._transform = e.transform),
"function" === typeof e.flush && (this._flush = e.flush)),
this.on("prefinish", d)
}
function d() {
var e = this;
"function" !== typeof this._flush || this._readableState.destroyed ? f(this, null, null) : this._flush((function(t, n) {
f(e, t, n)
}
))
}
function f(e, t, n) {
if (t)
return e.emit("error", t);
if (null != n && e.push(n),
e._writableState.length)
throw new s;
if (e._transformState.transforming)
throw new a;
return e.push(null)
}
n(56698)(c, l),
c.prototype.push = function(e, t) {
return this._transformState.needTransform = !1,
l.prototype.push.call(this, e, t)
}
,
c.prototype._transform = function(e, t, n) {
n(new i("_transform()"))
}
,
c.prototype._write = function(e, t, n) {
var r = this._transformState;
if (r.writecb = n,
r.writechunk = e,
r.writeencoding = t,
!r.transforming) {
var i = this._readableState;
(r.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark)
}
}
,
c.prototype._read = function(e) {
var t = this._transformState;
null === t.writechunk || t.transforming ? t.needTransform = !0 : (t.transforming = !0,
this._transform(t.writechunk, t.writeencoding, t.afterTransform))
}
,
c.prototype._destroy = function(e, t) {
l.prototype._destroy.call(this, e, (function(e) {
t(e)
}
))
}
},
63600: function(e, t, n) {
"use strict";
e.exports = i;
var r = n(74610);
function i(e) {
if (!(this instanceof i))
return new i(e);
r.call(this, e)
}
n(56698)(i, r),
i.prototype._transform = function(e, t, n) {
n(null, e)
}
},
86238: function(e, t, n) {
"use strict";
var r = n(86048).F.ERR_STREAM_PREMATURE_CLOSE;
function i(e) {
var t = !1;
return function() {
if (!t) {
t = !0;
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
r[i] = arguments[i];
e.apply(this, r)
}
}
}
function o() {}
function a(e) {
return e.setHeader && "function" === typeof e.abort
}
function s(e, t, n) {
if ("function" === typeof t)
return s(e, null, t);
t || (t = {}),
n = i(n || o);
var l = t.readable || !1 !== t.readable && e.readable
, u = t.writable || !1 !== t.writable && e.writable
, c = function() {
e.writable || f()
}
, d = e._writableState && e._writableState.finished
, f = function() {
u = !1,
d = !0,
l || n.call(e)
}
, h = e._readableState && e._readableState.endEmitted
, p = function() {
l = !1,
h = !0,
u || n.call(e)
}
, v = function(t) {
n.call(e, t)
}
, m = function() {
var t;
return l && !h ? (e._readableState && e._readableState.ended || (t = new r),
n.call(e, t)) : u && !d ? (e._writableState && e._writableState.ended || (t = new r),
n.call(e, t)) : void 0
}
, g = function() {
e.req.on("finish", f)
};
return a(e) ? (e.on("complete", f),
e.on("abort", m),
e.req ? g() : e.on("request", g)) : u && !e._writableState && (e.on("end", c),
e.on("close", c)),
e.on("end", p),
e.on("finish", f),
!1 !== t.error && e.on("error", v),
e.on("close", m),
function() {
e.removeListener("complete", f),
e.removeListener("abort", m),
e.removeListener("request", g),
e.req && e.req.removeListener("finish", f),
e.removeListener("end", c),
e.removeListener("close", c),
e.removeListener("finish", f),
e.removeListener("end", p),
e.removeListener("error", v),
e.removeListener("close", m)
}
}
e.exports = s
},
57758: function(e, t, n) {
"use strict";
var r;
function i(e) {
var t = !1;
return function() {
t || (t = !0,
e.apply(void 0, arguments))
}
}
var o = n(86048).F
, a = o.ERR_MISSING_ARGS
, s = o.ERR_STREAM_DESTROYED;
function l(e) {
if (e)
throw e
}
function u(e) {
return e.setHeader && "function" === typeof e.abort
}
function c(e, t, o, a) {
a = i(a);
var l = !1;
e.on("close", (function() {
l = !0
}
)),
void 0 === r && (r = n(86238)),
r(e, {
readable: t,
writable: o
}, (function(e) {
if (e)
return a(e);
l = !0,
a()
}
));
var c = !1;
return function(t) {
if (!l && !c)
return c = !0,
u(e) ? e.abort() : "function" === typeof e.destroy ? e.destroy() : void a(t || new s("pipe"))
}
}
function d(e) {
e()
}
function f(e, t) {
return e.pipe(t)
}
function h(e) {
return e.length ? "function" !== typeof e[e.length - 1] ? l : e.pop() : l
}
function p() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
var r, i = h(t);
if (Array.isArray(t[0]) && (t = t[0]),
t.length < 2)
throw new a("streams");
var o = t.map((function(e, n) {
var a = n < t.length - 1
, s = n > 0;
return c(e, a, s, (function(e) {
r || (r = e),
e && o.forEach(d),
a || (o.forEach(d),
i(r))
}
))
}
));
return t.reduce(f)
}
e.exports = p
},
88276: function(e, t, n) {
"use strict";
var r = n(56698)
, i = n(4729)
, o = n(92861).Buffer
, a = new Array(16);
function s() {
i.call(this, 64),
this._a = 1732584193,
this._b = 4023233417,
this._c = 2562383102,
this._d = 271733878
}
function l(e, t) {
return e << t | e >>> 32 - t
}
function u(e, t, n, r, i, o, a) {
return l(e + (t & n | ~t & r) + i + o | 0, a) + t | 0
}
function c(e, t, n, r, i, o, a) {
return l(e + (t & r | n & ~r) + i + o | 0, a) + t | 0
}
function d(e, t, n, r, i, o, a) {
return l(e + (t ^ n ^ r) + i + o | 0, a) + t | 0
}
function f(e, t, n, r, i, o, a) {
return l(e + (n ^ (t | ~r)) + i + o | 0, a) + t | 0
}
r(s, i),
s.prototype._update = function() {
for (var e = a, t = 0; t < 16; ++t)
e[t] = this._block.readInt32LE(4 * t);
var n = this._a
, r = this._b
, i = this._c
, o = this._d;
n = u(n, r, i, o, e[0], 3614090360, 7),
o = u(o, n, r, i, e[1], 3905402710, 12),
i = u(i, o, n, r, e[2], 606105819, 17),
r = u(r, i, o, n, e[3], 3250441966, 22),
n = u(n, r, i, o, e[4], 4118548399, 7),
o = u(o, n, r, i, e[5], 1200080426, 12),
i = u(i, o, n, r, e[6], 2821735955, 17),
r = u(r, i, o, n, e[7], 4249261313, 22),
n = u(n, r, i, o, e[8], 1770035416, 7),
o = u(o, n, r, i, e[9], 2336552879, 12),
i = u(i, o, n, r, e[10], 4294925233, 17),
r = u(r, i, o, n, e[11], 2304563134, 22),
n = u(n, r, i, o, e[12], 1804603682, 7),
o = u(o, n, r, i, e[13], 4254626195, 12),
i = u(i, o, n, r, e[14], 2792965006, 17),
r = u(r, i, o, n, e[15], 1236535329, 22),
n = c(n, r, i, o, e[1], 4129170786, 5),
o = c(o, n, r, i, e[6], 3225465664, 9),
i = c(i, o, n, r, e[11], 643717713, 14),
r = c(r, i, o, n, e[0], 3921069994, 20),
n = c(n, r, i, o, e[5], 3593408605, 5),
o = c(o, n, r, i, e[10], 38016083, 9),
i = c(i, o, n, r, e[15], 3634488961, 14),
r = c(r, i, o, n, e[4], 3889429448, 20),
n = c(n, r, i, o, e[9], 568446438, 5),
o = c(o, n, r, i, e[14], 3275163606, 9),
i = c(i, o, n, r, e[3], 4107603335, 14),
r = c(r, i, o, n, e[8], 1163531501, 20),
n = c(n, r, i, o, e[13], 2850285829, 5),
o = c(o, n, r, i, e[2], 4243563512, 9),
i = c(i, o, n, r, e[7], 1735328473, 14),
r = c(r, i, o, n, e[12], 2368359562, 20),
n = d(n, r, i, o, e[5], 4294588738, 4),
o = d(o, n, r, i, e[8], 2272392833, 11),
i = d(i, o, n, r, e[11], 1839030562, 16),
r = d(r, i, o, n, e[14], 4259657740, 23),
n = d(n, r, i, o, e[1], 2763975236, 4),
o = d(o, n, r, i, e[4], 1272893353, 11),
i = d(i, o, n, r, e[7], 4139469664, 16),
r = d(r, i, o, n, e[10], 3200236656, 23),
n = d(n, r, i, o, e[13], 681279174, 4),
o = d(o, n, r, i, e[0], 3936430074, 11),
i = d(i, o, n, r, e[3], 3572445317, 16),
r = d(r, i, o, n, e[6], 76029189, 23),
n = d(n, r, i, o, e[9], 3654602809, 4),
o = d(o, n, r, i, e[12], 3873151461, 11),
i = d(i, o, n, r, e[15], 530742520, 16),
r = d(r, i, o, n, e[2], 3299628645, 23),
n = f(n, r, i, o, e[0], 4096336452, 6),
o = f(o, n, r, i, e[7], 1126891415, 10),
i = f(i, o, n, r, e[14], 2878612391, 15),
r = f(r, i, o, n, e[5], 4237533241, 21),
n = f(n, r, i, o, e[12], 1700485571, 6),
o = f(o, n, r, i, e[3], 2399980690, 10),
i = f(i, o, n, r, e[10], 4293915773, 15),
r = f(r, i, o, n, e[1], 2240044497, 21),
n = f(n, r, i, o, e[8], 1873313359, 6),
o = f(o, n, r, i, e[15], 4264355552, 10),
i = f(i, o, n, r, e[6], 2734768916, 15),
r = f(r, i, o, n, e[13], 1309151649, 21),
n = f(n, r, i, o, e[4], 4149444226, 6),
o = f(o, n, r, i, e[11], 3174756917, 10),
i = f(i, o, n, r, e[2], 718787259, 15),
r = f(r, i, o, n, e[9], 3951481745, 21),
this._a = this._a + n | 0,
this._b = this._b + r | 0,
this._c = this._c + i | 0,
this._d = this._d + o | 0
}
,
s.prototype._digest = function() {
this._block[this._blockOffset++] = 128,
this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64),
this._update(),
this._blockOffset = 0),
this._block.fill(0, this._blockOffset, 56),
this._block.writeUInt32LE(this._length[0], 56),
this._block.writeUInt32LE(this._length[1], 60),
this._update();
var e = o.allocUnsafe(16);
return e.writeInt32LE(this._a, 0),
e.writeInt32LE(this._b, 4),
e.writeInt32LE(this._c, 8),
e.writeInt32LE(this._d, 12),
e
}
,
console.log("哈哈哈哈")
window.s = s
e.exports=s
},
}
, t = {};
function n(o) {
var a = t[o];
if (void 0 !== a)
return a.exports;
var r = t[o] = {
id: o,
loaded: !1,
exports: {}
};
console.log(o)
return e[o].call(r.exports, r, r.exports, n),
r.loaded = !0,
r.exports
}
window.n=n;
}
)();
function t(){return (new Date).getTime();}
function sign(t){
const e = "fsdsogkndfokasodnaso";
return S(t,e);
}
function S(e, t) {
return _(`client=fanyideskweb&mysticTime=${e}&product=webfanyi&key=${t}`)
};
function _(e) {
r = n(88276);
r=new r;
return r.update(e.toString()).digest("hex")
}
console.log(sign())
py请求代码
点击查看代码
import requests
import re
import subprocess
from functools import partial
subprocess.Popen = partial(subprocess.Popen, encoding="UTF-8")
import execjs
with open('2.js','r',encoding='utf-8')as js:
js = js.read()
js = execjs.compile(js)
t = js.call('t');
sign = js.call('sign',t);
print(sign)
cookies = {
'OUTFOX_SEARCH_USER_ID': '-1886042154@2408:8656:d0fa:f003::b',
'OUTFOX_SEARCH_USER_ID_NCOO': '1436055859.4670575',
'DICT_DOCTRANS_SESSION_ID': 'MGFmYTc0MTctODA4Yi00ZGEyLWIxN2UtYmNiZTEzMGM0OWM3',
}
headers = {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded',
# 'Cookie': 'OUTFOX_SEARCH_USER_ID=-1886042154@2408:8656:d0fa:f003::b; OUTFOX_SEARCH_USER_ID_NCOO=1436055859.4670575; DICT_DOCTRANS_SESSION_ID=MGFmYTc0MTctODA4Yi00ZGEyLWIxN2UtYmNiZTEzMGM0OWM3',
'Origin': 'https://fanyi.youdao.com',
'Pragma': 'no-cache',
'Referer': 'https://fanyi.youdao.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0',
'sec-ch-ua': '"Chromium";v="124", "Microsoft Edge";v="124", "Not-A.Brand";v="99"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
}
data = {
'i': 'apple',
'from': 'en',
'to': 'zh-CHS',
'domain': '0',
'dictResult': 'true',
'keyid': 'webfanyi',
'sign': sign,
'client': 'fanyideskweb',
'product': 'webfanyi',
'appVersion': '1.0.0',
'vendor': 'web',
'pointParam': 'client,mysticTime,product',
'mysticTime': str(t),
'keyfrom': 'fanyi.web',
'mid': '1',
'screen': '1',
'model': '1',
'network': 'wifi',
'abtest': '0',
'yduuid': 'abcdefg',
}
response = requests.post('https://dict.youdao.com/webtranslate', cookies=cookies, headers=headers, data=data)
print(response.text)