Socket
Socket
Sign inDemoInstall

js-crypto-hash

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-crypto-hash - npm Package Compare versions

Comparing version 0.5.2 to 0.6.0

dist/hash.d.ts

329

dist/hash.js
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.compute = void 0;
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var util = _interopRequireWildcard(require("js-crypto-env"));
var _params = _interopRequireDefault(require("./params.js"));
var _md = _interopRequireDefault(require("md5"));
var _sha = require("sha3");
var _hash = _interopRequireDefault(require("hash.js"));
/**
* hash.js
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var util = __importStar(require("js-crypto-env"));
var params_1 = __importDefault(require("./params"));
var md5_1 = __importDefault(require("md5"));
var sha3_1 = require("sha3");
var hash_js_1 = __importDefault(require("hash.js"));
/**
* Compute Hash value.
* @param {Uint8Array} msg - Byte array of message to be hashed.
* @param {String} [hash = 'SHA-256'] - Name of hash algorithm like 'SHA-256'.
* @param {HashTypes} [hash = 'SHA-256'] - Name of hash algorithm like 'SHA-256'.
* @return {Promise<Uint8Array>} - Hash value

@@ -38,131 +65,58 @@ * @throws {Error} - Throws if UnsupportedHashAlgorithm, UnsupportedMessageType,

*/
var compute =
/*#__PURE__*/
function () {
var _ref = (0, _asyncToGenerator2.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee(msg) {
var hash,
webCrypto,
nodeCrypto,
msCrypto,
msgHash,
errMsg,
native,
_args = arguments;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
hash = _args.length > 1 && _args[1] !== undefined ? _args[1] : 'SHA-256';
if (!(Object.keys(_params.default.hashes).indexOf(hash) < 0)) {
_context.next = 3;
break;
exports.compute = function (msg, hash) {
if (hash === void 0) { hash = 'SHA-256'; }
return __awaiter(void 0, void 0, void 0, function () {
var webCrypto, nodeCrypto, msCrypto, msgHash, errMsg, native, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
webCrypto = util.getWebCrypto();
nodeCrypto = util.getNodeCrypto();
msCrypto = util.getMsCrypto();
native = true;
_a.label = 1;
case 1:
_a.trys.push([1, 8, , 9]);
if (!(typeof webCrypto !== 'undefined' && typeof webCrypto.digest === 'function' && typeof msCrypto === 'undefined')) return [3 /*break*/, 3];
return [4 /*yield*/, webCrypto.digest(hash, msg)];
case 2:
msgHash = _a.sent();
return [3 /*break*/, 7];
case 3:
if (!(typeof nodeCrypto !== 'undefined')) return [3 /*break*/, 4];
msgHash = nodedigest(hash, msg, nodeCrypto);
return [3 /*break*/, 7];
case 4:
if (!(typeof msCrypto !== 'undefined' && typeof msCrypto.digest === 'function')) return [3 /*break*/, 6];
return [4 /*yield*/, msdigest(hash, msg, msCrypto)];
case 5:
msgHash = _a.sent();
return [3 /*break*/, 7];
case 6:
native = false;
_a.label = 7;
case 7: return [3 /*break*/, 9];
case 8:
e_1 = _a.sent();
errMsg = e_1.message;
native = false;
return [3 /*break*/, 9];
case 9:
if (!native) {
try {
msgHash = purejs(hash, msg);
}
catch (e) {
errMsg = errMsg + " => " + e.message;
throw new Error("UnsupportedEnvironment: " + errMsg);
}
}
return [2 /*return*/, new Uint8Array(msgHash)];
}
throw new Error('UnsupportedHashAlgorithm');
case 3:
if (msg instanceof Uint8Array) {
_context.next = 5;
break;
}
throw new Error('UnsupportedMessageType');
case 5:
webCrypto = util.getWebCrypto();
nodeCrypto = util.getNodeCrypto();
msCrypto = util.getMsCrypto();
native = true;
if (!(typeof webCrypto !== 'undefined' && typeof webCrypto.digest === 'function' && typeof msCrypto === 'undefined')) {
_context.next = 15;
break;
}
_context.next = 12;
return webCrypto.digest(hash, msg).catch(function (e) {
errMsg = e.message;
native = false;
});
case 12:
msgHash = _context.sent;
_context.next = 26;
break;
case 15:
if (!(typeof nodeCrypto !== 'undefined')) {
_context.next = 19;
break;
}
// for node
try {
msgHash = nodedigest(hash, msg, nodeCrypto);
} catch (e) {
errMsg = e.message;
native = false;
}
_context.next = 26;
break;
case 19:
if (!(typeof msCrypto !== 'undefined' && typeof msCrypto.digest === 'function')) {
_context.next = 25;
break;
}
_context.next = 22;
return msdigest(hash, msg, msCrypto).catch(function (e) {
errMsg = e.message;
native = false;
});
case 22:
msgHash = _context.sent;
_context.next = 26;
break;
case 25:
native = false;
case 26:
if (native) {
_context.next = 35;
break;
}
_context.prev = 27;
msgHash = purejs(hash, msg);
_context.next = 35;
break;
case 31:
_context.prev = 31;
_context.t0 = _context["catch"](27);
errMsg = "".concat(errMsg, " => ").concat(_context.t0.message);
throw new Error("UnsupportedEnvironment: ".concat(errMsg));
case 35:
return _context.abrupt("return", new Uint8Array(msgHash));
case 36:
case "end":
return _context.stop();
}
}
}, _callee, null, [[27, 31]]);
}));
return function compute(_x) {
return _ref.apply(this, arguments);
};
}();
});
});
};
/**
* Compute hash using MsCrypto implementation
* @param {String} hash - Name of hash algorithm like SHA-256
* @param {HashTypes} hash - Name of hash algorithm like SHA-256
* @param {Uint8Array} msg - Byte array of message to be hashed.

@@ -173,19 +127,11 @@ * @param {Object} msCrypto - msCrypto object.

*/
exports.compute = compute;
var msdigest = function msdigest(hash, msg, msCrypto) {
return new Promise(function (resolve, reject) {
var msdigest = function (hash, msg, msCrypto) { return new Promise(function (resolve, reject) {
var op = msCrypto.digest(hash, msg);
op.oncomplete = function (evt) {
resolve(evt.target.result);
resolve(evt.target.result);
};
op.onerror = function (e) {
reject(e);
reject(e);
};
});
};
}); };
/**

@@ -198,9 +144,7 @@ * Compute hash using Node.js implementation

*/
var nodedigest = function nodedigest(hash, msg, nodeCrypto) {
var alg = _params.default.hashes[hash].nodeName;
var hashFunc = nodeCrypto.createHash(alg);
hashFunc.update(msg);
return hashFunc.digest();
var nodedigest = function (hash, msg, nodeCrypto) {
var alg = params_1.default.hashes[hash].nodeName;
var hashFunc = nodeCrypto.createHash(alg);
hashFunc.update(msg);
return hashFunc.digest();
};

@@ -213,24 +157,21 @@ /**

*/
var purejs = function purejs(hash, msg) {
var h;
if (hash === 'MD5') {
h = (0, _md.default)(Array.from(msg), {
asBytes: true
});
} else if (['SHA3-512', 'SHA3-384', 'SHA3-256', 'SHA3-224'].indexOf(hash) >= 0) {
// sha3
var sha3obj = new _sha.SHA3(_params.default.hashes[hash].hashSize * 8);
var Buffer = require('buffer/').Buffer;
sha3obj.update(Buffer.from(msg));
h = sha3obj.digest('binary');
} else {
h = _hash.default[_params.default.hashes[hash].nodeName]().update(msg).digest();
}
return new Uint8Array(h);
};
var purejs = function (hash, msg) {
var h;
if (hash === 'MD5') {
h = md5_1.default(Array.from(msg), { asBytes: true });
}
else if (['SHA3-512', 'SHA3-384', 'SHA3-256', 'SHA3-224'].indexOf(hash) >= 0) {
// sha3
var sha3Len = params_1.default.hashes[hash].hashSize * 8;
var sha3obj = new sha3_1.SHA3(sha3Len);
var Buffer_1 = require('buffer/').Buffer;
sha3obj.update(Buffer_1.from(msg));
h = sha3obj.digest('binary');
}
else {
// @ts-ignore
h = hash_js_1.default[params_1.default.hashes[hash].nodeName]().update(msg).digest();
}
return new Uint8Array(h);
};
//# sourceMappingURL=hash.js.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "compute", {
enumerable: true,
get: function get() {
return _hash.compute;
}
});
exports.default = void 0;
var _hash = require("./hash.js");
/**
* index.js
*/
var _default = {
compute: _hash.compute
};
exports.default = _default;
Object.defineProperty(exports, "__esModule", { value: true });
var hash_1 = require("./hash");
exports.compute = hash_1.compute;
exports.default = { compute: hash_1.compute };
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],r):"object"==typeof exports?exports.jschash=r(require("crypto")):t.jschash=r(t.crypto)}(this,function(t){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(r){return t[r]}.bind(null,i));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="/home/circleci/repo/packages/js-crypto-hash/dist",e(e.s=15)}([function(t,r,e){"use strict";var n=e(1),i=e(32);function o(t,r){return 55296==(64512&t.charCodeAt(r))&&(!(r<0||r+1>=t.length)&&56320==(64512&t.charCodeAt(r+1)))}function u(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function a(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var e=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)e.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var u=t.charCodeAt(i);u<128?e[n++]=u:u<2048?(e[n++]=u>>6|192,e[n++]=63&u|128):o(t,i)?(u=65536+((1023&u)<<10)+(1023&t.charCodeAt(++i)),e[n++]=u>>18|240,e[n++]=u>>12&63|128,e[n++]=u>>6&63|128,e[n++]=63&u|128):(e[n++]=u>>12|224,e[n++]=u>>6&63|128,e[n++]=63&u|128)}else for(i=0;i<t.length;i++)e[i]=0|t[i];return e},r.toHex=function(t){for(var r="",e=0;e<t.length;e++)r+=s(t[e].toString(16));return r},r.htonl=u,r.toHex32=function(t,r){for(var e="",n=0;n<t.length;n++){var i=t[n];"little"===r&&(i=u(i)),e+=a(i.toString(16))}return e},r.zero2=s,r.zero8=a,r.join32=function(t,r,e,i){var o=e-r;n(o%4==0);for(var u=new Array(o/4),s=0,a=r;s<u.length;s++,a+=4){var h;h="big"===i?t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3]:t[a+3]<<24|t[a+2]<<16|t[a+1]<<8|t[a],u[s]=h>>>0}return u},r.split32=function(t,r){for(var e=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===r?(e[i]=o>>>24,e[i+1]=o>>>16&255,e[i+2]=o>>>8&255,e[i+3]=255&o):(e[i+3]=o>>>24,e[i+2]=o>>>16&255,e[i+1]=o>>>8&255,e[i]=255&o)}return e},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,e){return t+r+e>>>0},r.sum32_4=function(t,r,e,n){return t+r+e+n>>>0},r.sum32_5=function(t,r,e,n,i){return t+r+e+n+i>>>0},r.sum64=function(t,r,e,n){var i=t[r],o=n+t[r+1]>>>0,u=(o<n?1:0)+e+i;t[r]=u>>>0,t[r+1]=o},r.sum64_hi=function(t,r,e,n){return(r+n>>>0<r?1:0)+t+e>>>0},r.sum64_lo=function(t,r,e,n){return r+n>>>0},r.sum64_4_hi=function(t,r,e,n,i,o,u,s){var a=0,h=r;return a+=(h=h+n>>>0)<r?1:0,a+=(h=h+o>>>0)<o?1:0,t+e+i+u+(a+=(h=h+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(t,r,e,n,i,o,u,s){return r+n+o+s>>>0},r.sum64_5_hi=function(t,r,e,n,i,o,u,s,a,h){var f=0,c=r;return f+=(c=c+n>>>0)<r?1:0,f+=(c=c+o>>>0)<o?1:0,f+=(c=c+s>>>0)<s?1:0,t+e+i+u+a+(f+=(c=c+h>>>0)<h?1:0)>>>0},r.sum64_5_lo=function(t,r,e,n,i,o,u,s,a,h){return r+n+o+s+h>>>0},r.rotr64_hi=function(t,r,e){return(r<<32-e|t>>>e)>>>0},r.rotr64_lo=function(t,r,e){return(t<<32-e|r>>>e)>>>0},r.shr64_hi=function(t,r,e){return t>>>e},r.shr64_lo=function(t,r,e){return(t<<32-e|r>>>e)>>>0}},function(t,r){function e(t,r){if(!t)throw new Error(r||"Assertion failed")}t.exports=e,e.equal=function(t,r,e){if(t!=r)throw new Error(e||"Assertion failed: "+t+" != "+r)}},function(t,r,e){"use strict";var n=e(0),i=e(1);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(t,r){if(t=n.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var e=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-e,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,e=r-(t+this.padLength)%r,n=new Array(e+this.padLength);n[0]=128;for(var i=1;i<e;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getRootWebCryptoAll=r.getWebCryptoAll=r.getMsCrypto=r.getWebCrypto=r.getNodeCrypto=r.default=void 0;var n=function(){return"undefined"!=typeof window?void 0:e(17)};r.getNodeCrypto=n;var i=function(){if("undefined"!=typeof window)return window.crypto?window.crypto.subtle:void 0};r.getWebCrypto=i;var o=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto.subtle:window.crypto?window.crypto.subtle:void 0};r.getWebCryptoAll=o;var u=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto:window.crypto?window.crypto:void 0};r.getRootWebCryptoAll=u;var s=function(){if("undefined"!=typeof window&&!window.crypto)return window.msCrypto?window.msCrypto.subtle:void 0};r.getMsCrypto=s;var a={getNodeCrypto:n,getWebCrypto:i,getMsCrypto:s,getWebCryptoAll:o,getRootWebCryptoAll:u};r.default=a},function(t,r,e){"use strict";(function(t){
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],r):"object"==typeof exports?exports.jschash=r(require("crypto")):t.jschash=r(t.crypto)}(this,function(t){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(r){return t[r]}.bind(null,i));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="/home/circleci/repo/packages/js-crypto-hash/dist",e(e.s=9)}([function(t,r,e){"use strict";var n=e(1),i=e(32);function o(t,r){return 55296==(64512&t.charCodeAt(r))&&(!(r<0||r+1>=t.length)&&56320==(64512&t.charCodeAt(r+1)))}function u(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var e=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)e.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var u=t.charCodeAt(i);u<128?e[n++]=u:u<2048?(e[n++]=u>>6|192,e[n++]=63&u|128):o(t,i)?(u=65536+((1023&u)<<10)+(1023&t.charCodeAt(++i)),e[n++]=u>>18|240,e[n++]=u>>12&63|128,e[n++]=u>>6&63|128,e[n++]=63&u|128):(e[n++]=u>>12|224,e[n++]=u>>6&63|128,e[n++]=63&u|128)}else for(i=0;i<t.length;i++)e[i]=0|t[i];return e},r.toHex=function(t){for(var r="",e=0;e<t.length;e++)r+=s(t[e].toString(16));return r},r.htonl=u,r.toHex32=function(t,r){for(var e="",n=0;n<t.length;n++){var i=t[n];"little"===r&&(i=u(i)),e+=h(i.toString(16))}return e},r.zero2=s,r.zero8=h,r.join32=function(t,r,e,i){var o=e-r;n(o%4==0);for(var u=new Array(o/4),s=0,h=r;s<u.length;s++,h+=4){var f;f="big"===i?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],u[s]=f>>>0}return u},r.split32=function(t,r){for(var e=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===r?(e[i]=o>>>24,e[i+1]=o>>>16&255,e[i+2]=o>>>8&255,e[i+3]=255&o):(e[i+3]=o>>>24,e[i+2]=o>>>16&255,e[i+1]=o>>>8&255,e[i]=255&o)}return e},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,e){return t+r+e>>>0},r.sum32_4=function(t,r,e,n){return t+r+e+n>>>0},r.sum32_5=function(t,r,e,n,i){return t+r+e+n+i>>>0},r.sum64=function(t,r,e,n){var i=t[r],o=n+t[r+1]>>>0,u=(o<n?1:0)+e+i;t[r]=u>>>0,t[r+1]=o},r.sum64_hi=function(t,r,e,n){return(r+n>>>0<r?1:0)+t+e>>>0},r.sum64_lo=function(t,r,e,n){return r+n>>>0},r.sum64_4_hi=function(t,r,e,n,i,o,u,s){var h=0,f=r;return h+=(f=f+n>>>0)<r?1:0,h+=(f=f+o>>>0)<o?1:0,t+e+i+u+(h+=(f=f+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(t,r,e,n,i,o,u,s){return r+n+o+s>>>0},r.sum64_5_hi=function(t,r,e,n,i,o,u,s,h,f){var a=0,c=r;return a+=(c=c+n>>>0)<r?1:0,a+=(c=c+o>>>0)<o?1:0,a+=(c=c+s>>>0)<s?1:0,t+e+i+u+h+(a+=(c=c+f>>>0)<f?1:0)>>>0},r.sum64_5_lo=function(t,r,e,n,i,o,u,s,h,f){return r+n+o+s+f>>>0},r.rotr64_hi=function(t,r,e){return(r<<32-e|t>>>e)>>>0},r.rotr64_lo=function(t,r,e){return(t<<32-e|r>>>e)>>>0},r.shr64_hi=function(t,r,e){return t>>>e},r.shr64_lo=function(t,r,e){return(t<<32-e|r>>>e)>>>0}},function(t,r){function e(t,r){if(!t)throw new Error(r||"Assertion failed")}t.exports=e,e.equal=function(t,r,e){if(t!=r)throw new Error(e||"Assertion failed: "+t+" != "+r)}},function(t,r,e){"use strict";var n=e(0),i=e(1);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(t,r){if(t=n.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var e=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-e,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,e=r-(t+this.padLength)%r,n=new Array(e+this.padLength);n[0]=128;for(var i=1;i<e;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,r,e){"use strict";(function(t){
/*!

@@ -8,3 +8,3 @@ * The buffer module from node.js, for the browser.

*/
var n=e(20),i=e(21),o=e(22);function u(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=a.prototype:(null===t&&(t=new a(r)),t.length=r),t}function a(t,r,e){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return h(this,t,r,e)}function h(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);a.TYPED_ARRAY_SUPPORT?(t=r).__proto__=a.prototype:t=l(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),i=(t=s(t,n)).write(r,e);i!==n&&(t=t.slice(0,i));return t}(t,r,e):function(t,r){if(a.isBuffer(r)){var e=0|p(r.length);return 0===(t=s(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?s(t,0):l(t,r);if("Buffer"===r.type&&o(r.data))return l(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(f(r),t=s(t,r<0?0:0|p(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r){var e=r.length<0?0:0|p(r.length);t=s(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return D(t).length;default:if(n)return N(t).length;r=(""+r).toLowerCase(),n=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,r,e);case"utf8":case"utf-8":return P(this,r,e);case"ascii":return B(this,r,e);case"latin1":case"binary":return R(this,r,e);case"base64":return x(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=a.from(r,n)),a.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,i);if("number"==typeof r)return r&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,i){var o,u=1,s=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,s/=2,a/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var f=-1;for(o=e;o<s;o++)if(h(t,o)===h(r,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===a)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(e+a>s&&(e=s-a),o=e;o>=0;o--){for(var c=!0,l=0;l<a;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function m(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var s=parseInt(r.substr(2*u,2),16);if(isNaN(s))return u;t[e+u]=s}return u}function _(t,r,e,n){return W(N(r,t.length-e),t,e,n)}function b(t,r,e,n){return W(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function A(t,r,e,n){return b(t,r,e,n)}function S(t,r,e,n){return W(D(r),t,e,n)}function E(t,r,e,n){return W(function(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function x(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function P(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,s,a,h=t[i],f=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&h)<<6|63&o)>127&&(f=a);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(a=(15&h)<<12|(63&o)<<6|63&u)>2047&&(a<55296||a>57343)&&(f=a);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(a=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&a<1114112&&(f=a)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=c}return function(t){var r=t.length;if(r<=T)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=T));return e}(n)}r.Buffer=a,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),u(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,r,e){return h(null,t,r,e)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,r,e){return function(t,r,e,n){return f(r),r<=0?s(t,r):void 0!==e?"string"==typeof n?s(t,r).fill(e,n):s(t,r).fill(e):s(t,r)}(null,t,r,e)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},a.isEncoding=function(t){switch(String(t).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}},a.concat=function(t,r){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=a.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var u=t[e];if(!a.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,i),i+=u.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)y(this,r,r+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):g.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,r,e,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),f=t.slice(r,e),c=0;c<s;++c)if(h[c]!==f[c]){o=h[c],u=f[c];break}return o<u?-1:u<o?1:0},a.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},a.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},a.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},a.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,r,e);case"utf8":case"utf-8":return _(this,t,r,e);case"ascii":return b(this,t,r,e);case"latin1":case"binary":return A(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function B(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function U(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=H(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function O(t,r,e,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function k(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function I(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,e,n,o){return o||I(t,0,e,4),i.write(t,r,e,n,23,4),e+4}function z(t,r,e,n,o){return o||I(t,0,e,8),i.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),a.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=a.prototype;else{var i=r-t;e=new a(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},a.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},a.prototype.readUInt8=function(t,r){return r||L(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||L(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||L(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||L(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},a.prototype.readInt8=function(t,r){return r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||L(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||L(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||L(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||L(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||L(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||L(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||O(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},a.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||O(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):k(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):k(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):M(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):M(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);O(this,t,r,e,i-1,-i)}var o=0,u=1,s=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);O(this,t,r,e,i-1,-i)}var o=e-1,u=1,s=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):k(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):k(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):M(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):M(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return z(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return z(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},a.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=a.isBuffer(t)?t:N(new a(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var Y=/[^+\/0-9A-Za-z-_]/g;function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Y,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}}).call(this,e(40))},function(t,r,e){"use strict";t.exports=function(t,r){return function(e,n){var i=2*n,o=2*r;e[i]=t[o],e[i+1]=t[o+1]}}},function(t,r,e){t.exports=e(16)},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){"use strict";var n=e(0).rotr32;function i(t,r,e){return t&r^~t&e}function o(t,r,e){return t&r^t&e^r&e}function u(t,r,e){return t^r^e}r.ft_1=function(t,r,e,n){return 0===t?i(r,e,n):1===t||3===t?u(r,e,n):2===t?o(r,e,n):void 0},r.ch32=i,r.maj32=o,r.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},r.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},r.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(8),u=e(1),s=n.sum32,a=n.sum32_4,h=n.sum32_5,f=o.ch32,c=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,y=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function w(){if(!(this instanceof w))return new w;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(w,y),t.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(t,r){for(var e=this.W,n=0;n<16;n++)e[n]=t[r+n];for(;n<e.length;n++)e[n]=a(g(e[n-2]),e[n-7],d(e[n-15]),e[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],v=this.h[3],w=this.h[4],m=this.h[5],_=this.h[6],b=this.h[7];for(u(this.k.length===e.length),n=0;n<e.length;n++){var A=h(b,p(w),f(w,m,_),this.k[n],e[n]),S=s(l(i),c(i,o,y));b=_,_=m,m=w,w=s(v,A),v=y,y=o,o=i,i=s(A,S)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],w),this.h[5]=s(this.h[5],m),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],b)},w.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(1),u=n.rotr64_hi,s=n.rotr64_lo,a=n.shr64_hi,h=n.shr64_lo,f=n.sum64,c=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,y=n.sum64_5_lo,v=i.BlockHash,w=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function _(t,r,e,n,i){var o=t&e^~t&i;return o<0&&(o+=4294967296),o}function b(t,r,e,n,i,o){var u=r&n^~r&o;return u<0&&(u+=4294967296),u}function A(t,r,e,n,i){var o=t&e^t&i^e&i;return o<0&&(o+=4294967296),o}function S(t,r,e,n,i,o){var u=r&n^r&o^n&o;return u<0&&(u+=4294967296),u}function E(t,r){var e=u(t,r,28)^u(r,t,2)^u(r,t,7);return e<0&&(e+=4294967296),e}function x(t,r){var e=s(t,r,28)^s(r,t,2)^s(r,t,7);return e<0&&(e+=4294967296),e}function P(t,r){var e=u(t,r,14)^u(t,r,18)^u(r,t,9);return e<0&&(e+=4294967296),e}function T(t,r){var e=s(t,r,14)^s(t,r,18)^s(r,t,9);return e<0&&(e+=4294967296),e}function B(t,r){var e=u(t,r,1)^u(t,r,8)^a(t,r,7);return e<0&&(e+=4294967296),e}function R(t,r){var e=s(t,r,1)^s(t,r,8)^h(t,r,7);return e<0&&(e+=4294967296),e}function U(t,r){var e=u(t,r,19)^u(r,t,29)^a(t,r,6);return e<0&&(e+=4294967296),e}function C(t,r){var e=s(t,r,19)^s(r,t,29)^h(t,r,6);return e<0&&(e+=4294967296),e}n.inherits(m,v),t.exports=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(t,r){for(var e=this.W,n=0;n<32;n++)e[n]=t[r+n];for(;n<e.length;n+=2){var i=U(e[n-4],e[n-3]),o=C(e[n-4],e[n-3]),u=e[n-14],s=e[n-13],a=B(e[n-30],e[n-29]),h=R(e[n-30],e[n-29]),f=e[n-32],c=e[n-31];e[n]=p(i,o,u,s,a,h,f,c),e[n+1]=d(i,o,u,s,a,h,f,c)}},m.prototype._update=function(t,r){this._prepareBlock(t,r);var e=this.W,n=this.h[0],i=this.h[1],u=this.h[2],s=this.h[3],a=this.h[4],h=this.h[5],p=this.h[6],d=this.h[7],v=this.h[8],w=this.h[9],m=this.h[10],B=this.h[11],R=this.h[12],U=this.h[13],C=this.h[14],L=this.h[15];o(this.k.length===e.length);for(var O=0;O<e.length;O+=2){var k=C,M=L,I=P(v,w),j=T(v,w),z=_(v,w,m,B,R),Y=b(v,w,m,B,R,U),H=this.k[O],N=this.k[O+1],D=e[O],W=e[O+1],F=g(k,M,I,j,z,Y,H,N,D,W),q=y(k,M,I,j,z,Y,H,N,D,W);k=E(n,i),M=x(n,i),I=A(n,i,u,s,a),j=S(n,i,u,s,a,h);var G=c(k,M,I,j),K=l(k,M,I,j);C=R,L=U,R=m,U=B,m=v,B=w,v=c(p,d,F,q),w=l(d,d,F,q),p=a,d=h,a=u,h=s,u=n,s=i,n=c(F,q,G,K),i=l(F,q,G,K)}f(this.h,0,n,i),f(this.h,2,u,s),f(this.h,4,a,h),f(this.h,6,p,d),f(this.h,8,v,w),f(this.h,10,m,B),f(this.h,12,R,U),f(this.h,14,C,L)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r){function e(t,r,e,n,i,o,u){try{var s=t[o](u),a=s.value}catch(t){return void e(t)}s.done?r(a):Promise.resolve(a).then(n,i)}t.exports=function(t){return function(){var r=this,n=arguments;return new Promise(function(i,o){var u=t.apply(r,n);function s(t){e(u,i,o,s,a,"next",t)}function a(t){e(u,i,o,s,a,"throw",t)}s(void 0)})}}},function(t,r,e){var n,i,o,u,s;n=e(18),i=e(7).utf8,o=e(19),u=e(7).bin,(s=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?u.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var e=n.bytesToWords(t),a=8*t.length,h=1732584193,f=-271733879,c=-1732584194,l=271733878,p=0;p<e.length;p++)e[p]=16711935&(e[p]<<8|e[p]>>>24)|4278255360&(e[p]<<24|e[p]>>>8);e[a>>>5]|=128<<a%32,e[14+(a+64>>>9<<4)]=a;var d=s._ff,g=s._gg,y=s._hh,v=s._ii;for(p=0;p<e.length;p+=16){var w=h,m=f,_=c,b=l;h=d(h,f,c,l,e[p+0],7,-680876936),l=d(l,h,f,c,e[p+1],12,-389564586),c=d(c,l,h,f,e[p+2],17,606105819),f=d(f,c,l,h,e[p+3],22,-1044525330),h=d(h,f,c,l,e[p+4],7,-176418897),l=d(l,h,f,c,e[p+5],12,1200080426),c=d(c,l,h,f,e[p+6],17,-1473231341),f=d(f,c,l,h,e[p+7],22,-45705983),h=d(h,f,c,l,e[p+8],7,1770035416),l=d(l,h,f,c,e[p+9],12,-1958414417),c=d(c,l,h,f,e[p+10],17,-42063),f=d(f,c,l,h,e[p+11],22,-1990404162),h=d(h,f,c,l,e[p+12],7,1804603682),l=d(l,h,f,c,e[p+13],12,-40341101),c=d(c,l,h,f,e[p+14],17,-1502002290),h=g(h,f=d(f,c,l,h,e[p+15],22,1236535329),c,l,e[p+1],5,-165796510),l=g(l,h,f,c,e[p+6],9,-1069501632),c=g(c,l,h,f,e[p+11],14,643717713),f=g(f,c,l,h,e[p+0],20,-373897302),h=g(h,f,c,l,e[p+5],5,-701558691),l=g(l,h,f,c,e[p+10],9,38016083),c=g(c,l,h,f,e[p+15],14,-660478335),f=g(f,c,l,h,e[p+4],20,-405537848),h=g(h,f,c,l,e[p+9],5,568446438),l=g(l,h,f,c,e[p+14],9,-1019803690),c=g(c,l,h,f,e[p+3],14,-187363961),f=g(f,c,l,h,e[p+8],20,1163531501),h=g(h,f,c,l,e[p+13],5,-1444681467),l=g(l,h,f,c,e[p+2],9,-51403784),c=g(c,l,h,f,e[p+7],14,1735328473),h=y(h,f=g(f,c,l,h,e[p+12],20,-1926607734),c,l,e[p+5],4,-378558),l=y(l,h,f,c,e[p+8],11,-2022574463),c=y(c,l,h,f,e[p+11],16,1839030562),f=y(f,c,l,h,e[p+14],23,-35309556),h=y(h,f,c,l,e[p+1],4,-1530992060),l=y(l,h,f,c,e[p+4],11,1272893353),c=y(c,l,h,f,e[p+7],16,-155497632),f=y(f,c,l,h,e[p+10],23,-1094730640),h=y(h,f,c,l,e[p+13],4,681279174),l=y(l,h,f,c,e[p+0],11,-358537222),c=y(c,l,h,f,e[p+3],16,-722521979),f=y(f,c,l,h,e[p+6],23,76029189),h=y(h,f,c,l,e[p+9],4,-640364487),l=y(l,h,f,c,e[p+12],11,-421815835),c=y(c,l,h,f,e[p+15],16,530742520),h=v(h,f=y(f,c,l,h,e[p+2],23,-995338651),c,l,e[p+0],6,-198630844),l=v(l,h,f,c,e[p+7],10,1126891415),c=v(c,l,h,f,e[p+14],15,-1416354905),f=v(f,c,l,h,e[p+5],21,-57434055),h=v(h,f,c,l,e[p+12],6,1700485571),l=v(l,h,f,c,e[p+3],10,-1894986606),c=v(c,l,h,f,e[p+10],15,-1051523),f=v(f,c,l,h,e[p+1],21,-2054922799),h=v(h,f,c,l,e[p+8],6,1873313359),l=v(l,h,f,c,e[p+15],10,-30611744),c=v(c,l,h,f,e[p+6],15,-1560198380),f=v(f,c,l,h,e[p+13],21,1309151649),h=v(h,f,c,l,e[p+4],6,-145523070),l=v(l,h,f,c,e[p+11],10,-1120210379),c=v(c,l,h,f,e[p+2],15,718787259),f=v(f,c,l,h,e[p+9],21,-343485551),h=h+w>>>0,f=f+m>>>0,c=c+_>>>0,l=l+b>>>0}return n.endian([h,f,c,l])})._ff=function(t,r,e,n,i,o,u){var s=t+(r&e|~r&n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._gg=function(t,r,e,n,i,o,u){var s=t+(r&n|e&~n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._hh=function(t,r,e,n,i,o,u){var s=t+(r^e^n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._ii=function(t,r,e,n,i,o,u){var s=t+(e^(r|~n))+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._blocksize=16,s._digestsize=16,t.exports=function(t,r){if(null==t)throw new Error("Illegal argument "+t);var e=n.wordsToBytes(s(t,r));return r&&r.asBytes?e:r&&r.asString?u.bytesToString(e):n.bytesToHex(e)}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.SHA3Hash=r.SHA3=r.Keccak=void 0;var n,i=e(4),o=(n=e(23))&&n.__esModule?n:{default:n};var u=function(t){var r=t.padding;return function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:512;if(!this||this.constructor!==t)return new t(n);var u=new o.default({capacity:n,padding:r});return this.update=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(t))return u.absorb(t),e;if("string"==typeof t)return e.update(i.Buffer.from(t,r));throw new TypeError("Not a string or buffer")},this.digest=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",r=u.squeeze();return t&&"binary"!==t?r.toString(t):r},this.reset=function(){return u.reset(),e},this}},s=u({padding:1});r.Keccak=s;var a=u({padding:6});r.SHA3=a;var h=s;r.SHA3Hash=h,a.SHA3Hash=h;var f=a;r.default=f},function(t,r,e){var n=r;n.utils=e(0),n.common=e(2),n.sha=e(33),n.ripemd=e(37),n.hmac=e(38),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,r,e){t.exports=e(39)},function(t,r,e){var n=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function a(t,r,e,n){var i=r&&r.prototype instanceof g?r:g,o=Object.create(i.prototype),u=new T(n||[]);return o._invoke=function(t,r,e){var n=f;return function(i,o){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return R()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var s=E(u,e);if(s){if(s===d)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=l;var a=h(t,r,e);if("normal"===a.type){if(n=e.done?p:c,a.arg===d)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(n=p,e.method="throw",e.arg=a.arg)}}}(t,e,u),o}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var f="suspendedStart",c="suspendedYield",l="executing",p="completed",d={};function g(){}function y(){}function v(){}var w={};w[o]=function(){return this};var m=Object.getPrototypeOf,_=m&&m(m(B([])));_&&_!==e&&n.call(_,o)&&(w=_);var b=v.prototype=g.prototype=Object.create(w);function A(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function S(t){var r;this._invoke=function(e,i){function o(){return new Promise(function(r,o){!function r(e,i,o,u){var s=h(t[e],t,i);if("throw"!==s.type){var a=s.arg,f=a.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,o,u)},function(t){r("throw",t,o,u)}):Promise.resolve(f).then(function(t){a.value=t,o(a)},function(t){return r("throw",t,o,u)})}u(s.arg)}(e,i,r,o)})}return r=r?r.then(o,o):o()}}function E(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,E(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function x(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function B(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,u=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return u.next=u}}return{next:R}}function R(){return{value:r,done:!0}}return y.prototype=b.constructor=v,v.constructor=y,v[s]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},A(S.prototype),S.prototype[u]=function(){return this},t.AsyncIterator=S,t.async=function(r,e,n,i){var o=new S(a(r,e,n,i));return t.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},A(b),b[s]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=B,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return s.type="throw",s.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var a=n.call(u,"catchLoc"),h=n.call(u,"finallyLoc");if(a&&h){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=r,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(u)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;P(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:B(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(r,e){r.exports=t},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?r.push(e.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(n))>>>6-2*i);return r}},t.exports=n},function(t,r){function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
var n=e(19),i=e(20),o=e(21);function u(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=h.prototype:(null===t&&(t=new h(r)),t.length=r),t}function h(t,r,e){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);h.TYPED_ARRAY_SUPPORT?(t=r).__proto__=h.prototype:t=l(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!h.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),i=(t=s(t,n)).write(r,e);i!==n&&(t=t.slice(0,i));return t}(t,r,e):function(t,r){if(h.isBuffer(r)){var e=0|p(r.length);return 0===(t=s(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?s(t,0):l(t,r);if("Buffer"===r.type&&o(r.data))return l(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(a(r),t=s(t,r<0?0:0|p(r)),!h.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r){var e=r.length<0?0:0|p(r.length);t=s(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return D(t).length;default:if(n)return N(t).length;r=(""+r).toLowerCase(),n=!0}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,r,e);case"utf8":case"utf-8":return P(this,r,e);case"ascii":return T(this,r,e);case"latin1":case"binary":return x(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=h.from(r,n)),h.isBuffer(r))return 0===r.length?-1:w(t,r,e,n,i);if("number"==typeof r)return r&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):w(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,r,e,n,i){var o,u=1,s=t.length,h=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,s/=2,h/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<s;o++)if(f(t,o)===f(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===h)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+h>s&&(e=s-h),o=e;o>=0;o--){for(var c=!0,l=0;l<h;l++)if(f(t,o+l)!==f(r,l)){c=!1;break}if(c)return o}return-1}function _(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var s=parseInt(r.substr(2*u,2),16);if(isNaN(s))return u;t[e+u]=s}return u}function b(t,r,e,n){return W(N(r,t.length-e),t,e,n)}function m(t,r,e,n){return W(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function A(t,r,e,n){return m(t,r,e,n)}function S(t,r,e,n){return W(D(r),t,e,n)}function E(t,r,e,n){return W(function(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function B(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function P(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,s,h,f=t[i],a=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=e)switch(c){case 1:f<128&&(a=f);break;case 2:128==(192&(o=t[i+1]))&&(h=(31&f)<<6|63&o)>127&&(a=h);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(h=(15&f)<<12|(63&o)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(h=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&h<1114112&&(a=h)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return function(t){var r=t.length;if(r<=R)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=R));return e}(n)}r.Buffer=h,r.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),u(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,r,e){return f(null,t,r,e)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,r,e){return function(t,r,e,n){return a(r),r<=0?s(t,r):void 0!==e?"string"==typeof n?s(t,r).fill(e,n):s(t,r).fill(e):s(t,r)}(null,t,r,e)},h.allocUnsafe=function(t){return c(null,t)},h.allocUnsafeSlow=function(t){return c(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,r){if(!h.isBuffer(t)||!h.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},h.isEncoding=function(t){switch(String(t).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}},h.concat=function(t,r){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=h.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var u=t[e];if(!h.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,i),i+=u.length}return n},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)y(this,r,r+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):g.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,r,e,n,i){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),f=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(f[c]!==a[c]){o=f[c],u=a[c];break}return o<u?-1:u<o?1:0},h.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},h.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},h.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},h.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,r,e);case"utf8":case"utf-8":return b(this,t,r,e);case"ascii":return m(this,t,r,e);case"latin1":case"binary":return A(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function T(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function U(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=H(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function O(t,r,e,n,i,o){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function z(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function I(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Y(t,r,e,n,o){return o||I(t,0,e,4),i.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,o){return o||I(t,0,e,8),i.write(t,r,e,n,52,8),e+8}h.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),h.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=h.prototype;else{var i=r-t;e=new h(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},h.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},h.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},h.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},h.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},h.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||O(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},h.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||O(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},h.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},h.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):z(this,t,r,!0),r+2},h.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):z(this,t,r,!1),r+2},h.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):k(this,t,r,!0),r+4},h.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},h.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);O(this,t,r,e,i-1,-i)}var o=0,u=1,s=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+e},h.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);O(this,t,r,e,i-1,-i)}var o=e-1,u=1,s=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+e},h.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},h.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):z(this,t,r,!0),r+2},h.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):z(this,t,r,!1),r+2},h.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):k(this,t,r,!0),r+4},h.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||O(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},h.prototype.writeFloatLE=function(t,r,e){return Y(this,t,r,!0,e)},h.prototype.writeFloatBE=function(t,r,e){return Y(this,t,r,!1,e)},h.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},h.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},h.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},h.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=h.isBuffer(t)?t:N(new h(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}}).call(this,e(39))},function(t,r,e){"use strict";t.exports=function(t,r){return function(e,n){var i=2*n,o=2*r;e[i]=t[o],e[i+1]=t[o+1]}}},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){"use strict";var n=e(0).rotr32;function i(t,r,e){return t&r^~t&e}function o(t,r,e){return t&r^t&e^r&e}function u(t,r,e){return t^r^e}r.ft_1=function(t,r,e,n){return 0===t?i(r,e,n):1===t||3===t?u(r,e,n):2===t?o(r,e,n):void 0},r.ch32=i,r.maj32=o,r.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},r.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},r.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(6),u=e(1),s=n.sum32,h=n.sum32_4,f=n.sum32_5,a=o.ch32,c=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,y=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function w(){if(!(this instanceof w))return new w;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(w,y),t.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(t,r){for(var e=this.W,n=0;n<16;n++)e[n]=t[r+n];for(;n<e.length;n++)e[n]=h(g(e[n-2]),e[n-7],d(e[n-15]),e[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],v=this.h[3],w=this.h[4],_=this.h[5],b=this.h[6],m=this.h[7];for(u(this.k.length===e.length),n=0;n<e.length;n++){var A=f(m,p(w),a(w,_,b),this.k[n],e[n]),S=s(l(i),c(i,o,y));m=b,b=_,_=w,w=s(v,A),v=y,y=o,o=i,i=s(A,S)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],w),this.h[5]=s(this.h[5],_),this.h[6]=s(this.h[6],b),this.h[7]=s(this.h[7],m)},w.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(1),u=n.rotr64_hi,s=n.rotr64_lo,h=n.shr64_hi,f=n.shr64_lo,a=n.sum64,c=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,y=n.sum64_5_lo,v=i.BlockHash,w=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function b(t,r,e,n,i){var o=t&e^~t&i;return o<0&&(o+=4294967296),o}function m(t,r,e,n,i,o){var u=r&n^~r&o;return u<0&&(u+=4294967296),u}function A(t,r,e,n,i){var o=t&e^t&i^e&i;return o<0&&(o+=4294967296),o}function S(t,r,e,n,i,o){var u=r&n^r&o^n&o;return u<0&&(u+=4294967296),u}function E(t,r){var e=u(t,r,28)^u(r,t,2)^u(r,t,7);return e<0&&(e+=4294967296),e}function B(t,r){var e=s(t,r,28)^s(r,t,2)^s(r,t,7);return e<0&&(e+=4294967296),e}function P(t,r){var e=u(t,r,14)^u(t,r,18)^u(r,t,9);return e<0&&(e+=4294967296),e}function R(t,r){var e=s(t,r,14)^s(t,r,18)^s(r,t,9);return e<0&&(e+=4294967296),e}function T(t,r){var e=u(t,r,1)^u(t,r,8)^h(t,r,7);return e<0&&(e+=4294967296),e}function x(t,r){var e=s(t,r,1)^s(t,r,8)^f(t,r,7);return e<0&&(e+=4294967296),e}function U(t,r){var e=u(t,r,19)^u(r,t,29)^h(t,r,6);return e<0&&(e+=4294967296),e}function C(t,r){var e=s(t,r,19)^s(r,t,29)^f(t,r,6);return e<0&&(e+=4294967296),e}n.inherits(_,v),t.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(t,r){for(var e=this.W,n=0;n<32;n++)e[n]=t[r+n];for(;n<e.length;n+=2){var i=U(e[n-4],e[n-3]),o=C(e[n-4],e[n-3]),u=e[n-14],s=e[n-13],h=T(e[n-30],e[n-29]),f=x(e[n-30],e[n-29]),a=e[n-32],c=e[n-31];e[n]=p(i,o,u,s,h,f,a,c),e[n+1]=d(i,o,u,s,h,f,a,c)}},_.prototype._update=function(t,r){this._prepareBlock(t,r);var e=this.W,n=this.h[0],i=this.h[1],u=this.h[2],s=this.h[3],h=this.h[4],f=this.h[5],p=this.h[6],d=this.h[7],v=this.h[8],w=this.h[9],_=this.h[10],T=this.h[11],x=this.h[12],U=this.h[13],C=this.h[14],M=this.h[15];o(this.k.length===e.length);for(var O=0;O<e.length;O+=2){var z=C,k=M,I=P(v,w),Y=R(v,w),j=b(v,w,_,T,x),L=m(v,w,_,T,x,U),H=this.k[O],N=this.k[O+1],D=e[O],W=e[O+1],q=g(z,k,I,Y,j,L,H,N,D,W),F=y(z,k,I,Y,j,L,H,N,D,W);z=E(n,i),k=B(n,i),I=A(n,i,u,s,h),Y=S(n,i,u,s,h,f);var V=c(z,k,I,Y),X=l(z,k,I,Y);C=x,M=U,x=_,U=T,_=v,T=w,v=c(p,d,q,F),w=l(d,d,q,F),p=h,d=f,h=u,f=s,u=n,s=i,n=c(q,F,V,X),i=l(q,F,V,X)}a(this.h,0,n,i),a(this.h,2,u,s),a(this.h,4,h,f),a(this.h,6,p,d),a(this.h,8,v,w),a(this.h,10,_,T),a(this.h,12,x,U),a(this.h,14,C,M)},_.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r,e){t.exports=e(10)},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e(11);n.compute,n.compute},function(t,r,e){"use strict";var n=this&&this.__awaiter||function(t,r,e,n){return new(e||(e=Promise))(function(i,o){function u(t){try{h(n.next(t))}catch(t){o(t)}}function s(t){try{h(n.throw(t))}catch(t){o(t)}}function h(t){var r;t.done?i(t.value):(r=t.value,r instanceof e?r:new e(function(t){t(r)})).then(u,s)}h((n=n.apply(t,r||[])).next())})},i=this&&this.__generator||function(t,r){var e,n,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,n=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=(i=u.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=r.call(t,u)}catch(t){o=[6,t],n=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var e in t)Object.hasOwnProperty.call(t,e)&&(r[e]=t[e]);return r.default=t,r},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=o(e(12)),h=u(e(14)),f=u(e(15)),a=e(18),c=u(e(31));r.compute=function(t,r){return void 0===r&&(r="SHA-256"),n(void 0,void 0,void 0,function(){var e,n,o,u,h,f,a;return i(this,function(i){switch(i.label){case 0:e=s.getWebCrypto(),n=s.getNodeCrypto(),o=s.getMsCrypto(),f=!0,i.label=1;case 1:return i.trys.push([1,8,,9]),void 0===e||"function"!=typeof e.digest||void 0!==o?[3,3]:[4,e.digest(r,t)];case 2:return u=i.sent(),[3,7];case 3:return void 0===n?[3,4]:(u=p(r,t,n),[3,7]);case 4:return void 0===o||"function"!=typeof o.digest?[3,6]:[4,l(r,t,o)];case 5:return u=i.sent(),[3,7];case 6:f=!1,i.label=7;case 7:return[3,9];case 8:return a=i.sent(),h=a.message,f=!1,[3,9];case 9:if(!f)try{u=d(r,t)}catch(t){throw h=h+" => "+t.message,new Error("UnsupportedEnvironment: "+h)}return[2,new Uint8Array(u)]}})})};var l=function(t,r,e){return new Promise(function(n,i){var o=e.digest(t,r);o.oncomplete=function(t){n(t.target.result)},o.onerror=function(t){i(t)}})},p=function(t,r,e){var n=h.default.hashes[t].nodeName,i=e.createHash(n);return i.update(r),i.digest()},d=function(t,r){var n;if("MD5"===t)n=f.default(Array.from(r),{asBytes:!0});else if(["SHA3-512","SHA3-384","SHA3-256","SHA3-224"].indexOf(t)>=0){var i=8*h.default.hashes[t].hashSize,o=new a.SHA3(i),u=e(3).Buffer;o.update(u.from(r)),n=o.digest("binary")}else n=c.default[h.default.hashes[t].nodeName]().update(r).digest();return new Uint8Array(n)}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return"undefined"!=typeof window?void 0:e(13)};r.getNodeCrypto=n;var i=function(){if("undefined"!=typeof window&&window.crypto)return window.crypto.subtle};r.getWebCrypto=i;var o=function(){if("undefined"!=typeof window){if(window.msCrypto)return window.msCrypto.subtle;if(window.crypto)return window.crypto.subtle}};r.getWebCryptoAll=o;var u=function(){if("undefined"!=typeof window){if(window.msCrypto)return window.msCrypto;if(window.crypto)return window.crypto}};r.getRootWebCryptoAll=u;var s=function(){if("undefined"!=typeof window&&window.msCrypto)return window.msCrypto.subtle};r.getMsCrypto=s,r.default={getNodeCrypto:n,getWebCrypto:i,getMsCrypto:s,getWebCryptoAll:o,getRootWebCryptoAll:u}},function(r,e){r.exports=t},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={hashes:{"SHA3-512":{nodeName:"sha3-512",hashSize:64},"SHA3-384":{nodeName:"sha3-384",hashSize:48},"SHA3-256":{nodeName:"sha3-256",hashSize:32},"SHA3-224":{nodeName:"sha3-224",hashSize:28},"SHA-256":{nodeName:"sha256",hashSize:32},"SHA-384":{nodeName:"sha384",hashSize:48},"SHA-512":{nodeName:"sha512",hashSize:64},"SHA-1":{nodeName:"sha1",hashSize:20},MD5:{nodeName:"md5",hashSize:16}}}},function(t,r,e){var n,i,o,u,s;n=e(16),i=e(5).utf8,o=e(17),u=e(5).bin,(s=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?u.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var e=n.bytesToWords(t),h=8*t.length,f=1732584193,a=-271733879,c=-1732584194,l=271733878,p=0;p<e.length;p++)e[p]=16711935&(e[p]<<8|e[p]>>>24)|4278255360&(e[p]<<24|e[p]>>>8);e[h>>>5]|=128<<h%32,e[14+(h+64>>>9<<4)]=h;var d=s._ff,g=s._gg,y=s._hh,v=s._ii;for(p=0;p<e.length;p+=16){var w=f,_=a,b=c,m=l;f=d(f,a,c,l,e[p+0],7,-680876936),l=d(l,f,a,c,e[p+1],12,-389564586),c=d(c,l,f,a,e[p+2],17,606105819),a=d(a,c,l,f,e[p+3],22,-1044525330),f=d(f,a,c,l,e[p+4],7,-176418897),l=d(l,f,a,c,e[p+5],12,1200080426),c=d(c,l,f,a,e[p+6],17,-1473231341),a=d(a,c,l,f,e[p+7],22,-45705983),f=d(f,a,c,l,e[p+8],7,1770035416),l=d(l,f,a,c,e[p+9],12,-1958414417),c=d(c,l,f,a,e[p+10],17,-42063),a=d(a,c,l,f,e[p+11],22,-1990404162),f=d(f,a,c,l,e[p+12],7,1804603682),l=d(l,f,a,c,e[p+13],12,-40341101),c=d(c,l,f,a,e[p+14],17,-1502002290),f=g(f,a=d(a,c,l,f,e[p+15],22,1236535329),c,l,e[p+1],5,-165796510),l=g(l,f,a,c,e[p+6],9,-1069501632),c=g(c,l,f,a,e[p+11],14,643717713),a=g(a,c,l,f,e[p+0],20,-373897302),f=g(f,a,c,l,e[p+5],5,-701558691),l=g(l,f,a,c,e[p+10],9,38016083),c=g(c,l,f,a,e[p+15],14,-660478335),a=g(a,c,l,f,e[p+4],20,-405537848),f=g(f,a,c,l,e[p+9],5,568446438),l=g(l,f,a,c,e[p+14],9,-1019803690),c=g(c,l,f,a,e[p+3],14,-187363961),a=g(a,c,l,f,e[p+8],20,1163531501),f=g(f,a,c,l,e[p+13],5,-1444681467),l=g(l,f,a,c,e[p+2],9,-51403784),c=g(c,l,f,a,e[p+7],14,1735328473),f=y(f,a=g(a,c,l,f,e[p+12],20,-1926607734),c,l,e[p+5],4,-378558),l=y(l,f,a,c,e[p+8],11,-2022574463),c=y(c,l,f,a,e[p+11],16,1839030562),a=y(a,c,l,f,e[p+14],23,-35309556),f=y(f,a,c,l,e[p+1],4,-1530992060),l=y(l,f,a,c,e[p+4],11,1272893353),c=y(c,l,f,a,e[p+7],16,-155497632),a=y(a,c,l,f,e[p+10],23,-1094730640),f=y(f,a,c,l,e[p+13],4,681279174),l=y(l,f,a,c,e[p+0],11,-358537222),c=y(c,l,f,a,e[p+3],16,-722521979),a=y(a,c,l,f,e[p+6],23,76029189),f=y(f,a,c,l,e[p+9],4,-640364487),l=y(l,f,a,c,e[p+12],11,-421815835),c=y(c,l,f,a,e[p+15],16,530742520),f=v(f,a=y(a,c,l,f,e[p+2],23,-995338651),c,l,e[p+0],6,-198630844),l=v(l,f,a,c,e[p+7],10,1126891415),c=v(c,l,f,a,e[p+14],15,-1416354905),a=v(a,c,l,f,e[p+5],21,-57434055),f=v(f,a,c,l,e[p+12],6,1700485571),l=v(l,f,a,c,e[p+3],10,-1894986606),c=v(c,l,f,a,e[p+10],15,-1051523),a=v(a,c,l,f,e[p+1],21,-2054922799),f=v(f,a,c,l,e[p+8],6,1873313359),l=v(l,f,a,c,e[p+15],10,-30611744),c=v(c,l,f,a,e[p+6],15,-1560198380),a=v(a,c,l,f,e[p+13],21,1309151649),f=v(f,a,c,l,e[p+4],6,-145523070),l=v(l,f,a,c,e[p+11],10,-1120210379),c=v(c,l,f,a,e[p+2],15,718787259),a=v(a,c,l,f,e[p+9],21,-343485551),f=f+w>>>0,a=a+_>>>0,c=c+b>>>0,l=l+m>>>0}return n.endian([f,a,c,l])})._ff=function(t,r,e,n,i,o,u){var s=t+(r&e|~r&n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._gg=function(t,r,e,n,i,o,u){var s=t+(r&n|e&~n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._hh=function(t,r,e,n,i,o,u){var s=t+(r^e^n)+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._ii=function(t,r,e,n,i,o,u){var s=t+(e^(r|~n))+(i>>>0)+u;return(s<<o|s>>>32-o)+r},s._blocksize=16,s._digestsize=16,t.exports=function(t,r){if(null==t)throw new Error("Illegal argument "+t);var e=n.wordsToBytes(s(t,r));return r&&r.asBytes?e:r&&r.asString?u.bytesToString(e):n.bytesToHex(e)}},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?r.push(e.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(n))>>>6-2*i);return r}},t.exports=n},function(t,r){function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!

@@ -16,2 +16,2 @@ * Determine if an object is a Buffer

*/
t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,r,e){"use strict";r.toByteArray=function(t){for(var r,e=h(t),n=e[0],u=e[1],s=new o(function(t,r,e){return 3*(r+e)/4-e}(0,n,u)),a=0,f=u>0?n-4:n,c=0;c<f;c+=4)r=i[t.charCodeAt(c)]<<18|i[t.charCodeAt(c+1)]<<12|i[t.charCodeAt(c+2)]<<6|i[t.charCodeAt(c+3)],s[a++]=r>>16&255,s[a++]=r>>8&255,s[a++]=255&r;2===u&&(r=i[t.charCodeAt(c)]<<2|i[t.charCodeAt(c+1)]>>4,s[a++]=255&r);1===u&&(r=i[t.charCodeAt(c)]<<10|i[t.charCodeAt(c+1)]<<4|i[t.charCodeAt(c+2)]>>2,s[a++]=r>>8&255,s[a++]=255&r);return s},r.fromByteArray=function(t){for(var r,e=t.length,i=e%3,o=[],u=0,s=e-i;u<s;u+=16383)o.push(f(t,u,u+16383>s?s:u+16383));1===i?(r=t[e-1],o.push(n[r>>2]+n[r<<4&63]+"==")):2===i&&(r=(t[e-2]<<8)+t[e-1],o.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=u.length;s<a;++s)n[s]=u[s],i[u.charCodeAt(s)]=s;function h(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function f(t,r,e){for(var i,o,u=[],s=r;s<e;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),u.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,r){r.read=function(t,r,e,n,i){var o,u,s=8*i-n-1,a=(1<<s)-1,h=a>>1,f=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+t[r+c],c+=l,f-=8);for(u=o&(1<<-f)-1,o>>=-f,f+=n;f>0;u=256*u+t[r+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=h}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,s,a,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=f):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),(r+=u+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(u++,a/=2),u+c>=f?(s=0,u=f):u+c>=1?(s=(r*a-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&s,p+=d,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;t[e+p]=255&u,p+=d,u/=256,h-=8);t[e+p-d]|=128*g}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=e(4),o=(n=e(24))&&n.__esModule?n:{default:n};var u=[224,256,384,512],s=function(t,r){for(var e=0;e<t.length;e+=8){var n=e/4;r[n]^=t[e+7]<<24|t[e+6]<<16|t[e+5]<<8|t[e+4],r[n+1]^=t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}},a=function(t){var r=this,e=t.capacity,n=t.padding;if(!u.includes(e))throw new Error("Unsupported hash length");var a=(0,o.default)(),h=e/8,f=200-2*h,c=0,l=new Uint32Array(50),p=i.Buffer.allocUnsafe(f);return this.absorb=function(t){for(var e=0;e<t.length;e++)p[c]=t[e],(c+=1)>=f&&(s(p,l),a(l),c=0);return r},this.squeeze=function(){var t={queue:i.Buffer.allocUnsafe(f),state:new Uint32Array(50)};p.copy(t.queue);for(var r=0;r<l.length;r++)t.state[r]=l[r];return t.queue.fill(0,c),t.queue[c]|=n,t.queue[f-1]|=128,s(t.queue,t.state),a(t.state),function(t,r){for(var e=i.Buffer.allocUnsafe(r),n=0;n<r;n+=8){var o=n/4;e[n]=t[o+1],e[n+1]=t[o+1]>>>8,e[n+2]=t[o+1]>>>16,e[n+3]=t[o+1]>>>24,e[n+4]=t[o],e[n+5]=t[o]>>>8,e[n+6]=t[o]>>>16,e[n+7]=t[o]>>>24}return e}(t.state,h)},this.reset=function(){return p.fill(0),l.fill(0),c=0,r},this};r.default=a},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e(25)),i=s(e(26)),o=s(e(28)),u=s(e(31));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){var t=new Uint32Array(10),r=new Uint32Array(10),e=new Uint32Array(2);return function(s){for(var a=0;a<24;a++)(0,u.default)({A:s,C:t,D:r,W:e}),(0,o.default)({A:s,C:t,W:e}),(0,n.default)({A:s,C:t}),(0,i.default)({A:s,roundIndex:a});t.fill(0),r.fill(0),e.fill(0)}};r.default=a},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(5))&&n.__esModule?n:{default:n};var o=function(t){for(var r=t.A,e=t.C,n=0;n<25;n+=5){for(var o=0;o<5;o++)(0,i.default)(r,n+o)(e,o);for(var u=0;u<5;u++){var s=2*(n+u),a=(u+1)%5*2,h=(u+2)%5*2;r[s]^=~e[a]&e[h],r[s+1]^=~e[a+1]&e[h+1]}}};r.default=o},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(27))&&n.__esModule?n:{default:n};var o=function(t){var r=t.A,e=2*t.roundIndex;r[0]^=i.default[e],r[1]^=i.default[e+1]};r.default=o},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=u(e(29)),i=u(e(30)),o=u(e(5));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){var r=t.A,e=t.C,u=t.W;(0,o.default)(r,1)(u,0);for(var s=0,a=0,h=0,f=32,c=0;c<24;c++){var l=n.default[c],p=i.default[c];(0,o.default)(r,l)(e,0),s=u[0],a=u[1],f=32-p,u[h=p<32?0:1]=s<<p|a>>>f,u[(h+1)%2]=a<<p|s>>>f,(0,o.default)(u,0)(r,l),(0,o.default)(e,0)(u,0)}};r.default=s},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(5))&&n.__esModule?n:{default:n};var o=function(t){for(var r=t.A,e=t.C,n=t.D,o=t.W,u=0,s=0,a=0;a<5;a++){var h=2*a,f=2*(a+5),c=2*(a+10),l=2*(a+15),p=2*(a+20);e[h]=r[h]^r[f]^r[c]^r[l]^r[p],e[h+1]=r[h+1]^r[f+1]^r[c+1]^r[l+1]^r[p+1]}for(var d=0;d<5;d++){(0,i.default)(e,(d+1)%5)(o,0),u=o[0],s=o[1],o[0]=u<<1|s>>>31,o[1]=s<<1|u>>>31,n[2*d]=e[(d+4)%5*2]^o[0],n[2*d+1]=e[(d+4)%5*2+1]^o[1];for(var g=0;g<25;g+=5)r[2*(g+d)]^=n[2*d],r[2*(g+d)+1]^=n[2*d+1]}};r.default=o},function(t,r){"function"==typeof Object.create?t.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,r){if(r){t.super_=r;var e=function(){};e.prototype=r.prototype,t.prototype=new e,t.prototype.constructor=t}}},function(t,r,e){"use strict";r.sha1=e(34),r.sha224=e(35),r.sha256=e(9),r.sha384=e(36),r.sha512=e(10)},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(8),u=n.rotl32,s=n.sum32,a=n.sum32_5,h=o.ft_1,f=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,r){for(var e=this.W,n=0;n<16;n++)e[n]=t[r+n];for(;n<e.length;n++)e[n]=u(e[n-3]^e[n-8]^e[n-14]^e[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<e.length;n++){var d=~~(n/20),g=a(u(i,5),h(d,o,f,l),p,e[n],c[d]);p=l,l=f,f=u(o,30),o=i,i=g}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r,e){"use strict";var n=e(0),i=e(9);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,r,e){"use strict";var n=e(0),i=e(10);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=n.rotl32,u=n.sum32,s=n.sum32_3,a=n.sum32_4,h=i.BlockHash;function f(){if(!(this instanceof f))return new f;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,r,e,n){return t<=15?r^e^n:t<=31?r&e|~r&n:t<=47?(r|~e)^n:t<=63?r&n|e&~n:r^(e|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,h),r.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,r){for(var e=this.h[0],n=this.h[1],i=this.h[2],h=this.h[3],f=this.h[4],w=e,m=n,_=i,b=h,A=f,S=0;S<80;S++){var E=u(o(a(e,c(S,n,i,h),t[d[S]+r],l(S)),y[S]),f);e=f,f=h,h=o(i,10),i=n,n=E,E=u(o(a(w,c(79-S,m,_,b),t[g[S]+r],p(S)),v[S]),A),w=A,A=b,b=o(_,10),_=m,m=E}E=s(this.h[1],i,b),this.h[1]=s(this.h[2],h,A),this.h[2]=s(this.h[3],f,w),this.h[3]=s(this.h[4],e,m),this.h[4]=s(this.h[0],n,_),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,r,e){"use strict";var n=e(0),i=e(1);function o(t,r,e){if(!(this instanceof o))return new o(t,r,e);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(r,e))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=(new this.Hash).update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,r){return this.inner.update(t,r),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,r,e){"use strict";e.r(r);var n=e(6),i=e.n(n),o=e(11),u=e.n(o),s=e(3),a={hashes:{"SHA3-512":{nodeName:"sha3-512",hashSize:64},"SHA3-384":{nodeName:"sha3-384",hashSize:48},"SHA3-256":{nodeName:"sha3-256",hashSize:32},"SHA3-224":{nodeName:"sha3-224",hashSize:28},"SHA-256":{nodeName:"sha256",hashSize:32},"SHA-384":{nodeName:"sha384",hashSize:48},"SHA-512":{nodeName:"sha512",hashSize:64},"SHA-1":{nodeName:"sha1",hashSize:20},MD5:{nodeName:"md5",hashSize:16}}},h=e(12),f=e.n(h),c=e(13),l=e(14),p=e.n(l),d=function(){var t=u()(i.a.mark(function t(r){var e,n,o,u,h,f,c,l=arguments;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>1&&void 0!==l[1]?l[1]:"SHA-256",!(Object.keys(a.hashes).indexOf(e)<0)){t.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(r instanceof Uint8Array){t.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(n=s.getWebCrypto(),o=s.getNodeCrypto(),u=s.getMsCrypto(),c=!0,void 0===n||"function"!=typeof n.digest||void 0!==u){t.next=15;break}return t.next=12,n.digest(e,r).catch(function(t){f=t.message,c=!1});case 12:h=t.sent,t.next=26;break;case 15:if(void 0===o){t.next=19;break}try{h=y(e,r,o)}catch(t){f=t.message,c=!1}t.next=26;break;case 19:if(void 0===u||"function"!=typeof u.digest){t.next=25;break}return t.next=22,g(e,r,u).catch(function(t){f=t.message,c=!1});case 22:h=t.sent,t.next=26;break;case 25:c=!1;case 26:if(c){t.next=35;break}t.prev=27,h=v(e,r),t.next=35;break;case 31:throw t.prev=31,t.t0=t.catch(27),f="".concat(f," => ").concat(t.t0.message),new Error("UnsupportedEnvironment: ".concat(f));case 35:return t.abrupt("return",new Uint8Array(h));case 36:case"end":return t.stop()}},t,null,[[27,31]])}));return function(r){return t.apply(this,arguments)}}(),g=function(t,r,e){return new Promise(function(n,i){var o=e.digest(t,r);o.oncomplete=function(t){n(t.target.result)},o.onerror=function(t){i(t)}})},y=function(t,r,e){var n=a.hashes[t].nodeName,i=e.createHash(n);return i.update(r),i.digest()},v=function(t,r){var n;if("MD5"===t)n=f()(Array.from(r),{asBytes:!0});else if(["SHA3-512","SHA3-384","SHA3-256","SHA3-224"].indexOf(t)>=0){var i=new c.SHA3(8*a.hashes[t].hashSize),o=e(4).Buffer;i.update(o.from(r)),n=i.digest("binary")}else n=p.a[a.hashes[t].nodeName]().update(r).digest();return new Uint8Array(n)};e.d(r,"compute",function(){return d});r.default={compute:d}},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e}])});
t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SHA3=void 0;var n,i=e(3),o=(n=e(22))&&n.__esModule?n:{default:n};var u=function(t){var r=t.padding;return function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:512;if(!this||this.constructor!==t)return new t(n);var u=new o.default({capacity:n,padding:r});return this.update=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(i.Buffer.isBuffer(t))return u.absorb(t),e;if("string"==typeof t)return e.update(i.Buffer.from(t,r));throw new TypeError("Not a string or buffer")},this.digest=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",r=u.squeeze();return t&&"binary"!==t?r.toString(t):r},this.reset=function(){return u.reset(),e},this}},s=u({padding:1}),h=u({padding:6});r.SHA3=h;var f=s;h.SHA3Hash=f},function(t,r,e){"use strict";r.toByteArray=function(t){for(var r,e=f(t),n=e[0],u=e[1],s=new o(function(t,r,e){return 3*(r+e)/4-e}(0,n,u)),h=0,a=u>0?n-4:n,c=0;c<a;c+=4)r=i[t.charCodeAt(c)]<<18|i[t.charCodeAt(c+1)]<<12|i[t.charCodeAt(c+2)]<<6|i[t.charCodeAt(c+3)],s[h++]=r>>16&255,s[h++]=r>>8&255,s[h++]=255&r;2===u&&(r=i[t.charCodeAt(c)]<<2|i[t.charCodeAt(c+1)]>>4,s[h++]=255&r);1===u&&(r=i[t.charCodeAt(c)]<<10|i[t.charCodeAt(c+1)]<<4|i[t.charCodeAt(c+2)]>>2,s[h++]=r>>8&255,s[h++]=255&r);return s},r.fromByteArray=function(t){for(var r,e=t.length,i=e%3,o=[],u=0,s=e-i;u<s;u+=16383)o.push(a(t,u,u+16383>s?s:u+16383));1===i?(r=t[e-1],o.push(n[r>>2]+n[r<<4&63]+"==")):2===i&&(r=(t[e-2]<<8)+t[e-1],o.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,h=u.length;s<h;++s)n[s]=u[s],i[u.charCodeAt(s)]=s;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function a(t,r,e){for(var i,o,u=[],s=r;s<e;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),u.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,r){r.read=function(t,r,e,n,i){var o,u,s=8*i-n-1,h=(1<<s)-1,f=h>>1,a=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-a)-1,p>>=-a,a+=s;a>0;o=256*o+t[r+c],c+=l,a-=8);for(u=o&(1<<-a)-1,o>>=-a,a+=n;a>0;u=256*u+t[r+c],c+=l,a-=8);if(0===o)o=1-f;else{if(o===h)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=f}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,s,h,f=8*o-i-1,a=(1<<f)-1,c=a>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=a):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),(r+=u+c>=1?l/h:l*Math.pow(2,1-c))*h>=2&&(u++,h/=2),u+c>=a?(s=0,u=a):u+c>=1?(s=(r*h-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&s,p+=d,s/=256,i-=8);for(u=u<<i|s,f+=i;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*g}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=e(3),o=(n=e(23))&&n.__esModule?n:{default:n};var u=[224,256,384,512],s=function(t,r){for(var e=0;e<t.length;e+=8){var n=e/4;r[n]^=t[e+7]<<24|t[e+6]<<16|t[e+5]<<8|t[e+4],r[n+1]^=t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}},h=function(t){var r=this,e=t.capacity,n=t.padding;if(!u.includes(e))throw new Error("Unsupported hash length");var h=(0,o.default)(),f=e/8,a=200-2*f,c=0,l=new Uint32Array(50),p=i.Buffer.allocUnsafe(a);return this.absorb=function(t){for(var e=0;e<t.length;e++)p[c]=t[e],(c+=1)>=a&&(s(p,l),h(l),c=0);return r},this.squeeze=function(){var t={queue:i.Buffer.allocUnsafe(a),state:new Uint32Array(50)};p.copy(t.queue);for(var r=0;r<l.length;r++)t.state[r]=l[r];return t.queue.fill(0,c),t.queue[c]|=n,t.queue[a-1]|=128,s(t.queue,t.state),h(t.state),function(t,r){for(var e=i.Buffer.allocUnsafe(r),n=0;n<r;n+=8){var o=n/4;e[n]=t[o+1],e[n+1]=t[o+1]>>>8,e[n+2]=t[o+1]>>>16,e[n+3]=t[o+1]>>>24,e[n+4]=t[o],e[n+5]=t[o]>>>8,e[n+6]=t[o]>>>16,e[n+7]=t[o]>>>24}return e}(t.state,f)},this.reset=function(){return p.fill(0),l.fill(0),c=0,r},this};r.default=h},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e(24)),i=s(e(25)),o=s(e(27)),u=s(e(30));function s(t){return t&&t.__esModule?t:{default:t}}var h=function(){var t=new Uint32Array(10),r=new Uint32Array(10),e=new Uint32Array(2);return function(s){for(var h=0;h<24;h++)(0,u.default)({A:s,C:t,D:r,W:e}),(0,o.default)({A:s,C:t,W:e}),(0,n.default)({A:s,C:t}),(0,i.default)({A:s,roundIndex:h});t.fill(0),r.fill(0),e.fill(0)}};r.default=h},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(4))&&n.__esModule?n:{default:n};var o=function(t){for(var r=t.A,e=t.C,n=0;n<25;n+=5){for(var o=0;o<5;o++)(0,i.default)(r,n+o)(e,o);for(var u=0;u<5;u++){var s=2*(n+u),h=(u+1)%5*2,f=(u+2)%5*2;r[s]^=~e[h]&e[f],r[s+1]^=~e[h+1]&e[f+1]}}};r.default=o},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(26))&&n.__esModule?n:{default:n};var o=function(t){var r=t.A,e=2*t.roundIndex;r[0]^=i.default[e],r[1]^=i.default[e+1]};r.default=o},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=u(e(28)),i=u(e(29)),o=u(e(4));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){var r=t.A,e=t.C,u=t.W;(0,o.default)(r,1)(u,0);for(var s=0,h=0,f=0,a=32,c=0;c<24;c++){var l=n.default[c],p=i.default[c];(0,o.default)(r,l)(e,0),s=u[0],h=u[1],a=32-p,u[f=p<32?0:1]=s<<p|h>>>a,u[(f+1)%2]=h<<p|s>>>a,(0,o.default)(u,0)(r,l),(0,o.default)(e,0)(u,0)}};r.default=s},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];r.default=n},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e(4))&&n.__esModule?n:{default:n};var o=function(t){for(var r=t.A,e=t.C,n=t.D,o=t.W,u=0,s=0,h=0;h<5;h++){var f=2*h,a=2*(h+5),c=2*(h+10),l=2*(h+15),p=2*(h+20);e[f]=r[f]^r[a]^r[c]^r[l]^r[p],e[f+1]=r[f+1]^r[a+1]^r[c+1]^r[l+1]^r[p+1]}for(var d=0;d<5;d++){(0,i.default)(e,(d+1)%5)(o,0),u=o[0],s=o[1],o[0]=u<<1|s>>>31,o[1]=s<<1|u>>>31,n[2*d]=e[(d+4)%5*2]^o[0],n[2*d+1]=e[(d+4)%5*2+1]^o[1];for(var g=0;g<25;g+=5)r[2*(g+d)]^=n[2*d],r[2*(g+d)+1]^=n[2*d+1]}};r.default=o},function(t,r,e){var n=r;n.utils=e(0),n.common=e(2),n.sha=e(33),n.ripemd=e(37),n.hmac=e(38),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,r){"function"==typeof Object.create?t.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,r){if(r){t.super_=r;var e=function(){};e.prototype=r.prototype,t.prototype=new e,t.prototype.constructor=t}}},function(t,r,e){"use strict";r.sha1=e(34),r.sha224=e(35),r.sha256=e(7),r.sha384=e(36),r.sha512=e(8)},function(t,r,e){"use strict";var n=e(0),i=e(2),o=e(6),u=n.rotl32,s=n.sum32,h=n.sum32_5,f=o.ft_1,a=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,a),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,r){for(var e=this.W,n=0;n<16;n++)e[n]=t[r+n];for(;n<e.length;n++)e[n]=u(e[n-3]^e[n-8]^e[n-14]^e[n-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<e.length;n++){var d=~~(n/20),g=h(u(i,5),f(d,o,a,l),p,e[n],c[d]);p=l,l=a,a=u(o,30),o=i,i=g}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],a),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,r,e){"use strict";var n=e(0),i=e(7);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,r,e){"use strict";var n=e(0),i=e(8);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,r,e){"use strict";var n=e(0),i=e(2),o=n.rotl32,u=n.sum32,s=n.sum32_3,h=n.sum32_4,f=i.BlockHash;function a(){if(!(this instanceof a))return new a;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,r,e,n){return t<=15?r^e^n:t<=31?r&e|~r&n:t<=47?(r|~e)^n:t<=63?r&n|e&~n:r^(e|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(a,f),r.ripemd160=a,a.blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function(t,r){for(var e=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],a=this.h[4],w=e,_=n,b=i,m=f,A=a,S=0;S<80;S++){var E=u(o(h(e,c(S,n,i,f),t[d[S]+r],l(S)),y[S]),a);e=a,a=f,f=o(i,10),i=n,n=E,E=u(o(h(w,c(79-S,_,b,m),t[g[S]+r],p(S)),v[S]),A),w=A,A=m,m=o(b,10),b=_,_=E}E=s(this.h[1],i,m),this.h[1]=s(this.h[2],f,A),this.h[2]=s(this.h[3],a,w),this.h[3]=s(this.h[4],e,_),this.h[4]=s(this.h[0],n,b),this.h[0]=E},a.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,r,e){"use strict";var n=e(0),i=e(1);function o(t,r,e){if(!(this instanceof o))return new o(t,r,e);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(r,e))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=(new this.Hash).update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,r){return this.inner.update(t,r),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e}])});
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* params. js
*/
var _default = {
hashes: {
'SHA3-512': {
nodeName: 'sha3-512',
hashSize: 64
Object.defineProperty(exports, "__esModule", { value: true });
var params = {
hashes: {
'SHA3-512': { nodeName: 'sha3-512', hashSize: 64 },
'SHA3-384': { nodeName: 'sha3-384', hashSize: 48 },
'SHA3-256': { nodeName: 'sha3-256', hashSize: 32 },
'SHA3-224': { nodeName: 'sha3-224', hashSize: 28 },
'SHA-256': { nodeName: 'sha256', hashSize: 32 },
'SHA-384': { nodeName: 'sha384', hashSize: 48 },
'SHA-512': { nodeName: 'sha512', hashSize: 64 },
'SHA-1': { nodeName: 'sha1', hashSize: 20 },
'MD5': { nodeName: 'md5', hashSize: 16 } // SHOULD NOT USE
},
'SHA3-384': {
nodeName: 'sha3-384',
hashSize: 48
},
'SHA3-256': {
nodeName: 'sha3-256',
hashSize: 32
},
'SHA3-224': {
nodeName: 'sha3-224',
hashSize: 28
},
'SHA-256': {
nodeName: 'sha256',
hashSize: 32
},
'SHA-384': {
nodeName: 'sha384',
hashSize: 48
},
'SHA-512': {
nodeName: 'sha512',
hashSize: 64
},
'SHA-1': {
nodeName: 'sha1',
hashSize: 20
},
// SHOULD NOT USE
'MD5': {
nodeName: 'md5',
hashSize: 16 // SHOULD NOT USE
}
}
};
exports.default = _default;
exports.default = params;
//# sourceMappingURL=params.js.map
{
"name": "js-crypto-hash",
"version": "0.5.2",
"version": "0.6.0",
"description": "Universal Module for Hash Function in JavaScript",
"main": "dist/index.js",
"scripts": {
"test": "cross-env NODE_ENV=test nyc mocha --recursive $(find test -name '*.spec.js')",
"test:bundle": "npm run webpack && cross-env TEST_ENV=bundle npm run test",
"test": "nyc mocha --recursive $(find test -name '*.spec.ts')",
"test:bundle": "yarn webpack && cross-env TEST_ENV=bundle yarn test",
"karma": "cross-env TEST_ENV=source karma start",
"karma:bundle": "npm run webpack && cross-env TEST_ENV=bundle karma start",
"karma:window": "npm run webpack && cross-env TEST_ENV=window karma start",
"html": "npm run webpack && npm run html:source && npm run html:bundle && npm run html:window",
"html:source": "cross-env TEST_ENV=source NODE_ENV=html npm run webpack",
"html:bundle": "cross-env TEST_ENV=bundle NODE_ENV=html npm run webpack",
"html:window": "cross-env TEST_ENV=window NODE_ENV=html npm run webpack",
"webpack": "webpack --optimize-minimize --mode development --config webpack.dev.js",
"karma:bundle": "yarn webpack && cross-env TEST_ENV=bundle karma start",
"karma:window": "yarn webpack && cross-env TEST_ENV=window karma start",
"tsc": "tsc --build ./tsconfig.json",
"html": "yarn webpack && yarn html:source && yarn html:bundle && yarn html:window",
"html:source": "cross-env TEST_ENV=source NODE_ENV=html yarn webpack",
"html:bundle": "cross-env TEST_ENV=bundle NODE_ENV=html yarn webpack",
"html:window": "cross-env TEST_ENV=window NODE_ENV=html yarn webpack",
"webpack": "webpack --mode development --config webpack.dev.js",
"webpack:prod": "cross-env NODE_ENV=production webpack --optimize-minimize --mode production --config webpack.prod.js",
"build": "rm -rf ./dist && cross-env NODE_ENV=production yarn tsc && yarn webpack:prod",
"analyze": "cross-env NODE_ENV=production webpack --mode production --optimize-minimize --json --config webpack.prod.js | webpack-bundle-size-analyzer",
"babel": "cross-env NODE_ENV=production babel src -d dist/ --keep-file-extension",
"build": "rm -rf ./dist && npm run babel && npm run webpack:prod",
"cleanup": "rm -rf ./dist coverage .nyc_output; rm -rf ./test/html/*.bundle.js; rm -rf ./test/html/test.html"
"cleanup": "rm -rf ./dist coverage .nyc_output ./node_modules ./test/html/*.bundle.js ./test/html/test.html",
"babel": "cross-env NODE_ENV=production yarn tsc"
},

@@ -39,6 +40,5 @@ "author": "Jun Kurihara",

"dependencies": {
"@babel/runtime": "~7.5.0",
"buffer": "^5.2.1",
"buffer": "~5.4.3",
"hash.js": "~1.1.7",
"js-crypto-env": "^0.2.4",
"js-crypto-env": "^0.3.0",
"md5": "~2.2.1",

@@ -48,4 +48,4 @@ "sha3": "~2.0.4"

"devDependencies": {
"js-encoding-utils": "0.5.3"
"js-encoding-utils": "0.5.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc