web3.js/dist/web3-light.min.js

4 lines
121 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

require=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){var n=t("bignumber.js"),i=t("../utils/utils"),o=t("./formatters"),s=t("./param"),a=function(t){return"[]"===t.slice(-2)},u=function(t){this._name=t.name,this._match=t.match,this._mode=t.mode,this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};u.prototype.isType=function(t){return"strict"===this._match?this._name===t||0===t.indexOf(this._name)&&"[]"===t.slice(this._name.length):"prefix"===this._match?0===t.indexOf(this._name):void 0},u.prototype.formatInput=function(t,e){if(i.isArray(t)&&e){var r=this;return t.map(function(t){return r._inputFormatter(t)}).reduce(function(t,e){return t.combine(e)},o.formatInputInt(t.length)).withOffset(32)}return this._inputFormatter(t)},u.prototype.formatOutput=function(t,e){if(e){for(var r=[],i=new n(t.dynamicPart().slice(0,64),16),o=0;64*i>o;o+=64)r.push(this._outputFormatter(new s(t.dynamicPart().substr(o+64,64))));return r}return this._outputFormatter(t)},u.prototype.sliceParam=function(t,e,r){return"bytes"===this._mode?s.decodeBytes(t,e):a(r)?s.decodeArray(t,e):s.decodeParam(t,e)};var c=function(t){this._types=t};c.prototype._requireType=function(t){var e=this._types.filter(function(e){return e.isType(t)})[0];if(!e)throw Error("invalid solidity type!: "+t);return e},c.prototype._formatInput=function(t,e){return this._requireType(t).formatInput(e,a(t))},c.prototype.encodeParam=function(t,e){return this._formatInput(t,e).encode()},c.prototype.encodeParams=function(t,e){var r=this,n=t.map(function(t,n){return r._formatInput(t,e[n])});return s.encodeList(n)},c.prototype.decodeParam=function(t,e){return this.decodeParams([t],e)[0]},c.prototype.decodeParams=function(t,e){var r=this;return t.map(function(t,n){var i=r._requireType(t),o=i.sliceParam(e,n,t);return i.formatOutput(o,a(t))})};var h=new c([new u({name:"address",match:"strict",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputAddress}),new u({name:"bool",match:"strict",mode:"value",inputFormatter:o.formatInputBool,outputFormatter:o.formatOutputBool}),new u({name:"int",match:"prefix",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputInt}),new u({name:"uint",match:"prefix",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputUInt}),new u({name:"bytes",match:"strict",mode:"bytes",inputFormatter:o.formatInputDynamicBytes,outputFormatter:o.formatOutputDynamicBytes}),new u({name:"bytes",match:"prefix",mode:"value",inputFormatter:o.formatInputBytes,outputFormatter:o.formatOutputBytes}),new u({name:"real",match:"prefix",mode:"value",inputFormatter:o.formatInputReal,outputFormatter:o.formatOutputReal}),new u({name:"ureal",match:"prefix",mode:"value",inputFormatter:o.formatInputReal,outputFormatter:o.formatOutputUReal})]);e.exports=h},{"../utils/utils":6,"./formatters":2,"./param":3,"bignumber.js":"bignumber.js"}],2:[function(t,e,r){var n=t("bignumber.js"),i=t("../utils/utils"),o=t("../utils/config"),s=t("./param"),a=function(t){var e=2*o.ETH_PADDING;n.config(o.ETH_BIGNUMBER_ROUNDING_MODE);var r=i.padLeft(i.toTwosComplement(t).round().toString(16),e);return new s(r)},u=function(t){var e=i.fromAscii(t,o.ETH_PADDING).substr(2);return new s(e)},c=function(t){var e=i.fromAscii(t,o.ETH_PADDING).substr(2);return new s(a(t.length).value+e,32)},h=function(t){var e="000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0");return new s(e)},f=function(t){return a(new n(t).times(new n(2).pow(128)))},l=function(t){return"1"===new n(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){var e=t.staticPart()||"0";return l(e)?new n(e,16).minus(new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new n(e,16)},d=function(t){var e=t.staticPart()||"0";return new n(e,16)},m=function(t){return p(t).dividedBy(new n(2).pow(128))},g=function(t){return d(t).dividedBy(new n(2).pow(128))},y=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t.staticPart()?!0:!1},v=function(t){return i.toAscii(t.staticPart())},b=function(t){return i.toAscii(t.dynamicPart().slice(64))},w=function(t){var e=t.staticPart();return"0x"+e.slice(e.length-40,e.length)};e.exports={formatInputInt:a,formatInputBytes:u,formatInputDynamicBytes:c,formatInputBool:h,formatInputReal:f,formatOutputInt:p,formatOutputUInt:d,formatOutputReal:m,formatOutputUReal:g,formatOutputBool:y,formatOutputBytes:v,formatOutputDynamicBytes:b,formatOutputAddress:w}},{"../utils/config":4,"../utils/utils":6,"./param":3,"bignumber.js":"bignumber.js"}],3:[function(t,e,r){var n=t("../utils/utils"),i=function(t,e){this.value=t||"",this.offset=e};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(t){return new i(this.value,t)},i.prototype.combine=function(t){return new i(this.value+t.value)},i.prototype.isDynamic=function(){return this.value.length>64||void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?n.padLeft(n.toTwosComplement(this.offset).toString(16),64):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(t){var e=32*t.length,r=t.map(function(t){if(!t.isDynamic())return t;var r=e;return e+=t.dynamicPartLength(),t.withOffset(r)});return r.reduce(function(t,e){return t+e.dynamicPart()},r.reduce(function(t,e){return t+e.staticPart()},""))},i.decodeParam=function(t,e){return e=e||0,new i(t.substr(64*e,64))};var o=function(t,e){return parseInt("0x"+t.substr(64*e,64))};i.decodeBytes=function(t,e){e=e||0;var r=o(t,e);return new i(t.substr(2*r,128),0)},i.decodeArray=function(t,e){e=e||0;var r=o(t,e),n=parseInt("0x"+t.substr(2*r,64));return new i(t.substr(2*r,64*(n+1)),0)},e.exports=i},{"../utils/utils":6}],4:[function(t,e,r){var n=t("bignumber.js"),i=["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:n.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},{"bignumber.js":"bignumber.js"}],5:[function(t,e,r){var n=t("./utils"),i=t("crypto-js/sha3");e.exports=function(t,e){return"0x"!==t.substr(0,2)||e||(console.warn("requirement of using web3.fromAscii before sha3 is deprecated"),console.warn("new usage: 'web3.sha3(\"hello\")'"),console.warn("see https://github.com/ethereum/web3.js/pull/205"),console.warn("if you need to hash hex value, you can do 'sha3(\"0xfff\", true)'"),t=n.toAscii(t)),i(t,{outputLength:256}).toString()}},{"./utils":6,"crypto-js/sha3":65}],6:[function(t,e,r){var n=t("bignumber.js"),i={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(t,e,r){return new Array(e-t.length+1).join(r?r:"0")+t},s=function(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);n>r;r+=2){var i=parseInt(t.substr(r,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},a=function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return e},u=function(t,e){e=void 0===e?0:e;for(var r=a(t);r.length<2*e;)r+="00";return"0x"+r},c=function(t){if(-1!==t.name.indexOf("("))return t.name;var e=t.inputs.map(function(t){return t.type}).join();return t.name+"("+e+")"},h=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},f=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},l=function(t){return v(t).toNumber()},p=function(t){var e=v(t),r=e.toString(16);return e.lessThan(0)?"-0x"+r.substr(1):"0x"+r},d=function(t){if(B(t))return p(+t);if(x(t))return p(t);if(I(t))return u(JSON.stringify(t));if(S(t)){if(0===t.indexOf("-0x"))return p(t);if(!isFinite(t))return u(t)}return p(t)},m=function(t){t=t?t.toLowerCase():"ether";var e=i[t];if(void 0===e)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(i,null,2));return new n(e,10)},g=function(t,e){var r=v(t).dividedBy(m(e));return x(t)?r:r.toString(10)},y=function(t,e){var r=v(t).times(m(e));return x(t)?r:r.toString(10)},v=function(t){return t=t||0,x(t)?t:!S(t)||0!==t.indexOf("0x")&&0!==t.indexOf("-0x")?new n(t.toString(10),10):new n(t.replace("0x",""),16)},b=function(t){var e=v(t);return e.lessThan(0)?new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(e).plus(1):e},w=function(t){return/^0x[0-9a-f]{40}$/.test(t)},_=function(t){return/^(0x)?[0-9a-f]{40}$/.test(t)},E=function(t){return w(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+o(d(t).substr(2),40)},x=function(t){return t instanceof n||t&&t.constructor&&"BigNumber"===t.constructor.name},S=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},A=function(t){return"function"==typeof t},I=function(t){return"object"==typeof t},B=function(t){return"boolean"==typeof t},T=function(t){return t instanceof Array},O=function(t){try{return!!JSON.parse(t)}catch(e){return!1}},k=function(t){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30})$/.test(t)};e.exports={padLeft:o,toHex:d,toDecimal:l,fromDecimal:p,toAscii:s,fromAscii:u,transformToFullName:c,extractDisplayName:h,extractTypeName:f,toWei:y,fromWei:g,toBigNumber:v,toTwosComplement:b,toAddress:E,isBigNumber:x,isStrictAddress:w,isAddress:_,isFunction:A,isString:S,isObject:I,isBoolean:B,isArray:T,isJson:O,isIBAN:k}},{"bignumber.js":"bignumber.js"}],7:[function(t,e,r){e.exports={version:"0.6.1"}},{}],8:[function(t,e,r){var n=t("./version.json"),i=t("./web3/net"),o=t("./web3/eth"),s=t("./web3/db"),a=t("./web3/shh"),u=t("./web3/watches"),c=t("./web3/filter"),h=t("./utils/utils"),f=t("./web3/formatters"),l=t("./web3/requestmanager"),p=t("./utils/config"),d=t("./web3/property"),m=t("./web3/batch"),g=t("./utils/sha3"),y=[new d({name:"version.client",getter:"web3_clientVersion"}),new d({name:"version.network",getter:"net_version",inputFormatter:h.toDecimal}),new d({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:h.toDecimal}),new d({name:"version.whisper",getter:"shh_version",inputFormatter:h.toDecimal})],v=function(t,e){e.forEach(function(e){e.attachToObject(t)})},b=function(t,e){e.forEach(function(e){e.attachToObject(t)})},w={};w.providers={},w.currentProvider=null,w.version={},w.version.api=n.version,w.eth={},w.eth.filter=function(t,e,r,n){return h.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1]),t._isEvent?t(e,r,n):new c(t,u.eth(),n,f.outputLogFormatter)},w.shh={},w.shh.filter=function(t,e){return new c(t,u.shh(),e,f.outputPostFormatter)},w.net={},w.db={},w.setProvider=function(t){this.currentProvider=t,l.getInstance().setProvider(t)},w.reset=function(){l.getInstance().reset(),p.defaultBlock="latest",p.defaultAccount=void 0},w.toHex=h.toHex,w.toAscii=h.toAscii,w.fromAscii=h.fromAscii,w.toDecimal=h.toDecimal,w.fromDecimal=h.fromDecimal,w.toBigNumber=h.toBigNumber,w.toWei=h.toWei,w.fromWei=h.fromWei,w.isAddress=h.isAddress,w.isIBAN=h.isIBAN,w.sha3=g,w.createBatch=function(){return new m},Object.defineProperty(w.eth,"defaultBlock",{get:function(){return p.defaultBlock},set:function(t){return p.defaultBlock=t,t}}),Object.defineProperty(w.eth,"defaultAccount",{get:function(){return p.defaultAccount},set:function(t){return p.defaultAccount=t,t}}),w._extend=function(t){t.property&&!w[t.property]&&(w[t.property]={}),v(w[t.property]||w,t.methods||[]),b(w[t.property]||w,t.properties||[])},w._extend.formatters=f,w._extend.utils=h,w._extend.Method=t("./web3/method"),w._extend.Property=t("./web3/property"),b(w,y),v(w.net,i.methods),b(w.net,i.properties),v(w.eth,o.methods),b(w.eth,o.properties),v(w.db,s.methods),v(w.shh,a.methods),e.exports=w},{"./utils/config":4,"./utils/sha3":5,"./utils/utils":6,"./version.json":7,"./web3/batch":9,"./web3/db":11,"./web3/eth":13,"./web3/filter":15,"./web3/formatters":16,"./web3/method":21,"./web3/net":23,"./web3/property":24,"./web3/requestmanager":26,"./web3/shh":27,"./web3/watches":29}],9:[function(t,e,r){var n=t("./requestmanager"),i=function(){this.requests=[]};i.prototype.add=function(t){this.requests.push(t)},i.prototype.execute=function(){var t=this.requests;n.getInstance().sendBatch(t,function(e,r){r=r||[],t.map(function(t,e){return r[e]||{}}).map(function(e,r){return t[r].format?t[r].format(e.result):e.result}).forEach(function(r,n){t[n].callback&&t[n].callback(e,r)})})},e.exports=i},{"./requestmanager":26}],10:[function(t,e,r){var n=t("../web3"),i=t("../utils/utils"),o=t("../solidity/coder"),s=t("./event"),a=t("./function"),u=function(t,e){return t.filter(function(t){return"constructor"===t.type&&t.inputs.length===e.length}).map(function(t){return t.inputs.map(function(t){return t.type})}).map(function(t){return o.encodeParams(t,e)})[0]||""},c=function(t,e){e.filter(function(t){return"function"===t.type}).map(function(e){return new a(e,t.address)}).forEach(function(e){e.attachToContract(t)})},h=function(t,e){e.filter(function(t){return"event"===t.type}).map(function(e){return new s(e,t.address)}).forEach(function(e){e.attachToContract(t)})},f=function(t){return new l(t)},l=function(t){this.abi=t};l.prototype["new"]=function(){var t,e={},r=Array.prototype.slice.call(arguments);i.isFunction(r[r.length-1])&&(t=r.pop());var o=r[r.length-1];i.isObject(o)&&!i.isArray(o)&&(e=r.pop());var s=u(this.abi,r);if(e.data+=s,!t){var a=n.eth.sendTransaction(e);return this.at(a)}var c=this;n.eth.sendTransaction(e,function(e,r){e&&t(e),c.at(r,t)})},l.prototype.at=function(t,e){return e&&e(null,new p(this.abi,t)),new p(this.abi,t)};var p=function(t,e){this.address=e,c(this,t),h(this,t)};e.exports=f},{"../solidity/coder":1,"../utils/utils":6,"../web3":8,"./event":14,"./function":17}],11:[function(t,e,r){var n=t("./method"),i=new n({name:"putString",call:"db_putString",params:3}),o=new n({name:"getString",call:"db_getString",params:2}),s=new n({name:"putHex",call:"db_putHex",params:3}),a=new n({name:"getHex",call:"db_getHex",params:2}),u=[i,o,s,a];e.exports={methods:u}},{"./method":21}],12:[function(t,e,r){e.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+", is it running?")},InvalidProvider:function(){return new Error("Providor not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response";return new Error(e)}}},{}],13:[function(t,e,r){"use strict";var n=t("./formatters"),i=t("../utils/utils"),o=t("./method"),s=t("./property"),a=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},u=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},c=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},h=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},f=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},l=new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[i.toAddress,n.inputDefaultBlockNumberFormatter],outputFormatter:n.outputBigNumberFormatter}),p=new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,n.inputDefaultBlockNumberFormatter]}),d=new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[i.toAddress,n.inputDefaultBlockNumberFormatter]}),m=new o({name:"getBlock",call:a,params:2,inputFormatter:[n.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:n.outputBlockFormatter}),g=new o({name:"getUncle",call:c,params:2,inputFormatter:[n.inputBlockNumberFormatter,i.toHex],outputFormatter:n.outputBlockFormatter}),y=new o({name:"getCompilers",call:"eth_getCompilers",params:0}),v=new o({name:"getBlockTransactionCount",call:h,params:1,inputFormatter:[n.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),b=new o({name:"getBlockUncleCount",call:f,params:1,inputFormatter:[n.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),w=new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:n.outputTransactionFormatter}),_=new o({name:"getTransactionFromBlock",call:u,params:2,inputFormatter:[n.inputBlockNumberFormatter,i.toHex],outputFormatter:n.outputTransactionFormatter}),E=new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,n.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),x=new o({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[]}),S=new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[n.inputTransactionFormatter]}),A=new o({name:"call",call:"eth_call",params:2,inputFormatter:[n.inputTransactionFormatter,n.inputDefaultBlockNumberFormatter]}),I=new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[n.inputTransactionFormatter],outputFormatter:i.toDecimal}),B=new o({name:"compile.solidity",call:"eth_compileSolidity",params:1}),T=new o({name:"compile.lll",call:"eth_compileLLL",params:1}),O=new o({name:"compile.serpent",call:"eth_compileSerpent",params:1}),k=new o({name:"submitWork",call:"eth_submitWork",params:3}),R=new o({name:"getWork",call:"eth_getWork",params:0}),L=[l,p,d,m,g,y,v,b,w,_,E,A,I,x,S,B,T,O,k,R],N=[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:n.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal})];e.exports={methods:L,properties:N}},{"../utils/utils":6,"./formatters":16,"./method":21,"./property":24}],14:[function(t,e,r){var n=t("../utils/utils"),i=t("../solidity/coder"),o=(t("../web3"),t("./formatters")),s=t("../utils/sha3"),a=t("./filter"),u=t("./watches"),c=function(t,e){this._params=t.inputs,this._name=n.transformToFullName(t),this._address=e,this._anonymous=t.anonymous};c.prototype.types=function(t){return this._params.filter(function(e){return e.indexed===t}).map(function(t){return t.type})},c.prototype.displayName=function(){return n.extractDisplayName(this._name)},c.prototype.typeName=function(){return n.extractTypeName(this._name)},c.prototype.signature=function(){return s(this._name)},c.prototype.encode=function(t,e){t=t||{},e=e||{};var r={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){r[t]=o.inputBlockNumberFormatter(e[t])}),r.topics=[],this._anonymous||(r.address=this._address,r.topics.push("0x"+this.signature()));var s=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var r=t[e.name];return void 0===r||null===r?null:n.isArray(r)?r.map(function(t){return"0x"+i.encodeParam(e.type,t)}):"0x"+i.encodeParam(e.type,r)});return r.topics=r.topics.concat(s),r},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),r=e.map(function(t){return t.slice(2)}).join(""),n=i.decodeParams(this.types(!0),r),s=t.data.slice(2),a=i.decodeParams(this.types(!1),s),u=o.outputLogFormatter(t);return u.event=this.displayName(),u.address=t.address,u.args=this._params.reduce(function(t,e){return t[e.name]=e.indexed?n.shift():a.shift(),t},{}),delete u.data,delete u.topics,u},c.prototype.execute=function(t,e,r){n.isFunction(arguments[arguments.length-1])&&(r=arguments[arguments.length-1]);var i=this.encode(t,e),o=this.decode.bind(this);return new a(i,u.eth(),r,o)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this),r=this.displayName();t[r]||(t[r]=e),t[r][this.typeName()]=this.execute.bind(this,t)},e.exports=c},{"../solidity/coder":1,"../utils/sha3":5,"../utils/utils":6,"../web3":8,"./filter":15,"./formatters":16,"./watches":29}],15:[function(t,e,r){var n=t("./requestmanager"),i=t("./formatters"),o=t("../utils/utils"),s=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:o.fromAscii(t))},a=function(t){return o.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return o.isArray(t)?t.map(s):s(t)}),{topics:t.topics,to:t.to,address:t.address,fromBlock:i.inputBlockNumberFormatter(t.fromBlock),toBlock:i.inputBlockNumberFormatter(t.toBlock)})},u=function(t,e){o.isString(t.options)||t.get(function(t,r){t&&e(t),r.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,r){return e?t.callbacks.forEach(function(t){t(e)}):void r.forEach(function(e){e=t.formatter?t.formatter(e):e,t.callbacks.forEach(function(t){t(null,e)})})};n.getInstance().startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},h=function(t,e,r,n){var i=this,o={};e.forEach(function(t){t.attachToObject(o)}),this.options=a(t),this.implementation=o,this.callbacks=[],this.pollFilters=[],this.formatter=n,this.implementation.newFilter(this.options,function(t,e){if(t)i.callbacks.forEach(function(e){e(t)});else if(i.filterId=e,i.callbacks.forEach(function(t){u(i,t)}),c(i),r)return i.watch(r)})};h.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(u(this,t),c(this)),this},h.prototype.stopWatching=function(){n.getInstance().stopPolling(this.filterId),this.implementation.uninstallFilter(this.filterId,function(){}),this.callbacks=[]},h.prototype.get=function(t){var e=this;if(!o.isFunction(t)){var r=this.implementation.getLogs(this.filterId);return r.map(function(t){return e.formatter?e.formatter(t):t})}return this.implementation.getLogs(this.filterId,function(r,n){r?t(r):t(null,n.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=h},{"../utils/utils":6,"./formatters":16,"./requestmanager":26}],16:[function(t,e,r){var n=t("../utils/utils"),i=t("../utils/config"),o=function(t){return n.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},a=function(t){return void 0===t?i.defaultBlock:u(t)},u=function(t){return void 0===t?void 0:s(t)?t:n.toHex(t)},c=function(t){return t.from=t.from||i.defaultAccount,t.code&&(t.data=t.code,delete t.code),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=n.fromDecimal(t[e])}),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=n.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.toDecimal(t.transactionIndex)),t.nonce=n.toDecimal(t.nonce),t.gas=n.toDecimal(t.gas),t.gasPrice=n.toBigNumber(t.gasPrice),t.value=n.toBigNumber(t.value),t},f=function(t){return t.gasLimit=n.toDecimal(t.gasLimit),t.gasUsed=n.toDecimal(t.gasUsed),t.size=n.toDecimal(t.size),t.timestamp=n.toDecimal(t.timestamp),null!==t.number&&(t.number=n.toDecimal(t.number)),t.difficulty=n.toBigNumber(t.difficulty),t.totalDifficulty=n.toBigNumber(t.totalDifficulty),n.isArray(t.transactions)&&t.transactions.forEach(function(t){return n.isString(t)?void 0:h(t)}),t},l=function(t){return null!==t.blockNumber&&(t.blockNumber=n.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=n.toDecimal(t.logIndex)),t},p=function(t){return t.payload=n.toHex(t.payload),t.ttl=n.fromDecimal(t.ttl),t.workToProve=n.fromDecimal(t.workToProve),t.priority=n.fromDecimal(t.priority),n.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return n.fromAscii(t)}),t},d=function(t){return t.expiry=n.toDecimal(t.expiry),t.sent=n.toDecimal(t.sent),t.ttl=n.toDecimal(t.ttl),t.workProved=n.toDecimal(t.workProved),t.payloadRaw=t.payload,t.payload=n.toAscii(t.payload),n.isJson(t.payload)&&(t.payload=JSON.parse(t.payload)),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return n.toAscii(t)}),t};e.exports={inputDefaultBlockNumberFormatter:a,inputBlockNumberFormatter:u,inputTransactionFormatter:c,inputPostFormatter:p,outputBigNumberFormatter:o,outputTransactionFormatter:h,outputBlockFormatter:f,outputLogFormatter:l,outputPostFormatter:d}},{"../utils/config":4,"../utils/utils":6}],17:[function(t,e,r){var n=t("../web3"),i=t("../solidity/coder"),o=t("../utils/utils"),s=t("./formatters"),a=t("../utils/sha3"),u=function(t,e){this._inputTypes=t.inputs.map(function(t){return t.type}),this._outputTypes=t.outputs.map(function(t){return t.type}),this._constant=t.constant,this._name=o.transformToFullName(t),this._address=e};u.prototype.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},u.prototype.extractDefaultBlock=function(t){return t.length>this._inputTypes.length&&!o.isObject(t[t.length-1])?s.inputDefaultBlockNumberFormatter(t.pop()):void 0},u.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&o.isObject(t[t.length-1])&&(e=t[t.length-1]),e.to=this._address,e.data="0x"+this.signature()+i.encodeParams(this._inputTypes,t),e},u.prototype.signature=function(){return a(this._name).slice(0,8)},u.prototype.unpackOutput=function(t){if(t){t=t.length>=2?t.slice(2):t;var e=i.decodeParams(this._outputTypes,t);return 1===e.length?e[0]:e}},u.prototype.call=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),r=this.extractDefaultBlock(t),i=this.toPayload(t);if(!e){var o=n.eth.call(i,r);return this.unpackOutput(o)}var s=this;n.eth.call(i,r,function(t,r){e(t,s.unpackOutput(r))})},u.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),r=this.toPayload(t);return e?void n.eth.sendTransaction(r,e):n.eth.sendTransaction(r)},u.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),r=this.toPayload(t);return e?void n.eth.estimateGas(r,e):n.eth.estimateGas(r)},u.prototype.displayName=function(){return o.extractDisplayName(this._name)},u.prototype.typeName=function(){return o.extractTypeName(this._name)},u.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),r=this.toPayload(t),n=this.unpackOutput.bind(this);return{callback:e,payload:r,format:n}},u.prototype.execute=function(){var t=!this._constant;return t?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(t){var e=this.execute.bind(this);e.request=this.request.bind(this),e.call=this.call.bind(this),e.sendTransaction=this.sendTransaction.bind(this),e.estimateGas=this.estimateGas.bind(this);var r=this.displayName();t[r]||(t[r]=e),t[r][this.typeName()]=e},e.exports=u},{"../solidity/coder":1,"../utils/sha3":5,"../utils/utils":6,"../web3":8,"./formatters":16}],18:[function(t,e,r){"use strict";var n="undefined"!=typeof window&&window.XMLHttpRequest?window.XMLHttpRequest:t("xmlhttprequest").XMLHttpRequest,i=t("./errors"),o=function(t){this.host=t||"http://localhost:8545"};o.prototype.send=function(t){var e=new n;e.open("POST",this.host,!1),e.setRequestHeader("Content-type","application/json");try{e.send(JSON.stringify(t))}catch(r){throw i.InvalidConnection(this.host)}var o=e.responseText;try{o=JSON.parse(o)}catch(s){throw i.InvalidResponse(o)}return o},o.prototype.sendAsync=function(t,e){var r=new n;r.onreadystatechange=function(){if(4===r.readyState){var t=r.responseText,n=null;try{t=JSON.parse(t)}catch(o){n=i.InvalidResponse(t)}e(n,t)}},r.open("POST",this.host,!0),r.setRequestHeader("Content-type","application/json");try{r.send(JSON.stringify(t))}catch(o){e(i.InvalidConnection(this.host))}},e.exports=o},{"./errors":12,xmlhttprequest:67}],19:[function(t,e,r){var n=t("../utils/utils"),i=function(t){this._iban=t};i.prototype.isValid=function(){return n.isIBAN(this._iban)},i.prototype.isDirect=function(){return 34===this._iban.length},i.prototype.isIndirect=function(){return 20===this._iban.length},i.prototype.checksum=function(){return this._iban.substr(2,2)},i.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},i.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},i.prototype.address=function(){return this.isDirect()?this._iban.substr(4):""},e.exports=i},{"../utils/utils":6}],20:[function(t,e,r){var n=function(){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,void(this.messageId=1))};n.getInstance=function(){var t=new n;return t},n.prototype.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:this.messageId++}},n.prototype.isValidResponse=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},n.prototype.toBatchPayload=function(t){var e=this;return t.map(function(t){return e.toPayload(t.method,t.params)})},e.exports=n},{}],21:[function(t,e,r){var n=t("./requestmanager"),i=t("../utils/utils"),o=t("./errors"),s=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter};s.prototype.getCall=function(t){return i.isFunction(this.call)?this.call(t):this.call},s.prototype.extractCallback=function(t){return i.isFunction(t[t.length-1])?t.pop():void 0},s.prototype.validateArgs=function(t){if(t.length!==this.params)throw o.InvalidNumberOfParams()},s.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,r){return e?e(t[r]):t[r]}):t},s.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t?this.outputFormatter(t):t},s.prototype.attachToObject=function(t){var e=this.send.bind(this);e.request=this.request.bind(this),e.call=this.call;var r=this.name.split(".");r.length>1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},s.prototype.toPayload=function(t){var e=this.getCall(t),r=this.extractCallback(t),n=this.formatInput(t);return this.validateArgs(n),{method:e,params:n,callback:r}},s.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},s.prototype.send=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));if(t.callback){var e=this;return n.getInstance().sendAsync(t,function(r,n){t.callback(r,e.formatOutput(n))})}return this.formatOutput(n.getInstance().send(t))},e.exports=s},{"../utils/utils":6,"./errors":12,"./requestmanager":26}],22:[function(t,e,r){var n=t("./contract"),i="0xc6d9d2cd449a754c494264e1809c50e34d64562b",o=[{
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:"o_subRegistrar",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"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"register",outputs:[{name:"",type:"address"}],type:"function"},{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"}];e.exports=n(o).at(i)},{"./contract":10}],23:[function(t,e,r){var n=t("../utils/utils"),i=t("./property"),o=[],s=[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:n.toDecimal})];e.exports={methods:o,properties:s}},{"../utils/utils":6,"./property":24}],24:[function(t,e,r){var n=t("./requestmanager"),i=function(t){this.name=t.name,this.getter=t.getter,this.setter=t.setter,this.outputFormatter=t.outputFormatter,this.inputFormatter=t.inputFormatter};i.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter(t):t},i.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t?this.outputFormatter(t):t},i.prototype.attachToObject=function(t){var e={get:this.get.bind(this)},r=this.name.split("."),n=r[0];r.length>1&&(t[r[0]]=t[r[0]]||{},t=t[r[0]],n=r[1]),Object.defineProperty(t,n,e);var i=function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)};t[i("get",n)]=this.getAsync.bind(this)},i.prototype.get=function(){return this.formatOutput(n.getInstance().send({method:this.getter}))},i.prototype.getAsync=function(t){var e=this;n.getInstance().sendAsync({method:this.getter},function(r,n){return r?t(r):void t(r,e.formatOutput(n))})},e.exports=i},{"./requestmanager":26}],25:[function(t,e,r){var n=function(){};n.prototype.send=function(t){var e=navigator.qt.callMethod(JSON.stringify(t));return JSON.parse(e)},e.exports=n},{}],26:[function(t,e,r){var n=t("./jsonrpc"),i=t("../utils/utils"),o=t("../utils/config"),s=t("./errors"),a=function(t){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,this.provider=t,this.polls={},this.timeout=null,void(this.isPolling=!1))};a.getInstance=function(){var t=new a;return t},a.prototype.send=function(t){if(!this.provider)return console.error(s.InvalidProvider()),null;var e=n.getInstance().toPayload(t.method,t.params),r=this.provider.send(e);if(!n.getInstance().isValidResponse(r))throw s.InvalidResponse(r);return r.result},a.prototype.sendAsync=function(t,e){if(!this.provider)return e(s.InvalidProvider());var r=n.getInstance().toPayload(t.method,t.params);this.provider.sendAsync(r,function(t,r){return t?e(t):n.getInstance().isValidResponse(r)?void e(null,r.result):e(s.InvalidResponse(r))})},a.prototype.sendBatch=function(t,e){if(!this.provider)return e(s.InvalidProvider());var r=n.getInstance().toBatchPayload(t);this.provider.sendAsync(r,function(t,r){return t?e(t):i.isArray(r)?void e(t,r):e(s.InvalidResponse(r))})},a.prototype.setProvider=function(t){this.provider=t,this.provider&&!this.isPolling&&(this.poll(),this.isPolling=!0)},a.prototype.startPolling=function(t,e,r,n){this.polls["poll_"+e]={data:t,id:e,callback:r,uninstall:n}},a.prototype.stopPolling=function(t){delete this.polls["poll_"+t]},a.prototype.reset=function(){for(var t in this.polls)this.polls[t].uninstall();this.polls={},this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.poll()},a.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),o.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(s.InvalidProvider());var t=[],e=[];for(var r in this.polls)t.push(this.polls[r].data),e.push(r);if(0!==t.length){var a=n.getInstance().toBatchPayload(t),u=this;this.provider.sendAsync(a,function(t,r){if(!t){if(!i.isArray(r))throw s.InvalidResponse(r);r.map(function(t,r){var n=e[r];return u.polls[n]?(t.callback=u.polls[n].callback,t):!1}).filter(function(t){return!!t}).filter(function(t){var e=n.getInstance().isValidResponse(t);return e||t.callback(s.InvalidResponse(t)),e}).filter(function(t){return i.isArray(t.result)&&t.result.length>0}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=a},{"../utils/config":4,"../utils/utils":6,"./errors":12,"./jsonrpc":20}],27:[function(t,e,r){var n=t("./method"),i=t("./formatters"),o=new n({name:"post",call:"shh_post",params:1,inputFormatter:[i.inputPostFormatter]}),s=new n({name:"newIdentity",call:"shh_newIdentity",params:0}),a=new n({name:"hasIdentity",call:"shh_hasIdentity",params:1}),u=new n({name:"newGroup",call:"shh_newGroup",params:0}),c=new n({name:"addToGroup",call:"shh_addToGroup",params:0}),h=[o,s,a,u,c];e.exports={methods:h}},{"./formatters":16,"./method":21}],28:[function(t,e,r){var n=t("../web3"),i=t("./icap"),o=t("./namereg"),s=t("./contract"),a=function(t,e,r,n){var s=new i(e);if(!s.isValid())throw new Error("invalid iban address");if(s.isDirect())return u(t,s.address(),r,n);if(!n){var a=o.addr(s.institution());return c(t,a,r,s.client())}o.addr(s.insitution(),function(e,i){return c(t,i,r,s.client(),n)})},u=function(t,e,r,i){return n.eth.sendTransaction({address:e,from:t,value:r},i)},c=function(t,e,r,n,i){var o=[{constant:!1,inputs:[{name:"name",type:"bytes32"}],name:"deposit",outputs:[],type:"function"}];return s(o).at(e).deposit(n,{from:t,value:r},i)};e.exports=a},{"../web3":8,"./contract":10,"./icap":19,"./namereg":22}],29:[function(t,e,r){var n=t("./method"),i=function(){var t=function(t){var e=t[0];switch(e){case"latest":return t.shift(),this.params=0,"eth_newBlockFilter";case"pending":return t.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},e=new n({name:"newFilter",call:t,params:1}),r=new n({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),i=new n({name:"getLogs",call:"eth_getFilterLogs",params:1}),o=new n({name:"poll",call:"eth_getFilterChanges",params:1});return[e,r,i,o]},o=function(){var t=new n({name:"newFilter",call:"shh_newFilter",params:1}),e=new n({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),r=new n({name:"getLogs",call:"shh_getMessages",params:1}),i=new n({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,r,i]};e.exports={eth:i,shh:o}},{"./method":21}],30:[function(t,e,r){},{}],31:[function(t,e,r){arguments[4][30][0].apply(r,arguments)},{dup:30}],32:[function(t,e,r){function n(t,e){var r=this;if(!(r instanceof n))return new n(t,e);var i,o=typeof t;if("number"===o)i=+t;else if("string"===o)i=n.byteLength(t,e);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&C(t.data)&&(t=t.data),i=+t.length}if(i>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");0>i?i=0:i>>>=0,n.TYPED_ARRAY_SUPPORT?r=n._augment(new Uint8Array(i)):(r.length=i,r._isBuffer=!0);var s;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)r._set(t);else if(I(t))if(n.isBuffer(t))for(s=0;i>s;s++)r[s]=t.readUInt8(s);else for(s=0;i>s;s++)r[s]=(t[s]%256+256)%256;else if("string"===o)r.write(t,0,e);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT)for(s=0;i>s;s++)r[s]=0;return i>0&&i<=n.poolSize&&(r.parent=F),r}function i(t,e){if(!(this instanceof i))return new i(t,e);var r=new n(t,e);return delete r.parent,r}function o(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function s(t,e,r,n){var i=L(T(e,t.length-r),t,r,n);return i}function a(t,e,r,n){var i=L(O(e),t,r,n);return i}function u(t,e,r,n){return a(t,e,r,n)}function c(t,e,r,n){var i=L(R(e),t,r,n);return i}function h(t,e,r,n){var i=L(k(e,t.length-r),t,r,n);return i}function f(t,e,r){return P.fromByteArray(0===e&&r===t.length?t:t.slice(e,r))}function l(t,e,r){var n="",i="";r=Math.min(t.length,r);for(var o=e;r>o;o++)t[o]<=127?(n+=N(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+N(i)}function p(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function d(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function m(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=B(t[o]);return i}function g(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function y(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function v(t,e,r,i,o,s){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>o||s>e)throw new RangeError("value is out of bounds");if(r+i>t.length)throw new RangeError("index out of range")}function b(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function w(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function _(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function E(t,e,r,n,i){return i||_(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),j.write(t,e,r,n,23,4),r+4}function x(t,e,r,n,i){return i||_(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),j.write(t,e,r,n,52,8),r+8}function S(t){if(t=A(t).replace(M,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function A(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function I(t){return C(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function B(t){return 16>t?"0"+t.toString(16):t.toString(16)}function T(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&((e-=3)>-1&&o.push(239,191,189),i=null);if(128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(2097152>r))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function O(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function k(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function R(t){return P.toByteArray(S(t))}function L(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}function N(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}var P=t("base64-js"),j=t("ieee754"),C=t("is-array");r.Buffer=n,r.SlowBuffer=i,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var D=1073741823,F={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,e){if(!n.isBuffer(t)||!n.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);s>o&&t[o]===e[o];o++);return o!==s&&(r=t[o],i=e[o]),i>r?-1:r>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,e){if(!C(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var r;if(void 0===e)for(e=0,r=0;r<t.length;r++)e+=t[r].length;var i=new n(e),o=0;for(r=0;r<t.length;r++){var s=t[r];s.copy(i,o),o+=s.length}return i},n.byteLength=function(t,e){var r;switch(t+="",e||"utf8"){case"ascii":case"binary":case"raw":r=t.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*t.length;break;case"hex":r=t.length>>>1;break;case"utf8":case"utf-8":r=T(t).length;break;case"base64":r=R(t).length;break;default:r=t.length}return r},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,e,r){var n=!1;if(e>>>=0,r=void 0===r||r===1/0?this.length:r>>>0,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return m(this,e,r);case"utf8":case"utf-8":return l(this,e,r);case"ascii":return p(this,e,r);case"binary":return d(this,e,r);case"base64":return f(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(n.isBuffer(t))return r(this,t,e);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},n.prototype.write=function(t,e,r,n){if(isFinite(e))isFinite(r)||(n=r,r=void 0);else{var i=n;n=e,e=r,r=i}if(e=Number(e)||0,0>r||0>e||e>this.length)throw new RangeError("attempt to write outside buffer bounds");var f=this.length-e;r?(r=Number(r),r>f&&(r=f)):r=f,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=o(this,t,e,r);break;case"utf8":case"utf-8":l=s(this,t,e,r);break;case"ascii":l=a(this,t,e,r);break;case"binary":l=u(this,t,e,r);break;case"base64":l=c(this,t,e,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,e,r);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,e));else{var o=e-t;i=new n(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||y(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},n.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||y(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},n.prototype.readUInt8=function(t,e){return e||y(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,e){return e||y(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,e){return e||y(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,e){return e||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,e){return e||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||y(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},n.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||y(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},n.prototype.readInt8=function(t,e){return e||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){e||y(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(t,e){e||y(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(t,e){return e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,e){return e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,e){return e||y(t,4,this.length),j.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,e){return e||y(t,4,this.length),j.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,e){return e||y(t,8,this.length),j.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,e){return e||y(t,8,this.length),j.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||v(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i>>>0&255;return e+r},n.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||v(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o>>>0&255;return e+r},n.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t,e+1},n.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):b(this,t,e,!0),e+2},n.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):b(this,t,e,!1),e+2},n.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t):w(this,t,e,!0),e+4},n.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):w(this,t,e,!1),e+4},n.prototype.writeIntLE=function(t,e,r,n){t=+t,e>>>=0,n||v(this,t,e,r,Math.pow(2,8*r-1)-1,-Math.pow(2,8*r-1));var i=0,o=1,s=0>t?1:0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=(t/o>>0)-s&255;return e+r},n.prototype.writeIntBE=function(t,e,r,n){t=+t,e>>>=0,n||v(this,t,e,r,Math.pow(2,8*r-1)-1,-Math.pow(2,8*r-1));var i=r-1,o=1,s=0>t?1:0;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=(t/o>>0)-s&255;return e+r},n.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=t,e+1},n.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):b(this,t,e,!0),e+2},n.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):b(this,t,e,!1),e+2},n.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):w(this,t,e,!0),e+4},n.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||v(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):w(this,t,e,!1),e+4},n.prototype.writeFloatLE=function(t,e,r){return E(this,t,e,!0,r)},n.prototype.writeFloatBE=function(t,e,r){return E(this,t,e,!1,r)},n.prototype.writeDoubleLE=function(t,e,r){return x(this,t,e,!0,r)},n.prototype.writeDoubleBE=function(t,e,r){return x(this,t,e,!1,r)},n.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var o=i-r;if(1e3>o||!n.TYPED_ARRAY_SUPPORT)for(var s=0;o>s;s++)t[s+e]=this[s+r];else t._set(this.subarray(r,r+o),e);return o},n.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=T(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var U=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._set=t.set,t.get=U.get,t.set=U.set,t.write=U.write,t.toString=U.toString,t.toLocaleString=U.toString,t.toJSON=U.toJSON,t.equals=U.equals,t.compare=U.compare,t.indexOf=U.indexOf,t.copy=U.copy,t.slice=U.slice,t.readUIntLE=U.readUIntLE,t.readUIntBE=U.readUIntBE,t.readUInt8=U.readUInt8,t.readUInt16LE=U.readUInt16LE,t.readUInt16BE=U.readUInt16BE,t.readUInt32LE=U.readUInt32LE,t.readUInt32BE=U.readUInt32BE,t.readIntLE=U.readIntLE,t.readIntBE=U.readIntBE,t.readInt8=U.readInt8,t.readInt16LE=U.readInt16LE,t.readInt16BE=U.readInt16BE,t.readInt32LE=U.readInt32LE,t.readInt32BE=U.readInt32BE,t.readFloatLE=U.readFloatLE,t.readFloatBE=U.readFloatBE,t.readDoubleLE=U.readDoubleLE,t.readDoubleBE=U.readDoubleBE,t.writeUInt8=U.writeUInt8,t.writeUIntLE=U.writeUIntLE,t.writeUIntBE=U.writeUIntBE,t.writeUInt16LE=U.writeUInt16LE,t.writeUInt16BE=U.writeUInt16BE,t.writeUInt32LE=U.writeUInt32LE,t.writeUInt32BE=U.writeUInt32BE,t.writeIntLE=U.writeIntLE,t.writeIntBE=U.writeIntBE,t.writeInt8=U.writeInt8,t.writeInt16LE=U.writeInt16LE,t.writeInt16BE=U.writeInt16BE,t.writeInt32LE=U.writeInt32LE,t.writeInt32BE=U.writeInt32BE,t.writeFloatLE=U.writeFloatLE,t.writeFloatBE=U.writeFloatBE,t.writeDoubleLE=U.writeDoubleLE,t.writeDoubleBE=U.writeDoubleBE,t.fill=U.fill,t.inspect=U.inspect,t.toArrayBuffer=U.toArrayBuffer,t};var M=/[^+\/0-9A-z\-]/g},{"base64-js":33,ieee754:34,"is-array":35}],33:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===f?62:e===a||e===l?63:u>e?-1:u+10>e?e-u+26+26:h+26>e?e-h:c+26>e?e-c+26:void 0}function r(t){function r(t){c[f++]=t}var n,i,s,a,u,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;u="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,c=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var f=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===u?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===u&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),c}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,u="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=r(o);switch(a){case 1:o=t[t.length-1],u+=e(o>>2),u+=e(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=e(o>>10),u+=e(o>>4&63),u+=e(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),h="A".charCodeAt(0),f="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],34:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,h=-7,f=r?i-1:0,l=r?-1:1,p=t[e+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,f=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?l/u:l*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*m}},{}],35:[function(t,e,r){var n=Array.isArray,i=Object.prototype.toString;e.exports=n||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],36:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function s(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,o,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];r.apply(this,o)}else if(s(r)){for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];for(c=r.slice(),n=c.length,u=0;n>u;u++)c[u].apply(this,o)}return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,s(this._events[t])&&!this._events[t].warned){var r;r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(s(r)){for(a=o;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},{}],37:[function(t,e,r){var n=e.exports,i=(t("events").EventEmitter,t("./lib/request")),o=t("url");n.request=function(t,e){"string"==typeof t&&(t=o.parse(t)),t||(t={}),t.host||t.port||(t.port=parseInt(window.location.port,10)),!t.host&&t.hostname&&(t.host=t.hostname),t.protocol||(t.protocol=t.scheme?t.scheme+":":window.location.protocol),t.host||(t.host=window.location.hostname||window.location.host),/:/.test(t.host)&&(t.port||(t.port=t.host.split(":")[1]),t.host=t.host.split(":")[0]),t.port||(t.port="https:"==t.protocol?443:80);var r=new i(new s,t);return e&&r.on("response",e),r},n.get=function(t,e){t.method="GET";var r=n.request(t,e);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;var s=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var t=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0;e<t.length;e++)try{var r=new window.ActiveXObject(t[e]);return function(){if(r){var n=r;return r=null,n}return new window.ActiveXObject(t[e])}}catch(n){}throw new Error("ajax not supported in this browser")}throw new Error("ajax not supported in this browser")}();n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",
303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{"./lib/request":38,events:36,url:61}],38:[function(t,e,r){var n=t("stream"),i=t("./response"),o=t("Base64"),s=t("inherits"),a=e.exports=function(t,e){var r=this;r.writable=!0,r.xhr=t,r.body=[],r.uri=(e.protocol||"http:")+"//"+e.host+(e.port?":"+e.port:"")+(e.path||"/"),"undefined"==typeof e.withCredentials&&(e.withCredentials=!0);try{t.withCredentials=e.withCredentials}catch(n){}if(e.responseType)try{t.responseType=e.responseType}catch(n){}if(t.open(e.method||"GET",r.uri,!0),t.onerror=function(t){r.emit("error",new Error("Network error"))},r._headers={},e.headers)for(var s=u(e.headers),a=0;a<s.length;a++){var c=s[a];if(r.isSafeRequestHeader(c)){var h=e.headers[c];r.setHeader(c,h)}}e.auth&&this.setHeader("Authorization","Basic "+o.btoa(e.auth));var f=new i;f.on("close",function(){r.emit("close")}),f.on("ready",function(){r.emit("response",f)}),f.on("error",function(t){r.emit("error",t)}),t.onreadystatechange=function(){t.__aborted||f.handle(t)}};s(a,n),a.prototype.setHeader=function(t,e){this._headers[t.toLowerCase()]=e},a.prototype.getHeader=function(t){return this._headers[t.toLowerCase()]},a.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},a.prototype.write=function(t){this.body.push(t)},a.prototype.destroy=function(t){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(t){void 0!==t&&this.body.push(t);for(var e=u(this._headers),r=0;r<e.length;r++){var n=e[r],i=this._headers[n];if(c(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(c(this.body[0])){for(var s=[],r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){for(var a=0,r=0;r<this.body.length;r++)a+=this.body[r].length;for(var s=new this.body[0].constructor(a),h=0,r=0;r<this.body.length;r++)for(var l=this.body[r],o=0;o<l.length;o++)s[h++]=l[o];this.xhr.send(s)}else if(f(this.body[0]))this.xhr.send(this.body[0]);else{for(var s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(t){return t?-1===h(a.unsafeHeaders,t.toLowerCase()):!1};var u=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},h=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},f=function(t){return"undefined"!=typeof Blob&&t instanceof Blob?!0:"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?!0:"undefined"!=typeof FormData&&t instanceof FormData?!0:void 0}},{"./response":39,Base64:40,inherits:42,stream:59}],39:[function(t,e,r){function n(t){for(var e=t.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<e.length;n++){var i=e[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?u(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}var i=t("stream"),o=t("util"),s=e.exports=function(t){this.offset=0,this.readable=!0};o.inherits(s,i);var a={streaming:!0,status2:!0};s.prototype.getResponse=function(t){var e=String(t.responseType).toLowerCase();return"blob"===e?t.responseBlob||t.response:"arraybuffer"===e?t.response:t.responseText},s.prototype.getHeader=function(t){return this.headers[t.toLowerCase()]},s.prototype.handle=function(t){if(2===t.readyState&&a.status2){try{this.statusCode=t.status,this.headers=n(t)}catch(e){a.status2=!1}a.status2&&this.emit("ready")}else if(a.streaming&&3===t.readyState){try{this.statusCode||(this.statusCode=t.status,this.headers=n(t),this.emit("ready"))}catch(e){}try{this._emitData(t)}catch(e){a.streaming=!1}}else 4===t.readyState&&(this.statusCode||(this.statusCode=t.status,this.emit("ready")),this._emitData(t),t.error?this.emit("error",this.getResponse(t)):this.emit("end"),this.emit("close"))},s.prototype._emitData=function(t){var e=this.getResponse(t);return e.toString().match(/ArrayBuffer/)?(this.emit("data",new Uint8Array(e,this.offset)),void(this.offset=e.byteLength)):void(e.length>this.offset&&(this.emit("data",e.slice(this.offset)),this.offset=e.length))};var u=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{stream:59,util:63}],40:[function(t,e,r){!function(){function t(t){this.message=t}var e="undefined"!=typeof r?r:this,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var r,i,o=0,s=n,a="";e.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&r>>8-o%1*8)){if(i=e.charCodeAt(o+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return a}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,a="";i=e.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return a})}()},{}],41:[function(t,e,r){var n=t("http"),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(t,e){return t||(t={}),t.scheme="https",n.request.call(this,t,e)}},{http:37}],42:[function(t,e,r){e.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],43:[function(t,e,r){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],44:[function(t,e,r){!function(t){function n(t){throw RangeError(L[t])}function i(t,e){for(var r=t.length;r--;)t[r]=e(t[r]);return t}function o(t,e){return i(t.split(R),e).join(".")}function s(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function a(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:_}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function h(t,e,r){var n=0;for(t=r?P(t/A):t>>1,t+=P(t/e);t>N*x>>1;n+=_)t=P(t/N);return P(n+(N+1)*t/(t+S))}function f(t){var e,r,i,o,s,c,f,l,p,d,m=[],g=t.length,y=0,v=B,b=I;for(r=t.lastIndexOf(T),0>r&&(r=0),i=0;r>i;++i)t.charCodeAt(i)>=128&&n("not-basic"),m.push(t.charCodeAt(i));for(o=r>0?r+1:0;g>o;){for(s=y,c=1,f=_;o>=g&&n("invalid-input"),l=u(t.charCodeAt(o++)),(l>=_||l>P((w-y)/c))&&n("overflow"),y+=l*c,p=b>=f?E:f>=b+x?x:f-b,!(p>l);f+=_)d=_-p,c>P(w/d)&&n("overflow"),c*=d;e=m.length+1,b=h(y-s,e,0==s),P(y/e)>w-v&&n("overflow"),v+=P(y/e),y%=e,m.splice(y++,0,v)}return a(m)}function l(t){var e,r,i,o,a,u,f,l,p,d,m,g,y,v,b,S=[];for(t=s(t),g=t.length,e=B,r=0,a=I,u=0;g>u;++u)m=t[u],128>m&&S.push(j(m));for(i=o=S.length,o&&S.push(T);g>i;){for(f=w,u=0;g>u;++u)m=t[u],m>=e&&f>m&&(f=m);for(y=i+1,f-e>P((w-r)/y)&&n("overflow"),r+=(f-e)*y,e=f,u=0;g>u;++u)if(m=t[u],e>m&&++r>w&&n("overflow"),m==e){for(l=r,p=_;d=a>=p?E:p>=a+x?x:p-a,!(d>l);p+=_)b=l-d,v=_-d,S.push(j(c(d+b%v,0))),l=P(b/v);S.push(j(c(l,0))),a=h(r,y,i==o),r=0,++i}++r,++e}return S.join("")}function p(t){return o(t,function(t){return O.test(t)?f(t.slice(4).toLowerCase()):t})}function d(t){return o(t,function(t){return k.test(t)?"xn--"+l(t):t})}var m="object"==typeof r&&r,g="object"==typeof e&&e&&e.exports==m&&e,y="object"==typeof global&&global;(y.global===y||y.window===y)&&(t=y);var v,b,w=2147483647,_=36,E=1,x=26,S=38,A=700,I=72,B=128,T="-",O=/^xn--/,k=/[^ -~]/,R=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=_-E,P=Math.floor,j=String.fromCharCode;if(v={version:"1.2.4",ucs2:{decode:s,encode:a},decode:f,encode:l,toASCII:d,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(m&&!m.nodeType)if(g)g.exports=v;else for(b in v)v.hasOwnProperty(b)&&(m[b]=v[b]);else t.punycode=v}(this)},{}],45:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var h=0;c>h;++h){var f,l,p,d,m=t[h].replace(a,"%20"),g=m.indexOf(r);g>=0?(f=m.substr(0,g),l=m.substr(g+1)):(f=m,l=""),p=decodeURIComponent(f),d=decodeURIComponent(l),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],46:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?n(s(t),function(s){var a=encodeURIComponent(i(s))+r;return o(t[s])?n(t[s],function(t){return a+encodeURIComponent(i(t))}).join(e):a+encodeURIComponent(i(t[s]))}).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],47:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":45,"./encode":46}],48:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":49}],49:[function(t,e,r){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}e.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=t("core-util-is");a.inherits=t("inherits");var u=t("./_stream_readable"),c=t("./_stream_writable");a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})},{"./_stream_readable":51,"./_stream_writable":53,"core-util-is":54,inherits:42}],50:[function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}e.exports=n;var i=t("./_stream_transform"),o=t("core-util-is");o.inherits=t("inherits"),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":52,"core-util-is":54,inherits:42}],51:[function(t,e,r){function n(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(T||(T=t("string_decoder/").StringDecoder),this.decoder=new T(e.encoding),this.encoding=e.encoding)}function i(e){t("./_stream_duplex");return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void I.call(this)):new i(e)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(B.isNullOrUndefined(r))e.reading=!1,e.ended||h(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&f(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=k)t=k;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||B.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return B.isBuffer(e)||B.isString(e)||B.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,f(t)}function f(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(O("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?process.nextTick(function(){l(t)}):l(t))}function l(t){O("emit readable"),t.emit("readable"),v(t)}function p(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(function(){d(t,e)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(O("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function m(t){return function(){var e=t._readableState;O("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&A.listenerCount(t,"data")&&(e.flowing=!0,v(t))}}function g(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(function(){y(t,e)}))}function y(t,e){e.resumeScheduled=!1,t.emit("resume"),v(t),e.flowing&&!e.reading&&t.read(0)}function v(t){var e=t._readableState;if(O("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):S.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new S(t);for(var u=0,c=0,h=n.length;h>c&&t>u;c++){var a=n[0],f=Math.min(t-u,a.length);o?r+=a.slice(0,f):a.copy(r,u,0,f),f<a.length?n[0]=a.slice(f):n.shift(),u+=f}}return r}function w(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");e.endEmitted||(e.ended=!0,process.nextTick(function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function _(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}function E(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}e.exports=i;var x=t("isarray"),S=t("buffer").Buffer;i.ReadableState=n;var A=t("events").EventEmitter;A.listenerCount||(A.listenerCount=function(t,e){return t.listeners(e).length});var I=t("stream"),B=t("core-util-is");B.inherits=t("inherits");var T,O=t("util");O=O&&O.debuglog?O.debuglog("stream"):function(){},B.inherits(i,I),i.prototype.push=function(t,e){var r=this._readableState;return B.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new S(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(e){return T||(T=t("string_decoder/").StringDecoder),this._readableState.decoder=new T(e),this._readableState.encoding=e,this};var k=8388608;i.prototype.read=function(t){O("read",t);var e=this._readableState,r=t;if((!B.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return O("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?w(this):f(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&w(this),null;var n=e.needReadable;O("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,O("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,O("reading or ended",n)),n&&(O("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?b(t,e):null,B.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&w(this),B.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){function r(t){O("onunpipe"),t===h&&i()}function n(){O("onend"),t.end()}function i(){O("cleanup"),t.removeListener("close",a),t.removeListener("finish",u),t.removeListener("drain",d),t.removeListener("error",s),t.removeListener("unpipe",r),h.removeListener("end",n),h.removeListener("end",i),h.removeListener("data",o),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||d()}function o(e){O("ondata");var r=t.write(e);!1===r&&(O("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function s(e){O("onerror",e),c(),t.removeListener("error",s),0===A.listenerCount(t,"error")&&t.emit("error",e)}function a(){t.removeListener("finish",u),c()}function u(){O("onfinish"),t.removeListener("close",a),c()}function c(){O("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,O("pipe count=%d opts=%j",f.pipesCount,e);var l=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,p=l?n:i;f.endEmitted?process.nextTick(p):h.once("end",p),t.on("unpipe",r);var d=m(h);return t.on("drain",d),h.on("data",o),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",a),t.once("finish",u),t.emit("pipe",h),f.flowing||(O("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=E(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,e){var r=I.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&f(this,n);else{var i=this;process.nextTick(function(){O("readable nexttick read 0"),i.read(0)})}}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(O("resume"),t.flowing=!0,t.reading||(O("resume read 0"),this.read(0)),g(this,t)),this},i.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(O("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(O("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)B.isFunction(t[i])&&B.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){O("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b},{"./_stream_duplex":49,buffer:32,"core-util-is":54,events:36,inherits:42,isarray:43,stream:59,"string_decoder/":60,util:31}],52:[function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}e.exports=o;var a=t("./_stream_duplex"),u=t("core-util-is");u.inherits=t("inherits"),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},{"./_stream_duplex":49,"core-util-is":54,inherits:42}],53:[function(t,e,r){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(r,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(e){var r=t("./_stream_duplex");return this instanceof o||this instanceof r?(this._writableState=new i(e,this),this.writable=!0,void x.call(this)):new o(e)}function s(t,e,r){var n=new Error("write after end");t.emit("error",n),process.nextTick(function(){r(n)})}function a(t,e,r,n){var i=!0;if(!(E.isBuffer(r)||E.isString(r)||E.isNullOrUndefined(r)||e.objectMode)){var o=new TypeError("Invalid non-string/buffer chunk");t.emit("error",o),process.nextTick(function(){n(o)}),i=!1}return i}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&E.isString(e)&&(e=new _(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),E.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function f(t,e,r,n,i){r?process.nextTick(function(){e.pendingcb--,i(n)}):(e.pendingcb--,i(n)),t._writableState.errorEmitted=!0,t.emit("error",n)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(l(r),e)f(t,r,n,e,i);else{var o=y(t,r);o||r.corked||r.bufferProcessing||!r.buffer.length||g(t,r),n?process.nextTick(function(){d(t,r,o,i)}):d(t,r,o,i)}}function d(t,e,r,n){r||m(t,e),e.pendingcb--,n(),b(t,e)}function m(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function g(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(h(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function y(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function v(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=y(t,e);return r&&(0===e.pendingcb?(v(t,e),e.finished=!0,t.emit("finish")):v(t,e)),r}function w(t,e,r){e.ending=!0,b(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0}e.exports=o;var _=t("buffer").Buffer;o.WritableState=i;var E=t("core-util-is");E.inherits=t("inherits");var x=t("stream");E.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return E.isFunction(e)&&(r=e,e=null),E.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),E.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||g(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;E.isFunction(t)?(r=t,t=null,e=null):E.isFunction(e)&&(r=e,e=null),E.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}},{"./_stream_duplex":49,buffer:32,"core-util-is":54,inherits:42,stream:59}],54:[function(t,e,r){function n(t){return Array.isArray(t)}function i(t){return"boolean"==typeof t}function o(t){return null===t}function s(t){return null==t}function a(t){return"number"==typeof t}function u(t){return"string"==typeof t}function c(t){return"symbol"==typeof t}function h(t){return void 0===t}function f(t){return l(t)&&"[object RegExp]"===v(t)}function l(t){return"object"==typeof t&&null!==t}function p(t){return l(t)&&"[object Date]"===v(t)}function d(t){return l(t)&&("[object Error]"===v(t)||t instanceof Error)}function m(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function y(t){return Buffer.isBuffer(t)}function v(t){return Object.prototype.toString.call(t)}r.isArray=n,r.isBoolean=i,r.isNull=o,r.isNullOrUndefined=s,r.isNumber=a,r.isString=u,r.isSymbol=c,r.isUndefined=h,r.isRegExp=f,r.isObject=l,r.isDate=p,r.isError=d,r.isFunction=m,r.isPrimitive=g,r.isBuffer=y},{}],55:[function(t,e,r){e.exports=t("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":50}],56:[function(t,e,r){r=e.exports=t("./lib/_stream_readable.js"),r.Stream=t("stream"),r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":49,"./lib/_stream_passthrough.js":50,"./lib/_stream_readable.js":51,"./lib/_stream_transform.js":52,"./lib/_stream_writable.js":53,stream:59}],57:[function(t,e,r){e.exports=t("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":52}],58:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":53}],59:[function(t,e,r){function n(){i.call(this)}e.exports=n;var i=t("events").EventEmitter,o=t("inherits");o(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var h=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},{events:36,inherits:42,"readable-stream/duplex.js":48,"readable-stream/passthrough.js":55,"readable-stream/readable.js":56,"readable-stream/transform.js":57,"readable-stream/writable.js":58}],60:[function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=t("buffer").Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=r.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,
this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},{buffer:32}],61:[function(t,e,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&c(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function o(t){return u(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function s(t,e){return i(t,!1,!0).resolve(e)}function a(t,e){return t?i(t,!1,!0).resolveObject(e):e}function u(t){return"string"==typeof t}function c(t){return"object"==typeof t&&null!==t}function h(t){return null===t}function f(t){return null==t}var l=t("punycode");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,m=["<",">",'"',"`"," ","\r","\n"," "],g=["{","}","|","\\","^","`"].concat(m),y=["'"].concat(g),v=["%","/","?",";","#"].concat(y),b=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},I=t("querystring");n.prototype.parse=function(t,e,r){if(!u(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t;n=n.trim();var i=p.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&S[i]||(n=n.substr(2),this.slashes=!0)}if(!S[i]&&(s||i&&!A[i])){for(var a=-1,c=0;c<b.length;c++){var h=n.indexOf(b[c]);-1!==h&&(-1===a||a>h)&&(a=h)}var f,d;d=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==d&&(f=n.slice(0,d),n=n.slice(d+1),this.auth=decodeURIComponent(f)),a=-1;for(var c=0;c<v.length;c++){var h=n.indexOf(v[c]);-1!==h&&(-1===a||a>h)&&(a=h)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var g=this.hostname.split(/\./),c=0,B=g.length;B>c;c++){var T=g[c];if(T&&!T.match(_)){for(var O="",k=0,R=T.length;R>k;k++)O+=T.charCodeAt(k)>127?"x":T[k];if(!O.match(_)){var L=g.slice(0,c),N=g.slice(c+1),P=T.match(E);P&&(L.push(P[1]),N.unshift(P[2])),N.length&&(n="/"+N.join(".")+n),this.hostname=L.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!m){for(var j=this.hostname.split("."),C=[],c=0;c<j.length;++c){var D=j[c];C.push(D.match(/[^A-Za-z0-9_-]/)?"xn--"+l.encode(D):D)}this.hostname=C.join(".")}var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!x[o])for(var c=0,B=y.length;B>c;c++){var M=y[c],q=encodeURIComponent(M);q===M&&(q=escape(M)),n=n.split(M).join(q)}var H=n.indexOf("#");-1!==H&&(this.hash=n.substr(H),n=n.slice(0,H));var z=n.indexOf("?");if(-1!==z?(this.search=n.substr(z),this.query=n.substr(z+1),e&&(this.query=I.parse(this.query)),n=n.slice(0,z)):e&&(this.search="",this.query={}),n&&(this.pathname=n),A[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var F=this.pathname||"",D=this.search||"";this.path=F+D}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=I.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||A[e])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+i+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(u(t)){var e=new n;e.parse(t,!1,!0),t=e}var r=new n;if(Object.keys(this).forEach(function(t){r[t]=this[t]},this),r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(r[e]=t[e])}),A[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(t.protocol&&t.protocol!==r.protocol){if(!A[t.protocol])return Object.keys(t).forEach(function(e){r[e]=t[e]}),r.href=r.format(),r;if(r.protocol=t.protocol,t.host||S[t.protocol])r.pathname=t.pathname;else{for(var i=(t.pathname||"").split("/");i.length&&!(t.host=i.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=t.host||t.pathname&&"/"===t.pathname.charAt(0),l=c||a||r.host&&t.pathname,p=l,d=r.pathname&&r.pathname.split("/")||[],i=t.pathname&&t.pathname.split("/")||[],m=r.protocol&&!A[r.protocol];if(m&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===i[0]?i[0]=t.host:i.unshift(t.host)),t.host=null),l=l&&(""===i[0]||""===d[0])),c)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=t.search,r.query=t.query;else if(!f(t.search)){if(m){r.hostname=r.host=d.shift();var g=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;g&&(r.auth=g.shift(),r.host=r.hostname=g.shift())}return r.search=t.search,r.query=t.query,h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var y=d.slice(-1)[0],v=(r.host||t.host)&&("."===y||".."===y)||""===y,b=0,w=d.length;w>=0;w--)y=d[w],"."==y?d.splice(w,1):".."===y?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!l&&!p)for(;b--;b)d.unshift("..");!l||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),v&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){r.hostname=r.host=_?"":d.length?d.shift():"";var g=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;g&&(r.auth=g.shift(),r.host=r.hostname=g.shift())}return l=l||r.host&&d.length,l&&!_&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:44,querystring:47}],62:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],63:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&A(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var d=Object.keys(e),m=s(d);if(t.showHidden&&(d=Object.getOwnPropertyNames(e)),S(e)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return c(e);if(0===d.length){if(A(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(_(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(S(e))return c(e)}var y="",b=!1,w=["{","}"];if(p(e)&&(b=!0,w=["[","]"]),A(e)){var E=e.name?": "+e.name:"";y=" [Function"+E+"]"}if(_(e)&&(y=" "+RegExp.prototype.toString.call(e)),x(e)&&(y=" "+Date.prototype.toUTCString.call(e)),S(e)&&(y=" "+c(e)),0===d.length&&(!b||0==e.length))return w[0]+y+w[1];if(0>n)return _(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return I=b?h(t,e,n,m,d):d.map(function(r){return f(t,e,n,m,r,b)}),t.seen.pop(),l(I,y,w)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(k(e,String(s))?f(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),k(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=m(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function l(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return null==t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function w(t){return void 0===t}function _(t){return E(t)&&"[object RegExp]"===B(t)}function E(t){return"object"==typeof t&&null!==t}function x(t){return E(t)&&"[object Date]"===B(t)}function S(t){return E(t)&&("[object Error]"===B(t)||t instanceof Error)}function A(t){return"function"==typeof t}function I(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function B(t){return Object.prototype.toString.call(t)}function T(t){return 10>t?"0"+t.toString(10):t.toString(10)}function O(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var R=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(R,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}}),a=i[r];o>r;a=i[++r])s+=m(a)||!E(a)?" "+a:" "+n(a);return s},r.deprecate=function(t,e){function n(){if(!i){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}if(w(global.process))return function(){return r.deprecate(t,e).apply(this,arguments)};if(process.noDeprecation===!0)return t;var i=!1;return n};var L,N={};r.debuglog=function(t){if(w(L)&&(L=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!N[t])if(new RegExp("\\b"+t+"\\b","i").test(L)){var e=process.pid;N[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else N[t]=function(){};return N[t]},r.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=m,r.isNullOrUndefined=g,r.isNumber=y,r.isString=v,r.isSymbol=b,r.isUndefined=w,r.isRegExp=_,r.isObject=E,r.isDate=x,r.isError=S,r.isFunction=A,r.isPrimitive=I,r.isBuffer=t("./support/isBuffer");var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./support/isBuffer":62,inherits:42}],64:[function(t,e,r){!function(t,n){"object"==typeof r?e.exports=r=n():"function"==typeof define&&define.amd?define([],n):t.CryptoJS=n()}(this,function(){var t=t||function(t,e){var r={},n=r.lib={},i=n.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=n.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;i>o;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else if(r.length>65535)for(var o=0;i>o;o+=4)e[n+o>>>2]=r[o>>>2];else e.push.apply(e,r);return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){var e=e,r=987654321,n=4294967295;return function(){r=36969*(65535&r)+(r>>16)&n,e=18e3*(65535&e)+(e>>16)&n;var i=(r<<16)+e&n;return i/=4294967296,i+=.5,i*(t.random()>.5?1:-1)}},s=0;e>s;s+=4){var a=i(4294967296*(r||t.random()));r=987654071*a(),n.push(4294967296*a()|0)}return new o.init(n,e)}}),s=r.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;r>i;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;e>n;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;r>i;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;e>n;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},c=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},h=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,a=4*s,u=i/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*s,h=t.min(4*c,i);if(c){for(var f=0;c>f;f+=s)this._doProcessBlock(n,f);var l=n.splice(0,c);r.sigBytes-=h}return new o.init(l,h)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),f=(n.Hasher=h.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new f.HMAC.init(t,r).finalize(e)}}}),r.algo={});return r}(Math);return t})},{}],65:[function(t,e,r){!function(n,i,o){"object"==typeof r?e.exports=r=i(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],i):i(n.CryptoJS)}(this,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.x64,a=s.Word,u=r.algo,c=[],h=[],f=[];!function(){for(var t=1,e=0,r=0;24>r;r++){c[t+5*e]=(r+1)*(r+2)/2%64;var n=e%5,i=(2*t+3*e)%5;t=n,e=i}for(var t=0;5>t;t++)for(var e=0;5>e;e++)h[t+5*e]=e+(2*t+3*e)%5*5;for(var o=1,s=0;24>s;s++){for(var u=0,l=0,p=0;7>p;p++){if(1&o){var d=(1<<p)-1;32>d?l^=1<<d:u^=1<<d-32}128&o?o=o<<1^113:o<<=1}f[s]=a.create(u,l)}}();var l=[];!function(){for(var t=0;25>t;t++)l[t]=a.create()}();var p=u.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;25>e;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,n=this.blockSize/2,i=0;n>i;i++){var o=t[e+2*i],s=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=r[i];a.high^=s,a.low^=o}for(var u=0;24>u;u++){for(var p=0;5>p;p++){for(var d=0,m=0,g=0;5>g;g++){var a=r[p+5*g];d^=a.high,m^=a.low}var y=l[p];y.high=d,y.low=m}for(var p=0;5>p;p++)for(var v=l[(p+4)%5],b=l[(p+1)%5],w=b.high,_=b.low,d=v.high^(w<<1|_>>>31),m=v.low^(_<<1|w>>>31),g=0;5>g;g++){var a=r[p+5*g];a.high^=d,a.low^=m}for(var E=1;25>E;E++){var a=r[E],x=a.high,S=a.low,A=c[E];if(32>A)var d=x<<A|S>>>32-A,m=S<<A|x>>>32-A;else var d=S<<A-32|x>>>64-A,m=x<<A-32|S>>>64-A;var I=l[h[E]];I.high=d,I.low=m}var B=l[0],T=r[0];B.high=T.high,B.low=T.low;for(var p=0;5>p;p++)for(var g=0;5>g;g++){var E=p+5*g,a=r[E],O=l[E],k=l[(p+1)%5+5*g],R=l[(p+2)%5+5*g];a.high=O.high^~k.high&R.high,a.low=O.low^~k.low&R.low}var a=r[0],L=f[u];a.high^=L.high,a.low^=L.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],h=0;u>h;h++){var f=s[h],l=f.high,p=f.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(l)}return new i.init(c,a)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),r=0;25>r;r++)e[r]=e[r].clone();return t}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)}(Math),t.SHA3})},{"./core":64,"./x64-core":66}],66:[function(t,e,r){!function(n,i){"object"==typeof r?e.exports=r=i(t("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(t){return function(e){{var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=r.x64={};s.Word=i.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],n=0;e>n;n++){var i=t[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var t=i.clone.call(this),e=t.words=this.words.slice(0),r=e.length,n=0;r>n;n++)e[n]=e[n].clone();return t}})}}(),t})},{"./core":64}],67:[function(t,e,r){var n=t("url"),i=t("child_process").spawn,o=t("fs");r.XMLHttpRequest=function(){"use strict";var e,r,s=this,a=t("http"),u=t("https"),c={},h=!1,f={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},l=f,p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],d=["TRACE","TRACK","CONNECT"],m=!1,g=!1,y={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null;var v=function(t){return h||t&&-1===p.indexOf(t.toLowerCase())},b=function(t){return t&&-1===d.indexOf(t)};this.open=function(t,e,r,n,i){if(this.abort(),g=!1,!b(t))throw"SecurityError: Request method not allowed";c={method:t,url:e.toString(),async:"boolean"!=typeof r?!0:r,user:n||null,password:i||null},w(this.OPENED)},this.setDisableHeaderCheck=function(t){h=t},this.setRequestHeader=function(t,e){if(this.readyState!==this.OPENED)throw"INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN";if(!v(t))return void console.warn('Refused to set unsafe header "'+t+'"');if(m)throw"INVALID_STATE_ERR: send flag is true";l[t]=e},this.getResponseHeader=function(t){return"string"==typeof t&&this.readyState>this.OPENED&&r&&r.headers&&r.headers[t.toLowerCase()]&&!g?r.headers[t.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||g)return"";var t="";for(var e in r.headers)"set-cookie"!==e&&"set-cookie2"!==e&&(t+=e+": "+r.headers[e]+"\r\n");return t.substr(0,t.length-2)},this.getRequestHeader=function(t){return"string"==typeof t&&l[t]?l[t]:""},this.send=function(t){if(this.readyState!==this.OPENED)throw"INVALID_STATE_ERR: connection must be opened before send() is called";if(m)throw"INVALID_STATE_ERR: send has already been called";var h,f=!1,p=!1,d=n.parse(c.url);switch(d.protocol){case"https:":f=!0;case"http:":h=d.hostname;break;case"file:":p=!0;break;case void 0:case"":h="localhost";break;default:throw"Protocol not supported."}if(p){if("GET"!==c.method)throw"XMLHttpRequest: Only GET method is supported";if(c.async)o.readFile(d.pathname,"utf8",function(t,e){t?s.handleError(t):(s.status=200,s.responseText=e,w(s.DONE))});else try{this.responseText=o.readFileSync(d.pathname,"utf8"),this.status=200,w(s.DONE)}catch(y){this.handleError(y)}}else{var v=d.port||(f?443:80),b=d.pathname+(d.search?d.search:"");if(l.Host=h,f&&443===v||80===v||(l.Host+=":"+d.port),c.user){"undefined"==typeof c.password&&(c.password="");var _=new Buffer(c.user+":"+c.password);l.Authorization="Basic "+_.toString("base64")}"GET"===c.method||"HEAD"===c.method?t=null:t?(l["Content-Length"]=Buffer.isBuffer(t)?t.length:Buffer.byteLength(t),l["Content-Type"]||(l["Content-Type"]="text/plain;charset=UTF-8")):"POST"===c.method&&(l["Content-Length"]=0);var E={host:h,port:v,path:b,method:c.method,headers:l,agent:!1};if(g=!1,c.async){var x=f?u.request:a.request;m=!0,s.dispatchEvent("readystatechange");var S=function R(t){if(r=t,301===r.statusCode||302===r.statusCode||303===r.statusCode||307===r.statusCode){c.url=r.headers.location;var i=n.parse(c.url);h=i.hostname;var o={hostname:i.hostname,port:i.port,path:i.path,method:303===r.statusCode?"GET":c.method,headers:l};return e=x(o,R).on("error",A),void e.end()}r.setEncoding("utf8"),w(s.HEADERS_RECEIVED),s.status=r.statusCode,r.on("data",function(t){t&&(s.responseText+=t),m&&w(s.LOADING)}),r.on("end",function(){m&&(w(s.DONE),m=!1)}),r.on("error",function(t){s.handleError(t)})},A=function(t){s.handleError(t)};e=x(E,S).on("error",A),t&&e.write(t),e.end(),s.dispatchEvent("loadstart")}else{var I=".node-xmlhttprequest-content-"+process.pid,B=".node-xmlhttprequest-sync-"+process.pid;o.writeFileSync(B,"","utf8");for(var T="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(f?"s":"")+".request;var options = "+JSON.stringify(E)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+I+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+B+"');});response.on('error', function(error) {fs.writeFileSync('"+I+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+B+"');});}).on('error', function(error) {fs.writeFileSync('"+I+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+B+"');});"+(t?"req.write('"+JSON.stringify(t).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",O=i(process.argv[0],["-e",T]);o.existsSync(B););var k=JSON.parse(o.readFileSync(I,"utf8"));O.stdin.end(),o.unlinkSync(I),k.err?s.handleError(k.err):(r=k.data,s.status=k.data.statusCode,s.responseText=k.data.text,w(s.DONE))}}},this.handleError=function(t){this.status=503,this.statusText=t,this.responseText=t.stack,g=!0,w(this.DONE)},this.abort=function(){e&&(e.abort(),e=null),l=f,this.responseText="",this.responseXML="",g=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!m||this.readyState===this.DONE||(m=!1,w(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(t,e){t in y||(y[t]=[]),y[t].push(e)},this.removeEventListener=function(t,e){t in y&&(y[t]=y[t].filter(function(t){return t!==e}))},this.dispatchEvent=function(t){if("function"==typeof s["on"+t]&&s["on"+t](),t in y)for(var e=0,r=y[t].length;r>e;e++)y[t][e].call(s)};var w=function(t){(t==s.LOADING||s.readyState!==t)&&(s.readyState=t,(c.async||s.readyState<s.OPENED||s.readyState===s.DONE)&&s.dispatchEvent("readystatechange"),s.readyState!==s.DONE||g||(s.dispatchEvent("load"),s.dispatchEvent("loadend")))}}},{child_process:30,fs:30,http:37,https:41,url:61}],"bignumber.js":[function(t,e,r){"use strict";e.exports=BigNumber},{}],web3:[function(t,e,r){var n=t("./lib/web3");n.providers.HttpProvider=t("./lib/web3/httpprovider"),n.providers.QtSyncProvider=t("./lib/web3/qtsync"),n.eth.contract=t("./lib/web3/contract"),n.eth.namereg=t("./lib/web3/namereg"),n.eth.sendIBANTransaction=t("./lib/web3/transfer"),"undefined"!=typeof window&&"undefined"==typeof window.web3&&(window.web3=n),e.exports=n},{"./lib/web3":8,"./lib/web3/contract":10,"./lib/web3/httpprovider":18,"./lib/web3/namereg":22,"./lib/web3/qtsync":25,"./lib/web3/transfer":28}]},{},["web3"]);