require=function e(t,n,r){function i(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var s=typeof require=="function"&&require;for(var o=0;o0)n.push(o%r),o=o/r|0}for(var u=0;e[u]===0&&u>=8;while(a>0)t.push(a&255),a>>=8}for(var f=0;e[f]===i&&f=55296&&i<=56319&&n65535&&(r-=65536,i+=u(r>>>10&1023|55296),r=56320|r&1023),i+=u(r);return i}function l(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function c(e,t){return u(e>>t&63|128)}function h(e){if((e&4294967168)==0)return u(e);var t="";return(e&4294965248)==0?t=u(e>>6&31|192):(e&4294901760)==0?(l(e),t=u(e>>12&15|224),t+=c(e,6)):(e&4292870144)==0&&(t=u(e>>18&7|240),t+=c(e,12),t+=c(e,6)),t+=u(e&63|128),t}function p(e){var t=a(e),n=t.length,r=-1,i,s="";while(++r=g)throw Error("Invalid byte index");var e=m[y]&255;y++;if((e&192)==128)return e&63;throw Error("Invalid continuation byte")}function v(){var e,t,n,r,i;if(y>g)throw Error("Invalid byte index");if(y==g)return!1;e=m[y]&255,y++;if((e&128)==0)return e;if((e&224)==192){var t=d();i=(e&31)<<6|t;if(i>=128)return i;throw Error("Invalid continuation byte")}if((e&240)==224){t=d(),n=d(),i=(e&15)<<12|t<<6|n;if(i>=2048)return l(i),i;throw Error("Invalid continuation byte")}if((e&248)==240){t=d(),n=d(),r=d(),i=(e&15)<<18|t<<12|n<<6|r;if(i>=65536&&i<=1114111)return i}throw Error("Invalid UTF-8 detected")}function b(e){m=a(e),g=m.length,y=0;var t=[],n;while((n=v())!==!1)t.push(n);return f(t)}var i=typeof n=="object"&&n,s=typeof t=="object"&&t&&t.exports==i&&t,o=typeof e=="object"&&e;if(o.global===o||o.window===o)r=o;var u=String.fromCharCode,m,g,y,w={version:"2.0.0",encode:p,decode:b};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return w});else if(i&&!i.nodeType)if(s)s.exports=w;else{var E={},S=E.hasOwnProperty;for(var x in w)S.call(w,x)&&(i[x]=w[x])}else r.utf8=w})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],4:[function(e,t,n){t.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_winner",type:"address"}],name:"AuctionEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_bidder",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"NewBid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}]},{}],5:[function(e,t,n){t.exports=[{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_refund",type:"address"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"}],name:"setAddr",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"}]},{}],6:[function(e,t,n){t.exports=[{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"value",type:"uint256"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"indirectId",type:"bytes32"},{name:"value",type:"uint256"}],name:"icapTransfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"to",type:"bytes32"}],name:"deposit",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"AnonymousDeposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"indirectId",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"IcapTransfer",type:"event"}]},{}],7:[function(e,t,n){var r=e("./formatters"),i=e("./type"),s=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};s.prototype=new i({}),s.prototype.constructor=s,s.prototype.isType=function(e){return!!e.match(/address(\[([0-9]*)\])?/)},s.prototype.staticPartLength=function(e){return 32*this.staticArrayLength(e)},t.exports=s},{"./formatters":12,"./type":17}],8:[function(e,t,n){var r=e("./formatters"),i=e("./type"),s=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};s.prototype=new i({}),s.prototype.constructor=s,s.prototype.isType=function(e){return!!e.match(/^bool(\[([0-9]*)\])*$/)},s.prototype.staticPartLength=function(e){return 32*this.staticArrayLength(e)},t.exports=s},{"./formatters":12,"./type":17}],9:[function(e,t,n){var r=e("./formatters"),i=e("./type"),s=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};s.prototype=new i({}),s.prototype.constructor=s,s.prototype.isType=function(e){return!!e.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},s.prototype.staticPartLength=function(e){var t=e.match(/^bytes([0-9]*)/),n=parseInt(t[1]);return n*this.staticArrayLength(e)},t.exports=s},{"./formatters":12,"./type":17}],10:[function(e,t,n){var r=e("./formatters"),i=e("./address"),s=e("./bool"),o=e("./int"),u=e("./uint"),a=e("./dynamicbytes"),f=e("./string"),l=e("./real"),c=e("./ureal"),h=e("./bytes"),p=function(e){this._types=e};p.prototype._requireType=function(e){var t=this._types.filter(function(t){return t.isType(e)})[0];if(!t)throw Error("invalid solidity type!: "+e);return t},p.prototype.encodeParam=function(e,t){return this.encodeParams([e],[t])},p.prototype.encodeParams=function(e,t){var n=this.getSolidityTypes(e),r=n.map(function(n,r){return n.encode(t[r],e[r])}),i=n.reduce(function(t,n,r){var i=n.staticPartLength(e[r]),s=Math.floor((i+31)/32)*32;return t+s},0),s=this.encodeMultiWithOffset(e,n,r,i);return s},p.prototype.encodeMultiWithOffset=function(e,t,n,i){var s="",o=this,u=function(n){return t[n].isDynamicArray(e[n])||t[n].isDynamicType(e[n])};return e.forEach(function(a,f){if(u(f)){s+=r.formatInputInt(i).encode();var l=o.encodeWithOffset(e[f],t[f],n[f],i);i+=l.length/2}else s+=o.encodeWithOffset(e[f],t[f],n[f],i)}),e.forEach(function(r,a){if(u(a)){var f=o.encodeWithOffset(e[a],t[a],n[a],i);i+=f.length/2,s+=f}}),s},p.prototype.encodeWithOffset=function(e,t,n,i){var s=this;return t.isDynamicArray(e)?function(){var o=t.nestedName(e),u=t.staticPartLength(o),a=n[0];return function(){var e=2;if(t.isDynamicArray(o))for(var s=1;s2&&e.substr(0,2)==="0x"&&(e=e.substr(2)),e=r.enc.Hex.parse(e)),i(e,{outputLength:256}).toString()}},{"crypto-js":60,"crypto-js/sha3":81}],23:[function(e,t,n){var r=e("bignumber.js"),i=e("utf8"),s={wei:"1",kwei:"1000",ada:"1000",femtoether:"1000",mwei:"1000000",babbage:"1000000",picoether:"1000000",gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",einstein:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},o=function(e,t,n){return(new Array(t-e.length+1)).join(n?n:"0")+e},u=function(e,t,n){return e+(new Array(t-e.length+1)).join(n?n:"0")},a=function(e){var t="",n=0,r=e.length;e.substring(0,2)==="0x"&&(n=2);for(;n50){i.stopWatching(),r=!0;if(!t)throw new Error("Contract transaction couldn't be found after 50 blocks");t(new Error("Contract transaction couldn't be found after 50 blocks"))}else e._eth.getTransactionReceipt(e.transactionHash,function(n,s){s&&!r&&e._eth.getCode(s.contractAddress,function(n,o){if(r||!o)return;i.stopWatching(),r=!0;if(o.length>2)e.address=s.contractAddress,f(e),l(e),t&&t(null,e);else{if(!t)throw new Error("The contract code couldn't be stored, please check your gas amount.");t(new Error("The contract code couldn't be stored, please check your gas amount."))}})})}})},h=function(e,t){this.eth=e,this.abi=t,this.new.getData=this.getData.bind(this)};h.prototype.new=function(){var e=new p(this.eth,this.abi),t={},n,i=Array.prototype.slice.call(arguments);r.isFunction(i[i.length-1])&&(n=i.pop());var s=i[i.length-1];r.isObject(s)&&!r.isArray(s)&&(t=i.pop());var o=a(this.abi,i);t.data+=o;if(n)this.eth.sendTransaction(t,function(t,r){t?n(t):(e.transactionHash=r,n(null,e),c(e,n))});else{var u=this.eth.sendTransaction(t);e.transactionHash=u,c(e)}return e},h.prototype.at=function(e,t){var n=new p(this.eth,this.abi,e);return f(n),l(n),t&&t(null,n),n},h.prototype.getData=function(){var e={},t=Array.prototype.slice.call(arguments),n=t[t.length-1];r.isObject(n)&&!r.isArray(n)&&(e=t.pop());var i=a(this.abi,t);return e.data+=i,e.data};var p=function(e,t,n){this._eth=e,this.transactionHash=null,this.address=n,this.abi=t};t.exports=h},{"../solidity/coder":10,"../utils/utils":23,"./allevents":26,"./event":30,"./function":34}],29:[function(e,t,n){t.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(e){return new Error("CONNECTION ERROR: Couldn't connect to node "+e+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=!e||!e.error||!e.error.message?"Invalid JSON RPC response: "+JSON.stringify(e):e.error.message;return new Error(t)}}},{}],30:[function(e,t,n){var r=e("../utils/utils"),i=e("../solidity/coder"),s=e("./formatters"),o=e("../utils/sha3"),u=e("./filter"),a=e("./methods/watches"),f=function(e,t,n){this._requestManager=e,this._params=t.inputs,this._name=r.transformToFullName(t),this._address=n,this._anonymous=t.anonymous};f.prototype.types=function(e){return this._params.filter(function(t){return t.indexed===e}).map(function(e){return e.type})},f.prototype.displayName=function(){return r.extractDisplayName(this._name)},f.prototype.typeName=function(){return r.extractTypeName(this._name)},f.prototype.signature=function(){return o(this._name)},f.prototype.encode=function(e,t){e=e||{},t=t||{};var n={};["fromBlock","toBlock"].filter(function(e){return t[e]!==undefined}).forEach(function(e){n[e]=s.inputBlockNumberFormatter(t[e])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var o=this._params.filter(function(e){return e.indexed===!0}).map(function(t){var n=e[t.name];return n===undefined||n===null?null:r.isArray(n)?n.map(function(e){return"0x"+i.encodeParam(t.type,e)}):"0x"+i.encodeParam(t.type,n)});return n.topics=n.topics.concat(o),n},f.prototype.decode=function(e){e.data=e.data||"",e.topics=e.topics||[];var t=this._anonymous?e.topics:e.topics.slice(1),n=t.map(function(e){return e.slice(2)}).join(""),r=i.decodeParams(this.types(!0),n),o=e.data.slice(2),u=i.decodeParams(this.types(!1),o),a=s.outputLogFormatter(e);return a.event=this.displayName(),a.address=e.address,a.args=this._params.reduce(function(e,t){return e[t.name]=t.indexed?r.shift():u.shift(),e},{}),delete a.data,delete a.topics,a},f.prototype.execute=function(e,t,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],arguments.length===2&&(t=null),arguments.length===1&&(t=null,e={}));var i=this.encode(e,t),s=this.decode.bind(this);return new u(this._requestManager,i,a.eth(),s,n)},f.prototype.attachToContract=function(e){var t=this.execute.bind(this),n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=this.execute.bind(this,e)},t.exports=f},{"../solidity/coder":10,"../utils/sha3":22,"../utils/utils":23,"./filter":32,"./formatters":33,"./methods/watches":44}],31:[function(e,t,n){var r=e("./formatters"),i=e("./../utils/utils"),s=e("./method"),o=e("./property"),u=function(e){var t=function( t){var n;t.property?(e[t.property]||(e[t.property]={}),n=e[t.property]):n=e,t.methods&&t.methods.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)}),t.properties&&t.properties.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)})};return t.formatters=r,t.utils=i,t.Method=s,t.Property=o,t};t.exports=u},{"./../utils/utils":23,"./formatters":33,"./method":39,"./property":46}],32:[function(e,t,n){var r=e("./formatters"),i=e("../utils/utils"),s=function(e){return e===null||typeof e=="undefined"?null:(e=String(e),e.indexOf("0x")===0?e:i.fromUtf8(e))},o=function(e){return i.isString(e)?e:(e=e||{},e.topics=e.topics||[],e.topics=e.topics.map(function(e){return i.isArray(e)?e.map(s):s(e)}),{topics:e.topics,to:e.to,address:e.address,fromBlock:r.inputBlockNumberFormatter(e.fromBlock),toBlock:r.inputBlockNumberFormatter(e.toBlock)})},u=function(e,t){i.isString(e.options)||e.get(function(e,n){e&&t(e),i.isArray(n)&&n.forEach(function(e){t(null,e)})})},a=function(e){var t=function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isArray(n)&&n.forEach(function(t){t=e.formatter?e.formatter(t):t,e.callbacks.forEach(function(e){e(null,t)})})};e.requestManager.startPolling({method:e.implementation.poll.call,params:[e.filterId]},e.filterId,t,e.stopWatching.bind(e))},f=function(e,t,n,r,i){var s=this,f={};return n.forEach(function(t){t.setRequestManager(e),t.attachToObject(f)}),this.requestManager=e,this.options=o(t),this.implementation=f,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=r,this.implementation.newFilter(this.options,function(e,t){if(e)s.callbacks.forEach(function(t){t(e)});else{s.filterId=t,s.getLogsCallbacks.forEach(function(e){s.get(e)}),s.getLogsCallbacks=[],s.callbacks.forEach(function(e){u(s,e)}),s.callbacks.length>0&&a(s);if(i)return s.watch(i)}}),this};f.prototype.watch=function(e){return this.callbacks.push(e),this.filterId&&(u(this,e),a(this)),this},f.prototype.stopWatching=function(){this.requestManager.stopPolling(this.filterId),this.implementation.uninstallFilter(this.filterId,function(){}),this.callbacks=[]},f.prototype.get=function(e){var t=this;if(!i.isFunction(e)){if(this.filterId===null)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");var n=this.implementation.getLogs(this.filterId);return n.map(function(e){return t.formatter?t.formatter(e):e})}return this.filterId===null?this.getLogsCallbacks.push(e):this.implementation.getLogs(this.filterId,function(n,r){n?e(n):e(null,r.map(function(e){return t.formatter?t.formatter(e):e}))}),this},t.exports=f},{"../utils/utils":23,"./formatters":33}],33:[function(e,t,n){var r=e("../utils/utils"),i=e("../utils/config"),s=e("./iban"),o=function(e){return r.toBigNumber(e)},u=function(e){return e==="latest"||e==="pending"||e==="earliest"},a=function(e){return e===undefined?i.defaultBlock:f(e)},f=function(e){return e===undefined?undefined:u(e)?e:r.toHex(e)},l=function(e){return e.from=e.from||i.defaultAccount,e.from&&(e.from=y(e.from)),e.to&&(e.to=y(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return e[t]!==undefined}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},c=function(e){return e.from=e.from||i.defaultAccount,e.from=y(e.from),e.to&&(e.to=y(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return e[t]!==undefined}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},h=function(e){return e.blockNumber!==null&&(e.blockNumber=r.toDecimal(e.blockNumber)),e.transactionIndex!==null&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.nonce=r.toDecimal(e.nonce),e.gas=r.toDecimal(e.gas),e.gasPrice=r.toBigNumber(e.gasPrice),e.value=r.toBigNumber(e.value),e},p=function(e){return e.blockNumber!==null&&(e.blockNumber=r.toDecimal(e.blockNumber)),e.transactionIndex!==null&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.cumulativeGasUsed=r.toDecimal(e.cumulativeGasUsed),e.gasUsed=r.toDecimal(e.gasUsed),r.isArray(e.logs)&&(e.logs=e.logs.map(function(e){return v(e)})),e},d=function(e){return e.gasLimit=r.toDecimal(e.gasLimit),e.gasUsed=r.toDecimal(e.gasUsed),e.size=r.toDecimal(e.size),e.timestamp=r.toDecimal(e.timestamp),e.number!==null&&(e.number=r.toDecimal(e.number)),e.difficulty=r.toBigNumber(e.difficulty),e.totalDifficulty=r.toBigNumber(e.totalDifficulty),r.isArray(e.transactions)&&e.transactions.forEach(function(e){if(!r.isString(e))return h(e)}),e},v=function(e){return e.blockNumber!==null&&(e.blockNumber=r.toDecimal(e.blockNumber)),e.transactionIndex!==null&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.logIndex!==null&&(e.logIndex=r.toDecimal(e.logIndex)),e},m=function(e){return e.payload=r.toHex(e.payload),e.ttl=r.fromDecimal(e.ttl),e.workToProve=r.fromDecimal(e.workToProve),e.priority=r.fromDecimal(e.priority),r.isArray(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map(function(e){return r.fromUtf8(e)}),e},g=function(e){return e.expiry=r.toDecimal(e.expiry),e.sent=r.toDecimal(e.sent),e.ttl=r.toDecimal(e.ttl),e.workProved=r.toDecimal(e.workProved),e.payloadRaw=e.payload,e.payload=r.toUtf8(e.payload),r.isJson(e.payload)&&(e.payload=JSON.parse(e.payload)),e.topics||(e.topics=[]),e.topics=e.topics.map(function(e){return r.toUtf8(e)}),e},y=function(e){var t=new s(e);if(t.isValid()&&t.isDirect())return"0x"+t.address();if(r.isStrictAddress(e))return e;if(r.isAddress(e))return"0x"+e;throw"invalid address"},b=function(e){return e.startingBlock=r.toDecimal(e.startingBlock),e.currentBlock=r.toDecimal(e.currentBlock),e.highestBlock=r.toDecimal(e.highestBlock),e};t.exports={inputDefaultBlockNumberFormatter:a,inputBlockNumberFormatter:f,inputCallFormatter:l,inputTransactionFormatter:c,inputAddressFormatter:y,inputPostFormatter:m,outputBigNumberFormatter:o,outputTransactionFormatter:h,outputTransactionReceiptFormatter:p,outputBlockFormatter:d,outputLogFormatter:v,outputPostFormatter:g,outputSyncingFormatter:b}},{"../utils/config":21,"../utils/utils":23,"./iban":36}],34:[function(e,t,n){var r=e("../solidity/coder"),i=e("../utils/utils"),s=e("./formatters"),o=e("../utils/sha3"),u=function(e,t,n){this._eth=e,this._inputTypes=t.inputs.map(function(e){return e.type}),this._outputTypes=t.outputs.map(function(e){return e.type}),this._constant=t.constant,this._name=i.transformToFullName(t),this._address=n};u.prototype.extractCallback=function(e){if(i.isFunction(e[e.length-1]))return e.pop()},u.prototype.extractDefaultBlock=function(e){if(e.length>this._inputTypes.length&&!i.isObject(e[e.length-1]))return s.inputDefaultBlockNumberFormatter(e.pop())},u.prototype.toPayload=function(e){var t={};return e.length>this._inputTypes.length&&i.isObject(e[e.length-1])&&(t=e[e.length-1]),t.to=this._address,t.data="0x"+this.signature()+r.encodeParams(this._inputTypes,e),t},u.prototype.signature=function(){return o(this._name).slice(0,8)},u.prototype.unpackOutput=function(e){if(!e)return;e=e.length>=2?e.slice(2):e;var t=r.decodeParams(this._outputTypes,e);return t.length===1?t[0]:t},u.prototype.call=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return e!==undefined}),t=this.extractCallback(e),n=this.extractDefaultBlock(e),r=this.toPayload(e);if(!t){var i=this._eth.call(r,n);return this.unpackOutput(i)}var s=this;this._eth.call(r,n,function(e,n){t(e,s.unpackOutput(n))})},u.prototype.sendTransaction=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return e!==undefined}),t=this.extractCallback(e),n=this.toPayload(e);if(!t)return this._eth.sendTransaction(n);this._eth.sendTransaction(n,t)},u.prototype.estimateGas=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e);if(!t)return this._eth.estimateGas(n);this._eth.estimateGas(n,t)},u.prototype.getData=function(){var e=Array.prototype.slice.call(arguments),t=this.toPayload(e);return t.data},u.prototype.displayName=function(){return i.extractDisplayName(this._name)},u.prototype.typeName=function(){return i.extractTypeName(this._name)},u.prototype.request=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:t,params:[n],format:r}},u.prototype.execute=function(){var e=!this._constant;return e?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(e){var t=this.execute.bind(this);t.request=this.request.bind(this),t.call=this.call.bind(this),t.sendTransaction=this.sendTransaction.bind(this),t.estimateGas=this.estimateGas.bind(this),t.getData=this.getData.bind(this);var n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=t},t.exports=u},{"../solidity/coder":10,"../utils/sha3":22,"../utils/utils":23,"./formatters":33}],35:[function(e,t,n){"use strict";var r=e("./errors"),i;typeof Meteor!="undefined"&&Meteor.isServer?i=Npm.require("xmlhttprequest").XMLHttpRequest:typeof window!="undefined"&&window.XMLHttpRequest?i=window.XMLHttpRequest:i=e("xmlhttprequest").XMLHttpRequest;var s=function(e){this.host=e||"http://localhost:8545"};s.prototype.prepareRequest=function(e){var t=new i;return t.open("POST",this.host,e),t.setRequestHeader("Content-Type","application/json"),t},s.prototype.send=function(e){var t=this.prepareRequest(!1);try{t.send(JSON.stringify(e))}catch(n){throw r.InvalidConnection(this.host)}var i=t.responseText;try{i=JSON.parse(i)}catch(s){throw r.InvalidResponse(t.responseText)}return i},s.prototype.sendAsync=function(e,t){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(n.readyState===4){var e=n.responseText,i=null;try{e=JSON.parse(e)}catch(s){i=r.InvalidResponse(n.responseText)}t(i,e)}};try{n.send(JSON.stringify(e))}catch(i){t(r.InvalidConnection(this.host))}},s.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(e){return!1}},t.exports=s},{"./errors":29,xmlhttprequest:20}],36:[function(e,t,n){var r=e("bignumber.js"),i=function(e,t){var n=e;while(n.length=t&&r<=n?r-t+10:e}).join("")},o=function(e){var t=e,n;while(t.length>2)n=t.slice(0,9),t=parseInt(n,10)%97+t.slice(n.length);return parseInt(t,10)%97},u=function(e){this._iban=e};u.fromAddress=function(e){var t=new r(e,16),n=t.toString(36),s=i(n,15);return u.fromBban(s.toUpperCase())},u.fromBban=function(e){var t="XE",n=o(s(t+"00"+e)),r=("0"+(98-n)).slice(-2);return new u(t+r+e)},u.createIndirect=function(e){return u.fromBban("ETH"+e.institution+e.identifier)},u.isValid=function(e){var t=new u(e);return t.isValid()},u.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&o(s(this._iban))===1},u.prototype.isDirect=function(){return this._iban.length===34||this._iban.length===35},u.prototype.isIndirect=function(){return this._iban.length===20},u.prototype.checksum=function(){return this._iban.substr(2,2)},u.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},u.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},u.prototype.address=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i(t.toString(16),20)}return""},u.prototype.toString=function(){return this._iban},t.exports=u},{"bignumber.js":51}],37:[function(e,t,n){"use strict";var r=e("../utils/utils"),i=e("./errors"),s=function(e,t){var n=this;this.responseCallbacks={},this.path=e,this.connection=t.connect({path:this.path}),this.connection.on("error",function(e){console.error("IPC Connection Error",e),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(e){n._parseResponse(e.toString()).forEach(function(e){var t=null;r.isArray(e)?e.forEach(function(e){n.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,n.responseCallbacks[t]&&(n.responseCallbacks[t](null,e),delete n.responseCallbacks[t])})})};s.prototype._parseResponse=function(e){var t=this,n=[],r=e.replace(/\}\{/g,"}|--|{").replace(/\}\]\[\{/g,"}]|--|[{").replace(/\}\[\{/g,"}|--|[{").replace(/\}\]\{/g,"}]|--|{").split("|--|");return r.forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var r=null;try{r=JSON.parse(e)}catch(s){t.lastChunk=e,clearTimeout(t.lastChunkTimeout),t.lastChunkTimeout=setTimeout(function(){throw t.timeout(),i.InvalidResponse(e)},15e3);return}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,r&&n.push(r)}),n},s.prototype._addResponseCallback=function(e,t){var n=e.id||e[0].id,r=e.method||e[0].method;this.responseCallbacks[n]=t,this.responseCallbacks[n].method=r},s.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},s.prototype.isConnected=function(){var e=this;return e.connection.writable||e.connection.connect({path:e.path}),!!this.connection.writable},s.prototype.send=function(e){if(this.connection.writeSync){var t;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(e));try{t=JSON.parse(n)}catch(r){throw i.InvalidResponse(n)}return t}throw new Error('You tried to send "'+e.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},s.prototype.sendAsync=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},t.exports=s},{"../utils/utils":23,"./errors":29}],38:[function(e,t,n){var r=function(){if(arguments.callee._singletonInstance)return arguments.callee._singletonInstance;arguments.callee._singletonInstance=this,this.messageId=1};r.getInstance=function(){var e=new r;return e},r.prototype.toPayload=function(e,t){return e||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:e,params:t||[],id:this.messageId++}},r.prototype.isValidResponse=function(e){return!!e&&!e.error&&e.jsonrpc==="2.0"&&typeof e.id=="number"&&e.result!==undefined},r.prototype.toBatchPayload=function(e){var t=this;return e.map(function(e){return t.toPayload(e.method,e.params)})},t.exports=r},{}],39:[function(e,t,n){var r=e("../utils/utils"),i=e("./errors"),s=function(e){this.name=e.name,this.call=e.call,this.params=e.params||0,this.inputFormatter=e.inputFormatter,this.outputFormatter=e.outputFormatter,this.requestManager=null};s.prototype.setRequestManager=function(e){this.requestManager=e},s.prototype.getCall=function(e){return r.isFunction(this.call)?this.call(e):this.call},s.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},s.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfParams()},s.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter.map(function(t,n){return t?t(e[n]):e[n]}):e},s.prototype.formatOutput=function(e){return this.outputFormatter&&e?this.outputFormatter(e):e},s.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),r=this.formatInput(e);return this.validateArgs(r),{method:t,params:r,callback:n}},s.prototype.attachToObject=function(e){var t=this.buildCall();t.call=this.call;var n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},s.prototype.buildCall=function(){var e=this,t=function(){var t=e.toPayload(Array.prototype.slice.call(arguments));return t.callback?e.requestManager.sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))}):e.formatOutput(e.requestManager.send(t))};return t.request=this.request.bind(this),t},s.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},t.exports=s},{"../utils/utils":23,"./errors":29}],40:[function(e,t,n){var r=e("../method"),i=function(e){this._requestManager=e._requestManager;var t=this;s().forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})},s=function(){var e=new r({name:"putString",call:"db_putString",params:3}),t=new r({name:"getString",call:"db_getString",params:2}),n=new r({name:"putHex",call:"db_putHex",params:3}),i=new r({name:"getHex",call:"db_getHex",params:2});return[e,t,n,i]};t.exports=i},{"../method":39}],41:[function(e,t,n){"use strict";function w(e){this._requestManager=e._requestManager;var t=this;E().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),S().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),this.iban=p,this.sendIBANTransaction=d.bind(null,this)}var r=e("../formatters"),i=e("../../utils/utils"),s=e("../method"),o=e("../property"),u=e("../../utils/config"),a=e("../contract"),f=e("./watches"),l=e("../filter"),c=e("../syncing"),h=e("../namereg"),p=e("../iban"),d=e("../transfer"),v=function(e){return i.isString(e[0])&&e[0].indexOf("0x")===0?"eth_getBlockByHash":"eth_getBlockByNumber"},m=function(e){return i.isString(e[0])&&e[0].indexOf("0x")===0?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return i.isString(e[0])&&e[0].indexOf("0x")===0?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},y=function(e){return i.isString(e[0])&&e[0].indexOf("0x")===0?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},b=function(e){return i.isString(e[0])&&e[0].indexOf("0x")===0?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};Object.defineProperty(w.prototype,"defaultBlock",{get:function(){return u.defaultBlock},set:function(e){return u.defaultBlock=e,e}}),Object.defineProperty(w.prototype,"defaultAccount",{get:function(){return u.defaultAccount},set:function(e){return u.defaultAccount=e,e}});var E=function(){var e=new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),t=new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,r.inputDefaultBlockNumberFormatter]}),n=new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter]}),o=new s({name:"getBlock",call:v,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:r.outputBlockFormatter}),u=new s({name:"getUncle",call:g,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputBlockFormatter}),a=new s({name:"getCompilers",call:"eth_getCompilers",params:0}),f=new s({name:"getBlockTransactionCount",call:y,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),l=new s({name:"getBlockUncleCount",call:b,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),c=new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),h=new s({name:"getTransactionFromBlock",call:m,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputTransactionFormatter}),p=new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),d=new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),w=new s({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),E=new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),S=new s({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputCallFormatter,r.inputDefaultBlockNumberFormatter]}),x=new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputCallFormatter],outputFormatter:i.toDecimal}),T=new s({name:"compile.solidity",call:"eth_compileSolidity",params:1}),N=new s({name:"compile.lll",call:"eth_compileLLL",params:1}),C=new s({name:"compile.serpent",call:"eth_compileSerpent",params:1}),k=new s({name:"submitWork",call:"eth_submitWork",params:3}),L=new s({name:"getWork",call:"eth_getWork",params:0});return[e,t,n,o,u,a,f,l,c,h,p,d,S,x,w,E,T,N,C,k,L]},S=function(){return[new o({name:"coinbase",getter:"eth_coinbase"}),new o({name:"mining",getter:"eth_mining"}),new o({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new o({name:"syncing",getter:"eth_syncing",outputFormatter:r.outputSyncingFormatter}),new o({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new o({name:"accounts",getter:"eth_accounts"}),new o({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal})]};w.prototype.contract=function(e){var t=new a(this,e);return t},w.prototype.filter=function(e,t){return new l(this._requestManager,e,f.eth(),r.outputLogFormatter,t)},w.prototype.namereg=function(){return this.contract(h.global.abi).at(h.global.address)},w.prototype.icapNamereg=function(){return this.contract(h.icap.abi).at(h.icap.address)},w.prototype.isSyncing=function(e){return new c(this._requestManager,e)},t.exports=w},{"../../utils/config":21,"../../utils/utils":23,"../contract":28,"../filter":32,"../formatters":33,"../iban":36,"../method":39,"../namereg":45,"../property":46,"../syncing":49,"../transfer":50,"./watches":44}],42:[function(e,t,n){var r=e("../../utils/utils"),i=e("../property"),s=function(e){this._requestManager=e._requestManager;var t=this;o().forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})},o=function(){return[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})]};t.exports=s},{"../../utils/utils":23,"../property":46}],43:[function(e,t,n){var r=e("../method"),i=e("../formatters"),s=e("../filter"),o=e("./watches"),u=function(e){this._requestManager=e._requestManager;var t=this;a().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};u.prototype.filter=function(e,t){return new s(this._requestManager,e,o.shh(),i.outputPostFormatter,t)};var a=function(){var e=new r({name:"post",call:"shh_post",params:1,inputFormatter:[i.inputPostFormatter]}),t=new r({name:"newIdentity",call:"shh_newIdentity",params:0}),n=new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),s=new r({name:"newGroup",call:"shh_newGroup",params:0}),o=new r({name:"addToGroup",call:"shh_addToGroup",params:0});return[e,t,n,s,o]};t.exports=u},{"../filter":32,"../formatters":33,"../method":39,"./watches":44}],44:[function(e,t,n){var r=e("../method"),i=function(){var e=function(e){var t=e[0];switch(t){case"latest":return e.shift(),this.params=0,"eth_newBlockFilter";case"pending":return e.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},t=new r({name:"newFilter",call:e,params:1}),n=new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),i=new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),s=new r({name:"poll",call:"eth_getFilterChanges",params:1});return[t,n,i,s]},s=function(){var e=new r({name:"newFilter",call:"shh_newFilter",params:1}),t=new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),n=new r({name:"getLogs",call:"shh_getMessages",params:1}),i=new r({name:"poll",call:"shh_getFilterChanges",params:1});return[e,t,n,i]};t.exports={eth:i,shh:s}},{"../method":39}],45:[function(e,t,n){var r=e("../contracts/GlobalRegistrar.json"),i=e("../contracts/ICAPRegistrar.json"),s="0xc6d9d2cd449a754c494264e1809c50e34d64562b",o="0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00";t.exports={global:{abi:r,address:s},icap:{abi:i,address:o}}},{"../contracts/GlobalRegistrar.json":4,"../contracts/ICAPRegistrar.json":5}],46:[function(e,t,n){var r=e("../utils/utils"),i=function(e){this.name=e.name,this.getter=e.getter,this.setter=e.setter,this.outputFormatter=e.outputFormatter,this.inputFormatter=e.inputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter(e):e},i.prototype.formatOutput=function(e){return this.outputFormatter&&e!==null?this.outputFormatter(e):e},i.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype.attachToObject=function(e){var t={get:this.buildGet()},n=this.name.split("."),r=n[0];n.length>1&&(e[n[0]]=e[n[0]]||{},e=e[n[0]],r=n[1]),Object.defineProperty(e,r,t),e[s(r)]=this.buildAsyncGet()};var s=function(e){return"get"+e.charAt(0).toUpperCase()+e.slice(1)};i.prototype.buildGet=function(){var e=this;return function(){return e.formatOutput(e.requestManager.send({method:e.getter}))}},i.prototype.buildAsyncGet=function(){var e=this,t=function(t){e.requestManager.sendAsync({method:e.getter},function(n,r){t(n,e.formatOutput(r))})};return t.request=this.request.bind(this),t},i.prototype.request=function(){var e={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return e.format=this.formatOutput.bind(this),e},t.exports=i},{"../utils/utils":23}],47:[function(e,t,n){var r=e("./jsonrpc"),i=e("../utils/utils"),s=e("../utils/config"),o=e("./errors"),u=function(e){this.provider=e,this.polls={},this.timeout=null};u.prototype.send=function(e){if(!this.provider)return console.error(o.InvalidProvider()),null;var t=r.getInstance().toPayload(e.method,e.params),n=this.provider.send(t);if(!r.getInstance().isValidResponse(n))throw o.InvalidResponse(n);return n.result},u.prototype.sendAsync=function(e,t){if(!this.provider)return t(o.InvalidProvider());var n=r.getInstance().toPayload(e.method,e.params);this.provider.sendAsync(n,function(e,n){if(e)return t(e);if(!r.getInstance().isValidResponse(n))return t(o.InvalidResponse(n));t(null,n.result)})},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var n=r.getInstance().toBatchPayload(e);this.provider.sendAsync(n,function(e,n){if(e)return t(e);if(!i.isArray(n))return t(o.InvalidResponse(n));t(e,n)})},u.prototype.setProvider=function(e){this.provider=e},u.prototype.startPolling=function(e,t,n,r){this.polls[t]={data:e,id:t,callback:n,uninstall:r},this.timeout||this.poll()},u.prototype.stopPolling=function(e){delete this.polls[e],Object.keys(this.polls).length===0&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},u.prototype.reset=function(e){for(var t in this.polls)if(!e||t.indexOf("syncPoll_")===-1)this.polls[t].uninstall(),delete this.polls[t];Object.keys(this.polls).length===0&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},u.prototype.poll=function(){this.timeout=setTimeout(this.poll.bind(this),s.ETH_POLLING_TIMEOUT);if(Object.keys(this.polls).length===0)return;if(!this.provider){console.error(o.InvalidProvider());return}var e=[],t=[];for(var n in this.polls)e.push(this.polls[n].data),t.push(n);if(e.length===0)return;var u=r.getInstance().toBatchPayload(e),a={};u.forEach(function(e,n){a[e.id]=t[n]});var f=this;this.provider.sendAsync(u,function(e,t){if(e)return;if(!i.isArray(t))throw o.InvalidResponse(t);t.map(function(e){var t=a[e.id];return f.polls[t]?(e.callback=f.polls[t].callback,e):!1}).filter(function(e){return!!e}).filter(function(e){var t=r.getInstance().isValidResponse(e);return t||e.callback(o.InvalidResponse(e)),t}).forEach(function(e){e.callback(null,e.result)})})},t.exports=u},{"../utils/config":21,"../utils/utils":23,"./errors":29,"./jsonrpc":38}],48:[function(e,t,n){var r=function(){this.defaultBlock="latest",this.defaultAccount=undefined};t.exports=r},{}],49:[function(e,t,n){var r=e("./formatters"),i=e("../utils/utils"),s=1,o=function(e){var t=function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isObject(n)&&n.startingBlock&&(n=r.outputSyncingFormatter(n)),e.callbacks.forEach(function(t){e.lastSyncState!==n&&(!e.lastSyncState&&i.isObject(n)&&t(null,!0),setTimeout(function(){t(null,n)},0),e.lastSyncState=n)})};e.requestManager.startPolling({method:"eth_syncing",params:[]},e.pollId,t,e.stopWatching.bind(e))},u=function(e,t){return this.requestManager=e,this.pollId="syncPoll_"+s++,this.callbacks=[],this.addCallback(t),this.lastSyncState=!1,o(this),this};u.prototype.addCallback=function(e){return e&&this.callbacks.push(e),this},u.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},t.exports=u},{"../utils/utils":23,"./formatters":33}],50:[function(e,t,n){var r=e("./iban"),i=e("../contracts/SmartExchange.json"),s=function(e,t,n,i,s){var a=new r(n);if(!a.isValid())throw new Error("invalid iban address");if(a.isDirect())return o(e,t,a.address(),i,s);if(!s){var f=e.icapNamereg().addr(a.institution());return u(e,t,f,i,a.client())}e.icapNamereg().addr(a.institution(),function(n,r){return u(e,t,r,i,a.client(),s)})},o=function(e,t,n,r,i){return e.sendTransaction({address:n,from:t,value:r},i)},u=function(e,t,n,r,s,o){var u=i;return e.contract(u).at(n).deposit(s,{from:t,value:r},o)};t.exports=s},{"../contracts/SmartExchange.json":6,"./iban":36}],51:[function(e,t,n){(function(n){"use strict";function b(e){function U(e,t){var r,i,u,a,f,l,p=this;if(!(p instanceof U))return B&&J(26,"constructor call without new",e),new U(e,t);if(t==null||!j(t,2,64,n,"base")){if(e instanceof U){p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,n=0;return}if((a=typeof e=="number")&&e*0==0){p.s=1/e<0?(e=-e,-1):1;if(e===~~e){for(i=0,u=e;u>=10;u/=10,i++);p.e=i,p.c=[e],n=0;return}l=e+""}else{if(!o.test(l=e+""))return s(p,l,a);p.s=l.charCodeAt(0)===45?(l=l.slice(1),-1):1}}else{t|=0,l=e+"";if(t==10)return p=new U(e instanceof U?e:l),K(p,O+p.e+1,M);if((a=typeof e=="number")&&e*0!=0||!(new RegExp("^-?"+(r="["+h.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"")).test(l))return s(p,l,a,t);a?(p.s=1/e<0?(l=l.slice(1),-1):1,B&&l.replace(/^0\.0*|\./,"").length>15&&J(n,c,e),a=!1):p.s=l.charCodeAt(0)===45?(l=l.slice(1),-1):1,l=z(l,10,t,p.s)}(i=l.indexOf("."))>-1&&(l=l.replace(".","")),(u=l.search(/e/i))>0?(i<0&&(i=u),i+=+l.slice(u+1),l=l.substring(0,u)):i<0&&(i=l.length);for(u=0;l.charCodeAt(u)===48;u++);for(f=l.length;l.charCodeAt(--f)===48;);l=l.slice(u,f+1);if(l){f=l.length,a&&B&&f>15&&J(n,c,p.s*e),i=i-u-1;if(i>H)p.c=p.e=null;else if(i=0&&(u=q,q=0,e=e.replace(".",""),c=new U(r),f=c.pow(e.length-p),q=u,c.c=N(k(E(f.c),f.e),10,n),c.e=c.c.length),l=N(e,r,n),o=u=l.length;for(;l[--u]==0;l.pop());if(!l[0])return"0";p<0?--o:(f.c=l,f.e=o,f.s=i,f=t(f,c,d,v,n),l=f.c,a=f.r,o=f.e),s=o+d+1,p=l[s],u=n/2,a=a||s<0||l[s+1]!=null,a=v<4?(p!=null||a)&&(v==0||v==(f.s<0?3:2)):p>u||p==u&&(v==4||a||v==6&&l[s-1]&1||v==(f.s<0?8:7));if(s<1||!l[0])e=a?k("1",-d):"0";else{l.length=s;if(a)for(--n;++l[--s]>n;)l[s]=0,s||(++o,l.unshift(1));for(u=l.length;!l[--u];);for(p=0,e="";p<=u;e+=h.charAt(l[p++]));e=k(e,o)}return e}function W(e,t,n,r){var i,s,o,u,a;n=n!=null&&j(n,0,8,r,l)?n|0:M;if(!e.c)return e.toString();i=e.c[0],o=e.e;if(t==null)a=E(e.c),a=r==19||r==24&&o<=_?C(a,o):k(a,o);else{e=K(new U(e),t,n),s=e.e,a=E(e.c),u=a.length;if(r==19||r==24&&(t<=s||s<=_)){for(;uu){if(--t>0)for(a+=".";t--;a+="0");}else{t+=s-u;if(t>0){s+1==u&&(a+=".");for(;t--;a+="0");}}}}return e.s<0&&i?"-"+a:a}function X(e,t){var n,r,i=0;T(e[0])&&(e=e[0]),n=new U(e[0]);for(;++in||e!=L(e))&&J(r,(i||"decimal places")+(en?" out of range":" not an integer"),e),!0}function $(e,t,n){var r=1,i=t.length;for(;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*d-1)>H?e.c=e.e=null:n=10;f/=10,i++);s=t-i;if(s<0)s+=d,o=t,l=v[c=0],h=l/g[i-o-1]%10|0;else{c=u((s+1)/d);if(c>=v.length){if(!r)break e;for(;v.length<=c;v.push(0));l= h=0,i=1,s%=d,o=s-d+1}else{l=f=v[c];for(i=1;f>=10;f/=10,i++);s%=d,o=s-d+i,h=o<0?0:l/g[i-o-1]%10|0}}r=r||t<0||v[c+1]!=null||(o<0?l:l%g[i-o-1]),r=n<4?(h||r)&&(n==0||n==(e.s<0?3:2)):h>5||h==5&&(n==4||r||n==6&&(s>0?o>0?l/g[i-o]:0:v[c-1])%10&1||n==(e.s<0?8:7));if(t<1||!v[0])return v.length=0,r?(t-=e.e+1,v[0]=g[t%d],e.e=-t||0):v[0]=e.e=0,e;s==0?(v.length=c,f=1,c--):(v.length=c+1,f=g[d-s],v[c]=o>0?a(l/g[i-o]%g[o])*f:0);if(r)for(;;){if(c==0){for(s=1,o=v[0];o>=10;o/=10,s++);o=v[0]+=f;for(f=1;o>=10;o/=10,f++);s!=f&&(e.e++,v[0]==p&&(v[0]=1));break}v[c]+=f;if(v[c]!=p)break;v[c--]=0,f=1}for(s=v.length;v[--s]===0;v.pop());}e.e>H?e.c=e.e=null:e.er)return(e=o[r++])!=null};return a(t="DECIMAL_PLACES")&&j(e,0,y,2,t)&&(O=e|0),s[t]=O,a(t="ROUNDING_MODE")&&j(e,0,8,2,t)&&(M=e|0),s[t]=M,a(t="EXPONENTIAL_AT")&&(T(e)?j(e[0],-y,0,2,t)&&j(e[1],0,y,2,t)&&(_=e[0]|0,D=e[1]|0):j(e,-y,y,2,t)&&(_=-(D=(e<0?-e:e)|0))),s[t]=[_,D],a(t="RANGE")&&(T(e)?j(e[0],-y,-1,2,t)&&j(e[1],1,y,2,t)&&(P=e[0]|0,H=e[1]|0):j(e,-y,y,2,t)&&(e|0?P=-(H=(e<0?-e:e)|0):B&&J(2,t+" cannot be zero",e))),s[t]=[P,H],a(t="ERRORS")&&(e===!!e||e===1||e===0?(n=0,j=(B=!!e)?V:x):B&&J(2,t+f,e)),s[t]=B,a(t="CRYPTO")&&(e===!!e||e===1||e===0?(F=!!e&&!!i&&typeof i=="object",e&&!F&&B&&J(2,"crypto unavailable",i)):B&&J(2,t+f,e)),s[t]=F,a(t="MODULO_MODE")&&j(e,0,9,2,t)&&(I=e|0),s[t]=I,a(t="POW_PRECISION")&&j(e,0,y,2,t)&&(q=e|0),s[t]=q,a(t="FORMAT")&&(typeof e=="object"?R=e:B&&J(2,t+" not an object",e)),s[t]=R,s},U.max=function(){return X(arguments,r.lt)},U.min=function(){return X(arguments,r.gt)},U.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return a(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,s,o,f,l=0,c=[],h=new U(A);e=e==null||!j(e,0,y,14)?O:e|0,o=u(e/d);if(F)if(i&&i.getRandomValues){n=i.getRandomValues(new Uint32Array(o*=2));for(;l>>11),f>=9e15?(r=i.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(c.push(f%1e14),l+=2);l=o/2}else if(i&&i.randomBytes){n=i.randomBytes(o*=7);for(;l=9e15?i.randomBytes(7).copy(n,l):(c.push(f%1e14),l+=7);l=o/7}else B&&J(14,"crypto unavailable",i);if(!l)for(;l=10;f/=10,l++);lr?1:-1;else for(i=s=0;it[i]?1:-1;break}return s}function n(e,t,n,r){var i=0;for(;n--;)e[n]-=i,i=e[n]1;e.shift());}return function(r,i,s,o,u){var f,l,c,h,v,m,g,y,b,E,S,x,T,N,C,k,L,A=r.s==i.s?1:-1,O=r.c,M=i.c;if(!O||!O[0]||!M||!M[0])return new U(!r.s||!i.s||(O?M&&O[0]==M[0]:!M)?NaN:O&&O[0]==0||!M?A*0:A/0);y=new U(A),b=y.c=[],l=r.e-i.e,A=s+l+1,u||(u=p,l=w(r.e/d)-w(i.e/d),A=A/d|0);for(c=0;M[c]==(O[c]||0);c++);M[c]>(O[c]||0)&&l--;if(A<0)b.push(1),h=!0;else{N=O.length,k=M.length,c=0,A+=2,v=a(u/(M[0]+1)),v>1&&(M=e(M,v,u),O=e(O,v,u),k=M.length,N=O.length),T=k,E=O.slice(0,k),S=E.length;for(;S=u/2&&C++;do{v=0,f=t(M,E,k,S);if(f<0){x=E[0],k!=S&&(x=x*u+(E[1]||0)),v=a(x/C);if(v>1){v>=u&&(v=u-1),m=e(M,v,u),g=m.length,S=E.length;while(t(m,E,g,S)==1)v--,n(m,k=10;A/=10,c++);K(y,s+(y.e=c+l*d-1)+1,o,h)}else y.e=l,y.r=+h;return y}}(),s=function(){var e=/^(-?)0([xbo])/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,s=/^\s*\+|^\s+|\s+$/g;return function(o,u,a,f){var l,c=a?u:u.replace(s,"");if(i.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!a){c=c.replace(e,function(e,t,n){return l=(n=n.toLowerCase())=="x"?16:n=="b"?2:8,!f||f==l?t:e}),f&&(l=f,c=c.replace(t,"$1").replace(r,"0.$1"));if(u!=c)return new U(c,l)}B&&J(n,"not a"+(f?" base "+f:"")+" number",u),o.s=null}o.c=o.e=null,n=0}}(),r.absoluteValue=r.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},r.ceil=function(){return K(new U(this),this.e+1,2)},r.comparedTo=r.cmp=function(e,t){return n=1,S(this,new U(e,t))},r.decimalPlaces=r.dp=function(){var e,t,n=this.c;if(!n)return null;e=((t=n.length-1)-w(this.e/d))*d;if(t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},r.dividedBy=r.div=function(e,r){return n=3,t(this,new U(e,r),O,M)},r.dividedToIntegerBy=r.divToInt=function(e,r){return n=4,t(this,new U(e,r),0,1)},r.equals=r.eq=function(e,t){return n=5,S(this,new U(e,t))===0},r.floor=function(){return K(new U(this),this.e+1,3)},r.greaterThan=r.gt=function(e,t){return n=6,S(this,new U(e,t))>0},r.greaterThanOrEqualTo=r.gte=function(e,t){return n=7,(t=S(this,new U(e,t)))===1||t===0},r.isFinite=function(){return!!this.c},r.isInteger=r.isInt=function(){return!!this.c&&w(this.e/d)>this.c.length-2},r.isNaN=function(){return!this.s},r.isNegative=r.isNeg=function(){return this.s<0},r.isZero=function(){return!!this.c&&this.c[0]==0},r.lessThan=r.lt=function(e,t){return n=8,S(this,new U(e,t))<0},r.lessThanOrEqualTo=r.lte=function(e,t){return n=9,(t=S(this,new U(e,t)))===-1||t===0},r.minus=r.sub=function(e,t){var r,i,s,o,u=this,a=u.s;n=10,e=new U(e,t),t=e.s;if(!a||!t)return new U(NaN);if(a!=t)return e.s=-t,u.plus(e);var f=u.e/d,l=e.e/d,c=u.c,h=e.c;if(!f||!l){if(!c||!h)return c?(e.s=-t,e):new U(h?u:NaN);if(!c[0]||!h[0])return h[0]?(e.s=-t,e):new U(c[0]?u:M==3?0:0)}f=w(f),l=w(l),c=c.slice();if(a=f-l){(o=a<0)?(a=-a,s=c):(l=f,s=h),s.reverse();for(t=a;t--;s.push(0));s.reverse()}else{i=(o=(a=c.length)<(t=h.length))?a:t;for(a=t=0;t0)for(;t--;c[r++]=0);t=p-1;for(;i>a;){if(c[--i]0?(u=o,r=f):(s=-s,r=a),r.reverse();for(;s--;r.push(0));r.reverse()}s=a.length,t=f.length,s-t<0&&(r=f,f=a,a=r,t=s);for(s=0;t;)s=(a[--t]=a[t]+f[t]+s)/p|0,a[t]%=p;return s&&(a.unshift(s),++u),$(e,a,u)},r.precision=r.sd=function(e){var t,n,r=this,i=r.c;e!=null&&e!==!!e&&e!==1&&e!==0&&(B&&J(13,"argument"+f,e),e!=!!e&&(e=null));if(!i)return null;n=i.length-1,t=n*d+1;if(n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},r.round=function(e,t){var n=new U(this);return(e==null||j(e,0,y,15))&&K(n,~~e+this.e+1,t==null||!j(t,0,8,15,l)?M:t|0),n},r.shift=function(e){var t=this;return j(e,-v,v,16,"argument")?t.times("1e"+L(e)):new U(t.c&&t.c[0]&&(e<-v||e>v)?t.s*(e<0?0:1/0):t)},r.squareRoot=r.sqrt=function(){var e,n,r,i,s,o=this,u=o.c,a=o.s,f=o.e,l=O+4,c=new U("0.5");if(a!==1||!u||!u[0])return new U(!a||a<0&&(!u||u[0])?NaN:u?o:1/0);a=Math.sqrt(+o),a==0||a==1/0?(n=E(u),(n.length+f)%2==0&&(n+="0"),a=Math.sqrt(n),f=w((f+1)/2)-(f<0||f%2),a==1/0?n="1e"+f:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+f),r=new U(n)):r=new U(a+"");if(r.c[0]){f=r.e,a=f+l,a<3&&(a=0);for(;;){s=r,r=c.times(s.plus(t(o,s,l,1)));if(E(s.c).slice(0,a)===(n=E(r.c)).slice(0,a)){r.e=0;){r=0,v=T[s]%E,m=T[s]/E|0;for(u=f,o=s+u;o>s;)l=x[--u]%E,c=x[u]/E|0,a=m*l+c*v,l=v*l+a%E*E+y[o]+r,r=(l/b|0)+(a/E|0)+m*c,y[o--]=l%b;y[o]=r}return r?++i:y.shift(),$(e,y,i)},r.toDigits=function(e,t){var n=new U(this);return e=e==null||!j(e,1,y,18,"precision")?null:e|0,t=t==null||!j(t,0,8,18,l)?M:t|0,e?K(n,e,t):n},r.toExponential=function(e,t){return W(this,e!=null&&j(e,0,y,19)?~~e+1:null,t,19)},r.toFixed=function(e,t){return W(this,e!=null&&j(e,0,y,20)?~~e+this.e+1:null,t,20)},r.toFormat=function(e,t){var n=W(this,e!=null&&j(e,0,y,21)?~~e+this.e+1:null,t,21);if(this.c){var r,i=n.split("."),s=+R.groupSize,o=+R.secondaryGroupSize,u=R.groupSeparator,a=i[0],f=i[1],l=this.s<0,c=l?a.slice(1):a,h=c.length;o&&(r=s,s=o,o=r,h-=r);if(s>0&&h>0){r=h%s||s,a=c.substr(0,r);for(;r0&&(a+=u+c.slice(r)),l&&(a="-"+a)}n=f?a+R.decimalSeparator+((o=+R.fractionGroupSize)?f.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+R.fractionGroupSeparator):f):a}return n},r.toFraction=function(e){var n,r,i,s,o,u,a,f,l,c=B,h=this,p=h.c,v=new U(A),g=r=new U(A),y=a=new U(A);if(e!=null){B=!1,u=new U(e),B=c;if(!(c=u.isInt())||u.lt(A))B&&J(22,"max denominator "+(c?"out of range":"not an integer"),e),e=!c&&u.c&&K(u,u.e+1,1).gte(A)?u:null}if(!p)return h.toString();l=E(p),s=v.e=l.length-h.e-1,v.c[0]=m[(o=s%d)<0?d+o:o],e=!e||u.cmp(v)>0?s>0?v:g:u,o=H,H=1/0,u=new U(l),a.c[0]=0;for(;;){f=t(u,v,0,1),i=r.plus(f.times(y));if(i.cmp(e)==1)break;r=y,y=i,g=a.plus(f.times(i=g)),a=i,v=u.minus(f.times(i=v)),u=i}return i=t(e.minus(r),y,0,1),a=a.plus(i.times(g)),r=r.plus(i.times(y)),a.s=g.s=h.s,s*=2,n=t(g,y,s,M).minus(h).abs().cmp(t(a,r,s,M).minus(h).abs())<1?[g.toString(),y.toString()]:[a.toString(),r.toString()],H=o,n},r.toNumber=function(){var e=this;return+e||(e.s?e.s*0:NaN)},r.toPower=r.pow=function(e){var t,n,r=a(e<0?-e:+e),i=this;if(!j(e,-v,v,23,"exponent")&&(!isFinite(e)||r>v&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new U(Math.pow(+i,e));t=q?u(q/d+2):0,n=new U(A);for(;;){if(r%2){n=n.times(i);if(!n.c)break;t&&n.c.length>t&&(n.c.length=t)}r=a(r/2);if(!r)break;i=i.times(i),t&&i.c&&i.c.length>t&&(i.c.length=t)}return e<0&&(n=A.div(n)),t?K(n,q,M):n},r.toPrecision=function(e,t){return W(this,e!=null&&j(e,1,y,24,"precision")?e|0:null,t,24)},r.toString=function(e){var t,n=this,r=n.s,i=n.e;return i===null?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=E(n.c),e==null||!j(e,2,64,25,"base")?t=i<=_||i>=D?C(t,i):k(t,i):t=z(k(t,i),e|0,10,r),r<0&&n.c[0]&&(t="-"+t)),t},r.truncated=r.trunc=function(){return K(new U(this),this.e+1,1)},r.valueOf=r.toJSON=function(){return this.toString()},e!=null&&U.config(e),U}function w(e){var t=e|0;return e>0||e===t?t:t-1}function E(e){var t,n,r=1,i=e.length,s=e[0]+"";for(;rf^n?1:-1;u=(a=i.length)<(f=s.length)?a:f;for(o=0;os[o]^n?1:-1;return a==f?0:a>f^n?1:-1}function x(e,t,n){return(e=L(e))>=t&&e<=n}function T(e){return Object.prototype.toString.call(e)=="[object Array]"}function N(e,t,n){var r,i=[0],s,o=0,u=e.length;for(;on-1&&(i[r+1]==null&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function C(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function k(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else{n=e.length;if(++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t>>8^i&255^99,s[n]=i,o[i]=n;var v=e[n],m=e[v],g=e[m],y=e[i]*257^i*16843008;u[n]=y<<24|y>>>8,a[n]=y<<16|y>>>16,f[n]=y<<8|y>>>24,l[n]=y;var y=g*16843009^m*65537^v*257^n*16843008;c[i]=y<<24|y>>>8,h[i]=y<<16|y>>>16,p[i]=y<<8|y>>>24,d[i]=y,n?(n=v^e[e[e[g^v]]],r^=e[e[r]]):n=r=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],m=i.AES=r.extend({_doReset:function(){var e=this._key,t=e.words,n=e.sigBytes/4,r=this._nRounds=n+6,i=(r+1)*4,o=this._keySchedule=[];for(var u=0;u6&&u%n==4&&(a=s[a>>>24]<<24|s[a>>>16&255]<<16|s[a>>>8&255]<<8|s[a&255]):(a=a<<8|a>>>24,a=s[a>>>24]<<24|s[a>>>16&255]<<16|s[a>>>8&255]<<8|s[a&255],a^=v[u/n|0]<<24),o[u]=o[u-n]^a}var f=this._invKeySchedule=[];for(var l=0;l>>24]]^h[s[a>>>16&255]]^p[s[a>>>8&255]]^d[s[a&255]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,u,a,f,l,s)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,c,h,p,d,o);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,o,u){var a=this._nRounds,f=e[t]^n[0],l=e[t+1]^n[1],c=e[t+2]^n[2],h=e[t+3]^n[3],p=4;for(var d=1;d>>24]^i[l>>>16&255]^s[c>>>8&255]^o[h&255]^n[p++],m=r[l>>>24]^i[c>>>16&255]^s[h>>>8&255]^o[f&255]^n[p++],g=r[c>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[l&255]^n[p++],y=r[h>>>24]^i[f>>>16&255]^s[l>>>8&255]^o[c&255]^n[p++];f=v,l=m,c=g,h=y}var v=(u[f>>>24]<<24|u[l>>>16&255]<<16|u[c>>>8&255]<<8|u[h&255])^n[p++],m=(u[l>>>24]<<24|u[c>>>16&255]<<16|u[h>>>8&255]<<8|u[f&255])^n[p++],g=(u[c>>>24]<<24|u[h>>>16&255]<<16|u[f>>>8&255]<<8|u[l&255])^n[p++],y=(u[h>>>24]<<24|u[f>>>16&255]<<16|u[l>>>8&255]<<8|u[c&255])^n[p++];e[t]=v,e[t+1]=m,e[t+2]=g,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES})},{"./cipher-core":53,"./core":54,"./enc-base64":55,"./evpkdf":57,"./md5":62}],53:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){e.lib.Cipher||function(t){var n=e,r=n.lib,i=r.Base,s=r.WordArray,o=r.BufferedBlockAlgorithm,u=n.enc,a=u.Utf8,f=u.Base64,l=n.algo,c=l.EvpKDF,h=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return typeof e=="string"?C:x}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),p=r.StreamCipher=h.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),d=n.mode={},v=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),m=d.CBC=function(){function n(e,n,r){var i=this._iv;if(i){var s=i;this._iv=t}else var s=this._prevBlock;for(var o=0;o>>2]&255;e.sigBytes-=t}},b=r.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:y}),reset:function(){h.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else{var r=n.createDecryptor;this._minBufferSize=1}this._mode=r.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),w=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),E=n.format={},S=E.OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=s.create([1398893684,1701076831]).concat(n).concat(t);else var r=t;return r.toString(f)},parse:function(e){var t=f.parse(e),n=t.words;if(n[0]==1398893684&&n[1]==1701076831){var r=s.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return w.create({ciphertext:t,salt:r})}},x=r.SerializableCipher=i.extend({cfg:i.extend({format:S}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),s=i.finalize(t),o=i.cfg;return w.create({ciphertext:s,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=e.createDecryptor(n,r).finalize(t.ciphertext);return i},_parse:function(e,t){return typeof e=="string"?t.parse(e,this):e}}),T=n.kdf={},N=T.OpenSSL={execute:function(e,t,n,r){r||(r=s.random(8));var i=c.create({keySize:t+n}).compute(e,r),o=s.create(i.words.slice(t),n*4);return i.sigBytes=t*4,w.create({key:i,iv:o,salt:r})}},C=r.PasswordBasedCipher=x.extend({cfg:x.cfg.extend({kdf:N}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var s=x.encrypt.call(this,e,t,i.key,r);return s.mixIn(i),s},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);r.iv=i.iv;var s=x.decrypt.call(this,e,t,i.key,r);return s}})}()})},{"./core":54}],54:[function(e,t,n){(function(e,r){typeof n=="object"?t.exports=n=r():typeof define=="function"&&define.amd?define([],r):e.CryptoJS=r()})(this,function(){var e=e||function(e,t){var n={},r=n.lib={},i=r.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=r.WordArray=i.extend({init:function(e,n){e=this.words=e||[],n!=t?this.sigBytes=n:this.sigBytes=e.length*4},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;this.clamp();if(r%4)for(var s=0;s>>2]>>>24-s%4*8&255;t[r+s>>>2]|=o<<24-(r+s)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){var n=[],r=function(t){var t=t,n=987654321,r=4294967295;return function(){n=36969*(n&65535)+(n>>16)&r,t=18e3*(t&65535)+(t>>16)&r;var i=(n<<16)+t&r;return i/=4294967296,i+=.5,i*(e.random()>.5?1:-1)}};for(var i=0,o;i>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((s&15).toString(16))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},a=o.Latin1={stringify:function(e){var t=e.words,n=e.sigBytes,r=[];for(var i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new s.init(n,t)}},f=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(a.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return a.parse(unescape(encodeURIComponent(e)))}},l=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){typeof e=="string"&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=o*4,a=i/u;t?a=e.ceil(a):a=e.max((a|0)-this._minBufferSize,0);var f=a*o,l=e.min(f*4,i);if(f){for(var c=0;c>>2]>>>24-s%4*8&255,u=t[s+1>>>2]>>>24-(s+1)%4*8&255,a=t[s+2>>>2]>>>24-(s+2)%4*8&255,f=o<<16|u<<8|a;for(var l=0;l<4&&s+l*.75>>6*(3-l)&63))}var c=r.charAt(64);if(c)while(i.length%4)i.push(c);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=n.charAt(64);if(i){var s=e.indexOf(i);s!=-1&&(t=s)}var o=[],u=0;for(var a=0;a>>6-a%4*2,c=f|l;o[u>>>2]|=c<<24-u%4*8,u++}return r.create(o,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64})},{"./core":54}],56:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(){function o(e){return e<<8&4278255360|e>>>8&16711935}var t=e,n=t.lib,r=n.WordArray,i=t.enc,s=i.Utf16=i.Utf16BE={stringify:function(e){var t=e.words,n=e.sigBytes,r=[];for(var i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,t*2)}};i.Utf16LE={stringify:function(e){var t=e.words,n=e.sigBytes,r=[];for(var i=0;i>>2]>>>16-i%4*8&65535);r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var i=0;i>>1]|=o(e.charCodeAt(i)<<16-i%2*16);return r.create(n,t*2)}}}(),e.enc.Utf16})},{"./core":54}],57:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./sha1"),e("./hmac")):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],i):i(r.CryptoJS)})(this,function(e){return function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,s=t.algo,o=s.MD5,u=s.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var n=this.cfg,r=n.hasher.create(),s=i.create(),o=s.words,u=n.keySize,a=n.iterations;while(o.lengthr&&(t=e.finalize(t)),t.clamp();var i=this._oKey=t.clone(),o=this._iKey=t.clone(),u=i.words,a=o.words;for(var f=0;f>>2]|=e[r]<<24-r%4*8;i.call(this,n,t)}else i.apply(this,arguments)};s.prototype=r}(),e.lib.WordArray})},{"./core":54}],62:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(t){function f(e,t,n,r,i,s,o){var u=e+(t&n|~t&r)+i+o;return(u<>>32-s)+t}function l(e,t,n,r,i,s,o){var u=e+(t&r|n&~r)+i+o;return(u<>>32-s)+t}function c(e,t,n,r,i,s,o){var u=e+(t^n^r)+i+o;return(u<>>32-s)+t}function h(e,t,n,r,i,s,o){var u=e+(n^(t|~r))+i+o;return(u<>>32-s)+t}var n=e,r=n.lib,i=r.WordArray,s=r.Hasher,o=n.algo,u=[];(function(){for(var e=0;e<64;e++)u[e]=t.abs(t.sin(e+1))*4294967296|0})();var a=o.MD5=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,o=e[t+0],a=e[t+1],p=e[t+2],d=e[t+3],v=e[t+4],m=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],E=e[t+10],S=e[t+11],x=e[t+12],N=e[t+13],C=e[t+14],k=e[t+15],L=s[0],A=s[1],O=s[2],M=s[3];L=f(L,A,O,M,o,7,u[0]),M=f(M,L,A,O,a,12,u[1]),O=f(O,M,L,A,p,17,u[2]),A=f(A,O,M,L,d,22,u[3]),L=f(L,A,O,M,v,7,u[4]),M=f(M,L,A,O,m,12,u[5]),O=f(O,M,L,A,g,17,u[6]),A=f(A,O,M,L,y,22,u[7]),L=f(L,A,O,M,b,7,u[8]),M=f(M,L,A,O,w,12,u[9]),O=f(O,M,L,A,E,17,u[10]),A=f(A,O,M,L,S,22,u[11]),L=f(L,A,O,M,x,7,u[12]),M=f(M,L,A,O,N,12,u[13]),O=f(O,M,L,A,C,17,u[14]),A=f(A,O,M,L,k,22,u[15]),L=l(L,A,O,M,a,5,u[16]),M=l(M,L,A,O,g,9,u[17]),O=l(O,M,L,A,S,14,u[18]),A=l(A,O,M,L,o,20,u[19]),L=l(L,A,O,M,m,5,u[20]),M=l(M,L,A,O,E,9,u[21]),O=l(O,M,L,A,k,14,u[22]),A=l(A,O,M,L,v,20,u[23]),L=l(L,A,O,M,w,5,u[24]),M=l(M,L,A,O,C,9,u[25]),O=l(O,M,L,A,d,14,u[26]),A=l(A,O,M,L,b,20,u[27]),L=l(L,A,O,M,N,5,u[28]),M=l(M,L,A,O,p,9,u[29]),O=l(O,M,L,A,y,14,u[30]),A=l(A,O,M,L,x,20,u[31]),L=c(L,A,O,M,m,4,u[32]),M=c(M,L,A,O,b,11,u[33]),O=c(O,M,L,A,S,16,u[34]),A=c(A,O,M,L,C,23,u[35]),L=c(L,A,O,M,a,4,u[36]),M=c(M,L,A,O,v,11,u[37]),O=c(O,M,L,A,y,16,u[38]),A=c(A,O,M,L,E,23,u[39]),L=c(L,A,O,M,N,4,u[40]),M=c(M,L,A,O,o,11,u[41]),O=c(O,M,L,A,d,16,u[42]),A=c(A,O,M,L,g,23,u[43]),L=c(L,A,O,M,w,4,u[44]),M=c(M,L,A,O,x,11,u[45]),O=c(O,M,L,A,k,16,u[46]),A=c(A,O,M,L,p,23,u[47]),L=h(L,A,O,M,o,6,u[48]),M=h(M,L,A,O,y,10,u[49]),O=h(O,M,L,A,C,15,u[50]),A=h(A,O,M,L,m,21,u[51]),L=h(L,A,O,M,x,6,u[52]),M=h(M,L,A,O,d,10 ,u[53]),O=h(O,M,L,A,E,15,u[54]),A=h(A,O,M,L,a,21,u[55]),L=h(L,A,O,M,b,6,u[56]),M=h(M,L,A,O,k,10,u[57]),O=h(O,M,L,A,g,15,u[58]),A=h(A,O,M,L,N,21,u[59]),L=h(L,A,O,M,v,6,u[60]),M=h(M,L,A,O,S,10,u[61]),O=h(O,M,L,A,p,15,u[62]),A=h(A,O,M,L,w,21,u[63]),s[0]=s[0]+L|0,s[1]=s[1]+A|0,s[2]=s[2]+O|0,s[3]=s[3]+M|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var s=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();var u=this._hash,a=u.words;for(var f=0;f<4;f++){var l=a[f];a[f]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}return u},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});n.MD5=s._createHelper(a),n.HmacMD5=s._createHmacHelper(a)}(Math),e.MD5})},{"./core":54}],63:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return e.mode.CFB=function(){function n(e,t,n,r){var i=this._iv;if(i){var s=i.slice(0);this._iv=undefined}else var s=this._prevBlock;r.encryptBlock(s,0);for(var o=0;o>24&255)===255){var t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}function r(e){return(e[0]=n(e[0]))===0&&(e[1]=n(e[1])),e}var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,s=this._iv,o=this._counter;s&&(o=this._counter=s.slice(0),this._iv=undefined),r(o);var u=o.slice(0);n.encryptBlock(u,0);for(var a=0;a>>2]|=i<<24-s%4*8,e.sigBytes+=i},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Ansix923})},{"./cipher-core":53,"./core":54}],69:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return e.pad.Iso10126={pad:function(t,n){var r=n*4,i=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},e.pad.Iso10126})},{"./cipher-core":53,"./core":54}],70:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return e.pad.Iso97971={pad:function(t,n){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,n)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971})},{"./cipher-core":53,"./core":54}],71:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding})},{"./cipher-core":53,"./core":54}],72:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return e.pad.ZeroPadding={pad:function(e,t){var n=t*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;while(!(t[n>>>2]>>>24-n%4*8&255))n--;e.sigBytes=n+1}},e.pad.ZeroPadding})},{"./cipher-core":53,"./core":54}],73:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./sha1"),e("./hmac")):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],i):i(r.CryptoJS)})(this,function(e){return function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,s=t.algo,o=s.SHA1,u=s.HMAC,a=s.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var n=this.cfg,r=u.create(n.hasher,e),s=i.create(),o=i.create([1]),a=s.words,f=o.words,l=n.keySize,c=n.iterations;while(a.length>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16,a=((i*i>>>17)+i*s>>>15)+s*s,f=((r&4294901760)*r|0)+((r&65535)*r|0);u[n]=a^f}e[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,e[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,e[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,e[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,e[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,e[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,e[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,e[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}var t=e,n=t.lib,r=n.StreamCipher,i=t.algo,s=[],o=[],u=[],a=i.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var i=0;i<4;i++)f.call(this);for(var i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var s=t.words,o=s[0],u=s[1],a=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,c=a>>>16|l&4294901760,h=l<<16|a&65535;r[0]^=a,r[1]^=c,r[2]^=l,r[3]^=h,r[4]^=a,r[5]^=c,r[6]^=l,r[7]^=h;for(var i=0;i<4;i++)f.call(this)}},_doProcessBlock:function(e,t){var n=this._X;f.call(this),s[0]=n[0]^n[5]>>>16^n[3]<<16,s[1]=n[2]^n[7]>>>16^n[5]<<16,s[2]=n[4]^n[1]>>>16^n[7]<<16,s[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)s[r]=(s[r]<<8|s[r]>>>24)&16711935|(s[r]<<24|s[r]>>>8)&4278255360,e[t+r]^=s[r]},blockSize:4,ivSize:2});t.RabbitLegacy=r._createHelper(a)}(),e.RabbitLegacy})},{"./cipher-core":53,"./core":54,"./enc-base64":55,"./evpkdf":57,"./md5":62}],75:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return function(){function f(){var e=this._X,t=this._C;for(var n=0;n<8;n++)o[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=e[n]+t[n],i=r&65535,s=r>>>16,a=((i*i>>>17)+i*s>>>15)+s*s,f=((r&4294901760)*r|0)+((r&65535)*r|0);u[n]=a^f}e[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,e[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,e[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,e[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,e[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,e[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,e[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,e[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}var t=e,n=t.lib,r=n.StreamCipher,i=t.algo,s=[],o=[],u=[],a=i.Rabbit=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv;for(var n=0;n<4;n++)e[n]=(e[n]<<8|e[n]>>>24)&16711935|(e[n]<<24|e[n]>>>8)&4278255360;var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,e[0]&4294901760|e[1]&65535,e[3]<<16|e[3]>>>16,e[1]&4294901760|e[2]&65535,e[0]<<16|e[0]>>>16,e[2]&4294901760|e[3]&65535,e[1]<<16|e[1]>>>16,e[3]&4294901760|e[0]&65535];this._b=0;for(var n=0;n<4;n++)f.call(this);for(var n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var s=t.words,o=s[0],u=s[1],a=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,c=a>>>16|l&4294901760,h=l<<16|a&65535;i[0]^=a,i[1]^=c,i[2]^=l,i[3]^=h,i[4]^=a,i[5]^=c,i[6]^=l,i[7]^=h;for(var n=0;n<4;n++)f.call(this)}},_doProcessBlock:function(e,t){var n=this._X;f.call(this),s[0]=n[0]^n[5]>>>16^n[3]<<16,s[1]=n[2]^n[7]>>>16^n[5]<<16,s[2]=n[4]^n[1]>>>16^n[7]<<16,s[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)s[r]=(s[r]<<8|s[r]>>>24)&16711935|(s[r]<<24|s[r]>>>8)&4278255360,e[t+r]^=s[r]},blockSize:4,ivSize:2});t.Rabbit=r._createHelper(a)}(),e.Rabbit})},{"./cipher-core":53,"./core":54,"./enc-base64":55,"./evpkdf":57,"./md5":62}],76:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return function(){function o(){var e=this._S,t=this._i,n=this._j,r=0;for(var i=0;i<4;i++){t=(t+1)%256,n=(n+e[t])%256;var s=e[t];e[t]=e[n],e[n]=s,r|=e[(e[t]+e[n])%256]<<24-i*8}return this._i=t,this._j=n,r}var t=e,n=t.lib,r=n.StreamCipher,i=t.algo,s=i.RC4=r.extend({_doReset:function(){var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[];for(var i=0;i<256;i++)r[i]=i;for(var i=0,s=0;i<256;i++){var o=i%n,u=t[o>>>2]>>>24-o%4*8&255;s=(s+r[i]+u)%256;var a=r[i];r[i]=r[s],r[s]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});t.RC4=r._createHelper(s);var u=i.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=r._createHelper(u)}(),e.RC4})},{"./cipher-core":53,"./core":54,"./enc-base64":55,"./evpkdf":57,"./md5":62}],77:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(t){function d(e,t,n){return e^t^n}function v(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<>>32-t}var n=e,r=n.lib,i=r.WordArray,s=r.Hasher,o=n.algo,u=i.create([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]),a=i.create([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]),f=i.create([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]),l=i.create([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]),c=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=s.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,o=c.words,p=h.words,w=u.words,E=a.words,S=f.words,x=l.words,T,N,C,k,L,A,O,M,_,D;A=T=s[0],O=N=s[1],M=C=s[2],_=k=s[3],D=L=s[4];var P;for(var n=0;n<80;n+=1)P=T+e[t+w[n]]|0,n<16?P+=d(N,C,k)+o[0]:n<32?P+=v(N,C,k)+o[1]:n<48?P+=m(N,C,k)+o[2]:n<64?P+=g(N,C,k)+o[3]:P+=y(N,C,k)+o[4],P|=0,P=b(P,S[n]),P=P+L|0,T=L,L=k,k=b(C,10),C=N,N=P,P=A+e[t+E[n]]|0,n<16?P+=y(O,M,_)+p[0]:n<32?P+=g(O,M,_)+p[1]:n<48?P+=m(O,M,_)+p[2]:n<64?P+=v(O,M,_)+p[3]:P+=d(O,M,_)+p[4],P|=0,P=b(P,x[n]),P=P+D|0,A=D,D=_,_=b(M,10),M=O,O=P;P=s[1]+C+_|0,s[1]=s[2]+k+D|0,s[2]=s[3]+L+A|0,s[3]=s[4]+T+O|0,s[4]=s[0]+N+M|0,s[0]=P},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,e.sigBytes=(t.length+1)*4,this._process();var i=this._hash,s=i.words;for(var o=0;o<5;o++){var u=s[o];s[o]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return i},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});n.RIPEMD160=s._createHelper(p),n.HmacRIPEMD160=s._createHmacHelper(p)}(Math),e.RIPEMD160})},{"./core":54}],78:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(){var t=e,n=t.lib,r=n.WordArray,i=n.Hasher,s=t.algo,o=[],u=s.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){var n=this._hash.words,r=n[0],i=n[1],s=n[2],u=n[3],a=n[4];for(var f=0;f<80;f++){if(f<16)o[f]=e[t+f]|0;else{var l=o[f-3]^o[f-8]^o[f-14]^o[f-16];o[f]=l<<1|l>>>31}var c=(r<<5|r>>>27)+a+o[f];f<20?c+=(i&s|~i&u)+1518500249:f<40?c+=(i^s^u)+1859775393:f<60?c+=(i&s|i&u|s&u)-1894007588:c+=(i^s^u)-899497514,a=u,u=s,s=i<<30|i>>>2,i=r,r=c}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+u|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,e.sigBytes=t.length*4,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(u),t.HmacSHA1=i._createHmacHelper(u)}(),e.SHA1})},{"./core":54}],79:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./sha256")):typeof define=="function"&&define.amd?define(["./core","./sha256"],i):i(r.CryptoJS)})(this,function(e){return function(){var t=e,n=t.lib,r=n.WordArray,i=t.algo,s=i.SHA256,o=i.SHA224=s.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=s._createHelper(o),t.HmacSHA224=s._createHmacHelper(o)}(),e.SHA224})},{"./core":54,"./sha256":80}],80:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,s=r.Hasher,o=n.algo,u=[],a=[];(function(){function e(e){var n=t.sqrt(e);for(var r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}var r=2,i=0;while(i<64)e(r)&&(i<8&&(u[i]=n(t.pow(r,.5))),a[i]=n(t.pow(r,1/3)),i++),r++})();var f=[],l=o.SHA256=s.extend({_doReset:function(){this._hash=new i.init(u.slice(0))},_doProcessBlock:function(e,t){var n=this._hash.words,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],l=n[5],c=n[6],h=n[7];for(var p=0;p<64;p++){if(p<16)f[p]=e[t+p]|0;else{var d=f[p-15],v=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=f[p-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;f[p]=v+f[p-7]+g+f[p-16]}var y=u&l^~u&c,b=r&i^r&s^i&s,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),E=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),S=h+E+y+a[p]+f[p],x=w+b;h=c,c=l,l=u,u=o+S|0,o=s,s=i,i=r,r=S+x|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+u|0,n[5]=n[5]+l|0,n[6]=n[6]+c|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=s._createHelper(l),n.HmacSHA256=s._createHmacHelper(l)}(Math),e.SHA256})},{"./core":54}],81:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./x64-core")):typeof define=="function"&&define.amd?define(["./core","./x64-core"],i):i(r.CryptoJS)})(this,function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,s=r.Hasher,o=n.x64,u=o.Word,a=n.algo,f=[],l=[],c=[];(function(){var e=1,t=0;for(var n=0;n<24;n++){f[e+5*t]=(n+1)*(n+2)/2%64;var r=t%5,i=(2*e+3*t)%5;e=r,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;var s=1;for(var o=0;o<24;o++){var a=0,h=0;for(var p=0;p<7;p++){if(s&1){var d=(1<>>24)&16711935|(s<<24|s>>>8)&4278255360,o=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360;var u=n[i];u.high^=o,u.low^=s}for(var a=0;a<24;a++){for(var p=0;p<5;p++){var d=0,v=0;for(var m=0;m<5;m++){var u=n[p+5*m];d^=u.high,v^=u.low}var g=h[p];g.high=d,g.low=v}for(var p=0;p<5;p++){var y=h[(p+4)%5],b=h[(p+1)%5],w=b.high,E=b.low,d=y.high^(w<<1|E>>>31),v=y.low^(E<<1|w>>>31);for(var m=0;m<5;m++){var u=n[p+5*m];u.high^=d,u.low^=v}}for(var S=1;S<25;S++){var u=n[S],x=u.high,N=u.low,C=f[S];if(C<32)var d=x<>>32-C,v=N<>>32-C;else var d=N<>>64-C,v=x<>>64-C;var k=h[l[S]];k.high=d,k.low=v}var L=h[0],A=n[0];L.high=A.high,L.low=A.low;for(var p=0;p<5;p++)for(var m=0;m<5;m++){var S=p+5*m,u=n[S],O=h[S],M=h[(p+1)%5+5*m],_=h[(p+2)%5+5*m];u.high=O.high^~M.high&_.high,u.low=O.low^~M.low&_.low}var u=n[0],D=c[a];u.high^=D.high,u.low^=D.low}},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,s=e.sigBytes*8,o=this.blockSize*32;n[s>>>5]|=1<<24-s%32,n[(t.ceil((s+1)/o)*o>>>5)-1]|=128,e.sigBytes=n.length*4,this._process();var u=this._state,a=this.cfg.outputLength/8,f=a/8,l=[];for(var c=0;c>>24)&16711935|(p<<24|p>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,l.push(d),l.push(p)}return new i.init(l,a)},clone:function(){var e=s.clone.call(this),t=e._state=this._state.slice(0);for(var n=0;n<25;n++)t[n]=t[n].clone();return e}});n.SHA3=s._createHelper(p),n.HmacSHA3=s._createHmacHelper(p)}(Math),e.SHA3})},{"./core":54,"./x64-core":85}],82:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./x64-core"),e("./sha512")):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],i):i(r.CryptoJS)})(this,function(e){return function(){var t=e,n=t.x64,r=n.Word,i=n.WordArray,s=t.algo,o=s.SHA512,u=s.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=o._createHelper(u),t.HmacSHA384=o._createHmacHelper(u)}(),e.SHA384})},{"./core":54,"./sha512":83,"./x64-core":85}],83:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./x64-core")):typeof define=="function"&&define.amd?define(["./core","./x64-core"],i):i(r.CryptoJS)})(this,function(e){return function(){function a(){return s.create.apply(s,arguments)}var t=e,n=t.lib,r=n.Hasher,i=t.x64,s=i.Word,o=i.WordArray,u=t.algo,f=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],l=[];(function(){for(var e=0;e<80;e++)l[e]=a()})();var c=u.SHA512=r.extend({_doReset:function(){this._hash=new o.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(e,t){var n=this._hash.words,r=n[0],i=n[1],s=n[2],o=n[3],u=n[4],a=n[5],c=n[6],h=n[7],p=r.high,d=r.low,v=i.high,m=i.low,g=s.high,y=s.low,b=o.high,w=o.low,E=u.high,S=u.low,x=a.high,T=a.low,N=c.high,C=c.low,k=h.high,L=h.low,A=p,O=d,M=v,_=m,D=g,P=y,H=b,B=w,j=E,F=S,I=x,q=T,R=N,U=C,z=k,X=L;for(var V=0;V<80;V++){var $=l[V];if(V<16)var J=$.high=e[t+V*2]|0,Q=$.low=e[t+V*2+1]|0;else{var G=l[V-15],Y=G.high,Z=G.low,et=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,tt=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),nt=l[V-2],rt=nt.high,it=nt.low,st=(rt>>>19|it<<13)^(rt<<3|it>>>29)^rt>>>6,ot=(it>>>19|rt<<13)^(it<<3|rt>>>29)^(it>>>6|rt<<26),ut=l[V-7],at=ut.high,ft=ut.low,lt=l[V-16],ct=lt.high,ht=lt.low,Q=tt+ft,J=et+at+(Q>>>0>>0?1:0),Q=Q+ot,J=J+st+(Q>>>0>>0?1:0),Q=Q+ht,J=J+ct+(Q>>>0>>0?1:0);$.high=J,$.low=Q}var pt=j&I^~j&R,dt=F&q^~F&U,vt=A&M^A&D^M&D,mt=O&_^O&P^_&P,gt=(A>>>28|O<<4)^(A<<30|O>>>2)^(A<<25|O>>>7),yt=(O>>>28|A<<4)^(O<<30|A>>>2)^(O<<25|A>>>7),bt=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),wt=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),Et=f[V],St=Et.high,xt=Et.low,Tt=X+wt,Nt=z+bt+(Tt>>>0>>0?1:0),Tt=Tt+dt,Nt=Nt+pt+(Tt>>>0
>>0?1:0),Tt=Tt+xt,Nt=Nt+St+(Tt>>>0>>0?1:0),Tt=Tt+Q,Nt=Nt+J+(Tt>>>0>>0?1:0),Ct=yt+mt,kt=gt+vt+(Ct>>>0>>0?1:0);z=R,X=U,R=I,U=q,I=j,q=F,F=B+Tt|0,j=H+Nt+(F>>>0>>0?1:0)|0,H=D,B=P,D=M,P=_,M=A,_=O,O=Tt+Ct|0,A=Nt+kt+(O>>>0>>0?1:0)|0}d=r.low=d+O,r.high=p+A+(d>>>0>>0?1:0),m=i.low=m+_,i.high=v+M+(m>>>0<_>>>0?1:0),y=s.low=y+P,s.high=g+D+(y>>>0

>>0?1:0),w=o.low=w+B,o.high=b+H+(w>>>0>>0?1:0),S=u.low=S+F,u.high=E+j+(S>>>0>>0?1:0),T=a.low=T+q,a.high=x+I+(T>>>0>>0?1:0),C=c.low=C+U,c.high=N+R+(C>>>0>>0?1:0),L=h.low=L+X,h.high=k+z+(L>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;t[r>>>5]|=128<<24-r%32,t[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),t[(r+128>>>10<<5)+31]=n,e.sigBytes=t.length*4,this._process();var i=this._hash.toX32();return i},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(c),t.HmacSHA512=r._createHmacHelper(c)}(),e.SHA512})},{"./core":54,"./x64-core":85}],84:[function(e,t,n){(function(r,i,s){typeof n=="object"?t.exports=n=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(r.CryptoJS)})(this,function(e){return function(){function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<>>5]>>>31-i%32&1}var s=this._subKeys=[];for(var f=0;f<16;f++){var l=s[f]=[],c=a[f];for(var r=0;r<24;r++)l[r/6|0]|=n[(u[r]-1+c)%28]<<31-r%6,l[4+(r/6|0)]|=n[28+(u[r+24]-1+c)%28]<<31-r%6;l[0]=l[0]<<1|l[0]>>>31;for(var r=1;r<7;r++)l[r]=l[r]>>>(r-1)*4+3;l[7]=l[7]<<5|l[7]>>>27}var h=this._invSubKeys=[];for(var r=0;r<16;r++)h[r]=s[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){var i=n[r],s=this._lBlock,o=this._rBlock,u=0;for(var a=0;a<8;a++)u|=f[a][((o^i[a])&l[a])>>>0];this._lBlock=o,this._rBlock=s^u}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});t.DES=i._createHelper(c);var d=s.TripleDES=i.extend({_doReset:function(){var e=this._key,t=e.words;this._des1=c.createEncryptor(r.create(t.slice(0,2))),this._des2=c.createEncryptor(r.create(t.slice(2,4))),this._des3=c.createEncryptor(r.create(t.slice(4,6)))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(d)}(),e.TripleDES})},{"./cipher-core":53,"./core":54,"./enc-base64":55,"./evpkdf":57,"./md5":62}],85:[function(e,t,n){(function(r,i){typeof n=="object"?t.exports=n=i(e("./core")):typeof define=="function"&&define.amd?define(["./core"],i):i(r.CryptoJS)})(this,function(e){return function(t){var n=e,r=n.lib,i=r.Base,s=r.WordArray,o=n.x64={},u=o.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a=o.WordArray=i.extend({init:function(e,n){e=this.words=e||[],n!=t?this.sigBytes=n:this.sigBytes=e.length*8},toX32:function(){var e=this.words,t=e.length,n=[];for(var r=0;r1?arguments[1]:"utf8"):h(this,e)):arguments.length>1?new f(e,arguments[1]):new f(e)}function l(e,t){e=b(e,t<0?0:w(t)|0);if(!f.TYPED_ARRAY_SUPPORT)for(var n=0;n>>1;return n&&(e.parent=o),e}function w(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return e|0}function E(e,t){if(this instanceof E){var n=new f(e,t);return delete n.parent,n}return new E(e,t)}function S(e,t){typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;var r=!1;for(;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function x(e,t,n){var r=!1;t|=0,n=n===undefined||n===Infinity?this.length:n|0,e||(e="utf8"),t<0&&(t=0),n>this.length&&(n=this.length);if(n<=t)return"";for(;;)switch(e){case"hex":return B(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return P(this,t,n);case"binary":return H(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function T(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=t.length;if(s%2!==0)throw new Error("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o239?4:s>223?3:s>191?2:1;if(i+u<=n){var a,f,l,c;switch(u){case 1:s<128&&(o=s);break;case 2:a=e[i+1],(a&192)===128&&(c=(s&31)<<6|a&63,c>127&&(o=c));break;case 3:a=e[i+1],f=e[i+2],(a&192)===128&&(f&192)===128&&(c=(s&15)<<12|(a&63)<<6|f&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:a=e[i+1],f=e[i+2],l=e[i+3],(a&192)===128&&(f&192)===128&&(l&192)===128&&(c=(s&15)<<18|(a&63)<<12|(f&63)<<6|l&63,c>65535&&c<1114112&&(o=c))}}o===null?(o=65533,u=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=u}return D(r)}function D(e){var t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);var n="",r=0;while(rr)n=r;var i="";for(var s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,s){if(!f.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||te.length)throw new RangeError("index out of range")}function q(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-n,2);i>>(r?i:1-i)*8}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-n,4);i>>(r?i:3-i)*8&255}function U(e,t,n,r,i,s){if(t>i||te.length)throw new RangeError("index out of range");if(n<0)throw new RangeError("index out of range")}function z(e,t,n,r,s){return s||U(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),i.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,s){return s||U(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),i.write(e,t,n,r,52,8),n+8}function V(e){e=$(e).replace(X,"");if(e.length<2)return"";while(e.length%4!==0)e+="=";return e}function $(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function J(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||Infinity;var n,r=e.length,i=null,s=[];for(var o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);i=null;if(n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,n&63|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}}return s}function Q(e){var t=[];for(var n=0;n>8,i=n%256,s.push(i),s.push(r)}return s}function Y(e){return r.toByteArray(V(e))}function Z(e,t,n,r){for(var i=0;i=t.length||i>=e.length)break;t[i+n]=e[i]}return i}var r=e("base64-js"),i=e("ieee754"),s=e("isarray");n.Buffer=f,n.SlowBuffer=E,n.INSPECT_MAX_BYTES=50,f.poolSize=8192;var o={};f.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:u(),f.TYPED_ARRAY_SUPPORT?(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array):(f.prototype.length=undefined,f.prototype.parent=undefined),f.isBuffer=function(t){return t!=null&&!!t._isBuffer},f.compare=function(t,n){if(!f.isBuffer(t)||!f.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;var r=t.length,i=n.length,s=0,o=Math.min(r,i);while(s0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:f.compare(this,t)},f.prototype.indexOf=function(t,n){function r(e,t,n){var r=-1;for(var i=0;n+i2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n>>=0;if(this.length===0)return-1;if(n>=this.length)return-1;n<0&&(n=Math.max(this.length+n,0));if(typeof t=="string")return t.length===0?-1:String.prototype.indexOf.call(this,t,n);if(f.isBuffer(t))return r(this,t,n);if(typeof t=="number")return f.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},f.prototype.write=function(t,n,r,i){if(n===undefined)i="utf8",r=this.length,n=0;else if(r===undefined&&typeof n=="string")i=n,r=this.length,n=0;else if(isFinite(n))n|=0,isFinite(r)?(r|=0,i===undefined&&(i="utf8")):(i=r,r=undefined);else{var s=i;i=n,n=r|0,r=s}var o=this.length-n;if(r===undefined||r>o)r=o;if(t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("attempt to write outside buffer bounds");i||(i="utf8");var u=!1;for(;;)switch(i){case"hex":return T(this,t,n,r);case"utf8":case"utf-8":return N(this,t,n,r);case"ascii":return C(this,t,n,r);case"binary":return k(this,t,n,r);case"base64":return L(this,t,n,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n,r);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;f.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===undefined?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(s*=256))i+=this[t+ --n]*s;return i},f.prototype.readUInt8=function(t,n){return n||F(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,n){return n||F(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,n){return n||F(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,n){return n||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},f.prototype.readUInt32BE=function(t,n){return n||F(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,n,r){t|=0,n|=0,r||F(t,n,this.length);var i=this[t],s=1,o=0;while(++o=s&&(i-=Math.pow(2,8*n)),i},f.prototype.readIntBE=function(t,n,r){t|=0,n|=0,r||F(t,n,this.length);var i=n,s=1,o=this[t+ --i];while(i>0&&(s*=256))o+=this[t+ --i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*n)),o},f.prototype.readInt8=function(t,n){return n||F(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},f.prototype.readInt16LE=function(t,n){n||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return r&32768?r|4294901760:r},f.prototype.readInt16BE=function(t,n){n||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return r&32768?r|4294901760:r},f.prototype.readInt32LE=function(t,n){return n||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,n){return n||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,n){return n||F(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,n){return n||F(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,n){return n||F(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,n){return n||F(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,n,r,i){t=+t,n|=0,r|=0,i||I(this,t,n,r,Math.pow(2,8*r),0);var s=1,o=0;this[n]=t&255;while(++o=0&&(o*=256))this[n+s]=t/o&255;return n+r},f.prototype.writeUInt8=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=t&255,n+1},f.prototype.writeUInt16LE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):q(this,t,n,!0),n+2},f.prototype.writeUInt16BE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):q(this,t,n,!1),n+2},f.prototype.writeUInt32LE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255):R(this,t,n,!0),n+4},f.prototype.writeUInt32BE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):R(this,t,n,!1),n+4},f.prototype.writeIntLE=function(t,n,r,i){t=+t,n|=0;if(!i){var s=Math.pow(2,8*r-1);I(this,t,n,r,s-1,-s)}var o=0,u=1,a=t<0?1:0;this[n]=t&255;while(++o>0)-a&255;return n+r},f.prototype.writeIntBE=function(t,n,r,i){t=+t,n|=0;if(!i){var s=Math.pow(2,8*r-1);I(this,t,n,r,s-1,-s)}var o=r-1,u=1,a=t<0?1:0;this[n+o]=t&255;while(--o>=0&&(u*=256))this[n+o]=(t/u>>0)-a&255;return n+r},f.prototype.writeInt8=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=t&255,n+1},f.prototype.writeInt16LE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8):q(this,t,n,!0),n+2},f.prototype.writeInt16BE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=t&255):q(this,t,n,!1),n+2},f.prototype.writeInt32LE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):R(this,t,n,!0),n+4},f.prototype.writeInt32BE=function(t,n,r){return t=+t,n|=0,r||I(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255):R(this,t,n,!1),n+4},f.prototype.writeFloatLE=function(t,n,r){return z(this,t,n,!0,r)},f.prototype.writeFloatBE=function(t,n,r){return z(this,t,n,!1,r)},f.prototype.writeDoubleLE=function(t,n,r){return W(this,t,n,!0,r)},f.prototype.writeDoubleBE=function(t,n,r){return W(this,t,n,!1,r)},f.prototype.copy=function(t,n,r,i){r||(r=0),!i&&i!==0&&(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-n=0;o--)t[o+n]=this[o+r];else if(s<1e3||!f.TYPED_ARRAY_SUPPORT)for(o=0;o=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var i;if(typeof t=="number")for(i=n;i0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.length;o=e.charAt(a-2)==="="?2:e.charAt(a-1)==="="?1:0,u=new n(e.length*3/4-o),i=o>0?e.length-4:e.length;var f=0;for(t=0,r=0;t>16),c((s&65280)>>8),c(s&255);return o===2?(s=l(e.charAt(t))<<2|l(e.charAt(t+1))>>4,c(s&255)):o===1&&(s=l(e.charAt(t))<<10|l(e.charAt(t+1))<<4|l(e.charAt(t+2))>>2,c(s>>8&255),c(s&255)),u}function h(e){function u(e){return t.charAt(e)}function a(e){return u(e>>18&63)+u(e>>12&63)+u(e>>6&63)+u(e&63)}var n,r=e.length%3,i="",s,o;for(n=0,o=e.length-r;n>2),i+=u(s<<4&63),i+="==";break;case 2:s=(e[e.length-2]<<8)+e[e.length-1],i+=u(s>>10),i+=u(s>>4&63),i+=u(s<<2&63),i+="=";break;default:}return i}var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=typeof Uint8Array!="undefined"?Uint8Array:Array,r="+".charCodeAt(0),i="/".charCodeAt(0),s="0".charCodeAt(0),o="a".charCodeAt(0),u="A".charCodeAt(0),a="-".charCodeAt(0),f="_".charCodeAt(0);e.toByteArray=c,e.fromByteArray=h})(typeof n=="undefined"?this.base64js={}:n)},{}],90:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,u=i*8-r-1,a=(1<>1,l=-7,c=n?i-1:0,h=n?-1:1,p=e[t+c];c+=h,s=p&(1<<-l)-1,p>>=-l,l+=u;for(;l>0;s=s*256+e[t+c],c+=h,l-=8);o=s&(1<<-l)-1,s>>=-l,l+=r;for(;l>0;o=o*256+e[t+c],c+=h,l-=8);if(s===0)s=1-f;else{if(s===a)return o?NaN:(p?-1:1)*Infinity;o+=Math.pow(2,r),s-=f}return(p?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,u,a,f=s*8-i-1,l=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,d=r?1:-1,v=t<0||t===0&&1/t<0?1:0;t=Math.abs(t),isNaN(t)||t===Infinity?(u=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+c>=1?t+=h/a:t+=h*Math.pow(2,1-c),t*a>=2&&(o++,a/=2),o+c>=l?(u=0,o=l):o+c>=1?(u=(t*a-1)*Math.pow(2,i),o+=c):(u=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));for(;i>=8;e[n+p]=u&255,p+=d,u/=256,i-=8);o=o<0;e[n+p]=o&255,p+=d,o/=256,f-=8);e[n+p-d]|=v*128}},{}],91:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return r.call(e)=="[object Array]"}},{}],92:[function(e,t,n){"use strict";n.randomBytes=n.rng=n.pseudoRandomBytes=n.prng=e("randombytes"),n.createHash=n.Hash=e("create-hash"),n.createHmac=n.Hmac=e("create-hmac");var r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(e("browserify-sign/algos")));n.getHashes=function(){return r};var i=e("pbkdf2");n.pbkdf2=i.pbkdf2,n.pbkdf2Sync=i.pbkdf2Sync;var s=e("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(e){n[e]=s[e]});var o=e("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(e){n[e]=o[e]});var u=e("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(e){n[e]=u[e]}),n.createECDH=e("create-ecdh");var a=e("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(e){n[e]=a[e]}),["createCredentials"].forEach(function(e){n[e]=function(){throw new Error(["sorry, "+e+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":93,"browserify-sign":123,"browserify-sign/algos":122,"create-ecdh":190,"create-hash":216,"create-hmac":229,"diffie-hellman":230,pbkdf2:237,"public-encrypt":238,randombytes:283}],93:[function(e,t,n){function a(e,t){var n,i;e=e.toLowerCase();if(u[e])n=u[e].key,i=u[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=o[e].key*8,i=o[e].iv}var s=r(t,!1,n,i);return l(e,s.key,s.iv)}function f(e,t){var n,i;e=e.toLowerCase();if(u[e])n=u[e].key,i=u[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");n=o[e].key*8,i=o[e].iv}var s=r(t,!1,n,i);return c(e,s.key,s.iv)}function l(e,t,n){e=e.toLowerCase();if(u[e])return i.createCipheriv(e,t,n);if(o[e])return new s({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function c(e,t,n){e=e.toLowerCase();if(u[e])return i.createDecipheriv(e,t,n);if(o[e])return new s({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function h(){return Object.keys(o).concat(i.getCiphers())}var r=e("evp_bytestokey"),i=e("browserify-aes/browser"),s=e("browserify-des"),o=e("browserify-des/modes"),u=e("browserify-aes/modes");n.createCipher=n.Cipher=a,n.createCipheriv=n.Cipheriv=l,n.createDecipher=n.Decipher=f,n.createDecipheriv=n.Decipheriv=c,n.listCiphers=n.getCiphers=h},{"browserify-aes/browser":96,"browserify-aes/modes":100,"browserify-des":111,"browserify-des/modes":112,evp_bytestokey:121}],94:[function(e,t,n){(function(e){function r(e){var n,r;return n=e>t||e<0?(r=Math.abs(e)%t,e<0?t-r:r):e,n}function i(e){for(var t=0;t>>8^n&255^99,this.SBOX[i]=n,this.INV_SBOX[n]=i,s=e[i],o=e[s],u=e[o],r=e[n]*257^n*16843008,this.SUB_MIX[0][i]=r<<24|r>>>8,this.SUB_MIX[1][i]=r<<16|r>>>16,this.SUB_MIX[2][i]=r<<8|r>>>24,this.SUB_MIX[3][i]=r,r=u*16843009^o*65537^s*257^i*16843008,this.INV_SUB_MIX[0][n]=r<<24|r>>>8,this.INV_SUB_MIX[1][n]=r<<16|r>>>16,this.INV_SUB_MIX[2][n]=r<<8|r>>>24,this.INV_SUB_MIX[3][n]=r,i===0?i=a=1:(i=s^e[e[e[u^s]]],a^=e[e[a]]);return!0};var o=new s;a.blockSize=16,a.prototype.blockSize=a.blockSize,a.keySize=32,a.prototype.keySize=a.keySize,a.prototype._doReset=function(){var e,t,n,r,i,s;n=this._key,t=n.length,this._nRounds=t+6,i=(this._nRounds+1)*4,this._keySchedule=[];for(r=0;r>>24,s=o.SBOX[s>>>24]<<24|o.SBOX[s>>>16&255]<<16|o.SBOX[s>>>8&255]<<8|o.SBOX[s&255],s^=o.RCON[r/t|0]<<24):t>6&&r%t===4?s=o.SBOX[s>>>24]<<24|o.SBOX[s>>>16&255]<<16|o.SBOX[s>>>8&255]<<8|o.SBOX[s&255]:void 0,this._keySchedule[r-t]^s);this._invKeySchedule=[];for(e=0;e>>24]]^o.INV_SUB_MIX[1][o.SBOX[s>>>16&255]]^o.INV_SUB_MIX[2][o.SBOX[s>>>8&255]]^o.INV_SUB_MIX[3][o.SBOX[s&255]];return!0},a.prototype.encryptBlock=function(t){t=u(new e(t));var n=this._doCryptBlock(t,this._keySchedule,o.SUB_MIX,o.SBOX),r=new e(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[1],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[3],12),r},a.prototype.decryptBlock=function(t){t=u(new e(t));var n=[t[3],t[1]];t[1]=n[0],t[3]=n[1];var r=this._doCryptBlock(t,this._invKeySchedule,o.INV_SUB_MIX,o.INV_SBOX),i=new e(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},a.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},a.prototype._doCryptBlock=function(e,t,n,i){var s,o,u,a,f,l,c,h,p;o=e[0]^t[0],u=e[1]^t[1],a=e[2]^t[2],f=e[3]^t[3],s=4;for(var d=1;d>>24]^n[1][u>>>16&255]^n[2][a>>>8&255]^n[3][f&255]^t[s++],c=n[0][u>>>24]^n[1][a>>>16&255]^n[2][f>>>8&255]^n[3][o&255]^t[s++],h=n[0][a>>>24]^n[1][f>>>16&255]^n[2][o>>>8&255]^n[3][u&255]^t[s++],p=n[0][f>>>24]^n[1][o>>>16&255]^n[2][u>>>8&255]^n[3][a&255]^t[s++],o=l,u=c,a=h,f=p;return l=(i[o>>>24]<<24|i[u>>>16&255]<<16|i[a>>>8&255]<<8|i[f&255])^t[s++],c=(i[u>>>24]<<24|i[a>>>16&255]<<16|i[f>>>8&255]<<8|i[o&255])^t[s++],h=(i[a>>>24]<<24|i[f>>>16&255]<<16|i[o>>>8&255]<<8|i[u&255])^t[s++],p=(i[f>>>24]<<24|i[o>>>16&255]<<16|i[u>>>8&255]<<8|i[a&255])^t[s++],[r(l),r(c),r(h),r(p)]},n.AES=a}).call(this,e("buffer").Buffer)},{buffer:88}],95:[function(e,t,n){(function(n){function a(e,t,s,u){if(!(this instanceof a))return new a(e,t,s);i.call(this),this._finID=n.concat([s,new n([0,0,0,1])]),s=n.concat([s,new n([0,0,0,2])]),this._cipher=new r.AES(t),this._prev=new n(s.length),this._cache=new n(""),this._secCache=new n(""),this._decrypt=u,this._alen=0,this._len=0,s.copy(this._prev),this._mode=e;var f=new n(4);f.fill(0),this._ghash=new o(this._cipher.encryptBlock(f)),this._authTag=null,this._called=!1}function f(e,t){var n=0;e.length!==t.length&&n++;var r=Math.min(e.length,t.length),i=-1;while(++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache};var p={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};n.createDecipher=v,n.createDecipheriv=d}).call(this,e("buffer").Buffer)},{"./aes":94,"./authCipher":95,"./modes":100,"./modes/cbc":101,"./modes/cfb":102,"./modes/cfb1":103,"./modes/cfb8":104,"./modes/ctr":105,"./modes/ecb":106,"./modes/ofb":107,"./streamCipher":110,buffer:88,"cipher-base":109,evp_bytestokey:121,inherits:285}],98:[function(e,t,n){(function(t){function l(e,n,s){if(!(this instanceof l))return new l(e,n,s);i.call(this),this._cache=new c,this._cipher=new r.AES(n),this._prev=new t(s.length),s.copy(this._prev),this._mode=e,this._autopadding=!0}function c(){if(!(this instanceof c))return new c;this.cache=new t("")}function p(e,n,r){var i=o[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");typeof r=="string"&&(r=new t(r)),typeof n=="string"&&(n=new t(n));if(n.length!==i.key/8)throw new TypeError("invalid key length "+n.length);if(r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new a(h[i.mode],n,r):i.type==="auth"?new f(h[i.mode],n,r):new l(h[i.mode],n,r)}function d(e,t){var n=o[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=u(t,!1,n.key,n.iv);return p(e,r.key,r.iv)}var r=e("./aes"),i=e("cipher-base"),s=e("inherits"),o=e("./modes"),u=e("evp_bytestokey"),a=e("./streamCipher"),f=e("./authCipher");s(l,i),l.prototype._update=function(e){this._cache.add(e);var n,r,i=[];while(n=this._cache.get())r=this._mode.encrypt(this,n),i.push(r);return t.concat(i)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(e.toString("hex")!=="10101010101010101010101010101010")throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){this._autopadding=!!e},c.prototype.add=function(e){this.cache=t.concat([this.cache,e])},c.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},c.prototype.flush=function(){var e=16-this.cache.length,n=new t(e),r=-1;while(++ro||e<0?(n=Math.abs(e)%o,e<0?o-n:n):e,t}function a(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var n=new e(16);n.fill(0),t.exports=r,r.prototype.ghash=function(e){var t=-1;while(++t0;n--)e[n]=e[n]>>>1|(e[n-1]&1)<<31;e[0]=e[0]>>>1,o&&(e[0]=e[0]^225<<24)}this.state=s(t)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);var n;while(this.cache.length>=16)n=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(n)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,n],16)),this.ghash(s([0,t,0,r])),this.state};var o=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:88}],100:[function(e,t,n){n["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},n["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},n["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},n["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},n["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},n["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},n.aes128=n["aes-128-cbc"],n.aes192=n["aes-192-cbc"],n.aes256=n["aes-256-cbc"],n["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},n["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},n["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},n["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},n["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},n["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},n["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},n["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},n["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},n["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},n["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},n["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},n["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},n["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},n["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},n["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},n["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},n["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],101:[function(e,t,n){var r=e("buffer-xor");n.encrypt=function(e,t){var n=r(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},n.decrypt=function(e,t){var n=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return r(i,n)}},{"buffer-xor":108}],102:[function(e,t,n){(function(t){function i(e,n,i){var s=n.length,o=r(n,e._cache);return e._cache=e._cache.slice(s),e._prev=t.concat([e._prev,i?n:o]),o}var r=e("buffer-xor");n.encrypt=function(e,n,r){var s=new t(""),o;while(n.length){e._cache.length===0&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t(""));if(!(e._cache.length<=n.length)){s=t.concat([s,i(e,n,r)]);break}o=e._cache.length,s=t.concat([s,i(e,n.slice(0,o),r)]),n=n.slice(o)}return s}}).call(this,e("buffer").Buffer)},{buffer:88,"buffer-xor":108}],103:[function(e,t,n){(function(e){function t(e,t,n){var i,s=-1,o=8,u=0,a,f;while(++s>s%8,e._prev=r(e._prev,n?a:f);return u}function r(t,n){var r=t.length,i=-1,s=new e(t.length);t=e.concat([t,new e([n])]);while(++i>7;return s}n.encrypt=function(n,r,i){var s=r.length,o=new e(s),u=-1;while(++u0;i--)n+=this._buffer(t,n),r+=this._flushBuffer(s,r);return n+=this._buffer(t,n),s},i.prototype.final=function(t){var n;t&&(n=this.update(t));var r;return this.type==="encrypt"?r=this._finalEncrypt():r=this._finalDecrypt(),n?n.concat(r):r},i.prototype._pad=function(t,n){if(n===0)return!1;while(n>>1];i=o.r28shl(i,a),s=o.r28shl(s,a),o.pc2(i,s,t.keys,u)}},f.prototype._update=function(t,n,r,i){var s=this._desState,u=o.readUInt32BE(t,n),a=o.readUInt32BE(t,n+4);o.ip(u,a,s.tmp,0),u=s.tmp[0],a=s.tmp[1],this.type==="encrypt"?this._encrypt(s,u,a,s.tmp,0):this._decrypt(s,u,a,s.tmp,0),u=s.tmp[0],a=s.tmp[1],o.writeUInt32BE(r,u,i),o.writeUInt32BE(r,a,i+4)},f.prototype._pad=function(t,n){var r=t.length-n;for(var i=n;i>>0,u=d}o.rip(a,u,i,s)},f.prototype._decrypt=function(t,n,r,i,s){var u=r,a=n;for(var f=t.keys.length-2;f>=0;f-=2){var l=t.keys[f],c=t.keys[f+1];o.expand(u,t.tmp,0),l^=t.tmp[0],c^=t.tmp[1];var h=o.substitute(l,c),p=o.permute(h),d=u;u=(a^p)>>>0,a=d}o.rip(u,a,i,s)}},{"../des":114,inherits:285,"minimalistic-assert":120}],118:[function(e,t,n){"use strict";function a(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);e==="encrypt"?this.ciphers=[u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:s})]:this.ciphers=[u.create({type:"decrypt",key:s}),u.create({type:"encrypt",key:i}),u.create({type:"decrypt",key:n})]}function f(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}var r=e("minimalistic-assert"),i=e("inherits"),s=e("../des"),o=s.Cipher,u=s.DES;i(f,o),t.exports=f,f.create=function(t){return new f(t)},f.prototype._update=function(t,n,r,i){var s=this._edeState;s.ciphers[0]._update(t,n,r,i),s.ciphers[1]._update(r,i,r,i),s.ciphers[2]._update(r,i,r,i)},f.prototype._pad=u.prototype._pad,f.prototype._unpad=u.prototype._unpad},{"../des":114,inherits:285,"minimalistic-assert":120}],119:[function(e,t,n){"use strict";n.readUInt32BE=function(t,n){var r=t[0+n]<<24|t[1+n]<<16|t[2+n]<<8|t[3+n];return r>>>0},n.writeUInt32BE=function(t,n,r){t[0+r]=n>>>24,t[1+r]=n>>>16&255,t[2+r]=n>>>8&255,t[3+r]=n&255},n.ip=function(t,n,r,i){var s=0,o=0;for(var u=6;u>=0;u-=2){for(var a=0;a<=24;a+=8)s<<=1,s|=n>>>a+u&1;for(var a=0;a<=24;a+=8)s<<=1,s|=t>>>a+u&1}for(var u=6;u>=0;u-=2){for(var a=1;a<=25;a+=8)o<<=1,o|=n>>>a+u&1;for(var a=1;a<=25;a+=8)o<<=1,o|=t>>>a+u&1}r[i+0]=s>>>0,r[i+1]=o>>>0},n.rip=function(t,n,r,i){var s=0,o=0;for(var u=0;u<4;u++)for(var a=24;a>=0;a-=8)s<<=1,s|=n>>>a+u&1,s<<=1,s|=t>>>a+u&1;for(var u=4;u<8;u++)for(var a=24;a>=0;a-=8)o<<=1,o|=n>>>a+u&1,o<<=1,o|=t>>>a+u&1;r[i+0]=s>>>0,r[i+1]=o>>>0},n.pc1=function(t,n,r,i){var s=0,o=0;for(var u=7;u>=5;u--){for(var a=0;a<=24;a+=8)s<<=1,s|=n>>a+u&1;for(var a=0;a<=24;a+=8)s<<=1,s|=t>>a+u&1}for(var a=0;a<=24;a+=8)s<<=1,s|=n>>a+u&1;for(var u=1;u<=3;u++){for(var a=0;a<=24;a+=8)o<<=1,o|=n>>a+u&1;for(var a=0;a<=24;a+=8)o<<=1,o|=t>>a+u&1}for(var a=0;a<=24;a+=8)o<<=1,o|=t>>a+u&1;r[i+0]=s>>>0,r[i+1]=o>>>0},n.r28shl=function(t,n){return t<>>28-n};var r=[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];n.pc2=function(t,n,i,s){var o=0,u=0,a=r.length>>>1;for(var f=0;f>>r[f]&1;for(var f=a;f>>r[f]&1;i[s+0]=o>>>0,i[s+1]=u>>>0},n.expand=function(t,n,r){var i=0,s=0;i=(t&1)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(var o=11;o>=3;o-=4)s|=t>>>o&63,s<<=6;s|=(t&31)<<1|t>>>31,n[r+0]=i>>>0,n[r+1]=s>>>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];n.substitute=function(t,n){var r=0;for(var s=0;s<4;s++){var o=t>>>18-s*6&63,u=i[s*64+o];r<<=4,r|=u}for(var s=0;s<4;s++){var o=n>>>18-s*6&63,u=i[256+s*64+o];r<<=4,r|=u}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];n.permute=function(t){var n=0;for(var r=0;r>>s[r]&1;return n>>>0},n.padSplit=function(t,n,r){var i=t.toString(2);while(i.length0&&p.push(c),p.push(e),t&&p.push(t),c=r(n.concat(p)),p=[],h=0;if(i>0)for(;;){if(i===0)break;if(h===c.length)break;a[o++]=c[h],i--,h++}if(s>0&&h!==c.length)for(;;){if(s===0)break;if(h===c.length)break;f[u++]=c[h],s--,h++}if(i===0&&s===0)break}for(h=0;h=49&&o<=54?r|=o-49+10:o>=17&&o<=22?r|=o-17+10:r|=o&15}return r}function o(e,t,n,r){var i=0,s=Math.min(e.length,n);for(var o=t;o=49?i+=u-49+10:u>=17?i+=u-17+10:i+=u}return i}function l(e){var t=new Array(e.bitLength());for(var n=0;n>>i}return t}function c(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=e.words[0]|0,s=t.words[0]|0,o=i*s,u=o&67108863,a=o/67108864|0;n.words[0]=u;for(var f=1;f>>26,c=a&67108863,h=Math.min(f,t.length-1);for(var p=Math.max(0,f-e.length+1);p<=h;p++){var d=f-p|0;i=e.words[d]|0,s=t.words[p]|0,o=i*s+c,l+=o/67108864|0,c=o&67108863}n.words[f]=c|0,a=l|0}return a!==0?n.words[f]=a|0:n.length--,n.strip()}function p(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;var r=0,i=0;for(var s=0;s>>26)|0,i+=o>>>26,o&=67108863}n.words[s]=u,r=o,o=i}return r!==0?n.words[s]=r:n.length--,n.strip()}function d(e,t,n){var r=new v;return r.mulp(e,t,n)}function v(e,t){this.x=e,this.y=t}function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=(new i(1)).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if(typeof e=="string"){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=(new i(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)}typeof e=="object"?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.max=function(t,n){return t.cmp(n)>0?t:n},i.min=function(t,n){return t.cmp(n)<0?t:n},i.prototype._init=function(t,r,i){if(typeof t=="number")return this._initNumber(t,r,i);if(typeof t=="object")return this._initArray(t,r,i);r==="hex"&&(r=16),n(r===(r|0)&&r>=2&&r<=36),t=t.toString().replace(/\s+/g,"");var s=0;t[0]==="-"&&s++,r===16?this._parseHex(t,s):this._parseBase(t,r,s),t[0]==="-"&&(this.negative=1),this.strip();if(i!=="le")return;this._initArray(this.toArray(),r,i)},i.prototype._initNumber=function(t,r,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[t&67108863],this.length=1):t<4503599627370496?(this.words=[t&67108863,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3);if(i!=="le")return;this._initArray(this.toArray(),r,i)},i.prototype._initArray=function(t,r,i){n(typeof t.length=="number");if(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 s=0;s=0;s-=3)u=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[o]|=u<>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);else if(i==="le")for(s=0,o=0;s>>26-a&67108863,a+=24,a>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(t,n){this.length=Math.ceil((t.length-n)/6),this.words=new Array(this.length);for(var r=0;r=n;r-=6)o=s(t,r,r+6),this.words[i]|=o<>>26-u&4194303,u+=24,u>=26&&(u-=26,i++);r+6!==n&&(o=s(t,n,r+6),this.words[i]|=o<>>26-u&4194303),this.strip()},i.prototype._parseBase=function(t,n,r){this.words=[0],this.length=1;for(var i=0,s=1;s<=67108863;s*=n)i++;i--,s=s/n|0;var u=t.length-r,a=u%i,f=Math.min(u,u-a)+r,l=0;for(var c=r;c1&&this.words[this.length-1]===0)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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"],a=[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],f=[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,t){e=e||10,t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0,s=0;for(var o=0;o>>24-i&16777215,s!==0||o!==this.length-1?r=u[6-c.length]+c+r:r=c+r,i+=2,i>=26&&(i-=26,o--)}s!==0&&(r=s.toString(16)+r);while(r.length%t!==0)r="0"+r;return this.negative!==0&&(r="-"+r),r}if(e===(e|0)&&e>=2&&e<=36){var h=a[e],p=f[e];r="";var d=this.clone();d.negative=0;while(!d.isZero()){var v=d.modn(p).toString(e);d=d.idivn(p),d.isZero()?r=v+r:r=u[h-v.length]+v+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return this.negative!==0&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){return n(this.bitLength()<=53,"Number can only safely store up to 53 bits"),parseInt(this.toString(),10)},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(t,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=t==="le",u=new Array(s),a,f,l=this.clone();if(!o){for(f=0;f=4096&&(r+=13,n>>>=13),n>=64&&(r+=7,n>>>=7),n>=8&&(r+=4,n>>>=4),n>=2&&(r+=2,n>>>=2),r+n},i.prototype._zeroBits=function(t){if(t===0)return 26;var n=t,r=0;return(n&8191)===0&&(r+=13,n>>>=13),(n&127)===0&&(r+=7,n>>>=7),(n&15)===0&&(r+=4,n>>>=4),(n&3)===0&&(r+=2,n>>>=2),(n&1)===0&&r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],n=this._countBits(t);return(this.length-1)*26+n},i.prototype.zeroBits=function(){if(this.isZero())return 0;var t=0;for(var n=0;nt.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var n;this.length>t.length?n=t:n=this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var n,r;this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){n(typeof t=="number"&&t>=0);var r=Math.ceil(t/26)|0,i=t%26;while(this.length0&&r--;for(var s=0;s0&&(this.words[s]=~this.words[s]&67108863>>26-i),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,r){n(typeof t=="number"&&t>=0);var i=t/26|0,s=t%26;while(this.length<=i)this.words[this.length++]=0;return r?this.words[i]=this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);var s=0;for(var o=0;o>>26;for(;s!==0&&o>>26;this.length=r.length;if(s!==0)this.words[this.length]=s,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var n=this.iadd(t);return t.negative=1,n._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(r===0)return this.negative=0,this.length=1,this.words[0]=0,this;var i,s;r>0?(i=this,s=t):(i=t,s=this);var o=0;for(var u=0;u>26,this.words[u]=n&67108863;for(;o!==0&&u>26,this.words[u]=n&67108863;if(o===0&&u>>13,d=i[1]|0,v=d&8191,m=d>>>13,g=i[2]|0,y=g&8191,b=g>>>13,w=i[3]|0,E=w&8191,S=w>>>13,x=i[4]|0,T=x&8191,N=x>>>13,C=i[5]|0,k=C&8191,L=C>>>13,A=i[6]|0,O=A&8191,M=A>>>13,_=i[7]|0,D=_&8191,P=_>>>13,H=i[8]|0,B=H&8191,j=H>>>13,F=i[9]|0,I=F&8191,q=F>>>13,R=s[0]|0,U=R&8191,z=R>>>13,W=s[1]|0,X=W&8191,V=W>>>13,$=s[2]|0,J=$&8191,K=$>>>13,Q=s[3]|0,G=Q&8191,Y=Q>>>13,Z=s[4]|0,et=Z&8191,tt=Z>>>13,nt=s[5]|0,rt=nt&8191,it=nt>>>13,st=s[6]|0,ot=st&8191,ut=st>>>13,at=s[7]|0,ft=at&8191,lt=at>>>13,ct=s[8]|0,ht=ct&8191,pt=ct>>>13,dt=s[9]|0,vt=dt&8191,mt=dt>>>13;r.length=19,a=Math.imul(h,U),f=Math.imul(h,z),f+=Math.imul(p,U),l=Math.imul(p,z);var gt=u+a+((f&8191)<<13);u=l+(f>>>13)+(gt>>>26),gt&=67108863,a=Math.imul(v,U),f=Math.imul(v,z),f+=Math.imul(m,U),l=Math.imul(m,z),a+=Math.imul(h,X),f+=Math.imul(h,V),f+=Math.imul(p,X),l+=Math.imul(p,V);var yt=u+a+((f&8191)<<13);u=l+(f>>>13)+(yt>>>26),yt&=67108863,a=Math.imul(y,U),f=Math.imul(y,z),f+=Math.imul(b,U),l=Math.imul(b,z),a+=Math.imul(v,X),f+=Math.imul(v,V),f+=Math.imul(m,X),l+=Math.imul(m,V),a+=Math.imul(h,J),f+=Math.imul(h,K),f+=Math.imul(p,J),l+=Math.imul(p,K);var bt=u+a+((f&8191)<<13);u=l+(f>>>13)+(bt>>>26),bt&=67108863,a=Math.imul(E,U),f=Math.imul(E,z),f+=Math.imul(S,U),l=Math.imul(S,z),a+=Math.imul(y,X),f+=Math.imul(y,V),f+=Math.imul(b,X),l+=Math.imul(b,V),a+=Math.imul(v,J),f+=Math.imul(v,K),f+=Math.imul(m,J),l+=Math.imul(m,K),a+=Math.imul(h,G),f+=Math.imul(h,Y),f+=Math.imul(p,G),l+=Math.imul(p,Y);var wt=u+a+((f&8191)<<13);u=l+(f>>>13)+(wt>>>26),wt&=67108863,a=Math.imul(T,U),f=Math.imul(T,z),f+=Math.imul(N,U),l=Math.imul(N,z),a+=Math.imul(E,X),f+=Math.imul(E,V),f+=Math.imul(S,X),l+=Math.imul(S,V),a+=Math.imul(y,J),f+=Math.imul(y,K),f+=Math.imul(b,J),l+=Math.imul(b,K),a+=Math.imul(v,G),f+=Math.imul(v,Y),f+=Math.imul(m,G),l+=Math.imul(m,Y),a+=Math.imul(h,et),f+=Math.imul(h,tt),f+=Math.imul(p,et),l+=Math.imul(p,tt);var Et=u+a+((f&8191)<<13);u=l+(f>>>13)+(Et>>>26),Et&=67108863,a=Math.imul(k,U),f=Math.imul(k,z),f+=Math.imul(L,U),l=Math.imul(L,z),a+=Math.imul(T,X),f+=Math.imul(T,V),f+=Math.imul(N,X),l+=Math.imul(N,V),a+=Math.imul(E,J),f+=Math.imul(E,K),f+=Math.imul(S,J),l+=Math.imul(S,K),a+=Math.imul(y,G),f+=Math.imul(y,Y),f+=Math.imul(b,G),l+=Math.imul(b,Y),a+=Math.imul(v,et),f+=Math.imul(v,tt),f+=Math.imul(m,et),l+=Math.imul(m,tt),a+=Math.imul(h,rt),f+=Math.imul(h,it),f+=Math.imul(p,rt),l+=Math.imul(p,it);var St=u+a+((f&8191)<<13);u=l+(f>>>13)+(St>>>26),St&=67108863,a=Math.imul(O,U),f=Math.imul(O,z),f+=Math.imul(M,U),l=Math.imul(M,z),a+=Math.imul(k,X),f+=Math.imul(k,V),f+=Math.imul(L,X),l+=Math.imul(L,V),a+=Math.imul(T,J),f+=Math.imul(T,K),f+=Math.imul(N,J),l+=Math.imul(N,K),a+=Math.imul(E,G),f+=Math.imul(E,Y),f+=Math.imul(S,G),l+=Math.imul(S,Y),a+=Math.imul(y,et),f+=Math.imul(y,tt),f+=Math.imul(b,et),l+=Math.imul(b,tt),a+=Math.imul(v,rt),f+=Math.imul(v,it),f+=Math.imul(m,rt),l+=Math.imul(m,it),a+=Math.imul(h,ot),f+=Math.imul(h,ut),f+=Math.imul(p,ot),l+=Math.imul(p,ut);var xt=u+a+((f&8191)<<13);u=l+(f>>>13)+(xt>>>26),xt&=67108863,a=Math.imul(D,U),f=Math.imul(D,z),f+=Math.imul(P,U),l=Math.imul(P,z),a+=Math.imul(O,X),f+=Math.imul(O,V),f+=Math.imul(M,X),l+=Math.imul(M,V),a+=Math.imul(k,J),f+=Math.imul(k,K),f+=Math.imul(L,J),l+=Math.imul(L,K),a+=Math.imul(T,G),f+=Math.imul(T,Y),f+=Math.imul(N,G),l+=Math.imul(N,Y),a+=Math.imul(E,et),f+=Math.imul(E,tt),f+=Math.imul(S,et),l+=Math.imul(S,tt),a+=Math.imul(y,rt),f+=Math.imul(y,it),f+=Math.imul(b,rt),l+=Math.imul(b,it),a+=Math.imul(v,ot),f+=Math.imul(v,ut),f+=Math.imul(m,ot),l+=Math.imul(m,ut),a+=Math.imul(h,ft),f+=Math.imul(h,lt),f+=Math.imul(p,ft),l+=Math.imul(p,lt);var Tt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Tt>>>26),Tt&=67108863,a=Math.imul(B,U),f=Math.imul(B,z),f+=Math.imul(j,U),l=Math.imul(j,z),a+=Math.imul(D,X),f+=Math.imul(D,V),f+=Math.imul(P,X),l+=Math.imul(P,V),a+=Math.imul(O,J),f+=Math.imul(O,K),f+=Math.imul(M,J),l+=Math.imul(M,K),a+=Math.imul(k,G),f+=Math.imul(k,Y),f+=Math.imul(L,G),l+=Math.imul(L,Y),a+=Math.imul(T,et),f+=Math.imul(T,tt),f+=Math.imul(N,et),l+=Math.imul(N,tt),a+=Math.imul(E,rt),f+=Math.imul(E,it),f+=Math.imul(S,rt),l+=Math.imul(S,it),a+=Math.imul(y,ot),f+=Math.imul(y,ut),f+=Math.imul(b,ot),l+=Math.imul(b,ut),a+=Math.imul(v,ft),f+=Math.imul(v,lt),f+=Math.imul(m,ft),l+=Math.imul(m,lt),a+=Math.imul(h,ht),f+=Math.imul(h,pt),f+=Math.imul(p,ht),l+=Math.imul(p,pt);var Nt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Nt>>>26),Nt&=67108863,a=Math.imul(I,U),f=Math.imul(I,z),f+=Math.imul(q,U),l=Math.imul(q,z),a+=Math.imul(B,X),f+=Math.imul(B,V),f+=Math.imul(j,X),l+=Math.imul(j,V),a+=Math.imul(D,J),f+=Math.imul(D,K),f+=Math.imul(P,J),l+=Math.imul(P,K),a+=Math.imul(O,G),f+=Math.imul(O,Y),f+=Math.imul(M,G),l+=Math.imul(M,Y),a+=Math.imul(k,et),f+=Math.imul(k,tt),f+=Math.imul(L,et),l+=Math.imul(L,tt),a+=Math.imul(T,rt),f+=Math.imul(T,it),f+=Math.imul(N,rt),l+=Math.imul(N,it),a+=Math.imul(E,ot),f+=Math.imul(E,ut),f+=Math.imul(S,ot),l+=Math.imul(S,ut),a+=Math.imul(y,ft),f+=Math.imul(y,lt),f+=Math.imul(b,ft),l+=Math.imul(b,lt),a+=Math.imul(v,ht),f+=Math.imul(v,pt),f+=Math.imul(m,ht),l+=Math.imul(m,pt),a+=Math.imul(h,vt),f+=Math.imul(h,mt),f+=Math.imul(p,vt),l+=Math.imul(p,mt);var Ct=u+a+((f&8191)<<13);u=l+(f>>>13)+(Ct>>>26),Ct&=67108863,a=Math.imul(I,X),f=Math.imul(I,V),f+=Math.imul(q,X),l=Math.imul(q,V),a+=Math.imul(B,J),f+=Math.imul(B,K),f+=Math.imul(j,J),l+=Math.imul(j,K),a+=Math.imul(D,G),f+=Math.imul(D,Y),f+=Math.imul(P,G),l+=Math.imul(P,Y),a+=Math.imul(O,et),f+=Math.imul(O,tt),f+=Math.imul(M,et),l+=Math.imul(M,tt),a+=Math.imul(k,rt),f+=Math.imul(k,it),f+=Math.imul(L,rt),l+=Math.imul(L,it),a+=Math.imul(T,ot),f+=Math.imul(T,ut),f+=Math.imul(N,ot),l+=Math.imul(N,ut),a+=Math.imul(E,ft),f+=Math.imul(E,lt),f+=Math.imul(S,ft),l+=Math.imul(S,lt),a+=Math.imul(y,ht),f+=Math.imul(y,pt),f+=Math.imul(b,ht),l+=Math.imul(b,pt),a+=Math.imul(v,vt),f+=Math.imul(v,mt),f+=Math.imul(m,vt),l+=Math.imul(m,mt);var kt=u+a+((f&8191)<<13);u=l+(f>>>13)+(kt>>>26),kt&=67108863,a=Math.imul(I,J),f=Math.imul(I,K),f+=Math.imul(q,J),l=Math.imul(q,K),a+=Math.imul(B,G),f+=Math.imul(B,Y),f+=Math.imul(j,G),l+=Math.imul(j,Y),a+=Math.imul(D,et),f+=Math.imul(D,tt),f+=Math.imul(P,et),l+=Math.imul(P,tt),a+=Math.imul(O,rt),f+=Math.imul(O,it),f+=Math.imul(M,rt),l+=Math.imul(M,it),a+=Math.imul(k,ot),f+=Math.imul(k,ut),f+=Math.imul(L,ot),l+=Math.imul(L,ut),a+=Math.imul(T,ft),f+=Math.imul(T,lt),f+=Math.imul(N,ft),l+=Math.imul(N,lt),a+=Math.imul(E,ht),f+=Math.imul(E,pt),f+=Math.imul(S,ht),l+=Math.imul(S,pt),a+=Math.imul(y,vt),f+=Math.imul(y,mt),f+=Math.imul(b,vt),l+=Math.imul(b,mt);var Lt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Lt>>>26),Lt&=67108863,a=Math.imul(I,G),f=Math.imul(I,Y),f+=Math.imul(q,G),l=Math.imul(q,Y),a+=Math.imul(B,et),f+=Math.imul(B,tt),f+=Math.imul(j,et),l+=Math.imul(j,tt),a+=Math.imul(D,rt),f+=Math.imul(D,it),f+=Math.imul(P,rt),l+=Math.imul(P,it),a+=Math.imul(O,ot),f+=Math.imul(O,ut),f+=Math.imul(M,ot),l+=Math.imul(M,ut),a+=Math.imul(k,ft),f+=Math.imul(k,lt),f+=Math.imul(L,ft),l+=Math.imul(L,lt),a+=Math.imul(T,ht),f+=Math.imul(T,pt),f+=Math.imul(N,ht),l+=Math.imul(N,pt),a+=Math.imul(E,vt),f+=Math.imul(E,mt),f+=Math.imul(S,vt),l+=Math.imul(S,mt);var At=u+a+((f&8191)<<13);u=l+(f>>>13)+(At>>>26),At&=67108863,a=Math.imul(I,et),f=Math.imul(I,tt),f+=Math.imul(q,et),l=Math.imul(q,tt),a+=Math.imul(B,rt),f+=Math.imul(B,it),f+=Math.imul(j,rt),l+=Math.imul(j,it),a+=Math.imul(D,ot),f+=Math.imul(D,ut),f+=Math.imul(P,ot),l+=Math.imul(P,ut),a+=Math.imul(O,ft),f+=Math.imul(O,lt),f+=Math.imul(M,ft),l+=Math.imul(M,lt),a+=Math.imul(k,ht),f+=Math.imul(k,pt),f+=Math.imul(L,ht),l+=Math.imul(L,pt),a+=Math.imul(T,vt),f+=Math.imul(T,mt),f+=Math.imul(N,vt),l+=Math.imul(N,mt);var Ot=u+a+((f&8191)<<13);u=l+(f>>>13)+(Ot>>>26),Ot&=67108863,a=Math.imul(I,rt),f=Math.imul(I,it),f+=Math.imul(q,rt),l=Math.imul(q,it),a+=Math.imul(B,ot),f+=Math.imul(B,ut),f+=Math.imul(j,ot),l+=Math.imul(j,ut),a+=Math.imul(D,ft),f+=Math.imul(D,lt),f+=Math.imul(P,ft),l+=Math.imul(P,lt),a+=Math.imul(O,ht),f+=Math.imul(O,pt),f+=Math.imul(M,ht),l+=Math.imul(M,pt),a+=Math.imul(k,vt),f+=Math.imul(k,mt),f+=Math.imul(L,vt),l+=Math.imul(L,mt);var Mt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Mt>>>26),Mt&=67108863,a=Math.imul(I,ot),f=Math.imul(I,ut),f+=Math.imul(q,ot),l=Math.imul(q,ut),a+=Math.imul(B,ft),f+=Math.imul(B,lt),f+=Math.imul(j,ft),l+=Math.imul(j,lt),a+=Math.imul(D,ht),f+=Math.imul(D,pt),f+=Math.imul(P,ht),l+=Math.imul(P,pt),a+=Math.imul(O,vt),f+=Math.imul(O,mt),f+=Math.imul(M,vt),l+=Math.imul(M,mt);var _t=u+a+((f&8191)<<13);u=l+(f>>>13)+(_t>>>26),_t&=67108863,a=Math.imul(I,ft),f=Math.imul(I,lt),f+=Math.imul(q,ft),l=Math.imul(q,lt),a+=Math.imul(B,ht),f+=Math.imul(B,pt),f+=Math.imul(j,ht),l+=Math.imul(j,pt),a+=Math.imul(D,vt),f+=Math.imul(D,mt),f+=Math.imul(P,vt),l+=Math.imul(P,mt);var Dt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Dt>>>26),Dt&=67108863,a=Math.imul(I,ht),f=Math.imul(I,pt),f+=Math.imul(q,ht),l=Math.imul(q,pt),a+=Math.imul(B,vt),f+=Math.imul(B,mt),f+=Math.imul(j,vt),l+=Math.imul(j,mt);var Pt=u+a+((f&8191)<<13);u=l+(f>>>13)+(Pt>>>26),Pt&=67108863,a=Math.imul(I,vt),f=Math.imul(I,mt),f+=Math.imul(q,vt),l=Math.imul(q,mt);var Ht=u+a+((f&8191)<<13);return u=l+(f>>>13)+(Ht>>>26),Ht&=67108863,o[0]=gt,o[1]=yt,o[2]=bt,o[3]=wt,o[4]=Et,o[5]=St,o[6]=xt,o[7]=Tt,o[8]=Nt,o[9]=Ct,o[10]=kt,o[11]=Lt,o[12]=At,o[13]=Ot,o[14]=Mt,o[15]=_t,o[16]=Dt,o[17]=Pt,o[18]=Ht,u!==0&&(o[19]=u,r.length++),r};Math.imul||(h=c),i.prototype.mulTo=function(t,n){var r,i=this.length+t.length;return this.length===10&&t.length===10?r=h(this,t,n):i<63?r=c(this,t,n):i<1024?r=p(this,t,n):r=d(this,t,n),r},v.prototype.makeRBT=function(t){var n=new Array(t),r=i.prototype._countBits(t)-1;for(var s=0;s>=1;return i},v.prototype.permute=function(t,n,r,i,s,o){for(var u=0;u>>=1)s++;return 1<>>=13,i[2*u+1]=o&8191,o>>>=13;for(u=2*r;u>=26,r+=s/67108864|0,r+=o>>>26,this.words[i]=o&67108863}return r!==0&&(this.words[i]=r,this.length++),this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var n=l(t);if(n.length===0)return new i(1);var r=this;for(var s=0;s=0);var r=t%26,i=(t-r)/26,s=67108863>>>26-r<<26-r,o;if(r!==0){var u=0;for(o=0;o>>26-r}u&&(this.words[o]=u,this.length++)}if(i!==0){for(o=this.length-1;o>=0;o--)this.words[o+i]=this.words[o];for(o=0;o=0);var s;r?s=(r-r%26)/26:s=0;var o=t%26,u=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<u){this.length-=u;for(l=0;l=0&&(c!==0||l>=s);l--){var h=this.words[l]|0;this.words[l]=c<<26-o|h>>>o,c=h&a}return f&&c!==0&&(f.words[f.length++]=c),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,r,i){return n(this.negative===0),this.iushrn(t,r,i)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){n(typeof t=="number"&&t>=0);var r=t%26,i=(t-r)/26,s=1<=0);var r=t%26,i=(t-r)/26;n(this.negative===0,"imaskn works only with positive numbers"),r!==0&&i++,this.length=Math.min(i,this.length);if(r!==0){var s=67108863^67108863>>>r<=67108864;n++)this.words[n]-=67108864,n===this.length-1?this.words[n+1]=1:this.words[n+1]++;return this.length=Math.max(this.length,n+1),this},i.prototype.isubn=function(t){n(typeof t=="number");if(t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;this.words[0]-=t;if(this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r>26)-(l/67108864|0),this.words[o+i]=a&67108863}for(;o>26,this.words[o+i]=a&67108863;if(f===0)return this.strip();n(f===-1),f=0;for(o=0;o>26,this.words[o]=a&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,n){var r=this.length-t.length,s=this.clone(),o=t,u=o.words[o.length-1]|0,a=this._countBits(u);r=26-a,r!==0&&(o=o.ushln(r),s.iushln(r),u=o.words[o.length-1]|0);var f=s.length-o.length,l;if(n!=="mod"){l=new i(null),l.length=f+1,l.words=new Array(l.length);for(var c=0;c=0;p--){var d=(s.words[o.length+p]|0)*67108864+(s.words[o.length+p-1]|0);d=Math.min(d/u|0,67108863),s._ishlnsubmul(o,d,p);while(s.negative!==0)d--,s.negative=0,s._ishlnsubmul(o,1,p),s.isZero()||(s.negative^=1);l&&(l.words[p]=d)}return l&&l.strip(),s.strip(),n!=="div"&&r!==0&&s.iushrn(r),{div:l||null,mod:s}},i.prototype.divmod=function(t,r,s){n(!t.isZero());var o,u,a;return this.negative!==0&&t.negative===0?(a=this.neg().divmod(t,r),r!=="mod"&&(o=a.div.neg()),r!=="div"&&(u=a.mod.neg(),s&&u.neg&&(u=u.add(t))),{div:o,mod:u}):this.negative===0&&t.negative!==0?(a=this.divmod(t.neg(),r),r!=="mod"&&(o=a.div.neg()),{div:o,mod:a.mod}):(this.negative&t.negative)!==0?(a=this.neg().divmod(t.neg(),r),r!=="div"&&(u=a.mod.neg(),s&&u.neg&&(u=u.isub(t))),{div:a.div,mod:u}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:t.length===1?r==="div"?{div:this.divn(t.words[0]),mod:null}:r==="mod"?{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,r)},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var n=this.divmod(t);if(n.mod.isZero())return n.div;var r=n.div.negative!==0?n.mod.isub(t):n.mod,i=t.ushrn(1),s=t.andln(1),o=r.cmp(i);return o<0||s===1&&o===0?n.div:n.div.negative!==0?n.div.isubn(1):n.div.iaddn(1)},i.prototype.modn=function(t){n(t<=67108863);var r=(1<<26)%t,i=0;for(var s=this.length-1;s>=0;s--)i=(r*i+(this.words[s]|0))%t;return i},i.prototype.idivn=function(t){n(t<=67108863);var r=0;for(var i=this.length-1;i>=0;i--){var s=(this.words[i]|0)+r*67108864;this.words[i]=s/t|0,r=s%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){n(t.negative===0),n(!t.isZero());var r=this,s=t.clone();r.negative!==0?r=r.umod(t):r=r.clone();var o=new i(1),u=new i(0),a=new i(0),f=new i(1),l=0;while(r.isEven()&&s.isEven())r.iushrn(1),s.iushrn(1),++l;var c=s.clone(),h=r.clone();while(!r.isZero()){for(var p=0,d=1;(r.words[0]&d)===0&&p<26;++p,d<<=1);if(p>0){r.iushrn(p);while(p-->0){if(o.isOdd()||u.isOdd())o.iadd(c),u.isub(h);o.iushrn(1),u.iushrn(1)}}for(var v=0,m=1;(s.words[0]&m)===0&&v<26;++v,m<<=1);if(v>0){s.iushrn(v);while(v-->0){if(a.isOdd()||f.isOdd())a.iadd(c),f.isub(h);a.iushrn(1),f.iushrn(1)}}r.cmp(s)>=0?(r.isub(s),o.isub(a),u.isub(f)):(s.isub(r),a.isub(o),f.isub(u))}return{a:a,b:f,gcd:s.iushln(l)}},i.prototype._invmp=function(t){n(t.negative===0),n(!t.isZero());var r=this,s=t.clone();r.negative!==0?r=r.umod(t):r=r.clone();var o=new i(1),u=new i(0),a=s.clone();while(r.cmpn(1)>0&&s.cmpn(1)>0){for(var f=0,l=1;(r.words[0]&l)===0&&f<26;++f,l<<=1);if(f>0){r.iushrn(f);while(f-->0)o.isOdd()&&o.iadd(a),o.iushrn(1)}for(var c=0,h=1;(s.words[0]&h)===0&&c<26;++c,h<<=1);if(c>0){s.iushrn(c);while(c-->0)u.isOdd()&&u.iadd(a),u.iushrn(1)}r.cmp(s)>=0?(r.isub(s),o.isub(u)):(s.isub(r),u.isub(o))}var p;return r.cmpn(1)===0?p=o:p=u,p.cmpn(0)<0&&p.iadd(t),p},i.prototype.gcd=function(t){if(this.isZero())return t.clone();if(t.isZero())return this.clone();var n=this.clone(),r=t.clone();n.negative=0,r.negative=0;for(var i=0;n.isEven()&&r.isEven();i++)n.iushrn(1),r.iushrn(1);do{while(n.isEven())n.iushrn(1);while(r.isEven())r.iushrn(1);var s=n.cmp(r);if(s<0){var o=n;n=r,r=o}else if(s===0||r.cmpn(1)===0)break;n.isub(r)}while(!0);return r.iushln(i)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){n(typeof t=="number");var r=t%26,i=(t-r)/26,s=1<>>26,a&=67108863,this.words[o]=a}return u!==0&&(this.words[o]=u,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(t){var r=t<0;if(this.negative!==0&&!r)return-1;if(this.negative===0&&r)return 1;this.strip();var i;if(this.length>1)i=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var s=this.words[0]|0;i=s===t?0:st.length)return 1;if(this.length=0;r--){var i=this.words[r]|0,s=t.words[r]|0;if(i===s)continue;is&&(n=1);break}return n},i.red=function(t){return new S(t)},i.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return n(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 n(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.ushl(this,t)},i.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};g.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.prototype.ireduce=function(t){var n=t,r;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),r=n.bitLength();while(r>this.n);var i=r0?n.isub(this.p):n.strip(),n},g.prototype.split=function(t,n){t.iushrn(this.n,0,n)},g.prototype.imulK=function(t){return t.imul(this.k)},r(y,g),y.prototype.split=function(t,n){var r=4194303,i=Math.min(t.length,9);for(var s=0;s>>22,o=u}t.words[s-10]=o>>>22,t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;var n=0;for(var r=0;r>>=26,t.words[r]=s,n=i}return n!==0&&(t.words[t.length++]=n),t},i._prime=function N(e){if(m[e])return m[e];var N;if(e==="k256")N=new y;else if(e==="p224")N=new b;else if(e==="p192")N=new w;else{if(e!=="p25519")throw new Error("Unknown prime "+e);N=new E}return m[e]=N,N},S.prototype._verify1=function(t){n(t.negative===0,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,r){n((t.negative|r.negative)===0,"red works only with positives"),n(t.red&&t.red===r.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){var n=t.clone();return n.negative^=1,n.iadd(this.m)._forceRed (this)},S.prototype.add=function(t,n){this._verify2(t,n);var r=t.add(n);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,n){this._verify2(t,n);var r=t.iadd(n);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,n){this._verify2(t,n);var r=t.sub(n);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,n){this._verify2(t,n);var r=t.isub(n);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,n){return this._verify1(t),this.imod(t.ushln(n))},S.prototype.imul=function(t,n){return this._verify2(t,n),this.imod(t.imul(n))},S.prototype.mul=function(t,n){return this._verify2(t,n),this.imod(t.mul(n))},S.prototype.isqr=function(t){return this.imul(t,t)},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var r=this.m.andln(3);n(r%2===1);if(r===3){var s=this.m.add(new i(1)).iushrn(2);return this.pow(t,s)}var o=this.m.subn(1),u=0;while(!o.isZero()&&o.andln(1)===0)u++,o.iushrn(1);n(!o.isZero());var a=(new i(1)).toRed(this),f=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();c=(new i(2*c*c)).toRed(this);while(this.pow(c,l).cmp(f)!==0)c.redIAdd(f);var h=this.pow(c,o),p=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),v=u;while(d.cmp(a)!==0){var m=d;for(var g=0;m.cmp(a)!==0;g++)m=m.redSqr();n(g=0;o--){var c=n.words[o];for(var h=l-1;h>=0;h--){var p=c>>h&1;u!==s[0]&&(u=this.sqr(u));if(p===0&&a===0){f=0;continue}a<<=1,a|=p,f++;if(f!==r&&(o!==0||h!==0))continue;u=this.mul(u,s[a]),f=0,a=0}l=26}return u},S.prototype.convertTo=function(t){var n=t.umod(this.m);return n===t?n.clone():n},S.prototype.convertFrom=function(t){var n=t.clone();return n.red=null,n},i.mont=function(t){return new x(t)},r(x,S),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var n=this.imod(t.mul(this.rinv));return n.red=null,n},x.prototype.imul=function(t,n){if(t.isZero()||n.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(n),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(i).iushrn(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)},x.prototype.mul=function(t,n){if(t.isZero()||n.isZero())return(new i(0))._forceRed(this);var r=t.mul(n),s=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(s).iushrn(this.shift),u=o;return o.cmp(this.m)>=0?u=o.isub(this.m):o.cmpn(0)<0&&(u=o.iadd(this.m)),u._forceRed(this)},x.prototype.invm=function(t){var n=this.imod(t._invmp(this.m).mul(this.r2));return n._forceRed(this)}})(typeof t=="undefined"||t,this)},{}],126:[function(e,t,n){(function(n){function s(e){var t=u(e),n=t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed();return{blinder:n,unblinder:t.invm(e.modulus)}}function o(e,t){var i=s(t),o=t.modulus.byteLength(),u=r.mont(t.modulus),a=(new r(e)).mul(i.blinder).umod(t.modulus),f=a.toRed(r.mont(t.prime1)),l=a.toRed(r.mont(t.prime2)),c=t.coefficient,h=t.prime1,p=t.prime2,d=f.redPow(t.exponent1),v=l.redPow(t.exponent2);d=d.fromRed(),v=v.fromRed();var m=d.isub(v).imul(c).umod(h);return m.imul(p),v.iadd(m),new n(v.imul(i.unblinder).umod(t.modulus).toArray(!1,o))}function u(e){var t=e.modulus.byteLength(),n=new r(i(t));while(n.cmp(e.modulus)>=0||!n.umod(e.prime1)||!n.umod(e.prime2))n=new r(i(t));return n}var r=e("bn.js"),i=e("randombytes");t.exports=o,o.getr=u}).call(this,e("buffer").Buffer)},{"bn.js":125,buffer:88,randombytes:283}],127:[function(e,t,n){"use strict";var r=n;r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.hmacDRBG=e("./elliptic/hmac-drbg"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":150,"./elliptic/curve":130,"./elliptic/curves":133,"./elliptic/ec":134,"./elliptic/eddsa":137,"./elliptic/hmac-drbg":140,"./elliptic/utils":142,brorand:143}],128:[function(e,t,n){"use strict";function f(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=(new r(0)).toRed(this.red),this.one=(new r(1)).toRed(this.red),this.two=(new r(2)).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function l(e,t){this.curve=e,this.type=t,this.precomputed=null}var r=e("bn.js"),i=e("../../elliptic"),s=i.utils,o=s.getNAF,u=s.getJSF,a=s.assert;t.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(t,n){a(t.precomputed);var r=t._getDoubles(),i=o(n,1),s=(1<=f;n--)l=(l<<1)+i[n];u.push(l)}var c=this.jpoint(null,null,null),h=this.jpoint(null,null,null);for(var p=s;p>0;p--){for(var f=0;f=0;l--){for(var n=0;l>=0&&u[l]===0;l--)n++;l>=0&&n++,f=f.dblp(n);if(l<0)break;var c=u[l];a(c!==0),t.type==="affine"?c>0?f=f.mixedAdd(s[c-1>>1]):f=f.mixedAdd(s[-c-1>>1].neg()):c>0?f=f.add(s[c-1>>1]):f=f.add(s[-c-1>>1].neg())}return t.type==="affine"?f.toP():f},f.prototype._wnafMulAdd=function(t,n,r,i){var s=this._wnafT1,a=this._wnafT2,f=this._wnafT3,l=0;for(var c=0;c=1;c-=2){var d=c-1,v=c;if(s[d]!==1||s[v]!==1){f[d]=o(r[d],s[d]),f[v]=o(r[v],s[v]),l=Math.max(f[d].length,l),l=Math.max(f[v].length,l);continue}var m=[n[d],null,null,n[v]];n[d].y.cmp(n[v].y)===0?(m[1]=n[d].add(n[v]),m[2]=n[d].toJ().mixedAdd(n[v].neg())):n[d].y.cmp(n[v].y.redNeg())===0?(m[1]=n[d].toJ().mixedAdd(n[v]),m[2]=n[d].add(n[v].neg())):(m[1]=n[d].toJ().mixedAdd(n[v]),m[2]=n[d].toJ().mixedAdd(n[v].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=u(r[d],r[v]);l=Math.max(y[0].length,l),f[d]=new Array(l),f[v]=new Array(l);for(var b=0;b=0;c--){var T=0;while(c>=0){var N=!0;for(var b=0;b=0&&T++,S=S.dblp(T);if(c<0)break;for(var b=0;b0?h=a[b][C-1>>1]:C<0&&(h=a[b][-C-1>>1].neg()),h.type==="affine"?S=S.mixedAdd(h):S=S.add(h)}}for(var c=0;c=Math.ceil((t.bitLength()+1)/n.step):!1},l.prototype._getDoubles=function(t,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var r=[this],i=this;for(var s=0;s":""},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&this.y.cmp(this.z)===0},l.prototype._extDbl=function(){var t=this.x.redSqr(),n=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),s=this.x.redAdd(this.y).redSqr().redISub(t).redISub(n),o=i.redAdd(n),u=o.redSub(r),a=i.redSub(n),f=s.redMul(u),l=o.redMul(a),c=s.redMul(a),h=u.redMul(o);return this.curve.point(f,l,h,c)},l.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),r=this.y.redSqr(),i,s,o;if(this.curve.twisted){var u=this.curve._mulA(n),a=u.redAdd(r);if(this.zOne)i=t.redSub(n).redSub(r).redMul(a.redSub(this.curve.two)),s=a.redMul(u.redSub(r)),o=a.redSqr().redSub(a).redSub(a);else{var f=this.z.redSqr(),l=a.redSub(f).redISub(f);i=t.redSub(n).redISub(r).redMul(l),s=a.redMul(u.redSub(r)),o=a.redMul(l)}}else{var u=n.redAdd(r),f=this.curve._mulC(this.c.redMul(this.z)).redSqr(),l=u.redSub(f).redSub(f);i=this.curve._mulC(t.redISub(u)).redMul(l),s=this.curve._mulC(u).redMul(n.redISub(r)),o=u.redMul(l)}return this.curve.point(i,s,o)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(t){var n=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),s=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(n),u=s.redSub(i),a=s.redAdd(i),f=r.redAdd(n),l=o.redMul(u),c=a.redMul(f),h=o.redMul(f),p=u.redMul(a);return this.curve.point(l,c,p,h)},l.prototype._projAdd=function(t){var n=this.z.redMul(t.z),r=n.redSqr(),i=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(i).redMul(s),u=r.redSub(o),a=r.redAdd(o),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(i).redISub(s),l=n.redMul(u).redMul(f),c,h;return this.curve.twisted?(c=n.redMul(a).redMul(s.redSub(this.curve._mulA(i))),h=u.redMul(a)):(c=n.redMul(a).redMul(s.redSub(i)),h=this.curve._mulC(u).redMul(a)),this.curve.point(l,c,h)},l.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},l.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},l.prototype.mulAdd=function(t,n,r){return this.curve._wnafMulAdd(1,[this,n],[t,r],2)},l.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},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},{"../../elliptic":127,"../curve":130,"bn.js":125,inherits:285}],130:[function(e,t,n){"use strict";var r=n;r.base=e("./base"),r.short=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":128,"./edwards":129,"./mont":131,"./short":132}],131:[function(e,t,n){"use strict";function f(e){o.call(this,"mont",e),this.a=(new i(e.a,16)).toRed(this.red),this.b=(new i(e.b,16)).toRed(this.red),this.i4=(new i(4)).toRed(this.red).redInvm(),this.two=(new i(2)).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,n){o.BasePoint.call(this,e,"projective"),t===null&&n===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var r=e("../curve"),i=e("bn.js"),s=e("inherits"),o=r.base,u=e("../../elliptic"),a=u.utils;s(f,o),t.exports=f,f.prototype.validate=function(t){var n=t.normalize().x,r=n.redSqr(),i=r.redMul(n).redAdd(r.redMul(this.a)).redAdd(n),s=i.redSqrt();return s.redSqr().cmp(i)===0},s(l,o.BasePoint),f.prototype.decodePoint=function(t,n){return this.point(a.toArray(t,n),1)},f.prototype.point=function(t,n){return new l(this,t,n)},f.prototype.pointFromJSON=function(t){return l.fromJSON(this,t)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(t,n){return new l(t,n[0],n[1]||t.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return this.z.cmpn(0)===0},l.prototype.dbl=function(){var t=this.x.redAdd(this.z),n=t.redSqr(),r=this.x.redSub(this.z),i=r.redSqr(),s=n.redSub(i),o=n.redMul(i),u=s.redMul(i.redAdd(this.curve.a24.redMul(s)));return this.curve.point(o,u)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(t,n){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),s=t.x.redAdd(t.z),o=t.x.redSub(t.z),u=o.redMul(r),a=s.redMul(i),f=n.z.redMul(u.redAdd(a).redSqr()),l=n.x.redMul(u.redISub(a).redSqr());return this.curve.point(f,l)},l.prototype.mul=function(t){var n=t.clone(),r=this,i=this.curve.point(null,null),s=this;for(var o=[];n.cmpn(0)!==0;n.iushrn(1))o.push(n.andln(1));for(var u=o.length-1;u>=0;u--)o[u]===0?(r=r.diffAdd(i,s),i=i.dbl()):(i=r.diffAdd(i,s),r=r.dbl());return i},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(t){return this.getX().cmp(t.getX())===0},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":127,"../curve":130,"bn.js":125,inherits:285}],132:[function(e,t,n){"use strict";function f(e){u.call(this,"short",e),this.a=(new s(e.a,16)).toRed(this.red),this.b=(new s(e.b,16)).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,n,r){u.BasePoint.call(this,e,"affine"),t===null&&n===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new s(t,16),this.y=new s(n,16),r&&(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 c(e,t,n,r){u.BasePoint.call(this,e,"jacobian"),t===null&&n===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new s(0)):(this.x=new s(t,16),this.y=new s(n,16),this.z=new s(r,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 r=e("../curve"),i=e("../../elliptic"),s=e("bn.js"),o=e("inherits"),u=r.base,a=i.utils.assert;o(f,u),t.exports=f,f.prototype._getEndomorphism=function(t){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var n,r;if(t.beta)n=(new s(t.beta,16)).toRed(this.red);else{var i=this._getEndoRoots(this.p);n=i[0].cmp(i[1])<0?i[0]:i[1],n=n.toRed(this.red)}if(t.lambda)r=new s(t.lambda,16);else{var o=this._getEndoRoots(this.n);this.g.mul(o[0]).x.cmp(this.g.x.redMul(n))===0?r=o[0]:(r=o[1],a(this.g.mul(r).x.cmp(this.g.x.redMul(n))===0))}var u;return t.basis?u=t.basis.map(function(e){return{a:new s(e.a,16),b:new s(e.b,16)}}):u=this._getEndoBasis(r),{beta:n,lambda:r,basis:u}},f.prototype._getEndoRoots=function(t){var n=t===this.p?this.red:s.mont(t),r=(new s(2)).toRed(n).redInvm(),i=r.redNeg(),o=(new s(3)).toRed(n).redNeg().redSqrt().redMul(r),u=i.redAdd(o).fromRed(),a=i.redSub(o).fromRed();return[u,a]},f.prototype._getEndoBasis=function(t){var n=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=t,i=this.n.clone(),o=new s(1),u=new s(0),a=new s(0),f=new s(1),l,c,h,p,d,v,m,g=0,y,b;while(r.cmpn(0)!==0){var w=i.div(r);y=i.sub(w.mul(r)),b=a.sub(w.mul(o));var E=f.sub(w.mul(u));if(!h&&y.cmp(n)<0)l=m.neg(),c=o,h=y.neg(),p=b;else if(h&&++g===2)break;m=y,i=r,r=y,a=o,o=b,f=u,u=E}d=y.neg(),v=b;var S=h.sqr().add(p.sqr()),x=d.sqr().add(v.sqr());return x.cmp(S)>=0&&(d=l,v=c),h.negative&&(h=h.neg(),p=p.neg()),d.negative&&(d=d.neg(),v=v.neg()),[{a:h,b:p},{a:d,b:v}]},f.prototype._endoSplit=function(t){var n=this.endo.basis,r=n[0],i=n[1],s=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),u=s.mul(r.a),a=o.mul(i.a),f=s.mul(r.b),l=o.mul(i.b),c=t.sub(u).sub(a),h=f.add(l).neg();return{k1:c,k2:h}},f.prototype.pointFromX=function(t,n){t=new s(t,16),t.red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt(),o=i.fromRed().isOdd();if(n&&!o||!n&&o)i=i.redNeg();return this.point(t,i)},f.prototype.validate=function(t){if(t.inf)return!0;var n=t.x,r=t.y,i=this.a.redMul(n),s=n.redSqr().redMul(n).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(s).cmpn(0)===0},f.prototype._endoWnafMulAdd=function(t,n){var r=this._endoWnafT1,i=this._endoWnafT2;for(var s=0;s":""},l.prototype.isInfinity=function(){return this.inf},l.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(this.x.cmp(t.x)===0)return this.curve.point(null,null);var n=this.y.redSub(t.y);n.cmpn(0)!==0&&(n=n.redMul(this.x.redSub(t.x).redInvm()));var r=n.redSqr().redISub(this.x).redISub(t.x),i=n.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},l.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var n=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),s=r.redAdd(r).redIAdd(r).redIAdd(n).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),u=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,u)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(t){return t=new s(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},l.prototype.mulAdd=function(t,n,r){var i=[this,n],s=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)},l.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)},l.prototype.neg=function(t){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};n.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return n},l.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t},o(c,u.BasePoint),f.prototype.jpoint=function(t,n,r){return new c(this,t,n,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),n=t.redSqr(),r=this.x.redMul(n),i=this.y.redMul(n).redMul(t);return this.curve.point(r,i)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var n=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(n),s=t.x.redMul(r),o=this.y.redMul(n.redMul(t.z)),u=t.y.redMul(r.redMul(this.z)),a=i.redSub(s),f=o.redSub(u);if(a.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),h=i.redMul(l),p=f.redSqr().redIAdd(c).redISub(h).redISub(h),d=f.redMul(h.redISub(p)).redISub(o.redMul(c)),v=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(p,d,v)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var n=this.z.redSqr(),r=this.x,i=t.x.redMul(n),s=this.y,o=t.y.redMul(n).redMul(this.z),u=r.redSub(i),a=s.redSub(o);if(u.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=u.redSqr(),l=f.redMul(u),c=r.redMul(f),h=a.redSqr().redIAdd(l).redISub(c).redISub(c),p=a.redMul(c.redISub(h)).redISub(s.redMul(l)),d=this.z.redMul(u);return this.curve.jpoint(h,p,d)},c.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var n=this;for(var r=0;r":""},c.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../../elliptic":127,"../curve":130,"bn.js":125,inherits:285}],133:[function(e,t,n){"use strict";function u(e){e.type==="short"?this.curve=new s.curve.short(e):e.type==="edwards"?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new u(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}var r=n,i=e("hash.js"),s=e("../elliptic"),o=s.utils.assert;r.PresetCurve=u,a("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:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:i.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"]}),a("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:i.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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),a("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:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=e("./precomputed/secp256k1")}catch(l){f=undefined}a("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:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"../elliptic":127,"./precomputed/secp256k1":141,"hash.js":144}],134:[function(e,t,n){"use strict";function f(e){if(!(this instanceof f))return new f(e);typeof e=="string"&&(o(i.curves.hasOwnProperty(e),"Unknown curve "+e),e=i.curves[e]),e instanceof i.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var r=e("bn.js"),i=e("../../elliptic"),s=i.utils,o=s.assert,u=e("./key"),a=e("./signature");t.exports=f,f.prototype.keyPair=function(t){return new u(this,t)},f.prototype.keyFromPrivate=function(t,n){return u.fromPrivate(this,t,n)},f.prototype.keyFromPublic=function(t,n){return u.fromPublic(this,t,n)},f.prototype.genKeyPair=function(t){t||(t={});var n=new i.hmacDRBG({hash:this.hash,pers:t.pers,entropy:t.entropy||i.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),s=this.n.byteLength(),o=this.n.sub(new r(2));do{var u=new r(n.generate(s));if(u.cmp(o)>0)continue;return u.iaddn(1),this.keyFromPrivate(u)}while(!0)},f.prototype._truncateToN=function(t,n){var r=t.byteLength()*8-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,n,s,o){typeof s=="object"&&(o=s,s=null),o||(o={}),n=this.keyFromPrivate(n,s),t=this._truncateToN(new r(t,16));var u=this.n.byteLength(),f=n.getPrivate().toArray("be",u),l=t.toArray("be",u),c=new i.hmacDRBG({hash:this.hash,entropy:f,nonce:l}),h=this.n.sub(new r(1));for(var p=0;!0;p++){var d=o.k?o.k(p):new r(c.generate(this.n.byteLength()));d=this._truncateToN(d,!0);if(d.cmpn(1)<=0||d.cmp(h)>=0)continue;var v=this.g.mul(d);if(v.isInfinity())continue;var m=v.getX(),g=m.umod(this.n);if(g.cmpn(0)===0)continue;var y=d.invm(this.n).mul(g.mul(n.getPrivate()).iadd(t));y=y.umod(this.n);if(y.cmpn(0)===0)continue;var b=(v.getY().isOdd()?1:0)|(m.cmp(g)!==0?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new a({r:g,s:y,recoveryParam:b})}},f.prototype.verify=function(t,n,i,s){t=this._truncateToN(new r(t,16)),i=this.keyFromPublic(i,s),n=new a(n,"hex");var o=n.r,u=n.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var f=u.invm(this.n),l=f.mul(t).umod(this.n),c=f.mul(o).umod(this.n),h=this.g.mulAdd(l,i.getPublic(),c);return h.isInfinity()?!1:h.getX().umod(this.n).cmp(o)===0},f.prototype.recoverPubKey=function(e,t,n,i){o((3&n)===n,"The recovery param is more than two bits"),t=new a(t,i);var s=this.n,u=new r(e),f=t.r,l=t.s,c=n&1,h=n>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");h?f=this.curve.pointFromX(f.add(this.curve.n),c):f=this.curve.pointFromX(f,c);var p=s.sub(u),d=t.r.invm(s);return f.mul(l).add(this.g.mul(p)).mul(d)},f.prototype.getKeyRecoveryParam=function(e,t,n,r){t=new a(t,r);if(t.recoveryParam!==null)return t.recoveryParam;for(var i=0;i<4;i++){var s=this.recoverPubKey(e,t,i);if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":127,"./key":135,"./signature":136,"bn.js":125}],135:[function(e,t,n){"use strict";function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var r=e("bn.js");t.exports=i,i.fromPublic=function(t,n,r){return n instanceof i?n:new i(t,{pub:n,pubEnc:r})},i.fromPrivate=function(t,n,r){return n instanceof i?n:new i(t,{priv:n,privEnc:r})},i.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"}},i.prototype.getPublic=function(t,n){return typeof t=="string"&&(n=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),n?this.pub.encode(n,t):this.pub},i.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(t,n){this.priv=new r(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(t,n){if(t.x||t.y){this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,n)},i.prototype.derive=function(t){return t.mul(this.priv).getX()},i.prototype.sign=function(t,n,r){return this.ec.sign(t,this,n,r)},i.prototype.verify=function(t,n){return this.ec.verify(t,n,this)},i.prototype.inspect=function(){return""}},{"bn.js":125}],136:[function(e,t,n){"use strict";function u(e,t){if(e instanceof u)return e;if(this._importDER(e,t))return;o(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),e.recoveryParam!==null?this.recoveryParam=e.recoveryParam:this.recoveryParam=null}function a(){this.place=0}function f(e,t){var n=e[t.place++];if(!(n&128))return n;var r=n&15,i=0;for(var s=0,o=t.place;s>>3);e.push(n|128);while(--n)e.push(t>>>(n<<3)&255);e.push(t)}var r=e("bn.js"),i=e("../../elliptic"),s=i.utils,o=s.assert;t.exports=u,u.prototype._importDER=function(t,n){t=s.toArray(t,n);var i=new a;if(t[i.place++]!==48)return!1;var o=f(t,i);if(o+i.place!==t.length)return!1;if(t[i.place++]!==2)return!1;var u=f(t,i),l=t.slice(i.place,u+i.place);i.place+=u;if(t[i.place++]!==2)return!1;var c=f(t,i);if(t.length!==c+i.place)return!1;var h=t.slice(i.place,c+i.place);return l[0]===0&&l[1]&128&&(l=l.slice(1)),h[0]===0&&h[1]&128&&(h=h.slice(1)),this.r=new r(l),this.s=new r(h),this.recoveryParam=null,!0},u.prototype.toDER=function(t){var n=this.r.toArray(),r=this.s.toArray();n[0]&128&&(n=[0].concat(n)),r[0]&128&&(r=[0].concat(r)),n=l(n),r=l(r);while(!r[0]&&!(r[1]&128))r=r.slice(1);var i=[2];c(i,n.length),i=i.concat(n),i.push(2),c(i,r.length);var o=i.concat(r),u=[48];return c(u,o.length),u=u.concat(o),s.encode(u,t)}},{"../../elliptic":127,"bn.js":125}],137:[function(e,t,n){"use strict";function l(e){o(e==="ed25519","only tested with ed25519 so far");if(!(this instanceof l))return new l(e);var e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}var r=e("hash.js"),i=e("../../elliptic"),s=i.utils,o=s.assert,u=s.parseBytes,a=e("./key"),f=e("./signature");t.exports=l,l.prototype.sign=function(t,n){t=u(t);var r=this.keyFromSecret(n),i=this.hashInt(r.messagePrefix(),t),s=this.g.mul(i),o=this.encodePoint(s),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),f=i.add(a).umod(this.curve.n);return this.makeSignature({R:s,S:f,Rencoded:o})},l.prototype.verify=function(t,n,r){t=u(t),n=this.makeSignature(n);var i=this.keyFromPublic(r),s=this.hashInt(n.Rencoded(),i.pubBytes(),t),o=this.g.mul(n.S()),a=n.R().add(i.pub().mul(s));return a.eq(o)},l.prototype.hashInt=function(){var t=this.hash();for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var r=e("hash.js"),i=e("../elliptic"),s=i.utils,o=s.assert;t.exports=u,u.prototype._init=function(t,n,r){var i=t.concat(n).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this.reseed=1},u.prototype.generate=function(t,n,r,i){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");typeof n!="string"&&(i=r,r=n,n=null),r&&(r=s.toArray(r,i),this._update(r));var o=[];while(o.length>8,o=i&255;s?n.push(s,o):n.push(o)}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var r=0;r=0){var s;if(i.isOdd()){var o=i.andln(r-1);o>(r>>1)-1?s=(r>>1)-o:s=o,i.isubn(s)}else s=0;n.push(s);var u=i.cmpn(0)!==0&&i.andln(r-1)===0?t+1:1;for(var a=1;a0||t.cmpn(-i)>0){var s=e.andln(3)+r&3,o=t.andln(3)+i&3;s===3&&(s=-1),o===3&&(o=-1);var u;if((s&1)===0)u=0;else{var a=e.andln(7)+r&7;a!==3&&a!==5||o!==2?u=s:u=-s}n[0].push(u);var f;if((o&1)===0)f=0;else{var a=t.andln(7)+i&7;a!==3&&a!==5||s!==2?f=o:f=-o}n[1].push(f),2*r===u+1&&(r=1-r),2*i===f+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n}function l(e,t){var n=t.name,r="_"+n;e.prototype[n]=function(){return this[r]!==undefined?this[r]:this[r]=t.call(this)}}function c(e){return typeof e=="string"?r.toArray(e,"hex"):e}function h(e){return new i(e,"hex","le")}var r=n,i=e("bn.js");r.assert=function(t,n){if(!t)throw new Error(n||"Assertion failed")},r.toArray=s,r.zero2=o,r.toHex=u,r.encode=function(t,n){return n==="hex"?u(t):t},r.getNAF=a,r.getJSF=f,r.cachedProperty=l,r.parseBytes=c,r.intFromLE=h},{"bn.js":125}],143:[function(e,t,n){function i(e){this.rand=e}var r;t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)};if(typeof window=="object")window.crypto&&window.crypto.getRandomValues?i.prototype._rand=function(t){var n=new Uint8Array(t);return window.crypto.getRandomValues(n),n}:window.msCrypto&&window.msCrypto.getRandomValues?i.prototype._rand=function(t){var n=new Uint8Array(t);return window.msCrypto.getRandomValues(n),n}:i.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var s=e("crypto");i.prototype._rand=function(t){return s.randomBytes(t)}}catch(o){i.prototype._rand=function(t){var n=new Uint8Array(t);for(var r=0;r=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),this.pending.length===0&&(this.pending=null),t=i.join32(t,0,t.length-r,this.endian);for(var s=0;s>>24&255,i[s++]=t>>>16&255,i[s++]=t>>>8&255,i[s++]=t&255}else{i[s++]=t&255,i[s++]=t>>>8&255,i[s++]=t>>>16&255,i[s++]=t>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0;for(var o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),o(t.length<=this.blockSize);for(var n=t.length;n>>3}function j(e){return o(e,17)^o(e,19)^e>>>10}function F(e,t,n,r){if(e===0)return M(t,n,r);if(e===1||e===3)return D(t,n,r);if(e===2)return _(t,n,r)}function I(e,t,n,r,i,s){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function q(e,t,n,r,i,s){var o=t&r^~t&s;return o<0&&(o+=4294967296),o}function R(e,t,n,r,i,s){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function U(e,t,n,r,i,s){var o=t&r^t&s^r&s;return o<0&&(o+=4294967296),o}function z(e,t){var n=c(e,t,28),r=c(t,e,2),i=c(t,e,7),s=n^r^i;return s<0&&(s+=4294967296),s}function W(e,t){var n=h(e,t,28),r=h(t,e,2),i=h(t,e,7),s=n^r^i;return s<0&&(s+=4294967296),s}function X(e,t){var n=c(e,t,14),r=c(e,t,18),i=c(t,e,9),s=n^r^i;return s<0&&(s+=4294967296),s}function V(e,t){var n=h(e,t,14),r=h(e,t,18),i=h(t,e,9),s=n^r^i;return s<0&&(s+=4294967296),s}function $(e,t){var n=c(e,t,1),r=c(e,t,8),i=p(e,t,7),s=n^r^i;return s<0&&(s+=4294967296),s}function J(e,t){var n=h(e,t,1),r=h(e,t,8),i=d(e,t,7),s=n^r^i;return s<0&&(s+=4294967296),s}function K(e,t){var n=c(e,t,19),r=c(t,e,29),i=p(e,t,6),s=n^r^i;return s<0&&(s+=4294967296),s}function Q(e,t){var n=h(e,t,19),r=h(t,e,29),i=d(e,t,6),s=n^r^i;return s<0&&(s+=4294967296),s}var r=e("../hash"),i=r.utils,s=i.assert,o=i.rotr32,u=i.rotl32,a=i.sum32,f=i.sum32_4,l=i.sum32_5,c=i.rotr64_hi,h=i.rotr64_lo,p=i.shr64_hi,d=i.shr64_lo,v=i.sum64,m=i.sum64_hi,g=i.sum64_lo,y=i.sum64_4_hi,b=i.sum64_4_lo,w=i.sum64_5_hi,E=i.sum64_5_lo,S=r.common.BlockHash,x=[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],T=[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],N=[1518500249,1859775393,2400959708,3395469782];i.inherits(C,S),n.sha256=C,C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(t,n){var r=this.W;for(var i=0;i<16;i++)r[i]=t[n+i];for(;i>8,o=i&255;s?n.push(s,o):n.push(o)}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var r=0;r>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}function a(e,t){var n="";for(var r=0;r>>0}return s}function h(e,t){var n=new Array(e.length*4);for(var r=0,i=0;r>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=s&255):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=s&255)}return n}function p(e,t){return e>>>t|e<<32-t}function d(e,t){return e<>>32-t}function v(e,t){return e+t>>>0}function m(e,t,n){return e+t+n>>>0}function g(e,t,n,r){return e+t+n+r>>>0}function y(e,t,n,r,i){return e+t+n+r+i>>>0}function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function w(e,t,n,r){var i=e[t],s=e[t+1],o=r+s>>>0,u=(o>>0,e[t+1]=o}function E(e,t,n,r){var i=t+r>>>0,s=(i>>0}function S(e,t,n,r){var i=t+r;return i>>>0}function x(e,t,n,r,i,s,o,u){var a=0,f=t;f=f+r>>>0,a+=f>>0,a+=f>>0,a+=f>>0}function T(e,t,n,r,i,s,o,u){var a=t+r+s+u;return a>>>0}function N(e,t,n,r,i,s,o,u,a,f){var l=0,c=t;c=c+r>>>0,l+=c>>0,l+=c>>0,l+=c>>0,l+=c>>0}function C(e,t,n,r,i,s,o,u,a,f){var l=t+r+s+u+f;return l>>>0}function k(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}function L(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}function A(e,t,n){return e>>>n}function O(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}var r=n,i=e("inherits");r.toArray=s,r.toHex=o,r.htonl=u,r.toHex32=a,r.zero2=f,r.zero8=l,r.join32=c,r.split32=h,r.rotr32=p,r.rotl32=d,r.sum32=v,r.sum32_3=m,r.sum32_4=g,r.sum32_5=y,r.assert=b,r.inherits=i,n.sum64=w,n.sum64_hi=E,n.sum64_lo=S,n.sum64_4_hi=x,n.sum64_4_lo=T,n.sum64_5_hi=N,n.sum64_5_lo=C,n.rotr64_hi=k,n.rotr64_lo=L,n.shr64_hi=A,n.shr64_lo=O},{inherits:285}],150:[function(e,t,n){t.exports={name:"elliptic",version:"6.1.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{test:"make lint && istanbul test _mocha --reporter=spec test/*-test.js",coveralls:"cat ./coverage/lcov.info | coveralls"},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",coveralls:"^2.11.3",istanbul:"^0.3.17",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},dependencies:{"bn.js":"^4.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},gitHead:"b465fea90447f3b6c0b3f55e5fd6ecdedc1282f2",_id:"elliptic@6.1.0",_shasum:"68130e03823b4ce024955ad1be195e148099d654",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.3.12",_nodeVersion:"5.2.0",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"68130e03823b4ce024955ad1be195e148099d654",tarball:"http://registry.npmjs.org/elliptic/-/elliptic-6.1.0.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.1.0.tgz"}},{}],151:[function(e,t,n){t.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"}},{}],152:[function(e,t,n){var r=e("asn1.js"),i=r.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())});n.RSAPrivateKey=i;var s=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});n.RSAPublicKey=s;var o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())});n.PublicKey=o;var u=r.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())}),a=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(u),this.key("subjectPrivateKey").octstr())});n.PrivateKey=a;var f=r.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())});n.EncryptedPrivateKey=f;var l=r.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())});n.DSAPrivateKey=l,n.DSAparam=r.define("DSAparam",function(){this.int()});var c=r.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});n.ECPrivateKey=c;var h=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});n.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":155}],153:[function(e,t,n){(function(n){var r=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m,i=/^-----BEGIN (.*) KEY-----\r?\n/m,s=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m,o=e("evp_bytestokey"),u=e("browserify-aes");t.exports=function(e,t){var a=e.toString(),f=a.match(r),l;if(!f){var c=a.match(s);l=new n(c[2].replace(/\r?\n/g,""),"base64")}else{var h="aes"+f[1],p=new n(f[2],"hex"),d=new n(f[3].replace(/\r?\n/g,""),"base64"),v=o(t,p.slice(0,8),parseInt(f[1],10)).key,m=[],g=u.createDecipheriv(h,v,p);m.push(g.update(d)),m.push(g.final()),l=n.concat(m)}var y=a.match(i)[1]+" KEY";return{tag:y,data:l}}}).call(this,e("buffer").Buffer)},{"browserify-aes":172,buffer:88,evp_bytestokey:187}],154:[function(e,t,n){(function(n){function a(e){var t;typeof e=="object"&&!n.isBuffer(e)&&(t=e.passphrase,e=e.key),typeof e=="string"&&(e=new n(e));var i=s(e,t),o=i.tag,u=i.data,a,l;switch(o){case"PUBLIC KEY":l=r.PublicKey.decode(u,"der"),a=l.algorithm.algorithm.join(".");switch(a){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=r.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+a)}throw new Error("unknown key type "+o);case"ENCRYPTED PRIVATE KEY":u=r.EncryptedPrivateKey.decode(u,"der"),u=f(u,t);case"PRIVATE KEY":l=r.PrivateKey.decode(u,"der"),a=l.algorithm.algorithm.join(".");switch(a){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:r.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=r.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+a)}throw new Error("unknown key type "+o);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(u,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(u,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(u,"der")};case"EC PRIVATE KEY":return u=r.ECPrivateKey.decode(u,"der"),{curve:u.parameters.value,privateKey:u.privateKey};default:throw new Error("unknown key type "+o)}}function f(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,s=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=i[e.algorithm.decrypt.cipher.algo.join(".")],f=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,c=parseInt(a.split("-")[1],10)/8,h=u.pbkdf2Sync(t,r,s,c),p=o.createDecipheriv(a,h,f),d=[];return d.push(p.update(l)),d.push(p.final()),n.concat(d)}var r=e("./asn1"),i=e("./aesid.json"),s=e("./fixProc"),o=e("browserify-aes"),u=e("pbkdf2");t.exports=a,a.signature=r.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":151,"./asn1":152,"./fixProc":153,"browserify-aes":172,buffer:88,pbkdf2:237}],155:[function( e,t,n){var r=n;r.bignum=e("bn.js"),r.define=e("./asn1/api").define,r.base=e("./asn1/base"),r.constants=e("./asn1/constants"),r.decoders=e("./asn1/decoders"),r.encoders=e("./asn1/encoders")},{"./asn1/api":156,"./asn1/base":158,"./asn1/constants":162,"./asn1/decoders":164,"./asn1/encoders":167,"bn.js":125}],156:[function(e,t,n){function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var r=e("../asn1"),i=e("inherits"),s=n;s.define=function(t,n){return new o(t,n)},o.prototype._createNamed=function(n){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(s){r=function(e){this._initNamed(e)}}return i(r,n),r.prototype._initNamed=function(t){n.call(this,t)},new r(this)},o.prototype._getDecoder=function(t){return this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(r.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,n,r){return this._getDecoder(n).decode(t,r)},o.prototype._getEncoder=function(t){return this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,n,r){return this._getEncoder(n).encode(t,r)}},{"../asn1":155,inherits:285,vm:304}],157:[function(e,t,n){function o(e,t){i.call(this,t);if(!s.isBuffer(e)){this.error("Input not Buffer");return}this.base=e,this.offset=0,this.length=e.length}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof u||(e=new u(e,t)),this.length+=e.length,e},this);else if(typeof e=="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if(typeof e=="string")this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var r=e("inherits"),i=e("../base").Reporter,s=e("buffer").Buffer;r(o,i),n.DecoderBuffer=o,o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(t){var n=new o(this.base);return n.offset=t.offset,n.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),n},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},o.prototype.skip=function(t,n){if(this.offset+t<=this.length){var r=new o(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r}return this.error(n||"DecoderBuffer overrun")},o.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},n.EncoderBuffer=u,u.prototype.join=function(t,n){return t||(t=new s(this.length)),n||(n=0),this.length===0?t:(Array.isArray(this.value)?this.value.forEach(function(e){e.join(t,n),n+=e.length}):(typeof this.value=="number"?t[n]=this.value:typeof this.value=="string"?t.write(this.value,n):s.isBuffer(this.value)&&this.value.copy(t,n),n+=this.length),t)}},{"../base":158,buffer:88,inherits:285}],158:[function(e,t,n){var r=n;r.Reporter=e("./reporter").Reporter,r.DecoderBuffer=e("./buffer").DecoderBuffer,r.EncoderBuffer=e("./buffer").EncoderBuffer,r.Node=e("./node")},{"./buffer":157,"./node":159,"./reporter":160}],159:[function(e,t,n){function f(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n["default"]=null,n.explicit=null,n.implicit=null,n.parent||(n.children=[],this._wrap())}var r=e("../base").Reporter,i=e("../base").EncoderBuffer,s=e("minimalistic-assert"),o=["seq","seqof","set","setof","octstr","bitstr","objid","bool","gentime","utctime","null_","enum","int","ia5str","utf8str","bmpstr","numstr","printstr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any"].concat(o),a=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=f;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit"];f.prototype.clone=function(){var t=this._baseState,n={};l.forEach(function(e){n[e]=t[e]});var r=new this.constructor(n.parent);return r._baseState=n,r},f.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)},f.prototype._init=function(t){var n=this._baseState;s(n.parent===null),t.call(this),n.children=n.children.filter(function(e){return e._baseState.parent===this},this),s.equal(n.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(t){var n=this._baseState,r=t.filter(function(e){return e instanceof this.constructor},this);t=t.filter(function(e){return!(e instanceof this.constructor)},this),r.length!==0&&(s(n.children===null),n.children=r,r.forEach(function(e){e._baseState.parent=this},this)),t.length!==0&&(s(n.args===null),n.args=t,n.reverseArgs=t.map(function(e){if(typeof e!="object"||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(n|0)&&(n|=0);var r=e[n];t[r]=n}),t}))},a.forEach(function(e){f.prototype[e]=function(){var n=this._baseState;throw new Error(e+" not implemented for encoding: "+n.enc)}}),o.forEach(function(e){f.prototype[e]=function(){var n=this._baseState,r=Array.prototype.slice.call(arguments);return s(n.tag===null),n.tag=e,this._useArgs(r),this}}),f.prototype.use=function(t){var n=this._baseState;return s(n.use===null),n.use=t,this},f.prototype.optional=function(){var t=this._baseState;return t.optional=!0,this},f.prototype.def=function(t){var n=this._baseState;return s(n["default"]===null),n["default"]=t,n.optional=!0,this},f.prototype.explicit=function(t){var n=this._baseState;return s(n.explicit===null&&n.implicit===null),n.explicit=t,this},f.prototype.implicit=function(t){var n=this._baseState;return s(n.explicit===null&&n.implicit===null),n.implicit=t,this},f.prototype.obj=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return t.obj=!0,n.length!==0&&this._useArgs(n),this},f.prototype.key=function(t){var n=this._baseState;return s(n.key===null),n.key=t,this},f.prototype.any=function(){var t=this._baseState;return t.any=!0,this},f.prototype.choice=function(t){var n=this._baseState;return s(n.choice===null),n.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},f.prototype._decode=function(t){var n=this._baseState;if(n.parent===null)return t.wrapResult(n.children[0]._decode(t));var r=n["default"],i=!0,s;n.key!==null&&(s=t.enterKey(n.key));if(n.optional){var o=null;n.explicit!==null?o=n.explicit:n.implicit!==null?o=n.implicit:n.tag!==null&&(o=n.tag);if(o===null&&!n.any){var u=t.save();try{n.choice===null?this._decodeGeneric(n.tag,t):this._decodeChoice(t),i=!0}catch(a){i=!1}t.restore(u)}else{i=this._peekTag(t,o,n.any);if(t.isError(i))return i}}var f;n.obj&&i&&(f=t.enterObject());if(i){if(n.explicit!==null){var l=this._decodeTag(t,n.explicit);if(t.isError(l))return l;t=l}if(n.use===null&&n.choice===null){if(n.any)var u=t.save();var c=this._decodeTag(t,n.implicit!==null?n.implicit:n.tag,n.any);if(t.isError(c))return c;n.any?r=t.raw(u):t=c}n.any?r=r:n.choice===null?r=this._decodeGeneric(n.tag,t):r=this._decodeChoice(t);if(t.isError(r))return r;if(!n.any&&n.choice===null&&n.children!==null){var h=n.children.some(function(n){n._decode(t)});if(h)return err}}return n.obj&&i&&(r=t.leaveObject(f)),n.key!==null&&(r!==null||i===!0)&&t.leaveKey(s,n.key,r),r},f.prototype._decodeGeneric=function(t,n){var r=this._baseState;return t==="seq"||t==="set"?null:t==="seqof"||t==="setof"?this._decodeList(n,t,r.args[0]):t==="octstr"||t==="bitstr"?this._decodeStr(n,t):t==="ia5str"||t==="utf8str"||t==="bmpstr"?this._decodeStr(n,t):t==="numstr"||t==="printstr"?this._decodeStr(n,t):t==="objid"&&r.args?this._decodeObjid(n,r.args[0],r.args[1]):t==="objid"?this._decodeObjid(n,null,null):t==="gentime"||t==="utctime"?this._decodeTime(n,t):t==="null_"?this._decodeNull(n):t==="bool"?this._decodeBool(n):t==="int"||t==="enum"?this._decodeInt(n,r.args&&r.args[0]):r.use!==null?this._getUse(r.use,n._reporterState.obj)._decode(n):n.error("unknown tag: "+t)},f.prototype._getUse=function(t,n){var r=this._baseState;return r.useDecoder=this._use(t,n),s(r.useDecoder._baseState.parent===null),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},f.prototype._decodeChoice=function(t){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some(function(e){var s=t.save(),o=n.choice[e];try{var u=o._decode(t);if(t.isError(u))return!1;r={type:e,value:u},i=!0}catch(a){return t.restore(s),!1}return!0},this),i?r:t.error("Choice not matched")},f.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},f.prototype._encode=function(t,n,r){var i=this._baseState;if(i["default"]!==null&&i["default"]===t)return;var s=this._encodeValue(t,n,r);if(s===undefined)return;if(this._skipDefault(s,n,r))return;return s},f.prototype._encodeValue=function(t,n,i){var s=this._baseState;if(s.parent===null)return s.children[0]._encode(t,n||new r);var o=null,u=!0;this.reporter=n;if(s.optional&&t===undefined){if(s["default"]===null)return;t=s["default"]}var a,f=null,l=!1;if(s.any)o=this._createEncoderBuffer(t);else if(s.choice)o=this._encodeChoice(t,n);else if(s.children)f=s.children.map(function(e){if(e._baseState.tag==="null_")return e._encode(null,n,t);if(e._baseState.key===null)return n.error("Child should have a key");var r=n.enterKey(e._baseState.key);if(typeof t!="object")return n.error("Child expected, but input is not object");var i=e._encode(t[e._baseState.key],n,t);return n.leaveKey(r),i},this).filter(function(e){return e}),f=this._createEncoderBuffer(f);else if(s.tag==="seqof"||s.tag==="setof"){if(!s.args||s.args.length!==1)return n.error("Too many args for : "+s.tag);if(!Array.isArray(t))return n.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,f=this._createEncoderBuffer(t.map(function(e){var r=this._baseState;return this._getUse(r.args[0],t)._encode(e,n)},c))}else s.use!==null?o=this._getUse(s.use,i)._encode(t,n):(f=this._encodePrimitive(s.tag,t),l=!0);var o;if(!s.any&&s.choice===null){var h=s.implicit!==null?s.implicit:s.tag,p=s.implicit===null?"universal":"context";h===null?s.use===null&&n.error("Tag could be ommited only for .use()"):s.use===null&&(o=this._encodeComposite(h,l,p,f))}return s.explicit!==null&&(o=this._encodeComposite(s.explicit,!1,"context",o)),o},f.prototype._encodeChoice=function(t,n){var r=this._baseState,i=r.choice[t.type];return i||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,n)},f.prototype._encodePrimitive=function(t,n){var r=this._baseState;if(t==="octstr"||t==="bitstr"||t==="ia5str")return this._encodeStr(n,t);if(t==="utf8str"||t==="bmpstr")return this._encodeStr(n,t);if(t==="numstr"||t==="printstr")return this._encodeStr(n,t);if(t==="objid"&&r.args)return this._encodeObjid(n,r.reverseArgs[0],r.args[1]);if(t==="objid")return this._encodeObjid(n,null,null);if(t==="gentime"||t==="utctime")return this._encodeTime(n,t);if(t==="null_")return this._encodeNull();if(t==="int"||t==="enum")return this._encodeInt(n,r.args&&r.reverseArgs[0]);if(t==="bool")return this._encodeBool(n);throw new Error("Unsupported tag: "+t)},f.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},f.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},{"../base":158,"minimalistic-assert":169}],160:[function(e,t,n){function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}var r=e("inherits");n.Reporter=i,i.prototype.isError=function(t){return t instanceof s},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var n=this._reporterState;n.obj=t.obj,n.path=n.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.leaveKey=function(t,n,r){var i=this._reporterState;i.path=i.path.slice(0,t-1),i.obj!==null&&(i.obj[n]=r)},i.prototype.enterObject=function(){var t=this._reporterState,n=t.obj;return t.obj={},n},i.prototype.leaveObject=function(t){var n=this._reporterState,r=n.obj;return n.obj=t,r},i.prototype.error=function(t){var n,r=this._reporterState,i=t instanceof s;i?n=t:n=new s(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),t.message||t,t.stack);if(!r.options.partial)throw n;return i||r.errors.push(n),n},i.prototype.wrapResult=function(t){var n=this._reporterState;return n.options.partial?{result:this.isError(t)?null:t,errors:n.errors}:t},r(s,Error),s.prototype.rethrow=function(t){return this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace(this,s),this}},{inherits:285}],161:[function(e,t,n){var r=e("../constants");n.tagClass={0:"universal",1:"application",2:"context",3:"private"},n.tagClassByName=r._reverse(n.tagClass),n.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"},n.tagByName=r._reverse(n.tag)},{"../constants":162}],162:[function(e,t,n){var r=n;r._reverse=function(t){var n={};return Object.keys(t).forEach(function(e){(e|0)==e&&(e|=0);var r=t[e];n[r]=e}),n},r.der=e("./der")},{"./der":161}],163:[function(e,t,n){function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){s.Node.call(this,"der",e)}function l(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=u.tagClass[n>>6],i=(n&32)===0;if((n&31)===31){var s=n;n=0;while((s&128)===128){s=e.readUInt8(t);if(e.isError(s))return s;n<<=7,n|=s&127}}else n&=31;var o=u.tag[n];return{cls:r,primitive:i,tag:n,tagStr:o}}function c(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&r===128)return null;if((r&128)===0)return r;var i=r&127;if(i>=4)return e.error("length octect is too long");r=0;for(var s=0;s=31?r.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[n||"universal"]<<6,i)}var r=e("inherits"),i=e("buffer").Buffer,s=e("../../asn1"),o=s.base,u=s.bignum,a=s.constants.der;t.exports=f,f.prototype.encode=function(t,n){return this.tree._encode(t,n).join()},r(l,o.Node),l.prototype._encodeComposite=function(t,n,r,s){var o=h(t,n,r,this.reporter);if(s.length<128){var u=new i(2);return u[0]=o,u[1]=s.length,this._createEncoderBuffer([u,s])}var a=1;for(var f=s.length;f>=256;f>>=8)a++;var u=new i(2+a);u[0]=o,u[1]=128|a;for(var f=1+a,l=s.length;l>0;f--,l>>=8)u[f]=l&255;return this._createEncoderBuffer([u,s])},l.prototype._encodeStr=function(t,n){if(n==="octstr")return this._createEncoderBuffer(t);if(n==="bitstr")return this._createEncoderBuffer([t.unused|0,t.data]);if(n==="ia5str"||n==="utf8str")return this._createEncoderBuffer(t);if(n==="bmpstr"){var r=new i(t.length*2);for(var s=0;s=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,t[0]*40+t[1])}var o=0;for(var s=0;s=128;u>>=7)o++}var a=new i(o),f=a.length-1;for(var s=t.length-1;s>=0;s--){var u=t[s];a[f--]=u&127;while((u>>=7)>0)a[f--]=128|u&127}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(t,n){var r,i=new Date(t);return n==="gentime"?r=[c(i.getFullYear()),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):n==="utctime"?r=[c(i.getFullYear()%100),c(i.getUTCMonth()+1),c(i.getUTCDate()),c(i.getUTCHours()),c(i.getUTCMinutes()),c(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+n+" time is not supported yet"),this._encodeStr(r,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(t,n){if(typeof t=="string"){if(!n)return this.reporter.error("String int or enum given, but no values map");if(!n.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=n[t]}if(typeof t!="number"&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&r[0]&128&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var s=t.length;t.length===0&&s++;var o=new i(s);return t.copy(o),t.length===0&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);var s=1;for(var u=t;u>=256;u>>=8)s++;var o=new Array(s);for(var u=o.length-1;u>=0;u--)o[u]=t&255,t>>=8;return o[0]&128&&o.unshift(0),this._createEncoderBuffer(new i(o))},l.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},l.prototype._use=function(t,n){return typeof t=="function"&&(t=t(n)),t._getEncoder("der").tree},l.prototype._skipDefault=function(t,n,r){var i=this._baseState,s;if(i["default"]===null)return!1;var o=t.join();i.defaultBuffer===undefined&&(i.defaultBuffer=this._encodeValue(i["default"],n,r).join());if(o.length!==i.defaultBuffer.length)return!1;for(s=0;s0&&n.ishrn(r),n}function m(e,t){e=v(e,t),e=e.mod(t);var r=new n(e.toArray());if(r.length=t)throw new Error("invalid sig")}var r=e("./curves"),i=e("elliptic"),s=e("parse-asn1"),o=e("bn.js"),u=i.ec;t.exports=a}).call(this,e("buffer").Buffer)},{"./curves":124,"bn.js":125,buffer:88,elliptic:127,"parse-asn1":154}],190:[function(e,t,n){(function(n){function o(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length>5]|=128<>>9<<4)+14]=t;var n=1732584193,r=-271733879,i=-1732584194,s=271733878;for(var c=0;c>16)+(t>>16)+(n>>16);return r<<16|n&65535}function c(e,t){return e<>>32-t}var r=e("./helpers");t.exports=function(t){return r.hash(t,i,16)}},{"./helpers":217}],219:[function(e,t,n){arguments[4][109][0].apply(n,arguments)},{buffer:88,dup:109,inherits:285,stream:302,string_decoder:303}],220:[function(e,t,n){(function(e){function a(e){var t=[];for(var n=0,r=0;n>>5]|=e[n]<<24-r%32;return t}function f(e){var t=[];for(var n=0;n>>5]>>>24-n%32&255);return t}function l(e,t,a){for(var f=0;f<16;f++){var l=a+f,g=t[l];t[l]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var y,b,w,E,S,x,T,N,C,k;x=y=e[0],T=b=e[1],N=w=e[2],C=E=e[3],k=S=e[4];var L;for(f=0;f<80;f+=1)L=y+t[a+n[f]]|0,f<16?L+=c(b,w,E)+o[0]:f<32?L+=h(b,w,E)+o[1]:f<48?L+=p(b,w,E)+o[2]:f<64?L+=d(b,w,E)+o[3]:L+=v(b,w,E)+o[4],L|=0,L=m(L,i[f]),L=L+S|0,y=S,S=E,E=m(w,10),w=b,b=L,L=x+t[a+r[f]]|0,f<16?L+=v(T,N,C)+u[0]:f<32?L+=d(T,N,C)+u[1]:f<48?L+=p(T,N,C)+u[2]:f<64?L+=h(T,N,C)+u[3]:L+=c(T,N,C)+u[4],L|=0,L=m(L,s[f]),L=L+k|0,x=k,k=C,C=m(N,10),N=T,T=L;L=e[1]+w+C|0,e[1]=e[2]+E+k|0,e[2]=e[3]+S+x|0,e[3]=e[4]+y+T|0,e[4]=e[0]+b+N|0,e[0]=L}function c(e,t,n){return e^t^n}function h(e,t,n){return e&t|~e&n}function p(e,t,n){return(e|~t)^n}function d(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function m(e,t){return e<>>32-t}function g(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];typeof t=="string"&&(t=new e(t,"utf8"));var r=a(t),i=t.length*8,s=t.length*8;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360;for(var o=0;o>>24)&16711935|(u<<24|u>>>8)&4278255360}var c=f(n);return new e(c)}var n=[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],r=[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],i=[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],s=[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],o=[0,1518500249,1859775393,2400959708,2840853838],u=[1352829926,1548603684,1836072691,2053994217,0];t.exports=g}).call(this,e("buffer").Buffer)},{buffer:88}],221:[function(e,t,n){(function(e){function n(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}n.prototype.update=function(t,n){typeof t=="string"&&(n=n||"utf8",t=new e(t,n));var r=this._len+=t.length,i=this._s||0,s=0,o=this._block;while(i=this._finalSize*8&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var n=this._update(this._block)||this._hash();return e?n.toString(e):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:88}],222:[function(e,t,n){var n=t.exports=function(t){t=t.toLowerCase();var r=n[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};n.sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":223,"./sha1":224,"./sha224":225,"./sha256":226,"./sha384":227,"./sha512":228}],223:[function(e,t,n){(function(n){function o(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t){return e<>>32-t}var r=e("inherits"),i=e("./hash"),s=new Array(80);r(o,i),o.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},o.prototype._update=function(e){function l(){return t[a-3]^t[a-8]^t[a-14]^t[a-16]}function c(e,l){t[a]=e;var c=u(n,5)+l+o+e+f;o=s,s=i,i=u(r,30),r=n,n=c,a++}var t=this._w,n=this._a,r=this._b,i=this._c,s=this._d,o=this._e,a=0,f;f=1518500249;while(a<16)c(e.readInt32BE(a*4),r&i|~r&s);while(a<20)c(l(),r&i|~r&s);f=1859775393;while(a<40)c(l(),r^i^s);f=-1894007588;while(a<60)c(l(),r&i|r&s|i&s);f=-899497514;while(a<80)c(l(),r^i^s);this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},o.prototype._hash=function(){var e=new n(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=o}).call(this,e("buffer").Buffer)},{"./hash":221,buffer:88,inherits:285}],224:[function(e,t,n){(function(n){function o(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t){return e<>>32-t}var r=e("inherits"),i=e("./hash"),s=new Array(80);r(o,i),o.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},o.prototype._update=function(e){function l(){return u(t[a-3]^t[a-8]^t[a-14]^t[a-16],1)}function c(e,l){t[a]=e;var c=u(n,5)+l+o+e+f;o=s,s=i,i=u(r,30),r=n,n=c,a++}var t=this._w,n=this._a,r=this._b,i=this._c,s=this._d,o=this._e,a=0,f;f=1518500249;while(a<16)c(e.readInt32BE(a*4),r&i|~r&s);while(a<20)c(l(),r&i|~r&s);f=1859775393;while(a<40)c(l(),r^i^s);f=-1894007588;while(a<60)c(l(),r&i|r&s|i&s);f=-899497514;while(a<80)c(l(),r^i^s);this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=o+this._e|0},o.prototype._hash=function(){var e=new n(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=o}).call(this,e("buffer").Buffer)},{"./hash":221,buffer:88,inherits:285}],225:[function(e,t,n){(function(n){function u(){this.init(),this._w=o,s.call(this,64,56)}var r=e("inherits"),i=e("./sha256"),s=e("./hash"),o=new Array(64);r(u,i),u.prototype.init=function(){return this._a=-1056596264,this._b=914150663,this._c=812702999,this._d=-150054599,this._e=-4191439,this._f=1750603025,this._g=1694076839,this._h=-1090891868,this},u.prototype._hash=function(){var e=new n(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u}).call(this,e("buffer").Buffer)},{"./hash":221,"./sha256":226,buffer:88,inherits:285}],226:[function(e,t,n){(function(n){function u(){this.init(),this._w=o,i.call(this,64,56)}function a(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function c(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var r=e("inherits"),i=e("./hash"),s=[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],o=new Array(64);r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){function y(){return p(t[g-2])+t[g-7]+h(t[g-15])+t[g-16]}function b(e){t[g]=e;var h=m+c(u)+a(u,d,v)+s[g]+e,p=l(n)+f(n,r,i);m=v,v=d,d=u,u=o+h,o=i,i=r,r=n,n=h+p,g++}var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,u=this._e|0,d=this._f|0,v=this._g|0,m=this._h|0,g=0;while(g<16)b(e.readInt32BE(g*4));while(g<64)b(y());this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=new n(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=u}).call(this,e("buffer").Buffer)},{"./hash":221,buffer:88,inherits:285}],227:[function(e,t,n){(function(n){function u(){this.init(),this._w=o,s.call(this,128,112)}var r=e("inherits"),i=e("./sha512"),s=e("./hash"),o=new Array(160);r(u,i),u.prototype.init=function(){return this._a=-876896931,this._b=1654270250,this._c=-1856437926,this._d=355462360,this._e=1731405415,this._f=-1900787065,this._g=-619958771,this._h=1203062813,this._al=-1056596264,this._bl=914150663,this._cl=812702999,this._dl=-150054599,this._el=-4191439,this._fl=1750603025,this._gl=1694076839,this._hl=-1090891868,this},u.prototype._hash=function(){function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}var e=new n(48);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),e},t.exports=u}).call(this,e("buffer").Buffer)},{"./hash":221,"./sha512":228,buffer:88,inherits:285}],228:[function(e,t,n){(function(n){function u(){this.init(),this._w=o,i.call(this,128,112)}function a(e,t,n){return n^e&(t^n)}function f(e,t,n){return e&t|n&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function c(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}var r=e("inherits"),i=e("./hash"),s=[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],o=new Array(160);r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this},u.prototype._update=function(e){function M(){var e=t[L-30],n=t[L-30+1],r=h(e,n),i=p(n,e);e=t[L-4],n=t[L-4+1];var s=d(e,n),o=v(n,e),u=t[L-14],a=t[L-14+1],f=t[L-32],l=t[L-32+1];O=i+a,A=r+u+(O>>>0>>0?1:0),O+=o,A=A+s+(O>>>0>>0?1:0),O+=l,A=A+f+(O>>>0>>0?1:0)}function _(){t[L]=A,t[L+1]=O;var e=f(n,r,i),h=f(b,w,E),p=l(n,b),d=l(b,n),v=c(u,x),M=c(x,u),_=s[L],D=s[L+1],P=a(u,m,g),H=a(x,T,N),B=C+M,F=y+v+(B>>>0>>0?1:0);B+=H,F=F+P+(B>>>0>>0?1:0),B+=D,F=F+_+(B>>>0>>0?1:0),B+=O,F=F+A+(B>>>0>>0?1:0);var I=d+h,q=p+e+(I>>>0>>0?1:0);y=g,C=N,g=m,N=T,m=u,T=x,x=S+B|0,u=o+F+(x>>>0>>0?1:0)|0,o=i,S=E,i=r,E=w,r=n,w=b,b=B+I|0,n=F+q+(b>>>0>>0?1:0)|0,k++,L+=2}var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,u=this._e|0,m=this._f|0,g=this._g|0,y=this._h|0,b=this._al|0,w=this._bl|0,E=this._cl|0,S=this._dl|0,x=this._el|0,T=this._fl|0,N=this._gl|0,C=this._hl|0,k=0,L=0,A,O;while(k<16)A=e.readInt32BE(L*4),O=e.readInt32BE(L*4+4),_();while(k<80)M(),_();this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+x|0,this._fl=this._fl+T|0,this._gl=this._gl+N|0,this._hl=this._hl+C|0,this._a=this._a+n+(this._al>>>0>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0>>0?1:0)|0,this._c=this._c+i+(this._cl>>>0>>0?1:0)|0,this._d=this._d+o+(this._dl>>>0>>0?1:0)|0,this._e=this._e+u+(this._el>>>0>>0?1:0)|0,this._f=this._f+m+(this._fl>>>0>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+y+(this._hl>>>0>>0?1:0)|0},u.prototype._hash=function(){function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}var e=new n(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),e},t.exports=u}).call(this,e("buffer").Buffer)},{"./hash":221,buffer:88,inherits:285}],229:[function(e,t,n){(function(n){"use strict";function u(e,t){s.call(this),e=e.toLowerCase(),typeof t=="string"&&(t=new n(t));var i=e==="sha512"||e==="sha384"?128:64;this._alg=e,this._key=t,t.length>i?t=r(e).update(t).digest():t.lengthe)n.ishrn(1);n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(f);if(!t.cmp(f))while(n.mod(s).cmp(m))n.iadd(g);else if(!t.cmp(l))while(n.mod(p).cmp(d))n.iadd(g);o=n.shrn(1);if(E(o)&&E(n)&&S(o)&&S(n)&&u.test(o)&&u.test(n))return n}}var r=e("randombytes");t.exports=x,x.simpleSieve=E,x.fermatTest=S;var i=e("bn.js"),s=new i(24),o=e("miller-rabin"),u=new o,a=new i(1),f=new i(2),l=new i(5),c=new i(16),h=new i(8),p=new i(10),d=new i(3),v=new i(7),m=new i(11),g=new i(4),y=new i(12),b=null},{"bn.js":234,"miller-rabin":235,randombytes:283}],233:[function(e,t,n){t.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"}}},{}],234:[function(e,t,n){arguments[4][125][0].apply(n,arguments)},{dup:125}],235:[function(e,t,n){function s(e){this.rand=e||new i.Rand}var r=e("bn.js"),i=e("brorand");t.exports=s,s.create=function(t){return new s(t)},s.prototype._rand=function(t){var n=t.bitLength(),i=this.rand.generate(Math.ceil(n/8));i[0]|=3;var s=n&7;return s!==0&&(i[i.length-1]>>=7-s),new r(i)},s.prototype.test=function(t,n,i){var s=t.bitLength(),o=r.mont(t),u=(new r(1)).toRed(o);n||(n=Math.max(1,s/48|0));var a=t.subn (1),f=a.subn(1);for(var l=0;!a.testn(l);l++);var c=t.shrn(l),h=a.toRed(o),p=!0;for(;n>0;n--){var d=this._rand(f);i&&i(d);var v=d.toRed(o).redPow(c);if(v.cmp(u)===0||v.cmp(h)===0)continue;for(var m=1;m0;n--){var h=this._rand(a),p=t.gcd(h);if(p.cmpn(1)!==0)return p;var d=h.toRed(s).redPow(l);if(d.cmp(o)===0||d.cmp(c)===0)continue;for(var v=1;vi)throw new TypeError("Bad key length");u=u||"sha1",t.isBuffer(e)||(e=new t(e,"binary")),t.isBuffer(n)||(n=new t(n,"binary"));var a,f=1,l=new t(o),c=new t(n.length+4);n.copy(c,0,0,n.length);var h,p;for(var d=1;d<=f;d++){c.writeUInt32BE(d,n.length);var v=r(u,e).update(c).digest();a||(a=v.length,p=new t(a),f=Math.ceil(o/a),h=o-(f-1)*a),v.copy(p,0,0,a);for(var m=1;m=t.length){s++;break}var o=t.slice(2,i-1),u=t.slice(i-1,i);(r.toString("hex")!=="0002"&&!n||r.toString("hex")!=="0001"&&n)&&s++,o.length<8&&s++;if(s)throw new Error("decryption error");return t.slice(i)}function h(e,t){e=new n(e),t=new n(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var s=-1;while(++sp||(new o(i)).cmp(h.modulus)>=0)throw new Error("decryption error");var d;s?d=f(new o(i),h):d=u(i,h);var v=new n(p-d.length);v.fill(0),d=n.concat([v,d],p);if(a===4)return l(h,d);if(a===1)return c(h,d,s);if(a===3)return d;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":239,"./withPublic":281,"./xor":282,"bn.js":240,"browserify-rsa":241,buffer:88,"create-hash":216,"parse-asn1":245}],280:[function(e,t,n){(function(n){function h(e,t){var r=e.modulus.byteLength(),f=t.length,l=s("sha1").update(new n("")).digest(),c=l.length,h=2*c;if(f>r-h-2)throw new Error("message too long");var p=new n(r-f-h-2);p.fill(0);var d=r-c-1,v=i(c),m=u(n.concat([l,p,new n([1]),t],d),o(v,d)),g=u(v,o(m,c));return new a(n.concat([new n([0]),g,m],r))}function p(e,t,r){var i=t.length,s=e.modulus.byteLength();if(i>s-11)throw new Error("message too long");var o;return r?(o=new n(s-i-3),o.fill(255)):o=d(s-i-3),new a(n.concat([new n([0,r?1:2]),o,new n([0]),t],s))}function d(e,t){var r=new n(e),s=0,o=i(e*2),u=0,a;while(s=0)throw new Error("data too long for modulus")}return i?l(u,o):f(u,o)}}).call(this,e("buffer").Buffer)},{"./mgf":239,"./withPublic":281,"./xor":282,"bn.js":240,"browserify-rsa":241,buffer:88,"create-hash":216,"parse-asn1":245,randombytes:283}],281:[function(e,t,n){(function(n){function i(e,t){return new n(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}var r=e("bn.js");t.exports=i}).call(this,e("buffer").Buffer)},{"bn.js":240,buffer:88}],282:[function(e,t,n){t.exports=function(t,n){var r=t.length,i=-1;while(++i65536)throw new Error("requested too many random bytes");var o=new n.Uint8Array(t);s.getRandomValues(o);var u=new r(o.buffer);return typeof i=="function"?e.nextTick(function(){i(null,u)}):u}var s=n.crypto||n.msCrypto;s&&s.getRandomValues?t.exports=o:t.exports=i}).call(this,e("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},e("buffer").Buffer)},{_process:288,buffer:88}],284:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||undefined}function i(e){return typeof e=="function"}function s(e){return typeof e=="number"}function o(e){return typeof e=="object"&&e!==null}function u(e){return e===void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=undefined,r.prototype._maxListeners=undefined,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,a,f;this._events||(this._events={});if(e==="error")if(!this._events.error||o(this._events.error)&&!this._events.error.length)throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');n=this._events[e];if(u(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n)){s=Array.prototype.slice.call(arguments,1),f=n.slice(),r=f.length;for(a=0;a0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,u;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e],s=n.length,r=-1;if(n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){r=u;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}return this.removeAllListeners("removeListener"),this._events={},this}n=this._events[e];if(i(n))this.removeListener(e,n);else if(n)while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:i(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],285:[function(e,t,n){typeof Object.create=="function"?t.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],286:[function(e,t,n){t.exports=function(e){return e!=null&&!!(e._isBuffer||e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))}},{}],287:[function(e,t,n){t.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}},{}],288:[function(e,t,n){function a(){s=!1,o.length?i=o.concat(i):u=-1,i.length&&f()}function f(){if(s)return;var e=setTimeout(a);s=!0;var t=i.length;while(t){o=i,i=[];while(++u1)for(var n=1;n0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else t.decoder&&!i&&!r&&(n=t.decoder.write(n)),i||(t.reading=!1),t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),N(e,t);else i||(t.reading=!1);return g(t)}function g(e){return!e.ended&&(e.needReadable||e.length=y?e=y:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function w(e,t){return t.length===0&&t.ended?0:t.objectMode?e===0?0:1:e===null||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=b(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function E(e,t){var n=null;return!s.isBuffer(t)&&typeof t!="string"&&t!==null&&t!==undefined&&!e.objectMode&&(n=new TypeError("Invalid non-string/buffer chunk")),n}function S(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,x(e)}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r(T,e):T(e))}function T(e){c("emit readable"),e.emit("readable"),M(e)}function N(e,t){t.readingMore||(t.readingMore=!0,r(C,e,t))}function C(e,t){var n=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length=r)i?u=n.join(""):n.length===1?u=n[0]:u=s.concat(n,r),n.length=0;else if(e0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,r(P,t,e))}function P(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function H(e,t){for(var n=0,r=e.length;n0)t.emittedReadable=!1;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?D(this):x(this),null;e=w(e,t);if(e===0&&t.ended)return t.length===0&&D(this),null;var r=t.needReadable;c("need readable",r);if(t.length===0||t.length-e0?i=_(e,t):i=null,i===null&&(t.needReadable=!0,e=0),t.length-=e,t.length===0&&!t.ended&&(t.needReadable=!0),n!==e&&t.ended&&t.length===0&&D(this),i!==null&&this.emit("data",i),i},v.prototype._read=function(e){this.emit("error",new Error("not implemented"))},v.prototype.pipe=function(e,t){function l(e){c("onunpipe"),e===s&&v()}function h(){c("onend"),e.end()}function v(){c("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",p),e.removeListener("error",g),e.removeListener("unpipe",l),s.removeListener("end",h),s.removeListener("end",v),s.removeListener("data",m),d=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&p()}function m(t){c("ondata");var n=e.write(t);!1===n&&(o.pipesCount===1&&o.pipes[0]===e&&s.listenerCount("data")===1&&!d&&(c("false write response, pause",s._readableState.awaitDrain),s._readableState.awaitDrain++),s.pause())}function g(t){c("onerror",t),w(),e.removeListener("error",g),u(e,"error")===0&&e.emit("error",t)}function y(){e.removeListener("finish",b),w()}function b(){c("onfinish"),e.removeListener("close",y),w()}function w(){c("unpipe"),s.unpipe(e)}var s=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,f=a?h:v;o.endEmitted?r(f):s.once("end",f),e.on("unpipe",l);var p=k(s);e.on("drain",p);var d=!1;return s.on("data",m),!e._events||!e._events.error?e.on("error",g):i(e._events.error)?e._events.error.unshift(g):e._events.error=[g,e._events.error],e.once("close",y),e.once("finish",b),e.emit("pipe",s),o.flowing||(c("pipe resume"),s.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1))throw new TypeError("Unknown encoding: "+t);this._writableState.defaultEncoding=t},h.prototype._write=function(e,t,n){n(new Error("not implemented"))},h.prototype._writev=null,h.prototype.end=function(e,t,n){var r=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!==null&&e!==undefined&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),!r.ending&&!r.finished&&k(this,r,n)}},{"./_stream_duplex":290,buffer:88,"core-util-is":295,events:284,inherits:285,"process-nextick-args":296,"util-deprecate":297}],295:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):m(e)==="[object Array]"}function r(e){return typeof e=="boolean"}function i(e){return e===null}function s(e){return e==null}function o(e){return typeof e=="number"}function u(e){return typeof e=="string"}function a(e){return typeof e=="symbol"}function f(e){return e===void 0}function l(e){return m(e)==="[object RegExp]"}function c(e){return typeof e=="object"&&e!==null}function h(e){return m(e)==="[object Date]"}function p(e){return m(e)==="[object Error]"||e instanceof Error}function d(e){return typeof e=="function"}function v(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function m(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=s,n.isNumber=o,n.isString=u,n.isSymbol=a,n.isUndefined=f,n.isRegExp=l,n.isObject=c,n.isDate=h,n.isError=p,n.isFunction=d,n.isPrimitive=v,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":286}],296:[function(e,t,n){(function(e){"use strict";function n(t){var n=new Array(arguments.length-1),r=0;while(r=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n;if(this.charReceived=55296&&r<=56319){this.charLength+=this.surrogateSize,t="";continue}this.charReceived=this.charLength=0;if(e.length===0)return t;break}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){var t=e.length>=3?3:e.length;for(;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";e&&e.length&&(t=this.write(e));if(this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:88}],304:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n1)return i.encode.apply(this,arguments);throw new Error("multihash must be called with the encode or decode parameters.")};i.names={sha1:17,"sha2-256":18,"sha2-512":19,sha3:20,blake2b:64,blake2s:65},i.codes=r(i.names),i.defaultLengths={17:20,18:32,19:64,20:64,64:64,65:32},i.encode=function(t,r,s){if(!t||!r)throw new Error("multihash encode requires at least two args: hashfn, digest");r=i.coerceCode(r);if(!n.isBuffer(t))throw new Error("digest should be a Buffer");s||(s=t.length);if(s&&t.length!==s)throw new Error("digest length should be equal to specified length.");if(s>127)throw new Error("multihash does not yet support digest lengths greater than 127 bytes.");return n.concat([new n([r,s]),t])},i.decode=function(t){var n=i.validate(t);if(n)throw n;var r={};return r.code=t[0],r.name=i.codes[r.code],r.length=t[1],r.digest=t.slice(2),r},i.validate=function(t){return n.isBuffer(t)?t.length<3?new Error("multihash too short. must be > 3 bytes."):t.length>129?new Error("multihash too long. must be < 129 bytes."):!i.isAppCode(t[0])&&!i.codes[t[0]]?new Error("multihash unknown function code: 0x"+t[0].toString(16)):t.slice(2).length!==t[1]?new Error("multihash length inconsistent: 0x"+t.toString("hex")):!1:new Error("multihash must be a Buffer")},i.coerceCode=function(t){var n=t;if(typeof t=="string"){if(!i.names[t])throw new Error("Unrecognized hash function named: "+t);n=i.names[t]}if(typeof n!="number")throw new Error("Hash function code should be a number. Got: "+n);if(!i.codes[n]&&!i.isAppCode(n))throw new Error("Unrecognized function code: "+n);return n},i.isAppCode=function(t){return t>0&&t<16}}).call(this,e("buffer").Buffer)},{buffer:88,"invert-hash":2}],web3:[function(e,t,n){var r=e("./lib/web3");typeof window!="undefined"&&typeof window.Web3=="undefined"&&(window.Web3=r),t.exports=r},{"./lib/web3":25}]},{},[]);