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