13 lines
104 KiB
JavaScript
13 lines
104 KiB
JavaScript
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("Eth",[],r):"object"==typeof exports?exports.Eth=r():t.Eth=r()}(this,function(){return function(t){function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var e={};return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,r,e){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=26)}([function(t,r,e){"use strict";(function(t,i){function n(){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(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(r,e){if(o()<e)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=t.prototype):(null===r&&(r=new t(e)),r.length=e),r}function t(r,e,i){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(r,e,i);if("number"==typeof r){if("string"==typeof e)throw Error("If encoding is specified then the first argument must be a string");return f(this,r)}return h(this,r,e,i)}function h(t,r,e,i){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?p(t,r,e,i):"string"==typeof r?l(t,r,e):d(t,r)}function u(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 a(t,r,e,i){return u(r),r>0&&void 0!==e?"string"==typeof i?s(t,r).fill(e,i):s(t,r).fill(e):s(t,r)}function f(r,e){if(u(e),r=s(r,0>e?0:0|m(e)),!t.TYPED_ARRAY_SUPPORT)for(var i=0;e>i;++i)r[i]=0;return r}function l(r,e,i){if("string"==typeof i&&""!==i||(i="utf8"),!t.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(e,i);r=s(r,n);var o=r.write(e,i);return o!==n&&(r=r.slice(0,o)),r}function c(t,r){var e=0>r.length?0:0|m(r.length);t=s(t,e);for(var i=0;e>i;i+=1)t[i]=255&r[i];return t}function p(r,e,i,n){if(0>i||i>e.byteLength)throw new RangeError("'offset' is out of bounds");if(i+(n||0)>e.byteLength)throw new RangeError("'length' is out of bounds");return e=void 0===i&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,i):new Uint8Array(e,i,n),t.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=t.prototype):r=c(r,e),r}function d(r,e){if(t.isBuffer(e)){var i=0|m(e.length);return r=s(r,i),0===r.length?r:(e.copy(r,0,0,i),r)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||W(e.length)?s(r,0):c(r,e);if("Buffer"===e.type&&X(e.data))return c(r,e.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 g(r){return+r!=r&&(r=0),t.alloc(+r)}function v(r,e){if(t.isBuffer(r))return r.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;"string"!=typeof r&&(r=""+r);var i=r.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return z(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return K(r).length;default:if(n)return z(r).length;e=(""+e).toLowerCase(),n=!0}}function y(t,r,e){var i=!1;if((void 0===r||0>r)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),0>=e)return"";if(e>>>=0,r>>>=0,r>=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return k(this,r,e);case"ascii":return D(this,r,e);case"latin1":case"binary":return P(this,r,e);case"base64":return T(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,r,e);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function w(t,r,e){var i=t[r];t[r]=t[e],t[e]=i}function M(r,e,i,n,o){if(0===r.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:-2147483648>i&&(i=-2147483648),i=+i,isNaN(i)&&(i=o?0:r.length-1),0>i&&(i=r.length+i),r.length>i){if(0>i){if(!o)return-1;i=0}}else{if(o)return-1;i=r.length-1}if("string"==typeof e&&(e=t.from(e,n)),t.isBuffer(e))return 0===e.length?-1:b(r,e,i,n,o);if("number"==typeof e)return e=255&e,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(r,e,i):Uint8Array.prototype.lastIndexOf.call(r,e,i):b(r,[e],i,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,i,n){function o(t,r){return 1===s?t[r]:t.readUInt16BE(r*s)}var s=1,h=t.length,u=r.length;if(void 0!==i&&(i=(i+"").toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(2>t.length||2>r.length)return-1;s=2,h/=2,u/=2,e/=2}var a;if(n){var f=-1;for(a=e;h>a;a++)if(o(t,a)===o(r,f===-1?0:a-f)){if(f===-1&&(f=a),a-f+1===u)return f*s}else f!==-1&&(a-=a-f),f=-1}else for(e+u>h&&(e=h-u),a=e;a>=0;a--){for(var l=!0,c=0;u>c;c++)if(o(t,a+c)!==o(r,c)){l=!1;break}if(l)return a}return-1}function _(t,r,e,i){e=+e||0;var n=t.length-e;i?(i=+i,i>n&&(i=n)):i=n;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;i>s;++s){var h=parseInt(r.substr(2*s,2),16);if(isNaN(h))return s;t[e+s]=h}return s}function E(t,r,e,i){return $(z(r,t.length-e),t,e,i)}function A(t,r,e,i){return $(Z(r),t,e,i)}function x(t,r,e,i){return A(t,r,e,i)}function S(t,r,e,i){return $(K(r),t,e,i)}function B(t,r,e,i){return $(J(r,t.length-e),t,e,i)}function T(t,r,e){return V.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function k(t,r,e){e=Math.min(t.length,e);for(var i=[],n=r;e>n;){var o=t[n],s=null,h=o>239?4:o>223?3:o>191?2:1;if(e>=n+h){var u,a,f,l;switch(h){case 1:128>o&&(s=o);break;case 2:u=t[n+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(s=l));break;case 3:u=t[n+1],a=t[n+2],128===(192&u)&&128===(192&a)&&(l=(15&o)<<12|(63&u)<<6|63&a,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:u=t[n+1],a=t[n+2],f=t[n+3],128===(192&u)&&128===(192&a)&&128===(192&f)&&(l=(15&o)<<18|(63&u)<<12|(63&a)<<6|63&f,l>65535&&1114112>l&&(s=l))}}null===s?(s=65533,h=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),n+=h}return j(i)}function j(t){var r=t.length;if(tt>=r)return String.fromCharCode.apply(String,t);for(var e="",i=0;r>i;)e+=String.fromCharCode.apply(String,t.slice(i,i+=tt));return e}function D(t,r,e){var i="";e=Math.min(t.length,e);for(var n=r;e>n;++n)i+=String.fromCharCode(127&t[n]);return i}function P(t,r,e){var i="";e=Math.min(t.length,e);for(var n=r;e>n;++n)i+=String.fromCharCode(t[n]);return i}function R(t,r,e){var i=t.length;r&&r>=0||(r=0),(!e||0>e||e>i)&&(e=i);for(var n="",o=r;e>o;++o)n+=Y(t[o]);return n}function O(t,r,e){for(var i=t.slice(r,e),n="",o=0;i.length>o;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function C(t,r,e){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function I(r,e,i,n,o,s){if(!t.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||s>e)throw new RangeError('"value" argument is out of bounds');if(i+n>r.length)throw new RangeError("Index out of range")}function Q(t,r,e,i){0>r&&(r=65535+r+1);for(var n=0,o=Math.min(t.length-e,2);o>n;++n)t[e+n]=(r&255<<8*(i?n:1-n))>>>8*(i?n:1-n)}function N(t,r,e,i){0>r&&(r=4294967295+r+1);for(var n=0,o=Math.min(t.length-e,4);o>n;++n)t[e+n]=r>>>8*(i?n:3-n)&255}function U(t,r,e,i,n,o){if(e+i>t.length)throw new RangeError("Index out of range");if(0>e)throw new RangeError("Index out of range")}function q(t,r,e,i,n){return n||U(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,r,e,i,23,4),e+4}function L(t,r,e,i,n){return n||U(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,r,e,i,52,8),e+8}function F(t){if(t=H(t).replace(rt,""),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,r){r=r||1/0;for(var e,i=t.length,n=null,o=[],s=0;i>s;++s){if(e=t.charCodeAt(s),e>55295&&57344>e){if(!n){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=e;continue}if(56320>e){(r-=3)>-1&&o.push(239,191,189),n=e;continue}e=(n-55296<<10|e-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,128>e){if((r-=1)<0)break;o.push(e)}else if(2048>e){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(65536>e){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(e>=1114112)throw Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Z(t){for(var r=[],e=0;t.length>e;++e)r.push(255&t.charCodeAt(e));return r}function J(t,r){for(var e,i,n,o=[],s=0;t.length>s&&(r-=2)>=0;++s)e=t.charCodeAt(s),i=e>>8,n=e%256,o.push(n),o.push(i);return o}function K(t){return V.toByteArray(F(t))}function $(t,r,e,i){for(var n=0;i>n&&(n+e<r.length&&n<t.length);++n)r[n+e]=t[n];return n}function W(t){return t!==t}var V=e(12),G=e(20),X=e(21);r.Buffer=t,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==i.TYPED_ARRAY_SUPPORT?i.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=o(),t.poolSize=8192,t._augment=function(r){return r.__proto__=t.prototype,r},t.from=function(t,r,e){return h(null,t,r,e)},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,r,e){return a(null,t,r,e)},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(r,e){if(!t.isBuffer(r)||!t.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(r===e)return 0;for(var i=r.length,n=e.length,o=0,s=Math.min(i,n);s>o;++o)if(r[o]!==e[o]){i=r[o],n=e[o];break}return n>i?-1:i>n?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(r,e){if(!X(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return t.alloc(0);var i;if(void 0===e)for(e=0,i=0;r.length>i;++i)e+=r[i].length;var n=t.allocUnsafe(e),o=0;for(i=0;r.length>i;++i){var s=r[i];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},t.byteLength=v,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 r=0;t>r;r+=2)w(this,r,r+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 r=0;t>r;r+=4)w(this,r,r+3),w(this,r+1,r+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 r=0;t>r;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+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(r){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===t.compare(this,r)},t.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(r,e,i,n,o){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=r?r.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),0>e||i>r.length||0>n||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=i)return 0;if(n>=o)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var s=o-n,h=i-e,u=Math.min(s,h),a=this.slice(n,o),f=r.slice(e,i),l=0;u>l;++l)if(a[l]!==f[l]){s=a[l],h=f[l];break}return h>s?-1:s>h?1:0},t.prototype.includes=function(t,r,e){return this.indexOf(t,r,e)!==-1},t.prototype.indexOf=function(t,r,e){return M(this,t,r,e,!0)},t.prototype.lastIndexOf=function(t,r,e){return M(this,t,r,e,!1)},t.prototype.write=function(t,r,e,i){if(void 0===r)i="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)i=r,e=this.length,r=0;else{if(!isFinite(r))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r=0|r,isFinite(e)?(e=0|e,void 0===i&&(i="utf8")):(i=e,e=void 0)}var n=this.length-r;if((void 0===e||e>n)&&(e=n),t.length>0&&(0>e||0>r)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return _(this,t,r,e);case"utf8":case"utf-8":return E(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return x(this,t,r,e);case"base64":return S(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).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(r,e){var i=this.length;r=~~r,e=void 0===e?i:~~e,0>r?(r+=i,0>r&&(r=0)):r>i&&(r=i),0>e?(e+=i,0>e&&(e=0)):e>i&&(e=i),r>e&&(e=r);var n;if(t.TYPED_ARRAY_SUPPORT)n=this.subarray(r,e),n.__proto__=t.prototype;else{var o=e-r;n=new t(o,(void 0));for(var s=0;o>s;++s)n[s]=this[s+r]}return n},t.prototype.readUIntLE=function(t,r,e){t=0|t,r=0|r,e||C(t,r,this.length);for(var i=this[t],n=1,o=0;++o<r&&(n*=256);)i+=this[t+o]*n;return i},t.prototype.readUIntBE=function(t,r,e){t=0|t,r=0|r,e||C(t,r,this.length);for(var i=this[t+--r],n=1;r>0&&(n*=256);)i+=this[t+--r]*n;return i},t.prototype.readUInt8=function(t,r){return r||C(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,r){return r||C(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,r){return r||C(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,r){return r||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,r){return r||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,r,e){t=0|t,r=0|r,e||C(t,r,this.length);for(var i=this[t],n=1,o=0;++o<r&&(n*=256);)i+=this[t+o]*n;return n*=128,n>i||(i-=Math.pow(2,8*r)),i},t.prototype.readIntBE=function(t,r,e){t=0|t,r=0|r,e||C(t,r,this.length);for(var i=r,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return n*=128,n>o||(o-=Math.pow(2,8*r)),o},t.prototype.readInt8=function(t,r){return r||C(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,r){r||C(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},t.prototype.readInt16BE=function(t,r){r||C(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},t.prototype.readInt32LE=function(t,r){return r||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,r){return r||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,r){return r||C(t,4,this.length),G.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,r){return r||C(t,4,this.length),G.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,r){return r||C(t,8,this.length),G.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,r){return r||C(t,8,this.length),G.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,r,e,i){if(t=+t,r=0|r,e=0|e,!i){var n=Math.pow(2,8*e)-1;I(this,t,r,e,n,0)}var o=1,s=0;for(this[r]=255&t;++s<e&&(o*=256);)this[r+s]=t/o&255;return r+e},t.prototype.writeUIntBE=function(t,r,e,i){if(t=+t,r=0|r,e=0|e,!i){var n=Math.pow(2,8*e)-1;I(this,t,r,e,n,0)}var o=e-1,s=1;for(this[r+o]=255&t;--o>=0&&(s*=256);)this[r+o]=t/s&255;return r+e},t.prototype.writeUInt8=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,1,255,0),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[e]=255&r,e+1},t.prototype.writeUInt16LE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[e]=255&r,this[e+1]=r>>>8):Q(this,r,e,!0),e+2},t.prototype.writeUInt16BE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=255&r):Q(this,r,e,!1),e+2},t.prototype.writeUInt32LE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=255&r):N(this,r,e,!0),e+4},t.prototype.writeUInt32BE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r):N(this,r,e,!1),e+4},t.prototype.writeIntLE=function(t,r,e,i){if(t=+t,r=0|r,!i){var n=Math.pow(2,8*e-1);I(this,t,r,e,n-1,-n)}var o=0,s=1,h=0;for(this[r]=255&t;++o<e&&(s*=256);)0>t&&0===h&&0!==this[r+o-1]&&(h=1),this[r+o]=(t/s>>0)-h&255;return r+e},t.prototype.writeIntBE=function(t,r,e,i){if(t=+t,r=0|r,!i){var n=Math.pow(2,8*e-1);I(this,t,r,e,n-1,-n)}var o=e-1,s=1,h=0;for(this[r+o]=255&t;--o>=0&&(s*=256);)0>t&&0===h&&0!==this[r+o+1]&&(h=1),this[r+o]=(t/s>>0)-h&255;return r+e},t.prototype.writeInt8=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,1,127,-128),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),0>r&&(r=255+r+1),this[e]=255&r,e+1},t.prototype.writeInt16LE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[e]=255&r,this[e+1]=r>>>8):Q(this,r,e,!0),e+2},t.prototype.writeInt16BE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[e]=r>>>8,this[e+1]=255&r):Q(this,r,e,!1),e+2},t.prototype.writeInt32LE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[e]=255&r,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24):N(this,r,e,!0),e+4},t.prototype.writeInt32BE=function(r,e,i){return r=+r,e=0|e,i||I(this,r,e,4,2147483647,-2147483648),0>r&&(r=4294967295+r+1),t.TYPED_ARRAY_SUPPORT?(this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r):N(this,r,e,!1),e+4},t.prototype.writeFloatLE=function(t,r,e){return q(this,t,r,!0,e)},t.prototype.writeFloatBE=function(t,r,e){return q(this,t,r,!1,e)},t.prototype.writeDoubleLE=function(t,r,e){return L(this,t,r,!0,e)},t.prototype.writeDoubleBE=function(t,r,e){return L(this,t,r,!1,e)},t.prototype.copy=function(r,e,i,n){if(i||(i=0),n||0===n||(n=this.length),r.length>e||(e=r.length),e||(e=0),n>0&&i>n&&(n=i),n===i)return 0;if(0===r.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>i||i>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),n-i>r.length-e&&(n=r.length-e+i);var o,s=n-i;if(this===r&&e>i&&n>e)for(o=s-1;o>=0;--o)r[o+e]=this[o+i];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;++o)r[o+e]=this[o+i];else Uint8Array.prototype.set.call(r,this.subarray(i,i+s),e);return s},t.prototype.fill=function(r,e,i,n){if("string"==typeof r){if("string"==typeof e?(n=e,e=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===r.length){var o=r.charCodeAt(0);256>o&&(r=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof r&&(r=255&r);if(0>e||e>this.length||i>this.length)throw new RangeError("Out of range index");if(e>=i)return this;e>>>=0,i=void 0===i?this.length:i>>>0,r||(r=0);var s;if("number"==typeof r)for(s=e;i>s;++s)this[s]=r;else{var h=t.isBuffer(r)?r:z(""+new t(r,n)),u=h.length;for(s=0;i-e>s;++s)this[s+e]=h[s%u]}return this};var rt=/[^+\/0-9A-Za-z-_]/g}).call(r,e(0).Buffer,e(9))},function(t,r,e){(function(t){!function(t,r){"use strict";function i(t,r){if(!t)throw Error(r||"Assertion failed")}function n(t,r){t.super_=r;var e=function(){};e.prototype=r.prototype,t.prototype=new e,t.prototype.constructor=t}function o(t,r,e){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==r&&"be"!==r||(e=r,r=10),this._init(t||0,r||10,e||"be"))))}function s(t,r,e){for(var i=0,n=Math.min(t.length,e),o=r;n>o;o++){var s=t.charCodeAt(o)-48;i<<=4,i|=49>s||s>54?17>s||s>22?15&s:s-17+10:s-49+10}return i}function h(t,r,e,i){for(var n=0,o=Math.min(t.length,e),s=r;o>s;s++){var h=t.charCodeAt(s)-48;n*=i,n+=49>h?17>h?h:h-17+10:h-49+10}return n}function u(t){for(var r=Array(t.bitLength()),e=0;r.length>e;e++){var i=e/26|0,n=e%26;r[e]=(t.words[i]&1<<n)>>>n}return r}function a(t,r,e){e.negative=r.negative^t.negative;var i=t.length+r.length|0;e.length=i,i=i-1|0;var n=0|t.words[0],o=0|r.words[0],s=n*o,h=67108863&s,u=s/67108864|0;e.words[0]=h;for(var a=1;i>a;a++){for(var f=u>>>26,l=67108863&u,c=Math.min(a,r.length-1),p=Math.max(0,a-t.length+1);c>=p;p++){var d=a-p|0;n=0|t.words[d],o=0|r.words[p],s=n*o+l,f+=s/67108864|0,l=67108863&s}e.words[a]=0|l,u=0|f}return 0!==u?e.words[a]=0|u:e.length--,e.strip()}function f(t,r,e){e.negative=r.negative^t.negative,e.length=t.length+r.length;for(var i=0,n=0,o=0;e.length-1>o;o++){var s=n;n=0;for(var h=67108863&i,u=Math.min(o,r.length-1),a=Math.max(0,o-t.length+1);u>=a;a++){var f=o-a,l=0|t.words[f],c=0|r.words[a],p=l*c,d=67108863&p;s=s+(p/67108864|0)|0,d=d+h|0,h=67108863&d,s=s+(d>>>26)|0,n+=s>>>26,s&=67108863}e.words[o]=h,i=s,s=n}return 0!==i?e.words[o]=i:e.length--,e.strip()}function l(t,r,e){var i=new c;return i.mulp(t,r,e)}function c(t,r){this.x=t,this.y=r}function p(t,r){this.name=t,this.p=new o(r,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 g(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var r=o._prime(t);this.m=r.p,this.prime=r}else i(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:r.BN=o,o.BN=o,o.wordSize=26;var M;try{M=e(0).Buffer}catch(b){}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,r){return t.cmp(r)>0?t:r},o.min=function(t,r){return t.cmp(r)<0?t:r},o.prototype._init=function(t,r,e){if("number"==typeof t)return this._initNumber(t,r,e);if("object"==typeof t)return this._initArray(t,r,e);"hex"===r&&(r=16),i(r===(0|r)&&r>=2&&36>=r),t=(""+t).replace(/\s+/g,"");var n=0;"-"===t[0]&&n++,16===r?this._parseHex(t,n):this._parseBase(t,r,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===e&&this._initArray(this.toArray(),r,e)},o.prototype._initNumber=function(t,r,e){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):(i(9007199254740992>t),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===e&&this._initArray(this.toArray(),r,e)},o.prototype._initArray=function(t,r,e){if(i("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 n=0;this.length>n;n++)this.words[n]=0;var o,s,h=0;if("be"===e)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,h+=24,26>h||(h-=26,o++);else if("le"===e)for(n=0,o=0;t.length>n;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<h&67108863,this.words[o+1]=s>>>26-h&67108863,h+=24,26>h||(h-=26,o++);return this.strip()},o.prototype._parseHex=function(t,r){this.length=Math.ceil((t.length-r)/6),this.words=Array(this.length);for(var e=0;this.length>e;e++)this.words[e]=0;var i,n,o=0;for(e=t.length-6,i=0;e>=r;e-=6)n=s(t,e,e+6),this.words[i]|=n<<o&67108863,this.words[i+1]|=n>>>26-o&4194303,o+=24,26>o||(o-=26,i++);e+6!==r&&(n=s(t,r,e+6),this.words[i]|=n<<o&67108863,this.words[i+1]|=n>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,r,e){this.words=[0],this.length=1;for(var i=0,n=1;67108863>=n;n*=r)i++;i--,n=n/r|0;for(var o=t.length-e,s=o%i,u=Math.min(o,o-s)+e,a=0,f=e;u>f;f+=i)a=h(t,f,f+i,r),this.imuln(n),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a);if(0!==s){var l=1;for(a=h(t,f,t.length,r),f=0;s>f;f++)l*=r;this.imuln(l),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a)}},o.prototype.copy=function(t){t.words=Array(this.length);for(var r=0;this.length>r;r++)t.words[r]=this.words[r];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"],E=[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],A=[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,r){t=t||10,r=0|r||1;var e;if(16===t||"hex"===t){e="";for(var n=0,o=0,s=0;this.length>s;s++){var h=this.words[s],u=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,e=0!==o||s!==this.length-1?_[6-u.length]+u+e:u+e,n+=2,26>n||(n-=26,s--)}for(0!==o&&(e=o.toString(16)+e);e.length%r!==0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(t===(0|t)&&t>=2&&36>=t){var a=E[t],f=A[t];e="";var l=this.clone();for(l.negative=0;!l.isZero();){var c=l.modn(f).toString(t);l=l.idivn(f),e=l.isZero()?c+e:_[a-c.length]+c+e}for(this.isZero()&&(e="0"+e);e.length%r!==0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}i(!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&&i(!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,r){return i(void 0!==M),this.toArrayLike(M,t,r)},o.prototype.toArray=function(t,r){return this.toArrayLike(Array,t,r)},o.prototype.toArrayLike=function(t,r,e){var n=this.byteLength(),o=e||Math.max(1,n);i(o>=n,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,h,u="le"===r,a=new t(o),f=this.clone();if(u){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),a[h]=s;for(;o>h;h++)a[h]=0}else{for(h=0;o-n>h;h++)a[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),a[o-h-1]=s}return a},o.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var r=t,e=0;return 4096>r||(e+=13,r>>>=13),64>r||(e+=7,r>>>=7),8>r||(e+=4,r>>>=4),2>r||(e+=2,r>>>=2),e+r},o.prototype._zeroBits=function(t){if(0===t)return 26;var r=t,e=0;return 0===(8191&r)&&(e+=13,r>>>=13),0===(127&r)&&(e+=7,r>>>=7),0===(15&r)&&(e+=4,r>>>=4),0===(3&r)&&(e+=2,r>>>=2),0===(1&r)&&e++,e},o.prototype.bitLength=function(){var t=this.words[this.length-1],r=this._countBits(t);return 26*(this.length-1)+r},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,r=0;this.length>r;r++){var e=this._zeroBits(this.words[r]);if(t+=e,26!==e)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 r=0;t.length>r;r++)this.words[r]=this.words[r]|t.words[r];return this.strip()},o.prototype.ior=function(t){return i(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 r;r=this.length>t.length?t:this;for(var e=0;r.length>e;e++)this.words[e]=this.words[e]&t.words[e];return this.length=r.length,this.strip()},o.prototype.iand=function(t){return i(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 r,e;this.length>t.length?(r=this,e=t):(r=t,e=this);for(var i=0;e.length>i;i++)this.words[i]=r.words[i]^e.words[i];if(this!==r)for(;r.length>i;i++)this.words[i]=r.words[i];return this.length=r.length,this.strip()},o.prototype.ixor=function(t){return i(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){i("number"==typeof t&&t>=0);var r=0|Math.ceil(t/26),e=t%26;this._expand(r),e>0&&r--;for(var n=0;r>n;n++)this.words[n]=67108863&~this.words[n];return e>0&&(this.words[n]=~this.words[n]&67108863>>26-e),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,r){i("number"==typeof t&&t>=0);var e=t/26|0,n=t%26;return this._expand(e+1),this.words[e]=r?this.words[e]|1<<n:this.words[e]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var r;if(0!==this.negative&&0===t.negative)return this.negative=0,r=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,r=this.isub(t),t.negative=1,r._normSign();var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var n=0,o=0;i.length>o;o++)r=(0|e.words[o])+(0|i.words[o])+n,
|
|
this.words[o]=67108863&r,n=r>>>26;for(;0!==n&&e.length>o;o++)r=(0|e.words[o])+n,this.words[o]=67108863&r,n=r>>>26;if(this.length=e.length,0!==n)this.words[this.length]=n,this.length++;else if(e!==this)for(;e.length>o;o++)this.words[o]=e.words[o];return this},o.prototype.add=function(t){var r;return 0!==t.negative&&0===this.negative?(t.negative=0,r=this.sub(t),t.negative^=1,r):0===t.negative&&0!==this.negative?(this.negative=0,r=t.sub(this),this.negative=1,r):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 r=this.iadd(t);return t.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var e=this.cmp(t);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;var i,n;e>0?(i=this,n=t):(i=t,n=this);for(var o=0,s=0;n.length>s;s++)r=(0|i.words[s])-(0|n.words[s])+o,o=r>>26,this.words[s]=67108863&r;for(;0!==o&&i.length>s;s++)r=(0|i.words[s])+o,o=r>>26,this.words[s]=67108863&r;if(0===o&&i.length>s&&i!==this)for(;i.length>s;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var x=function(t,r,e){var i,n,o,s=t.words,h=r.words,u=e.words,a=0,f=0|s[0],l=8191&f,c=f>>>13,p=0|s[1],d=8191&p,m=p>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],M=8191&w,b=w>>>13,_=0|s[4],E=8191&_,A=_>>>13,x=0|s[5],S=8191&x,B=x>>>13,T=0|s[6],k=8191&T,j=T>>>13,D=0|s[7],P=8191&D,R=D>>>13,O=0|s[8],C=8191&O,I=O>>>13,Q=0|s[9],N=8191&Q,U=Q>>>13,q=0|h[0],L=8191&q,F=q>>>13,H=0|h[1],Y=8191&H,z=H>>>13,Z=0|h[2],J=8191&Z,K=Z>>>13,$=0|h[3],W=8191&$,V=$>>>13,G=0|h[4],X=8191&G,tt=G>>>13,rt=0|h[5],et=8191&rt,it=rt>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,pt=0|h[9],dt=8191&pt,mt=pt>>>13;e.negative=t.negative^r.negative,e.length=19,i=Math.imul(l,L),n=Math.imul(l,F),n=n+Math.imul(c,L)|0,o=Math.imul(c,F);var gt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(d,L),n=Math.imul(d,F),n=n+Math.imul(m,L)|0,o=Math.imul(m,F),i=i+Math.imul(l,Y)|0,n=n+Math.imul(l,z)|0,n=n+Math.imul(c,Y)|0,o=o+Math.imul(c,z)|0;var vt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(v,L),n=Math.imul(v,F),n=n+Math.imul(y,L)|0,o=Math.imul(y,F),i=i+Math.imul(d,Y)|0,n=n+Math.imul(d,z)|0,n=n+Math.imul(m,Y)|0,o=o+Math.imul(m,z)|0,i=i+Math.imul(l,J)|0,n=n+Math.imul(l,K)|0,n=n+Math.imul(c,J)|0,o=o+Math.imul(c,K)|0;var yt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(M,L),n=Math.imul(M,F),n=n+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(v,Y)|0,n=n+Math.imul(v,z)|0,n=n+Math.imul(y,Y)|0,o=o+Math.imul(y,z)|0,i=i+Math.imul(d,J)|0,n=n+Math.imul(d,K)|0,n=n+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0,i=i+Math.imul(l,W)|0,n=n+Math.imul(l,V)|0,n=n+Math.imul(c,W)|0,o=o+Math.imul(c,V)|0;var wt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,L),n=Math.imul(E,F),n=n+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(M,Y)|0,n=n+Math.imul(M,z)|0,n=n+Math.imul(b,Y)|0,o=o+Math.imul(b,z)|0,i=i+Math.imul(v,J)|0,n=n+Math.imul(v,K)|0,n=n+Math.imul(y,J)|0,o=o+Math.imul(y,K)|0,i=i+Math.imul(d,W)|0,n=n+Math.imul(d,V)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0,i=i+Math.imul(l,X)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(c,X)|0,o=o+Math.imul(c,tt)|0;var Mt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(S,L),n=Math.imul(S,F),n=n+Math.imul(B,L)|0,o=Math.imul(B,F),i=i+Math.imul(E,Y)|0,n=n+Math.imul(E,z)|0,n=n+Math.imul(A,Y)|0,o=o+Math.imul(A,z)|0,i=i+Math.imul(M,J)|0,n=n+Math.imul(M,K)|0,n=n+Math.imul(b,J)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(v,V)|0,n=n+Math.imul(y,W)|0,o=o+Math.imul(y,V)|0,i=i+Math.imul(d,X)|0,n=n+Math.imul(d,tt)|0,n=n+Math.imul(m,X)|0,o=o+Math.imul(m,tt)|0,i=i+Math.imul(l,et)|0,n=n+Math.imul(l,it)|0,n=n+Math.imul(c,et)|0,o=o+Math.imul(c,it)|0;var bt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(k,L),n=Math.imul(k,F),n=n+Math.imul(j,L)|0,o=Math.imul(j,F),i=i+Math.imul(S,Y)|0,n=n+Math.imul(S,z)|0,n=n+Math.imul(B,Y)|0,o=o+Math.imul(B,z)|0,i=i+Math.imul(E,J)|0,n=n+Math.imul(E,K)|0,n=n+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(M,W)|0,n=n+Math.imul(M,V)|0,n=n+Math.imul(b,W)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(v,X)|0,n=n+Math.imul(v,tt)|0,n=n+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0,i=i+Math.imul(d,et)|0,n=n+Math.imul(d,it)|0,n=n+Math.imul(m,et)|0,o=o+Math.imul(m,it)|0,i=i+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(c,ot)|0,o=o+Math.imul(c,st)|0;var _t=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(P,L),n=Math.imul(P,F),n=n+Math.imul(R,L)|0,o=Math.imul(R,F),i=i+Math.imul(k,Y)|0,n=n+Math.imul(k,z)|0,n=n+Math.imul(j,Y)|0,o=o+Math.imul(j,z)|0,i=i+Math.imul(S,J)|0,n=n+Math.imul(S,K)|0,n=n+Math.imul(B,J)|0,o=o+Math.imul(B,K)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(E,V)|0,n=n+Math.imul(A,W)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,X)|0,n=n+Math.imul(M,tt)|0,n=n+Math.imul(b,X)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(v,et)|0,n=n+Math.imul(v,it)|0,n=n+Math.imul(y,et)|0,o=o+Math.imul(y,it)|0,i=i+Math.imul(d,ot)|0,n=n+Math.imul(d,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,i=i+Math.imul(l,ut)|0,n=n+Math.imul(l,at)|0,n=n+Math.imul(c,ut)|0,o=o+Math.imul(c,at)|0;var Et=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(C,L),n=Math.imul(C,F),n=n+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(P,Y)|0,n=n+Math.imul(P,z)|0,n=n+Math.imul(R,Y)|0,o=o+Math.imul(R,z)|0,i=i+Math.imul(k,J)|0,n=n+Math.imul(k,K)|0,n=n+Math.imul(j,J)|0,o=o+Math.imul(j,K)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(S,V)|0,n=n+Math.imul(B,W)|0,o=o+Math.imul(B,V)|0,i=i+Math.imul(E,X)|0,n=n+Math.imul(E,tt)|0,n=n+Math.imul(A,X)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,et)|0,n=n+Math.imul(M,it)|0,n=n+Math.imul(b,et)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(v,ot)|0,n=n+Math.imul(v,st)|0,n=n+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,i=i+Math.imul(d,ut)|0,n=n+Math.imul(d,at)|0,n=n+Math.imul(m,ut)|0,o=o+Math.imul(m,at)|0,i=i+Math.imul(l,lt)|0,n=n+Math.imul(l,ct)|0,n=n+Math.imul(c,lt)|0,o=o+Math.imul(c,ct)|0;var At=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(N,L),n=Math.imul(N,F),n=n+Math.imul(U,L)|0,o=Math.imul(U,F),i=i+Math.imul(C,Y)|0,n=n+Math.imul(C,z)|0,n=n+Math.imul(I,Y)|0,o=o+Math.imul(I,z)|0,i=i+Math.imul(P,J)|0,n=n+Math.imul(P,K)|0,n=n+Math.imul(R,J)|0,o=o+Math.imul(R,K)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(k,V)|0,n=n+Math.imul(j,W)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(S,X)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(B,X)|0,o=o+Math.imul(B,tt)|0,i=i+Math.imul(E,et)|0,n=n+Math.imul(E,it)|0,n=n+Math.imul(A,et)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,n=n+Math.imul(M,st)|0,n=n+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(v,ut)|0,n=n+Math.imul(v,at)|0,n=n+Math.imul(y,ut)|0,o=o+Math.imul(y,at)|0,i=i+Math.imul(d,lt)|0,n=n+Math.imul(d,ct)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0,i=i+Math.imul(l,dt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(c,dt)|0,o=o+Math.imul(c,mt)|0;var xt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(N,Y),n=Math.imul(N,z),n=n+Math.imul(U,Y)|0,o=Math.imul(U,z),i=i+Math.imul(C,J)|0,n=n+Math.imul(C,K)|0,n=n+Math.imul(I,J)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(P,V)|0,n=n+Math.imul(R,W)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(k,X)|0,n=n+Math.imul(k,tt)|0,n=n+Math.imul(j,X)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(S,et)|0,n=n+Math.imul(S,it)|0,n=n+Math.imul(B,et)|0,o=o+Math.imul(B,it)|0,i=i+Math.imul(E,ot)|0,n=n+Math.imul(E,st)|0,n=n+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,i=i+Math.imul(M,ut)|0,n=n+Math.imul(M,at)|0,n=n+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,i=i+Math.imul(v,lt)|0,n=n+Math.imul(v,ct)|0,n=n+Math.imul(y,lt)|0,o=o+Math.imul(y,ct)|0,i=i+Math.imul(d,dt)|0,n=n+Math.imul(d,mt)|0,n=n+Math.imul(m,dt)|0,o=o+Math.imul(m,mt)|0;var St=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(N,J),n=Math.imul(N,K),n=n+Math.imul(U,J)|0,o=Math.imul(U,K),i=i+Math.imul(C,W)|0,n=n+Math.imul(C,V)|0,n=n+Math.imul(I,W)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(P,X)|0,n=n+Math.imul(P,tt)|0,n=n+Math.imul(R,X)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(k,et)|0,n=n+Math.imul(k,it)|0,n=n+Math.imul(j,et)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,i=i+Math.imul(E,ut)|0,n=n+Math.imul(E,at)|0,n=n+Math.imul(A,ut)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,lt)|0,n=n+Math.imul(M,ct)|0,n=n+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0,i=i+Math.imul(v,dt)|0,n=n+Math.imul(v,mt)|0,n=n+Math.imul(y,dt)|0,o=o+Math.imul(y,mt)|0;var Bt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(N,W),n=Math.imul(N,V),n=n+Math.imul(U,W)|0,o=Math.imul(U,V),i=i+Math.imul(C,X)|0,n=n+Math.imul(C,tt)|0,n=n+Math.imul(I,X)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(P,et)|0,n=n+Math.imul(P,it)|0,n=n+Math.imul(R,et)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(k,ot)|0,n=n+Math.imul(k,st)|0,n=n+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,i=i+Math.imul(S,ut)|0,n=n+Math.imul(S,at)|0,n=n+Math.imul(B,ut)|0,o=o+Math.imul(B,at)|0,i=i+Math.imul(E,lt)|0,n=n+Math.imul(E,ct)|0,n=n+Math.imul(A,lt)|0,o=o+Math.imul(A,ct)|0,i=i+Math.imul(M,dt)|0,n=n+Math.imul(M,mt)|0,n=n+Math.imul(b,dt)|0,o=o+Math.imul(b,mt)|0;var Tt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(N,X),n=Math.imul(N,tt),n=n+Math.imul(U,X)|0,o=Math.imul(U,tt),i=i+Math.imul(C,et)|0,n=n+Math.imul(C,it)|0,n=n+Math.imul(I,et)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(P,ot)|0,n=n+Math.imul(P,st)|0,n=n+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(k,ut)|0,n=n+Math.imul(k,at)|0,n=n+Math.imul(j,ut)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(S,lt)|0,n=n+Math.imul(S,ct)|0,n=n+Math.imul(B,lt)|0,o=o+Math.imul(B,ct)|0,i=i+Math.imul(E,dt)|0,n=n+Math.imul(E,mt)|0,n=n+Math.imul(A,dt)|0,o=o+Math.imul(A,mt)|0;var kt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(N,et),n=Math.imul(N,it),n=n+Math.imul(U,et)|0,o=Math.imul(U,it),i=i+Math.imul(C,ot)|0,n=n+Math.imul(C,st)|0,n=n+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,i=i+Math.imul(P,ut)|0,n=n+Math.imul(P,at)|0,n=n+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,i=i+Math.imul(k,lt)|0,n=n+Math.imul(k,ct)|0,n=n+Math.imul(j,lt)|0,o=o+Math.imul(j,ct)|0,i=i+Math.imul(S,dt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(B,dt)|0,o=o+Math.imul(B,mt)|0;var jt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(N,ot),n=Math.imul(N,st),n=n+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(C,ut)|0,n=n+Math.imul(C,at)|0,n=n+Math.imul(I,ut)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(P,lt)|0,n=n+Math.imul(P,ct)|0,n=n+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0,i=i+Math.imul(k,dt)|0,n=n+Math.imul(k,mt)|0,n=n+Math.imul(j,dt)|0,o=o+Math.imul(j,mt)|0;var Dt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(N,ut),n=Math.imul(N,at),n=n+Math.imul(U,ut)|0,o=Math.imul(U,at),i=i+Math.imul(C,lt)|0,n=n+Math.imul(C,ct)|0,n=n+Math.imul(I,lt)|0,o=o+Math.imul(I,ct)|0,i=i+Math.imul(P,dt)|0,n=n+Math.imul(P,mt)|0,n=n+Math.imul(R,dt)|0,o=o+Math.imul(R,mt)|0;var Pt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(N,lt),n=Math.imul(N,ct),n=n+Math.imul(U,lt)|0,o=Math.imul(U,ct),i=i+Math.imul(C,dt)|0,n=n+Math.imul(C,mt)|0,n=n+Math.imul(I,dt)|0,o=o+Math.imul(I,mt)|0;var Rt=(a+i|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(N,dt),n=Math.imul(N,mt),n=n+Math.imul(U,dt)|0,o=Math.imul(U,mt);var Ot=(a+i|0)+((8191&n)<<13)|0;return a=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=Mt,u[5]=bt,u[6]=_t,u[7]=Et,u[8]=At,u[9]=xt,u[10]=St,u[11]=Bt,u[12]=Tt,u[13]=kt,u[14]=jt,u[15]=Dt,u[16]=Pt,u[17]=Rt,u[18]=Ot,0!==a&&(u[19]=a,e.length++),e};Math.imul||(x=a),o.prototype.mulTo=function(t,r){var e,i=this.length+t.length;return e=10===this.length&&10===t.length?x(this,t,r):63>i?a(this,t,r):1024>i?f(this,t,r):l(this,t,r)},c.prototype.makeRBT=function(t){for(var r=Array(t),e=o.prototype._countBits(t)-1,i=0;t>i;i++)r[i]=this.revBin(i,e,t);return r},c.prototype.revBin=function(t,r,e){if(0===t||t===e-1)return t;for(var i=0,n=0;r>n;n++)i|=(1&t)<<r-n-1,t>>=1;return i},c.prototype.permute=function(t,r,e,i,n,o){for(var s=0;o>s;s++)i[s]=r[t[s]],n[s]=e[t[s]]},c.prototype.transform=function(t,r,e,i,n,o){this.permute(o,t,r,e,i,n);for(var s=1;n>s;s<<=1)for(var h=s<<1,u=Math.cos(2*Math.PI/h),a=Math.sin(2*Math.PI/h),f=0;n>f;f+=h)for(var l=u,c=a,p=0;s>p;p++){var d=e[f+p],m=i[f+p],g=e[f+p+s],v=i[f+p+s],y=l*g-c*v;v=l*v+c*g,g=y,e[f+p]=d+g,i[f+p]=m+v,e[f+p+s]=d-g,i[f+p+s]=m-v,p!==h&&(y=u*l-a*c,c=u*c+a*l,l=y)}},c.prototype.guessLen13b=function(t,r){var e=1|Math.max(r,t),i=1&e,n=0;for(e=e/2|0;e;e>>>=1)n++;return 1<<n+1+i},c.prototype.conjugate=function(t,r,e){if(e>1)for(var i=0;e/2>i;i++){var n=t[i];t[i]=t[e-i-1],t[e-i-1]=n,n=r[i],r[i]=-r[e-i-1],r[e-i-1]=-n}},c.prototype.normalize13b=function(t,r){for(var e=0,i=0;r/2>i;i++){var n=8192*Math.round(t[2*i+1]/r)+Math.round(t[2*i]/r)+e;t[i]=67108863&n,e=67108864>n?0:n/67108864|0}return t},c.prototype.convert13b=function(t,r,e,n){for(var o=0,s=0;r>s;s++)o+=0|t[s],e[2*s]=8191&o,o>>>=13,e[2*s+1]=8191&o,o>>>=13;for(s=2*r;n>s;++s)e[s]=0;i(0===o),i(0===(o&-8192))},c.prototype.stub=function(t){for(var r=Array(t),e=0;t>e;e++)r[e]=0;return r},c.prototype.mulp=function(t,r,e){var i=2*this.guessLen13b(t.length,r.length),n=this.makeRBT(i),o=this.stub(i),s=Array(i),h=Array(i),u=Array(i),a=Array(i),f=Array(i),l=Array(i),c=e.words;c.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(r.words,r.length,a,i),this.transform(s,o,h,u,i,n),this.transform(a,o,f,l,i,n);for(var p=0;i>p;p++){var d=h[p]*f[p]-u[p]*l[p];u[p]=h[p]*l[p]+u[p]*f[p],h[p]=d}return this.conjugate(h,u,i),this.transform(h,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),e.negative=t.negative^r.negative,e.length=t.length+r.length,e.strip()},o.prototype.mul=function(t){var r=new o(null);return r.words=Array(this.length+t.length),this.mulTo(t,r)},o.prototype.mulf=function(t){var r=new o(null);return r.words=Array(this.length+t.length),l(this,t,r)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){i("number"==typeof t),i(67108864>t);for(var r=0,e=0;this.length>e;e++){var n=(0|this.words[e])*t,o=(67108863&n)+(67108863&r);r>>=26,r+=n/67108864|0,r+=o>>>26,this.words[e]=67108863&o}return 0!==r&&(this.words[e]=r,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 r=u(t);if(0===r.length)return new o(1);for(var e=this,i=0;r.length>i&&0===r[i];i++,e=e.sqr());if(++i<r.length)for(var n=e.sqr();r.length>i;i++,n=n.sqr())0!==r[i]&&(e=e.mul(n));return e},o.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var r,e=t%26,n=(t-e)/26,o=67108863>>>26-e<<26-e;if(0!==e){var s=0;for(r=0;this.length>r;r++){var h=this.words[r]&o,u=(0|this.words[r])-h<<e;this.words[r]=u|s,s=h>>>26-e}s&&(this.words[r]=s,this.length++)}if(0!==n){for(r=this.length-1;r>=0;r--)this.words[r+n]=this.words[r];for(r=0;n>r;r++)this.words[r]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,r,e){i("number"==typeof t&&t>=0);var n;n=r?(r-r%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,u=e;if(n-=s,n=Math.max(0,n),u){for(var a=0;s>a;a++)u.words[a]=this.words[a];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,a=0;this.length>a;a++)this.words[a]=this.words[a+s];else this.words[0]=0,this.length=1;var f=0;for(a=this.length-1;!(0>a||0===f&&n>a);a--){var l=0|this.words[a];this.words[a]=f<<26-o|l>>>o,f=l&h}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,r,e){return i(0===this.negative),this.iushrn(t,r,e)},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){i("number"==typeof t&&t>=0);var r=t%26,e=(t-r)/26,n=1<<r;if(e>=this.length)return!1;var o=this.words[e];return!!(o&n)},o.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var r=t%26,e=(t-r)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),e>=this.length)return this;if(0!==r&&e++,this.length=Math.min(e,this.length),0!==r){var n=67108863^67108863>>>r<<r;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return i("number"==typeof t),i(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 r=0;this.length>r&&this.words[r]>=67108864;r++)this.words[r]-=67108864,r===this.length-1?this.words[r+1]=1:this.words[r+1]++;return this.length=Math.max(this.length,r+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(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 r=0;this.length>r&&0>this.words[r];r++)this.words[r]+=67108864,this.words[r+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,r,e){var n,o=t.length+e;this._expand(o);var s,h=0;for(n=0;t.length>n;n++){s=(0|this.words[n+e])+h;var u=(0|t.words[n])*r;s-=67108863&u,h=(s>>26)-(u/67108864|0),this.words[n+e]=67108863&s}for(;this.length-e>n;n++)s=(0|this.words[n+e])+h,h=s>>26,this.words[n+e]=67108863&s;if(0===h)return this.strip();for(i(h===-1),h=0,n=0;this.length>n;n++)s=-(0|this.words[n])+h,h=s>>26,this.words[n]=67108863&s;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,r){var e=this.length-t.length,i=this.clone(),n=t,s=0|n.words[n.length-1],h=this._countBits(s);e=26-h,0!==e&&(n=n.ushln(e),i.iushln(e),s=0|n.words[n.length-1]);var u,a=i.length-n.length;if("mod"!==r){u=new o(null),u.length=a+1,u.words=Array(u.length);for(var f=0;u.length>f;f++)u.words[f]=0}var l=i.clone()._ishlnsubmul(n,1,a);0===l.negative&&(i=l,u&&(u.words[a]=1));for(var c=a-1;c>=0;c--){var p=67108864*(0|i.words[n.length+c])+(0|i.words[n.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(n,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(n,1,c),i.isZero()||(i.negative^=1);u&&(u.words[c]=p)}return u&&u.strip(),i.strip(),"div"!==r&&0!==e&&i.iushrn(e),{div:u||null,mod:i}},o.prototype.divmod=function(t,r,e){if(i(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var n,s,h;return 0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,r),"mod"!==r&&(n=h.div.neg()),"div"!==r&&(s=h.mod.neg(),e&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),r),"mod"!==r&&(n=h.div.neg()),{div:n,mod:h.mod}):0!==(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),r),"div"!==r&&(s=h.mod.neg(),e&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{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,r)},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 r=this.divmod(t);if(r.mod.isZero())return r.div;var e=0!==r.div.negative?r.mod.isub(t):r.mod,i=t.ushrn(1),n=t.andln(1),o=e.cmp(i);return 0>o||1===n&&0===o?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},o.prototype.modn=function(t){i(67108863>=t);for(var r=(1<<26)%t,e=0,n=this.length-1;n>=0;n--)e=(r*e+(0|this.words[n]))%t;return e},o.prototype.idivn=function(t){i(67108863>=t);for(var r=0,e=this.length-1;e>=0;e--){var n=(0|this.words[e])+67108864*r;this.words[e]=n/t|0,r=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var r=this,e=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;r.isEven()&&e.isEven();)r.iushrn(1),e.iushrn(1),++a;for(var f=e.clone(),l=r.clone();!r.isZero();){for(var c=0,p=1;0===(r.words[0]&p)&&26>c;++c,p<<=1);if(c>0)for(r.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var d=0,m=1;0===(e.words[0]&m)&&26>d;++d,m<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(f),u.isub(l)),h.iushrn(1),u.iushrn(1);r.cmp(e)<0?(e.isub(r),h.isub(n),u.isub(s)):(r.isub(e),n.isub(h),s.isub(u))}return{a:h,b:u,gcd:e.iushln(a)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var r=this,e=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),s=new o(0),h=e.clone();r.cmpn(1)>0&&e.cmpn(1)>0;){for(var u=0,a=1;0===(r.words[0]&a)&&26>u;++u,a<<=1);if(u>0)for(r.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(h),n.iushrn(1);for(var f=0,l=1;0===(e.words[0]&l)&&26>f;++f,l<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);r.cmp(e)<0?(e.isub(r),s.isub(n)):(r.isub(e),n.isub(s))}var c;return c=0===r.cmpn(1)?n:s,c.cmpn(0)<0&&c.iadd(t),c},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var r=this.clone(),e=t.clone();r.negative=0,e.negative=0;for(var i=0;r.isEven()&&e.isEven();i++)r.iushrn(1),e.iushrn(1);for(;;){for(;r.isEven();)r.iushrn(1);for(;e.isEven();)e.iushrn(1);var n=r.cmp(e);if(0>n){var o=r;r=e,e=o}else if(0===n||0===e.cmpn(1))break;r.isub(e)}return e.iushln(i)},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){i("number"==typeof t);var r=t%26,e=(t-r)/26,n=1<<r;if(e>=this.length)return this._expand(e+1),this.words[e]|=n,this;for(var o=n,s=e;0!==o&&this.length>s;s++){var h=0|this.words[s];h+=o,o=h>>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var r=0>t;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;this.strip();var e;if(this.length>1)e=1;else{r&&(t=-t),i(67108863>=t,"Number is too big");var n=0|this.words[0];e=n===t?0:t>n?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var r=this.ucmp(t);return 0!==this.negative?0|-r:r},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(t.length>this.length)return-1;for(var r=0,e=this.length-1;e>=0;e--){var i=0|this.words[e],n=0|t.words[e];if(i!==n){n>i?r=-1:i>n&&(r=1);break}}return r},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 i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(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 i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var S={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 r,e=t;do this.split(e,this.tmp),e=this.imulK(e),e=e.iadd(this.tmp),r=e.bitLength();while(r>this.n);var i=this.n>r?-1:e.ucmp(this.p);return 0===i?(e.words[0]=0,e.length=1):i>0?e.isub(this.p):e.strip(),e},p.prototype.split=function(t,r){t.iushrn(this.n,0,r)},p.prototype.imulK=function(t){return t.imul(this.k)},n(d,p),d.prototype.split=function(t,r){for(var e=4194303,i=Math.min(t.length,9),n=0;i>n;n++)r.words[n]=t.words[n];if(r.length=i,9>=t.length)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(r.words[r.length++]=o&e,n=10;t.length>n;n++){var s=0|t.words[n];t.words[n-10]=(s&e)<<4|o>>>22,o=s}o>>>=22,t.words[n-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 r=0,e=0;t.length>e;e++){var i=0|t.words[e];r+=977*i,t.words[e]=67108863&r,r=64*i+(r/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(m,p),n(g,p),n(v,p),v.prototype.imulK=function(t){for(var r=0,e=0;t.length>e;e++){var i=19*(0|t.words[e])+r,n=67108863&i;i>>>=26,t.words[e]=n,r=i}return 0!==r&&(t.words[t.length++]=r),t},o._prime=function B(t){if(S[t])return S[t];var B;if("k256"===t)B=new d;else if("p224"===t)B=new m;else if("p192"===t)B=new g;else{if("p25519"!==t)throw Error("Unknown prime "+t);B=new v}return S[t]=B,B},y.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,r){i(0===(t.negative|r.negative),"red works only with positives"),i(t.red&&t.red===r.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,r){this._verify2(t,r);var e=t.add(r);return e.cmp(this.m)<0||e.isub(this.m),e._forceRed(this)},y.prototype.iadd=function(t,r){this._verify2(t,r);var e=t.iadd(r);return e.cmp(this.m)<0||e.isub(this.m),e},y.prototype.sub=function(t,r){this._verify2(t,r);var e=t.sub(r);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},y.prototype.isub=function(t,r){this._verify2(t,r);var e=t.isub(r);return e.cmpn(0)<0&&e.iadd(this.m),e},y.prototype.shl=function(t,r){return this._verify1(t),this.imod(t.ushln(r))},y.prototype.imul=function(t,r){return this._verify2(t,r),this.imod(t.imul(r))},y.prototype.mul=function(t,r){return this._verify2(t,r),this.imod(t.mul(r))},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 r=this.m.andln(3);if(i(r%2===1),3===r){var e=this.m.add(new o(1)).iushrn(2);return this.pow(t,e)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);i(!n.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,a).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),p=this.pow(t,n),d=s;0!==p.cmp(h);){for(var m=p,g=0;0!==m.cmp(h);g++)m=m.redSqr();i(d>g);var v=this.pow(l,new o(1).iushln(d-g-1));c=c.redMul(v),l=v.redSqr(),p=p.redMul(l),d=g}return c},y.prototype.invm=function(t){var r=t._invmp(this.m);return 0!==r.negative?(r.negative=0,this.imod(r).redNeg()):this.imod(r)},y.prototype.pow=function(t,r){if(r.isZero())return new o(1);if(0===r.cmpn(1))return t.clone();var e=4,i=Array(1<<e);i[0]=new o(1).toRed(this),i[1]=t;for(var n=2;i.length>n;n++)i[n]=this.mul(i[n-1],t);var s=i[0],h=0,u=0,a=r.bitLength()%26;for(0===a&&(a=26),n=r.length-1;n>=0;n--){for(var f=r.words[n],l=a-1;l>=0;l--){var c=f>>l&1;s!==i[0]&&(s=this.sqr(s)),0!==c||0!==h?(h<<=1,h|=c,u++,(u===e||0===n&&0===l)&&(s=this.mul(s,i[h]),u=0,h=0)):u=0}a=26}return s},y.prototype.convertTo=function(t){var r=t.umod(this.m);return r===t?r.clone():r},y.prototype.convertFrom=function(t){var r=t.clone();return r.red=null,r},o.mont=function(t){return new w(t)},n(w,y),w.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},w.prototype.convertFrom=function(t){var r=this.imod(t.mul(this.rinv));return r.red=null,r},w.prototype.imul=function(t,r){if(t.isZero()||r.isZero())return t.words[0]=0,t.length=1,t;var e=t.imul(r),i=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=e.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(o=n.iadd(this.m)):o=n.isub(this.m),o._forceRed(this)},w.prototype.mul=function(t,r){if(t.isZero()||r.isZero())return new o(0)._forceRed(this);var e=t.mul(r),i=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=e.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(s=n.iadd(this.m)):s=n.isub(this.m),s._forceRed(this)},w.prototype.invm=function(t){var r=this.imod(t._invmp(this.m).mul(this.r2));return r._forceRed(this)}}(void 0===t||t,this)}).call(r,e(24)(t))},function(t,r,e){"use strict";(function(r){function i(t){var r=t;if("string"!=typeof r)throw Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof r+", while padToEven.");return r.length%2&&(r="0"+r),r}function n(t){var r=t.toString(16);return"0x"+i(r)}function o(t){var e=n(t);return r.from(e.slice(2),"hex")}function s(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 r.byteLength(t,"utf8")}function h(t,r,e){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(r)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof r+"'");return r[!!e&&"some"||"every"](function(r){return t.indexOf(r)>=0})}function u(t){var e=new r(i(m(t).replace(/^0+|0+$/g,"")),"hex");return e.toString("utf8")}function a(t){var r="",e=0,i=t.length;for("0x"===t.substring(0,2)&&(e=2);i>e;e+=2){var n=parseInt(t.substr(e,2),16);r+=String.fromCharCode(n)}return r}function f(t){var e=new r(t,"utf8");return"0x"+i(e.toString("hex")).replace(/^0+|0+$/g,"")}function l(t){for(var r="",e=0;t.length>e;e++){var i=t.charCodeAt(e),n=i.toString(16);r+=2>n.length?"0"+n:n}return"0x"+r}function c(t,r,e){if(!Array.isArray(t))throw Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof r)throw Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof r+"'.");for(var i=[],n=0;t.length>n;n++){var o=t[n][r];if(e&&!o)o="";else if("string"!=typeof o)throw Error("invalid abi");i.push(o)}return i}function p(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}var d=e(8),m=e(5);t.exports={arrayContainsArray:h,intToBuffer:o,getBinarySize:s,isHexPrefixed:d,stripHexPrefix:m,padToEven:i,intToHex:n,fromAscii:l,fromUtf8:f,toAscii:a,toUtf8:u,getKeys:c,isHexString:p}}).call(r,e(0).Buffer)},function(t,r,e){var i=e(1),n=e(5);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var r=new i(1),e=(t+"").toLowerCase().trim(),o="0x"===e.substr(0,2)||"-0x"===e.substr(0,3),s=n(e);if("-"===s.substr(0,1)&&(s=n(s.slice(1)),r=new i((-1),10)),s=""===s?"0":s,!s.match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||o===!0&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(r);if((s.match(/^-?[0-9]+$/)||""===s)&&o===!1)return new i(s,10).mul(r)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new i(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,r,e){(function(r,e){/**
|
|
* [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(i){"use strict";function n(t,r,e){this.blocks=[],this.s=[],this.padding=r,this.outputBits=e,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=e>>5,this.extraBytes=(31&e)>>3;for(var i=0;50>i;++i)this.s[i]=0}var o="object"==typeof r&&r.versions&&r.versions.node;o&&(i=e);for(var s=!i.JS_SHA3_TEST&&"object"==typeof t&&t.exports,h="0123456789abcdef".split(""),u=[31,7936,2031616,520093696],a=[1,256,65536,16777216],f=[6,1536,393216,100663296],l=[0,8,16,24],c=[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"],g=function(t,r,e){return function(i){return new n(t,r,t).update(i)[e]()}},v=function(t,r,e){return function(i,o){return new n(t,r,o).update(i)[e]()}},y=function(t,r){var e=g(t,r,"hex");e.create=function(){return new n(t,r,t)},e.update=function(t){return e.create().update(t)};for(var i=0;m.length>i;++i){var o=m[i];e[o]=g(t,r,o)}return e},w=function(t,r){var e=v(t,r,"hex");e.create=function(e){return new n(t,r,e)},e.update=function(t,r){return e.create(r).update(t)};for(var i=0;m.length>i;++i){var o=m[i];e[o]=v(t,r,o)}return e},M=[{name:"keccak",padding:a,bits:p,createMethod:y},{name:"sha3",padding:f,bits:p,createMethod:y},{name:"shake",padding:u,bits:d,createMethod:w}],b={},_=0;M.length>_;++_)for(var E=M[_],A=E.bits,x=0;A.length>x;++x)b[E.name+"_"+A[x]]=E.createMethod(A[x],E.padding);n.prototype.update=function(t){var r="string"!=typeof t;r&&t.constructor==i.ArrayBuffer&&(t=new Uint8Array(t));for(var e,n,o=t.length,s=this.blocks,h=this.byteCount,u=this.blockCount,a=0,f=this.s;o>a;){if(this.reset)for(this.reset=!1,s[0]=this.block,e=1;u+1>e;++e)s[e]=0;if(r)for(e=this.start;o>a&&h>e;++a)s[e>>2]|=t[a]<<l[3&e++];else for(e=this.start;o>a&&h>e;++a)n=t.charCodeAt(a),128>n?s[e>>2]|=n<<l[3&e++]:2048>n?(s[e>>2]|=(192|n>>6)<<l[3&e++],s[e>>2]|=(128|63&n)<<l[3&e++]):55296>n||n>=57344?(s[e>>2]|=(224|n>>12)<<l[3&e++],s[e>>2]|=(128|n>>6&63)<<l[3&e++],s[e>>2]|=(128|63&n)<<l[3&e++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++a)),s[e>>2]|=(240|n>>18)<<l[3&e++],s[e>>2]|=(128|n>>12&63)<<l[3&e++],s[e>>2]|=(128|n>>6&63)<<l[3&e++],s[e>>2]|=(128|63&n)<<l[3&e++]);if(this.lastByteIndex=e,h>e)this.start=e;else{for(this.start=e-h,this.block=s[u],e=0;u>e;++e)f[e]^=s[e];S(f),this.reset=!0}}return this},n.prototype.finalize=function(){var t=this.blocks,r=this.lastByteIndex,e=this.blockCount,i=this.s;if(t[r>>2]|=this.padding[3&r],this.lastByteIndex==this.byteCount)for(t[0]=t[e],r=1;e+1>r;++r)t[r]=0;for(t[e-1]|=2147483648,r=0;e>r;++r)i[r]^=t[r];S(i)},n.prototype.toString=n.prototype.hex=function(){this.finalize();for(var t,r=this.blockCount,e=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,s=0,u="";i>s;){for(o=0;r>o&&i>s;++o,++s)t=e[o],u+=h[t>>4&15]+h[15&t]+h[t>>12&15]+h[t>>8&15]+h[t>>20&15]+h[t>>16&15]+h[t>>28&15]+h[t>>24&15];s%r==0&&(S(e),o=0)}return n&&(t=e[o],n>0&&(u+=h[t>>4&15]+h[15&t]),n>1&&(u+=h[t>>12&15]+h[t>>8&15]),n>2&&(u+=h[t>>20&15]+h[t>>16&15])),u},n.prototype.arrayBuffer=function(){this.finalize();var t,r=this.blockCount,e=this.s,i=this.outputBlocks,n=this.extraBytes,o=0,s=0,h=this.outputBits>>3;t=n?new ArrayBuffer(i+1<<2):new ArrayBuffer(h);for(var u=new Uint32Array(t);i>s;){for(o=0;r>o&&i>s;++o,++s)u[s]=e[o];s%r==0&&S(e)}return n&&(u[o]=e[o],t=t.slice(0,h)),t},n.prototype.buffer=n.prototype.arrayBuffer,n.prototype.digest=n.prototype.array=function(){this.finalize();for(var t,r,e=this.blockCount,i=this.s,n=this.outputBlocks,o=this.extraBytes,s=0,h=0,u=[];n>h;){for(s=0;e>s&&n>h;++s,++h)t=h<<2,r=i[s],u[t]=255&r,u[t+1]=r>>8&255,u[t+2]=r>>16&255,u[t+3]=r>>24&255;h%e==0&&S(i)}return o&&(t=h<<2,r=i[s],o>0&&(u[t]=255&r),o>1&&(u[t+1]=r>>8&255),o>2&&(u[t+2]=r>>16&255)),u};var S=function(t){var r,e,i,n,o,s,h,u,a,f,l,p,d,m,g,v,y,w,M,b,_,E,A,x,S,B,T,k,j,D,P,R,O,C,I,Q,N,U,q,L,F,H,Y,z,Z,J,K,$,W,V,G,X,tt,rt,et,it,nt,ot,st,ht,ut,at,ft;for(i=0;48>i;i+=2)n=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],h=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],f=t[6]^t[16]^t[26]^t[36]^t[46],l=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],r=p^(s<<1|h>>>31),e=d^(h<<1|s>>>31),t[0]^=r,t[1]^=e,t[10]^=r,t[11]^=e,t[20]^=r,t[21]^=e,t[30]^=r,t[31]^=e,t[40]^=r,t[41]^=e,r=n^(u<<1|a>>>31),e=o^(a<<1|u>>>31),t[2]^=r,t[3]^=e,t[12]^=r,t[13]^=e,t[22]^=r,t[23]^=e,t[32]^=r,t[33]^=e,t[42]^=r,t[43]^=e,r=s^(f<<1|l>>>31),e=h^(l<<1|f>>>31),t[4]^=r,t[5]^=e,t[14]^=r,t[15]^=e,t[24]^=r,t[25]^=e,t[34]^=r,t[35]^=e,t[44]^=r,t[45]^=e,r=u^(p<<1|d>>>31),e=a^(d<<1|p>>>31),t[6]^=r,t[7]^=e,t[16]^=r,t[17]^=e,t[26]^=r,t[27]^=e,t[36]^=r,t[37]^=e,t[46]^=r,t[47]^=e,r=f^(n<<1|o>>>31),e=l^(o<<1|n>>>31),t[8]^=r,t[9]^=e,t[18]^=r,t[19]^=e,t[28]^=r,t[29]^=e,t[38]^=r,t[39]^=e,t[48]^=r,t[49]^=e,m=t[0],g=t[1],J=t[11]<<4|t[10]>>>28,K=t[10]<<4|t[11]>>>28,k=t[20]<<3|t[21]>>>29,j=t[21]<<3|t[20]>>>29,ht=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,H=t[40]<<18|t[41]>>>14,Y=t[41]<<18|t[40]>>>14,C=t[2]<<1|t[3]>>>31,I=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,$=t[22]<<10|t[23]>>>22,W=t[23]<<10|t[22]>>>22,D=t[33]<<13|t[32]>>>19,P=t[32]<<13|t[33]>>>19,at=t[42]<<2|t[43]>>>30,ft=t[43]<<2|t[42]>>>30,rt=t[5]<<30|t[4]>>>2,et=t[4]<<30|t[5]>>>2,Q=t[14]<<6|t[15]>>>26,N=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,M=t[24]<<11|t[25]>>>21,V=t[34]<<15|t[35]>>>17,G=t[35]<<15|t[34]>>>17,R=t[45]<<29|t[44]>>>3,O=t[44]<<29|t[45]>>>3,x=t[6]<<28|t[7]>>>4,S=t[7]<<28|t[6]>>>4,it=t[17]<<23|t[16]>>>9,nt=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,q=t[27]<<25|t[26]>>>7,b=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,Z=t[9]<<27|t[8]>>>5,B=t[18]<<20|t[19]>>>12,T=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,L=t[38]<<8|t[39]>>>24,F=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,A=t[49]<<14|t[48]>>>18,t[0]=m^~v&w,t[1]=g^~y&M,t[10]=x^~B&k,t[11]=S^~T&j,t[20]=C^~Q&U,t[21]=I^~N&q,t[30]=z^~J&$,t[31]=Z^~K&W,t[40]=rt^~it&ot,t[41]=et^~nt&st,t[2]=v^~w&b,t[3]=y^~M&_,t[12]=B^~k&D,t[13]=T^~j&P,t[22]=Q^~U&L,t[23]=N^~q&F,t[32]=J^~$&V,t[33]=K^~W&G,t[42]=it^~ot&ht,t[43]=nt^~st&ut,t[4]=w^~b&E,t[5]=M^~_&A,t[14]=k^~D&R,t[15]=j^~P&O,t[24]=U^~L&H,t[25]=q^~F&Y,t[34]=$^~V&X,t[35]=W^~G&tt,t[44]=ot^~ht&at,t[45]=st^~ut&ft,t[6]=b^~E&m,t[7]=_^~A&g,t[16]=D^~R&x,t[17]=P^~O&S,t[26]=L^~H&C,t[27]=F^~Y&I,t[36]=V^~X&z,t[37]=G^~tt&Z,t[46]=ht^~at&rt,t[47]=ut^~ft&et,t[8]=E^~m&v,t[9]=A^~g&y,t[18]=R^~x&B,t[19]=O^~S&T,t[28]=H^~C&Q,t[29]=Y^~I&N,t[38]=X^~z&J,t[39]=tt^~Z&K,t[48]=at^~rt&it,t[49]=ft^~et&nt,t[0]^=c[i],t[1]^=c[i+1]};if(s)t.exports=b;else if(i)for(var B in b)i[B]=b[B]}(this)}).call(r,e(23),e(9))},function(t,r,e){var i=e(8);t.exports=function(t){return"string"!=typeof t?t:i(t)?t.slice(2):t}},function(t,r,e){"use strict";(function(r){function i(){}function n(t,e){function i(t){return parseInt(32*Math.ceil(t/32))}if(t.length!==e.length)throw Error("[ethjs-abi] while encoding params, types/values mismatch, Your contract requires "+t.length+" types (arguments), and you passed in "+e.length);var n=[];t.forEach(function(t,r){var i=m(t);n.push({dynamic:i.dynamic,value:i.encode(e[r])})});var o=0,s=0;n.forEach(function(t){t.dynamic?(o+=32,s+=i(t.value.length)):o+=i(t.value.length)});var h=0,u=o,a=new r(o+s);return n.forEach(function(t,r){t.dynamic?(d.encode(u).copy(a,h),h+=32,t.value.copy(a,u),u+=i(t.value.length)):(t.value.copy(a,h),h+=i(t.value.length))}),"0x"+a.toString("hex")}function o(t,r,e){var n=3>=arguments.length||void 0===arguments[3]||arguments[3];3>arguments.length&&(e=r,r=t,t=[]),e=p.hexOrBuffer(e);var o=new i,s=0;return r.forEach(function(r,i){var h=m(r);if(h.dynamic){var u=d.decode(e,s),a=h.decode(e,u.value.toNumber());s+=u.consumed}else{var a=h.decode(e,s);s+=a.consumed}n&&(o[i]=a.value),t[i]&&(o[t[i]]=a.value)}),o}function s(t,e){var i=t.name+"("+p.getKeys(t.inputs,"type").join(",")+")",o="0x"+new r(p.keccak256(i),"hex").slice(0,4).toString("hex"),s=n(p.getKeys(t.inputs,"type"),e).substring(2);return""+o+s}function h(t,r){var e=p.getKeys(t.outputs,"name",!0),i=p.getKeys(t.outputs,"type");return o(e,i,p.hexOrBuffer(r))}function u(t,r){return s(t,r)}function a(t){var r=t.name+"("+p.getKeys(t.inputs,"type").join(",")+")";return"0x"+p.keccak256(r)}function f(t,e,i){var n=3>=arguments.length||void 0===arguments[3]||arguments[3],s=t.inputs.filter(function(t){return!t.indexed}),h=p.getKeys(s,"name",!0),u=p.getKeys(s,"type"),a=o(h,u,p.hexOrBuffer(e),n),f=t.anonymous?0:1;return t.inputs.filter(function(t){return t.indexed}).map(function(t,e){var n=new r(i[e+f].slice(2),"hex"),o=m(t.type);a[t.name]=o.decode(n,0).value}),a._eventName=t.name,a}function l(t,r){var e=2>=arguments.length||void 0===arguments[2]||arguments[2];if(t&&r.topics[0]===a(t))return f(t,r.data,r.topics,e)}function c(t){var r=1>=arguments.length||void 0===arguments[1]||arguments[1],e={};return t.filter(function(t){return"event"===t.type}).map(function(t){e[a(t)]=t}),function(t){return t.map(function(t){return l(e[t.topics[0]],t,r)}).filter(function(t){return t})}}var p=e(13),d=p.uint256Coder,m=p.getParamCoder;t.exports={encodeParams:n,decodeParams:o,encodeMethod:s,decodeMethod:h,encodeEvent:u,decodeEvent:f,decodeLogItem:l,logDecoder:c,eventSignature:a}}).call(r,e(0).Buffer)},function(t,r){"use strict";function e(t,r){function e(t){var e=this;e.filterId=null,e.options=Object.assign({delay:300,decoder:function(t){return t},defaultFilterObject:{}},t||{}),e.watchers={},e.interval=setInterval(function(){null!==e.filterId&&Object.keys(e.watchers).length>0&&r.getFilterChanges(e.filterId,function(t,r){var i=[],n=null;if(!t)try{r.forEach(function(t,n){i[n]=r[n],i[n].data=e.options.decoder(i[n].data)})}catch(o){n=Error("[ethjs-filter] while decoding filter change event data from RPC '"+JSON.stringify(i)+"': "+o)}Object.keys(e.watchers).forEach(function(o){var s=e.watchers[o];return s.stop===!0?void delete e.watchers[o]:void(n?(s.reject(n),s.callback(n,null)):(t?s.reject(t):Array.isArray(i)&&r.length>0&&s.resolve(i),s.callback(t,i)))})})},e.options.delay)}return e.prototype.at=function(t){var r=this;r.filterId=t},e.prototype.watch=function(t){var r=t||function(){},e=this,i=Math.random().toString(36).substring(7),n=new Promise(function(t,n){e.watchers[i]={resolve:t,reject:n,callback:r,stop:!1}});return n.stopWatching=function(){e.watchers[i].stop=!0},n},e.prototype.uninstall=function(t){var e=this,i=t||function(){};return e.watchers=Object.assign({}),clearInterval(e.interval),new Promise(function(t,n){r.uninstallFilter(e.filterId,function(r,e){r?n(r):t(e),i(r,e)})})},e.prototype["new"]=function(){var e=function(){},i=this,n=[],o=[].slice.call(arguments);return"function"==typeof o[o.length-1]&&(e=o.pop()),"Filter"===t&&n.push(Object.assign(i.options.defaultFilterObject,o[o.length-1]||{})),new Promise(function(o,s){n.push(function(t,r){t?s(t):(i.filterId=r,o(r)),e(t,r)}),r["new"+t].apply(r,n)})},e}function i(t){var r=this;if(!(r instanceof i))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..");r.Filter=e("Filter",t),r.BlockFilter=e("BlockFilter",t),r.PendingTransactionFilter=e("PendingTransactionFilter",t)}t.exports=i},function(t,r){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,r){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(i){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";(function(r){function i(t,r){if(!(this instanceof i))throw Error('[ethjs] the Eth object requires you construct it with the "new" flag (i.e. `const eth = new Eth(...);`).');var e=this;e.options=r||{};var h=new n(t,e.options.query);Object.keys(Object.getPrototypeOf(h)).forEach(function(t){e[t]=function(){for(var r=arguments.length,e=Array(r),i=0;r>i;i++)e[i]=arguments[i];return h[t].apply(h,e)}}),e.filter=new o(h,e.options.query),e.contract=new s(h,e.options.query),e.currentProvider=h.rpc.currentProvider,e.setProvider=h.setProvider,e.getTransactionSuccess=d(e)}var n=e(17),o=e(7),s=e(14),h=e(16),u=e(6),a=e(19),f=e(4).keccak_256,l=e(3),c=e(1),p=e(2),d=e(11);t.exports=i,i.BN=c,i.isAddress=function(t){return p.isHexString(t,20)},i.keccak256=function(t){return"0x"+f(t)},i.Buffer=r,i.isHexString=p.isHexString,i.fromWei=a.fromWei,i.toWei=a.toWei,i.toBN=l,i.abi=u,i.fromAscii=p.fromAscii,i.toAscii=p.toAscii,i.fromUtf8=p.fromUtf8,i.toUtf8=p.toUtf8,i.HttpProvider=h}).call(r,e(0).Buffer)},function(t,r){"use strict";t.exports=function(t){return function(r,e){var i=0,n=t.options.timeout||8e5,o=t.options.interval||7e3,s=function(){},h=e||s;return new Promise(function(e,s){var u=setInterval(function(){if(t.getTransactionReceipt(r,function(t,r){t&&(clearInterval(u),h(t,null),s(t)),!t&&r&&(clearInterval(u),h(null,r),e(r))}),i>=n){clearInterval(u);var a="Receipt timeout waiting for tx hash: "+r;h(a,null),s(a)}i+=o},o)})}}},function(t,r){"use strict";function e(t){var r=t.length;if(r%4>0)throw Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function i(t){return 3*t.length/4-e(t)}function n(t){var r,i,n,o,s,h=t.length;o=e(t),s=new f(3*h/4-o),i=o>0?h-4:h;var u=0;for(r=0;i>r;r+=4)n=a[t.charCodeAt(r)]<<18|a[t.charCodeAt(r+1)]<<12|a[t.charCodeAt(r+2)]<<6|a[t.charCodeAt(r+3)],s[u++]=n>>16&255,s[u++]=n>>8&255,s[u++]=255&n;return 2===o?(n=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,s[u++]=255&n):1===o&&(n=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[t.charCodeAt(r+2)]>>2,s[u++]=n>>8&255,s[u++]=255&n),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,r,e){for(var i,n=[],s=r;e>s;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),n.push(o(i));return n.join("")}function h(t){for(var r,e=t.length,i=e%3,n="",o=[],h=16383,a=0,f=e-i;f>a;a+=h)o.push(s(t,a,a+h>f?f:a+h));return 1===i?(r=t[e-1],n+=u[r>>2],n+=u[r<<4&63],n+="=="):2===i&&(r=(t[e-2]<<8)+t[e-1],n+=u[r>>10],n+=u[r>>4&63],n+=u[r<<2&63],n+="="),o.push(n),o.join("")}r.byteLength=i,r.toByteArray=n,r.fromByteArray=h;for(var u=[],a=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,p=l.length;p>c;++c)u[c]=l[c],a[l.charCodeAt(c)]=c;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(t,r,e){"use strict";(function(r){function i(t){for(var r=t,e=r[0];r.length>0&&""+e=="0";)r=r.slice(1),e=r[0];return r}function n(t){var e=t,n=e.toString(16);return n.length%2&&(n="0"+n),i(new r(n,"hex"))}function o(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}function s(t,e){var i=t;if(!r.isBuffer(i)){if(!o(i)){var n=Error(e?"[ethjs-abi] invalid "+e:"[ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string");throw n.reason="[ethjs-abi] invalid hex string, hex must be prefixed and alphanumeric (e.g. 0x023..)",n.value=i,n}i=i.substring(2),i.length%2&&(i="0"+i),i=new r(i,"hex")}return i}function h(t){return"number"==typeof t?"0x"+n(new m(t)).toString("hex"):t.mod||t.modulo?"0x"+n(t).toString("hex"):"0x"+s(t).toString("hex")}function u(t,r,e){var i=[];if(!Array.isArray(t))throw Error("[ethjs-abi] while getting keys, invalid params value "+JSON.stringify(t));for(var n=0;t.length>n;n++){var o=t[n][r];if(e&&!o)o="";else if("string"!=typeof o)throw Error("[ethjs-abi] while getKeys found invalid ABI data structure, type value not string");i.push(o)}return i}function a(t,e){return{encode:function(i){var n=i;return"object"==typeof n&&n.toString&&(n.toTwos||n.dividedToIntegerBy)&&(n=n.toString(10).split(".")[0]),"string"!=typeof n&&"number"!=typeof n||(n=(n+"").split(".")[0]),n=g(n),n=n.toTwos(8*t).maskn(8*t),e&&(n=n.fromTwos(8*t).toTwos(256)),n.toArrayLike(r,"be",32)},decode:function(r,i){var n=32-t,o=new m(r.slice(i+n,i+32));return o=e?o.fromTwos(8*t):o.maskn(8*t),{consumed:32,value:new m(o.toString(10))}}}}function f(t){return{encode:function(t){var e=t;if(e=s(e),32===e.length)return e;var i=new r(32);return i.fill(0),e.copy(i),i},decode:function(r,e){if(0!==r.length&&e+32>r.length)throw Error("[ethjs-abi] while decoding fixed bytes, invalid bytes data length: "+t);return{consumed:32,value:"0x"+r.slice(e,e+t).toString("hex")}}}}function l(t){var e=parseInt(32*Math.ceil(t.length/32)),i=new r(e-t.length);return i.fill(0),r.concat([y.encode(t.length),t,i])}function c(t,r){if(0!==t.length&&r+32>t.length)throw Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+t.length+" should be less than "+(r+32));var e=y.decode(t,r).value;if(e=e.toNumber(),0!==t.length&&r+32+e>t.length)throw Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+t.length+" should be less than "+(r+32+e));return{consumed:parseInt(32+32*Math.ceil(e/32),10),value:t.slice(r+32,r+32+e)}}function p(t,e){return{encode:function(i){var n=new r(0),o=e;if(!Array.isArray(i))throw Error("[ethjs-abi] while encoding array, invalid array data, not type Object (Array)");if(o===-1&&(o=i.length,n=y.encode(o)),o!==i.length)throw Error("[ethjs-abi] while encoding array, size mismatch array length "+o+" does not equal "+i.length);return i.forEach(function(e){n=r.concat([n,t.encode(e)])}),n},decode:function(r,i){var n,o=e,s=i,h=0;o===-1&&(n=y.decode(r,s),o=n.value.toNumber(),h+=n.consumed,s+=n.consumed);for(var u=[],a=0;o>a;a++){var f=t.decode(r,s);h+=f.consumed,s+=f.consumed,u.push(f.value)}return{consumed:h,value:u}},dynamic:e===-1}}function d(t){for(var r=t,e=null,i="[ethjs-abi] while getting param coder (getParamCoder) type value "+JSON.stringify(r)+" is either invalid or unsupported by ethjs-abi.";r;){var n=r.match(E);if(!n)throw Error(i);r=r.substring(n[0].length);var o=n[2]||n[4]||n[5];switch(o){case"int":case"uint":if(e)throw Error(i);var s=parseInt(n[3]||256);if(0===s||s>256||s%8!==0)throw Error("[ethjs-abi] while getting param coder for type "+r+", invalid "+o+"<N> width: "+r);e=a(s/8,"int"===o);break;case"bool":if(e)throw Error(i);e=w;break;case"string":if(e)throw Error(i);e=_;break;case"bytes":if(e)throw Error(i);if(n[3]){var h=parseInt(n[3]);if(0===h||h>32)throw Error("[ethjs-abi] while getting param coder for prefix bytes, invalid type "+r+", size "+h+" should be 0 or greater than 32");e=f(h)}else e=b;break;case"address":if(e)throw Error(i);e=M;break;case"[]":if(!e||e.dynamic)throw Error(i);e=p(e,-1);break;default:if(!e||e.dynamic)throw Error(i);var u=parseInt(n[6]);e=p(e,u)}}if(!e)throw Error(i);return e}var m=e(1),g=e(3),v=e(4).keccak_256,y=a(32,!1),w={encode:function(t){return y.encode(t?1:0)},decode:function(t,r){var e=y.decode(t,r);return{consumed:e.consumed,value:!e.value.isZero()}}},M={encode:function(t){var e=t,i=new r(32);if(!o(e,20))throw Error("[ethjs-abi] while encoding address, invalid address value, not alphanumeric 20 byte hex string");return e=s(e),i.fill(0),e.copy(i,12),i},decode:function(t,r){if(0===t.length)return{consumed:32,value:"0x"};if(0!==t.length&&r+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(r+12,r+32).toString("hex")}}},b={encode:function(t){return l(s(t))},decode:function(t,r){var e=c(t,r);return e.value="0x"+e.value.toString("hex"),e},dynamic:!0},_={encode:function(t){return l(new r(t,"utf8"))},decode:function(t,r){var e=c(t,r);return e.value=e.value.toString("utf8"),e},dynamic:!0},E=RegExp(/^((u?int|bytes)([0-9]*)|(address|bool|string)|(\[([0-9]*)\]))/);t.exports={BN:m,bnToBuffer:n,isHexString:o,hexOrBuffer:s,hexlify:h,stripZeros:i,keccak256:v,getKeys:u,numberToBN:g,coderNumber:a,uint256Coder:y,coderBoolean:w,coderFixedBytes:f,coderAddress:M,coderDynamicBytes:b,coderString:_,coderArray:p,paramTypePart:E,getParamCoder:d}}).call(r,e(0).Buffer)},function(t,r,e){"use strict";function i(t){var r=["from","to","data","value","gasPrice","gas"];return!("object"!=typeof t||Array.isArray(t)!==!0||0>=t.length||"object"!=typeof t[t.length-1]||0!==Object.keys(t[t.length-1]).length&&!c(Object.keys(t[t.length-1]),r,!0))}function n(t){return t.filter(function(t){return"constructor"===t.type})[0]}function o(t){return t.filter(function(t){return("function"===t.type||"event"===t.type)&&t.name.length>0})}function s(t){return function(r,e,s){if(!Array.isArray(r))throw Error("[ethjs-contract] Contract ABI must be type Array, got type "+typeof r);if(void 0!==e&&"string"!=typeof e)throw Error("[ethjs-contract] Contract bytecode must be type String, got type "+typeof e);if(void 0!==s&&"object"!=typeof s)throw Error("[ethjs-contract] Contract default tx object must be type Object, got type "+typeof r);var h={};return h.at=function(n){function h(){var h=this;h.abi=r||[],h.query=t,h.address=n||"0x",h.bytecode=e||"0x",h.defaultTxObject=s||{},h.filters=new f(t),o(r).forEach(function(r){h[r.name]=function(){var e="call",n={},o=function(){},s=[].slice.call(arguments);if("function"==typeof s[s.length-1]&&(o=s.pop()),"function"===r.type)return new Promise(function(a,f){function l(t,i){if("call"!==e||t)"sendTransaction"!==e||t?(f(t),o(t,null)):(a(i),o(null,i));else try{var n=u.decodeMethod(r,i);a(n),o(null,n)}catch(s){var h=Error("[ethjs-contract] while formatting incoming raw call data "+JSON.stringify(i)+" "+s);f(h),o(h,null)}}i(s)&&(n=s.pop());var c=Object.assign({},h.defaultTxObject,n,{to:h.address});c.data=u.encodeMethod(r,s),r.constant===!1&&(e="sendTransaction"),t[e](c,l)});if("event"===r.type){var f=function(){var t=l(r.inputs,"type",!1),e="0x"+a(r.name+"("+t.join(",")+")"),i=[e],n=Object.assign({},s[0])||{};return{v:new h.filters.Filter(Object.assign({},n,{decoder:function(t){return u.decodeEvent(r,t,i)},defaultFilterObject:Object.assign({},s[0]||{},{to:h.address,topics:i})}))}}();if("object"==typeof f)return f.v}}})}return new h},h["new"]=function(){var o={},h=function(){},a=[].slice.call(arguments);"function"==typeof a[a.length-1]&&(h=a.pop()),i(a)&&(o=a.pop());var f=n(r),c=Object.assign({},s,o);if(e&&(c.data=e),f){var p=u.encodeParams(l(f.inputs,"type"),a).substring(2);c.data=""+c.data+p}return t.sendTransaction(c,h)},h}}function h(t){return s(t)}var u=e(6),a=e(4).keccak_256,f=e(7),l=e(2).getKeys,c=e(2).arrayContainsArray;t.exports=h},function(t,r,e){"use strict";function i(t,r){if(["string","number","object"].indexOf(typeof t)===-1||null===t)return t;var e=p(t);if(p(t).isNeg())throw Error("[ethjs-format] while formatting quantity '"+e.toString(10)+"', invalid negative number. Number must be positive or zero.");return r?"0x"+e.toString(16):e}function n(t,r){var e=t;return l.tags.indexOf(t)===-1&&(e=i(t,r)),e}function o(t,r){var e=t,i=0;if("string"==typeof t&&(e="0x"+m(d(t)),i=v(e)),"0x00"===e&&(e="0x0"),"number"==typeof r&&null!==t&&"0x"!==e&&"0x0"!==e&&(!/^[0-9A-Fa-f]+$/.test(d(e))||i!==2+2*r))throw Error("[ethjs-format] hex string '"+e+"' must be an alphanumeric "+(2+2*r)+" utf8 byte hex (chars: a-fA-F) string, is "+i+" bytes");return e}function s(t,r,e){var i=Object.assign({},r),n=null;if("string"==typeof t&&(n="Boolean|EthSyncing"===t?Object.assign({},l.objects.EthSyncing):"DATA|Transaction"===t?Object.assign({},l.objects.Transaction):Object.assign({},l.objects[t])),!g(Object.keys(r),n.__required))throw Error("[ethjs-format] object "+JSON.stringify(r)+" must contain properties: "+n.__required.join(", "));return Object.keys(n).forEach(function(t){"__required"!==t&&void 0!==r[t]&&(i[t]=u(n[t],r[t],e))}),i}function h(t,r,e,i){var n=r.slice(),o=t;if("Array|DATA"===t&&(o=["D"]),"FilterChange"===t&&"string"==typeof r[0]&&(o=["D32"]),e===!0&&"number"==typeof i&&i>r.length)throw Error("array "+JSON.stringify(r)+" must contain at least "+i+" params, but only contains "+r.length+".");return o=o.slice(),r.forEach(function(t,r){var i=0;o.length>1&&(i=r),n[r]=u(o[i],t,e)}),n}function u(t,r,e,u){var a=r;return"Q"===t?a=i(r,e):"Q|T"===t?a=n(r,e):"D"===t?a=o(r):"D20"===t?a=o(r,20):"D32"===t?a=o(r,32):"object"==typeof r&&null!==r&&Array.isArray(r)===!1?a=s(t,r,e):Array.isArray(r)&&(a=h(t,r,e,u)),a}function a(t,r){return u(l.methods[t][0],r,!0,l.methods[t][2])}function f(t,r){return u(l.methods[t][1],r,!1)}var l=e(22),c=e(2),p=e(3),d=e(5),m=c.padToEven,g=c.arrayContainsArray,v=c.getBinarySize;t.exports={schema:l,formatQuantity:i,formatQuantityOrTag:n,formatObject:s,formatArray:h,format:u,formatInputs:a,formatOutputs:f}},function(t,r,e){"use strict";function i(t,r){var e=Error("[ethjs-provider-http] Invalid JSON RPC response from provider\n host: "+r+"\n response: "+(t.responseText+"")+" "+JSON.stringify(t.responseText,null,2)+"\n responseURL: "+t.responseURL+"\n status: "+t.status+"\n statusText: "+t.statusText+"\n ");return e.value=t,e}function n(t,r){if(!(this instanceof n))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 e=this;e.host=t,e.timeout=r||0}var o=e(25);n.prototype.sendAsync=function(t,r){var e=this,n=new o;n.timeout=e.timeout,n.open("POST",e.host,!0),n.setRequestHeader("Content-Type","application/json"),n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var t=n.responseText,o=null;try{t=JSON.parse(t)}catch(s){o=i(n,e.host)}r(o,t)}},n.ontimeout=function(){r("[ethjs-provider-http] CONNECTION TIMEOUT: http request timeout after "+e.timeout+" ms. (i.e. your connect has timed out for whatever reason, check your provider).",null)};try{n.send(JSON.stringify(t))}catch(s){r("[ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node '"+e.host+"': "+JSON.stringify(s,null,2),null)}},t.exports=n},function(t,r,e){"use strict";function i(t,r){var e=this,n=r||{};if(!(this instanceof i))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);')");e.options=Object.assign({debug:n.debug||!1,logger:n.logger||console,jsonSpace:n.jsonSpace||0}),e.rpc=new s(t),e.setProvider=e.rpc.setProvider}function n(t,r){return function(){var e=null,i=null,n=this,s=[].slice.call(arguments),h=t.replace("eth_","");s.length>0&&"function"==typeof s[s.length-1]&&(e=s.pop());var u=new Promise(function(e,u){var a=function(r,i){if(r)u(r);else try{n.log("attempting method formatting for '"+h+"' with raw outputs: "+JSON.stringify(i,null,n.options.jsonSpace));var s=o.formatOutputs(t,i);n.log("method formatting success for '"+h+"' formatted result: "+JSON.stringify(s,null,n.options.jsonSpace)),e(s)}catch(a){var f=Error("[ethjs-query] while formatting outputs from RPC '"+JSON.stringify(i,null,n.options.jsonSpace)+"' for method '"+h+"' "+a);u(f)}};if(r[2]>s.length)return a(Error("[ethjs-query] method '"+h+"' requires at least "+r[2]+" input (format type "+r[0][0]+"), "+s.length+" provided. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+t.toLowerCase()));if(s.length>r[0].length)return a(Error("[ethjs-query] method '"+h+"' requires at most "+r[0].length+" params, "+s.length+" provided '"+JSON.stringify(s,null,n.options.jsonSpace)+"'. For more information visit: https://github.com/ethereum/wiki/wiki/JSON-RPC#"+t.toLowerCase()));r[3]&&r[3]>s.length&&s.push("latest"),n.log("attempting method formatting for '"+h+"' with inputs "+JSON.stringify(s,null,n.options.jsonSpace));try{i=o.formatInputs(t,s),n.log("method formatting success for '"+h+"' with formatted result: "+JSON.stringify(i,null,n.options.jsonSpace))}catch(f){return a(Error("[ethjs-query] while formatting inputs '"+JSON.stringify(s,null,n.options.jsonSpace)+"' for method '"+h+"' error: "+f))}return n.rpc.sendAsync({method:t,params:i},a)});return e?void u.then(function(t){return e(null,t)})["catch"](function(t){return e(t,null)}):u}}var o=e(15),s=e(18);t.exports=i,i.prototype.log=function(t){var r=this;r.options.debug&&r.options.logger.log("[ethjs-query log] "+t)},Object.keys(o.schema.methods).forEach(function(t){Object.defineProperty(i.prototype,t.replace("eth_",""),{enumerable:!0,value:n(t,o.schema.methods[t])})})},function(t,r){"use strict";function e(t,r){var i=this,n=r||{};if(!(this instanceof e))throw Error('[ethjs-rpc] the EthRPC object requires the "new" flag in order to function normally (i.e. `const eth = new EthRPC(provider);`).');i.options=Object.assign({jsonSpace:n.jsonSpace||0,max:n.max||9999999999999}),i.idCounter=Math.floor(Math.random()*i.options.max),(i.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);')");i.currentProvider=t})(t)}function i(t,r){return Object.assign({},{id:r,jsonrpc:"2.0",params:[]},t)}t.exports=e,e.prototype.sendAsync=function(t,r){var e=this;e.idCounter=e.idCounter%e.options.max;var n=i(t,e.idCounter++),o=new Promise(function(t,r){e.currentProvider.sendAsync(n,function(i,o){var s=o||{};if(i||s.error){var h="[ethjs-rpc] "+(s.error&&"rpc"||"")+" error with payload "+JSON.stringify(n,null,e.options.jsonSpace)+" "+(i?i+"":JSON.stringify(s.error,null,e.options.jsonSpace)),u=Error(h);return u.value=i||s.error,void r(u)}t(s.result)})});return r?void o.then(function(t){r(null,t)})["catch"](function(t){r(t)}):o}},function(t,r,e){"use strict";function i(t){var r=t?t.toLowerCase():"ether",e=l[r];if("string"!=typeof e)throw Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(l,null,2));return new h(e,10)}function n(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,r,e){var n=u(t),o=n.lt(a),s=i(r),h=l[r].length-1||1,c=e||{};o&&(n=n.mul(f));for(var p=n.mod(s).toString(10);h>p.length;)p="0"+p;c.pad||(p=p.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var d=n.div(s).toString(10);c.commify&&(d=d.replace(/\B(?=(\d{3})+(?!\d))/g,","));var m=""+d+("0"==p?"":"."+p);return o&&(m="-"+m),m}function s(t,r){var e=n(t),o=i(r),s=l[r].length-1||1,u="-"===e.substring(0,1);if(u&&(e=e.substring(1)),"."===e)throw Error("[ethjs-unit] while converting number "+t+" to wei, invalid value");var a=e.split(".");if(a.length>2)throw Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var c=a[0],p=a[1];if(c||(c="0"),p||(p="0"),p.length>s)throw Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;s>p.length;)p+="0";c=new h(c),p=new h(p);var d=c.mul(o).add(p);return u&&(d=d.mul(f)),new h(d.toString(10),10)}var h=e(1),u=e(3),a=new h(0),f=new h((-1)),l={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:l,numberToString:n,getValueOfUnit:i,fromWei:o,toWei:s}},function(t,r){r.read=function(t,r,e,i,n){var o,s,h=8*n-i-1,u=(1<<h)-1,a=u>>1,f=-7,l=e?n-1:0,c=e?-1:1,p=t[r+l];for(l+=c,o=p&(1<<-f)-1,p>>=-f,f+=h;f>0;o=256*o+t[r+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+t[r+l],l+=c,f-=8);if(0===o)o=1-a;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,i),o-=a}return(p?-1:1)*s*Math.pow(2,o-i)},r.write=function(t,r,e,i,n,o){var s,h,u,a=8*o-n-1,f=(1<<a)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,d=i?1:-1,m=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,s=f):(s=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-s))<1&&(s--,u*=2),r+=1>s+l?c*Math.pow(2,1-l):c/u,2>r*u||(s++,u/=2),f>s+l?1>s+l?(h=r*Math.pow(2,l-1)*Math.pow(2,n),s=0):(h=(r*u-1)*Math.pow(2,n),s+=l):(h=0,s=f));n>=8;t[e+p]=255&h,p+=d,h/=256,n-=8);for(s=s<<n|h,a+=n;a>0;t[e+p]=255&s,p+=d,s/=256,a-=8);t[e+p-d]|=128*m}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r){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:[["Q"],"B",1],eth_getFilterChanges:[["Q"],["FilterChange"],1],eth_getFilterLogs:[["Q"],["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,r){function e(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function n(t){if(f===setTimeout)return setTimeout(t,0);if((f===e||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(r){try{return f.call(null,t,0)}catch(r){return f.call(this,t,0)}}}function o(t){if(l===clearTimeout)return clearTimeout(t);if((l===i||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(r){try{return l.call(null,t)}catch(r){return l.call(this,t)}}}function s(){m&&p&&(m=!1,p.length?d=p.concat(d):g=-1,d.length&&h())}function h(){if(!m){var t=n(s);m=!0;for(var r=d.length;r;){for(p=d,d=[];++g<r;)p&&p[g].run();g=-1,r=d.length}p=null,m=!1,o(t)}}function u(t,r){this.fun=t,this.array=r}function a(){}var f,l,c=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:e}catch(t){f=e}try{l="function"==typeof clearTimeout?clearTimeout:i}catch(t){l=i}}();var p,d=[],m=!1,g=-1;c.nextTick=function(t){var r=Array(arguments.length-1);if(arguments.length>1)for(var e=1;arguments.length>e;e++)r[e-1]=arguments[e];d.push(new u(t,r)),1!==d.length||m||n(h)},u.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.prependListener=a,c.prependOnceListener=a,c.listeners=function(t){return[]},c.binding=function(t){throw Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){throw Error("process.chdir is not supported")},c.umask=function(){return 0}},function(t,r){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,r){t.exports=XMLHttpRequest},function(t,r,e){t.exports=e(10)}])});
|