text: require=function t(e,r,n){function i(o,a){if(!r[o]){if(!e[o]){var f="function"==typeof require&&require;if(!a&&f)return f(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[o]={exports:{}};e[o][0].call(h.exports,function(t){var r=e[o][1][t];return i(r||t)},h,h.exports,t,e,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(t,e,r){(function(r){"use strict";function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);if(i.isArray(t)&&i.isNumber(e))return n.createMultisig(t,e,r);if(t instanceof n)return t;if(s.checkArgument(t,"First argument is required, please include address data.","guide/address.html"),e&&!f.get(e))throw new TypeError('Second argument must be "livenet" or "testnet".');if(r&&r!==n.PayToPublicKeyHash&&r!==n.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var o=this._classifyArguments(t,e,r);return o.network=o.network||f.get(e)||f.defaultNetwork,o.type=o.type||r||n.PayToPublicKeyHash,h.defineImmutable(this,{hashBuffer:o.hashBuffer,network:o.network,type:o.type}),this}var i=t("lodash"),s=t("./util/preconditions"),o=t("./errors"),a=t("./encoding/base58check"),f=t("./networks"),u=t("./crypto/hash"),h=t("./util/js"),c=t("./publickey");n.prototype._classifyArguments=function(t,e,s){if((t instanceof r||t instanceof Uint8Array)&&20===t.length)return n._transformHash(t);if((t instanceof r||t instanceof Uint8Array)&&21===t.length)return n._transformBuffer(t,e,s);if(t instanceof c)return n._transformPublicKey(t);if(t instanceof d)return n._transformScript(t,e);if("string"==typeof t)return n._transformString(t,e,s);if(i.isObject(t))return n._transformObject(t);throw new TypeError("First argument is an unrecognized data format.")},n.PayToPublicKeyHash="pubkeyhash",n.PayToScriptHash="scripthash",n._transformHash=function(t){var e={};if(!(t instanceof r||t instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(20!==t.length)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return e.hashBuffer=t,e},n._transformObject=function(t){return s.checkArgument(t.hash||t.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),s.checkArgument(t.type,"Must provide a `type` property"),{hashBuffer:t.hash?new r(t.hash,"hex"):t.hashBuffer,network:f.get(t.network)||f.defaultNetwork,type:t.type}},n._classifyFromVersion=function(t){var e={},r=f.get(t[0],"pubkeyhash"),i=f.get(t[0],"scripthash");return r?(e.network=r,e.type=n.PayToPublicKeyHash):i&&(e.network=i,e.type=n.PayToScriptHash),e},n._transformBuffer=function(t,e,i){var s={};if(!(t instanceof r||t instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(21!==t.length)throw new TypeError("Address buffers must be exactly 21 bytes.");e=f.get(e);var o=n._classifyFromVersion(t);if(!o.network||e&&e!==o.network)throw new TypeError("Address has mismatched network type.");if(!o.type||i&&i!==o.type)throw new TypeError("Address has mismatched type.");return s.hashBuffer=t.slice(1),s.network=o.network,s.type=o.type,s},n._transformPublicKey=function(t){var e={};if(!(t instanceof c))throw new TypeError("Address must be an instance of PublicKey.");return e.hashBuffer=u.sha256ripemd160(t.toBuffer()),e.type=n.PayToPublicKeyHash,e},n._transformScript=function(t,e){s.checkArgument(t instanceof d,"script must be a Script instance");var r=t.getAddressInfo(e);if(!r)throw new o.Script.CantDeriveAddress(t);return r},n.createMultisig=function(t,e,r){return r=r||t[0].network||f.defaultNetwork,n.payingTo(d.buildMultisigOut(t,e),r)},n._transformString=function(t,e,r){if("string"!=typeof t)throw new TypeError("data parameter supplied is not a string.");t=t.trim();var i=a.decode(t);return n._transformBuffer(i,e,r)},n.fromPublicKey=function(t,e){var r=n._transformPublicKey(t);return e=e||f.defaultNetwork,new n(r.hashBuffer,e,r.type)},n.fromPublicKeyHash=function(t,e){return new n(n._transformHash(t).hashBuffer,e,n.PayToPublicKeyHash)},n.fromScriptHash=function(t,e){return s.checkArgument(t,"hash parameter is required"),new n(n._transformHash(t).hashBuffer,e,n.PayToScriptHash)},n.payingTo=function(t,e){return s.checkArgument(t,"script is required"),s.checkArgument(t instanceof d,"script must be instance of Script"),n.fromScriptHash(u.sha256ripemd160(t.toBuffer()),e)},n.fromScript=function(t,e){s.checkArgument(t instanceof d,"script must be a Script instance");var r=n._transformScript(t,e);return new n(r.hashBuffer,e,r.type)},n.fromBuffer=function(t,e,r){var i=n._transformBuffer(t,e,r);return new n(i.hashBuffer,i.network,i.type)},n.fromString=function(t,e,r){var i=n._transformString(t,e,r);return new n(i.hashBuffer,i.network,i.type)},n.fromObject=function(t){return s.checkState(h.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.'),new n(new r(t.hash,"hex"),t.network,t.type)},n.getValidationError=function(t,e,r){var i;try{new n(t,e,r)}catch(t){i=t}return i},n.isValid=function(t,e,r){return!n.getValidationError(t,e,r)},n.prototype.isPayToPublicKeyHash=function(){return this.type===n.PayToPublicKeyHash},n.prototype.isPayToScriptHash=function(){return this.type===n.PayToScriptHash},n.prototype.toBuffer=function(){var t=new r([this.network[this.type]]);return r.concat([t,this.hashBuffer])},n.prototype.toObject=n.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},n.prototype.toString=function(){return a.encode(this.toBuffer())},n.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"},e.exports=n;var d=t("./script")}).call(this,t("buffer").Buffer)},{"./crypto/hash":8,"./encoding/base58check":13,"./errors":17,"./networks":21,"./publickey":24,"./script":25,"./util/js":43,"./util/preconditions":44,buffer:47,lodash:359}],2:[function(t,e,r){(function(r){"use strict";function n(t){return this instanceof n?(i.extend(this,n._from(t)),this):new n(t)}var i=t("lodash"),s=t("./blockheader"),o=t("../crypto/bn"),a=t("../util/buffer"),f=t("../encoding/bufferreader"),u=t("../encoding/bufferwriter"),h=t("../crypto/hash"),c=t("../transaction"),d=t("../util/preconditions");n.MAX_BLOCK_SIZE=1e6,n.PROOF_OF_STAKE="proof-of-stake",n.PROOF_OF_WORK="proof-of-work",n._from=function(t){var e={};if(a.isBuffer(t))e=n._fromBufferReader(f(t));else{if(!i.isObject(t))throw new TypeError("Unrecognized argument for Block");e=n._fromObject(t)}return e},n._fromObject=function(t){var e=[];return t.transactions.forEach(function(t){t instanceof c?e.push(t):e.push(c().fromObject(t))}),{header:s.fromObject(t.header),transactions:e}},n.fromObject=function(t){return new n(n._fromObject(t))},n._fromBufferReader=function(t){var e={};d.checkState(!t.finished(),"No block data received"),e.header=s.fromBufferReader(t);var r=t.readVarintNum();e.transactions=[];for(var n=0;n<r;n++)e.transactions.push(c().fromBufferReader(t));return e},n.fromBufferReader=function(t){return d.checkArgument(t,"br is required"),new n(n._fromBufferReader(t))},n.fromBuffer=function(t){return n.fromBufferReader(new f(t))},n.fromString=function(t){var e=new r(t,"hex");return n.fromBuffer(e)},n.fromRawBlock=function(t){a.isBuffer(t)||(t=new r(t,"binary"));var e=f(t);return e.pos=n.Values.START_OF_BLOCK,new n(n._fromBufferReader(e))},n.prototype.toObject=n.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(e){t.push(e.toObject())}),{header:this.header.toObject(),transactions:t}},n.prototype.toBuffer=function(){return this.toBufferWriter().concat()},n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.toBufferWriter=function(t){t||(t=new u),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var e=0;e<this.transactions.length;e++)this.transactions[e].toBufferWriter(t);return t},n.prototype.getTransactionHashes=function(){var t=[];if(0===this.transactions.length)return[n.Values.NULL_HASH];for(var e=0;e<this.transactions.length;e++)t.push(this.transactions[e]._getHash());return t},n.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),e=0,n=this.transactions.length;n>1;n=Math.floor((n+1)/2)){for(var i=0;i<n;i+=2){var s=Math.min(i+1,n-1),o=r.concat([t[e+i],t[e+s]]);t.push(h.sha256sha256(o))}e+=n}return t},n.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]},n.prototype.validMerkleRoot=function(){var t=new o(this.header.merkleRoot.toString("hex"),"hex"),e=new o(this.getMerkleRoot().toString("hex"),"hex");return 0===t.cmp(e)},n.prototype._getHash=function(){return this.header._getHash()};var p={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:i.noop};Object.defineProperty(n.prototype,"id",p),Object.defineProperty(n.prototype,"hash",p),n.prototype.inspect=function(){return"<Block "+this.id+">"},n.Values={START_OF_BLOCK:8,NULL_HASH:new r("0000000000000000000000000000000000000000000000000000000000000000","hex")},e.exports=n}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"../crypto/hash":8,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../transaction":28,"../util/buffer":42,"../util/preconditions":44,"./blockheader":3,buffer:47,lodash:359}],3:[function(t,e,r){(function(r){"use strict";var n=t("lodash"),i=t("../crypto/bn"),s=t("../util/buffer"),o=t("../encoding/bufferreader"),a=t("../encoding/bufferwriter"),f=t("../crypto/hash"),u=(t("../util/js"),t("../util/preconditions")),h=function t(e){if(!(this instanceof t))return new t(e);var r=t._from(e);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,this.hashStateRoot=r.hashStateRoot,this.hashUTXORoot=r.hashUTXORoot,this.prevOutStakeHash=r.prevOutStakeHash,this.prevOutStakeN=r.prevOutStakeN,this.vchBlockSig=r.vchBlockSig,r.hash&&u.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};h._from=function(t){var e={};if(s.isBuffer(t))e=h._fromBufferReader(o(t));else{if(!n.isObject(t))throw new TypeError("Unrecognized argument for BlockHeader");e=h._fromObject(t)}return e},h._fromObject=function(t){u.checkArgument(t,"data is required");var e=t.prevHash,i=t.merkleRoot,o=t.vchBlockSig,a=t.prevOutStakeHash,f=t.hashStateRoot,h=t.hashUTXORoot;return n.isString(t.prevHash)&&(e=s.reverse(new r(t.prevHash,"hex"))),n.isString(t.merkleRoot)&&(i=s.reverse(new r(t.merkleRoot,"hex"))),n.isString(t.vchBlockSig)&&(o=new r(t.vchBlockSig,"hex")),n.isString(t.prevOutStakeHash)&&(a=s.reverse(new r(t.prevOutStakeHash,"hex"))),n.isString(t.hashStateRoot)&&(f=s.reverse(new r(t.hashStateRoot,"hex"))),n.isString(t.hashUTXORoot)&&(h=s.reverse(new r(t.hashUTXORoot,"hex"))),{hash:t.hash,version:t.version,prevHash:e,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce,hashStateRoot:f,hashUTXORoot:h,prevOutStakeHash:a,prevOutStakeN:t.prevOutStakeN,vchBlockSig:o}},h.fromObject=function(t){var e=h._fromObject(t);return new h(e)},h.fromRawBlock=function(t){s.isBuffer(t)||(t=new r(t,"binary"));var e=o(t);e.pos=h.Constants.START_OF_HEADER;var n=h._fromBufferReader(e);return new h(n)},h.fromBuffer=function(t){var e=h._fromBufferReader(o(t));return new h(e)},h.fromString=function(t){var e=new r(t,"hex");return h.fromBuffer(e)},h._fromBufferReader=function(t){var e={};e.version=t.readInt32LE(),e.prevHash=t.read(32),e.merkleRoot=t.read(32),e.time=t.readUInt32LE(),e.bits=t.readUInt32LE(),e.nonce=t.readUInt32LE(),e.hashStateRoot=t.read(32),e.hashUTXORoot=t.read(32),e.prevOutStakeHash=t.read(32),e.prevOutStakeN=t.readUInt32LE();var r=t.readVarintNum();return e.vchBlockSig=t.read(r),e},h.fromBufferReader=function(t){var e=h._fromBufferReader(t);return new h(e)},h.prototype.toObject=h.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:s.reverse(this.prevHash).toString("hex"),merkleRoot:s.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce,hashStateRoot:s.reverse(this.hashStateRoot).toString("hex"),hashUTXORoot:s.reverse(this.hashUTXORoot).toString("hex"),prevOutStakeHash:s.reverse(this.prevOutStakeHash).toString("hex"),prevOutStakeN:this.prevOutStakeN,vchBlockSig:this.vchBlockSig.toString("hex")}},h.prototype.toBuffer=function(){return this.toBufferWriter().concat()},h.prototype.toString=function(){return this.toBuffer().toString("hex")},h.prototype.toBufferWriter=function(t){return t||(t=new a),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t.write(this.hashStateRoot),t.write(this.hashUTXORoot),t.write(this.prevOutStakeHash),t.writeUInt32LE(this.prevOutStakeN),t.writeVarintNum(this.vchBlockSig.length),t.write(this.vchBlockSig),t},h.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var e=new i(16777215&t),r=8*((t>>>24)-3);r-- >0;)e=e.mul(new i(2));return e},h.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(486604799).mul(new i(Math.pow(10,8))),e=this.getTargetDifficulty(),r=t.div(e).toString(10),n=r.length-8;return r=r.slice(0,n)+"."+r.slice(n),parseFloat(r)},h.prototype._getHash=function(){var t=this.toBuffer();return f.sha256sha256(t)};var c={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=o(this._getHash()).readReverse().toString("hex")),this._id},set:n.noop};Object.defineProperty(h.prototype,"id",c),Object.defineProperty(h.prototype,"hash",c),h.prototype.validTimestamp=function(){var t=Math.round((new Date).getTime()/1e3);return!(this.time>t+h.Constants.MAX_TIME_OFFSET)},h.prototype.validProofOfWork=function(){var t=new i(this.id,"hex"),e=this.getTargetDifficulty();return!(t.cmp(e)>0)},h.prototype.isProofOfStake=function(){return!/^0*$/.test(this.prevOutStakeHash.toString("hex"))&&4294967295!==this.prevOutStakeN},h.prototype.inspect=function(){return"<BlockHeader "+this.id+">"},h.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new i("10000000000000000000000000000000000000000000000000000000000000000","hex")},e.exports=h}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"../crypto/hash":8,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,buffer:47,lodash:359}],4:[function(t,e,r){e.exports=t("./block"),e.exports.BlockHeader=t("./blockheader"),e.exports.MerkleBlock=t("./merkleblock")},{"./block":2,"./blockheader":3,"./merkleblock":5}],5:[function(t,e,r){(function(r){"use strict";function n(t){if(!(this instanceof n))return new n(t);var e={};if(o.isBuffer(t))e=n._fromBufferReader(a(t));else{if(!i.isObject(t))throw new TypeError("Unrecognized argument for MerkleBlock");var r;r=t.header instanceof s?t.header:s.fromObject(t.header),e={header:r,numTransactions:t.numTransactions,hashes:t.hashes,flags:t.flags}}return i.extend(this,e),this._flagBitsUsed=0,this._hashesUsed=0,this}var i=t("lodash"),s=t("./blockheader"),o=t("../util/buffer"),a=t("../encoding/bufferreader"),f=t("../encoding/bufferwriter"),u=t("../crypto/hash"),h=(t("../util/js"),t("../transaction")),c=t("../util/preconditions");n.fromBuffer=function(t){return n.fromBufferReader(a(t))},n.fromBufferReader=function(t){return new n(n._fromBufferReader(t))},n.prototype.toBuffer=function(){return this.toBufferWriter().concat()},n.prototype.toBufferWriter=function(t){t||(t=new f),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var e=0;e<this.hashes.length;e++)t.write(new r(this.hashes[e],"hex"));for(t.writeVarintNum(this.flags.length),e=0;e<this.flags.length;e++)t.writeUInt8(this.flags[e]);return t},n.prototype.toObject=n.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}},n.prototype.validMerkleTree=function(){if(c.checkState(i.isArray(this.flags),"MerkleBlock flags is not an array"),c.checkState(i.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)return!1;if(8*this.flags.length<this.hashes.length)return!1;var t=this._calcTreeHeight(),e={hashesUsed:0,flagBitsUsed:0},r=this._traverseMerkleTree(t,0,e);return e.hashesUsed===this.hashes.length&&o.equals(r,this.header.merkleRoot)},n.prototype._traverseMerkleTree=function(t,e,n){if(n=n||{},n.txs=n.txs||[],n.flagBitsUsed=n.flagBitsUsed||0,n.hashesUsed=n.hashesUsed||0,n.flagBitsUsed>8*this.flags.length)return null;var i=this.flags[n.flagBitsUsed>>3]>>>(7&n.flagBitsUsed++)&1;if(0!==t&&i){var s=this._traverseMerkleTree(t-1,2*e,n),o=s;return 2*e+1<this._calcTreeWidth(t-1)&&(o=this._traverseMerkleTree(t-1,2*e+1,n)),u.sha256sha256(new r.concat([s,o]))}if(n.hashesUsed>=this.hashes.length)return null;var a=this.hashes[n.hashesUsed++];return 0===t&&i&&n.txs.push(a),new r(a,"hex")},n.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t},n.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t},n.prototype.hasTransaction=function(t){c.checkArgument(!i.isUndefined(t),"tx cannot be undefined"),c.checkArgument(t instanceof h||"string"==typeof t,'Invalid tx given, tx must be a "string" or "Transaction"');var e=t;t instanceof h&&(e=o.reverse(new r(t.id,"hex")).toString("hex"));var n=[],s=this._calcTreeHeight();return this._traverseMerkleTree(s,0,{txs:n}),-1!==n.indexOf(e)},n._fromBufferReader=function(t){c.checkState(!t.finished(),"No merkleblock data received");var e={};e.header=s.fromBufferReader(t),e.numTransactions=t.readUInt32LE();var r=t.readVarintNum();e.hashes=[];for(var n=0;n<r;n++)e.hashes.push(t.read(32).toString("hex"));var i=t.readVarintNum();for(e.flags=[],n=0;n<i;n++)e.flags.push(t.readUInt8());return e},n.fromObject=function(t){return new n(t)},e.exports=n}).call(this,t("buffer").Buffer)},{"../crypto/hash":8,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../transaction":28,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,"./blockheader":3,buffer:47,lodash:359}],6:[function(t,e,r){(function(r){"use strict";var n=t("bn.js"),i=t("../util/preconditions"),s=t("lodash"),o=function(t){for(var e=new r(t.length),n=0;n<t.length;n++)e[n]=t[t.length-1-n];return e};n.Zero=new n(0),n.One=new n(1),n.Minus1=new n(-1),n.fromNumber=function(t){return i.checkArgument(s.isNumber(t)),new n(t)},n.fromString=function(t,e){return i.checkArgument(s.isString(t)),new n(t,e)},n.fromBuffer=function(t,e){void 0!==e&&"little"===e.endian&&(t=o(t));var r=t.toString("hex");return new n(r,16)},n.fromSM=function(t,e){var i;if(0===t.length)return n.fromBuffer(new r([0]));var s="big";return e&&(s=e.endian),"little"===s&&(t=o(t)),128&t[0]?(t[0]=127&t[0],i=n.fromBuffer(t),i.neg().copy(i)):i=n.fromBuffer(t),i},n.prototype.toNumber=function(){return parseInt(this.toString(10),10)},n.prototype.toBuffer=function(t){var e,i;if(t&&t.size){i=this.toString(16,2);var s=i.length/2;e=new r(i,"hex"),s===t.size?e=e:s>t.size?e=n.trim(e,s):s<t.size&&(e=n.pad(e,s,t.size))}else i=this.toString(16,2),e=new r(i,"hex");return void 0!==t&&"little"===t.endian&&(e=o(e)),e},n.prototype.toSMBigEndian=function(){var t;return-1===this.cmp(n.Zero)?(t=this.neg().toBuffer(),128&t[0]?t=r.concat([new r([128]),t]):t[0]=128|t[0]):(t=this.toBuffer(),128&t[0]&&(t=r.concat([new r([0]),t]))),1===t.length&0===t[0]&&(t=new r([])),t},n.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return"little"===e&&(r=o(r)),r},n.fromScriptNumBuffer=function(t,e,r){var s=r||4;if(i.checkArgument(t.length<=s,new Error("script number overflow")),e&&t.length>0&&0==(127&t[t.length-1])&&(t.length<=1||0==(128&t[t.length-2])))throw new Error("non-minimally encoded script number");return n.fromSM(t,{endian:"little"})},n.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},n.prototype.gt=function(t){return this.cmp(t)>0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.lt=function(t){return this.cmp(t)<0},n.trim=function(t,e){return t.slice(e-t.length,t.length)},n.pad=function(t,e,n){for(var i=new r(n),s=0;s<t.length;s++)i[i.length-1-s]=t[t.length-1-s];for(s=0;s<n-e;s++)i[s]=0;return i},e.exports=n}).call(this,t("buffer").Buffer)},{"../util/preconditions":44,"bn.js":334,buffer:47,lodash:359}],7:[function(t,e,r){(function(r){"use strict";var n=t("./bn"),i=t("./point"),s=t("./signature"),o=t("../publickey"),a=t("./random"),f=t("./hash"),u=t("../util/buffer"),h=t("lodash"),c=t("../util/preconditions"),d=function t(e){if(!(this instanceof t))return new t(e);e&&this.set(e)};d.prototype.set=function(t){return this.hashbuf=t.hashbuf||this.hashbuf,this.endian=t.endian||this.endian,this.privkey=t.privkey||this.privkey,this.pubkey=t.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=t.sig||this.sig,this.k=t.k||this.k,this.verified=t.verified||this.verified,this},d.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()},d.prototype.calci=function(){for(var t=0;t<4;t++){this.sig.i=t;var e;try{e=this.toPublicKey()}catch(t){console.error(t);continue}if(e.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")},d.fromString=function(t){var e=JSON.parse(t);return new d(e)},d.prototype.randomK=function(){var t,e=i.getN();do{t=n.fromBuffer(a.getRandomBuffer(32))}while(!t.lt(e)||!t.gt(n.Zero));return this.k=t,this},d.prototype.deterministicK=function(t){h.isUndefined(t)&&(t=0);var e=new r(32);e.fill(1);var s=new r(32);s.fill(0);var o=this.privkey.bn.toBuffer({size:32}),a="little"===this.endian?u.reverse(this.hashbuf):this.hashbuf;s=f.sha256hmac(r.concat([e,new r([0]),o,a]),s),e=f.sha256hmac(e,s),s=f.sha256hmac(r.concat([e,new r([1]),o,a]),s),e=f.sha256hmac(e,s),e=f.sha256hmac(e,s);for(var c=n.fromBuffer(e),d=i.getN(),p=0;p<t||!c.lt(d)||!c.gt(n.Zero);p++)s=f.sha256hmac(r.concat([e,new r([0])]),s),e=f.sha256hmac(e,s),e=f.sha256hmac(e,s),c=n.fromBuffer(e);return this.k=c,this},d.prototype.toPublicKey=function(){var t=this.sig.i;c.checkArgument(0===t||1===t||2===t||3===t,new Error("i must be equal to 0, 1, 2, or 3"));var e=n.fromBuffer(this.hashbuf),r=this.sig.r,s=this.sig.s,a=1&t,f=t>>1,u=i.getN(),h=i.getG(),d=f?r.add(u):r,p=i.fromX(a,d);if(!p.mul(u).isInfinity())throw new Error("nR is not a valid curve point");var l=e.neg().mod(u),b=r.invm(u),g=p.mul(s).add(h.mul(l)).mul(b);return o.fromPoint(g,this.sig.compressed)},d.prototype.sigError=function(){if(!u.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var t=this.sig.r,e=this.sig.s;if(!(t.gt(n.Zero)&&t.lt(i.getN())&&e.gt(n.Zero)&&e.lt(i.getN())))return"r and s not in range";var r=n.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),s=i.getN(),o=e.invm(s),a=o.mul(r).mod(s),f=o.mul(t).mod(s),h=i.getG().mulAdd(a,this.pubkey.point,f);return h.isInfinity()?"p is infinity":0!==h.getX().mod(s).cmp(t)&&"Invalid signature"},d.toLowS=function(t){return t.gt(n.fromBuffer(new r("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(t=i.getN().sub(t)),t},d.prototype._findSignature=function(t,e){var r,s,o,a,f=i.getN(),u=i.getG(),h=0;do{(!this.k||h>0)&&this.deterministicK(h),h++,r=this.k,s=u.mul(r),o=s.x.mod(f),a=r.invm(f).mul(e.add(t.mul(o))).mod(f)}while(o.cmp(n.Zero)<=0||a.cmp(n.Zero)<=0);return a=d.toLowS(a),{s:a,r:o}},d.prototype.sign=function(){var t=this.hashbuf,e=this.privkey,r=e.bn;c.checkState(t&&e&&r,new Error("invalid parameters")),c.checkState(u.isBuffer(t)&&32===t.length,new Error("hashbuf must be a 32 byte buffer"));var i=n.fromBuffer(t,this.endian?{endian:this.endian}:void 0),o=this._findSignature(r,i);return o.compressed=this.pubkey.compressed,this.sig=new s(o),this},d.prototype.signRandomK=function(){return this.randomK(),this.sign()},d.prototype.toString=function(){var t={};return this.hashbuf&&(t.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(t.privkey=this.privkey.toString()),this.pubkey&&(t.pubkey=this.pubkey.toString()),this.sig&&(t.sig=this.sig.toString()),this.k&&(t.k=this.k.toString()),JSON.stringify(t)},d.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},d.sign=function(t,e,r){return d().set({hashbuf:t,endian:r,privkey:e}).sign().sig},d.verify=function(t,e,r,n){return d().set({hashbuf:t,endian:n,sig:e,pubkey:r}).verify().verified},e.exports=d}).call(this,t("buffer").Buffer)},{"../publickey":24,"../util/buffer":42,"../util/preconditions":44,"./bn":6,"./hash":8,"./point":9,"./random":10,"./signature":11,buffer:47,lodash:359}],8:[function(t,e,r){(function(r){"use strict";var n=t("crypto"),i=t("../util/buffer"),s=t("../util/preconditions"),o=e.exports;o.sha1=function(t){return s.checkArgument(i.isBuffer(t)),n.createHash("sha1").update(t).digest()},o.sha1.blocksize=512,o.sha256=function(t){return s.checkArgument(i.isBuffer(t)),n.createHash("sha256").update(t).digest()},o.sha256.blocksize=512,o.sha256sha256=function(t){return s.checkArgument(i.isBuffer(t)),o.sha256(o.sha256(t))},o.ripemd160=function(t){return s.checkArgument(i.isBuffer(t)),n.createHash("ripemd160").update(t).digest()},o.sha256ripemd160=function(t){return s.checkArgument(i.isBuffer(t)),o.ripemd160(o.sha256(t))},o.sha512=function(t){return s.checkArgument(i.isBuffer(t)),n.createHash("sha512").update(t).digest()},o.sha512.blocksize=1024,o.hmac=function(t,e,n){s.checkArgument(i.isBuffer(e)),s.checkArgument(i.isBuffer(n)),s.checkArgument(t.blocksize);var o=t.blocksize/8;if(n.length>o)n=t(n);else if(n<o){var a=new r(o);a.fill(0),n.copy(a),n=a}var f=new r(o);f.fill(92);var u=new r(o);u.fill(54);for(var h=new r(o),c=new r(o),d=0;d<o;d++)h[d]=f[d]^n[d],c[d]=u[d]^n[d];return t(r.concat([h,t(r.concat([c,e]))]))},o.sha256hmac=function(t,e){return o.hmac(o.sha256,t,e)},o.sha512hmac=function(t,e){return o.hmac(o.sha512,t,e)}}).call(this,t("buffer").Buffer)},{"../util/buffer":42,"../util/preconditions":44,buffer:47,crypto:51}],9:[function(t,e,r){(function(r){"use strict";var n=t("./bn"),i=t("../util/buffer"),s=t("elliptic").curves.secp256k1,o=s.curve.point.bind(s.curve),a=s.curve.pointFromX.bind(s.curve),f=function(t,e,r){var n=o(t,e,r);return n.validate(),n};f.prototype=Object.getPrototypeOf(s.curve.point()),f.fromX=function(t,e){var r=a(t,e);return r.validate(),r},f.getG=function(){return s.curve.g},f.getN=function(){return new n(s.curve.n.toArray())},f.prototype._getX=f.prototype.getX,f.prototype.getX=function(){return new n(this._getX().toArray())},f.prototype._getY=f.prototype.getY,f.prototype.getY=function(){return new n(this._getY().toArray())},f.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");if(0===this.getX().cmp(n.Zero)||0===this.getY().cmp(n.Zero))throw new Error("Invalid x,y value for curve, cannot equal 0.");if(0!==a(this.getY().isOdd(),this.getX()).y.cmp(this.y))throw new Error("Invalid y value for curve.");var t=this.getX().gt(n.Minus1)&&this.getX().lt(f.getN()),e=this.getY().gt(n.Minus1)&&this.getY().lt(f.getN());if(!t||!e)throw new Error("Point does not lie on the curve");if(!this.mul(f.getN()).isInfinity())throw new Error("Point times N must be infinity");return this},f.pointToCompressed=function(t){var e,n=t.getX().toBuffer({size:32}),s=t.getY().toBuffer({size:32}),o=s[s.length-1]%2;return e=new r(o?[3]:[2]),i.concat([e,n])},e.exports=f}).call(this,t("buffer").Buffer)},{"../util/buffer":42,"./bn":6,buffer:47,elliptic:337}],10:[function(t,e,r){(function(r,n){"use strict";function i(){}i.getRandomBuffer=function(t){return r.browser?i.getRandomBufferBrowser(t):i.getRandomBufferNode(t)},i.getRandomBufferNode=function(e){return t("crypto").randomBytes(e)},i.getRandomBufferBrowser=function(t){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var e=window.crypto;else{if(!window.msCrypto||!window.msCrypto.getRandomValues)throw new Error("window.crypto.getRandomValues not available");var e=window.msCrypto}var r=new Uint8Array(t);return e.getRandomValues(r),new n(r)},i.getPseudoRandomBuffer=function(t){for(var e,r=new n(t),i=0;i<=t;i++){0===i-4*Math.floor(i/4)?(e=4294967296*Math.random(),r[i]=255&e):r[i]=255&(e>>>=8)}return r},e.exports=i}).call(this,t("_process"),t("buffer").Buffer)},{_process:301,buffer:47,crypto:51}],11:[function(t,e,r){(function(r){"use strict";var n=t("./bn"),i=t("lodash"),s=t("../util/preconditions"),o=t("../util/buffer"),a=t("../util/js"),f=function t(e,r){if(!(this instanceof t))return new t(e,r);if(e instanceof n)this.set({r:e,s:r});else if(e){var i=e;this.set(i)}};f.prototype.set=function(t){return this.r=t.r||this.r||void 0,this.s=t.s||this.s||void 0,this.i=void 0!==t.i?t.i:this.i,this.compressed=void 0!==t.compressed?t.compressed:this.compressed,this.nhashtype=t.nhashtype||this.nhashtype||void 0,this},f.fromCompact=function(t){s.checkArgument(o.isBuffer(t),"Argument is expected to be a Buffer");var e=new f,r=!0,i=t.slice(0,1)[0]-27-4;i<0&&(r=!1,i+=4);var a=t.slice(1,33),u=t.slice(33,65);return s.checkArgument(0===i||1===i||2===i||3===i,new Error("i must be 0, 1, 2, or 3")),s.checkArgument(32===a.length,new Error("r must be 32 bytes")),s.checkArgument(32===u.length,new Error("s must be 32 bytes")),e.compressed=r,e.i=i,e.r=n.fromBuffer(a),e.s=n.fromBuffer(u),e},f.fromDER=f.fromBuffer=function(t,e){var r=f.parseDER(t,e),n=new f;return n.r=r.r,n.s=r.s,n},f.fromTxFormat=function(t){var e=t.readUInt8(t.length-1),r=t.slice(0,t.length-1),n=new f.fromDER(r,!1);return n.nhashtype=e,n},f.fromString=function(t){var e=new r(t,"hex");return f.fromDER(e)},f.parseDER=function(t,e){s.checkArgument(o.isBuffer(t),new Error("DER formatted signature should be a buffer")),i.isUndefined(e)&&(e=!0);var r=t[0];s.checkArgument(48===r,new Error("Header byte should be 0x30"));var a=t[1],f=t.slice(2).length;s.checkArgument(!e||a===f,new Error("Length byte should length of what follows")),a=a<f?a:f;var u=t[2];s.checkArgument(2===u,new Error("Integer byte for r should be 0x02"));var h=t[3],c=t.slice(4,4+h),d=n.fromBuffer(c),p=0===t[4];s.checkArgument(h===c.length,new Error("Length of r incorrect"));var l=t[4+h+0];s.checkArgument(2===l,new Error("Integer byte for s should be 0x02"));var b=t[4+h+1],g=t.slice(4+h+2,4+h+2+b),y=n.fromBuffer(g),m=0===t[4+h+2+2];s.checkArgument(b===g.length,new Error("Length of s incorrect"));var v=4+h+2+b;return s.checkArgument(a===v-2,new Error("Length of signature incorrect")),{header:r,length:a,rheader:u,rlength:h,rneg:p,rbuf:c,r:d,sheader:l,slength:b,sneg:m,sbuf:g,s:y}},f.prototype.toCompact=function(t,e){if(t="number"==typeof t?t:this.i,e="boolean"==typeof e?e:this.compressed,0!==t&&1!==t&&2!==t&&3!==t)throw new Error("i must be equal to 0, 1, 2, or 3");var n=t+27+4;!1===e&&(n-=4);var i=new r([n]),s=this.r.toBuffer({size:32}),o=this.s.toBuffer({size:32});return r.concat([i,s,o])},f.prototype.toBuffer=f.prototype.toDER=function(){var t=this.r.toBuffer(),e=this.s.toBuffer(),n=!!(128&t[0]),i=!!(128&e[0]),s=n?r.concat([new r([0]),t]):t,o=i?r.concat([new r([0]),e]):e,a=s.length,f=o.length,u=2+a+2+f;return r.concat([new r([48,u,2,a]),s,new r([2,f]),o])},f.prototype.toString=function(){return this.toDER().toString("hex")},f.isTxDER=function(t){if(t.length<9)return!1;if(t.length>73)return!1;if(48!==t[0])return!1;if(t[1]!==t.length-3)return!1;var e=t[3];if(5+e>=t.length)return!1;var r=t[5+e];if(e+r+7!==t.length)return!1;var n=t.slice(4);if(2!==t[2])return!1;if(0===e)return!1;if(128&n[0])return!1;if(e>1&&0===n[0]&&!(128&n[1]))return!1;var i=t.slice(6+e);return 2===t[6+e-2]&&(0!==r&&(!(128&i[0])&&!(r>1&&0===i[0]&&!(128&i[1]))))},f.prototype.hasLowS=function(){return!this.s.lt(new n(1))&&!this.s.gt(new n("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))},f.prototype.hasDefinedHashtype=function(){
  if(!a.isNaturalNumber(this.nhashtype))return!1;var t=this.nhashtype&~f.SIGHASH_ANYONECANPAY;return!(t<f.SIGHASH_ALL||t>f.SIGHASH_SINGLE)},f.prototype.toTxFormat=function(){var t=this.toDER(),e=new r(1);return e.writeUInt8(this.nhashtype,0),r.concat([t,e])},f.SIGHASH_ALL=1,f.SIGHASH_NONE=2,f.SIGHASH_SINGLE=3,f.SIGHASH_ANYONECANPAY=128,e.exports=f}).call(this,t("buffer").Buffer)},{"../util/buffer":42,"../util/js":43,"../util/preconditions":44,"./bn":6,buffer:47,lodash:359}],12:[function(t,e,r){(function(r){"use strict";var n=t("lodash"),i=t("bs58"),s=t("buffer"),o="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),a=function t(e){if(!(this instanceof t))return new t(e);if(r.isBuffer(e)){var n=e;this.fromBuffer(n)}else if("string"==typeof e){var i=e;this.fromString(i)}else e&&this.set(e)};a.validCharacters=function(t){return s.Buffer.isBuffer(t)&&(t=t.toString()),n.all(n.map(t,function(t){return n.contains(o,t)}))},a.prototype.set=function(t){return this.buf=t.buf||this.buf||void 0,this},a.encode=function(t){if(!s.Buffer.isBuffer(t))throw new Error("Input should be a buffer");return i.encode(t)},a.decode=function(t){if("string"!=typeof t)throw new Error("Input should be a string");return new r(i.decode(t))},a.prototype.fromBuffer=function(t){return this.buf=t,this},a.prototype.fromString=function(t){var e=a.decode(t);return this.buf=e,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},e.exports=a}).call(this,t("buffer").Buffer)},{bs58:335,buffer:47,lodash:359}],13:[function(t,e,r){(function(r){"use strict";var n=t("lodash"),i=t("./base58"),s=t("buffer"),o=t("../crypto/hash").sha256sha256,a=function t(e){if(!(this instanceof t))return new t(e);if(r.isBuffer(e)){var n=e;this.fromBuffer(n)}else if("string"==typeof e){var i=e;this.fromString(i)}else e&&this.set(e)};a.prototype.set=function(t){return this.buf=t.buf||this.buf||void 0,this},a.validChecksum=function(t,e){return n.isString(t)&&(t=new s.Buffer(i.decode(t))),n.isString(e)&&(e=new s.Buffer(i.decode(e))),e||(e=t.slice(-4),t=t.slice(0,-4)),a.checksum(t).toString("hex")===e.toString("hex")},a.decode=function(t){if("string"!=typeof t)throw new Error("Input must be a string");var e=new r(i.decode(t));if(e.length<4)throw new Error("Input string too short");var n=e.slice(0,-4),s=e.slice(-4),a=o(n),f=a.slice(0,4);if(s.toString("hex")!==f.toString("hex"))throw new Error("Checksum mismatch");return n},a.checksum=function(t){return o(t).slice(0,4)},a.encode=function(t){if(!r.isBuffer(t))throw new Error("Input must be a buffer");var e=new r(t.length+4),n=a.checksum(t);return t.copy(e),n.copy(e,t.length),i.encode(e)},a.prototype.fromBuffer=function(t){return this.buf=t,this},a.prototype.fromString=function(t){var e=a.decode(t);return this.buf=e,this},a.prototype.toBuffer=function(){return this.buf},a.prototype.toString=function(){return a.encode(this.buf)},e.exports=a}).call(this,t("buffer").Buffer)},{"../crypto/hash":8,"./base58":12,buffer:47,lodash:359}],14:[function(t,e,r){(function(r){"use strict";var n=t("lodash"),i=t("../util/preconditions"),s=t("../util/buffer"),o=t("../crypto/bn"),a=function t(e){if(!(this instanceof t))return new t(e);if(!n.isUndefined(e))if(r.isBuffer(e))this.set({buf:e});else if(n.isString(e))this.set({buf:new r(e,"hex")});else{if(!n.isObject(e))throw new TypeError("Unrecognized argument for BufferReader");var i=e;this.set(i)}};a.prototype.set=function(t){return this.buf=t.buf||this.buf||void 0,this.pos=t.pos||this.pos||0,this},a.prototype.eof=function(){return this.pos>=this.buf.length},a.prototype.finished=a.prototype.eof,a.prototype.read=function(t){i.checkArgument(!n.isUndefined(t),"Must specify a length");var e=this.buf.slice(this.pos,this.pos+t);return this.pos=this.pos+t,e},a.prototype.readAll=function(){var t=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,t},a.prototype.readUInt8=function(){var t=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,t},a.prototype.readUInt16BE=function(){var t=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,t},a.prototype.readUInt16LE=function(){var t=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,t},a.prototype.readUInt32BE=function(){var t=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,t},a.prototype.readUInt32LE=function(){var t=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,t},a.prototype.readInt32LE=function(){var t=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,t},a.prototype.readUInt64BEBN=function(){var t=this.buf.slice(this.pos,this.pos+8),e=o.fromBuffer(t);return this.pos=this.pos+8,e},a.prototype.readUInt64LEBN=function(){var t,e=this.buf.readUInt32LE(this.pos),r=this.buf.readUInt32LE(this.pos+4),n=4294967296*r+e;if(n<=9007199254740991)t=new o(n);else{var i=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);t=new o(i,10,"le")}return this.pos=this.pos+8,t},a.prototype.readVarintNum=function(){var t=this.readUInt8();switch(t){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var e=this.readUInt64LEBN(),r=e.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return t}},a.prototype.readVarLengthBuffer=function(){var t=this.readVarintNum(),e=this.read(t);return i.checkState(e.length===t,"Invalid length while reading varlength buffer. Expected to read: "+t+" and read "+e.length),e},a.prototype.readVarintBuf=function(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}},a.prototype.readVarintBN=function(){var t=this.readUInt8();switch(t){case 253:return new o(this.readUInt16LE());case 254:return new o(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new o(t)}},a.prototype.reverse=function(){for(var t=new r(this.buf.length),e=0;e<t.length;e++)t[e]=this.buf[this.buf.length-1-e];return this.buf=t,this},a.prototype.readReverse=function(t){n.isUndefined(t)&&(t=this.buf.length);var e=this.buf.slice(this.pos,this.pos+t);return this.pos=this.pos+t,s.reverse(e)},e.exports=a}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"../util/buffer":42,"../util/preconditions":44,buffer:47,lodash:359}],15:[function(t,e,r){(function(r){"use strict";var n=t("../util/buffer"),i=t("assert"),s=function t(e){if(!(this instanceof t))return new t(e);e?this.set(e):this.bufs=[]};s.prototype.set=function(t){return this.bufs=t.bufs||this.bufs||[],this},s.prototype.toBuffer=function(){return this.concat()},s.prototype.concat=function(){return r.concat(this.bufs)},s.prototype.write=function(t){return i(n.isBuffer(t)),this.bufs.push(t),this},s.prototype.writeReverse=function(t){return i(n.isBuffer(t)),this.bufs.push(n.reverse(t)),this},s.prototype.writeUInt8=function(t){var e=new r(1);return e.writeUInt8(t,0),this.write(e),this},s.prototype.writeUInt16BE=function(t){var e=new r(2);return e.writeUInt16BE(t,0),this.write(e),this},s.prototype.writeUInt16LE=function(t){var e=new r(2);return e.writeUInt16LE(t,0),this.write(e),this},s.prototype.writeUInt32BE=function(t){var e=new r(4);return e.writeUInt32BE(t,0),this.write(e),this},s.prototype.writeInt32LE=function(t){var e=new r(4);return e.writeInt32LE(t,0),this.write(e),this},s.prototype.writeUInt32LE=function(t){var e=new r(4);return e.writeUInt32LE(t,0),this.write(e),this},s.prototype.writeUInt64BEBN=function(t){var e=t.toBuffer({size:8});return this.write(e),this},s.prototype.writeUInt64LEBN=function(t){var e=t.toBuffer({size:8});return this.writeReverse(e),this},s.prototype.writeVarintNum=function(t){var e=s.varintBufNum(t);return this.write(e),this},s.prototype.writeVarintBN=function(t){var e=s.varintBufBN(t);return this.write(e),this},s.varintBufNum=function(t){var e=void 0;return t<253?(e=new r(1),e.writeUInt8(t,0)):t<65536?(e=new r(3),e.writeUInt8(253,0),e.writeUInt16LE(t,1)):t<4294967296?(e=new r(5),e.writeUInt8(254,0),e.writeUInt32LE(t,1)):(e=new r(9),e.writeUInt8(255,0),e.writeInt32LE(-1&t,1),e.writeUInt32LE(Math.floor(t/4294967296),5)),e},s.varintBufBN=function(t){var e=void 0,n=t.toNumber();if(n<253)e=new r(1),e.writeUInt8(n,0);else if(n<65536)e=new r(3),e.writeUInt8(253,0),e.writeUInt16LE(n,1);else if(n<4294967296)e=new r(5),e.writeUInt8(254,0),e.writeUInt32LE(n,1);else{var i=new s;i.writeUInt8(255),i.writeUInt64LEBN(t);var e=i.concat()}return e},e.exports=s}).call(this,t("buffer").Buffer)},{"../util/buffer":42,assert:45,buffer:47}],16:[function(t,e,r){(function(r){"use strict";var n=t("./bufferwriter"),i=t("./bufferreader"),s=t("../crypto/bn"),o=function t(e){if(!(this instanceof t))return new t(e);if(r.isBuffer(e))this.buf=e;else if("number"==typeof e){var n=e;this.fromNumber(n)}else if(e instanceof s){var i=e;this.fromBN(i)}else if(e){var o=e;this.set(o)}};o.prototype.set=function(t){return this.buf=t.buf||this.buf,this},o.prototype.fromString=function(t){return this.set({buf:new r(t,"hex")}),this},o.prototype.toString=function(){return this.buf.toString("hex")},o.prototype.fromBuffer=function(t){return this.buf=t,this},o.prototype.fromBufferReader=function(t){return this.buf=t.readVarintBuf(),this},o.prototype.fromBN=function(t){return this.buf=n().writeVarintBN(t).concat(),this},o.prototype.fromNumber=function(t){return this.buf=n().writeVarintNum(t).concat(),this},o.prototype.toBuffer=function(){return this.buf},o.prototype.toBN=function(){return i(this.buf).readVarintBN()},o.prototype.toNumber=function(){return i(this.buf).readVarintNum()},e.exports=o}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"./bufferreader":14,"./bufferwriter":15,buffer:47}],17:[function(t,e,r){"use strict";function n(t,e){return t.replace("{0}",e[0]).replace("{1}",e[1]).replace("{2}",e[2])}var i=t("lodash"),s=function(t,e){var r=function(){if(i.isString(e.message))this.message=n(e.message,arguments);else{if(!i.isFunction(e.message))throw new Error("Invalid error definition for "+e.name);this.message=e.message.apply(null,arguments)}this.stack=this.message+"\n"+(new Error).stack};return r.prototype=Object.create(t.prototype),r.prototype.name=t.prototype.name+e.name,t[e.name]=r,e.errors&&o(r,e.errors),r},o=function(t,e){i.each(e,function(e){s(t,e)})},a={};a.Error=function(){this.message="Internal error",this.stack=this.message+"\n"+(new Error).stack},a.Error.prototype=Object.create(Error.prototype),a.Error.prototype.name="bitcore.Error";var f=t("./spec");!function(t,e){o(t,e)}(a.Error,f),e.exports=a.Error,e.exports.extend=function(t){return s(a.Error,t)}},{"./spec":18,lodash:359}],18:[function(t,e,r){"use strict";e.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: http://bitcore.io/"+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]},{}],19:[function(t,e,r){(function(r){"use strict";function n(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);if(!t)return this._generateRandomly();if(d.get(t))return this._generateRandomly(t);if(o.isString(t)||m.isBuffer(t))if(n.isValidSerialized(t))this._buildFromSerialized(t);else if(v.isValidJSON(t))this._buildFromJSON(t);else{if(!m.isBuffer(t)||!n.isValidSerialized(t.toString()))throw n.getSerializedError(t);this._buildFromSerialized(t.toString())}else{if(!o.isObject(t))throw new y.UnrecognizedArgument(t);this._buildFromObject(t)}}var i=t("assert"),s=t("buffer"),o=t("lodash"),a=t("./util/preconditions"),f=t("./crypto/bn"),u=t("./encoding/base58"),h=t("./encoding/base58check"),c=t("./crypto/hash"),d=t("./networks"),p=t("./crypto/point"),l=t("./privatekey"),b=t("./crypto/random"),g=t("./errors"),y=g.HDPrivateKey,m=t("./util/buffer"),v=t("./util/js");n.isValidPath=function(t,e){if(o.isString(t)){var r=n._getDerivationIndexes(t);return null!==r&&o.all(r,n.isValidPath)}return!!o.isNumber(t)&&(t<n.Hardened&&!0===e&&(t+=n.Hardened),t>=0&&t<n.MaxIndex)},n._getDerivationIndexes=function(t){var e=t.split("/");if(o.contains(n.RootElementAlias,t))return[];if(!o.contains(n.RootElementAlias,e[0]))return null;var r=e.slice(1).map(function(t){var e="'"===t.slice(-1);if(e&&(t=t.slice(0,-1)),!t||"-"===t[0])return NaN;var r=+t;return e&&(r+=n.Hardened),r});return o.any(r,isNaN)?null:r},n.prototype.derive=function(t,e){return this.deriveNonCompliantChild(t,e)},n.prototype.deriveChild=function(t,e){if(o.isNumber(t))return this._deriveWithNumber(t,e);if(o.isString(t))return this._deriveFromString(t);throw new y.InvalidDerivationArgument(t)},n.prototype.deriveNonCompliantChild=function(t,e){if(o.isNumber(t))return this._deriveWithNumber(t,e,!0);if(o.isString(t))return this._deriveFromString(t,!0);throw new y.InvalidDerivationArgument(t)},n.prototype._deriveWithNumber=function(t,e,r){if(!n.isValidPath(t,e))throw new y.InvalidPath(t);e=t>=n.Hardened||e,t<n.Hardened&&!0===e&&(t+=n.Hardened);var o,a=m.integerAsBuffer(t);if(e&&r){var u=this.privateKey.bn.toBuffer();o=m.concat([new s.Buffer([0]),u,a])}else if(e){var h=this.privateKey.bn.toBuffer({size:32});i(32===h.length,"length of private key buffer is expected to be 32 bytes"),o=m.concat([new s.Buffer([0]),h,a])}else o=m.concat([this.publicKey.toBuffer(),a]);var d=c.sha512hmac(o,this._buffers.chainCode),b=f.fromBuffer(d.slice(0,32),{size:32}),g=d.slice(32,64),v=b.add(this.privateKey.toBigNumber()).mod(p.getN()).toBuffer({size:32});return l.isValid(v)?new n({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:t,chainCode:g,privateKey:v}):this._deriveWithNumber(t+1,null,r)},n.prototype._deriveFromString=function(t,e){if(!n.isValidPath(t))throw new y.InvalidPath(t);return n._getDerivationIndexes(t).reduce(function(t,r){return t._deriveWithNumber(r,null,e)},this)},n.isValidSerialized=function(t,e){return!n.getSerializedError(t,e)},n.getSerializedError=function(t,e){if(!o.isString(t)&&!m.isBuffer(t))return new y.UnrecognizedArgument("Expected string or buffer");if(!u.validCharacters(t))return new g.InvalidB58Char("(unknown)",t);try{t=h.decode(t)}catch(e){return new g.InvalidB58Checksum(t)}if(t.length!==n.DataLength)return new y.InvalidLength(t);if(!o.isUndefined(e)){var r=n._validateNetwork(t,e);if(r)return r}return null},n._validateNetwork=function(t,e){var r=d.get(e);if(!r)return new g.InvalidNetworkArgument(e);var n=t.slice(0,4);return m.integerFromBuffer(n)!==r.xprivkey?new g.InvalidNetwork(n):null},n.fromString=function(t){return a.checkArgument(o.isString(t),"No valid string was provided"),new n(t)},n.fromObject=function(t){return a.checkArgument(o.isObject(t),"No valid argument was provided"),new n(t)},n.prototype._buildFromJSON=function(t){return this._buildFromObject(JSON.parse(t))},n.prototype._buildFromObject=function(t){var e={version:t.network?m.integerAsBuffer(d.get(t.network).xprivkey):t.version,depth:o.isNumber(t.depth)?m.integerAsSingleByteBuffer(t.depth):t.depth,parentFingerPrint:o.isNumber(t.parentFingerPrint)?m.integerAsBuffer(t.parentFingerPrint):t.parentFingerPrint,childIndex:o.isNumber(t.childIndex)?m.integerAsBuffer(t.childIndex):t.childIndex,chainCode:o.isString(t.chainCode)?m.hexToBuffer(t.chainCode):t.chainCode,privateKey:o.isString(t.privateKey)&&v.isHexa(t.privateKey)?m.hexToBuffer(t.privateKey):t.privateKey,checksum:t.checksum?t.checksum.length?t.checksum:m.integerAsBuffer(t.checksum):void 0};return this._buildFromBuffers(e)},n.prototype._buildFromSerialized=function(t){var e=h.decode(t),r={version:e.slice(n.VersionStart,n.VersionEnd),depth:e.slice(n.DepthStart,n.DepthEnd),parentFingerPrint:e.slice(n.ParentFingerPrintStart,n.ParentFingerPrintEnd),childIndex:e.slice(n.ChildIndexStart,n.ChildIndexEnd),chainCode:e.slice(n.ChainCodeStart,n.ChainCodeEnd),privateKey:e.slice(n.PrivateKeyStart,n.PrivateKeyEnd),checksum:e.slice(n.ChecksumStart,n.ChecksumEnd),xprivkey:t};return this._buildFromBuffers(r)},n.prototype._generateRandomly=function(t){return n.fromSeed(b.getRandomBuffer(64),t)},n.fromSeed=function(t,e){if(v.isHexaString(t)&&(t=m.hexToBuffer(t)),!r.isBuffer(t))throw new y.InvalidEntropyArgument(t);if(t.length<16)throw new y.InvalidEntropyArgument.NotEnoughEntropy(t);if(t.length>64)throw new y.InvalidEntropyArgument.TooMuchEntropy(t);var i=c.sha512hmac(t,new s.Buffer("Bitcoin seed"));return new n({network:d.get(e)||d.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:i.slice(0,32),chainCode:i.slice(32,64)})},n.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=t("./hdpublickey");this._hdPublicKey=new e(this)}},n.prototype._buildFromBuffers=function(t){n._validateBufferArguments(t),v.defineImmutable(this,{_buffers:t});var e=[t.version,t.depth,t.parentFingerPrint,t.childIndex,t.chainCode,m.emptyBuffer(1),t.privateKey],i=s.Buffer.concat(e);if(t.checksum&&t.checksum.length){if(t.checksum.toString()!==h.checksum(i).toString())throw new g.InvalidB58Checksum(i)}else t.checksum=h.checksum(i);var o,a=d.get(m.integerFromBuffer(t.version));o=h.encode(s.Buffer.concat(e)),t.xprivkey=new r(o);var u=new l(f.fromBuffer(t.privateKey),a),p=u.toPublicKey(),b=n.ParentFingerPrintSize,y=c.sha256ripemd160(p.toBuffer()).slice(0,b);return v.defineImmutable(this,{xprivkey:o,network:a,depth:m.integerFromSingleByteBuffer(t.depth),privateKey:u,publicKey:p,fingerPrint:y}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this},n._validateBufferArguments=function(t){var e=function(e,r){var n=t[e];i(m.isBuffer(n),e+" argument is not a buffer"),i(n.length===r,e+" has not the expected size: found "+n.length+", expected "+r)};e("version",n.VersionSize),e("depth",n.DepthSize),e("parentFingerPrint",n.ParentFingerPrintSize),e("childIndex",n.ChildIndexSize),e("chainCode",n.ChainCodeSize),e("privateKey",n.PrivateKeySize),t.checksum&&t.checksum.length&&e("checksum",n.CheckSumSize)},n.prototype.toString=function(){return this.xprivkey},n.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"},n.prototype.toObject=n.prototype.toJSON=function(){return{network:d.get(m.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:m.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:m.integerFromBuffer(this.fingerPrint),parentFingerPrint:m.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:m.integerFromBuffer(this._buffers.childIndex),chainCode:m.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:m.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}},n.fromBuffer=function(t){return new n(t.toString())},n.prototype.toBuffer=function(){return m.copy(this._buffers.xprivkey)},n.DefaultDepth=0,n.DefaultFingerprint=0,n.DefaultChildIndex=0,n.Hardened=2147483648,n.MaxIndex=2*n.Hardened,n.RootElementAlias=["m","M","m'","M'"],n.VersionSize=4,n.DepthSize=1,n.ParentFingerPrintSize=4,n.ChildIndexSize=4,n.ChainCodeSize=32,n.PrivateKeySize=32,n.CheckSumSize=4,n.DataLength=78,n.SerializedByteSize=82,n.VersionStart=0,n.VersionEnd=n.VersionStart+n.VersionSize,n.DepthStart=n.VersionEnd,n.DepthEnd=n.DepthStart+n.DepthSize,n.ParentFingerPrintStart=n.DepthEnd,n.ParentFingerPrintEnd=n.ParentFingerPrintStart+n.ParentFingerPrintSize,n.ChildIndexStart=n.ParentFingerPrintEnd,n.ChildIndexEnd=n.ChildIndexStart+n.ChildIndexSize,n.ChainCodeStart=n.ChildIndexEnd,n.ChainCodeEnd=n.ChainCodeStart+n.ChainCodeSize,n.PrivateKeyStart=n.ChainCodeEnd+1,n.PrivateKeyEnd=n.PrivateKeyStart+n.PrivateKeySize,n.ChecksumStart=n.PrivateKeyEnd,n.ChecksumEnd=n.ChecksumStart+n.CheckSumSize,i(n.ChecksumEnd===n.SerializedByteSize),e.exports=n}).call(this,t("buffer").Buffer)},{"./crypto/bn":6,"./crypto/hash":8,"./crypto/point":9,"./crypto/random":10,"./encoding/base58":12,"./encoding/base58check":13,"./errors":17,"./hdpublickey":20,"./networks":21,"./privatekey":23,"./util/buffer":42,"./util/js":43,"./util/preconditions":44,assert:45,buffer:47,lodash:359}],20:[function(t,e,r){(function(r){"use strict";function n(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);if(t){if(i.isString(t)||v.isBuffer(t)){var e=n.getSerializedError(t);if(e){if(v.isBuffer(t)&&!n.getSerializedError(t.toString()))return this._buildFromSerialized(t.toString());if(e instanceof g.ArgumentIsPrivateExtended)return new h(t).hdPublicKey;throw e}return this._buildFromSerialized(t)}if(i.isObject(t))return t instanceof h?this._buildFromPrivate(t):this._buildFromObject(t);throw new g.UnrecognizedArgument(t)}throw new g.MustSupplyArgument}var i=t("lodash"),s=t("./util/preconditions"),o=t("./crypto/bn"),a=t("./encoding/base58"),f=t("./encoding/base58check"),u=t("./crypto/hash"),h=t("./hdprivatekey"),c=t("./networks"),d=t("./crypto/point"),p=t("./publickey"),l=t("./errors"),b=l,g=l.HDPublicKey,y=t("assert"),m=t("./util/js"),v=t("./util/buffer");n.isValidPath=function(t){if(i.isString(t)){var e=h._getDerivationIndexes(t);return null!==e&&i.all(e,n.isValidPath)}return!!i.isNumber(t)&&(t>=0&&t<n.Hardened)},n.prototype.derive=function(t,e){return this.deriveChild(t,e)},n.prototype.deriveChild=function(t,e){if(i.isNumber(t))return this._deriveWithNumber(t,e);if(i.isString(t))return this._deriveFromString(t);throw new g.InvalidDerivationArgument(t)},n.prototype._deriveWithNumber=function(t,e){if(t>=n.Hardened||e)throw new g.InvalidIndexCantDeriveHardened;if(t<0)throw new g.InvalidPath(t);var r,i=v.integerAsBuffer(t),s=v.concat([this.publicKey.toBuffer(),i]),a=u.sha512hmac(s,this._buffers.chainCode),f=o.fromBuffer(a.slice(0,32),{size:32}),h=a.slice(32,64);try{r=p.fromPoint(d.getG().mul(f).add(this.publicKey.point))}catch(e){return this._deriveWithNumber(t+1)}return new n({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:t,chainCode:h,publicKey:r})},n.prototype._deriveFromString=function(t){if(i.contains(t,"'"))throw new g.InvalidIndexCantDeriveHardened;if(!n.isValidPath(t))throw new g.InvalidPath(t);return h._getDerivationIndexes(t).reduce(function(t,e){return t._deriveWithNumber(e)},this)},n.isValidSerialized=function(t,e){return i.isNull(n.getSerializedError(t,e))},n.getSerializedError=function(t,e){if(!i.isString(t)&&!v.isBuffer(t))return new g.UnrecognizedArgument("expected buffer or string");if(!a.validCharacters(t))return new b.InvalidB58Char("(unknown)",t);try{t=f.decode(t)}catch(e){return new b.InvalidB58Checksum(t)}if(t.length!==n.DataSize)return new g.InvalidLength(t);if(!i.isUndefined(e)){var r=n._validateNetwork(t,e);if(r)return r}var s=v.integerFromBuffer(t.slice(0,4));return s===c.livenet.xprivkey||s===c.testnet.xprivkey?new g.ArgumentIsPrivateExtended:null},n._validateNetwork=function(t,e){var r=c.get(e);if(!r)return new b.InvalidNetworkArgument(e);var i=t.slice(n.VersionStart,n.VersionEnd);return v.integerFromBuffer(i)!==r.xpubkey?new b.InvalidNetwork(i):null},n.prototype._buildFromPrivate=function(t){var e=i.clone(t._buffers),r=d.getG().mul(o.fromBuffer(e.privateKey));return e.publicKey=d.pointToCompressed(r),e.version=v.integerAsBuffer(c.get(v.integerFromBuffer(e.version)).xpubkey),e.privateKey=void 0,e.checksum=void 0,e.xprivkey=void 0,this._buildFromBuffers(e)},n.prototype._buildFromObject=function(t){var e={version:t.network?v.integerAsBuffer(c.get(t.network).xpubkey):t.version,depth:i.isNumber(t.depth)?v.integerAsSingleByteBuffer(t.depth):t.depth,parentFingerPrint:i.isNumber(t.parentFingerPrint)?v.integerAsBuffer(t.parentFingerPrint):t.parentFingerPrint,childIndex:i.isNumber(t.childIndex)?v.integerAsBuffer(t.childIndex):t.childIndex,chainCode:i.isString(t.chainCode)?v.hexToBuffer(t.chainCode):t.chainCode,publicKey:i.isString(t.publicKey)?v.hexToBuffer(t.publicKey):v.isBuffer(t.publicKey)?t.publicKey:t.publicKey.toBuffer(),checksum:i.isNumber(t.checksum)?v.integerAsBuffer(t.checksum):t.checksum};return this._buildFromBuffers(e)},n.prototype._buildFromSerialized=function(t){var e=f.decode(t),r={version:e.slice(n.VersionStart,n.VersionEnd),depth:e.slice(n.DepthStart,n.DepthEnd),parentFingerPrint:e.slice(n.ParentFingerPrintStart,n.ParentFingerPrintEnd),childIndex:e.slice(n.ChildIndexStart,n.ChildIndexEnd),chainCode:e.slice(n.ChainCodeStart,n.ChainCodeEnd),publicKey:e.slice(n.PublicKeyStart,n.PublicKeyEnd),checksum:e.slice(n.ChecksumStart,n.ChecksumEnd),xpubkey:t};return this._buildFromBuffers(r)},n.prototype._buildFromBuffers=function(t){n._validateBufferArguments(t),m.defineImmutable(this,{_buffers:t});var e=[t.version,t.depth,t.parentFingerPrint,t.childIndex,t.chainCode,t.publicKey],i=v.concat(e),s=f.checksum(i);if(t.checksum&&t.checksum.length){if(t.checksum.toString("hex")!==s.toString("hex"))throw new b.InvalidB58Checksum(i,s)}else t.checksum=s;var o,a=c.get(v.integerFromBuffer(t.version));o=f.encode(v.concat(e)),t.xpubkey=new r(o);var h=new p(t.publicKey,{network:a}),d=n.ParentFingerPrintSize,l=u.sha256ripemd160(h.toBuffer()).slice(0,d);return m.defineImmutable(this,{xpubkey:o,network:a,depth:v.integerFromSingleByteBuffer(t.depth),publicKey:h,fingerPrint:l}),this},n._validateBufferArguments=function(t){var e=function(e,r){var n=t[e];y(v.isBuffer(n),e+" argument is not a buffer, it's "+typeof n),y(n.length===r,e+" has not the expected size: found "+n.length+", expected "+r)};e("version",n.VersionSize),e("depth",n.DepthSize),e("parentFingerPrint",n.ParentFingerPrintSize),e("childIndex",n.ChildIndexSize),e("chainCode",n.ChainCodeSize),e("publicKey",n.PublicKeySize),t.checksum&&t.checksum.length&&e("checksum",n.CheckSumSize)},n.fromString=function(t){return s.checkArgument(i.isString(t),"No valid string was provided"),new n(t)},n.fromObject=function(t){return s.checkArgument(i.isObject(t),"No valid argument was provided"),new n(t)},n.prototype.toString=function(){return this.xpubkey},n.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"},n.prototype.toObject=n.prototype.toJSON=function(){return{network:c.get(v.integerFromBuffer(this._buffers.version)).name,depth:v.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:v.integerFromBuffer(this.fingerPrint),parentFingerPrint:v.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:v.integerFromBuffer(this._buffers.childIndex),chainCode:v.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:v.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}},n.fromBuffer=function(t){return new n(t)},n.prototype.toBuffer=function(){return v.copy(this._buffers.xpubkey)},n.Hardened=2147483648,n.RootElementAlias=["m","M"],n.VersionSize=4,n.DepthSize=1,n.ParentFingerPrintSize=4,n.ChildIndexSize=4,n.ChainCodeSize=32,n.PublicKeySize=33,n.CheckSumSize=4,n.DataSize=78,n.SerializedByteSize=82,n.VersionStart=0,n.VersionEnd=n.VersionStart+n.VersionSize,n.DepthStart=n.VersionEnd,n.DepthEnd=n.DepthStart+n.DepthSize,n.ParentFingerPrintStart=n.DepthEnd,n.ParentFingerPrintEnd=n.ParentFingerPrintStart+n.ParentFingerPrintSize,n.ChildIndexStart=n.ParentFingerPrintEnd,n.ChildIndexEnd=n.ChildIndexStart+n.ChildIndexSize,n.ChainCodeStart=n.ChildIndexEnd,n.ChainCodeEnd=n.ChainCodeStart+n.ChainCodeSize,n.PublicKeyStart=n.ChainCodeEnd,n.PublicKeyEnd=n.PublicKeyStart+n.PublicKeySize,n.ChecksumStart=n.PublicKeyEnd,n.ChecksumEnd=n.ChecksumStart+n.CheckSumSize,y(n.PublicKeyEnd===n.DataSize),y(n.ChecksumEnd===n.SerializedByteSize),e.exports=n}).call(this,t("buffer").Buffer)},{"./crypto/bn":6,"./crypto/hash":8,"./crypto/point":9,"./encoding/base58":12,"./encoding/base58check":13,"./errors":17,"./hdprivatekey":19,"./networks":21,"./publickey":24,"./util/buffer":42,"./util/js":43,"./util/preconditions":44,assert:45,buffer:47,lodash:359}],21:[function(t,e,r){"use strict";function n(){}function i(t,e){if(~d.indexOf(t))return t;{if(!e)return p[t];u.isArray(e)||(e=[e])
  ;var r=function(e){return d[n][e]===t};for(var n in d)if(u.any(e,r))return d[n]}}function s(t){var e=new n;return c.defineImmutable(e,{name:t.name,alias:t.alias,pubkeyhash:t.pubkeyhash,privatekey:t.privatekey,scripthash:t.scripthash,xpubkey:t.xpubkey,xprivkey:t.xprivkey}),t.networkMagic&&c.defineImmutable(e,{networkMagic:h.integerAsBuffer(t.networkMagic)}),t.port&&c.defineImmutable(e,{port:t.port}),t.dnsSeeds&&c.defineImmutable(e,{dnsSeeds:t.dnsSeeds}),u.each(e,function(t){u.isUndefined(t)||u.isObject(t)||(p[t]=e)}),d.push(e),e}function o(t){for(var e=0;e<d.length;e++)d[e]===t&&d.splice(e,1);for(var r in p)p[r]===t&&delete p[r]}function a(){b.regtestEnabled=!0}function f(){b.regtestEnabled=!1}var u=t("lodash"),h=t("./util/buffer"),c=t("./util/js"),d=[],p={};n.prototype.toString=function(){return this.name},s({name:"livenet",alias:"mainnet",pubkeyhash:58,privatekey:128,scripthash:50,xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var l=i("livenet");s({name:"testnet",alias:"regtest",pubkeyhash:120,privatekey:239,scripthash:110,xpubkey:70617039,xprivkey:70615956});var b=i("testnet"),g={PORT:18333,NETWORK_MAGIC:h.integerAsBuffer(185665799),DNS_SEEDS:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]};for(var y in g)u.isObject(g[y])||(p[g[y]]=b);var m={PORT:18444,NETWORK_MAGIC:h.integerAsBuffer(4206867930),DNS_SEEDS:[]};for(var y in m)u.isObject(m[y])||(p[m[y]]=b);Object.defineProperty(b,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?m.PORT:g.PORT}}),Object.defineProperty(b,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?m.NETWORK_MAGIC:g.NETWORK_MAGIC}}),Object.defineProperty(b,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?m.DNS_SEEDS:g.DNS_SEEDS}}),e.exports={add:s,remove:o,defaultNetwork:l,livenet:l,mainnet:l,testnet:b,get:i,enableRegtest:a,disableRegtest:f}},{"./util/buffer":42,"./util/js":43,lodash:359}],22:[function(t,e,r){(function(r){"use strict";function n(t){if(!(this instanceof n))return new n(t);var e;if(i.isNumber(t))e=t;else{if(!i.isString(t))throw new TypeError('Unrecognized num type: "'+typeof t+'" for Opcode');e=n.map[t]}return a.defineImmutable(this,{num:e}),this}var i=t("lodash"),s=t("./util/preconditions"),o=t("./util/buffer"),a=t("./util/js");n.fromBuffer=function(t){return s.checkArgument(o.isBuffer(t)),new n(Number("0x"+t.toString("hex")))},n.fromNumber=function(t){return s.checkArgument(i.isNumber(t)),new n(t)},n.fromString=function(t){s.checkArgument(i.isString(t));var e=n.map[t];if(void 0===e)throw new TypeError("Invalid opcodestr");return new n(e)},n.prototype.toHex=function(){return this.num.toString(16)},n.prototype.toBuffer=function(){return new r(this.toHex(),"hex")},n.prototype.toNumber=function(){return this.num},n.prototype.toString=function(){var t=n.reverseMap[this.num];if(void 0===t)throw new Error("Opcode does not have a string representation");return t},n.smallInt=function(t){return s.checkArgument(i.isNumber(t),"Invalid Argument: n should be number"),s.checkArgument(t>=0&&t<=16,"Invalid Argument: n must be between 0 and 16"),0===t?n("OP_0"):new n(n.map.OP_1+t-1)},n.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},n.reverseMap=[];for(var f in n.map)n.reverseMap[n.map[f]]=f;i.extend(n,n.map),n.isSmallIntOp=function(t){return t instanceof n&&(t=t.toNumber()),t===n.map.OP_0||t>=n.map.OP_1&&t<=n.map.OP_16},n.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"},e.exports=n}).call(this,t("buffer").Buffer)},{"./util/buffer":42,"./util/js":43,"./util/preconditions":44,buffer:47,lodash:359}],23:[function(t,e,r){(function(r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(t instanceof n)return t;var r=this._classifyArguments(t,e);if(!r.bn||0===r.bn.cmp(new a(0)))throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(h.getN()))throw new TypeError("Number must be less than N");if(void 0===r.network)throw new TypeError('Must specify the network ("livenet" or "testnet")');return f.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}var i=t("lodash"),s=t("./address"),o=t("./encoding/base58check"),a=t("./crypto/bn"),f=t("./util/js"),u=t("./networks"),h=t("./crypto/point"),c=t("./publickey"),d=t("./crypto/random"),p=t("./util/preconditions");n.prototype._classifyArguments=function(t,e){var s={compressed:!0,network:e?u.get(e):u.defaultNetwork};if(i.isUndefined(t)||i.isNull(t))s.bn=n._getRandomBN();else if(t instanceof a)s.bn=t;else if(t instanceof r||t instanceof Uint8Array)s=n._transformBuffer(t,e);else if(t.bn&&t.network)s=n._transformObject(t);else if(!e&&u.get(t))s.bn=n._getRandomBN(),s.network=u.get(t);else{if("string"!=typeof t)throw new TypeError("First argument is an unrecognized data type.");f.isHexa(t)?s.bn=new a(new r(t,"hex")):s=n._transformWIF(t,e)}return s},n._getRandomBN=function(){var t,e;do{var r=d.getRandomBuffer(32);e=a.fromBuffer(r),t=e.lt(h.getN())}while(!t);return e},n._transformBuffer=function(t,e){var r={};if(32===t.length)return n._transformBNBuffer(t,e);if(r.network=u.get(t[0],"privatekey"),!r.network)throw new Error("Invalid network");if(e&&r.network!==u.get(e))throw new TypeError("Private key network mismatch");if(34===t.length&&1===t[33])r.compressed=!0;else{if(33!==t.length)throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");r.compressed=!1}return r.bn=a.fromBuffer(t.slice(1,33)),r},n._transformBNBuffer=function(t,e){var r={};return r.network=u.get(e)||u.defaultNetwork,r.bn=a.fromBuffer(t),r.compressed=!1,r},n._transformWIF=function(t,e){return n._transformBuffer(o.decode(t),e)},n.fromBuffer=function(t,e){return new n(t,e)},n._transformObject=function(t){return{bn:new a(t.bn,"hex"),network:u.get(t.network),compressed:t.compressed}},n.fromString=n.fromWIF=function(t){return p.checkArgument(i.isString(t),"First argument is expected to be a string."),new n(t)},n.fromObject=function(t){return p.checkArgument(i.isObject(t),"First argument is expected to be an object."),new n(t)},n.fromRandom=function(t){return new n(n._getRandomBN(),t)},n.getValidationError=function(t,e){var r;try{new n(t,e)}catch(t){r=t}return r},n.isValid=function(t,e){return!!t&&!n.getValidationError(t,e)},n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.toWIF=function(){var t,e=this.network,n=this.compressed;return t=n?r.concat([new r([e.privatekey]),this.bn.toBuffer({size:32}),new r([1])]):r.concat([new r([e.privatekey]),this.bn.toBuffer({size:32})]),o.encode(t)},n.prototype.toBigNumber=function(){return this.bn},n.prototype.toBuffer=function(){return this.bn.toBuffer()},n.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()},n.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=c.fromPrivateKey(this)),this._pubkey},n.prototype.toAddress=function(t){var e=this.toPublicKey();return s.fromPublicKey(e,t||this.network)},n.prototype.toObject=n.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}},n.prototype.inspect=function(){var t=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+t+">"},e.exports=n}).call(this,t("buffer").Buffer)},{"./address":1,"./crypto/bn":6,"./crypto/point":9,"./crypto/random":10,"./encoding/base58check":13,"./networks":21,"./publickey":24,"./util/js":43,"./util/preconditions":44,buffer:47,lodash:359}],24:[function(t,e,r){(function(r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(h.checkArgument(t,"First argument is required, please include public key data."),t instanceof n)return t;e=e||{};var r=this._classifyArgs(t,e);return r.point.validate(),a.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||f.defaultNetwork}),this}var i=t("./crypto/bn"),s=t("./crypto/point"),o=t("./crypto/hash"),a=t("./util/js"),f=t("./networks"),u=t("lodash"),h=t("./util/preconditions");n.prototype._classifyArgs=function(t,e){var i={compressed:u.isUndefined(e.compressed)||e.compressed};if(t instanceof s)i.point=t;else if(t.x&&t.y)i=n._transformObject(t);else if("string"==typeof t)i=n._transformDER(new r(t,"hex"));else if(n._isBuffer(t))i=n._transformDER(t);else{if(!n._isPrivateKey(t))throw new TypeError("First argument is an unrecognized data format.");i=n._transformPrivateKey(t)}return i.network||(i.network=u.isUndefined(e.network)?void 0:f.get(e.network)),i},n._isPrivateKey=function(e){return e instanceof t("./privatekey")},n._isBuffer=function(t){return t instanceof r||t instanceof Uint8Array},n._transformPrivateKey=function(t){h.checkArgument(n._isPrivateKey(t),"Must be an instance of PrivateKey");var e={};return e.point=s.getG().mul(t.bn),e.compressed=t.compressed,e.network=t.network,e},n._transformDER=function(t,e){h.checkArgument(n._isBuffer(t),"Must be a hex buffer of DER encoded public key");var r={};e=!!u.isUndefined(e)||e;var o,a,f,c;if(4!==t[0]&&(e||6!==t[0]&&7!==t[0]))if(3===t[0])f=t.slice(1),o=new i(f),r=n._transformX(!0,o),r.compressed=!0;else{if(2!==t[0])throw new TypeError("Invalid DER format public key");f=t.slice(1),o=new i(f),r=n._transformX(!1,o),r.compressed=!0}else{if(f=t.slice(1,33),c=t.slice(33,65),32!==f.length||32!==c.length||65!==t.length)throw new TypeError("Length of x and y must be 32 bytes");o=new i(f),a=new i(c),r.point=new s(o,a),r.compressed=!1}return r},n._transformX=function(t,e){h.checkArgument("boolean"==typeof t,"Must specify whether y is odd or not (true or false)");var r={};return r.point=s.fromX(t,e),r},n._transformObject=function(t){var e=new i(t.x,"hex"),r=new i(t.y,"hex");return new n(new s(e,r),{compressed:t.compressed})},n.fromPrivateKey=function(t){h.checkArgument(n._isPrivateKey(t),"Must be an instance of PrivateKey");var e=n._transformPrivateKey(t);return new n(e.point,{compressed:e.compressed,network:e.network})},n.fromDER=n.fromBuffer=function(t,e){h.checkArgument(n._isBuffer(t),"Must be a hex buffer of DER encoded public key");var r=n._transformDER(t,e);return new n(r.point,{compressed:r.compressed})},n.fromPoint=function(t,e){return h.checkArgument(t instanceof s,"First argument must be an instance of Point."),new n(t,{compressed:e})},n.fromString=function(t,e){var i=new r(t,e||"hex"),s=n._transformDER(i);return new n(s.point,{compressed:s.compressed})},n.fromX=function(t,e){var r=n._transformX(t,e);return new n(r.point,{compressed:r.compressed})},n.getValidationError=function(t){var e;try{new n(t)}catch(t){e=t}return e},n.isValid=function(t){return!n.getValidationError(t)},n.prototype.toObject=n.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},n.prototype.toBuffer=n.prototype.toDER=function(){var t,e=this.point.getX(),n=this.point.getY(),i=e.toBuffer({size:32}),s=n.toBuffer({size:32});if(this.compressed){var o=s[s.length-1]%2;return t=new r(o?[3]:[2]),r.concat([t,i])}return t=new r([4]),r.concat([t,i,s])},n.prototype._getID=function(){return o.sha256ripemd160(this.toBuffer())},n.prototype.toAddress=function(e){return t("./address").fromPublicKey(this,e||this.network)},n.prototype.toString=function(){return this.toDER().toString("hex")},n.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"},e.exports=n}).call(this,t("buffer").Buffer)},{"./address":1,"./crypto/bn":6,"./crypto/hash":8,"./crypto/point":9,"./networks":21,"./privatekey":23,"./util/js":43,"./util/preconditions":44,buffer:47,lodash:359}],25:[function(t,e,r){e.exports=t("./script"),e.exports.Interpreter=t("./interpreter")},{"./interpreter":26,"./script":27}],26:[function(t,e,r){(function(r){"use strict";var n=t("lodash"),i=t("./script"),s=t("../opcode"),o=t("../crypto/bn"),a=t("../crypto/hash"),f=t("../crypto/signature"),u=t("../publickey"),h=function t(e){if(!(this instanceof t))return new t(e);e?(this.initialize(),this.set(e)):this.initialize()};h.prototype.verify=function(e,r,s,o,a){var f=t("../transaction");n.isUndefined(s)&&(s=new f),n.isUndefined(o)&&(o=0),n.isUndefined(a)&&(a=0),this.set({script:e,tx:s,nin:o,flags:a});var u;if(0!=(a&h.SCRIPT_VERIFY_SIGPUSHONLY)&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;a&h.SCRIPT_VERIFY_P2SH&&(u=this.stack.slice());var c=this.stack;if(this.initialize(),this.set({script:r,stack:c,tx:s,nin:o,flags:a}),!this.evaluate())return!1;if(0===this.stack.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var d=this.stack[this.stack.length-1];if(!h.castToBool(d))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;if(a&h.SCRIPT_VERIFY_P2SH&&r.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(0===u.length)throw new Error("internal error - stack copy empty");var p=u[u.length-1],l=i.fromBuffer(p);return u.pop(),this.initialize(),this.set({script:l,stack:u,tx:s,nin:o,flags:a}),!!this.evaluate()&&(0===u.length?(this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1):!!h.castToBool(u[u.length-1])||(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1))}return!0},e.exports=h,h.prototype.initialize=function(t){this.stack=[],this.altstack=[],this.pc=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0},h.prototype.set=function(t){this.script=t.script||this.script,this.tx=t.tx||this.tx,this.nin=void 0!==t.nin?t.nin:this.nin,this.stack=t.stack||this.stack,this.altstack=t.altack||this.altstack,this.pc=void 0!==t.pc?t.pc:this.pc,this.pbegincodehash=void 0!==t.pbegincodehash?t.pbegincodehash:this.pbegincodehash,this.nOpCount=void 0!==t.nOpCount?t.nOpCount:this.nOpCount,this.vfExec=t.vfExec||this.vfExec,this.errstr=t.errstr||this.errstr,this.flags=void 0!==t.flags?t.flags:this.flags},h.true=new r([1]),h.false=new r([]),h.MAX_SCRIPT_ELEMENT_SIZE=520,h.LOCKTIME_THRESHOLD=5e8,h.LOCKTIME_THRESHOLD_BN=new o(h.LOCKTIME_THRESHOLD),h.SCRIPT_VERIFY_NONE=0,h.SCRIPT_VERIFY_P2SH=1,h.SCRIPT_VERIFY_STRICTENC=2,h.SCRIPT_VERIFY_DERSIG=4,h.SCRIPT_VERIFY_LOW_S=8,h.SCRIPT_VERIFY_NULLDUMMY=16,h.SCRIPT_VERIFY_SIGPUSHONLY=32,h.SCRIPT_VERIFY_MINIMALDATA=64,h.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,h.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,h.castToBool=function(t){for(var e=0;e<t.length;e++)if(0!==t[e])return e!==t.length-1||128!==t[e];return!1},h.prototype.checkSignatureEncoding=function(t){var e;if(0!=(this.flags&(h.SCRIPT_VERIFY_DERSIG|h.SCRIPT_VERIFY_LOW_S|h.SCRIPT_VERIFY_STRICTENC))&&!f.isTxDER(t))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(0!=(this.flags&h.SCRIPT_VERIFY_LOW_S)){if(e=f.fromTxFormat(t),!e.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(0!=(this.flags&h.SCRIPT_VERIFY_STRICTENC)&&(e=f.fromTxFormat(t),!e.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0},h.prototype.checkPubkeyEncoding=function(t){return!(0!=(this.flags&h.SCRIPT_VERIFY_STRICTENC)&&!u.isValid(t))||(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1)},h.prototype.evaluate=function(){if(this.script.toBuffer().length>1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){if(!this.step())return!1}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return!(this.vfExec.length>0)||(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1)},h.prototype.checkLockTime=function(t){return!!(this.tx.nLockTime<h.LOCKTIME_THRESHOLD&&t.lt(h.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=h.LOCKTIME_THRESHOLD&&t.gte(h.LOCKTIME_THRESHOLD_BN))&&(!t.gt(new o(this.tx.nLockTime))&&!!this.tx.inputs[this.nin].isFinal())},h.prototype.step=function(){var t,e,r,c,d,p,l,b,g,y,m,v,_,w,S,k,I,A=0!=(this.flags&h.SCRIPT_VERIFY_MINIMALDATA),E=-1===this.vfExec.indexOf(!1),x=this.script.chunks[this.pc];this.pc++;var O=x.opcodenum;if(n.isUndefined(O))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(x.buf&&x.buf.length>h.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(O>s.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(O===s.OP_CAT||O===s.OP_SUBSTR||O===s.OP_LEFT||O===s.OP_RIGHT||O===s.OP_INVERT||O===s.OP_AND||O===s.OP_OR||O===s.OP_XOR||O===s.OP_2MUL||O===s.OP_2DIV||O===s.OP_MUL||O===s.OP_DIV||O===s.OP_MOD||O===s.OP_LSHIFT||O===s.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(E&&0<=O&&O<=s.OP_PUSHDATA4){if(A&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(x.buf){if(x.len!==x.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(x.buf)}else this.stack.push(h.false)}else if(E||s.OP_IF<=O&&O<=s.OP_ENDIF)switch(O){case s.OP_1NEGATE:case s.OP_1:case s.OP_2:case s.OP_3:case s.OP_4:case s.OP_5:case s.OP_6:case s.OP_7:case s.OP_8:case s.OP_9:case s.OP_10:case s.OP_11:case s.OP_12:case s.OP_13:case s.OP_14:case s.OP_15:case s.OP_16:d=O-(s.OP_1-1),t=new o(d).toScriptNumBuffer(),this.stack.push(t);break;case s.OP_NOP:break;case s.OP_NOP2:case s.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&h.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&h.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var P=o.fromScriptNumBuffer(this.stack[this.stack.length-1],A,5);if(P.lt(new o(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(P))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case s.OP_NOP1:case s.OP_NOP3:case s.OP_NOP4:case s.OP_NOP5:case s.OP_NOP6:case s.OP_NOP7:case s.OP_NOP8:case s.OP_NOP9:case s.OP_NOP10:if(this.flags&h.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case s.OP_IF:case s.OP_NOTIF:if(k=!1,E){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;t=this.stack.pop(),k=h.castToBool(t),O===s.OP_NOTIF&&(k=!k)}this.vfExec.push(k);break;case s.OP_ELSE:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1];break;case s.OP_ENDIF:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop();break;case s.OP_VERIFY:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(t=this.stack[this.stack.length-1],!(k=h.castToBool(t)))return this.errstr="SCRIPT_ERR_VERIFY",!1;this.stack.pop();break;case s.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case s.OP_TOALTSTACK:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop());break;case s.OP_FROMALTSTACK:if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop());break;case s.OP_2DROP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case s.OP_2DUP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;e=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],this.stack.push(e),this.stack.push(r);break;case s.OP_3DUP:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;e=this.stack[this.stack.length-3],r=this.stack[this.stack.length-2];var B=this.stack[this.stack.length-1];this.stack.push(e),this.stack.push(r),this.stack.push(B);break;case s.OP_2OVER:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;e=this.stack[this.stack.length-4],r=this.stack[this.stack.length-3],this.stack.push(e),this.stack.push(r);break;case s.OP_2ROT:if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;c=this.stack.splice(this.stack.length-6,2),this.stack.push(c[0]),this.stack.push(c[1]);break;case s.OP_2SWAP:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;c=this.stack.splice(this.stack.length-4,2),this.stack.push(c[0]),this.stack.push(c[1]);break;case s.OP_IFDUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;t=this.stack[this.stack.length-1],k=h.castToBool(t),k&&this.stack.push(t);break;case s.OP_DEPTH:t=new o(this.stack.length).toScriptNumBuffer(),this.stack.push(t);break;case s.OP_DROP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case s.OP_DUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1]);break;case s.OP_NIP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case s.OP_OVER:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2]);break;case s.OP_PICK:case s.OP_ROLL:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(t=this.stack[this.stack.length-1],b=o.fromScriptNumBuffer(t,A),d=b.toNumber(),this.stack.pop(),d<0||d>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;t=this.stack[this.stack.length-d-1],O===s.OP_ROLL&&this.stack.splice(this.stack.length-d-1,1),this.stack.push(t);break;case s.OP_ROT:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-3],l=this.stack[this.stack.length-2];var M=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=l,this.stack[this.stack.length-2]=M,this.stack[this.stack.length-1]=p;break;case s.OP_SWAP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;p=this.stack[this.stack.length-2],l=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=l,this.stack[this.stack.length-1]=p;break;case s.OP_TUCK:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1]);break;case s.OP_SIZE:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;b=new o(this.stack[this.stack.length-1].length),this.stack.push(b.toScriptNumBuffer());break;case s.OP_EQUAL:case s.OP_EQUALVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;e=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1];var R=e.toString("hex")===r.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(R?h.true:h.false),O===s.OP_EQUALVERIFY){if(!R)return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1;this.stack.pop()}break;case s.OP_1ADD:case s.OP_1SUB:case s.OP_NEGATE:case s.OP_ABS:case s.OP_NOT:case s.OP_0NOTEQUAL:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(t=this.stack[this.stack.length-1],b=o.fromScriptNumBuffer(t,A),O){case s.OP_1ADD:b=b.add(o.One);break;case s.OP_1SUB:b=b.sub(o.One);break;case s.OP_NEGATE:b=b.neg();break;case s.OP_ABS:b.cmp(o.Zero)<0&&(b=b.neg());break;case s.OP_NOT:b=new o((0===b.cmp(o.Zero))+0);break;case s.OP_0NOTEQUAL:b=new o((0!==b.cmp(o.Zero))+0)}this.stack.pop(),this.stack.push(b.toScriptNumBuffer());break;case s.OP_ADD:case s.OP_SUB:case s.OP_BOOLAND:case s.OP_BOOLOR:case s.OP_NUMEQUAL:case s.OP_NUMEQUALVERIFY:case s.OP_NUMNOTEQUAL:case s.OP_LESSTHAN:case s.OP_GREATERTHAN:case s.OP_LESSTHANOREQUAL:case s.OP_GREATERTHANOREQUAL:case s.OP_MIN:case s.OP_MAX:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(g=o.fromScriptNumBuffer(this.stack[this.stack.length-2],A),y=o.fromScriptNumBuffer(this.stack[this.stack.length-1],A),b=new o(0),O){case s.OP_ADD:b=g.add(y);break;case s.OP_SUB:b=g.sub(y);break;case s.OP_BOOLAND:b=new o((0!==g.cmp(o.Zero)&&0!==y.cmp(o.Zero))+0);break;case s.OP_BOOLOR:b=new o((0!==g.cmp(o.Zero)||0!==y.cmp(o.Zero))+0);break;case s.OP_NUMEQUAL:case s.OP_NUMEQUALVERIFY:b=new o((0===g.cmp(y))+0);break;case s.OP_NUMNOTEQUAL:b=new o((0!==g.cmp(y))+0);break;case s.OP_LESSTHAN:b=new o((g.cmp(y)<0)+0);break;case s.OP_GREATERTHAN:b=new o((g.cmp(y)>0)+0);break;case s.OP_LESSTHANOREQUAL:b=new o((g.cmp(y)<=0)+0);break;case s.OP_GREATERTHANOREQUAL:b=new o((g.cmp(y)>=0)+0);break;case s.OP_MIN:b=g.cmp(y)<0?g:y;break;case s.OP_MAX:b=g.cmp(y)>0?g:y}if(this.stack.pop(),this.stack.pop(),this.stack.push(b.toScriptNumBuffer()),O===s.OP_NUMEQUALVERIFY){if(!h.castToBool(this.stack[this.stack.length-1]))return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1;this.stack.pop()}break;case s.OP_WITHIN:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;g=o.fromScriptNumBuffer(this.stack[this.stack.length-3],A),y=o.fromScriptNumBuffer(this.stack[this.stack.length-2],A);var T=o.fromScriptNumBuffer(this.stack[this.stack.length-1],A);k=y.cmp(g)<=0&&g.cmp(T)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(k?h.true:h.false);break;case s.OP_RIPEMD160:case s.OP_SHA1:case s.OP_SHA256:case s.OP_HASH160:case s.OP_HASH256:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;t=this.stack[this.stack.length-1];var N;O===s.OP_RIPEMD160?N=a.ripemd160(t):O===s.OP_SHA1?N=a.sha1(t):O===s.OP_SHA256?N=a.sha256(t):O===s.OP_HASH160?N=a.sha256ripemd160(t):O===s.OP_HASH256&&(N=a.sha256sha256(t)),this.stack.pop(),this.stack.push(N);break;case s.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case s.OP_CHECKSIG:case s.OP_CHECKSIGVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=this.stack[this.stack.length-2],v=this.stack[this.stack.length-1],_=(new i).set({chunks:this.script.chunks.slice(this.pbegincodehash)});var C=(new i).add(m);if(_.findAndDelete(C),!this.checkSignatureEncoding(m)||!this.checkPubkeyEncoding(v))return!1;try{w=f.fromTxFormat(m),S=u.fromBuffer(v,!1),I=this.tx.verifySignature(w,S,this.nin,_)}catch(t){I=!1}if(this.stack.pop(),this.stack.pop(),this.stack.push(I?h.true:h.false),O===s.OP_CHECKSIGVERIFY){if(!I)return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1;this.stack.pop()}break;case s.OP_CHECKMULTISIG:case s.OP_CHECKMULTISIGVERIFY:var j=1;if(this.stack.length<j)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var U=o.fromScriptNumBuffer(this.stack[this.stack.length-j],A).toNumber();if(U<0||U>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=U,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var L=++j;if(j+=U,this.stack.length<j)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var D=o.fromScriptNumBuffer(this.stack[this.stack.length-j],A).toNumber();if(D<0||D>U)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var z=++j;if(j+=D,this.stack.length<j)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;_=(new i).set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var H=0;H<D;H++)m=this.stack[this.stack.length-z-H],_.findAndDelete((new i).add(m));for(I=!0;I&&D>0;){if(m=this.stack[this.stack.length-z],v=this.stack[this.stack.length-L],!this.checkSignatureEncoding(m)||!this.checkPubkeyEncoding(v))return!1;var F;try{w=f.fromTxFormat(m),S=u.fromBuffer(v,!1),F=this.tx.verifySignature(w,S,this.nin,_)}catch(t){F=!1}F&&(z++,D--),L++,U--,D>U&&(I=!1)}for(;j-- >1;)this.stack.pop();if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&h.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(I?h.true:h.false),O===s.OP_CHECKMULTISIGVERIFY){if(!I)return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;this.stack.pop()}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"../crypto/hash":8,"../crypto/signature":11,"../opcode":22,"../publickey":24,"../transaction":28,"./script":27,buffer:47,lodash:359}],27:[function(t,e,r){(function(r){"use strict";var n=t("../address"),i=t("../encoding/bufferreader"),s=t("../encoding/bufferwriter"),o=t("../crypto/hash"),a=t("../opcode"),f=t("../publickey"),u=t("../crypto/signature"),h=t("../networks"),c=t("../util/preconditions"),d=t("lodash"),p=t("../errors"),l=t("buffer"),b=t("../util/buffer"),g=t("../util/js"),y=function t(e){return this instanceof t?(this.chunks=[],b.isBuffer(e)?t.fromBuffer(e):e instanceof n?t.fromAddress(e):e instanceof t?t.fromBuffer(e.toBuffer()):"string"==typeof e?t.fromString(e):void(void 0!==e&&this.set(e))):new t(e)};y.prototype.set=function(t){return this.chunks=t.chunks||this.chunks,this},y.fromBuffer=function(t){var e=new y;e.chunks=[];for(var r=new i(t);!r.finished();)try{var n,s,o=r.readUInt8();o>0&&o<a.OP_PUSHDATA1?(n=o,e.chunks.push({buf:r.read(n),len:n,opcodenum:o})):o===a.OP_PUSHDATA1?(n=r.readUInt8(),s=r.read(n),e.chunks.push({buf:s,len:n,opcodenum:o})):o===a.OP_PUSHDATA2?(n=r.readUInt16LE(),s=r.read(n),e.chunks.push({buf:s,len:n,opcodenum:o})):o===a.OP_PUSHDATA4?(n=r.readUInt32LE(),s=r.read(n),e.chunks.push({buf:s,len:n,opcodenum:o})):e.chunks.push({opcodenum:o})}catch(e){if(e instanceof RangeError)throw new p.Script.InvalidBuffer(t.toString("hex"));throw e}return e},y.prototype.toBuffer=function(){for(var t=new s,e=0;e<this.chunks.length;e++){var r=this.chunks[e],n=r.opcodenum;t.writeUInt8(r.opcodenum),r.buf&&(n<a.OP_PUSHDATA1?t.write(r.buf):n===a.OP_PUSHDATA1?(t.writeUInt8(r.len),t.write(r.buf)):n===a.OP_PUSHDATA2?(t.writeUInt16LE(r.len),t.write(r.buf)):n===a.OP_PUSHDATA4&&(t.writeUInt32LE(r.len),t.write(r.buf)))}return t.concat()},y.fromASM=function(t){var e=new y;e.chunks=[];for(var n=t.split(" "),i=0;i<n.length;){var s=n[i],o=a(s),f=o.toNumber();if(d.isUndefined(f)){var u=new r(n[i],"hex");e.chunks.push({buf:u,len:u.length,opcodenum:u.length}),i+=1}else f===a.OP_PUSHDATA1||f===a.OP_PUSHDATA2||f===a.OP_PUSHDATA4?(e.chunks.push({buf:new r(n[i+2],"hex"),len:parseInt(n[i+1]),opcodenum:f}),i+=3):(e.chunks.push({opcodenum:f}),i+=1)}return e},y.fromHex=function(t){return new y(new l.Buffer(t,"hex"))},
  y.fromString=function(t){if(g.isHexa(t)||0===t.length)return new y(new l.Buffer(t,"hex"));var e=new y;e.chunks=[];for(var n=t.split(" "),i=0;i<n.length;){var s=n[i],o=a(s),f=o.toNumber();if(d.isUndefined(f)){if(!((f=parseInt(s))>0&&f<a.OP_PUSHDATA1))throw new Error("Invalid script: "+JSON.stringify(t));e.chunks.push({buf:new r(n[i+1].slice(2),"hex"),len:f,opcodenum:f}),i+=2}else if(f===a.OP_PUSHDATA1||f===a.OP_PUSHDATA2||f===a.OP_PUSHDATA4){if("0x"!==n[i+2].slice(0,2))throw new Error("Pushdata data must start with 0x");e.chunks.push({buf:new r(n[i+2].slice(2),"hex"),len:parseInt(n[i+1]),opcodenum:f}),i+=3}else e.chunks.push({opcodenum:f}),i+=1}return e},y.prototype._chunkToString=function(t,e){var r=t.opcodenum,n="asm"===e,i="";if(t.buf)r!==a.OP_PUSHDATA1&&r!==a.OP_PUSHDATA2&&r!==a.OP_PUSHDATA4||(i=i+" "+a(r).toString()),t.len>0&&(i=n?i+" "+t.buf.toString("hex"):i+" "+t.len+" 0x"+t.buf.toString("hex"));else if(void 0!==a.reverseMap[r])i=i+" "+a(r).toString();else{var s=r.toString(16);s.length%2!=0&&(s="0"+s),i=n?i+" "+s:i+" 0x"+s}return i},y.prototype.toASM=function(){for(var t="",e=0;e<this.chunks.length;e++){var r=this.chunks[e];t+=this._chunkToString(r,"asm")}return t.substr(1)},y.prototype.toString=function(){for(var t="",e=0;e<this.chunks.length;e++){var r=this.chunks[e];t+=this._chunkToString(r)}return t.substr(1)},y.prototype.toHex=function(){return this.toBuffer().toString("hex")},y.prototype.inspect=function(){return"<Script: "+this.toString()+">"},y.prototype.isPublicKeyHashOut=function(){return!(5!==this.chunks.length||this.chunks[0].opcodenum!==a.OP_DUP||this.chunks[1].opcodenum!==a.OP_HASH160||!this.chunks[2].buf||20!==this.chunks[2].buf.length||this.chunks[3].opcodenum!==a.OP_EQUALVERIFY||this.chunks[4].opcodenum!==a.OP_CHECKSIG)},y.prototype.isPublicKeyHashIn=function(){if(2===this.chunks.length){var t=this.chunks[0].buf,e=this.chunks[1].buf;if(t&&t.length&&48===t[0]&&e&&e.length){var r=e[0];if((4===r||6===r||7===r)&&65===e.length)return!0;if((3===r||2===r)&&33===e.length)return!0}}return!1},y.prototype.getPublicKey=function(){return c.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf},y.prototype.getPublicKeyHash=function(){return c.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf},y.prototype.isPublicKeyOut=function(){if(2===this.chunks.length&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===a.OP_CHECKSIG){var t=this.chunks[0].buf,e=t[0],r=!1;if(4!==e&&6!==e&&7!==e||65!==t.length?3!==e&&2!==e||33!==t.length||(r=!0):r=!0,r)return f.isValid(t)}return!1},y.prototype.isPublicKeyIn=function(){if(1===this.chunks.length){var t=this.chunks[0].buf;if(t&&t.length&&48===t[0])return!0}return!1},y.prototype.isScriptHashOut=function(){var t=this.toBuffer();return 23===t.length&&t[0]===a.OP_HASH160&&20===t[1]&&t[t.length-1]===a.OP_EQUAL},y.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var t=this.chunks[this.chunks.length-1],e=t.buf;if(!e)return!1;var r;try{r=y.fromBuffer(e)}catch(t){if(t instanceof p.Script.InvalidBuffer)return!1;throw t}return r.classify()!==y.types.UNKNOWN},y.prototype.isMultisigOut=function(){return this.chunks.length>3&&a.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(t){return t.buf&&b.isBuffer(t.buf)})&&a.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===a.OP_CHECKMULTISIG},y.prototype.isMultisigIn=function(){return this.chunks.length>=2&&0===this.chunks[0].opcodenum&&this.chunks.slice(1,this.chunks.length).every(function(t){return t.buf&&b.isBuffer(t.buf)&&u.isTxDER(t.buf)})},y.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===a.OP_RETURN&&(1===this.chunks.length||2===this.chunks.length&&this.chunks[1].buf&&this.chunks[1].buf.length<=y.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)},y.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut())return new r(d.isUndefined(this.chunks[1])?0:this.chunks[1].buf);if(this.isPublicKeyHashOut())return new r(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")},y.prototype.isPushOnly=function(){return d.every(this.chunks,function(t){return t.opcodenum<=a.OP_16})},y.types={},y.types.UNKNOWN="Unknown",y.types.PUBKEY_OUT="Pay to public key",y.types.PUBKEY_IN="Spend from public key",y.types.PUBKEYHASH_OUT="Pay to public key hash",y.types.PUBKEYHASH_IN="Spend from public key hash",y.types.SCRIPTHASH_OUT="Pay to script hash",y.types.SCRIPTHASH_IN="Spend from script hash",y.types.MULTISIG_OUT="Pay to multisig",y.types.MULTISIG_IN="Spend from multisig",y.types.DATA_OUT="Data push",y.OP_RETURN_STANDARD_SIZE=80,y.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var t=this.classifyOutput();return t!=y.types.UNKNOWN?t:this.classifyInput()},y.outputIdentifiers={},y.outputIdentifiers.PUBKEY_OUT=y.prototype.isPublicKeyOut,y.outputIdentifiers.PUBKEYHASH_OUT=y.prototype.isPublicKeyHashOut,y.outputIdentifiers.MULTISIG_OUT=y.prototype.isMultisigOut,y.outputIdentifiers.SCRIPTHASH_OUT=y.prototype.isScriptHashOut,y.outputIdentifiers.DATA_OUT=y.prototype.isDataOut,y.prototype.classifyOutput=function(){for(var t in y.outputIdentifiers)if(y.outputIdentifiers[t].bind(this)())return y.types[t];return y.types.UNKNOWN},y.inputIdentifiers={},y.inputIdentifiers.PUBKEY_IN=y.prototype.isPublicKeyIn,y.inputIdentifiers.PUBKEYHASH_IN=y.prototype.isPublicKeyHashIn,y.inputIdentifiers.MULTISIG_IN=y.prototype.isMultisigIn,y.inputIdentifiers.SCRIPTHASH_IN=y.prototype.isScriptHashIn,y.prototype.classifyInput=function(){for(var t in y.inputIdentifiers)if(y.inputIdentifiers[t].bind(this)())return y.types[t];return y.types.UNKNOWN},y.prototype.isStandard=function(){return this.classify()!==y.types.UNKNOWN},y.prototype.prepend=function(t){return this._addByType(t,!0),this},y.prototype.equals=function(t){if(c.checkState(t instanceof y,"Must provide another script"),this.chunks.length!==t.chunks.length)return!1;var e;for(e=0;e<this.chunks.length;e++){if(b.isBuffer(this.chunks[e].buf)&&!b.isBuffer(t.chunks[e].buf))return!1;if(b.isBuffer(this.chunks[e].buf)&&!b.equals(this.chunks[e].buf,t.chunks[e].buf))return!1;if(this.chunks[e].opcodenum!==t.chunks[e].opcodenum)return!1}return!0},y.prototype.add=function(t){return this._addByType(t,!1),this},y.prototype._addByType=function(t,e){if("string"==typeof t)this._addOpcode(t,e);else if("number"==typeof t)this._addOpcode(t,e);else if(t instanceof a)this._addOpcode(t,e);else if(b.isBuffer(t))this._addBuffer(t,e);else if(t instanceof y)this.chunks=this.chunks.concat(t.chunks);else{if("object"!=typeof t)throw new Error("Invalid script chunk");this._insertAtPosition(t,e)}},y.prototype._insertAtPosition=function(t,e){e?this.chunks.unshift(t):this.chunks.push(t)},y.prototype._addOpcode=function(t,e){var r;return r="number"==typeof t?t:t instanceof a?t.toNumber():a(t).toNumber(),this._insertAtPosition({opcodenum:r},e),this},y.prototype._addBuffer=function(t,e){var r,n=t.length;if(n>=0&&n<a.OP_PUSHDATA1)r=n;else if(n<Math.pow(2,8))r=a.OP_PUSHDATA1;else if(n<Math.pow(2,16))r=a.OP_PUSHDATA2;else{if(!(n<Math.pow(2,32)))throw new Error("You can't push that much data");r=a.OP_PUSHDATA4}return this._insertAtPosition({buf:t,len:n,opcodenum:r},e),this},y.prototype.removeCodeseparators=function(){for(var t=[],e=0;e<this.chunks.length;e++)this.chunks[e].opcodenum!==a.OP_CODESEPARATOR&&t.push(this.chunks[e]);return this.chunks=t,this},y.buildMultisigOut=function(t,e,r){c.checkArgument(e<=t.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var n=new y;n.add(a.smallInt(e)),t=d.map(t,f);var i=t;r.noSorting||(i=d.sortBy(t,function(t){return t.toString("hex")}));for(var s=0;s<i.length;s++){var o=i[s];n.add(o.toBuffer())}return n.add(a.smallInt(t.length)),n.add(a.OP_CHECKMULTISIG),n},y.buildMultisigIn=function(t,e,r,n){c.checkArgument(d.isArray(t)),c.checkArgument(d.isNumber(e)),c.checkArgument(d.isArray(r)),n=n||{};var i=new y;return i.add(a.OP_0),d.each(r,function(t){c.checkArgument(b.isBuffer(t),"Signatures must be an array of Buffers"),i.add(t)}),i},y.buildP2SHMultisigIn=function(t,e,r,n){c.checkArgument(d.isArray(t)),c.checkArgument(d.isNumber(e)),c.checkArgument(d.isArray(r)),n=n||{};var i=new y;return i.add(a.OP_0),d.each(r,function(t){c.checkArgument(b.isBuffer(t),"Signatures must be an array of Buffers"),i.add(t)}),i.add((n.cachedMultisig||y.buildMultisigOut(t,e,n)).toBuffer()),i},y.buildPublicKeyHashOut=function(t){c.checkArgument(!d.isUndefined(t)),c.checkArgument(t instanceof f||t instanceof n||d.isString(t)),t instanceof f?t=t.toAddress():d.isString(t)&&(t=new n(t));var e=new y;return e.add(a.OP_DUP).add(a.OP_HASH160).add(t.hashBuffer).add(a.OP_EQUALVERIFY).add(a.OP_CHECKSIG),e._network=t.network,e},y.buildPublicKeyOut=function(t){c.checkArgument(t instanceof f);var e=new y;return e.add(t.toBuffer()).add(a.OP_CHECKSIG),e},y.buildDataOut=function(t,e){c.checkArgument(d.isUndefined(t)||d.isString(t)||b.isBuffer(t)),d.isString(t)&&(t=new r(t,e));var n=new y;return n.add(a.OP_RETURN),d.isUndefined(t)||n.add(t),n},y.buildScriptHashOut=function(t){c.checkArgument(t instanceof y||t instanceof n&&t.isPayToScriptHash());var e=new y;return e.add(a.OP_HASH160).add(t instanceof n?t.hashBuffer:o.sha256ripemd160(t.toBuffer())).add(a.OP_EQUAL),e._network=t._network||t.network,e},y.buildPublicKeyIn=function(t,e){c.checkArgument(t instanceof u||b.isBuffer(t)),c.checkArgument(d.isUndefined(e)||d.isNumber(e)),t instanceof u&&(t=t.toBuffer());var r=new y;return r.add(b.concat([t,b.integerAsSingleByteBuffer(e||u.SIGHASH_ALL)])),r},y.buildPublicKeyHashIn=function(t,e,r){return c.checkArgument(e instanceof u||b.isBuffer(e)),c.checkArgument(d.isUndefined(r)||d.isNumber(r)),e instanceof u&&(e=e.toBuffer()),(new y).add(b.concat([e,b.integerAsSingleByteBuffer(r||u.SIGHASH_ALL)])).add(new f(t).toBuffer())},y.empty=function(){return new y},y.prototype.toScriptHashOut=function(){return y.buildScriptHashOut(this)},y.fromAddress=function(t){if(t=n(t),t.isPayToScriptHash())return y.buildScriptHashOut(t);if(t.isPayToPublicKeyHash())return y.buildPublicKeyHashOut(t);throw new p.Script.UnrecognizedAddress(t)},y.prototype.getAddressInfo=function(t){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var e=this._getOutputAddressInfo();return e||this._getInputAddressInfo()},y.prototype._getOutputAddressInfo=function(){var t={};if(this.isScriptHashOut())t.hashBuffer=this.getData(),t.type=n.PayToScriptHash;else{if(!this.isPublicKeyHashOut())return!1;t.hashBuffer=this.getData(),t.type=n.PayToPublicKeyHash}return t},y.prototype._getInputAddressInfo=function(){var t={};if(this.isPublicKeyHashIn())t.hashBuffer=o.sha256ripemd160(this.chunks[1].buf),t.type=n.PayToPublicKeyHash;else{if(!this.isScriptHashIn())return!1;t.hashBuffer=o.sha256ripemd160(this.chunks[this.chunks.length-1].buf),t.type=n.PayToScriptHash}return t},y.prototype.toAddress=function(t){var e=this.getAddressInfo();return!!e&&(e.network=h.get(t)||this._network||h.defaultNetwork,new n(e))},y.prototype.findAndDelete=function(t){for(var e=t.toBuffer(),r=e.toString("hex"),n=0;n<this.chunks.length;n++){r===y({chunks:[this.chunks[n]]}).toBuffer().toString("hex")&&this.chunks.splice(n,1)}return this},y.prototype.checkMinimalPush=function(t){var e=this.chunks[t],r=e.buf,n=e.opcodenum;return!r||(0===r.length?n===a.OP_0:1===r.length&&r[0]>=1&&r[0]<=16?n===a.OP_1+(r[0]-1):1===r.length&&129===r[0]?n===a.OP_1NEGATE:r.length<=75?n===r.length:r.length<=255?n===a.OP_PUSHDATA1:!(r.length<=65535)||n===a.OP_PUSHDATA2)},y.prototype._decodeOP_N=function(t){if(t===a.OP_0)return 0;if(t>=a.OP_1&&t<=a.OP_16)return t-(a.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(t))},y.prototype.getSignatureOperationsCount=function(t){t=!!d.isUndefined(t)||t;var e=this,r=0,n=a.OP_INVALIDOPCODE;return d.each(e.chunks,function(i){var s=i.opcodenum;s==a.OP_CHECKSIG||s==a.OP_CHECKSIGVERIFY?r++:s!=a.OP_CHECKMULTISIG&&s!=a.OP_CHECKMULTISIGVERIFY||(t&&n>=a.OP_1&&n<=a.OP_16?r+=e._decodeOP_N(n):r+=20),n=s}),r},e.exports=y}).call(this,t("buffer").Buffer)},{"../address":1,"../crypto/hash":8,"../crypto/signature":11,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../errors":17,"../networks":21,"../opcode":22,"../publickey":24,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,buffer:47,lodash:359}],28:[function(t,e,r){e.exports=t("./transaction"),e.exports.Input=t("./input"),e.exports.Output=t("./output"),e.exports.UnspentOutput=t("./unspentoutput"),e.exports.Signature=t("./signature"),e.exports.Sighash=t("./sighash")},{"./input":29,"./output":35,"./sighash":36,"./signature":37,"./transaction":38,"./unspentoutput":39}],29:[function(t,e,r){e.exports=t("./input"),e.exports.PublicKey=t("./publickey"),e.exports.PublicKeyHash=t("./publickeyhash"),e.exports.MultiSig=t("./multisig.js"),e.exports.MultiSigScriptHash=t("./multisigscripthash.js")},{"./input":30,"./multisig.js":31,"./multisigscripthash.js":32,"./publickey":33,"./publickeyhash":34}],30:[function(t,e,r){"use strict";function n(t){return this instanceof n?t?this._fromObject(t):void 0:new n(t)}var i=t("lodash"),s=t("../../util/preconditions"),o=t("../../errors"),a=t("../../encoding/bufferwriter"),f=t("buffer"),u=t("../../util/buffer"),h=t("../../util/js"),c=t("../../script"),d=t("../sighash"),p=t("../output");n.MAXINT=4294967295,n.DEFAULT_SEQNUMBER=4294967295,n.DEFAULT_LOCKTIME_SEQNUMBER=4294967294,n.DEFAULT_RBF_SEQNUMBER=4294967293,Object.defineProperty(n.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new c(this._scriptBuffer),this._script._isInput=!0),this._script)}}),n.fromObject=function(t){return s.checkArgument(i.isObject(t)),(new n)._fromObject(t)},n.prototype._fromObject=function(t){var e;if(e=i.isString(t.prevTxId)&&h.isHexa(t.prevTxId)?new f.Buffer(t.prevTxId,"hex"):t.prevTxId,this.output=t.output?t.output instanceof p?t.output:new p(t.output):void 0,this.prevTxId=e||t.txidbuf,this.outputIndex=i.isUndefined(t.outputIndex)?t.txoutnum:t.outputIndex,this.sequenceNumber=i.isUndefined(t.sequenceNumber)?i.isUndefined(t.seqnum)?4294967295:t.seqnum:t.sequenceNumber,i.isUndefined(t.script)&&i.isUndefined(t.scriptBuffer))throw new o.Transaction.Input.MissingScript;return this.setScript(t.scriptBuffer||t.script),this},n.prototype.toObject=n.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t},n.fromBufferReader=function(t){var e=new n;return e.prevTxId=t.readReverse(32),e.outputIndex=t.readUInt32LE(),e._scriptBuffer=t.readVarLengthBuffer(),e.sequenceNumber=t.readUInt32LE(),e},n.prototype.toBufferWriter=function(t){t||(t=new a),t.writeReverse(this.prevTxId),t.writeUInt32LE(this.outputIndex);var e=this._scriptBuffer;return t.writeVarintNum(e.length),t.write(e),t.writeUInt32LE(this.sequenceNumber),t},n.prototype.setScript=function(t){if(this._script=null,t instanceof c)this._script=t,this._script._isInput=!0,this._scriptBuffer=t.toBuffer();else if(h.isHexa(t))this._scriptBuffer=new f.Buffer(t,"hex");else if(i.isString(t))this._script=new c(t),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else{if(!u.isBuffer(t))throw new TypeError("Invalid argument type: script");this._scriptBuffer=new f.Buffer(t)}return this},n.prototype.getSignatures=function(){throw new o.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))},n.prototype.isFullySigned=function(){throw new o.AbstractMethodInvoked("Input#isFullySigned")},n.prototype.isFinal=function(){return 4294967295!==this.sequenceNumber},n.prototype.addSignature=function(){throw new o.AbstractMethodInvoked("Input#addSignature")},n.prototype.clearSignatures=function(){throw new o.AbstractMethodInvoked("Input#clearSignatures")},n.prototype.isValidSignature=function(t,e){return e.signature.nhashtype=e.sigtype,d.verify(t,e.signature,e.publicKey,e.inputIndex,this.output.script)},n.prototype.isNull=function(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.prevTxId.toString("hex")&&4294967295===this.outputIndex},n.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length},e.exports=n},{"../../encoding/bufferwriter":15,"../../errors":17,"../../script":25,"../../util/buffer":42,"../../util/js":43,"../../util/preconditions":44,"../output":35,"../sighash":36,buffer:47,lodash:359}],31:[function(t,e,r){"use strict";function n(t,e,r,n){o.apply(this,arguments);var s=this;e=e||t.publicKeys,r=r||t.threshold,n=n||t.signatures,this.publicKeys=i.sortBy(e,function(t){return t.toString("hex")}),f.checkState(u.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},i.each(this.publicKeys,function(t,e){s.publicKeyIndex[t.toString()]=e}),this.threshold=r,this.signatures=n?this._deserializeSignatures(n):new Array(this.publicKeys.length)}var i=t("lodash"),s=t("inherits"),o=(t("../transaction"),t("./input")),a=t("../output"),f=t("../../util/preconditions"),u=t("../../script"),h=t("../../crypto/signature"),c=t("../sighash"),d=(t("../../publickey"),t("../../util/buffer")),p=t("../signature");s(n,o),n.prototype.toObject=function(){var t=o.prototype.toObject.apply(this,arguments);return t.threshold=this.threshold,t.publicKeys=i.map(this.publicKeys,function(t){return t.toString()}),t.signatures=this._serializeSignatures(),t},n.prototype._deserializeSignatures=function(t){return i.map(t,function(t){if(t)return new p(t)})},n.prototype._serializeSignatures=function(){return i.map(this.signatures,function(t){if(t)return t.toObject()})},n.prototype.getSignatures=function(t,e,r,n){f.checkState(this.output instanceof a),n=n||h.SIGHASH_ALL;var s=this,o=[];return i.each(this.publicKeys,function(i){i.toString()===e.publicKey.toString()&&o.push(new p({publicKey:e.publicKey,prevTxId:s.prevTxId,outputIndex:s.outputIndex,inputIndex:r,signature:c.sign(t,e,n,r,s.output.script),sigtype:n}))}),o},n.prototype.addSignature=function(t,e){return f.checkState(!this.isFullySigned(),"All needed signatures have already been added"),f.checkArgument(!i.isUndefined(this.publicKeyIndex[e.publicKey.toString()]),"Signature has no matching public key"),f.checkState(this.isValidSignature(t,e)),this.signatures[this.publicKeyIndex[e.publicKey.toString()]]=e,this._updateScript(),this},n.prototype._updateScript=function(){return this.setScript(u.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this},n.prototype._createSignatures=function(){return i.map(i.filter(this.signatures,function(t){return!i.isUndefined(t)}),function(t){return d.concat([t.signature.toDER(),d.integerAsSingleByteBuffer(t.sigtype)])})},n.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()},n.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},n.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},n.prototype.countSignatures=function(){return i.reduce(this.signatures,function(t,e){return t+!!e},0)},n.prototype.publicKeysWithoutSignature=function(){var t=this;return i.filter(this.publicKeys,function(e){return!t.signatures[t.publicKeyIndex[e.toString()]]})},n.prototype.isValidSignature=function(t,e){return e.signature.nhashtype=e.sigtype,c.verify(t,e.signature,e.publicKey,e.inputIndex,this.output.script)},n.normalizeSignatures=function(t,e,r,n,i){return i.map(function(i){var s=null;return n=n.filter(function(n){if(s)return!0;var o=new p({signature:h.fromTxFormat(n),publicKey:i,prevTxId:e.prevTxId,outputIndex:e.outputIndex,inputIndex:r,sigtype:h.SIGHASH_ALL});return o.signature.nhashtype=o.sigtype,!c.verify(t,o.signature,o.publicKey,o.inputIndex,e.output.script)||(s=o,!1)}),s||null})},n.OPCODES_SIZE=1,n.SIGNATURE_SIZE=73,n.prototype._estimateSize=function(){return n.OPCODES_SIZE+this.threshold*n.SIGNATURE_SIZE},e.exports=n},{"../../crypto/signature":11,"../../publickey":24,"../../script":25,"../../util/buffer":42,"../../util/preconditions":44,"../output":35,"../sighash":36,"../signature":37,"../transaction":38,"./input":30,inherits:358,lodash:359}],32:[function(t,e,r){"use strict";function n(t,e,r,n){o.apply(this,arguments);var s=this;e=e||t.publicKeys,r=r||t.threshold,n=n||t.signatures,this.publicKeys=i.sortBy(e,function(t){return t.toString("hex")}),this.redeemScript=u.buildMultisigOut(this.publicKeys,r),f.checkState(u.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output"),this.publicKeyIndex={},i.each(this.publicKeys,function(t,e){s.publicKeyIndex[t.toString()]=e}),this.threshold=r,this.signatures=n?this._deserializeSignatures(n):new Array(this.publicKeys.length)}var i=t("lodash"),s=t("inherits"),o=t("./input"),a=t("../output"),f=t("../../util/preconditions"),u=t("../../script"),h=t("../../crypto/signature"),c=t("../sighash"),d=(t("../../publickey"),t("../../util/buffer")),p=t("../signature");s(n,o),n.prototype.toObject=function(){var t=o.prototype.toObject.apply(this,arguments);return t.threshold=this.threshold,t.publicKeys=i.map(this.publicKeys,function(t){return t.toString()}),t.signatures=this._serializeSignatures(),t},n.prototype._deserializeSignatures=function(t){return i.map(t,function(t){if(t)return new p(t)})},n.prototype._serializeSignatures=function(){return i.map(this.signatures,function(t){if(t)return t.toObject()})},n.prototype.getSignatures=function(t,e,r,n){f.checkState(this.output instanceof a),n=n||h.SIGHASH_ALL;var s=this,o=[];return i.each(this.publicKeys,function(i){i.toString()===e.publicKey.toString()&&o.push(new p({publicKey:e.publicKey,prevTxId:s.prevTxId,outputIndex:s.outputIndex,inputIndex:r,signature:c.sign(t,e,n,r,s.redeemScript),sigtype:n}))}),o},n.prototype.addSignature=function(t,e){return f.checkState(!this.isFullySigned(),"All needed signatures have already been added"),f.checkArgument(!i.isUndefined(this.publicKeyIndex[e.publicKey.toString()]),"Signature has no matching public key"),f.checkState(this.isValidSignature(t,e)),this.signatures[this.publicKeyIndex[e.publicKey.toString()]]=e,this._updateScript(),this},n.prototype._updateScript=function(){return this.setScript(u.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript})),this},n.prototype._createSignatures=function(){return i.map(i.filter(this.signatures,function(t){return!i.isUndefined(t)}),function(t){return d.concat([t.signature.toDER(),d.integerAsSingleByteBuffer(t.sigtype)])})},n.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()},n.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},n.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},n.prototype.countSignatures=function(){return i.reduce(this.signatures,function(t,e){return t+!!e},0)},n.prototype.publicKeysWithoutSignature=function(){var t=this;return i.filter(this.publicKeys,function(e){return!t.signatures[t.publicKeyIndex[e.toString()]]})},n.prototype.isValidSignature=function(t,e){return e.signature.nhashtype=e.sigtype,c.verify(t,e.signature,e.publicKey,e.inputIndex,this.redeemScript)},n.OPCODES_SIZE=7,n.SIGNATURE_SIZE=74,n.PUBKEY_SIZE=34,n.prototype._estimateSize=function(){return n.OPCODES_SIZE+this.threshold*n.SIGNATURE_SIZE+this.publicKeys.length*n.PUBKEY_SIZE},e.exports=n},{"../../crypto/signature":11,"../../publickey":24,"../../script":25,"../../util/buffer":42,"../../util/preconditions":44,"../output":35,"../sighash":36,"../signature":37,"./input":30,inherits:358,lodash:359}],33:[function(t,e,r){"use strict";function n(){o.apply(this,arguments)}var i=t("inherits"),s=t("../../util/preconditions"),o=(t("../../util/buffer"),t("./input")),a=t("../output"),f=t("../sighash"),u=t("../../script"),h=t("../../crypto/signature"),c=t("../signature");i(n,o),n.prototype.getSignatures=function(t,e,r,n){s.checkState(this.output instanceof a),n=n||h.SIGHASH_ALL;var i=e.toPublicKey();return i.toString()===this.output.script.getPublicKey().toString("hex")?[new c({publicKey:i,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:f.sign(t,e,n,r,this.output.script),sigtype:n})]:[]},n.prototype.addSignature=function(t,e){return s.checkState(this.isValidSignature(t,e),"Signature is invalid"),this.setScript(u.buildPublicKeyIn(e.signature.toDER(),e.sigtype)),this},n.prototype.clearSignatures=function(){return this.setScript(u.empty()),this},n.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()},n.SCRIPT_MAX_SIZE=73,n.prototype._estimateSize=function(){return n.SCRIPT_MAX_SIZE},e.exports=n},{"../../crypto/signature":11,"../../script":25,"../../util/buffer":42,"../../util/preconditions":44,"../output":35,"../sighash":36,"../signature":37,"./input":30,inherits:358}],34:[function(t,e,r){"use strict";function n(){f.apply(this,arguments)}var i=t("inherits"),s=t("../../util/preconditions"),o=t("../../util/buffer"),a=t("../../crypto/hash"),f=t("./input"),u=t("../output"),h=t("../sighash"),c=t("../../script"),d=t("../../crypto/signature"),p=t("../signature");i(n,f),n.prototype.getSignatures=function(t,e,r,n,i){return s.checkState(this.output instanceof u),i=i||a.sha256ripemd160(e.publicKey.toBuffer()),n=n||d.SIGHASH_ALL,o.equals(i,this.output.script.getPublicKeyHash())?[new p({publicKey:e.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h.sign(t,e,n,r,this.output.script),sigtype:n})]:[]},n.prototype.addSignature=function(t,e){return s.checkState(this.isValidSignature(t,e),"Signature is invalid"),this.setScript(c.buildPublicKeyHashIn(e.publicKey,e.signature.toDER(),e.sigtype)),this},n.prototype.clearSignatures=function(){return this.setScript(c.empty()),this},n.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()},n.SCRIPT_MAX_SIZE=107,n.prototype._estimateSize=function(){return n.SCRIPT_MAX_SIZE},e.exports=n},{"../../crypto/hash":8,"../../crypto/signature":11,"../../script":25,"../../util/buffer":42,"../../util/preconditions":44,"../output":35,"../sighash":36,"../signature":37,"./input":30,inherits:358}],35:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);if(!i.isObject(t))throw new TypeError("Unrecognized argument for Output");if(this.satoshis=t.satoshis,a.isBuffer(t.script))this._scriptBuffer=t.script;else{var e;e=i.isString(t.script)&&f.isHexa(t.script)?new o.Buffer(t.script,"hex"):t.script,this.setScript(e)}}var i=t("lodash"),s=t("../crypto/bn"),o=t("buffer"),a=t("../util/buffer"),f=t("../util/js"),u=t("../encoding/bufferwriter"),h=t("../script"),c=t("../util/preconditions"),d=t("../errors");Object.defineProperty(n.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}}),Object.defineProperty(n.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(t){t instanceof s?(this._satoshisBN=t,this._satoshis=t.toNumber()):i.isString(t)?(this._satoshis=parseInt(t),this._satoshisBN=s.fromNumber(this._satoshis)):(c.checkArgument(f.isNaturalNumber(t),"Output satoshis is not a natural number"),this._satoshisBN=s.fromNumber(t),this._satoshis=t),c.checkState(f.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}}),n.prototype.invalidSatoshis=function(){return this._satoshis>9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0&&"transaction txout negative"},n.prototype.toObject=n.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t},n.fromObject=function(t){return new n(t)},n.prototype.setScriptFromBuffer=function(t){this._scriptBuffer=t;try{this._script=h.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(!(t instanceof d.Script.InvalidBuffer))throw t;this._script=null}},n.prototype.setScript=function(t){if(t instanceof h)this._scriptBuffer=t.toBuffer(),this._script=t,this._script._isOutput=!0;else if(i.isString(t))this._script=h.fromString(t),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else{if(!a.isBuffer(t))throw new TypeError("Invalid argument type: script");this.setScriptFromBuffer(t)}return this},n.prototype.inspect=function(){var t;return t=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+t+">"},n.fromBufferReader=function(t){var e={};e.satoshis=t.readUInt64LEBN();var r=t.readVarintNum();return e.script=0!==r?t.read(r):new o.Buffer([]),new n(e)},n.prototype.toBufferWriter=function(t){t||(t=new u),t.writeUInt64LEBN(this._satoshisBN);var e=this._scriptBuffer;return t.writeVarintNum(e.length),t.write(e),t},e.exports=n},{"../crypto/bn":6,"../encoding/bufferwriter":15,"../errors":17,"../script":25,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,buffer:47,lodash:359}],36:[function(t,e,r){(function(r){"use strict";function n(t,e,r,n,i){var s=g(t,r,n,i);return p.sign(s,e,"little").set({nhashtype:r})}function i(t,e,r,n,i){l.checkArgument(!b.isUndefined(t)),l.checkArgument(!b.isUndefined(e)&&!b.isUndefined(e.nhashtype));var s=g(t,e.nhashtype,n,i);return p.verify(s,e,r,"little")}var s=t("buffer"),o=t("../crypto/signature"),a=t("../script"),f=t("./output"),u=t("../encoding/bufferreader"),h=t("../encoding/bufferwriter"),c=t("../crypto/bn"),d=t("../crypto/hash"),p=t("../crypto/ecdsa"),l=t("../util/preconditions"),b=t("lodash"),g=function(e,n,i,p){var l,b=t("./transaction"),g=t("./input"),y=b.shallowCopy(e);for(p=new a(p),p.removeCodeseparators(),l=0;l<y.inputs.length;l++)y.inputs[l]=new g(y.inputs[l]).setScript(a.empty());if(y.inputs[i]=new g(y.inputs[i]).setScript(p),(31&n)===o.SIGHASH_NONE||(31&n)===o.SIGHASH_SINGLE)for(l=0;l<y.inputs.length;l++)l!==i&&(y.inputs[l].sequenceNumber=0);if((31&n)===o.SIGHASH_NONE)y.outputs=[];else if((31&n)===o.SIGHASH_SINGLE){if(i>=y.outputs.length)return new r("0000000000000000000000000000000000000000000000000000000000000001","hex");for(y.outputs.length=i+1,l=0;l<i;l++)y.outputs[l]=new f({satoshis:c.fromBuffer(new s.Buffer("ffffffffffffffff","hex")),script:a.empty()})}n&o.SIGHASH_ANYONECANPAY&&(y.inputs=[y.inputs[i]]);var m=(new h).write(y.toBuffer()).writeInt32LE(n).toBuffer(),v=d.sha256sha256(m);return v=new u(v).readReverse()};e.exports={sighash:g,sign:n,verify:i}}).call(this,t("buffer").Buffer)},{"../crypto/bn":6,"../crypto/ecdsa":7,"../crypto/hash":8,"../crypto/signature":11,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../script":25,"../util/preconditions":44,"./input":29,"./output":35,"./transaction":38,buffer:47,lodash:359}],37:[function(t,e,r){(function(r){"use strict";function n(t){if(!(this instanceof n))return new n(t);if(t instanceof n)return t;if(i.isObject(t))return this._fromObject(t);throw new h.InvalidArgument("TransactionSignatures must be instantiated from an object")}var i=t("lodash"),s=t("../util/preconditions"),o=t("inherits"),a=t("../util/buffer"),f=t("../util/js"),u=t("../publickey"),h=t("../errors"),c=t("../crypto/signature");o(n,c),n.prototype._fromObject=function(t){return this._checkObjectArgs(t),this.publicKey=new u(t.publicKey),
  this.prevTxId=a.isBuffer(t.prevTxId)?t.prevTxId:new r(t.prevTxId,"hex"),this.outputIndex=t.outputIndex,this.inputIndex=t.inputIndex,this.signature=t.signature instanceof c?t.signature:a.isBuffer(t.signature)?c.fromBuffer(t.signature):c.fromString(t.signature),this.sigtype=t.sigtype,this},n.prototype._checkObjectArgs=function(t){s.checkArgument(u(t.publicKey),"publicKey"),s.checkArgument(!i.isUndefined(t.inputIndex),"inputIndex"),s.checkArgument(!i.isUndefined(t.outputIndex),"outputIndex"),s.checkState(i.isNumber(t.inputIndex),"inputIndex must be a number"),s.checkState(i.isNumber(t.outputIndex),"outputIndex must be a number"),s.checkArgument(t.signature,"signature"),s.checkArgument(t.prevTxId,"prevTxId"),s.checkState(t.signature instanceof c||a.isBuffer(t.signature)||f.isHexa(t.signature),"signature must be a buffer or hexa value"),s.checkState(a.isBuffer(t.prevTxId)||f.isHexa(t.prevTxId),"prevTxId must be a buffer or hexa value"),s.checkArgument(t.sigtype,"sigtype"),s.checkState(i.isNumber(t.sigtype),"sigtype must be a number")},n.prototype.toObject=n.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}},n.fromObject=function(t){return s.checkArgument(t),new n(t)},e.exports=n}).call(this,t("buffer").Buffer)},{"../crypto/signature":11,"../errors":17,"../publickey":24,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,buffer:47,inherits:358,lodash:359}],38:[function(t,e,r){(function(r){"use strict";function n(t){if(!(this instanceof n))return new n(t);if(this.inputs=[],this.outputs=[],this.witnessStack=[],this._inputAmount=void 0,this._outputAmount=void 0,this.dummy=void 0,this.flags=void 0,t){if(t instanceof n)return n.shallowCopy(t);if(h.isHexa(t))this.fromString(t);else if(u.isBuffer(t))this.fromBuffer(t);else{if(!i.isObject(t))throw new f.InvalidArgument("Must provide an object or string to deserialize a transaction");this.fromObject(t)}}else this._newTransaction()}var i=t("lodash"),s=t("../util/preconditions"),o=t("buffer"),a=r.compare||t("buffer-compare"),f=t("../errors"),u=t("../util/buffer"),h=t("../util/js"),c=t("../encoding/bufferreader"),d=t("../encoding/bufferwriter"),p=t("../crypto/hash"),l=t("../crypto/signature"),b=t("./sighash"),g=t("../address"),y=t("./unspentoutput"),m=t("./input"),v=m.PublicKeyHash,_=m.PublicKey,w=m.MultiSigScriptHash,S=m.MultiSig,k=t("./output"),I=t("../script"),A=t("../privatekey"),E=t("../crypto/bn");n.DUST_AMOUNT=546,n.FEE_SECURITY_MARGIN=15,n.MAX_MONEY=21e14,n.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8,n.NLOCKTIME_MAX_VALUE=4294967295,n.FEE_PER_KB=1e4,n.CHANGE_OUTPUT_MAX_SIZE=62,n.MAXIMUM_EXTRA_SIZE=26,n.shallowCopy=function(t){return new n(t.toBuffer())};var x={configurable:!1,enumerable:!0,get:function(){return new c(this._getHash()).readReverse().toString("hex")}};Object.defineProperty(n.prototype,"hash",x),Object.defineProperty(n.prototype,"id",x);var O={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(n.prototype,"inputAmount",O),O.get=function(){return this._getOutputAmount()},Object.defineProperty(n.prototype,"outputAmount",O),n.prototype._getHash=function(){return p.sha256sha256(this.toHashBuffer())},n.prototype.serialize=function(t){return!0===t||t&&t.disableAll?this.uncheckedSerialize():this.checkedSerialize(t)},n.prototype.uncheckedSerialize=n.prototype.toString=function(){return this.toBuffer().toString("hex")},n.prototype.checkedSerialize=function(t){var e=this.getSerializationError(t);if(e)throw e.message+=" Use Transaction#uncheckedSerialize if you want to skip security checks. See http://bitcore.io/guide/transaction.html#Serialization for more info.",e;return this.uncheckedSerialize()},n.prototype.invalidSatoshis=function(){for(var t=!1,e=0;e<this.outputs.length;e++)this.outputs[e].invalidSatoshis()&&(t=!0);return t},n.prototype.getSerializationError=function(t){if(t=t||{},this.invalidSatoshis())return new f.Transaction.InvalidSatoshis;var e,r=this._getUnspentValue();return r<0?t.disableMoreOutputThanInput||(e=new f.Transaction.InvalidOutputAmountSum):e=this._hasFeeError(t,r),e||this._hasDustOutputs(t)||this._isMissingSignatures(t)},n.prototype._hasFeeError=function(t,e){if(!i.isUndefined(this._fee)&&this._fee!==e)return new f.Transaction.FeeError.Different("Unspent value is "+e+" but specified fee is "+this._fee);if(!t.disableLargeFees){var r=Math.floor(n.FEE_SECURITY_MARGIN*this._estimateFee());if(e>r)return this._missingChange()?new f.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new f.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+e)}if(!t.disableSmallFees){var s=Math.ceil(this._estimateFee()/n.FEE_SECURITY_MARGIN);if(e<s)return new f.Transaction.FeeError.TooSmall("expected more than "+s+" but got "+e)}},n.prototype._missingChange=function(){return!this._changeScript},n.prototype._hasDustOutputs=function(t){if(!t.disableDustOutputs){var e,r;for(e in this.outputs)if(r=this.outputs[e],r.satoshis<n.DUST_AMOUNT&&!r.script.isDataOut())return new f.Transaction.DustOutputs}},n.prototype._isMissingSignatures=function(t){if(!t.disableIsFullySigned)return this.isFullySigned()?void 0:new f.Transaction.MissingSignatures},n.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"},n.prototype.toBuffer=function(){var t=new d;return this.toBufferWriter(t).toBuffer()},n.prototype.toHashBuffer=function(){var t=new d;return this.toHashBufferWriter(t).toBuffer()},n.prototype.toBufferWriter=function(t){if(t.writeInt32LE(this.version),void 0!==this.dummy&&t.writeUInt8(0),void 0!==this.flags&&(this.flags?t.writeUInt8(1):t.writeUInt8(0)),t.writeVarintNum(this.inputs.length),i.each(this.inputs,function(e){e.toBufferWriter(t)}),t.writeVarintNum(this.outputs.length),i.each(this.outputs,function(e){e.toBufferWriter(t)}),this.flags)for(var e=0;e<this.inputs.length;e++)if(t.writeVarintNum(this.witnessStack[e].length),this.witnessStack[e].length)for(var r=0;r<this.witnessStack[e].length;r++)t.writeVarintNum(this.witnessStack[e][r].length),t.write(this.witnessStack[e][r]);return t.writeUInt32LE(this.nLockTime),t},n.prototype.toHashBufferWriter=function(t){return t.writeInt32LE(this.version),t.writeVarintNum(this.inputs.length),i.each(this.inputs,function(e){e.toBufferWriter(t)}),t.writeVarintNum(this.outputs.length),i.each(this.outputs,function(e){e.toBufferWriter(t)}),t.writeUInt32LE(this.nLockTime),t},n.prototype.fromBuffer=function(t){var e=new c(t);return this.fromBufferReader(e)},n.prototype.fromBufferReader=function(t){s.checkArgument(!t.finished(),"No transaction data received");var e,r,n;for(this.version=t.readInt32LE(),r=t.readVarintNum(),r||(this.dummy=r,this.flags=t.readUInt8(),r=t.readVarintNum()),e=0;e<r;e++){var i=m.fromBufferReader(t);this.inputs.push(i)}for(n=t.readVarintNum(),e=0;e<n;e++)this.outputs.push(k.fromBufferReader(t));if(this.flags)for(e=0;e<r;e++){var o=t.readVarintNum();if(o){for(var a=[],f=0;f<o;f++){var u=t.readVarintNum();a.push(t.read(u))}this.witnessStack.push(a)}else this.witnessStack.push([])}return this.nLockTime=t.readUInt32LE(),this},n.prototype.toObject=n.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(e){t.push(e.toObject())});var e=[];this.outputs.forEach(function(t){e.push(t.toObject())});var r={hash:this.hash,version:this.version,inputs:t,outputs:e,nLockTime:this.nLockTime};return this._changeScript&&(r.changeScript=this._changeScript.toString()),i.isUndefined(this._changeIndex)||(r.changeIndex=this._changeIndex),i.isUndefined(this._fee)||(r.fee=this._fee),r},n.prototype.fromObject=function(t){s.checkArgument(i.isObject(t)||t instanceof n);var e,r=this;return e=t instanceof n?e.toObject():t,i.each(e.inputs,function(t){if(!t.output||!t.output.script)return void r.uncheckedAddInput(new m(t));var e,n=new I(t.output.script);if(n.isPublicKeyHashOut())e=new m.PublicKeyHash(t);else if(n.isScriptHashOut()&&t.publicKeys&&t.threshold)e=new m.MultiSigScriptHash(t,t.publicKeys,t.threshold,t.signatures);else{if(!n.isPublicKeyOut())throw new f.Transaction.Input.UnsupportedScript(t.output.script);e=new m.PublicKey(t)}r.addInput(e)}),i.each(e.outputs,function(t){r.addOutput(new k(t))}),e.changeIndex&&(this._changeIndex=e.changeIndex),e.changeScript&&(this._changeScript=new I(e.changeScript)),e.fee&&(this._fee=e.fee),this.nLockTime=e.nLockTime,this.version=e.version,this._checkConsistency(t),this},n.prototype._checkConsistency=function(t){i.isUndefined(this._changeIndex)||(s.checkState(this._changeScript),s.checkState(this.outputs[this._changeIndex]),s.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString())),t&&t.hash&&s.checkState(t.hash===this.hash,"Hash in object does not match transaction hash")},n.prototype.lockUntilDate=function(t){if(s.checkArgument(t),i.isNumber(t)&&t<n.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new f.Transaction.LockTimeTooEarly;i.isDate(t)&&(t=t.getTime()/1e3);for(var e=0;e<this.inputs.length;e++)this.inputs[e].sequenceNumber===m.DEFAULT_SEQNUMBER&&(this.inputs[e].sequenceNumber=m.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=t,this},n.prototype.lockUntilBlockHeight=function(t){if(s.checkArgument(i.isNumber(t)),t>=n.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new f.Transaction.BlockHeightTooHigh;if(t<0)throw new f.Transaction.NLockTimeOutOfRange;for(var e=0;e<this.inputs.length;e++)this.inputs[e].sequenceNumber===m.DEFAULT_SEQNUMBER&&(this.inputs[e].sequenceNumber=m.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=t,this},n.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<n.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null},n.prototype.fromString=function(t){this.fromBuffer(new o.Buffer(t,"hex"))},n.prototype._newTransaction=function(){this.version=1,this.nLockTime=0},n.prototype.from=function(t,e,r){if(i.isArray(t)){var n=this;return i.each(t,function(t){n.from(t,e,r)}),this}return i.any(this.inputs,function(e){return e.prevTxId.toString("hex")===t.txId&&e.outputIndex===t.outputIndex})?this:(e&&r?this._fromMultisigUtxo(t,e,r):this._fromNonP2SH(t),this)},n.prototype._fromNonP2SH=function(t){var e;t=new y(t),e=t.script.isPublicKeyHashOut()?v:t.script.isPublicKeyOut()?_:m,this.addInput(new e({output:new k({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,script:I.empty()}))},n.prototype._fromMultisigUtxo=function(t,e,r){s.checkArgument(r<=e.length,"Number of required signatures must be greater than the number of public keys");var n;if(t=new y(t),t.script.isMultisigOut())n=S;else{if(!t.script.isScriptHashOut())throw new Error("@TODO");n=w}this.addInput(new n({output:new k({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,script:I.empty()},e,r))},n.prototype.addInput=function(t,e,r){if(s.checkArgumentType(t,m,"input"),!t.output&&(i.isUndefined(e)||i.isUndefined(r)))throw new f.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return t.output||!e||i.isUndefined(r)||(e=e instanceof I?e:new I(e),s.checkArgumentType(r,"number","satoshis"),t.output=new k({script:e,satoshis:r})),this.uncheckedAddInput(t)},n.prototype.uncheckedAddInput=function(t){return s.checkArgumentType(t,m,"input"),this.inputs.push(t),this._inputAmount=void 0,this._updateChangeOutput(),this},n.prototype.hasAllUtxoInfo=function(){return i.all(this.inputs.map(function(t){return!!t.output}))},n.prototype.fee=function(t){return s.checkArgument(i.isNumber(t),"amount must be a number"),this._fee=t,this._updateChangeOutput(),this},n.prototype.feePerKb=function(t){return s.checkArgument(i.isNumber(t),"amount must be a number"),this._feePerKb=t,this._updateChangeOutput(),this},n.prototype.change=function(t){return s.checkArgument(t,"address is required"),this._changeScript=I.fromAddress(t),this._updateChangeOutput(),this},n.prototype.getChangeOutput=function(){return i.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]},n.prototype.to=function(t,e){if(i.isArray(t)){var r=this;return i.each(t,function(t){r.to(t.address,t.satoshis)}),this}return s.checkArgument(h.isNaturalNumber(e),"Amount is expected to be a positive integer"),this.addOutput(new k({script:I(new g(t)),satoshis:e})),this},n.prototype.addData=function(t){return this.addOutput(new k({script:I.buildDataOut(t),satoshis:0})),this},n.prototype.addOutput=function(t){return s.checkArgumentType(t,k,"output"),this._addOutput(t),this._updateChangeOutput(),this},n.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this},n.prototype._addOutput=function(t){this.outputs.push(t),this._outputAmount=void 0},n.prototype._getOutputAmount=function(){if(i.isUndefined(this._outputAmount)){var t=this;this._outputAmount=0,i.each(this.outputs,function(e){t._outputAmount+=e.satoshis})}return this._outputAmount},n.prototype._getInputAmount=function(){if(i.isUndefined(this._inputAmount)){var t=this;this._inputAmount=0,i.each(this.inputs,function(e){if(i.isUndefined(e.output))throw new f.Transaction.Input.MissingPreviousOutput;t._inputAmount+=e.output.satoshis})}return this._inputAmount},n.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),i.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex);var t=this._getUnspentValue(),e=this.getFee(),r=t-e;r>0?(this._changeIndex=this.outputs.length,this._addOutput(new k({script:this._changeScript,satoshis:r}))):this._changeIndex=void 0}},n.prototype.getFee=function(){return this.isCoinbase()?0:i.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},n.prototype._estimateFee=function(){var t=this._estimateSize(),e=this._getUnspentValue();return n._estimateFee(t,e,this._feePerKb)},n.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},n.prototype._clearSignatures=function(){i.each(this.inputs,function(t){t.clearSignatures()})},n._estimateFee=function(t,e,r){return e>Math.ceil(t/1e3)*(r||n.FEE_PER_KB)&&(t+=n.CHANGE_OUTPUT_MAX_SIZE),Math.ceil(t/1e3)*(r||n.FEE_PER_KB)},n.prototype._estimateSize=function(){var t=n.MAXIMUM_EXTRA_SIZE;return i.each(this.inputs,function(e){t+=e._estimateSize()}),i.each(this.outputs,function(e){t+=e.script.toBuffer().length+9}),t},n.prototype._removeOutput=function(t){var e=this.outputs[t];this.outputs=i.without(this.outputs,e),this._outputAmount=void 0},n.prototype.removeOutput=function(t){this._removeOutput(t),this._updateChangeOutput()},n.prototype.sort=function(){return this.sortInputs(function(t){var e=Array.prototype.concat.apply([],t);return e.sort(function(t,e){return a(t.prevTxId,e.prevTxId)||t.outputIndex-e.outputIndex}),e}),this.sortOutputs(function(t){var e=Array.prototype.concat.apply([],t);return e.sort(function(t,e){return t.satoshis-e.satoshis||a(t.script.toBuffer(),e.script.toBuffer())}),e}),this},n.prototype.shuffleOutputs=function(){return this.sortOutputs(i.shuffle)},n.prototype.sortOutputs=function(t){var e=t(this.outputs);return this._newOutputOrder(e)},n.prototype.sortInputs=function(t){return this.inputs=t(this.inputs),this._clearSignatures(),this},n.prototype._newOutputOrder=function(t){if(this.outputs.length!==t.length||0!==i.difference(this.outputs,t).length)throw new f.Transaction.InvalidSorting;if(!i.isUndefined(this._changeIndex)){var e=this.outputs[this._changeIndex];this._changeIndex=i.findIndex(t,e)}return this.outputs=t,this},n.prototype.removeInput=function(t,e){var r;if((r=!e&&i.isNumber(t)?t:i.findIndex(this.inputs,function(r){return r.prevTxId.toString("hex")===t&&r.outputIndex===e}))<0||r>=this.inputs.length)throw new f.Transaction.InvalidIndex(r,this.inputs.length);var n=this.inputs[r];this.inputs=i.without(this.inputs,n),this._inputAmount=void 0,this._updateChangeOutput()},n.prototype.sign=function(t,e){s.checkState(this.hasAllUtxoInfo());var r=this;return i.isArray(t)?(i.each(t,function(t){r.sign(t,e)}),this):(i.each(this.getSignatures(t,e),function(t){r.applySignature(t)}),this)},n.prototype.getSignatures=function(t,e){t=new A(t),e=e||l.SIGHASH_ALL;var r=this,n=[],s=p.sha256ripemd160(t.publicKey.toBuffer());return i.each(this.inputs,function(o,a){i.each(o.getSignatures(r,t,a,e,s),function(t){n.push(t)})}),n},n.prototype.applySignature=function(t){return this.inputs[t.inputIndex].addSignature(this,t),this},n.prototype.isFullySigned=function(){return i.each(this.inputs,function(t){if(t.isFullySigned===m.prototype.isFullySigned)throw new f.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),i.all(i.map(this.inputs,function(t){return t.isFullySigned()}))},n.prototype.isValidSignature=function(t){var e=this;if(this.inputs[t.inputIndex].isValidSignature===m.prototype.isValidSignature)throw new f.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[t.inputIndex].isValidSignature(e,t)},n.prototype.verifySignature=function(t,e,r,n){return b.verify(this,t,e,r,n)},n.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var t=new E(0),e=0;e<this.outputs.length;e++){var r=this.outputs[e];if(r.invalidSatoshis())return"transaction txout "+e+" satoshis is invalid";if(r._satoshisBN.gt(new E(n.MAX_MONEY,10)))return"transaction txout "+e+" greater than MAX_MONEY";if(t=t.add(r._satoshisBN),t.gt(new E(n.MAX_MONEY)))return"transaction txout "+e+" total output greater than MAX_MONEY"}if(this.toBuffer().length>1e6)return"transaction over the maximum block size";var s={};for(e=0;e<this.inputs.length;e++){var o=this.inputs[e],a=o.prevTxId+":"+o.outputIndex;if(!i.isUndefined(s[a]))return"transaction input "+e+" duplicate input";s[a]=!0}if(this.isCoinbase()){var f=this.inputs[0]._scriptBuffer;if(f.length<2||f.length>100)return"coinbase transaction script size invalid"}else for(e=0;e<this.inputs.length;e++)if(this.inputs[e].isNull())return"transaction input "+e+" has null input";return!0},n.prototype.isCoinbase=function(){return 1===this.inputs.length&&this.inputs[0].isNull()},n.prototype.isRBF=function(){for(var t=0;t<this.inputs.length;t++){if(this.inputs[t].sequenceNumber<m.MAXINT-1)return!0}return!1},n.prototype.enableRBF=function(){for(var t=0;t<this.inputs.length;t++){var e=this.inputs[t];e.sequenceNumber>=m.MAXINT-1&&(e.sequenceNumber=m.DEFAULT_RBF_SEQNUMBER)}return this},e.exports=n}).call(this,t("buffer").Buffer)},{"../address":1,"../crypto/bn":6,"../crypto/hash":8,"../crypto/signature":11,"../encoding/bufferreader":14,"../encoding/bufferwriter":15,"../errors":17,"../privatekey":23,"../script":25,"../util/buffer":42,"../util/js":43,"../util/preconditions":44,"./input":29,"./output":35,"./sighash":36,"./unspentoutput":39,buffer:47,"buffer-compare":336,lodash:359}],39:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);s.checkArgument(i.isObject(t),"Must provide an object from where to extract data");var e=t.address?new f(t.address):void 0,r=t.txid?t.txid:t.txId;if(!r||!o.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",t);var h=i.isUndefined(t.vout)?t.outputIndex:t.vout;if(!i.isNumber(h))throw new Error("Invalid outputIndex, received "+h);s.checkArgument(!i.isUndefined(t.scriptPubKey)||!i.isUndefined(t.script),"Must provide the scriptPubKey for that output!");var c=new a(t.scriptPubKey||t.script);s.checkArgument(!i.isUndefined(t.amount)||!i.isUndefined(t.satoshis),"Must provide an amount for the output");var d=i.isUndefined(t.amount)?t.satoshis:new u.fromBTC(t.amount).toSatoshis();s.checkArgument(i.isNumber(d),"Amount must be a number"),o.defineImmutable(this,{address:e,txId:r,outputIndex:h,script:c,satoshis:d})}var i=t("lodash"),s=t("../util/preconditions"),o=t("../util/js"),a=t("../script"),f=t("../address"),u=t("../unit");n.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"},n.prototype.toString=function(){return this.txId+":"+this.outputIndex},n.fromObject=function(t){return new n(t)},n.prototype.toObject=n.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:u.fromSatoshis(this.satoshis).toBTC()}},e.exports=n},{"../address":1,"../script":25,"../unit":40,"../util/js":43,"../util/preconditions":44,lodash:359}],40:[function(t,e,r){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(i.isNumber(e)){if(e<=0)throw new s.Unit.InvalidRate(e);t/=e,e=n.BTC}this._value=this._from(t,e);var r=this,o=function(t){Object.defineProperty(r,t,{get:function(){return r.to(t)},enumerable:!0})};Object.keys(a).forEach(o)}var i=t("lodash"),s=t("./errors"),o=t("./util/preconditions"),a={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};Object.keys(a).forEach(function(t){n[t]=t}),n.fromObject=function(t){return o.checkArgument(i.isObject(t),"Argument is expected to be an object"),new n(t.amount,t.code)},n.fromBTC=function(t){return new n(t,n.BTC)},n.fromMillis=n.fromMilis=function(t){return new n(t,n.mBTC)},n.fromMicros=n.fromBits=function(t){return new n(t,n.bits)},n.fromSatoshis=function(t){return new n(t,n.satoshis)},n.fromFiat=function(t,e){return new n(t,e)},n.prototype._from=function(t,e){if(!a[e])throw new s.Unit.UnknownCode(e);return parseInt((t*a[e][0]).toFixed())},n.prototype.to=function(t){if(i.isNumber(t)){if(t<=0)throw new s.Unit.InvalidRate(t);return parseFloat((this.BTC*t).toFixed(2))}if(!a[t])throw new s.Unit.UnknownCode(t);var e=this._value/a[t][0];return parseFloat(e.toFixed(a[t][1]))},n.prototype.toBTC=function(){return this.to(n.BTC)},n.prototype.toMillis=n.prototype.toMilis=function(){return this.to(n.mBTC)},n.prototype.toMicros=n.prototype.toBits=function(){return this.to(n.bits)},n.prototype.toSatoshis=function(){return this.to(n.satoshis)},n.prototype.atRate=function(t){return this.to(t)},n.prototype.toString=function(){return this.satoshis+" satoshis"},n.prototype.toObject=n.prototype.toJSON=function(){return{amount:this.BTC,code:n.BTC}},n.prototype.inspect=function(){return"<Unit: "+this.toString()+">"},e.exports=n},{"./errors":17,"./util/preconditions":44,lodash:359}],41:[function(t,e,r){"use strict";var n=t("lodash"),i=t("url"),s=t("./address"),o=t("./unit"),a=function(t,e){if(!(this instanceof a))return new a(t,e);if(this.extras={},this.knownParams=e||[],this.address=this.network=this.amount=this.message=null,"string"==typeof t){var r=a.parse(t);r.amount&&(r.amount=this._parseAmount(r.amount)),this._fromObject(r)}else{if("object"!=typeof t)throw new TypeError("Unrecognized data format.");this._fromObject(t)}};a.fromString=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return new a(t)},a.fromObject=function(t){return new a(t)},a.isValid=function(t,e){try{new a(t,e)}catch(t){return!1}return!0},a.parse=function(t){var e=i.parse(t,!0);if("rpi:"!==e.protocol)throw new TypeError("Invalid rpi URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(t);return e.query.address=r&&r[1]||void 0,e.query},a.Members=["address","amount","message","label","r"],a.prototype._fromObject=function(t){if(!s.isValid(t.address))throw new TypeError("Invalid rpi address");this.address=new s(t.address),this.network=this.address.network,this.amount=t.amount;for(var e in t)if("address"!==e&&"amount"!==e){if(/^req-/.exec(e)&&-1===this.knownParams.indexOf(e))throw Error("Unknown required argument "+e);var r=a.Members.indexOf(e)>-1?this:this.extras;r[e]=t[e]}},a.prototype._parseAmount=function(t){if(t=Number(t),isNaN(t))throw new TypeError("Invalid amount");return o.fromBTC(t).toSatoshis()},a.prototype.toObject=a.prototype.toJSON=function(){for(var t={},e=0;e<a.Members.length;e++){var r=a.Members[e];this.hasOwnProperty(r)&&void 0!==this[r]&&(t[r]=this[r].toString())}return n.extend(t,this.extras),t},a.prototype.toString=function(){var t={};return this.amount&&(t.amount=o.fromSatoshis(this.amount).toBTC()),this.message&&(t.message=this.message),this.label&&(t.label=this.label),this.r&&(t.r=this.r),n.extend(t,this.extras),i.format({protocol:"rpi:",host:this.address,query:t})},a.prototype.inspect=function(){return"<URI: "+this.toString()+">"},e.exports=a},{"./address":1,"./unit":40,lodash:359,url:328}],42:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t.length!==e.length)return!1;for(var r=t.length,n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var i=t("buffer"),s=t("assert"),o=t("./js"),a=t("./preconditions");e.exports={fill:function(t,e){a.checkArgumentType(t,"Buffer","buffer"),a.checkArgumentType(e,"number","value");for(var r=t.length,n=0;n<r;n++)t[n]=e;return t},copy:function(t){var e=new r(t.length);return t.copy(e),e},isBuffer:function(t){return i.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function(t){a.checkArgumentType(t,"number","bytes");for(var e=new i.Buffer(t),r=0;r<t;r++)e.write("\0",r);return e},concat:i.Buffer.concat,equals:n,equal:n,integerAsSingleByteBuffer:function(t){return a.checkArgumentType(t,"number","integer"),new i.Buffer([255&t])},integerAsBuffer:function(t){a.checkArgumentType(t,"number","integer");var e=[];return e.push(t>>24&255),e.push(t>>16&255),e.push(t>>8&255),e.push(255&t),new r(e)},integerFromBuffer:function(t){return a.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return a.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return a.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){for(var e=new i.Buffer(t.length),r=0;r<t.length;r++)e[r]=t[t.length-r-1];return e},hexToBuffer:function(t){return s(o.isHexa(t)),new i.Buffer(t,"hex")}},e.exports.NULL_HASH=e.exports.fill(new r(32),0),e.exports.EMPTY_BUFFER=new r(0)}).call(this,t("buffer").Buffer)},{"./js":43,"./preconditions":44,assert:45,buffer:47}],43:[function(t,e,r){"use strict";var n=t("lodash"),i=function(t){return!!n.isString(t)&&/^[0-9a-fA-F]+$/.test(t)};e.exports={isValidJSON:function(t){var e;if(!n.isString(t))return!1;try{e=JSON.parse(t)}catch(t){return!1}return"object"==typeof e},isHexa:i,isHexaString:i,cloneArray:function(t){return[].concat(t)},defineImmutable:function(t,e){return Object.keys(e).forEach(function(r){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,value:e[r]})}),t},isNaturalNumber:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&t>=0}}},{lodash:359}],44:[function(t,e,r){"use strict";var n=t("../errors"),i=t("lodash");e.exports={checkState:function(t,e){if(!t)throw new n.InvalidState(e)},checkArgument:function(t,e,r,i){if(!t)throw new n.InvalidArgument(e,r,i)},checkArgumentType:function(e,r,s){if(s=s||"(unknown name)",i.isString(r)){if("Buffer"===r){var o=t("./buffer");if(!o.isBuffer(e))throw new n.InvalidArgumentType(e,r,s)}else if(typeof e!==r)throw new n.InvalidArgumentType(e,r,s)}else if(!(e instanceof r))throw new n.InvalidArgumentType(e,r.name,s)}}},{"../errors":17,"./buffer":42,lodash:359}],45:[function(t,e,r){(function(r){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function s(t){return Object.prototype.toString.call(t)}function o(t){return!i(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function a(t){if(_.isFunction(t)){if(k)return t.name;var e=t.toString(),r=e.match(A);return r&&r[1]}}function f(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function u(t){if(k||!_.isFunction(t))return _.inspect(t);var e=a(t);return"[Function"+(e?": "+e:"")+"]"}function h(t){return f(u(t.actual),128)+" "+t.operator+" "+f(u(t.expected),128)}function c(t,e,r,n,i){throw new I.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function d(t,e){t||c(t,!0,e,"==",I.ok)}function p(t,e,r,a){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(_.isDate(t)&&_.isDate(e))return t.getTime()===e.getTime();if(_.isRegExp(t)&&_.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(o(t)&&o(e)&&s(t)===s(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;a=a||{actual:[],expected:[]};var f=a.actual.indexOf(t);return-1!==f&&f===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),b(t,e,r,a))}return r?t===e:t==e}function l(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function b(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(_.isPrimitive(t)||_.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=l(t),s=l(e);if(i&&!s||!i&&s)return!1;if(i)return t=S.call(t),e=S.call(e),p(t,e,r);var o,a,f=E(t),u=E(e);if(f.length!==u.length)return!1;for(f.sort(),u.sort(),a=f.length-1;a>=0;a--)if(f[a]!==u[a])return!1;for(a=f.length-1;a>=0;a--)if(o=f[a],!p(t[o],e[o],r,n))return!1;return!0}function g(t,e,r){p(t,e,!0)&&c(t,e,r,"notDeepStrictEqual",g)}function y(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function m(t){var e;try{t()}catch(t){e=t}return e}function v(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=m(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&c(i,r,"Missing expected exception"+n);var s="string"==typeof n,o=!t&&_.isError(i),a=!t&&i&&!r;if((o&&s&&y(i,r)||a)&&c(i,r,"Got unwanted exception"+n),t&&i&&r&&!y(i,r)||!t&&i)throw i}var _=t("util/"),w=Object.prototype.hasOwnProperty,S=Array.prototype.slice,k=function(){return"foo"===function(){}.name}(),I=e.exports=d,A=/\s*function\s+([^\(\s]*)\s*/;I.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=h(this),this.generatedMessage=!0);var e=t.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=a(e),s=n.indexOf("\n"+i);if(s>=0){var o=n.indexOf("\n",s+1);n=n.substring(o+1)}this.stack=n}}},_.inherits(I.AssertionError,Error),I.fail=c,I.ok=d,I.equal=function(t,e,r){t!=e&&c(t,e,r,"==",I.equal)},I.notEqual=function(t,e,r){t==e&&c(t,e,r,"!=",I.notEqual)},I.deepEqual=function(t,e,r){p(t,e,!1)||c(t,e,r,"deepEqual",I.deepEqual)},I.deepStrictEqual=function(t,e,r){p(t,e,!0)||c(t,e,r,"deepStrictEqual",I.deepStrictEqual)},I.notDeepEqual=function(t,e,r){p(t,e,!1)&&c(t,e,r,"notDeepEqual",I.notDeepEqual)},I.notDeepStrictEqual=g,I.strictEqual=function(t,e,r){t!==e&&c(t,e,r,"===",I.strictEqual)},I.notStrictEqual=function(t,e,r){t===e&&c(t,e,r,"!==",I.notStrictEqual)},I.throws=function(t,e,r){v(!0,t,e,r)},I.doesNotThrow=function(t,e,r){v(!1,t,e,r)},I.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)w.call(t,r)&&e.push(r);return e}
  }).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":331}],46:[function(t,e,r){},{}],47:[function(t,e,r){(function(e){"use strict";function n(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(n()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(this,t)}return o(this,t,e,r)}function o(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?d(t,e,r,n):"string"==typeof e?h(t,e,r):p(t,e)}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 f(t,e,r,n){return a(e),e<=0?i(t,e):void 0!==r?"string"==typeof n?i(t,e).fill(r,n):i(t,e).fill(r):i(t,e)}function u(t,e){if(a(e),t=i(t,e<0?0:0|l(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(e,r);t=i(t,n);var o=t.write(e,r);return o!==n&&(t=t.slice(0,o)),t}function c(t,e){var r=e.length<0?0:0|l(e.length);t=i(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=s.prototype):t=c(t,e),t}function p(t,e){if(s.isBuffer(e)){var r=0|l(e.length);return t=i(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||X(e.length)?i(t,0):c(t,e);if("Buffer"===e.type&&Q(e.data))return c(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function l(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),s.alloc(+t)}function g(t,e){if(s.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 r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return q(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){function s(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,a=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,f/=2,r/=2}var u;if(i){var h=-1;for(u=r;u<a;u++)if(s(t,u)===s(e,-1===h?0:u-h)){if(-1===h&&(h=u),u-h+1===f)return h*o}else-1!==h&&(u-=u-h),h=-1}else for(r+f>a&&(r=a-f),u=r;u>=0;u--){for(var c=!0,d=0;d<f;d++)if(s(t,u+d)!==s(e,d)){c=!1;break}if(c)return u}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[r+o]=a}return o}function S(t,e,r,n){return W(q(e,t.length-r),t,r,n)}function k(t,e,r,n){return W(V(e),t,r,n)}function I(t,e,r,n){return k(t,e,r,n)}function A(t,e,r,n){return W(G(e),t,r,n)}function E(t,e,r,n){return W(Y(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){var f,u,h,c;switch(a){case 1:s<128&&(o=s);break;case 2:f=t[i+1],128==(192&f)&&(c=(31&s)<<6|63&f)>127&&(o=c);break;case 3:f=t[i+1],u=t[i+2],128==(192&f)&&128==(192&u)&&(c=(15&s)<<12|(63&f)<<6|63&u)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:f=t[i+1],u=t[i+2],h=t[i+3],128==(192&f)&&128==(192&u)&&128==(192&h)&&(c=(15&s)<<18|(63&f)<<12|(63&u)<<6|63&h)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return P(n)}function P(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=$));return r}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=K(t[s]);return i}function T(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function N(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function j(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i<s;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i<s;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function z(t,e,r,n,i){return i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function H(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function V(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Y(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function G(t){return J.toByteArray(H(t))}function W(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function X(t){return t!==t}var J=t("base64-js"),Z=t("ieee754"),Q=t("isarray");r.Buffer=s,r.SlowBuffer=b,r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.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}}(),r.kMaxLength=n(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return o(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return f(null,t,e,r)},s.allocUnsafe=function(t){return u(null,t)},s.allocUnsafeSlow=function(t){return u(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.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}},s.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.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 e=0;e<t;e+=2)m(this,e,e+1);return this},s.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 e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},s.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 e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.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+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,f=Math.min(o,a),u=this.slice(n,i),h=t.slice(e,r),c=0;c<f;++c)if(u[c]!==h[c]){o=u[c],a=h[c];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return I(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},s.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){C(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){C(this,t,e,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return z(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return z(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=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&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=s.isBuffer(t)?t:q(new s(t,n).toString()),f=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%f]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":48,ieee754:49,isarray:50}],48:[function(t,e,r){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function s(t){var e,r,i,s,o,a=t.length;s=n(t),o=new c(3*a/4-s),r=s>0?a-4:a;var f=0;for(e=0;e<r;e+=4)i=h[t.charCodeAt(e)]<<18|h[t.charCodeAt(e+1)]<<12|h[t.charCodeAt(e+2)]<<6|h[t.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=255&i;return 2===s?(i=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,o[f++]=255&i):1===s&&(i=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=255&i),o}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(o(n));return i.join("")}function f(t){for(var e,r=t.length,n=r%3,i="",s=[],o=0,f=r-n;o<f;o+=16383)s.push(a(t,o,o+16383>f?f:o+16383));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),s.push(i),s.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=f;for(var u=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,l=d.length;p<l;++p)u[p]=d[p],h[d.charCodeAt(p)]=p;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},{}],49:[function(t,e,r){r.read=function(t,e,r,n,i){var s,o,a=8*i-n-1,f=(1<<a)-1,u=f>>1,h=-7,c=r?i-1:0,d=r?-1:1,p=t[e+c];for(c+=d,s=p&(1<<-h)-1,p>>=-h,h+=a;h>0;s=256*s+t[e+c],c+=d,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=n;h>0;o=256*o+t[e+c],c+=d,h-=8);if(0===s)s=1-u;else{if(s===f)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=u}return(p?-1:1)*o*Math.pow(2,s-n)},r.write=function(t,e,r,n,i,s){var o,a,f,u=8*s-i-1,h=(1<<u)-1,c=h>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,l=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),e+=o+c>=1?d/f:d*Math.pow(2,1-c),e*f>=2&&(o++,f/=2),o+c>=h?(a=0,o=h):o+c>=1?(a=(e*f-1)*Math.pow(2,i),o+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&a,p+=l,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;t[r+p]=255&o,p+=l,o/=256,u-=8);t[r+p-l]|=128*b}},{}],50:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],51:[function(t,e,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=t("randombytes"),r.createHash=r.Hash=t("create-hash"),r.createHmac=r.Hmac=t("create-hmac");var n=t("browserify-sign/algos"),i=Object.keys(n),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return s};var o=t("pbkdf2");r.pbkdf2=o.pbkdf2,r.pbkdf2Sync=o.pbkdf2Sync;var a=t("browserify-cipher");r.Cipher=a.Cipher,r.createCipher=a.createCipher,r.Cipheriv=a.Cipheriv,r.createCipheriv=a.createCipheriv,r.Decipher=a.Decipher,r.createDecipher=a.createDecipher,r.Decipheriv=a.Decipheriv,r.createDecipheriv=a.createDecipheriv,r.getCiphers=a.getCiphers,r.listCiphers=a.listCiphers;var f=t("diffie-hellman");r.DiffieHellmanGroup=f.DiffieHellmanGroup,r.createDiffieHellmanGroup=f.createDiffieHellmanGroup,r.getDiffieHellman=f.getDiffieHellman,r.createDiffieHellman=f.createDiffieHellman,r.DiffieHellman=f.DiffieHellman;var u=t("browserify-sign");r.createSign=u.createSign,r.Sign=u.Sign,r.createVerify=u.createVerify,r.Verify=u.Verify,r.createECDH=t("create-ecdh");var h=t("public-encrypt");r.publicEncrypt=h.publicEncrypt,r.privateEncrypt=h.privateEncrypt,r.publicDecrypt=h.publicDecrypt,r.privateDecrypt=h.privateDecrypt,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":52,"browserify-sign":86,"browserify-sign/algos":83,"create-ecdh":163,"create-hash":198,"create-hmac":213,"diffie-hellman":227,pbkdf2:234,"public-encrypt":250,randombytes:297}],52:[function(t,e,r){function n(t,e){var r,n;if(t=t.toLowerCase(),d[t])r=d[t].key,n=d[t].iv;else{if(!c[t])throw new TypeError("invalid suite type");r=8*c[t].key,n=c[t].iv}var i=f(e,!1,r,n);return s(t,i.key,i.iv)}function i(t,e){var r,n;if(t=t.toLowerCase(),d[t])r=d[t].key,n=d[t].iv;else{if(!c[t])throw new TypeError("invalid suite type");r=8*c[t].key,n=c[t].iv}var i=f(e,!1,r,n);return o(t,i.key,i.iv)}function s(t,e,r){if(t=t.toLowerCase(),d[t])return u.createCipheriv(t,e,r);if(c[t])return new h({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function o(t,e,r){if(t=t.toLowerCase(),d[t])return u.createDecipheriv(t,e,r);if(c[t])return new h({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function a(){return Object.keys(c).concat(u.getCiphers())}var f=t("evp_bytestokey"),u=t("browserify-aes/browser"),h=t("browserify-des"),c=t("browserify-des/modes"),d=t("browserify-aes/modes");r.createCipher=r.Cipher=n,r.createCipheriv=r.Cipheriv=s,r.createDecipher=r.Decipher=i,r.createDecipheriv=r.Decipheriv=o,r.listCiphers=r.getCiphers=a},{"browserify-aes/browser":55,"browserify-aes/modes":59,"browserify-des":71,"browserify-des/modes":72,evp_bytestokey:82}],53:[function(t,e,r){(function(t){function e(t){var e;return t>a||t<0?(e=Math.abs(t)%a,t<0?a-e:e):t}function n(t){for(;0<t.length;t++)t[0]=0;return!1}function i(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function s(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function o(t){this._key=s(t),this._doReset()}var a=Math.pow(2,32);i.prototype.init=function(){var t,e,r,n,i,s,o,a,f,u;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,f=0,e=u=0;u<256;e=++u)r=f^f<<1^f<<2^f<<3^f<<4,r=r>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,s=t[i],o=t[s],a=t[o],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*o^257*s^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=f=1:(i=s^t[t[t[a^s]]],f^=t[t[f]]);return!0};var f=new i;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var t,e,r,n,i,s;for(r=this._key,e=r.length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n<i;n++)this._keySchedule[n]=n<e?r[n]:(s=this._keySchedule[n-1],n%e==0?(s=s<<8|s>>>24,s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s],s^=f.RCON[n/e|0]<<24):e>6&&n%e==4&&(s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s]),this._keySchedule[n-e]^s);for(this._invKeySchedule=[],t=0;t<i;t++)n=i-t,s=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?s:f.INV_SUB_MIX[0][f.SBOX[s>>>24]]^f.INV_SUB_MIX[1][f.SBOX[s>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[s>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&s]];return!0},o.prototype.encryptBlock=function(e){e=s(new t(e));var r=this._doCryptBlock(e,this._keySchedule,f.SUB_MIX,f.SBOX),n=new t(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},o.prototype.decryptBlock=function(e){e=s(new t(e));var r=[e[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX),i=new t(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},o.prototype._doCryptBlock=function(t,r,n,i){var s,o,a,f,u,h,c,d,p;o=t[0]^r[0],a=t[1]^r[1],f=t[2]^r[2],u=t[3]^r[3],s=4;for(var l=1;l<this._nRounds;l++)h=n[0][o>>>24]^n[1][a>>>16&255]^n[2][f>>>8&255]^n[3][255&u]^r[s++],c=n[0][a>>>24]^n[1][f>>>16&255]^n[2][u>>>8&255]^n[3][255&o]^r[s++],d=n[0][f>>>24]^n[1][u>>>16&255]^n[2][o>>>8&255]^n[3][255&a]^r[s++],p=n[0][u>>>24]^n[1][o>>>16&255]^n[2][a>>>8&255]^n[3][255&f]^r[s++],o=h,a=c,f=d,u=p;return h=(i[o>>>24]<<24|i[a>>>16&255]<<16|i[f>>>8&255]<<8|i[255&u])^r[s++],c=(i[a>>>24]<<24|i[f>>>16&255]<<16|i[u>>>8&255]<<8|i[255&o])^r[s++],d=(i[f>>>24]<<24|i[u>>>16&255]<<16|i[o>>>8&255]<<8|i[255&a])^r[s++],p=(i[u>>>24]<<24|i[o>>>16&255]<<16|i[a>>>8&255]<<8|i[255&f])^r[s++],[e(h),e(c),e(d),e(p)]},r.AES=o}).call(this,t("buffer").Buffer)},{buffer:47}],54:[function(t,e,r){(function(r){function n(t,e,i,a){if(!(this instanceof n))return new n(t,e,i);o.call(this),this._finID=r.concat([i,new r([0,0,0,1])]),i=r.concat([i,new r([0,0,0,2])]),this._cipher=new s.AES(e),this._prev=new r(i.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=a,this._alen=0,this._len=0,i.copy(this._prev),this._mode=t;var u=new r(4);u.fill(0),this._ghash=new f(this._cipher.encryptBlock(u)),this._authTag=null,this._called=!1}function i(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=-1;++i<n;)r+=t[i]^e[i];return r}var s=t("./aes"),o=t("cipher-base"),a=t("inherits"),f=t("./ghash"),u=t("buffer-xor");a(n,o),e.exports=n,n.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=new r(e),e.fill(0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},n.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(i(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=t;this._cipher.scrub()},n.prototype.getAuthTag=function(){if(!this._decrypt&&r.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},n.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},n.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length}}).call(this,t("buffer").Buffer)},{"./aes":53,"./ghash":58,buffer:47,"buffer-xor":67,"cipher-base":68,inherits:358}],55:[function(t,e,r){function n(){return Object.keys(o)}var i=t("./encrypter");r.createCipher=r.Cipher=i.createCipher,r.createCipheriv=r.Cipheriv=i.createCipheriv;var s=t("./decrypter");r.createDecipher=r.Decipher=s.createDecipher,r.createDecipheriv=r.Decipheriv=s.createDecipheriv;var o=t("./modes");r.listCiphers=r.getCiphers=n},{"./decrypter":56,"./encrypter":57,"./modes":59}],56:[function(t,e,r){(function(e){function n(t,r,s){if(!(this instanceof n))return new n(t,r,s);u.call(this),this._cache=new i,this._last=void 0,this._cipher=new f.AES(r),this._prev=new e(s.length),s.copy(this._prev),this._mode=t,this._autopadding=!0}function i(){if(!(this instanceof i))return new i;this.cache=new e("")}function s(t){for(var e=t[15],r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}function o(t,r,i){var s=c[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),
  r.length!==s.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==s.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===s.type?new d(b[s.mode],r,i,!0):"auth"===s.type?new p(b[s.mode],r,i,!0):new n(b[s.mode],r,i)}function a(t,e){var r=c[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=l(e,!1,r.key,r.iv);return o(t,n.key,n.iv)}var f=t("./aes"),u=t("cipher-base"),h=t("inherits"),c=t("./modes"),d=t("./streamCipher"),p=t("./authCipher"),l=t("evp_bytestokey");h(n,u),n.prototype._update=function(t){this._cache.add(t);for(var r,n,i=[];r=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,r),i.push(n);return e.concat(i)},n.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return s(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var b={ECB:t("./modes/ecb"),CBC:t("./modes/cbc"),CFB:t("./modes/cfb"),CFB8:t("./modes/cfb8"),CFB1:t("./modes/cfb1"),OFB:t("./modes/ofb"),CTR:t("./modes/ctr"),GCM:t("./modes/ctr")};r.createDecipher=a,r.createDecipheriv=o}).call(this,t("buffer").Buffer)},{"./aes":53,"./authCipher":54,"./modes":59,"./modes/cbc":60,"./modes/cfb":61,"./modes/cfb1":62,"./modes/cfb8":63,"./modes/ctr":64,"./modes/ecb":65,"./modes/ofb":66,"./streamCipher":70,buffer:47,"cipher-base":68,evp_bytestokey:82,inherits:358}],57:[function(t,e,r){(function(e){function n(t,r,s){if(!(this instanceof n))return new n(t,r,s);f.call(this),this._cache=new i,this._cipher=new a.AES(r),this._prev=new e(s.length),s.copy(this._prev),this._mode=t,this._autopadding=!0}function i(){if(!(this instanceof i))return new i;this.cache=new e("")}function s(t,r,i){var s=h[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),r.length!==s.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==s.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===s.type?new d(l[s.mode],r,i):"auth"===s.type?new p(l[s.mode],r,i):new n(l[s.mode],r,i)}function o(t,e){var r=h[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return s(t,n.key,n.iv)}var a=t("./aes"),f=t("cipher-base"),u=t("inherits"),h=t("./modes"),c=t("evp_bytestokey"),d=t("./streamCipher"),p=t("./authCipher");u(n,f),n.prototype._update=function(t){this._cache.add(t);for(var r,n,i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return e.concat(i)},n.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if("10101010101010101010101010101010"!==t.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){for(var t=16-this.cache.length,r=new e(t),n=-1;++n<t;)r.writeUInt8(t,n);return e.concat([this.cache,r])};var l={ECB:t("./modes/ecb"),CBC:t("./modes/cbc"),CFB:t("./modes/cfb"),CFB8:t("./modes/cfb8"),CFB1:t("./modes/cfb1"),OFB:t("./modes/ofb"),CTR:t("./modes/ctr"),GCM:t("./modes/ctr")};r.createCipheriv=s,r.createCipher=o}).call(this,t("buffer").Buffer)},{"./aes":53,"./authCipher":54,"./modes":59,"./modes/cbc":60,"./modes/cfb":61,"./modes/cfb1":62,"./modes/cfb8":63,"./modes/ctr":64,"./modes/ecb":65,"./modes/ofb":66,"./streamCipher":70,buffer:47,"cipher-base":68,evp_bytestokey:82,inherits:358}],58:[function(t,e,r){(function(t){function r(e){this.h=e,this.state=new t(16),this.state.fill(0),this.cache=new t("")}function n(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function i(e){e=e.map(s);var r=new t(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r}function s(t){var e;return t>f||t<0?(e=Math.abs(t)%f,t<0?f-e:e):t}function o(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}var a=new t(16);a.fill(0),e.exports=r,r.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},r.prototype._multiply=function(){for(var t,e,r,s=n(this.h),a=[0,0,0,0],f=-1;++f<128;){for(e=0!=(this.state[~~(f/8)]&1<<7-f%8),e&&(a=o(a,s)),r=0!=(1&s[3]),t=3;t>0;t--)s[t]=s[t]>>>1|(1&s[t-1])<<31;s[0]=s[0]>>>1,r&&(s[0]=s[0]^225<<24)}this.state=i(a)},r.prototype.update=function(e){this.cache=t.concat([this.cache,e]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(e,r){return this.cache.length&&this.ghash(t.concat([this.cache,a],16)),this.ghash(i([0,e,0,r])),this.state};var f=Math.pow(2,32)}).call(this,t("buffer").Buffer)},{buffer:47}],59:[function(t,e,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],60:[function(t,e,r){var n=t("buffer-xor");r.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},r.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},{"buffer-xor":67}],61:[function(t,e,r){(function(e){function n(t,r,n){var s=r.length,o=i(r,t._cache);return t._cache=t._cache.slice(s),t._prev=e.concat([t._prev,n?r:o]),o}var i=t("buffer-xor");r.encrypt=function(t,r,i){for(var s,o=new e("");r.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=new e("")),!(t._cache.length<=r.length)){o=e.concat([o,n(t,r,i)]);break}s=t._cache.length,o=e.concat([o,n(t,r.slice(0,s),i)]),r=r.slice(s)}return o}}).call(this,t("buffer").Buffer)},{buffer:47,"buffer-xor":67}],62:[function(t,e,r){(function(t){function e(t,e,r){for(var i,s,o,a=-1,f=0;++a<8;)i=t._cipher.encryptBlock(t._prev),s=e&1<<7-a?128:0,o=i[0]^s,f+=(128&o)>>a%8,t._prev=n(t._prev,r?s:o);return f}function n(e,r){var n=e.length,i=-1,s=new t(e.length);for(e=t.concat([e,new t([r])]);++i<n;)s[i]=e[i]<<1|e[i+1]>>7;return s}r.encrypt=function(r,n,i){for(var s=n.length,o=new t(s),a=-1;++a<s;)o[a]=e(r,n[a],i);return o}}).call(this,t("buffer").Buffer)},{buffer:47}],63:[function(t,e,r){(function(t){function e(e,r,n){var i=e._cipher.encryptBlock(e._prev),s=i[0]^r;return e._prev=t.concat([e._prev.slice(1),new t([n?r:s])]),s}r.encrypt=function(r,n,i){for(var s=n.length,o=new t(s),a=-1;++a<s;)o[a]=e(r,n[a],i);return o}}).call(this,t("buffer").Buffer)},{buffer:47}],64:[function(t,e,r){(function(e){function n(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}function i(t){var e=t._cipher.encryptBlock(t._prev);return n(t._prev),e}var s=t("buffer-xor");r.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,i(t)]);var n=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),s(r,n)}}).call(this,t("buffer").Buffer)},{buffer:47,"buffer-xor":67}],65:[function(t,e,r){r.encrypt=function(t,e){return t._cipher.encryptBlock(e)},r.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},{}],66:[function(t,e,r){(function(e){function n(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}var i=t("buffer-xor");r.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,n(t)]);var s=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),i(r,s)}}).call(this,t("buffer").Buffer)},{buffer:47,"buffer-xor":67}],67:[function(t,e,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),s=0;s<n;++s)i[s]=e[s]^r[s];return i}}).call(this,t("buffer").Buffer)},{buffer:47}],68:[function(t,e,r){function n(t){s.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var i=t("safe-buffer").Buffer,s=t("stream").Transform,o=t("string_decoder").StringDecoder;t("inherits")(n,s),n.prototype.update=function(t,e,r){"string"==typeof t&&(t=i.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},n.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},n.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},n.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},e.exports=n},{inherits:358,"safe-buffer":69,stream:326,string_decoder:327}],69:[function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return o(t,e,r)}var s=t("buffer"),o=s.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=s:(n(s,r),r.Buffer=i),n(o,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return s.SlowBuffer(t)}},{buffer:47}],70:[function(t,e,r){(function(r){function n(t,e,o,a){if(!(this instanceof n))return new n(t,e,o);s.call(this),this._cipher=new i.AES(e),this._prev=new r(o.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=a,o.copy(this._prev),this._mode=t}var i=t("./aes"),s=t("cipher-base");t("inherits")(n,s),e.exports=n,n.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},n.prototype._final=function(){this._cipher.scrub()}}).call(this,t("buffer").Buffer)},{"./aes":53,buffer:47,"cipher-base":68,inherits:358}],71:[function(t,e,r){(function(r){function n(t){i.call(this);var e,n=t.mode.toLowerCase(),s=a[n];e=t.decrypt?"decrypt":"encrypt";var o=t.key;"des-ede"!==n&&"des-ede-cbc"!==n||(o=r.concat([o,o.slice(0,8)]));var f=t.iv;this._des=s.create({key:o,iv:f,type:e})}var i=t("cipher-base"),s=t("des.js"),o=t("inherits"),a={"des-ede3-cbc":s.CBC.instantiate(s.EDE),"des-ede3":s.EDE,"des-ede-cbc":s.CBC.instantiate(s.EDE),"des-ede":s.EDE,"des-cbc":s.CBC.instantiate(s.DES),"des-ecb":s.DES};a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=n,o(n,i),n.prototype._update=function(t){return new r(this._des.update(t))},n.prototype._final=function(){return new r(this._des.final())}}).call(this,t("buffer").Buffer)},{buffer:47,"cipher-base":73,"des.js":75,inherits:358}],72:[function(t,e,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],73:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{dup:68,inherits:358,"safe-buffer":74,stream:326,string_decoder:327}],74:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],75:[function(t,e,r){"use strict";r.utils=t("./des/utils"),r.Cipher=t("./des/cipher"),r.DES=t("./des/des"),r.CBC=t("./des/cbc"),r.EDE=t("./des/ede")},{"./des/cbc":76,"./des/cipher":77,"./des/des":78,"./des/ede":79,"./des/utils":80}],76:[function(t,e,r){"use strict";function n(t){s.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function i(t){function e(e){t.call(this,e),this._cbcInit()}o(e,t);for(var r=Object.keys(a),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=a[i]}return e.create=function(t){return new e(t)},e}var s=t("minimalistic-assert"),o=t("inherits"),a={};r.instantiate=i,a._cbcInit=function(){var t=new n(this.options.iv);this._cbcState=t},a._update=function(t,e,r,n){var i=this._cbcState,s=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)o[a]^=t[e+a];s._update.call(this,o,0,r,n);for(var a=0;a<this.blockSize;a++)o[a]=r[n+a]}else{s._update.call(this,t,e,r,n);for(var a=0;a<this.blockSize;a++)r[n+a]^=o[a];for(var a=0;a<this.blockSize;a++)o[a]=t[e+a]}}},{inherits:358,"minimalistic-assert":81}],77:[function(t,e,r){"use strict";function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var i=t("minimalistic-assert");e.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},n.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var s=t.length-(t.length-e)%this.blockSize;e<s;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},n.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},n.prototype.final=function(t){var e;t&&(e=this.update(t));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},n.prototype._unpad=function(t){return t},n.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},{"minimalistic-assert":81}],78:[function(t,e,r){"use strict";function n(){this.tmp=new Array(2),this.keys=null}function i(t){u.call(this,t);var e=new n;this._desState=e,this.deriveKeys(e,t.key)}var s=t("minimalistic-assert"),o=t("inherits"),a=t("../des"),f=a.utils,u=a.Cipher;o(i,u),e.exports=i,i.create=function(t){return new i(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];i.prototype.deriveKeys=function(t,e){t.keys=new Array(32),s.equal(e.length,this.blockSize,"Invalid key length");var r=f.readUInt32BE(e,0),n=f.readUInt32BE(e,4);f.pc1(r,n,t.tmp,0),r=t.tmp[0],n=t.tmp[1];for(var i=0;i<t.keys.length;i+=2){var o=h[i>>>1];r=f.r28shl(r,o),n=f.r28shl(n,o),f.pc2(r,n,t.keys,i)}},i.prototype._update=function(t,e,r,n){var i=this._desState,s=f.readUInt32BE(t,e),o=f.readUInt32BE(t,e+4);f.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],f.writeUInt32BE(r,s,n),f.writeUInt32BE(r,o,n+4)},i.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},i.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)s.equal(t[r],e);return t.slice(0,t.length-e)},i.prototype._encrypt=function(t,e,r,n,i){for(var s=e,o=r,a=0;a<t.keys.length;a+=2){var u=t.keys[a],h=t.keys[a+1];f.expand(o,t.tmp,0),u^=t.tmp[0],h^=t.tmp[1];var c=f.substitute(u,h),d=f.permute(c),p=o;o=(s^d)>>>0,s=p}f.rip(o,s,n,i)},i.prototype._decrypt=function(t,e,r,n,i){for(var s=r,o=e,a=t.keys.length-2;a>=0;a-=2){var u=t.keys[a],h=t.keys[a+1];f.expand(s,t.tmp,0),u^=t.tmp[0],h^=t.tmp[1];var c=f.substitute(u,h),d=f.permute(c),p=s;s=(o^d)>>>0,o=p}f.rip(s,o,n,i)}},{"../des":75,inherits:358,"minimalistic-assert":81}],79:[function(t,e,r){"use strict";function n(t,e){s.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);this.ciphers="encrypt"===t?[u.create({type:"encrypt",key:r}),u.create({type:"decrypt",key:n}),u.create({type:"encrypt",key:i})]:[u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:r})]}function i(t){f.call(this,t);var e=new n(this.type,this.options.key);this._edeState=e}var s=t("minimalistic-assert"),o=t("inherits"),a=t("../des"),f=a.Cipher,u=a.DES;o(i,f),e.exports=i,i.create=function(t){return new i(t)},i.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},i.prototype._pad=u.prototype._pad,i.prototype._unpad=u.prototype._unpad},{"../des":75,inherits:358,"minimalistic-assert":81}],80:[function(t,e,r){"use strict";r.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},r.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},r.ip=function(t,e,r,n){for(var i=0,s=0,o=6;o>=0;o-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+o&1;for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+o&1}for(var o=6;o>=0;o-=2){for(var a=1;a<=25;a+=8)s<<=1,s|=e>>>a+o&1;for(var a=1;a<=25;a+=8)s<<=1,s|=t>>>a+o&1}r[n+0]=i>>>0,r[n+1]=s>>>0},r.rip=function(t,e,r,n){for(var i=0,s=0,o=0;o<4;o++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+o&1,i<<=1,i|=t>>>a+o&1;for(var o=4;o<8;o++)for(var a=24;a>=0;a-=8)s<<=1,s|=e>>>a+o&1,s<<=1,s|=t>>>a+o&1;r[n+0]=i>>>0,r[n+1]=s>>>0},r.pc1=function(t,e,r,n){for(var i=0,s=0,o=7;o>=5;o--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+o&1;for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+o&1}for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+o&1;for(var o=1;o<=3;o++){for(var a=0;a<=24;a+=8)s<<=1,s|=e>>a+o&1;for(var a=0;a<=24;a+=8)s<<=1,s|=t>>a+o&1}for(var a=0;a<=24;a+=8)s<<=1,s|=t>>a+o&1;r[n+0]=i>>>0,r[n+1]=s>>>0},r.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(t,e,r,i){for(var s=0,o=0,a=n.length>>>1,f=0;f<a;f++)s<<=1,s|=t>>>n[f]&1;for(var f=a;f<n.length;f++)o<<=1,o|=e>>>n[f]&1;r[i+0]=s>>>0,r[i+1]=o>>>0},r.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var s=23;s>=15;s-=4)n<<=6,n|=t>>>s&63;for(var s=11;s>=3;s-=4)i|=t>>>s&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(t,e){for(var r=0,n=0;n<4;n++){var s=t>>>18-6*n&63,o=i[64*n+s];r<<=4,r|=o}for(var n=0;n<4;n++){var s=e>>>18-6*n&63,o=i[256+64*n+s];r<<=4,r|=o}return r>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(t){for(var e=0,r=0;r<s.length;r++)e<<=1,e|=t>>>s[r]&1;return e>>>0},r.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],s=0;s<e;s+=r)i.push(n.slice(s,s+r));return i.join(" ")}},{}],81:[function(t,e,r){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}e.exports=n,n.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},{}],82:[function(t,e,r){(function(r){function n(t,e,n,s){r.isBuffer(t)||(t=new r(t,"binary")),e&&!r.isBuffer(e)&&(e=new r(e,"binary")),n/=8,s=s||0;for(var o,a,f=0,u=0,h=new r(n),c=new r(s),d=0,p=[];;){if(d++>0&&p.push(o),p.push(t),e&&p.push(e),o=i(r.concat(p)),p=[],a=0,n>0)for(;;){if(0===n)break;if(a===o.length)break;h[f++]=o[a],n--,a++}if(s>0&&a!==o.length)for(;;){if(0===s)break;if(a===o.length)break;c[u++]=o[a],s--,a++}if(0===n&&0===s)break}for(a=0;a<o.length;a++)o[a]=0;return{key:h,iv:c}}var i=t("create-hash/md5");e.exports=n}).call(this,t("buffer").Buffer)},{buffer:47,"create-hash/md5":200}],83:[function(t,e,r){e.exports=t("./browser/algorithms.json")},{"./browser/algorithms.json":84}],84:[function(t,e,r){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],85:[function(t,e,r){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],86:[function(t,e,r){(function(r){function n(t){f.Writable.call(this);var e=d[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=a(e.hash),this._tag=e.id,this._signType=e.sign}function i(t){f.Writable.call(this);var e=d[t];if(!e)throw new Error("Unknown message digest");this._hash=a(e.hash),this._tag=e.id,this._signType=e.sign}function s(t){return new n(t)}function o(t){return new i(t)}var a=t("create-hash"),f=t("stream"),u=t("inherits"),h=t("./sign"),c=t("./verify"),d=t("./algorithms.json");Object.keys(d).forEach(function(t){d[t].id=new r(d[t].id,"hex"),d[t.toLowerCase()]=d[t]}),u(n,f.Writable),n.prototype._write=function(t,e,r){this._hash.update(t),r()},n.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},n.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=h(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},u(i,f.Writable),i.prototype._write=function(t,e,r){this._hash.update(t),r()},i.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},i.prototype.verify=function(t,e,n){"string"==typeof e&&(e=new r(e,n)),this.end();var i=this._hash.digest();return c(e,i,t,this._signType,this._tag)},e.exports={Sign:s,Verify:o,createSign:s,createVerify:o}}).call(this,t("buffer").Buffer)},{"./algorithms.json":84,"./sign":87,"./verify":88,buffer:47,"create-hash":198,inherits:358,stream:326}],87:[function(t,e,r){(function(r){function n(t,e,n,o,a){var f=g(e);if(f.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return i(t,f)}if("dsa"===f.type){if("dsa"!==o)throw new Error("wrong private key type");return s(t,f,n)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");t=r.concat([a,t]);for(var u=f.modulus.byteLength(),h=[0,1];t.length+h.length+1<u;)h.push(255);h.push(0);for(var c=-1;++c<t.length;)h.push(t[c]);return p(h,f)}function i(t,e){var n=y[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new l(n),s=i.keyFromPrivate(e.privateKey),o=s.sign(t);return new r(o.toDER())}function s(t,e,r){for(var n,i=e.params.priv_key,s=e.params.p,u=e.params.q,d=e.params.g,p=new b(0),l=f(t,u).mod(u),g=!1,y=a(i,u,t,r);!1===g;)n=h(u,y,r),p=c(d,n,s,u),g=n.invm(u).imul(l.add(i.mul(p))).mod(u),0===g.cmpn(0)&&(g=!1,p=new b(0));return o(p,g)}function o(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var n=t.length+e.length+4,i=[48,n,2,t.length];return i=i.concat(t,[2,e.length],e),new r(i)}function a(t,e,n,i){if(t=new r(t.toArray()),t.length<e.byteLength()){var s=new r(e.byteLength()-t.length);s.fill(0),t=r.concat([s,t])}var o=n.length,a=u(n,e),f=new r(o);f.fill(1);var h=new r(o);return h.fill(0),h=d(i,h).update(f).update(new r([0])).update(t).update(a).digest(),f=d(i,h).update(f).digest(),h=d(i,h).update(f).update(new r([1])).update(t).update(a).digest(),f=d(i,h).update(f).digest(),{k:h,v:f}}function f(t,e){var r=new b(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function u(t,e){t=f(t,e),t=t.mod(e);var n=new r(t.toArray());if(n.length<e.byteLength()){var i=new r(e.byteLength()-n.length);i.fill(0),n=r.concat([i,n])}return n}function h(t,e,n){var i,s;do{for(i=new r(0);8*i.length<t.bitLength();)e.v=d(n,e.k).update(e.v).digest(),i=r.concat([i,e.v]);s=f(i,t),e.k=d(n,e.k).update(e.v).update(new r([0])).digest(),e.v=d(n,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function c(t,e,r,n){return t.toRed(b.mont(r)).redPow(e).fromRed().mod(n)}var d=t("create-hmac"),p=t("browserify-rsa"),l=t("elliptic").ec,b=t("bn.js"),g=t("parse-asn1"),y=t("./curves.json");e.exports=n,e.exports.getKey=a,e.exports.makeKey=h}).call(this,t("buffer").Buffer)},{"./curves.json":85,"bn.js":89,"browserify-rsa":90,buffer:47,"create-hmac":213,elliptic:91,"parse-asn1":128}],88:[function(t,e,r){(function(r){function n(t,e,n,o,f){var h=u(n);if("ec"===h.type){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");return i(t,e,h)}if("dsa"===h.type){if("dsa"!==o)throw new Error("wrong public key type");return s(t,e,h)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong public key type");e=r.concat([f,e]);for(var c=h.modulus.byteLength(),d=[1],p=0;e.length+d.length+2<c;)d.push(255),p++;d.push(0);for(var l=-1;++l<e.length;)d.push(e[l]);d=new r(d);var b=a.mont(h.modulus);t=new a(t).toRed(b),t=t.redPow(new a(h.publicExponent)),t=new r(t.fromRed().toArray());var g=p<8?1:0;for(c=Math.min(t.length,d.length),t.length!==d.length&&(g=1),l=-1;++l<c;)g|=t[l]^d[l];return 0===g}function i(t,e,r){var n=h[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new f(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}function s(t,e,r){var n=r.data.p,i=r.data.q,s=r.data.g,f=r.data.pub_key,h=u.signature.decode(t,"der"),c=h.s,d=h.r;o(c,i),o(d,i);var p=a.mont(n),l=c.invm(i);return 0===s.toRed(p).redPow(new a(e).mul(l).mod(i)).fromRed().mul(f.toRed(p).redPow(d.mul(l).mod(i)).fromRed()).mod(n).mod(i).cmp(d)}function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}var a=t("bn.js"),f=t("elliptic").ec,u=t("parse-asn1"),h=t("./curves.json");e.exports=n}).call(this,t("buffer").Buffer)},{"./curves.json":85,"bn.js":89,buffer:47,elliptic:91,"parse-asn1":128}],89:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function s(t,e,r){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}function o(t,e,r){for(var n=0,i=Math.min(t.length,r),s=e;s<i;s++){var o=t.charCodeAt(s)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function a(t,e,r,n){for(var i=0,s=Math.min(t.length,r),o=e;o<s;o++){var a=t.charCodeAt(o)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function f(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative
  ;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],s=0|e.words[0],o=i*s,a=67108863&o,f=o/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var h=f>>>26,c=67108863&f,d=Math.min(u,e.length-1),p=Math.max(0,u-t.length+1);p<=d;p++){var l=u-p|0;i=0|t.words[l],s=0|e.words[p],o=i*s+c,h+=o/67108864|0,c=67108863&o}r.words[u]=0|c,f=0|h}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}function h(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var o=i;i=0;for(var a=67108863&n,f=Math.min(s,e.length-1),u=Math.max(0,s-t.length+1);u<=f;u++){var h=s-u,c=0|t.words[h],d=0|e.words[u],p=c*d,l=67108863&p;o=o+(p/67108864|0)|0,l=l+a|0,a=67108863&l,o=o+(l>>>26)|0,i+=o>>>26,o&=67108863}r.words[s]=a,n=o,o=i}return 0!==n?r.words[s]=n:r.length--,r.strip()}function c(t,e,r){return(new d).mulp(t,e,r)}function d(t,e){this.x=t,this.y=e}function p(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function l(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function y(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function m(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function v(t){m.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var _;try{_=t("buffer").Buffer}catch(t){}s.isBN=function(t){return t instanceof s||null!==t&&"object"==typeof t&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},s.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},s.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===r)for(i=t.length-1,s=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(i=0,s=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,s=0;for(r=t.length-6,n=0;r>=e;r-=6)i=o(t,r,r+6),this.words[n]|=i<<s&67108863,this.words[n+1]|=i>>>26-s&4194303,(s+=24)>=26&&(s-=26,n++);r+6!==e&&(i=o(t,e,r+6),this.words[n]|=i<<s&67108863,this.words[n+1]|=i>>>26-s&4194303),this.strip()},s.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var s=t.length-r,o=s%n,f=Math.min(s,s-o)+r,u=0,h=r;h<f;h+=n)u=a(t,h,h+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var c=1;for(u=a(t,h,t.length,e),h=0;h<o;h++)c*=e;this.imuln(c),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],S=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],f=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,r=0!==s||o!==this.length-1?w[6-f.length]+f+r:f+r,i+=2,i>=26&&(i-=26,o--)}for(0!==s&&(r=s.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=S[t],h=k[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var d=c.modn(h).toString(t);c=c.idivn(h),r=c.isZero()?d+r:w[u-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(t,e){return n(void 0!==_),this.toArrayLike(_,t,e)},s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},s.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),s=r||Math.max(1,i);n(i<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var o,a,f="le"===e,u=new t(s),h=this.clone();if(f){for(a=0;!h.isZero();a++)o=h.andln(255),h.iushrn(8),u[a]=o;for(;a<s;a++)u[a]=0}else{for(a=0;a<s-i;a++)u[a]=0;for(a=0;!h.isZero();a++)o=h.andln(255),h.iushrn(8),u[s-a-1]=o}return u},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},s.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},s.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},s.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},s.prototype.iadd=function(t){var e;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();var r,n;this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,s=0;s<n.length;s++)e=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&e,i=e>>>26;for(;0!==i&&s<r.length;s++)e=(0|r.words[s])+i,this.words[s]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var s=0,o=0;o<i.length;o++)e=(0|n.words[o])-(0|i.words[o])+s,s=e>>26,this.words[o]=67108863&e;for(;0!==s&&o<n.length;o++)e=(0|n.words[o])+s,s=e>>26,this.words[o]=67108863&e;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var I=function(t,e,r){var n,i,s,o=t.words,a=e.words,f=r.words,u=0,h=0|o[0],c=8191&h,d=h>>>13,p=0|o[1],l=8191&p,b=p>>>13,g=0|o[2],y=8191&g,m=g>>>13,v=0|o[3],_=8191&v,w=v>>>13,S=0|o[4],k=8191&S,I=S>>>13,A=0|o[5],E=8191&A,x=A>>>13,O=0|o[6],P=8191&O,B=O>>>13,M=0|o[7],R=8191&M,T=M>>>13,N=0|o[8],C=8191&N,j=N>>>13,U=0|o[9],L=8191&U,D=U>>>13,z=0|a[0],H=8191&z,F=z>>>13,K=0|a[1],q=8191&K,V=K>>>13,Y=0|a[2],G=8191&Y,W=Y>>>13,X=0|a[3],J=8191&X,Z=X>>>13,Q=0|a[4],$=8191&Q,tt=Q>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],st=8191&it,ot=it>>>13,at=0|a[7],ft=8191&at,ut=at>>>13,ht=0|a[8],ct=8191&ht,dt=ht>>>13,pt=0|a[9],lt=8191&pt,bt=pt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(c,H),i=Math.imul(c,F),i=i+Math.imul(d,H)|0,s=Math.imul(d,F);var gt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(l,H),i=Math.imul(l,F),i=i+Math.imul(b,H)|0,s=Math.imul(b,F),n=n+Math.imul(c,q)|0,i=i+Math.imul(c,V)|0,i=i+Math.imul(d,q)|0,s=s+Math.imul(d,V)|0;var yt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,H),i=Math.imul(y,F),i=i+Math.imul(m,H)|0,s=Math.imul(m,F),n=n+Math.imul(l,q)|0,i=i+Math.imul(l,V)|0,i=i+Math.imul(b,q)|0,s=s+Math.imul(b,V)|0,n=n+Math.imul(c,G)|0,i=i+Math.imul(c,W)|0,i=i+Math.imul(d,G)|0,s=s+Math.imul(d,W)|0;var mt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(_,H),i=Math.imul(_,F),i=i+Math.imul(w,H)|0,s=Math.imul(w,F),n=n+Math.imul(y,q)|0,i=i+Math.imul(y,V)|0,i=i+Math.imul(m,q)|0,s=s+Math.imul(m,V)|0,n=n+Math.imul(l,G)|0,i=i+Math.imul(l,W)|0,i=i+Math.imul(b,G)|0,s=s+Math.imul(b,W)|0,n=n+Math.imul(c,J)|0,i=i+Math.imul(c,Z)|0,i=i+Math.imul(d,J)|0,s=s+Math.imul(d,Z)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(k,H),i=Math.imul(k,F),i=i+Math.imul(I,H)|0,s=Math.imul(I,F),n=n+Math.imul(_,q)|0,i=i+Math.imul(_,V)|0,i=i+Math.imul(w,q)|0,s=s+Math.imul(w,V)|0,n=n+Math.imul(y,G)|0,i=i+Math.imul(y,W)|0,i=i+Math.imul(m,G)|0,s=s+Math.imul(m,W)|0,n=n+Math.imul(l,J)|0,i=i+Math.imul(l,Z)|0,i=i+Math.imul(b,J)|0,s=s+Math.imul(b,Z)|0,n=n+Math.imul(c,$)|0,i=i+Math.imul(c,tt)|0,i=i+Math.imul(d,$)|0,s=s+Math.imul(d,tt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,H),i=Math.imul(E,F),i=i+Math.imul(x,H)|0,s=Math.imul(x,F),n=n+Math.imul(k,q)|0,i=i+Math.imul(k,V)|0,i=i+Math.imul(I,q)|0,s=s+Math.imul(I,V)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(w,G)|0,s=s+Math.imul(w,W)|0,n=n+Math.imul(y,J)|0,i=i+Math.imul(y,Z)|0,i=i+Math.imul(m,J)|0,s=s+Math.imul(m,Z)|0,n=n+Math.imul(l,$)|0,i=i+Math.imul(l,tt)|0,i=i+Math.imul(b,$)|0,s=s+Math.imul(b,tt)|0,n=n+Math.imul(c,rt)|0,i=i+Math.imul(c,nt)|0,i=i+Math.imul(d,rt)|0,s=s+Math.imul(d,nt)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(P,H),i=Math.imul(P,F),i=i+Math.imul(B,H)|0,s=Math.imul(B,F),n=n+Math.imul(E,q)|0,i=i+Math.imul(E,V)|0,i=i+Math.imul(x,q)|0,s=s+Math.imul(x,V)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(I,G)|0,s=s+Math.imul(I,W)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Z)|0,i=i+Math.imul(w,J)|0,s=s+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=i+Math.imul(y,tt)|0,i=i+Math.imul(m,$)|0,s=s+Math.imul(m,tt)|0,n=n+Math.imul(l,rt)|0,i=i+Math.imul(l,nt)|0,i=i+Math.imul(b,rt)|0,s=s+Math.imul(b,nt)|0,n=n+Math.imul(c,st)|0,i=i+Math.imul(c,ot)|0,i=i+Math.imul(d,st)|0,s=s+Math.imul(d,ot)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(R,H),i=Math.imul(R,F),i=i+Math.imul(T,H)|0,s=Math.imul(T,F),n=n+Math.imul(P,q)|0,i=i+Math.imul(P,V)|0,i=i+Math.imul(B,q)|0,s=s+Math.imul(B,V)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(x,G)|0,s=s+Math.imul(x,W)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Z)|0,i=i+Math.imul(I,J)|0,s=s+Math.imul(I,Z)|0,n=n+Math.imul(_,$)|0,i=i+Math.imul(_,tt)|0,i=i+Math.imul(w,$)|0,s=s+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=i+Math.imul(y,nt)|0,i=i+Math.imul(m,rt)|0,s=s+Math.imul(m,nt)|0,n=n+Math.imul(l,st)|0,i=i+Math.imul(l,ot)|0,i=i+Math.imul(b,st)|0,s=s+Math.imul(b,ot)|0,n=n+Math.imul(c,ft)|0,i=i+Math.imul(c,ut)|0,i=i+Math.imul(d,ft)|0,s=s+Math.imul(d,ut)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,H),i=Math.imul(C,F),i=i+Math.imul(j,H)|0,s=Math.imul(j,F),n=n+Math.imul(R,q)|0,i=i+Math.imul(R,V)|0,i=i+Math.imul(T,q)|0,s=s+Math.imul(T,V)|0,n=n+Math.imul(P,G)|0,i=i+Math.imul(P,W)|0,i=i+Math.imul(B,G)|0,s=s+Math.imul(B,W)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Z)|0,i=i+Math.imul(x,J)|0,s=s+Math.imul(x,Z)|0,n=n+Math.imul(k,$)|0,i=i+Math.imul(k,tt)|0,i=i+Math.imul(I,$)|0,s=s+Math.imul(I,tt)|0,n=n+Math.imul(_,rt)|0,i=i+Math.imul(_,nt)|0,i=i+Math.imul(w,rt)|0,s=s+Math.imul(w,nt)|0,n=n+Math.imul(y,st)|0,i=i+Math.imul(y,ot)|0,i=i+Math.imul(m,st)|0,s=s+Math.imul(m,ot)|0,n=n+Math.imul(l,ft)|0,i=i+Math.imul(l,ut)|0,i=i+Math.imul(b,ft)|0,s=s+Math.imul(b,ut)|0,n=n+Math.imul(c,ct)|0,i=i+Math.imul(c,dt)|0,i=i+Math.imul(d,ct)|0,s=s+Math.imul(d,dt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,H),i=Math.imul(L,F),i=i+Math.imul(D,H)|0,s=Math.imul(D,F),n=n+Math.imul(C,q)|0,i=i+Math.imul(C,V)|0,i=i+Math.imul(j,q)|0,s=s+Math.imul(j,V)|0,n=n+Math.imul(R,G)|0,i=i+Math.imul(R,W)|0,i=i+Math.imul(T,G)|0,s=s+Math.imul(T,W)|0,n=n+Math.imul(P,J)|0,i=i+Math.imul(P,Z)|0,i=i+Math.imul(B,J)|0,s=s+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=i+Math.imul(E,tt)|0,i=i+Math.imul(x,$)|0,s=s+Math.imul(x,tt)|0,n=n+Math.imul(k,rt)|0,i=i+Math.imul(k,nt)|0,i=i+Math.imul(I,rt)|0,s=s+Math.imul(I,nt)|0,n=n+Math.imul(_,st)|0,i=i+Math.imul(_,ot)|0,i=i+Math.imul(w,st)|0,s=s+Math.imul(w,ot)|0,n=n+Math.imul(y,ft)|0,i=i+Math.imul(y,ut)|0,i=i+Math.imul(m,ft)|0,s=s+Math.imul(m,ut)|0,n=n+Math.imul(l,ct)|0,i=i+Math.imul(l,dt)|0,i=i+Math.imul(b,ct)|0,s=s+Math.imul(b,dt)|0,n=n+Math.imul(c,lt)|0,i=i+Math.imul(c,bt)|0,i=i+Math.imul(d,lt)|0,s=s+Math.imul(d,bt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,q),i=Math.imul(L,V),i=i+Math.imul(D,q)|0,s=Math.imul(D,V),n=n+Math.imul(C,G)|0,i=i+Math.imul(C,W)|0,i=i+Math.imul(j,G)|0,s=s+Math.imul(j,W)|0,n=n+Math.imul(R,J)|0,i=i+Math.imul(R,Z)|0,i=i+Math.imul(T,J)|0,s=s+Math.imul(T,Z)|0,n=n+Math.imul(P,$)|0,i=i+Math.imul(P,tt)|0,i=i+Math.imul(B,$)|0,s=s+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=i+Math.imul(E,nt)|0,i=i+Math.imul(x,rt)|0,s=s+Math.imul(x,nt)|0,n=n+Math.imul(k,st)|0,i=i+Math.imul(k,ot)|0,i=i+Math.imul(I,st)|0,s=s+Math.imul(I,ot)|0,n=n+Math.imul(_,ft)|0,i=i+Math.imul(_,ut)|0,i=i+Math.imul(w,ft)|0,s=s+Math.imul(w,ut)|0,n=n+Math.imul(y,ct)|0,i=i+Math.imul(y,dt)|0,i=i+Math.imul(m,ct)|0,s=s+Math.imul(m,dt)|0,n=n+Math.imul(l,lt)|0,i=i+Math.imul(l,bt)|0,i=i+Math.imul(b,lt)|0,s=s+Math.imul(b,bt)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,G),i=Math.imul(L,W),i=i+Math.imul(D,G)|0,s=Math.imul(D,W),n=n+Math.imul(C,J)|0,i=i+Math.imul(C,Z)|0,i=i+Math.imul(j,J)|0,s=s+Math.imul(j,Z)|0,n=n+Math.imul(R,$)|0,i=i+Math.imul(R,tt)|0,i=i+Math.imul(T,$)|0,s=s+Math.imul(T,tt)|0,n=n+Math.imul(P,rt)|0,i=i+Math.imul(P,nt)|0,i=i+Math.imul(B,rt)|0,s=s+Math.imul(B,nt)|0,n=n+Math.imul(E,st)|0,i=i+Math.imul(E,ot)|0,i=i+Math.imul(x,st)|0,s=s+Math.imul(x,ot)|0,n=n+Math.imul(k,ft)|0,i=i+Math.imul(k,ut)|0,i=i+Math.imul(I,ft)|0,s=s+Math.imul(I,ut)|0,n=n+Math.imul(_,ct)|0,i=i+Math.imul(_,dt)|0,i=i+Math.imul(w,ct)|0,s=s+Math.imul(w,dt)|0,n=n+Math.imul(y,lt)|0,i=i+Math.imul(y,bt)|0,i=i+Math.imul(m,lt)|0,s=s+Math.imul(m,bt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,J),i=Math.imul(L,Z),i=i+Math.imul(D,J)|0,s=Math.imul(D,Z),n=n+Math.imul(C,$)|0,i=i+Math.imul(C,tt)|0,i=i+Math.imul(j,$)|0,s=s+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=i+Math.imul(R,nt)|0,i=i+Math.imul(T,rt)|0,s=s+Math.imul(T,nt)|0,n=n+Math.imul(P,st)|0,i=i+Math.imul(P,ot)|0,i=i+Math.imul(B,st)|0,s=s+Math.imul(B,ot)|0,n=n+Math.imul(E,ft)|0,i=i+Math.imul(E,ut)|0,i=i+Math.imul(x,ft)|0,s=s+Math.imul(x,ut)|0,n=n+Math.imul(k,ct)|0,i=i+Math.imul(k,dt)|0,i=i+Math.imul(I,ct)|0,s=s+Math.imul(I,dt)|0,n=n+Math.imul(_,lt)|0,i=i+Math.imul(_,bt)|0,i=i+Math.imul(w,lt)|0,s=s+Math.imul(w,bt)|0;var Ot=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,$),i=Math.imul(L,tt),i=i+Math.imul(D,$)|0,s=Math.imul(D,tt),n=n+Math.imul(C,rt)|0,i=i+Math.imul(C,nt)|0,i=i+Math.imul(j,rt)|0,s=s+Math.imul(j,nt)|0,n=n+Math.imul(R,st)|0,i=i+Math.imul(R,ot)|0,i=i+Math.imul(T,st)|0,s=s+Math.imul(T,ot)|0,n=n+Math.imul(P,ft)|0,i=i+Math.imul(P,ut)|0,i=i+Math.imul(B,ft)|0,s=s+Math.imul(B,ut)|0,n=n+Math.imul(E,ct)|0,i=i+Math.imul(E,dt)|0,i=i+Math.imul(x,ct)|0,s=s+Math.imul(x,dt)|0,n=n+Math.imul(k,lt)|0,i=i+Math.imul(k,bt)|0,i=i+Math.imul(I,lt)|0,s=s+Math.imul(I,bt)|0;var Pt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,rt),i=Math.imul(L,nt),i=i+Math.imul(D,rt)|0,s=Math.imul(D,nt),n=n+Math.imul(C,st)|0,i=i+Math.imul(C,ot)|0,i=i+Math.imul(j,st)|0,s=s+Math.imul(j,ot)|0,n=n+Math.imul(R,ft)|0,i=i+Math.imul(R,ut)|0,i=i+Math.imul(T,ft)|0,s=s+Math.imul(T,ut)|0,n=n+Math.imul(P,ct)|0,i=i+Math.imul(P,dt)|0,i=i+Math.imul(B,ct)|0,s=s+Math.imul(B,dt)|0,n=n+Math.imul(E,lt)|0,i=i+Math.imul(E,bt)|0,i=i+Math.imul(x,lt)|0,s=s+Math.imul(x,bt)|0;var Bt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(L,st),i=Math.imul(L,ot),i=i+Math.imul(D,st)|0,s=Math.imul(D,ot),n=n+Math.imul(C,ft)|0,i=i+Math.imul(C,ut)|0,i=i+Math.imul(j,ft)|0,s=s+Math.imul(j,ut)|0,n=n+Math.imul(R,ct)|0,i=i+Math.imul(R,dt)|0,i=i+Math.imul(T,ct)|0,s=s+Math.imul(T,dt)|0,n=n+Math.imul(P,lt)|0,i=i+Math.imul(P,bt)|0,i=i+Math.imul(B,lt)|0,s=s+Math.imul(B,bt)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,ft),i=Math.imul(L,ut),i=i+Math.imul(D,ft)|0,s=Math.imul(D,ut),n=n+Math.imul(C,ct)|0,i=i+Math.imul(C,dt)|0,i=i+Math.imul(j,ct)|0,s=s+Math.imul(j,dt)|0,n=n+Math.imul(R,lt)|0,i=i+Math.imul(R,bt)|0,i=i+Math.imul(T,lt)|0,s=s+Math.imul(T,bt)|0;var Rt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,ct),i=Math.imul(L,dt),i=i+Math.imul(D,ct)|0,s=Math.imul(D,dt),n=n+Math.imul(C,lt)|0,i=i+Math.imul(C,bt)|0,i=i+Math.imul(j,lt)|0,s=s+Math.imul(j,bt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(s+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,lt),i=Math.imul(L,bt),i=i+Math.imul(D,lt)|0,s=Math.imul(D,bt);var Nt=(u+n|0)+((8191&i)<<13)|0;return u=(s+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,f[0]=gt,f[1]=yt,f[2]=mt,f[3]=vt,f[4]=_t,f[5]=wt,f[6]=St,f[7]=kt,f[8]=It,f[9]=At,f[10]=Et,f[11]=xt,f[12]=Ot,f[13]=Pt,f[14]=Bt,f[15]=Mt,f[16]=Rt,f[17]=Tt,f[18]=Nt,0!==u&&(f[19]=u,r.length++),r};Math.imul||(I=u),s.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?I(this,t,e):r<63?u(this,t,e):r<1024?h(this,t,e):c(this,t,e)},d.prototype.makeRBT=function(t){for(var e=new Array(t),r=s.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},d.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},d.prototype.permute=function(t,e,r,n,i,s){for(var o=0;o<s;o++)n[o]=e[t[o]],i[o]=r[t[o]]},d.prototype.transform=function(t,e,r,n,i,s){this.permute(s,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,f=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),h=0;h<i;h+=a)for(var c=f,d=u,p=0;p<o;p++){var l=r[h+p],b=n[h+p],g=r[h+p+o],y=n[h+p+o],m=c*g-d*y;y=c*y+d*g,g=m,r[h+p]=l+g,n[h+p]=b+y,r[h+p+o]=l-g,n[h+p+o]=b-y,p!==a&&(m=f*c-u*d,d=f*d+u*c,c=m)}},d.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},d.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},d.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},d.prototype.convert13b=function(t,e,r,i){for(var s=0,o=0;o<e;o++)s+=0|t[o],r[2*o]=8191&s,s>>>=13,r[2*o+1]=8191&s,s>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===s),n(0==(-8192&s))},d.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},d.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),s=this.stub(n),o=new Array(n),a=new Array(n),f=new Array(n),u=new Array(n),h=new Array(n),c=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,u,n),this.transform(o,s,a,f,n,i),this.transform(u,s,h,c,n,i);for(var p=0;p<n;p++){var l=a[p]*h[p]-f[p]*c[p];f[p]=a[p]*c[p]+f[p]*h[p],a[p]=l}return this.conjugate(a,f,n),this.transform(a,f,d,s,n,i),this.conjugate(d,s,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),c(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,s=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=s>>>26,this.words[r]=67108863&s}return 0!==e&&(this.words[r]=e,this.length++),this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=f(t);if(0===e.length)return new s(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},s.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var a=this.words[e]&s,f=(0|this.words[e])-a<<r;this.words[e]=f|o,o=a>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,r){n("number"==typeof t&&t>=0);var i;i=e?(e-e%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),a=67108863^67108863>>>s<<s,f=r;if(i-=o,i=Math.max(0,i),f){for(var u=0;u<o;u++)f.words[u]=this.words[u];f.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var h=0;for(u=this.length-1;u>=0&&(0!==h||u>=i);u--){var c=0|this.words[u];this.words[u]=h<<26-s|c>>>s,h=c&a}return f&&0!==h&&(f.words[f.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},s.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,r){var i,s=t.length+r;this._expand(s);var o,a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var f=(0|t.words[i])*e;o-=67108863&f,a=(o>>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)o=(0|this.words[i+r])+a,a=o>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)o=-(0|this.words[i])+a,a=o>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},s.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,f=n.length-i.length;if("mod"!==e){a=new s(null),a.length=f+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var h=n.clone()._ishlnsubmul(i,1,f);0===h.negative&&(n=h,a&&(a.words[f]=1));for(var c=f-1;c>=0;c--){var d=67108864*(0|n.words[i.length+c])+(0|n.words[i.length+c-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,c);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,c),n.isZero()||(n.negative^=1);a&&(a.words[c]=d)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var i,o,a;return 0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:a.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modn(t.words[0]))}:this._wordDiv(t,e)},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},s.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new s(1),o=new s(0),a=new s(0),f=new s(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var h=r.clone(),c=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(h),o.isub(c)),i.iushrn(1),o.iushrn(1)
  ;for(var l=0,b=1;0==(r.words[0]&b)&&l<26;++l,b<<=1);if(l>0)for(r.iushrn(l);l-- >0;)(a.isOdd()||f.isOdd())&&(a.iadd(h),f.isub(c)),a.iushrn(1),f.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),o.isub(f)):(r.isub(e),a.isub(i),f.isub(o))}return{a:a,b:f,gcd:r.iushln(u)}},s.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new s(1),o=new s(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;0==(e.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(e.iushrn(f);f-- >0;)i.isOdd()&&i.iadd(a),i.iushrn(1);for(var h=0,c=1;0==(r.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(r.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(a),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o)):(r.isub(e),o.isub(i))}var d;return d=0===e.cmpn(1)?i:o,d.cmpn(0)<0&&d.iadd(t),d},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var s=e;e=r,r=s}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var s=i,o=r;0!==s&&o<this.length;o++){var a=0|this.words[o];a+=s,s=a>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:i<t?-1:1}return 0!==this.negative?0|-r:r},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new m(t)},s.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};p.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},p.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},p.prototype.split=function(t,e){t.iushrn(this.n,0,e)},p.prototype.imulK=function(t){return t.imul(this.k)},i(l,p),l.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},l.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,p),i(g,p),i(y,p),y.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(A[t])return A[t];var e;if("k256"===t)e=new l;else if("p224"===t)e=new b;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new y}return A[t]=e,e},m.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},m.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},m.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},m.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},m.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},m.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},m.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},m.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},m.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},m.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},m.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},m.prototype.isqr=function(t){return this.imul(t,t.clone())},m.prototype.sqr=function(t){return this.mul(t,t)},m.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new s(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var a=new s(1).toRed(this),f=a.redNeg(),u=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new s(2*h*h).toRed(this);0!==this.pow(h,u).cmp(f);)h.redIAdd(f);for(var c=this.pow(h,i),d=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),l=o;0!==p.cmp(a);){for(var b=p,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g<l);var y=this.pow(c,new s(1).iushln(l-g-1));d=d.redMul(y),c=y.redSqr(),p=p.redMul(c),l=g}return d},m.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},m.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new s(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,a=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],h=f-1;h>=0;h--){var c=u>>h&1;i!==r[0]&&(i=this.sqr(i)),0!==c||0!==o?(o<<=1,o|=c,(4===++a||0===n&&0===h)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}f=26}return i},m.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},m.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new v(t)},i(v,m),v.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},v.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},v.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],90:[function(t,e,r){(function(r){function n(t){var e=s(t);return{blinder:e.toRed(o.mont(t.modulus)).redPow(new o(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}function i(t,e){var i=n(e),s=e.modulus.byteLength(),a=(o.mont(e.modulus),new o(t).mul(i.blinder).umod(e.modulus)),f=a.toRed(o.mont(e.prime1)),u=a.toRed(o.mont(e.prime2)),h=e.coefficient,c=e.prime1,d=e.prime2,p=f.redPow(e.exponent1),l=u.redPow(e.exponent2);p=p.fromRed(),l=l.fromRed();var b=p.isub(l).imul(h).umod(c);return b.imul(d),l.iadd(b),new r(l.imul(i.unblinder).umod(e.modulus).toArray(!1,s))}function s(t){for(var e=t.modulus.byteLength(),r=new o(a(e));r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new o(a(e));return r}var o=t("bn.js"),a=t("randombytes");e.exports=i,i.getr=s}).call(this,t("buffer").Buffer)},{"bn.js":89,buffer:47,randombytes:297}],91:[function(t,e,r){"use strict";var n=r;n.version=t("../package.json").version,n.utils=t("./elliptic/utils"),n.rand=t("brorand"),n.curve=t("./elliptic/curve"),n.curves=t("./elliptic/curves"),n.ec=t("./elliptic/ec"),n.eddsa=t("./elliptic/eddsa")},{"../package.json":123,"./elliptic/curve":94,"./elliptic/curves":97,"./elliptic/ec":98,"./elliptic/eddsa":101,"./elliptic/utils":105,brorand:106}],92:[function(t,e,r){"use strict";function n(t,e){this.type=t,this.p=new s(e.p,16),this.red=e.prime?s.red(e.prime):s.mont(this.p),this.zero=new s(0).toRed(this.red),this.one=new s(1).toRed(this.red),this.two=new s(2).toRed(this.red),this.n=e.n&&new s(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function i(t,e){this.curve=t,this.type=e,this.precomputed=null}var s=t("bn.js"),o=t("../../elliptic"),a=o.utils,f=a.getNAF,u=a.getJSF,h=a.assert;e.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(t,e){h(t.precomputed);var r=t._getDoubles(),n=f(e,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var s=[],o=0;o<n.length;o+=r.step){for(var a=0,e=o+r.step-1;e>=o;e--)a=(a<<1)+n[e];s.push(a)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=i;d>0;d--){for(var o=0;o<s.length;o++){var a=s[o];a===d?c=c.mixedAdd(r.points[o]):a===-d&&(c=c.mixedAdd(r.points[o].neg()))}u=u.add(c)}return u.toP()},n.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=f(e,r),o=this.jpoint(null,null,null),a=s.length-1;a>=0;a--){for(var e=0;a>=0&&0===s[a];a--)e++;if(a>=0&&e++,o=o.dblp(e),a<0)break;var u=s[a];h(0!==u),o="affine"===t.type?u>0?o.mixedAdd(i[u-1>>1]):o.mixedAdd(i[-u-1>>1].neg()):u>0?o.add(i[u-1>>1]):o.add(i[-u-1>>1].neg())}return"affine"===t.type?o.toP():o},n.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,o=this._wnafT2,a=this._wnafT3,h=0,c=0;c<n;c++){var d=e[c],p=d._getNAFPoints(t);s[c]=p.wnd,o[c]=p.points}for(var c=n-1;c>=1;c-=2){var l=c-1,b=c;if(1===s[l]&&1===s[b]){var g=[e[l],null,null,e[b]];0===e[l].y.cmp(e[b].y)?(g[1]=e[l].add(e[b]),g[2]=e[l].toJ().mixedAdd(e[b].neg())):0===e[l].y.cmp(e[b].y.redNeg())?(g[1]=e[l].toJ().mixedAdd(e[b]),g[2]=e[l].add(e[b].neg())):(g[1]=e[l].toJ().mixedAdd(e[b]),g[2]=e[l].toJ().mixedAdd(e[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=u(r[l],r[b]);h=Math.max(m[0].length,h),a[l]=new Array(h),a[b]=new Array(h);for(var v=0;v<h;v++){var _=0|m[0][v],w=0|m[1][v];a[l][v]=y[3*(_+1)+(w+1)],a[b][v]=0,o[l]=g}}else a[l]=f(r[l],s[l]),a[b]=f(r[b],s[b]),h=Math.max(a[l].length,h),h=Math.max(a[b].length,h)}for(var S=this.jpoint(null,null,null),k=this._wnafT4,c=h;c>=0;c--){for(var I=0;c>=0;){for(var A=!0,v=0;v<n;v++)k[v]=0|a[v][c],0!==k[v]&&(A=!1);if(!A)break;I++,c--}if(c>=0&&I++,S=S.dblp(I),c<0)break;for(var v=0;v<n;v++){var d,E=k[v];0!==E&&(E>0?d=o[v][E-1>>1]:E<0&&(d=o[v][-E-1>>1].neg()),S="affine"===d.type?S.mixedAdd(d):S.add(d))}}for(var c=0;c<n;c++)o[c]=null;return i?S:S.toP()},n.BasePoint=i,i.prototype.eq=function(){throw new Error("Not implemented")},i.prototype.validate=function(){return this.curve.validate(this)},n.prototype.decodePoint=function(t,e){t=a.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r){6===t[0]?h(t[t.length-1]%2==0):7===t[0]&&h(t[t.length-1]%2==1);return this.point(t.slice(1,1+r),t.slice(1+r,1+2*r))}if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},i.prototype.encodeCompressed=function(t){return this.encode(t,!0)},i.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},i.prototype.encode=function(t,e){return a.encode(this._encode(e),t)},i.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},i.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},i.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var s=0;s<t;s++)n=n.dbl();r.push(n)}return{step:t,points:r}},i.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},i.prototype._getBeta=function(){return null},i.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},{"../../elliptic":91,"bn.js":89}],93:[function(t,e,r){"use strict";function n(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,u.call(this,"edwards",t),this.a=new a(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new a(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),h(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function i(t,e,r,n,i){u.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new a(e,16),this.y=new a(r,16),this.z=n?new a(n,16):this.curve.one,this.t=i&&new a(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var s=t("../curve"),o=t("../../elliptic"),a=t("bn.js"),f=t("inherits"),u=s.base,h=o.utils.assert;f(n,u),e.exports=n,n.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},n.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},n.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},n.prototype.pointFromX=function(t,e){t=new a(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(i.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var f=o.fromRed().isOdd();return(e&&!f||!e&&f)&&(o=o.redNeg()),this.point(t,o)},n.prototype.pointFromY=function(t,e){t=new a(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),s=n.redMul(i.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.isOdd()!==e&&(o=o.redNeg()),this.point(o,t)},n.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},f(i,u.BasePoint),n.prototype.pointFromJSON=function(t){return i.fromJSON(this,t)},n.prototype.point=function(t,e,r,n){return new i(this,t,e,r,n)},i.fromJSON=function(t,e){return new i(t,e[0],e[1],e[2])},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),s=n.redAdd(e),o=s.redSub(r),a=n.redSub(e),f=i.redMul(o),u=s.redMul(a),h=i.redMul(a),c=o.redMul(s);return this.curve.point(f,u,c,h)},i.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(i),a=o.redAdd(s);if(this.zOne)t=n.redSub(i).redSub(s).redMul(a.redSub(this.curve.two)),e=a.redMul(o.redSub(s)),r=a.redSqr().redSub(a).redSub(a);else{var f=this.z.redSqr(),u=a.redSub(f).redISub(f);t=n.redSub(i).redISub(s).redMul(u),e=a.redMul(o.redSub(s)),r=a.redMul(u)}}else{var o=i.redAdd(s),f=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=o.redSub(f).redSub(f);t=this.curve._mulC(n.redISub(o)).redMul(u),e=this.curve._mulC(o).redMul(i.redISub(s)),r=o.redMul(u)}return this.curve.point(t,e,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),s=r.redSub(e),o=i.redSub(n),a=i.redAdd(n),f=r.redAdd(e),u=s.redMul(o),h=a.redMul(f),c=s.redMul(f),d=o.redMul(a);return this.curve.point(u,h,d,c)},i.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),s=this.x.redMul(t.x),o=this.y.redMul(t.y),a=this.curve.d.redMul(s).redMul(o),f=i.redSub(a),u=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(s).redISub(o),c=n.redMul(f).redMul(h);return this.curve.twisted?(e=n.redMul(u).redMul(o.redSub(this.curve._mulA(s))),r=f.redMul(u)):(e=n.redMul(u).redMul(o.redSub(s)),r=this.curve._mulC(f).redMul(u)),this.curve.point(c,e,r)},i.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},i.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},i.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},i.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},i.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},i.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}return!1},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":91,"../curve":94,"bn.js":89,inherits:358}],94:[function(t,e,r){"use strict";var n=r;n.base=t("./base"),n.short=t("./short"),n.mont=t("./mont"),n.edwards=t("./edwards")},{"./base":92,"./edwards":93,"./mont":95,"./short":96}],95:[function(t,e,r){"use strict";function n(t){f.call(this,"mont",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(t,e,r){f.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(e,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var s=t("../curve"),o=t("bn.js"),a=t("inherits"),f=s.base,u=t("../../elliptic"),h=u.utils;a(n,f),e.exports=n,n.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},a(i,f.BasePoint),n.prototype.decodePoint=function(t,e){return this.point(h.toArray(t,e),1)},n.prototype.point=function(t,e){return new i(this,t,e)},n.prototype.pointFromJSON=function(t){return i.fromJSON(this,t)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(t,e){return new i(t,e[0],e[1]||t.one)},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var t=this.x.redAdd(this.z),e=t.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=e.redSub(n),s=e.redMul(n),o=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(s,o)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),s=t.x.redSub(t.z),o=s.redMul(r),a=i.redMul(n),f=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(f,u)},i.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=this,s=[];0!==e.cmpn(0);e.iushrn(1))s.push(e.andln(1));for(var o=s.length-1;o>=0;o--)0===s[o]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":91,"../curve":94,"bn.js":89,inherits:358}],96:[function(t,e,r){"use strict";function n(t){h.call(this,"short",t),this.a=new f(t.a,16).toRed(this.red),this.b=new f(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(t,e,r,n){h.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(e,16),this.y=new f(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function s(t,e,r,n){h.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(e,16),this.y=new f(r,16),this.z=new f(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=t("../curve"),a=t("../../elliptic"),f=t("bn.js"),u=t("inherits"),h=o.base,c=a.utils.assert;u(n,h),e.exports=n,n.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new f(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=n[0].cmp(n[1])<0?n[0]:n[1],e=e.toRed(this.red)}if(t.lambda)r=new f(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}var s;return s=t.basis?t.basis.map(function(t){return{a:new f(t.a,16),b:new f(t.b,16)}}):this._getEndoBasis(r),{beta:e,lambda:r,basis:s}}},n.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:f.mont(t),r=new f(2).toRed(e).redInvm(),n=r.redNeg(),i=new f(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},n.prototype._getEndoBasis=function(t){for(var e,r,n,i,s,o,a,u,h,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,p=this.n.clone(),l=new f(1),b=new f(0),g=new f(0),y=new f(1),m=0;0!==d.cmpn(0);){var v=p.div(d);u=p.sub(v.mul(d)),h=g.sub(v.mul(l));var _=y.sub(v.mul(b));if(!n&&u.cmp(c)<0)e=a.neg(),r=l,n=u.neg(),i=h;else if(n&&2==++m)break;a=u,p=d,d=u,g=l,l=h,y=b,b=_}s=u.neg(),o=h;var w=n.sqr().add(i.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=e,o=r),n.negative&&(n=n.neg(),i=i.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:n,b:i},{a:s,b:o}]},n.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),s=r.b.neg().mul(t).divRound(this.n),o=i.mul(r.a),a=s.mul(n.a),f=i.mul(r.b),u=s.mul(n.b);return{k1:t.sub(o).sub(a),k2:f.add(u).neg()}},n.prototype.pointFromX=function(t,e){t=new f(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},n.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s<t.length;s++){var o=this._endoSplit(e[s]),a=t[s],f=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),f=f.neg(!0)),n[2*s]=a,n[2*s+1]=f,i[2*s]=o.k1,i[2*s+1]=o.k2}for(var u=this._wnafMulAdd(1,n,i,2*s,r),h=0;h<2*s;h++)n[h]=null,i[h]=null;return u},u(i,h.BasePoint),n.prototype.point=function(t,e,r){return new i(this,t,e,r)},n.prototype.pointFromJSON=function(t,e){return i.fromJSON(this,t,e)},i.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},i.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},i.fromJSON=function(t,e,r){function n(e){return t.point(e[0],e[1],r)}"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;var s=e[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(n))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(n))}},i},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(t){return t=new f(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},i.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},i.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},i.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},
  doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(s,h.BasePoint),n.prototype.jpoint=function(t,e,r){return new s(this,t,e,r)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),s=this.y.redMul(e.redMul(t.z)),o=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),f=s.redSub(o);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),c=n.redMul(u),d=f.redSqr().redIAdd(h).redISub(c).redISub(c),p=f.redMul(c.redISub(d)).redISub(s.redMul(h)),l=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,p,l)},s.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,s=t.y.redMul(e).redMul(this.z),o=r.redSub(n),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),h=r.redMul(f),c=a.redSqr().redIAdd(u).redISub(h).redISub(h),d=a.redMul(h.redISub(c)).redISub(i.redMul(u)),p=this.z.redMul(o);return this.curve.jpoint(c,d,p)},s.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}for(var n=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,f=a.redSqr().redSqr(),u=o.redAdd(o),r=0;r<t;r++){var h=s.redSqr(),c=u.redSqr(),d=c.redSqr(),p=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(f)),l=s.redMul(c),b=p.redSqr().redISub(l.redAdd(l)),g=l.redISub(b),y=p.redMul(g);y=y.redIAdd(y).redISub(d);var m=u.redMul(a);r+1<t&&(f=f.redMul(d)),s=b,a=m,u=y}return this.curve.jpoint(s,u.redMul(i),a)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},s.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(s);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n),f=a.redSqr().redISub(o).redISub(o),u=s.redIAdd(s);u=u.redIAdd(u),u=u.redIAdd(u),t=f,e=a.redMul(o.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),c=this.y.redSqr(),d=c.redSqr(),p=this.x.redAdd(c).redSqr().redISub(h).redISub(d);p=p.redIAdd(p);var l=h.redAdd(h).redIAdd(h),b=l.redSqr(),g=d.redIAdd(d);g=g.redIAdd(g),g=g.redIAdd(g),t=b.redISub(p).redISub(p),e=l.redMul(p.redISub(t)).redISub(g),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(t,e,r)},s.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(s);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=a.redSqr().redISub(o).redISub(o);t=f;var u=s.redIAdd(s);u=u.redIAdd(u),u=u.redIAdd(u),e=a.redMul(o.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),c=this.y.redSqr(),d=this.x.redMul(c),p=this.x.redSub(h).redMul(this.x.redAdd(h));p=p.redAdd(p).redIAdd(p);var l=d.redIAdd(d);l=l.redIAdd(l);var b=l.redAdd(l);t=p.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(c).redISub(h);var g=c.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),e=p.redMul(l.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},s.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=e.redSqr(),o=r.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(i)),f=e.redAdd(e);f=f.redIAdd(f);var u=f.redMul(o),h=a.redSqr().redISub(u.redAdd(u)),c=u.redISub(h),d=o.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var p=a.redMul(c).redISub(d),l=r.redAdd(r).redMul(n);return this.curve.jpoint(h,p,l)},s.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),s=i.redSqr(),o=this.x.redAdd(e).redSqr().redISub(t).redISub(n);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(s);var a=o.redSqr(),f=n.redIAdd(n);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var u=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(f),h=e.redMul(u);h=h.redIAdd(h),h=h.redIAdd(h);var c=this.x.redMul(a).redISub(h);c=c.redIAdd(c),c=c.redIAdd(c);var d=this.y.redMul(u.redMul(f.redISub(u)).redISub(o.redMul(a)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var p=this.z.redAdd(o).redSqr().redISub(r).redISub(a);return this.curve.jpoint(c,d,p)},s.prototype.mul=function(t,e){return t=new f(t,e),this.curve._wnafMul(this,t)},s.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},s.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},s.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":91,"../curve":94,"bn.js":89,inherits:358}],97:[function(t,e,r){"use strict";function n(t){"short"===t.type?this.curve=new a.curve.short(t):"edwards"===t.type?this.curve=new a.curve.edwards(t):this.curve=new a.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(t,e){Object.defineProperty(s,t,{configurable:!0,enumerable:!0,get:function(){var r=new n(e);return Object.defineProperty(s,t,{configurable:!0,enumerable:!0,value:r}),r}})}var s=r,o=t("hash.js"),a=t("../elliptic"),f=a.utils.assert;s.PresetCurve=n,i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=t("./precomputed/secp256k1")}catch(t){u=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},{"../elliptic":91,"./precomputed/secp256k1":104,"hash.js":107}],98:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);"string"==typeof t&&(f(o.curves.hasOwnProperty(t),"Unknown curve "+t),t=o.curves[t]),t instanceof o.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var i=t("bn.js"),s=t("hmac-drbg"),o=t("../../elliptic"),a=o.utils,f=a.assert,u=t("./key"),h=t("./signature");e.exports=n,n.prototype.keyPair=function(t){return new u(this,t)},n.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},n.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},n.prototype.genKeyPair=function(t){t||(t={});for(var e=new s({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(e.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},n.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},n.prototype.sign=function(t,e,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var o=this.n.byteLength(),a=e.getPrivate().toArray("be",o),f=t.toArray("be",o),u=new s({hash:this.hash,entropy:a,nonce:f,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new i(1)),d=0;!0;d++){var p=n.k?n.k(d):new i(u.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(c)>=0)){var l=this.g.mul(p);if(!l.isInfinity()){var b=l.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var y=p.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(y=y.umod(this.n),0!==y.cmpn(0)){var m=(l.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new h({r:g,s:y,recoveryParam:m})}}}}}},n.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n),e=new h(e,"hex");var s=e.r,o=e.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),f=a.mul(t).umod(this.n),u=a.mul(s).umod(this.n);if(!this.curve._maxwellTrick){var c=this.g.mulAdd(f,r.getPublic(),u);return!c.isInfinity()&&0===c.getX().umod(this.n).cmp(s)}var c=this.g.jmulAdd(f,r.getPublic(),u);return!c.isInfinity()&&c.eqXToP(s)},n.prototype.recoverPubKey=function(t,e,r,n){f((3&r)===r,"The recovery param is more than two bits"),e=new h(e,n);var s=this.n,o=new i(t),a=e.r,u=e.s,c=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var p=e.r.invm(s),l=s.sub(o).mul(p).umod(s),b=u.mul(p).umod(s);return this.g.mulAdd(l,a,b)},n.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new h(e,n),null!==e.recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch(t){continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":91,"./key":99,"./signature":100,"bn.js":89,"hmac-drbg":120}],99:[function(t,e,r){"use strict";function n(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var i=t("bn.js"),s=t("../../elliptic"),o=s.utils,a=o.assert;e.exports=n,n.fromPublic=function(t,e,r){return e instanceof n?e:new n(t,{pub:e,pubEnc:r})},n.fromPrivate=function(t,e,r){return e instanceof n?e:new n(t,{priv:e,privEnc:r})},n.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},n.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?a(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||a(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},n.prototype.derive=function(t){return t.mul(this.priv).getX()},n.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},n.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":91,"bn.js":89}],100:[function(t,e,r){"use strict";function n(t,e){if(t instanceof n)return t;this._importDER(t,e)||(c(t.r&&t.s,"Signature without r or s"),this.r=new f(t.r,16),this.s=new f(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function s(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,s=0,o=e.place;s<n;s++,o++)i<<=8,i|=t[o];return e.place=o,i}function o(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function a(t,e){if(e<128)return void t.push(e);var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}var f=t("bn.js"),u=t("../../elliptic"),h=u.utils,c=h.assert;e.exports=n,n.prototype._importDER=function(t,e){t=h.toArray(t,e);var r=new i;if(48!==t[r.place++])return!1;if(s(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var n=s(t,r),o=t.slice(r.place,n+r.place);if(r.place+=n,2!==t[r.place++])return!1;var a=s(t,r);if(t.length!==a+r.place)return!1;var u=t.slice(r.place,a+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new f(o),this.s=new f(u),this.recoveryParam=null,!0},n.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=o(e),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];a(n,e.length),n=n.concat(e),n.push(2),a(n,r.length);var i=n.concat(r),s=[48];return a(s,i.length),s=s.concat(i),h.encode(s,t)}},{"../../elliptic":91,"bn.js":89}],101:[function(t,e,r){"use strict";function n(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof n))return new n(t);var t=s.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}var i=t("hash.js"),s=t("../../elliptic"),o=s.utils,a=o.assert,f=o.parseBytes,u=t("./key"),h=t("./signature");e.exports=n,n.prototype.sign=function(t,e){t=f(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),s=this.encodePoint(i),o=this.hashInt(s,r.pubBytes(),t).mul(r.priv()),a=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:a,Rencoded:s})},n.prototype.verify=function(t,e,r){t=f(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),s=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(s)},n.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},n.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},n.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},n.prototype.makeSignature=function(t){return t instanceof h?t:new h(this,t)},n.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},n.prototype.decodePoint=function(t){t=o.parseBytes(t);var e=t.length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},n.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},n.prototype.decodeInt=function(t){return o.intFromLE(t)},n.prototype.isPoint=function(t){return t instanceof this.pointClass}},{"../../elliptic":91,"./key":102,"./signature":103,"hash.js":107}],102:[function(t,e,r){"use strict";function n(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}var i=t("../../elliptic"),s=i.utils,o=s.assert,a=s.parseBytes,f=s.cachedProperty;n.fromPublic=function(t,e){return e instanceof n?e:new n(t,{pub:e})},n.fromSecret=function(t,e){return e instanceof n?e:new n(t,{secret:e})},n.prototype.secret=function(){return this._secret},f(n,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),f(n,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),f(n,"privBytes",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),f(n,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),f(n,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),f(n,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),n.prototype.sign=function(t){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},n.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},n.prototype.getSecret=function(t){return o(this._secret,"KeyPair is public only"),s.encode(this.secret(),t)},n.prototype.getPublic=function(t){return s.encode(this.pubBytes(),t)},e.exports=n},{"../../elliptic":91}],103:[function(t,e,r){"use strict";function n(t,e){this.eddsa=t,"object"!=typeof e&&(e=u(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),a(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}var i=t("bn.js"),s=t("../../elliptic"),o=s.utils,a=o.assert,f=o.cachedProperty,u=o.parseBytes;f(n,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),f(n,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),f(n,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),f(n,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),n.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},n.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=n},{"../../elliptic":91,"bn.js":89}],104:[function(t,e,r){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,
  points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],105:[function(t,e,r){"use strict";function n(t,e){for(var r=[],n=1<<e+1,i=t.clone();i.cmpn(1)>=0;){var s;if(i.isOdd()){var o=i.andln(n-1);s=o>(n>>1)-1?(n>>1)-o:o,i.isubn(s)}else s=0;r.push(s);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,f=1;f<a;f++)r.push(0);i.iushrn(a)}return r}function i(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var s=t.andln(3)+n&3,o=e.andln(3)+i&3;3===s&&(s=-1),3===o&&(o=-1);var a;if(0==(1&s))a=0;else{var f=t.andln(7)+n&7;a=3!==f&&5!==f||2!==o?s:-s}r[0].push(a);var u;if(0==(1&o))u=0;else{var f=e.andln(7)+i&7;u=3!==f&&5!==f||2!==s?o:-o}r[1].push(u),2*n===a+1&&(n=1-n),2*i===u+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r}function s(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function o(t){return"string"==typeof t?f.toArray(t,"hex"):t}function a(t){return new u(t,"hex","le")}var f=r,u=t("bn.js"),h=t("minimalistic-assert"),c=t("minimalistic-crypto-utils");f.assert=h,f.toArray=c.toArray,f.zero2=c.zero2,f.toHex=c.toHex,f.encode=c.encode,f.getNAF=n,f.getJSF=i,f.cachedProperty=s,f.parseBytes=o,f.intFromLE=a},{"bn.js":89,"minimalistic-assert":121,"minimalistic-crypto-utils":122}],106:[function(t,e,r){function n(t){this.rand=t}var i;if(e.exports=function(t){return i||(i=new n(null)),i.generate(t)},e.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=t("crypto");if("function"!=typeof s.randomBytes)throw new Error("Not supported");n.prototype._rand=function(t){return s.randomBytes(t)}}catch(t){}},{crypto:46}],107:[function(t,e,r){var n=r;n.utils=t("./hash/utils"),n.common=t("./hash/common"),n.sha=t("./hash/sha"),n.ripemd=t("./hash/ripemd"),n.hmac=t("./hash/hmac"),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},{"./hash/common":108,"./hash/hmac":109,"./hash/ripemd":110,"./hash/sha":111,"./hash/utils":118}],108:[function(t,e,r){"use strict";function n(){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}var i=t("./utils"),s=t("minimalistic-assert");r.BlockHash=n,n.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},n.prototype.digest=function(t){return this.update(this._pad()),s(null===this.pending),this._digest(t)},n.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)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,s=8;s<this.padLength;s++)n[i++]=0;return n}},{"./utils":118,"minimalistic-assert":121}],109:[function(t,e,r){"use strict";function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,r))}var i=t("./utils"),s=t("minimalistic-assert");e.exports=n,n.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),s(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},n.prototype.update=function(t,e){return this.inner.update(t,e),this},n.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"./utils":118,"minimalistic-assert":121}],110:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function i(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function s(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function o(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var a=t("./utils"),f=t("./common"),u=a.rotl32,h=a.sum32,c=a.sum32_3,d=a.sum32_4,p=f.BlockHash;a.inherits(n,p),r.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],a=this.h[2],f=this.h[3],p=this.h[4],m=r,v=n,_=a,w=f,S=p,k=0;k<80;k++){var I=h(u(d(r,i(k,n,a,f),t[l[k]+e],s(k)),g[k]),p);r=p,p=f,f=u(a,10),a=n,n=I,I=h(u(d(m,i(79-k,v,_,w),t[b[k]+e],o(k)),y[k]),S),m=S,S=w,w=u(_,10),_=v,v=I}I=c(this.h[1],a,w),this.h[1]=c(this.h[2],f,S),this.h[2]=c(this.h[3],p,m),this.h[3]=c(this.h[4],r,v),this.h[4]=c(this.h[0],n,_),this.h[0]=I},n.prototype._digest=function(t){return"hex"===t?a.toHex32(this.h,"little"):a.split32(this.h,"little")};var l=[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],b=[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],g=[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],y=[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]},{"./common":108,"./utils":118}],111:[function(t,e,r){"use strict";r.sha1=t("./sha/1"),r.sha224=t("./sha/224"),r.sha256=t("./sha/256"),r.sha384=t("./sha/384"),r.sha512=t("./sha/512")},{"./sha/1":112,"./sha/224":113,"./sha/256":114,"./sha/384":115,"./sha/512":116}],112:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}var i=t("../utils"),s=t("../common"),o=t("./common"),a=i.rotl32,f=i.sum32,u=i.sum32_5,h=o.ft_1,c=s.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];i.inherits(n,c),e.exports=n,n.blockSize=512,n.outSize=160,n.hmacStrength=80,n.padLength=64,n.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],s=this.h[1],o=this.h[2],c=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var l=~~(n/20),b=u(a(i,5),h(l,s,o,c),p,r[n],d[l]);p=c,c=o,o=a(s,30),s=i,i=b}this.h[0]=f(this.h[0],i),this.h[1]=f(this.h[1],s),this.h[2]=f(this.h[2],o),this.h[3]=f(this.h[3],c),this.h[4]=f(this.h[4],p)},n.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":108,"../utils":118,"./common":117}],113:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;s.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}var i=t("../utils"),s=t("./256");i.inherits(n,s),e.exports=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},{"../utils":118,"./256":114}],114:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}var i=t("../utils"),s=t("../common"),o=t("./common"),a=t("minimalistic-assert"),f=i.sum32,u=i.sum32_4,h=i.sum32_5,c=o.ch32,d=o.maj32,p=o.s0_256,l=o.s1_256,b=o.g0_256,g=o.g1_256,y=s.BlockHash,m=[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];i.inherits(n,y),e.exports=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(g(r[n-2]),r[n-7],b(r[n-15]),r[n-16]);var i=this.h[0],s=this.h[1],o=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=h(w,l(m),c(m,v,_),this.k[n],r[n]),k=f(p(i),d(i,s,o));w=_,_=v,v=m,m=f(y,S),y=o,o=s,s=i,i=f(S,k)}this.h[0]=f(this.h[0],i),this.h[1]=f(this.h[1],s),this.h[2]=f(this.h[2],o),this.h[3]=f(this.h[3],y),this.h[4]=f(this.h[4],m),this.h[5]=f(this.h[5],v),this.h[6]=f(this.h[6],_),this.h[7]=f(this.h[7],w)},n.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":108,"../utils":118,"./common":117,"minimalistic-assert":121}],115:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;s.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}var i=t("../utils"),s=t("./512");i.inherits(n,s),e.exports=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},{"../utils":118,"./512":116}],116:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;B.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=M,this.W=new Array(160)}function i(t,e,r,n,i){var s=t&r^~t&i;return s<0&&(s+=4294967296),s}function s(t,e,r,n,i,s){var o=e&n^~e&s;return o<0&&(o+=4294967296),o}function o(t,e,r,n,i){var s=t&r^t&i^r&i;return s<0&&(s+=4294967296),s}function a(t,e,r,n,i,s){var o=e&n^e&s^n&s;return o<0&&(o+=4294967296),o}function f(t,e){var r=v(t,e,28),n=v(e,t,2),i=v(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function u(t,e){var r=_(t,e,28),n=_(e,t,2),i=_(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function h(t,e){var r=v(t,e,14),n=v(t,e,18),i=v(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function c(t,e){var r=_(t,e,14),n=_(t,e,18),i=_(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function d(t,e){var r=v(t,e,1),n=v(t,e,8),i=w(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function p(t,e){var r=_(t,e,1),n=_(t,e,8),i=S(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function l(t,e){var r=v(t,e,19),n=v(e,t,29),i=w(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}function b(t,e){var r=_(t,e,19),n=_(e,t,29),i=S(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}var g=t("../utils"),y=t("../common"),m=t("minimalistic-assert"),v=g.rotr64_hi,_=g.rotr64_lo,w=g.shr64_hi,S=g.shr64_lo,k=g.sum64,I=g.sum64_hi,A=g.sum64_lo,E=g.sum64_4_hi,x=g.sum64_4_lo,O=g.sum64_5_hi,P=g.sum64_5_lo,B=y.BlockHash,M=[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];g.inherits(n,B),e.exports=n,n.blockSize=1024,n.outSize=512,n.hmacStrength=192,n.padLength=128,n.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=l(r[n-4],r[n-3]),s=b(r[n-4],r[n-3]),o=r[n-14],a=r[n-13],f=d(r[n-30],r[n-29]),u=p(r[n-30],r[n-29]),h=r[n-32],c=r[n-31];r[n]=E(i,s,o,a,f,u,h,c),r[n+1]=x(i,s,o,a,f,u,h,c)}},n.prototype._update=function(t,e){
  this._prepareBlock(t,e);var r=this.W,n=this.h[0],d=this.h[1],p=this.h[2],l=this.h[3],b=this.h[4],g=this.h[5],y=this.h[6],v=this.h[7],_=this.h[8],w=this.h[9],S=this.h[10],E=this.h[11],x=this.h[12],B=this.h[13],M=this.h[14],R=this.h[15];m(this.k.length===r.length);for(var T=0;T<r.length;T+=2){var N=M,C=R,j=h(_,w),U=c(_,w),L=i(_,w,S,E,x),D=s(_,w,S,E,x,B),z=this.k[T],H=this.k[T+1],F=r[T],K=r[T+1],q=O(N,C,j,U,L,D,z,H,F,K),V=P(N,C,j,U,L,D,z,H,F,K);N=f(n,d),C=u(n,d),j=o(n,d,p,l,b),U=a(n,d,p,l,b,g);var Y=I(N,C,j,U),G=A(N,C,j,U);M=x,R=B,x=S,B=E,S=_,E=w,_=I(y,v,q,V),w=A(v,v,q,V),y=b,v=g,b=p,g=l,p=n,l=d,n=I(q,V,Y,G),d=A(q,V,Y,G)}k(this.h,0,n,d),k(this.h,2,p,l),k(this.h,4,b,g),k(this.h,6,y,v),k(this.h,8,_,w),k(this.h,10,S,E),k(this.h,12,x,B),k(this.h,14,M,R)},n.prototype._digest=function(t){return"hex"===t?g.toHex32(this.h,"big"):g.split32(this.h,"big")}},{"../common":108,"../utils":118,"minimalistic-assert":121}],117:[function(t,e,r){"use strict";function n(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?o(e,r,n):2===t?s(e,r,n):void 0}function i(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&r}function o(t,e,r){return t^e^r}function a(t){return d(t,2)^d(t,13)^d(t,22)}function f(t){return d(t,6)^d(t,11)^d(t,25)}function u(t){return d(t,7)^d(t,18)^t>>>3}function h(t){return d(t,17)^d(t,19)^t>>>10}var c=t("../utils"),d=c.rotr32;r.ft_1=n,r.ch32=i,r.maj32=s,r.p32=o,r.s0_256=a,r.s1_256=f,r.g0_256=u,r.g1_256=h},{"../utils":118}],118:[function(t,e,r){"use strict";function n(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for(t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),s=i>>8,o=255&i;s?r.push(s,o):r.push(o)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r}function i(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=f(i.toString(16))}return r}function a(t){return 1===t.length?"0"+t:t}function f(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}function u(t,e,r,n){var i=r-e;O(i%4==0);for(var s=new Array(i/4),o=0,a=e;o<s.length;o++,a+=4){var f;f="big"===n?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],s[o]=f>>>0}return s}function h(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var s=t[n];"big"===e?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=255&s):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=255&s)}return r}function c(t,e){return t>>>e|t<<32-e}function d(t,e){return t<<e|t>>>32-e}function p(t,e){return t+e>>>0}function l(t,e,r){return t+e+r>>>0}function b(t,e,r,n){return t+e+r+n>>>0}function g(t,e,r,n,i){return t+e+r+n+i>>>0}function y(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o}function m(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0}function v(t,e,r,n){return e+n>>>0}function _(t,e,r,n,i,s,o,a){var f=0,u=e;return u=u+n>>>0,f+=u<e?1:0,u=u+s>>>0,f+=u<s?1:0,u=u+a>>>0,f+=u<a?1:0,t+r+i+o+f>>>0}function w(t,e,r,n,i,s,o,a){return e+n+s+a>>>0}function S(t,e,r,n,i,s,o,a,f,u){var h=0,c=e;return c=c+n>>>0,h+=c<e?1:0,c=c+s>>>0,h+=c<s?1:0,c=c+a>>>0,h+=c<a?1:0,c=c+u>>>0,h+=c<u?1:0,t+r+i+o+f+h>>>0}function k(t,e,r,n,i,s,o,a,f,u){return e+n+s+a+u>>>0}function I(t,e,r){return(e<<32-r|t>>>r)>>>0}function A(t,e,r){return(t<<32-r|e>>>r)>>>0}function E(t,e,r){return t>>>r}function x(t,e,r){return(t<<32-r|e>>>r)>>>0}var O=t("minimalistic-assert"),P=t("inherits");r.inherits=P,r.toArray=n,r.toHex=i,r.htonl=s,r.toHex32=o,r.zero2=a,r.zero8=f,r.join32=u,r.split32=h,r.rotr32=c,r.rotl32=d,r.sum32=p,r.sum32_3=l,r.sum32_4=b,r.sum32_5=g,r.sum64=y,r.sum64_hi=m,r.sum64_lo=v,r.sum64_4_hi=_,r.sum64_4_lo=w,r.sum64_5_hi=S,r.sum64_5_lo=k,r.rotr64_hi=I,r.rotr64_lo=A,r.shr64_hi=E,r.shr64_lo=x},{inherits:119,"minimalistic-assert":121}],119:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],120:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=s.toArray(t.entropy,t.entropyEnc||"hex"),r=s.toArray(t.nonce,t.nonceEnc||"hex"),i=s.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var i=t("hash.js"),s=t("minimalistic-crypto-utils"),o=t("minimalistic-assert");e.exports=n,n.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},n.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},n.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},n.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=s.toArray(t,e),r=s.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},n.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=s.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,s.encode(o,e)}},{"hash.js":107,"minimalistic-assert":121,"minimalistic-crypto-utils":122}],121:[function(t,e,r){arguments[4][81][0].apply(r,arguments)},{dup:81}],122:[function(t,e,r){"use strict";function n(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),s=i>>8,o=255&i;s?r.push(s,o):r.push(o)}return r}function i(t){return 1===t.length?"0"+t:t}function s(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}var o=r;o.toArray=n,o.zero2=i,o.toHex=s,o.encode=function(t,e){return"hex"===e?s(t):t}},{}],123:[function(t,e,r){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",_id:"elliptic@6.4.0",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.10.8",_nodeVersion:"7.0.0",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",readme:"ERROR: No README data found!"}},{}],124:[function(t,e,r){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],125:[function(t,e,r){"use strict";var n=t("asn1.js");r.certificate=t("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var s=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=s;var o=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});r.PublicKey=o;var a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),f=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())});r.PrivateKey=f;var u=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=u;var h=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=h,r.DSAparam=n.define("DSAparam",function(){this.int()});var c=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=c;var d=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":126,"asn1.js":129}],126:[function(t,e,r){"use strict";var n=t("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),s=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),f=n.define("RelativeDistinguishedName",function(){this.setof(s)}),u=n.define("RDNSequence",function(){this.seqof(f)}),h=n.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),c=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),d=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),p=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(h),this.key("validity").use(c),this.key("subject").use(h),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),l=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});e.exports=l},{"asn1.js":129}],127:[function(t,e,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,s=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,o=t("evp_bytestokey"),a=t("browserify-aes");e.exports=function(t,e){var f,u=t.toString(),h=u.match(n);if(h){var c="aes"+h[1],d=new r(h[2],"hex"),p=new r(h[3].replace(/\r?\n/g,""),"base64"),l=o(e,d.slice(0,8),parseInt(h[1],10)).key,b=[],g=a.createDecipheriv(c,l,d);b.push(g.update(p)),b.push(g.final()),f=r.concat(b)}else{var y=u.match(s);f=new r(y[2].replace(/\r?\n/g,""),"base64")}return{tag:u.match(i)[1],data:f}}}).call(this,t("buffer").Buffer)},{"browserify-aes":146,buffer:47,evp_bytestokey:162}],128:[function(t,e,r){(function(r){function n(t){var e;"object"!=typeof t||r.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=new r(t));var n,o,f=a(t,e),u=f.tag,h=f.data;switch(u){case"CERTIFICATE":o=s.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(o||(o=s.PublicKey.decode(h,"der")),n=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return s.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=s.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+u);case"ENCRYPTED PRIVATE KEY":h=s.EncryptedPrivateKey.decode(h,"der"),h=i(h,e);case"PRIVATE KEY":switch(o=s.PrivateKey.decode(h,"der"),n=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return s.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:s.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=s.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+u);case"RSA PUBLIC KEY":return s.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return s.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:s.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return h=s.ECPrivateKey.decode(h,"der"),{curve:h.parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+u)}}function i(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),s=o[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,h=t.subjectPrivateKey,c=parseInt(s.split("-")[1],10)/8,d=u.pbkdf2Sync(e,n,i,c),p=f.createDecipheriv(s,d,a),l=[];return l.push(p.update(h)),l.push(p.final()),r.concat(l)}var s=t("./asn1"),o=t("./aesid.json"),a=t("./fixProc"),f=t("browserify-aes"),u=t("pbkdf2");e.exports=n,n.signature=s.signature}).call(this,t("buffer").Buffer)},{"./aesid.json":124,"./asn1":125,"./fixProc":127,"browserify-aes":146,buffer:47,pbkdf2:234}],129:[function(t,e,r){var n=r;n.bignum=t("bn.js"),n.define=t("./asn1/api").define,n.base=t("./asn1/base"),n.constants=t("./asn1/constants"),n.decoders=t("./asn1/decoders"),n.encoders=t("./asn1/encoders")},{"./asn1/api":130,"./asn1/base":132,"./asn1/constants":136,"./asn1/decoders":138,"./asn1/encoders":141,"bn.js":89}],130:[function(t,e,r){function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}var i=t("../asn1"),s=t("inherits");r.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(e){var r;try{r=t("vm").runInThisContext("(function "+this.name+"(entity) {\n  this._initNamed(entity);\n})")}catch(t){r=function(t){this._initNamed(t)}}return s(r,e),r.prototype._initNamed=function(t){e.call(this,t)},new r(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i.decoders[t])),this.decoders[t]},n.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(i.encoders[t])),this.encoders[t]},n.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},{"../asn1":129,inherits:358,vm:332}],131:[function(t,e,r){function n(t,e){if(o.call(this,e),!a.isBuffer(t))return void this.error("Input not Buffer");this.base=t,this.offset=0,this.length=t.length}function i(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof i||(t=new i(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}var s=t("inherits"),o=t("../base").Reporter,a=t("buffer").Buffer;s(n,o),r.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},n.prototype.restore=function(t){var e=new n(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,o.prototype.restore.call(this,t.reporter),e},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},n.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},n.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},r.EncoderBuffer=i,i.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},{"../base":132,buffer:47,inherits:358}],132:[function(t,e,r){var n=r;n.Reporter=t("./reporter").Reporter,n.DecoderBuffer=t("./buffer").DecoderBuffer,n.EncoderBuffer=t("./buffer").EncoderBuffer,n.Node=t("./node")},{"./buffer":131,"./node":133,"./reporter":134}],133:[function(t,e,r){function n(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var i=t("../base").Reporter,s=t("../base").EncoderBuffer,o=t("../base").DecoderBuffer,a=t("minimalistic-assert"),f=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f),h=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];e.exports=n;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];n.prototype.clone=function(){var t=this._baseState,e={};c.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},n.prototype._wrap=function(){var t=this._baseState;u.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},n.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),a.equal(e.children.length,1,"Root node can have only one child")},n.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},h.forEach(function(t){n.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),f.forEach(function(t){n.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}}),n.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},n.prototype.optional=function(){return this._baseState.optional=!0,this},n.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},n.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},n.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},n.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},n.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},n.prototype.any=function(){return this._baseState.any=!0,this},n.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},n.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},n.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n=r.default,i=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){var a=null;if(null!==r.explicit?a=r.explicit:null!==r.implicit?a=r.implicit:null!==r.tag&&(a=r.tag),null!==a||r.any){if(i=this._peekTag(t,a,r.any),t.isError(i))return i}else{var f=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),i=!0}catch(t){i=!1}t.restore(f)}}var u;if(r.obj&&i&&(u=t.enterObject()),i){if(null!==r.explicit){var h=this._decodeTag(t,r.explicit);if(t.isError(h))return h;t=h}var c=t.offset;if(null===r.use&&null===r.choice){if(r.any)var f=t.save();var d=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(d))return d;r.any?n=t.raw(f):t=d}if(e&&e.track&&null!==r.tag&&e.track(t.path(),c,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),n=r.any?n:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(n);n=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&i&&(n=t.leaveObject(u)),null===r.key||null===n&&!0!==i?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,n),n},n.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},n.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},n.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(s){var o=t.save(),a=r.choice[s];try{var f=a._decode(t,e);if(t.isError(f))return!1;n={type:s,value:f},i=!0}catch(e){return t.restore(o),!1}return!0},this),i?n:t.error("Choice not matched")},n.prototype._createEncoderBuffer=function(t){return new s(t,this.reporter)},n.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},n.prototype._encodeValue=function(t,e,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(t,e||new i);var s=null;if(this.reporter=e,n.optional&&void 0===t){if(null===n.default)return;t=n.default}var o=null,a=!1;if(n.any)s=this._createEncoderBuffer(t);else if(n.choice)s=this._encodeChoice(t,e);else if(n.contains)o=this._getUse(n.contains,r)._encode(t,e),a=!0;else if(n.children)o=n.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),o=this._createEncoderBuffer(o);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,o=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},f))}else null!==n.use?s=this._getUse(n.use,r)._encode(t,e):(o=this._encodePrimitive(n.tag,t),a=!0);var s;if(!n.any&&null===n.choice){var u=null!==n.implicit?n.implicit:n.tag,h=null===n.implicit?"universal":"context";null===u?null===n.use&&e.error("Tag could be ommited only for .use()"):null===n.use&&(s=this._encodeComposite(u,a,h,o))}return null!==n.explicit&&(s=this._encodeComposite(n.explicit,!1,"context",s)),s},n.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},n.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},n.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},n.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},{"../base":132,"minimalistic-assert":143}],134:[function(t,e,r){function n(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function i(t,e){this.path=t,this.rethrow(e)}var s=t("inherits");r.Reporter=n,n.prototype.isError=function(t){return t instanceof i},n.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},n.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},n.prototype.enterKey=function(t){return this._reporterState.path.push(t)},n.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},n.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},n.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},n.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof i;if(e=n?t:new i(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},n.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},s(i,Error),i.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:358}],135:[function(t,e,r){var n=t("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":136}],136:[function(t,e,r){var n=r;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=t("./der")},{"./der":135}],137:[function(t,e,r){function n(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new i,this.tree._init(t.body)}function i(t){u.Node.call(this,"der",t)}function s(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=c.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var s=r;for(r=0;128==(128&s);){if(s=t.readUInt8(e),t.isError(s))return s;r<<=7,r|=127&s}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:c.tag[r]}}function o(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var s=0;s<i;s++){n<<=8;var o=t.readUInt8(r);if(t.isError(o))return o;n|=o}return n}
  var a=t("inherits"),f=t("../../asn1"),u=f.base,h=f.bignum,c=f.constants.der;e.exports=n,n.prototype.decode=function(t,e){return t instanceof u.DecoderBuffer||(t=new u.DecoderBuffer(t,e)),this.tree._decode(t,e)},a(i,u.Node),i.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=s(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},i.prototype._decodeTag=function(t,e,r){var n=s(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=o(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var a=t.save(),f=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(f)?f:(i=t.offset-a.offset,t.restore(a),t.skip(i,'Failed to match body of: "'+e+'"'))},i.prototype._skipUntilEnd=function(t,e){for(;;){var r=s(t,e);if(t.isError(r))return r;var n=o(t,r.primitive,e);if(t.isError(n))return n;var i;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},i.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var s=this._peekTag(t,"end");if(t.isError(s))return s;var o=r.decode(t,"der",n);if(t.isError(o)&&s)break;i.push(o)}return i},i.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",s=0;s<n.length/2;s++)i+=String.fromCharCode(n.readUInt16BE(2*s));return i}if("numstr"===e){var o=t.raw().toString("ascii");return this._isNumstr(o)?o:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var a=t.raw().toString("ascii");return this._isPrintstr(a)?a:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},i.prototype._decodeObjid=function(t,e,r){for(var n,i=[],s=0;!t.isEmpty();){var o=t.readUInt8();s<<=7,s|=127&o,0==(128&o)&&(i.push(s),s=0)}128&o&&i.push(s);var a=i[0]/40|0,f=i[0]%40;if(n=r?i:[a,f].concat(i.slice(1)),e){var u=e[n.join(" ")];void 0===u&&(u=e[n.join(".")]),void 0!==u&&(n=u)}return n},i.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),s=0|r.slice(6,8),o=0|r.slice(8,10),a=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");var n=0|r.slice(0,2),i=0|r.slice(2,4),s=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),f=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,s,o,a,f,0)},i.prototype._decodeNull=function(t){return null},i.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},i.prototype._decodeInt=function(t,e){var r=t.raw(),n=new h(r);return e&&(n=e[n.toString(10)]||n),n},i.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},{"../../asn1":129,inherits:358}],138:[function(t,e,r){var n=r;n.der=t("./der"),n.pem=t("./pem")},{"./der":137,"./pem":139}],139:[function(t,e,r){function n(t){o.call(this,t),this.enc="pem"}var i=t("inherits"),s=t("buffer").Buffer,o=t("./der");i(n,o),e.exports=n,n.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,f=-1,u=0;u<r.length;u++){var h=r[u].match(i);if(null!==h&&h[2]===n){if(-1!==a){if("END"!==h[1])break;f=u;break}if("BEGIN"!==h[1])break;a=u}}if(-1===a||-1===f)throw new Error("PEM section not found for: "+n);var c=r.slice(a+1,f).join("");c.replace(/[^a-z0-9\+\/=]+/gi,"");var d=new s(c,"base64");return o.prototype.decode.call(this,d,e)}},{"./der":137,buffer:47,inherits:358}],140:[function(t,e,r){function n(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new i,this.tree._init(t.body)}function i(t){h.Node.call(this,"der",t)}function s(t){return t<10?"0"+t:t}function o(t,e,r,n){var i;if("seqof"===t?t="seq":"setof"===t&&(t="set"),c.tagByName.hasOwnProperty(t))i=c.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=c.tagClassByName[r||"universal"]<<6)}var a=t("inherits"),f=t("buffer").Buffer,u=t("../../asn1"),h=u.base,c=u.constants.der;e.exports=n,n.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},a(i,h.Node),i.prototype._encodeComposite=function(t,e,r,n){var i=o(t,e,r,this.reporter);if(n.length<128){var s=new f(2);return s[0]=i,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var a=1,u=n.length;u>=256;u>>=8)a++;var s=new f(2+a);s[0]=i,s[1]=128|a;for(var u=1+a,h=n.length;h>0;u--,h>>=8)s[u]=255&h;return this._createEncoderBuffer([s,n])},i.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new f(2*t.length),n=0;n<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},i.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(var n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var i=0,n=0;n<t.length;n++){var s=t[n];for(i++;s>=128;s>>=7)i++}for(var o=new f(i),a=o.length-1,n=t.length-1;n>=0;n--){var s=t[n];for(o[a--]=127&s;(s>>=7)>0;)o[a--]=128|127&s}return this._createEncoderBuffer(o)},i.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[s(n.getFullYear()),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[s(n.getFullYear()%100),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!f.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new f(r)}if(f.isBuffer(t)){var n=t.length;0===t.length&&n++;var i=new f(n);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var n=1,s=t;s>=256;s>>=8)n++;for(var i=new Array(n),s=i.length-1;s>=0;s--)i[s]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new f(i))},i.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},i.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},i.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var s=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),s.length!==i.defaultBuffer.length)return!1;for(n=0;n<s.length;n++)if(s[n]!==i.defaultBuffer[n])return!1;return!0}},{"../../asn1":129,buffer:47,inherits:358}],141:[function(t,e,r){var n=r;n.der=t("./der"),n.pem=t("./pem")},{"./der":140,"./pem":142}],142:[function(t,e,r){function n(t){s.call(this,t),this.enc="pem"}var i=t("inherits"),s=t("./der");i(n,s),e.exports=n,n.prototype.encode=function(t,e){for(var r=s.prototype.encode.call(this,t),n=r.toString("base64"),i=["-----BEGIN "+e.label+"-----"],o=0;o<n.length;o+=64)i.push(n.slice(o,o+64));return i.push("-----END "+e.label+"-----"),i.join("\n")}},{"./der":140,inherits:358}],143:[function(t,e,r){arguments[4][81][0].apply(r,arguments)},{dup:81}],144:[function(t,e,r){arguments[4][53][0].apply(r,arguments)},{buffer:47,dup:53}],145:[function(t,e,r){arguments[4][54][0].apply(r,arguments)},{"./aes":144,"./ghash":149,buffer:47,"buffer-xor":158,"cipher-base":159,dup:54,inherits:358}],146:[function(t,e,r){arguments[4][55][0].apply(r,arguments)},{"./decrypter":147,"./encrypter":148,"./modes":150,dup:55}],147:[function(t,e,r){arguments[4][56][0].apply(r,arguments)},{"./aes":144,"./authCipher":145,"./modes":150,"./modes/cbc":151,"./modes/cfb":152,"./modes/cfb1":153,"./modes/cfb8":154,"./modes/ctr":155,"./modes/ecb":156,"./modes/ofb":157,"./streamCipher":161,buffer:47,"cipher-base":159,dup:56,evp_bytestokey:162,inherits:358}],148:[function(t,e,r){arguments[4][57][0].apply(r,arguments)},{"./aes":144,"./authCipher":145,"./modes":150,"./modes/cbc":151,"./modes/cfb":152,"./modes/cfb1":153,"./modes/cfb8":154,"./modes/ctr":155,"./modes/ecb":156,"./modes/ofb":157,"./streamCipher":161,buffer:47,"cipher-base":159,dup:57,evp_bytestokey:162,inherits:358}],149:[function(t,e,r){arguments[4][58][0].apply(r,arguments)},{buffer:47,dup:58}],150:[function(t,e,r){arguments[4][59][0].apply(r,arguments)},{dup:59}],151:[function(t,e,r){arguments[4][60][0].apply(r,arguments)},{"buffer-xor":158,dup:60}],152:[function(t,e,r){arguments[4][61][0].apply(r,arguments)},{buffer:47,"buffer-xor":158,dup:61}],153:[function(t,e,r){arguments[4][62][0].apply(r,arguments)},{buffer:47,dup:62}],154:[function(t,e,r){arguments[4][63][0].apply(r,arguments)},{buffer:47,dup:63}],155:[function(t,e,r){arguments[4][64][0].apply(r,arguments)},{buffer:47,"buffer-xor":158,dup:64}],156:[function(t,e,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],157:[function(t,e,r){arguments[4][66][0].apply(r,arguments)},{buffer:47,"buffer-xor":158,dup:66}],158:[function(t,e,r){arguments[4][67][0].apply(r,arguments)},{buffer:47,dup:67}],159:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{dup:68,inherits:358,"safe-buffer":160,stream:326,string_decoder:327}],160:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],161:[function(t,e,r){arguments[4][70][0].apply(r,arguments)},{"./aes":144,buffer:47,"cipher-base":159,dup:70,inherits:358}],162:[function(t,e,r){arguments[4][82][0].apply(r,arguments)},{buffer:47,"create-hash/md5":200,dup:82}],163:[function(t,e,r){(function(r){function n(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new s.ec(this.curveType.name),this.keys=void 0}function i(t,e,n){Array.isArray(t)||(t=t.toArray());var i=new r(t);if(n&&i.length<n){var s=new r(n-i.length);s.fill(0),i=r.concat([s,i])}return e?i.toString(e):i}var s=t("elliptic"),o=t("bn.js");e.exports=function(t){return new n(t)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,n.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},n.prototype.computeSecret=function(t,e,n){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),i(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},n.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),i(r,t)},n.prototype.getPrivateKey=function(t){return i(this.keys.getPrivate(),t)},n.prototype.setPublicKey=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.keys._importPublic(t),this},n.prototype.setPrivateKey=function(t,e){e=e||"utf8",r.isBuffer(t)||(t=new r(t,e));var n=new o(t);return n=n.toString(16),this.keys._importPrivate(n),this}}).call(this,t("buffer").Buffer)},{"bn.js":164,buffer:47,elliptic:165}],164:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],165:[function(t,e,r){arguments[4][91][0].apply(r,arguments)},{"../package.json":197,"./elliptic/curve":168,"./elliptic/curves":171,"./elliptic/ec":172,"./elliptic/eddsa":175,"./elliptic/utils":179,brorand:180,dup:91}],166:[function(t,e,r){arguments[4][92][0].apply(r,arguments)},{"../../elliptic":165,"bn.js":164,dup:92}],167:[function(t,e,r){arguments[4][93][0].apply(r,arguments)},{"../../elliptic":165,"../curve":168,"bn.js":164,dup:93,inherits:358}],168:[function(t,e,r){arguments[4][94][0].apply(r,arguments)},{"./base":166,"./edwards":167,"./mont":169,"./short":170,dup:94}],169:[function(t,e,r){arguments[4][95][0].apply(r,arguments)},{"../../elliptic":165,"../curve":168,"bn.js":164,dup:95,inherits:358}],170:[function(t,e,r){arguments[4][96][0].apply(r,arguments)},{"../../elliptic":165,"../curve":168,"bn.js":164,dup:96,inherits:358}],171:[function(t,e,r){arguments[4][97][0].apply(r,arguments)},{"../elliptic":165,"./precomputed/secp256k1":178,dup:97,"hash.js":181}],172:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{"../../elliptic":165,"./key":173,"./signature":174,"bn.js":164,dup:98,"hmac-drbg":194}],173:[function(t,e,r){arguments[4][99][0].apply(r,arguments)},{"../../elliptic":165,"bn.js":164,dup:99}],174:[function(t,e,r){arguments[4][100][0].apply(r,arguments)},{"../../elliptic":165,"bn.js":164,dup:100}],175:[function(t,e,r){arguments[4][101][0].apply(r,arguments)},{"../../elliptic":165,"./key":176,"./signature":177,dup:101,"hash.js":181}],176:[function(t,e,r){arguments[4][102][0].apply(r,arguments)},{"../../elliptic":165,dup:102}],177:[function(t,e,r){arguments[4][103][0].apply(r,arguments)},{"../../elliptic":165,"bn.js":164,dup:103}],178:[function(t,e,r){arguments[4][104][0].apply(r,arguments)},{dup:104}],179:[function(t,e,r){arguments[4][105][0].apply(r,arguments)},{"bn.js":164,dup:105,"minimalistic-assert":195,"minimalistic-crypto-utils":196}],180:[function(t,e,r){arguments[4][106][0].apply(r,arguments)},{crypto:46,dup:106}],181:[function(t,e,r){arguments[4][107][0].apply(r,arguments)},{"./hash/common":182,"./hash/hmac":183,"./hash/ripemd":184,"./hash/sha":185,"./hash/utils":192,dup:107}],182:[function(t,e,r){arguments[4][108][0].apply(r,arguments)},{"./utils":192,dup:108,"minimalistic-assert":195}],183:[function(t,e,r){arguments[4][109][0].apply(r,arguments)},{"./utils":192,dup:109,"minimalistic-assert":195}],184:[function(t,e,r){arguments[4][110][0].apply(r,arguments)},{"./common":182,"./utils":192,dup:110}],185:[function(t,e,r){arguments[4][111][0].apply(r,arguments)},{"./sha/1":186,"./sha/224":187,"./sha/256":188,"./sha/384":189,"./sha/512":190,dup:111}],186:[function(t,e,r){arguments[4][112][0].apply(r,arguments)},{"../common":182,"../utils":192,"./common":191,dup:112}],187:[function(t,e,r){arguments[4][113][0].apply(r,arguments)},{"../utils":192,"./256":188,dup:113}],188:[function(t,e,r){arguments[4][114][0].apply(r,arguments)},{"../common":182,"../utils":192,"./common":191,dup:114,"minimalistic-assert":195}],189:[function(t,e,r){arguments[4][115][0].apply(r,arguments)},{"../utils":192,"./512":190,dup:115}],190:[function(t,e,r){arguments[4][116][0].apply(r,arguments)},{"../common":182,"../utils":192,dup:116,"minimalistic-assert":195}],191:[function(t,e,r){arguments[4][117][0].apply(r,arguments)},{"../utils":192,dup:117}],192:[function(t,e,r){arguments[4][118][0].apply(r,arguments)},{dup:118,inherits:193,"minimalistic-assert":195}],193:[function(t,e,r){arguments[4][119][0].apply(r,arguments)},{dup:119}],194:[function(t,e,r){arguments[4][120][0].apply(r,arguments)},{dup:120,"hash.js":181,"minimalistic-assert":195,"minimalistic-crypto-utils":196}],195:[function(t,e,r){arguments[4][81][0].apply(r,arguments)},{dup:81}],196:[function(t,e,r){arguments[4][122][0].apply(r,arguments)},{dup:122}],197:[function(t,e,r){arguments[4][123][0].apply(r,arguments)},{dup:123}],198:[function(t,e,r){(function(r){"use strict";function n(t){u.call(this,"digest"),this._hash=t,this.buffers=[]}function i(t){u.call(this,"digest"),this._hash=t}var s=t("inherits"),o=t("./md5"),a=t("ripemd160"),f=t("sha.js"),u=t("cipher-base");s(n,u),n.prototype._update=function(t){this.buffers.push(t)},n.prototype._final=function(){var t=r.concat(this.buffers),e=this._hash(t);return this.buffers=null,e},s(i,u),i.prototype._update=function(t){this._hash.update(t)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(t){return t=t.toLowerCase(),"md5"===t?new n(o):new i("rmd160"===t||"ripemd160"===t?new a:f(t))}}).call(this,t("buffer").Buffer)},{"./md5":200,buffer:47,"cipher-base":201,inherits:358,ripemd160:203,"sha.js":206}],199:[function(t,e,r){(function(t){"use strict";function r(e){if(e.length%n!=0){var r=e.length+(n-e.length%n);e=t.concat([e,i],r)}for(var s=new Array(e.length>>>2),o=0,a=0;o<e.length;o+=n,a++)s[a]=e.readInt32LE(o);return s}var n=4,i=new t(n);i.fill(0);e.exports=function(e,n){var i=n(r(e),8*e.length);e=new t(16);for(var s=0;s<i.length;s++)e.writeInt32LE(i[s],s<<2,!0);return e}}).call(this,t("buffer").Buffer)},{buffer:47}],200:[function(t,e,r){"use strict";function n(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,h=271733878,c=0;c<t.length;c+=16){var d=r,p=n,l=i,b=h;r=s(r,n,i,h,t[c+0],7,-680876936),h=s(h,r,n,i,t[c+1],12,-389564586),i=s(i,h,r,n,t[c+2],17,606105819),n=s(n,i,h,r,t[c+3],22,-1044525330),r=s(r,n,i,h,t[c+4],7,-176418897),h=s(h,r,n,i,t[c+5],12,1200080426),i=s(i,h,r,n,t[c+6],17,-1473231341),n=s(n,i,h,r,t[c+7],22,-45705983),r=s(r,n,i,h,t[c+8],7,1770035416),h=s(h,r,n,i,t[c+9],12,-1958414417),i=s(i,h,r,n,t[c+10],17,-42063),n=s(n,i,h,r,t[c+11],22,-1990404162),r=s(r,n,i,h,t[c+12],7,1804603682),h=s(h,r,n,i,t[c+13],12,-40341101),i=s(i,h,r,n,t[c+14],17,-1502002290),n=s(n,i,h,r,t[c+15],22,1236535329),r=o(r,n,i,h,t[c+1],5,-165796510),h=o(h,r,n,i,t[c+6],9,-1069501632),i=o(i,h,r,n,t[c+11],14,643717713),n=o(n,i,h,r,t[c+0],20,-373897302),r=o(r,n,i,h,t[c+5],5,-701558691),h=o(h,r,n,i,t[c+10],9,38016083),i=o(i,h,r,n,t[c+15],14,-660478335),n=o(n,i,h,r,t[c+4],20,-405537848),r=o(r,n,i,h,t[c+9],5,568446438),h=o(h,r,n,i,t[c+14],9,-1019803690),i=o(i,h,r,n,t[c+3],14,-187363961),n=o(n,i,h,r,t[c+8],20,1163531501),r=o(r,n,i,h,t[c+13],5,-1444681467),h=o(h,r,n,i,t[c+2],9,-51403784),i=o(i,h,r,n,t[c+7],14,1735328473),n=o(n,i,h,r,t[c+12],20,-1926607734),r=a(r,n,i,h,t[c+5],4,-378558),h=a(h,r,n,i,t[c+8],11,-2022574463),i=a(i,h,r,n,t[c+11],16,1839030562),n=a(n,i,h,r,t[c+14],23,-35309556),r=a(r,n,i,h,t[c+1],4,-1530992060),h=a(h,r,n,i,t[c+4],11,1272893353),i=a(i,h,r,n,t[c+7],16,-155497632),n=a(n,i,h,r,t[c+10],23,-1094730640),r=a(r,n,i,h,t[c+13],4,681279174),h=a(h,r,n,i,t[c+0],11,-358537222),i=a(i,h,r,n,t[c+3],16,-722521979),n=a(n,i,h,r,t[c+6],23,76029189),r=a(r,n,i,h,t[c+9],4,-640364487),h=a(h,r,n,i,t[c+12],11,-421815835),i=a(i,h,r,n,t[c+15],16,530742520),n=a(n,i,h,r,t[c+2],23,-995338651),r=f(r,n,i,h,t[c+0],6,-198630844),h=f(h,r,n,i,t[c+7],10,1126891415),i=f(i,h,r,n,t[c+14],15,-1416354905),n=f(n,i,h,r,t[c+5],21,-57434055),r=f(r,n,i,h,t[c+12],6,1700485571),h=f(h,r,n,i,t[c+3],10,-1894986606),i=f(i,h,r,n,t[c+10],15,-1051523),n=f(n,i,h,r,t[c+1],21,-2054922799),r=f(r,n,i,h,t[c+8],6,1873313359),h=f(h,r,n,i,t[c+15],10,-30611744),i=f(i,h,r,n,t[c+6],15,-1560198380),n=f(n,i,h,r,t[c+13],21,1309151649),r=f(r,n,i,h,t[c+4],6,-145523070),h=f(h,r,n,i,t[c+11],10,-1120210379),i=f(i,h,r,n,t[c+2],15,718787259),n=f(n,i,h,r,t[c+9],21,-343485551),r=u(r,d),n=u(n,p),i=u(i,l),h=u(h,b)}return[r,n,i,h]}function i(t,e,r,n,i,s){return u(h(u(u(e,t),u(n,s)),i),r)}function s(t,e,r,n,s,o,a){return i(e&r|~e&n,t,e,s,o,a)}function o(t,e,r,n,s,o,a){return i(e&n|r&~n,t,e,s,o,a)}function a(t,e,r,n,s,o,a){return i(e^r^n,t,e,s,o,a)}function f(t,e,r,n,s,o,a){return i(r^(e|~n),t,e,s,o,a)}function u(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function h(t,e){return t<<e|t>>>32-e}var c=t("./make-hash");e.exports=function(t){return c(t,n)}},{"./make-hash":199}],201:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{dup:68,inherits:358,"safe-buffer":202,stream:326,string_decoder:327}],202:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],203:[function(t,e,r){(function(r){"use strict";function n(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function i(t,e){return t<<e|t>>>32-e}function s(t,e,r,n,s,o,a,f){return i(t+(e^r^n)+o+a|0,f)+s|0}function o(t,e,r,n,s,o,a,f){return i(t+(e&r|~e&n)+o+a|0,f)+s|0}function a(t,e,r,n,s,o,a,f){return i(t+((e|~r)^n)+o+a|0,f)+s|0}function f(t,e,r,n,s,o,a,f){return i(t+(e&n|r&~n)+o+a|0,f)+s|0}function u(t,e,r,n,s,o,a,f){return i(t+(e^(r|~n))+o+a|0,f)+s|0}var h=t("inherits"),c=t("hash-base");h(n,c),n.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,h=this._c,c=this._d,d=this._e;r=s(r,n,h,c,d,t[0],0,11),h=i(h,10),d=s(d,r,n,h,c,t[1],0,14),n=i(n,10),c=s(c,d,r,n,h,t[2],0,15),r=i(r,10),h=s(h,c,d,r,n,t[3],0,12),d=i(d,10),n=s(n,h,c,d,r,t[4],0,5),c=i(c,10),r=s(r,n,h,c,d,t[5],0,8),h=i(h,10),d=s(d,r,n,h,c,t[6],0,7),n=i(n,10),c=s(c,d,r,n,h,t[7],0,9),r=i(r,10),h=s(h,c,d,r,n,t[8],0,11),d=i(d,10),n=s(n,h,c,d,r,t[9],0,13),c=i(c,10),r=s(r,n,h,c,d,t[10],0,14),h=i(h,10),d=s(d,r,n,h,c,t[11],0,15),n=i(n,10),c=s(c,d,r,n,h,t[12],0,6),r=i(r,10),h=s(h,c,d,r,n,t[13],0,7),d=i(d,10),n=s(n,h,c,d,r,t[14],0,9),c=i(c,10),r=s(r,n,h,c,d,t[15],0,8),h=i(h,10),d=o(d,r,n,h,c,t[7],1518500249,7),n=i(n,10),c=o(c,d,r,n,h,t[4],1518500249,6),r=i(r,10),h=o(h,c,d,r,n,t[13],1518500249,8),d=i(d,10),n=o(n,h,c,d,r,t[1],1518500249,13),c=i(c,10),r=o(r,n,h,c,d,t[10],1518500249,11),h=i(h,10),d=o(d,r,n,h,c,t[6],1518500249,9),n=i(n,10),c=o(c,d,r,n,h,t[15],1518500249,7),r=i(r,10),h=o(h,c,d,r,n,t[3],1518500249,15),d=i(d,10),n=o(n,h,c,d,r,t[12],1518500249,7),c=i(c,10),r=o(r,n,h,c,d,t[0],1518500249,12),h=i(h,10),d=o(d,r,n,h,c,t[9],1518500249,15),n=i(n,10),c=o(c,d,r,n,h,t[5],1518500249,9),r=i(r,10),h=o(h,c,d,r,n,t[2],1518500249,11),d=i(d,10),n=o(n,h,c,d,r,t[14],1518500249,7),c=i(c,10),r=o(r,n,h,c,d,t[11],1518500249,13),h=i(h,10),d=o(d,r,n,h,c,t[8],1518500249,12),n=i(n,10),c=a(c,d,r,n,h,t[3],1859775393,11),r=i(r,10),h=a(h,c,d,r,n,t[10],1859775393,13),d=i(d,10),n=a(n,h,c,d,r,t[14],1859775393,6),c=i(c,10),r=a(r,n,h,c,d,t[4],1859775393,7),h=i(h,10),d=a(d,r,n,h,c,t[9],1859775393,14),n=i(n,10),c=a(c,d,r,n,h,t[15],1859775393,9),r=i(r,10),h=a(h,c,d,r,n,t[8],1859775393,13),d=i(d,10),n=a(n,h,c,d,r,t[1],1859775393,15),c=i(c,10),r=a(r,n,h,c,d,t[2],1859775393,14),h=i(h,10),d=a(d,r,n,h,c,t[7],1859775393,8),n=i(n,10),c=a(c,d,r,n,h,t[0],1859775393,13),r=i(r,10),h=a(h,c,d,r,n,t[6],1859775393,6),d=i(d,10),n=a(n,h,c,d,r,t[13],1859775393,5),c=i(c,10),r=a(r,n,h,c,d,t[11],1859775393,12),h=i(h,10),d=a(d,r,n,h,c,t[5],1859775393,7),n=i(n,10),c=a(c,d,r,n,h,t[12],1859775393,5),r=i(r,10),h=f(h,c,d,r,n,t[1],2400959708,11),d=i(d,10),n=f(n,h,c,d,r,t[9],2400959708,12),c=i(c,10),r=f(r,n,h,c,d,t[11],2400959708,14),h=i(h,10),d=f(d,r,n,h,c,t[10],2400959708,15),n=i(n,10),c=f(c,d,r,n,h,t[0],2400959708,14),r=i(r,10),h=f(h,c,d,r,n,t[8],2400959708,15),d=i(d,10),n=f(n,h,c,d,r,t[12],2400959708,9),c=i(c,10),r=f(r,n,h,c,d,t[4],2400959708,8),h=i(h,10),d=f(d,r,n,h,c,t[13],2400959708,9),n=i(n,10),c=f(c,d,r,n,h,t[3],2400959708,14),r=i(r,10),h=f(h,c,d,r,n,t[7],2400959708,5),d=i(d,10),n=f(n,h,c,d,r,t[15],2400959708,6),c=i(c,10),r=f(r,n,h,c,d,t[14],2400959708,8),h=i(h,10),d=f(d,r,n,h,c,t[5],2400959708,6),n=i(n,10),c=f(c,d,r,n,h,t[6],2400959708,5),r=i(r,10),h=f(h,c,d,r,n,t[2],2400959708,12),d=i(d,10),n=u(n,h,c,d,r,t[4],2840853838,9),c=i(c,10),r=u(r,n,h,c,d,t[0],2840853838,15),h=i(h,10),d=u(d,r,n,h,c,t[5],2840853838,5),n=i(n,10),c=u(c,d,r,n,h,t[9],2840853838,11),r=i(r,10),h=u(h,c,d,r,n,t[7],2840853838,6),d=i(d,10),n=u(n,h,c,d,r,t[12],2840853838,8),c=i(c,10),r=u(r,n,h,c,d,t[2],2840853838,13),h=i(h,10),d=u(d,r,n,h,c,t[10],2840853838,12),n=i(n,10),c=u(c,d,r,n,h,t[14],2840853838,5),r=i(r,10),h=u(h,c,d,r,n,t[1],2840853838,12),d=i(d,10),n=u(n,h,c,d,r,t[3],2840853838,13),c=i(c,10),r=u(r,n,h,c,d,t[8],2840853838,14),h=i(h,10),d=u(d,r,n,h,c,t[11],2840853838,11),n=i(n,10),c=u(c,d,r,n,h,t[6],2840853838,8),r=i(r,10),h=u(h,c,d,r,n,t[15],2840853838,5),d=i(d,10),n=u(n,h,c,d,r,t[13],2840853838,6),c=i(c,10);var p=this._a,l=this._b,b=this._c,g=this._d,y=this._e;p=u(p,l,b,g,y,t[5],1352829926,8),b=i(b,10),y=u(y,p,l,b,g,t[14],1352829926,9),l=i(l,10),g=u(g,y,p,l,b,t[7],1352829926,9),p=i(p,10),b=u(b,g,y,p,l,t[0],1352829926,11),y=i(y,10),l=u(l,b,g,y,p,t[9],1352829926,13),g=i(g,10),p=u(p,l,b,g,y,t[2],1352829926,15),b=i(b,10),y=u(y,p,l,b,g,t[11],1352829926,15),l=i(l,10),g=u(g,y,p,l,b,t[4],1352829926,5),p=i(p,10),b=u(b,g,y,p,l,t[13],1352829926,7),y=i(y,10),l=u(l,b,g,y,p,t[6],1352829926,7),g=i(g,10),p=u(p,l,b,g,y,t[15],1352829926,8),b=i(b,10),y=u(y,p,l,b,g,t[8],1352829926,11),l=i(l,10),g=u(g,y,p,l,b,t[1],1352829926,14),p=i(p,10),b=u(b,g,y,p,l,t[10],1352829926,14),y=i(y,10),l=u(l,b,g,y,p,t[3],1352829926,12),g=i(g,10),p=u(p,l,b,g,y,t[12],1352829926,6),b=i(b,10),y=f(y,p,l,b,g,t[6],1548603684,9),l=i(l,10),g=f(g,y,p,l,b,t[11],1548603684,13),p=i(p,10),b=f(b,g,y,p,l,t[3],1548603684,15),y=i(y,10),l=f(l,b,g,y,p,t[7],1548603684,7),g=i(g,10),p=f(p,l,b,g,y,t[0],1548603684,12),b=i(b,10),y=f(y,p,l,b,g,t[13],1548603684,8),l=i(l,10),g=f(g,y,p,l,b,t[5],1548603684,9),p=i(p,10),b=f(b,g,y,p,l,t[10],1548603684,11),y=i(y,10),l=f(l,b,g,y,p,t[14],1548603684,7),g=i(g,10),p=f(p,l,b,g,y,t[15],1548603684,7),b=i(b,10),y=f(y,p,l,b,g,t[8],1548603684,12),l=i(l,10),g=f(g,y,p,l,b,t[12],1548603684,7),p=i(p,10),b=f(b,g,y,p,l,t[4],1548603684,6),y=i(y,10),l=f(l,b,g,y,p,t[9],1548603684,15),g=i(g,10),p=f(p,l,b,g,y,t[1],1548603684,13),b=i(b,10),y=f(y,p,l,b,g,t[2],1548603684,11),l=i(l,10),g=a(g,y,p,l,b,t[15],1836072691,9),p=i(p,10),b=a(b,g,y,p,l,t[5],1836072691,7),y=i(y,10),l=a(l,b,g,y,p,t[1],1836072691,15),g=i(g,10),p=a(p,l,b,g,y,t[3],1836072691,11),b=i(b,10),y=a(y,p,l,b,g,t[7],1836072691,8),l=i(l,10),g=a(g,y,p,l,b,t[14],1836072691,6),p=i(p,10),b=a(b,g,y,p,l,t[6],1836072691,6),y=i(y,10),l=a(l,b,g,y,p,t[9],1836072691,14),g=i(g,10),p=a(p,l,b,g,y,t[11],1836072691,12),b=i(b,10),y=a(y,p,l,b,g,t[8],1836072691,13),l=i(l,10),g=a(g,y,p,l,b,t[12],1836072691,5),p=i(p,10),b=a(b,g,y,p,l,t[2],1836072691,14),y=i(y,10),l=a(l,b,g,y,p,t[10],1836072691,13),g=i(g,10),p=a(p,l,b,g,y,t[0],1836072691,13),b=i(b,10),y=a(y,p,l,b,g,t[4],1836072691,7),l=i(l,10),g=a(g,y,p,l,b,t[13],1836072691,5),p=i(p,10),b=o(b,g,y,p,l,t[8],2053994217,15),y=i(y,10),l=o(l,b,g,y,p,t[6],2053994217,5),g=i(g,10),p=o(p,l,b,g,y,t[4],2053994217,8),b=i(b,10),y=o(y,p,l,b,g,t[1],2053994217,11),l=i(l,10),g=o(g,y,p,l,b,t[3],2053994217,14),p=i(p,10),b=o(b,g,y,p,l,t[11],2053994217,14),y=i(y,10),l=o(l,b,g,y,p,t[15],2053994217,6),g=i(g,10),p=o(p,l,b,g,y,t[0],2053994217,14),b=i(b,10),y=o(y,p,l,b,g,t[5],2053994217,6),l=i(l,10),g=o(g,y,p,l,b,t[12],2053994217,9),p=i(p,10),b=o(b,g,y,p,l,t[2],2053994217,12),y=i(y,10),l=o(l,b,g,y,p,t[13],2053994217,9),g=i(g,10),p=o(p,l,b,g,y,t[9],2053994217,12),b=i(b,10),y=o(y,p,l,b,g,t[7],2053994217,5),l=i(l,10),g=o(g,y,p,l,b,t[10],2053994217,15),p=i(p,10),b=o(b,g,y,p,l,t[14],2053994217,8),y=i(y,10),l=s(l,b,g,y,p,t[12],0,8),g=i(g,10),p=s(p,l,b,g,y,t[15],0,5),b=i(b,10),y=s(y,p,l,b,g,t[10],0,12),l=i(l,10),g=s(g,y,p,l,b,t[4],0,9),p=i(p,10),b=s(b,g,y,p,l,t[1],0,12),y=i(y,10),l=s(l,b,g,y,p,t[5],0,5),g=i(g,10),p=s(p,l,b,g,y,t[8],0,14),b=i(b,10),y=s(y,p,l,b,g,t[7],0,6),l=i(l,10),g=s(g,y,p,l,b,t[6],0,8),p=i(p,10),b=s(b,g,y,p,l,t[2],0,13),y=i(y,10),l=s(l,b,g,y,p,t[13],0,6),g=i(g,10),p=s(p,l,b,g,y,t[14],0,5),b=i(b,10),y=s(y,p,l,b,g,t[0],0,15),l=i(l,10),g=s(g,y,p,l,b,t[3],0,13),p=i(p,10),b=s(b,g,y,p,l,t[9],0,11),y=i(y,10),l=s(l,b,g,y,p,t[11],0,11),g=i(g,10);var m=this._b+h+g|0;this._b=this._c+c+y|0,this._c=this._d+d+p|0,this._d=this._e+r+l|0,this._e=this._a+n+b|0,this._a=m},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},e.exports=n}).call(this,t("buffer").Buffer)},{buffer:47,"hash-base":204,inherits:358}],204:[function(t,e,r){(function(r){"use strict";function n(t){i.call(this),this._block=new r(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=t("stream").Transform;t("inherits")(n,i),n.prototype._transform=function(t,e,n){var i=null;try{"buffer"!==e&&(t=new r(t,e)),this.update(t)}catch(t){i=t}n(i)},n.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},n.prototype.update=function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=new r(t,e||"binary"));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)n[s++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var o=0,a=8*t.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},n.prototype._update=function(t){throw new Error("_update is not implemented")},n.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},n.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=n}).call(this,t("buffer").Buffer)},{buffer:47,inherits:358,stream:326}],205:[function(t,e,r){(function(t){function r(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}r.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s||0,s=0,o=this._block;i<n;){for(var a=Math.min(e.length,s+this._blockSize-i%this._blockSize),f=a-s,u=0;u<f;u++)o[i%this._blockSize+u]=e[u+s];i+=f,s+=f,i%this._blockSize==0&&this._update(o)}return this._s=i,this},r.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r}).call(this,t("buffer").Buffer)},{buffer:47}],206:[function(t,e,r){var r=e.exports=function(t){t=t.toLowerCase();var e=r[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};r.sha=t("./sha"),r.sha1=t("./sha1"),
  r.sha224=t("./sha224"),r.sha256=t("./sha256"),r.sha384=t("./sha384"),r.sha512=t("./sha512")},{"./sha":207,"./sha1":208,"./sha224":209,"./sha256":210,"./sha384":211,"./sha512":212}],207:[function(t,e,r){(function(r){function n(){this.init(),this._w=h,f.call(this,64,56)}function i(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function o(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var a=t("inherits"),f=t("./hash"),u=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);a(n,f),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,a=0|this._c,f=0|this._d,h=0|this._e,c=0;c<16;++c)e[c]=t.readInt32BE(4*c);for(;c<80;++c)e[c]=e[c-3]^e[c-8]^e[c-14]^e[c-16];for(var d=0;d<80;++d){var p=~~(d/20),l=i(r)+o(p,n,a,f)+h+e[d]+u[p]|0;h=f,f=a,a=s(n),n=r,r=l}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=f+this._d|0,this._e=h+this._e|0},n.prototype._hash=function(){var t=new r(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,buffer:47,inherits:358}],208:[function(t,e,r){(function(r){function n(){this.init(),this._w=c,u.call(this,64,56)}function i(t){return t<<1|t>>>31}function s(t){return t<<5|t>>>27}function o(t){return t<<30|t>>>2}function a(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var f=t("inherits"),u=t("./hash"),h=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);f(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,f=0|this._c,u=0|this._d,c=0|this._e,d=0;d<16;++d)e[d]=t.readInt32BE(4*d);for(;d<80;++d)e[d]=i(e[d-3]^e[d-8]^e[d-14]^e[d-16]);for(var p=0;p<80;++p){var l=~~(p/20),b=s(r)+a(l,n,f,u)+c+e[p]+h[l]|0;c=u,u=f,f=o(n),n=r,r=b}this._a=r+this._a|0,this._b=n+this._b|0,this._c=f+this._c|0,this._d=u+this._d|0,this._e=c+this._e|0},n.prototype._hash=function(){var t=new r(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,buffer:47,inherits:358}],209:[function(t,e,r){(function(r){function n(){this.init(),this._w=a,o.call(this,64,56)}var i=t("inherits"),s=t("./sha256"),o=t("./hash"),a=new Array(64);i(n,s),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var t=new r(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,"./sha256":210,buffer:47,inherits:358}],210:[function(t,e,r){(function(r){function n(){this.init(),this._w=p,c.call(this,64,56)}function i(t,e,r){return r^t&(e^r)}function s(t,e,r){return t&e|r&(t|e)}function o(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function u(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var h=t("inherits"),c=t("./hash"),d=[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],p=new Array(64);h(n,c),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,h=0|this._c,c=0|this._d,p=0|this._e,l=0|this._f,b=0|this._g,g=0|this._h,y=0;y<16;++y)e[y]=t.readInt32BE(4*y);for(;y<64;++y)e[y]=u(e[y-2])+e[y-7]+f(e[y-15])+e[y-16]|0;for(var m=0;m<64;++m){var v=g+a(p)+i(p,l,b)+d[m]+e[m]|0,_=o(r)+s(r,n,h)|0;g=b,b=l,l=p,p=c+v|0,c=h,h=n,n=r,r=v+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=h+this._c|0,this._d=c+this._d|0,this._e=p+this._e|0,this._f=l+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},n.prototype._hash=function(){var t=new r(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,buffer:47,inherits:358}],211:[function(t,e,r){(function(r){function n(){this.init(),this._w=a,o.call(this,128,112)}var i=t("inherits"),s=t("./sha512"),o=t("./hash"),a=new Array(160);i(n,s),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}var e=new r(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,"./sha512":212,buffer:47,inherits:358}],212:[function(t,e,r){(function(r){function n(){this.init(),this._w=g,l.call(this,128,112)}function i(t,e,r){return r^t&(e^r)}function s(t,e,r){return t&e|r&(t|e)}function o(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function c(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function d(t,e){return t>>>0<e>>>0?1:0}var p=t("inherits"),l=t("./hash"),b=[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],g=new Array(160);p(n,l),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,p=0|this._ch,l=0|this._dh,g=0|this._eh,y=0|this._fh,m=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,S=0|this._cl,k=0|this._dl,I=0|this._el,A=0|this._fl,E=0|this._gl,x=0|this._hl,O=0;O<32;O+=2)e[O]=t.readInt32BE(4*O),e[O+1]=t.readInt32BE(4*O+4);for(;O<160;O+=2){var P=e[O-30],B=e[O-30+1],M=f(P,B),R=u(B,P);P=e[O-4],B=e[O-4+1];var T=h(P,B),N=c(B,P),C=e[O-14],j=e[O-14+1],U=e[O-32],L=e[O-32+1],D=R+j|0,z=M+C+d(D,R)|0;D=D+N|0,z=z+T+d(D,N)|0,D=D+L|0,z=z+U+d(D,L)|0,e[O]=z,e[O+1]=D}for(var H=0;H<160;H+=2){z=e[H],D=e[H+1];var F=s(r,n,p),K=s(_,w,S),q=o(r,_),V=o(_,r),Y=a(g,I),G=a(I,g),W=b[H],X=b[H+1],J=i(g,y,m),Z=i(I,A,E),Q=x+G|0,$=v+Y+d(Q,x)|0;Q=Q+Z|0,$=$+J+d(Q,Z)|0,Q=Q+X|0,$=$+W+d(Q,X)|0,Q=Q+D|0,$=$+z+d(Q,D)|0;var tt=V+K|0,et=q+F+d(tt,V)|0;v=m,x=E,m=y,E=A,y=g,A=I,I=k+Q|0,g=l+$+d(I,k)|0,l=p,k=S,p=n,S=w,n=r,w=_,_=Q+tt|0,r=$+et+d(_,Q)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+I|0,this._fl=this._fl+A|0,this._gl=this._gl+E|0,this._hl=this._hl+x|0,this._ah=this._ah+r+d(this._al,_)|0,this._bh=this._bh+n+d(this._bl,w)|0,this._ch=this._ch+p+d(this._cl,S)|0,this._dh=this._dh+l+d(this._dl,k)|0,this._eh=this._eh+g+d(this._el,I)|0,this._fh=this._fh+y+d(this._fl,A)|0,this._gh=this._gh+m+d(this._gl,E)|0,this._hh=this._hh+v+d(this._hl,x)|0},n.prototype._hash=function(){function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}var e=new r(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=n}).call(this,t("buffer").Buffer)},{"./hash":205,buffer:47,inherits:358}],213:[function(t,e,r){"use strict";function n(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;if(this._alg=t,this._key=e,e.length>r){e=("rmd160"===t?new u:h(t)).update(e).digest()}else e.length<r&&(e=a.concat([e,c],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^e[s],i[s]=92^e[s];this._hash="rmd160"===t?new u:h(t),this._hash.update(n)}var i=t("inherits"),s=t("./legacy"),o=t("cipher-base"),a=t("safe-buffer").Buffer,f=t("create-hash/md5"),u=t("ripemd160"),h=t("sha.js"),c=a.alloc(128);i(n,o),n.prototype._update=function(t){this._hash.update(t)},n.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:h(this._alg)).update(this._opad).update(t).digest()},e.exports=function(t,e){return t=t.toLowerCase(),"rmd160"===t||"ripemd160"===t?new n("rmd160",e):"md5"===t?new s(f,e):new n(t,e)}},{"./legacy":214,"cipher-base":215,"create-hash/md5":200,inherits:358,ripemd160:216,"safe-buffer":218,"sha.js":220}],214:[function(t,e,r){"use strict";function n(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e)),this._alg=t,this._key=e,e.length>f?e=t(e):e.length<f&&(e=s.concat([e,a],f));for(var r=this._ipad=s.allocUnsafe(f),n=this._opad=s.allocUnsafe(f),i=0;i<f;i++)r[i]=54^e[i],n[i]=92^e[i];this._hash=[r]}var i=t("inherits"),s=t("safe-buffer").Buffer,o=t("cipher-base"),a=s.alloc(128),f=64;i(n,o),n.prototype._update=function(t){this._hash.push(t)},n.prototype._final=function(){var t=this._alg(s.concat(this._hash));return this._alg(s.concat([this._opad,t]))},e.exports=n},{"cipher-base":215,inherits:358,"safe-buffer":218}],215:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{dup:68,inherits:358,"safe-buffer":218,stream:326,string_decoder:327}],216:[function(t,e,r){arguments[4][203][0].apply(r,arguments)},{buffer:47,dup:203,"hash-base":217,inherits:358}],217:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{buffer:47,dup:204,inherits:358,stream:326}],218:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],219:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{buffer:47,dup:205}],220:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./sha":221,"./sha1":222,"./sha224":223,"./sha256":224,"./sha384":225,"./sha512":226,dup:206}],221:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{"./hash":219,buffer:47,dup:207,inherits:358}],222:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{"./hash":219,buffer:47,dup:208,inherits:358}],223:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./hash":219,"./sha256":224,buffer:47,dup:209,inherits:358}],224:[function(t,e,r){arguments[4][210][0].apply(r,arguments)},{"./hash":219,buffer:47,dup:210,inherits:358}],225:[function(t,e,r){arguments[4][211][0].apply(r,arguments)},{"./hash":219,"./sha512":226,buffer:47,dup:211,inherits:358}],226:[function(t,e,r){arguments[4][212][0].apply(r,arguments)},{"./hash":219,buffer:47,dup:212,inherits:358}],227:[function(t,e,r){(function(e){function n(t){var r=new e(o[t].prime,"hex"),n=new e(o[t].gen,"hex");return new a(r,n)}function i(t,r,n,o){return e.isBuffer(r)||void 0===f[r]?i(t,"binary",r,n):(r=r||"binary",o=o||"binary",n=n||new e([2]),e.isBuffer(n)||(n=new e(n,o)),"number"==typeof t?new a(s(t,n),n,!0):(e.isBuffer(t)||(t=new e(t,r)),new a(t,n,!0)))}var s=t("./lib/generatePrime"),o=t("./lib/primes.json"),a=t("./lib/dh"),f={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=n,r.createDiffieHellman=r.DiffieHellman=i}).call(this,t("buffer").Buffer)},{"./lib/dh":228,"./lib/generatePrime":229,"./lib/primes.json":230,buffer:47}],228:[function(t,e,r){(function(r){function n(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._pub=new f(t),this}function i(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._priv=new f(t),this}function s(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in m)return m[n];var i=0;if(t.isEven()||!g.simpleSieve||!g.fermatTest(t)||!h.test(t))return i+=1,i+="02"===r||"05"===r?8:4,m[n]=i,i;h.test(t.shrn(1))||(i+=2);var s;switch(r){case"02":t.mod(c).cmp(d)&&(i+=8);break;case"05":s=t.mod(p),s.cmp(l)&&s.cmp(b)&&(i+=8);break;default:i+=4}return m[n]=i,i}function o(t,e,r){this.setGenerator(e),this.__prime=new f(t),this._prime=f.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=n,this.setPrivateKey=i):this._primeCode=8}function a(t,e){var n=new r(t.toArray());return e?n.toString(e):n}var f=t("bn.js"),u=t("miller-rabin"),h=new u,c=new f(24),d=new f(11),p=new f(10),l=new f(3),b=new f(7),g=t("./generatePrime"),y=t("randombytes");e.exports=o;var m={};Object.defineProperty(o.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=s(this.__prime,this.__gen)),this._primeCode}}),o.prototype.generateKeys=function(){return this._priv||(this._priv=new f(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},o.prototype.computeSecret=function(t){t=new f(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),n=new r(e.toArray()),i=this.getPrime();if(n.length<i.length){var s=new r(i.length-n.length);s.fill(0),n=r.concat([s,n])}return n},o.prototype.getPublicKey=function(t){return a(this._pub,t)},o.prototype.getPrivateKey=function(t){return a(this._priv,t)},o.prototype.getPrime=function(t){return a(this.__prime,t)},o.prototype.getGenerator=function(t){return a(this._gen,t)},o.prototype.setGenerator=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.__gen=t,this._gen=new f(t),this}}).call(this,t("buffer").Buffer)},{"./generatePrime":229,"bn.js":231,buffer:47,"miller-rabin":232,randombytes:297}],229:[function(t,e,r){function n(){if(null!==v)return v;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return v=t,t}function i(t){for(var e=n(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function s(t){var e=f.mont(t);return 0===p.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function o(t,e){if(t<16)return new f(2===e||5===e?[140,123]:[140,39]);e=new f(e);for(var r,n;;){for(r=new f(a(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(d),r.testn(1)||r.iadd(p),e.cmp(p)){if(!e.cmp(l))for(;r.mod(b).cmp(g);)r.iadd(m)}else for(;r.mod(u).cmp(y);)r.iadd(m);if(n=r.shrn(1),i(n)&&i(r)&&s(n)&&s(r)&&c.test(n)&&c.test(r))return r}}var a=t("randombytes");e.exports=o,o.simpleSieve=i,o.fermatTest=s;var f=t("bn.js"),u=new f(24),h=t("miller-rabin"),c=new h,d=new f(1),p=new f(2),l=new f(5),b=(new f(16),new f(8),new f(10)),g=new f(3),y=(new f(7),new f(11)),m=new f(4),v=(new f(12),null)},{"bn.js":231,"miller-rabin":232,randombytes:297}],230:[function(t,e,r){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],231:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],232:[function(t,e,r){function n(t){this.rand=t||new s.Rand}var i=t("bn.js"),s=t("brorand");e.exports=n,n.create=function(t){return new n(t)},n.prototype._rand=function(t){var e=t.bitLength(),r=this.rand.generate(Math.ceil(e/8));r[0]|=3;var n=7&e;return 0!==n&&(r[r.length-1]>>=7-n),new i(r)},n.prototype.test=function(t,e,r){var n=t.bitLength(),s=i.mont(t),o=new i(1).toRed(s);e||(e=Math.max(1,n/48|0));for(var a=t.subn(1),f=a.subn(1),u=0;!a.testn(u);u++);for(var h=t.shrn(u),c=a.toRed(s);e>0;e--){var d=this._rand(f);r&&r(d);var p=d.toRed(s).redPow(h);if(0!==p.cmp(o)&&0!==p.cmp(c)){for(var l=1;l<u;l++){if(p=p.redSqr(),0===p.cmp(o))return!1;if(0===p.cmp(c))break}if(l===u)return!1}}return!0},n.prototype.getDivisor=function(t,e){var r=t.bitLength(),n=i.mont(t),s=new i(1).toRed(n);e||(e=Math.max(1,r/48|0));for(var o=t.subn(1),a=o.subn(1),f=0;!o.testn(f);f++);for(var u=t.shrn(f),h=o.toRed(n);e>0;e--){var c=this._rand(a),d=t.gcd(c);if(0!==d.cmpn(1))return d;var p=c.toRed(n).redPow(u);if(0!==p.cmp(s)&&0!==p.cmp(h)){for(var l=1;l<f;l++){if(p=p.redSqr(),0===p.cmp(s))return p.fromRed().subn(1).gcd(t);if(0===p.cmp(h))break}if(l===f)return p=p.redSqr(),p.fromRed().subn(1).gcd(t)}}return!1}},{"bn.js":231,brorand:233}],233:[function(t,e,r){arguments[4][106][0].apply(r,arguments)},{crypto:46,dup:106}],234:[function(t,e,r){r.pbkdf2=t("./lib/async"),r.pbkdf2Sync=t("./lib/sync")},{"./lib/async":235,"./lib/sync":238}],235:[function(t,e,r){(function(r,n){function i(t){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];a=a||c.alloc(8);var e=s(a,a,10,128,t).then(function(){return!0}).catch(function(){return!1});return l[t]=e,e}function s(t,e,r,n,i){return d.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return d.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return c.from(t)})}function o(t,e){t.then(function(t){r.nextTick(function(){e(null,t)})},function(t){r.nextTick(function(){e(t)})})}var a,f=t("./precondition"),u=t("./default-encoding"),h=t("./sync"),c=t("safe-buffer").Buffer,d=n.crypto&&n.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];e.exports=function(t,e,a,d,l,b){if(c.isBuffer(t)||(t=c.from(t,u)),c.isBuffer(e)||(e=c.from(e,u)),f(a,d),"function"==typeof l&&(b=l,l=void 0),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");l=l||"sha1";var g=p[l.toLowerCase()];if(!g||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=h(t,e,a,d,l)}catch(t){return b(t)}b(null,r)});o(i(g).then(function(r){return r?s(t,e,a,d,g):h(t,e,a,d,l)}),b)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":236,"./precondition":237,"./sync":238,_process:301,"safe-buffer":241}],236:[function(t,e,r){(function(t){var r;if(t.browser)r="utf-8";else{r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}e.exports=r}).call(this,t("_process"))},{_process:301}],237:[function(t,e,r){var n=Math.pow(2,30)-1;e.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>n||e!==e)throw new TypeError("Bad key length")}},{}],238:[function(t,e,r){function n(t,e,r){var n=i(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=n(e):e.length<s&&(e=h.concat([e,c],s));for(var o=h.allocUnsafe(s+d[t]),a=h.allocUnsafe(s+d[t]),f=0;f<s;f++)o[f]=54^e[f],a[f]=92^e[f];var u=h.allocUnsafe(s+r+4);o.copy(u,0,0,s),this.ipad1=u,this.ipad2=o,this.opad=a,this.alg=t,this.blocksize=s,this.hash=n,this.size=d[t]}function i(t){function e(e){return a(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?o:"md5"===t?s:e}var s=t("create-hash/md5"),o=t("ripemd160"),a=t("sha.js"),f=t("./precondition"),u=t("./default-encoding"),h=t("safe-buffer").Buffer,c=h.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};n.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(t,e,r,i,s){h.isBuffer(t)||(t=h.from(t,u)),h.isBuffer(e)||(e=h.from(e,u)),f(r,i),s=s||"sha1";var o=new n(s,t,e.length),a=h.allocUnsafe(i),c=h.allocUnsafe(e.length+4);e.copy(c,0,0,e.length);for(var d,p,l,b,g=o.size,y=h.allocUnsafe(g),m=Math.ceil(i/g),v=i-(m-1)*g,_=1;_<=m;_++){for(c.writeUInt32BE(_,e.length),d=o.run(c,o.ipad1),d.copy(y,0,0,g),p=1;p<r;p++){d=o.run(d,o.ipad2);for(var w=0;w<g;w++)y[w]^=d[w]}l=(_-1)*g,b=_===m?v:g,y.copy(a,l,0,b)}return a}},{"./default-encoding":236,"./precondition":237,"create-hash/md5":200,ripemd160:239,"safe-buffer":241,"sha.js":243}],239:[function(t,e,r){arguments[4][203][0].apply(r,arguments)},{buffer:47,dup:203,"hash-base":240,inherits:358}],240:[function(t,e,r){arguments[4][204][0].apply(r,arguments)},{buffer:47,dup:204,inherits:358,stream:326}],241:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],242:[function(t,e,r){arguments[4][205][0].apply(r,arguments)},{buffer:47,dup:205}],243:[function(t,e,r){arguments[4][206][0].apply(r,arguments)},{"./sha":244,"./sha1":245,"./sha224":246,"./sha256":247,"./sha384":248,"./sha512":249,dup:206}],244:[function(t,e,r){arguments[4][207][0].apply(r,arguments)},{"./hash":242,buffer:47,dup:207,inherits:358}],245:[function(t,e,r){arguments[4][208][0].apply(r,arguments)},{"./hash":242,buffer:47,dup:208,inherits:358}],246:[function(t,e,r){arguments[4][209][0].apply(r,arguments)},{"./hash":242,"./sha256":247,buffer:47,dup:209,inherits:358}],247:[function(t,e,r){arguments[4][210][0].apply(r,arguments)},{"./hash":242,buffer:47,dup:210,inherits:358}],248:[function(t,e,r){arguments[4][211][0].apply(r,arguments)},{"./hash":242,"./sha512":249,buffer:47,dup:211,inherits:358}],249:[function(t,e,r){arguments[4][212][0].apply(r,arguments)},{"./hash":242,buffer:47,dup:212,inherits:358}],250:[function(t,e,r){r.publicEncrypt=t("./publicEncrypt"),r.privateDecrypt=t("./privateDecrypt"),r.privateEncrypt=function(t,e){return r.publicEncrypt(t,e,!0)},r.publicDecrypt=function(t,e){return r.privateDecrypt(t,e,!0)}},{"./privateDecrypt":293,"./publicEncrypt":294}],251:[function(t,e,r){(function(r){function n(t){var e=new r(4);return e.writeUInt32BE(t,0),e}var i=t("create-hash");e.exports=function(t,e){for(var s,o=new r(""),a=0;o.length<e;)s=n(a++),o=r.concat([o,i("sha1").update(t).update(s).digest()]);return o.slice(0,e)}}).call(this,t("buffer").Buffer)},{buffer:47,"create-hash":198}],252:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{dup:89}],253:[function(t,e,r){arguments[4][90][0].apply(r,arguments)},{"bn.js":252,buffer:47,dup:90,randombytes:297}],254:[function(t,e,r){arguments[4][124][0].apply(r,arguments)},{dup:124}],255:[function(t,e,r){arguments[4][125][0].apply(r,arguments)},{"./certificate":256,"asn1.js":259,dup:125}],256:[function(t,e,r){arguments[4][126][0].apply(r,arguments)},{"asn1.js":259,dup:126}],257:[function(t,e,r){arguments[4][127][0].apply(r,arguments)},{"browserify-aes":276,buffer:47,dup:127,
  evp_bytestokey:292}],258:[function(t,e,r){arguments[4][128][0].apply(r,arguments)},{"./aesid.json":254,"./asn1":255,"./fixProc":257,"browserify-aes":276,buffer:47,dup:128,pbkdf2:234}],259:[function(t,e,r){arguments[4][129][0].apply(r,arguments)},{"./asn1/api":260,"./asn1/base":262,"./asn1/constants":266,"./asn1/decoders":268,"./asn1/encoders":271,"bn.js":252,dup:129}],260:[function(t,e,r){arguments[4][130][0].apply(r,arguments)},{"../asn1":259,dup:130,inherits:358,vm:332}],261:[function(t,e,r){arguments[4][131][0].apply(r,arguments)},{"../base":262,buffer:47,dup:131,inherits:358}],262:[function(t,e,r){arguments[4][132][0].apply(r,arguments)},{"./buffer":261,"./node":263,"./reporter":264,dup:132}],263:[function(t,e,r){arguments[4][133][0].apply(r,arguments)},{"../base":262,dup:133,"minimalistic-assert":273}],264:[function(t,e,r){arguments[4][134][0].apply(r,arguments)},{dup:134,inherits:358}],265:[function(t,e,r){arguments[4][135][0].apply(r,arguments)},{"../constants":266,dup:135}],266:[function(t,e,r){arguments[4][136][0].apply(r,arguments)},{"./der":265,dup:136}],267:[function(t,e,r){arguments[4][137][0].apply(r,arguments)},{"../../asn1":259,dup:137,inherits:358}],268:[function(t,e,r){arguments[4][138][0].apply(r,arguments)},{"./der":267,"./pem":269,dup:138}],269:[function(t,e,r){arguments[4][139][0].apply(r,arguments)},{"./der":267,buffer:47,dup:139,inherits:358}],270:[function(t,e,r){arguments[4][140][0].apply(r,arguments)},{"../../asn1":259,buffer:47,dup:140,inherits:358}],271:[function(t,e,r){arguments[4][141][0].apply(r,arguments)},{"./der":270,"./pem":272,dup:141}],272:[function(t,e,r){arguments[4][142][0].apply(r,arguments)},{"./der":270,dup:142,inherits:358}],273:[function(t,e,r){arguments[4][81][0].apply(r,arguments)},{dup:81}],274:[function(t,e,r){arguments[4][53][0].apply(r,arguments)},{buffer:47,dup:53}],275:[function(t,e,r){arguments[4][54][0].apply(r,arguments)},{"./aes":274,"./ghash":279,buffer:47,"buffer-xor":288,"cipher-base":289,dup:54,inherits:358}],276:[function(t,e,r){arguments[4][55][0].apply(r,arguments)},{"./decrypter":277,"./encrypter":278,"./modes":280,dup:55}],277:[function(t,e,r){arguments[4][56][0].apply(r,arguments)},{"./aes":274,"./authCipher":275,"./modes":280,"./modes/cbc":281,"./modes/cfb":282,"./modes/cfb1":283,"./modes/cfb8":284,"./modes/ctr":285,"./modes/ecb":286,"./modes/ofb":287,"./streamCipher":291,buffer:47,"cipher-base":289,dup:56,evp_bytestokey:292,inherits:358}],278:[function(t,e,r){arguments[4][57][0].apply(r,arguments)},{"./aes":274,"./authCipher":275,"./modes":280,"./modes/cbc":281,"./modes/cfb":282,"./modes/cfb1":283,"./modes/cfb8":284,"./modes/ctr":285,"./modes/ecb":286,"./modes/ofb":287,"./streamCipher":291,buffer:47,"cipher-base":289,dup:57,evp_bytestokey:292,inherits:358}],279:[function(t,e,r){arguments[4][58][0].apply(r,arguments)},{buffer:47,dup:58}],280:[function(t,e,r){arguments[4][59][0].apply(r,arguments)},{dup:59}],281:[function(t,e,r){arguments[4][60][0].apply(r,arguments)},{"buffer-xor":288,dup:60}],282:[function(t,e,r){arguments[4][61][0].apply(r,arguments)},{buffer:47,"buffer-xor":288,dup:61}],283:[function(t,e,r){arguments[4][62][0].apply(r,arguments)},{buffer:47,dup:62}],284:[function(t,e,r){arguments[4][63][0].apply(r,arguments)},{buffer:47,dup:63}],285:[function(t,e,r){arguments[4][64][0].apply(r,arguments)},{buffer:47,"buffer-xor":288,dup:64}],286:[function(t,e,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],287:[function(t,e,r){arguments[4][66][0].apply(r,arguments)},{buffer:47,"buffer-xor":288,dup:66}],288:[function(t,e,r){arguments[4][67][0].apply(r,arguments)},{buffer:47,dup:67}],289:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{dup:68,inherits:358,"safe-buffer":290,stream:326,string_decoder:327}],290:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],291:[function(t,e,r){arguments[4][70][0].apply(r,arguments)},{"./aes":274,buffer:47,"cipher-base":289,dup:70,inherits:358}],292:[function(t,e,r){arguments[4][82][0].apply(r,arguments)},{buffer:47,"create-hash/md5":200,dup:82}],293:[function(t,e,r){(function(r){function n(t,e){var n=(t.modulus,t.modulus.byteLength()),i=(e.length,c("sha1").update(new r("")).digest()),o=i.length;if(0!==e[0])throw new Error("decryption error");var u=e.slice(1,o+1),h=e.slice(o+1),d=f(u,a(h,o)),p=f(h,a(d,n-o-1));if(s(i,p.slice(0,o)))throw new Error("decryption error");for(var l=o;0===p[l];)l++;if(1!==p[l++])throw new Error("decryption error");return p.slice(l)}function i(t,e,r){for(var n=e.slice(0,2),i=2,s=0;0!==e[i++];)if(i>=e.length){s++;break}var o=e.slice(2,i-1);e.slice(i-1,i);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&s++,o.length<8&&s++,s)throw new Error("decryption error");return e.slice(i)}function s(t,e){t=new r(t),e=new r(e);var n=0,i=t.length;t.length!==e.length&&(n++,i=Math.min(t.length,e.length));for(var s=-1;++s<i;)n+=t[s]^e[s];return n}var o=t("parse-asn1"),a=t("./mgf"),f=t("./xor"),u=t("bn.js"),h=t("browserify-rsa"),c=t("create-hash"),d=t("./withPublic");e.exports=function(t,e,s){var a;a=t.padding?t.padding:s?1:4;var f=o(t),c=f.modulus.byteLength();if(e.length>c||new u(e).cmp(f.modulus)>=0)throw new Error("decryption error");var p;p=s?d(new u(e),f):h(e,f);var l=new r(c-p.length);if(l.fill(0),p=r.concat([l,p],c),4===a)return n(f,p);if(1===a)return i(f,p,s);if(3===a)return p;throw new Error("unknown padding")}}).call(this,t("buffer").Buffer)},{"./mgf":251,"./withPublic":295,"./xor":296,"bn.js":252,"browserify-rsa":253,buffer:47,"create-hash":198,"parse-asn1":258}],294:[function(t,e,r){(function(r){function n(t,e){var n=t.modulus.byteLength(),i=e.length,s=f("sha1").update(new r("")).digest(),o=s.length,d=2*o;if(i>n-d-2)throw new Error("message too long");var p=new r(n-i-d-2);p.fill(0);var l=n-o-1,b=a(o),g=h(r.concat([s,p,new r([1]),e],l),u(b,l)),y=h(b,u(g,o));return new c(r.concat([new r([0]),y,g],n))}function i(t,e,n){var i=e.length,o=t.modulus.byteLength();if(i>o-11)throw new Error("message too long");var a;return n?(a=new r(o-i-3),a.fill(255)):a=s(o-i-3),new c(r.concat([new r([0,n?1:2]),a,new r([0]),e],o))}function s(t,e){for(var n,i=new r(t),s=0,o=a(2*t),f=0;s<t;)f===o.length&&(o=a(2*t),f=0),(n=o[f++])&&(i[s++]=n);return i}var o=t("parse-asn1"),a=t("randombytes"),f=t("create-hash"),u=t("./mgf"),h=t("./xor"),c=t("bn.js"),d=t("./withPublic"),p=t("browserify-rsa");e.exports=function(t,e,r){var s;s=t.padding?t.padding:r?1:4;var a,f=o(t);if(4===s)a=n(f,e);else if(1===s)a=i(f,e,r);else{if(3!==s)throw new Error("unknown padding");if(a=new c(e),a.cmp(f.modulus)>=0)throw new Error("data too long for modulus")}return r?p(a,f):d(a,f)}}).call(this,t("buffer").Buffer)},{"./mgf":251,"./withPublic":295,"./xor":296,"bn.js":252,"browserify-rsa":253,buffer:47,"create-hash":198,"parse-asn1":258,randombytes:297}],295:[function(t,e,r){(function(r){function n(t,e){return new r(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray())}var i=t("bn.js");e.exports=n}).call(this,t("buffer").Buffer)},{"bn.js":252,buffer:47}],296:[function(t,e,r){e.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},{}],297:[function(t,e,r){(function(r,n){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function s(t,e){if(t>65536)throw new Error("requested too many random bytes");var i=new n.Uint8Array(t);t>0&&a.getRandomValues(i);var s=o.from(i.buffer);return"function"==typeof e?r.nextTick(function(){e(null,s)}):s}var o=t("safe-buffer").Buffer,a=n.crypto||n.msCrypto;a&&a.getRandomValues?e.exports=s:e.exports=i}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:301,"safe-buffer":298}],298:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],299:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function s(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!s(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,s,f,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(r=this._events[t],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),u=r.slice(),n=u.length,f=0;f<n;f++)u[f].apply(this,s);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],300:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function i(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}e.exports=function(t){return null!=t&&(n(t)||i(t)||!!t._isBuffer)}},{}],301:[function(t,e,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){g&&l&&(g=!1,l.length?b=l.concat(b):y=-1,b.length&&f())}function f(){if(!g){var t=s(a);g=!0;for(var e=b.length;e;){for(l=b,b=[];++y<e;)l&&l[y].run();y=-1,e=b.length}l=null,g=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function h(){}var c,d,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var l,b=[],g=!1,y=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];b.push(new u(t,e)),1!==b.length||g||s(f)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=h,p.addListener=h,p.once=h,p.off=h,p.removeListener=h,p.removeAllListeners=h,p.emit=h,p.prependListener=h,p.prependOnceListener=h,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],302:[function(t,e,r){(function(t){!function(n){function i(t){throw new RangeError(T[t])}function s(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function o(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(R,"."),n+s(t.split("."),e).join(".")}function a(t){for(var e,r,n=[],i=0,s=t.length;i<s;)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<s?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function f(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function u(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:S}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function c(t,e,r){var n=0;for(t=r?C(t/E):t>>1,t+=C(t/e);t>N*I>>1;n+=S)t=C(t/N);return C(n+(N+1)*t/(t+A))}function d(t){var e,r,n,s,o,a,h,d,p,l,b=[],g=t.length,y=0,m=O,v=x;for(r=t.lastIndexOf(P),r<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&i("not-basic"),b.push(t.charCodeAt(n));for(s=r>0?r+1:0;s<g;){for(o=y,a=1,h=S;s>=g&&i("invalid-input"),d=u(t.charCodeAt(s++)),(d>=S||d>C((w-y)/a))&&i("overflow"),y+=d*a,p=h<=v?k:h>=v+I?I:h-v,!(d<p);h+=S)l=S-p,a>C(w/l)&&i("overflow"),a*=l;e=b.length+1,v=c(y-o,e,0==o),C(y/e)>w-m&&i("overflow"),m+=C(y/e),y%=e,b.splice(y++,0,m)}return f(b)}function p(t){var e,r,n,s,o,f,u,d,p,l,b,g,y,m,v,_=[];for(t=a(t),g=t.length,e=O,r=0,o=x,f=0;f<g;++f)(b=t[f])<128&&_.push(j(b));for(n=s=_.length,s&&_.push(P);n<g;){for(u=w,f=0;f<g;++f)(b=t[f])>=e&&b<u&&(u=b);for(y=n+1,u-e>C((w-r)/y)&&i("overflow"),r+=(u-e)*y,e=u,f=0;f<g;++f)if(b=t[f],b<e&&++r>w&&i("overflow"),b==e){for(d=r,p=S;l=p<=o?k:p>=o+I?I:p-o,!(d<l);p+=S)v=d-l,m=S-l,_.push(j(h(l+v%m,0))),d=C(v/m);_.push(j(h(d,0))),o=c(r,y,n==s),r=0,++n}++r,++e}return _.join("")}function l(t){return o(t,function(t){return B.test(t)?d(t.slice(4).toLowerCase()):t})}function b(t){return o(t,function(t){return M.test(t)?"xn--"+p(t):t})}var g="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof e&&e&&!e.nodeType&&e,m="object"==typeof t&&t;m.global!==m&&m.window!==m&&m.self!==m||(n=m);var v,_,w=2147483647,S=36,k=1,I=26,A=38,E=700,x=72,O=128,P="-",B=/^xn--/,M=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=S-k,C=Math.floor,j=String.fromCharCode;if(v={version:"1.4.1",ucs2:{decode:a,encode:f},decode:d,encode:p,toASCII:b,toUnicode:l},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(g&&y)if(e.exports==g)y.exports=v;else for(_ in v)v.hasOwnProperty(_)&&(g[_]=v[_]);else n.punycode=v}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],303:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,s){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var f=1e3;s&&"number"==typeof s.maxKeys&&(f=s.maxKeys);var u=t.length;f>0&&u>f&&(u=f);for(var h=0;h<u;++h){var c,d,p,l,b=t[h].replace(a,"%20"),g=b.indexOf(r);g>=0?(c=b.substr(0,g),d=b.substr(g+1)):(c=b,d=""),p=decodeURIComponent(c),l=decodeURIComponent(d),n(o,p)?i(o[p])?o[p].push(l):o[p]=[o[p],l]:o[p]=l}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],304:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?n(o(t),function(o){var a=encodeURIComponent(i(o))+r;return s(t[o])?n(t[o],function(t){return a+encodeURIComponent(i(t))}).join(e):a+encodeURIComponent(i(t[o]))}).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],305:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":303,"./encode":304}],306:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":307}],307:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);u.call(this,t),h.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||o(s,this)}function s(t){t.end()}var o=t("process-nextick-args"),a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=n;var f=t("core-util-is");f.inherits=t("inherits");var u=t("./_stream_readable"),h=t("./_stream_writable");f.inherits(n,u);for(var c=a(h.prototype),d=0;d<c.length;d++){var p=c[d];n.prototype[p]||(n.prototype[p]=h.prototype[p])}Object.defineProperty(n.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),n.prototype._destroy=function(t,e){this.push(null),this.end(),o(e,t)}},{"./_stream_readable":309,"./_stream_writable":311,"core-util-is":315,inherits:316,"process-nextick-args":318}],308:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);i.call(this,t)}e.exports=n;var i=t("./_stream_transform"),s=t("core-util-is");s.inherits=t("inherits"),s.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":310,"core-util-is":315,inherits:316}],309:[function(t,e,r){(function(r,n){"use strict";function i(t){return U.from(t)}function s(t){return U.isBuffer(t)||t instanceof L}function o(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?N(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}function a(e,r){T=T||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof T&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new K,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(F||(F=t("string_decoder/").StringDecoder),this.decoder=new F(e.encoding),this.encoding=e.encoding)}function f(e){if(T=T||t("./_stream_duplex"),!(this instanceof f))return new f(e);this._readableState=new a(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),j.call(this)}function u(t,e,r,n,s){var o=t._readableState;if(null===e)o.reading=!1,b(t,o);else{var a;s||(a=c(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===U.prototype||(e=i(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):h(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?h(t,o,e,!1):m(t,o)):h(t,o,e,!1))):n||(o.reading=!1)}return d(o)}function h(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&g(t)),m(t,e)}function c(t,e){var r;return s(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function d(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function p(t){return t>=Y?t=Y:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function l(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=p(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function b(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,g(t)}}function g(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(H("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?R(y,t):y(t))}function y(t){H("emit readable"),t.emit("readable"),I(t)}function m(t,e){e.readingMore||(e.readingMore=!0,R(v,t,e))}function v(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(H("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function _(t){return function(){var e=t._readableState;H("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&C(t,"data")&&(e.flowing=!0,I(t))}}function w(t){H("readable nexttick read 0"),t.read(0)}function S(t,e){e.resumeScheduled||(e.resumeScheduled=!0,R(k,t,e))}function k(t,e){e.reading||(H("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(H("flow",e.flowing);e.flowing&&null!==t.read(););}function A(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=E(t,e.buffer,e.decoder),r}function E(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?x(t,e):O(t,e),n}function x(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?i+=s:i+=s.slice(0,t),0===(t-=o)){o===s.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++n}return e.length-=n,i}function O(t,e){var r=U.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var s=n.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),0===(t-=o)){o===s.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(o));break}++i}return e.length-=i,r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,R(B,e,t))}function B(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function M(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}var R=t("process-nextick-args");e.exports=f;var T,N=t("isarray");f.ReadableState=a;var C=(t("events").EventEmitter,function(t,e){return t.listeners(e).length}),j=t("./internal/streams/stream"),U=t("safe-buffer").Buffer,L=n.Uint8Array||function(){},D=t("core-util-is");D.inherits=t("inherits");var z=t("util"),H=void 0;H=z&&z.debuglog?z.debuglog("stream"):function(){};var F,K=t("./internal/streams/BufferList"),q=t("./internal/streams/destroy");D.inherits(f,j);var V=["error","close","destroy","pause","resume"];Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),f.prototype.destroy=q.destroy,f.prototype._undestroy=q.undestroy,f.prototype._destroy=function(t,e){this.push(null),e(t)},f.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=U.from(t,e),e=""),r=!0),u(this,t,e,!1,r)},f.prototype.unshift=function(t){return u(this,t,null,!0,!1)},f.prototype.isPaused=function(){return!1===this._readableState.flowing},f.prototype.setEncoding=function(e){return F||(F=t("string_decoder/").StringDecoder),this._readableState.decoder=new F(e),this._readableState.encoding=e,this};var Y=8388608;f.prototype.read=function(t){H("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return H("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):g(this),null;if(0===(t=l(t,e))&&e.ended)return 0===e.length&&P(this),null;var n=e.needReadable;H("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,H("length less than watermark",n)),e.ended||e.reading?(n=!1,H("reading or ended",n)):n&&(H("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=l(r,e)));var i;return i=t>0?A(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==i&&this.emit("data",i),i},f.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},f.prototype.pipe=function(t,e){function n(t,e){H("onunpipe"),t===d&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,s())}function i(){H("onend"),t.end()}function s(){H("cleanup"),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("drain",g),t.removeListener("error",f),t.removeListener("unpipe",n),d.removeListener("end",i),d.removeListener("end",c),d.removeListener("data",a),y=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||g()}function a(e){H("ondata"),m=!1,!1!==t.write(e)||m||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&-1!==M(p.pipes,t))&&!y&&(H("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,m=!0),d.pause())}function f(e){H("onerror",e),c(),t.removeListener("error",f),0===C(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",h),c()}function h(){H("onfinish"),t.removeListener("close",u),c()}function c(){H("unpipe"),d.unpipe(t)}var d=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,H("pipe count=%d opts=%j",p.pipesCount,e);var l=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr,b=l?i:c;p.endEmitted?R(b):d.once("end",b),t.on("unpipe",n);var g=_(d);t.on("drain",g);var y=!1,m=!1;return d.on("data",a),o(t,"error",f),t.once("close",u),t.once("finish",h),t.emit("pipe",d),p.flowing||(H("pipe resume"),d.resume()),t},f.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=M(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},f.prototype.on=function(t,e){var r=j.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&g(this):R(w,this))}return r},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var t=this._readableState;return t.flowing||(H("resume"),t.flowing=!0,S(this,t)),this},f.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(H("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(H("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)){n.push(i)||(r=!0,t.pause())}});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<V.length;s++)t.on(V[s],n.emit.bind(n,V[s]));return n._read=function(e){H("wrapped _read",e),r&&(r=!1,t.resume())},n},f._fromList=A}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":307,"./internal/streams/BufferList":312,"./internal/streams/destroy":313,"./internal/streams/stream":314,_process:301,"core-util-is":315,events:299,inherits:316,isarray:317,"process-nextick-args":318,"safe-buffer":319,"string_decoder/":320,util:46}],310:[function(t,e,r){"use strict";function n(t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&t.push(r),i(e);var s=t._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&t._read(s.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);a.call(this,t),this._transformState=new n(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){o(e,t,r)}):o(e)})}function o(t,e,r){if(e)return t.emit("error",e);null!==r&&void 0!==r&&t.push(r);var n=t._writableState,i=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}e.exports=s;var a=t("./_stream_duplex"),f=t("core-util-is");f.inherits=t("inherits"),f.inherits(s,a),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},
  s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;a.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},{"./_stream_duplex":307,"core-util-is":315,inherits:316}],311:[function(t,e,r){(function(r,n){"use strict";function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){E(e,t)}}function s(t){return T.from(t)}function o(t){return T.isBuffer(t)||t instanceof N}function a(){}function f(e,r){O=O||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof O&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){y(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function u(e){if(O=O||t("./_stream_duplex"),!(j.call(u,this)||this instanceof O))return new u(e);this._writableState=new f(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),R.call(this)}function h(t,e){var r=new Error("write after end");t.emit("error",r),x(e,r)}function c(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),x(n,s),i=!1),i}function d(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=T.from(e,r)),e}function p(t,e,r,n,i,s){if(!r){var o=d(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var f=e.length<e.highWaterMark;if(f||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else l(t,e,!1,a,n,i,s);return f}function l(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function b(t,e,r,n,i){--e.pendingcb,r?(x(i,n),x(I,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),I(t,e))}function g(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function y(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(g(r),e)b(t,r,n,e,i);else{var s=w(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?P(m,t,r,s,i):m(t,r,s,i)}}function m(t,e,r,n){r||v(t,e),e.pendingcb--,n(),I(t,e)}function v(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,s=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,f=!0;r;)s[a]=r,r.isBuf||(f=!1),r=r.next,a+=1;s.allBuffers=f,l(t,e,!0,e.length,s,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new i(e)}else{for(;r;){var u=r.chunk,h=r.encoding,c=r.callback;if(l(t,e,!1,e.objectMode?1:u.length,u,h,c),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function w(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),I(t,e)})}function k(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,x(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function I(t,e){var r=w(e);return r&&(k(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}function A(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?x(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function E(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}var x=t("process-nextick-args");e.exports=u;var O,P=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:x;u.WritableState=f;var B=t("core-util-is");B.inherits=t("inherits");var M={deprecate:t("util-deprecate")},R=t("./internal/streams/stream"),T=t("safe-buffer").Buffer,N=n.Uint8Array||function(){},C=t("./internal/streams/destroy");B.inherits(u,R),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:M.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var j;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(t){return!!j.call(this,t)||t&&t._writableState instanceof f}})):j=function(t){return t instanceof this},u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},u.prototype.write=function(t,e,r){var n=this._writableState,i=!1,f=o(t)&&!n.objectMode;return f&&!T.isBuffer(t)&&(t=s(t)),"function"==typeof e&&(r=e,e=null),f?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=a),n.ended?h(this,r):(f||c(this,n,t,r))&&(n.pendingcb++,i=p(this,n,f,t,e,r)),i},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},u.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},u.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},u.prototype._writev=null,u.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||A(this,n,r)},Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),u.prototype.destroy=C.destroy,u.prototype._undestroy=C.undestroy,u.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":307,"./internal/streams/destroy":313,"./internal/streams/stream":314,_process:301,"core-util-is":315,inherits:316,"process-nextick-args":318,"safe-buffer":319,"util-deprecate":321}],312:[function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,r){t.copy(e,r)}var s=t("safe-buffer").Buffer;e.exports=function(){function t(){n(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return s.alloc(0);if(1===this.length)return this.head.data;for(var e=s.allocUnsafe(t>>>0),r=this.head,n=0;r;)i(r.data,e,n),n+=r.data.length,r=r.next;return e},t}()},{"safe-buffer":319}],313:[function(t,e,r){"use strict";function n(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(n||i)return void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||o(s,this,t));this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(o(s,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(t,e){t.emit("error",e)}var o=t("process-nextick-args");e.exports={destroy:n,undestroy:i}},{"process-nextick-args":318}],314:[function(t,e,r){e.exports=t("events").EventEmitter},{events:299}],315:[function(t,e,r){(function(t){function e(t){return Array.isArray?Array.isArray(t):"[object Array]"===g(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function s(t){return null==t}function o(t){return"number"==typeof t}function a(t){return"string"==typeof t}function f(t){return"symbol"==typeof t}function u(t){return void 0===t}function h(t){return"[object RegExp]"===g(t)}function c(t){return"object"==typeof t&&null!==t}function d(t){return"[object Date]"===g(t)}function p(t){return"[object Error]"===g(t)||t instanceof Error}function l(t){return"function"==typeof t}function b(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function g(t){return Object.prototype.toString.call(t)}r.isArray=e,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=s,r.isNumber=o,r.isString=a,r.isSymbol=f,r.isUndefined=u,r.isRegExp=h,r.isObject=c,r.isDate=d,r.isError=p,r.isFunction=l,r.isPrimitive=b,r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":300}],316:[function(t,e,r){arguments[4][119][0].apply(r,arguments)},{dup:119}],317:[function(t,e,r){arguments[4][50][0].apply(r,arguments)},{dup:50}],318:[function(t,e,r){(function(t){"use strict";function r(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return t.nextTick(function(){e.apply(null,s)})}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=r:e.exports=t.nextTick}).call(this,t("_process"))},{_process:301}],319:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{buffer:47,dup:69}],320:[function(t,e,r){"use strict";function n(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function i(t){var e=n(t);if("string"!=typeof e&&(m.isEncoding===v||!v(t)))throw new Error("Unknown encoding: "+t);return e||t}function s(t){this.encoding=i(t);var e;switch(this.encoding){case"utf16le":this.text=d,this.end=p,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=l,this.end=b,e=3;break;default:return this.write=g,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t,e,r){var n=e.length-1;if(n<r)return 0;var i=o(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r?0:(i=o(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r?0:(i=o(e[n]),i>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0)}function f(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}function u(t){var e=this.lastTotal-this.lastNeed,r=f(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){var r=a(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function d(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function p(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function b(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function g(t){return t.toString(this.encoding)}function y(t){return t&&t.length?this.write(t):""}var m=t("safe-buffer").Buffer,v=m.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};r.StringDecoder=s,s.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},s.prototype.end=c,s.prototype.text=h,s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":319}],321:[function(t,e,r){(function(t){function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],322:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":323}],323:[function(t,e,r){r=e.exports=t("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":307,"./lib/_stream_passthrough.js":308,"./lib/_stream_readable.js":309,"./lib/_stream_transform.js":310,"./lib/_stream_writable.js":311}],324:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":323}],325:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":311}],326:[function(t,e,r){function n(){i.call(this)}e.exports=n;var i=t("events").EventEmitter;t("inherits")(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function s(){h||(h=!0,t.end())}function o(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(f(),0===i.listenerCount(this,"error"))throw t}function f(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",s),u.removeListener("close",o),u.removeListener("error",a),t.removeListener("error",a),u.removeListener("end",f),u.removeListener("close",f),t.removeListener("close",f)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&!1===e.end||(u.on("end",s),u.on("close",o));var h=!1;return u.on("error",a),t.on("error",a),u.on("end",f),u.on("close",f),t.on("close",f),t.emit("pipe",u),t}},{events:299,inherits:358,"readable-stream/duplex.js":306,"readable-stream/passthrough.js":322,"readable-stream/readable.js":323,"readable-stream/transform.js":324,"readable-stream/writable.js":325}],327:[function(t,e,r){function n(t){if(t&&!f(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function o(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=t("buffer").Buffer,f=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=r.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),t.copy(this.charBuffer,0,0,s),e.substring(0,i)}return e},u.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},u.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},{buffer:47}],328:[function(t,e,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&u.isObject(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function s(t){return u.isString(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function o(t,e){return i(t,!1,!0).resolve(e)}function a(t,e){return t?i(t,!1,!0).resolveObject(e):e}var f=t("punycode"),u=t("./util");r.parse=i,r.resolve=o,r.resolveObject=a,r.format=s,r.Url=n;var h=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(p),b=["'"].concat(l),g=["%","/","?",";","#"].concat(b),y=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=t("querystring");n.prototype.parse=function(t,e,r){if(!u.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),i=-1!==n&&n<t.indexOf("#")?"?":"#",s=t.split(i),o=/\\/g;s[0]=s[0].replace(o,"/"),t=s.join(i);var a=t;if(a=a.trim(),!r&&1===t.split("#").length){var c=d.exec(a);if(c)return this.path=a,this.href=a,this.pathname=c[1],c[2]?(this.search=c[2],this.query=e?k.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=h.exec(a);if(p){p=p[0];var l=p.toLowerCase();this.protocol=l,a=a.substr(p.length)}if(r||p||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var I="//"===a.substr(0,2);!I||p&&w[p]||(a=a.substr(2),this.slashes=!0)}if(!w[p]&&(I||p&&!S[p])){for(var A=-1,E=0;E<y.length;E++){var x=a.indexOf(y[E]);-1!==x&&(-1===A||x<A)&&(A=x)}var O,P;P=-1===A?a.lastIndexOf("@"):a.lastIndexOf("@",A),-1!==P&&(O=a.slice(0,P),a=a.slice(P+1),this.auth=decodeURIComponent(O)),A=-1;for(var E=0;E<g.length;E++){var x=a.indexOf(g[E]);-1!==x&&(-1===A||x<A)&&(A=x)}-1===A&&(A=a.length),this.host=a.slice(0,A),a=a.slice(A),this.parseHost(),this.hostname=this.hostname||"";var B="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!B)for(var M=this.hostname.split(/\./),E=0,R=M.length;E<R;E++){var T=M[E];if(T&&!T.match(m)){for(var N="",C=0,j=T.length;C<j;C++)T.charCodeAt(C)>127?N+="x":N+=T[C];if(!N.match(m)){var U=M.slice(0,E),L=M.slice(E+1),D=T.match(v);D&&(U.push(D[1]),L.unshift(D[2])),L.length&&(a="/"+L.join(".")+a),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),B||(this.hostname=f.toASCII(this.hostname));var z=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+z,this.href+=this.host,B&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!_[l])for(var E=0,R=b.length;E<R;E++){var F=b[E];if(-1!==a.indexOf(F)){var K=encodeURIComponent(F);K===F&&(K=escape(F)),a=a.split(F).join(K)}}var q=a.indexOf("#");-1!==q&&(this.hash=a.substr(q),a=a.slice(0,q));var V=a.indexOf("?");if(-1!==V?(this.search=a.substr(V),this.query=a.substr(V+1),e&&(this.query=k.parse(this.query)),a=a.slice(0,V)):e&&(this.search="",this.query={}),a&&(this.pathname=a),S[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var z=this.pathname||"",Y=this.search||"";this.path=z+Y}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(s=k.stringify(this.query));var o=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||S[e])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),e+i+r+o+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(u.isString(t)){var e=new n;e.parse(t,!1,!0),t=e}for(var r=new n,i=Object.keys(this),s=0;s<i.length;s++){var o=i[s];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),f=0;f<a.length;f++){var h=a[f];"protocol"!==h&&(r[h]=t[h])}return S[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!S[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var p=c[d];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||w[t.protocol])r.pathname=t.pathname;else{for(var l=(t.pathname||"").split("/");l.length&&!(t.host=l.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==l[0]&&l.unshift(""),l.length<2&&l.unshift(""),r.pathname=l.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var b=r.pathname||"",g=r.search||"";r.path=b+g}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),m=t.host||t.pathname&&"/"===t.pathname.charAt(0),v=m||y||r.host&&t.pathname,_=v,k=r.pathname&&r.pathname.split("/")||[],l=t.pathname&&t.pathname.split("/")||[],I=r.protocol&&!S[r.protocol];if(I&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===l[0]?l[0]=t.host:l.unshift(t.host)),t.host=null),v=v&&(""===l[0]||""===k[0])),m)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,k=l;else if(l.length)k||(k=[]),k.pop(),k=k.concat(l),r.search=t.search,r.query=t.query;else if(!u.isNullOrUndefined(t.search)){if(I){r.hostname=r.host=k.shift();var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return r.search=t.search,r.query=t.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=k.slice(-1)[0],x=(r.host||t.host||k.length>1)&&("."===E||".."===E)||""===E,O=0,P=k.length;P>=0;P--)E=k[P],"."===E?k.splice(P,1):".."===E?(k.splice(P,1),O++):O&&(k.splice(P,1),O--);if(!v&&!_)for(;O--;O)k.unshift("..");!v||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),x&&"/"!==k.join("/").substr(-1)&&k.push("");var B=""===k[0]||k[0]&&"/"===k[0].charAt(0);if(I){r.hostname=r.host=B?"":k.length?k.shift():"";var A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");A&&(r.auth=A.shift(),r.host=r.hostname=A.shift())}return v=v||r.host&&k.length,v&&!B&&k.unshift(""),k.length?r.pathname=k.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=c.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":329,punycode:302,querystring:305}],329:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],330:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],331:[function(t,e,r){(function(e,n){function i(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(e)?n.showHidden=e:e&&r._extend(n,e),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),f(n,t,n.depth)}function s(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function o(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function f(t,e,n){if(t.customInspect&&e&&E(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=f(t,i,n)),i}var s=u(t,e);if(s)return s;var o=Object.keys(e),b=a(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),A(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(e);if(0===o.length){if(E(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(S(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(I(e))return t.stylize(Date.prototype.toString.call(e),"date");if(A(e))return h(e)}var y="",m=!1,_=["{","}"];if(l(e)&&(m=!0,_=["[","]"]),E(e)){y=" [Function"+(e.name?": "+e.name:"")+"]"}if(S(e)&&(y=" "+RegExp.prototype.toString.call(e)),I(e)&&(y=" "+Date.prototype.toUTCString.call(e)),A(e)&&(y=" "+h(e)),0===o.length&&(!m||0==e.length))return _[0]+y+_[1];if(n<0)return S(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var w;return w=m?c(t,e,n,b,o):o.map(function(r){return d(t,e,n,b,r,m)}),t.seen.pop(),p(w,y,_)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):b(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,n,i){for(var s=[],o=0,a=e.length;o<a;++o)M(e,String(o))?s.push(d(t,e,r,n,String(o),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(d(t,e,r,n,i,!0))}),s}function d(t,e,r,n,i,s){var o,a,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),M(n,i)||(o="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?f(t,u.value,null):f(t,u.value,r-1),a.indexOf("\n")>-1&&(a=s?a.split("\n").map(function(t){return"  "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return"   "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function p(t,e,r){var n=0;return t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function l(t){return Array.isArray(t)}function b(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return null==t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function _(t){
  return"symbol"==typeof t}function w(t){return void 0===t}function S(t){return k(t)&&"[object RegExp]"===O(t)}function k(t){return"object"==typeof t&&null!==t}function I(t){return k(t)&&"[object Date]"===O(t)}function A(t){return k(t)&&("[object Error]"===O(t)||t instanceof Error)}function E(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function O(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}function B(){var t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var R=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,s=n.length,o=String(t).replace(R,function(t){if("%%"===t)return"%";if(r>=s)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),a=n[r];r<s;a=n[++r])g(a)||!k(a)?o+=" "+a:o+=" "+i(a);return o},r.deprecate=function(t,i){function s(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}if(w(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return s};var T,N={};r.debuglog=function(t){if(w(T)&&(T=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(T)){var n=e.pid;N[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else N[t]=function(){};return N[t]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=l,r.isBoolean=b,r.isNull=g,r.isNullOrUndefined=y,r.isNumber=m,r.isString=v,r.isSymbol=_,r.isUndefined=w,r.isRegExp=S,r.isObject=k,r.isDate=I,r.isError=A,r.isFunction=E,r.isPrimitive=x,r.isBuffer=t("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",B(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":330,_process:301,inherits:358}],332:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var s=Object_keys(r),o=n.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(s,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return forEach(Object_keys(e),function(r){t[r]=e[r]}),r},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}},{indexof:333}],333:[function(t,e,r){var n=[].indexOf;e.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},{}],334:[function(t,e,r){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function i(t,e,r){if(null!==t&&"object"==typeof t&&Array.isArray(t.words))return t;this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==e&&"be"!==e||(r=e,e=10),null!==t&&this._init(t||0,e||10,r||"be")}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),s=e;s<i;s++){var o=t.charCodeAt(s)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function o(t,e,r,n){for(var i=0,s=Math.min(t.length,r),o=e;o<s;o++){var a=t.charCodeAt(o)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function a(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).ishln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){a.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){a.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){a.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function c(){a.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function d(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else this.m=t,this.prime=null}function p(t){d.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).ishln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv.sign=!0,this.minv=this.minv.mod(this.r)}"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26,i.prototype._init=function(t,e,n){if("number"==typeof t)return t<0&&(this.sign=!0,t=-t),void(t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3));if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.sign=!0),this.strip()},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s=0;if("be"===n)for(var i=t.length-1,o=0;i>=0;i-=3){var a=t[i]|t[i-1]<<8|t[i-2]<<16;this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,s+=24,s>=26&&(s-=26,o++)}else if("le"===n)for(var i=0,o=0;i<t.length;i+=3){var a=t[i]|t[i+1]<<8|t[i+2]<<16;this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,s+=24,s>=26&&(s-=26,o++)}return this.strip()},i.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var n=0,r=t.length-6,i=0;r>=e;r-=6){var o=s(t,r,r+6);this.words[i]|=o<<n&67108863,this.words[i+1]|=o>>>26-n&4194303,n+=24,n>=26&&(n-=26,i++)}if(r+6!==e){var o=s(t,e,r+6);this.words[i]|=o<<n&67108863,this.words[i+1]|=o>>>26-n&4194303}this.strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var s=t.length-r,a=s%n,f=Math.min(s,s-a)+r,u=0,h=r;h<f;h+=n)u=o(t,h,h+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){for(var c=1,u=o(t,h,t.length,e),h=0;h<a;h++)c*=e;this.imuln(c),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.sign=this.sign,t.red=this.red},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],b=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(t,e){if(16===(t=t||10)||"hex"===t){for(var n="",i=0,e=0|e||1,s=0,o=0;o<this.length;o++){var a=this.words[o],f=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,n=0!==s||o!==this.length-1?l[6-f.length]+f+n:f+n,i+=2,i>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%e!=0;)n="0"+n;return this.sign&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var u=b[t],h=g[t],n="",c=this.clone();for(c.sign=!1;0!==c.cmpn(0);){var d=c.modn(h).toString(t);c=c.idivn(h),n=0!==c.cmpn(0)?l[u-d.length]+d+n:d+n}return 0===this.cmpn(0)&&(n="0"+n),this.sign&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(){this.strip();var t=new Array(this.byteLength());t[0]=0;for(var e=this.clone(),r=0;0!==e.cmpn(0);r++){var n=e.andln(255);e.ishrn(8),t[t.length-r-1]=n}return t},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},i.prototype.bitLength=function(){var t=0,e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var t=this.clone();return t.sign=!this.sign,t},i.prototype.ior=function(t){for(this.sign=this.sign||t.sign;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.iand=function(t){this.sign=this.sign&&t.sign;var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.ixor=function(t){this.sign=this.sign||t.sign;var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);for(var n=t/26|0,i=t%26;this.length<=n;)this.words[this.length++]=0;return this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(t){if(this.sign&&!t.sign){this.sign=!1;var e=this.isub(t);return this.sign=!this.sign,this._normSign()}if(!this.sign&&t.sign){t.sign=!1;var e=this.isub(t);return t.sign=!0,e._normSign()}var r,n;this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,s=0;s<n.length;s++){var e=r.words[s]+n.words[s]+i;this.words[s]=67108863&e,i=e>>>26}for(;0!==i&&s<r.length;s++){var e=r.words[s]+i;this.words[s]=67108863&e,i=e>>>26}if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},i.prototype.add=function(t){if(t.sign&&!this.sign){t.sign=!1;var e=this.sub(t);return t.sign=!0,e}if(!t.sign&&this.sign){this.sign=!1;var e=t.sub(this);return this.sign=!0,e}return this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(t.sign){t.sign=!1;var e=this.iadd(t);return t.sign=!0,e._normSign()}if(this.sign)return this.sign=!1,this.iadd(t),this.sign=!0,this._normSign();var r=this.cmp(t);if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var s=0,o=0;o<i.length;o++){var e=n.words[o]-i.words[o]+s;s=e>>26,this.words[o]=67108863&e}for(;0!==s&&o<n.length;o++){var e=n.words[o]+s;s=e>>26,this.words[o]=67108863&e}if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.sign=!0),this.strip()},i.prototype.sub=function(t){return this.clone().isub(t)},i.prototype._smallMulTo=function(t,e){e.sign=t.sign!==this.sign,e.length=this.length+t.length;for(var r=0,n=0;n<e.length-1;n++){for(var i=r>>>26,s=67108863&r,o=Math.min(n,t.length-1),a=Math.max(0,n-this.length+1);a<=o;a++){var f=n-a,u=0|this.words[f],h=0|t.words[a],c=u*h,d=67108863&c;i=i+(c/67108864|0)|0,d=d+s|0,s=67108863&d,i=i+(d>>>26)|0}e.words[n]=s,r=i}return 0!==r?e.words[n]=r:e.length--,e.strip()},i.prototype._bigMulTo=function(t,e){e.sign=t.sign!==this.sign,e.length=this.length+t.length;for(var r=0,n=0,i=0;i<e.length-1;i++){var s=n;n=0;for(var o=67108863&r,a=Math.min(i,t.length-1),f=Math.max(0,i-this.length+1);f<=a;f++){var u=i-f,h=0|this.words[u],c=0|t.words[f],d=h*c,p=67108863&d;s=s+(d/67108864|0)|0,p=p+o|0,o=67108863&p,s=s+(p>>>26)|0,n+=s>>>26,s&=67108863}e.words[i]=o,r=s,s=n}return 0!==r?e.words[i]=r:e.length--,e.strip()},i.prototype.mulTo=function(t,e){return this.length+t.length<63?this._smallMulTo(t,e):this._bigMulTo(t,e)},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.imul=function(t){if(0===this.cmpn(0)||0===t.cmpn(0))return this.words[0]=0,this.length=1,this;var e=this.length,r=t.length;this.sign=t.sign!==this.sign,this.length=this.length+t.length,this.words[this.length-1]=0;for(var n=this.length-2;n>=0;n--){for(var i=0,s=0,o=Math.min(n,r-1),a=Math.max(0,n-e+1);a<=o;a++){var f=n-a,u=this.words[f],h=t.words[a],c=u*h,d=67108863&c;i+=c/67108864|0,d+=s,s=67108863&d,i+=d>>>26}this.words[n]=s,this.words[n+1]+=i,i=0}for(var i=0,f=1;f<this.length;f++){var p=this.words[f]+i;this.words[f]=67108863&p,i=p>>>26}return this.strip()},i.prototype.imuln=function(t){r("number"==typeof t);for(var e=0,n=0;n<this.length;n++){var i=this.words[n]*t,s=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=s>>>26,this.words[n]=67108863&s}return 0!==e&&(this.words[n]=e,this.length++),this},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.ishln=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=67108863>>>26-e<<26-e;if(0!==e){for(var s=0,o=0;o<this.length;o++){var a=this.words[o]&i,f=this.words[o]-a<<e;this.words[o]=f|s,s=a>>>26-e}s&&(this.words[o]=s,this.length++)}if(0!==n){for(var o=this.length-1;o>=0;o--)this.words[o+n]=this.words[o];for(var o=0;o<n;o++)this.words[o]=0;this.length+=n}return this.strip()},i.prototype.ishrn=function(t,e,n){r("number"==typeof t&&t>=0);var i;i=e?(e-e%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),a=67108863^67108863>>>s<<s,f=n;if(i-=o,i=Math.max(0,i),f){for(var u=0;u<o;u++)f.words[u]=this.words[u];f.length=o}if(0===o);else if(this.length>o){this.length-=o;for(var u=0;u<this.length;u++)this.words[u]=this.words[u+o]}else this.words[0]=0,this.length=1;for(var h=0,u=this.length-1;u>=0&&(0!==h||u>=i);u--){var c=this.words[u];this.words[u]=h<<26-s|c>>>s,h=c&a}return f&&0!==h&&(f.words[f.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(!this.sign,"imaskn works only with positive numbers"),0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),t<0?this.isubn(-t):this.sign?1===this.length&&this.words[0]<t?(this.words[0]=t-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(t),this.sign=!0,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),t<0)return this.iaddn(-t);if(this.sign)return this.sign=!1,this.iaddn(t),this.sign=!0,this;this.words[0]-=t;for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.sign=!1,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var i,s=t.length+n;if(this.words.length<s){for(var o=new Array(s),i=0;i<this.length;i++)o[i]=this.words[i];this.words=o}else i=this.length;for(this.length=Math.max(this.length,s);i<this.length;i++)this.words[i]=0;for(var a=0,i=0;i<t.length;i++){var f=this.words[i+n]+a,u=t.words[i]*e;f-=67108863&u,a=(f>>26)-(u/67108864|0),this.words[i+n]=67108863&f}for(;i<this.length-n;i++){var f=this.words[i+n]+a;a=f>>26,this.words[i+n]=67108863&f}if(0===a)return this.strip();r(-1===a),a=0;for(var i=0;i<this.length;i++){var f=-this.words[i]+a;a=f>>26,this.words[i]=67108863&f}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),s=t,o=s.words[s.length-1];0!==(r=26-this._countBits(o))&&(s=s.shln(r),n.ishln(r),o=s.words[s.length-1]);var a,f=n.length-s.length;if("mod"!==e){a=new i(null),a.length=f+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var h=n.clone()._ishlnsubmul(s,1,f);h.sign||(n=h,a&&(a.words[f]=1));for(var c=f-1;c>=0;c--){var d=67108864*n.words[s.length+c]+n.words[s.length+c-1];for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(s,d,c);n.sign;)d--,n.sign=!1,n._ishlnsubmul(s,1,c),0!==n.cmpn(0)&&(n.sign=!n.sign);a&&(a.words[c]=d)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.ishrn(r),{div:a||null,mod:n}},i.prototype.divmod=function(t,e){if(r(0!==t.cmpn(0)),this.sign&&!t.sign){var n,s,o=this.neg().divmod(t,e);return"mod"!==e&&(n=o.div.neg()),"div"!==e&&(s=0===o.mod.cmpn(0)?o.mod:t.sub(o.mod)),{div:n,mod:s}}if(!this.sign&&t.sign){var n,o=this.divmod(t.neg(),e);return"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}}return this.sign&&t.sign?this.neg().divmod(t.neg(),e):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e)},i.prototype.div=function(t){return this.divmod(t,"div").div},i.prototype.mod=function(t){return this.divmod(t,"mod").mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(0===e.mod.cmpn(0))return e.div;var r=e.div.sign?e.mod.isub(t):e.mod,n=t.shrn(1),i=t.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?e.div:e.div.sign?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+this.words[i])%t;return n},i.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=this.words[n]+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(!t.sign),r(0!==t.cmpn(0));var e=this,n=t.clone();e=e.sign?e.mod(t):e.clone();for(var s=new i(1),o=new i(0),a=new i(0),f=new i(1),u=0;e.isEven()&&n.isEven();)e.ishrn(1),n.ishrn(1),++u;for(var h=n.clone(),c=e.clone();0!==e.cmpn(0);){for(;e.isEven();)e.ishrn(1),s.isEven()&&o.isEven()?(s.ishrn(1),o.ishrn(1)):(s.iadd(h).ishrn(1),o.isub(c).ishrn(1));for(;n.isEven();)n.ishrn(1),a.isEven()&&f.isEven()?(a.ishrn(1),f.ishrn(1)):(a.iadd(h).ishrn(1),f.isub(c).ishrn(1));e.cmp(n)>=0?(e.isub(n),s.isub(a),o.isub(f)):(n.isub(e),a.isub(s),f.isub(o))}return{a:a,b:f,gcd:n.ishln(u)}},i.prototype._invmp=function(t){r(!t.sign),r(0!==t.cmpn(0));var e=this,n=t.clone();e=e.sign?e.mod(t):e.clone();for(var s=new i(1),o=new i(0),a=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(;e.isEven();)e.ishrn(1),s.isEven()?s.ishrn(1):s.iadd(a).ishrn(1);for(;n.isEven();)n.ishrn(1),o.isEven()?o.ishrn(1):o.iadd(a).ishrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(o)):(n.isub(e),o.isub(s))}return 0===e.cmpn(1)?s:o},i.prototype.gcd=function(t){if(0===this.cmpn(0))return t.clone();if(0===t.cmpn(0))return this.clone();var e=this.clone(),r=t.clone();e.sign=!1,r.sign=!1;for(var n=0;e.isEven()&&r.isEven();n++)e.ishrn(1),r.ishrn(1);for(;;){for(;e.isEven();)e.ishrn(1);for(;r.isEven();)r.ishrn(1);var i=e.cmp(r);if(i<0){var s=e;e=r,r=s}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.ishln(n)},i.prototype.invm=function(t){return this.egcd(t).a.mod(t)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n){for(var s=this.length;s<n+1;s++)this.words[s]=0;return this.words[n]|=i,this.length=n+1,this}for(var o=i,s=n;0!==o&&s<this.length;s++){var a=this.words[s];a+=o,o=a>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.cmpn=function(t){var e=t<0;if(e&&(t=-t),this.sign&&!e)return-1;if(!this.sign&&e)return 1;t&=67108863,this.strip();var r;if(this.length>1)r=1;else{var n=this.words[0];r=n===t?0:n<t?-1:1}return this.sign&&(r=-r),r},i.prototype.cmp=function(t){if(this.sign&&!t.sign)return-1;if(!this.sign&&t.sign)return 1;var e=this.ucmp(t);return this.sign?-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=this.words[r],i=t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},i.red=function(t){return new d(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(!this.sign,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};a.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},a.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},a.prototype.split=function(t,e){t.ishrn(this.n,0,e)},a.prototype.imulK=function(t){return t.imul(this.k)},n(f,a),f.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];e.words[e.length++]=4194303&i;for(var n=10;n<t.length;n++){var s=t.words[n];t.words[n-10]=(4194303&s)<<4|i>>>22,i=s}t.words[n-10]=i>>>22,t.length-=9},f.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e,r=0,n=0;n<t.length;n++){var i=t.words[n];e=64*i,r+=977*i,e+=r/67108864|0,r&=67108863,t.words[n]=r,r=e}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(u,a),n(h,a),n(c,a),c.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*t.words[r]+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new f;else if("p224"===t)e=new u;else if("p192"===t)e=new h;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new c}return y[t]=e,e},d.prototype._verify1=function(t){r(!t.sign,"red works only with positives"),r(t.red,"red works only with red numbers")},d.prototype._verify2=function(t,e){r(!t.sign&&!e.sign,"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},d.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.mod(this.m)._forceRed(this)},d.prototype.neg=function(t){var e=t.clone();return e.sign=!e.sign,e.iadd(this.m)._forceRed(this)},d.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},d.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},d.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},d.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},d.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.shln(e))},d.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},d.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},d.prototype.isqr=function(t){return this.imul(t,t)},d.prototype.sqr=function(t){return this.mul(t,t)},d.prototype.sqrt=function(t){if(0===t.cmpn(0))return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).ishrn(2),s=this.pow(t,n);return s}for(var o=this.m.subn(1),a=0;0!==o.cmpn(0)&&0===o.andln(1);)a++,o.ishrn(1);r(0!==o.cmpn(0));var f=new i(1).toRed(this),u=f.redNeg(),h=this.m.subn(1).ishrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var d=this.pow(c,o),s=this.pow(t,o.addn(1).ishrn(1)),p=this.pow(t,o),l=a;0!==p.cmp(f);){for(var b=p,g=0;0!==b.cmp(f);g++)b=b.redSqr();r(g<l);var y=this.pow(d,new i(1).ishln(l-g-1));s=s.redMul(y),d=y.redSqr(),p=p.redMul(d),l=g}return s},d.prototype.invm=function(t){var e=t._invmp(this.m);return e.sign?(e.sign=!1,this.imod(e).redNeg()):this.imod(e)},d.prototype.pow=function(t,e){var r=[];if(0===e.cmpn(0))return new i(1);for(var n=e.clone();0!==n.cmpn(0);)r.push(n.andln(1)),n.ishrn(1);for(var s=t,o=0;o<r.length&&0===r[o];o++,s=this.sqr(s));if(++o<r.length)for(var n=this.sqr(s);o<r.length;o++,n=this.sqr(n))0!==r[o]&&(s=this.mul(s,n));return s},d.prototype.convertTo=function(t){return t.clone()},d.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new p(t)},n(p,d),p.prototype.convertTo=function(t){return this.imod(t.shln(this.shift))},p.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},p.prototype.imul=function(t,e){if(0===t.cmpn(0)||0===e.cmpn(0))return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).ishrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},p.prototype.mul=function(t,e){if(0===t.cmpn(0)||0===e.cmpn(0))return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(n).ishrn(this.shift),o=s;return s.cmp(this.m)>=0?o=s.isub(this.m):s.cmpn(0)<0&&(o=s.iadd(this.m)),o._forceRed(this)},p.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],335:[function(t,e,r){function n(t){if(0===t.length)return"";var e,r,n=[0];for(e=0;e<t.length;e++){for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=t[e];var i=0;for(r=0;r<n.length;++r)n[r]+=i,i=n[r]/f|0,n[r]%=f;for(;i;)n.push(i%f),i=i/f|0}for(e=0;0===t[e]&&e<t.length-1;e++)n.push(0);return n.reverse().map(function(t){return s[t]}).join("")}function i(t){if(0===t.length)return[];var e,r,n=[0];for(e=0;e<t.length;e++){var i=t[e];if(!(i in o))throw new Error("Non-base58 character");for(r=0;r<n.length;r++)n[r]*=f;n[0]+=o[i];var s=0;for(r=0;r<n.length;++r)n[r]+=s,s=n[r]>>8,n[r]&=255;for(;s;)n.push(255&s),s>>=8
  }for(e=0;"1"===t[e]&&e<t.length-1;e++)n.push(0);return n.reverse()}for(var s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",o={},a=0;a<s.length;a++)o[s.charAt(a)]=a;var f=58;e.exports={encode:n,decode:i}},{}],336:[function(t,e,r){e.exports=function(t,e){for(var r=0,n=0;n<t.length&&n!=e.length&&0==(r=t[n]<e[n]?-1:t[n]>e[n]?1:0);++n);return 0==r&&(e.length>t.length?r=-1:t.length>e.length&&(r=1)),r}},{}],337:[function(t,e,r){"use strict";var n=r;n.version=t("../package.json").version,n.utils=t("./elliptic/utils"),n.rand=t("brorand"),n.hmacDRBG=t("./elliptic/hmac-drbg"),n.curve=t("./elliptic/curve"),n.curves=t("./elliptic/curves"),n.ec=t("./elliptic/ec")},{"../package.json":357,"./elliptic/curve":340,"./elliptic/curves":343,"./elliptic/ec":344,"./elliptic/hmac-drbg":347,"./elliptic/utils":349,brorand:350}],338:[function(t,e,r){"use strict";function n(t,e){this.type=t,this.p=new s(e.p,16),this.red=e.prime?s.red(e.prime):s.mont(this.p),this.zero=new s(0).toRed(this.red),this.one=new s(1).toRed(this.red),this.two=new s(2).toRed(this.red),this.n=e.n&&new s(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function i(t,e){this.curve=t,this.type=e,this.precomputed=null}var s=t("bn.js"),o=t("../../elliptic"),a=o.utils.getNAF,f=o.utils.getJSF,u=o.utils.assert;e.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(t,e){var r=t._getDoubles(),n=a(e,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var s=[],o=0;o<n.length;o+=r.step){for(var f=0,e=o+r.step-1;e>=o;e--)f=(f<<1)+n[e];s.push(f)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),c=i;c>0;c--){for(var o=0;o<s.length;o++){var f=s[o];f===c?h=h.mixedAdd(r.points[o]):f===-c&&(h=h.mixedAdd(r.points[o].neg()))}u=u.add(h)}return u.toP()},n.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=a(e,r),o=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(var e=0;f>=0&&0===s[f];f--)e++;if(f>=0&&e++,o=o.dblp(e),f<0)break;var h=s[f];u(0!==h),o="affine"===t.type?h>0?o.mixedAdd(i[h-1>>1]):o.mixedAdd(i[-h-1>>1].neg()):h>0?o.add(i[h-1>>1]):o.add(i[-h-1>>1].neg())}return"affine"===t.type?o.toP():o},n.prototype._wnafMulAdd=function(t,e,r,n){for(var i=this._wnafT1,s=this._wnafT2,o=this._wnafT3,u=0,h=0;h<n;h++){var c=e[h],d=c._getNAFPoints(t);i[h]=d.wnd,s[h]=d.points}for(var h=n-1;h>=1;h-=2){var p=h-1,l=h;if(1===i[p]&&1===i[l]){var b=[e[p],null,null,e[l]];0===e[p].y.cmp(e[l].y)?(b[1]=e[p].add(e[l]),b[2]=e[p].toJ().mixedAdd(e[l].neg())):0===e[p].y.cmp(e[l].y.redNeg())?(b[1]=e[p].toJ().mixedAdd(e[l]),b[2]=e[p].add(e[l].neg())):(b[1]=e[p].toJ().mixedAdd(e[l]),b[2]=e[p].toJ().mixedAdd(e[l].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=f(r[p],r[l]);u=Math.max(y[0].length,u),o[p]=new Array(u),o[l]=new Array(u);for(var m=0;m<u;m++){var v=0|y[0][m],_=0|y[1][m];o[p][m]=g[3*(v+1)+(_+1)],o[l][m]=0,s[p]=b}}else o[p]=a(r[p],i[p]),o[l]=a(r[l],i[l]),u=Math.max(o[p].length,u),u=Math.max(o[l].length,u)}for(var w=this.jpoint(null,null,null),S=this._wnafT4,h=u;h>=0;h--){for(var k=0;h>=0;){for(var I=!0,m=0;m<n;m++)S[m]=0|o[m][h],0!==S[m]&&(I=!1);if(!I)break;k++,h--}if(h>=0&&k++,w=w.dblp(k),h<0)break;for(var m=0;m<n;m++){var c,A=S[m];0!==A&&(A>0?c=s[m][A-1>>1]:A<0&&(c=s[m][-A-1>>1].neg()),w="affine"===c.type?w.mixedAdd(c):w.add(c))}}for(var h=0;h<n;h++)s[h]=null;return w.toP()},n.BasePoint=i,i.prototype.validate=function(){return this.curve.validate(this)},i.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},i.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var s=0;s<t;s++)n=n.dbl();r.push(n)}return{step:t,points:r}},i.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},i.prototype._getBeta=function(){return null},i.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},{"../../elliptic":337,"bn.js":334}],339:[function(t,e,r){"use strict";function n(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,u.call(this,"edwards",t),this.a=new a(t.a,16).mod(this.red.m).toRed(this.red),this.c=new a(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),h(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function i(t,e,r,n,i){u.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new a(e,16),this.y=new a(r,16),this.z=n?new a(n,16):this.curve.one,this.t=i&&new a(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}var s=t("../curve"),o=t("../../elliptic"),a=t("bn.js"),f=t("inherits"),u=s.base,h=o.utils.assert;f(n,u),e.exports=n,n.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},n.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},n.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},n.prototype.pointFromX=function(t,e){e=new a(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()).redSqrt(),f=o.fromRed().isOdd();return(t&&!f||!t&&f)&&(o=o.redNeg()),this.point(e,o,s.one)},n.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},f(i,u.BasePoint),n.prototype.pointFromJSON=function(t){return i.fromJSON(this,t)},n.prototype.point=function(t,e,r,n){return new i(this,t,e,r,n)},i.fromJSON=function(t,e){return new i(t,e[0],e[1],e[2])},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),s=n.redAdd(e),o=s.redSub(r),a=n.redSub(e),f=i.redMul(o),u=s.redMul(a),h=i.redMul(a),c=o.redMul(s);return this.curve.point(f,u,c,h)},i.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(i),a=o.redAdd(s);if(this.zOne)t=n.redSub(i).redSub(s).redMul(a.redSub(this.curve.two)),e=a.redMul(o.redSub(s)),r=a.redSqr().redSub(a).redSub(a);else{var f=this.z.redSqr(),u=a.redSub(f).redISub(f);t=n.redSub(i).redISub(s).redMul(u),e=a.redMul(o.redSub(s)),r=a.redMul(u)}}else{var o=i.redAdd(s),f=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=o.redSub(f).redSub(f);t=this.curve._mulC(n.redISub(o)).redMul(u),e=this.curve._mulC(o).redMul(i.redISub(s)),r=o.redMul(u)}return this.curve.point(t,e,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),s=r.redSub(e),o=i.redSub(n),a=i.redAdd(n),f=r.redAdd(e),u=s.redMul(o),h=a.redMul(f),c=s.redMul(f),d=o.redMul(a);return this.curve.point(u,h,d,c)},i.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),s=this.x.redMul(t.x),o=this.y.redMul(t.y),a=this.curve.d.redMul(s).redMul(o),f=i.redSub(a),u=i.redAdd(a),h=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(s).redISub(o),c=n.redMul(f).redMul(h);return this.curve.twisted?(e=n.redMul(u).redMul(o.redSub(this.curve._mulA(s))),r=f.redMul(u)):(e=n.redMul(u).redMul(o.redSub(s)),r=this.curve._mulC(f).redMul(u)),this.curve.point(c,e,r)},i.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},i.prototype.mul=function(t){return this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},i.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2)},i.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":337,"../curve":340,"bn.js":334,inherits:358}],340:[function(t,e,r){arguments[4][94][0].apply(r,arguments)},{"./base":338,"./edwards":339,"./mont":341,"./short":342,dup:94}],341:[function(t,e,r){"use strict";function n(t){f.call(this,"mont",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(t,e,r){f.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(e,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var s=t("../curve"),o=t("bn.js"),a=t("inherits"),f=s.base;a(n,f),e.exports=n,n.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},a(i,f.BasePoint),n.prototype.point=function(t,e){return new i(this,t,e)},n.prototype.pointFromJSON=function(t){return i.fromJSON(this,t)},i.prototype.precompute=function(){},i.fromJSON=function(t,e){return new i(t,e[0],e[1]||t.one)},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var t=this.x.redAdd(this.z),e=t.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=e.redSub(n),s=e.redMul(n),o=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(s,o)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),s=t.x.redSub(t.z),o=s.redMul(r),a=i.redMul(n),f=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(f,u)},i.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=this,s=[];0!==e.cmpn(0);e.ishrn(1))s.push(e.andln(1));for(var o=s.length-1;o>=0;o--)0===s[o]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../curve":340,"bn.js":334,inherits:358}],342:[function(t,e,r){"use strict";function n(t){h.call(this,"short",t),this.a=new f(t.a,16).toRed(this.red),this.b=new f(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(t,e,r,n){h.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new f(e,16),this.y=new f(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function s(t,e,r,n){h.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new f(0)):(this.x=new f(e,16),this.y=new f(r,16),this.z=new f(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=t("../curve"),a=t("../../elliptic"),f=t("bn.js"),u=t("inherits"),h=o.base,c=a.utils.assert;u(n,h),e.exports=n,n.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new f(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=n[0].cmp(n[1])<0?n[0]:n[1],e=e.toRed(this.red)}if(t.lambda)r=new f(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}var s;return s=t.basis?t.basis.map(function(t){return{a:new f(t.a,16),b:new f(t.b,16)}}):this._getEndoBasis(r),{beta:e,lambda:r,basis:s}}},n.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:f.mont(t),r=new f(2).toRed(e).redInvm(),n=r.redNeg(),i=new f(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},n.prototype._getEndoBasis=function(t){for(var e,r,n,i,s,o,a,u,h,c=this.n.shrn(Math.floor(this.n.bitLength()/2)),d=t,p=this.n.clone(),l=new f(1),b=new f(0),g=new f(0),y=new f(1),m=0;0!==d.cmpn(0);){var v=p.div(d);u=p.sub(v.mul(d)),h=g.sub(v.mul(l));var _=y.sub(v.mul(b));if(!n&&u.cmp(c)<0)e=a.neg(),r=l,n=u.neg(),i=h;else if(n&&2==++m)break;a=u,p=d,d=u,g=l,l=h,y=b,b=_}s=u.neg(),o=h;var w=n.sqr().add(i.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=e,o=r),n.sign&&(n=n.neg(),i=i.neg()),s.sign&&(s=s.neg(),o=o.neg()),[{a:n,b:i},{a:s,b:o}]},n.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),s=r.b.neg().mul(t).divRound(this.n),o=i.mul(r.a),a=s.mul(n.a),f=i.mul(r.b),u=s.mul(n.b);return{k1:t.sub(o).sub(a),k2:f.add(u).neg()}},n.prototype.pointFromX=function(t,e){e=new f(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt(),i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(t,e){for(var r=this._endoWnafT1,n=this._endoWnafT2,i=0;i<t.length;i++){var s=this._endoSplit(e[i]),o=t[i],a=o._getBeta();s.k1.sign&&(s.k1.sign=!s.k1.sign,o=o.neg(!0)),s.k2.sign&&(s.k2.sign=!s.k2.sign,a=a.neg(!0)),r[2*i]=o,r[2*i+1]=a,n[2*i]=s.k1,n[2*i+1]=s.k2}for(var f=this._wnafMulAdd(1,r,n,2*i),u=0;u<2*i;u++)r[u]=null,n[u]=null;return f},u(i,h.BasePoint),n.prototype.point=function(t,e,r){return new i(this,t,e,r)},n.prototype.pointFromJSON=function(t,e){return i.fromJSON(this,t,e)},i.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},i.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},i.fromJSON=function(t,e,r){function n(e){return t.point(e[0],e[1],r)}"string"==typeof e&&(e=JSON.parse(e));var i=t.point(e[0],e[1],r);if(!e[2])return i;var s=e[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(n))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(n))}},i},i.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(t){return t=new f(t,16),this.precomputed&&this.precomputed.doubles?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},i.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},i.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(s,h.BasePoint),n.prototype.jpoint=function(t,e,r){return new s(this,t,e,r)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),s=this.y.redMul(e.redMul(t.z)),o=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),f=s.redSub(o);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),h=u.redMul(a),c=n.redMul(u),d=f.redSqr().redIAdd(h).redISub(c).redISub(c),p=f.redMul(c.redISub(d)).redISub(s.redMul(h)),l=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,p,l)},s.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,s=t.y.redMul(e).redMul(this.z),o=r.redSub(n),a=i.redSub(s);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),h=r.redMul(f),c=a.redSqr().redIAdd(u).redISub(h).redISub(h),d=a.redMul(h.redISub(c)).redISub(i.redMul(u)),p=this.z.redMul(o);return this.curve.jpoint(c,d,p)},s.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}for(var n=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,f=a.redSqr().redSqr(),u=o.redAdd(o),r=0;r<t;r++){var h=s.redSqr(),c=u.redSqr(),d=c.redSqr(),p=h.redAdd(h).redIAdd(h).redIAdd(n.redMul(f)),l=s.redMul(c),b=p.redSqr().redISub(l.redAdd(l)),g=l.redISub(b),y=p.redMul(g);y=y.redIAdd(y).redISub(d);var m=u.redMul(a);r+1<t&&(f=f.redMul(d)),s=b,a=m,u=y}return this.curve.jpoint(s,u.redMul(i),a)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},s.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(s);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n),f=a.redSqr().redISub(o).redISub(o),u=s.redIAdd(s);u=u.redIAdd(u),u=u.redIAdd(u),t=f,e=a.redMul(o.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.x.redSqr(),c=this.y.redSqr(),d=c.redSqr(),p=this.x.redAdd(c).redSqr().redISub(h).redISub(d);p=p.redIAdd(p);var l=h.redAdd(h).redIAdd(h),b=l.redSqr(),g=d.redIAdd(d);g=g.redIAdd(g),g=g.redIAdd(g),t=b.redISub(p).redISub(p),e=l.redMul(p.redISub(t)).redISub(g),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(t,e,r)},s.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(s);o=o.redIAdd(o);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=a.redSqr().redISub(o).redISub(o);t=f;var u=s.redIAdd(s);u=u.redIAdd(u),u=u.redIAdd(u),e=a.redMul(o.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var h=this.z.redSqr(),c=this.y.redSqr(),d=this.x.redMul(c),p=this.x.redSub(h).redMul(this.x.redAdd(h));p=p.redAdd(p).redIAdd(p);var l=d.redIAdd(d);l=l.redIAdd(l);var b=l.redAdd(l);t=p.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(c).redISub(h);var g=c.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),e=p.redMul(l.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},s.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=e.redSqr(),o=r.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(i)),f=e.redAdd(e);f=f.redIAdd(f);var u=f.redMul(o),h=a.redSqr().redISub(u.redAdd(u)),c=u.redISub(h),d=o.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var p=a.redMul(c).redISub(d),l=r.redAdd(r).redMul(n);return this.curve.jpoint(h,p,l)},s.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),s=i.redSqr(),o=this.x.redAdd(e).redSqr().redISub(t).redISub(n);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(s);var a=o.redSqr(),f=n.redIAdd(n);f=f.redIAdd(f),f=f.redIAdd(f),f=f.redIAdd(f);var u=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(f),h=e.redMul(u);h=h.redIAdd(h),h=h.redIAdd(h);var c=this.x.redMul(a).redISub(h);c=c.redIAdd(c),c=c.redIAdd(c);var d=this.y.redMul(u.redMul(f.redISub(u)).redISub(o.redMul(a)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var p=this.z.redAdd(o).redSqr().redISub(r).redISub(a);return this.curve.jpoint(c,d,p)},s.prototype.mul=function(t,e){return t=new f(t,e),this.curve._wnafMul(this,t)},s.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},s.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":337,"../curve":340,"bn.js":334,inherits:358}],343:[function(t,e,r){"use strict";function n(t){"short"===t.type?this.curve=new a.curve.short(t):"edwards"===t.type?this.curve=new a.curve.edwards(t):this.curve=new a.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(t,e){Object.defineProperty(s,t,{configurable:!0,enumerable:!0,get:function(){var r=new n(e);return Object.defineProperty(s,t,{configurable:!0,enumerable:!0,value:r}),r}})}var s=r,o=t("hash.js"),a=t("../elliptic"),f=a.utils.assert;s.PresetCurve=n,i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=t("./precomputed/secp256k1")}catch(t){u=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},{"../elliptic":337,"./precomputed/secp256k1":348,"hash.js":351}],344:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);"string"==typeof t&&(a(s.curves.hasOwnProperty(t),"Unknown curve "+t),t=s.curves[t]),t instanceof s.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.shrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var i=t("bn.js"),s=t("../../elliptic"),o=s.utils,a=o.assert,f=t("./key"),u=t("./signature");e.exports=n,n.prototype.keyPair=function(t){return new f(this,t)},n.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},n.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},n.prototype.genKeyPair=function(t){t||(t={});for(var e=new s.hmacDRBG({hash:this.hash,pers:t.pers,entropy:t.entropy||s.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var o=new i(e.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},n.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.shrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},n.prototype.sign=function(t,e,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var o=this.n.byteLength(),a=e.getPrivate().toArray(),f=a.length;f<21;f++)a.unshift(0);for(var h=t.toArray(),f=h.length;f<o;f++)h.unshift(0);for(var c=new s.hmacDRBG({hash:this.hash,entropy:a,nonce:h}),d=this.n.sub(new i(1));;){var p=new i(c.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(d)>=0)){var l=this.g.mul(p);if(!l.isInfinity()){var b=l.getX().mod(this.n);if(0!==b.cmpn(0)){var g=p.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t)).mod(this.n);if(0!==g.cmpn(0))return n.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g)),new u({r:b,s:g})}}}}},n.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n),e=new u(e,"hex");var s=e.r,o=e.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),f=a.mul(t).mod(this.n),h=a.mul(s).mod(this.n),c=this.g.mulAdd(f,r.getPublic(),h);return!c.isInfinity()&&0===c.getX().mod(this.n).cmp(s)}},{"../../elliptic":337,"./key":345,"./signature":346,"bn.js":334}],345:[function(t,e,r){"use strict";function n(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var i=t("bn.js"),s=t("../../elliptic"),o=s.utils;e.exports=n,n.fromPublic=function(t,e,r){return e instanceof n?e:new n(t,{pub:e,pubEnc:r})},n.fromPrivate=function(t,e,r){return e instanceof n?e:new n(t,{priv:e,privEnc:r})},n.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(t,e){if(this.pub||(this.pub=this.ec.g.mul(this.priv)),"string"==typeof t&&(e=t,t=null),!e)return this.pub;for(var r=this.ec.curve.p.byteLength(),n=this.pub.getX().toArray(),i=n.length;i<r;i++)n.unshift(0);var s;if("mont"!==this.ec.curve.type)if(t)s=[this.pub.getY().isEven()?2:3].concat(n);else{for(var a=this.pub.getY().toArray(),i=a.length;i<r;i++)a.unshift(0);var s=[4].concat(n,a)}else s=n;return o.encode(s,e)},n.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.mod(this.ec.curve.n)},n.prototype._importPublic=function(t,e){return t.x||t.y?void(this.pub=this.ec.curve.point(t.x,t.y)):(t=o.toArray(t,e),"mont"!==this.ec.curve.type?this._importPublicShort(t):this._importPublicMont(t))},n.prototype._importPublicShort=function(t){var e=this.ec.curve.p.byteLength();4===t[0]&&t.length-1==2*e?this.pub=this.ec.curve.point(t.slice(1,1+e),t.slice(1+e,1+2*e)):2!==t[0]&&3!==t[0]||t.length-1!==e||(this.pub=this.ec.curve.pointFromX(3===t[0],t.slice(1,1+e)))},n.prototype._importPublicMont=function(t){this.pub=this.ec.curve.point(t,1)},n.prototype.derive=function(t){
  return t.mul(this.priv).getX()},n.prototype.sign=function(t){return this.ec.sign(t,this)},n.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":337,"bn.js":334}],346:[function(t,e,r){"use strict";function n(t,e){if(t instanceof n)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16))}var i=t("bn.js"),s=t("../../elliptic"),o=s.utils,a=o.assert;e.exports=n,n.prototype._importDER=function(t,e){if(t=o.toArray(t,e),t.length<6||48!==t[0]||2!==t[2])return!1;if(1+t[1]>t.length)return!1;var r=t[3];if(r>=128)return!1;if(4+r+2>=t.length)return!1;if(2!==t[4+r])return!1;var n=t[5+r];return!(n>=128)&&(!(4+r+2+n>t.length)&&(this.r=new i(t.slice(4,4+r)),this.s=new i(t.slice(4+r+2,4+r+2+n)),!0))},n.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r));var n=e.length+r.length+4,i=[48,n,2,e.length];return i=i.concat(e,[2,r.length],r),o.encode(i,t)}},{"../../elliptic":337,"bn.js":334}],347:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=o.toArray(t.entropy,t.entropyEnc),r=o.toArray(t.nonce,t.nonceEnc),i=o.toArray(t.pers,t.persEnc);a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var i=t("hash.js"),s=t("../elliptic"),o=s.utils,a=o.assert;e.exports=n,n.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this.reseed=1,this.reseedInterval=281474976710656},n.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},n.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},n.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=o.toBuffer(t,e),r=o.toBuffer(r,n),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this.reseed=1},n.prototype.generate=function(t,e,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=o.toArray(r,n),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var s=i.slice(0,t);return this._update(r),this.reseed++,o.encode(s,e)}},{"../elliptic":337,"hash.js":351}],348:[function(t,e,r){arguments[4][104][0].apply(r,arguments)},{dup:104}],349:[function(t,e,r){"use strict";function n(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if(e){if("hex"===e){t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),s=i>>8,o=255&i;s?r.push(s,o):r.push(o)}return r}function i(t){return 1===t.length?"0"+t:t}function s(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}function o(t,e){for(var r=[],n=1<<e+1,i=t.clone();i.cmpn(1)>=0;){var s;if(i.isOdd()){var o=i.andln(n-1);s=o>(n>>1)-1?(n>>1)-o:o,i.isubn(s)}else s=0;r.push(s);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,f=1;f<a;f++)r.push(0);i.ishrn(a)}return r}function a(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var s=t.andln(3)+n&3,o=e.andln(3)+i&3;3===s&&(s=-1),3===o&&(o=-1);var a;if(0==(1&s))a=0;else{var f=t.andln(7)+n&7;a=3!==f&&5!==f||2!==o?s:-s}r[0].push(a);var u;if(0==(1&o))u=0;else{var f=e.andln(7)+i&7;u=3!==f&&5!==f||2!==s?o:-o}r[1].push(u),2*n===a+1&&(n=1-n),2*i===u+1&&(i=1-i),t.ishrn(1),e.ishrn(1)}return r}var f=r;f.assert=function(t,e){if(!t)throw new Error(e||"Assertion failed")},f.toArray=n,f.zero2=i,f.toHex=s,f.encode=function(t,e){return"hex"===e?s(t):t},f.getNAF=o,f.getJSF=a},{}],350:[function(t,e,r){function n(t){this.rand=t}var i;if(e.exports=function(t){return i||(i=new n(null)),i.generate(t)},e.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return window.crypto.getRandomValues(e),e}:window.msCrypto&&window.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return window.msCrypto.getRandomValues(e),e}:n.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var s=t("crypto");n.prototype._rand=function(t){return s.randomBytes(t)}}catch(t){n.prototype._rand=function(t){for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e}}},{}],351:[function(t,e,r){arguments[4][107][0].apply(r,arguments)},{"./hash/common":352,"./hash/hmac":353,"./hash/ripemd":354,"./hash/sha":355,"./hash/utils":356,dup:107}],352:[function(t,e,r){function n(){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}var i=t("../hash"),s=i.utils,o=s.assert;r.BlockHash=n,n.prototype.update=function(t,e){if(t=s.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=s.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},n.prototype.digest=function(t){return this.update(this._pad()),o(null===this.pending),this._digest(t)},n.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)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{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;for(var s=8;s<this.padLength;s++)n[i++]=0}return n}},{"../hash":351}],353:[function(t,e,r){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(s.toArray(e,r))}var i=t("../hash"),s=i.utils,o=s.assert;e.exports=n,n.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),o(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(var e=0;e<t.length;e++)t[e]^=54;this.inner=(new this.Hash).update(t);for(var e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},n.prototype.update=function(t,e){return this.inner.update(t,e),this},n.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"../hash":351}],354:[function(t,e,r){function n(){if(!(this instanceof n))return new n;p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function i(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function s(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function o(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var a=t("../hash"),f=a.utils,u=f.rotl32,h=f.sum32,c=f.sum32_3,d=f.sum32_4,p=a.common.BlockHash;f.inherits(n,p),r.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],a=this.h[2],f=this.h[3],p=this.h[4],m=r,v=n,_=a,w=f,S=p,k=0;k<80;k++){var I=h(u(d(r,i(k,n,a,f),t[l[k]+e],s(k)),g[k]),p);r=p,p=f,f=u(a,10),a=n,n=I,I=h(u(d(m,i(79-k,v,_,w),t[b[k]+e],o(k)),y[k]),S),m=S,S=w,w=u(_,10),_=v,v=I}I=c(this.h[1],a,w),this.h[1]=c(this.h[2],f,S),this.h[2]=c(this.h[3],p,m),this.h[3]=c(this.h[4],r,v),this.h[4]=c(this.h[0],n,_),this.h[0]=I},n.prototype._digest=function(t){return"hex"===t?f.toHex32(this.h,"little"):f.split32(this.h,"little")};var l=[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],b=[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],g=[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],y=[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]},{"../hash":351}],355:[function(t,e,r){function n(){if(!(this instanceof n))return new n;G.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=W,this.W=new Array(64)}function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}function s(){if(!(this instanceof s))return new s;G.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=X,this.W=new Array(160)}function o(){if(!(this instanceof o))return new o;s.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}function a(){if(!(this instanceof a))return new a;G.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}function f(t,e,r){return t&e^~t&r}function u(t,e,r){return t&e^t&r^e&r}function h(t,e,r){return t^e^r}function c(t){return M(t,2)^M(t,13)^M(t,22)}function d(t){return M(t,6)^M(t,11)^M(t,25)}function p(t){return M(t,7)^M(t,18)^t>>>3}function l(t){return M(t,17)^M(t,19)^t>>>10}function b(t,e,r,n){return 0===t?f(e,r,n):1===t||3===t?h(e,r,n):2===t?u(e,r,n):void 0}function g(t,e,r,n,i,s){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function y(t,e,r,n,i,s){var o=e&n^~e&s;return o<0&&(o+=4294967296),o}function m(t,e,r,n,i,s){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function v(t,e,r,n,i,s){var o=e&n^e&s^n&s;return o<0&&(o+=4294967296),o}function _(t,e){var r=j(t,e,28),n=j(e,t,2),i=j(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function w(t,e){var r=U(t,e,28),n=U(e,t,2),i=U(e,t,7),s=r^n^i;return s<0&&(s+=4294967296),s}function S(t,e){var r=j(t,e,14),n=j(t,e,18),i=j(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function k(t,e){var r=U(t,e,14),n=U(t,e,18),i=U(e,t,9),s=r^n^i;return s<0&&(s+=4294967296),s}function I(t,e){var r=j(t,e,1),n=j(t,e,8),i=L(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function A(t,e){var r=U(t,e,1),n=U(t,e,8),i=D(t,e,7),s=r^n^i;return s<0&&(s+=4294967296),s}function E(t,e){var r=j(t,e,19),n=j(e,t,29),i=L(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}function x(t,e){var r=U(t,e,19),n=U(e,t,29),i=D(t,e,6),s=r^n^i;return s<0&&(s+=4294967296),s}var O=t("../hash"),P=O.utils,B=P.assert,M=P.rotr32,R=P.rotl32,T=P.sum32,N=P.sum32_4,C=P.sum32_5,j=P.rotr64_hi,U=P.rotr64_lo,L=P.shr64_hi,D=P.shr64_lo,z=P.sum64,H=P.sum64_hi,F=P.sum64_lo,K=P.sum64_4_hi,q=P.sum64_4_lo,V=P.sum64_5_hi,Y=P.sum64_5_lo,G=O.common.BlockHash,W=[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],X=[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],J=[1518500249,1859775393,2400959708,3395469782];P.inherits(n,G),r.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=N(l(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],h=this.h[4],b=this.h[5],g=this.h[6],y=this.h[7];B(this.k.length===r.length);for(var n=0;n<r.length;n++){var m=C(y,d(h),f(h,b,g),this.k[n],r[n]),v=T(c(i),u(i,s,o));y=g,g=b,b=h,h=T(a,m),a=o,o=s,s=i,i=T(m,v)}this.h[0]=T(this.h[0],i),this.h[1]=T(this.h[1],s),this.h[2]=T(this.h[2],o),this.h[3]=T(this.h[3],a),this.h[4]=T(this.h[4],h),this.h[5]=T(this.h[5],b),this.h[6]=T(this.h[6],g),this.h[7]=T(this.h[7],y)},n.prototype._digest=function(t){return"hex"===t?P.toHex32(this.h,"big"):P.split32(this.h,"big")},P.inherits(i,n),r.sha224=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(t){return"hex"===t?P.toHex32(this.h.slice(0,7),"big"):P.split32(this.h.slice(0,7),"big")},P.inherits(s,G),r.sha512=s,s.blockSize=1024,s.outSize=512,s.hmacStrength=192,s.padLength=128,s.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=E(r[n-4],r[n-3]),s=x(r[n-4],r[n-3]),o=r[n-14],a=r[n-13],f=I(r[n-30],r[n-29]),u=A(r[n-30],r[n-29]),h=r[n-32],c=r[n-31];r[n]=K(i,s,o,a,f,u,h,c),r[n+1]=q(i,s,o,a,f,u,h,c)}},s.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],a=this.h[4],f=this.h[5],u=this.h[6],h=this.h[7],c=this.h[8],d=this.h[9],p=this.h[10],l=this.h[11],b=this.h[12],I=this.h[13],A=this.h[14],E=this.h[15];B(this.k.length===r.length);for(var x=0;x<r.length;x+=2){var O=A,P=E,M=S(c,d),R=k(c,d),T=g(c,d,p,l,b,I),N=y(c,d,p,l,b,I),C=this.k[x],j=this.k[x+1],U=r[x],L=r[x+1],D=V(O,P,M,R,T,N,C,j,U,L),K=Y(O,P,M,R,T,N,C,j,U,L),O=_(n,i),P=w(n,i),M=m(n,i,s,o,a,f),R=v(n,i,s,o,a,f),q=H(O,P,M,R),G=F(O,P,M,R);A=b,E=I,b=p,I=l,p=c,l=d,c=H(u,h,D,K),d=F(h,h,D,K),u=a,h=f,a=s,f=o,s=n,o=i,n=H(D,K,q,G),i=F(D,K,q,G)}z(this.h,0,n,i),z(this.h,2,s,o),z(this.h,4,a,f),z(this.h,6,u,h),z(this.h,8,c,d),z(this.h,10,p,l),z(this.h,12,b,I),z(this.h,14,A,E)},s.prototype._digest=function(t){return"hex"===t?P.toHex32(this.h,"big"):P.split32(this.h,"big")},P.inherits(o,s),r.sha384=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?P.toHex32(this.h.slice(0,12),"big"):P.split32(this.h.slice(0,12),"big")},P.inherits(a,G),r.sha1=a,a.blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=R(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);for(var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],f=this.h[4],n=0;n<r.length;n++){var u=~~(n/20),h=C(R(i,5),b(u,s,o,a),f,r[n],J[u]);f=a,a=o,o=R(s,30),s=i,i=h}this.h[0]=T(this.h[0],i),this.h[1]=T(this.h[1],s),this.h[2]=T(this.h[2],o),this.h[3]=T(this.h[3],a),this.h[4]=T(this.h[4],f)},a.prototype._digest=function(t){return"hex"===t?P.toHex32(this.h,"big"):P.split32(this.h,"big")}},{"../hash":351}],356:[function(t,e,r){function n(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e){t=t.replace(/[^a-z0-9]+/gi,""),t.length%2!=0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),s=i>>8,o=255&i;s?r.push(s,o):r.push(o)}else for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}function i(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=f(i.toString(16))}return r}function a(t){return 1===t.length?"0"+t:t}function f(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}function u(t,e,r,n){var i=r-e;y(i%4==0);for(var s=new Array(i/4),o=0,a=e;o<s.length;o++,a+=4){var f;f="big"===n?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],s[o]=f>>>0}return s}function h(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var s=t[n];"big"===e?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=255&s):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=255&s)}return r}function c(t,e){return t>>>e|t<<32-e}function d(t,e){return t<<e|t>>>32-e}function p(t,e){return t+e>>>0}function l(t,e,r){return t+e+r>>>0}function b(t,e,r,n){return t+e+r+n>>>0}function g(t,e,r,n,i){return t+e+r+n+i>>>0}function y(t,e){if(!t)throw new Error(e||"Assertion failed")}function m(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o}function v(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0}function _(t,e,r,n){return e+n>>>0}function w(t,e,r,n,i,s,o,a){var f=0,u=e;return u=u+n>>>0,f+=u<e?1:0,u=u+s>>>0,f+=u<s?1:0,u=u+a>>>0,f+=u<a?1:0,t+r+i+o+f>>>0}function S(t,e,r,n,i,s,o,a){return e+n+s+a>>>0}function k(t,e,r,n,i,s,o,a,f,u){var h=0,c=e;return c=c+n>>>0,h+=c<e?1:0,c=c+s>>>0,h+=c<s?1:0,c=c+a>>>0,h+=c<a?1:0,c=c+u>>>0,h+=c<u?1:0,t+r+i+o+f+h>>>0}function I(t,e,r,n,i,s,o,a,f,u){return e+n+s+a+u>>>0}function A(t,e,r){return(e<<32-r|t>>>r)>>>0}function E(t,e,r){return(t<<32-r|e>>>r)>>>0}function x(t,e,r){return t>>>r}function O(t,e,r){return(t<<32-r|e>>>r)>>>0}var P=r,B=t("inherits");P.toArray=n,P.toHex=i,P.htonl=s,P.toHex32=o,P.zero2=a,P.zero8=f,P.join32=u,P.split32=h,P.rotr32=c,P.rotl32=d,P.sum32=p,P.sum32_3=l,P.sum32_4=b,P.sum32_5=g,P.assert=y,P.inherits=B,r.sum64=m,r.sum64_hi=v,r.sum64_lo=_,r.sum64_4_hi=w,r.sum64_4_lo=S,r.sum64_5_hi=k,r.sum64_5_lo=I,r.rotr64_hi=A,r.rotr64_lo=E,r.shr64_hi=x,r.shr64_lo=O},{inherits:358}],357:[function(t,e,r){e.exports={name:"elliptic",version:"3.0.3",description:"EC cryptography",main:"lib/elliptic.js",scripts:{test:"make lint && mocha --reporter=spec test/*-test.js"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{browserify:"^3.44.2",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},dependencies:{"bn.js":"^2.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},readme:"# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic)\n\nFast elliptic-curve cryptography in a plain javascript implementation.\n\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\nfor your cryptography operations.\n\n## Incentive\n\nECC is much slower than regular RSA cryptography, the JS implementations are\neven more slower.\n\n## Benchmarks\n\n```bash\n$ node benchmarks/index.js\nBenchmarking: sign\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\n------------------------\nFastest is elliptic#sign\n========================\nBenchmarking: verify\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\n------------------------\nFastest is elliptic#verify\n========================\nBenchmarking: gen\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\n------------------------\nFastest is elliptic#gen\n========================\nBenchmarking: ecdh\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\n------------------------\nFastest is elliptic#ecdh\n========================\n```\n\n## API\n\n### ECDSA\n\n```javascript\nvar EC = require('elliptic').ec;\n\n// Create and initialize EC context\n// (better do it once and reuse it)\nvar ec = new EC('secp256k1');\n\n// Generate keys\nvar key = ec.genKeyPair();\n\n// Sign message (must be an array, or it'll be treated as a hex sequence)\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\nvar signature = key.sign(msg);\n\n// Export DER encoded signature in Array\nvar derSign = signature.toDER();\n\n// Verify signature\nconsole.log(key.verify(msg, derSign));\n```\n\n### ECDH\n\n```javascript\n// Generate keys\nvar key1 = ec.genKeyPair();\nvar key2 = ec.genKeyPair();\n\nvar shared1 = key1.derive(key2.getPublic());\nvar shared2 = key2.derive(key1.getPublic());\n\nconsole.log('Both shared secrets are BN instances');\nconsole.log(shared1.toString(16));\nconsole.log(shared2.toString(16));\n```\n\nNOTE: `.derive()` returns a [BN][1] instance.\n\n## Supported curves\n\nElliptic.js support following curve types:\n\n* Short Weierstrass\n* Montgomery\n* Edwards\n* Twisted Edwards\n\nFollowing curve 'presets' are embedded into the library:\n\n* `secp256k1`\n* `p192`\n* `p224`\n* `p256`\n* `curve25519`\n* `ed25519`\n\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\n\n### Implementation details\n\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\nthe curve operations are performed on non-affine coordinates (either projective\nor extended), various windowing techniques are used for different cases.\n\nAll operations are performed in reduction context using [bn.js][1], hashing is\nprovided by [hash.js][2]\n\n### Related projects\n\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\n  browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\n  node)\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://tools.ietf.org/html/rfc6979\n[1]: https://github.com/indutny/bn.js\n[2]: https://github.com/indutny/hash.js\n[3]: https://github.com/bitchan/eccrypto\n[4]: https://github.com/wanderer/secp256k1-node\n",readmeFilename:"README.md",_id:"elliptic@3.0.3",_shasum:"865c9b420bfbe55006b9f969f97a0d2c44966595",_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-3.0.3.tgz",_from:"https://registry.npmjs.org/elliptic/-/elliptic-3.0.3.tgz"}},{}],358:[function(t,e,r){arguments[4][119][0].apply(r,arguments)},{dup:119}],359:[function(t,e,r){(function(t){(function(){function n(t,e){if(t!==e){var r=null===t,n=t===A,i=t===t,s=null===e,o=e===A,a=e===e;if(t>e&&!s||!i||r&&!o&&a||n&&a)return 1;if(t<e&&!r||!a||s&&!n&&i||o&&i)return-1}return 0}function i(t,e,r){for(var n=t.length,i=r?n:-1;r?i--:++i<n;)if(e(t[i],i,t))return i;return-1}function s(t,e,r){if(e!==e)return g(t,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function o(t){return"function"==typeof t||!1}function a(t){return null==t?"":t+""}function f(t,e){for(var r=-1,n=t.length;++r<n&&e.indexOf(t.charAt(r))>-1;);return r}function u(t,e){for(var r=t.length;r--&&e.indexOf(t.charAt(r))>-1;);return r}function h(t,e){return n(t.criteria,e.criteria)||t.index-e.index}function c(t,e,r){for(var i=-1,s=t.criteria,o=e.criteria,a=s.length,f=r.length;++i<a;){var u=n(s[i],o[i]);if(u){if(i>=f)return u;var h=r[i];return u*("asc"===h||!0===h?1:-1)}}return t.index-e.index}function d(t){return Ht[t]}function p(t){return Ft[t]}function l(t,e,r){return e?t=Vt[t]:r&&(t=Yt[t]),"\\"+t}function b(t){return"\\"+Yt[t]}function g(t,e,r){for(var n=t.length,i=e+(r?0:-1);r?i--:++i<n;){var s=t[i];if(s!==s)return i}return-1}function y(t){return!!t&&"object"==typeof t}function m(t){return t<=160&&t>=9&&t<=13||32==t||160==t||5760==t||6158==t||t>=8192&&(t<=8202||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function v(t,e){for(var r=-1,n=t.length,i=-1,s=[];++r<n;)t[r]===e&&(t[r]=q,s[++i]=r);return s}function _(t,e){for(var r,n=-1,i=t.length,s=-1,o=[];++n<i;){var a=t[n],f=e?e(a,n,t):a;n&&r===f||(r=f,o[++s]=a)}return o}function w(t){for(var e=-1,r=t.length;++e<r&&m(t.charCodeAt(e)););return e}function S(t){for(var e=t.length;e--&&m(t.charCodeAt(e)););return e}function k(t){return Kt[t]}function I(t){function e(t){if(y(t)&&!Pa(t)&&!(t instanceof Ht)){if(t instanceof m)return t;if(to.call(t,"__chain__")&&to.call(t,"__wrapped__"))return pn(t)}return new m(t)}function r(){}function m(t,e,r){this.__wrapped__=t,this.__actions__=r||[],this.__chain__=!!e}function Ht(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Oo,this.__views__=[]}function Ft(){var t=new Ht(this.__wrapped__);return t.__actions__=re(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=re(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=re(this.__views__),t}function Kt(){if(this.__filtered__){var t=new Ht(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function qt(){var t=this.__wrapped__.value(),e=this.__dir__,r=Pa(t),n=e<0,i=r?t.length:0,s=Vr(0,i,this.__views__),o=s.start,a=s.end,f=a-o,u=n?a:o-1,h=this.__iteratees__,c=h.length,d=0,p=ko(f,this.__takeCount__);if(!r||i<z||i==f&&p==f)return rr(n&&r?t.reverse():t,this.__actions__);var l=[];t:for(;f--&&d<p;){u+=e;for(var b=-1,g=t[u];++b<c;){var y=h[b],m=y.iteratee,v=y.type,_=m(g);if(v==F)g=_;else if(!_){if(v==H)continue t;break t}}l[d++]=g}return l}function Vt(){this.__data__={}}function Yt(t){return this.has(t)&&delete this.__data__[t]}function Gt(t){return"__proto__"==t?A:this.__data__[t]}function Wt(t){return"__proto__"!=t&&to.call(this.__data__,t)}function Xt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Jt(t){var e=t?t.length:0;for(this.data={hash:yo(null),set:new ho};e--;)this.push(t[e])}function Zt(t,e){var r=t.data;return("string"==typeof e||Ni(e)?r.set.has(e):r.hash[e])?0:-1}function Qt(t){var e=this.data;"string"==typeof t||Ni(t)?e.set.add(t):e.hash[t]=!0}function ee(t,e){for(var r=-1,n=t.length,i=-1,s=e.length,o=zs(n+s);++r<n;)o[r]=t[r];for(;++i<s;)o[r++]=e[i];return o}function re(t,e){var r=-1,n=t.length;for(e||(e=zs(n));++r<n;)e[r]=t[r];return e}function ne(t,e){for(var r=-1,n=t.length;++r<n&&!1!==e(t[r],r,t););return t}function ie(t,e){for(var r=t.length;r--&&!1!==e(t[r],r,t););return t}function se(t,e){for(var r=-1,n=t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function oe(t,e,r,n){for(var i=-1,s=t.length,o=n,a=o;++i<s;){var f=t[i],u=+e(f);r(u,o)&&(o=u,a=f)}return a}function ae(t,e){for(var r=-1,n=t.length,i=-1,s=[];++r<n;){var o=t[r];e(o,r,t)&&(s[++i]=o)}return s}function fe(t,e){for(var r=-1,n=t.length,i=zs(n);++r<n;)i[r]=e(t[r],r,t);return i}function ue(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function he(t,e,r,n){var i=-1,s=t.length;for(n&&s&&(r=t[++i]);++i<s;)r=e(r,t[i],i,t);return r}function ce(t,e,r,n){var i=t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function de(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function pe(t,e){for(var r=t.length,n=0;r--;)n+=+e(t[r])||0;return n}function le(t,e){return t===A?e:t}function be(t,e,r,n){return t!==A&&to.call(n,r)?t:e}function ge(t,e,r){for(var n=-1,i=za(e),s=i.length;++n<s;){var o=i[n],a=t[o],f=r(a,e[o],o,t,e);(f===f?f===a:a!==a)&&(a!==A||o in t)||(t[o]=f)}return t}function ye(t,e){return null==e?t:ve(e,za(e),t)}function me(t,e){for(var r=-1,n=null==t,i=!n&&Jr(t),s=i?t.length:0,o=e.length,a=zs(o);++r<o;){var f=e[r];a[r]=i?Zr(f,s)?t[f]:A:n?A:t[f]}return a}function ve(t,e,r){r||(r={});for(var n=-1,i=e.length;++n<i;){var s=e[n];r[s]=t[s]}return r}function _e(t,e,r){var n=typeof t;return"function"==n?e===A?t:sr(t,e,r):null==t?xs:"object"==n?De(t):e===A?Ts(t):ze(t,e)}function we(t,e,r,n,i,s,o){var a;if(r&&(a=i?r(t,n,i):r(t)),a!==A)return a;if(!Ni(t))return t;var f=Pa(t);if(f){if(a=Yr(t),!e)return re(t,a)}else{var u=ro.call(t),h=u==J;if(u!=Q&&u!=V&&(!h||i))return zt[u]?Wr(t,u,e):i?t:{};if(a=Gr(h?{}:t),!e)return ye(a,t)}s||(s=[]),o||(o=[]);for(var c=s.length;c--;)if(s[c]==t)return o[c];return s.push(t),o.push(a),(f?ne:Me)(t,function(n,i){a[i]=we(n,e,r,i,t,s,o)}),a}function Se(t,e,r){if("function"!=typeof t)throw new Xs(K);return co(function(){t.apply(A,r)},e)}function ke(t,e){var r=t?t.length:0,n=[];if(!r)return n;var i=-1,o=Fr(),a=o==s,f=a&&e.length>=z?lr(e):null,u=e.length;f&&(o=Zt,a=!1,e=f);t:for(;++i<r;){var h=t[i];if(a&&h===h){for(var c=u;c--;)if(e[c]===h)continue t;n.push(h)}else o(e,h,0)<0&&n.push(h)}return n}
  function Ie(t,e){var r=!0;return jo(t,function(t,n,i){return r=!!e(t,n,i)}),r}function Ae(t,e,r,n){var i=n,s=i;return jo(t,function(t,o,a){var f=+e(t,o,a);(r(f,i)||f===n&&f===s)&&(i=f,s=t)}),s}function Ee(t,e,r,n){var i=t.length;for(r=null==r?0:+r||0,r<0&&(r=-r>i?0:i+r),n=n===A||n>i?i:+n||0,n<0&&(n+=i),i=r>n?0:n>>>0,r>>>=0;r<i;)t[r++]=e;return t}function xe(t,e){var r=[];return jo(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function Oe(t,e,r,n){var i;return r(t,function(t,r,s){if(e(t,r,s))return i=n?r:t,!1}),i}function Pe(t,e,r,n){n||(n=[]);for(var i=-1,s=t.length;++i<s;){var o=t[i];y(o)&&Jr(o)&&(r||Pa(o)||Ai(o))?e?Pe(o,e,r,n):ue(n,o):r||(n[n.length]=o)}return n}function Be(t,e){return Lo(t,e,ts)}function Me(t,e){return Lo(t,e,za)}function Re(t,e){return Do(t,e,za)}function Te(t,e){for(var r=-1,n=e.length,i=-1,s=[];++r<n;){var o=e[r];Ti(t[o])&&(s[++i]=o)}return s}function Ne(t,e,r){if(null!=t){r!==A&&r in cn(t)&&(e=[r]);for(var n=0,i=e.length;null!=t&&n<i;)t=t[e[n++]];return n&&n==i?t:A}}function Ce(t,e,r,n,i,s){return t===e||(null==t||null==e||!Ni(t)&&!y(e)?t!==t&&e!==e:je(t,e,Ce,r,n,i,s))}function je(t,e,r,n,i,s,o){var a=Pa(t),f=Pa(e),u=Y,h=Y;a||(u=ro.call(t),u==V?u=Q:u!=Q&&(a=Ki(t))),f||(h=ro.call(e),h==V?h=Q:h!=Q&&(f=Ki(e)));var c=u==Q,d=h==Q,p=u==h;if(p&&!a&&!c)return Lr(t,e,u);if(!i){var l=c&&to.call(t,"__wrapped__"),b=d&&to.call(e,"__wrapped__");if(l||b)return r(l?t.value():t,b?e.value():e,n,i,s,o)}if(!p)return!1;s||(s=[]),o||(o=[]);for(var g=s.length;g--;)if(s[g]==t)return o[g]==e;s.push(t),o.push(e);var y=(a?Ur:Dr)(t,e,r,n,i,s,o);return s.pop(),o.pop(),y}function Ue(t,e,r){var n=e.length,i=n,s=!r;if(null==t)return!i;for(t=cn(t);n--;){var o=e[n];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<i;){o=e[n];var a=o[0],f=t[a],u=o[1];if(s&&o[2]){if(f===A&&!(a in t))return!1}else{var h=r?r(f,u,a):A;if(!(h===A?Ce(u,f,r,!0):h))return!1}}return!0}function Le(t,e){var r=-1,n=Jr(t)?zs(t.length):[];return jo(t,function(t,i,s){n[++r]=e(t,i,s)}),n}function De(t){var e=Kr(t);if(1==e.length&&e[0][2]){var r=e[0][0],n=e[0][1];return function(t){return null!=t&&(t[r]===n&&(n!==A||r in cn(t)))}}return function(t){return Ue(t,e)}}function ze(t,e){var r=Pa(t),n=$r(t)&&rn(e),i=t+"";return t=dn(t),function(s){if(null==s)return!1;var o=i;if(s=cn(s),(r||!n)&&!(o in s)){if(null==(s=1==t.length?s:Ne(s,We(t,0,-1))))return!1;o=En(t),s=cn(s)}return s[o]===e?e!==A||o in s:Ce(e,s[o],A,!0)}}function He(t,e,r,n,i){if(!Ni(t))return t;var s=Jr(e)&&(Pa(e)||Ki(e)),o=s?A:za(e);return ne(o||e,function(a,f){if(o&&(f=a,a=e[f]),y(a))n||(n=[]),i||(i=[]),Fe(t,e,f,He,r,n,i);else{var u=t[f],h=r?r(u,a,f,t,e):A,c=h===A;c&&(h=a),h===A&&(!s||f in t)||!c&&(h===h?h===u:u!==u)||(t[f]=h)}}),t}function Fe(t,e,r,n,i,s,o){for(var a=s.length,f=e[r];a--;)if(s[a]==f)return void(t[r]=o[a]);var u=t[r],h=i?i(u,f,r,t,e):A,c=h===A;c&&(h=f,Jr(f)&&(Pa(f)||Ki(f))?h=Pa(u)?u:Jr(u)?re(u):[]:zi(f)||Ai(f)?h=Ai(u)?Wi(u):zi(u)?u:{}:c=!1),s.push(f),o.push(h),c?t[r]=n(h,f,i,s,o):(h===h?h!==u:u===u)&&(t[r]=h)}function Ke(t){return function(e){return null==e?A:e[t]}}function qe(t){var e=t+"";return t=dn(t),function(r){return Ne(r,t,e)}}function Ve(t,e){for(var r=t?e.length:0;r--;){var n=e[r];if(n!=i&&Zr(n)){var i=n;po.call(t,n,1)}}return t}function Ye(t,e){return t+mo(Eo()*(e-t+1))}function Ge(t,e,r,n,i){return i(t,function(t,i,s){r=n?(n=!1,t):e(r,t,i,s)}),r}function We(t,e,r){var n=-1,i=t.length;e=null==e?0:+e||0,e<0&&(e=-e>i?0:i+e),r=r===A||r>i?i:+r||0,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var s=zs(i);++n<i;)s[n]=t[n+e];return s}function Xe(t,e){var r;return jo(t,function(t,n,i){return!(r=e(t,n,i))}),!!r}function Je(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function Ze(t,e,r){var n=zr(),i=-1;return e=fe(e,function(t){return n(t)}),Je(Le(t,function(t){return{criteria:fe(e,function(e){return e(t)}),index:++i,value:t}}),function(t,e){return c(t,e,r)})}function Qe(t,e){var r=0;return jo(t,function(t,n,i){r+=+e(t,n,i)||0}),r}function $e(t,e){var r=-1,n=Fr(),i=t.length,o=n==s,a=o&&i>=z,f=a?lr():null,u=[];f?(n=Zt,o=!1):(a=!1,f=e?[]:u);t:for(;++r<i;){var h=t[r],c=e?e(h,r,t):h;if(o&&h===h){for(var d=f.length;d--;)if(f[d]===c)continue t;e&&f.push(c),u.push(h)}else n(f,c,0)<0&&((e||a)&&f.push(c),u.push(h))}return u}function tr(t,e){for(var r=-1,n=e.length,i=zs(n);++r<n;)i[r]=t[e[r]];return i}function er(t,e,r,n){for(var i=t.length,s=n?i:-1;(n?s--:++s<i)&&e(t[s],s,t););return r?We(t,n?0:s,n?s+1:i):We(t,n?s+1:0,n?i:s)}function rr(t,e){var r=t;r instanceof Ht&&(r=r.value());for(var n=-1,i=e.length;++n<i;){var s=e[n];r=s.func.apply(s.thisArg,ue([r],s.args))}return r}function nr(t,e,r){var n=0,i=t?t.length:n;if("number"==typeof e&&e===e&&i<=Mo){for(;n<i;){var s=n+i>>>1,o=t[s];(r?o<=e:o<e)&&null!==o?n=s+1:i=s}return i}return ir(t,e,xs,r)}function ir(t,e,r,n){e=r(e);for(var i=0,s=t?t.length:0,o=e!==e,a=null===e,f=e===A;i<s;){var u=mo((i+s)/2),h=r(t[u]),c=h!==A,d=h===h;if(o)var p=d||n;else p=a?d&&c&&(n||null!=h):f?d&&(n||c):null!=h&&(n?h<=e:h<e);p?i=u+1:s=u}return ko(s,Bo)}function sr(t,e,r){if("function"!=typeof t)return xs;if(e===A)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,s){return t.call(e,r,n,i,s)};case 5:return function(r,n,i,s,o){return t.call(e,r,n,i,s,o)}}return function(){return t.apply(e,arguments)}}function or(t){var e=new so(t.byteLength);return new lo(e).set(new lo(t)),e}function ar(t,e,r){for(var n=r.length,i=-1,s=So(t.length-n,0),o=-1,a=e.length,f=zs(a+s);++o<a;)f[o]=e[o];for(;++i<n;)f[r[i]]=t[i];for(;s--;)f[o++]=t[i++];return f}function fr(t,e,r){for(var n=-1,i=r.length,s=-1,o=So(t.length-i,0),a=-1,f=e.length,u=zs(o+f);++s<o;)u[s]=t[s];for(var h=s;++a<f;)u[h+a]=e[a];for(;++n<i;)u[h+r[n]]=t[s++];return u}function ur(t,e){return function(r,n,i){var s=e?e():{};if(n=zr(n,i,3),Pa(r))for(var o=-1,a=r.length;++o<a;){var f=r[o];t(s,f,n(f,o,r),r)}else jo(r,function(e,r,i){t(s,e,n(e,r,i),i)});return s}}function hr(t){return yi(function(e,r){var n=-1,i=null==e?0:r.length,s=i>2?r[i-2]:A,o=i>2?r[2]:A,a=i>1?r[i-1]:A;for("function"==typeof s?(s=sr(s,a,5),i-=2):(s="function"==typeof a?a:A,i-=s?1:0),o&&Qr(r[0],r[1],o)&&(s=i<3?A:s,i=1);++n<i;){var f=r[n];f&&t(e,f,s)}return e})}function cr(t,e){return function(r,n){var i=r?Fo(r):0;if(!en(i))return t(r,n);for(var s=e?i:-1,o=cn(r);(e?s--:++s<i)&&!1!==n(o[s],s,o););return r}}function dr(t){return function(e,r,n){for(var i=cn(e),s=n(e),o=s.length,a=t?o:-1;t?a--:++a<o;){var f=s[a];if(!1===r(i[f],f,i))break}return e}}function pr(t,e){function r(){return(this&&this!==$t&&this instanceof r?n:t).apply(e,arguments)}var n=gr(t);return r}function lr(t){return yo&&ho?new Jt(t):null}function br(t){return function(e){for(var r=-1,n=Is(hs(e)),i=n.length,s="";++r<i;)s=t(s,n[r],r);return s}}function gr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Co(t.prototype),n=t.apply(r,e);return Ni(n)?n:r}}function yr(t){function e(r,n,i){i&&Qr(r,n,i)&&(n=A);var s=jr(r,t,A,A,A,A,A,n);return s.placeholder=e.placeholder,s}return e}function mr(t,e){return yi(function(r){var n=r[0];return null==n?n:(r.push(e),t.apply(A,r))})}function vr(t,e){return function(r,n,i){if(i&&Qr(r,n,i)&&(n=A),n=zr(n,i,3),1==n.length){r=Pa(r)?r:hn(r);var s=oe(r,n,t,e);if(!r.length||s!==e)return s}return Ae(r,n,t,e)}}function _r(t,e){return function(r,n,s){if(n=zr(n,s,3),Pa(r)){var o=i(r,n,e);return o>-1?r[o]:A}return Oe(r,n,t)}}function wr(t){return function(e,r,n){return e&&e.length?(r=zr(r,n,3),i(e,r,t)):-1}}function Sr(t){return function(e,r,n){return r=zr(r,n,3),Oe(e,r,t,!0)}}function kr(t){return function(){for(var e,r=arguments.length,n=t?r:-1,i=0,s=zs(r);t?n--:++n<r;){var o=s[i++]=arguments[n];if("function"!=typeof o)throw new Xs(K);!e&&m.prototype.thru&&"wrapper"==Hr(o)&&(e=new m([],!0))}for(n=e?-1:r;++n<r;){o=s[n];var a=Hr(o),f="wrapper"==a?Ho(o):A;e=f&&tn(f[0])&&f[1]==(N|B|R|C)&&!f[4].length&&1==f[9]?e[Hr(f[0])].apply(e,f[3]):1==o.length&&tn(o)?e[a]():e.thru(o)}return function(){var t=arguments,n=t[0];if(e&&1==t.length&&Pa(n)&&n.length>=z)return e.plant(n).value();for(var i=0,o=r?s[i].apply(this,t):n;++i<r;)o=s[i].call(this,o);return o}}}function Ir(t,e){return function(r,n,i){return"function"==typeof n&&i===A&&Pa(r)?t(r,n):e(r,sr(n,i,3))}}function Ar(t){return function(e,r,n){return"function"==typeof r&&n===A||(r=sr(r,n,3)),t(e,r,ts)}}function Er(t){return function(e,r,n){return"function"==typeof r&&n===A||(r=sr(r,n,3)),t(e,r)}}function xr(t){return function(e,r,n){var i={};return r=zr(r,n,3),Me(e,function(e,n,s){var o=r(e,n,s);n=t?o:n,e=t?e:o,i[n]=e}),i}}function Or(t){return function(e,r,n){return e=a(e),(t?e:"")+Rr(e,r,n)+(t?"":e)}}function Pr(t){var e=yi(function(r,n){var i=v(n,e.placeholder);return jr(r,t,A,n,i)});return e}function Br(t,e){return function(r,n,i,s){var o=arguments.length<3;return"function"==typeof n&&s===A&&Pa(r)?t(r,n,i,o):Ge(r,zr(n,s,4),i,o,e)}}function Mr(t,e,r,n,i,s,o,a,f,u){function h(){for(var m=arguments.length,_=m,w=zs(m);_--;)w[_]=arguments[_];if(n&&(w=ar(w,n,i)),s&&(w=fr(w,s,o)),l||g){var S=h.placeholder,k=v(w,S);if((m-=k.length)<u){var I=a?re(a):A,E=So(u-m,0),P=l?k:A,B=l?A:k,M=l?w:A,N=l?A:w;e|=l?R:T,e&=~(l?T:R),b||(e&=~(x|O));var C=[t,e,r,M,P,N,B,I,f,E],j=Mr.apply(A,C);return tn(t)&&Ko(j,C),j.placeholder=S,j}}var U=d?r:this,L=p?U[t]:t;return a&&(w=fn(w,a)),c&&f<w.length&&(w.length=f),this&&this!==$t&&this instanceof h&&(L=y||gr(t)),L.apply(U,w)}var c=e&N,d=e&x,p=e&O,l=e&B,b=e&P,g=e&M,y=p?A:gr(t);return h}function Rr(t,e,r){var n=t.length;if(e=+e,n>=e||!_o(e))return"";var i=e-n;return r=null==r?" ":r+"",gs(r,go(i/r.length)).slice(0,i)}function Tr(t,e,r,n){function i(){for(var e=-1,a=arguments.length,f=-1,u=n.length,h=zs(u+a);++f<u;)h[f]=n[f];for(;a--;)h[f++]=arguments[++e];return(this&&this!==$t&&this instanceof i?o:t).apply(s?r:this,h)}var s=e&x,o=gr(t);return i}function Nr(t){var e=qs[t];return function(t,r){return r=r===A?0:+r||0,r?(r=fo(10,r),e(t*r)/r):e(t)}}function Cr(t){return function(e,r,n,i){var s=zr(n);return null==n&&s===_e?nr(e,r,t):ir(e,r,s(n,i,1),t)}}function jr(t,e,r,n,i,s,o,a){var f=e&O;if(!f&&"function"!=typeof t)throw new Xs(K);var u=n?n.length:0;if(u||(e&=~(R|T),n=i=A),u-=i?i.length:0,e&T){var h=n,c=i;n=i=A}var d=f?A:Ho(t),p=[t,e,r,n,i,h,c,s,o,a];if(d&&(nn(p,d),e=p[1],a=p[9]),p[9]=null==a?f?0:t.length:So(a-u,0)||0,e==x)var l=pr(p[0],p[2]);else l=e!=R&&e!=(x|R)||p[4].length?Mr.apply(A,p):Tr.apply(A,p);return(d?zo:Ko)(l,p)}function Ur(t,e,r,n,i,s,o){var a=-1,f=t.length,u=e.length;if(f!=u&&!(i&&u>f))return!1;for(;++a<f;){var h=t[a],c=e[a],d=n?n(i?c:h,i?h:c,a):A;if(d!==A){if(d)continue;return!1}if(i){if(!de(e,function(t){return h===t||r(h,t,n,i,s,o)}))return!1}else if(h!==c&&!r(h,c,n,i,s,o))return!1}return!0}function Lr(t,e,r){switch(r){case G:case W:return+t==+e;case X:return t.name==e.name&&t.message==e.message;case Z:return t!=+t?e!=+e:t==+e;case $:case tt:return t==e+""}return!1}function Dr(t,e,r,n,i,s,o){var a=za(t),f=a.length;if(f!=za(e).length&&!i)return!1;for(var u=f;u--;){var h=a[u];if(!(i?h in e:to.call(e,h)))return!1}for(var c=i;++u<f;){h=a[u];var d=t[h],p=e[h],l=n?n(i?p:d,i?d:p,h):A;if(!(l===A?r(d,p,n,i,s,o):l))return!1;c||(c="constructor"==h)}if(!c){var b=t.constructor,g=e.constructor;if(b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g))return!1}return!0}function zr(t,r,n){var i=e.callback||As;return i=i===As?_e:i,n?i(t,r,n):i}function Hr(t){for(var e=t.name,r=No[e],n=r?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==t)return i.name}return e}function Fr(t,r,n){var i=e.indexOf||In;return i=i===In?s:i,t?i(t,r,n):i}function Kr(t){for(var e=es(t),r=e.length;r--;)e[r][2]=rn(e[r][1]);return e}function qr(t,e){var r=null==t?A:t[e];return Ui(r)?r:A}function Vr(t,e,r){for(var n=-1,i=r.length;++n<i;){var s=r[n],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=ko(e,t+o);break;case"takeRight":t=So(t,e-o)}}return{start:t,end:e}}function Yr(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&to.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gr(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Ys),new e}function Wr(t,e,r){var n=t.constructor;switch(e){case et:return or(t);case G:case W:return new n(+t);case rt:case nt:case it:case st:case ot:case at:case ft:case ut:case ht:var i=t.buffer;return new n(r?or(i):i,t.byteOffset,t.length);case Z:case tt:return new n(t);case $:var s=new n(t.source,Pt.exec(t));s.lastIndex=t.lastIndex}return s}function Xr(t,e,r){null==t||$r(e,t)||(e=dn(e),t=1==e.length?t:Ne(t,We(e,0,-1)),e=En(e));var n=null==t?t:t[e];return null==n?A:n.apply(t,r)}function Jr(t){return null!=t&&en(Fo(t))}function Zr(t,e){return t="number"==typeof t||Rt.test(t)?+t:-1,e=null==e?Ro:e,t>-1&&t%1==0&&t<e}function Qr(t,e,r){if(!Ni(r))return!1;var n=typeof e;if("number"==n?Jr(r)&&Zr(e,r.length):"string"==n&&e in r){var i=r[e];return t===t?t===i:i!==i}return!1}function $r(t,e){var r=typeof t;return!!("string"==r&&St.test(t)||"number"==r)||!Pa(t)&&(!wt.test(t)||null!=e&&t in cn(e))}function tn(t){var r=Hr(t);if(!(r in Ht.prototype))return!1;var n=e[r];if(t===n)return!0;var i=Ho(n);return!!i&&t===i[0]}function en(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Ro}function rn(t){return t===t&&!Ni(t)}function nn(t,e){var r=t[1],n=e[1],i=r|n,s=i<N,o=n==N&&r==B||n==N&&r==C&&t[7].length<=e[8]||n==(N|C)&&r==B;if(!s&&!o)return t;n&x&&(t[2]=e[2],i|=r&x?0:P);var a=e[3];if(a){var f=t[3];t[3]=f?ar(f,a,e[4]):re(a),t[4]=f?v(t[3],q):re(e[4])}return a=e[5],a&&(f=t[5],t[5]=f?fr(f,a,e[6]):re(a),t[6]=f?v(t[5],q):re(e[6])),a=e[7],a&&(t[7]=re(a)),n&N&&(t[8]=null==t[8]?e[8]:ko(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function sn(t,e){return t===A?e:Ba(t,e,sn)}function on(t,e){t=cn(t);for(var r=-1,n=e.length,i={};++r<n;){var s=e[r];s in t&&(i[s]=t[s])}return i}function an(t,e){var r={};return Be(t,function(t,n,i){e(t,n,i)&&(r[n]=t)}),r}function fn(t,e){for(var r=t.length,n=ko(e.length,r),i=re(t);n--;){var s=e[n];t[n]=Zr(s,r)?i[s]:A}return t}function un(t){for(var e=ts(t),r=e.length,n=r&&t.length,i=!!n&&en(n)&&(Pa(t)||Ai(t)),s=-1,o=[];++s<r;){var a=e[s];(i&&Zr(a,n)||to.call(t,a))&&o.push(a)}return o}function hn(t){return null==t?[]:Jr(t)?Ni(t)?t:Ys(t):ss(t)}function cn(t){return Ni(t)?t:Ys(t)}function dn(t){if(Pa(t))return t;var e=[];return a(t).replace(kt,function(t,r,n,i){e.push(n?i.replace(xt,"$1"):r||t)}),e}function pn(t){return t instanceof Ht?t.clone():new m(t.__wrapped__,t.__chain__,re(t.__actions__))}function ln(t,e,r){e=(r?Qr(t,e,r):null==e)?1:So(mo(e)||1,1);for(var n=0,i=t?t.length:0,s=-1,o=zs(go(i/e));n<i;)o[++s]=We(t,n,n+=e);return o}function bn(t){for(var e=-1,r=t?t.length:0,n=-1,i=[];++e<r;){var s=t[e];s&&(i[++n]=s)}return i}function gn(t,e,r){return(t?t.length:0)?((r?Qr(t,e,r):null==e)&&(e=1),We(t,e<0?0:e)):[]}function yn(t,e,r){var n=t?t.length:0;return n?((r?Qr(t,e,r):null==e)&&(e=1),e=n-(+e||0),We(t,0,e<0?0:e)):[]}function mn(t,e,r){return t&&t.length?er(t,zr(e,r,3),!0,!0):[]}function vn(t,e,r){return t&&t.length?er(t,zr(e,r,3),!0):[]}function _n(t,e,r,n){var i=t?t.length:0;return i?(r&&"number"!=typeof r&&Qr(t,e,r)&&(r=0,n=i),Ee(t,e,r,n)):[]}function wn(t){return t?t[0]:A}function Sn(t,e,r){var n=t?t.length:0;return r&&Qr(t,e,r)&&(e=!1),n?Pe(t,e):[]}function kn(t){return(t?t.length:0)?Pe(t,!0):[]}function In(t,e,r){var n=t?t.length:0;if(!n)return-1;if("number"==typeof r)r=r<0?So(n+r,0):r;else if(r){var i=nr(t,e);return i<n&&(e===e?e===t[i]:t[i]!==t[i])?i:-1}return s(t,e,r||0)}function An(t){return yn(t,1)}function En(t){var e=t?t.length:0;return e?t[e-1]:A}function xn(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=n;if("number"==typeof r)i=(r<0?So(n+r,0):ko(r||0,n-1))+1;else if(r){i=nr(t,e,!0)-1;var s=t[i];return(e===e?e===s:s!==s)?i:-1}if(e!==e)return g(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function On(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var r=0,n=Fr(),i=t.length;++r<i;)for(var s=0,o=t[r];(s=n(e,o,s))>-1;)po.call(e,s,1);return e}function Pn(t,e,r){var n=[];if(!t||!t.length)return n;var i=-1,s=[],o=t.length;for(e=zr(e,r,3);++i<o;){var a=t[i];e(a,i,t)&&(n.push(a),s.push(i))}return Ve(t,s),n}function Bn(t){return gn(t,1)}function Mn(t,e,r){var n=t?t.length:0;return n?(r&&"number"!=typeof r&&Qr(t,e,r)&&(e=0,r=n),We(t,e,r)):[]}function Rn(t,e,r){return(t?t.length:0)?((r?Qr(t,e,r):null==e)&&(e=1),We(t,0,e<0?0:e)):[]}function Tn(t,e,r){var n=t?t.length:0;return n?((r?Qr(t,e,r):null==e)&&(e=1),e=n-(+e||0),We(t,e<0?0:e)):[]}function Nn(t,e,r){return t&&t.length?er(t,zr(e,r,3),!1,!0):[]}function Cn(t,e,r){return t&&t.length?er(t,zr(e,r,3)):[]}function jn(t,e,r,n){if(!(t?t.length:0))return[];null!=e&&"boolean"!=typeof e&&(n=r,r=Qr(t,e,n)?A:e,e=!1);var i=zr();return null==r&&i===_e||(r=i(r,n,3)),e&&Fr()==s?_(t,r):$e(t,r)}function Un(t){if(!t||!t.length)return[];var e=-1,r=0;t=ae(t,function(t){if(Jr(t))return r=So(t.length,r),!0});for(var n=zs(r);++e<r;)n[e]=fe(t,Ke(e));return n}function Ln(t,e,r){if(!(t?t.length:0))return[];var n=Un(t);return null==e?n:(e=sr(e,r,4),fe(n,function(t){return he(t,e,A,!0)}))}function Dn(){for(var t=-1,e=arguments.length;++t<e;){var r=arguments[t];if(Jr(r))var n=n?ue(ke(n,r),ke(r,n)):r}return n?$e(n):[]}function zn(t,e){var r=-1,n=t?t.length:0,i={};for(!n||e||Pa(t[0])||(e=[]);++r<n;){var s=t[r];e?i[s]=e[r]:s&&(i[s[0]]=s[1])}return i}function Hn(t){var r=e(t);return r.__chain__=!0,r}function Fn(t,e,r){return e.call(r,t),t}function Kn(t,e,r){return e.call(r,t)}function qn(){return Hn(this)}function Vn(){return new m(this.value(),this.__chain__)}function Yn(t){for(var e,n=this;n instanceof r;){var i=pn(n);e?s.__wrapped__=i:e=i;var s=i;n=n.__wrapped__}return s.__wrapped__=t,e}function Gn(){var t=this.__wrapped__,e=function(t){return r&&r.__dir__<0?t:t.reverse()};if(t instanceof Ht){var r=t;return this.__actions__.length&&(r=new Ht(this)),r=r.reverse(),r.__actions__.push({func:Kn,args:[e],thisArg:A}),new m(r,this.__chain__)}return this.thru(e)}function Wn(){return this.value()+""}function Xn(){return rr(this.__wrapped__,this.__actions__)}function Jn(t,e,r){var n=Pa(t)?se:Ie;return r&&Qr(t,e,r)&&(e=A),"function"==typeof e&&r===A||(e=zr(e,r,3)),n(t,e)}function Zn(t,e,r){var n=Pa(t)?ae:xe;return e=zr(e,r,3),n(t,e)}function Qn(t,e){return ia(t,De(e))}function $n(t,e,r,n){var i=t?Fo(t):0;return en(i)||(t=ss(t),i=t.length),r="number"!=typeof r||n&&Qr(e,r,n)?0:r<0?So(i+r,0):r||0,"string"==typeof t||!Pa(t)&&Fi(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Fr(t,e,r)>-1}function ti(t,e,r){var n=Pa(t)?fe:Le;return e=zr(e,r,3),n(t,e)}function ei(t,e){return ti(t,Ts(e))}function ri(t,e,r){var n=Pa(t)?ae:xe;return e=zr(e,r,3),n(t,function(t,r,n){return!e(t,r,n)})}function ni(t,e,r){if(r?Qr(t,e,r):null==e){t=hn(t);var n=t.length;return n>0?t[Ye(0,n-1)]:A}var i=-1,s=Gi(t),n=s.length,o=n-1;for(e=ko(e<0?0:+e||0,n);++i<e;){var a=Ye(i,o),f=s[a];s[a]=s[i],s[i]=f}return s.length=e,s}function ii(t){return ni(t,Oo)}function si(t){var e=t?Fo(t):0;return en(e)?e:za(t).length}function oi(t,e,r){var n=Pa(t)?de:Xe;return r&&Qr(t,e,r)&&(e=A),"function"==typeof e&&r===A||(e=zr(e,r,3)),n(t,e)}function ai(t,e,r){if(null==t)return[];r&&Qr(t,e,r)&&(e=A);var n=-1;return e=zr(e,r,3),Je(Le(t,function(t,r,i){return{criteria:e(t,r,i),index:++n,value:t}}),h)}function fi(t,e,r,n){return null==t?[]:(n&&Qr(e,r,n)&&(r=A),Pa(e)||(e=null==e?[]:[e]),Pa(r)||(r=null==r?[]:[r]),Ze(t,e,r))}function ui(t,e){return Zn(t,De(e))}function hi(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Xs(K);var r=t;t=e,e=r}return t=_o(t=+t)?t:0,function(){if(--t<1)return e.apply(this,arguments)}}function ci(t,e,r){return r&&Qr(t,e,r)&&(e=A),e=t&&null==e?t.length:So(+e||0,0),jr(t,N,A,A,A,A,e)}function di(t,e){var r;if("function"!=typeof e){if("function"!=typeof t)throw new Xs(K);var n=t;t=e,e=n}return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=A),r}}function pi(t,e,r){function n(){p&&oo(p),u&&oo(u),b=0,u=p=l=A}function i(e,r){r&&oo(r),u=p=l=A,e&&(b=ba(),h=t.apply(d,f),p||u||(f=d=A))}function s(){var t=e-(ba()-c);t<=0||t>e?i(l,u):p=co(s,t)}function o(){i(y,p)}function a(){if(f=arguments,c=ba(),d=this,l=y&&(p||!m),!1===g)var r=m&&!p;else{u||m||(b=c);var n=g-(c-b),i=n<=0||n>g;i?(u&&(u=oo(u)),b=c,h=t.apply(d,f)):u||(u=co(o,n))}return i&&p?p=oo(p):p||e===g||(p=co(s,e)),r&&(i=!0,h=t.apply(d,f)),!i||p||u||(f=d=A),h}var f,u,h,c,d,p,l,b=0,g=!1,y=!0;if("function"!=typeof t)throw new Xs(K);if(e=e<0?0:+e||0,!0===r){var m=!0;y=!1}else Ni(r)&&(m=!!r.leading,g="maxWait"in r&&So(+r.maxWait||0,e),y="trailing"in r?!!r.trailing:y);return a.cancel=n,a}function li(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Xs(K);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o),o};return r.cache=new li.Cache,r}function bi(t){if("function"!=typeof t)throw new Xs(K);return function(){return!t.apply(this,arguments)}}function gi(t){return di(2,t)}function yi(t,e){if("function"!=typeof t)throw new Xs(K);return e=So(e===A?t.length-1:+e||0,0),function(){for(var r=arguments,n=-1,i=So(r.length-e,0),s=zs(i);++n<i;)s[n]=r[e+n];switch(e){case 0:return t.call(this,s);case 1:return t.call(this,r[0],s);case 2:return t.call(this,r[0],r[1],s)}var o=zs(e+1);for(n=-1;++n<e;)o[n]=r[n];return o[e]=s,t.apply(this,o)}}function mi(t){if("function"!=typeof t)throw new Xs(K);return function(e){return t.apply(this,e)}}function vi(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Xs(K);return!1===r?n=!1:Ni(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),pi(t,e,{leading:n,maxWait:+e,trailing:i})}function _i(t,e){return e=null==e?xs:e,jr(e,R,A,[t],[])}function wi(t,e,r,n){return e&&"boolean"!=typeof e&&Qr(t,e,r)?e=!1:"function"==typeof e&&(n=r,r=e,e=!1),"function"==typeof r?we(t,e,sr(r,n,1)):we(t,e)}function Si(t,e,r){return"function"==typeof e?we(t,!0,sr(e,r,1)):we(t,!0)}function ki(t,e){return t>e}function Ii(t,e){return t>=e}function Ai(t){return y(t)&&Jr(t)&&to.call(t,"callee")&&!uo.call(t,"callee")}function Ei(t){return!0===t||!1===t||y(t)&&ro.call(t)==G}function xi(t){return y(t)&&ro.call(t)==W}function Oi(t){return!!t&&1===t.nodeType&&y(t)&&!zi(t)}function Pi(t){return null==t||(Jr(t)&&(Pa(t)||Fi(t)||Ai(t)||y(t)&&Ti(t.splice))?!t.length:!za(t).length)}function Bi(t,e,r,n){r="function"==typeof r?sr(r,n,3):A;var i=r?r(t,e):A;return i===A?Ce(t,e,r):!!i}function Mi(t){return y(t)&&"string"==typeof t.message&&ro.call(t)==X}function Ri(t){return"number"==typeof t&&_o(t)}function Ti(t){return Ni(t)&&ro.call(t)==J}function Ni(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ci(t,e,r,n){return r="function"==typeof r?sr(r,n,3):A,Ue(t,Kr(e),r)}function ji(t){return Di(t)&&t!=+t}function Ui(t){return null!=t&&(Ti(t)?io.test($s.call(t)):y(t)&&Mt.test(t))}function Li(t){return null===t}function Di(t){return"number"==typeof t||y(t)&&ro.call(t)==Z}function zi(t){var e;if(!y(t)||ro.call(t)!=Q||Ai(t)||!to.call(t,"constructor")&&"function"==typeof(e=t.constructor)&&!(e instanceof e))return!1;var r;return Be(t,function(t,e){r=e}),r===A||to.call(t,r)}function Hi(t){return Ni(t)&&ro.call(t)==$}function Fi(t){return"string"==typeof t||y(t)&&ro.call(t)==tt}function Ki(t){return y(t)&&en(t.length)&&!!Dt[ro.call(t)]}function qi(t){return t===A}function Vi(t,e){return t<e}function Yi(t,e){return t<=e}function Gi(t){var e=t?Fo(t):0;return en(e)?e?re(t):[]:ss(t)}function Wi(t){return ve(t,ts(t))}function Xi(t,e,r){var n=Co(t);return r&&Qr(t,e,r)&&(e=A),e?ye(n,e):n}function Ji(t){return Te(t,ts(t))}function Zi(t,e,r){var n=null==t?A:Ne(t,dn(e),e+"");return n===A?r:n}function Qi(t,e){if(null==t)return!1;var r=to.call(t,e);if(!r&&!$r(e)){if(e=dn(e),null==(t=1==e.length?t:Ne(t,We(e,0,-1))))return!1;e=En(e),r=to.call(t,e)}return r||en(t.length)&&Zr(e,t.length)&&(Pa(t)||Ai(t))}function $i(t,e,r){r&&Qr(t,e,r)&&(e=A);for(var n=-1,i=za(t),s=i.length,o={};++n<s;){var a=i[n],f=t[a];e?to.call(o,f)?o[f].push(a):o[f]=[a]:o[f]=a}return o}function ts(t){if(null==t)return[];Ni(t)||(t=Ys(t));var e=t.length;e=e&&en(e)&&(Pa(t)||Ai(t))&&e||0;for(var r=t.constructor,n=-1,i="function"==typeof r&&r.prototype===t,s=zs(e),o=e>0;++n<e;)s[n]=n+"";for(var a in t)o&&Zr(a,e)||"constructor"==a&&(i||!to.call(t,a))||s.push(a);return s}function es(t){t=cn(t);for(var e=-1,r=za(t),n=r.length,i=zs(n);++e<n;){var s=r[e];i[e]=[s,t[s]]}return i}function rs(t,e,r){var n=null==t?A:t[e];return n===A&&(null==t||$r(e,t)||(e=dn(e),t=1==e.length?t:Ne(t,We(e,0,-1)),n=null==t?A:t[En(e)]),n=n===A?r:n),Ti(n)?n.call(t):n}function ns(t,e,r){if(null==t)return t;var n=e+"";e=null!=t[n]||$r(e,t)?[n]:dn(e);for(var i=-1,s=e.length,o=s-1,a=t;null!=a&&++i<s;){var f=e[i];Ni(a)&&(i==o?a[f]=r:null==a[f]&&(a[f]=Zr(e[i+1])?[]:{})),a=a[f]}return t}function is(t,e,r,n){var i=Pa(t)||Ki(t);if(e=zr(e,n,4),null==r)if(i||Ni(t)){var s=t.constructor;r=i?Pa(t)?new s:[]:Co(Ti(s)?s.prototype:A)}else r={};return(i?ne:Me)(t,function(t,n,i){return e(r,t,n,i)}),r}function ss(t){return tr(t,za(t))}function os(t){return tr(t,ts(t))}function as(t,e,r){return e=+e||0,r===A?(r=e,e=0):r=+r||0,t>=ko(e,r)&&t<So(e,r)}function fs(t,e,r){r&&Qr(t,e,r)&&(e=r=A);var n=null==t,i=null==e;if(null==r&&(i&&"boolean"==typeof t?(r=t,t=1):"boolean"==typeof e&&(r=e,i=!0)),n&&i&&(e=1,i=!1),t=+t||0,i?(e=t,t=0):e=+e||0,r||t%1||e%1){var s=Eo();return ko(t+s*(e-t+ao("1e-"+((s+"").length-1))),e)}return Ye(t,e)}function us(t){return(t=a(t))&&t.charAt(0).toUpperCase()+t.slice(1)}function hs(t){return(t=a(t))&&t.replace(Tt,d).replace(Et,"")}function cs(t,e,r){t=a(t),e+="";var n=t.length;return r=r===A?n:ko(r<0?0:+r||0,n),(r-=e.length)>=0&&t.indexOf(e,r)==r}function ds(t){return t=a(t),t&&yt.test(t)?t.replace(bt,p):t}function ps(t){return t=a(t),t&&At.test(t)?t.replace(It,l):t||"(?:)"}function ls(t,e,r){t=a(t),e=+e;var n=t.length;if(n>=e||!_o(e))return t;var i=(e-n)/2,s=mo(i);return r=Rr("",go(i),r),r.slice(0,s)+t+r}function bs(t,e,r){return(r?Qr(t,e,r):null==e)?e=0:e&&(e=+e),t=vs(t),Ao(t,e||(Bt.test(t)?16:10))}function gs(t,e){var r="";if(t=a(t),(e=+e)<1||!t||!_o(e))return r;do{e%2&&(r+=t),e=mo(e/2),t+=t}while(e);return r}function ys(t,e,r){return t=a(t),r=null==r?0:ko(r<0?0:+r||0,t.length),t.lastIndexOf(e,r)==r}function ms(t,r,n){var i=e.templateSettings;n&&Qr(t,r,n)&&(r=n=A),t=a(t),r=ge(ye({},n||r),i,be);var s,o,f=ge(ye({},r.imports),i.imports,be),u=za(f),h=tr(f,u),c=0,d=r.interpolate||Nt,p="__p += '",l=Gs((r.escape||Nt).source+"|"+d.source+"|"+(d===_t?Ot:Nt).source+"|"+(r.evaluate||Nt).source+"|$","g"),g="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++Lt+"]")+"\n";t.replace(l,function(e,r,n,i,a,f){return n||(n=i),p+=t.slice(c,f).replace(Ct,b),r&&(s=!0,p+="' +\n__e("+r+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=f+e.length,e}),p+="';\n";var y=r.variable;y||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(ct,""):p).replace(dt,"$1").replace(pt,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var m=Za(function(){return Ks(u,g+"return "+p).apply(A,h)});if(m.source=p,Mi(m))throw m;return m}function vs(t,e,r){var n=t;return(t=a(t))?(r?Qr(n,e,r):null==e)?t.slice(w(t),S(t)+1):(e+="",t.slice(f(t,e),u(t,e)+1)):t}function _s(t,e,r){var n=t;return t=a(t),t?(r?Qr(n,e,r):null==e)?t.slice(w(t)):t.slice(f(t,e+"")):t}function ws(t,e,r){var n=t;return t=a(t),t?(r?Qr(n,e,r):null==e)?t.slice(0,S(t)+1):t.slice(0,u(t,e+"")+1):t}function Ss(t,e,r){r&&Qr(t,e,r)&&(e=A);var n=j,i=U;if(null!=e)if(Ni(e)){var s="separator"in e?e.separator:s;n="length"in e?+e.length||0:n,i="omission"in e?a(e.omission):i}else n=+e||0;if(t=a(t),n>=t.length)return t;var o=n-i.length;if(o<1)return i;var f=t.slice(0,o);if(null==s)return f+i;if(Hi(s)){if(t.slice(o).search(s)){var u,h,c=t.slice(0,o);for(s.global||(s=Gs(s.source,(Pt.exec(s)||"")+"g")),s.lastIndex=0;u=s.exec(c);)h=u.index;f=f.slice(0,null==h?o:h)}}else if(t.indexOf(s,o)!=o){var d=f.lastIndexOf(s);d>-1&&(f=f.slice(0,d))}return f+i}function ks(t){return t=a(t),t&&gt.test(t)?t.replace(lt,k):t}function Is(t,e,r){return r&&Qr(t,e,r)&&(e=A),t=a(t),t.match(e||jt)||[]}function As(t,e,r){return r&&Qr(t,e,r)&&(e=A),y(t)?Os(t):_e(t,e)}function Es(t){return function(){return t}}function xs(t){return t}function Os(t){return De(we(t,!0))}function Ps(t,e){return ze(t,we(e,!0))}function Bs(t,e,r){if(null==r){var n=Ni(e),i=n?za(e):A,s=i&&i.length?Te(e,i):A;(s?s.length:n)||(s=!1,r=e,e=t,t=this)}s||(s=Te(e,za(e)));var o=!0,a=-1,f=Ti(t),u=s.length;!1===r?o=!1:Ni(r)&&"chain"in r&&(o=r.chain);for(;++a<u;){var h=s[a],c=e[h];t[h]=c,f&&(t.prototype[h]=function(e){return function(){var r=this.__chain__;if(o||r){var n=t(this.__wrapped__);return(n.__actions__=re(this.__actions__)).push({func:e,args:arguments,thisArg:t}),n.__chain__=r,n}return e.apply(t,ue([this.value()],arguments))}}(c))}return t}function Ms(){return $t._=no,this}function Rs(){}function Ts(t){return $r(t)?Ke(t):qe(t)}function Ns(t){return function(e){return Ne(t,dn(e),e+"")}}function Cs(t,e,r){r&&Qr(t,e,r)&&(e=r=A),t=+t||0,r=null==r?1:+r||0,null==e?(e=t,t=0):e=+e||0;for(var n=-1,i=So(go((e-t)/(r||1)),0),s=zs(i);++n<i;)s[n]=t,t+=r;return s}function js(t,e,r){if((t=mo(t))<1||!_o(t))return[];var n=-1,i=zs(ko(t,Po));for(e=sr(e,r,1);++n<t;)n<Po?i[n]=e(n):e(n);return i}function Us(t){var e=++eo;return a(t)+e}function Ls(t,e){return(+t||0)+(+e||0)}function Ds(t,e,r){return r&&Qr(t,e,r)&&(e=A),e=zr(e,r,3),1==e.length?pe(Pa(t)?t:hn(t),e):Qe(t,e)}t=t?te.defaults($t.Object(),t,te.pick($t,Ut)):$t;var zs=t.Array,Hs=t.Date,Fs=t.Error,Ks=t.Function,qs=t.Math,Vs=t.Number,Ys=t.Object,Gs=t.RegExp,Ws=t.String,Xs=t.TypeError,Js=zs.prototype,Zs=Ys.prototype,Qs=Ws.prototype,$s=Ks.prototype.toString,to=Zs.hasOwnProperty,eo=0,ro=Zs.toString,no=$t._,io=Gs("^"+$s.call(to).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),so=t.ArrayBuffer,oo=t.clearTimeout,ao=t.parseFloat,fo=qs.pow,uo=Zs.propertyIsEnumerable,ho=qr(t,"Set"),co=t.setTimeout,po=Js.splice,lo=t.Uint8Array,bo=qr(t,"WeakMap"),go=qs.ceil,yo=qr(Ys,"create"),mo=qs.floor,vo=qr(zs,"isArray"),_o=t.isFinite,wo=qr(Ys,"keys"),So=qs.max,ko=qs.min,Io=qr(Hs,"now"),Ao=t.parseInt,Eo=qs.random,xo=Vs.NEGATIVE_INFINITY,Oo=Vs.POSITIVE_INFINITY,Po=4294967295,Bo=Po-1,Mo=Po>>>1,Ro=9007199254740991,To=bo&&new bo,No={};e.support={};e.templateSettings={escape:mt,evaluate:vt,interpolate:_t,variable:"",imports:{_:e}};var Co=function(){function t(){}return function(e){if(Ni(e)){t.prototype=e;var r=new t;t.prototype=A}return r||{}}}(),jo=cr(Me),Uo=cr(Re,!0),Lo=dr(),Do=dr(!0),zo=To?function(t,e){return To.set(t,e),t}:xs,Ho=To?function(t){return To.get(t)}:Rs,Fo=Ke("length"),Ko=function(){var t=0,e=0;return function(r,n){var i=ba(),s=D-(i-e);if(e=i,s>0){if(++t>=L)return r}else t=0;return zo(r,n)}}(),qo=yi(function(t,e){return y(t)&&Jr(t)?ke(t,Pe(e,!1,!0)):[]}),Vo=wr(),Yo=wr(!0),Go=yi(function(t){for(var e=t.length,r=e,n=zs(c),i=Fr(),o=i==s,a=[];r--;){var f=t[r]=Jr(f=t[r])?f:[];n[r]=o&&f.length>=120?lr(r&&f):null}var u=t[0],h=-1,c=u?u.length:0,d=n[0];t:for(;++h<c;)if(f=u[h],(d?Zt(d,f):i(a,f,0))<0){for(var r=e;--r;){var p=n[r];if((p?Zt(p,f):i(t[r],f,0))<0)continue t}d&&d.push(f),a.push(f)}return a}),Wo=yi(function(t,e){e=Pe(e);var r=me(t,e);return Ve(t,e.sort(n)),r}),Xo=Cr(),Jo=Cr(!0),Zo=yi(function(t){return $e(Pe(t,!1,!0))}),Qo=yi(function(t,e){return Jr(t)?ke(t,e):[]}),$o=yi(Un),ta=yi(function(t){var e=t.length,r=e>2?t[e-2]:A,n=e>1?t[e-1]:A
  ;return e>2&&"function"==typeof r?e-=2:(r=e>1&&"function"==typeof n?(--e,n):A,n=A),t.length=e,Ln(t,r,n)}),ea=yi(function(t){return t=Pe(t),this.thru(function(e){return ee(Pa(e)?e:[cn(e)],t)})}),ra=yi(function(t,e){return me(t,Pe(e))}),na=ur(function(t,e,r){to.call(t,r)?++t[r]:t[r]=1}),ia=_r(jo),sa=_r(Uo,!0),oa=Ir(ne,jo),aa=Ir(ie,Uo),fa=ur(function(t,e,r){to.call(t,r)?t[r].push(e):t[r]=[e]}),ua=ur(function(t,e,r){t[r]=e}),ha=yi(function(t,e,r){var n=-1,i="function"==typeof e,s=$r(e),o=Jr(t)?zs(t.length):[];return jo(t,function(t){var a=i?e:s&&null!=t?t[e]:A;o[++n]=a?a.apply(t,r):Xr(t,e,r)}),o}),ca=ur(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]}),da=Br(he,jo),pa=Br(ce,Uo),la=yi(function(t,e){if(null==t)return[];var r=e[2];return r&&Qr(e[0],e[1],r)&&(e.length=1),Ze(t,Pe(e),[])}),ba=Io||function(){return(new Hs).getTime()},ga=yi(function(t,e,r){var n=x;if(r.length){var i=v(r,ga.placeholder);n|=R}return jr(t,n,e,r,i)}),ya=yi(function(t,e){e=e.length?Pe(e):Ji(t);for(var r=-1,n=e.length;++r<n;){var i=e[r];t[i]=jr(t[i],x,t)}return t}),ma=yi(function(t,e,r){var n=x|O;if(r.length){var i=v(r,ma.placeholder);n|=R}return jr(e,n,t,r,i)}),va=yr(B),_a=yr(M),wa=yi(function(t,e){return Se(t,1,e)}),Sa=yi(function(t,e,r){return Se(t,e,r)}),ka=kr(),Ia=kr(!0),Aa=yi(function(t,e){if(e=Pe(e),"function"!=typeof t||!se(e,o))throw new Xs(K);var r=e.length;return yi(function(n){for(var i=ko(n.length,r);i--;)n[i]=e[i](n[i]);return t.apply(this,n)})}),Ea=Pr(R),xa=Pr(T),Oa=yi(function(t,e){return jr(t,C,A,A,A,Pe(e))}),Pa=vo||function(t){return y(t)&&en(t.length)&&ro.call(t)==Y},Ba=hr(He),Ma=hr(function(t,e,r){return r?ge(t,e,r):ye(t,e)}),Ra=mr(Ma,le),Ta=mr(Ba,sn),Na=Sr(Me),Ca=Sr(Re),ja=Ar(Lo),Ua=Ar(Do),La=Er(Me),Da=Er(Re),za=wo?function(t){var e=null==t?A:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Jr(t)?un(t):Ni(t)?wo(t):[]}:un,Ha=xr(!0),Fa=xr(),Ka=yi(function(t,e){if(null==t)return{};if("function"!=typeof e[0]){var e=fe(Pe(e),Ws);return on(t,ke(ts(t),e))}var r=sr(e[0],e[1],3);return an(t,function(t,e,n){return!r(t,e,n)})}),qa=yi(function(t,e){return null==t?{}:"function"==typeof e[0]?an(t,sr(e[0],e[1],3)):on(t,Pe(e))}),Va=br(function(t,e,r){return e=e.toLowerCase(),t+(r?e.charAt(0).toUpperCase()+e.slice(1):e)}),Ya=br(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Ga=Or(),Wa=Or(!0),Xa=br(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}),Ja=br(function(t,e,r){return t+(r?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Za=yi(function(t,e){try{return t.apply(A,e)}catch(t){return Mi(t)?t:new Fs(t)}}),Qa=yi(function(t,e){return function(r){return Xr(r,t,e)}}),$a=yi(function(t,e){return function(r){return Xr(t,r,e)}}),tf=Nr("ceil"),ef=Nr("floor"),rf=vr(ki,xo),nf=vr(Vi,Oo),sf=Nr("round");return e.prototype=r.prototype,m.prototype=Co(r.prototype),m.prototype.constructor=m,Ht.prototype=Co(r.prototype),Ht.prototype.constructor=Ht,Vt.prototype.delete=Yt,Vt.prototype.get=Gt,Vt.prototype.has=Wt,Vt.prototype.set=Xt,Jt.prototype.push=Qt,li.Cache=Vt,e.after=hi,e.ary=ci,e.assign=Ma,e.at=ra,e.before=di,e.bind=ga,e.bindAll=ya,e.bindKey=ma,e.callback=As,e.chain=Hn,e.chunk=ln,e.compact=bn,e.constant=Es,e.countBy=na,e.create=Xi,e.curry=va,e.curryRight=_a,e.debounce=pi,e.defaults=Ra,e.defaultsDeep=Ta,e.defer=wa,e.delay=Sa,e.difference=qo,e.drop=gn,e.dropRight=yn,e.dropRightWhile=mn,e.dropWhile=vn,e.fill=_n,e.filter=Zn,e.flatten=Sn,e.flattenDeep=kn,e.flow=ka,e.flowRight=Ia,e.forEach=oa,e.forEachRight=aa,e.forIn=ja,e.forInRight=Ua,e.forOwn=La,e.forOwnRight=Da,e.functions=Ji,e.groupBy=fa,e.indexBy=ua,e.initial=An,e.intersection=Go,e.invert=$i,e.invoke=ha,e.keys=za,e.keysIn=ts,e.map=ti,e.mapKeys=Ha,e.mapValues=Fa,e.matches=Os,e.matchesProperty=Ps,e.memoize=li,e.merge=Ba,e.method=Qa,e.methodOf=$a,e.mixin=Bs,e.modArgs=Aa,e.negate=bi,e.omit=Ka,e.once=gi,e.pairs=es,e.partial=Ea,e.partialRight=xa,e.partition=ca,e.pick=qa,e.pluck=ei,e.property=Ts,e.propertyOf=Ns,e.pull=On,e.pullAt=Wo,e.range=Cs,e.rearg=Oa,e.reject=ri,e.remove=Pn,e.rest=Bn,e.restParam=yi,e.set=ns,e.shuffle=ii,e.slice=Mn,e.sortBy=ai,e.sortByAll=la,e.sortByOrder=fi,e.spread=mi,e.take=Rn,e.takeRight=Tn,e.takeRightWhile=Nn,e.takeWhile=Cn,e.tap=Fn,e.throttle=vi,e.thru=Kn,e.times=js,e.toArray=Gi,e.toPlainObject=Wi,e.transform=is,e.union=Zo,e.uniq=jn,e.unzip=Un,e.unzipWith=Ln,e.values=ss,e.valuesIn=os,e.where=ui,e.without=Qo,e.wrap=_i,e.xor=Dn,e.zip=$o,e.zipObject=zn,e.zipWith=ta,e.backflow=Ia,e.collect=ti,e.compose=Ia,e.each=oa,e.eachRight=aa,e.extend=Ma,e.iteratee=As,e.methods=Ji,e.object=zn,e.select=Zn,e.tail=Bn,e.unique=jn,Bs(e,e),e.add=Ls,e.attempt=Za,e.camelCase=Va,e.capitalize=us,e.ceil=tf,e.clone=wi,e.cloneDeep=Si,e.deburr=hs,e.endsWith=cs,e.escape=ds,e.escapeRegExp=ps,e.every=Jn,e.find=ia,e.findIndex=Vo,e.findKey=Na,e.findLast=sa,e.findLastIndex=Yo,e.findLastKey=Ca,e.findWhere=Qn,e.first=wn,e.floor=ef,e.get=Zi,e.gt=ki,e.gte=Ii,e.has=Qi,e.identity=xs,e.includes=$n,e.indexOf=In,e.inRange=as,e.isArguments=Ai,e.isArray=Pa,e.isBoolean=Ei,e.isDate=xi,e.isElement=Oi,e.isEmpty=Pi,e.isEqual=Bi,e.isError=Mi,e.isFinite=Ri,e.isFunction=Ti,e.isMatch=Ci,e.isNaN=ji,e.isNative=Ui,e.isNull=Li,e.isNumber=Di,e.isObject=Ni,e.isPlainObject=zi,e.isRegExp=Hi,e.isString=Fi,e.isTypedArray=Ki,e.isUndefined=qi,e.kebabCase=Ya,e.last=En,e.lastIndexOf=xn,e.lt=Vi,e.lte=Yi,e.max=rf,e.min=nf,e.noConflict=Ms,e.noop=Rs,e.now=ba,e.pad=ls,e.padLeft=Ga,e.padRight=Wa,e.parseInt=bs,e.random=fs,e.reduce=da,e.reduceRight=pa,e.repeat=gs,e.result=rs,e.round=sf,e.runInContext=I,e.size=si,e.snakeCase=Xa,e.some=oi,e.sortedIndex=Xo,e.sortedLastIndex=Jo,e.startCase=Ja,e.startsWith=ys,e.sum=Ds,e.template=ms,e.trim=vs,e.trimLeft=_s,e.trimRight=ws,e.trunc=Ss,e.unescape=ks,e.uniqueId=Us,e.words=Is,e.all=Jn,e.any=oi,e.contains=$n,e.eq=Bi,e.detect=ia,e.foldl=da,e.foldr=pa,e.head=wn,e.include=$n,e.inject=da,Bs(e,function(){var t={};return Me(e,function(r,n){e.prototype[n]||(t[n]=r)}),t}(),!1),e.sample=ni,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ni(e,t)}):ni(this.value())},e.VERSION=E,ne(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ne(["drop","take"],function(t,e){Ht.prototype[t]=function(r){var n=this.__filtered__;if(n&&!e)return new Ht(this);r=null==r?1:So(mo(r)||0,0);var i=this.clone();return n?i.__takeCount__=ko(i.__takeCount__,r):i.__views__.push({size:r,type:t+(i.__dir__<0?"Right":"")}),i},Ht.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ne(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r!=F;Ht.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:zr(t,e,1),type:r}),i.__filtered__=i.__filtered__||n,i}}),ne(["first","last"],function(t,e){var r="take"+(e?"Right":"");Ht.prototype[t]=function(){return this[r](1).value()[0]}}),ne(["initial","rest"],function(t,e){var r="drop"+(e?"":"Right");Ht.prototype[t]=function(){return this.__filtered__?new Ht(this):this[r](1)}}),ne(["pluck","where"],function(t,e){var r=e?"filter":"map",n=e?De:Ts;Ht.prototype[t]=function(t){return this[r](n(t))}}),Ht.prototype.compact=function(){return this.filter(xs)},Ht.prototype.reject=function(t,e){return t=zr(t,e,1),this.filter(function(e){return!t(e)})},Ht.prototype.slice=function(t,e){t=null==t?0:+t||0;var r=this;return r.__filtered__&&(t>0||e<0)?new Ht(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==A&&(e=+e||0,r=e<0?r.dropRight(-e):r.take(e-t)),r)},Ht.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},Ht.prototype.toArray=function(){return this.take(Oo)},Me(Ht.prototype,function(t,r){var n=/^(?:filter|map|reject)|While$/.test(r),i=/^(?:first|last)$/.test(r),s=e[i?"take"+("last"==r?"Right":""):r];s&&(e.prototype[r]=function(){var e=i?[1]:arguments,r=this.__chain__,o=this.__wrapped__,a=!!this.__actions__.length,f=o instanceof Ht,u=e[0],h=f||Pa(o);h&&n&&"function"==typeof u&&1!=u.length&&(f=h=!1);var c=function(t){return i&&r?s(t,1)[0]:s.apply(A,ue([t],e))},d={func:Kn,args:[c],thisArg:A},p=f&&!a;if(i&&!r)return p?(o=o.clone(),o.__actions__.push(d),t.call(o)):s.call(A,this.value())[0];if(!i&&h){o=p?o:new Ht(this);var l=t.apply(o,e);return l.__actions__.push(d),new m(l,r)}return this.thru(c)})}),ne(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var r=(/^(?:replace|split)$/.test(t)?Qs:Js)[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?r.apply(this.value(),t):this[n](function(e){return r.apply(e,t)})}}),Me(Ht.prototype,function(t,r){var n=e[r];if(n){var i=n.name;(No[i]||(No[i]=[])).push({name:r,func:n})}}),No[Mr(A,O).name]=[{name:"wrapper",func:A}],Ht.prototype.clone=Ft,Ht.prototype.reverse=Kt,Ht.prototype.value=qt,e.prototype.chain=qn,e.prototype.commit=Vn,e.prototype.concat=ea,e.prototype.plant=Yn,e.prototype.reverse=Gn,e.prototype.toString=Wn,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Xn,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var A,E="3.10.1",x=1,O=2,P=4,B=8,M=16,R=32,T=64,N=128,C=256,j=30,U="...",L=150,D=16,z=200,H=1,F=2,K="Expected a function",q="__lodash_placeholder__",V="[object Arguments]",Y="[object Array]",G="[object Boolean]",W="[object Date]",X="[object Error]",J="[object Function]",Z="[object Number]",Q="[object Object]",$="[object RegExp]",tt="[object String]",et="[object ArrayBuffer]",rt="[object Float32Array]",nt="[object Float64Array]",it="[object Int8Array]",st="[object Int16Array]",ot="[object Int32Array]",at="[object Uint8Array]",ft="[object Uint8ClampedArray]",ut="[object Uint16Array]",ht="[object Uint32Array]",ct=/\b__p \+= '';/g,dt=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lt=/&(?:amp|lt|gt|quot|#39|#96);/g,bt=/[&<>"'`]/g,gt=RegExp(lt.source),yt=RegExp(bt.source),mt=/<%-([\s\S]+?)%>/g,vt=/<%([\s\S]+?)%>/g,_t=/<%=([\s\S]+?)%>/g,wt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,St=/^\w*$/,kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,It=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,At=RegExp(It.source),Et=/[\u0300-\u036f\ufe20-\ufe23]/g,xt=/\\(\\)?/g,Ot=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,Bt=/^0[xX]/,Mt=/^\[object .+?Constructor\]$/,Rt=/^\d+$/,Tt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Nt=/($^)/,Ct=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Ut=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Lt=-1,Dt={};Dt[rt]=Dt[nt]=Dt[it]=Dt[st]=Dt[ot]=Dt[at]=Dt[ft]=Dt[ut]=Dt[ht]=!0,Dt[V]=Dt[Y]=Dt[et]=Dt[G]=Dt[W]=Dt[X]=Dt[J]=Dt["[object Map]"]=Dt[Z]=Dt[Q]=Dt[$]=Dt["[object Set]"]=Dt[tt]=Dt["[object WeakMap]"]=!1;var zt={};zt[V]=zt[Y]=zt[et]=zt[G]=zt[W]=zt[rt]=zt[nt]=zt[it]=zt[st]=zt[ot]=zt[Z]=zt[Q]=zt[$]=zt[tt]=zt[at]=zt[ft]=zt[ut]=zt[ht]=!0,zt[X]=zt[J]=zt["[object Map]"]=zt["[object Set]"]=zt["[object WeakMap]"]=!1;var Ht={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Kt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},qt={function:!0,object:!0},Vt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gt=qt[typeof r]&&r&&!r.nodeType&&r,Wt=qt[typeof e]&&e&&!e.nodeType&&e,Xt=Gt&&Wt&&"object"==typeof t&&t&&t.Object&&t,Jt=qt[typeof self]&&self&&self.Object&&self,Zt=qt[typeof window]&&window&&window.Object&&window,Qt=Wt&&Wt.exports===Gt&&Gt,$t=Xt||Zt!==(this&&this.window)&&Zt||Jt||this,te=I();"function"==typeof define&&"object"==typeof define.amd&&define.amd?($t._=te,define(function(){return te})):Gt&&Wt?Qt?(Wt.exports=te)._=te:Gt._=te:$t._=te}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],360:[function(t,e,r){e.exports={name:"bitcore-lib",version:"0.0.1",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{lint:"gulp lint",test:"gulp test",coverage:"gulp coverage",build:"gulp"},contributors:[{name:"Daniel Cousens",email:"bitcoin@dcousens.com"},{name:"Esteban Ordano",email:"eordano@gmail.com"},{name:"Gordon Hall",email:"gordon@bitpay.com"},{name:"Jeff Garzik",email:"jgarzik@bitpay.com"},{name:"Kyle Drake",email:"kyle@kyledrake.net"},{name:"Manuel Araoz",email:"manuelaraoz@gmail.com"},{name:"Matias Alejo Garcia",email:"ematiu@gmail.com"},{name:"Ryan X. Charles",email:"ryanxcharles@gmail.com"},{name:"Stefan Thomas",email:"moon@justmoon.net"},{name:"Stephen Pair",email:"stephen@bitpay.com"},{name:"Wei Lu",email:"luwei.here@gmail.com"}],keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore-lib.git"},browser:{request:"browser-request"},dependencies:{"bn.js":"=2.0.4",bs58:"=2.0.0","buffer-compare":"=1.0.0",elliptic:"=3.0.3",inherits:"=2.0.1",lodash:"=3.10.1"},devDependencies:{"bitcore-build":"bitpay/bitcore-build",brfs:"^1.2.0",chai:"^1.10.0",gulp:"^3.9.1",sinon:"^1.13.0"},license:"MIT"}},{}],"bitcore-lib":[function(t,e,r){(function(r,n){"use strict";var i=e.exports;i.version="v"+t("./package.json").version,i.versionGuard=function(t){if(void 0!==t){throw new Error("More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.")}},i.versionGuard(r._rpicore),r._rpicore=i.version,i.crypto={},i.crypto.BN=t("./lib/crypto/bn"),i.crypto.ECDSA=t("./lib/crypto/ecdsa"),i.crypto.Hash=t("./lib/crypto/hash"),i.crypto.Random=t("./lib/crypto/random"),i.crypto.Point=t("./lib/crypto/point"),i.crypto.Signature=t("./lib/crypto/signature"),i.encoding={},i.encoding.Base58=t("./lib/encoding/base58"),i.encoding.Base58Check=t("./lib/encoding/base58check"),i.encoding.BufferReader=t("./lib/encoding/bufferreader"),i.encoding.BufferWriter=t("./lib/encoding/bufferwriter"),i.encoding.Varint=t("./lib/encoding/varint"),i.util={},i.util.buffer=t("./lib/util/buffer"),i.util.js=t("./lib/util/js"),i.util.preconditions=t("./lib/util/preconditions"),i.errors=t("./lib/errors"),i.Address=t("./lib/address"),i.Block=t("./lib/block"),i.MerkleBlock=t("./lib/block/merkleblock"),i.BlockHeader=t("./lib/block/blockheader"),i.HDPrivateKey=t("./lib/hdprivatekey.js"),i.HDPublicKey=t("./lib/hdpublickey.js"),i.Networks=t("./lib/networks"),i.Opcode=t("./lib/opcode"),i.PrivateKey=t("./lib/privatekey"),i.PublicKey=t("./lib/publickey"),i.Script=t("./lib/script"),i.Transaction=t("./lib/transaction"),i.URI=t("./lib/uri"),i.Unit=t("./lib/unit"),i.deps={},i.deps.bnjs=t("bn.js"),i.deps.bs58=t("bs58"),i.deps.Buffer=n,i.deps.elliptic=t("elliptic"),i.deps._=t("lodash"),i.Transaction.sighash=t("./lib/transaction/sighash")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"./lib/address":1,"./lib/block":4,"./lib/block/blockheader":3,"./lib/block/merkleblock":5,"./lib/crypto/bn":6,"./lib/crypto/ecdsa":7,"./lib/crypto/hash":8,"./lib/crypto/point":9,"./lib/crypto/random":10,"./lib/crypto/signature":11,"./lib/encoding/base58":12,"./lib/encoding/base58check":13,"./lib/encoding/bufferreader":14,"./lib/encoding/bufferwriter":15,"./lib/encoding/varint":16,"./lib/errors":17,"./lib/hdprivatekey.js":19,"./lib/hdpublickey.js":20,"./lib/networks":21,"./lib/opcode":22,"./lib/privatekey":23,"./lib/publickey":24,"./lib/script":25,"./lib/transaction":28,"./lib/transaction/sighash":36,"./lib/unit":40,"./lib/uri":41,"./lib/util/buffer":42,"./lib/util/js":43,"./lib/util/preconditions":44,"./package.json":360,"bn.js":334,bs58:335,buffer:47,elliptic:337,lodash:359}]},{},[]);