web3.js/dist/web3.min.js

3 lines
74 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,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],2:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bool(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],3:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){var e=t.match(/^bytes([0-9]*)/),n=parseInt(e[1]);return n*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],4:[function(t,e,n){var r=t("./formatters"),o=t("./address"),i=t("./bool"),s=t("./int"),a=t("./uint"),u=t("./dynamicbytes"),c=t("./string"),l=t("./real"),f=t("./ureal"),p=t("./bytes"),h=function(t){this._types=t};h.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},h.prototype.encodeParam=function(t,e){return this.encodeParams([t],[e])},h.prototype.encodeParams=function(t,e){var n=this.getSolidityTypes(t),r=n.map(function(n,r){return n.encode(e[r],t[r])}),o=n.reduce(function(e,n,r){return e+n.staticPartLength(t[r])},0),i=this.encodeMultiWithOffset(t,n,r,o);return i},h.prototype.encodeMultiWithOffset=function(t,e,n,o){var i="",s=this,a=function(n){return e[n].isDynamicArray(t[n])||e[n].isDynamicType(t[n])};return t.forEach(function(u,c){if(a(c)){i+=r.formatInputInt(o).encode();var l=s.encodeWithOffset(t[c],e[c],n[c],o);o+=l.length/2}else i+=s.encodeWithOffset(t[c],e[c],n[c],o)}),t.forEach(function(r,u){if(a(u)){var c=s.encodeWithOffset(t[u],e[u],n[u],o);o+=c.length/2,i+=c}}),i},h.prototype.encodeWithOffset=function(t,e,n,o){var i=this;return e.isDynamicArray(t)?function(){var s=e.nestedName(t),a=e.staticPartLength(s),u=n[0];return function(){var t=2;if(e.isDynamicArray(s))for(var i=1;i<n.length;i++)t+=+n[i-1][0]||0,u+=r.formatInputInt(o+i*a+32*t).encode()}(),function(){for(var t=0;t<n.length-1;t++){var r=u/2;u+=i.encodeWithOffset(s,e,n[t+1],o+r)}}(),u}():e.isStaticArray(t)?function(){var s=e.nestedName(t),a=e.staticPartLength(s),u="";return function(){var t=0;if(e.isDynamicArray(s))for(var i=0;i<n.length;i++)t+=+(n[i-1]||[])[0]||0,u+=r.formatInputInt(o+i*a+32*t).encode()}(),function(){for(var t=0;t<n.length;t++){var r=u/2;u+=i.encodeWithOffset(s,e,n[t],o+r)}}(),u}():n},h.prototype.decodeParam=function(t,e){return this.decodeParams([t],e)[0]},h.prototype.decodeParams=function(t,e){var n=this.getSolidityTypes(t),r=this.getOffsets(t,n);return n.map(function(n,o){return n.decode(e,r[o],t[o],o)})},h.prototype.getOffsets=function(t,e){for(var n=e.map(function(e,n){return e.staticPartLength(t[n])}),r=0;r<n.length;r++){var o=n[r-1]||0;n[r]+=o}return n.map(function(n,r){return n-e[r].staticPartLength(t[r])})},h.prototype.getSolidityTypes=function(t){var e=this;return t.map(function(t){return e._requireType(t)})};var m=new h([new o,new i,new s,new a,new u,new p,new c,new l,new f]);e.exports=m},{"./address":1,"./bool":2,"./bytes":3,"./dynamicbytes":5,"./formatters":6,"./int":7,"./real":9,"./string":10,"./uint":12,"./ureal":13}],5:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bytes(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},i.prototype.isDynamicType=function(){return!0},e.exports=i},{"./formatters":6,"./type":11}],6:[function(t,e,n){var r=t("bignumber.js"),o=t("../utils/utils"),i=t("../utils/config"),s=t("./param"),a=function(t){r.config(i.ETH_BIGNUMBER_ROUNDING_MODE);var e=o.padLeft(o.toTwosComplement(t).round().toString(16),64);return new s(e)},u=function(t){var e=o.toHex(t).substr(2),n=Math.floor((e.length+63)/64);return e=o.padRight(e,64*n),new s(e)},c=function(t){var e=o.toHex(t).substr(2),n=e.length/2,r=Math.floor((e.length+63)/64);return e=o.padRight(e,64*r),new s(a(n).value+e)},l=function(t){var e=o.fromAscii(t).substr(2),n=e.length/2,r=Math.floor((e.length+63)/64);return e=o.padRight(e,64*r),new s(a(n).value+e)},f=function(t){var e="000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0");return new s(e)},p=function(t){return a(new r(t).times(new r(2).pow(128)))},h=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},m=function(t){var e=t.staticPart()||"0";return h(e)?new r(e,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(e,16)},d=function(t){var e=t.staticPart()||"0";return new r(e,16)},y=function(t){return m(t).dividedBy(new r(2).pow(128))},g=function(t){return d(t).dividedBy(new r(2).pow(128))},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t.staticPart()?!0:!1},b=function(t){return"0x"+t.staticPart()},w=function(t){var e=2*new r(t.dynamicPart().slice(0,64),16).toNumber();return"0x"+t.dynamicPart().substr(64,e)},_=function(t){var e=2*new r(t.dynamicPart().slice(0,64),16).toNumber();return o.toAscii(t.dynamicPart().substr(64,e))},x=function(t){var e=t.staticPart();return"0x"+e.slice(e.length-40,e.length)};e.exports={formatInputInt:a,formatInputBytes:u,formatInputDynamicBytes:c,formatInputString:l,formatInputBool:f,formatInputReal:p,formatOutputInt:m,formatOutputUInt:d,formatOutputReal:y,formatOutputUReal:g,formatOutputBool:v,formatOutputBytes:b,formatOutputDynamicBytes:w,formatOutputString:_,formatOutputAddress:x}},{"../utils/config":15,"../utils/utils":17,"./param":8,"bignumber.js":"bignumber.js"}],7:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],8:[function(t,e,n){var r=t("../utils/utils"),o=function(t,e){this.value=t||"",this.offset=e};o.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},o.prototype.withOffset=function(t){return new o(this.value,t)},o.prototype.combine=function(t){return new o(this.value+t.value)},o.prototype.isDynamic=function(){return void 0!==this.offset},o.prototype.offsetAsBytes=function(){return this.isDynamic()?r.padLeft(r.toTwosComplement(this.offset).toString(16),64):""},o.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},o.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},o.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},o.encodeList=function(t){var e=32*t.length,n=t.map(function(t){if(!t.isDynamic())return t;var n=e;return e+=t.dynamicPartLength(),t.withOffset(n)});return n.reduce(function(t,e){return t+e.dynamicPart()},n.reduce(function(t,e){return t+e.staticPart()},""))},e.exports=o},{"../utils/utils":17}],9:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputReal};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/real([0-9]*)?(\[([0-9]*)\])?/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],10:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^string(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},i.prototype.isDynamicType=function(){return!0},e.exports=i},{"./formatters":6,"./type":11}],11:[function(t,e,n){var r=t("./formatters"),o=t("./param"),i=function(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};i.prototype.isType=function(t){throw"this method should be overrwritten for type "+t},i.prototype.staticPartLength=function(t){throw"this method should be overrwritten for type: "+t},i.prototype.isDynamicArray=function(t){var e=this.nestedTypes(t);return!!e&&!e[e.length-1].match(/[0-9]{1,}/g)},i.prototype.isStaticArray=function(t){var e=this.nestedTypes(t);return!!e&&!!e[e.length-1].match(/[0-9]{1,}/g)},i.prototype.staticArrayLength=function(t){var e=this.nestedTypes(t);return e?parseInt(e[e.length-1].match(/[0-9]{1,}/g)||1):1},i.prototype.nestedName=function(t){var e=this.nestedTypes(t);return e?t.substr(0,t.length-e[e.length-1].length):t},i.prototype.isDynamicType=function(){return!1},i.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},i.prototype.encode=function(t,e){var n=this;return this.isDynamicArray(e)?function(){var o=t.length,i=n.nestedName(e),s=[];return s.push(r.formatInputInt(o).encode()),t.forEach(function(t){s.push(n.encode(t,i))}),s}():this.isStaticArray(e)?function(){for(var r=n.staticArrayLength(e),o=n.nestedName(e),i=[],s=0;r>s;s++)i.push(n.encode(t[s],o));return i}():this._inputFormatter(t,e).encode()},i.prototype.decode=function(t,e,n){var r=this;if(this.isDynamicArray(n))return function(){for(var o=parseInt("0x"+t.substr(2*e,64)),i=parseInt("0x"+t.substr(2*o,64)),s=o+32,a=r.nestedName(n),u=r.staticPartLength(a),c=[],l=0;i*u>l;l+=u)c.push(r.decode(t,s+l,a));return c}();if(this.isStaticArray(n))return function(){for(var o=r.staticArrayLength(n),i=e,s=r.nestedName(n),a=r.staticPartLength(s),u=[],c=0;o*a>c;c+=a)u.push(r.decode(t,i+c,s));return u}();if(this.isDynamicType(n))return function(){var n=parseInt("0x"+t.substr(2*e,64)),i=parseInt("0x"+t.substr(2*n,64)),s=Math.floor((i+31)/32);return r._outputFormatter(new o(t.substr(2*n,64*(1+s)),0))}();var i=this.staticPartLength(n);return this._outputFormatter(new o(t.substr(2*e,2*i)))},e.exports=i},{"./formatters":6,"./param":8}],12:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],13:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputUReal};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":6,"./type":11}],14:[function(t,e,n){"use strict";n.XMLHttpRequest="undefined"==typeof XMLHttpRequest?{}:XMLHttpRequest},{}],15:[function(t,e,n){var r=t("bignumber.js"),o=["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:o,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},{"bignumber.js":"bignumber.js"}],16:[function(t,e,n){var r=t("./utils"),o=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=r.toAscii(t)),o(t,{outputLength:256}).toString()}},{"./utils":17,"crypto-js/sha3":44}],17:[function(t,e,n){var r=t("bignumber.js"),o={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"},i=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},s=function(t,e,n){return t+new Array(e-t.length+1).join(n?n:"0")},a=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var o=parseInt(t.substr(n,2),16);e+=String.fromCharCode(o)}return decodeURIComponent(escape(e))},u=function(t){t=unescape(encodeURIComponent(t));for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n).toString(16);e+=r.length<2?"0"+r:r}return e},c=function(t,e){e=void 0===e?0:e;for(var n=u(t);n.length<2*e;)n+="00";return"0x"+n},l=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+")"},f=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},p=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},h=function(t){return b(t).toNumber()},m=function(t){var e=b(t),n=e.toString(16);return e.lessThan(0)?"-0x"+n.substr(1):"0x"+n},d=function(t){if(A(t))return m(+t);if(F(t))return m(t);if(T(t))return c(JSON.stringify(t));if(k(t)){if(0===t.indexOf("-0x"))return m(t);if(0===t.indexOf("0x"))return t;if(!isFinite(t))return c(t)}return m(t)},y=function(t){t=t?t.toLowerCase():"ether";var e=o[t];if(void 0===e)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(o,null,2));return new r(e,10)},g=function(t,e){var n=b(t).dividedBy(y(e));return F(t)?n:n.toString(10)},v=function(t,e){var n=b(t).times(y(e));return F(t)?n:n.toString(10)},b=function(t){return t=t||0,F(t)?t:!k(t)||0!==t.indexOf("0x")&&0!==t.indexOf("-0x")?new r(t.toString(10),10):new r(t.replace("0x",""),16)},w=function(t){var e=b(t);return e.lessThan(0)?new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(e).plus(1):e},_=function(t){return/^0x[0-9a-f]{40}$/.test(t)},x=function(t){return/^(0x)?[0-9a-f]{40}$/.test(t)},I=function(t){return _(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+i(d(t).substr(2),40)},F=function(t){return t instanceof r||t&&t.constructor&&"BigNumber"===t.constructor.name},k=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},N=function(t){return"function"==typeof t},T=function(t){return"object"==typeof t},A=function(t){return"boolean"==typeof t},B=function(t){return t instanceof Array},O=function(t){try{return!!JSON.parse(t)}catch(e){return!1}},P=function(t){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30})$/.test(t)};e.exports={padLeft:i,padRight:s,toHex:d,toDecimal:h,fromDecimal:m,toAscii:a,fromAscii:c,transformToFullName:l,extractDisplayName:f,extractTypeName:p,toWei:v,fromWei:g,toBigNumber:b,toTwosComplement:w,toAddress:I,isBigNumber:F,isStrictAddress:_,isAddress:x,isFunction:N,isString:k,isObject:T,isBoolean:A,isArray:B,isJson:O,isIBAN:P}},{"bignumber.js":"bignumber.js"}],18:[function(t,e,n){e.exports={version:"0.10.0"}},{}],19:[function(t,e,n){var r=t("./version.json"),o=t("./web3/net"),i=t("./web3/eth"),s=t("./web3/db"),a=t("./web3/shh"),u=t("./web3/watches"),c=t("./web3/filter"),l=t("./utils/utils"),f=t("./web3/formatters"),p=t("./web3/requestmanager"),h=t("./utils/config"),m=t("./web3/property"),d=t("./web3/batch"),y=t("./utils/sha3"),g=[new m({name:"version.client",getter:"web3_clientVersion"}),new m({name:"version.network",getter:"net_version",inputFormatter:l.toDecimal}),new m({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:l.toDecimal}),new m({name:"version.whisper",getter:"shh_version",inputFormatter:l.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=r.version,w.eth={},w.eth.filter=function(t,e){return new c(t,u.eth(),f.outputLogFormatter,e)},w.shh={},w.shh.filter=function(t,e){return new c(t,u.shh(),f.outputPostFormatter,e)},w.net={},w.db={},w.setProvider=function(t){this.currentProvider=t,p.getInstance().setProvider(t)},w.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},w.reset=function(){p.getInstance().reset(),h.defaultBlock="latest",h.defaultAccount=void 0},w.toHex=l.toHex,w.toAscii=l.toAscii,w.fromAscii=l.fromAscii,w.toDecimal=l.toDecimal,w.fromDecimal=l.fromDecimal,w.toBigNumber=l.toBigNumber,w.toWei=l.toWei,w.fromWei=l.fromWei,w.isAddress=l.isAddress,w.isIBAN=l.isIBAN,w.sha3=y,w.createBatch=function(){return new d},Object.defineProperty(w.eth,"defaultBlock",{get:function(){return h.defaultBlock},set:function(t){return h.defaultBlock=t,t}}),Object.defineProperty(w.eth,"defaultAccount",{get:function(){return h.defaultAccount},set:function(t){return h.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=l,w._extend.Method=t("./web3/method"),w._extend.Property=t("./web3/property"),b(w,g),v(w.net,o.methods),b(w.net,o.properties),v(w.eth,i.methods),b(w.eth,i.properties),v(w.db,s.methods),v(w.shh,a.methods),e.exports=w},{"./utils/config":15,"./utils/sha3":16,"./utils/utils":17,"./version.json":18,"./web3/batch":21,"./web3/db":23,"./web3/eth":25,"./web3/filter":27,"./web3/formatters":28,"./web3/method":34,"./web3/net":36,"./web3/property":37,"./web3/requestmanager":38,"./web3/shh":39,"./web3/watches":41}],20:[function(t,e,n){var r=t("../utils/sha3"),o=t("./event"),i=t("./formatters"),s=t("../utils/utils"),a=t("./filter"),u=t("./watches"),c=function(t,e){this._json=t,this._address=e};c.prototype.encode=function(t){t=t||{};var e={};return["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(n){e[n]=i.inputBlockNumberFormatter(t[n])}),e.address=this._address,e},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=t.topics[0].slice(2),n=this._json.filter(function(t){return e===r(s.transformToFullName(t))})[0];if(!n)return console.warn("cannot find event for log"),t;var i=new o(n,this._address);return i.decode(t)},c.prototype.execute=function(t,e){s.isFunction(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],1===arguments.length&&(t=null));var n=this.encode(t),r=this.decode.bind(this);return new a(n,u.eth(),r,e)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this);t.allEvents=e},e.exports=c},{"../utils/sha3":16,"../utils/utils":17,"./event":26,"./filter":27,"./formatters":28,"./watches":41}],21:[function(t,e,n){var r=t("./requestmanager"),o=t("./jsonrpc"),i=t("./errors"),s=function(){this.requests=[]};s.prototype.add=function(t){this.requests.push(t)},s.prototype.execute=function(){var t=this.requests;r.getInstance().sendBatch(t,function(e,n){n=n||[],t.map(function(t,e){return n[e]||{}}).forEach(function(e,n){if(t[n].callback){if(!o.getInstance().isValidResponse(e))return t[n].callback(i.InvalidResponse(e));t[n].callback(null,t[n].format?t[n].format(e.result):e.result)}})})},e.exports=s},{"./errors":24,"./jsonrpc":33,"./requestmanager":38}],22:[function(t,e,n){var r=t("../web3"),o=t("../utils/utils"),i=t("../solidity/coder"),s=t("./event"),a=t("./function"),u=t("./allevents"),c=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 i.encodeParams(t,e)})[0]||""},l=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)})},f=function(t,e){var n=e.filter(function(t){return"event"===t.type}),r=new u(n,t.address);r.attachToContract(t),n.map(function(e){return new s(e,t.address)}).forEach(function(e){e.attachToContract(t)})},p=function(t){return new m(t)},h=function(t,e,n){var o=0,i=!1,s=r.eth.filter("latest",function(a){if(!a&&!i)if(o++,o>50){if(s.stopWatching(),i=!0,!n)throw new Error("Contract transaction couldn't be found after 50 blocks");n(new Error("Contract transaction couldn't be found after 50 blocks"))}else r.eth.getTransactionReceipt(t.transactionHash,function(o,a){a&&!i&&r.eth.getCode(a.contractAddress,function(r,o){if(!i)if(s.stopWatching(),i=!0,o.length>2)t.address=a.contractAddress,l(t,e),f(t,e),n&&n(null,t);else{if(!n)throw new Error("The contract code couldn't be stored, please check your gas amount.");n(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},m=function(t){this.abi=t};m.prototype["new"]=function(){var t,e=this,n=new d(this.abi),i={},s=Array.prototype.slice.call(arguments);o.isFunction(s[s.length-1])&&(t=s.pop());var a=s[s.length-1];o.isObject(a)&&!o.isArray(a)&&(i=s.pop());var u=c(this.abi,s);if(i.data+=u,t)r.eth.sendTransaction(i,function(r,o){r?t(r):(n.transactionHash=o,t(null,n),h(n,e.abi,t))});else{var l=r.eth.sendTransaction(i);n.transactionHash=l,h(n,e.abi)}return n},m.prototype.at=function(t,e){var n=new d(this.abi,t);return l(n,this.abi),f(n,this.abi),e&&e(null,n),n};var d=function(t,e){this.address=e};e.exports=p},{"../solidity/coder":4,"../utils/utils":17,"../web3":19,"./allevents":20,"./event":26,"./function":29}],23:[function(t,e,n){var r=t("./method"),o=new r({name:"putString",call:"db_putString",params:3}),i=new r({name:"getString",call:"db_getString",params:2}),s=new r({name:"putHex",call:"db_putHex",params:3}),a=new r({name:"getHex",call:"db_getHex",params:2}),u=[o,i,s,a];e.exports={methods:u}},{"./method":34}],24:[function(t,e,n){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: "+t;return new Error(e)}}},{}],25:[function(t,e,n){"use strict";var r=t("./formatters"),o=t("../utils/utils"),i=t("./method"),s=t("./property"),a=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},u=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},c=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},l=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},f=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},p=new i({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[o.toAddress,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),h=new i({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,o.toHex,r.inputDefaultBlockNumberFormatter]}),m=new i({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.toAddress,r.inputDefaultBlockNumberFormatter]}),d=new i({name:"getBlock",call:a,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:r.outputBlockFormatter}),y=new i({name:"getUncle",call:c,params:2,inputFormatter:[r.inputBlockNumberFormatter,o.toHex],outputFormatter:r.outputBlockFormatter}),g=new i({name:"getCompilers",call:"eth_getCompilers",params:0}),v=new i({name:"getBlockTransactionCount",call:l,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:o.toDecimal}),b=new i({name:"getBlockUncleCount",call:f,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:o.toDecimal}),w=new i({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),_=new i({name:"getTransactionFromBlock",call:u,params:2,inputFormatter:[r.inputBlockNumberFormatter,o.toHex],outputFormatter:r.outputTransactionFormatter}),x=new i({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),I=new i({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:o.toDecimal}),F=new i({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),k=new i({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),N=new i({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputTransactionFormatter,r.inputDefaultBlockNumberFormatter]}),T=new i({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputTransactionFormatter],outputFormatter:o.toDecimal}),A=new i({name:"compile.solidity",call:"eth_compileSolidity",params:1}),B=new i({name:"compile.lll",call:"eth_compileLLL",params:1}),O=new i({name:"compile.serpent",call:"eth_compileSerpent",params:1}),P=new i({name:"submitWork",call:"eth_submitWork",params:3}),D=new i({name:"getWork",call:"eth_getWork",params:0}),S=[p,h,m,d,y,g,v,b,w,_,x,I,N,T,F,k,A,B,O,P,D],C=[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:o.toDecimal}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:o.toDecimal})];e.exports={methods:S,properties:C}},{"../utils/utils":17,"./formatters":28,"./method":34,"./property":37}],26:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./formatters"),s=t("../utils/sha3"),a=t("./filter"),u=t("./watches"),c=function(t,e){this._params=t.inputs,this._name=r.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 r.extractDisplayName(this._name)},c.prototype.typeName=function(){return r.extractTypeName(this._name)},c.prototype.signature=function(){return s(this._name)},c.prototype.encode=function(t,e){t=t||{},e=e||{};var n={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){n[t]=i.inputBlockNumberFormatter(e[t])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var s=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var n=t[e.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(t){return"0x"+o.encodeParam(e.type,t)}):"0x"+o.encodeParam(e.type,n)});return n.topics=n.topics.concat(s),n},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),n=e.map(function(t){return t.slice(2)}).join(""),r=o.decodeParams(this.types(!0),n),s=t.data.slice(2),a=o.decodeParams(this.types(!1),s),u=i.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?r.shift():a.shift(),t},{}),delete u.data,delete u.topics,u},c.prototype.execute=function(t,e,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(e=null),1===arguments.length&&(e=null,t={}));var o=this.encode(t,e),i=this.decode.bind(this);return new a(o,u.eth(),i,n)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this),n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=this.execute.bind(this,t)},e.exports=c},{"../solidity/coder":4,"../utils/sha3":16,"../utils/utils":17,"./filter":27,"./formatters":28,"./watches":41}],27:[function(t,e,n){var r=t("./requestmanager"),o=t("./formatters"),i=t("../utils/utils"),s=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:i.fromAscii(t))},a=function(t){return i.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return i.isArray(t)?t.map(s):s(t)}),{topics:t.topics,to:t.to,address:t.address,fromBlock:o.inputBlockNumberFormatter(t.fromBlock),toBlock:o.inputBlockNumberFormatter(t.toBlock)})},u=function(t,e){i.isString(t.options)||t.get(function(t,n){t&&e(t),i.isArray(n)&&n.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):void n.forEach(function(e){e=t.formatter?t.formatter(e):e,t.callbacks.forEach(function(t){t(null,e)})})};r.getInstance().startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},l=function(t,e,n,r){var o=this,i={};return e.forEach(function(t){t.attachToObject(i)}),this.options=a(t),this.implementation=i,this.filterId=null,this.callbacks=[],this.pollFilters=[],this.formatter=n,this.implementation.newFilter(this.options,function(t,e){if(t)o.callbacks.forEach(function(e){e(t)});else if(o.filterId=e,o.callbacks.forEach(function(t){u(o,t)}),o.callbacks.length>0&&c(o),r)return o.watch(r)}),this};l.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(u(this,t),c(this)),this},l.prototype.stopWatching=function(){r.getInstance().stopPolling(this.filterId),this.implementation.uninstallFilter(this.filterId,function(){}),this.callbacks=[]},l.prototype.get=function(t){var e=this;if(!i.isFunction(t)){var n=this.implementation.getLogs(this.filterId);return n.map(function(t){return e.formatter?e.formatter(t):t})}return this.implementation.getLogs(this.filterId,function(n,r){n?t(n):t(null,r.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=l},{"../utils/utils":17,"./formatters":28,"./requestmanager":38}],28:[function(t,e,n){var r=t("../utils/utils"),o=t("../utils/config"),i=function(t){return r.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},a=function(t){return void 0===t?o.defaultBlock:u(t)},u=function(t){return void 0===t?void 0:s(t)?t:r.toHex(t)},c=function(t){return t.from=t.from||o.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]=r.fromDecimal(t[e])}),t},l=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),
t.nonce=r.toDecimal(t.nonce),t.gas=r.toDecimal(t.gas),t.gasPrice=r.toBigNumber(t.gasPrice),t.value=r.toBigNumber(t.value),t},f=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.cumulativeGasUsed=r.toDecimal(t.cumulativeGasUsed),t.gasUsed=r.toDecimal(t.gasUsed),r.isArray(t.logs)&&(t.logs=t.logs.map(function(t){return h(t)})),t},p=function(t){return t.gasLimit=r.toDecimal(t.gasLimit),t.gasUsed=r.toDecimal(t.gasUsed),t.size=r.toDecimal(t.size),t.timestamp=r.toDecimal(t.timestamp),null!==t.number&&(t.number=r.toDecimal(t.number)),t.difficulty=r.toBigNumber(t.difficulty),t.totalDifficulty=r.toBigNumber(t.totalDifficulty),r.isArray(t.transactions)&&t.transactions.forEach(function(t){return r.isString(t)?void 0:l(t)}),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=r.toDecimal(t.logIndex)),t},m=function(t){return t.payload=r.toHex(t.payload),t.ttl=r.fromDecimal(t.ttl),t.workToProve=r.fromDecimal(t.workToProve),t.priority=r.fromDecimal(t.priority),r.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return r.fromAscii(t)}),t},d=function(t){return t.expiry=r.toDecimal(t.expiry),t.sent=r.toDecimal(t.sent),t.ttl=r.toDecimal(t.ttl),t.workProved=r.toDecimal(t.workProved),t.payloadRaw=t.payload,t.payload=r.toAscii(t.payload),r.isJson(t.payload)&&(t.payload=JSON.parse(t.payload)),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return r.toAscii(t)}),t};e.exports={inputDefaultBlockNumberFormatter:a,inputBlockNumberFormatter:u,inputTransactionFormatter:c,inputPostFormatter:m,outputBigNumberFormatter:i,outputTransactionFormatter:l,outputTransactionReceiptFormatter:f,outputBlockFormatter:p,outputLogFormatter:h,outputPostFormatter:d}},{"../utils/config":15,"../utils/utils":17}],29:[function(t,e,n){var r=t("../web3"),o=t("../solidity/coder"),i=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=i.transformToFullName(t),this._address=e};u.prototype.extractCallback=function(t){return i.isFunction(t[t.length-1])?t.pop():void 0},u.prototype.extractDefaultBlock=function(t){return t.length>this._inputTypes.length&&!i.isObject(t[t.length-1])?s.inputDefaultBlockNumberFormatter(t.pop()):void 0},u.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&i.isObject(t[t.length-1])&&(e=t[t.length-1]),e.to=this._address,e.data="0x"+this.signature()+o.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=o.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),n=this.extractDefaultBlock(t),o=this.toPayload(t);if(!e){var i=r.eth.call(o,n);return this.unpackOutput(i)}var s=this;r.eth.call(o,n,function(t,n){e(t,s.unpackOutput(n))})},u.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.toPayload(t);return e?void r.eth.sendTransaction(n,e):r.eth.sendTransaction(n)},u.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t);return e?void r.eth.estimateGas(n,e):r.eth.estimateGas(n)},u.prototype.displayName=function(){return i.extractDisplayName(this._name)},u.prototype.typeName=function(){return i.extractTypeName(this._name)},u.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:e,params:[n],format:r}},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 n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=e},e.exports=u},{"../solidity/coder":4,"../utils/sha3":16,"../utils/utils":17,"../web3":19,"./formatters":28}],30:[function(t,e,n){"use strict";var r,o=t("./errors");r="undefined"!=typeof Meteor&&Meteor.isServer?Npm.require("xmlhttprequest").XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest?window.XMLHttpRequest:t("xmlhttprequest").XMLHttpRequest;var i=function(t){this.host=t||"http://localhost:8545"};i.prototype.prepareRequest=function(t){var e=new r;return e.open("POST",this.host,t),e.setRequestHeader("Content-Type","application/json"),e},i.prototype.send=function(t){var e=this.prepareRequest(!1);try{e.send(JSON.stringify(t))}catch(n){throw o.InvalidConnection(this.host)}var r=e.responseText;try{r=JSON.parse(r)}catch(i){throw o.InvalidResponse(e.responseText)}return r},i.prototype.sendAsync=function(t,e){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState){var t=n.responseText,r=null;try{t=JSON.parse(t)}catch(i){r=o.InvalidResponse(n.responseText)}e(r,t)}};try{n.send(JSON.stringify(t))}catch(r){e(o.InvalidConnection(this.host))}},i.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(t){return!1}},e.exports=i},{"./errors":24,xmlhttprequest:14}],31:[function(t,e,n){var r=t("../utils/utils"),o=function(t){this._iban=t};o.prototype.isValid=function(){return r.isIBAN(this._iban)},o.prototype.isDirect=function(){return 34===this._iban.length},o.prototype.isIndirect=function(){return 20===this._iban.length},o.prototype.checksum=function(){return this._iban.substr(2,2)},o.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},o.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},o.prototype.address=function(){return this.isDirect()?this._iban.substr(4):""},e.exports=o},{"../utils/utils":17}],32:[function(t,e,n){"use strict";var r=t("../utils/utils"),o=t("./errors"),i=function(t,e){var n={jsonrpc:"2.0",error:{code:-32603,message:"IPC Request timed out for method '"+t+"'"},id:e};return JSON.stringify(n)},s=function(t,e){var n=this;this.responseCallbacks={},this.path=t,this.connection=e.connect({path:this.path}),this.connection.on("error",function(t){console.error("IPC Connection Error",t),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(t){n._parseResponse(t.toString()).forEach(function(t){var e=null;r.isArray(t)?t.forEach(function(t){n.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,n.responseCallbacks[e]&&(n.responseCallbacks[e](null,t),delete n.responseCallbacks[e])})})};s.prototype._parseResponse=function(t){var e=this,n=[],r=t.replace(/\}\{/g,"}|--|{").replace(/\}\]\[\{/g,"}]|--|[{").replace(/\}\[\{/g,"}|--|[{").replace(/\}\]\{/g,"}]|--|{").split("|--|");return r.forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var r=null;try{r=JSON.parse(t)}catch(i){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e.timeout(),o.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,r&&n.push(r)}),n},s.prototype._addResponseCallback=function(t,e){var n=t.id||t[0].id,r=t.method||t[0].method;this.responseCallbacks[n]=e,this.responseCallbacks[n].method=r},s.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i(this.responseCallbacks[t].method,t)),delete this.responseCallbacks[t])},s.prototype.isConnected=function(){var t=this;return t.connection.writable||t.connection.connect({path:t.path}),!!this.connection.writable},s.prototype.send=function(t){if(this.connection.writeSync){var e;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(t));try{e=JSON.parse(n)}catch(r){throw o.InvalidResponse(n)}return e}throw new Error('You tried to send "'+t.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},s.prototype.sendAsync=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},e.exports=s},{"../utils/utils":17,"./errors":24}],33:[function(t,e,n){var r=function(){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,void(this.messageId=1))};r.getInstance=function(){var t=new r;return t},r.prototype.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:this.messageId++}},r.prototype.isValidResponse=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},r.prototype.toBatchPayload=function(t){var e=this;return t.map(function(t){return e.toPayload(t.method,t.params)})},e.exports=r},{}],34:[function(t,e,n){var r=t("./requestmanager"),o=t("../utils/utils"),i=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 o.isFunction(this.call)?this.call(t):this.call},s.prototype.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},s.prototype.validateArgs=function(t){if(t.length!==this.params)throw i.InvalidNumberOfParams()},s.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,n){return e?e(t[n]):t[n]}):t},s.prototype.formatOutput=function(t){return this.outputFormatter&&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 n=this.name.split(".");n.length>1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},s.prototype.toPayload=function(t){var e=this.getCall(t),n=this.extractCallback(t),r=this.formatInput(t);return this.validateArgs(r),{method:e,params:r,callback:n}},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 r.getInstance().sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))})}return this.formatOutput(r.getInstance().send(t))},e.exports=s},{"../utils/utils":17,"./errors":24,"./requestmanager":38}],35:[function(t,e,n){var r=t("./contract"),o="0xc6d9d2cd449a754c494264e1809c50e34d64562b",i=[{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=r(i).at(o)},{"./contract":22}],36:[function(t,e,n){var r=t("../utils/utils"),o=t("./property"),i=[],s=[new o({name:"listening",getter:"net_listening"}),new o({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})];e.exports={methods:i,properties:s}},{"../utils/utils":17,"./property":37}],37:[function(t,e,n){var r=t("./requestmanager"),o=t("../utils/utils"),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.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},i.prototype.attachToObject=function(t){var e={get:this.get.bind(this)},n=this.name.split("."),r=n[0];n.length>1&&(t[n[0]]=t[n[0]]||{},t=t[n[0]],r=n[1]),Object.defineProperty(t,r,e);var o=function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},i=this.getAsync.bind(this);i.request=this.request.bind(this),t[o("get",r)]=i},i.prototype.get=function(){return this.formatOutput(r.getInstance().send({method:this.getter}))},i.prototype.getAsync=function(t){var e=this;r.getInstance().sendAsync({method:this.getter},function(n,r){return n?t(n):void t(n,e.formatOutput(r))})},i.prototype.request=function(){var t={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return t.format=this.formatOutput.bind(this),t},e.exports=i},{"../utils/utils":17,"./requestmanager":38}],38:[function(t,e,n){var r=t("./jsonrpc"),o=t("../utils/utils"),i=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=r.getInstance().toPayload(t.method,t.params),n=this.provider.send(e);if(!r.getInstance().isValidResponse(n))throw s.InvalidResponse(n);return n.result},a.prototype.sendAsync=function(t,e){if(!this.provider)return e(s.InvalidProvider());var n=r.getInstance().toPayload(t.method,t.params);this.provider.sendAsync(n,function(t,n){return t?e(t):r.getInstance().isValidResponse(n)?void e(null,n.result):e(s.InvalidResponse(n))})},a.prototype.sendBatch=function(t,e){if(!this.provider)return e(s.InvalidProvider());var n=r.getInstance().toBatchPayload(t);this.provider.sendAsync(n,function(t,n){return t?e(t):o.isArray(n)?void e(t,n):e(s.InvalidResponse(n))})},a.prototype.setProvider=function(t){this.provider=t,this.provider&&!this.isPolling&&(this.poll(),this.isPolling=!0)},a.prototype.startPolling=function(t,e,n,r){this.polls["poll_"+e]={data:t,id:e,callback:n,uninstall:r}},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),i.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(s.InvalidProvider());var t=[],e=[];for(var n in this.polls)t.push(this.polls[n].data),e.push(n);if(0!==t.length){var a=r.getInstance().toBatchPayload(t),u=this;this.provider.sendAsync(a,function(t,n){if(!t){if(!o.isArray(n))throw s.InvalidResponse(n);n.map(function(t,n){var r=e[n];return u.polls[r]?(t.callback=u.polls[r].callback,t):!1}).filter(function(t){return!!t}).filter(function(t){var e=r.getInstance().isValidResponse(t);return e||t.callback(s.InvalidResponse(t)),e}).filter(function(t){return o.isArray(t.result)&&t.result.length>0}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=a},{"../utils/config":15,"../utils/utils":17,"./errors":24,"./jsonrpc":33}],39:[function(t,e,n){var r=t("./method"),o=t("./formatters"),i=new r({name:"post",call:"shh_post",params:1,inputFormatter:[o.inputPostFormatter]}),s=new r({name:"newIdentity",call:"shh_newIdentity",params:0}),a=new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),u=new r({name:"newGroup",call:"shh_newGroup",params:0}),c=new r({name:"addToGroup",call:"shh_addToGroup",params:0}),l=[i,s,a,u,c];e.exports={methods:l}},{"./formatters":28,"./method":34}],40:[function(t,e,n){var r=t("../web3"),o=t("./icap"),i=t("./namereg"),s=t("./contract"),a=function(t,e,n,r){var s=new o(e);if(!s.isValid())throw new Error("invalid iban address");if(s.isDirect())return u(t,s.address(),n,r);if(!r){var a=i.addr(s.institution());return c(t,a,n,s.client())}i.addr(s.insitution(),function(e,o){return c(t,o,n,s.client(),r)})},u=function(t,e,n,o){return r.eth.sendTransaction({address:e,from:t,value:n},o)},c=function(t,e,n,r,o){var i=[{constant:!1,inputs:[{name:"name",type:"bytes32"}],name:"deposit",outputs:[],type:"function"}];return s(i).at(e).deposit(r,{from:t,value:n},o)};e.exports=a},{"../web3":19,"./contract":22,"./icap":31,"./namereg":35}],41:[function(t,e,n){var r=t("./method"),o=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 r({name:"newFilter",call:t,params:1}),n=new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),o=new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),i=new r({name:"poll",call:"eth_getFilterChanges",params:1});return[e,n,o,i]},i=function(){var t=new r({name:"newFilter",call:"shh_newFilter",params:1}),e=new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),n=new r({name:"getLogs",call:"shh_getMessages",params:1}),o=new r({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,n,o]};e.exports={eth:o,shh:i}},{"./method":34}],42:[function(t,e,n){},{}],43:[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=n=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,e){var n={},r=n.lib={},o=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},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)}}}(),i=r.WordArray=o.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;o>i;i++){var s=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=s<<24-(r+i)%4*8}else for(var i=0;o>i;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){var e=e,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,e=18e3*(65535&e)+(e>>16)&r;var o=(n<<16)+e&r;return o/=4294967296,o+=.5,o*(t.random()>.5?1:-1)}},s=0;e>s;s+=4){var a=o(4294967296*(n||t.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new i.init(r,e)}}),s=n.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;n>o;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new i.init(n,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;n>o;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new i.init(n,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)))}},l=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new i.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 n=this._data,r=n.words,o=n.sigBytes,s=this.blockSize,a=4*s,u=o/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*s,l=t.min(4*c,o);if(c){for(var f=0;c>f;f+=s)this._doProcessBlock(r,f);var p=r.splice(0,c);n.sigBytes-=l}return new i.init(p,l)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),f=(r.Hasher=l.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.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,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new f.HMAC.init(t,n).finalize(e)}}}),n.algo={});return n}(Math);return t})},{}],44:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,s=n.x64,a=s.Word,u=n.algo,c=[],l=[],f=[];!function(){for(var t=1,e=0,n=0;24>n;n++){c[t+5*e]=(n+1)*(n+2)/2%64;var r=e%5,o=(2*t+3*e)%5;t=r,e=o}for(var t=0;5>t;t++)for(var e=0;5>e;e++)l[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,s=0;24>s;s++){for(var u=0,p=0,h=0;7>h;h++){if(1&i){var m=(1<<h)-1;32>m?p^=1<<m:u^=1<<m-32}128&i?i=i<<1^113:i<<=1}f[s]=a.create(u,p)}}();var p=[];!function(){for(var t=0;25>t;t++)p[t]=a.create()}();var h=u.SHA3=i.extend({cfg:i.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 n=this._state,r=this.blockSize/2,o=0;r>o;o++){var i=t[e+2*o],s=t[e+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=n[o];a.high^=s,a.low^=i}for(var u=0;24>u;u++){for(var h=0;5>h;h++){for(var m=0,d=0,y=0;5>y;y++){var a=n[h+5*y];m^=a.high,d^=a.low}var g=p[h];g.high=m,g.low=d}for(var h=0;5>h;h++)for(var v=p[(h+4)%5],b=p[(h+1)%5],w=b.high,_=b.low,m=v.high^(w<<1|_>>>31),d=v.low^(_<<1|w>>>31),y=0;5>y;y++){var a=n[h+5*y];a.high^=m,a.low^=d}for(var x=1;25>x;x++){var a=n[x],I=a.high,F=a.low,k=c[x];if(32>k)var m=I<<k|F>>>32-k,d=F<<k|I>>>32-k;else var m=F<<k-32|I>>>64-k,d=I<<k-32|F>>>64-k;var N=p[l[x]];N.high=m,N.low=d}var T=p[0],A=n[0];T.high=A.high,T.low=A.low;for(var h=0;5>h;h++)for(var y=0;5>y;y++){var x=h+5*y,a=n[x],B=p[x],O=p[(h+1)%5+5*y],P=p[(h+2)%5+5*y];a.high=B.high^~O.high&P.high,a.low=B.low^~O.low&P.low}var a=n[0],D=f[u];a.high^=D.high,a.low^=D.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(8*this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],l=0;u>l;l++){var f=s[l],p=f.high,h=f.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(p)}return new o.init(c,a)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),n=0;25>n;n++)e[n]=e[n].clone();return t}});n.SHA3=i._createHelper(h),n.HmacSHA3=i._createHmacHelper(h)}(Math),t.SHA3})},{"./core":43,"./x64-core":45}],45:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){{var n=t,r=n.lib,o=r.Base,i=r.WordArray,s=n.x64={};s.Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=o.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;e>r;r++){var o=t[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var t=o.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;n>r;r++)e[r]=e[r].clone();return t}})}}(),t})},{"./core":43}],"bignumber.js":[function(t,e,n){!function(n){"use strict";function r(t){function e(t,r){var o,i,s,a,u,c,l=this;if(!(l instanceof e))return W&&D(26,"constructor call without new",t),new e(t,r);if(null!=r&&z(r,2,64,R,"base")){if(r=0|r,c=t+"",10==r)return l=new e(t instanceof e?t:c),S(l,H+l.e+1,q);if((a="number"==typeof t)&&0*t!=0||!new RegExp("^-?"+(o="["+x.slice(0,r)+"]+")+"(?:\\."+o+")?$",37>r?"i":"").test(c))return d(l,c,a,r);a?(l.s=0>1/t?(c=c.slice(1),-1):1,W&&c.replace(/^0\.0*|\./,"").length>15&&D(R,_,t),a=!1):l.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,l.s)}else{if(t instanceof e)return l.s=t.s,l.e=t.e,l.c=(t=t.c)?t.slice():t,void(R=0);if((a="number"==typeof t)&&0*t==0){if(l.s=0>1/t?(t=-t,-1):1,t===~~t){for(i=0,s=t;s>=10;s/=10,i++);return l.e=i,l.c=[t],void(R=0)}c=t+""}else{if(!y.test(c=t+""))return d(l,c,a);l.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(s=c.search(/e/i))>0?(0>i&&(i=s),i+=+c.slice(s+1),c=c.substring(0,s)):0>i&&(i=c.length),s=0;48===c.charCodeAt(s);s++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(s,u+1))if(u=c.length,a&&W&&u>15&&D(R,_,l.s*t),i=i-s-1,i>G)l.c=l.e=null;else if(M>i)l.c=[l.e=0];else{if(l.e=i,l.c=[],s=(i+1)%F,0>i&&(s+=F),u>s){for(s&&l.c.push(+c.slice(0,s)),u-=F;u>s;)l.c.push(+c.slice(s,s+=F));c=c.slice(s),s=F-c.length}else s-=u;for(;s--;c+="0");l.c.push(+c)}else l.c=[l.e=0];R=0}function n(t,n,r,o){var s,a,u,l,p,h,m,d=t.indexOf("."),y=H,g=q;for(37>r&&(t=t.toLowerCase()),d>=0&&(u=V,V=0,t=t.replace(".",""),m=new e(r),p=m.pow(t.length-d),V=u,m.c=c(f(i(p.c),p.e),10,n),m.e=m.c.length),h=c(t,r,n),a=u=h.length;0==h[--u];h.pop());if(!h[0])return"0";if(0>d?--a:(p.c=h,p.e=a,p.s=o,p=C(p,m,y,g,n),h=p.c,l=p.r,a=p.e),s=a+y+1,d=h[s],u=n/2,l=l||0>s||null!=h[s+1],l=4>g?(null!=d||l)&&(0==g||g==(p.s<0?3:2)):d>u||d==u&&(4==g||l||6==g&&1&h[s-1]||g==(p.s<0?8:7)),1>s||!h[0])t=l?f("1",-y):"0";else{if(h.length=s,l)for(--n;++h[--s]>n;)h[s]=0,s||(++a,h.unshift(1));for(u=h.length;!h[--u];);for(d=0,t="";u>=d;t+=x.charAt(h[d++]));t=f(t,a)}return t}function h(t,n,r,o){var s,a,u,c,p;if(r=null!=r&&z(r,0,8,o,w)?0|r:q,!t.c)return t.toString();if(s=t.c[0],u=t.e,null==n)p=i(t.c),p=19==o||24==o&&j>=u?l(p,u):f(p,u);else if(t=S(new e(t),n,r),a=t.e,p=i(t.c),c=p.length,19==o||24==o&&(a>=n||j>=a)){for(;n>c;p+="0",c++);p=l(p,a)}else if(n-=u,p=f(p,a),a+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=a-c,n>0)for(a+1==c&&(p+=".");n--;p+="0");return t.s<0&&s?"-"+p:p}function B(t,n){var r,o,i=0;for(u(t[0])&&(t=t[0]),r=new e(t[0]);++i<t.length;){if(o=new e(t[i]),!o.s){r=o;break}n.call(r,o)&&(r=o)}return r}function O(t,e,n,r,o){return(e>t||t>n||t!=p(t))&&D(r,(o||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function P(t,e,n){for(var r=1,o=e.length;!e[--o];e.pop());for(o=e[0];o>=10;o/=10,r++);return(n=r+n*F-1)>G?t.c=t.e=null:M>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function D(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",R=0,r}function S(t,e,n,r){var o,i,s,a,u,c,l,f=t.c,p=N;if(f){t:{for(o=1,a=f[0];a>=10;a/=10,o++);if(i=e-o,0>i)i+=F,s=e,u=f[c=0],l=u/p[o-s-1]%10|0;else if(c=g((i+1)/F),c>=f.length){if(!r)break t;for(;f.length<=c;f.push(0));u=l=0,o=1,i%=F,s=i-F+1}else{for(u=a=f[c],o=1;a>=10;a/=10,o++);i%=F,s=i-F+o,l=0>s?0:u/p[o-s-1]%10|0}if(r=r||0>e||null!=f[c+1]||(0>s?u:u%p[o-s-1]),r=4>n?(l||r)&&(0==n||n==(t.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?u/p[o-s]:0:f[c-1])%10&1||n==(t.s<0?8:7)),1>e||!f[0])return f.length=0,r?(e-=t.e+1,f[0]=p[e%F],t.e=-e||0):f[0]=t.e=0,t;if(0==i?(f.length=c,a=1,c--):(f.length=c+1,a=p[F-i],f[c]=s>0?v(u/p[o-s]%p[s])*a:0),r)for(;;){if(0==c){for(i=1,s=f[0];s>=10;s/=10,i++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);i!=a&&(t.e++,f[0]==I&&(f[0]=1));break}if(f[c]+=a,f[c]!=I)break;f[c--]=0,a=1}for(i=f.length;0===f[--i];f.pop());}t.e>G?t.c=t.e=null:t.e<M&&(t.c=[t.e=0])}return t}var C,R=0,E=e.prototype,L=new e(1),H=20,q=4,j=-7,U=21,M=-1e7,G=1e7,W=!0,z=O,$=!1,J=1,V=100,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return e.another=r,e.ROUND_UP=0,e.ROUND_DOWN=1,e.ROUND_CEIL=2,e.ROUND_FLOOR=3,e.ROUND_HALF_UP=4,e.ROUND_HALF_DOWN=5,e.ROUND_HALF_EVEN=6,e.ROUND_HALF_CEIL=7,e.ROUND_HALF_FLOOR=8,e.EUCLID=9,e.config=function(){var t,e,n=0,r={},o=arguments,i=o[0],s=i&&"object"==typeof i?function(){return i.hasOwnProperty(e)?null!=(t=i[e]):void 0}:function(){return o.length>n?null!=(t=o[n++]):void 0};return s(e="DECIMAL_PLACES")&&z(t,0,A,2,e)&&(H=0|t),r[e]=H,s(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(q=0|t),r[e]=q,s(e="EXPONENTIAL_AT")&&(u(t)?z(t[0],-A,0,2,e)&&z(t[1],0,A,2,e)&&(j=0|t[0],U=0|t[1]):z(t,-A,A,2,e)&&(j=-(U=0|(0>t?-t:t)))),r[e]=[j,U],s(e="RANGE")&&(u(t)?z(t[0],-A,-1,2,e)&&z(t[1],1,A,2,e)&&(M=0|t[0],G=0|t[1]):z(t,-A,A,2,e)&&(0|t?M=-(G=0|(0>t?-t:t)):W&&D(2,e+" cannot be zero",t))),r[e]=[M,G],s(e="ERRORS")&&(t===!!t||1===t||0===t?(R=0,z=(W=!!t)?O:a):W&&D(2,e+b,t)),r[e]=W,s(e="CRYPTO")&&(t===!!t||1===t||0===t?($=!(!t||!m||"object"!=typeof m),t&&!$&&W&&D(2,"crypto unavailable",m)):W&&D(2,e+b,t)),r[e]=$,s(e="MODULO_MODE")&&z(t,0,9,2,e)&&(J=0|t),r[e]=J,s(e="POW_PRECISION")&&z(t,0,A,2,e)&&(V=0|t),r[e]=V,s(e="FORMAT")&&("object"==typeof t?X=t:W&&D(2,e+" not an object",t)),r[e]=X,r},e.max=function(){return B(arguments,E.lt)},e.min=function(){return B(arguments,E.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return v(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,o,i,s,a,u=0,c=[],l=new e(L);if(t=null!=t&&z(t,0,A,14)?0|t:H,s=g(t/F),$)if(m&&m.getRandomValues){for(r=m.getRandomValues(new Uint32Array(s*=2));s>u;)a=131072*r[u]+(r[u+1]>>>11),a>=9e15?(o=m.getRandomValues(new Uint32Array(2)),r[u]=o[0],r[u+1]=o[1]):(c.push(a%1e14),u+=2);u=s/2}else if(m&&m.randomBytes){for(r=m.randomBytes(s*=7);s>u;)a=281474976710656*(31&r[u])+1099511627776*r[u+1]+4294967296*r[u+2]+16777216*r[u+3]+(r[u+4]<<16)+(r[u+5]<<8)+r[u+6],a>=9e15?m.randomBytes(7).copy(r,u):(c.push(a%1e14),
u+=7);u=s/7}else W&&D(14,"crypto unavailable",m);if(!u)for(;s>u;)a=n(),9e15>a&&(c[u++]=a%1e14);for(s=c[--u],t%=F,s&&t&&(a=N[F-t],c[u]=v(s/a)*a);0===c[u];c.pop(),u--);if(0>u)c=[i=0];else{for(i=-1;0===c[0];c.shift(),i-=F);for(u=1,a=c[0];a>=10;a/=10,u++);F>u&&(i-=F-u)}return l.e=i,l.c=c,l}}(),C=function(){function t(t,e,n){var r,o,i,s,a=0,u=t.length,c=e%T,l=e/T|0;for(t=t.slice();u--;)i=t[u]%T,s=t[u]/T|0,r=l*i+s*c,o=c*i+r%T*T+a,a=(o/n|0)+(r/T|0)+l*s,t[u]=o%n;return a&&t.unshift(a),t}function n(t,e,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;n>o;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}return i}function r(t,e,n,r){for(var o=0;n--;)t[n]-=o,o=t[n]<e[n]?1:0,t[n]=o*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.shift());}return function(i,s,a,u,c){var l,f,p,h,m,d,y,g,b,w,_,x,k,N,T,A,B,O=i.s==s.s?1:-1,P=i.c,D=s.c;if(!(P&&P[0]&&D&&D[0]))return new e(i.s&&s.s&&(P?!D||P[0]!=D[0]:D)?P&&0==P[0]||!D?0*O:O/0:0/0);for(g=new e(O),b=g.c=[],f=i.e-s.e,O=a+f+1,c||(c=I,f=o(i.e/F)-o(s.e/F),O=O/F|0),p=0;D[p]==(P[p]||0);p++);if(D[p]>(P[p]||0)&&f--,0>O)b.push(1),h=!0;else{for(N=P.length,A=D.length,p=0,O+=2,m=v(c/(D[0]+1)),m>1&&(D=t(D,m,c),P=t(P,m,c),A=D.length,N=P.length),k=A,w=P.slice(0,A),_=w.length;A>_;w[_++]=0);B=D.slice(),B.unshift(0),T=D[0],D[1]>=c/2&&T++;do{if(m=0,l=n(D,w,A,_),0>l){if(x=w[0],A!=_&&(x=x*c+(w[1]||0)),m=v(x/T),m>1)for(m>=c&&(m=c-1),d=t(D,m,c),y=d.length,_=w.length;1==n(d,w,y,_);)m--,r(d,y>A?B:D,y,c),y=d.length,l=1;else 0==m&&(l=m=1),d=D.slice(),y=d.length;if(_>y&&d.unshift(0),r(w,d,_,c),_=w.length,-1==l)for(;n(D,w,A,_)<1;)m++,r(w,_>A?B:D,_,c),_=w.length}else 0===l&&(m++,w=[0]);b[p++]=m,w[0]?w[_++]=P[k]||0:(w=[P[k]],_=1)}while((k++<N||null!=w[0])&&O--);h=null!=w[0],b[0]||b.shift()}if(c==I){for(p=1,O=b[0];O>=10;O/=10,p++);S(g,a+(g.e=p+f*F-1)+1,u,h)}else g.e=f,g.r=+h;return g}}(),d=function(){var t=/^(-?)0([xbo])/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,i=/^\s*\+|^\s+|\s+$/g;return function(s,a,u,c){var l,f=u?a:a.replace(i,"");if(o.test(f))s.s=isNaN(f)?null:0>f?-1:1;else{if(!u&&(f=f.replace(t,function(t,e,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=l?t:e}),c&&(l=c,f=f.replace(n,"$1").replace(r,"0.$1")),a!=f))return new e(f,l);W&&D(R,"not a"+(c?" base "+c:"")+" number",a),s.s=null}s.c=s.e=null,R=0}}(),E.absoluteValue=E.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},E.ceil=function(){return S(new e(this),this.e+1,2)},E.comparedTo=E.cmp=function(t,n){return R=1,s(this,new e(t,n))},E.decimalPlaces=E.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-o(this.e/F))*F,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},E.dividedBy=E.div=function(t,n){return R=3,C(this,new e(t,n),H,q)},E.dividedToIntegerBy=E.divToInt=function(t,n){return R=4,C(this,new e(t,n),0,1)},E.equals=E.eq=function(t,n){return R=5,0===s(this,new e(t,n))},E.floor=function(){return S(new e(this),this.e+1,3)},E.greaterThan=E.gt=function(t,n){return R=6,s(this,new e(t,n))>0},E.greaterThanOrEqualTo=E.gte=function(t,n){return R=7,1===(n=s(this,new e(t,n)))||0===n},E.isFinite=function(){return!!this.c},E.isInteger=E.isInt=function(){return!!this.c&&o(this.e/F)>this.c.length-2},E.isNaN=function(){return!this.s},E.isNegative=E.isNeg=function(){return this.s<0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.lessThan=E.lt=function(t,n){return R=8,s(this,new e(t,n))<0},E.lessThanOrEqualTo=E.lte=function(t,n){return R=9,-1===(n=s(this,new e(t,n)))||0===n},E.minus=E.sub=function(t,n){var r,i,s,a,u=this,c=u.s;if(R=10,t=new e(t,n),n=t.s,!c||!n)return new e(0/0);if(c!=n)return t.s=-n,u.plus(t);var l=u.e/F,f=t.e/F,p=u.c,h=t.c;if(!l||!f){if(!p||!h)return p?(t.s=-n,t):new e(h?u:0/0);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?u:3==q?-0:0)}if(l=o(l),f=o(f),p=p.slice(),c=l-f){for((a=0>c)?(c=-c,s=p):(f=l,s=h),s.reverse(),n=c;n--;s.push(0));s.reverse()}else for(i=(a=(c=p.length)<(n=h.length))?c:n,c=n=0;i>n;n++)if(p[n]!=h[n]){a=p[n]<h[n];break}if(a&&(s=p,p=h,h=s,t.s=-t.s),n=(i=h.length)-(r=p.length),n>0)for(;n--;p[r++]=0);for(n=I-1;i>c;){if(p[--i]<h[i]){for(r=i;r&&!p[--r];p[r]=n);--p[r],p[i]+=I}p[i]-=h[i]}for(;0==p[0];p.shift(),--f);return p[0]?P(t,p,f):(t.s=3==q?-1:1,t.c=[t.e=0],t)},E.modulo=E.mod=function(t,n){var r,o,i=this;return R=11,t=new e(t,n),!i.c||!t.s||t.c&&!t.c[0]?new e(0/0):!t.c||i.c&&!i.c[0]?new e(i):(9==J?(o=t.s,t.s=1,r=C(i,t,0,3),t.s=o,r.s*=o):r=C(i,t,0,J),i.minus(r.times(t)))},E.negated=E.neg=function(){var t=new e(this);return t.s=-t.s||null,t},E.plus=E.add=function(t,n){var r,i=this,s=i.s;if(R=12,t=new e(t,n),n=t.s,!s||!n)return new e(0/0);if(s!=n)return t.s=-n,i.minus(t);var a=i.e/F,u=t.e/F,c=i.c,l=t.c;if(!a||!u){if(!c||!l)return new e(s/0);if(!c[0]||!l[0])return l[0]?t:new e(c[0]?i:0*s)}if(a=o(a),u=o(u),c=c.slice(),s=a-u){for(s>0?(u=a,r=l):(s=-s,r=c),r.reverse();s--;r.push(0));r.reverse()}for(s=c.length,n=l.length,0>s-n&&(r=l,l=c,c=r,n=s),s=0;n;)s=(c[--n]=c[n]+l[n]+s)/I|0,c[n]%=I;return s&&(c.unshift(s),++u),P(t,c,u)},E.precision=E.sd=function(t){var e,n,r=this,o=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&(W&&D(13,"argument"+b,t),t!=!!t&&(t=null)),!o)return null;if(n=o.length-1,e=n*F+1,n=o[n]){for(;n%10==0;n/=10,e--);for(n=o[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},E.round=function(t,n){var r=new e(this);return(null==t||z(t,0,A,15))&&S(r,~~t+this.e+1,null!=n&&z(n,0,8,15,w)?0|n:q),r},E.shift=function(t){var n=this;return z(t,-k,k,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-k>t||t>k)?n.s*(0>t?0:1/0):n)},E.squareRoot=E.sqrt=function(){var t,n,r,s,a,u=this,c=u.c,l=u.s,f=u.e,p=H+4,h=new e("0.5");if(1!==l||!c||!c[0])return new e(!l||0>l&&(!c||c[0])?0/0:c?u:1/0);if(l=Math.sqrt(+u),0==l||l==1/0?(n=i(c),(n.length+f)%2==0&&(n+="0"),l=Math.sqrt(n),f=o((f+1)/2)-(0>f||f%2),l==1/0?n="1e"+f:(n=l.toExponential(),n=n.slice(0,n.indexOf("e")+1)+f),r=new e(n)):r=new e(l+""),r.c[0])for(f=r.e,l=f+p,3>l&&(l=0);;)if(a=r,r=h.times(a.plus(C(u,a,p,1))),i(a.c).slice(0,l)===(n=i(r.c)).slice(0,l)){if(r.e<f&&--l,n=n.slice(l-3,l+1),"9999"!=n&&(s||"4999"!=n)){(!+n||!+n.slice(1)&&"5"==n.charAt(0))&&(S(r,r.e+H+2,1),t=!r.times(r).eq(u));break}if(!s&&(S(a,a.e+H+2,0),a.times(a).eq(u))){r=a;break}p+=4,l+=4,s=1}return S(r,r.e+H+1,q,t)},E.times=E.mul=function(t,n){var r,i,s,a,u,c,l,f,p,h,m,d,y,g,v,b=this,w=b.c,_=(R=17,t=new e(t,n)).c;if(!(w&&_&&w[0]&&_[0]))return!b.s||!t.s||w&&!w[0]&&!_||_&&!_[0]&&!w?t.c=t.e=t.s=null:(t.s*=b.s,w&&_?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=o(b.e/F)+o(t.e/F),t.s*=b.s,l=w.length,h=_.length,h>l&&(y=w,w=_,_=y,s=l,l=h,h=s),s=l+h,y=[];s--;y.push(0));for(g=I,v=T,s=h;--s>=0;){for(r=0,m=_[s]%v,d=_[s]/v|0,u=l,a=s+u;a>s;)f=w[--u]%v,p=w[u]/v|0,c=d*f+p*m,f=m*f+c%v*v+y[a]+r,r=(f/g|0)+(c/v|0)+d*p,y[a--]=f%g;y[a]=r}return r?++i:y.shift(),P(t,y,i)},E.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,A,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,w)?0|n:q,t?S(r,t,n):r},E.toExponential=function(t,e){return h(this,null!=t&&z(t,0,A,19)?~~t+1:null,e,19)},E.toFixed=function(t,e){return h(this,null!=t&&z(t,0,A,20)?~~t+this.e+1:null,e,20)},E.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,A,21)?~~t+this.e+1:null,e,21);if(this.c){var r,o=n.split("."),i=+X.groupSize,s=+X.secondaryGroupSize,a=X.groupSeparator,u=o[0],c=o[1],l=this.s<0,f=l?u.slice(1):u,p=f.length;if(s&&(r=i,i=s,s=r,p-=r),i>0&&p>0){for(r=p%i||i,u=f.substr(0,r);p>r;r+=i)u+=a+f.substr(r,i);s>0&&(u+=a+f.slice(r)),l&&(u="-"+u)}n=c?u+X.decimalSeparator+((s=+X.fractionGroupSize)?c.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):c):u}return n},E.toFraction=function(t){var n,r,o,s,a,u,c,l,f,p=W,h=this,m=h.c,d=new e(L),y=r=new e(L),g=c=new e(L);if(null!=t&&(W=!1,u=new e(t),W=p,(!(p=u.isInt())||u.lt(L))&&(W&&D(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&u.c&&S(u,u.e+1,1).gte(L)?u:null)),!m)return h.toString();for(f=i(m),s=d.e=f.length-h.e-1,d.c[0]=N[(a=s%F)<0?F+a:a],t=!t||u.cmp(d)>0?s>0?d:y:u,a=G,G=1/0,u=new e(f),c.c[0]=0;l=C(u,d,0,1),o=r.plus(l.times(g)),1!=o.cmp(t);)r=g,g=o,y=c.plus(l.times(o=y)),c=o,d=u.minus(l.times(o=d)),u=o;return o=C(t.minus(r),g,0,1),c=c.plus(o.times(y)),r=r.plus(o.times(g)),c.s=y.s=h.s,s*=2,n=C(y,g,s,q).minus(h).abs().cmp(C(c,r,s,q).minus(h).abs())<1?[y.toString(),g.toString()]:[c.toString(),r.toString()],G=a,n},E.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},E.toPower=E.pow=function(t){var n,r,o=v(0>t?-t:+t),i=this;if(!z(t,-k,k,23,"exponent")&&(!isFinite(t)||o>k&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+i,t));for(n=V?g(V/F+2):0,r=new e(L);;){if(o%2){if(r=r.times(i),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(o=v(o/2),!o)break;i=i.times(i),n&&i.c&&i.c.length>n&&(i.c.length=n)}return 0>t&&(r=L.div(r)),n?S(r,V,q):r},E.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,A,24,"precision")?0|t:null,e,24)},E.toString=function(t){var e,r=this,o=r.s,s=r.e;return null===s?o?(e="Infinity",0>o&&(e="-"+e)):e="NaN":(e=i(r.c),e=null!=t&&z(t,2,64,25,"base")?n(f(e,s),0|t,10,o):j>=s||s>=U?l(e,s):f(e,s),0>o&&r.c[0]&&(e="-"+e)),e},E.truncated=E.trunc=function(){return S(new e(this),this.e+1,1)},E.valueOf=E.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function o(t){var e=0|t;return t>0||t===e?e:e-1}function i(t){for(var e,n,r=1,o=t.length,i=t[0]+"";o>r;){for(e=t[r++]+"",n=F-e.length;n--;e="0"+e);i+=e}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function s(t,e){var n,r,o=t.c,i=e.c,s=t.s,a=e.s,u=t.e,c=e.e;if(!s||!a)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=0>s,r=u==c,!o||!i)return r?0:!o^n?1:-1;if(!r)return u>c^n?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;a>s;s++)if(o[s]!=i[s])return o[s]>i[s]^n?1:-1;return u==c?0:u>c^n?1:-1}function a(t,e,n){return(t=p(t))>=e&&n>=t}function u(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,o,i=[0],s=0,a=t.length;a>s;){for(o=i.length;o--;i[o]*=e);for(i[r=0]+=x.indexOf(t.charAt(s++));r<i.length;r++)i[r]>n-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function l(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function f(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?g(t):v(t)}var h,m,d,y=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,g=Math.ceil,v=Math.floor,b=" not a boolean or binary digit",w="rounding mode",_="number type has more than 15 significant digits",x="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",I=1e14,F=14,k=9007199254740991,N=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],T=1e7,A=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!m)try{m=t("crypto")}catch(B){}}else n.BigNumber=h}(this)},{crypto:42}],web3:[function(t,e,n){var r=t("./lib/web3");r.providers.HttpProvider=t("./lib/web3/httpprovider"),r.providers.IpcProvider=t("./lib/web3/ipcprovider"),r.eth.contract=t("./lib/web3/contract"),r.eth.namereg=t("./lib/web3/namereg"),r.eth.sendIBANTransaction=t("./lib/web3/transfer"),"undefined"!=typeof window&&"undefined"==typeof window.web3&&(window.web3=r),e.exports=r},{"./lib/web3":19,"./lib/web3/contract":22,"./lib/web3/httpprovider":30,"./lib/web3/ipcprovider":32,"./lib/web3/namereg":35,"./lib/web3/transfer":40}]},{},["web3"]);