LocalCDN-Firefox-Chrome-Brave/resources/ethjs/0.4.0/ethjs.min.jsm

13 lines
135 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Eth",[],e):"object"==typeof exports?exports.Eth=e():t.Eth=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,e,r){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=122)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e){var r=t.exports={version:"2.5.6"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(43)("wks"),i=r(47),o=r(0).Symbol,u="function"==typeof o,s=t.exports=function(t){return n[t]||(n[t]=u&&o[t]||(u?o:i)("Symbol."+t))};s.store=n},function(t,e,r){"use strict";(function(t,n){function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw Error("If encoding is specified then the first argument must be a string");return f(this,e)}return s(this,e,r,n)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?c(t,e,r):d(t,e)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(0>t)throw new RangeError('"size" argument must not be negative')}function h(t,e,r,n){return a(e),e>0&&void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}function f(e,r){if(a(r),e=u(e,0>r?0:0|m(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;++n)e[n]=0;return e}function c(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(r,n);e=u(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=0>e.length?0:0|m(e.length);t=u(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(0>n||n>r.byteLength)throw new RangeError("'offset' is out of bounds");if(n+(i||0)>r.byteLength)throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|m(r.length);return e=u(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(e,0):l(e,r);if("Buffer"===r.type&&X(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(i)return z(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,e>>>=0,e>=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return j(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),0>n&&(n=e.length+n),e.length>n){if(0>n){if(!o)return-1;n=0}}else{if(o)return-1;n=e.length-1}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:M(e,r,n,i,o);if("number"==typeof r)return r=255&r,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):M(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,i){function o(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,s=t.length,a=e.length;if(void 0!==n&&(n=(n+"").toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(2>t.length||2>e.length)return-1;u=2,s/=2,a/=2,r/=2}var h;if(i){var f=-1;for(h=r;s>h;h++)if(o(t,h)===o(e,f===-1?0:h-f)){if(f===-1&&(f=h),h-f+1===a)return f*u}else f!==-1&&(h-=h-f),f=-1}else for(r+a>s&&(r=s-a),h=r;h>=0;h--){for(var c=!0,l=0;a>l;l++)if(o(t,h+l)!==o(e,l)){c=!1;break}if(c)return h}return-1}function _(t,e,r,n){r=+r||0;var i=t.length-r;n?(n=+n,n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;n>u;++u){var s=parseInt(e.substr(2*u,2),16);if(isNaN(s))return u;t[r+u]=s}return u}function x(t,e,r,n){return G(z(e,t.length-r),t,r,n)}function E(t,e,r,n){return G(J(e),t,r,n)}function S(t,e,r,n){return E(t,e,r,n)}function A(t,e,r,n){return G(K(e),t,r,n)}function T(t,e,r,n){return G(Z(e,t.length-r),t,r,n)}function j(t,e,r){return V.fromByteArray(0===e&&r===t.length?t:t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],u=null,s=o>239?4:o>223?3:o>191?2:1;if(r>=i+s){var a,h,f,c;switch(s){case 1:128>o&&(u=o);break;case 2:a=t[i+1],128===(192&a)&&(c=(31&o)<<6|63&a,c>127&&(u=c));break;case 3:a=t[i+1],h=t[i+2],128===(192&a)&&128===(192&h)&&(c=(15&o)<<12|(63&a)<<6|63&h,c>2047&&(55296>c||c>57343)&&(u=c));break;case 4:a=t[i+1],h=t[i+2],f=t[i+3],128===(192&a)&&128===(192&h)&&128===(192&f)&&(c=(15&o)<<18|(63&a)<<12|(63&h)<<6|63&f,c>65535&&1114112>c&&(u=c))}}null===u?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=s}return B(n)}function B(t){var e=t.length;if(tt>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function O(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 P(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 R(t,e,r){var n=t.length;e&&e>=0||(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;++o)i+=Y(t[o]);return i}function D(t,e,r){for(var n=t.slice(e,r),i="",o=0;n.length>o;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(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 C(e,r,n,i,o,u){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||u>r)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function L(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 N(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 Q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||Q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,i){return i||Q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(t,e,r,n,52,8),r+8}function q(t){if(t=H(t).replace(et,""),2>t.length)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return 16>t?"0"+t.toString(16):t.toString(16)}function z(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],u=0;n>u;++u){if(r=t.charCodeAt(u),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(u+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}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,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(r>=1114112)throw 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 J(t){for(var e=[],r=0;t.length>r;++r)e.push(255&t.charCodeAt(r));return e}function Z(t,e){for(var r,n,i,o=[],u=0;t.length>u&&(e-=2)>=0;++u)r=t.charCodeAt(u),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function K(t){return V.toByteArray(q(t))}function G(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 W(t){return t!==t}var V=r(59),$=r(111),X=r(113);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return s(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return h(null,t,e,r)},t.allocUnsafe=function(t){return f(null,t)},t.allocUnsafeSlow=function(t){return f(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,u=Math.min(n,i);u>o;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return i>n?-1:n>i?1:0},t.isEncoding=function(t){switch((t+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!X(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;e.length>n;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;e.length>n;++n){var u=e[n];if(!t.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},t.byteLength=g,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;t>e;e+=2)w(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;t>e;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;t>e;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),0>r||n>e.length||0>i||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var u=o-i,s=n-r,a=Math.min(u,s),h=this.slice(i,o),f=e.slice(r,n),c=0;a>c;++c)if(h[c]!==f[c]){u=h[c],s=f[c];break}return s>u?-1:u>s?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,(void 0));for(var u=0;o>u;++u)i[u]=this[u+e]}return i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(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,i>n||(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(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,i>o||(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),$.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),$.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),$.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),$.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;C(this,t,e,r,i,0)}var o=1,u=0;for(this[e]=255&t;++u<r&&(o*=256);)this[e+u]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;C(this,t,e,r,i,0)}var o=r-1,u=1;for(this[e+o]=255&t;--o>=0&&(u*=256);)this[e+o]=t/u&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):L(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):L(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):N(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,u=1,s=0;for(this[e]=255&t;++o<r&&(u*=256);)0>t&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/u>>0)-s&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,u=1,s=0;for(this[e+o]=255&t;--o>=0&&(u*=256);)0>t&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/u>>0)-s&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):L(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):L(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):N(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||C(this,e,r,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),e.length>r||(r=e.length),r||(r=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=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),i-n>e.length-r&&(i=e.length-r+n);var o,u=i-n;if(this===e&&r>n&&i>r)for(o=u-1;o>=0;--o)e[o+r]=this[o+n];else if(1e3>u||!t.TYPED_ARRAY_SUPPORT)for(o=0;u>o;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+u),r);return u},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);256>o&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(0>r||r>this.length||n>this.length)throw new RangeError("Out of range index");if(r>=n)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var u;if("number"==typeof e)for(u=r;n>u;++u)this[u]=e;else{var s=t.isBuffer(e)?e:z(""+new t(e,i)),a=s.length;for(u=0;n-r>u;++u)this[u+r]=s[u%a]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(3).Buffer,r(51))},function(t,e,r){var n=r(9);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(0),i=r(1),o=r(15),u=r(6),s=r(17),a="prototype",h=function(t,e,r){var f,c,l,p=t&h.F,d=t&h.G,m=t&h.S,v=t&h.P,g=t&h.B,y=t&h.W,w=d?i:i[e]||(i[e]={}),b=w[a],M=d?n:m?n[e]:(n[e]||{})[a];d&&(r=e);for(f in r)c=!p&&M&&void 0!==M[f],c&&s(w,f)||(l=c?M[f]:r[f],w[f]=d&&"function"!=typeof M[f]?r[f]:g&&c?o(l,n):y&&M[f]==l?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e[a]=t[a],e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((w.virtual||(w.virtual={}))[f]=l,t&h.R&&b&&!b[f]&&u(b,f,l)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,t.exports=h},function(t,e,r){var n=r(18),i=r(42);t.exports=r(8)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))))}function u(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;i>o;o++){var u=t.charCodeAt(o)-48;n<<=4,n|=49>u||u>54?17>u||u>22?15&u:u-17+10:u-49+10}return n}function s(t,e,r,n){for(var i=0,o=Math.min(t.length,r),u=e;o>u;u++){var s=t.charCodeAt(u)-48;i*=n,i+=49>s?17>s?s:s-17+10:s-49+10}return i}function a(t){for(var e=Array(t.bitLength()),r=0;e.length>r;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],u=i*o,s=67108863&u,a=u/67108864|0;r.words[0]=s;for(var h=1;n>h;h++){for(var f=a>>>26,c=67108863&a,l=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);l>=p;p++){var d=h-p|0;i=0|t.words[d],o=0|e.words[p],u=i*o+c,f+=u/67108864|0,c=67108863&u}r.words[h]=0|c,a=0|f}return 0!==a?r.words[h]=0|a:r.length--,r.strip()}function f(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;r.length-1>o;o++){var u=i;i=0;for(var s=67108863&n,a=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);a>=h;h++){var f=o-h,c=0|t.words[f],l=0|e.words[h],p=c*l,d=67108863&p;u=u+(p/67108864|0)|0,d=d+s|0,s=67108863&d,u=u+(d>>>26)|0,i+=u>>>26,u&=67108863}r.words[o]=s,n=u,u=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function c(t,e,r){var n=new l;return n.mulp(t,e,r)}function l(t,e){this.x=t,this.y=e}function p(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function d(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function g(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function w(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;var b;try{b=r(3).Buffer}catch(M){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&36>=e),t=(""+t).replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){0>t&&(this.negative=1,t=-t),67108864>t?(this.words=[67108863&t],this.length=1):4503599627370496>t?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(9007199254740992>t),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),0>=t.length)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var i=0;this.length>i;i++)this.words[i]=0;var o,u,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)u=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=u<<s&67108863,this.words[o+1]=u>>>26-s&67108863,s+=24,26>s||(s-=26,o++);else if("le"===r)for(i=0,o=0;t.length>i;i+=3)u=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=u<<s&67108863,this.words[o+1]=u>>>26-s&67108863,s+=24,26>s||(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var r=0;this.length>r;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=u(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,o+=24,26>o||(o-=26,n++);r+6!==e&&(i=u(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;67108863>=i;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,u=o%n,a=Math.min(o,o-u)+r,h=0,f=r;a>f;f+=n)h=s(t,f,f+n,e),this.imuln(i),67108864>this.words[0]+h?this.words[0]+=h:this._iaddn(h);if(0!==u){var c=1;for(h=s(t,f,t.length,e),f=0;u>f;f++)c*=e;this.imuln(c),67108864>this.words[0]+h?this.words[0]+=h:this._iaddn(h)}},o.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;this.length>e;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;t>this.length;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],x=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,o=0,u=0;this.length>u;u++){var s=this.words[u],a=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,r=0!==o||u!==this.length-1?_[6-a.length]+a+r:a+r,i+=2,26>i||(i-=26,u--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&36>=t){var h=x[t],f=E[t];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var l=c.modn(f).toString(t);c=c.idivn(f),r=c.isZero()?l+r:_[h-l.length]+l+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==b),this.toArrayLike(b,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(o>=i,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var u,s,a="le"===e,h=new t(o),f=this.clone();if(a){for(s=0;!f.isZero();s++)u=f.andln(255),f.iushrn(8),h[s]=u;for(;o>s;s++)h[s]=0}else{for(s=0;o-i>s;s++)h[s]=0;for(s=0;!f.isZero();s++)u=f.andln(255),f.iushrn(8),h[o-s-1]=u}return h},o.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var e=t,r=0;return 4096>e||(r+=13,e>>>=13),64>e||(r+=7,e>>>=7),8>e||(r+=4,e>>>=4),2>e||(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;this.length>e;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;t.length>this.length;)this.words[this.length++]=0;for(var e=0;t.length>e;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;e.length>r;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,
this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;r.length>n;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;e.length>n;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;e>i;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();var r,n;this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;n.length>o;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&r.length>o;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;r.length>o;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,u=0;i.length>u;u++)e=(0|n.words[u])-(0|i.words[u])+o,o=e>>26,this.words[u]=67108863&e;for(;0!==o&&n.length>u;u++)e=(0|n.words[u])+o,o=e>>26,this.words[u]=67108863&e;if(0===o&&n.length>u&&n!==this)for(;n.length>u;u++)this.words[u]=n.words[u];return this.length=Math.max(this.length,u),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var S=function(t,e,r){var n,i,o,u=t.words,s=e.words,a=r.words,h=0,f=0|u[0],c=8191&f,l=f>>>13,p=0|u[1],d=8191&p,m=p>>>13,v=0|u[2],g=8191&v,y=v>>>13,w=0|u[3],b=8191&w,M=w>>>13,_=0|u[4],x=8191&_,E=_>>>13,S=0|u[5],A=8191&S,T=S>>>13,j=0|u[6],k=8191&j,B=j>>>13,O=0|u[7],P=8191&O,R=O>>>13,D=0|u[8],I=8191&D,C=D>>>13,L=0|u[9],N=8191&L,Q=L>>>13,F=0|s[0],U=8191&F,q=F>>>13,H=0|s[1],Y=8191&H,z=H>>>13,J=0|s[2],Z=8191&J,K=J>>>13,G=0|s[3],W=8191&G,V=G>>>13,$=0|s[4],X=8191&$,tt=$>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,ut=it>>>13,st=0|s[7],at=8191&st,ht=st>>>13,ft=0|s[8],ct=8191&ft,lt=ft>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(c,U),i=Math.imul(c,q),i=i+Math.imul(l,U)|0,o=Math.imul(l,q);var vt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(d,U),i=Math.imul(d,q),i=i+Math.imul(m,U)|0,o=Math.imul(m,q),n=n+Math.imul(c,Y)|0,i=i+Math.imul(c,z)|0,i=i+Math.imul(l,Y)|0,o=o+Math.imul(l,z)|0;var gt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,U),i=Math.imul(g,q),i=i+Math.imul(y,U)|0,o=Math.imul(y,q),n=n+Math.imul(d,Y)|0,i=i+Math.imul(d,z)|0,i=i+Math.imul(m,Y)|0,o=o+Math.imul(m,z)|0,n=n+Math.imul(c,Z)|0,i=i+Math.imul(c,K)|0,i=i+Math.imul(l,Z)|0,o=o+Math.imul(l,K)|0;var yt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=Math.imul(b,q),i=i+Math.imul(M,U)|0,o=Math.imul(M,q),n=n+Math.imul(g,Y)|0,i=i+Math.imul(g,z)|0,i=i+Math.imul(y,Y)|0,o=o+Math.imul(y,z)|0,n=n+Math.imul(d,Z)|0,i=i+Math.imul(d,K)|0,i=i+Math.imul(m,Z)|0,o=o+Math.imul(m,K)|0,n=n+Math.imul(c,W)|0,i=i+Math.imul(c,V)|0,i=i+Math.imul(l,W)|0,o=o+Math.imul(l,V)|0;var wt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,U),i=Math.imul(x,q),i=i+Math.imul(E,U)|0,o=Math.imul(E,q),n=n+Math.imul(b,Y)|0,i=i+Math.imul(b,z)|0,i=i+Math.imul(M,Y)|0,o=o+Math.imul(M,z)|0,n=n+Math.imul(g,Z)|0,i=i+Math.imul(g,K)|0,i=i+Math.imul(y,Z)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(d,W)|0,i=i+Math.imul(d,V)|0,i=i+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0,n=n+Math.imul(c,X)|0,i=i+Math.imul(c,tt)|0,i=i+Math.imul(l,X)|0,o=o+Math.imul(l,tt)|0;var bt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,U),i=Math.imul(A,q),i=i+Math.imul(T,U)|0,o=Math.imul(T,q),n=n+Math.imul(x,Y)|0,i=i+Math.imul(x,z)|0,i=i+Math.imul(E,Y)|0,o=o+Math.imul(E,z)|0,n=n+Math.imul(b,Z)|0,i=i+Math.imul(b,K)|0,i=i+Math.imul(M,Z)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(g,W)|0,i=i+Math.imul(g,V)|0,i=i+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(d,X)|0,i=i+Math.imul(d,tt)|0,i=i+Math.imul(m,X)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(c,rt)|0,i=i+Math.imul(c,nt)|0,i=i+Math.imul(l,rt)|0,o=o+Math.imul(l,nt)|0;var Mt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(k,U),i=Math.imul(k,q),i=i+Math.imul(B,U)|0,o=Math.imul(B,q),n=n+Math.imul(A,Y)|0,i=i+Math.imul(A,z)|0,i=i+Math.imul(T,Y)|0,o=o+Math.imul(T,z)|0,n=n+Math.imul(x,Z)|0,i=i+Math.imul(x,K)|0,i=i+Math.imul(E,Z)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(b,W)|0,i=i+Math.imul(b,V)|0,i=i+Math.imul(M,W)|0,o=o+Math.imul(M,V)|0,n=n+Math.imul(g,X)|0,i=i+Math.imul(g,tt)|0,i=i+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=i+Math.imul(d,nt)|0,i=i+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(c,ot)|0,i=i+Math.imul(c,ut)|0,i=i+Math.imul(l,ot)|0,o=o+Math.imul(l,ut)|0;var _t=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,U),i=Math.imul(P,q),i=i+Math.imul(R,U)|0,o=Math.imul(R,q),n=n+Math.imul(k,Y)|0,i=i+Math.imul(k,z)|0,i=i+Math.imul(B,Y)|0,o=o+Math.imul(B,z)|0,n=n+Math.imul(A,Z)|0,i=i+Math.imul(A,K)|0,i=i+Math.imul(T,Z)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(x,W)|0,i=i+Math.imul(x,V)|0,i=i+Math.imul(E,W)|0,o=o+Math.imul(E,V)|0,n=n+Math.imul(b,X)|0,i=i+Math.imul(b,tt)|0,i=i+Math.imul(M,X)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(g,rt)|0,i=i+Math.imul(g,nt)|0,i=i+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(d,ot)|0,i=i+Math.imul(d,ut)|0,i=i+Math.imul(m,ot)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(c,at)|0,i=i+Math.imul(c,ht)|0,i=i+Math.imul(l,at)|0,o=o+Math.imul(l,ht)|0;var xt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(I,U),i=Math.imul(I,q),i=i+Math.imul(C,U)|0,o=Math.imul(C,q),n=n+Math.imul(P,Y)|0,i=i+Math.imul(P,z)|0,i=i+Math.imul(R,Y)|0,o=o+Math.imul(R,z)|0,n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,K)|0,i=i+Math.imul(B,Z)|0,o=o+Math.imul(B,K)|0,n=n+Math.imul(A,W)|0,i=i+Math.imul(A,V)|0,i=i+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,n=n+Math.imul(x,X)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(E,X)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(b,rt)|0,i=i+Math.imul(b,nt)|0,i=i+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(g,ot)|0,i=i+Math.imul(g,ut)|0,i=i+Math.imul(y,ot)|0,o=o+Math.imul(y,ut)|0,n=n+Math.imul(d,at)|0,i=i+Math.imul(d,ht)|0,i=i+Math.imul(m,at)|0,o=o+Math.imul(m,ht)|0,n=n+Math.imul(c,ct)|0,i=i+Math.imul(c,lt)|0,i=i+Math.imul(l,ct)|0,o=o+Math.imul(l,lt)|0;var Et=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=Math.imul(N,q),i=i+Math.imul(Q,U)|0,o=Math.imul(Q,q),n=n+Math.imul(I,Y)|0,i=i+Math.imul(I,z)|0,i=i+Math.imul(C,Y)|0,o=o+Math.imul(C,z)|0,n=n+Math.imul(P,Z)|0,i=i+Math.imul(P,K)|0,i=i+Math.imul(R,Z)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(k,W)|0,i=i+Math.imul(k,V)|0,i=i+Math.imul(B,W)|0,o=o+Math.imul(B,V)|0,n=n+Math.imul(A,X)|0,i=i+Math.imul(A,tt)|0,i=i+Math.imul(T,X)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(b,ot)|0,i=i+Math.imul(b,ut)|0,i=i+Math.imul(M,ot)|0,o=o+Math.imul(M,ut)|0,n=n+Math.imul(g,at)|0,i=i+Math.imul(g,ht)|0,i=i+Math.imul(y,at)|0,o=o+Math.imul(y,ht)|0,n=n+Math.imul(d,ct)|0,i=i+Math.imul(d,lt)|0,i=i+Math.imul(m,ct)|0,o=o+Math.imul(m,lt)|0,n=n+Math.imul(c,dt)|0,i=i+Math.imul(c,mt)|0,i=i+Math.imul(l,dt)|0,o=o+Math.imul(l,mt)|0;var St=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=Math.imul(N,z),i=i+Math.imul(Q,Y)|0,o=Math.imul(Q,z),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,K)|0,i=i+Math.imul(C,Z)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(P,W)|0,i=i+Math.imul(P,V)|0,i=i+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,n=n+Math.imul(k,X)|0,i=i+Math.imul(k,tt)|0,i=i+Math.imul(B,X)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(A,rt)|0,i=i+Math.imul(A,nt)|0,i=i+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(x,ot)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(E,ot)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(b,at)|0,i=i+Math.imul(b,ht)|0,i=i+Math.imul(M,at)|0,o=o+Math.imul(M,ht)|0,n=n+Math.imul(g,ct)|0,i=i+Math.imul(g,lt)|0,i=i+Math.imul(y,ct)|0,o=o+Math.imul(y,lt)|0,n=n+Math.imul(d,dt)|0,i=i+Math.imul(d,mt)|0,i=i+Math.imul(m,dt)|0,o=o+Math.imul(m,mt)|0;var At=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,Z),i=Math.imul(N,K),i=i+Math.imul(Q,Z)|0,o=Math.imul(Q,K),n=n+Math.imul(I,W)|0,i=i+Math.imul(I,V)|0,i=i+Math.imul(C,W)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(P,X)|0,i=i+Math.imul(P,tt)|0,i=i+Math.imul(R,X)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(k,rt)|0,i=i+Math.imul(k,nt)|0,i=i+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(A,ot)|0,i=i+Math.imul(A,ut)|0,i=i+Math.imul(T,ot)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(x,at)|0,i=i+Math.imul(x,ht)|0,i=i+Math.imul(E,at)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(b,ct)|0,i=i+Math.imul(b,lt)|0,i=i+Math.imul(M,ct)|0,o=o+Math.imul(M,lt)|0,n=n+Math.imul(g,dt)|0,i=i+Math.imul(g,mt)|0,i=i+Math.imul(y,dt)|0,o=o+Math.imul(y,mt)|0;var Tt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,W),i=Math.imul(N,V),i=i+Math.imul(Q,W)|0,o=Math.imul(Q,V),n=n+Math.imul(I,X)|0,i=i+Math.imul(I,tt)|0,i=i+Math.imul(C,X)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(P,rt)|0,i=i+Math.imul(P,nt)|0,i=i+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(k,ot)|0,i=i+Math.imul(k,ut)|0,i=i+Math.imul(B,ot)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(A,at)|0,i=i+Math.imul(A,ht)|0,i=i+Math.imul(T,at)|0,o=o+Math.imul(T,ht)|0,n=n+Math.imul(x,ct)|0,i=i+Math.imul(x,lt)|0,i=i+Math.imul(E,ct)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(b,dt)|0,i=i+Math.imul(b,mt)|0,i=i+Math.imul(M,dt)|0,o=o+Math.imul(M,mt)|0;var jt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(N,X),i=Math.imul(N,tt),i=i+Math.imul(Q,X)|0,o=Math.imul(Q,tt),n=n+Math.imul(I,rt)|0,i=i+Math.imul(I,nt)|0,i=i+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(P,ot)|0,i=i+Math.imul(P,ut)|0,i=i+Math.imul(R,ot)|0,o=o+Math.imul(R,ut)|0,n=n+Math.imul(k,at)|0,i=i+Math.imul(k,ht)|0,i=i+Math.imul(B,at)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(A,ct)|0,i=i+Math.imul(A,lt)|0,i=i+Math.imul(T,ct)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(x,dt)|0,i=i+Math.imul(x,mt)|0,i=i+Math.imul(E,dt)|0,o=o+Math.imul(E,mt)|0;var kt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,rt),i=Math.imul(N,nt),i=i+Math.imul(Q,rt)|0,o=Math.imul(Q,nt),n=n+Math.imul(I,ot)|0,i=i+Math.imul(I,ut)|0,i=i+Math.imul(C,ot)|0,o=o+Math.imul(C,ut)|0,n=n+Math.imul(P,at)|0,i=i+Math.imul(P,ht)|0,i=i+Math.imul(R,at)|0,o=o+Math.imul(R,ht)|0,n=n+Math.imul(k,ct)|0,i=i+Math.imul(k,lt)|0,i=i+Math.imul(B,ct)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(A,dt)|0,i=i+Math.imul(A,mt)|0,i=i+Math.imul(T,dt)|0,o=o+Math.imul(T,mt)|0;var Bt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,ot),i=Math.imul(N,ut),i=i+Math.imul(Q,ot)|0,o=Math.imul(Q,ut),n=n+Math.imul(I,at)|0,i=i+Math.imul(I,ht)|0,i=i+Math.imul(C,at)|0,o=o+Math.imul(C,ht)|0,n=n+Math.imul(P,ct)|0,i=i+Math.imul(P,lt)|0,i=i+Math.imul(R,ct)|0,o=o+Math.imul(R,lt)|0,n=n+Math.imul(k,dt)|0,i=i+Math.imul(k,mt)|0,i=i+Math.imul(B,dt)|0,o=o+Math.imul(B,mt)|0;var Ot=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,at),i=Math.imul(N,ht),i=i+Math.imul(Q,at)|0,o=Math.imul(Q,ht),n=n+Math.imul(I,ct)|0,i=i+Math.imul(I,lt)|0,i=i+Math.imul(C,ct)|0,o=o+Math.imul(C,lt)|0,n=n+Math.imul(P,dt)|0,i=i+Math.imul(P,mt)|0,i=i+Math.imul(R,dt)|0,o=o+Math.imul(R,mt)|0;var Pt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ct),i=Math.imul(N,lt),i=i+Math.imul(Q,ct)|0,o=Math.imul(Q,lt),n=n+Math.imul(I,dt)|0,i=i+Math.imul(I,mt)|0,i=i+Math.imul(C,dt)|0,o=o+Math.imul(C,mt)|0;var Rt=(h+n|0)+((8191&i)<<13)|0;h=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,dt),i=Math.imul(N,mt),i=i+Math.imul(Q,dt)|0,o=Math.imul(Q,mt);var Dt=(h+n|0)+((8191&i)<<13)|0;return h=(o+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,a[0]=vt,a[1]=gt,a[2]=yt,a[3]=wt,a[4]=bt,a[5]=Mt,a[6]=_t,a[7]=xt,a[8]=Et,a[9]=St,a[10]=At,a[11]=Tt,a[12]=jt,a[13]=kt,a[14]=Bt,a[15]=Ot,a[16]=Pt,a[17]=Rt,a[18]=Dt,0!==h&&(a[19]=h,r.length++),r};Math.imul||(S=h),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?S(this,t,e):63>n?h(this,t,e):1024>n?f(this,t,e):c(this,t,e)},l.prototype.makeRBT=function(t){for(var e=Array(t),r=o.prototype._countBits(t)-1,n=0;t>n;n++)e[n]=this.revBin(n,r,t);return e},l.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;e>i;i++)n|=(1&t)<<e-i-1,t>>=1;return n},l.prototype.permute=function(t,e,r,n,i,o){for(var u=0;o>u;u++)n[u]=e[t[u]],i[u]=r[t[u]]},l.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var u=1;i>u;u<<=1)for(var s=u<<1,a=Math.cos(2*Math.PI/s),h=Math.sin(2*Math.PI/s),f=0;i>f;f+=s)for(var c=a,l=h,p=0;u>p;p++){var d=r[f+p],m=n[f+p],v=r[f+p+u],g=n[f+p+u],y=c*v-l*g;g=c*g+l*v,v=y,r[f+p]=d+v,n[f+p]=m+g,r[f+p+u]=d-v,n[f+p+u]=m-g,p!==s&&(y=a*c-h*l,l=a*l+h*c,c=y)}},l.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},l.prototype.conjugate=function(t,e,r){if(r>1)for(var n=0;r/2>n;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},l.prototype.normalize13b=function(t,e){for(var r=0,n=0;e/2>n;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=67108864>i?0:i/67108864|0}return t},l.prototype.convert13b=function(t,e,r,i){for(var o=0,u=0;e>u;u++)o+=0|t[u],r[2*u]=8191&o,o>>>=13,r[2*u+1]=8191&o,o>>>=13;for(u=2*e;i>u;++u)r[u]=0;n(0===o),n(0===(o&-8192))},l.prototype.stub=function(t){for(var e=Array(t),r=0;t>r;r++)e[r]=0;return e},l.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),u=Array(n),s=Array(n),a=Array(n),h=Array(n),f=Array(n),c=Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,u,n),this.convert13b(e.words,e.length,h,n),this.transform(u,o,s,a,n,i),this.transform(h,o,f,c,n,i);for(var p=0;n>p;p++){var d=s[p]*f[p]-a[p]*c[p];a[p]=s[p]*c[p]+a[p]*f[p],s[p]=d}return this.conjugate(s,a,n),this.transform(s,a,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=Array(this.length+t.length),c(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(67108864>t);for(var e=0,r=0;this.length>r;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=a(t);if(0===e.length)return new o(1);for(var r=this,n=0;e.length>n&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();e.length>n;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var u=0;for(e=0;this.length>e;e++){var s=this.words[e]&o,a=(0|this.words[e])-s<<r;this.words[e]=a|u,u=s>>>26-r}u&&(this.words[e]=u,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;i>e;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){n("number"==typeof t&&t>=0);var i;i=e?(e-e%26)/26:0;var o=t%26,u=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,a=r;if(i-=u,i=Math.max(0,i),a){for(var h=0;u>h;h++)a.words[h]=this.words[h];a.length=u}if(0===u);else if(this.length>u)for(this.length-=u,h=0;this.length>h;h++)this.words[h]=this.words[h+u];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;!(0>h||0===f&&i>h);h--){var c=0|this.words[h];this.words[h]=f<<26-o|c>>>o,f=c&s}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;if(r>=this.length)return!1;var o=this.words[r];return!!(o&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),r>=this.length)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(67108864>t),0>t?this.isubn(-t):0!==this.negative?1===this.length&&t>(0|this.words[0])?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;this.length>e&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(67108864>t),0>t)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var e=0;this.length>e&&0>this.words[e];e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o=t.length+r;this._expand(o);var u,s=0;for(i=0;t.length>i;i++){u=(0|this.words[i+r])+s;var a=(0|t.words[i])*e;u-=67108863&a,s=(u>>26)-(a/67108864|0),this.words[i+r]=67108863&u}for(;this.length-r>i;i++)u=(0|this.words[i+r])+s,s=u>>26,this.words[i+r]=67108863&u;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;this.length>i;i++)u=-(0|this.words[i])+s,s=u>>26,this.words[i]=67108863&u;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,u=0|i.words[i.length-1],s=this._countBits(u);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),u=0|i.words[i.length-1]);var a,h=n.length-i.length;if("mod"!==e){a=new o(null),a.length=h+1,a.words=Array(a.length);for(var f=0;a.length>f;f++)a.words[f]=0}var c=n.clone()._ishlnsubmul(i,1,h);0===c.negative&&(n=c,a&&(a.words[h]=1));for(var l=h-1;l>=0;l--){var p=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(p=Math.min(p/u|0,67108863),n._ishlnsubmul(i,p,l);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=p)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,u,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(u=s.mod.neg(),r&&0!==u.negative&&u.iadd(t)),{div:i,mod:u}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(u=s.mod.neg(),r&&0!==u.negative&&u.isub(t)),{div:s.div,mod:u}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(67108863>=t);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(67108863>=t);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),u=new o(0),s=new o(0),a=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var f=r.clone(),c=e.clone();!e.isZero();){for(var l=0,p=1;0===(e.words[0]&p)&&26>l;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||u.isOdd())&&(i.iadd(f),u.isub(c)),i.iushrn(1),u.iushrn(1);for(var d=0,m=1;0===(r.words[0]&m)&&26>d;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(f),a.isub(c)),s.iushrn(1),a.iushrn(1);e.cmp(r)<0?(r.isub(e),s.isub(i),a.isub(u)):(e.isub(r),i.isub(s),u.isub(a))}return{a:s,b:a,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),u=new o(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var a=0,h=1;0===(e.words[0]&h)&&26>a;++a,h<<=1);if(a>0)for(e.iushrn(a);a-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var f=0,c=1;0===(r.words[0]&c)&&26>f;++f,c<<=1);if(f>0)for(r.iushrn(f);f-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(r)<0?(r.isub(e),u.isub(i)):(e.isub(r),i.isub(u))}var l;return l=0===e.cmpn(1)?i:u,l.cmpn(0)<0&&l.iadd(t),l},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(0>i){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(r>=this.length)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,u=r;0!==o&&this.length>u;u++){var s=0|this.words[u];s+=o,o=s>>>26,s&=67108863,this.words[u]=s}return 0!==o&&(this.words[u]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=0>t;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(67108863>=t,"Number is too big");var i=0|this.words[0];r=i===t?0:t>i?-1:1}return 0!==this.negative?0|-r:r},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(t.length>this.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){i>n?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return this.cmpn(t)===-1},o.prototype.lt=function(t){return this.cmp(t)===-1},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new y(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};p.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},p.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength();while(e>this.n);var n=this.n>e?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},p.prototype.split=function(t,e){t.iushrn(this.n,0,e)},p.prototype.imulK=function(t){return t.imul(this.k)},i(d,p),d.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;n>i;i++)e.words[i]=t.words[i];if(e.length=n,9>=t.length)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;t.length>i;i++){var u=0|t.words[i];t.words[i-10]=(u&r)<<4|o>>>22,o=u}o>>>=22,t.words[i-10]=o,t.length-=0===o&&t.length>10?10:9},d.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;t.length>r;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(m,p),i(v,p),i(g,p),g.prototype.imulK=function(t){for(var e=0,r=0;t.length>r;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function T(t){if(A[t])return A[t];var T;if("k256"===t)T=new d;else if("p224"===t)T=new m;else if("p192"===t)T=new v;else{if("p25519"!==t)throw Error("Unknown prime "+t);T=new g}return A[t]=T,T},y.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)<0||r.isub(this.m),r._forceRed(this)},y.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)<0||r.isub(this.m),r},y.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},y.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},y.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},y.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},y.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),u=0;!i.isZero()&&0===i.andln(1);)u++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),a=s.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,h).cmp(a);)f.redIAdd(a);for(var c=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=u;0!==p.cmp(s);){for(var m=p,v=0;0!==m.cmp(s);v++)m=m.redSqr();n(d>v);var g=this.pow(c,new o(1).iushln(d-v-1));l=l.redMul(g),c=g.redSqr(),p=p.redMul(c),d=v}return l},y.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},y.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=4,n=Array(1<<r);n[0]=new o(1).toRed(this),n[1]=t;for(var i=2;n.length>i;i++)n[i]=this.mul(n[i-1],t);var u=n[0],s=0,a=0,h=e.bitLength()%26;for(0===h&&(h=26),i=e.length-1;i>=0;i--){for(var f=e.words[i],c=h-1;c>=0;c--){var l=f>>c&1;u!==n[0]&&(u=this.sqr(u)),0!==l||0!==s?(s<<=1,s|=l,a++,(a===r||0===i&&0===c)&&(u=this.mul(u,n[s]),a=0,s=0)):a=0}h=26}return u},y.prototype.convertTo=function(t){
var e=t.umod(this.m);return e===t?e.clone():e},y.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new w(t)},i(w,y),w.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},w.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},w.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)<0?i.cmpn(0)<0&&(o=i.iadd(this.m)):o=i.isub(this.m),o._forceRed(this)},w.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),u=i;return i.cmp(this.m)<0?i.cmpn(0)<0&&(u=i.iadd(this.m)):u=i.isub(this.m),u._forceRed(this)},w.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}}(void 0===t||t,this)}).call(e,r(120)(t))},function(t,e,r){t.exports=!r(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e,r){(function(e,r){/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.5.5
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2016
* @license MIT
*/
!function(n){"use strict";function i(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;50>n;++n)this.s[n]=0}var o="object"==typeof e&&e.versions&&e.versions.node;o&&(n=r);for(var u=!n.JS_SHA3_TEST&&"object"==typeof t&&t.exports,s="0123456789abcdef".split(""),a=[31,7936,2031616,520093696],h=[1,256,65536,16777216],f=[6,1536,393216,100663296],c=[0,8,16,24],l=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],p=[224,256,384,512],d=[128,256],m=["hex","buffer","arrayBuffer","array"],v=function(t,e,r){return function(n){return new i(t,e,t).update(n)[r]()}},g=function(t,e,r){return function(n,o){return new i(t,e,o).update(n)[r]()}},y=function(t,e){var r=v(t,e,"hex");r.create=function(){return new i(t,e,t)},r.update=function(t){return r.create().update(t)};for(var n=0;m.length>n;++n){var o=m[n];r[o]=v(t,e,o)}return r},w=function(t,e){var r=g(t,e,"hex");r.create=function(r){return new i(t,e,r)},r.update=function(t,e){return r.create(e).update(t)};for(var n=0;m.length>n;++n){var o=m[n];r[o]=g(t,e,o)}return r},b=[{name:"keccak",padding:h,bits:p,createMethod:y},{name:"sha3",padding:f,bits:p,createMethod:y},{name:"shake",padding:a,bits:d,createMethod:w}],M={},_=0;b.length>_;++_)for(var x=b[_],E=x.bits,S=0;E.length>S;++S)M[x.name+"_"+E[S]]=x.createMethod(E[S],x.padding);i.prototype.update=function(t){var e="string"!=typeof t;e&&t.constructor==n.ArrayBuffer&&(t=new Uint8Array(t));for(var r,i,o=t.length,u=this.blocks,s=this.byteCount,a=this.blockCount,h=0,f=this.s;o>h;){if(this.reset)for(this.reset=!1,u[0]=this.block,r=1;a+1>r;++r)u[r]=0;if(e)for(r=this.start;o>h&&s>r;++h)u[r>>2]|=t[h]<<c[3&r++];else for(r=this.start;o>h&&s>r;++h)i=t.charCodeAt(h),128>i?u[r>>2]|=i<<c[3&r++]:2048>i?(u[r>>2]|=(192|i>>6)<<c[3&r++],u[r>>2]|=(128|63&i)<<c[3&r++]):55296>i||i>=57344?(u[r>>2]|=(224|i>>12)<<c[3&r++],u[r>>2]|=(128|i>>6&63)<<c[3&r++],u[r>>2]|=(128|63&i)<<c[3&r++]):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++h)),u[r>>2]|=(240|i>>18)<<c[3&r++],u[r>>2]|=(128|i>>12&63)<<c[3&r++],u[r>>2]|=(128|i>>6&63)<<c[3&r++],u[r>>2]|=(128|63&i)<<c[3&r++]);if(this.lastByteIndex=r,s>r)this.start=r;else{for(this.start=r-s,this.block=u[a],r=0;a>r;++r)f[r]^=u[r];A(f),this.reset=!0}}return this},i.prototype.finalize=function(){var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex==this.byteCount)for(t[0]=t[r],e=1;r+1>e;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;r>e;++e)n[e]^=t[e];A(n)},i.prototype.toString=i.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,u=0,a="";n>u;){for(o=0;e>o&&n>u;++o,++u)t=r[o],a+=s[t>>4&15]+s[15&t]+s[t>>12&15]+s[t>>8&15]+s[t>>20&15]+s[t>>16&15]+s[t>>28&15]+s[t>>24&15];u%e==0&&(A(r),o=0)}return i&&(t=r[o],i>0&&(a+=s[t>>4&15]+s[15&t]),i>1&&(a+=s[t>>12&15]+s[t>>8&15]),i>2&&(a+=s[t>>20&15]+s[t>>16&15])),a},i.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,u=0,s=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var a=new Uint32Array(t);n>u;){for(o=0;e>o&&n>u;++o,++u)a[u]=r[o];u%e==0&&A(r)}return i&&(a[o]=r[o],t=t.slice(0,s)),t},i.prototype.buffer=i.prototype.arrayBuffer,i.prototype.digest=i.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,u=0,s=0,a=[];i>s;){for(u=0;r>u&&i>s;++u,++s)t=s<<2,e=n[u],a[t]=255&e,a[t+1]=e>>8&255,a[t+2]=e>>16&255,a[t+3]=e>>24&255;s%r==0&&A(n)}return o&&(t=s<<2,e=n[u],o>0&&(a[t]=255&e),o>1&&(a[t+1]=e>>8&255),o>2&&(a[t+2]=e>>16&255)),a};var A=function(t){var e,r,n,i,o,u,s,a,h,f,c,p,d,m,v,g,y,w,b,M,_,x,E,S,A,T,j,k,B,O,P,R,D,I,C,L,N,Q,F,U,q,H,Y,z,J,Z,K,G,W,V,$,X,tt,et,rt,nt,it,ot,ut,st,at,ht,ft;for(n=0;48>n;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],u=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],c=t[7]^t[17]^t[27]^t[37]^t[47],p=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49],e=p^(u<<1|s>>>31),r=d^(s<<1|u>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(a<<1|h>>>31),r=o^(h<<1|a>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=u^(f<<1|c>>>31),r=s^(c<<1|f>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=a^(p<<1|d>>>31),r=h^(d<<1|p>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=f^(i<<1|o>>>31),r=c^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,m=t[0],v=t[1],Z=t[11]<<4|t[10]>>>28,K=t[10]<<4|t[11]>>>28,k=t[20]<<3|t[21]>>>29,B=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,at=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,Y=t[41]<<18|t[40]>>>14,I=t[2]<<1|t[3]>>>31,C=t[3]<<1|t[2]>>>31,g=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,G=t[22]<<10|t[23]>>>22,W=t[23]<<10|t[22]>>>22,O=t[33]<<13|t[32]>>>19,P=t[32]<<13|t[33]>>>19,ht=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,N=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,V=t[34]<<15|t[35]>>>17,$=t[35]<<15|t[34]>>>17,R=t[45]<<29|t[44]>>>3,D=t[44]<<29|t[45]>>>3,S=t[6]<<28|t[7]>>>4,A=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,Q=t[26]<<25|t[27]>>>7,F=t[27]<<25|t[26]>>>7,M=t[36]<<21|t[37]>>>11,_=t[37]<<21|t[36]>>>11,X=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,z=t[8]<<27|t[9]>>>5,J=t[9]<<27|t[8]>>>5,T=t[18]<<20|t[19]>>>12,j=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,ut=t[28]<<7|t[29]>>>25,U=t[38]<<8|t[39]>>>24,q=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,E=t[49]<<14|t[48]>>>18,t[0]=m^~g&w,t[1]=v^~y&b,t[10]=S^~T&k,t[11]=A^~j&B,t[20]=I^~L&Q,t[21]=C^~N&F,t[30]=z^~Z&G,t[31]=J^~K&W,t[40]=et^~nt&ot,t[41]=rt^~it&ut,t[2]=g^~w&M,t[3]=y^~b&_,t[12]=T^~k&O,t[13]=j^~B&P,t[22]=L^~Q&U,t[23]=N^~F&q,t[32]=Z^~G&V,t[33]=K^~W&$,t[42]=nt^~ot&st,t[43]=it^~ut&at,t[4]=w^~M&x,t[5]=b^~_&E,t[14]=k^~O&R,t[15]=B^~P&D,t[24]=Q^~U&H,t[25]=F^~q&Y,t[34]=G^~V&X,t[35]=W^~$&tt,t[44]=ot^~st&ht,t[45]=ut^~at&ft,t[6]=M^~x&m,t[7]=_^~E&v,t[16]=O^~R&S,t[17]=P^~D&A,t[26]=U^~H&I,t[27]=q^~Y&C,t[36]=V^~X&z,t[37]=$^~tt&J,t[46]=st^~ht&et,t[47]=at^~ft&rt,t[8]=x^~m&g,t[9]=E^~v&y,t[18]=R^~S&T,t[19]=D^~A&j,t[28]=H^~I&L,t[29]=Y^~C&N,t[38]=X^~z&Z,t[39]=tt^~J&K,t[48]=ht^~et&nt,t[49]=ft^~rt&it,t[0]^=l[n],t[1]^=l[n+1]};if(u)t.exports=M;else if(n)for(var T in M)n[T]=M[T]}(this)}).call(e,r(115),r(51))},function(t,e,r){var n=r(7),i=r(32);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var e=new n(1),r=(t+"").toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),u=i(r);if("-"===u.substr(0,1)&&(u=i(u.slice(1)),e=new n((-1),10)),u=""===u?"0":u,!u.match(/^-?[0-9]+$/)&&u.match(/^[0-9A-Fa-f]+$/)||u.match(/^[a-fA-F]+$/)||o===!0&&u.match(/^[0-9A-Fa-f]+$/))return new n(u,16).mul(e);if((u.match(/^-?[0-9]+$/)||""===u)&&o===!1)return new n(u,10).mul(e)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new n(t.toString(10),10);throw Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(13);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(4),i=r(68),o=r(89),u=Object.defineProperty;e.f=r(8)?Object.defineProperty:function(t,e,r){if(n(t),e=o(e,!0),n(r),i)try{return u(t,e,r)}catch(s){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){"use strict";(function(e){function n(t){var e=t;if("string"!=typeof e)throw Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof e+", while padToEven.");return e.length%2&&(e="0"+e),e}function i(t){var e=t.toString(16);return"0x"+n(e)}function o(t){var r=i(t);return e.from(r.slice(2),"hex")}function u(t){if("string"!=typeof t)throw Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return e.byteLength(t,"utf8")}function s(t,e,r){if(Array.isArray(t)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(Array.isArray(e)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof e+"'");return e[!!r&&"some"||"every"](function(e){return t.indexOf(e)>=0})}function a(t){var r=new e(n(m(t).replace(/^0+|0+$/g,"")),"hex");return r.toString("utf8")}function h(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);e+=String.fromCharCode(i)}return e}function f(t){var r=new e(t,"utf8");return"0x"+n(r.toString("hex")).replace(/^0+|0+$/g,"")}function c(t){for(var e="",r=0;t.length>r;r++){var n=t.charCodeAt(r),i=n.toString(16);e+=2>i.length?"0"+i:i}return"0x"+e}function l(t,e,r){if(!Array.isArray(t))throw Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof e)throw Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof e+"'.");for(var n=[],i=0;t.length>i;i++){var o=t[i][e];if(r&&!o)o="";else if("string"!=typeof o)throw Error("invalid abi");n.push(o)}return n}function p(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}var d=r(50),m=r(32);t.exports={arrayContainsArray:s,intToBuffer:o,getBinarySize:u,isHexPrefixed:d,stripHexPrefix:m,padToEven:n,intToHex:i,fromAscii:c,fromUtf8:f,toAscii:h,toUtf8:a,getKeys:l,isHexString:p}}).call(e,r(3).Buffer)},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(9),i=r(0).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=!0},function(t,e,r){"use strict";function n(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=i(e),this.reject=i(r)}var i=r(13);t.exports.f=function(t){return new n(t)}},function(t,e,r){var n=r(81),i=r(36);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e,r){var n=r(18).f,i=r(17),o=r(2)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,r){var n=r(43)("keys"),i=r(47);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(38),i=r(20);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(20);t.exports=function(t){return Object(n(t))}},function(t,e){"use strict";function r(t,e){function r(t){var r=this;r.filterId=null,r.options=Object.assign({delay:300,decoder:function(t){return t},defaultFilterObject:{}},t||{}),r.watchers={},r.interval=setInterval(function(){null!==r.filterId&&Object.keys(r.watchers).length>0&&e.getFilterChanges(r.filterId,function(t,e){var n=[],i=null;if(!t)try{e.forEach(function(t,i){n[i]=e[i],"object"==typeof e[i]&&(n[i].data=r.options.decoder(n[i].data))})}catch(o){i=Error("[ethjs-filter] while decoding filter change event data from RPC '"+JSON.stringify(n)+"': "+o)}Object.keys(r.watchers).forEach(function(o){var u=r.watchers[o];return u.stop===!0?void delete r.watchers[o]:void(i?u.callback(i,null):t?u.callback(t,null):Array.isArray(n)&&e.length>0&&u.callback(t,n))})})},r.options.delay)}return r.prototype.at=function(t){var e=this;e.filterId=t},r.prototype.watch=function(t){var e=t||function(){},r=this,n=Math.random().toString(36).substring(7);return r.watchers[n]={callback:e,stop:!1,stopWatching:function(){r.watchers[n].stop=!0}}},r.prototype.uninstall=function(t){var r=this,n=t||null;r.watchers=Object.assign({}),clearInterval(r.interval);var i=new Promise(function(t,n){e.uninstallFilter(r.filterId,function(e,r){e?n(e):t(r)})});return n&&i.then(function(t){return n(null,t)})["catch"](function(t){return n(t,null)}),n?null:i},r.prototype["new"]=function(){var r=null,n=this,i=[],o=[].slice.call(arguments);"function"==typeof o[o.length-1]&&(r=o.pop()),"Filter"===t&&i.push(Object.assign(n.options.defaultFilterObject,o[o.length-1]||{}));var u=new Promise(function(r,o){i.push(function(t,e){t?o(t):(n.filterId=e,r(e))}),e["new"+t].apply(e,i)});return r&&u.then(function(t){return r(null,t)})["catch"](function(t){return r(t,null)}),r?null:u},r}function n(t){var e=this;if(!(e instanceof n))throw Error("the EthFilter object must be instantiated with `new` flag.. (e.g. `const filters = new EthFilter(query);`)");if("object"!=typeof t)throw Error("the EthFilter object must be instantiated with an EthQuery instance (e.g. `const filters = new EthFilter(new EthQuery(provider));`). See github.com/ethjs/ethjs-query for more details..");e.Filter=r("Filter",t),e.BlockFilter=r("BlockFilter",t),e.PendingTransactionFilter=r("PendingTransactionFilter",t)}t.exports=n},function(t,e,r){"use strict";var n=r(112),i=r(118);t.exports=function(t){if(!n(t.then))throw new TypeError("Expected a promise");return function(e){t.then(function(t){i(e,null,t)},function(t){i(e,t)})}}},function(t,e,r){var n=r(50);t.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(119).nextTick,u=Function.prototype.apply,s=Array.prototype.slice,a={},h=0;e.setTimeout=function(){return new i(u.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(u.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0>e||(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var r=h++,n=arguments.length>=2&&s.call(arguments,1);return a[r]=!0,o(function(){a[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(e,r(33).setImmediate,r(33).clearImmediate)},function(t,e,r){t.exports={"default":r(61),__esModule:!0}},function(t,e,r){var n=r(14),i=r(2)("toStringTag"),o="Arguments"==n(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(r){}};t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(0).document;t.exports=n&&n.documentElement},function(t,e,r){var n=r(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){"use strict";var n=r(22),i=r(5),o=r(85),u=r(6),s=r(10),a=r(72),h=r(25),f=r(80),c=r(2)("iterator"),l=!([].keys&&"next"in[].keys()),p="@@iterator",d="keys",m="values",v=function(){return this};t.exports=function(t,e,r,g,y,w,b){a(r,e,g);var M,_,x,E=function(t){if(!l&&t in j)return j[t];switch(t){case d:return function(){return new r(this,t)};case m:return function(){return new r(this,t)}}return function(){return new r(this,t)}},S=e+" Iterator",A=y==m,T=!1,j=t.prototype,k=j[c]||j[p]||y&&j[y],B=k||E(y),O=y?A?E("entries"):B:void 0,P="Array"==e?j.entries||k:k;if(P&&(x=f(P.call(new t)),x!==Object.prototype&&x.next&&(h(x,S,!0),n||"function"==typeof x[c]||u(x,c,v))),A&&k&&k.name!==m&&(T=!0,B=function(){return k.call(this)}),n&&!b||!l&&!T&&j[c]||u(j,c,B),s[e]=B,s[S]=v,y)if(M={values:A?B:E(m),keys:w?B:E(d),entries:O},b)for(_ in M)_ in j||o(j,_,M[_]);else i(i.P+i.F*(l||T),e,M);return M}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},function(t,e,r){var n=r(4),i=r(9),o=r(23);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t),u=r.resolve;return u(e),r.promise}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(1),i=r(0),o="__core-js_shared__",u=i[o]||(i[o]={});(t.exports=function(t,e){return u[t]||(u[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:r(22)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(4),i=r(13),o=r(2)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||void 0==(r=n(u)[o])?e:i(r)}},function(t,e,r){var n,i,o,u=r(15),s=r(69),a=r(37),h=r(21),f=r(0),c=f.process,l=f.setImmediate,p=f.clearImmediate,d=f.MessageChannel,m=f.Dispatch,v=0,g={},y="onreadystatechange",w=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){w.call(t.data)};l&&p||(l=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return g[++v]=function(){s("function"==typeof t?t:Function(t),e)},n(v),v},p=function(t){delete g[t]},"process"==r(14)(c)?n=function(t){c.nextTick(u(w,t,1))}:m&&m.now?n=function(t){m.now(u(w,t,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=b,n=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):n=y in h("script")?function(t){a.appendChild(h("script"))[y]=function(){a.removeChild(this),w.call(t)}}:function(t){setTimeout(u(w,t,1),0)}),t.exports={set:l,clear:p}},function(t,e,r){var n=r(27),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(!Array.isArray(t)||0===t.length)return!1;var e=t[t.length-1];if(!e)return!1;if("object"!=typeof e)return!1;if(0===(0,u["default"])(e).length)return!0;var r=(0,u["default"])(e),n=s.some(function(t){return r.includes(t)});return!!n}var o=r(55),u=n(o),s=["from","to","data","value","gasPrice","gas"];t.exports=i},function(t,e,r){"use strict";(function(e){function n(){}function i(t,r){function n(t){return parseInt(32*Math.ceil(t/32))}if(t.length!==r.length)throw Error("[ethjs-abi] while encoding params, types/values mismatch, Your contract requires "+t.length+" types (arguments), and you passed in "+r.length);var i=[];t.forEach(function(t,e){var n=m(t);i.push({dynamic:n.dynamic,value:n.encode(r[e])})});var o=0,u=0;i.forEach(function(t){t.dynamic?(o+=32,u+=n(t.value.length)):o+=n(t.value.length)});var s=0,a=o,h=new e(o+u);return i.forEach(function(t,e){t.dynamic?(d.encode(a).copy(h,s),s+=32,t.value.copy(h,a),a+=n(t.value.length)):(t.value.copy(h,s),s+=n(t.value.length))}),"0x"+h.toString("hex")}function o(t,e,r){var i=3>=arguments.length||void 0===arguments[3]||arguments[3];3>arguments.length&&(r=e,e=t,t=[]),r=p.hexOrBuffer(r);var o=new n,u=0;return e.forEach(function(e,n){var s=m(e);if(s.dynamic){var a=d.decode(r,u),h=s.decode(r,a.value.toNumber());u+=a.consumed}else{var h=s.decode(r,u);u+=h.consumed}i&&(o[n]=h.value),t[n]&&(o[t[n]]=h.value)}),o}function u(t,r){var n=t.name+"("+p.getKeys(t.inputs,"type").join(",")+")",o="0x"+new e(p.keccak256(n),"hex").slice(0,4).toString("hex"),u=i(p.getKeys(t.inputs,"type"),r).substring(2);return""+o+u}function s(t,e){var r=p.getKeys(t.outputs,"name",!0),n=p.getKeys(t.outputs,"type");return o(r,n,p.hexOrBuffer(e))}function a(t,e){return u(t,e)}function h(t){var e=t.name+"("+p.getKeys(t.inputs,"type").join(",")+")";return"0x"+p.keccak256(e)}function f(t,r,n){var i=3>=arguments.length||void 0===arguments[3]||arguments[3],u=t.inputs.filter(function(t){return!t.indexed}),s=p.getKeys(u,"name",!0),a=p.getKeys(u,"type"),h=o(s,a,p.hexOrBuffer(r),i),f=t.anonymous?0:1;return t.inputs.filter(function(t){return t.indexed}).map(function(t,r){var i=new e(n[r+f].slice(2),"hex"),o=m(t.type);h[t.name]=o.decode(i,0).value}),h._eventName=t.name,h}function c(t,e){var r=2>=arguments.length||void 0===arguments[2]||arguments[2];if(t&&e.topics[0]===h(t))return f(t,e.data,e.topics,r)}function l(t){var e=1>=arguments.length||void 0===arguments[1]||arguments[1],r={};return t.filter(function(t){return"event"===t.type}).map(function(t){r[h(t)]=t}),function(t){return t.map(function(t){return c(r[t.topics[0]],t,e)}).filter(function(t){return t})}}var p=r(105),d=p.uint256Coder,m=p.getParamCoder;t.exports={encodeParams:i,decodeParams:o,encodeMethod:u,decodeMethod:s,encodeEvent:a,decodeEvent:f,decodeLogItem:c,logDecoder:l,eventSignature:h}}).call(e,r(3).Buffer)},function(t,e){t.exports=function(t){if("string"!=typeof t)throw Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";(function(e){function n(t,e){if(!(this instanceof n))throw Error('[ethjs] the Eth object requires you construct it with the "new" flag (i.e. `const eth = new Eth(...);`).');var r=this;r.options=e||{};var s=new i(t,r.options.query);Object.keys(Object.getPrototypeOf(s)).forEach(function(t){r[t]=function(){for(var e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];return s[t].apply(s,r)}}),r.filter=new o(s,r.options.query),r.contract=new u(s,r.options.query),r.currentProvider=s.rpc.currentProvider,r.setProvider=s.setProvider,r.getTransactionSuccess=d(r)}var i=r(107),o=r(30),u=r(104),s=r(106),a=r(101),h=r(110),f=r(11).keccak_256,c=r(12),l=r(7),p=r(19),d=r(53);t.exports=n,n.BN=l,n.isAddress=function(t){return p.isHexString(t,20)},n.keccak256=function(t){return"0x"+f(t)},n.Buffer=e,n.isHexString=p.isHexString,n.fromWei=h.fromWei,n.toWei=h.toWei,n.toBN=c,n.abi=a,n.fromAscii=p.fromAscii,n.toAscii=p.toAscii,n.fromUtf8=p.fromUtf8,n.toUtf8=p.toUtf8,n.HttpProvider=s}).call(e,r(3).Buffer)},function(t,e){"use strict";t.exports=function(t){return function(e,r){var n=0,i=t.options.timeout||8e5,o=t.options.interval||7e3,u=new Promise(function(r,u){var s=setInterval(function(){if(t.getTransactionReceipt(e,function(t,e){t&&(clearInterval(s),u(t)),!t&&e&&(clearInterval(s),r(e))}),n>=i){clearInterval(s);var a="Receipt timeout waiting for tx hash: "+e;u(a)}n+=o},o)});return r&&u.then(function(t){return r(null,t)})["catch"](function(t){return r(t,null)}),r?null:u}}},function(t,e,r){t.exports={"default":r(60),__esModule:!0}},function(t,e,r){t.exports={"default":r(62),__esModule:!0}},function(t,e,r){t.exports={"default":r(63),__esModule:!0}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=r(56),o=n(i);e["default"]=function(t){return function(){var e=t.apply(this,arguments);return new o["default"](function(t,r){function n(i,u){try{var s=e[i](u),a=s.value}catch(h){return void r(h)}return s.done?void t(a):o["default"].resolve(a).then(function(t){n("next",t)},function(t){n("throw",t)})}return n("next")})}}},function(t,e,r){t.exports=r(116)},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function n(t){var e=r(t),n=e[0],i=e[1];return 3*(n+i)/4-i}function i(t,e,r){return 3*(e+r)/4-r}function o(t){for(var e,n=r(t),o=n[0],u=n[1],s=new c(i(t,o,u)),a=0,h=u>0?o-4:o,l=0;h>l;l+=4)e=f[t.charCodeAt(l)]<<18|f[t.charCodeAt(l+1)]<<12|f[t.charCodeAt(l+2)]<<6|f[t.charCodeAt(l+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=255&e;return 2===u&&(e=f[t.charCodeAt(l)]<<2|f[t.charCodeAt(l+1)]>>4,s[a++]=255&e),1===u&&(e=f[t.charCodeAt(l)]<<10|f[t.charCodeAt(l+1)]<<4|f[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s}function u(t){return h[t>>18&63]+h[t>>12&63]+h[t>>6&63]+h[63&t]}function s(t,e,r){for(var n,i=[],o=e;r>o;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i=[],o=16383,u=0,a=r-n;a>u;u+=o)i.push(s(t,u,u+o>a?a:u+o));return 1===n?(e=t[r-1],i.push(h[e>>2]+h[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(h[e>>10]+h[e>>4&63]+h[e<<2&63]+"=")),i.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var h=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=l.length;d>p;++p)h[p]=l[p],f[l.charCodeAt(p)]=p;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(t,e,r){var n=r(1),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e,r){r(93),t.exports=r(1).Object.assign},function(t,e,r){r(94),t.exports=r(1).Object.keys},function(t,e,r){r(95),r(97),r(100),r(96),r(98),r(99),t.exports=r(1).Promise},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){var n=r(28),i=r(46),o=r(88);t.exports=function(t){return function(e,r,u){var s,a=n(e),h=i(a.length),f=o(u,h);if(t&&r!=r){for(;h>f;)if(s=a[f++],s!=s)return!0}else for(;h>f;f++)if((t||f in a)&&a[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){var n=r(15),i=r(71),o=r(70),u=r(4),s=r(46),a=r(91),h={},f={},e=t.exports=function(t,e,r,c,l){var p,d,m,v,g=l?function(){return t}:a(t),y=n(r,c,e?2:1),w=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=s(t.length);p>w;w++)if(v=e?y(u(d=t[w])[0],d[1]):y(t[w]),v===h||v===f)return v}else for(m=g.call(t);!(d=m.next()).done;)if(v=i(m,y,d.value,e),v===h||v===f)return v};e.BREAK=h,e.RETURN=f},function(t,e,r){t.exports=!r(8)&&!r(16)(function(){return 7!=Object.defineProperty(r(21)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){var n=r(10),i=r(2)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(4);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(o){var u=t["return"];throw void 0!==u&&n(u.call(t)),o}}},function(t,e,r){"use strict";var n=r(77),i=r(42),o=r(25),u={};r(6)(u,r(2)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(u,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e,r){var n=r(2)("iterator"),i=!1;try{var o=[7][n]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(u){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],u=o[n]();u.next=function(){return{done:r=!0}},o[n]=function(){return u},t(o)}catch(s){}return r}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){var n=r(0),i=r(45).set,o=n.MutationObserver||n.WebKitMutationObserver,u=n.process,s=n.Promise,a="process"==r(14)(u);t.exports=function(){var t,e,r,h=function(){var n,i;for(a&&(n=u.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(o){throw t?r():e=void 0,o}}e=void 0,n&&n.enter()};if(a)r=function(){u.nextTick(h)};else if(!o||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);r=function(){f.then(h)}}else r=function(){i.call(n,h)};else{var c=!0,l=document.createTextNode("");new o(h).observe(l,{characterData:!0}),r=function(){l.data=c=!c}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e,r){"use strict";var n=r(24),i=r(79),o=r(82),u=r(29),s=r(38),a=Object.assign;t.exports=!a||r(16)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=a({},t)[r]||Object.keys(a({},e)).join("")!=n})?function(t,e){for(var r=u(t),a=arguments.length,h=1,f=i.f,c=o.f;a>h;)for(var l,p=s(arguments[h++]),d=f?n(p).concat(f(p)):n(p),m=d.length,v=0;m>v;)c.call(p,l=d[v++])&&(r[l]=p[l]);return r}:a},function(t,e,r){var n=r(4),i=r(78),o=r(36),u=r(26)("IE_PROTO"),s=function(){},a="prototype",h=function(){var t,e=r(21)("iframe"),n=o.length,i="<",u=">";for(e.style.display="none",r(37).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+u+"document.F=Object"+i+"/script"+u),t.close(),h=t.F;n--;)delete h[a][o[n]];return h()};t.exports=Object.create||function(t,e){var r;return null!==t?(s[a]=n(t),r=new s,s[a]=null,r[u]=t):r=h(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(18),i=r(4),o=r(24);t.exports=r(8)?Object.defineProperties:function(t,e){i(t);for(var r,u=o(e),s=u.length,a=0;s>a;)n.f(t,r=u[a++],e[r]);return t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(17),i=r(29),o=r(26)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,r){var n=r(17),i=r(28),o=r(66)(!1),u=r(26)("IE_PROTO");t.exports=function(t,e){var r,s=i(t),a=0,h=[];for(r in s)r!=u&&n(s,r)&&h.push(r);for(;e.length>a;)n(s,r=e[a++])&&(~o(h,r)||h.push(r));return h}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(5),i=r(1),o=r(16);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],u={};u[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",u)}},function(t,e,r){var n=r(6);t.exports=function(t,e,r){for(var i in e)r&&t[i]?t[i]=e[i]:n(t,i,e[i]);return t}},function(t,e,r){t.exports=r(6)},function(t,e,r){"use strict";var n=r(0),i=r(1),o=r(18),u=r(8),s=r(2)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:n[t];u&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(27),i=r(20);t.exports=function(t){return function(e,r){var o,u,s=i(e)+"",a=n(r),h=s.length;return 0>a||a>=h?t?"":void 0:(o=s.charCodeAt(a),55296>o||o>56319||a+1===h||(u=s.charCodeAt(a+1))<56320||u>57343?t?s.charAt(a):o:t?s.slice(a,a+2):(o-55296<<10)+(u-56320)+65536)}}},function(t,e,r){var n=r(27),i=Math.max,o=Math.min;t.exports=function(t,e){return t=n(t),0>t?i(t+e,0):o(t,e)}},function(t,e,r){var n=r(9);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;
if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n=r(0),i=n.navigator;t.exports=i&&i.userAgent||""},function(t,e,r){var n=r(35),i=r(2)("iterator"),o=r(10);t.exports=r(1).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){"use strict";var n=r(64),i=r(74),o=r(10),u=r(28);t.exports=r(39)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return t&&t.length>r?"keys"==e?i(0,r):"values"==e?i(0,t[r]):i(0,[r,t[r]]):(this._t=void 0,i(1))},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){var n=r(5);n(n.S+n.F,"Object",{assign:r(76)})},function(t,e,r){var n=r(29),i=r(24);r(83)("keys",function(){return function(t){return i(n(t))}})},function(t,e){},function(t,e,r){"use strict";var n,i,o,u,s=r(22),a=r(0),h=r(15),f=r(35),c=r(5),l=r(9),p=r(13),d=r(65),m=r(67),v=r(44),g=r(45).set,y=r(75)(),w=r(23),b=r(40),M=r(90),_=r(41),x="Promise",E=a.TypeError,S=a.process,A=S&&S.versions,T=A&&A.v8||"",j=a[x],k="process"==f(S),B=function(){},O=i=w.f,P=!!function(){try{var t=j.resolve(1),e=(t.constructor={})[r(2)("species")]=function(t){t(B,B)};return(k||"function"==typeof PromiseRejectionEvent)&&t.then(B)instanceof e&&0!==T.indexOf("6.6")&&M.indexOf("Chrome/66")===-1}catch(n){}}(),R=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},D=function(t,e){if(!t._n){t._n=!0;var r=t._c;y(function(){for(var n=t._v,i=1==t._s,o=0,u=function(e){var r,o,u,s=i?e.ok:e.fail,a=e.resolve,h=e.reject,f=e.domain;try{s?(i||(2==t._h&&L(t),t._h=1),s===!0?r=n:(f&&f.enter(),r=s(n),f&&(f.exit(),u=!0)),r===e.promise?h(E("Promise-chain cycle")):(o=R(r))?o.call(r,a,h):a(r)):h(n)}catch(c){f&&!u&&f.exit(),h(c)}};r.length>o;)u(r[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){g.call(a,function(){var e,r,n,i=t._v,o=C(t);if(o&&(e=b(function(){k?S.emit("unhandledRejection",i,t):(r=a.onunhandledrejection)?r({promise:t,reason:i}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=k||C(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){g.call(a,function(){var e;k?S.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},Q=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw E("Promise can't be resolved itself");(e=R(t))?y(function(){var n={_w:r,_d:!1};try{e.call(t,h(Q,n,1),h(N,n,1))}catch(i){N.call(n,i)}}):(r._v=t,r._s=1,D(r,!1))}catch(n){N.call({_w:r,_d:!1},n)}}};P||(j=function(t){d(this,j,x,"_h"),p(t),n.call(this);try{t(h(Q,this,1),h(N,this,1))}catch(e){N.call(this,e)}},n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=r(84)(j.prototype,{then:function(t,e){var r=O(v(this,j));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=k?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&D(this,!1),r.promise},"catch":function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=h(Q,t,1),this.reject=h(N,t,1)},w.f=O=function(t){return t===j||t===u?new o(t):i(t)}),c(c.G+c.W+c.F*!P,{Promise:j}),r(25)(j,x),r(86)(x),u=r(1)[x],c(c.S+c.F*!P,x,{reject:function(t){var e=O(this),r=e.reject;return r(t),e.promise}}),c(c.S+c.F*(s||!P),x,{resolve:function(t){return _(s&&this===u?j:this,t)}}),c(c.S+c.F*!(P&&r(73)(function(t){j.all(t)["catch"](B)})),x,{all:function(t){var e=this,r=O(e),n=r.resolve,i=r.reject,o=b(function(){var r=[],o=0,u=1;m(t,!1,function(t){var s=o++,a=!1;r.push(void 0),u++,e.resolve(t).then(function(t){a||(a=!0,r[s]=t,--u||n(r))},i)}),--u||n(r)});return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=O(e),n=r.reject,i=b(function(){m(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(t,e,r){"use strict";var n=r(87)(!0);r(39)(String,"String",function(t){this._t=t+"",this._i=0},function(){var t,e=this._t,r=this._i;return e.length>r?(t=n(e,r),this._i+=t.length,{value:t,done:!1}):{value:void 0,done:!0}})},function(t,e,r){"use strict";var n=r(5),i=r(1),o=r(0),u=r(44),s=r(41);n(n.P+n.R,"Promise",{"finally":function(t){var e=u(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return s(e,t()).then(function(){return r})}:t,r?function(r){return s(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){"use strict";var n=r(5),i=r(23),o=r(40);n(n.S,"Promise",{"try":function(t){var e=i.f(this),r=o(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){r(92);for(var n=r(0),i=r(6),o=r(10),u=r(2)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),a=0;s.length>a;a++){var h=s[a],f=n[h],c=f&&f.prototype;c&&!c[u]&&i(c,u,h),o[h]=o.Array}},function(t,e,r){"use strict";(function(e){function n(){}function i(t,r){function n(t){return parseInt(32*Math.ceil(t/32))}if(t.length!==r.length)throw Error("[ethjs-abi] while encoding params, types/values mismatch, Your contract requires "+t.length+" types (arguments), and you passed in "+r.length);var i=[];t.forEach(function(t,e){var n=v(t);i.push({dynamic:n.dynamic,value:n.encode(r[e])})});var o=0,u=0;i.forEach(function(t){t.dynamic?(o+=32,u+=n(t.value.length)):o+=n(t.value.length)});var s=0,a=o,h=new e(o+u);return i.forEach(function(t,e){t.dynamic?(m.encode(a).copy(h,s),s+=32,t.value.copy(h,a),a+=n(t.value.length)):(t.value.copy(h,s),s+=n(t.value.length))}),"0x"+h.toString("hex")}function o(t,e,r){var i=3>=arguments.length||void 0===arguments[3]||arguments[3];3>arguments.length&&(r=e,e=t,t=[]),r=d.hexOrBuffer(r);var o=new n,u=0;return e.forEach(function(e,n){var s=v(e);if(s.dynamic){var a=m.decode(r,u),h=s.decode(r,a.value.toNumber());u+=a.consumed}else{var h=s.decode(r,u);u+=h.consumed}i&&(o[n]=h.value),t[n]&&(o[t[n]]=h.value)}),o}function u(t){var r=t.name+"("+d.getKeys(t.inputs,"type").join(",")+")",n="0x"+new e(d.keccak256(r),"hex").slice(0,4).toString("hex");return n}function s(t,e){var r=i(d.getKeys(t.inputs,"type"),e).substring(2);return""+u(t)+r}function a(t,e){var r=d.getKeys(t.outputs,"name",!0),n=d.getKeys(t.outputs,"type");return o(r,n,d.hexOrBuffer(e))}function h(t,e){return s(t,e)}function f(t){var e=t.name+"("+d.getKeys(t.inputs,"type").join(",")+")";return"0x"+d.keccak256(e)}function c(t,r,n){var i=3>=arguments.length||void 0===arguments[3]||arguments[3],u=t.inputs.filter(function(t){return!t.indexed}),s=d.getKeys(u,"name",!0),a=d.getKeys(u,"type"),h=o(s,a,d.hexOrBuffer(r),i),f=t.anonymous?0:1;return t.inputs.filter(function(t){return t.indexed}).map(function(t,r){var i=new e(n[r+f].slice(2),"hex"),o=v(t.type);h[t.name]=o.decode(i,0).value}),h._eventName=t.name,h}function l(t,e){var r=2>=arguments.length||void 0===arguments[2]||arguments[2];if(t&&e.topics[0]===f(t))return c(t,e.data,e.topics,r)}function p(t){var e=1>=arguments.length||void 0===arguments[1]||arguments[1],r={};return t.filter(function(t){return"event"===t.type}).map(function(t){r[f(t)]=t}),function(t){return t.map(function(t){return l(r[t.topics[0]],t,e)}).filter(function(t){return t})}}var d=r(102),m=d.uint256Coder,v=d.getParamCoder;t.exports={encodeParams:i,decodeParams:o,encodeMethod:s,decodeMethod:a,encodeEvent:h,decodeEvent:c,decodeLogItem:l,logDecoder:p,eventSignature:f,encodeSignature:u}}).call(e,r(3).Buffer)},function(t,e,r){"use strict";(function(e){function n(t){for(var e=t,r=e[0];e.length>0&&""+r=="0";)e=e.slice(1),r=e[0];return e}function i(t){var r=t,i=r.toString(16);return i.length%2&&(i="0"+i),n(new e(i,"hex"))}function o(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!e||t.length===2+2*e)}function u(t,r){var n=t;if(!e.isBuffer(n)){if(!o(n)){var i=Error(r?"[ethjs-abi] invalid "+r:"[ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string");throw i.reason="[ethjs-abi] invalid hex string, hex must be prefixed and alphanumeric (e.g. 0x023..)",i.value=n,i}n=n.substring(2),n.length%2&&(n="0"+n),n=new e(n,"hex")}return n}function s(t){return"number"==typeof t?"0x"+i(new m(t)).toString("hex"):t.mod||t.modulo?"0x"+i(t).toString("hex"):"0x"+u(t).toString("hex")}function a(t,e,r){var n=[];if(!Array.isArray(t))throw Error("[ethjs-abi] while getting keys, invalid params value "+JSON.stringify(t));for(var i=0;t.length>i;i++){var o=t[i][e];if(r&&!o)o="";else if("string"!=typeof o)throw Error("[ethjs-abi] while getKeys found invalid ABI data structure, type value not string");n.push(o)}return n}function h(t,r){return{encode:function(n){var i=n;return"object"==typeof i&&i.toString&&(i.toTwos||i.dividedToIntegerBy)&&(i=i.toString(10).split(".")[0]),"string"!=typeof i&&"number"!=typeof i||(i=(i+"").split(".")[0]),i=v(i),i=i.toTwos(8*t).maskn(8*t),r&&(i=i.fromTwos(8*t).toTwos(256)),i.toArrayLike(e,"be",32)},decode:function(e,n){var i=32-t,o=new m(e.slice(n+i,n+32));return o=r?o.fromTwos(8*t):o.maskn(8*t),{consumed:32,value:new m(o.toString(10))}}}}function f(t){return{encode:function(t){var r=t;if(r=u(r),32===r.length)return r;var n=new e(32);return n.fill(0),r.copy(n),n},decode:function(e,r){if(0!==e.length&&r+32>e.length)throw Error("[ethjs-abi] while decoding fixed bytes, invalid bytes data length: "+t);return{consumed:32,value:"0x"+e.slice(r,r+t).toString("hex")}}}}function c(t){var r=parseInt(32*Math.ceil(t.length/32)),n=new e(r-t.length);return n.fill(0),e.concat([y.encode(t.length),t,n])}function l(t,e){if(0!==t.length&&e+32>t.length)throw Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+t.length+" should be less than "+(e+32));var r=y.decode(t,e).value;if(r=r.toNumber(),0!==t.length&&e+32+r>t.length)throw Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+t.length+" should be less than "+(e+32+r));return{consumed:parseInt(32+32*Math.ceil(r/32),10),value:t.slice(e+32,e+32+r)}}function p(t,r){return{encode:function(n){var i=new e(0),o=r;if(!Array.isArray(n))throw Error("[ethjs-abi] while encoding array, invalid array data, not type Object (Array)");if(o===-1&&(o=n.length,i=y.encode(o)),o!==n.length)throw Error("[ethjs-abi] while encoding array, size mismatch array length "+o+" does not equal "+n.length);return n.forEach(function(r){i=e.concat([i,t.encode(r)])}),i},decode:function(e,n){var i,o=r,u=n,s=0;o===-1&&(i=y.decode(e,u),o=i.value.toNumber(),s+=i.consumed,u+=i.consumed);for(var a=[],h=0;o>h;h++){var f=t.decode(e,u);s+=f.consumed,u+=f.consumed,a.push(f.value)}return{consumed:s,value:a}},dynamic:r===-1}}function d(t){for(var e=t,r=null,n="[ethjs-abi] while getting param coder (getParamCoder) type value "+JSON.stringify(e)+" is either invalid or unsupported by ethjs-abi.";e;){var i=e.match(x);if(!i)throw Error(n);e=e.substring(i[0].length);var o=i[2]||i[4]||i[5];switch(o){case"int":case"uint":if(r)throw Error(n);var u=parseInt(i[3]||256);if(0===u||u>256||u%8!==0)throw Error("[ethjs-abi] while getting param coder for type "+e+", invalid "+o+"<N> width: "+e);r=h(u/8,"int"===o);break;case"bool":if(r)throw Error(n);r=w;break;case"string":if(r)throw Error(n);r=_;break;case"bytes":if(r)throw Error(n);if(i[3]){var s=parseInt(i[3]);if(0===s||s>32)throw Error("[ethjs-abi] while getting param coder for prefix bytes, invalid type "+e+", size "+s+" should be 0 or greater than 32");r=f(s)}else r=M;break;case"address":if(r)throw Error(n);r=b;break;case"[]":if(!r||r.dynamic)throw Error(n);r=p(r,-1);break;default:if(!r||r.dynamic)throw Error(n);var a=parseInt(i[6]);r=p(r,a)}}if(!r)throw Error(n);return r}var m=r(7),v=r(12),g=r(11).keccak_256,y=h(32,!1),w={encode:function(t){return y.encode(t?1:0)},decode:function(t,e){var r=y.decode(t,e);return{consumed:r.consumed,value:!r.value.isZero()}}},b={encode:function(t){var r=t,n=new e(32);if(!o(r,20))throw Error("[ethjs-abi] while encoding address, invalid address value, not alphanumeric 20 byte hex string");return r=u(r),n.fill(0),r.copy(n,12),n},decode:function(t,e){if(0===t.length)return{consumed:32,value:"0x"};if(0!==t.length&&e+32>t.length)throw Error("[ethjs-abi] while decoding address data, invalid address data, invalid byte length "+t.length);return{consumed:32,value:"0x"+t.slice(e+12,e+32).toString("hex")}}},M={encode:function(t){return c(u(t))},decode:function(t,e){var r=l(t,e);return r.value="0x"+r.value.toString("hex"),r},dynamic:!0},_={encode:function(t){return c(new e(t,"utf8"))},decode:function(t,e){var r=l(t,e);return r.value=r.value.toString("utf8"),r},dynamic:!0},x=RegExp(/^((u?int|bytes)([0-9]*)|(address|bool|string)|(\[([0-9]*)\]))/);t.exports={BN:m,bnToBuffer:i,isHexString:o,hexOrBuffer:u,hexlify:s,stripZeros:n,keccak256:g,getKeys:a,numberToBN:v,coderNumber:h,uint256Coder:y,coderBoolean:w,coderFixedBytes:f,coderAddress:b,coderDynamicBytes:M,coderString:_,coderArray:p,paramTypePart:x,getParamCoder:d}}).call(e,r(3).Buffer)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(){function t(t){return function(){var e=[].slice.call(arguments),r=v(t.inputs,"type",!1),n="0x"+g(t.name+"("+r.join(",")+")"),o=[n],u=(0,p["default"])({},e[0])||{},s=(0,p["default"])({},e[0]||{},{to:i.address,topics:o}),a=(0,p["default"])({},u,{decoder:function(e){return d.decodeEvent(t,e,o)},defaultFilterObject:s});return new i.filters.Filter(a)}}function e(t){return function(){var e=void 0,n=[].slice.call(arguments);"function"==typeof n[n.length-1]&&(e=n.pop());var i=r({methodObject:t,methodArgs:n});return e?w(i)(e):i}}var r=function(){var t=(0,c["default"])(s["default"].mark(function e(t){var r,n,o,u,a,f,c=t.methodObject,l=t.methodArgs;return s["default"].wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="call",n={},y(l)&&(n=l.pop()),o=(0,p["default"])({},i.defaultTxObject,n,{to:i.address}),o.data=d.encodeMethod(c,l),c.constant===!1&&(r="sendTransaction"),t.next=8,i.query[r](o);case 8:if(u=t.sent,"call"!==r){t.next=19;break}return t.prev=10,a=d.decodeMethod(c,u),t.abrupt("return",a);case 15:throw t.prev=15,t.t0=t["catch"](10),f=Error("[ethjs-contract] while formatting incoming raw call data "+(0,h["default"])(u)+" "+t.t0);case 19:return t.abrupt("return",u);case 20:case"end":return t.stop()}},e,this,[[10,15]])}));return function(e){return t.apply(this,arguments)}}(),n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this;i.abi=n.contractABI||[],i.query=n.query,i.address=n.address||"0x",i.bytecode=n.contractBytecode||"0x",i.defaultTxObject=n.contractDefaultTxObject||{},i.filters=new m(i.query),o(i.abi).forEach(function(r){"function"===r.type?i[r.name]=e(r):"event"===r.type&&(i[r.name]=t(r))})}function o(t){return t.filter(function(t){return("function"===t.type||"event"===t.type)&&t.name.length>0})}var u=r(58),s=n(u),a=r(54),h=n(a),f=r(57),c=n(f),l=r(34),p=n(l),d=r(49),m=r(30),v=r(19).getKeys,g=r(11).keccak_256,y=r(48),w=r(31);t.exports=i},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return function(e,r,n){if(!Array.isArray(e))throw Error("[ethjs-contract] Contract ABI must be type Array, got type "+typeof e);if(void 0!==r&&"string"!=typeof r)throw Error("[ethjs-contract] Contract bytecode must be type String, got type "+typeof r);if(void 0!==n&&"object"!=typeof n)throw Error("[ethjs-contract] Contract default tx object must be type Object, got type "+typeof e);var i={};return i.at=function(i){return new f({address:i,query:t,contractBytecode:r,contractDefaultTxObject:n,contractABI:e})},i["new"]=function(){var i={},u=null,f=[].slice.call(arguments);"function"==typeof f[f.length-1]&&(u=f.pop()),c(f)&&(i=f.pop());var l=o(e),p=(0,s["default"])({},n,i);if(r&&(p.data=r),l){var d=a.encodeParams(h(l.inputs,"type"),f).substring(2);p.data=""+p.data+d}return u?t.sendTransaction(p,u):t.sendTransaction(p)},i}}function o(t){return t.filter(function(t){return"constructor"===t.type})[0]}var u=r(34),s=n(u),a=r(49),h=(r(11).keccak_256,r(30),r(19).getKeys),f=r(103),c=r(48);t.exports=i},102,function(t,e,r){"use strict";function n(t,e){var r=Error("[ethjs-provider-http] Invalid JSON RPC response from provider\n host: "+e+"\n response: "+(t.responseText+"")+" "+JSON.stringify(t.responseText,null,2)+"\n responseURL: "+t.responseURL+"\n status: "+t.status+"\n statusText: "+t.statusText+"\n ");return r.value=t,r}function i(t,e){if(!(this instanceof i))throw Error('[ethjs-provider-http] the HttpProvider instance requires the "new" flag in order to function normally (e.g. `const eth = new Eth(new HttpProvider());`).');if("string"!=typeof t)throw Error('[ethjs-provider-http] the HttpProvider instance requires that the host be specified (e.g. `new HttpProvider("http://localhost:8545")` or via service like infura `new HttpProvider("http://ropsten.infura.io")`)');var r=this;r.host=t,r.timeout=e||0}var o=r(121);i.prototype.sendAsync=function(t,e){var r=this,i=new o;i.timeout=r.timeout,i.open("POST",r.host,!0),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var t=i.responseText,o=null;try{t=JSON.parse(t)}catch(u){o=n(i,r.host)}e(o,t)}},i.ontimeout=function(){e("[ethjs-provider-http] CONNECTION TIMEOUT: http request timeout after "+r.timeout+" ms. (i.e. your connect has timed out for whatever reason, check your provider).",null)};try{i.send(JSON.stringify(t))}catch(u){e("[ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node '"+r.host+"': "+JSON.stringify(u,null,2),null)}},t.exports=i},function(t,e,r){"use strict";function n(t,e){var r=this,i=e||{};if(!(this instanceof n))throw Error('[ethjs-query] the Eth object requires the "new" flag in order to function normally (i.e. `const eth = new Eth(provider);`).');if("object"!=typeof t)throw Error("[ethjs-query] the Eth object requires that the first input 'provider' must be an object, got '"+typeof t+"' (i.e. 'const eth = new Eth(provider);')");r.options=Object.assign({debug:i.debug||!1,logger:i.logger||console,jsonSpace:i.jsonSpace||0}),r.rpc=new u(t),r.setProvider=r.rpc.setProvider}function i(t,e){return function(){function r(){var r=this;return new Promise(function(n,s){if(e[2]>a.length)return void s(Error("[ethjs-query] method '"+h+"' requires at least "+e[2]+" input (format type "+e[0][0]+"), "+a.length+" provided. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+t.toLowerCase()));if(a.length>e[0].length)return void s(Error("[ethjs-query] method '"+h+"' requires at most "+e[0].length+" params, "+a.length+" provided '"+JSON.stringify(a,null,u.options.jsonSpace)+"'. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+t.toLowerCase()));e[3]&&e[3]>a.length&&a.push("latest"),r.log("attempting method formatting for '"+h+"' with inputs "+JSON.stringify(a,null,r.options.jsonSpace));try{i=o.formatInputs(t,a),r.log("method formatting success for '"+h+"' with formatted result: "+JSON.stringify(i,null,r.options.jsonSpace))}catch(f){return void s(Error("[ethjs-query] while formatting inputs '"+JSON.stringify(a,null,r.options.jsonSpace)+"' for method '"+h+"' error: "+f))}r.rpc.sendAsync({method:t,params:i}).then(function(e){try{r.log("attempting method formatting for '"+h+"' with raw outputs: "+JSON.stringify(e,null,r.options.jsonSpace));var i=o.formatOutputs(t,e);return r.log("method formatting success for '"+h+"' formatted result: "+JSON.stringify(i,null,r.options.jsonSpace)),void n(i)}catch(u){var a=Error("[ethjs-query] while formatting outputs from RPC '"+JSON.stringify(e,null,r.options.jsonSpace)+"' for method '"+h+"' "+u);return void s(a)}})["catch"](function(t){var e=Error("[ethjs-query] while formatting outputs from RPC '"+JSON.stringify(t,null,r.options.jsonSpace)+"'");s(e)})})}var n=null,i=null,u=this,a=[].slice.call(arguments),h=t.replace("eth_","");a.length>0&&"function"==typeof a[a.length-1]&&(n=a.pop());var f=r.call(this);return n?s(f)(n):f}}var o=r(108),u=r(109),s=r(31);t.exports=n,n.prototype.log=function(t){var e=this;e.options.debug&&e.options.logger.log("[ethjs-query log] "+t)},Object.keys(o.schema.methods).forEach(function(t){Object.defineProperty(n.prototype,t.replace("eth_",""),{enumerable:!0,value:i(t,o.schema.methods[t])})})},function(t,e,r){"use strict";function n(t,e,r){if(["string","number","object"].indexOf(typeof t)===-1||null===t)return t;var n=p(t),i=r&&n.toString(16).length%2?"0":"";if(p(t).isNeg())throw Error("[ethjs-format] while formatting quantity '"+n.toString(10)+"', invalid negative number. Number must be positive or zero.");return e?"0x"+i+n.toString(16):n}function i(t,e){var r=t;return c.tags.indexOf(t)===-1&&(r=n(t,e)),r}function o(t,e){var r=t,n=0;if("string"==typeof t&&(r="0x"+m(d(t)),n=g(r)),"0x00"===r&&(r="0x0"),"number"==typeof e&&null!==t&&"0x"!==r&&"0x0"!==r&&(!/^[0-9A-Fa-f]+$/.test(d(r))||n!==2+2*e))throw Error("[ethjs-format] hex string '"+r+"' must be an alphanumeric "+(2+2*e)+" utf8 byte hex (chars: a-fA-F) string, is "+n+" bytes");return r}function u(t,e,r){var n=Object.assign({},e),i=null;if("string"==typeof t&&(i="Boolean|EthSyncing"===t?Object.assign({},c.objects.EthSyncing):"DATA|Transaction"===t?Object.assign({},c.objects.Transaction):Object.assign({},c.objects[t])),!v(Object.keys(e),i.__required))throw Error("[ethjs-format] object "+JSON.stringify(e)+" must contain properties: "+i.__required.join(", "));return Object.keys(i).forEach(function(t){"__required"!==t&&void 0!==e[t]&&(n[t]=a(i[t],e[t],r))}),n}function s(t,e,r,n){var i=e.slice(),o=t;if("Array|DATA"===t&&(o=["D"]),"FilterChange"===t&&"string"==typeof e[0]&&(o=["D32"]),r===!0&&"number"==typeof n&&n>e.length)throw Error("array "+JSON.stringify(e)+" must contain at least "+n+" params, but only contains "+e.length+".");return o=o.slice(),e.forEach(function(t,e){var n=0;o.length>1&&(n=e),i[e]=a(o[n],t,r)}),i}function a(t,e,r,a){var h=e;return"Q"===t?h=n(e,r):"QP"===t?h=n(e,r,!0):"Q|T"===t?h=i(e,r):"D"===t?h=o(e):"D20"===t?h=o(e,20):"D32"===t?h=o(e,32):"object"==typeof e&&null!==e&&Array.isArray(e)===!1?h=u(t,e,r):Array.isArray(e)&&(h=s(t,e,r,a)),h}function h(t,e){return a(c.methods[t][0],e,!0,c.methods[t][2])}function f(t,e){return a(c.methods[t][1],e,!1)}var c=r(114),l=r(19),p=r(12),d=r(32),m=l.padToEven,v=l.arrayContainsArray,g=l.getBinarySize;t.exports={schema:c,formatQuantity:n,formatQuantityOrTag:i,formatObject:u,formatArray:s,format:a,formatInputs:h,formatOutputs:f}},function(t,e,r){"use strict";function n(t,e){var r=this,i=e||{};if(!(this instanceof n))throw Error('[ethjs-rpc] the EthRPC object requires the "new" flag in order to function normally (i.e. `const eth = new EthRPC(provider);`).');r.options=Object.assign({jsonSpace:i.jsonSpace||0,max:i.max||9999999999999}),r.idCounter=Math.floor(Math.random()*r.options.max),(r.setProvider=function(t){if("object"!=typeof t)throw Error("[ethjs-rpc] the EthRPC object requires that the first input 'provider' must be an object, got '"+typeof t+"' (i.e. 'const eth = new EthRPC(provider);')");r.currentProvider=t})(t)}function i(t,e){return Object.assign({},{id:e,jsonrpc:"2.0",params:[]},t)}var o=r(31);t.exports=n,n.prototype.sendAsync=function(t,e){var r=this;r.idCounter=r.idCounter%r.options.max;var n=i(t,r.idCounter++),u=new Promise(function(t,e){r.currentProvider.sendAsync(n,function(i,o){var u=o||{};if(i||u.error){var s="[ethjs-rpc] "+(u.error&&"rpc"||"")+" error with payload "+JSON.stringify(n,null,r.options.jsonSpace)+" "+(i?i+"":JSON.stringify(u.error,null,r.options.jsonSpace)),a=Error(s);return a.value=i||u.error,void e(a)}t(u.result)})});return e?o(u)(e):u}},function(t,e,r){"use strict";function n(t){var e=t?t.toLowerCase():"ether",r=c[e];if("string"!=typeof r)throw Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(c,null,2));return new s(r,10)}function i(t){if("string"==typeof t){if(!t.match(/^-?[0-9.]+$/))throw Error("while converting number to string, invalid number value '"+t+"', should be a number matching (^-?[0-9.]+).");return t}if("number"==typeof t)return t+"";if("object"==typeof t&&t.toString&&(t.toTwos||t.dividedToIntegerBy))return t.toPrecision?t.toPrecision()+"":t.toString(10);throw Error("while converting number to string, invalid number value '"+t+"' type "+typeof t+".")}function o(t,e,r){var i=a(t),o=i.lt(h),u=n(e),s=c[e].length-1||1,l=r||{};o&&(i=i.mul(f));for(var p=i.mod(u).toString(10);s>p.length;)p="0"+p;l.pad||(p=p.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var d=i.div(u).toString(10);l.commify&&(d=d.replace(/\B(?=(\d{3})+(?!\d))/g,","));var m=""+d+("0"==p?"":"."+p);return o&&(m="-"+m),m}function u(t,e){var r=i(t),o=n(e),u=c[e].length-1||1,a="-"===r.substring(0,1);if(a&&(r=r.substring(1)),"."===r)throw Error("[ethjs-unit] while converting number "+t+" to wei, invalid value");var h=r.split(".");if(h.length>2)throw Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var l=h[0],p=h[1];if(l||(l="0"),p||(p="0"),p.length>u)throw Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;u>p.length;)p+="0";l=new s(l),p=new s(p);var d=l.mul(o).add(p);return a&&(d=d.mul(f)),new s(d.toString(10),10)}var s=r(7),a=r(12),h=new s(0),f=new s((-1)),c={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",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",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};t.exports={unitMap:c,numberToString:i,getValueOfUnit:n,fromWei:o,toWei:u}},function(t,e){e.read=function(t,e,r,n,i){var o,u,s=8*i-n-1,a=(1<<s)-1,h=a>>1,f=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=l,f-=8);for(u=o&(1<<-f)-1,o>>=-f,f+=n;f>0;u=256*u+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===a)return u?NaN:(p?-1:1)*(1/0);u+=Math.pow(2,n),o-=h}return(p?-1:1)*u*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var u,s,a,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,u=f):(u=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-u))<1&&(u--,a*=2),e+=1>u+c?l*Math.pow(2,1-c):l/a,2>e*a||(u++,a/=2),f>u+c?1>u+c?(s=e*Math.pow(2,c-1)*Math.pow(2,i),u=0):(s=(e*a-1)*Math.pow(2,i),u+=c):(s=0,u=f));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;t[r+p]=255&u,p+=d,u/=256,h-=8);t[r+p-d]|=128*m}},function(t,e){"use strict";var r=Object.prototype.toString;t.exports=function(t){return"[object Function]"===r.call(t)}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){t.exports={methods:{web3_clientVersion:[[],"S"],web3_sha3:[["S"],"D",1],net_version:[[],"S"],net_peerCount:[[],"Q"],net_listening:[[],"B"],personal_sign:[["D","D20","S"],"D",2],personal_ecRecover:[["D","D"],"D20",2],eth_protocolVersion:[[],"S"],eth_syncing:[[],"B|EthSyncing"],eth_coinbase:[[],"D20"],eth_mining:[[],"B"],eth_hashrate:[[],"Q"],eth_gasPrice:[[],"Q"],eth_accounts:[[],["D20"]],eth_blockNumber:[[],"Q"],eth_getBalance:[["D20","Q|T"],"Q",1,2],eth_getStorageAt:[["D20","Q","Q|T"],"D",2,2],eth_getTransactionCount:[["D20","Q|T"],"Q",1,2],eth_getBlockTransactionCountByHash:[["D32"],"Q",1],eth_getBlockTransactionCountByNumber:[["Q|T"],"Q",1],eth_getUncleCountByBlockHash:[["D32"],"Q",1],eth_getUncleCountByBlockNumber:[["Q"],"Q",1],eth_getCode:[["D20","Q|T"],"D",1,2],eth_sign:[["D20","D"],"D",2],eth_signTypedData:[["Array|DATA","D20"],"D",1],eth_sendTransaction:[["SendTransaction"],"D",1],eth_sendRawTransaction:[["D"],"D32",1],eth_call:[["CallTransaction","Q|T"],"D",1,2],eth_estimateGas:[["EstimateTransaction","Q|T"],"Q",1],eth_getBlockByHash:[["D32","B"],"Block",2],eth_getBlockByNumber:[["Q|T","B"],"Block",2],eth_getTransactionByHash:[["D32"],"Transaction",1],eth_getTransactionByBlockHashAndIndex:[["D32","Q"],"Transaction",2],eth_getTransactionByBlockNumberAndIndex:[["Q|T","Q"],"Transaction",2],eth_getTransactionReceipt:[["D32"],"Receipt",1],eth_getUncleByBlockHashAndIndex:[["D32","Q"],"Block",1],eth_getUncleByBlockNumberAndIndex:[["Q|T","Q"],"Block",2],eth_getCompilers:[[],["S"]],eth_compileLLL:[["S"],"D",1],eth_compileSolidity:[["S"],"D",1],eth_compileSerpent:[["S"],"D",1],eth_newFilter:[["Filter"],"Q",1],eth_newBlockFilter:[[],"Q"],eth_newPendingTransactionFilter:[[],"Q"],eth_uninstallFilter:[["QP"],"B",1],eth_getFilterChanges:[["QP"],["FilterChange"],1],eth_getFilterLogs:[["QP"],["FilterChange"],1],eth_getLogs:[["Filter"],["FilterChange"],1],eth_getWork:[[],["D"]],eth_submitWork:[["D","D32","D32"],"B",3],eth_submitHashrate:[["D","D"],"B",2],db_putString:[["S","S","S"],"B",2],db_getString:[["S","S"],"S",2],db_putHex:[["S","S","D"],"B",2],db_getHex:[["S","S"],"D",2],shh_post:[["SHHPost"],"B",1],shh_version:[[],"S"],shh_newIdentity:[[],"D"],shh_hasIdentity:[["D"],"B"],shh_newGroup:[[],"D"],shh_addToGroup:[["D"],"B",1],shh_newFilter:[["SHHFilter"],"Q",1],shh_uninstallFilter:[["Q"],"B",1],shh_getFilterChanges:[["Q"],["SHHFilterChange"],1],shh_getMessages:[["Q"],["SHHFilterChange"],1]},tags:["latest","earliest","pending"],objects:{EthSyncing:{__required:[],startingBlock:"Q",currentBlock:"Q",highestBlock:"Q"},SendTransaction:{__required:["from","data"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},EstimateTransaction:{__required:[],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},CallTransaction:{__required:["to"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},Block:{__required:[],number:"Q",hash:"D32",parentHash:"D32",nonce:"D",sha3Uncles:"D",logsBloom:"D",transactionsRoot:"D",stateRoot:"D",receiptsRoot:"D",miner:"D",difficulty:"Q",totalDifficulty:"Q",extraData:"D",size:"Q",gasLimit:"Q",gasUsed:"Q",timestamp:"Q",transactions:["DATA|Transaction"],uncles:["D"]},Transaction:{__required:[],hash:"D32",nonce:"Q",blockHash:"D32",blockNumber:"Q",transactionIndex:"Q",from:"D20",to:"D20",value:"Q",gasPrice:"Q",gas:"Q",input:"D"},Receipt:{__required:[],transactionHash:"D32",transactionIndex:"Q",blockHash:"D32",blockNumber:"Q",cumulativeGasUsed:"Q",gasUsed:"Q",contractAddress:"D20",logs:["FilterChange"]},Filter:{__required:[],fromBlock:"Q|T",toBlock:"Q|T",address:"D20",topics:["D"]},FilterChange:{__required:[],removed:"B",logIndex:"Q",transactionIndex:"Q",transactionHash:"D32",blockHash:"D32",blockNumber:"Q",address:"D20",data:"Array|DATA",topics:["D"]},SHHPost:{__required:["topics","payload","priority","ttl"],from:"D",to:"D",topics:["D"],payload:"D",priority:"Q",ttl:"Q"},SHHFilter:{__required:["topics"],to:"D",topics:["D"]},SHHFilterChange:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"},SHHMessage:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"}}}},function(t,e){function r(){throw Error("setTimeout has not been defined")}function n(){throw Error("clearTimeout has not been defined")}function i(t){if(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0);
}}}function o(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function u(){m&&p&&(m=!1,p.length?d=p.concat(d):v=-1,d.length&&s())}function s(){if(!m){var t=i(u);m=!0;for(var e=d.length;e;){for(p=d,d=[];++v<e;)p&&p[v].run();v=-1,e=d.length}p=null,m=!1,o(t)}}function a(t,e){this.fun=t,this.array=e}function h(){}var f,c,l=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(t){f=r}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var p,d=[],m=!1,v=-1;l.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var r=1;arguments.length>r;r++)e[r-1]=arguments[r];d.push(new a(t,e)),1!==d.length||m||i(s)},a.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=h,l.addListener=h,l.once=h,l.off=h,l.removeListener=h,l.removeAllListeners=h,l.emit=h,l.prependListener=h,l.prependOnceListener=h,l.listeners=function(t){return[]},l.binding=function(t){throw Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw Error("process.chdir is not supported")},l.umask=function(){return 0}},function(t,e,r){var n=function(){return this}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(117),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(u){n.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";function r(t,e,r,n){var o=e&&e.prototype instanceof i?e:i,u=Object.create(o.prototype),s=new p(n||[]);return u._invoke=h(t,r,s),u}function n(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}function i(){}function o(){}function u(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function a(t){function e(r,i,o,u){var s=n(t[r],t,i);if("throw"!==s.type){var a=s.arg,h=a.value;return h&&"object"==typeof h&&y.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,o,u)},function(t){e("throw",t,o,u)}):Promise.resolve(h).then(function(t){a.value=t,o(a)},u)}u(s.arg)}function r(t,r){function n(){return new Promise(function(n,i){e(t,r,n,i)})}return i=i?i.then(n,n):n()}var i;this._invoke=r}function h(t,e,r){var i=S;return function(o,u){if(i===T)throw Error("Generator is already running");if(i===j){if("throw"===o)throw u;return m()}for(r.method=o,r.arg=u;;){var s=r.delegate;if(s){var a=f(s,r);if(a){if(a===k)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===S)throw i=j,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=T;var h=n(t,e,r);if("normal"===h.type){if(i=r.done?j:A,h.arg===k)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(i=j,r.method="throw",r.arg=h.arg)}}}function f(t,e){var r=t.iterator[e.method];if(r===v){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=v,f(t,e),"throw"===e.method))return k;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=n(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,k;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=v),e.delegate=null,k):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,k)}function c(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function l(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(c,this),this.reset(!0)}function d(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function i(){for(;++r<t.length;)if(y.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=v,i.done=!0,i};return n.next=n}}return{next:m}}function m(){return{value:v,done:!0}}var v,g=Object.prototype,y=g.hasOwnProperty,w="function"==typeof Symbol?Symbol:{},b=w.iterator||"@@iterator",M=w.asyncIterator||"@@asyncIterator",_=w.toStringTag||"@@toStringTag",x="object"==typeof t,E=e.regeneratorRuntime;if(E)return x&&(t.exports=E),v;E=e.regeneratorRuntime=x?t.exports:{},E.wrap=r;var S="suspendedStart",A="suspendedYield",T="executing",j="completed",k={},B={};B[b]=function(){return this};var O=Object.getPrototypeOf,P=O&&O(O(d([])));P&&P!==g&&y.call(P,b)&&(B=P);var R=u.prototype=i.prototype=Object.create(B);o.prototype=R.constructor=u,u.constructor=o,u[_]=o.displayName="GeneratorFunction",E.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},E.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,_ in t||(t[_]="GeneratorFunction")),t.prototype=Object.create(R),t},E.awrap=function(t){return{__await:t}},s(a.prototype),a.prototype[M]=function(){return this},E.AsyncIterator=a,E.async=function(t,e,n,i){var o=new a(r(t,e,n,i));return E.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},s(R),R[_]="Generator",R[b]=function(){return this},R.toString=function(){return"[object Generator]"},E.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},E.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(l),!t)for(var e in this)"t"===e.charAt(0)&&y.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=v)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,n){return o.type="throw",o.arg=t,r.next=e,n&&(r.method="next",r.arg=v),!!n}if(this.done)throw t;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return e("end");if(this.prev>=i.tryLoc){var u=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(u&&s){if(i.catchLoc>this.prev)return e(i.catchLoc,!0);if(i.finallyLoc>this.prev)return e(i.finallyLoc)}else if(u){if(i.catchLoc>this.prev)return e(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(this.prev>=n.tryLoc&&y.call(n,"finallyLoc")&&n.finallyLoc>this.prev){var i=n;break}}!i||"break"!==t&&"continue"!==t||i.tryLoc>e||e>i.finallyLoc||(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,k):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),k},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),l(r),k}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;l(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:d(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=v),k}}}(function(){return this}()||Function("return this")())},function(t,e,r){"use strict";(function(e){t.exports="function"==typeof e?e:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}}).call(e,r(33).setImmediate)},115,function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=XMLHttpRequest},function(t,e,r){t.exports=r(52)}]))});